From 48909f2ccf295c4c5ebd5a4f8af93c00410905ad Mon Sep 17 00:00:00 2001 From: Martin Nicholson Date: Fri, 3 Jan 2020 14:44:55 +0100 Subject: [PATCH 01/11] Bump versions of tao npm libs --- views/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/package.json b/views/package.json index 3d1fd27227..51a8957da0 100644 --- a/views/package.json +++ b/views/package.json @@ -8,7 +8,7 @@ "url": "git+https://github.com/oat-sa/extension-tao-itemqti.git" }, "dependencies": { - "@oat-sa/tao-item-runner": "0.4.0", - "@oat-sa/tao-item-runner-qti": "0.4.13" + "@oat-sa/tao-item-runner": "oat-sa/tao-item-runner-fe#breaking/TDR-9/handlebars-4-upgrade", + "@oat-sa/tao-item-runner-qti": "oat-sa/tao-item-runner-qti-fe#breaking/TDR-9/handlebars-4-upgrade" } } From cd1b1c5c6195d79f549861c9c2f9dd2858b8540c Mon Sep 17 00:00:00 2001 From: Martin Nicholson Date: Fri, 3 Jan 2020 14:45:06 +0100 Subject: [PATCH 02/11] Version bump internal package to 1.0.0 --- views/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/package.json b/views/package.json index 51a8957da0..71060a97dc 100644 --- a/views/package.json +++ b/views/package.json @@ -1,6 +1,6 @@ { "name": "@oat-sa/tao-qti-item", - "version": "0.1.1", + "version": "1.0.0", "license": "GPL-2.0", "description": "taoQtiItem frontend modules", "repository": { From d1228a2283fe7c3ae6abd0e3f9cc8dea829872f2 Mon Sep 17 00:00:00 2001 From: Martin Nicholson Date: Fri, 3 Jan 2020 15:29:39 +0100 Subject: [PATCH 03/11] Version bump extension to 24.0.0 --- manifest.php | 4 ++-- scripts/update/Updater.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.php b/manifest.php index 438ad8d8ae..7dca1f96e2 100755 --- a/manifest.php +++ b/manifest.php @@ -34,11 +34,11 @@ 'name' => 'taoQtiItem', 'label' => 'QTI item model', 'license' => 'GPL-2.0', - 'version' => '23.0.4', + 'version' => '24.0.0', 'author' => 'Open Assessment Technologies', 'requires' => array( 'taoItems' => '>=10.1.0', - 'tao' => '>=40.3.0', + 'tao' => '>=41.0.0', 'generis' => '>=12.5.0', ), 'models' => array( diff --git a/scripts/update/Updater.php b/scripts/update/Updater.php index 837cd24599..e876a96060 100644 --- a/scripts/update/Updater.php +++ b/scripts/update/Updater.php @@ -438,6 +438,6 @@ public function update($initialVersion){ $this->setVersion('21.0.0'); } - $this->skip('21.0.0', '23.0.4'); + $this->skip('21.0.0', '24.0.0'); } } From dfdb4b82ad5abc09da5a863f935b483e8f518456 Mon Sep 17 00:00:00 2001 From: Martin Nicholson Date: Fri, 3 Jan 2020 22:26:17 +0100 Subject: [PATCH 04/11] Update branch reference --- views/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/package.json b/views/package.json index 71060a97dc..411f221e5a 100644 --- a/views/package.json +++ b/views/package.json @@ -9,6 +9,6 @@ }, "dependencies": { "@oat-sa/tao-item-runner": "oat-sa/tao-item-runner-fe#breaking/TDR-9/handlebars-4-upgrade", - "@oat-sa/tao-item-runner-qti": "oat-sa/tao-item-runner-qti-fe#breaking/TDR-9/handlebars-4-upgrade" + "@oat-sa/tao-item-runner-qti": "oat-sa/tao-item-runner-qti-fe#breaking/TDR-9/handlebars-4-upgrade-bis" } } From ce606e186dacf09fc5e3e7a907c555855c8e680b Mon Sep 17 00:00:00 2001 From: Martin Nicholson Date: Tue, 5 Sep 2023 20:18:18 +0200 Subject: [PATCH 05/11] chore: lockfileversion 3 --- views/package-lock.json | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/views/package-lock.json b/views/package-lock.json index fb234eb61b..da4a582467 100644 --- a/views/package-lock.json +++ b/views/package-lock.json @@ -1,18 +1,27 @@ { "name": "@oat-sa/tao-qti-item", - "version": "0.4.0", - "lockfileVersion": 1, + "version": "1.0.0", + "lockfileVersion": 3, "requires": true, - "dependencies": { - "@oat-sa/tao-item-runner": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/@oat-sa/tao-item-runner/-/tao-item-runner-0.8.2.tgz", - "integrity": "sha512-JSP/NRUjn6dImcfLGgpguItB5Q6t+Gf1lWj8ibx7VlImBKQ305/aHxM+M1H1A5p/nSlIxdtD+t5HHwICi9RUQQ==" + "packages": { + "": { + "name": "@oat-sa/tao-qti-item", + "version": "1.0.0", + "license": "GPL-2.0", + "dependencies": { + "@oat-sa/tao-item-runner": "oat-sa/tao-item-runner-fe#breaking/TDR-9/handlebars-4-upgrade", + "@oat-sa/tao-item-runner-qti": "oat-sa/tao-item-runner-qti-fe#breaking/TDR-9/handlebars-4-upgrade-bis" + } }, - "@oat-sa/tao-item-runner-qti": { + "node_modules/@oat-sa/tao-item-runner": { + "version": "1.0.0", + "resolved": "git+ssh://git@github.com/oat-sa/tao-item-runner-fe.git#4f9d48ab6c32a202132184d6b02c8ef3f9244035", + "license": "GPL-2.0" + }, + "node_modules/@oat-sa/tao-item-runner-qti": { "version": "1.11.2", - "resolved": "https://registry.npmjs.org/@oat-sa/tao-item-runner-qti/-/tao-item-runner-qti-1.11.2.tgz", - "integrity": "sha512-C+DdoWKQiCL1byh0i0LBjgT0sbXuVUGvGaUgrRgzAlWTxd4sGXlERes0bMsmWjkp03kif++oE12B3XeitmH+KA==" + "resolved": "git+ssh://git@github.com/oat-sa/tao-item-runner-qti-fe.git#31c1f854498c4c7808632ca70c787758229f8d32", + "license": "GPL-2.0" } } } From 33285fa62018b7e0315beb18f6b7fd46f7ec4f0a Mon Sep 17 00:00:00 2001 From: Martin Nicholson Date: Wed, 6 Sep 2023 15:56:21 +0200 Subject: [PATCH 06/11] chore: update commit references --- views/package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/package-lock.json b/views/package-lock.json index da4a582467..28a690184a 100644 --- a/views/package-lock.json +++ b/views/package-lock.json @@ -15,12 +15,12 @@ }, "node_modules/@oat-sa/tao-item-runner": { "version": "1.0.0", - "resolved": "git+ssh://git@github.com/oat-sa/tao-item-runner-fe.git#4f9d48ab6c32a202132184d6b02c8ef3f9244035", + "resolved": "git+ssh://git@github.com/oat-sa/tao-item-runner-fe.git#e14ef276e9415caa811c456bc40b56f20740cbe3", "license": "GPL-2.0" }, "node_modules/@oat-sa/tao-item-runner-qti": { "version": "1.11.2", - "resolved": "git+ssh://git@github.com/oat-sa/tao-item-runner-qti-fe.git#31c1f854498c4c7808632ca70c787758229f8d32", + "resolved": "git+ssh://git@github.com/oat-sa/tao-item-runner-qti-fe.git#0d88cde5e28aa7a35804aaa5976bb4b489dc66f1", "license": "GPL-2.0" } } From ef8ebe94375674f047333706e4296d4cd8352cab Mon Sep 17 00:00:00 2001 From: Martin Nicholson Date: Thu, 7 Sep 2023 13:43:47 +0200 Subject: [PATCH 07/11] chore: ssh to https --- views/package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/package-lock.json b/views/package-lock.json index 28a690184a..085e454823 100644 --- a/views/package-lock.json +++ b/views/package-lock.json @@ -15,12 +15,12 @@ }, "node_modules/@oat-sa/tao-item-runner": { "version": "1.0.0", - "resolved": "git+ssh://git@github.com/oat-sa/tao-item-runner-fe.git#e14ef276e9415caa811c456bc40b56f20740cbe3", + "resolved": "https://github.com/oat-sa/tao-item-runner-fe.git#e14ef276e9415caa811c456bc40b56f20740cbe3", "license": "GPL-2.0" }, "node_modules/@oat-sa/tao-item-runner-qti": { "version": "1.11.2", - "resolved": "git+ssh://git@github.com/oat-sa/tao-item-runner-qti-fe.git#0d88cde5e28aa7a35804aaa5976bb4b489dc66f1", + "resolved": "https://github.com/oat-sa/tao-item-runner-qti-fe.git#0d88cde5e28aa7a35804aaa5976bb4b489dc66f1", "license": "GPL-2.0" } } From 6926212452979329ff6c91abb42fe1995f501943 Mon Sep 17 00:00:00 2001 From: Martin Nicholson Date: Tue, 19 Sep 2023 09:44:03 +0200 Subject: [PATCH 08/11] feat: copy handlebars_4 to portableLib --- views/js/portableLib/handlebars_4.js | 5973 ++++++++++++++++++++++++++ 1 file changed, 5973 insertions(+) create mode 100644 views/js/portableLib/handlebars_4.js diff --git a/views/js/portableLib/handlebars_4.js b/views/js/portableLib/handlebars_4.js new file mode 100644 index 0000000000..2932715dda --- /dev/null +++ b/views/js/portableLib/handlebars_4.js @@ -0,0 +1,5973 @@ +/**! + * copy of node_modules/handlebars/dist/handlebars.js + + @license + handlebars v4.7.8 + +Copyright (C) 2011-2019 by Yehuda Katz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*/ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["Handlebars"] = factory(); + else + root["Handlebars"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _handlebarsRuntime = __webpack_require__(2); + + var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime); + + // Compiler imports + + var _handlebarsCompilerAst = __webpack_require__(84); + + var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst); + + var _handlebarsCompilerBase = __webpack_require__(85); + + var _handlebarsCompilerCompiler = __webpack_require__(90); + + var _handlebarsCompilerJavascriptCompiler = __webpack_require__(91); + + var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler); + + var _handlebarsCompilerVisitor = __webpack_require__(88); + + var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor); + + var _handlebarsNoConflict = __webpack_require__(83); + + var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); + + var _create = _handlebarsRuntime2['default'].create; + function create() { + var hb = _create(); + + hb.compile = function (input, options) { + return _handlebarsCompilerCompiler.compile(input, options, hb); + }; + hb.precompile = function (input, options) { + return _handlebarsCompilerCompiler.precompile(input, options, hb); + }; + + hb.AST = _handlebarsCompilerAst2['default']; + hb.Compiler = _handlebarsCompilerCompiler.Compiler; + hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default']; + hb.Parser = _handlebarsCompilerBase.parser; + hb.parse = _handlebarsCompilerBase.parse; + hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing; + + return hb; + } + + var inst = create(); + inst.create = create; + + _handlebarsNoConflict2['default'](inst); + + inst.Visitor = _handlebarsCompilerVisitor2['default']; + + inst['default'] = inst; + + exports['default'] = inst; + module.exports = exports['default']; + +/***/ }), +/* 1 */ +/***/ (function(module, exports) { + + "use strict"; + + exports["default"] = function (obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + }; + + exports.__esModule = true; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireWildcard = __webpack_require__(3)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _handlebarsBase = __webpack_require__(4); + + var base = _interopRequireWildcard(_handlebarsBase); + + // Each of these augment the Handlebars object. No need to setup here. + // (This is done to easily share code between commonjs and browse envs) + + var _handlebarsSafeString = __webpack_require__(77); + + var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); + + var _handlebarsException = __webpack_require__(6); + + var _handlebarsException2 = _interopRequireDefault(_handlebarsException); + + var _handlebarsUtils = __webpack_require__(5); + + var Utils = _interopRequireWildcard(_handlebarsUtils); + + var _handlebarsRuntime = __webpack_require__(78); + + var runtime = _interopRequireWildcard(_handlebarsRuntime); + + var _handlebarsNoConflict = __webpack_require__(83); + + var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); + + // For compatibility and usage outside of module systems, make the Handlebars object a namespace + function create() { + var hb = new base.HandlebarsEnvironment(); + + Utils.extend(hb, base); + hb.SafeString = _handlebarsSafeString2['default']; + hb.Exception = _handlebarsException2['default']; + hb.Utils = Utils; + hb.escapeExpression = Utils.escapeExpression; + + hb.VM = runtime; + hb.template = function (spec) { + return runtime.template(spec, hb); + }; + + return hb; + } + + var inst = create(); + inst.create = create; + + _handlebarsNoConflict2['default'](inst); + + inst['default'] = inst; + + exports['default'] = inst; + module.exports = exports['default']; + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + + "use strict"; + + exports["default"] = function (obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + + newObj["default"] = obj; + return newObj; + } + }; + + exports.__esModule = true; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.HandlebarsEnvironment = HandlebarsEnvironment; + + var _utils = __webpack_require__(5); + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + var _helpers = __webpack_require__(10); + + var _decorators = __webpack_require__(70); + + var _logger = __webpack_require__(72); + + var _logger2 = _interopRequireDefault(_logger); + + var _internalProtoAccess = __webpack_require__(73); + + var VERSION = '4.7.8'; + exports.VERSION = VERSION; + var COMPILER_REVISION = 8; + exports.COMPILER_REVISION = COMPILER_REVISION; + var LAST_COMPATIBLE_COMPILER_REVISION = 7; + + exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION; + var REVISION_CHANGES = { + 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it + 2: '== 1.0.0-rc.3', + 3: '== 1.0.0-rc.4', + 4: '== 1.x.x', + 5: '== 2.0.0-alpha.x', + 6: '>= 2.0.0-beta.1', + 7: '>= 4.0.0 <4.3.0', + 8: '>= 4.3.0' + }; + + exports.REVISION_CHANGES = REVISION_CHANGES; + var objectType = '[object Object]'; + + function HandlebarsEnvironment(helpers, partials, decorators) { + this.helpers = helpers || {}; + this.partials = partials || {}; + this.decorators = decorators || {}; + + _helpers.registerDefaultHelpers(this); + _decorators.registerDefaultDecorators(this); + } + + HandlebarsEnvironment.prototype = { + constructor: HandlebarsEnvironment, + + logger: _logger2['default'], + log: _logger2['default'].log, + + registerHelper: function registerHelper(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _exception2['default']('Arg not supported with multiple helpers'); + } + _utils.extend(this.helpers, name); + } else { + this.helpers[name] = fn; + } + }, + unregisterHelper: function unregisterHelper(name) { + delete this.helpers[name]; + }, + + registerPartial: function registerPartial(name, partial) { + if (_utils.toString.call(name) === objectType) { + _utils.extend(this.partials, name); + } else { + if (typeof partial === 'undefined') { + throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined'); + } + this.partials[name] = partial; + } + }, + unregisterPartial: function unregisterPartial(name) { + delete this.partials[name]; + }, + + registerDecorator: function registerDecorator(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _exception2['default']('Arg not supported with multiple decorators'); + } + _utils.extend(this.decorators, name); + } else { + this.decorators[name] = fn; + } + }, + unregisterDecorator: function unregisterDecorator(name) { + delete this.decorators[name]; + }, + /** + * Reset the memory of illegal property accesses that have already been logged. + * @deprecated should only be used in handlebars test-cases + */ + resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() { + _internalProtoAccess.resetLoggedProperties(); + } + }; + + var log = _logger2['default'].log; + + exports.log = log; + exports.createFrame = _utils.createFrame; + exports.logger = _logger2['default']; + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + exports.extend = extend; + exports.indexOf = indexOf; + exports.escapeExpression = escapeExpression; + exports.isEmpty = isEmpty; + exports.createFrame = createFrame; + exports.blockParams = blockParams; + exports.appendContextPath = appendContextPath; + var escape = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`', + '=': '=' + }; + + var badChars = /[&<>"'`=]/g, + possible = /[&<>"'`=]/; + + function escapeChar(chr) { + return escape[chr]; + } + + function extend(obj /* , ...source */) { + for (var i = 1; i < arguments.length; i++) { + for (var key in arguments[i]) { + if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { + obj[key] = arguments[i][key]; + } + } + } + + return obj; + } + + var toString = Object.prototype.toString; + + exports.toString = toString; + // Sourced from lodash + // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt + /* eslint-disable func-style */ + var isFunction = function isFunction(value) { + return typeof value === 'function'; + }; + // fallback for older versions of Chrome and Safari + /* istanbul ignore next */ + if (isFunction(/x/)) { + exports.isFunction = isFunction = function (value) { + return typeof value === 'function' && toString.call(value) === '[object Function]'; + }; + } + exports.isFunction = isFunction; + + /* eslint-enable func-style */ + + /* istanbul ignore next */ + var isArray = Array.isArray || function (value) { + return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; + }; + + exports.isArray = isArray; + // Older IE versions do not directly support indexOf so we must implement our own, sadly. + + function indexOf(array, value) { + for (var i = 0, len = array.length; i < len; i++) { + if (array[i] === value) { + return i; + } + } + return -1; + } + + function escapeExpression(string) { + if (typeof string !== 'string') { + // don't escape SafeStrings, since they're already safe + if (string && string.toHTML) { + return string.toHTML(); + } else if (string == null) { + return ''; + } else if (!string) { + return string + ''; + } + + // Force a string conversion as this will be done by the append regardless and + // the regex test will do this transparently behind the scenes, causing issues if + // an object's to string has escaped characters in it. + string = '' + string; + } + + if (!possible.test(string)) { + return string; + } + return string.replace(badChars, escapeChar); + } + + function isEmpty(value) { + if (!value && value !== 0) { + return true; + } else if (isArray(value) && value.length === 0) { + return true; + } else { + return false; + } + } + + function createFrame(object) { + var frame = extend({}, object); + frame._parent = object; + return frame; + } + + function blockParams(params, ids) { + params.path = ids; + return params; + } + + function appendContextPath(contextPath, id) { + return (contextPath ? contextPath + '.' : '') + id; + } + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _Object$defineProperty = __webpack_require__(7)['default']; + + exports.__esModule = true; + var errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack']; + + function Exception(message, node) { + var loc = node && node.loc, + line = undefined, + endLineNumber = undefined, + column = undefined, + endColumn = undefined; + + if (loc) { + line = loc.start.line; + endLineNumber = loc.end.line; + column = loc.start.column; + endColumn = loc.end.column; + + message += ' - ' + line + ':' + column; + } + + var tmp = Error.prototype.constructor.call(this, message); + + // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. + for (var idx = 0; idx < errorProps.length; idx++) { + this[errorProps[idx]] = tmp[errorProps[idx]]; + } + + /* istanbul ignore else */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, Exception); + } + + try { + if (loc) { + this.lineNumber = line; + this.endLineNumber = endLineNumber; + + // Work around issue under safari where we can't directly set the column value + /* istanbul ignore next */ + if (_Object$defineProperty) { + Object.defineProperty(this, 'column', { + value: column, + enumerable: true + }); + Object.defineProperty(this, 'endColumn', { + value: endColumn, + enumerable: true + }); + } else { + this.column = column; + this.endColumn = endColumn; + } + } + } catch (nop) { + /* Ignore if the browser is very particular */ + } + } + + Exception.prototype = new Error(); + + exports['default'] = Exception; + module.exports = exports['default']; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(8), __esModule: true }; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + + var $ = __webpack_require__(9); + module.exports = function defineProperty(it, key, desc){ + return $.setDesc(it, key, desc); + }; + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + + var $Object = Object; + module.exports = { + create: $Object.create, + getProto: $Object.getPrototypeOf, + isEnum: {}.propertyIsEnumerable, + getDesc: $Object.getOwnPropertyDescriptor, + setDesc: $Object.defineProperty, + setDescs: $Object.defineProperties, + getKeys: $Object.keys, + getNames: $Object.getOwnPropertyNames, + getSymbols: $Object.getOwnPropertySymbols, + each: [].forEach + }; + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.registerDefaultHelpers = registerDefaultHelpers; + exports.moveHelperToHooks = moveHelperToHooks; + + var _helpersBlockHelperMissing = __webpack_require__(11); + + var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); + + var _helpersEach = __webpack_require__(12); + + var _helpersEach2 = _interopRequireDefault(_helpersEach); + + var _helpersHelperMissing = __webpack_require__(65); + + var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); + + var _helpersIf = __webpack_require__(66); + + var _helpersIf2 = _interopRequireDefault(_helpersIf); + + var _helpersLog = __webpack_require__(67); + + var _helpersLog2 = _interopRequireDefault(_helpersLog); + + var _helpersLookup = __webpack_require__(68); + + var _helpersLookup2 = _interopRequireDefault(_helpersLookup); + + var _helpersWith = __webpack_require__(69); + + var _helpersWith2 = _interopRequireDefault(_helpersWith); + + function registerDefaultHelpers(instance) { + _helpersBlockHelperMissing2['default'](instance); + _helpersEach2['default'](instance); + _helpersHelperMissing2['default'](instance); + _helpersIf2['default'](instance); + _helpersLog2['default'](instance); + _helpersLookup2['default'](instance); + _helpersWith2['default'](instance); + } + + function moveHelperToHooks(instance, helperName, keepHelper) { + if (instance.helpers[helperName]) { + instance.hooks[helperName] = instance.helpers[helperName]; + if (!keepHelper) { + delete instance.helpers[helperName]; + } + } + } + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + exports['default'] = function (instance) { + instance.registerHelper('blockHelperMissing', function (context, options) { + var inverse = options.inverse, + fn = options.fn; + + if (context === true) { + return fn(this); + } else if (context === false || context == null) { + return inverse(this); + } else if (_utils.isArray(context)) { + if (context.length > 0) { + if (options.ids) { + options.ids = [options.name]; + } + + return instance.helpers.each(context, options); + } else { + return inverse(this); + } + } else { + if (options.data && options.ids) { + var data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); + options = { data: data }; + } + + return fn(context, options); + } + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _Symbol = __webpack_require__(13)['default']; + + var _Symbol$iterator = __webpack_require__(43)['default']; + + var _getIterator = __webpack_require__(55)['default']; + + var _Object$keys = __webpack_require__(60)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + exports['default'] = function (instance) { + instance.registerHelper('each', function (context, options) { + if (!options) { + throw new _exception2['default']('Must pass iterator to #each'); + } + + var fn = options.fn, + inverse = options.inverse, + i = 0, + ret = '', + data = undefined, + contextPath = undefined; + + if (options.data && options.ids) { + contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; + } + + if (_utils.isFunction(context)) { + context = context.call(this); + } + + if (options.data) { + data = _utils.createFrame(options.data); + } + + function execIteration(field, index, last) { + if (data) { + data.key = field; + data.index = index; + data.first = index === 0; + data.last = !!last; + + if (contextPath) { + data.contextPath = contextPath + field; + } + } + + ret = ret + fn(context[field], { + data: data, + blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) + }); + } + + if (context && typeof context === 'object') { + if (_utils.isArray(context)) { + for (var j = context.length; i < j; i++) { + if (i in context) { + execIteration(i, i, i === context.length - 1); + } + } + } else if (typeof _Symbol === 'function' && context[_Symbol$iterator]) { + var newContext = []; + var iterator = _getIterator(context); + for (var it = iterator.next(); !it.done; it = iterator.next()) { + newContext.push(it.value); + } + context = newContext; + for (var j = context.length; i < j; i++) { + execIteration(i, i, i === context.length - 1); + } + } else { + (function () { + var priorKey = undefined; + + _Object$keys(context).forEach(function (key) { + // We're running the iterations one step out of sync so we can detect + // the last iteration without have to scan the object twice and create + // an itermediate keys array. + if (priorKey !== undefined) { + execIteration(priorKey, i - 1); + } + priorKey = key; + i++; + }); + if (priorKey !== undefined) { + execIteration(priorKey, i - 1, true); + } + })(); + } + } + + if (i === 0) { + ret = inverse(this); + } + + return ret; + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(14), __esModule: true }; + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + + __webpack_require__(15); + __webpack_require__(42); + module.exports = __webpack_require__(21).Symbol; + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + // ECMAScript 6 symbols shim + var $ = __webpack_require__(9) + , global = __webpack_require__(16) + , has = __webpack_require__(17) + , DESCRIPTORS = __webpack_require__(18) + , $export = __webpack_require__(20) + , redefine = __webpack_require__(24) + , $fails = __webpack_require__(19) + , shared = __webpack_require__(27) + , setToStringTag = __webpack_require__(28) + , uid = __webpack_require__(30) + , wks = __webpack_require__(29) + , keyOf = __webpack_require__(31) + , $names = __webpack_require__(36) + , enumKeys = __webpack_require__(37) + , isArray = __webpack_require__(38) + , anObject = __webpack_require__(39) + , toIObject = __webpack_require__(32) + , createDesc = __webpack_require__(26) + , getDesc = $.getDesc + , setDesc = $.setDesc + , _create = $.create + , getNames = $names.get + , $Symbol = global.Symbol + , $JSON = global.JSON + , _stringify = $JSON && $JSON.stringify + , setter = false + , HIDDEN = wks('_hidden') + , isEnum = $.isEnum + , SymbolRegistry = shared('symbol-registry') + , AllSymbols = shared('symbols') + , useNative = typeof $Symbol == 'function' + , ObjectProto = Object.prototype; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = DESCRIPTORS && $fails(function(){ + return _create(setDesc({}, 'a', { + get: function(){ return setDesc(this, 'a', {value: 7}).a; } + })).a != 7; + }) ? function(it, key, D){ + var protoDesc = getDesc(ObjectProto, key); + if(protoDesc)delete ObjectProto[key]; + setDesc(it, key, D); + if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc); + } : setDesc; + + var wrap = function(tag){ + var sym = AllSymbols[tag] = _create($Symbol.prototype); + sym._k = tag; + DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, { + configurable: true, + set: function(value){ + if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + } + }); + return sym; + }; + + var isSymbol = function(it){ + return typeof it == 'symbol'; + }; + + var $defineProperty = function defineProperty(it, key, D){ + if(D && has(AllSymbols, key)){ + if(!D.enumerable){ + if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; + D = _create(D, {enumerable: createDesc(0, false)}); + } return setSymbolDesc(it, key, D); + } return setDesc(it, key, D); + }; + var $defineProperties = function defineProperties(it, P){ + anObject(it); + var keys = enumKeys(P = toIObject(P)) + , i = 0 + , l = keys.length + , key; + while(l > i)$defineProperty(it, key = keys[i++], P[key]); + return it; + }; + var $create = function create(it, P){ + return P === undefined ? _create(it) : $defineProperties(_create(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key){ + var E = isEnum.call(this, key); + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] + ? E : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ + var D = getDesc(it = toIObject(it), key); + if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it){ + var names = getNames(toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key); + return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ + var names = getNames(toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]); + return result; + }; + var $stringify = function stringify(it){ + if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined + var args = [it] + , i = 1 + , $$ = arguments + , replacer, $replacer; + while($$.length > i)args.push($$[i++]); + replacer = args[1]; + if(typeof replacer == 'function')$replacer = replacer; + if($replacer || !isArray(replacer))replacer = function(key, value){ + if($replacer)value = $replacer.call(this, key, value); + if(!isSymbol(value))return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + }; + var buggyJSON = $fails(function(){ + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; + }); + + // 19.4.1.1 Symbol([description]) + if(!useNative){ + $Symbol = function Symbol(){ + if(isSymbol(this))throw TypeError('Symbol is not a constructor'); + return wrap(uid(arguments.length > 0 ? arguments[0] : undefined)); + }; + redefine($Symbol.prototype, 'toString', function toString(){ + return this._k; + }); + + isSymbol = function(it){ + return it instanceof $Symbol; + }; + + $.create = $create; + $.isEnum = $propertyIsEnumerable; + $.getDesc = $getOwnPropertyDescriptor; + $.setDesc = $defineProperty; + $.setDescs = $defineProperties; + $.getNames = $names.get = $getOwnPropertyNames; + $.getSymbols = $getOwnPropertySymbols; + + if(DESCRIPTORS && !__webpack_require__(41)){ + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + } + + var symbolStatics = { + // 19.4.2.1 Symbol.for(key) + 'for': function(key){ + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(key){ + return keyOf(SymbolRegistry, key); + }, + useSetter: function(){ setter = true; }, + useSimple: function(){ setter = false; } + }; + // 19.4.2.2 Symbol.hasInstance + // 19.4.2.3 Symbol.isConcatSpreadable + // 19.4.2.4 Symbol.iterator + // 19.4.2.6 Symbol.match + // 19.4.2.8 Symbol.replace + // 19.4.2.9 Symbol.search + // 19.4.2.10 Symbol.species + // 19.4.2.11 Symbol.split + // 19.4.2.12 Symbol.toPrimitive + // 19.4.2.13 Symbol.toStringTag + // 19.4.2.14 Symbol.unscopables + $.each.call(( + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' + + 'species,split,toPrimitive,toStringTag,unscopables' + ).split(','), function(it){ + var sym = wks(it); + symbolStatics[it] = useNative ? sym : wrap(sym); + }); + + setter = true; + + $export($export.G + $export.W, {Symbol: $Symbol}); + + $export($export.S, 'Symbol', symbolStatics); + + $export($export.S + $export.F * !useNative, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify}); + + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); + +/***/ }), +/* 16 */ +/***/ (function(module, exports) { + + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); + if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef + +/***/ }), +/* 17 */ +/***/ (function(module, exports) { + + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function(it, key){ + return hasOwnProperty.call(it, key); + }; + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(19)(function(){ + return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; + }); + +/***/ }), +/* 19 */ +/***/ (function(module, exports) { + + module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } + }; + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + + var global = __webpack_require__(16) + , core = __webpack_require__(21) + , ctx = __webpack_require__(22) + , PROTOTYPE = 'prototype'; + + var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , IS_WRAP = type & $export.W + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] + , key, own, out; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && key in target; + if(own && key in exports)continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function(C){ + var F = function(param){ + return this instanceof C ? new C(param) : C(param); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; + } + }; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + module.exports = $export; + +/***/ }), +/* 21 */ +/***/ (function(module, exports) { + + var core = module.exports = {version: '1.2.6'}; + if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + + // optional / simple context binding + var aFunction = __webpack_require__(23); + module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); + }; + }; + +/***/ }), +/* 23 */ +/***/ (function(module, exports) { + + module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; + }; + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(25); + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + + var $ = __webpack_require__(9) + , createDesc = __webpack_require__(26); + module.exports = __webpack_require__(18) ? function(object, key, value){ + return $.setDesc(object, key, createDesc(1, value)); + } : function(object, key, value){ + object[key] = value; + return object; + }; + +/***/ }), +/* 26 */ +/***/ (function(module, exports) { + + module.exports = function(bitmap, value){ + return { + enumerable : !(bitmap & 1), + configurable: !(bitmap & 2), + writable : !(bitmap & 4), + value : value + }; + }; + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + + var global = __webpack_require__(16) + , SHARED = '__core-js_shared__' + , store = global[SHARED] || (global[SHARED] = {}); + module.exports = function(key){ + return store[key] || (store[key] = {}); + }; + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + + var def = __webpack_require__(9).setDesc + , has = __webpack_require__(17) + , TAG = __webpack_require__(29)('toStringTag'); + + module.exports = function(it, tag, stat){ + if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); + }; + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + + var store = __webpack_require__(27)('wks') + , uid = __webpack_require__(30) + , Symbol = __webpack_require__(16).Symbol; + module.exports = function(name){ + return store[name] || (store[name] = + Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name)); + }; + +/***/ }), +/* 30 */ +/***/ (function(module, exports) { + + var id = 0 + , px = Math.random(); + module.exports = function(key){ + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + + var $ = __webpack_require__(9) + , toIObject = __webpack_require__(32); + module.exports = function(object, el){ + var O = toIObject(object) + , keys = $.getKeys(O) + , length = keys.length + , index = 0 + , key; + while(length > index)if(O[key = keys[index++]] === el)return key; + }; + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(33) + , defined = __webpack_require__(35); + module.exports = function(it){ + return IObject(defined(it)); + }; + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(34); + module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ + return cof(it) == 'String' ? it.split('') : Object(it); + }; + +/***/ }), +/* 34 */ +/***/ (function(module, exports) { + + var toString = {}.toString; + + module.exports = function(it){ + return toString.call(it).slice(8, -1); + }; + +/***/ }), +/* 35 */ +/***/ (function(module, exports) { + + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); + return it; + }; + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(32) + , getNames = __webpack_require__(9).getNames + , toString = {}.toString; + + var windowNames = typeof window == 'object' && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + + var getWindowNames = function(it){ + try { + return getNames(it); + } catch(e){ + return windowNames.slice(); + } + }; + + module.exports.get = function getOwnPropertyNames(it){ + if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it); + return getNames(toIObject(it)); + }; + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + + // all enumerable object keys, includes symbols + var $ = __webpack_require__(9); + module.exports = function(it){ + var keys = $.getKeys(it) + , getSymbols = $.getSymbols; + if(getSymbols){ + var symbols = getSymbols(it) + , isEnum = $.isEnum + , i = 0 + , key; + while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key); + } + return keys; + }; + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(34); + module.exports = Array.isArray || function(arg){ + return cof(arg) == 'Array'; + }; + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(40); + module.exports = function(it){ + if(!isObject(it))throw TypeError(it + ' is not an object!'); + return it; + }; + +/***/ }), +/* 40 */ +/***/ (function(module, exports) { + + module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + +/***/ }), +/* 41 */ +/***/ (function(module, exports) { + + module.exports = true; + +/***/ }), +/* 42 */ +/***/ (function(module, exports) { + + + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(44), __esModule: true }; + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + + __webpack_require__(45); + __webpack_require__(51); + module.exports = __webpack_require__(29)('iterator'); + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + var $at = __webpack_require__(46)(true); + + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(48)(String, 'String', function(iterated){ + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, function(){ + var O = this._t + , index = this._i + , point; + if(index >= O.length)return {value: undefined, done: true}; + point = $at(O, index); + this._i += point.length; + return {value: point, done: false}; + }); + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + + var toInteger = __webpack_require__(47) + , defined = __webpack_require__(35); + // true -> String#at + // false -> String#codePointAt + module.exports = function(TO_STRING){ + return function(that, pos){ + var s = String(defined(that)) + , i = toInteger(pos) + , l = s.length + , a, b; + if(i < 0 || i >= l)return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; + }; + +/***/ }), +/* 47 */ +/***/ (function(module, exports) { + + // 7.1.4 ToInteger + var ceil = Math.ceil + , floor = Math.floor; + module.exports = function(it){ + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); + }; + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + var LIBRARY = __webpack_require__(41) + , $export = __webpack_require__(20) + , redefine = __webpack_require__(24) + , hide = __webpack_require__(25) + , has = __webpack_require__(17) + , Iterators = __webpack_require__(49) + , $iterCreate = __webpack_require__(50) + , setToStringTag = __webpack_require__(28) + , getProto = __webpack_require__(9).getProto + , ITERATOR = __webpack_require__(29)('iterator') + , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` + , FF_ITERATOR = '@@iterator' + , KEYS = 'keys' + , VALUES = 'values'; + + var returnThis = function(){ return this; }; + + module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ + $iterCreate(Constructor, NAME, next); + var getMethod = function(kind){ + if(!BUGGY && kind in proto)return proto[kind]; + switch(kind){ + case KEYS: return function keys(){ return new Constructor(this, kind); }; + case VALUES: return function values(){ return new Constructor(this, kind); }; + } return function entries(){ return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator' + , DEF_VALUES = DEFAULT == VALUES + , VALUES_BUG = false + , proto = Base.prototype + , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] + , $default = $native || getMethod(DEFAULT) + , methods, key; + // Fix native + if($native){ + var IteratorPrototype = getProto($default.call(new Base)); + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // FF fix + if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); + // fix Array#{values, @@iterator}.name in V8 / FF + if(DEF_VALUES && $native.name !== VALUES){ + VALUES_BUG = true; + $default = function values(){ return $native.call(this); }; + } + } + // Define iterator + if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if(DEFAULT){ + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: !DEF_VALUES ? $default : getMethod('entries') + }; + if(FORCED)for(key in methods){ + if(!(key in proto))redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + +/***/ }), +/* 49 */ +/***/ (function(module, exports) { + + module.exports = {}; + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + var $ = __webpack_require__(9) + , descriptor = __webpack_require__(26) + , setToStringTag = __webpack_require__(28) + , IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(25)(IteratorPrototype, __webpack_require__(29)('iterator'), function(){ return this; }); + + module.exports = function(Constructor, NAME, next){ + Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)}); + setToStringTag(Constructor, NAME + ' Iterator'); + }; + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + + __webpack_require__(52); + var Iterators = __webpack_require__(49); + Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array; + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + var addToUnscopables = __webpack_require__(53) + , step = __webpack_require__(54) + , Iterators = __webpack_require__(49) + , toIObject = __webpack_require__(32); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(48)(Array, 'Array', function(iterated, kind){ + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, function(){ + var O = this._t + , kind = this._k + , index = this._i++; + if(!O || index >= O.length){ + this._t = undefined; + return step(1); + } + if(kind == 'keys' )return step(0, index); + if(kind == 'values')return step(0, O[index]); + return step(0, [index, O[index]]); + }, 'values'); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + +/***/ }), +/* 53 */ +/***/ (function(module, exports) { + + module.exports = function(){ /* empty */ }; + +/***/ }), +/* 54 */ +/***/ (function(module, exports) { + + module.exports = function(done, value){ + return {value: value, done: !!done}; + }; + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(56), __esModule: true }; + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + + __webpack_require__(51); + __webpack_require__(45); + module.exports = __webpack_require__(57); + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + + var anObject = __webpack_require__(39) + , get = __webpack_require__(58); + module.exports = __webpack_require__(21).getIterator = function(it){ + var iterFn = get(it); + if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); + }; + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + + var classof = __webpack_require__(59) + , ITERATOR = __webpack_require__(29)('iterator') + , Iterators = __webpack_require__(49); + module.exports = __webpack_require__(21).getIteratorMethod = function(it){ + if(it != undefined)return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; + }; + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(34) + , TAG = __webpack_require__(29)('toStringTag') + // ES3 wrong here + , ARG = cof(function(){ return arguments; }()) == 'Arguments'; + + module.exports = function(it){ + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = (O = Object(it))[TAG]) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; + }; + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(61), __esModule: true }; + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + + __webpack_require__(62); + module.exports = __webpack_require__(21).Object.keys; + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(63); + + __webpack_require__(64)('keys', function($keys){ + return function keys(it){ + return $keys(toObject(it)); + }; + }); + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(35); + module.exports = function(it){ + return Object(defined(it)); + }; + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(20) + , core = __webpack_require__(21) + , fails = __webpack_require__(19); + module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); + }; + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + exports['default'] = function (instance) { + instance.registerHelper('helperMissing', function () /* [args, ]options */{ + if (arguments.length === 1) { + // A missing field in a {{foo}} construct. + return undefined; + } else { + // Someone is actually trying to call something, blow up. + throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); + } + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + exports['default'] = function (instance) { + instance.registerHelper('if', function (conditional, options) { + if (arguments.length != 2) { + throw new _exception2['default']('#if requires exactly one argument'); + } + if (_utils.isFunction(conditional)) { + conditional = conditional.call(this); + } + + // Default behavior is to render the positive path if the value is truthy and not empty. + // The `includeZero` option may be set to treat the condtional as purely not empty based on the + // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. + if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { + return options.inverse(this); + } else { + return options.fn(this); + } + }); + + instance.registerHelper('unless', function (conditional, options) { + if (arguments.length != 2) { + throw new _exception2['default']('#unless requires exactly one argument'); + } + return instance.helpers['if'].call(this, conditional, { + fn: options.inverse, + inverse: options.fn, + hash: options.hash + }); + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 67 */ +/***/ (function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + + exports['default'] = function (instance) { + instance.registerHelper('log', function () /* message, options */{ + var args = [undefined], + options = arguments[arguments.length - 1]; + for (var i = 0; i < arguments.length - 1; i++) { + args.push(arguments[i]); + } + + var level = 1; + if (options.hash.level != null) { + level = options.hash.level; + } else if (options.data && options.data.level != null) { + level = options.data.level; + } + args[0] = level; + + instance.log.apply(instance, args); + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 68 */ +/***/ (function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + + exports['default'] = function (instance) { + instance.registerHelper('lookup', function (obj, field, options) { + if (!obj) { + // Note for 5.0: Change to "obj == null" in 5.0 + return obj; + } + return options.lookupProperty(obj, field); + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + exports['default'] = function (instance) { + instance.registerHelper('with', function (context, options) { + if (arguments.length != 2) { + throw new _exception2['default']('#with requires exactly one argument'); + } + if (_utils.isFunction(context)) { + context = context.call(this); + } + + var fn = options.fn; + + if (!_utils.isEmpty(context)) { + var data = options.data; + if (options.data && options.ids) { + data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); + } + + return fn(context, { + data: data, + blockParams: _utils.blockParams([context], [data && data.contextPath]) + }); + } else { + return options.inverse(this); + } + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.registerDefaultDecorators = registerDefaultDecorators; + + var _decoratorsInline = __webpack_require__(71); + + var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); + + function registerDefaultDecorators(instance) { + _decoratorsInline2['default'](instance); + } + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + exports['default'] = function (instance) { + instance.registerDecorator('inline', function (fn, props, container, options) { + var ret = fn; + if (!props.partials) { + props.partials = {}; + ret = function (context, options) { + // Create a new partials stack frame prior to exec. + var original = container.partials; + container.partials = _utils.extend({}, original, props.partials); + var ret = fn(context, options); + container.partials = original; + return ret; + }; + } + + props.partials[options.args[0]] = options.fn; + + return ret; + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + var logger = { + methodMap: ['debug', 'info', 'warn', 'error'], + level: 'info', + + // Maps a given level value to the `methodMap` indexes above. + lookupLevel: function lookupLevel(level) { + if (typeof level === 'string') { + var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); + if (levelMap >= 0) { + level = levelMap; + } else { + level = parseInt(level, 10); + } + } + + return level; + }, + + // Can be overridden in the host environment + log: function log(level) { + level = logger.lookupLevel(level); + + if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { + var method = logger.methodMap[level]; + // eslint-disable-next-line no-console + if (!console[method]) { + method = 'log'; + } + + for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + message[_key - 1] = arguments[_key]; + } + + console[method].apply(console, message); // eslint-disable-line no-console + } + } + }; + + exports['default'] = logger; + module.exports = exports['default']; + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _Object$create = __webpack_require__(74)['default']; + + var _Object$keys = __webpack_require__(60)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.createProtoAccessControl = createProtoAccessControl; + exports.resultIsAllowed = resultIsAllowed; + exports.resetLoggedProperties = resetLoggedProperties; + + var _createNewLookupObject = __webpack_require__(76); + + var _logger = __webpack_require__(72); + + var _logger2 = _interopRequireDefault(_logger); + + var loggedProperties = _Object$create(null); + + function createProtoAccessControl(runtimeOptions) { + var defaultMethodWhiteList = _Object$create(null); + defaultMethodWhiteList['constructor'] = false; + defaultMethodWhiteList['__defineGetter__'] = false; + defaultMethodWhiteList['__defineSetter__'] = false; + defaultMethodWhiteList['__lookupGetter__'] = false; + + var defaultPropertyWhiteList = _Object$create(null); + // eslint-disable-next-line no-proto + defaultPropertyWhiteList['__proto__'] = false; + + return { + properties: { + whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties), + defaultValue: runtimeOptions.allowProtoPropertiesByDefault + }, + methods: { + whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods), + defaultValue: runtimeOptions.allowProtoMethodsByDefault + } + }; + } + + function resultIsAllowed(result, protoAccessControl, propertyName) { + if (typeof result === 'function') { + return checkWhiteList(protoAccessControl.methods, propertyName); + } else { + return checkWhiteList(protoAccessControl.properties, propertyName); + } + } + + function checkWhiteList(protoAccessControlForType, propertyName) { + if (protoAccessControlForType.whitelist[propertyName] !== undefined) { + return protoAccessControlForType.whitelist[propertyName] === true; + } + if (protoAccessControlForType.defaultValue !== undefined) { + return protoAccessControlForType.defaultValue; + } + logUnexpecedPropertyAccessOnce(propertyName); + return false; + } + + function logUnexpecedPropertyAccessOnce(propertyName) { + if (loggedProperties[propertyName] !== true) { + loggedProperties[propertyName] = true; + _logger2['default'].log('error', 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\n' + 'You can add a runtime option to disable the check or this warning:\n' + 'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'); + } + } + + function resetLoggedProperties() { + _Object$keys(loggedProperties).forEach(function (propertyName) { + delete loggedProperties[propertyName]; + }); + } + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(75), __esModule: true }; + +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { + + var $ = __webpack_require__(9); + module.exports = function create(P, D){ + return $.create(P, D); + }; + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _Object$create = __webpack_require__(74)['default']; + + exports.__esModule = true; + exports.createNewLookupObject = createNewLookupObject; + + var _utils = __webpack_require__(5); + + /** + * Create a new object with "null"-prototype to avoid truthy results on prototype properties. + * The resulting object can be used with "object[property]" to check if a property exists + * @param {...object} sources a varargs parameter of source objects that will be merged + * @returns {object} + */ + + function createNewLookupObject() { + for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) { + sources[_key] = arguments[_key]; + } + + return _utils.extend.apply(undefined, [_Object$create(null)].concat(sources)); + } + +/***/ }), +/* 77 */ +/***/ (function(module, exports) { + + // Build out our basic SafeString type + 'use strict'; + + exports.__esModule = true; + function SafeString(string) { + this.string = string; + } + + SafeString.prototype.toString = SafeString.prototype.toHTML = function () { + return '' + this.string; + }; + + exports['default'] = SafeString; + module.exports = exports['default']; + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _Object$seal = __webpack_require__(79)['default']; + + var _Object$keys = __webpack_require__(60)['default']; + + var _interopRequireWildcard = __webpack_require__(3)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.checkRevision = checkRevision; + exports.template = template; + exports.wrapProgram = wrapProgram; + exports.resolvePartial = resolvePartial; + exports.invokePartial = invokePartial; + exports.noop = noop; + + var _utils = __webpack_require__(5); + + var Utils = _interopRequireWildcard(_utils); + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + var _base = __webpack_require__(4); + + var _helpers = __webpack_require__(10); + + var _internalWrapHelper = __webpack_require__(82); + + var _internalProtoAccess = __webpack_require__(73); + + function checkRevision(compilerInfo) { + var compilerRevision = compilerInfo && compilerInfo[0] || 1, + currentRevision = _base.COMPILER_REVISION; + + if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) { + return; + } + + if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) { + var runtimeVersions = _base.REVISION_CHANGES[currentRevision], + compilerVersions = _base.REVISION_CHANGES[compilerRevision]; + throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); + } else { + // Use the embedded version info since the runtime doesn't know about this revision yet + throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); + } + } + + function template(templateSpec, env) { + /* istanbul ignore next */ + if (!env) { + throw new _exception2['default']('No environment passed to template'); + } + if (!templateSpec || !templateSpec.main) { + throw new _exception2['default']('Unknown template object: ' + typeof templateSpec); + } + + templateSpec.main.decorator = templateSpec.main_d; + + // Note: Using env.VM references rather than local var references throughout this section to allow + // for external users to override these as pseudo-supported APIs. + env.VM.checkRevision(templateSpec.compiler); + + // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0) + var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7; + + function invokePartialWrapper(partial, context, options) { + if (options.hash) { + context = Utils.extend({}, context, options.hash); + if (options.ids) { + options.ids[0] = true; + } + } + partial = env.VM.resolvePartial.call(this, partial, context, options); + + var extendedOptions = Utils.extend({}, options, { + hooks: this.hooks, + protoAccessControl: this.protoAccessControl + }); + + var result = env.VM.invokePartial.call(this, partial, context, extendedOptions); + + if (result == null && env.compile) { + options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); + result = options.partials[options.name](context, extendedOptions); + } + if (result != null) { + if (options.indent) { + var lines = result.split('\n'); + for (var i = 0, l = lines.length; i < l; i++) { + if (!lines[i] && i + 1 === l) { + break; + } + + lines[i] = options.indent + lines[i]; + } + result = lines.join('\n'); + } + return result; + } else { + throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); + } + } + + // Just add water + var container = { + strict: function strict(obj, name, loc) { + if (!obj || !(name in obj)) { + throw new _exception2['default']('"' + name + '" not defined in ' + obj, { + loc: loc + }); + } + return container.lookupProperty(obj, name); + }, + lookupProperty: function lookupProperty(parent, propertyName) { + var result = parent[propertyName]; + if (result == null) { + return result; + } + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return result; + } + + if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) { + return result; + } + return undefined; + }, + lookup: function lookup(depths, name) { + var len = depths.length; + for (var i = 0; i < len; i++) { + var result = depths[i] && container.lookupProperty(depths[i], name); + if (result != null) { + return depths[i][name]; + } + } + }, + lambda: function lambda(current, context) { + return typeof current === 'function' ? current.call(context) : current; + }, + + escapeExpression: Utils.escapeExpression, + invokePartial: invokePartialWrapper, + + fn: function fn(i) { + var ret = templateSpec[i]; + ret.decorator = templateSpec[i + '_d']; + return ret; + }, + + programs: [], + program: function program(i, data, declaredBlockParams, blockParams, depths) { + var programWrapper = this.programs[i], + fn = this.fn(i); + if (data || depths || blockParams || declaredBlockParams) { + programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); + } else if (!programWrapper) { + programWrapper = this.programs[i] = wrapProgram(this, i, fn); + } + return programWrapper; + }, + + data: function data(value, depth) { + while (value && depth--) { + value = value._parent; + } + return value; + }, + mergeIfNeeded: function mergeIfNeeded(param, common) { + var obj = param || common; + + if (param && common && param !== common) { + obj = Utils.extend({}, common, param); + } + + return obj; + }, + // An empty object to use as replacement for null-contexts + nullContext: _Object$seal({}), + + noop: env.VM.noop, + compilerInfo: templateSpec.compiler + }; + + function ret(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var data = options.data; + + ret._setup(options); + if (!options.partial && templateSpec.useData) { + data = initData(context, data); + } + var depths = undefined, + blockParams = templateSpec.useBlockParams ? [] : undefined; + if (templateSpec.useDepths) { + if (options.depths) { + depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths; + } else { + depths = [context]; + } + } + + function main(context /*, options*/) { + return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); + } + + main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); + return main(context, options); + } + + ret.isTop = true; + + ret._setup = function (options) { + if (!options.partial) { + var mergedHelpers = Utils.extend({}, env.helpers, options.helpers); + wrapHelpersToPassLookupProperty(mergedHelpers, container); + container.helpers = mergedHelpers; + + if (templateSpec.usePartial) { + // Use mergeIfNeeded here to prevent compiling global partials multiple times + container.partials = container.mergeIfNeeded(options.partials, env.partials); + } + if (templateSpec.usePartial || templateSpec.useDecorators) { + container.decorators = Utils.extend({}, env.decorators, options.decorators); + } + + container.hooks = {}; + container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options); + + var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7; + _helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers); + _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers); + } else { + container.protoAccessControl = options.protoAccessControl; // internal option + container.helpers = options.helpers; + container.partials = options.partials; + container.decorators = options.decorators; + container.hooks = options.hooks; + } + }; + + ret._child = function (i, data, blockParams, depths) { + if (templateSpec.useBlockParams && !blockParams) { + throw new _exception2['default']('must pass block params'); + } + if (templateSpec.useDepths && !depths) { + throw new _exception2['default']('must pass parent depths'); + } + + return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); + }; + return ret; + } + + function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { + function prog(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var currentDepths = depths; + if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) { + currentDepths = [context].concat(depths); + } + + return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); + } + + prog = executeDecorators(fn, prog, container, depths, data, blockParams); + + prog.program = i; + prog.depth = depths ? depths.length : 0; + prog.blockParams = declaredBlockParams || 0; + return prog; + } + + /** + * This is currently part of the official API, therefore implementation details should not be changed. + */ + + function resolvePartial(partial, context, options) { + if (!partial) { + if (options.name === '@partial-block') { + partial = options.data['partial-block']; + } else { + partial = options.partials[options.name]; + } + } else if (!partial.call && !options.name) { + // This is a dynamic partial that returned a string + options.name = partial; + partial = options.partials[partial]; + } + return partial; + } + + function invokePartial(partial, context, options) { + // Use the current closure context to save the partial-block if this partial + var currentPartialBlock = options.data && options.data['partial-block']; + options.partial = true; + if (options.ids) { + options.data.contextPath = options.ids[0] || options.data.contextPath; + } + + var partialBlock = undefined; + if (options.fn && options.fn !== noop) { + (function () { + options.data = _base.createFrame(options.data); + // Wrapper function to get access to currentPartialBlock from the closure + var fn = options.fn; + partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + // Restore the partial-block from the closure for the execution of the block + // i.e. the part inside the block of the partial call. + options.data = _base.createFrame(options.data); + options.data['partial-block'] = currentPartialBlock; + return fn(context, options); + }; + if (fn.partials) { + options.partials = Utils.extend({}, options.partials, fn.partials); + } + })(); + } + + if (partial === undefined && partialBlock) { + partial = partialBlock; + } + + if (partial === undefined) { + throw new _exception2['default']('The partial ' + options.name + ' could not be found'); + } else if (partial instanceof Function) { + return partial(context, options); + } + } + + function noop() { + return ''; + } + + function initData(context, data) { + if (!data || !('root' in data)) { + data = data ? _base.createFrame(data) : {}; + data.root = context; + } + return data; + } + + function executeDecorators(fn, prog, container, depths, data, blockParams) { + if (fn.decorator) { + var props = {}; + prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); + Utils.extend(prog, props); + } + return prog; + } + + function wrapHelpersToPassLookupProperty(mergedHelpers, container) { + _Object$keys(mergedHelpers).forEach(function (helperName) { + var helper = mergedHelpers[helperName]; + mergedHelpers[helperName] = passLookupPropertyOption(helper, container); + }); + } + + function passLookupPropertyOption(helper, container) { + var lookupProperty = container.lookupProperty; + return _internalWrapHelper.wrapHelper(helper, function (options) { + return Utils.extend({ lookupProperty: lookupProperty }, options); + }); + } + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(80), __esModule: true }; + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + + __webpack_require__(81); + module.exports = __webpack_require__(21).Object.seal; + +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + + // 19.1.2.17 Object.seal(O) + var isObject = __webpack_require__(40); + + __webpack_require__(64)('seal', function($seal){ + return function seal(it){ + return $seal && isObject(it) ? $seal(it) : it; + }; + }); + +/***/ }), +/* 82 */ +/***/ (function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + exports.wrapHelper = wrapHelper; + + function wrapHelper(helper, transformOptionsFn) { + if (typeof helper !== 'function') { + // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639 + // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function. + return helper; + } + var wrapper = function wrapper() /* dynamic arguments */{ + var options = arguments[arguments.length - 1]; + arguments[arguments.length - 1] = transformOptionsFn(options); + return helper.apply(this, arguments); + }; + return wrapper; + } + +/***/ }), +/* 83 */ +/***/ (function(module, exports) { + + /* global globalThis */ + 'use strict'; + + exports.__esModule = true; + + exports['default'] = function (Handlebars) { + /* istanbul ignore next */ + // https://mathiasbynens.be/notes/globalthis + (function () { + if (typeof globalThis === 'object') return; + Object.prototype.__defineGetter__('__magic__', function () { + return this; + }); + __magic__.globalThis = __magic__; // eslint-disable-line no-undef + delete Object.prototype.__magic__; + })(); + + var $Handlebars = globalThis.Handlebars; + + /* istanbul ignore next */ + Handlebars.noConflict = function () { + if (globalThis.Handlebars === Handlebars) { + globalThis.Handlebars = $Handlebars; + } + return Handlebars; + }; + }; + + module.exports = exports['default']; + +/***/ }), +/* 84 */ +/***/ (function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + var AST = { + // Public API used to evaluate derived attributes regarding AST nodes + helpers: { + // a mustache is definitely a helper if: + // * it is an eligible helper, and + // * it has at least one parameter or hash segment + helperExpression: function helperExpression(node) { + return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash); + }, + + scopedId: function scopedId(path) { + return (/^\.|this\b/.test(path.original) + ); + }, + + // an ID is simple if it only has one part, and that part is not + // `..` or `this`. + simpleId: function simpleId(path) { + return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; + } + } + }; + + // Must be exported as an object rather than the root of the module as the jison lexer + // must modify the object to operate properly. + exports['default'] = AST; + module.exports = exports['default']; + +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + var _interopRequireWildcard = __webpack_require__(3)['default']; + + exports.__esModule = true; + exports.parseWithoutProcessing = parseWithoutProcessing; + exports.parse = parse; + + var _parser = __webpack_require__(86); + + var _parser2 = _interopRequireDefault(_parser); + + var _whitespaceControl = __webpack_require__(87); + + var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl); + + var _helpers = __webpack_require__(89); + + var Helpers = _interopRequireWildcard(_helpers); + + var _utils = __webpack_require__(5); + + exports.parser = _parser2['default']; + + var yy = {}; + _utils.extend(yy, Helpers); + + function parseWithoutProcessing(input, options) { + // Just return if an already-compiled AST was passed in. + if (input.type === 'Program') { + return input; + } + + _parser2['default'].yy = yy; + + // Altering the shared object here, but this is ok as parser is a sync operation + yy.locInfo = function (locInfo) { + return new yy.SourceLocation(options && options.srcName, locInfo); + }; + + var ast = _parser2['default'].parse(input); + + return ast; + } + + function parse(input, options) { + var ast = parseWithoutProcessing(input, options); + var strip = new _whitespaceControl2['default'](options); + + return strip.accept(ast); + } + +/***/ }), +/* 86 */ +/***/ (function(module, exports) { + + // File ignored in coverage tests via setting in .istanbul.yml + /* Jison generated parser */ + "use strict"; + + exports.__esModule = true; + var handlebars = (function () { + var parser = { trace: function trace() {}, + yy: {}, + symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" }, + productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 0], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + break; + case 2: + this.$ = yy.prepareProgram($$[$0]); + break; + case 3: + this.$ = $$[$0]; + break; + case 4: + this.$ = $$[$0]; + break; + case 5: + this.$ = $$[$0]; + break; + case 6: + this.$ = $$[$0]; + break; + case 7: + this.$ = $$[$0]; + break; + case 8: + this.$ = $$[$0]; + break; + case 9: + this.$ = { + type: 'CommentStatement', + value: yy.stripComment($$[$0]), + strip: yy.stripFlags($$[$0], $$[$0]), + loc: yy.locInfo(this._$) + }; + + break; + case 10: + this.$ = { + type: 'ContentStatement', + original: $$[$0], + value: $$[$0], + loc: yy.locInfo(this._$) + }; + + break; + case 11: + this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); + break; + case 12: + this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; + break; + case 13: + this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); + break; + case 14: + this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); + break; + case 15: + this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 16: + this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 17: + this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 18: + this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; + break; + case 19: + var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), + program = yy.prepareProgram([inverse], $$[$0 - 1].loc); + program.chained = true; + + this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true }; + + break; + case 20: + this.$ = $$[$0]; + break; + case 21: + this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; + break; + case 22: + this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); + break; + case 23: + this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); + break; + case 24: + this.$ = { + type: 'PartialStatement', + name: $$[$0 - 3], + params: $$[$0 - 2], + hash: $$[$0 - 1], + indent: '', + strip: yy.stripFlags($$[$0 - 4], $$[$0]), + loc: yy.locInfo(this._$) + }; + + break; + case 25: + this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); + break; + case 26: + this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) }; + break; + case 27: + this.$ = $$[$0]; + break; + case 28: + this.$ = $$[$0]; + break; + case 29: + this.$ = { + type: 'SubExpression', + path: $$[$0 - 3], + params: $$[$0 - 2], + hash: $$[$0 - 1], + loc: yy.locInfo(this._$) + }; + + break; + case 30: + this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 31: + this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 32: + this.$ = yy.id($$[$0 - 1]); + break; + case 33: + this.$ = $$[$0]; + break; + case 34: + this.$ = $$[$0]; + break; + case 35: + this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 36: + this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) }; + break; + case 37: + this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) }; + break; + case 38: + this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) }; + break; + case 39: + this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) }; + break; + case 40: + this.$ = $$[$0]; + break; + case 41: + this.$ = $$[$0]; + break; + case 42: + this.$ = yy.preparePath(true, $$[$0], this._$); + break; + case 43: + this.$ = yy.preparePath(false, $$[$0], this._$); + break; + case 44: + $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2]; + break; + case 45: + this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; + break; + case 46: + this.$ = []; + break; + case 47: + $$[$0 - 1].push($$[$0]); + break; + case 48: + this.$ = []; + break; + case 49: + $$[$0 - 1].push($$[$0]); + break; + case 50: + this.$ = []; + break; + case 51: + $$[$0 - 1].push($$[$0]); + break; + case 58: + this.$ = []; + break; + case 59: + $$[$0 - 1].push($$[$0]); + break; + case 64: + this.$ = []; + break; + case 65: + $$[$0 - 1].push($$[$0]); + break; + case 70: + this.$ = []; + break; + case 71: + $$[$0 - 1].push($$[$0]); + break; + case 78: + this.$ = []; + break; + case 79: + $$[$0 - 1].push($$[$0]); + break; + case 82: + this.$ = []; + break; + case 83: + $$[$0 - 1].push($$[$0]); + break; + case 86: + this.$ = []; + break; + case 87: + $$[$0 - 1].push($$[$0]); + break; + case 90: + this.$ = []; + break; + case 91: + $$[$0 - 1].push($$[$0]); + break; + case 94: + this.$ = []; + break; + case 95: + $$[$0 - 1].push($$[$0]); + break; + case 98: + this.$ = [$$[$0]]; + break; + case 99: + $$[$0 - 1].push($$[$0]); + break; + case 100: + this.$ = [$$[$0]]; + break; + case 101: + $$[$0 - 1].push($$[$0]); + break; + } + }, + table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 15: [2, 48], 17: 39, 18: [2, 48] }, { 20: 41, 56: 40, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 44, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 45, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 41, 56: 48, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 49, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 50] }, { 72: [1, 35], 86: 51 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 52, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 53, 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 54, 47: [2, 54] }, { 28: 59, 43: 60, 44: [1, 58], 47: [2, 56] }, { 13: 62, 15: [1, 20], 18: [1, 61] }, { 33: [2, 86], 57: 63, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 64, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 65, 47: [1, 66] }, { 30: 67, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 68, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 69, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 70, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 74, 33: [2, 80], 50: 71, 63: 72, 64: 75, 65: [1, 43], 69: 73, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 79] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 50] }, { 20: 74, 53: 80, 54: [2, 84], 63: 81, 64: 75, 65: [1, 43], 69: 82, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 83, 47: [1, 66] }, { 47: [2, 55] }, { 4: 84, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 85, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 86, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 87, 47: [1, 66] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 74, 33: [2, 88], 58: 88, 63: 89, 64: 75, 65: [1, 43], 69: 90, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 91, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 92, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 31: 93, 33: [2, 60], 63: 94, 64: 75, 65: [1, 43], 69: 95, 70: 76, 71: 77, 72: [1, 78], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 66], 36: 96, 63: 97, 64: 75, 65: [1, 43], 69: 98, 70: 76, 71: 77, 72: [1, 78], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 22: 99, 23: [2, 52], 63: 100, 64: 75, 65: [1, 43], 69: 101, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 92], 62: 102, 63: 103, 64: 75, 65: [1, 43], 69: 104, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 105] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 106, 72: [1, 107], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 108], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 109] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 111, 46: 110, 47: [2, 76] }, { 33: [2, 70], 40: 112, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 113] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 74, 63: 115, 64: 75, 65: [1, 43], 67: 114, 68: [2, 96], 69: 116, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 117] }, { 32: 118, 33: [2, 62], 74: 119, 75: [1, 120] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 121, 74: 122, 75: [1, 120] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 123] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 124] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 108] }, { 20: 74, 63: 125, 64: 75, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 74, 33: [2, 72], 41: 126, 63: 127, 64: 75, 65: [1, 43], 69: 128, 70: 76, 71: 77, 72: [1, 78], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 129] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 130] }, { 33: [2, 63] }, { 72: [1, 132], 76: 131 }, { 33: [1, 133] }, { 33: [2, 69] }, { 15: [2, 12], 18: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 134, 74: 135, 75: [1, 120] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 137], 77: [1, 136] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 138] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }], + defaultActions: { 4: [2, 1], 54: [2, 55], 56: [2, 20], 60: [2, 57], 73: [2, 81], 82: [2, 85], 86: [2, 18], 90: [2, 89], 101: [2, 53], 104: [2, 93], 110: [2, 19], 111: [2, 77], 116: [2, 97], 119: [2, 63], 122: [2, 69], 135: [2, 75], 136: [2, 32] }, + parseError: function parseError(str, hash) { + throw new Error(str); + }, + parse: function parse(input) { + var self = this, + stack = [0], + vstack = [null], + lstack = [], + table = this.table, + yytext = "", + yylineno = 0, + yyleng = 0, + recovering = 0, + TERROR = 2, + EOF = 1; + this.lexer.setInput(input); + this.lexer.yy = this.yy; + this.yy.lexer = this.lexer; + this.yy.parser = this; + if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; + var yyloc = this.lexer.yylloc; + lstack.push(yyloc); + var ranges = this.lexer.options && this.lexer.options.ranges; + if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = self.lexer.lex() || 1; + if (typeof token !== "number") { + token = self.symbols_[token] || token; + } + return token; + } + var symbol, + preErrorSymbol, + state, + action, + a, + r, + yyval = {}, + p, + len, + newState, + expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + if (!recovering) { + expected = []; + for (p in table[state]) if (this.terminals_[p] && p > 2) { + expected.push("'" + this.terminals_[p] + "'"); + } + if (this.lexer.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected }); + } + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + if (recovering > 0) recovering--; + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; + if (ranges) { + yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; + } + r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + /* Jison generated lexer */ + var lexer = (function () { + var lexer = { EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + setInput: function setInput(input) { + this._input = input; + this._more = this._less = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; + if (this.options.ranges) this.yylloc.range = [0, 0]; + this.offset = 0; + return this; + }, + input: function input() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) this.yylloc.range[1]++; + + this._input = this._input.slice(1); + return ch; + }, + unput: function unput(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + + if (lines.length - 1) this.yylineno -= lines.length - 1; + var r = this.yylloc.range; + + this.yylloc = { first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + return this; + }, + more: function more() { + this._more = true; + return this; + }, + less: function less(n) { + this.unput(this.match.slice(n)); + }, + pastInput: function pastInput() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, ""); + }, + upcomingInput: function upcomingInput() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); + }, + showPosition: function showPosition() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + next: function next() { + if (this.done) { + return this.EOF; + } + if (!this._input) this.done = true; + + var token, match, tempMatch, index, col, lines; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (!this.options.flex) break; + } + } + if (match) { + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) this.yylineno += lines.length; + this.yylloc = { first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) this.done = false; + if (token) return token;else return; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno }); + } + }, + lex: function lex() { + var r = this.next(); + if (typeof r !== 'undefined') { + return r; + } else { + return this.lex(); + } + }, + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + popState: function popState() { + return this.conditionStack.pop(); + }, + _currentRules: function _currentRules() { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + }, + topState: function topState() { + return this.conditionStack[this.conditionStack.length - 2]; + }, + pushState: function begin(condition) { + this.begin(condition); + } }; + lexer.options = {}; + lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + + function strip(start, end) { + return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start); + } + + var YYSTATE = YY_START; + switch ($avoiding_name_collisions) { + case 0: + if (yy_.yytext.slice(-2) === "\\\\") { + strip(0, 1); + this.begin("mu"); + } else if (yy_.yytext.slice(-1) === "\\") { + strip(0, 1); + this.begin("emu"); + } else { + this.begin("mu"); + } + if (yy_.yytext) return 15; + + break; + case 1: + return 15; + break; + case 2: + this.popState(); + return 15; + + break; + case 3: + this.begin('raw');return 15; + break; + case 4: + this.popState(); + // Should be using `this.topState()` below, but it currently + // returns the second top instead of the first top. Opened an + // issue about it at https://github.com/zaach/jison/issues/291 + if (this.conditionStack[this.conditionStack.length - 1] === 'raw') { + return 15; + } else { + strip(5, 9); + return 'END_RAW_BLOCK'; + } + + break; + case 5: + return 15; + break; + case 6: + this.popState(); + return 14; + + break; + case 7: + return 65; + break; + case 8: + return 68; + break; + case 9: + return 19; + break; + case 10: + this.popState(); + this.begin('raw'); + return 23; + + break; + case 11: + return 55; + break; + case 12: + return 60; + break; + case 13: + return 29; + break; + case 14: + return 47; + break; + case 15: + this.popState();return 44; + break; + case 16: + this.popState();return 44; + break; + case 17: + return 34; + break; + case 18: + return 39; + break; + case 19: + return 51; + break; + case 20: + return 48; + break; + case 21: + this.unput(yy_.yytext); + this.popState(); + this.begin('com'); + + break; + case 22: + this.popState(); + return 14; + + break; + case 23: + return 48; + break; + case 24: + return 73; + break; + case 25: + return 72; + break; + case 26: + return 72; + break; + case 27: + return 87; + break; + case 28: + // ignore whitespace + break; + case 29: + this.popState();return 54; + break; + case 30: + this.popState();return 33; + break; + case 31: + yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80; + break; + case 32: + yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80; + break; + case 33: + return 85; + break; + case 34: + return 82; + break; + case 35: + return 82; + break; + case 36: + return 83; + break; + case 37: + return 84; + break; + case 38: + return 81; + break; + case 39: + return 75; + break; + case 40: + return 77; + break; + case 41: + return 72; + break; + case 42: + yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72; + break; + case 43: + return 'INVALID'; + break; + case 44: + return 5; + break; + } + }; + lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/]; + lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } }; + return lexer; + })(); + parser.lexer = lexer; + function Parser() { + this.yy = {}; + }Parser.prototype = parser;parser.Parser = Parser; + return new Parser(); + })();exports["default"] = handlebars; + module.exports = exports["default"]; + +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _visitor = __webpack_require__(88); + + var _visitor2 = _interopRequireDefault(_visitor); + + function WhitespaceControl() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + this.options = options; + } + WhitespaceControl.prototype = new _visitor2['default'](); + + WhitespaceControl.prototype.Program = function (program) { + var doStandalone = !this.options.ignoreStandalone; + + var isRoot = !this.isRootSeen; + this.isRootSeen = true; + + var body = program.body; + for (var i = 0, l = body.length; i < l; i++) { + var current = body[i], + strip = this.accept(current); + + if (!strip) { + continue; + } + + var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), + _isNextWhitespace = isNextWhitespace(body, i, isRoot), + openStandalone = strip.openStandalone && _isPrevWhitespace, + closeStandalone = strip.closeStandalone && _isNextWhitespace, + inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; + + if (strip.close) { + omitRight(body, i, true); + } + if (strip.open) { + omitLeft(body, i, true); + } + + if (doStandalone && inlineStandalone) { + omitRight(body, i); + + if (omitLeft(body, i)) { + // If we are on a standalone node, save the indent info for partials + if (current.type === 'PartialStatement') { + // Pull out the whitespace from the final line + current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; + } + } + } + if (doStandalone && openStandalone) { + omitRight((current.program || current.inverse).body); + + // Strip out the previous content node if it's whitespace only + omitLeft(body, i); + } + if (doStandalone && closeStandalone) { + // Always strip the next node + omitRight(body, i); + + omitLeft((current.inverse || current.program).body); + } + } + + return program; + }; + + WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) { + this.accept(block.program); + this.accept(block.inverse); + + // Find the inverse program that is involed with whitespace stripping. + var program = block.program || block.inverse, + inverse = block.program && block.inverse, + firstInverse = inverse, + lastInverse = inverse; + + if (inverse && inverse.chained) { + firstInverse = inverse.body[0].program; + + // Walk the inverse chain to find the last inverse that is actually in the chain. + while (lastInverse.chained) { + lastInverse = lastInverse.body[lastInverse.body.length - 1].program; + } + } + + var strip = { + open: block.openStrip.open, + close: block.closeStrip.close, + + // Determine the standalone candiacy. Basically flag our content as being possibly standalone + // so our parent can determine if we actually are standalone + openStandalone: isNextWhitespace(program.body), + closeStandalone: isPrevWhitespace((firstInverse || program).body) + }; + + if (block.openStrip.close) { + omitRight(program.body, null, true); + } + + if (inverse) { + var inverseStrip = block.inverseStrip; + + if (inverseStrip.open) { + omitLeft(program.body, null, true); + } + + if (inverseStrip.close) { + omitRight(firstInverse.body, null, true); + } + if (block.closeStrip.open) { + omitLeft(lastInverse.body, null, true); + } + + // Find standalone else statments + if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { + omitLeft(program.body); + omitRight(firstInverse.body); + } + } else if (block.closeStrip.open) { + omitLeft(program.body, null, true); + } + + return strip; + }; + + WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) { + return mustache.strip; + }; + + WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) { + /* istanbul ignore next */ + var strip = node.strip || {}; + return { + inlineStandalone: true, + open: strip.open, + close: strip.close + }; + }; + + function isPrevWhitespace(body, i, isRoot) { + if (i === undefined) { + i = body.length; + } + + // Nodes that end with newlines are considered whitespace (but are special + // cased for strip operations) + var prev = body[i - 1], + sibling = body[i - 2]; + if (!prev) { + return isRoot; + } + + if (prev.type === 'ContentStatement') { + return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); + } + } + function isNextWhitespace(body, i, isRoot) { + if (i === undefined) { + i = -1; + } + + var next = body[i + 1], + sibling = body[i + 2]; + if (!next) { + return isRoot; + } + + if (next.type === 'ContentStatement') { + return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); + } + } + + // Marks the node to the right of the position as omitted. + // I.e. {{foo}}' ' will mark the ' ' node as omitted. + // + // If i is undefined, then the first child will be marked as such. + // + // If mulitple is truthy then all whitespace will be stripped out until non-whitespace + // content is met. + function omitRight(body, i, multiple) { + var current = body[i == null ? 0 : i + 1]; + if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) { + return; + } + + var original = current.value; + current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ''); + current.rightStripped = current.value !== original; + } + + // Marks the node to the left of the position as omitted. + // I.e. ' '{{foo}} will mark the ' ' node as omitted. + // + // If i is undefined then the last child will be marked as such. + // + // If mulitple is truthy then all whitespace will be stripped out until non-whitespace + // content is met. + function omitLeft(body, i, multiple) { + var current = body[i == null ? body.length - 1 : i - 1]; + if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) { + return; + } + + // We omit the last node if it's whitespace only and not preceded by a non-content node. + var original = current.value; + current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ''); + current.leftStripped = current.value !== original; + return current.leftStripped; + } + + exports['default'] = WhitespaceControl; + module.exports = exports['default']; + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + function Visitor() { + this.parents = []; + } + + Visitor.prototype = { + constructor: Visitor, + mutating: false, + + // Visits a given value. If mutating, will replace the value if necessary. + acceptKey: function acceptKey(node, name) { + var value = this.accept(node[name]); + if (this.mutating) { + // Hacky sanity check: This may have a few false positives for type for the helper + // methods but will generally do the right thing without a lot of overhead. + if (value && !Visitor.prototype[value.type]) { + throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type); + } + node[name] = value; + } + }, + + // Performs an accept operation with added sanity check to ensure + // required keys are not removed. + acceptRequired: function acceptRequired(node, name) { + this.acceptKey(node, name); + + if (!node[name]) { + throw new _exception2['default'](node.type + ' requires ' + name); + } + }, + + // Traverses a given array. If mutating, empty respnses will be removed + // for child elements. + acceptArray: function acceptArray(array) { + for (var i = 0, l = array.length; i < l; i++) { + this.acceptKey(array, i); + + if (!array[i]) { + array.splice(i, 1); + i--; + l--; + } + } + }, + + accept: function accept(object) { + if (!object) { + return; + } + + /* istanbul ignore next: Sanity code */ + if (!this[object.type]) { + throw new _exception2['default']('Unknown type: ' + object.type, object); + } + + if (this.current) { + this.parents.unshift(this.current); + } + this.current = object; + + var ret = this[object.type](object); + + this.current = this.parents.shift(); + + if (!this.mutating || ret) { + return ret; + } else if (ret !== false) { + return object; + } + }, + + Program: function Program(program) { + this.acceptArray(program.body); + }, + + MustacheStatement: visitSubExpression, + Decorator: visitSubExpression, + + BlockStatement: visitBlock, + DecoratorBlock: visitBlock, + + PartialStatement: visitPartial, + PartialBlockStatement: function PartialBlockStatement(partial) { + visitPartial.call(this, partial); + + this.acceptKey(partial, 'program'); + }, + + ContentStatement: function ContentStatement() /* content */{}, + CommentStatement: function CommentStatement() /* comment */{}, + + SubExpression: visitSubExpression, + + PathExpression: function PathExpression() /* path */{}, + + StringLiteral: function StringLiteral() /* string */{}, + NumberLiteral: function NumberLiteral() /* number */{}, + BooleanLiteral: function BooleanLiteral() /* bool */{}, + UndefinedLiteral: function UndefinedLiteral() /* literal */{}, + NullLiteral: function NullLiteral() /* literal */{}, + + Hash: function Hash(hash) { + this.acceptArray(hash.pairs); + }, + HashPair: function HashPair(pair) { + this.acceptRequired(pair, 'value'); + } + }; + + function visitSubExpression(mustache) { + this.acceptRequired(mustache, 'path'); + this.acceptArray(mustache.params); + this.acceptKey(mustache, 'hash'); + } + function visitBlock(block) { + visitSubExpression.call(this, block); + + this.acceptKey(block, 'program'); + this.acceptKey(block, 'inverse'); + } + function visitPartial(partial) { + this.acceptRequired(partial, 'name'); + this.acceptArray(partial.params); + this.acceptKey(partial, 'hash'); + } + + exports['default'] = Visitor; + module.exports = exports['default']; + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.SourceLocation = SourceLocation; + exports.id = id; + exports.stripFlags = stripFlags; + exports.stripComment = stripComment; + exports.preparePath = preparePath; + exports.prepareMustache = prepareMustache; + exports.prepareRawBlock = prepareRawBlock; + exports.prepareBlock = prepareBlock; + exports.prepareProgram = prepareProgram; + exports.preparePartialBlock = preparePartialBlock; + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + function validateClose(open, close) { + close = close.path ? close.path.original : close; + + if (open.path.original !== close) { + var errorNode = { loc: open.path.loc }; + + throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode); + } + } + + function SourceLocation(source, locInfo) { + this.source = source; + this.start = { + line: locInfo.first_line, + column: locInfo.first_column + }; + this.end = { + line: locInfo.last_line, + column: locInfo.last_column + }; + } + + function id(token) { + if (/^\[.*\]$/.test(token)) { + return token.substring(1, token.length - 1); + } else { + return token; + } + } + + function stripFlags(open, close) { + return { + open: open.charAt(2) === '~', + close: close.charAt(close.length - 3) === '~' + }; + } + + function stripComment(comment) { + return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, ''); + } + + function preparePath(data, parts, loc) { + loc = this.locInfo(loc); + + var original = data ? '@' : '', + dig = [], + depth = 0; + + for (var i = 0, l = parts.length; i < l; i++) { + var part = parts[i].part, + + // If we have [] syntax then we do not treat path references as operators, + // i.e. foo.[this] resolves to approximately context.foo['this'] + isLiteral = parts[i].original !== part; + original += (parts[i].separator || '') + part; + + if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { + if (dig.length > 0) { + throw new _exception2['default']('Invalid path: ' + original, { loc: loc }); + } else if (part === '..') { + depth++; + } + } else { + dig.push(part); + } + } + + return { + type: 'PathExpression', + data: data, + depth: depth, + parts: dig, + original: original, + loc: loc + }; + } + + function prepareMustache(path, params, hash, open, strip, locInfo) { + // Must use charAt to support IE pre-10 + var escapeFlag = open.charAt(3) || open.charAt(2), + escaped = escapeFlag !== '{' && escapeFlag !== '&'; + + var decorator = /\*/.test(open); + return { + type: decorator ? 'Decorator' : 'MustacheStatement', + path: path, + params: params, + hash: hash, + escaped: escaped, + strip: strip, + loc: this.locInfo(locInfo) + }; + } + + function prepareRawBlock(openRawBlock, contents, close, locInfo) { + validateClose(openRawBlock, close); + + locInfo = this.locInfo(locInfo); + var program = { + type: 'Program', + body: contents, + strip: {}, + loc: locInfo + }; + + return { + type: 'BlockStatement', + path: openRawBlock.path, + params: openRawBlock.params, + hash: openRawBlock.hash, + program: program, + openStrip: {}, + inverseStrip: {}, + closeStrip: {}, + loc: locInfo + }; + } + + function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { + if (close && close.path) { + validateClose(openBlock, close); + } + + var decorator = /\*/.test(openBlock.open); + + program.blockParams = openBlock.blockParams; + + var inverse = undefined, + inverseStrip = undefined; + + if (inverseAndProgram) { + if (decorator) { + throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram); + } + + if (inverseAndProgram.chain) { + inverseAndProgram.program.body[0].closeStrip = close.strip; + } + + inverseStrip = inverseAndProgram.strip; + inverse = inverseAndProgram.program; + } + + if (inverted) { + inverted = inverse; + inverse = program; + program = inverted; + } + + return { + type: decorator ? 'DecoratorBlock' : 'BlockStatement', + path: openBlock.path, + params: openBlock.params, + hash: openBlock.hash, + program: program, + inverse: inverse, + openStrip: openBlock.strip, + inverseStrip: inverseStrip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; + } + + function prepareProgram(statements, loc) { + if (!loc && statements.length) { + var firstLoc = statements[0].loc, + lastLoc = statements[statements.length - 1].loc; + + /* istanbul ignore else */ + if (firstLoc && lastLoc) { + loc = { + source: firstLoc.source, + start: { + line: firstLoc.start.line, + column: firstLoc.start.column + }, + end: { + line: lastLoc.end.line, + column: lastLoc.end.column + } + }; + } + } + + return { + type: 'Program', + body: statements, + strip: {}, + loc: loc + }; + } + + function preparePartialBlock(open, program, close, locInfo) { + validateClose(open, close); + + return { + type: 'PartialBlockStatement', + name: open.path, + params: open.params, + hash: open.hash, + program: program, + openStrip: open.strip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; + } + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + + /* eslint-disable new-cap */ + + 'use strict'; + + var _Object$create = __webpack_require__(74)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.Compiler = Compiler; + exports.precompile = precompile; + exports.compile = compile; + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + var _utils = __webpack_require__(5); + + var _ast = __webpack_require__(84); + + var _ast2 = _interopRequireDefault(_ast); + + var slice = [].slice; + + function Compiler() {} + + // the foundHelper register will disambiguate helper lookup from finding a + // function in a context. This is necessary for mustache compatibility, which + // requires that context functions in blocks are evaluated by blockHelperMissing, + // and then proceed as if the resulting value was provided to blockHelperMissing. + + Compiler.prototype = { + compiler: Compiler, + + equals: function equals(other) { + var len = this.opcodes.length; + if (other.opcodes.length !== len) { + return false; + } + + for (var i = 0; i < len; i++) { + var opcode = this.opcodes[i], + otherOpcode = other.opcodes[i]; + if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { + return false; + } + } + + // We know that length is the same between the two arrays because they are directly tied + // to the opcode behavior above. + len = this.children.length; + for (var i = 0; i < len; i++) { + if (!this.children[i].equals(other.children[i])) { + return false; + } + } + + return true; + }, + + guid: 0, + + compile: function compile(program, options) { + this.sourceNode = []; + this.opcodes = []; + this.children = []; + this.options = options; + this.stringParams = options.stringParams; + this.trackIds = options.trackIds; + + options.blockParams = options.blockParams || []; + + options.knownHelpers = _utils.extend(_Object$create(null), { + helperMissing: true, + blockHelperMissing: true, + each: true, + 'if': true, + unless: true, + 'with': true, + log: true, + lookup: true + }, options.knownHelpers); + + return this.accept(program); + }, + + compileProgram: function compileProgram(program) { + var childCompiler = new this.compiler(), + // eslint-disable-line new-cap + result = childCompiler.compile(program, this.options), + guid = this.guid++; + + this.usePartial = this.usePartial || result.usePartial; + + this.children[guid] = result; + this.useDepths = this.useDepths || result.useDepths; + + return guid; + }, + + accept: function accept(node) { + /* istanbul ignore next: Sanity code */ + if (!this[node.type]) { + throw new _exception2['default']('Unknown type: ' + node.type, node); + } + + this.sourceNode.unshift(node); + var ret = this[node.type](node); + this.sourceNode.shift(); + return ret; + }, + + Program: function Program(program) { + this.options.blockParams.unshift(program.blockParams); + + var body = program.body, + bodyLength = body.length; + for (var i = 0; i < bodyLength; i++) { + this.accept(body[i]); + } + + this.options.blockParams.shift(); + + this.isSimple = bodyLength === 1; + this.blockParams = program.blockParams ? program.blockParams.length : 0; + + return this; + }, + + BlockStatement: function BlockStatement(block) { + transformLiteralToPath(block); + + var program = block.program, + inverse = block.inverse; + + program = program && this.compileProgram(program); + inverse = inverse && this.compileProgram(inverse); + + var type = this.classifySexpr(block); + + if (type === 'helper') { + this.helperSexpr(block, program, inverse); + } else if (type === 'simple') { + this.simpleSexpr(block); + + // now that the simple mustache is resolved, we need to + // evaluate it by executing `blockHelperMissing` + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + this.opcode('emptyHash'); + this.opcode('blockValue', block.path.original); + } else { + this.ambiguousSexpr(block, program, inverse); + + // now that the simple mustache is resolved, we need to + // evaluate it by executing `blockHelperMissing` + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + this.opcode('emptyHash'); + this.opcode('ambiguousBlockValue'); + } + + this.opcode('append'); + }, + + DecoratorBlock: function DecoratorBlock(decorator) { + var program = decorator.program && this.compileProgram(decorator.program); + var params = this.setupFullMustacheParams(decorator, program, undefined), + path = decorator.path; + + this.useDecorators = true; + this.opcode('registerDecorator', params.length, path.original); + }, + + PartialStatement: function PartialStatement(partial) { + this.usePartial = true; + + var program = partial.program; + if (program) { + program = this.compileProgram(partial.program); + } + + var params = partial.params; + if (params.length > 1) { + throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial); + } else if (!params.length) { + if (this.options.explicitPartialContext) { + this.opcode('pushLiteral', 'undefined'); + } else { + params.push({ type: 'PathExpression', parts: [], depth: 0 }); + } + } + + var partialName = partial.name.original, + isDynamic = partial.name.type === 'SubExpression'; + if (isDynamic) { + this.accept(partial.name); + } + + this.setupFullMustacheParams(partial, program, undefined, true); + + var indent = partial.indent || ''; + if (this.options.preventIndent && indent) { + this.opcode('appendContent', indent); + indent = ''; + } + + this.opcode('invokePartial', isDynamic, partialName, indent); + this.opcode('append'); + }, + PartialBlockStatement: function PartialBlockStatement(partialBlock) { + this.PartialStatement(partialBlock); + }, + + MustacheStatement: function MustacheStatement(mustache) { + this.SubExpression(mustache); + + if (mustache.escaped && !this.options.noEscape) { + this.opcode('appendEscaped'); + } else { + this.opcode('append'); + } + }, + Decorator: function Decorator(decorator) { + this.DecoratorBlock(decorator); + }, + + ContentStatement: function ContentStatement(content) { + if (content.value) { + this.opcode('appendContent', content.value); + } + }, + + CommentStatement: function CommentStatement() {}, + + SubExpression: function SubExpression(sexpr) { + transformLiteralToPath(sexpr); + var type = this.classifySexpr(sexpr); + + if (type === 'simple') { + this.simpleSexpr(sexpr); + } else if (type === 'helper') { + this.helperSexpr(sexpr); + } else { + this.ambiguousSexpr(sexpr); + } + }, + ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { + var path = sexpr.path, + name = path.parts[0], + isBlock = program != null || inverse != null; + + this.opcode('getContext', path.depth); + + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + + path.strict = true; + this.accept(path); + + this.opcode('invokeAmbiguous', name, isBlock); + }, + + simpleSexpr: function simpleSexpr(sexpr) { + var path = sexpr.path; + path.strict = true; + this.accept(path); + this.opcode('resolvePossibleLambda'); + }, + + helperSexpr: function helperSexpr(sexpr, program, inverse) { + var params = this.setupFullMustacheParams(sexpr, program, inverse), + path = sexpr.path, + name = path.parts[0]; + + if (this.options.knownHelpers[name]) { + this.opcode('invokeKnownHelper', params.length, name); + } else if (this.options.knownHelpersOnly) { + throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr); + } else { + path.strict = true; + path.falsy = true; + + this.accept(path); + this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path)); + } + }, + + PathExpression: function PathExpression(path) { + this.addDepth(path.depth); + this.opcode('getContext', path.depth); + + var name = path.parts[0], + scoped = _ast2['default'].helpers.scopedId(path), + blockParamId = !path.depth && !scoped && this.blockParamIndex(name); + + if (blockParamId) { + this.opcode('lookupBlockParam', blockParamId, path.parts); + } else if (!name) { + // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` + this.opcode('pushContext'); + } else if (path.data) { + this.options.data = true; + this.opcode('lookupData', path.depth, path.parts, path.strict); + } else { + this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped); + } + }, + + StringLiteral: function StringLiteral(string) { + this.opcode('pushString', string.value); + }, + + NumberLiteral: function NumberLiteral(number) { + this.opcode('pushLiteral', number.value); + }, + + BooleanLiteral: function BooleanLiteral(bool) { + this.opcode('pushLiteral', bool.value); + }, + + UndefinedLiteral: function UndefinedLiteral() { + this.opcode('pushLiteral', 'undefined'); + }, + + NullLiteral: function NullLiteral() { + this.opcode('pushLiteral', 'null'); + }, + + Hash: function Hash(hash) { + var pairs = hash.pairs, + i = 0, + l = pairs.length; + + this.opcode('pushHash'); + + for (; i < l; i++) { + this.pushParam(pairs[i].value); + } + while (i--) { + this.opcode('assignToHash', pairs[i].key); + } + this.opcode('popHash'); + }, + + // HELPERS + opcode: function opcode(name) { + this.opcodes.push({ + opcode: name, + args: slice.call(arguments, 1), + loc: this.sourceNode[0].loc + }); + }, + + addDepth: function addDepth(depth) { + if (!depth) { + return; + } + + this.useDepths = true; + }, + + classifySexpr: function classifySexpr(sexpr) { + var isSimple = _ast2['default'].helpers.simpleId(sexpr.path); + + var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); + + // a mustache is an eligible helper if: + // * its id is simple (a single part, not `this` or `..`) + var isHelper = !isBlockParam && _ast2['default'].helpers.helperExpression(sexpr); + + // if a mustache is an eligible helper but not a definite + // helper, it is ambiguous, and will be resolved in a later + // pass or at runtime. + var isEligible = !isBlockParam && (isHelper || isSimple); + + // if ambiguous, we can possibly resolve the ambiguity now + // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. + if (isEligible && !isHelper) { + var _name = sexpr.path.parts[0], + options = this.options; + if (options.knownHelpers[_name]) { + isHelper = true; + } else if (options.knownHelpersOnly) { + isEligible = false; + } + } + + if (isHelper) { + return 'helper'; + } else if (isEligible) { + return 'ambiguous'; + } else { + return 'simple'; + } + }, + + pushParams: function pushParams(params) { + for (var i = 0, l = params.length; i < l; i++) { + this.pushParam(params[i]); + } + }, + + pushParam: function pushParam(val) { + var value = val.value != null ? val.value : val.original || ''; + + if (this.stringParams) { + if (value.replace) { + value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.'); + } + + if (val.depth) { + this.addDepth(val.depth); + } + this.opcode('getContext', val.depth || 0); + this.opcode('pushStringParam', value, val.type); + + if (val.type === 'SubExpression') { + // SubExpressions get evaluated and passed in + // in string params mode. + this.accept(val); + } + } else { + if (this.trackIds) { + var blockParamIndex = undefined; + if (val.parts && !_ast2['default'].helpers.scopedId(val) && !val.depth) { + blockParamIndex = this.blockParamIndex(val.parts[0]); + } + if (blockParamIndex) { + var blockParamChild = val.parts.slice(1).join('.'); + this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); + } else { + value = val.original || value; + if (value.replace) { + value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, ''); + } + + this.opcode('pushId', val.type, value); + } + } + this.accept(val); + } + }, + + setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { + var params = sexpr.params; + this.pushParams(params); + + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + + if (sexpr.hash) { + this.accept(sexpr.hash); + } else { + this.opcode('emptyHash', omitEmpty); + } + + return params; + }, + + blockParamIndex: function blockParamIndex(name) { + for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { + var blockParams = this.options.blockParams[depth], + param = blockParams && _utils.indexOf(blockParams, name); + if (blockParams && param >= 0) { + return [depth, param]; + } + } + } + }; + + function precompile(input, options, env) { + if (input == null || typeof input !== 'string' && input.type !== 'Program') { + throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input); + } + + options = options || {}; + if (!('data' in options)) { + options.data = true; + } + if (options.compat) { + options.useDepths = true; + } + + var ast = env.parse(input, options), + environment = new env.Compiler().compile(ast, options); + return new env.JavaScriptCompiler().compile(environment, options); + } + + function compile(input, options, env) { + if (options === undefined) options = {}; + + if (input == null || typeof input !== 'string' && input.type !== 'Program') { + throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input); + } + + options = _utils.extend({}, options); + if (!('data' in options)) { + options.data = true; + } + if (options.compat) { + options.useDepths = true; + } + + var compiled = undefined; + + function compileInput() { + var ast = env.parse(input, options), + environment = new env.Compiler().compile(ast, options), + templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true); + return env.template(templateSpec); + } + + // Template is only compiled on first use and cached after that point. + function ret(context, execOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled.call(this, context, execOptions); + } + ret._setup = function (setupOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._setup(setupOptions); + }; + ret._child = function (i, data, blockParams, depths) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._child(i, data, blockParams, depths); + }; + return ret; + } + + function argEquals(a, b) { + if (a === b) { + return true; + } + + if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) { + for (var i = 0; i < a.length; i++) { + if (!argEquals(a[i], b[i])) { + return false; + } + } + return true; + } + } + + function transformLiteralToPath(sexpr) { + if (!sexpr.path.parts) { + var literal = sexpr.path; + // Casting to string here to make false and 0 literal values play nicely with the rest + // of the system. + sexpr.path = { + type: 'PathExpression', + data: false, + depth: 0, + parts: [literal.original + ''], + original: literal.original + '', + loc: literal.loc + }; + } + } + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _Object$keys = __webpack_require__(60)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _base = __webpack_require__(4); + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + var _utils = __webpack_require__(5); + + var _codeGen = __webpack_require__(92); + + var _codeGen2 = _interopRequireDefault(_codeGen); + + function Literal(value) { + this.value = value; + } + + function JavaScriptCompiler() {} + + JavaScriptCompiler.prototype = { + // PUBLIC API: You can override these methods in a subclass to provide + // alternative compiled forms for name lookup and buffering semantics + nameLookup: function nameLookup(parent, name /*, type */) { + return this.internalNameLookup(parent, name); + }, + depthedLookup: function depthedLookup(name) { + return [this.aliasable('container.lookup'), '(depths, ', JSON.stringify(name), ')']; + }, + + compilerInfo: function compilerInfo() { + var revision = _base.COMPILER_REVISION, + versions = _base.REVISION_CHANGES[revision]; + return [revision, versions]; + }, + + appendToBuffer: function appendToBuffer(source, location, explicit) { + // Force a source as this simplifies the merge logic. + if (!_utils.isArray(source)) { + source = [source]; + } + source = this.source.wrap(source, location); + + if (this.environment.isSimple) { + return ['return ', source, ';']; + } else if (explicit) { + // This is a case where the buffer operation occurs as a child of another + // construct, generally braces. We have to explicitly output these buffer + // operations to ensure that the emitted code goes in the correct location. + return ['buffer += ', source, ';']; + } else { + source.appendToBuffer = true; + return source; + } + }, + + initializeBuffer: function initializeBuffer() { + return this.quotedString(''); + }, + // END PUBLIC API + internalNameLookup: function internalNameLookup(parent, name) { + this.lookupPropertyFunctionIsUsed = true; + return ['lookupProperty(', parent, ',', JSON.stringify(name), ')']; + }, + + lookupPropertyFunctionIsUsed: false, + + compile: function compile(environment, options, context, asObject) { + this.environment = environment; + this.options = options; + this.stringParams = this.options.stringParams; + this.trackIds = this.options.trackIds; + this.precompile = !asObject; + + this.name = this.environment.name; + this.isChild = !!context; + this.context = context || { + decorators: [], + programs: [], + environments: [] + }; + + this.preamble(); + + this.stackSlot = 0; + this.stackVars = []; + this.aliases = {}; + this.registers = { list: [] }; + this.hashes = []; + this.compileStack = []; + this.inlineStack = []; + this.blockParams = []; + + this.compileChildren(environment, options); + + this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat; + this.useBlockParams = this.useBlockParams || environment.useBlockParams; + + var opcodes = environment.opcodes, + opcode = undefined, + firstLoc = undefined, + i = undefined, + l = undefined; + + for (i = 0, l = opcodes.length; i < l; i++) { + opcode = opcodes[i]; + + this.source.currentLocation = opcode.loc; + firstLoc = firstLoc || opcode.loc; + this[opcode.opcode].apply(this, opcode.args); + } + + // Flush any trailing content that might be pending. + this.source.currentLocation = firstLoc; + this.pushSource(''); + + /* istanbul ignore next */ + if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { + throw new _exception2['default']('Compile completed with content left on stack'); + } + + if (!this.decorators.isEmpty()) { + this.useDecorators = true; + + this.decorators.prepend(['var decorators = container.decorators, ', this.lookupPropertyFunctionVarDeclaration(), ';\n']); + this.decorators.push('return fn;'); + + if (asObject) { + this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]); + } else { + this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n'); + this.decorators.push('}\n'); + this.decorators = this.decorators.merge(); + } + } else { + this.decorators = undefined; + } + + var fn = this.createFunctionContext(asObject); + if (!this.isChild) { + var ret = { + compiler: this.compilerInfo(), + main: fn + }; + + if (this.decorators) { + ret.main_d = this.decorators; // eslint-disable-line camelcase + ret.useDecorators = true; + } + + var _context = this.context; + var programs = _context.programs; + var decorators = _context.decorators; + + for (i = 0, l = programs.length; i < l; i++) { + if (programs[i]) { + ret[i] = programs[i]; + if (decorators[i]) { + ret[i + '_d'] = decorators[i]; + ret.useDecorators = true; + } + } + } + + if (this.environment.usePartial) { + ret.usePartial = true; + } + if (this.options.data) { + ret.useData = true; + } + if (this.useDepths) { + ret.useDepths = true; + } + if (this.useBlockParams) { + ret.useBlockParams = true; + } + if (this.options.compat) { + ret.compat = true; + } + + if (!asObject) { + ret.compiler = JSON.stringify(ret.compiler); + + this.source.currentLocation = { start: { line: 1, column: 0 } }; + ret = this.objectLiteral(ret); + + if (options.srcName) { + ret = ret.toStringWithSourceMap({ file: options.destName }); + ret.map = ret.map && ret.map.toString(); + } else { + ret = ret.toString(); + } + } else { + ret.compilerOptions = this.options; + } + + return ret; + } else { + return fn; + } + }, + + preamble: function preamble() { + // track the last context pushed into place to allow skipping the + // getContext opcode when it would be a noop + this.lastContext = 0; + this.source = new _codeGen2['default'](this.options.srcName); + this.decorators = new _codeGen2['default'](this.options.srcName); + }, + + createFunctionContext: function createFunctionContext(asObject) { + // istanbul ignore next + + var _this = this; + + var varDeclarations = ''; + + var locals = this.stackVars.concat(this.registers.list); + if (locals.length > 0) { + varDeclarations += ', ' + locals.join(', '); + } + + // Generate minimizer alias mappings + // + // When using true SourceNodes, this will update all references to the given alias + // as the source nodes are reused in situ. For the non-source node compilation mode, + // aliases will not be used, but this case is already being run on the client and + // we aren't concern about minimizing the template size. + var aliasCount = 0; + _Object$keys(this.aliases).forEach(function (alias) { + var node = _this.aliases[alias]; + if (node.children && node.referenceCount > 1) { + varDeclarations += ', alias' + ++aliasCount + '=' + alias; + node.children[0] = 'alias' + aliasCount; + } + }); + + if (this.lookupPropertyFunctionIsUsed) { + varDeclarations += ', ' + this.lookupPropertyFunctionVarDeclaration(); + } + + var params = ['container', 'depth0', 'helpers', 'partials', 'data']; + + if (this.useBlockParams || this.useDepths) { + params.push('blockParams'); + } + if (this.useDepths) { + params.push('depths'); + } + + // Perform a second pass over the output to merge content when possible + var source = this.mergeSource(varDeclarations); + + if (asObject) { + params.push(source); + + return Function.apply(this, params); + } else { + return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']); + } + }, + mergeSource: function mergeSource(varDeclarations) { + var isSimple = this.environment.isSimple, + appendOnly = !this.forceBuffer, + appendFirst = undefined, + sourceSeen = undefined, + bufferStart = undefined, + bufferEnd = undefined; + this.source.each(function (line) { + if (line.appendToBuffer) { + if (bufferStart) { + line.prepend(' + '); + } else { + bufferStart = line; + } + bufferEnd = line; + } else { + if (bufferStart) { + if (!sourceSeen) { + appendFirst = true; + } else { + bufferStart.prepend('buffer += '); + } + bufferEnd.add(';'); + bufferStart = bufferEnd = undefined; + } + + sourceSeen = true; + if (!isSimple) { + appendOnly = false; + } + } + }); + + if (appendOnly) { + if (bufferStart) { + bufferStart.prepend('return '); + bufferEnd.add(';'); + } else if (!sourceSeen) { + this.source.push('return "";'); + } + } else { + varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); + + if (bufferStart) { + bufferStart.prepend('return buffer + '); + bufferEnd.add(';'); + } else { + this.source.push('return buffer;'); + } + } + + if (varDeclarations) { + this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')); + } + + return this.source.merge(); + }, + + lookupPropertyFunctionVarDeclaration: function lookupPropertyFunctionVarDeclaration() { + return '\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n '.trim(); + }, + + // [blockValue] + // + // On stack, before: hash, inverse, program, value + // On stack, after: return value of blockHelperMissing + // + // The purpose of this opcode is to take a block of the form + // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and + // replace it on the stack with the result of properly + // invoking blockHelperMissing. + blockValue: function blockValue(name) { + var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'), + params = [this.contextName(0)]; + this.setupHelperArgs(name, 0, params); + + var blockName = this.popStack(); + params.splice(1, 0, blockName); + + this.push(this.source.functionCall(blockHelperMissing, 'call', params)); + }, + + // [ambiguousBlockValue] + // + // On stack, before: hash, inverse, program, value + // Compiler value, before: lastHelper=value of last found helper, if any + // On stack, after, if no lastHelper: same as [blockValue] + // On stack, after, if lastHelper: value + ambiguousBlockValue: function ambiguousBlockValue() { + // We're being a bit cheeky and reusing the options value from the prior exec + var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'), + params = [this.contextName(0)]; + this.setupHelperArgs('', 0, params, true); + + this.flushInline(); + + var current = this.topStack(); + params.splice(1, 0, current); + + this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']); + }, + + // [appendContent] + // + // On stack, before: ... + // On stack, after: ... + // + // Appends the string value of `content` to the current buffer + appendContent: function appendContent(content) { + if (this.pendingContent) { + content = this.pendingContent + content; + } else { + this.pendingLocation = this.source.currentLocation; + } + + this.pendingContent = content; + }, + + // [append] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Coerces `value` to a String and appends it to the current buffer. + // + // If `value` is truthy, or 0, it is coerced into a string and appended + // Otherwise, the empty string is appended + append: function append() { + if (this.isInline()) { + this.replaceStack(function (current) { + return [' != null ? ', current, ' : ""']; + }); + + this.pushSource(this.appendToBuffer(this.popStack())); + } else { + var local = this.popStack(); + this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']); + if (this.environment.isSimple) { + this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']); + } + } + }, + + // [appendEscaped] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Escape `value` and append it to the buffer + appendEscaped: function appendEscaped() { + this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')'])); + }, + + // [getContext] + // + // On stack, before: ... + // On stack, after: ... + // Compiler value, after: lastContext=depth + // + // Set the value of the `lastContext` compiler value to the depth + getContext: function getContext(depth) { + this.lastContext = depth; + }, + + // [pushContext] + // + // On stack, before: ... + // On stack, after: currentContext, ... + // + // Pushes the value of the current context onto the stack. + pushContext: function pushContext() { + this.pushStackLiteral(this.contextName(this.lastContext)); + }, + + // [lookupOnContext] + // + // On stack, before: ... + // On stack, after: currentContext[name], ... + // + // Looks up the value of `name` on the current context and pushes + // it onto the stack. + lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) { + var i = 0; + + if (!scoped && this.options.compat && !this.lastContext) { + // The depthed query is expected to handle the undefined logic for the root level that + // is implemented below, so we evaluate that directly in compat mode + this.push(this.depthedLookup(parts[i++])); + } else { + this.pushContext(); + } + + this.resolvePath('context', parts, i, falsy, strict); + }, + + // [lookupBlockParam] + // + // On stack, before: ... + // On stack, after: blockParam[name], ... + // + // Looks up the value of `parts` on the given block param and pushes + // it onto the stack. + lookupBlockParam: function lookupBlockParam(blockParamId, parts) { + this.useBlockParams = true; + + this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); + this.resolvePath('context', parts, 1); + }, + + // [lookupData] + // + // On stack, before: ... + // On stack, after: data, ... + // + // Push the data lookup operator + lookupData: function lookupData(depth, parts, strict) { + if (!depth) { + this.pushStackLiteral('data'); + } else { + this.pushStackLiteral('container.data(data, ' + depth + ')'); + } + + this.resolvePath('data', parts, 0, true, strict); + }, + + resolvePath: function resolvePath(type, parts, i, falsy, strict) { + // istanbul ignore next + + var _this2 = this; + + if (this.options.strict || this.options.assumeObjects) { + this.push(strictLookup(this.options.strict && strict, this, parts, i, type)); + return; + } + + var len = parts.length; + for (; i < len; i++) { + /* eslint-disable no-loop-func */ + this.replaceStack(function (current) { + var lookup = _this2.nameLookup(current, parts[i], type); + // We want to ensure that zero and false are handled properly if the context (falsy flag) + // needs to have the special handling for these values. + if (!falsy) { + return [' != null ? ', lookup, ' : ', current]; + } else { + // Otherwise we can use generic falsy handling + return [' && ', lookup]; + } + }); + /* eslint-enable no-loop-func */ + } + }, + + // [resolvePossibleLambda] + // + // On stack, before: value, ... + // On stack, after: resolved value, ... + // + // If the `value` is a lambda, replace it on the stack by + // the return value of the lambda + resolvePossibleLambda: function resolvePossibleLambda() { + this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']); + }, + + // [pushStringParam] + // + // On stack, before: ... + // On stack, after: string, currentContext, ... + // + // This opcode is designed for use in string mode, which + // provides the string value of a parameter along with its + // depth rather than resolving it immediately. + pushStringParam: function pushStringParam(string, type) { + this.pushContext(); + this.pushString(type); + + // If it's a subexpression, the string result + // will be pushed after this opcode. + if (type !== 'SubExpression') { + if (typeof string === 'string') { + this.pushString(string); + } else { + this.pushStackLiteral(string); + } + } + }, + + emptyHash: function emptyHash(omitEmpty) { + if (this.trackIds) { + this.push('{}'); // hashIds + } + if (this.stringParams) { + this.push('{}'); // hashContexts + this.push('{}'); // hashTypes + } + this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); + }, + pushHash: function pushHash() { + if (this.hash) { + this.hashes.push(this.hash); + } + this.hash = { values: {}, types: [], contexts: [], ids: [] }; + }, + popHash: function popHash() { + var hash = this.hash; + this.hash = this.hashes.pop(); + + if (this.trackIds) { + this.push(this.objectLiteral(hash.ids)); + } + if (this.stringParams) { + this.push(this.objectLiteral(hash.contexts)); + this.push(this.objectLiteral(hash.types)); + } + + this.push(this.objectLiteral(hash.values)); + }, + + // [pushString] + // + // On stack, before: ... + // On stack, after: quotedString(string), ... + // + // Push a quoted version of `string` onto the stack + pushString: function pushString(string) { + this.pushStackLiteral(this.quotedString(string)); + }, + + // [pushLiteral] + // + // On stack, before: ... + // On stack, after: value, ... + // + // Pushes a value onto the stack. This operation prevents + // the compiler from creating a temporary variable to hold + // it. + pushLiteral: function pushLiteral(value) { + this.pushStackLiteral(value); + }, + + // [pushProgram] + // + // On stack, before: ... + // On stack, after: program(guid), ... + // + // Push a program expression onto the stack. This takes + // a compile-time guid and converts it into a runtime-accessible + // expression. + pushProgram: function pushProgram(guid) { + if (guid != null) { + this.pushStackLiteral(this.programExpression(guid)); + } else { + this.pushStackLiteral(null); + } + }, + + // [registerDecorator] + // + // On stack, before: hash, program, params..., ... + // On stack, after: ... + // + // Pops off the decorator's parameters, invokes the decorator, + // and inserts the decorator into the decorators list. + registerDecorator: function registerDecorator(paramSize, name) { + var foundDecorator = this.nameLookup('decorators', name, 'decorator'), + options = this.setupHelperArgs(name, paramSize); + + this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']); + }, + + // [invokeHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // Pops off the helper's parameters, invokes the helper, + // and pushes the helper's return value onto the stack. + // + // If the helper is not found, `helperMissing` is called. + invokeHelper: function invokeHelper(paramSize, name, isSimple) { + var nonHelper = this.popStack(), + helper = this.setupHelper(paramSize, name); + + var possibleFunctionCalls = []; + + if (isSimple) { + // direct call to helper + possibleFunctionCalls.push(helper.name); + } + // call a function from the input object + possibleFunctionCalls.push(nonHelper); + if (!this.options.strict) { + possibleFunctionCalls.push(this.aliasable('container.hooks.helperMissing')); + } + + var functionLookupCode = ['(', this.itemsSeparatedBy(possibleFunctionCalls, '||'), ')']; + var functionCall = this.source.functionCall(functionLookupCode, 'call', helper.callParams); + this.push(functionCall); + }, + + itemsSeparatedBy: function itemsSeparatedBy(items, separator) { + var result = []; + result.push(items[0]); + for (var i = 1; i < items.length; i++) { + result.push(separator, items[i]); + } + return result; + }, + // [invokeKnownHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // This operation is used when the helper is known to exist, + // so a `helperMissing` fallback is not required. + invokeKnownHelper: function invokeKnownHelper(paramSize, name) { + var helper = this.setupHelper(paramSize, name); + this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); + }, + + // [invokeAmbiguous] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of disambiguation + // + // This operation is used when an expression like `{{foo}}` + // is provided, but we don't know at compile-time whether it + // is a helper or a path. + // + // This operation emits more code than the other options, + // and can be avoided by passing the `knownHelpers` and + // `knownHelpersOnly` flags at compile-time. + invokeAmbiguous: function invokeAmbiguous(name, helperCall) { + this.useRegister('helper'); + + var nonHelper = this.popStack(); + + this.emptyHash(); + var helper = this.setupHelper(0, name, helperCall); + + var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); + + var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; + if (!this.options.strict) { + lookup[0] = '(helper = '; + lookup.push(' != null ? helper : ', this.aliasable('container.hooks.helperMissing')); + } + + this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']); + }, + + // [invokePartial] + // + // On stack, before: context, ... + // On stack after: result of partial invocation + // + // This operation pops off a context, invokes a partial with that context, + // and pushes the result of the invocation back. + invokePartial: function invokePartial(isDynamic, name, indent) { + var params = [], + options = this.setupParams(name, 1, params); + + if (isDynamic) { + name = this.popStack(); + delete options.name; + } + + if (indent) { + options.indent = JSON.stringify(indent); + } + options.helpers = 'helpers'; + options.partials = 'partials'; + options.decorators = 'container.decorators'; + + if (!isDynamic) { + params.unshift(this.nameLookup('partials', name, 'partial')); + } else { + params.unshift(name); + } + + if (this.options.compat) { + options.depths = 'depths'; + } + options = this.objectLiteral(options); + params.push(options); + + this.push(this.source.functionCall('container.invokePartial', '', params)); + }, + + // [assignToHash] + // + // On stack, before: value, ..., hash, ... + // On stack, after: ..., hash, ... + // + // Pops a value off the stack and assigns it to the current hash + assignToHash: function assignToHash(key) { + var value = this.popStack(), + context = undefined, + type = undefined, + id = undefined; + + if (this.trackIds) { + id = this.popStack(); + } + if (this.stringParams) { + type = this.popStack(); + context = this.popStack(); + } + + var hash = this.hash; + if (context) { + hash.contexts[key] = context; + } + if (type) { + hash.types[key] = type; + } + if (id) { + hash.ids[key] = id; + } + hash.values[key] = value; + }, + + pushId: function pushId(type, name, child) { + if (type === 'BlockParam') { + this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : '')); + } else if (type === 'PathExpression') { + this.pushString(name); + } else if (type === 'SubExpression') { + this.pushStackLiteral('true'); + } else { + this.pushStackLiteral('null'); + } + }, + + // HELPERS + + compiler: JavaScriptCompiler, + + compileChildren: function compileChildren(environment, options) { + var children = environment.children, + child = undefined, + compiler = undefined; + + for (var i = 0, l = children.length; i < l; i++) { + child = children[i]; + compiler = new this.compiler(); // eslint-disable-line new-cap + + var existing = this.matchExistingProgram(child); + + if (existing == null) { + this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children + var index = this.context.programs.length; + child.index = index; + child.name = 'program' + index; + this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile); + this.context.decorators[index] = compiler.decorators; + this.context.environments[index] = child; + + this.useDepths = this.useDepths || compiler.useDepths; + this.useBlockParams = this.useBlockParams || compiler.useBlockParams; + child.useDepths = this.useDepths; + child.useBlockParams = this.useBlockParams; + } else { + child.index = existing.index; + child.name = 'program' + existing.index; + + this.useDepths = this.useDepths || existing.useDepths; + this.useBlockParams = this.useBlockParams || existing.useBlockParams; + } + } + }, + matchExistingProgram: function matchExistingProgram(child) { + for (var i = 0, len = this.context.environments.length; i < len; i++) { + var environment = this.context.environments[i]; + if (environment && environment.equals(child)) { + return environment; + } + } + }, + + programExpression: function programExpression(guid) { + var child = this.environment.children[guid], + programParams = [child.index, 'data', child.blockParams]; + + if (this.useBlockParams || this.useDepths) { + programParams.push('blockParams'); + } + if (this.useDepths) { + programParams.push('depths'); + } + + return 'container.program(' + programParams.join(', ') + ')'; + }, + + useRegister: function useRegister(name) { + if (!this.registers[name]) { + this.registers[name] = true; + this.registers.list.push(name); + } + }, + + push: function push(expr) { + if (!(expr instanceof Literal)) { + expr = this.source.wrap(expr); + } + + this.inlineStack.push(expr); + return expr; + }, + + pushStackLiteral: function pushStackLiteral(item) { + this.push(new Literal(item)); + }, + + pushSource: function pushSource(source) { + if (this.pendingContent) { + this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); + this.pendingContent = undefined; + } + + if (source) { + this.source.push(source); + } + }, + + replaceStack: function replaceStack(callback) { + var prefix = ['('], + stack = undefined, + createdStack = undefined, + usedLiteral = undefined; + + /* istanbul ignore next */ + if (!this.isInline()) { + throw new _exception2['default']('replaceStack on non-inline'); + } + + // We want to merge the inline statement into the replacement statement via ',' + var top = this.popStack(true); + + if (top instanceof Literal) { + // Literals do not need to be inlined + stack = [top.value]; + prefix = ['(', stack]; + usedLiteral = true; + } else { + // Get or create the current stack name for use by the inline + createdStack = true; + var _name = this.incrStack(); + + prefix = ['((', this.push(_name), ' = ', top, ')']; + stack = this.topStack(); + } + + var item = callback.call(this, stack); + + if (!usedLiteral) { + this.popStack(); + } + if (createdStack) { + this.stackSlot--; + } + this.push(prefix.concat(item, ')')); + }, + + incrStack: function incrStack() { + this.stackSlot++; + if (this.stackSlot > this.stackVars.length) { + this.stackVars.push('stack' + this.stackSlot); + } + return this.topStackName(); + }, + topStackName: function topStackName() { + return 'stack' + this.stackSlot; + }, + flushInline: function flushInline() { + var inlineStack = this.inlineStack; + this.inlineStack = []; + for (var i = 0, len = inlineStack.length; i < len; i++) { + var entry = inlineStack[i]; + /* istanbul ignore if */ + if (entry instanceof Literal) { + this.compileStack.push(entry); + } else { + var stack = this.incrStack(); + this.pushSource([stack, ' = ', entry, ';']); + this.compileStack.push(stack); + } + } + }, + isInline: function isInline() { + return this.inlineStack.length; + }, + + popStack: function popStack(wrapped) { + var inline = this.isInline(), + item = (inline ? this.inlineStack : this.compileStack).pop(); + + if (!wrapped && item instanceof Literal) { + return item.value; + } else { + if (!inline) { + /* istanbul ignore next */ + if (!this.stackSlot) { + throw new _exception2['default']('Invalid stack pop'); + } + this.stackSlot--; + } + return item; + } + }, + + topStack: function topStack() { + var stack = this.isInline() ? this.inlineStack : this.compileStack, + item = stack[stack.length - 1]; + + /* istanbul ignore if */ + if (item instanceof Literal) { + return item.value; + } else { + return item; + } + }, + + contextName: function contextName(context) { + if (this.useDepths && context) { + return 'depths[' + context + ']'; + } else { + return 'depth' + context; + } + }, + + quotedString: function quotedString(str) { + return this.source.quotedString(str); + }, + + objectLiteral: function objectLiteral(obj) { + return this.source.objectLiteral(obj); + }, + + aliasable: function aliasable(name) { + var ret = this.aliases[name]; + if (ret) { + ret.referenceCount++; + return ret; + } + + ret = this.aliases[name] = this.source.wrap(name); + ret.aliasable = true; + ret.referenceCount = 1; + + return ret; + }, + + setupHelper: function setupHelper(paramSize, name, blockHelper) { + var params = [], + paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); + var foundHelper = this.nameLookup('helpers', name, 'helper'), + callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : (container.nullContext || {})'); + + return { + params: params, + paramsInit: paramsInit, + name: foundHelper, + callParams: [callContext].concat(params) + }; + }, + + setupParams: function setupParams(helper, paramSize, params) { + var options = {}, + contexts = [], + types = [], + ids = [], + objectArgs = !params, + param = undefined; + + if (objectArgs) { + params = []; + } + + options.name = this.quotedString(helper); + options.hash = this.popStack(); + + if (this.trackIds) { + options.hashIds = this.popStack(); + } + if (this.stringParams) { + options.hashTypes = this.popStack(); + options.hashContexts = this.popStack(); + } + + var inverse = this.popStack(), + program = this.popStack(); + + // Avoid setting fn and inverse if neither are set. This allows + // helpers to do a check for `if (options.fn)` + if (program || inverse) { + options.fn = program || 'container.noop'; + options.inverse = inverse || 'container.noop'; + } + + // The parameters go on to the stack in order (making sure that they are evaluated in order) + // so we need to pop them off the stack in reverse order + var i = paramSize; + while (i--) { + param = this.popStack(); + params[i] = param; + + if (this.trackIds) { + ids[i] = this.popStack(); + } + if (this.stringParams) { + types[i] = this.popStack(); + contexts[i] = this.popStack(); + } + } + + if (objectArgs) { + options.args = this.source.generateArray(params); + } + + if (this.trackIds) { + options.ids = this.source.generateArray(ids); + } + if (this.stringParams) { + options.types = this.source.generateArray(types); + options.contexts = this.source.generateArray(contexts); + } + + if (this.options.data) { + options.data = 'data'; + } + if (this.useBlockParams) { + options.blockParams = 'blockParams'; + } + return options; + }, + + setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { + var options = this.setupParams(helper, paramSize, params); + options.loc = JSON.stringify(this.source.currentLocation); + options = this.objectLiteral(options); + if (useRegister) { + this.useRegister('options'); + params.push('options'); + return ['options=', options]; + } else if (params) { + params.push(options); + return ''; + } else { + return options; + } + } + }; + + (function () { + var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' '); + + var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; + + for (var i = 0, l = reservedWords.length; i < l; i++) { + compilerWords[reservedWords[i]] = true; + } + })(); + + /** + * @deprecated May be removed in the next major version + */ + JavaScriptCompiler.isValidJavaScriptVariableName = function (name) { + return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); + }; + + function strictLookup(requireTerminal, compiler, parts, i, type) { + var stack = compiler.popStack(), + len = parts.length; + if (requireTerminal) { + len--; + } + + for (; i < len; i++) { + stack = compiler.nameLookup(stack, parts[i], type); + } + + if (requireTerminal) { + return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ', ', JSON.stringify(compiler.source.currentLocation), ' )']; + } else { + return stack; + } + } + + exports['default'] = JavaScriptCompiler; + module.exports = exports['default']; + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + + /* global define, require */ + 'use strict'; + + var _Object$keys = __webpack_require__(60)['default']; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + var SourceNode = undefined; + + try { + /* istanbul ignore next */ + if (false) { + // We don't support this in AMD environments. For these environments, we assume that + // they are running on the browser and thus have no need for the source-map library. + var SourceMap = require('source-map'); + SourceNode = SourceMap.SourceNode; + } + } catch (err) {} + /* NOP */ + + /* istanbul ignore if: tested but not covered in istanbul due to dist build */ + if (!SourceNode) { + SourceNode = function (line, column, srcFile, chunks) { + this.src = ''; + if (chunks) { + this.add(chunks); + } + }; + /* istanbul ignore next */ + SourceNode.prototype = { + add: function add(chunks) { + if (_utils.isArray(chunks)) { + chunks = chunks.join(''); + } + this.src += chunks; + }, + prepend: function prepend(chunks) { + if (_utils.isArray(chunks)) { + chunks = chunks.join(''); + } + this.src = chunks + this.src; + }, + toStringWithSourceMap: function toStringWithSourceMap() { + return { code: this.toString() }; + }, + toString: function toString() { + return this.src; + } + }; + } + + function castChunk(chunk, codeGen, loc) { + if (_utils.isArray(chunk)) { + var ret = []; + + for (var i = 0, len = chunk.length; i < len; i++) { + ret.push(codeGen.wrap(chunk[i], loc)); + } + return ret; + } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { + // Handle primitives that the SourceNode will throw up on + return chunk + ''; + } + return chunk; + } + + function CodeGen(srcFile) { + this.srcFile = srcFile; + this.source = []; + } + + CodeGen.prototype = { + isEmpty: function isEmpty() { + return !this.source.length; + }, + prepend: function prepend(source, loc) { + this.source.unshift(this.wrap(source, loc)); + }, + push: function push(source, loc) { + this.source.push(this.wrap(source, loc)); + }, + + merge: function merge() { + var source = this.empty(); + this.each(function (line) { + source.add([' ', line, '\n']); + }); + return source; + }, + + each: function each(iter) { + for (var i = 0, len = this.source.length; i < len; i++) { + iter(this.source[i]); + } + }, + + empty: function empty() { + var loc = this.currentLocation || { start: {} }; + return new SourceNode(loc.start.line, loc.start.column, this.srcFile); + }, + wrap: function wrap(chunk) { + var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1]; + + if (chunk instanceof SourceNode) { + return chunk; + } + + chunk = castChunk(chunk, this, loc); + + return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); + }, + + functionCall: function functionCall(fn, type, params) { + params = this.generateList(params); + return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); + }, + + quotedString: function quotedString(str) { + return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 + .replace(/\u2029/g, '\\u2029') + '"'; + }, + + objectLiteral: function objectLiteral(obj) { + // istanbul ignore next + + var _this = this; + + var pairs = []; + + _Object$keys(obj).forEach(function (key) { + var value = castChunk(obj[key], _this); + if (value !== 'undefined') { + pairs.push([_this.quotedString(key), ':', value]); + } + }); + + var ret = this.generateList(pairs); + ret.prepend('{'); + ret.add('}'); + return ret; + }, + + generateList: function generateList(entries) { + var ret = this.empty(); + + for (var i = 0, len = entries.length; i < len; i++) { + if (i) { + ret.add(','); + } + + ret.add(castChunk(entries[i], this)); + } + + return ret; + }, + + generateArray: function generateArray(entries) { + var ret = this.generateList(entries); + ret.prepend('['); + ret.add(']'); + + return ret; + } + }; + + exports['default'] = CodeGen; + module.exports = exports['default']; + +/***/ }) +/******/ ]) +}); +; \ No newline at end of file From 039ec3425e31a44cb72cc57e3e41ddee092997d3 Mon Sep 17 00:00:00 2001 From: Martin Nicholson Date: Tue, 19 Sep 2023 09:45:35 +0200 Subject: [PATCH 09/11] feat: add deprecation output in portableelement task --- views/build/grunt/portableelement.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/views/build/grunt/portableelement.js b/views/build/grunt/portableelement.js index 8a75b5bbeb..688d5cf10f 100644 --- a/views/build/grunt/portableelement.js +++ b/views/build/grunt/portableelement.js @@ -39,6 +39,7 @@ module.exports = function (grunt) { searchPattern: '/views/js/picCreator/**/picCreator.json' } ]; + const deprecatedTypes = ['PCI', 'PIC']; grunt.config.merge({ portableelement: { @@ -239,8 +240,14 @@ module.exports = function (grunt) { return Promise.resolve([]); } + let deprecationMsg = ''; + + if (deprecatedTypes.includes(model.type)) { + deprecationMsg = '[DEPRECATED] '; + } + subcompilationPromises.push([ - grunt.log.subhead.bind(null, `${model.type} "${model.id}" found in manifest "${file}" ...`) + grunt.log.subhead.bind(null, `${deprecationMsg}${model.type} "${model.id}" found in manifest "${file}" ...`) ]); model.map.forEach(compilMap => { From 94af2282095667cf073915714b3d0490fc56e844 Mon Sep 17 00:00:00 2001 From: Martin Nicholson Date: Tue, 19 Sep 2023 09:47:02 +0200 Subject: [PATCH 10/11] refactor!: point to handlebars_4 in moduleWriter and tpl --- views/build/moduleWriter.js | 4 ++-- views/js/portableLib/OAT/util/tpl.js | 29 +++++++++++++++------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/views/build/moduleWriter.js b/views/build/moduleWriter.js index 39691f5438..60c6d672f7 100644 --- a/views/build/moduleWriter.js +++ b/views/build/moduleWriter.js @@ -13,7 +13,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (c) 2022 (original work) Open Assessment Technologies SA ; + * Copyright (c) 2022-2023 (original work) Open Assessment Technologies SA ; */ define([], function () { 'use strict'; @@ -34,7 +34,7 @@ define([], function () { return function moduleWriter(moduleName, compiled) { let handlebars = 'handlebars'; if (isPciRuntime(moduleName)) { - handlebars = 'taoQtiItem/portableLib/handlebars'; + handlebars = 'taoQtiItem/portableLib/handlebars_4'; } return `define('tpl!${moduleName}', ['${handlebars}'], function(hb){ return hb.template(${compiled}); });`; }; diff --git a/views/js/portableLib/OAT/util/tpl.js b/views/js/portableLib/OAT/util/tpl.js index d22b4bf800..47812d7dfd 100644 --- a/views/js/portableLib/OAT/util/tpl.js +++ b/views/js/portableLib/OAT/util/tpl.js @@ -16,44 +16,47 @@ * Copyright (c) 2015 (original work) Open Assessment Technologies SA ; * */ -define(['taoQtiItem/portableLib/jquery_2_1_1', 'taoQtiItem/portableLib/handlebars'], function($, handlebars){ - +define([ + 'taoQtiItem/portableLib/jquery_2_1_1', + 'taoQtiItem/portableLib/handlebars_4' +], function($, handlebars){ + 'use strict'; - + /** * Find and compile templates found in the $container - * + * * @param {jQuery} $container * @returns {object} */ function loadTemplates($container){ - + var templates = {}; var $templates = $($container.find('[type="text/x-template-manifest"]').html()); $templates.each(function(){ - + var $template = $(this), id = $template.data('template-id'), tplSource = $template.html(); - + if(id && tplSource){ templates[id] = handlebars.compile(tplSource); - } + } }); - + return templates; } - + /** * Create a template manager object from a JQuery container - * + * * @param {JQuery} $container * @returns {Object} */ return function tpl($container){ - + var templates = loadTemplates($container); - + return { exists : function exists(templateId){ return (templateId && templates[templateId]); From a1ac13b672f19d010fa1a61be95dc3745a16c111 Mon Sep 17 00:00:00 2001 From: Martin Nicholson Date: Tue, 19 Sep 2023 09:49:20 +0200 Subject: [PATCH 11/11] chore!: regenerate bundles --- views/js/loader/qtiLoader.min.js | 2 +- views/js/loader/qtiLoader.min.js.map | 2 +- views/js/loader/taoQtiItem.min.js | 2 +- views/js/loader/taoQtiItem.min.js.map | 2 +- views/js/loader/taoQtiItemRunner.es5.min.js | 2 +- views/js/loader/taoQtiItemRunner.es5.min.js.map | 2 +- views/js/loader/taoQtiItemRunner.min.js | 2 +- views/js/loader/taoQtiItemRunner.min.js.map | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/views/js/loader/qtiLoader.min.js b/views/js/loader/qtiLoader.min.js index b7be969432..eeeee50699 100644 --- a/views/js/loader/qtiLoader.min.js +++ b/views/js/loader/qtiLoader.min.js @@ -1,2 +1,2 @@ -(function(){"use strict";var loaderScript=document.getElementById("amd-loader"),configUrl=loaderScript.getAttribute("data-config"),bundle=loaderScript.getAttribute("data-bundle"),loadController=function loadController(){var controllerOptions={},controllerPath=loaderScript.getAttribute("data-controller"),params=loaderScript.getAttribute("data-params");try{controllerOptions=JSON.parse(params)}catch(err){controllerOptions={}}window.require([controllerPath],function(controller){var startController=function startController(){window.started||(window.started=!0,controller.start(controllerOptions))};document.addEventListener("readystatechange",startController,!1),"complete"===document.readyState&&startController()})};window.require([configUrl],function(){window.loadBundles||(window.loaded={},window.loadBundles=function loadBundles(bundles){bundles=bundles||[],bundles=bundles.concat(window.bundles),bundles=bundles.filter(function(item,index){return item&&bundles.indexOf(item)===index&&!0!==window.loaded[item]}),require(bundles,function(){bundles.forEach(function(item){window.loaded[item]=!0}),loadController()})}),bundle||window.bundles&&window.bundles.length?window.loadBundles([bundle]):loadController()})})(),define("loader/bootstrap",function(){}),define("taoQtiItem/qtiItem/core/qtiClasses",[],function(){"use strict";var qtiClasses={_container:"taoQtiItem/qtiItem/core/Container",assessmentItem:"taoQtiItem/qtiItem/core/Item",responseProcessing:"taoQtiItem/qtiItem/core/ResponseProcessing",_simpleFeedbackRule:"taoQtiItem/qtiItem/core/response/SimpleFeedbackRule",stylesheet:"taoQtiItem/qtiItem/core/Stylesheet",math:"taoQtiItem/qtiItem/core/Math",figure:"taoQtiItem/qtiItem/core/Figure",img:"taoQtiItem/qtiItem/core/Img",figcaption:"taoQtiItem/qtiItem/core/Figcaption",object:"taoQtiItem/qtiItem/core/Object",outcomeDeclaration:"taoQtiItem/qtiItem/core/variables/OutcomeDeclaration",responseDeclaration:"taoQtiItem/qtiItem/core/variables/ResponseDeclaration",rubricBlock:"taoQtiItem/qtiItem/core/RubricBlock",associableHotspot:"taoQtiItem/qtiItem/core/choices/AssociableHotspot",gap:"taoQtiItem/qtiItem/core/choices/Gap",gapImg:"taoQtiItem/qtiItem/core/choices/GapImg",gapText:"taoQtiItem/qtiItem/core/choices/GapText",hotspotChoice:"taoQtiItem/qtiItem/core/choices/HotspotChoice",hottext:"taoQtiItem/qtiItem/core/choices/Hottext",inlineChoice:"taoQtiItem/qtiItem/core/choices/InlineChoice",simpleAssociableChoice:"taoQtiItem/qtiItem/core/choices/SimpleAssociableChoice",simpleChoice:"taoQtiItem/qtiItem/core/choices/SimpleChoice",associateInteraction:"taoQtiItem/qtiItem/core/interactions/AssociateInteraction",choiceInteraction:"taoQtiItem/qtiItem/core/interactions/ChoiceInteraction",endAttemptInteraction:"taoQtiItem/qtiItem/core/interactions/EndAttemptInteraction",extendedTextInteraction:"taoQtiItem/qtiItem/core/interactions/ExtendedTextInteraction",gapMatchInteraction:"taoQtiItem/qtiItem/core/interactions/GapMatchInteraction",graphicAssociateInteraction:"taoQtiItem/qtiItem/core/interactions/GraphicAssociateInteraction",graphicGapMatchInteraction:"taoQtiItem/qtiItem/core/interactions/GraphicGapMatchInteraction",graphicOrderInteraction:"taoQtiItem/qtiItem/core/interactions/GraphicOrderInteraction",hotspotInteraction:"taoQtiItem/qtiItem/core/interactions/HotspotInteraction",hottextInteraction:"taoQtiItem/qtiItem/core/interactions/HottextInteraction",inlineChoiceInteraction:"taoQtiItem/qtiItem/core/interactions/InlineChoiceInteraction",matchInteraction:"taoQtiItem/qtiItem/core/interactions/MatchInteraction",mediaInteraction:"taoQtiItem/qtiItem/core/interactions/MediaInteraction",orderInteraction:"taoQtiItem/qtiItem/core/interactions/OrderInteraction",prompt:"taoQtiItem/qtiItem/core/interactions/Prompt",selectPointInteraction:"taoQtiItem/qtiItem/core/interactions/SelectPointInteraction",sliderInteraction:"taoQtiItem/qtiItem/core/interactions/SliderInteraction",textEntryInteraction:"taoQtiItem/qtiItem/core/interactions/TextEntryInteraction",uploadInteraction:"taoQtiItem/qtiItem/core/interactions/UploadInteraction",feedbackBlock:"taoQtiItem/qtiItem/core/feedbacks/FeedbackBlock",feedbackInline:"taoQtiItem/qtiItem/core/feedbacks/FeedbackInline",modalFeedback:"taoQtiItem/qtiItem/core/feedbacks/ModalFeedback",customInteraction:"taoQtiItem/qtiItem/core/interactions/CustomInteraction",infoControl:"taoQtiItem/qtiItem/core/PortableInfoControl",include:"taoQtiItem/qtiItem/core/Include",table:"taoQtiItem/qtiItem/core/Table",printedVariable:"taoQtiItem/qtiItem/core/PrintedVariable",_tooltip:"taoQtiItem/qtiItem/core/Tooltip"};return qtiClasses}),define("taoQtiItem/qtiItem/helper/util",["lodash"],function(_){"use strict";_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_;var util={buildSerial:function buildSerial(prefix){for(var id=prefix||"",chars="abcdefghijklmnopqrstuvwxyz0123456789",i=0;22>i;i++)id+=chars.charAt(Math.floor(Math.random()*chars.length));return id},buildId:function buildId(item,prefix){var id,usedIds,i=1,suffix="",exists=!1;if(!item)throw new TypeError("A item is required to generate a unique identifier");usedIds=item.getUsedIds();do exists=!1,id=prefix+suffix,_.contains(usedIds,id)&&(exists=!0,suffix="_"+i,i++);while(exists);return id},buildIdentifier:function buildIdentifier(item,prefix,useSuffix){var id,usedIds,suffix="",i=1,exists=!1;if(!item)throw new TypeError("A item is required to generate a unique identifier");if(!prefix)throw new TypeError("Prefix is required to build an identifier");usedIds=item.getUsedIdentifiers(),useSuffix=!!_.isUndefined(useSuffix)||useSuffix,prefix&&(prefix=prefix.replace(/_[0-9]+$/gi,"_").replace(/[^a-zA-Z0-9_]/gi,"_").replace(/(_)+/gi,"_"),useSuffix&&(suffix="_"+i));do exists=!1,id=prefix+suffix,usedIds[id]&&(exists=!0,suffix="_"+i,i++);while(exists);return id},findInCollection:function findInCollection(element,collectionNames,searchedSerial){var found=null;if(_.isString(collectionNames)&&(collectionNames=[collectionNames]),_.isArray(collectionNames))_.each(collectionNames,function(collectionName){var collection=element;_.each(collectionName.split("."),function(nameToken){collection=collection[nameToken]});var elt=collection[searchedSerial];return elt?(found={parent:element,element:elt},!1):(_.each(collection,function(elt){if(_.isFunction(elt.find)&&(found=elt.find(searchedSerial),found))return!1}),!found)&&void 0});else throw new Error("invalid argument : collectionNames must be an array or a string");return found},addMarkupNamespace:function addMarkupNamespace(markup,ns){return ns?(markup=markup.replace(/<(\/)?([a-z:]+)(\s?)([^><]*)>/g,function($0,$1,$2,$3,$4){return 0<$2.indexOf(":")?$0:($1=$1||"",$3=$3||"","<"+$1+ns+":"+$2+$3+$4+">")}),markup):markup},removeMarkupNamespaces:function removeMarkupNamespace(markup){return markup.replace(/<(\/)?(\w*):([^>]*)>/g,"<$1$3>")},getMarkupUsedNamespaces:function getMarkupUsedNamespaces(markup){var namespaces=[];return markup.replace(/<(\/)?(\w*):([^>]*)>/g,function(original,slash,ns,node){return namespaces.push(ns),"<"+slash+node+">"}),_.uniq(namespaces)}};return util}),define("taoQtiItem/qtiItem/helper/rendererConfig",["lodash","jquery"],function(_,$){"use strict";_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,$=$&&Object.prototype.hasOwnProperty.call($,"default")?$["default"]:$;var rendererConfigHelper={getOptionsFromArguments:function(args){var options={data:{},placeholder:null,subclass:"",renderer:null};return _.each(args,function(arg){arg&&(arg.isRenderer?options.renderer=arg:arg instanceof $&&arg.length?options.placeholder=arg:_.isString(arg)?options.subclass=arg:_.isPlainObject(arg)?options.data=arg:console.log("invalid arg",arg,args))}),options}};return rendererConfigHelper}),define("taoQtiItem/qtiItem/core/Element",["jquery","lodash","class","core/logger","taoQtiItem/qtiItem/helper/util","taoQtiItem/qtiItem/helper/rendererConfig"],function($,_,_class,loggerFactory,util,rendererConfig){"use strict";$=$&&Object.prototype.hasOwnProperty.call($,"default")?$["default"]:$,_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,loggerFactory=loggerFactory&&Object.prototype.hasOwnProperty.call(loggerFactory,"default")?loggerFactory["default"]:loggerFactory,util=util&&Object.prototype.hasOwnProperty.call(util,"default")?util["default"]:util,rendererConfig=rendererConfig&&Object.prototype.hasOwnProperty.call(rendererConfig,"default")?rendererConfig["default"]:rendererConfig;var _instances={},logger=loggerFactory("taoQtiItem/qtiItem/core/Element"),Element=Class.extend({qtiClass:"",serial:"",rootElement:null,init:function(serial,attributes){if(this.attributes={},this.metaData={},"object"==typeof serial&&(attributes=serial,serial=""),serial||(serial=util.buildSerial(this.qtiClass+"_")),serial&&("string"!=typeof serial||!serial.match(/^[a-z_0-9]*$/i)))throw"invalid QTI serial : ("+typeof serial+") "+serial;if(!_instances[serial])_instances[serial]=this,this.serial=serial,this.setAttributes(attributes||{});else throw"a QTI Element with the same serial already exists "+serial;"function"==typeof this.initContainer&&this.initContainer(arguments[2]||""),"function"==typeof this.initObject&&this.initObject()},is:function(qtiClass){return qtiClass===this.qtiClass},placeholder:function(){return"{{"+this.serial+"}}"},getSerial:function(){return this.serial},getUsedIdentifiers:function(){var usedIds={},elts=this.getComposingElements();for(var i in elts){var elt=elts[i],id=elt.attr("identifier");id&&(usedIds[id]=elt)}return usedIds},getUsedIds:function getUsedIds(){var usedIds=[];return _.forEach(this.getComposingElements(),function(elt){var id=elt.attr("id");id&&!_.contains(usedIds,id)&&usedIds.push(id)}),usedIds},attr:function(name,value){if(name)if(void 0!==value)this.attributes[name]=value;else if("object"==typeof name)for(var prop in name)this.attr(prop,name[prop]);else if("string"==typeof name)return void 0===this.attributes[name]?void 0:this.attributes[name];return this},data:function(name,value){if(name)if(void 0!==value)this.metaData[name]=value,$(document).trigger("metaChange.qti-widget",{element:this,key:name,value:value});else if("object"==typeof name)for(var prop in name)this.data(prop,name[prop]);else if("string"==typeof name)return void 0===this.metaData[name]?void 0:this.metaData[name];return this},removeData:function(name){return delete this.metaData[name],this},removeAttr:function(name){return this.removeAttributes(name)},setAttributes:function(attributes){return _.isPlainObject(attributes)||logger.warn("attributes should be a plain object"),this.attributes=attributes,this},getAttributes:function(){return _.clone(this.attributes)},removeAttributes:function(attrNames){for(var i in"string"==typeof attrNames&&(attrNames=[attrNames]),attrNames)delete this.attributes[attrNames[i]];return this},getComposingElements:function(){function append(element){elts[element.getSerial()]=element,elts=_.extend(elts,element.getComposingElements())}var elts={};return"function"==typeof this.initContainer&&append(this.getBody()),"function"==typeof this.initObject&&append(this.getObject()),_.each(this.metaData,function(v){Element.isA(v,"_container")?append(v):_.isArray(v)&&_.each(v,function(v){Element.isA(v,"_container")&&append(v)})}),elts},getUsedClasses:function(){var ret=[this.qtiClass],composingElts=this.getComposingElements();return _.each(composingElts,function(elt){ret.push(elt.qtiClass)}),_.uniq(ret)},find:function(serial){var object,body,found=null;return"function"==typeof this.initObject&&(object=this.getObject(),object.serial===serial&&(found={parent:this,element:object,location:"object"})),found||"function"!=typeof this.initContainer||(body=this.getBody(),found=body.serial===serial?{parent:this,element:body,location:"body"}:this.getBody().find(serial,this)),found},parent:function(){var item=this.getRootElement();if(item){var found=item.find(this.getSerial());if(found)return found.parent}return null},setRelatedItem:function(item){logger.warn("Deprecated use of setRelatedItem()"),this.setRootElement(item)},setRootElement:function(item){var composingElts,i;if(Element.isA(item,"assessmentItem"))for(i in this.rootElement=item,composingElts=this.getComposingElements(),composingElts)composingElts[i].setRootElement(item)},getRelatedItem:function(){return logger.warn("Deprecated use of getRelatedItem()"),this.getRootElement()},getRootElement:function(){var ret=null;return Element.isA(this.rootElement,"assessmentItem")&&(ret=this.rootElement),ret},setRenderer:function(renderer){if(renderer&&renderer.isRenderer){this.renderer=renderer;var elts=this.getComposingElements();for(var serial in elts)elts[serial].setRenderer(renderer)}else throw"invalid qti rendering engine"},getRenderer:function(){return this.renderer},render:function render(){var rendering,args=rendererConfig.getOptionsFromArguments(arguments),_renderer=args.renderer||this.getRenderer(),tplData={},defaultData={tag:this.qtiClass,serial:this.serial,attributes:this.getAttributes()};if(!_renderer)throw new Error("render: no renderer found for the element "+this.qtiClass+":"+this.serial);return"function"==typeof this.initContainer&&(defaultData.body=this.getBody().render(args.renderer)),"function"==typeof this.initObject&&(defaultData.object={attributes:this.object.getAttributes()},defaultData.object.attributes.data=_renderer.resolveUrl(this.object.attr("data"))),tplData=_.merge(defaultData,args.data||{}),tplData=_renderer.getData(this,tplData,args.subclass),rendering=_renderer.renderTpl(this,tplData,args.subclass),args.placeholder&&args.placeholder.replaceWith(rendering),rendering},postRender:function(data,altClassName,renderer){var postRenderers=[],_renderer=renderer||this.getRenderer();if("function"==typeof this.initContainer&&(postRenderers=this.getBody().postRender(data,"",renderer)),_renderer)postRenderers.push(_renderer.postRender(this,data,altClassName));else throw"postRender: no renderer found for the element "+this.qtiClass+":"+this.serial;return _.compact(postRenderers)},getContainer:function($scope,subclass){var renderer=this.getRenderer();if(renderer)return renderer.getContainer(this,$scope,subclass);throw"getContainer: no renderer found for the element "+this.qtiClass+":"+this.serial},toArray:function(){var arr={serial:this.serial,type:this.qtiClass,attributes:this.getAttributes()};return"function"==typeof this.initContainer&&(arr.body=this.getBody().toArray()),"function"==typeof this.initObject&&(arr.object=this.object.toArray()),arr},isEmpty:function(){return!1},addClass:function(className){var clazz=this.attr("class")||"";_containClass(clazz,className)||this.attr("class",clazz+(clazz.length?" ":"")+className)},hasClass:function(className){return _containClass(this.attr("class"),className)},removeClass:function(className){var clazz=this.attr("class")||"";if(clazz){var regex=new RegExp("(?:^|\\s)"+className+"(?:\\s|$)");clazz=clazz.replace(regex," ").trim(),clazz?this.attr("class",clazz):this.removeAttr("class")}},toggleClass:function(className,state){return"boolean"==typeof state?state?this.addClass(className):this.removeClass(className):this.hasClass(className)?this.removeClass(className):this.addClass(className)},isset:function(){return Element.issetElement(this.serial)},unset:function(){return Element.unsetElement(this.serial)}}),_containClass=function(allClassStr,className){var regex=new RegExp("(?:^|\\s)"+className+"(?:\\s|$)","");return allClassStr&®ex.test(allClassStr)};return Element.isA=function(qtiElement,qtiClass){return qtiElement instanceof Element&&qtiElement.is(qtiClass)},Element.getElementBySerial=function(serial){return _instances[serial]},Element.issetElement=function(serial){return!!_instances[serial]},Element.unsetElement=function(serial){var element=Element.getElementBySerial(serial);if(element){var composingElements=element.getComposingElements();return _.each(composingElements,function(elt){delete _instances[elt.serial]}),delete _instances[element.serial],!0}return!1},Element}),define("taoQtiItem/qtiItem/helper/xmlNsHandler",[],function(){"use strict";function getPrefix(namespaces,html5Ns){let key;for(key in namespaces)if(namespaces[key]===html5Ns)return key;return"qh5"}const prefixed="article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section";var xmlNsHandler={stripNs:function stripNs(body){const pattern="([\\w]+)\\:(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section)",openRegEx=/(<([\w]+)\:(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section))/gi,closeRegEx=/(<\/([\w]+)\:(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section)>)/gi;return body.replace(openRegEx,"<$3").replace(closeRegEx,"")},restoreNs:function restoreNs(xml,namespaces){let ignoreMarkup=!!(2)+)/gim,""));const xmlRe=/(<(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section)[^>]*>|<\/(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section)>)/gi,tagRe=/((<)(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section)([^>]*)(>)|(<\/)(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section)(>))/i,xmlMatch=xmlCopy.match(xmlRe),imsXsd="http://www.imsglobal.org/xsd",html5Ns=imsXsd+"/imsqtiv2p2_html5_v1p0",prefix=getPrefix(namespaces,html5Ns),prefixAtt="xmlns:"+prefix+"=\""+html5Ns+"\"";let i=xmlMatch?xmlMatch.length:0;if(!xmlMatch)return xml;for(;i--;){const tagMatch=xmlMatch[i].match(tagRe);xml=xml.replace(xmlMatch[i],tagMatch[5]?"<"+prefix+":"+tagMatch[3]+tagMatch[4]+">":"")}return xmlMatch.length&&-1===xml.indexOf(prefixAtt)&&(xml=xml.replace("({qtiClass:"responseCondition",responseIf:{qtiClass:"responseIf",expression:{qtiClass:"match",expressions:[{qtiClass:"variable",attributes:{identifier:responseIdentifier}},{qtiClass:"correct",attributes:{identifier:responseIdentifier}}]},responseRules:[{qtiClass:"setOutcomeValue",attributes:{identifier:outcomeIdentifier},expression:{qtiClass:"sum",expressions:[{qtiClass:"variable",attributes:{identifier:outcomeIdentifier}},{qtiClass:"baseValue",attributes:{baseType:"integer"},value:"1"}]}}]}}),MAP_RESPONSE:(responseIdentifier,outcomeIdentifier)=>({qtiClass:"responseCondition",responseIf:{qtiClass:"responseIf",expression:{qtiClass:"not",expressions:[{qtiClass:"isNull",expressions:[{qtiClass:"variable",attributes:{identifier:responseIdentifier}}]}]},responseRules:[{qtiClass:"setOutcomeValue",attributes:{identifier:outcomeIdentifier},expression:{qtiClass:"sum",expressions:[{qtiClass:"variable",attributes:{identifier:outcomeIdentifier}},{qtiClass:"mapResponse",attributes:{identifier:responseIdentifier}}]}}]}}),MAP_RESPONSE_POINT:(responseIdentifier,outcomeIdentifier)=>({qtiClass:"responseCondition",responseIf:{qtiClass:"responseIf",expression:{qtiClass:"not",expressions:[{qtiClass:"isNull",expressions:[{qtiClass:"variable",attributes:{identifier:responseIdentifier}}]}]},responseRules:[{qtiClass:"setOutcomeValue",attributes:{identifier:outcomeIdentifier},expression:{qtiClass:"sum",expressions:[{qtiClass:"variable",attributes:{identifier:outcomeIdentifier}},{qtiClass:"mapResponsePoint",attributes:{identifier:responseIdentifier}}]}}]}})};return responseRules}),define("taoQtiItem/qtiItem/helper/response",["lodash","taoQtiItem/qtiItem/helper/responseRules"],function(_,responseRulesHelper){"use strict";_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,responseRulesHelper=responseRulesHelper&&Object.prototype.hasOwnProperty.call(responseRulesHelper,"default")?responseRulesHelper["default"]:responseRulesHelper;const _templateNames={MATCH_CORRECT:"http://www.imsglobal.org/question/qti_v2p1/rptemplates/match_correct",MAP_RESPONSE:"http://www.imsglobal.org/question/qti_v2p1/rptemplates/map_response",MAP_RESPONSE_POINT:"http://www.imsglobal.org/question/qti_v2p1/rptemplates/map_response_point",NONE:"no_response_processing"};var response={isUsingTemplate(response,tpl){return!!(_.isString(tpl)&&(tpl===response.template||_templateNames[tpl]===response.template))},isValidTemplateName(tplName){return!!this.getTemplateUriFromName(tplName)},getTemplateUriFromName(tplName){return _templateNames[tplName]||""},getTemplateNameFromUri(tplUri){let tplName="";return _.forIn(_templateNames,(uri,name)=>{if(uri===tplUri)return tplName=name,!1}),tplName},getTemplateNameFromResponseRules(responseIdentifier,responseRules){if(!responseRules)return"NONE";const{responseIf:{responseRules:[outcomeRules={}]=[]}={}}=responseRules,{attributes:{identifier:outcomeIdentifier}={}}=outcomeRules;return outcomeIdentifier?Object.keys(responseRulesHelper).find(key=>_.isEqual(responseRules,responseRulesHelper[key](responseIdentifier,outcomeIdentifier))):""}};return response}),define("taoQtiItem/qtiItem/helper/itemScore",[],function(){"use strict";var itemScore=responseIdentifiers=>{const outcomeExpressions=responseIdentifiers.map(outcomeIdentifier=>({qtiClass:"variable",attributes:{identifier:`SCORE_${outcomeIdentifier}`}}));return{qtiClass:"setOutcomeValue",attributes:{identifier:"SCORE"},expression:{qtiClass:"sum",expressions:outcomeExpressions}}};return itemScore}),define("taoQtiItem/qtiItem/core/Loader",["lodash","class","taoQtiItem/qtiItem/core/qtiClasses","taoQtiItem/qtiItem/core/Element","taoQtiItem/qtiItem/helper/xmlNsHandler","core/moduleLoader","taoQtiItem/qtiItem/helper/response","taoQtiItem/qtiItem/helper/itemScore"],function(_,_class,qtiClasses,Element,xmlNsHandler,moduleLoader,responseHelper,itemScoreHelper){"use strict";_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,qtiClasses=qtiClasses&&Object.prototype.hasOwnProperty.call(qtiClasses,"default")?qtiClasses["default"]:qtiClasses,Element=Element&&Object.prototype.hasOwnProperty.call(Element,"default")?Element["default"]:Element,xmlNsHandler=xmlNsHandler&&Object.prototype.hasOwnProperty.call(xmlNsHandler,"default")?xmlNsHandler["default"]:xmlNsHandler,moduleLoader=moduleLoader&&Object.prototype.hasOwnProperty.call(moduleLoader,"default")?moduleLoader["default"]:moduleLoader,responseHelper=responseHelper&&Object.prototype.hasOwnProperty.call(responseHelper,"default")?responseHelper["default"]:responseHelper,itemScoreHelper=itemScoreHelper&&Object.prototype.hasOwnProperty.call(itemScoreHelper,"default")?itemScoreHelper["default"]:itemScoreHelper;const loadPortableCustomElementProperties=(portableElement,rawProperties)=>{var properties={};_.forOwn(rawProperties,(value,key)=>{try{properties[key]=JSON.parse(value)}catch(e){properties[key]=value}}),portableElement.properties=properties},loadPortableCustomElementData=(portableElement,data)=>{portableElement.typeIdentifier=data.typeIdentifier,portableElement.markup=data.markup,portableElement.entryPoint=data.entryPoint,portableElement.libraries=data.libraries,portableElement.setNamespace("",data.xmlns),loadPortableCustomElementProperties(portableElement,data.properties)};var Loader=Class.extend({init(item,classesLocation){this.qti={},this.classesLocation={},this.item=item||null,this.setClassesLocation(classesLocation||qtiClasses)},setClassesLocation(qtiClassesList){return _.extend(this.classesLocation,qtiClassesList),this},getRequiredClasses(data){let ret=[];for(let i in data)"qtiClass"==i&&"_container"!==data[i]&&"rootElement"!==i?ret.push(data[i]):"object"==typeof data[i]&&"responseRules"!==i&&(ret=_.union(ret,this.getRequiredClasses(data[i])));return ret},loadRequiredClasses(data,callback,reload){let requiredClass;const requiredClasses=this.getRequiredClasses(data,reload),required=[];for(let i in requiredClasses)if(requiredClass=requiredClasses[i],this.classesLocation[requiredClass])required.push({module:this.classesLocation[requiredClass],category:"qti"});else throw new Error(`missing qti class location declaration : ${requiredClass}`);moduleLoader([],()=>!0).addList(required).load().then(loadeded=>{loadeded.forEach(QtiClass=>{this.qti[QtiClass.prototype.qtiClass]=QtiClass}),callback.call(this,this.qti)})},getLoadedClasses(){return _.keys(this.qti)},loadItemData(data,callback){this.loadRequiredClasses(data,Qti=>{if("object"==typeof data&&"assessmentItem"===data.qtiClass){for(let i in data.serial&&Element.unsetElement(data.serial),this.item=new Qti.assessmentItem(data.serial,data.attributes||{}),this.loadContainer(this.item.getBody(),data.body),data.outcomes){const outcome=this.buildOutcome(data.outcomes[i]);outcome&&this.item.addOutcomeDeclaration(outcome)}for(let i in data.feedbacks){const feedback=this.buildElement(data.feedbacks[i]);feedback&&this.item.addModalFeedback(feedback)}for(let i in data.stylesheets){const stylesheet=this.buildElement(data.stylesheets[i]);stylesheet&&this.item.addStylesheet(stylesheet)}let responseRules=data.responseProcessing&&data.responseProcessing.responseRules?[...data.responseProcessing.responseRules]:[];for(let i in data.responses){const responseIdentifier=data.responses[i].identifier,responseRuleItemIndex=responseRules.findIndex(_ref=>{let{responseIf:{expression:{expressions:[expression={}]=[]}={}}={}}=_ref;return expression.attributes&&expression.attributes.identifier===responseIdentifier||expression.expressions&&expression.expressions[0]&&expression.expressions[0].attributes&&expression.expressions[0].attributes.identifier===responseIdentifier}),[responseRule]=-1===responseRuleItemIndex?[]:responseRules.splice(responseRuleItemIndex,1),response=this.buildResponse(data.responses[i],responseRule);if(response){this.item.addResponseDeclaration(response);const feedbackRules=data.responses[i].feedbackRules;feedbackRules&&_.forIn(feedbackRules,(fbData,serial)=>{const{attributes:{identifier:feedbackOutcomeIdentifier}={}}=data.outcomes[fbData.feedbackOutcome]||{};response.feedbackRules[serial]=this.buildSimpleFeedbackRule(fbData,response);const feedbackResponseRuleIndex=responseRules.findIndex(_ref2=>{let{responseIf:{responseRules:[setOutcomeResponseRule={}]=[]}={}}=_ref2;const{attributes={},qtiClass}=setOutcomeResponseRule,outcomeIdentifier=attributes.identifier;return feedbackOutcomeIdentifier===outcomeIdentifier&&"setOutcomeValue"===qtiClass});-1!==feedbackResponseRuleIndex&&responseRules.splice(feedbackResponseRuleIndex,1)})}}const responseIdentifiers=Object.keys(this.item.responses||{}).map(responseKey=>this.item.responses[responseKey].attributes.identifier);if(data.responseProcessing){const customResponseProcessing=0!this.item.responses[responseKey].template);this.item.setResponseProcessing(this.buildResponseProcessing(data.responseProcessing,customResponseProcessing))}this.item.setNamespaces(data.namespaces),this.item.setSchemaLocations(data.schemaLocations),this.item.setApipAccessibility(data.apipAccessibility)}"function"==typeof callback&&callback.call(this,this.item)})},loadAndBuildElement(data,callback){this.loadRequiredClasses(data,()=>{const element=this.buildElement(data);"function"==typeof callback&&callback.call(this,element)})},loadElement(element,data,callback){this.loadRequiredClasses(data,()=>{this.loadElementData(element,data),"function"==typeof callback&&callback.call(this,element)})},loadElements(data,callback){if(!this.item)throw new Error("QtiLoader : cannot load elements in empty item");this.loadRequiredClasses(data,()=>{const allElements=this.item.getComposingElements();for(let i in data){const elementData=data[i];elementData&&elementData.qtiClass&&elementData.serial&&allElements[elementData.serial]&&this.loadElementData(allElements[elementData.serial],elementData)}"function"==typeof callback&&callback.call(this,this.item)})},buildResponse(data,responseRule){const response=this.buildElement(data);return response.template=responseHelper.getTemplateUriFromName(responseHelper.getTemplateNameFromResponseRules(data.identifier,responseRule))||data.howMatch||null,response.defaultValue=data.defaultValue||null,response.correctResponse=data.correctResponses||null,response.mapEntries=_.size(data.mapping)?data.mapping:_.size(data.areaMapping)?data.areaMapping:{},response.mappingAttributes=data.mappingAttributes||{},response},buildSimpleFeedbackRule(data,response){const feedbackRule=this.buildElement(data);feedbackRule.setCondition(response,data.condition,data.comparedValue||null),feedbackRule.feedbackOutcome=this.item.outcomes[data.feedbackOutcome]||null,feedbackRule.feedbackThen=this.item.modalFeedbacks[data.feedbackThen]||null,feedbackRule.feedbackElse=this.item.modalFeedbacks[data.feedbackElse]||null;const comparedOutcome=feedbackRule.comparedOutcome;return feedbackRule.feedbackThen&&feedbackRule.feedbackThen.data("relatedResponse",comparedOutcome),feedbackRule.feedbackElse&&feedbackRule.feedbackElse.data("relatedResponse",comparedOutcome),feedbackRule},buildOutcome(data){const outcome=this.buildElement(data);return outcome.defaultValue=data.defaultValue||null,outcome},buildResponseProcessing(data,customResponseProcessing){const rp=this.buildElement(data);return customResponseProcessing?(rp.xml=data.data,rp.processingType="custom"):rp.processingType="templateDriven",rp},loadContainer(bodyObject,bodyData){if(!Element.isA(bodyObject,"_container"))throw new Error("bodyObject must be a QTI Container");if(!(bodyData&&"string"==typeof bodyData.body&&"object"==typeof bodyData.elements))throw new Error("wrong bodydata format");const attributes=_.defaults(bodyData.attributes||{},bodyObject.attributes||{});for(let serial in bodyObject.setAttributes(attributes),bodyData.elements){const eltData=bodyData.elements[serial],element=this.buildElement(eltData);element&&bodyObject.setElement(element,bodyData.body)}bodyObject.body(xmlNsHandler.stripNs(bodyData.body))},buildElement(elementData){if(!(elementData&&elementData.qtiClass&&elementData.serial))throw new Error("wrong elementData format");const className=elementData.qtiClass;if(!this.qti[className])throw new Error(`the qti element class does not exist: ${className}`);const elt=new this.qti[className](elementData.serial);return this.loadElementData(elt,elementData),elt},loadElementData(element,data){const attributes=_.defaults(data.attributes||{},element.attributes||{});element.setAttributes(attributes);let body=data.body;return!body&&data.text&&"inlineChoice"===data.qtiClass&&(body={body:data.text,elements:{}}),element.body&&body&&element.bdy&&this.loadContainer(element.getBody(),body),element.object&&data.object&&element.object&&this.loadObjectData(element.object,data.object),Element.isA(element,"interaction")?this.loadInteractionData(element,data):Element.isA(element,"choice")?this.loadChoiceData(element,data):Element.isA(element,"math")?this.loadMathData(element,data):Element.isA(element,"infoControl")?this.loadPicData(element,data):Element.isA(element,"_tooltip")&&this.loadTooltipData(element,data),element},loadInteractionData(interaction,data){Element.isA(interaction,"blockInteraction")&&data.prompt&&this.loadContainer(interaction.prompt.getBody(),data.prompt),this.buildInteractionChoices(interaction,data),Element.isA(interaction,"customInteraction")&&this.loadPciData(interaction,data)},buildInteractionChoices(interaction,data){if(data.choices){if(Element.isA(interaction,"matchInteraction"))for(let set=0;2>set;set++){if(!data.choices[set])throw new Error(`missing match set #${set}`);const matchSet=data.choices[set];for(let serial in matchSet){const choice=this.buildElement(matchSet[serial]);choice&&interaction.addChoice(choice,set)}}else for(let serial in data.choices){const choice=this.buildElement(data.choices[serial]);choice&&interaction.addChoice(choice)}if(Element.isA(interaction,"graphicGapMatchInteraction")&&data.gapImgs)for(let serial in data.gapImgs){const gapImg=this.buildElement(data.gapImgs[serial]);gapImg&&interaction.addGapImg(gapImg)}}},loadChoiceData(choice,data){if(Element.isA(choice,"textVariableChoice"))choice.val(data.text);else if(Element.isA(choice,"gapImg"));else if(Element.isA(choice,"gapText"))choice.body()||choice.body(data.text);else if(Element.isA(choice,"containerChoice"));},loadObjectData(object,data){object.setAttributes(data.attributes),data._alt&&("object"===data._alt.qtiClass?object._alt=Loader.buildElement(data._alt):object._alt=data._alt)},loadMathData(math,data){math.ns=data.ns||{},math.setMathML(data.mathML||""),_.forIn(data.annotations||{},(value,encoding)=>{math.setAnnotation(encoding,value)})},loadTooltipData(tooltip,data){tooltip.content(data.content)},loadPciData(pci,data){loadPortableCustomElementData(pci,data)},loadPicData(pic,data){loadPortableCustomElementData(pic,data)}});return Loader}),define("taoQtiItem/qtiItem/helper/pci",["lodash"],function(_){"use strict";_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_;var pci={getRawValues:function(pciVar){if(_.isPlainObject(pciVar)){if(pciVar.base!==void 0)return _.values(pciVar.base);if(pciVar.list)return _.values(pciVar.list)}throw"unsupported type "}};return pci}),define("taoQtiItem/qtiItem/helper/container",["lodash","jquery"],function(_,$){"use strict";function _checkContainerType(element){if(_.isFunction(element.initContainer)&&_.isFunction(element.body))return!0;throw"the element is not of a container type"}function _getBodyDom(element){if(_checkContainerType(element))return $("
").html(element.body()).find(".x-tao-wrapper")}function _setBodyDomClass(element,newClass,oldClass){if(_checkContainerType(element)&&(oldClass||newClass)){var $wrapper=$("
").html(element.body());_setDomClass($wrapper,newClass,oldClass),element.body($wrapper.html())}}function _setDomClass($wrapper,newClass,oldClass){var $bodyDom=$wrapper.find(".x-tao-wrapper");$bodyDom.length||($wrapper.wrapInner("
"),$bodyDom=$wrapper.find(".x-tao-wrapper")),oldClass&&$bodyDom.removeClass(oldClass),newClass&&$bodyDom.addClass(newClass)}function setEncodedDataToDom($wrapper,dataName,newValue,oldValue){_setDomClass($wrapper,_getEncodedDataString(dataName,newValue),_getEncodedDataString(dataName,oldValue))}function _getEncodedDataString(dataName,value){return dataName&&value?"x-tao-"+dataName+"-"+value:""}function setEncodedData(element,dataName,newValue){var oldValue=getEncodedData(element,dataName);return _setBodyDomClass(element,_getEncodedDataString(dataName,newValue),_getEncodedDataString(dataName,oldValue))}function removeEncodedData(element,dataName){var oldValue=getEncodedData(element,dataName);dataName&&oldValue&&_setBodyDomClass(element,"",_getEncodedDataString(dataName,oldValue))}function hasEncodedData(element,dataName,value){var $body=_getBodyDom(element);return!!($body&&$body.length&&dataName&&value)&&$body.hasClass(_getEncodedDataString(dataName,value))}function getEncodedData(element,dataName){var regex,matches,$body=_getBodyDom(element);if(dataName&&$body&&$body.length&&$body.attr("class")&&(regex=new RegExp("x-tao-"+dataName+"-([a-zA-Z0-9-._]*)"),matches=$body.attr("class").match(regex),matches))return matches[1]}_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,$=$&&Object.prototype.hasOwnProperty.call($,"default")?$["default"]:$;var _prefix="x-tao-",container={setEncodedData:setEncodedData,hasEncodedData:hasEncodedData,getEncodedData:getEncodedData,removeEncodedData:removeEncodedData,setEncodedDataToDom:setEncodedDataToDom};return container}),define("taoQtiItem/qtiRunner/modalFeedback/inlineRenderer",["lodash","jquery","context","taoQtiItem/qtiItem/helper/pci","taoQtiItem/qtiItem/helper/container","handlebars","lib/handlebars/helpers","iframeNotifier"],function(_,$$1,context,pci,containerHelper,Handlebars,Helpers0,iframeNotifier){"use strict";function previewOkBtn(data,options,asString){var html=Template(data,options);return asString||!0?html:$(html)}function deliveryOkBtn(data,options,asString){var html=Template$1(data,options);return asString||!0?html:$(html)}function showFeedbacks(item,loader,renderer,itemSession,onCloseCallback,onShowCallback){var firstFeedback,interactionsDisplayInfo=getInteractionsDisplayInfo(item),messages={},renderedFeebacks=[],renderingQueue=[],$itemContainer=item.getContainer(),$itemBody=$itemContainer.children(".qti-itemBody");return _.each(item.modalFeedbacks,function(feedback){var feedbackIds,message,$container,comparedOutcome,_currentMessageGroupId,interactionInfo,outcomeIdentifier=feedback.attr("outcomeIdentifier"),order=-1;if(itemSession[outcomeIdentifier]){if(feedbackIds=pci.getRawValues(itemSession[outcomeIdentifier]),-1===_.indexOf(feedbackIds,feedback.id()))return!0;if(message=getFeedbackMessageSignature(feedback),comparedOutcome=containerHelper.getEncodedData(feedback,"relatedOutcome"),interactionInfo=_.find(interactionsDisplayInfo,{responseIdentifier:comparedOutcome}),comparedOutcome&&interactionInfo?($container=interactionInfo.displayContainer,_currentMessageGroupId=interactionInfo.messageGroupId,order=interactionInfo.order):($container=$itemBody,_currentMessageGroupId="__item__"),messages[_currentMessageGroupId]||(messages[_currentMessageGroupId]=[]),0<=_.indexOf(messages[_currentMessageGroupId],message))return!0;messages[_currentMessageGroupId].push(message),renderingQueue.push({feedback:feedback,$container:$container,order:order})}}),renderingQueue.length&&(renderingQueue=_.sortBy(renderingQueue,"order"),clearModalFeedbacks($itemContainer),_.each(renderingQueue,function(renderingToken){renderModalFeedback(renderingToken.feedback,loader,renderer,renderingToken.$container,$itemContainer,function(renderingData){firstFeedback||(firstFeedback=$$1(renderingData.dom)),$$1("img",renderingData.dom).on("load",function(){iframeNotifier.parent("itemcontentchange")}),renderedFeebacks.push(renderingData),renderedFeebacks.length===renderingQueue.length&&(iframeNotifier.parent("itemcontentchange"),firstFeedback&&autoscroll(firstFeedback),_.isFunction(onShowCallback)&&onShowCallback())})}),replaceControl(renderedFeebacks,$itemContainer,onCloseCallback)),renderingQueue.length}function getQtiContainer(){for(var me=window,$container=null,max=10;me&&me.__knownParent__&&max--;)if(me=me.parent,me&&me.$&&($container=me.$("#qti-content"),$container.length))return $container;return null}function autoscroll(element){var currentScrollTop,minScrollTop,maxScrollTop,scrollTop,$element=$$1(element),$container=getQtiContainer();$element.length&&$container&&(currentScrollTop=$container.scrollTop(),maxScrollTop=$element.offset().top,minScrollTop=maxScrollTop-$container.height()+$element.outerHeight(),scrollTop=Math.max(Math.min(maxScrollTop,currentScrollTop),minScrollTop),scrollTop!==currentScrollTop&&$container.animate({scrollTop:scrollTop}))}function extractDisplayInfo(interaction){var messageGroupId,$displayContainer,$interactionContainer=interaction.getContainer(),responseIdentifier=interaction.attr("responseIdentifier");return interaction.is("inlineInteraction")?($displayContainer=$interactionContainer.closest("[class*=\" col-\"], [class^=\"col-\"]"),messageGroupId=$displayContainer.attr("data-messageGroupId"),!messageGroupId&&(messageGroupId=_.uniqueId("inline_message_group_"),$displayContainer.attr("data-messageGroupId",messageGroupId))):(messageGroupId=responseIdentifier,$displayContainer=$interactionContainer),{responseIdentifier:responseIdentifier,interactionContainer:$interactionContainer,displayContainer:$displayContainer,messageGroupId:messageGroupId,order:-1}}function getInteractionsDisplayInfo(item){var interactionsDisplayInfo=[],$itemContainer=item.getContainer(),interactionOrder=0;return _.each(item.getComposingElements(),function(element){var responseIdentifier;element.is("interaction")&&(responseIdentifier=element.attr("responseIdentifier"),interactionsDisplayInfo.push(extractDisplayInfo(element)))}),$itemContainer.find(".qti-interaction").each(function(){var interactionContainer=this;_.each(interactionsDisplayInfo,function(_interactionInfo){if(_interactionInfo.interactionContainer[0]===interactionContainer)return _interactionInfo.order=interactionOrder,!1}),interactionOrder++}),interactionsDisplayInfo=_.sortBy(interactionsDisplayInfo,"order"),interactionsDisplayInfo}function clearModalFeedbacks($itemContainer){$itemContainer.find(".qti-modalFeedback").remove()}function renderModalFeedback(feedback,loader,renderer,$container,$itemContainer,renderedCallback){renderer.load(function(){var $modalFeedback=$$1(feedback.render({inline:!0})),done=function done(){renderedCallback({identifier:feedback.id(),serial:feedback.getSerial(),dom:$modalFeedback})};$container.append($modalFeedback),Promise.race([Promise.all(_.map(feedback.getComposingElements(),function(elt){return elt.postRender({},"",renderer).pop()})),new Promise(function(resolve,reject){_.delay(reject,timeout,new Error("Post rendering ran out of time."))})]).then(done).catch(function(err){throw done(),new Error("Error in post rendering : "+err)})},loader.getLoadedClasses())}function replaceControl(renderedFeebacks,$itemContainer,callback){var $scope,$controls,$toggleContainer;window.parent&&window.parent.parent&&window.parent.parent.$?$itemContainer.parents(".tao-preview-scope").length?($scope=window.parent.parent.$("#preview-console"),$controls=$scope.find(".preview-console-header .action-bar li:visible"),$toggleContainer=$scope.find(".console-button-action-bar"),initControlToggle(renderedFeebacks,$itemContainer,$controls,$toggleContainer,previewOkBtn,callback)):($scope=window.parent.parent.$("body.qti-test-scope .bottom-action-bar"),$controls=$scope.find("li:visible"),$toggleContainer=$scope.find(".navi-box-list"),initControlToggle(renderedFeebacks,$itemContainer,$controls,$toggleContainer,deliveryOkBtn,callback)):($scope=$itemContainer.find("#modalFeedbacks"),initControlToggle(renderedFeebacks,$itemContainer,$$1(),$scope,previewOkBtn,callback))}function initControlToggle(renderedFeebacks,$itemContainer,$controls,$toggleContainer,toggleButtonTemplate,callback){var $ok=$$1(toggleButtonTemplate()).click(function(){_.each(renderedFeebacks,function(fb){fb.dom.hide()}),uncover([$itemContainer]),$ok.remove(),$controls.show(),callback()});$controls.hide(),$toggleContainer.append($ok),cover([$itemContainer])}function cover(interactionContainers){var $cover=$$1("
");_.each(interactionContainers,function($interaction){$interaction.append($cover)})}function uncover(interactionContainers){_.each(interactionContainers,function($interaction){$interaction.find(".interaction-cover").remove()})}function getFeedbackMessageSignature(feedback){return(""+feedback.body()+feedback.attr("title")).toLowerCase().trim().replace(/x-tao-[a-zA-Z0-9\-._\s]*/g,"")}_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,$$1=$$1&&Object.prototype.hasOwnProperty.call($$1,"default")?$$1["default"]:$$1,context=context&&Object.prototype.hasOwnProperty.call(context,"default")?context["default"]:context,pci=pci&&Object.prototype.hasOwnProperty.call(pci,"default")?pci["default"]:pci,containerHelper=containerHelper&&Object.prototype.hasOwnProperty.call(containerHelper,"default")?containerHelper["default"]:containerHelper,Handlebars=Handlebars&&Object.prototype.hasOwnProperty.call(Handlebars,"default")?Handlebars["default"]:Handlebars,Helpers0=Helpers0&&Object.prototype.hasOwnProperty.call(Helpers0,"default")?Helpers0["default"]:Helpers0,iframeNotifier=iframeNotifier&&Object.prototype.hasOwnProperty.call(iframeNotifier,"default")?iframeNotifier["default"]:iframeNotifier,Helpers0.__initialized||(Helpers0(Handlebars),Helpers0.__initialized=!0);var Template=Handlebars.template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var helper,options,buffer="",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return buffer+="
  • \n \n "+escapeExpression((helper=helpers.__||depth0&&depth0.__,options={hash:{},data:data},helper?helper.call(depth0,"OK",options):helperMissing.call(depth0,"__","OK",options)))+"\n \n
  • ",buffer});Helpers0.__initialized||(Helpers0(Handlebars),Helpers0.__initialized=!0);var Template$1=Handlebars.template(function(Handlebars,depth0,helpers,partials,data){return this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),"
  • \n \n \n OK\n \n
  • "}),timeout=1e3*(0!0).addList(required.map(module=>({module,category:"qti"}))).load().then(loaded=>{loaded.forEach(clazz=>{_isValidRenderer(clazz)&&(_renderers[clazz.qtiClass]=clazz)}),"function"==typeof callback&&callback.call(self,_renderers)}),this},this.unload=function unload(){return this.themeLoader&&themeLoader(options.themes).unload(),this},this.setShuffledChoices=function(interaction,choices,identificationType){Element.isA(interaction,"interaction")&&(this.shuffledChoices[interaction.getSerial()]=_.pluck(interactionHelper.findChoices(interaction,choices,identificationType),"serial"))},this.getShuffledChoices=function(interaction,reshuffle,returnedType){let serial,i,choices=[];if(Element.isA(interaction,"interaction")){if(serial=interaction.getSerial(),this.shuffledChoices[serial]&&!reshuffle)Element.isA(interaction,"matchInteraction")?_.forEach(choices,function(choice,index){2>index&&_.forEach(this.shuffledChoices[serial][i],function(choiceSerial){choice.push(interaction.getChoice(choiceSerial))})}):_.forEach(this.shuffledChoices[serial],function(choiceSerial){choices.push(interaction.getChoice(choiceSerial))});else if(Element.isA(interaction,"matchInteraction"))for(this.shuffledChoices[serial]=[],i=0;2>i;i++)choices[i]=interactionHelper.shuffleChoices(interaction.getChoices(i)),this.shuffledChoices[serial][i]=_.pluck(choices[i],"serial");else choices=interactionHelper.shuffleChoices(interaction.getChoices()),this.shuffledChoices[serial]=_.pluck(choices,"serial");return"serial"===returnedType||"identifier"===returnedType?interactionHelper.convertChoices(choices,returnedType):_.clone(choices)}return[]},this.getRenderers=function(){return _renderers},this.getLocations=function(){return _locations},this.resolveUrl=function resolveUrl(url){return options.assetManager?"string"==typeof url&&0_.indexOf(options.include,typeIdentifier))||void configLoadingStack.push(loadModuleConfig(self.get(typeIdentifier)))}),Promise.all(configLoadingStack).then(function(moduleConfigs){var requireConfigAliases=_.reduce(moduleConfigs,function(acc,paths){return _.merge(acc,paths)},{});_requirejs.config({paths:requireConfigAliases})})})}),loadPromise.then(function(){self.trigger("runtimesloaded")}).catch(function(err){self.trigger("error",err)}),loadPromise},loadCreators:function loadCreators(options){var loadPromise,self=this;return options=_.defaults(options||{},_defaultLoadingOptions),loadPromise=self.loadRuntimes(options).then(function(){var requiredCreatorHooks=[];return _.forIn(self._registry,function(versions,typeIdentifier){var portableElementModel=self.get(typeIdentifier);if(portableElementModel.creator&&portableElementModel.creator.hook){if(portableElementModel.enabled){if(_.isArray(options.include)&&0>_.indexOf(options.include,typeIdentifier))return!0;}else if(!_.isArray(options.include)||0>_.indexOf(options.include,typeIdentifier))return!0;requiredCreatorHooks.push(portableElementModel.creator.hook.replace(/\.js$/,""))}}),requiredCreatorHooks.length?new Promise(function(resolve,reject){_requirejs(requiredCreatorHooks,function(){var creators={};_.each(arguments,function(creatorHook){var id=creatorHook.getTypeIdentifier(),portableElementModel=self.get(id),i=_.findIndex(self._registry[id],{version:portableElementModel.version});0>i?self.trigger("error","no creator found for id/version "+id+"/"+portableElementModel.version):(self._registry[id][i].creator.module=creatorHook,creators[id]=creatorHook)}),resolve(creators)},reject)}):Promise.resolve({})}),loadPromise.then(function(creators){return self.trigger("creatorsloaded",creators),creators}).catch(function(err){self.trigger("error",err)}),loadPromise},enable:function enable(typeIdentifier,version){var portableElement=this.get(typeIdentifier,version);return portableElement&&(portableElement.enabled=!0),this},disable:function disable(typeIdentifier,version){var portableElement=this.get(typeIdentifier,version);return portableElement&&(portableElement.enabled=!1),this},isEnabled:function isEnabled(typeIdentifier,version){var portableElement=this.get(typeIdentifier,version);return portableElement&&!0===portableElement.enabled}}))}}),define("taoQtiItem/qtiCreator/helper/qtiElements",["jquery","lodash","i18n","services/features"],function($,_,__,featuresService){"use strict";const QtiElements={classes:{itemBody:{parents:["bodyElement"],contains:["block"],abstract:!0},atomicBlock:{parents:["blockStatic","bodyElement","flowStatic"],contains:["inline"],abstract:!0},atomicInline:{parents:["bodyElement","flowStatic","inlineStatic"],contains:["inline"],abstract:!0},simpleBlock:{parents:["blockStatic","bodyElement","flowStatic"],contains:["block"],abstract:!0},simpleInline:{parents:["bodyElement","flowStatic","inlineStatic"],contains:["inline"],abstract:!0},flowStatic:{parents:["flow"],abstract:!0},blockStatic:{parents:["block"],abstract:!0},inlineStatic:{parents:["inline"],abstract:!0},flow:{parents:["objectFlow"],abstract:!0},tableCell:{parents:["bodyElement"],contains:["flow"],abstract:!0},caption:{parents:["bodyElement"],contains:["inline"],xhtml:!0},col:{parents:["bodyElement"],xhtml:!0},colgroup:{parents:["bodyElement"],contains:["col"],xhtml:!0},div:{parents:["blockStatic","bodyElement","flowStatic"],contains:["flow"],xhtml:!0},dl:{parents:["blockStatic","bodyElement","flowStatic"],contains:["dlElement"],xhtml:!0},dt:{parents:["dlElement"],contains:["inline"],xhtml:!0},dd:{parents:["dlElement"],contains:["flow"],xhtml:!0},hr:{parents:["blockStatic","bodyElement","flowStatic"],xhtml:!0},math:{parents:["blockStatic","flowStatic","inlineStatic"],xhtml:!0},li:{parents:["bodyElement"],contains:["flow"],xhtml:!0},ol:{parents:["blockStatic","bodyElement","flowStatic"],contains:["li"],xhtml:!0},ul:{parents:["blockStatic","bodyElement","flowStatic"],contains:["li"],xhtml:!0},object:{parents:["bodyElement","flowStatic","inlineStatic"],contains:["objectFlow"],xhtml:!0},param:{parents:["objectFlow"],xhtml:!0},table:{parents:["blockStatic","bodyElement","flowStatic"],contains:["caption","col","colgroup","thead","tfoot","tbody"],xhtml:!0},tbody:{parents:["bodyElement"],contains:["tr"],xhtml:!0},tfoot:{parents:["bodyElement"],contains:["tr"],xhtml:!0},thead:{parents:["bodyElement"],contains:["tr"],xhtml:!0},td:{parents:["tableCell"],xhtml:!0},th:{parents:["tableCell"],xhtml:!0},tr:{parents:["bodyElement"],contains:["tableCell"],xhtml:!0},a:{parents:["simpleInline"],xhtml:!0},abbr:{parents:["simpleInline"],xhtml:!0},acronym:{parents:["simpleInline"],xhtml:!0},b:{parents:["simpleInline"],xhtml:!0},big:{parents:["simpleInline"],xhtml:!0},cite:{parents:["simpleInline"],xhtml:!0},code:{parents:["simpleInline"],xhtml:!0},dfn:{parents:["simpleInline"],xhtml:!0},em:{parents:["simpleInline"],xhtml:!0},i:{parents:["simpleInline"],xhtml:!0},kbd:{parents:["simpleInline"],xhtml:!0},q:{parents:["simpleInline"],xhtml:!0},samp:{parents:["simpleInline"],xhtml:!0},small:{parents:["simpleInline"],xhtml:!0},span:{parents:["simpleInline"],xhtml:!0},strong:{parents:["simpleInline"],xhtml:!0},sub:{parents:["simpleInline"],xhtml:!0},sup:{parents:["simpleInline"],xhtml:!0},tt:{parents:["simpleInline"],xhtml:!0},var:{parents:["simpleInline"],xhtml:!0},blockquote:{parents:["simpleBlock"],xhtml:!0},address:{parents:["atomicBlock"],xhtml:!0},h1:{parents:["atomicBlock"],xhtml:!0},h2:{parents:["atomicBlock"],xhtml:!0},h3:{parents:["atomicBlock"],xhtml:!0},h4:{parents:["atomicBlock"],xhtml:!0},h5:{parents:["atomicBlock"],xhtml:!0},h6:{parents:["atomicBlock"],xhtml:!0},p:{parents:["atomicBlock"],xhtml:!0},pre:{parents:["atomicBlock"],xhtml:!0},img:{parents:["atomicInline"],xhtml:!0,attributes:["src","alt","longdesc","height","width"]},br:{parents:["atomicInline"],xhtml:!0},infoControl:{parents:["blockStatic","bodyElement","flowStatic"],qti:!0},textRun:{parents:["inlineStatic","flowstatic"],qti:!0},feedbackInline:{parents:["simpleInline","feedbackElement"],qti:!0},feedbackBlock:{parents:["simpleBlock"],qti:!0},rubricBlock:{parents:["simpleBlock"],qti:!0},blockInteraction:{parents:["block","flow","interaction"],qti:!0},inlineInteraction:{parents:["inline","flow","interaction"],qti:!0},gap:{parents:["inlineStatic"],qti:!0},hottext:{parents:["flowstatic","inlineStatic"],contains:["inlineStatic"],qti:!0},printedVariable:{parents:["bodyElement","flowStatic","inlineStatic","textOrVariable"],qti:!0},prompt:{parents:["bodyElement"],contains:["inlineStatic"],qti:!0},templateElement:{parents:["bodyElement"],qti:!0},templateBlock:{parents:["blockStatic","flowStatic","templateElement"],contains:["blockStatic"],qti:!0},templateInline:{parents:["inlineStatic","flowStatic","templateElement"],contains:["inlineStatic"],qti:!0},choiceInteraction:{parents:["blockInteraction"],qti:!0},associateInteraction:{parents:["blockInteraction"],qti:!0},orderInteraction:{parents:["blockInteraction"],qti:!0},matchInteraction:{parents:["blockInteraction"],qti:!0},hottextInteraction:{parents:["blockInteraction"],qti:!0},gapMatchInteraction:{parents:["blockInteraction"],qti:!0},mediaInteraction:{parents:["blockInteraction"],qti:!0},sliderInteraction:{parents:["blockInteraction"],qti:!0},uploadInteraction:{parents:["blockInteraction"],qti:!0},drawingInteraction:{parents:["blockInteraction"],qti:!0},graphicInteraction:{parents:["blockInteraction"],qti:!0},hotspotInteraction:{parents:["graphicInteraction"],qti:!0},graphicAssociateInteraction:{parents:["graphicInteraction"],qti:!0},graphicOrderInteraction:{parents:["graphicInteraction"],qti:!0},graphicGapMatchInteraction:{parents:["graphicInteraction"],qti:!0},selectPointInteraction:{parents:["graphicInteraction"],qti:!0},textEntryInteraction:{parents:["stringInteraction","inlineInteraction"],qti:!0},extendedTextInteraction:{parents:["stringInteraction","blockInteraction"],qti:!0},inlineChoiceInteraction:{parents:["inlineInteraction"],qti:!0},endAttemptInteraction:{parents:["inlineInteraction"],qti:!0},customInteraction:{parents:["block","flow","interaction"],qti:!0},_container:{parents:["block"],qti:!0}},cache:{containable:{},children:{},parents:{}},getAllowedContainersElements(qtiClass,$container){const classes=QtiElements.getAllowedContainers(qtiClass);let jqSelector="";for(let i in classes)classes[i].qti||(jqSelector+=`${classes[i]}, `);return jqSelector&&(jqSelector=jqSelector.substring(0,jqSelector.length-2)),$(jqSelector,$container?$container:$(document)).filter(":not([data-qti-type])")},getAllowedContainers(qtiClass){let ret;if(QtiElements.cache.containable[qtiClass])ret=QtiElements.cache.containable[qtiClass];else{ret=[];const parents=QtiElements.getParentClasses(qtiClass,!0);for(let aClass in QtiElements.classes){const model=QtiElements.classes[aClass];if(model.contains){const intersect=_.intersection(model.contains,parents);intersect.length&&(!model.abstract&&ret.push(aClass),ret=_.union(ret,QtiElements.getChildClasses(aClass,!0)))}}QtiElements.cache.containable[qtiClass]=ret}return ret},getAllowedContents(qtiClass,recursive,checked){let ret=[];checked=checked||{};const model=QtiElements.classes[qtiClass];if(model&&model.contains)for(let i in model.contains){const contain=model.contains[i];if(!checked[contain]){checked[contain]=!0,ret.push(contain);const children=QtiElements.getChildClasses(contain,!0);for(let j in children){const child=children[j];checked[child]||(checked[child]=!0,ret.push(child),recursive&&(ret=_.union(ret,QtiElements.getAllowedContents(child,!0,checked))))}recursive&&(ret=_.union(ret,QtiElements.getAllowedContents(contain,!0,checked)))}}const parents=QtiElements.getParentClasses(qtiClass,!0);for(let i in parents)ret=_.union(ret,QtiElements.getAllowedContents(parents[i],recursive,checked));return _.uniq(ret,!1)},isAllowedClass(qtiContainerClass,qtiContentClass){const allowedClasses=QtiElements.getAllowedContents(qtiContainerClass);return 0<=_.indexOf(allowedClasses,qtiContentClass)},getParentClasses(qtiClass,recursive){let ret;if(recursive&&QtiElements.cache.parents[qtiClass])ret=QtiElements.cache.parents[qtiClass];else{if(ret=[],QtiElements.classes[qtiClass]&&(ret=QtiElements.classes[qtiClass].parents,recursive)){for(let i in ret)ret=_.union(ret,QtiElements.getParentClasses(ret[i],recursive));ret=_.uniq(ret,!1)}QtiElements.cache.parents[qtiClass]=ret}return ret},getChildClasses(qtiClass,recursive,type){let ret;const cacheType=type?type:"all";if(recursive&&QtiElements.cache.children[qtiClass]&&QtiElements.cache.children[qtiClass][cacheType])ret=QtiElements.cache.children[qtiClass][cacheType];else{for(let aClass in ret=[],QtiElements.classes){const model=QtiElements.classes[aClass];0<=_.indexOf(model.parents,qtiClass)&&(type?model[type]&&ret.push(aClass):ret.push(aClass),recursive&&(ret=_.union(ret,QtiElements.getChildClasses(aClass,recursive,type))))}QtiElements.cache.children[qtiClass]||(QtiElements.cache.children[qtiClass]={}),QtiElements.cache.children[qtiClass][cacheType]=ret}return ret},isBlock(qtiClass){return QtiElements.is(qtiClass,"block")},isInline(qtiClass){return QtiElements.is(qtiClass,"inline")},is(qtiClass,topClass){if(qtiClass===topClass)return!0;else{const parents=QtiElements.getParentClasses(qtiClass,!0);return 0<=_.indexOf(parents,topClass)}},isVisible(qtiClass){return this.is(qtiClass,"customInteraction")?featuresService.isVisible(`taoQtiItem/creator/customInteraction/${qtiClass.replace(/Interaction$/,"").replace(/^customInteraction\./,"")}`):!this.is(qtiClass,"interaction")||featuresService.isVisible(`taoQtiItem/creator/interaction/${qtiClass.replace(/Interaction$/,"")}`)},getAvailableAuthoringElements(){const tagTitles={commonInteractions:__("Common Interactions"),inlineInteractions:__("Inline Interactions"),graphicInteractions:__("Graphic Interactions")},authoringElements={choiceInteraction:{label:__("Choice Interaction"),description:__("Select a single (radio buttons) or multiple (check boxes) responses among a set of choices."),icon:"icon-choice",short:__("Choice"),qtiClass:"choiceInteraction",tags:[tagTitles.commonInteractions,"mcq"],group:"common-interactions"},orderInteraction:{label:__("Order Interaction"),icon:"icon-order",description:__("Arrange a list of choices in the correct order."),short:__("Order"),qtiClass:"orderInteraction",tags:[tagTitles.commonInteractions,"ordering"],group:"common-interactions"},associateInteraction:{label:__("Associate Interaction"),icon:"icon-associate",description:__("Create pair(s) from a series of choices."),short:__("Associate"),qtiClass:"associateInteraction",tags:[tagTitles.commonInteractions,"association"],group:"common-interactions"},matchInteraction:{label:__("Match Interaction"),icon:"icon-match",description:__("Create association(s) between two sets of choices displayed in a table (row and column)."),short:__("Match"),qtiClass:"matchInteraction",tags:[tagTitles.commonInteractions,"association"],group:"common-interactions"},hottextInteraction:{label:__("Hottext Interaction"),icon:"icon-hottext",description:__("Select one or more text parts (hottext) within a text."),short:__("Hottext"),qtiClass:"hottextInteraction",tags:[tagTitles.commonInteractions,"text"],group:"common-interactions"},gapMatchInteraction:{label:__("Gap Match Interaction"),icon:"icon-gap-match",description:__(" Fill in the gaps in a text from a set of choices."),short:__("Gap Match"),qtiClass:"gapMatchInteraction",tags:[tagTitles.commonInteractions,"text","association"],group:"common-interactions"},sliderInteraction:{label:__("Slider Interaction"),icon:"icon-slider",description:__("Select a value within a numerical range."),short:__("Slider"),qtiClass:"sliderInteraction",tags:[tagTitles.commonInteractions,"special"],group:"common-interactions"},extendedTextInteraction:{label:__("Extended Text Interaction"),icon:"icon-extended-text",description:__("Collect open-ended information in one or more text area(s) (strings or numeric values)."),short:__("Extended Text"),qtiClass:"extendedTextInteraction",tags:[tagTitles.commonInteractions,"text"],group:"common-interactions"},uploadInteraction:{label:__("File Upload Interaction"),icon:"icon-upload",description:__("Upload a file (e.g. document, picture...) as a response."),short:__("File Upload"),qtiClass:"uploadInteraction",tags:[tagTitles.commonInteractions,"special"],group:"common-interactions"},mediaInteraction:{label:__("Media Interaction"),icon:"icon-media",description:__("Control the playing parameters (auto-start, loop) of a video or audio file and report the number of time it has been played."),short:__("Media"),qtiClass:"mediaInteraction",tags:[tagTitles.commonInteractions,"media"],group:"common-interactions"},_container:{label:__("Text Block"),icon:"icon-font",description:__("Block contains the content (stimulus) of the item such as text or image. It is also required for Inline Interactions."),short:__("Block"),qtiClass:"_container",tags:[tagTitles.inlineInteractions,"text"],group:"inline-interactions"},inlineChoiceInteraction:{label:__("Inline Choice Interaction"),icon:"icon-inline-choice",description:__("Select a choice from a drop-down list."),short:__("Inline Choice"),qtiClass:"inlineChoiceInteraction",tags:[tagTitles.inlineInteractions,"inline-interactions","mcq"],group:"inline-interactions"},textEntryInteraction:{label:__("Text Entry Interaction"),icon:"icon-text-entry",description:__("Collect open-ended information in a short text input (strings or numeric values)."),short:__("Text Entry"),qtiClass:"textEntryInteraction",tags:[tagTitles.inlineInteractions,"inline-interactions","text"],group:"inline-interactions"},endAttemptInteraction:{label:__("End Attempt Interaction"),icon:"icon-end-attempt",description:__("Trigger the end of the item attempt."),short:__("End Attempt"),qtiClass:"endAttemptInteraction",tags:[tagTitles.inlineInteractions,"inline-interactions","button","submit"],group:"inline-interactions"},hotspotInteraction:{label:__("Hotspot Interaction"),icon:"icon-hotspot",description:__("Select one or more areas (hotspots) displayed on an picture."),short:__("Hotspot"),qtiClass:"hotspotInteraction",tags:[tagTitles.graphicInteractions,"mcq"],group:"graphic-interactions"},graphicOrderInteraction:{label:__("Graphic Order Interaction"),icon:"icon-graphic-order",description:__("Order the areas (hotspots) displayed on a picture."),short:__("Order"),qtiClass:"graphicOrderInteraction",tags:[tagTitles.graphicInteractions,"ordering"],group:"graphic-interactions"},graphicAssociateInteraction:{label:__("Graphic Associate Interaction"),icon:"icon-graphic-associate",description:__("Create association(s) between areas (hotspots) displayed on a picture."),short:__("Associate"),qtiClass:"graphicAssociateInteraction",tags:[tagTitles.graphicInteractions,"association"],group:"graphic-interactions"},graphicGapMatchInteraction:{label:__("Graphic Gap Match Interaction"),icon:"icon-graphic-gap",description:__("Fill in the gaps on a picture with a set of image choices."),short:__("Gap Match"),qtiClass:"graphicGapMatchInteraction",tags:[tagTitles.graphicInteractions,"association"],group:"graphic-interactions"},selectPointInteraction:{label:__("Select Point Interaction"),icon:"icon-select-point",description:__("Position one or more points on a picture (response areas are not displayed)."),short:__("Select Point"),qtiClass:"selectPointInteraction",tags:[tagTitles.graphicInteractions],group:"graphic-interactions"}},availableElements={};for(const[elementId,element]of Object.entries(authoringElements))this.isVisible(elementId)&&(availableElements[elementId]=element);return availableElements}};return QtiElements}),define("taoQtiItem/portableElementRegistry/factory/ciRegistry",["lodash","i18n","taoQtiItem/portableElementRegistry/factory/factory","taoQtiItem/qtiCreator/helper/qtiElements"],function(_,__,portableElementRegistry,qtiElements){"use strict";return function customInteractionRegistry(){return portableElementRegistry({getAuthoringData(typeIdentifier){let options=1i;i++)id+=chars.charAt(Math.floor(Math.random()*chars.length));return id},buildId:function buildId(item,prefix){var id,usedIds,i=1,suffix="",exists=!1;if(!item)throw new TypeError("A item is required to generate a unique identifier");usedIds=item.getUsedIds();do exists=!1,id=prefix+suffix,_.contains(usedIds,id)&&(exists=!0,suffix="_"+i,i++);while(exists);return id},buildIdentifier:function buildIdentifier(item,prefix,useSuffix){var id,usedIds,suffix="",i=1,exists=!1;if(!item)throw new TypeError("A item is required to generate a unique identifier");if(!prefix)throw new TypeError("Prefix is required to build an identifier");usedIds=item.getUsedIdentifiers(),useSuffix=!!_.isUndefined(useSuffix)||useSuffix,prefix&&(prefix=prefix.replace(/_[0-9]+$/gi,"_").replace(/[^a-zA-Z0-9_]/gi,"_").replace(/(_)+/gi,"_"),useSuffix&&(suffix="_"+i));do exists=!1,id=prefix+suffix,usedIds[id]&&(exists=!0,suffix="_"+i,i++);while(exists);return id},findInCollection:function findInCollection(element,collectionNames,searchedSerial){var found=null;if(_.isString(collectionNames)&&(collectionNames=[collectionNames]),_.isArray(collectionNames))_.each(collectionNames,function(collectionName){var collection=element;_.each(collectionName.split("."),function(nameToken){collection=collection[nameToken]});var elt=collection[searchedSerial];return elt?(found={parent:element,element:elt},!1):(_.each(collection,function(elt){if(_.isFunction(elt.find)&&(found=elt.find(searchedSerial),found))return!1}),!found)&&void 0});else throw new Error("invalid argument : collectionNames must be an array or a string");return found},addMarkupNamespace:function addMarkupNamespace(markup,ns){return ns?(markup=markup.replace(/<(\/)?([a-z:]+)(\s?)([^><]*)>/g,function($0,$1,$2,$3,$4){return 0<$2.indexOf(":")?$0:($1=$1||"",$3=$3||"","<"+$1+ns+":"+$2+$3+$4+">")}),markup):markup},removeMarkupNamespaces:function removeMarkupNamespace(markup){return markup.replace(/<(\/)?(\w*):([^>]*)>/g,"<$1$3>")},getMarkupUsedNamespaces:function getMarkupUsedNamespaces(markup){var namespaces=[];return markup.replace(/<(\/)?(\w*):([^>]*)>/g,function(original,slash,ns,node){return namespaces.push(ns),"<"+slash+node+">"}),_.uniq(namespaces)}};return util}),define("taoQtiItem/qtiItem/helper/rendererConfig",["lodash","jquery"],function(_,$){"use strict";_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,$=$&&Object.prototype.hasOwnProperty.call($,"default")?$["default"]:$;var rendererConfigHelper={getOptionsFromArguments:function(args){var options={data:{},placeholder:null,subclass:"",renderer:null};return _.each(args,function(arg){arg&&(arg.isRenderer?options.renderer=arg:arg instanceof $&&arg.length?options.placeholder=arg:_.isString(arg)?options.subclass=arg:_.isPlainObject(arg)?options.data=arg:console.log("invalid arg",arg,args))}),options}};return rendererConfigHelper}),define("taoQtiItem/qtiItem/core/Element",["jquery","lodash","class","core/logger","taoQtiItem/qtiItem/helper/util","taoQtiItem/qtiItem/helper/rendererConfig"],function($,_,_class,loggerFactory,util,rendererConfig){"use strict";$=$&&Object.prototype.hasOwnProperty.call($,"default")?$["default"]:$,_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,loggerFactory=loggerFactory&&Object.prototype.hasOwnProperty.call(loggerFactory,"default")?loggerFactory["default"]:loggerFactory,util=util&&Object.prototype.hasOwnProperty.call(util,"default")?util["default"]:util,rendererConfig=rendererConfig&&Object.prototype.hasOwnProperty.call(rendererConfig,"default")?rendererConfig["default"]:rendererConfig;var _instances={},logger=loggerFactory("taoQtiItem/qtiItem/core/Element"),Element=Class.extend({qtiClass:"",serial:"",rootElement:null,init:function(serial,attributes){if(this.attributes={},this.metaData={},"object"==typeof serial&&(attributes=serial,serial=""),serial||(serial=util.buildSerial(this.qtiClass+"_")),serial&&("string"!=typeof serial||!serial.match(/^[a-z_0-9]*$/i)))throw"invalid QTI serial : ("+typeof serial+") "+serial;if(!_instances[serial])_instances[serial]=this,this.serial=serial,this.setAttributes(attributes||{});else throw"a QTI Element with the same serial already exists "+serial;"function"==typeof this.initContainer&&this.initContainer(arguments[2]||""),"function"==typeof this.initObject&&this.initObject()},is:function(qtiClass){return qtiClass===this.qtiClass},placeholder:function(){return"{{"+this.serial+"}}"},getSerial:function(){return this.serial},getUsedIdentifiers:function(){var usedIds={},elts=this.getComposingElements();for(var i in elts){var elt=elts[i],id=elt.attr("identifier");id&&(usedIds[id]=elt)}return usedIds},getUsedIds:function getUsedIds(){var usedIds=[];return _.forEach(this.getComposingElements(),function(elt){var id=elt.attr("id");id&&!_.contains(usedIds,id)&&usedIds.push(id)}),usedIds},attr:function(name,value){if(name)if(void 0!==value)this.attributes[name]=value;else if("object"==typeof name)for(var prop in name)this.attr(prop,name[prop]);else if("string"==typeof name)return void 0===this.attributes[name]?void 0:this.attributes[name];return this},data:function(name,value){if(name)if(void 0!==value)this.metaData[name]=value,$(document).trigger("metaChange.qti-widget",{element:this,key:name,value:value});else if("object"==typeof name)for(var prop in name)this.data(prop,name[prop]);else if("string"==typeof name)return void 0===this.metaData[name]?void 0:this.metaData[name];return this},removeData:function(name){return delete this.metaData[name],this},removeAttr:function(name){return this.removeAttributes(name)},setAttributes:function(attributes){return _.isPlainObject(attributes)||logger.warn("attributes should be a plain object"),this.attributes=attributes,this},getAttributes:function(){return _.clone(this.attributes)},removeAttributes:function(attrNames){for(var i in"string"==typeof attrNames&&(attrNames=[attrNames]),attrNames)delete this.attributes[attrNames[i]];return this},getComposingElements:function(){function append(element){elts[element.getSerial()]=element,elts=_.extend(elts,element.getComposingElements())}var elts={};return"function"==typeof this.initContainer&&append(this.getBody()),"function"==typeof this.initObject&&append(this.getObject()),_.each(this.metaData,function(v){Element.isA(v,"_container")?append(v):_.isArray(v)&&_.each(v,function(v){Element.isA(v,"_container")&&append(v)})}),elts},getUsedClasses:function(){var ret=[this.qtiClass],composingElts=this.getComposingElements();return _.each(composingElts,function(elt){ret.push(elt.qtiClass)}),_.uniq(ret)},find:function(serial){var object,body,found=null;return"function"==typeof this.initObject&&(object=this.getObject(),object.serial===serial&&(found={parent:this,element:object,location:"object"})),found||"function"!=typeof this.initContainer||(body=this.getBody(),found=body.serial===serial?{parent:this,element:body,location:"body"}:this.getBody().find(serial,this)),found},parent:function(){var item=this.getRootElement();if(item){var found=item.find(this.getSerial());if(found)return found.parent}return null},setRelatedItem:function(item){logger.warn("Deprecated use of setRelatedItem()"),this.setRootElement(item)},setRootElement:function(item){var composingElts,i;if(Element.isA(item,"assessmentItem"))for(i in this.rootElement=item,composingElts=this.getComposingElements(),composingElts)composingElts[i].setRootElement(item)},getRelatedItem:function(){return logger.warn("Deprecated use of getRelatedItem()"),this.getRootElement()},getRootElement:function(){var ret=null;return Element.isA(this.rootElement,"assessmentItem")&&(ret=this.rootElement),ret},setRenderer:function(renderer){if(renderer&&renderer.isRenderer){this.renderer=renderer;var elts=this.getComposingElements();for(var serial in elts)elts[serial].setRenderer(renderer)}else throw"invalid qti rendering engine"},getRenderer:function(){return this.renderer},render:function render(){var rendering,args=rendererConfig.getOptionsFromArguments(arguments),_renderer=args.renderer||this.getRenderer(),tplData={},defaultData={tag:this.qtiClass,serial:this.serial,attributes:this.getAttributes()};if(!_renderer)throw new Error("render: no renderer found for the element "+this.qtiClass+":"+this.serial);return"function"==typeof this.initContainer&&(defaultData.body=this.getBody().render(args.renderer)),"function"==typeof this.initObject&&(defaultData.object={attributes:this.object.getAttributes()},defaultData.object.attributes.data=_renderer.resolveUrl(this.object.attr("data"))),tplData=_.merge(defaultData,args.data||{}),tplData=_renderer.getData(this,tplData,args.subclass),rendering=_renderer.renderTpl(this,tplData,args.subclass),args.placeholder&&args.placeholder.replaceWith(rendering),rendering},postRender:function(data,altClassName,renderer){var postRenderers=[],_renderer=renderer||this.getRenderer();if("function"==typeof this.initContainer&&(postRenderers=this.getBody().postRender(data,"",renderer)),_renderer)postRenderers.push(_renderer.postRender(this,data,altClassName));else throw"postRender: no renderer found for the element "+this.qtiClass+":"+this.serial;return _.compact(postRenderers)},getContainer:function($scope,subclass){var renderer=this.getRenderer();if(renderer)return renderer.getContainer(this,$scope,subclass);throw"getContainer: no renderer found for the element "+this.qtiClass+":"+this.serial},toArray:function(){var arr={serial:this.serial,type:this.qtiClass,attributes:this.getAttributes()};return"function"==typeof this.initContainer&&(arr.body=this.getBody().toArray()),"function"==typeof this.initObject&&(arr.object=this.object.toArray()),arr},isEmpty:function(){return!1},addClass:function(className){var clazz=this.attr("class")||"";_containClass(clazz,className)||this.attr("class",clazz+(clazz.length?" ":"")+className)},hasClass:function(className){return _containClass(this.attr("class"),className)},removeClass:function(className){var clazz=this.attr("class")||"";if(clazz){var regex=new RegExp("(?:^|\\s)"+className+"(?:\\s|$)");clazz=clazz.replace(regex," ").trim(),clazz?this.attr("class",clazz):this.removeAttr("class")}},toggleClass:function(className,state){return"boolean"==typeof state?state?this.addClass(className):this.removeClass(className):this.hasClass(className)?this.removeClass(className):this.addClass(className)},isset:function(){return Element.issetElement(this.serial)},unset:function(){return Element.unsetElement(this.serial)}}),_containClass=function(allClassStr,className){var regex=new RegExp("(?:^|\\s)"+className+"(?:\\s|$)","");return allClassStr&®ex.test(allClassStr)};return Element.isA=function(qtiElement,qtiClass){return qtiElement instanceof Element&&qtiElement.is(qtiClass)},Element.getElementBySerial=function(serial){return _instances[serial]},Element.issetElement=function(serial){return!!_instances[serial]},Element.unsetElement=function(serial){var element=Element.getElementBySerial(serial);if(element){var composingElements=element.getComposingElements();return _.each(composingElements,function(elt){delete _instances[elt.serial]}),delete _instances[element.serial],!0}return!1},Element}),define("taoQtiItem/qtiItem/helper/xmlNsHandler",[],function(){"use strict";function getPrefix(namespaces,html5Ns){let key;for(key in namespaces)if(namespaces[key]===html5Ns)return key;return"qh5"}const prefixed="article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section";var xmlNsHandler={stripNs:function stripNs(body){const pattern="([\\w]+)\\:(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section)",openRegEx=/(<([\w]+)\:(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section))/gi,closeRegEx=/(<\/([\w]+)\:(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section)>)/gi;return body.replace(openRegEx,"<$3").replace(closeRegEx,"")},restoreNs:function restoreNs(xml,namespaces){let ignoreMarkup=!!(2)+)/gim,""));const xmlRe=/(<(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section)[^>]*>|<\/(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section)>)/gi,tagRe=/((<)(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section)([^>]*)(>)|(<\/)(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section)(>))/i,xmlMatch=xmlCopy.match(xmlRe),imsXsd="http://www.imsglobal.org/xsd",html5Ns=imsXsd+"/imsqtiv2p2_html5_v1p0",prefix=getPrefix(namespaces,html5Ns),prefixAtt="xmlns:"+prefix+"=\""+html5Ns+"\"";let i=xmlMatch?xmlMatch.length:0;if(!xmlMatch)return xml;for(;i--;){const tagMatch=xmlMatch[i].match(tagRe);xml=xml.replace(xmlMatch[i],tagMatch[5]?"<"+prefix+":"+tagMatch[3]+tagMatch[4]+">":"")}return xmlMatch.length&&-1===xml.indexOf(prefixAtt)&&(xml=xml.replace("({qtiClass:"responseCondition",responseIf:{qtiClass:"responseIf",expression:{qtiClass:"match",expressions:[{qtiClass:"variable",attributes:{identifier:responseIdentifier}},{qtiClass:"correct",attributes:{identifier:responseIdentifier}}]},responseRules:[{qtiClass:"setOutcomeValue",attributes:{identifier:outcomeIdentifier},expression:{qtiClass:"sum",expressions:[{qtiClass:"variable",attributes:{identifier:outcomeIdentifier}},{qtiClass:"baseValue",attributes:{baseType:"integer"},value:"1"}]}}]}}),MAP_RESPONSE:(responseIdentifier,outcomeIdentifier)=>({qtiClass:"responseCondition",responseIf:{qtiClass:"responseIf",expression:{qtiClass:"not",expressions:[{qtiClass:"isNull",expressions:[{qtiClass:"variable",attributes:{identifier:responseIdentifier}}]}]},responseRules:[{qtiClass:"setOutcomeValue",attributes:{identifier:outcomeIdentifier},expression:{qtiClass:"sum",expressions:[{qtiClass:"variable",attributes:{identifier:outcomeIdentifier}},{qtiClass:"mapResponse",attributes:{identifier:responseIdentifier}}]}}]}}),MAP_RESPONSE_POINT:(responseIdentifier,outcomeIdentifier)=>({qtiClass:"responseCondition",responseIf:{qtiClass:"responseIf",expression:{qtiClass:"not",expressions:[{qtiClass:"isNull",expressions:[{qtiClass:"variable",attributes:{identifier:responseIdentifier}}]}]},responseRules:[{qtiClass:"setOutcomeValue",attributes:{identifier:outcomeIdentifier},expression:{qtiClass:"sum",expressions:[{qtiClass:"variable",attributes:{identifier:outcomeIdentifier}},{qtiClass:"mapResponsePoint",attributes:{identifier:responseIdentifier}}]}}]}})};return responseRules}),define("taoQtiItem/qtiItem/helper/response",["lodash","taoQtiItem/qtiItem/helper/responseRules"],function(_,responseRulesHelper){"use strict";_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,responseRulesHelper=responseRulesHelper&&Object.prototype.hasOwnProperty.call(responseRulesHelper,"default")?responseRulesHelper["default"]:responseRulesHelper;const _templateNames={MATCH_CORRECT:"http://www.imsglobal.org/question/qti_v2p1/rptemplates/match_correct",MAP_RESPONSE:"http://www.imsglobal.org/question/qti_v2p1/rptemplates/map_response",MAP_RESPONSE_POINT:"http://www.imsglobal.org/question/qti_v2p1/rptemplates/map_response_point",NONE:"no_response_processing"};var response={isUsingTemplate(response,tpl){return!!(_.isString(tpl)&&(tpl===response.template||_templateNames[tpl]===response.template))},isValidTemplateName(tplName){return!!this.getTemplateUriFromName(tplName)},getTemplateUriFromName(tplName){return _templateNames[tplName]||""},getTemplateNameFromUri(tplUri){let tplName="";return _.forIn(_templateNames,(uri,name)=>{if(uri===tplUri)return tplName=name,!1}),tplName},getTemplateNameFromResponseRules(responseIdentifier,responseRules){if(!responseRules)return"NONE";const{responseIf:{responseRules:[outcomeRules={}]=[]}={}}=responseRules,{attributes:{identifier:outcomeIdentifier}={}}=outcomeRules;return outcomeIdentifier?Object.keys(responseRulesHelper).find(key=>_.isEqual(responseRules,responseRulesHelper[key](responseIdentifier,outcomeIdentifier))):""}};return response}),define("taoQtiItem/qtiItem/helper/itemScore",[],function(){"use strict";var itemScore=responseIdentifiers=>{const outcomeExpressions=responseIdentifiers.map(outcomeIdentifier=>({qtiClass:"variable",attributes:{identifier:`SCORE_${outcomeIdentifier}`}}));return{qtiClass:"setOutcomeValue",attributes:{identifier:"SCORE"},expression:{qtiClass:"sum",expressions:outcomeExpressions}}};return itemScore}),define("taoQtiItem/qtiItem/core/Loader",["lodash","class","taoQtiItem/qtiItem/core/qtiClasses","taoQtiItem/qtiItem/core/Element","taoQtiItem/qtiItem/helper/xmlNsHandler","core/moduleLoader","taoQtiItem/qtiItem/helper/response","taoQtiItem/qtiItem/helper/itemScore"],function(_,_class,qtiClasses,Element,xmlNsHandler,moduleLoader,responseHelper,itemScoreHelper){"use strict";_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,qtiClasses=qtiClasses&&Object.prototype.hasOwnProperty.call(qtiClasses,"default")?qtiClasses["default"]:qtiClasses,Element=Element&&Object.prototype.hasOwnProperty.call(Element,"default")?Element["default"]:Element,xmlNsHandler=xmlNsHandler&&Object.prototype.hasOwnProperty.call(xmlNsHandler,"default")?xmlNsHandler["default"]:xmlNsHandler,moduleLoader=moduleLoader&&Object.prototype.hasOwnProperty.call(moduleLoader,"default")?moduleLoader["default"]:moduleLoader,responseHelper=responseHelper&&Object.prototype.hasOwnProperty.call(responseHelper,"default")?responseHelper["default"]:responseHelper,itemScoreHelper=itemScoreHelper&&Object.prototype.hasOwnProperty.call(itemScoreHelper,"default")?itemScoreHelper["default"]:itemScoreHelper;const loadPortableCustomElementProperties=(portableElement,rawProperties)=>{var properties={};_.forOwn(rawProperties,(value,key)=>{try{properties[key]=JSON.parse(value)}catch(e){properties[key]=value}}),portableElement.properties=properties},loadPortableCustomElementData=(portableElement,data)=>{portableElement.typeIdentifier=data.typeIdentifier,portableElement.markup=data.markup,portableElement.entryPoint=data.entryPoint,portableElement.libraries=data.libraries,portableElement.setNamespace("",data.xmlns),loadPortableCustomElementProperties(portableElement,data.properties)};var Loader=Class.extend({init(item,classesLocation){this.qti={},this.classesLocation={},this.item=item||null,this.setClassesLocation(classesLocation||qtiClasses)},setClassesLocation(qtiClassesList){return _.extend(this.classesLocation,qtiClassesList),this},getRequiredClasses(data){let ret=[];for(let i in data)"qtiClass"==i&&"_container"!==data[i]&&"rootElement"!==i?ret.push(data[i]):"object"==typeof data[i]&&"responseRules"!==i&&(ret=_.union(ret,this.getRequiredClasses(data[i])));return ret},loadRequiredClasses(data,callback,reload){let requiredClass;const requiredClasses=this.getRequiredClasses(data,reload),required=[];for(let i in requiredClasses)if(requiredClass=requiredClasses[i],this.classesLocation[requiredClass])required.push({module:this.classesLocation[requiredClass],category:"qti"});else throw new Error(`missing qti class location declaration : ${requiredClass}`);moduleLoader([],()=>!0).addList(required).load().then(loadeded=>{loadeded.forEach(QtiClass=>{this.qti[QtiClass.prototype.qtiClass]=QtiClass}),callback.call(this,this.qti)})},getLoadedClasses(){return _.keys(this.qti)},loadItemData(data,callback){this.loadRequiredClasses(data,Qti=>{if("object"==typeof data&&"assessmentItem"===data.qtiClass){for(let i in data.serial&&Element.unsetElement(data.serial),this.item=new Qti.assessmentItem(data.serial,data.attributes||{}),this.loadContainer(this.item.getBody(),data.body),data.outcomes){const outcome=this.buildOutcome(data.outcomes[i]);outcome&&this.item.addOutcomeDeclaration(outcome)}for(let i in data.feedbacks){const feedback=this.buildElement(data.feedbacks[i]);feedback&&this.item.addModalFeedback(feedback)}for(let i in data.stylesheets){const stylesheet=this.buildElement(data.stylesheets[i]);stylesheet&&this.item.addStylesheet(stylesheet)}let responseRules=data.responseProcessing&&data.responseProcessing.responseRules?[...data.responseProcessing.responseRules]:[];for(let i in data.responses){const responseIdentifier=data.responses[i].identifier,responseRuleItemIndex=responseRules.findIndex(_ref=>{let{responseIf:{expression:{expressions:[expression={}]=[]}={}}={}}=_ref;return expression.attributes&&expression.attributes.identifier===responseIdentifier||expression.expressions&&expression.expressions[0]&&expression.expressions[0].attributes&&expression.expressions[0].attributes.identifier===responseIdentifier}),[responseRule]=-1===responseRuleItemIndex?[]:responseRules.splice(responseRuleItemIndex,1),response=this.buildResponse(data.responses[i],responseRule);if(response){this.item.addResponseDeclaration(response);const feedbackRules=data.responses[i].feedbackRules;feedbackRules&&_.forIn(feedbackRules,(fbData,serial)=>{const{attributes:{identifier:feedbackOutcomeIdentifier}={}}=data.outcomes[fbData.feedbackOutcome]||{};response.feedbackRules[serial]=this.buildSimpleFeedbackRule(fbData,response);const feedbackResponseRuleIndex=responseRules.findIndex(_ref2=>{let{responseIf:{responseRules:[setOutcomeResponseRule={}]=[]}={}}=_ref2;const{attributes={},qtiClass}=setOutcomeResponseRule,outcomeIdentifier=attributes.identifier;return feedbackOutcomeIdentifier===outcomeIdentifier&&"setOutcomeValue"===qtiClass});-1!==feedbackResponseRuleIndex&&responseRules.splice(feedbackResponseRuleIndex,1)})}}const responseIdentifiers=Object.keys(this.item.responses||{}).map(responseKey=>this.item.responses[responseKey].attributes.identifier);if(data.responseProcessing){const customResponseProcessing=0!this.item.responses[responseKey].template);this.item.setResponseProcessing(this.buildResponseProcessing(data.responseProcessing,customResponseProcessing))}this.item.setNamespaces(data.namespaces),this.item.setSchemaLocations(data.schemaLocations),this.item.setApipAccessibility(data.apipAccessibility)}"function"==typeof callback&&callback.call(this,this.item)})},loadAndBuildElement(data,callback){this.loadRequiredClasses(data,()=>{const element=this.buildElement(data);"function"==typeof callback&&callback.call(this,element)})},loadElement(element,data,callback){this.loadRequiredClasses(data,()=>{this.loadElementData(element,data),"function"==typeof callback&&callback.call(this,element)})},loadElements(data,callback){if(!this.item)throw new Error("QtiLoader : cannot load elements in empty item");this.loadRequiredClasses(data,()=>{const allElements=this.item.getComposingElements();for(let i in data){const elementData=data[i];elementData&&elementData.qtiClass&&elementData.serial&&allElements[elementData.serial]&&this.loadElementData(allElements[elementData.serial],elementData)}"function"==typeof callback&&callback.call(this,this.item)})},buildResponse(data,responseRule){const response=this.buildElement(data);return response.template=responseHelper.getTemplateUriFromName(responseHelper.getTemplateNameFromResponseRules(data.identifier,responseRule))||data.howMatch||null,response.defaultValue=data.defaultValue||null,response.correctResponse=data.correctResponses||null,response.mapEntries=_.size(data.mapping)?data.mapping:_.size(data.areaMapping)?data.areaMapping:{},response.mappingAttributes=data.mappingAttributes||{},response},buildSimpleFeedbackRule(data,response){const feedbackRule=this.buildElement(data);feedbackRule.setCondition(response,data.condition,data.comparedValue||null),feedbackRule.feedbackOutcome=this.item.outcomes[data.feedbackOutcome]||null,feedbackRule.feedbackThen=this.item.modalFeedbacks[data.feedbackThen]||null,feedbackRule.feedbackElse=this.item.modalFeedbacks[data.feedbackElse]||null;const comparedOutcome=feedbackRule.comparedOutcome;return feedbackRule.feedbackThen&&feedbackRule.feedbackThen.data("relatedResponse",comparedOutcome),feedbackRule.feedbackElse&&feedbackRule.feedbackElse.data("relatedResponse",comparedOutcome),feedbackRule},buildOutcome(data){const outcome=this.buildElement(data);return outcome.defaultValue=data.defaultValue||null,outcome},buildResponseProcessing(data,customResponseProcessing){const rp=this.buildElement(data);return customResponseProcessing?(rp.xml=data.data,rp.processingType="custom"):rp.processingType="templateDriven",rp},loadContainer(bodyObject,bodyData){if(!Element.isA(bodyObject,"_container"))throw new Error("bodyObject must be a QTI Container");if(!(bodyData&&"string"==typeof bodyData.body&&"object"==typeof bodyData.elements))throw new Error("wrong bodydata format");const attributes=_.defaults(bodyData.attributes||{},bodyObject.attributes||{});for(let serial in bodyObject.setAttributes(attributes),bodyData.elements){const eltData=bodyData.elements[serial],element=this.buildElement(eltData);element&&bodyObject.setElement(element,bodyData.body)}bodyObject.body(xmlNsHandler.stripNs(bodyData.body))},buildElement(elementData){if(!(elementData&&elementData.qtiClass&&elementData.serial))throw new Error("wrong elementData format");const className=elementData.qtiClass;if(!this.qti[className])throw new Error(`the qti element class does not exist: ${className}`);const elt=new this.qti[className](elementData.serial);return this.loadElementData(elt,elementData),elt},loadElementData(element,data){const attributes=_.defaults(data.attributes||{},element.attributes||{});element.setAttributes(attributes);let body=data.body;return!body&&data.text&&"inlineChoice"===data.qtiClass&&(body={body:data.text,elements:{}}),element.body&&body&&element.bdy&&this.loadContainer(element.getBody(),body),element.object&&data.object&&element.object&&this.loadObjectData(element.object,data.object),Element.isA(element,"interaction")?this.loadInteractionData(element,data):Element.isA(element,"choice")?this.loadChoiceData(element,data):Element.isA(element,"math")?this.loadMathData(element,data):Element.isA(element,"infoControl")?this.loadPicData(element,data):Element.isA(element,"_tooltip")&&this.loadTooltipData(element,data),element},loadInteractionData(interaction,data){Element.isA(interaction,"blockInteraction")&&data.prompt&&this.loadContainer(interaction.prompt.getBody(),data.prompt),this.buildInteractionChoices(interaction,data),Element.isA(interaction,"customInteraction")&&this.loadPciData(interaction,data)},buildInteractionChoices(interaction,data){if(data.choices){if(Element.isA(interaction,"matchInteraction"))for(let set=0;2>set;set++){if(!data.choices[set])throw new Error(`missing match set #${set}`);const matchSet=data.choices[set];for(let serial in matchSet){const choice=this.buildElement(matchSet[serial]);choice&&interaction.addChoice(choice,set)}}else for(let serial in data.choices){const choice=this.buildElement(data.choices[serial]);choice&&interaction.addChoice(choice)}if(Element.isA(interaction,"graphicGapMatchInteraction")&&data.gapImgs)for(let serial in data.gapImgs){const gapImg=this.buildElement(data.gapImgs[serial]);gapImg&&interaction.addGapImg(gapImg)}}},loadChoiceData(choice,data){if(Element.isA(choice,"textVariableChoice"))choice.val(data.text);else if(Element.isA(choice,"gapImg"));else if(Element.isA(choice,"gapText"))choice.body()||choice.body(data.text);else if(Element.isA(choice,"containerChoice"));},loadObjectData(object,data){object.setAttributes(data.attributes),data._alt&&("object"===data._alt.qtiClass?object._alt=Loader.buildElement(data._alt):object._alt=data._alt)},loadMathData(math,data){math.ns=data.ns||{},math.setMathML(data.mathML||""),_.forIn(data.annotations||{},(value,encoding)=>{math.setAnnotation(encoding,value)})},loadTooltipData(tooltip,data){tooltip.content(data.content)},loadPciData(pci,data){loadPortableCustomElementData(pci,data)},loadPicData(pic,data){loadPortableCustomElementData(pic,data)}});return Loader}),define("taoQtiItem/qtiItem/helper/pci",["lodash"],function(_){"use strict";_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_;var pci={getRawValues:function(pciVar){if(_.isPlainObject(pciVar)){if(pciVar.base!==void 0)return _.values(pciVar.base);if(pciVar.list)return _.values(pciVar.list)}throw"unsupported type "}};return pci}),define("taoQtiItem/qtiItem/helper/container",["lodash","jquery"],function(_,$){"use strict";function _checkContainerType(element){if(_.isFunction(element.initContainer)&&_.isFunction(element.body))return!0;throw"the element is not of a container type"}function _getBodyDom(element){if(_checkContainerType(element))return $("
    ").html(element.body()).find(".x-tao-wrapper")}function _setBodyDomClass(element,newClass,oldClass){if(_checkContainerType(element)&&(oldClass||newClass)){var $wrapper=$("
    ").html(element.body());_setDomClass($wrapper,newClass,oldClass),element.body($wrapper.html())}}function _setDomClass($wrapper,newClass,oldClass){var $bodyDom=$wrapper.find(".x-tao-wrapper");$bodyDom.length||($wrapper.wrapInner("
    "),$bodyDom=$wrapper.find(".x-tao-wrapper")),oldClass&&$bodyDom.removeClass(oldClass),newClass&&$bodyDom.addClass(newClass)}function setEncodedDataToDom($wrapper,dataName,newValue,oldValue){_setDomClass($wrapper,_getEncodedDataString(dataName,newValue),_getEncodedDataString(dataName,oldValue))}function _getEncodedDataString(dataName,value){return dataName&&value?"x-tao-"+dataName+"-"+value:""}function setEncodedData(element,dataName,newValue){var oldValue=getEncodedData(element,dataName);return _setBodyDomClass(element,_getEncodedDataString(dataName,newValue),_getEncodedDataString(dataName,oldValue))}function removeEncodedData(element,dataName){var oldValue=getEncodedData(element,dataName);dataName&&oldValue&&_setBodyDomClass(element,"",_getEncodedDataString(dataName,oldValue))}function hasEncodedData(element,dataName,value){var $body=_getBodyDom(element);return!!($body&&$body.length&&dataName&&value)&&$body.hasClass(_getEncodedDataString(dataName,value))}function getEncodedData(element,dataName){var regex,matches,$body=_getBodyDom(element);if(dataName&&$body&&$body.length&&$body.attr("class")&&(regex=new RegExp("x-tao-"+dataName+"-([a-zA-Z0-9-._]*)"),matches=$body.attr("class").match(regex),matches))return matches[1]}_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,$=$&&Object.prototype.hasOwnProperty.call($,"default")?$["default"]:$;var _prefix="x-tao-",container={setEncodedData:setEncodedData,hasEncodedData:hasEncodedData,getEncodedData:getEncodedData,removeEncodedData:removeEncodedData,setEncodedDataToDom:setEncodedDataToDom};return container}),define("taoQtiItem/qtiRunner/modalFeedback/inlineRenderer",["lodash","jquery","context","taoQtiItem/qtiItem/helper/pci","taoQtiItem/qtiItem/helper/container","handlebars","lib/handlebars/helpers","iframeNotifier"],function(_,$$1,context,pci,containerHelper,Handlebars,Helpers0,iframeNotifier){"use strict";function previewOkBtn(data,options,asString){var html=Template(data,options);return asString||!0?html:$(html)}function deliveryOkBtn(data,options,asString){var html=Template$1(data,options);return asString||!0?html:$(html)}function showFeedbacks(item,loader,renderer,itemSession,onCloseCallback,onShowCallback){var firstFeedback,interactionsDisplayInfo=getInteractionsDisplayInfo(item),messages={},renderedFeebacks=[],renderingQueue=[],$itemContainer=item.getContainer(),$itemBody=$itemContainer.children(".qti-itemBody");return _.each(item.modalFeedbacks,function(feedback){var feedbackIds,message,$container,comparedOutcome,_currentMessageGroupId,interactionInfo,outcomeIdentifier=feedback.attr("outcomeIdentifier"),order=-1;if(itemSession[outcomeIdentifier]){if(feedbackIds=pci.getRawValues(itemSession[outcomeIdentifier]),-1===_.indexOf(feedbackIds,feedback.id()))return!0;if(message=getFeedbackMessageSignature(feedback),comparedOutcome=containerHelper.getEncodedData(feedback,"relatedOutcome"),interactionInfo=_.find(interactionsDisplayInfo,{responseIdentifier:comparedOutcome}),comparedOutcome&&interactionInfo?($container=interactionInfo.displayContainer,_currentMessageGroupId=interactionInfo.messageGroupId,order=interactionInfo.order):($container=$itemBody,_currentMessageGroupId="__item__"),messages[_currentMessageGroupId]||(messages[_currentMessageGroupId]=[]),0<=_.indexOf(messages[_currentMessageGroupId],message))return!0;messages[_currentMessageGroupId].push(message),renderingQueue.push({feedback:feedback,$container:$container,order:order})}}),renderingQueue.length&&(renderingQueue=_.sortBy(renderingQueue,"order"),clearModalFeedbacks($itemContainer),_.each(renderingQueue,function(renderingToken){renderModalFeedback(renderingToken.feedback,loader,renderer,renderingToken.$container,$itemContainer,function(renderingData){firstFeedback||(firstFeedback=$$1(renderingData.dom)),$$1("img",renderingData.dom).on("load",function(){iframeNotifier.parent("itemcontentchange")}),renderedFeebacks.push(renderingData),renderedFeebacks.length===renderingQueue.length&&(iframeNotifier.parent("itemcontentchange"),firstFeedback&&autoscroll(firstFeedback),_.isFunction(onShowCallback)&&onShowCallback())})}),replaceControl(renderedFeebacks,$itemContainer,onCloseCallback)),renderingQueue.length}function getQtiContainer(){for(var me=window,$container=null,max=10;me&&me.__knownParent__&&max--;)if(me=me.parent,me&&me.$&&($container=me.$("#qti-content"),$container.length))return $container;return null}function autoscroll(element){var currentScrollTop,minScrollTop,maxScrollTop,scrollTop,$element=$$1(element),$container=getQtiContainer();$element.length&&$container&&(currentScrollTop=$container.scrollTop(),maxScrollTop=$element.offset().top,minScrollTop=maxScrollTop-$container.height()+$element.outerHeight(),scrollTop=Math.max(Math.min(maxScrollTop,currentScrollTop),minScrollTop),scrollTop!==currentScrollTop&&$container.animate({scrollTop:scrollTop}))}function extractDisplayInfo(interaction){var messageGroupId,$displayContainer,$interactionContainer=interaction.getContainer(),responseIdentifier=interaction.attr("responseIdentifier");return interaction.is("inlineInteraction")?($displayContainer=$interactionContainer.closest("[class*=\" col-\"], [class^=\"col-\"]"),messageGroupId=$displayContainer.attr("data-messageGroupId"),!messageGroupId&&(messageGroupId=_.uniqueId("inline_message_group_"),$displayContainer.attr("data-messageGroupId",messageGroupId))):(messageGroupId=responseIdentifier,$displayContainer=$interactionContainer),{responseIdentifier:responseIdentifier,interactionContainer:$interactionContainer,displayContainer:$displayContainer,messageGroupId:messageGroupId,order:-1}}function getInteractionsDisplayInfo(item){var interactionsDisplayInfo=[],$itemContainer=item.getContainer(),interactionOrder=0;return _.each(item.getComposingElements(),function(element){var responseIdentifier;element.is("interaction")&&(responseIdentifier=element.attr("responseIdentifier"),interactionsDisplayInfo.push(extractDisplayInfo(element)))}),$itemContainer.find(".qti-interaction").each(function(){var interactionContainer=this;_.each(interactionsDisplayInfo,function(_interactionInfo){if(_interactionInfo.interactionContainer[0]===interactionContainer)return _interactionInfo.order=interactionOrder,!1}),interactionOrder++}),interactionsDisplayInfo=_.sortBy(interactionsDisplayInfo,"order"),interactionsDisplayInfo}function clearModalFeedbacks($itemContainer){$itemContainer.find(".qti-modalFeedback").remove()}function renderModalFeedback(feedback,loader,renderer,$container,$itemContainer,renderedCallback){renderer.load(function(){var $modalFeedback=$$1(feedback.render({inline:!0})),done=function done(){renderedCallback({identifier:feedback.id(),serial:feedback.getSerial(),dom:$modalFeedback})};$container.append($modalFeedback),Promise.race([Promise.all(_.map(feedback.getComposingElements(),function(elt){return elt.postRender({},"",renderer).pop()})),new Promise(function(resolve,reject){_.delay(reject,timeout,new Error("Post rendering ran out of time."))})]).then(done).catch(function(err){throw done(),new Error("Error in post rendering : "+err)})},loader.getLoadedClasses())}function replaceControl(renderedFeebacks,$itemContainer,callback){var $scope,$controls,$toggleContainer;window.parent&&window.parent.parent&&window.parent.parent.$?$itemContainer.parents(".tao-preview-scope").length?($scope=window.parent.parent.$("#preview-console"),$controls=$scope.find(".preview-console-header .action-bar li:visible"),$toggleContainer=$scope.find(".console-button-action-bar"),initControlToggle(renderedFeebacks,$itemContainer,$controls,$toggleContainer,previewOkBtn,callback)):($scope=window.parent.parent.$("body.qti-test-scope .bottom-action-bar"),$controls=$scope.find("li:visible"),$toggleContainer=$scope.find(".navi-box-list"),initControlToggle(renderedFeebacks,$itemContainer,$controls,$toggleContainer,deliveryOkBtn,callback)):($scope=$itemContainer.find("#modalFeedbacks"),initControlToggle(renderedFeebacks,$itemContainer,$$1(),$scope,previewOkBtn,callback))}function initControlToggle(renderedFeebacks,$itemContainer,$controls,$toggleContainer,toggleButtonTemplate,callback){var $ok=$$1(toggleButtonTemplate()).click(function(){_.each(renderedFeebacks,function(fb){fb.dom.hide()}),uncover([$itemContainer]),$ok.remove(),$controls.show(),callback()});$controls.hide(),$toggleContainer.append($ok),cover([$itemContainer])}function cover(interactionContainers){var $cover=$$1("
    ");_.each(interactionContainers,function($interaction){$interaction.append($cover)})}function uncover(interactionContainers){_.each(interactionContainers,function($interaction){$interaction.find(".interaction-cover").remove()})}function getFeedbackMessageSignature(feedback){return(""+feedback.body()+feedback.attr("title")).toLowerCase().trim().replace(/x-tao-[a-zA-Z0-9\-._\s]*/g,"")}_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,$$1=$$1&&Object.prototype.hasOwnProperty.call($$1,"default")?$$1["default"]:$$1,context=context&&Object.prototype.hasOwnProperty.call(context,"default")?context["default"]:context,pci=pci&&Object.prototype.hasOwnProperty.call(pci,"default")?pci["default"]:pci,containerHelper=containerHelper&&Object.prototype.hasOwnProperty.call(containerHelper,"default")?containerHelper["default"]:containerHelper,Handlebars=Handlebars&&Object.prototype.hasOwnProperty.call(Handlebars,"default")?Handlebars["default"]:Handlebars,Helpers0=Helpers0&&Object.prototype.hasOwnProperty.call(Helpers0,"default")?Helpers0["default"]:Helpers0,iframeNotifier=iframeNotifier&&Object.prototype.hasOwnProperty.call(iframeNotifier,"default")?iframeNotifier["default"]:iframeNotifier,Helpers0.__initialized||(Helpers0(Handlebars),Helpers0.__initialized=!0);var Template=Handlebars.template({compiler:[8,">= 4.3.0"],main:function(container,depth0,helpers,partials,data){var lookupProperty=container.lookupProperty||function(parent,propertyName){return Object.prototype.hasOwnProperty.call(parent,propertyName)?parent[propertyName]:void 0};return"
  • \n \n "+container.escapeExpression((lookupProperty(helpers,"__")||depth0&&lookupProperty(depth0,"__")||container.hooks.helperMissing).call(null==depth0?container.nullContext||{}:depth0,"OK",{name:"__",hash:{},data:data,loc:{start:{line:3,column:28},end:{line:3,column:39}}}))+"\n \n
  • "},useData:!0});Helpers0.__initialized||(Helpers0(Handlebars),Helpers0.__initialized=!0);var Template$1=Handlebars.template({compiler:[8,">= 4.3.0"],main:function(container,depth0,helpers,partials,data){return"
  • \n \n \n OK\n \n
  • "},useData:!0}),timeout=1e3*(0!0).addList(required.map(module=>({module,category:"qti"}))).load().then(loaded=>{loaded.forEach(clazz=>{_isValidRenderer(clazz)&&(_renderers[clazz.qtiClass]=clazz)}),"function"==typeof callback&&callback.call(self,_renderers)}),this},this.unload=function unload(){return this.themeLoader&&themeLoader(options.themes).unload(),this},this.setShuffledChoices=function(interaction,choices,identificationType){Element.isA(interaction,"interaction")&&(this.shuffledChoices[interaction.getSerial()]=_.pluck(interactionHelper.findChoices(interaction,choices,identificationType),"serial"))},this.getShuffledChoices=function(interaction,reshuffle,returnedType){let serial,i,choices=[];if(Element.isA(interaction,"interaction")){if(serial=interaction.getSerial(),this.shuffledChoices[serial]&&!reshuffle)Element.isA(interaction,"matchInteraction")?_.forEach(choices,function(choice,index){2>index&&_.forEach(this.shuffledChoices[serial][i],function(choiceSerial){choice.push(interaction.getChoice(choiceSerial))})}):_.forEach(this.shuffledChoices[serial],function(choiceSerial){choices.push(interaction.getChoice(choiceSerial))});else if(Element.isA(interaction,"matchInteraction"))for(this.shuffledChoices[serial]=[],i=0;2>i;i++)choices[i]=interactionHelper.shuffleChoices(interaction.getChoices(i)),this.shuffledChoices[serial][i]=_.pluck(choices[i],"serial");else choices=interactionHelper.shuffleChoices(interaction.getChoices()),this.shuffledChoices[serial]=_.pluck(choices,"serial");return"serial"===returnedType||"identifier"===returnedType?interactionHelper.convertChoices(choices,returnedType):_.clone(choices)}return[]},this.getRenderers=function(){return _renderers},this.getLocations=function(){return _locations},this.resolveUrl=function resolveUrl(url){return options.assetManager?"string"==typeof url&&0_.indexOf(options.include,typeIdentifier))||void configLoadingStack.push(loadModuleConfig(self.get(typeIdentifier)))}),Promise.all(configLoadingStack).then(function(moduleConfigs){var requireConfigAliases=_.reduce(moduleConfigs,function(acc,paths){return _.merge(acc,paths)},{});_requirejs.config({paths:requireConfigAliases})})})}),loadPromise.then(function(){self.trigger("runtimesloaded")}).catch(function(err){self.trigger("error",err)}),loadPromise},loadCreators:function loadCreators(options){var loadPromise,self=this;return options=_.defaults(options||{},_defaultLoadingOptions),loadPromise=self.loadRuntimes(options).then(function(){var requiredCreatorHooks=[];return _.forIn(self._registry,function(versions,typeIdentifier){var portableElementModel=self.get(typeIdentifier);if(portableElementModel.creator&&portableElementModel.creator.hook){if(portableElementModel.enabled){if(_.isArray(options.include)&&0>_.indexOf(options.include,typeIdentifier))return!0;}else if(!_.isArray(options.include)||0>_.indexOf(options.include,typeIdentifier))return!0;requiredCreatorHooks.push(portableElementModel.creator.hook.replace(/\.js$/,""))}}),requiredCreatorHooks.length?new Promise(function(resolve,reject){_requirejs(requiredCreatorHooks,function(){var creators={};_.each(arguments,function(creatorHook){var id=creatorHook.getTypeIdentifier(),portableElementModel=self.get(id),i=_.findIndex(self._registry[id],{version:portableElementModel.version});0>i?self.trigger("error","no creator found for id/version "+id+"/"+portableElementModel.version):(self._registry[id][i].creator.module=creatorHook,creators[id]=creatorHook)}),resolve(creators)},reject)}):Promise.resolve({})}),loadPromise.then(function(creators){return self.trigger("creatorsloaded",creators),creators}).catch(function(err){self.trigger("error",err)}),loadPromise},enable:function enable(typeIdentifier,version){var portableElement=this.get(typeIdentifier,version);return portableElement&&(portableElement.enabled=!0),this},disable:function disable(typeIdentifier,version){var portableElement=this.get(typeIdentifier,version);return portableElement&&(portableElement.enabled=!1),this},isEnabled:function isEnabled(typeIdentifier,version){var portableElement=this.get(typeIdentifier,version);return portableElement&&!0===portableElement.enabled}}))}}),define("taoQtiItem/qtiCreator/helper/qtiElements",["jquery","lodash","i18n","services/features"],function($,_,__,featuresService){"use strict";const QtiElements={classes:{itemBody:{parents:["bodyElement"],contains:["block"],abstract:!0},atomicBlock:{parents:["blockStatic","bodyElement","flowStatic"],contains:["inline"],abstract:!0},atomicInline:{parents:["bodyElement","flowStatic","inlineStatic"],contains:["inline"],abstract:!0},simpleBlock:{parents:["blockStatic","bodyElement","flowStatic"],contains:["block"],abstract:!0},simpleInline:{parents:["bodyElement","flowStatic","inlineStatic"],contains:["inline"],abstract:!0},flowStatic:{parents:["flow"],abstract:!0},blockStatic:{parents:["block"],abstract:!0},inlineStatic:{parents:["inline"],abstract:!0},flow:{parents:["objectFlow"],abstract:!0},tableCell:{parents:["bodyElement"],contains:["flow"],abstract:!0},caption:{parents:["bodyElement"],contains:["inline"],xhtml:!0},col:{parents:["bodyElement"],xhtml:!0},colgroup:{parents:["bodyElement"],contains:["col"],xhtml:!0},div:{parents:["blockStatic","bodyElement","flowStatic"],contains:["flow"],xhtml:!0},dl:{parents:["blockStatic","bodyElement","flowStatic"],contains:["dlElement"],xhtml:!0},dt:{parents:["dlElement"],contains:["inline"],xhtml:!0},dd:{parents:["dlElement"],contains:["flow"],xhtml:!0},hr:{parents:["blockStatic","bodyElement","flowStatic"],xhtml:!0},math:{parents:["blockStatic","flowStatic","inlineStatic"],xhtml:!0},li:{parents:["bodyElement"],contains:["flow"],xhtml:!0},ol:{parents:["blockStatic","bodyElement","flowStatic"],contains:["li"],xhtml:!0},ul:{parents:["blockStatic","bodyElement","flowStatic"],contains:["li"],xhtml:!0},object:{parents:["bodyElement","flowStatic","inlineStatic"],contains:["objectFlow"],xhtml:!0},param:{parents:["objectFlow"],xhtml:!0},table:{parents:["blockStatic","bodyElement","flowStatic"],contains:["caption","col","colgroup","thead","tfoot","tbody"],xhtml:!0},tbody:{parents:["bodyElement"],contains:["tr"],xhtml:!0},tfoot:{parents:["bodyElement"],contains:["tr"],xhtml:!0},thead:{parents:["bodyElement"],contains:["tr"],xhtml:!0},td:{parents:["tableCell"],xhtml:!0},th:{parents:["tableCell"],xhtml:!0},tr:{parents:["bodyElement"],contains:["tableCell"],xhtml:!0},a:{parents:["simpleInline"],xhtml:!0},abbr:{parents:["simpleInline"],xhtml:!0},acronym:{parents:["simpleInline"],xhtml:!0},b:{parents:["simpleInline"],xhtml:!0},big:{parents:["simpleInline"],xhtml:!0},cite:{parents:["simpleInline"],xhtml:!0},code:{parents:["simpleInline"],xhtml:!0},dfn:{parents:["simpleInline"],xhtml:!0},em:{parents:["simpleInline"],xhtml:!0},i:{parents:["simpleInline"],xhtml:!0},kbd:{parents:["simpleInline"],xhtml:!0},q:{parents:["simpleInline"],xhtml:!0},samp:{parents:["simpleInline"],xhtml:!0},small:{parents:["simpleInline"],xhtml:!0},span:{parents:["simpleInline"],xhtml:!0},strong:{parents:["simpleInline"],xhtml:!0},sub:{parents:["simpleInline"],xhtml:!0},sup:{parents:["simpleInline"],xhtml:!0},tt:{parents:["simpleInline"],xhtml:!0},var:{parents:["simpleInline"],xhtml:!0},blockquote:{parents:["simpleBlock"],xhtml:!0},address:{parents:["atomicBlock"],xhtml:!0},h1:{parents:["atomicBlock"],xhtml:!0},h2:{parents:["atomicBlock"],xhtml:!0},h3:{parents:["atomicBlock"],xhtml:!0},h4:{parents:["atomicBlock"],xhtml:!0},h5:{parents:["atomicBlock"],xhtml:!0},h6:{parents:["atomicBlock"],xhtml:!0},p:{parents:["atomicBlock"],xhtml:!0},pre:{parents:["atomicBlock"],xhtml:!0},img:{parents:["atomicInline"],xhtml:!0,attributes:["src","alt","longdesc","height","width"]},br:{parents:["atomicInline"],xhtml:!0},infoControl:{parents:["blockStatic","bodyElement","flowStatic"],qti:!0},textRun:{parents:["inlineStatic","flowstatic"],qti:!0},feedbackInline:{parents:["simpleInline","feedbackElement"],qti:!0},feedbackBlock:{parents:["simpleBlock"],qti:!0},rubricBlock:{parents:["simpleBlock"],qti:!0},blockInteraction:{parents:["block","flow","interaction"],qti:!0},inlineInteraction:{parents:["inline","flow","interaction"],qti:!0},gap:{parents:["inlineStatic"],qti:!0},hottext:{parents:["flowstatic","inlineStatic"],contains:["inlineStatic"],qti:!0},printedVariable:{parents:["bodyElement","flowStatic","inlineStatic","textOrVariable"],qti:!0},prompt:{parents:["bodyElement"],contains:["inlineStatic"],qti:!0},templateElement:{parents:["bodyElement"],qti:!0},templateBlock:{parents:["blockStatic","flowStatic","templateElement"],contains:["blockStatic"],qti:!0},templateInline:{parents:["inlineStatic","flowStatic","templateElement"],contains:["inlineStatic"],qti:!0},choiceInteraction:{parents:["blockInteraction"],qti:!0},associateInteraction:{parents:["blockInteraction"],qti:!0},orderInteraction:{parents:["blockInteraction"],qti:!0},matchInteraction:{parents:["blockInteraction"],qti:!0},hottextInteraction:{parents:["blockInteraction"],qti:!0},gapMatchInteraction:{parents:["blockInteraction"],qti:!0},mediaInteraction:{parents:["blockInteraction"],qti:!0},sliderInteraction:{parents:["blockInteraction"],qti:!0},uploadInteraction:{parents:["blockInteraction"],qti:!0},drawingInteraction:{parents:["blockInteraction"],qti:!0},graphicInteraction:{parents:["blockInteraction"],qti:!0},hotspotInteraction:{parents:["graphicInteraction"],qti:!0},graphicAssociateInteraction:{parents:["graphicInteraction"],qti:!0},graphicOrderInteraction:{parents:["graphicInteraction"],qti:!0},graphicGapMatchInteraction:{parents:["graphicInteraction"],qti:!0},selectPointInteraction:{parents:["graphicInteraction"],qti:!0},textEntryInteraction:{parents:["stringInteraction","inlineInteraction"],qti:!0},extendedTextInteraction:{parents:["stringInteraction","blockInteraction"],qti:!0},inlineChoiceInteraction:{parents:["inlineInteraction"],qti:!0},endAttemptInteraction:{parents:["inlineInteraction"],qti:!0},customInteraction:{parents:["block","flow","interaction"],qti:!0},_container:{parents:["block"],qti:!0}},cache:{containable:{},children:{},parents:{}},getAllowedContainersElements(qtiClass,$container){const classes=QtiElements.getAllowedContainers(qtiClass);let jqSelector="";for(let i in classes)classes[i].qti||(jqSelector+=`${classes[i]}, `);return jqSelector&&(jqSelector=jqSelector.substring(0,jqSelector.length-2)),$(jqSelector,$container?$container:$(document)).filter(":not([data-qti-type])")},getAllowedContainers(qtiClass){let ret;if(QtiElements.cache.containable[qtiClass])ret=QtiElements.cache.containable[qtiClass];else{ret=[];const parents=QtiElements.getParentClasses(qtiClass,!0);for(let aClass in QtiElements.classes){const model=QtiElements.classes[aClass];if(model.contains){const intersect=_.intersection(model.contains,parents);intersect.length&&(!model.abstract&&ret.push(aClass),ret=_.union(ret,QtiElements.getChildClasses(aClass,!0)))}}QtiElements.cache.containable[qtiClass]=ret}return ret},getAllowedContents(qtiClass,recursive,checked){let ret=[];checked=checked||{};const model=QtiElements.classes[qtiClass];if(model&&model.contains)for(let i in model.contains){const contain=model.contains[i];if(!checked[contain]){checked[contain]=!0,ret.push(contain);const children=QtiElements.getChildClasses(contain,!0);for(let j in children){const child=children[j];checked[child]||(checked[child]=!0,ret.push(child),recursive&&(ret=_.union(ret,QtiElements.getAllowedContents(child,!0,checked))))}recursive&&(ret=_.union(ret,QtiElements.getAllowedContents(contain,!0,checked)))}}const parents=QtiElements.getParentClasses(qtiClass,!0);for(let i in parents)ret=_.union(ret,QtiElements.getAllowedContents(parents[i],recursive,checked));return _.uniq(ret,!1)},isAllowedClass(qtiContainerClass,qtiContentClass){const allowedClasses=QtiElements.getAllowedContents(qtiContainerClass);return 0<=_.indexOf(allowedClasses,qtiContentClass)},getParentClasses(qtiClass,recursive){let ret;if(recursive&&QtiElements.cache.parents[qtiClass])ret=QtiElements.cache.parents[qtiClass];else{if(ret=[],QtiElements.classes[qtiClass]&&(ret=QtiElements.classes[qtiClass].parents,recursive)){for(let i in ret)ret=_.union(ret,QtiElements.getParentClasses(ret[i],recursive));ret=_.uniq(ret,!1)}QtiElements.cache.parents[qtiClass]=ret}return ret},getChildClasses(qtiClass,recursive,type){let ret;const cacheType=type?type:"all";if(recursive&&QtiElements.cache.children[qtiClass]&&QtiElements.cache.children[qtiClass][cacheType])ret=QtiElements.cache.children[qtiClass][cacheType];else{for(let aClass in ret=[],QtiElements.classes){const model=QtiElements.classes[aClass];0<=_.indexOf(model.parents,qtiClass)&&(type?model[type]&&ret.push(aClass):ret.push(aClass),recursive&&(ret=_.union(ret,QtiElements.getChildClasses(aClass,recursive,type))))}QtiElements.cache.children[qtiClass]||(QtiElements.cache.children[qtiClass]={}),QtiElements.cache.children[qtiClass][cacheType]=ret}return ret},isBlock(qtiClass){return QtiElements.is(qtiClass,"block")},isInline(qtiClass){return QtiElements.is(qtiClass,"inline")},is(qtiClass,topClass){if(qtiClass===topClass)return!0;else{const parents=QtiElements.getParentClasses(qtiClass,!0);return 0<=_.indexOf(parents,topClass)}},isVisible(qtiClass){return this.is(qtiClass,"customInteraction")?featuresService.isVisible(`taoQtiItem/creator/customInteraction/${qtiClass.replace(/Interaction$/,"").replace(/^customInteraction\./,"")}`):!this.is(qtiClass,"interaction")||featuresService.isVisible(`taoQtiItem/creator/interaction/${qtiClass.replace(/Interaction$/,"")}`)},getAvailableAuthoringElements(){const tagTitles={commonInteractions:__("Common Interactions"),inlineInteractions:__("Inline Interactions"),graphicInteractions:__("Graphic Interactions")},authoringElements={choiceInteraction:{label:__("Choice Interaction"),description:__("Select a single (radio buttons) or multiple (check boxes) responses among a set of choices."),icon:"icon-choice",short:__("Choice"),qtiClass:"choiceInteraction",tags:[tagTitles.commonInteractions,"mcq"],group:"common-interactions"},orderInteraction:{label:__("Order Interaction"),icon:"icon-order",description:__("Arrange a list of choices in the correct order."),short:__("Order"),qtiClass:"orderInteraction",tags:[tagTitles.commonInteractions,"ordering"],group:"common-interactions"},associateInteraction:{label:__("Associate Interaction"),icon:"icon-associate",description:__("Create pair(s) from a series of choices."),short:__("Associate"),qtiClass:"associateInteraction",tags:[tagTitles.commonInteractions,"association"],group:"common-interactions"},matchInteraction:{label:__("Match Interaction"),icon:"icon-match",description:__("Create association(s) between two sets of choices displayed in a table (row and column)."),short:__("Match"),qtiClass:"matchInteraction",tags:[tagTitles.commonInteractions,"association"],group:"common-interactions"},hottextInteraction:{label:__("Hottext Interaction"),icon:"icon-hottext",description:__("Select one or more text parts (hottext) within a text."),short:__("Hottext"),qtiClass:"hottextInteraction",tags:[tagTitles.commonInteractions,"text"],group:"common-interactions"},gapMatchInteraction:{label:__("Gap Match Interaction"),icon:"icon-gap-match",description:__(" Fill in the gaps in a text from a set of choices."),short:__("Gap Match"),qtiClass:"gapMatchInteraction",tags:[tagTitles.commonInteractions,"text","association"],group:"common-interactions"},sliderInteraction:{label:__("Slider Interaction"),icon:"icon-slider",description:__("Select a value within a numerical range."),short:__("Slider"),qtiClass:"sliderInteraction",tags:[tagTitles.commonInteractions,"special"],group:"common-interactions"},extendedTextInteraction:{label:__("Extended Text Interaction"),icon:"icon-extended-text",description:__("Collect open-ended information in one or more text area(s) (strings or numeric values)."),short:__("Extended Text"),qtiClass:"extendedTextInteraction",tags:[tagTitles.commonInteractions,"text"],group:"common-interactions"},uploadInteraction:{label:__("File Upload Interaction"),icon:"icon-upload",description:__("Upload a file (e.g. document, picture...) as a response."),short:__("File Upload"),qtiClass:"uploadInteraction",tags:[tagTitles.commonInteractions,"special"],group:"common-interactions"},mediaInteraction:{label:__("Media Interaction"),icon:"icon-media",description:__("Control the playing parameters (auto-start, loop) of a video or audio file and report the number of time it has been played."),short:__("Media"),qtiClass:"mediaInteraction",tags:[tagTitles.commonInteractions,"media"],group:"common-interactions"},_container:{label:__("Text Block"),icon:"icon-font",description:__("Block contains the content (stimulus) of the item such as text or image. It is also required for Inline Interactions."),short:__("Block"),qtiClass:"_container",tags:[tagTitles.inlineInteractions,"text"],group:"inline-interactions"},inlineChoiceInteraction:{label:__("Inline Choice Interaction"),icon:"icon-inline-choice",description:__("Select a choice from a drop-down list."),short:__("Inline Choice"),qtiClass:"inlineChoiceInteraction",tags:[tagTitles.inlineInteractions,"inline-interactions","mcq"],group:"inline-interactions"},textEntryInteraction:{label:__("Text Entry Interaction"),icon:"icon-text-entry",description:__("Collect open-ended information in a short text input (strings or numeric values)."),short:__("Text Entry"),qtiClass:"textEntryInteraction",tags:[tagTitles.inlineInteractions,"inline-interactions","text"],group:"inline-interactions"},endAttemptInteraction:{label:__("End Attempt Interaction"),icon:"icon-end-attempt",description:__("Trigger the end of the item attempt."),short:__("End Attempt"),qtiClass:"endAttemptInteraction",tags:[tagTitles.inlineInteractions,"inline-interactions","button","submit"],group:"inline-interactions"},hotspotInteraction:{label:__("Hotspot Interaction"),icon:"icon-hotspot",description:__("Select one or more areas (hotspots) displayed on an picture."),short:__("Hotspot"),qtiClass:"hotspotInteraction",tags:[tagTitles.graphicInteractions,"mcq"],group:"graphic-interactions"},graphicOrderInteraction:{label:__("Graphic Order Interaction"),icon:"icon-graphic-order",description:__("Order the areas (hotspots) displayed on a picture."),short:__("Order"),qtiClass:"graphicOrderInteraction",tags:[tagTitles.graphicInteractions,"ordering"],group:"graphic-interactions"},graphicAssociateInteraction:{label:__("Graphic Associate Interaction"),icon:"icon-graphic-associate",description:__("Create association(s) between areas (hotspots) displayed on a picture."),short:__("Associate"),qtiClass:"graphicAssociateInteraction",tags:[tagTitles.graphicInteractions,"association"],group:"graphic-interactions"},graphicGapMatchInteraction:{label:__("Graphic Gap Match Interaction"),icon:"icon-graphic-gap",description:__("Fill in the gaps on a picture with a set of image choices."),short:__("Gap Match"),qtiClass:"graphicGapMatchInteraction",tags:[tagTitles.graphicInteractions,"association"],group:"graphic-interactions"},selectPointInteraction:{label:__("Select Point Interaction"),icon:"icon-select-point",description:__("Position one or more points on a picture (response areas are not displayed)."),short:__("Select Point"),qtiClass:"selectPointInteraction",tags:[tagTitles.graphicInteractions],group:"graphic-interactions"}},availableElements={};for(const[elementId,element]of Object.entries(authoringElements))this.isVisible(elementId)&&(availableElements[elementId]=element);return availableElements}};return QtiElements}),define("taoQtiItem/portableElementRegistry/factory/ciRegistry",["lodash","i18n","taoQtiItem/portableElementRegistry/factory/factory","taoQtiItem/qtiCreator/helper/qtiElements"],function(_,__,portableElementRegistry,qtiElements){"use strict";return function customInteractionRegistry(){return portableElementRegistry({getAuthoringData(typeIdentifier){let options=1\n */\n(function(){\n 'use strict';\n\n\n\n var loaderScript = document.getElementById('amd-loader');\n var configUrl = loaderScript.getAttribute('data-config');\n var bundle = loaderScript.getAttribute('data-bundle');\n\n var loadController = function loadController(){\n var controllerOptions = {};\n var controllerPath = loaderScript.getAttribute('data-controller');\n var params = loaderScript.getAttribute('data-params');\n try{\n controllerOptions = JSON.parse(params);\n } catch(err){\n controllerOptions = {};\n }\n window.require([controllerPath], function(controller) {\n var startController = function startController(){\n if(!window.started){\n window.started = true;\n controller.start(controllerOptions);\n }\n };\n document.addEventListener('readystatechange', startController, false);\n if (document.readyState === 'complete') {\n startController();\n }\n });\n };\n\n //always start to load the config\n window.require([configUrl], function() {\n\n //define the global loading mechanism\n if(!window.loadBundles){\n //keep tracl of loaded bundles, even if require does it,\n //this prevent some unecessary cycles\n window.loaded = {};\n\n /**\n * Loading entry point for inter bundle dependency,\n * always take the bundles from the params and window.bundles\n * @param {String[]} [bundles] - an optional list of bundle to load\n */\n window.loadBundles = function loadBundles(bundles){\n bundles = bundles || [];\n bundles = bundles.concat(window.bundles)\n bundles = bundles.filter( function(item, index){\n return item && bundles.indexOf(item) === index && window.loaded[item] !== true;\n });\n require(bundles, function(){\n bundles.forEach( function( item ) {\n window.loaded[item] = true;\n });\n loadController();\n });\n }\n }\n\n if(bundle || (window.bundles && window.bundles.length)) {\n window.loadBundles([bundle]);\n } else {\n loadController();\n }\n });\n})();\n\ndefine(\"loader/bootstrap\", function(){});\n\n","define('taoQtiItem/qtiItem/core/qtiClasses',[],function () { 'use strict';\n\n var qtiClasses = {\n _container: 'taoQtiItem/qtiItem/core/Container',\n assessmentItem: 'taoQtiItem/qtiItem/core/Item',\n responseProcessing: 'taoQtiItem/qtiItem/core/ResponseProcessing',\n _simpleFeedbackRule: 'taoQtiItem/qtiItem/core/response/SimpleFeedbackRule',\n stylesheet: 'taoQtiItem/qtiItem/core/Stylesheet',\n math: 'taoQtiItem/qtiItem/core/Math',\n figure: 'taoQtiItem/qtiItem/core/Figure',\n img: 'taoQtiItem/qtiItem/core/Img',\n figcaption: 'taoQtiItem/qtiItem/core/Figcaption',\n object: 'taoQtiItem/qtiItem/core/Object',\n outcomeDeclaration: 'taoQtiItem/qtiItem/core/variables/OutcomeDeclaration',\n responseDeclaration: 'taoQtiItem/qtiItem/core/variables/ResponseDeclaration',\n rubricBlock: 'taoQtiItem/qtiItem/core/RubricBlock',\n associableHotspot: 'taoQtiItem/qtiItem/core/choices/AssociableHotspot',\n gap: 'taoQtiItem/qtiItem/core/choices/Gap',\n gapImg: 'taoQtiItem/qtiItem/core/choices/GapImg',\n gapText: 'taoQtiItem/qtiItem/core/choices/GapText',\n hotspotChoice: 'taoQtiItem/qtiItem/core/choices/HotspotChoice',\n hottext: 'taoQtiItem/qtiItem/core/choices/Hottext',\n inlineChoice: 'taoQtiItem/qtiItem/core/choices/InlineChoice',\n simpleAssociableChoice: 'taoQtiItem/qtiItem/core/choices/SimpleAssociableChoice',\n simpleChoice: 'taoQtiItem/qtiItem/core/choices/SimpleChoice',\n associateInteraction: 'taoQtiItem/qtiItem/core/interactions/AssociateInteraction',\n choiceInteraction: 'taoQtiItem/qtiItem/core/interactions/ChoiceInteraction',\n endAttemptInteraction: 'taoQtiItem/qtiItem/core/interactions/EndAttemptInteraction',\n extendedTextInteraction: 'taoQtiItem/qtiItem/core/interactions/ExtendedTextInteraction',\n gapMatchInteraction: 'taoQtiItem/qtiItem/core/interactions/GapMatchInteraction',\n graphicAssociateInteraction: 'taoQtiItem/qtiItem/core/interactions/GraphicAssociateInteraction',\n graphicGapMatchInteraction: 'taoQtiItem/qtiItem/core/interactions/GraphicGapMatchInteraction',\n graphicOrderInteraction: 'taoQtiItem/qtiItem/core/interactions/GraphicOrderInteraction',\n hotspotInteraction: 'taoQtiItem/qtiItem/core/interactions/HotspotInteraction',\n hottextInteraction: 'taoQtiItem/qtiItem/core/interactions/HottextInteraction',\n inlineChoiceInteraction: 'taoQtiItem/qtiItem/core/interactions/InlineChoiceInteraction',\n matchInteraction: 'taoQtiItem/qtiItem/core/interactions/MatchInteraction',\n mediaInteraction: 'taoQtiItem/qtiItem/core/interactions/MediaInteraction',\n orderInteraction: 'taoQtiItem/qtiItem/core/interactions/OrderInteraction',\n prompt: 'taoQtiItem/qtiItem/core/interactions/Prompt',\n selectPointInteraction: 'taoQtiItem/qtiItem/core/interactions/SelectPointInteraction',\n sliderInteraction: 'taoQtiItem/qtiItem/core/interactions/SliderInteraction',\n textEntryInteraction: 'taoQtiItem/qtiItem/core/interactions/TextEntryInteraction',\n uploadInteraction: 'taoQtiItem/qtiItem/core/interactions/UploadInteraction',\n feedbackBlock: 'taoQtiItem/qtiItem/core/feedbacks/FeedbackBlock',\n feedbackInline: 'taoQtiItem/qtiItem/core/feedbacks/FeedbackInline',\n modalFeedback: 'taoQtiItem/qtiItem/core/feedbacks/ModalFeedback',\n customInteraction: 'taoQtiItem/qtiItem/core/interactions/CustomInteraction',\n infoControl: 'taoQtiItem/qtiItem/core/PortableInfoControl',\n include: 'taoQtiItem/qtiItem/core/Include',\n table: 'taoQtiItem/qtiItem/core/Table',\n printedVariable: 'taoQtiItem/qtiItem/core/PrintedVariable',\n _tooltip: 'taoQtiItem/qtiItem/core/Tooltip'\n };\n\n return qtiClasses;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/util',['lodash'], function (_) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2015 (original work) Open Assessment Technologies SA\n *\n */\n\n var util = {\n buildSerial: function buildSerial(prefix) {\n var id = prefix || '';\n var chars = 'abcdefghijklmnopqrstuvwxyz0123456789';\n for (var i = 0; i < 22; i++) {\n id += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n return id;\n },\n\n /**\n * Generates an id for a Qti element (the generation is different from identifier)\n * @param {Object} item - the element related item\n * @param {String} prefix - identifier prefix\n * @returns {String} the identifier\n * @throws {TypeError} if there is no item\n */\n buildId: function buildId(item, prefix) {\n var id;\n var usedIds;\n var i = 1;\n var suffix = '';\n var exists = false;\n\n if (!item) {\n throw new TypeError('A item is required to generate a unique identifier');\n }\n\n usedIds = item.getUsedIds();\n\n do {\n exists = false;\n id = prefix + suffix;\n if (_.contains(usedIds, id)) {\n exists = true;\n suffix = '_' + i;\n i++;\n }\n } while (exists);\n\n return id;\n },\n\n /**\n * Generates an identifier for a Qti element\n * @param {Object} item - the element related item\n * @param {String} prefix - identifier prefix\n * @param {Boolean} [useSuffix = true] - add a \"_ + index\" to the identifier\n * @returns {String} the identifier\n * @throws {TypeError} if there is no item\n */\n buildIdentifier: function buildIdentifier(item, prefix, useSuffix) {\n var id;\n var usedIds;\n var suffix = '';\n var i = 1;\n var exists = false;\n\n if (!item) {\n throw new TypeError('A item is required to generate a unique identifier');\n }\n\n if (!prefix) {\n throw new TypeError('Prefix is required to build an identifier');\n }\n\n usedIds = item.getUsedIdentifiers();\n useSuffix = _.isUndefined(useSuffix) ? true : useSuffix;\n\n if (prefix) {\n prefix = prefix\n .replace(/_[0-9]+$/gi, '_') //detect incremental id of type choice_12, response_3, etc.\n .replace(/[^a-zA-Z0-9_]/gi, '_')\n .replace(/(_)+/gi, '_');\n if (useSuffix) {\n suffix = '_' + i;\n }\n }\n\n do {\n exists = false;\n id = prefix + suffix;\n if (usedIds[id]) {\n exists = true;\n suffix = '_' + i;\n i++;\n }\n } while (exists);\n\n return id;\n },\n\n findInCollection: function findInCollection(element, collectionNames, searchedSerial) {\n var found = null;\n\n if (_.isString(collectionNames)) {\n collectionNames = [collectionNames];\n }\n\n if (_.isArray(collectionNames)) {\n _.each(collectionNames, function(collectionName) {\n //get collection to search in (resolving case like interaction.choices.0\n var collection = element;\n _.each(collectionName.split('.'), function(nameToken) {\n collection = collection[nameToken];\n });\n var elt = collection[searchedSerial];\n\n if (elt) {\n found = { parent: element, element: elt };\n return false; //break the each loop\n }\n\n //search inside each elements:\n _.each(collection, function(elt) {\n if (_.isFunction(elt.find)) {\n found = elt.find(searchedSerial);\n if (found) {\n return false; //break the each loop\n }\n }\n });\n\n if (found) {\n return false; //break the each loop\n }\n });\n } else {\n throw new Error('invalid argument : collectionNames must be an array or a string');\n }\n\n return found;\n },\n addMarkupNamespace: function addMarkupNamespace(markup, ns) {\n if (ns) {\n markup = markup.replace(/<(\\/)?([a-z:]+)(\\s?)([^><]*)>/g, function($0, $1, $2, $3, $4) {\n if ($2.indexOf(':') > 0) {\n return $0;\n }\n $1 = $1 || '';\n $3 = $3 || '';\n return '<' + $1 + ns + ':' + $2 + $3 + $4 + '>';\n });\n return markup;\n }\n return markup;\n },\n removeMarkupNamespaces: function removeMarkupNamespace(markup) {\n return markup.replace(/<(\\/)?(\\w*):([^>]*)>/g, '<$1$3>');\n },\n getMarkupUsedNamespaces: function getMarkupUsedNamespaces(markup) {\n var namespaces = [];\n markup.replace(/<(\\/)?(\\w*):([^>]*)>/g, function(original, slash, ns, node) {\n namespaces.push(ns);\n return '<' + slash + node + '>';\n });\n return _.uniq(namespaces);\n }\n };\n\n return util;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/rendererConfig',['lodash', 'jquery'], function (_, $) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;\n\n var rendererConfigHelper = {};\n\n rendererConfigHelper.getOptionsFromArguments = function(args) {\n var options = {\n data: {},\n placeholder: null,\n subclass: '',\n renderer: null\n };\n\n _.each(args, function(arg) {\n if (arg) {\n if (arg.isRenderer) {\n options.renderer = arg;\n } else if (arg instanceof $ && arg.length) {\n options.placeholder = arg;\n } else if (_.isString(arg)) {\n options.subclass = arg;\n } else if (_.isPlainObject(arg)) {\n options.data = arg;\n } else {\n console.log('invalid arg', arg, args);\n }\n }\n });\n\n return options;\n };\n\n return rendererConfigHelper;\n\n});\n\n","define('taoQtiItem/qtiItem/core/Element',['jquery', 'lodash', 'class', 'core/logger', 'taoQtiItem/qtiItem/helper/util', 'taoQtiItem/qtiItem/helper/rendererConfig'], function ($, _, _class, loggerFactory, util, rendererConfig) { 'use strict';\n\n $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n loggerFactory = loggerFactory && Object.prototype.hasOwnProperty.call(loggerFactory, 'default') ? loggerFactory['default'] : loggerFactory;\n util = util && Object.prototype.hasOwnProperty.call(util, 'default') ? util['default'] : util;\n rendererConfig = rendererConfig && Object.prototype.hasOwnProperty.call(rendererConfig, 'default') ? rendererConfig['default'] : rendererConfig;\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2015 (original work) Open Assessment Technologies SA\n *\n */\n\n var _instances = {};\n\n /**\n * Create a logger\n */\n var logger = loggerFactory('taoQtiItem/qtiItem/core/Element');\n\n var Element = Class.extend({\n qtiClass: '',\n serial: '',\n rootElement: null,\n init: function(serial, attributes) {\n //init own attributes\n this.attributes = {};\n\n //system properties, for item creator internal use only\n this.metaData = {};\n\n //init call in the format init(attributes)\n if (typeof serial === 'object') {\n attributes = serial;\n serial = '';\n }\n\n if (!serial) {\n serial = util.buildSerial(this.qtiClass + '_');\n }\n\n if (serial && (typeof serial !== 'string' || !serial.match(/^[a-z_0-9]*$/i))) {\n throw 'invalid QTI serial : (' + typeof serial + ') ' + serial;\n }\n\n if (!_instances[serial]) {\n _instances[serial] = this;\n this.serial = serial;\n this.setAttributes(attributes || {});\n } else {\n throw 'a QTI Element with the same serial already exists ' + serial;\n }\n\n if (typeof this.initContainer === 'function') {\n this.initContainer(arguments[2] || '');\n }\n if (typeof this.initObject === 'function') {\n this.initObject();\n }\n },\n is: function(qtiClass) {\n return qtiClass === this.qtiClass;\n },\n placeholder: function() {\n return '{{' + this.serial + '}}';\n },\n getSerial: function() {\n return this.serial;\n },\n getUsedIdentifiers: function() {\n var usedIds = {};\n var elts = this.getComposingElements();\n for (var i in elts) {\n var elt = elts[i];\n var id = elt.attr('identifier');\n if (id) {\n //warning: simplistic implementation, allow only one unique identifier in the item no matter the element class/type\n usedIds[id] = elt;\n }\n }\n return usedIds;\n },\n\n /**\n * Get the ids in use. (id is different from identifier)\n * @returns {Array} of the ids in use\n */\n getUsedIds: function getUsedIds() {\n var usedIds = [];\n _.forEach(this.getComposingElements(), function(elt) {\n var id = elt.attr('id');\n if (id && !_.contains(usedIds, id)) {\n usedIds.push(id);\n }\n });\n return usedIds;\n },\n\n attr: function(name, value) {\n if (name) {\n if (value !== undefined) {\n this.attributes[name] = value;\n } else {\n if (typeof name === 'object') {\n for (var prop in name) {\n this.attr(prop, name[prop]);\n }\n } else if (typeof name === 'string') {\n if (this.attributes[name] === undefined) {\n return undefined;\n } else {\n return this.attributes[name];\n }\n }\n }\n }\n return this;\n },\n data: function(name, value) {\n if (name) {\n if (value !== undefined) {\n this.metaData[name] = value;\n $(document).trigger('metaChange.qti-widget', { element: this, key: name, value: value });\n } else {\n if (typeof name === 'object') {\n for (var prop in name) {\n this.data(prop, name[prop]);\n }\n } else if (typeof name === 'string') {\n if (this.metaData[name] === undefined) {\n return undefined;\n } else {\n return this.metaData[name];\n }\n }\n }\n }\n return this;\n },\n removeData: function(name) {\n delete this.metaData[name];\n return this;\n },\n removeAttr: function(name) {\n return this.removeAttributes(name);\n },\n setAttributes: function(attributes) {\n if (!_.isPlainObject(attributes)) {\n logger.warn('attributes should be a plain object');\n }\n this.attributes = attributes;\n return this;\n },\n getAttributes: function() {\n return _.clone(this.attributes);\n },\n removeAttributes: function(attrNames) {\n if (typeof attrNames === 'string') {\n attrNames = [attrNames];\n }\n for (var i in attrNames) {\n delete this.attributes[attrNames[i]];\n }\n return this;\n },\n getComposingElements: function() {\n var elts = {};\n function append(element) {\n elts[element.getSerial()] = element; //pass individual object by ref, instead of the whole list(object)\n elts = _.extend(elts, element.getComposingElements());\n }\n if (typeof this.initContainer === 'function') {\n append(this.getBody());\n }\n if (typeof this.initObject === 'function') {\n append(this.getObject());\n }\n _.each(this.metaData, function(v) {\n if (Element.isA(v, '_container')) {\n append(v);\n } else if (_.isArray(v)) {\n _.each(v, function(v) {\n if (Element.isA(v, '_container')) {\n append(v);\n }\n });\n }\n });\n return elts;\n },\n getUsedClasses: function() {\n var ret = [this.qtiClass],\n composingElts = this.getComposingElements();\n\n _.each(composingElts, function(elt) {\n ret.push(elt.qtiClass);\n });\n\n return _.uniq(ret);\n },\n find: function(serial) {\n var found = null;\n var object, body;\n\n if (typeof this.initObject === 'function') {\n object = this.getObject();\n if (object.serial === serial) {\n found = { parent: this, element: object, location: 'object' };\n }\n }\n\n if (!found && typeof this.initContainer === 'function') {\n body = this.getBody();\n if (body.serial === serial) {\n found = { parent: this, element: body, location: 'body' };\n } else {\n found = this.getBody().find(serial, this);\n }\n }\n\n return found;\n },\n parent: function() {\n var item = this.getRootElement();\n if (item) {\n var found = item.find(this.getSerial());\n if (found) {\n return found.parent;\n }\n }\n return null;\n },\n /**\n * @deprecated - use setRootElement() instead\n */\n setRelatedItem: function(item) {\n logger.warn('Deprecated use of setRelatedItem()');\n this.setRootElement(item);\n },\n setRootElement: function(item) {\n var composingElts, i;\n\n if (Element.isA(item, 'assessmentItem')) {\n this.rootElement = item;\n composingElts = this.getComposingElements();\n for (i in composingElts) {\n composingElts[i].setRootElement(item);\n }\n }\n },\n /**\n * @deprecated - use getRootElement() instead\n */\n getRelatedItem: function() {\n logger.warn('Deprecated use of getRelatedItem()');\n return this.getRootElement();\n },\n getRootElement: function() {\n var ret = null;\n if (Element.isA(this.rootElement, 'assessmentItem')) {\n ret = this.rootElement;\n }\n return ret;\n },\n setRenderer: function(renderer) {\n if (renderer && renderer.isRenderer) {\n this.renderer = renderer;\n var elts = this.getComposingElements();\n for (var serial in elts) {\n elts[serial].setRenderer(renderer);\n }\n } else {\n throw 'invalid qti rendering engine';\n }\n },\n getRenderer: function() {\n return this.renderer;\n },\n /**\n * Render the element. Arguments are all optional and can be given in any order.\n * Argument parsing is based on argument type and is done by taoQtiItem/qtiItem/core/helpers/rendererConfig\n * @param {Renderer} renderer - specify which renderer to use\n * @param {jQuery} placeholder - DOM element that will be replaced by the rendered element\n * @param {Object} data - template data for the rendering\n * @param {String} subclass - subclass enables different behaviour of the same qti class in different contexts (eg. we could have different rendering for simpleChoice according to where it is being used: simpleChoice.orderInteraction, simpleChoice.choiceInteraction...)\n * @returns {String} - the rendered element as an HTML string\n */\n render: function render() {\n var args = rendererConfig.getOptionsFromArguments(arguments);\n var _renderer = args.renderer || this.getRenderer();\n var rendering;\n\n var tplData = {},\n defaultData = {\n tag: this.qtiClass,\n serial: this.serial,\n attributes: this.getAttributes()\n };\n\n if (!_renderer) {\n throw new Error('render: no renderer found for the element ' + this.qtiClass + ':' + this.serial);\n }\n\n if (typeof this.initContainer === 'function') {\n //allow body to have a different renderer if it has its own renderer set\n defaultData.body = this.getBody().render(args.renderer);\n }\n if (typeof this.initObject === 'function') {\n defaultData.object = {\n attributes: this.object.getAttributes()\n };\n defaultData.object.attributes.data = _renderer.resolveUrl(this.object.attr('data'));\n }\n\n tplData = _.merge(defaultData, args.data || {});\n tplData = _renderer.getData(this, tplData, args.subclass);\n rendering = _renderer.renderTpl(this, tplData, args.subclass);\n if (args.placeholder) {\n args.placeholder.replaceWith(rendering);\n }\n\n return rendering;\n },\n postRender: function(data, altClassName, renderer) {\n var postRenderers = [];\n var _renderer = renderer || this.getRenderer();\n\n if (typeof this.initContainer === 'function') {\n //allow body to have a different renderer if it has its own renderer set\n postRenderers = this.getBody().postRender(data, '', renderer);\n }\n\n if (_renderer) {\n postRenderers.push(_renderer.postRender(this, data, altClassName));\n } else {\n throw 'postRender: no renderer found for the element ' + this.qtiClass + ':' + this.serial;\n }\n\n return _.compact(postRenderers);\n },\n getContainer: function($scope, subclass) {\n var renderer = this.getRenderer();\n if (renderer) {\n return renderer.getContainer(this, $scope, subclass);\n } else {\n throw 'getContainer: no renderer found for the element ' + this.qtiClass + ':' + this.serial;\n }\n },\n toArray: function() {\n var arr = {\n serial: this.serial,\n type: this.qtiClass,\n attributes: this.getAttributes()\n };\n\n if (typeof this.initContainer === 'function') {\n arr.body = this.getBody().toArray();\n }\n if (typeof this.initObject === 'function') {\n arr.object = this.object.toArray();\n }\n\n return arr;\n },\n isEmpty: function() {\n //tells whether the element should be considered empty or not, from the rendering point of view\n return false;\n },\n addClass: function(className) {\n var clazz = this.attr('class') || '';\n if (!_containClass(clazz, className)) {\n this.attr('class', clazz + (clazz.length ? ' ' : '') + className);\n }\n },\n hasClass: function(className) {\n return _containClass(this.attr('class'), className);\n },\n removeClass: function(className) {\n var clazz = this.attr('class') || '';\n if (clazz) {\n var regex = new RegExp('(?:^|\\\\s)' + className + '(?:\\\\s|$)');\n clazz = clazz.replace(regex, ' ').trim();\n\n if (clazz) {\n this.attr('class', clazz);\n } else {\n this.removeAttr('class');\n }\n }\n },\n /**\n * Add or remove class. Setting the optional state will force addition/removal.\n * State is here to keep the jQuery syntax\n *\n * @param {String} className\n * @param {Boolean} [state]\n */\n toggleClass: function(className, state) {\n if (typeof state === 'boolean') {\n return state ? this.addClass(className) : this.removeClass(className);\n }\n\n if (this.hasClass(className)) {\n return this.removeClass(className);\n }\n return this.addClass(className);\n },\n isset: function() {\n return Element.issetElement(this.serial);\n },\n unset: function() {\n return Element.unsetElement(this.serial);\n }\n });\n\n var _containClass = function(allClassStr, className) {\n var regex = new RegExp('(?:^|\\\\s)' + className + '(?:\\\\s|$)', '');\n return allClassStr && regex.test(allClassStr);\n };\n\n //helpers\n Element.isA = function(qtiElement, qtiClass) {\n return qtiElement instanceof Element && qtiElement.is(qtiClass);\n };\n\n Element.getElementBySerial = function(serial) {\n return _instances[serial];\n };\n\n Element.issetElement = function(serial) {\n return !!_instances[serial];\n };\n\n /**\n * Unset a registered element from it's serial\n * @param {String} serial - the element serial\n * @returns {Boolean} true if unset\n */\n Element.unsetElement = function(serial) {\n var element = Element.getElementBySerial(serial);\n\n if (element) {\n var composingElements = element.getComposingElements();\n _.each(composingElements, function(elt) {\n delete _instances[elt.serial];\n });\n delete _instances[element.serial];\n\n return true;\n }\n return false;\n };\n\n return Element;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/xmlNsHandler',[],function () { 'use strict';\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2017-2022 (original work) Open Assessment Technologies SA\n */\n\n /**\n * XML namespace handling\n */\n\n /**\n * Elements that need to be prefixed\n *\n * @see http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd\n * @type {string}\n */\n const prefixed = 'article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section';\n\n /**\n * Find a possibly existing prefix\n *\n * @param namespaces\n * @param html5Ns\n * @returns {*}\n */\n function getPrefix(namespaces, html5Ns) {\n let key;\n for (key in namespaces) {\n if (namespaces[key] === html5Ns) {\n return key;\n }\n }\n return 'qh5';\n }\n\n var xmlNsHandler = {\n /**\n * Remove prefix to make sure elements are properly displayed\n *\n * @param body\n */\n stripNs: function stripNs(body) {\n const pattern = '([\\\\w]+)\\\\:(' + prefixed + ')';\n const openRegEx = new RegExp('(<' + pattern + ')', 'gi');\n const closeRegEx = new RegExp('(<\\\\/' + pattern + '>)', 'gi');\n return body.replace(openRegEx, '<$3').replace(closeRegEx, '');\n },\n\n /**\n * Add a prefix to those elements that require one\n *\n * @param xml\n * @param namespaces\n * @returns {*}\n */\n restoreNs: function restoreNs(xml, namespaces, ignoreMarkup = false) {\n let xmlCopy = xml;\n if (ignoreMarkup) {\n // cut from xmlCopy ...\n // because markup should be html without namespace qh5\n xmlCopy = xml.replace(/((?=)+)/gim, '');\n }\n const xmlRe = new RegExp('(<(' + prefixed + ')[^>]*>|<\\\\/(' + prefixed + ')>)', 'gi');\n const tagRe = new RegExp('((<)(' + prefixed + ')([^>]*)(>)|(<\\\\/)(' + prefixed + ')(>))', 'i');\n const xmlMatch = xmlCopy.match(xmlRe);\n const imsXsd = 'http://www.imsglobal.org/xsd';\n const html5Ns = imsXsd + '/imsqtiv2p2_html5_v1p0';\n const prefix = getPrefix(namespaces, html5Ns);\n const prefixAtt = 'xmlns:' + prefix + '=\"' + html5Ns + '\"';\n let i = xmlMatch ? xmlMatch.length : 0;\n\n if (!xmlMatch) {\n return xml;\n }\n\n while (i--) {\n const tagMatch = xmlMatch[i].match(tagRe);\n xml = xml.replace(\n xmlMatch[i],\n tagMatch[5]\n ? '<' + prefix + ':' + tagMatch[3] + tagMatch[4] + '>'\n : ''\n );\n }\n\n // we found matches but no namespace has been set\n if (xmlMatch.length && xml.indexOf(prefixAtt) === -1) {\n xml = xml.replace(' ({\n qtiClass: 'responseCondition',\n responseIf: {\n qtiClass: 'responseIf',\n expression: {\n qtiClass: 'match',\n expressions: [\n {\n qtiClass: 'variable',\n attributes: {\n identifier: responseIdentifier,\n },\n },\n {\n qtiClass: 'correct',\n attributes: {\n identifier: responseIdentifier,\n },\n },\n ],\n },\n responseRules: [\n {\n qtiClass: 'setOutcomeValue',\n attributes: {\n identifier: outcomeIdentifier,\n },\n expression: {\n qtiClass: 'sum',\n expressions: [\n {\n qtiClass: 'variable',\n attributes: {\n identifier: outcomeIdentifier,\n },\n },\n {\n qtiClass: 'baseValue',\n attributes: {\n baseType: 'integer'\n },\n value: '1',\n },\n ],\n },\n },\n ],\n },\n }),\n MAP_RESPONSE: (responseIdentifier, outcomeIdentifier) => ({\n qtiClass: 'responseCondition',\n responseIf: {\n qtiClass: 'responseIf',\n expression: {\n qtiClass: 'not',\n expressions: [\n {\n qtiClass: 'isNull',\n expressions: [{\n qtiClass: 'variable',\n attributes: {\n identifier: responseIdentifier,\n },\n }],\n },\n ],\n },\n responseRules: [\n {\n qtiClass: 'setOutcomeValue',\n attributes: {\n identifier: outcomeIdentifier,\n },\n expression: {\n qtiClass: 'sum',\n expressions: [\n {\n qtiClass: 'variable',\n attributes: {\n identifier: outcomeIdentifier,\n }\n },\n {\n qtiClass: 'mapResponse',\n attributes: {\n identifier: responseIdentifier,\n },\n },\n ],\n },\n },\n ],\n },\n }),\n MAP_RESPONSE_POINT: (responseIdentifier, outcomeIdentifier) => ({\n qtiClass: 'responseCondition',\n responseIf: {\n qtiClass: 'responseIf',\n expression: {\n qtiClass: 'not',\n expressions: [\n {\n qtiClass: 'isNull',\n expressions: [{\n qtiClass: 'variable',\n attributes: {\n identifier: responseIdentifier,\n },\n }],\n },\n ],\n },\n responseRules: [\n {\n qtiClass: 'setOutcomeValue',\n attributes: {\n identifier: outcomeIdentifier,\n },\n expression: {\n qtiClass: 'sum',\n expressions: [\n {\n qtiClass: 'variable',\n attributes: {\n identifier: outcomeIdentifier,\n }\n },\n {\n qtiClass: 'mapResponsePoint',\n attributes: {\n identifier: responseIdentifier,\n },\n },\n ],\n },\n },\n ],\n },\n }),\n };\n\n return responseRules;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/response',['lodash', 'taoQtiItem/qtiItem/helper/responseRules'], function (_, responseRulesHelper) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n responseRulesHelper = responseRulesHelper && Object.prototype.hasOwnProperty.call(responseRulesHelper, 'default') ? responseRulesHelper['default'] : responseRulesHelper;\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2014-2020 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n */\n\n const _templateNames = {\n MATCH_CORRECT: 'http://www.imsglobal.org/question/qti_v2p1/rptemplates/match_correct',\n MAP_RESPONSE: 'http://www.imsglobal.org/question/qti_v2p1/rptemplates/map_response',\n MAP_RESPONSE_POINT: 'http://www.imsglobal.org/question/qti_v2p1/rptemplates/map_response_point',\n NONE: 'no_response_processing'\n };\n\n\n var response = {\n isUsingTemplate(response, tpl) {\n if (_.isString(tpl)) {\n if (tpl === response.template || _templateNames[tpl] === response.template) {\n return true;\n }\n }\n\n return false;\n },\n isValidTemplateName(tplName) {\n return !!this.getTemplateUriFromName(tplName);\n },\n getTemplateUriFromName(tplName) {\n return _templateNames[tplName] || '';\n },\n getTemplateNameFromUri(tplUri) {\n let tplName = '';\n\n _.forIn(_templateNames, (uri, name) => {\n if (uri === tplUri) {\n tplName = name;\n return false;\n }\n });\n\n return tplName;\n },\n getTemplateNameFromResponseRules(responseIdentifier, responseRules) {\n if (!responseRules) {\n return 'NONE';\n }\n\n const {\n responseIf: {\n responseRules: [outcomeRules = {}] = [],\n } = {}\n } = responseRules;\n const {\n attributes: {\n identifier: outcomeIdentifier,\n } = {},\n } = outcomeRules;\n\n if (!outcomeIdentifier) {\n return '';\n }\n\n return Object.keys(responseRulesHelper).find(\n (key) => _.isEqual(responseRules, responseRulesHelper[key](responseIdentifier, outcomeIdentifier))\n );\n }\n };\n\n return response;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/itemScore',[],function () { 'use strict';\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2020 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n */\n\n /**\n * Returns iteraction score response rule object\n *\n * @param {String} responseIdentifiers interactions reponse indentifiers\n * @returns {Obeject}\n */\n var itemScore = (responseIdentifiers) => {\n const outcomeExpressions = responseIdentifiers.map((outcomeIdentifier) => ({\n qtiClass: 'variable',\n attributes: {\n identifier: `SCORE_${outcomeIdentifier}`,\n },\n }));\n\n return {\n qtiClass: 'setOutcomeValue',\n attributes: {\n identifier: 'SCORE',\n },\n expression: {\n qtiClass: 'sum',\n expressions: outcomeExpressions,\n },\n };\n };\n\n return itemScore;\n\n});\n\n","define('taoQtiItem/qtiItem/core/Loader',['lodash', 'class', 'taoQtiItem/qtiItem/core/qtiClasses', 'taoQtiItem/qtiItem/core/Element', 'taoQtiItem/qtiItem/helper/xmlNsHandler', 'core/moduleLoader', 'taoQtiItem/qtiItem/helper/response', 'taoQtiItem/qtiItem/helper/itemScore'], function (_, _class, qtiClasses, Element, xmlNsHandler, moduleLoader, responseHelper, itemScoreHelper) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n qtiClasses = qtiClasses && Object.prototype.hasOwnProperty.call(qtiClasses, 'default') ? qtiClasses['default'] : qtiClasses;\n Element = Element && Object.prototype.hasOwnProperty.call(Element, 'default') ? Element['default'] : Element;\n xmlNsHandler = xmlNsHandler && Object.prototype.hasOwnProperty.call(xmlNsHandler, 'default') ? xmlNsHandler['default'] : xmlNsHandler;\n moduleLoader = moduleLoader && Object.prototype.hasOwnProperty.call(moduleLoader, 'default') ? moduleLoader['default'] : moduleLoader;\n responseHelper = responseHelper && Object.prototype.hasOwnProperty.call(responseHelper, 'default') ? responseHelper['default'] : responseHelper;\n itemScoreHelper = itemScoreHelper && Object.prototype.hasOwnProperty.call(itemScoreHelper, 'default') ? itemScoreHelper['default'] : itemScoreHelper;\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2015-2020 (original work) Open Assessment Technologies SA ;\n *\n */\n\n /**\n * If a property is given as a serialized JSON object, parse it directly to a JS object\n */\n const loadPortableCustomElementProperties = (portableElement, rawProperties) => {\n var properties = {};\n\n _.forOwn(rawProperties, (value, key) => {\n try {\n properties[key] = JSON.parse(value);\n } catch (e) {\n properties[key] = value;\n }\n });\n portableElement.properties = properties;\n };\n\n const loadPortableCustomElementData = (portableElement, data) => {\n portableElement.typeIdentifier = data.typeIdentifier;\n portableElement.markup = data.markup;\n portableElement.entryPoint = data.entryPoint;\n portableElement.libraries = data.libraries;\n portableElement.setNamespace('', data.xmlns);\n\n loadPortableCustomElementProperties(portableElement, data.properties);\n };\n\n var Loader = Class.extend({\n init(item, classesLocation) {\n this.qti = {}; //loaded qti classes are store here\n this.classesLocation = {};\n this.item = item || null; //starts either from scratch or with an existing item object\n\n this.setClassesLocation(classesLocation || qtiClasses); //load default location for qti classes model\n },\n setClassesLocation(qtiClassesList) {\n _.extend(this.classesLocation, qtiClassesList);\n\n return this;\n },\n getRequiredClasses(data) {\n let ret = [];\n\n for (let i in data) {\n if (i === 'qtiClass' && data[i] !== '_container' && i !== 'rootElement') {\n //although a _container is a concrete class in TAO, it is not defined in QTI standard\n ret.push(data[i]);\n } else if (typeof data[i] === 'object' && i !== 'responseRules') {\n //responseRules should'nt be part of the parsing\n ret = _.union(ret, this.getRequiredClasses(data[i]));\n }\n }\n\n return ret;\n },\n loadRequiredClasses(data, callback, reload) {\n let requiredClass;\n const requiredClasses = this.getRequiredClasses(data, reload);\n const required = [];\n\n for (let i in requiredClasses) {\n requiredClass = requiredClasses[i];\n if (this.classesLocation[requiredClass]) {\n required.push({\n module: this.classesLocation[requiredClass],\n category: 'qti'\n });\n } else {\n throw new Error(`missing qti class location declaration : ${requiredClass}`);\n }\n }\n\n moduleLoader([], () => true).addList(required).load().then(loadeded => {\n loadeded.forEach(QtiClass => {\n this.qti[QtiClass.prototype.qtiClass] = QtiClass;\n });\n callback.call(this, this.qti);\n });\n },\n getLoadedClasses() {\n return _.keys(this.qti);\n },\n loadItemData(data, callback) {\n this.loadRequiredClasses(data, Qti => {\n if (typeof data === 'object' && data.qtiClass === 'assessmentItem') {\n //unload an item from it's serial (in case of a reload)\n if (data.serial) {\n Element.unsetElement(data.serial);\n }\n\n this.item = new Qti.assessmentItem(data.serial, data.attributes || {});\n this.loadContainer(this.item.getBody(), data.body);\n\n for (let i in data.outcomes) {\n const outcome = this.buildOutcome(data.outcomes[i]);\n\n if (outcome) {\n this.item.addOutcomeDeclaration(outcome);\n }\n }\n\n for (let i in data.feedbacks) {\n const feedback = this.buildElement(data.feedbacks[i]);\n\n if (feedback) {\n this.item.addModalFeedback(feedback);\n }\n }\n\n for (let i in data.stylesheets) {\n const stylesheet = this.buildElement(data.stylesheets[i]);\n\n if (stylesheet) {\n this.item.addStylesheet(stylesheet);\n }\n }\n\n //important : build responses after all modal feedbacks and outcomes has been loaded, because the simple feedback rules need to reference them\n let responseRules = data.responseProcessing && data.responseProcessing.responseRules\n ? [...data.responseProcessing.responseRules]\n : [];\n for (let i in data.responses) {\n const responseIdentifier = data.responses[i].identifier;\n const responseRuleItemIndex = responseRules.findIndex(({ responseIf: {\n expression: {\n expressions: [expression = {}] = [],\n } = {}\n } = {} }) => expression.attributes\n && expression.attributes.identifier === responseIdentifier\n || (\n expression.expressions\n && expression.expressions[0]\n && expression.expressions[0].attributes\n && expression.expressions[0].attributes.identifier === responseIdentifier\n )\n );\n const [responseRule] = responseRuleItemIndex !== -1\n ? responseRules.splice(responseRuleItemIndex, 1)\n : [];\n\n const response = this.buildResponse(\n data.responses[i],\n responseRule\n );\n\n if (response) {\n this.item.addResponseDeclaration(response);\n\n const feedbackRules = data.responses[i].feedbackRules;\n\n if (feedbackRules) {\n _.forIn(feedbackRules, (fbData, serial) => {\n const {\n attributes: {\n identifier: feedbackOutcomeIdentifier,\n } = {}\n } = data.outcomes[fbData.feedbackOutcome] || {};\n response.feedbackRules[serial] = this.buildSimpleFeedbackRule(fbData, response);\n\n // remove feedback response rule from response rules array\n const feedbackResponseRuleIndex = responseRules.findIndex(({\n responseIf: {\n responseRules: [setOutcomeResponseRule = {}] = [],\n } = {}\n }) => {\n const { attributes = {}, qtiClass } = setOutcomeResponseRule;\n const outcomeIdentifier = attributes.identifier;\n\n return feedbackOutcomeIdentifier === outcomeIdentifier\n && qtiClass === 'setOutcomeValue';\n });\n\n if (feedbackResponseRuleIndex !== -1) {\n responseRules.splice(feedbackResponseRuleIndex, 1);\n }\n });\n }\n }\n }\n\n const responseIdentifiers = Object.keys(this.item.responses || {})\n .map((responseKey) => this.item.responses[responseKey].attributes.identifier);\n\n if (data.responseProcessing) {\n const customResponseProcessing =\n (\n responseRules.length > 0\n && !(\n responseRules.length === 1\n && _.isEqual(\n responseRules[0],\n itemScoreHelper(\n responseIdentifiers\n )\n )\n )\n )\n || (\n this.item.responses\n && Object.keys(this.item.responses)\n .some((responseKey) => !this.item.responses[responseKey].template)\n );\n\n this.item.setResponseProcessing(this.buildResponseProcessing(data.responseProcessing, customResponseProcessing));\n }\n this.item.setNamespaces(data.namespaces);\n this.item.setSchemaLocations(data.schemaLocations);\n this.item.setApipAccessibility(data.apipAccessibility);\n }\n\n if (typeof callback === 'function') {\n callback.call(this, this.item);\n }\n });\n },\n loadAndBuildElement(data, callback) {\n this.loadRequiredClasses(data, () => {\n const element = this.buildElement(data);\n\n if (typeof callback === 'function') {\n callback.call(this, element);\n }\n });\n },\n loadElement(element, data, callback) {\n this.loadRequiredClasses(data, () => {\n this.loadElementData(element, data);\n\n if (typeof callback === 'function') {\n callback.call(this, element);\n }\n });\n },\n /**\n * Load ALL given elements into existing loaded item\n *\n * @todo to be renamed to loadItemElements\n * @param {object} data\n * @param {function} callback\n * @returns {undefined}\n */\n loadElements(data, callback) {\n if (!this.item) {\n throw new Error('QtiLoader : cannot load elements in empty item');\n }\n\n this.loadRequiredClasses(data, () => {\n const allElements = this.item.getComposingElements();\n\n for (let i in data) {\n const elementData = data[i];\n\n if (elementData && elementData.qtiClass && elementData.serial) {\n //find and update element\n if (allElements[elementData.serial]) {\n this.loadElementData(allElements[elementData.serial], elementData);\n }\n }\n }\n\n if (typeof callback === 'function') {\n callback.call(this, this.item);\n }\n });\n },\n buildResponse(data, responseRule) {\n const response = this.buildElement(data);\n\n response.template = responseHelper.getTemplateUriFromName(\n responseHelper.getTemplateNameFromResponseRules(data.identifier, responseRule)\n )\n || data.howMatch\n || null;\n\n response.defaultValue = data.defaultValue || null;\n response.correctResponse = data.correctResponses || null;\n\n if (_.size(data.mapping)) {\n response.mapEntries = data.mapping;\n } else if (_.size(data.areaMapping)) {\n response.mapEntries = data.areaMapping;\n } else {\n response.mapEntries = {};\n }\n\n response.mappingAttributes = data.mappingAttributes || {};\n\n return response;\n },\n buildSimpleFeedbackRule(data, response) {\n const feedbackRule = this.buildElement(data);\n\n feedbackRule.setCondition(response, data.condition, data.comparedValue || null);\n\n // feedbackRule.comparedOutcome = this.item.responses[data.comparedOutcome] || null;\n feedbackRule.feedbackOutcome = this.item.outcomes[data.feedbackOutcome] || null;\n feedbackRule.feedbackThen = this.item.modalFeedbacks[data.feedbackThen] || null;\n feedbackRule.feedbackElse = this.item.modalFeedbacks[data.feedbackElse] || null;\n\n //associate the compared outcome to the feedbacks if applicable\n const comparedOutcome = feedbackRule.comparedOutcome;\n\n if (feedbackRule.feedbackThen) {\n feedbackRule.feedbackThen.data('relatedResponse', comparedOutcome);\n }\n\n if (feedbackRule.feedbackElse) {\n feedbackRule.feedbackElse.data('relatedResponse', comparedOutcome);\n }\n\n return feedbackRule;\n },\n buildOutcome(data) {\n const outcome = this.buildElement(data);\n outcome.defaultValue = data.defaultValue || null;\n\n return outcome;\n },\n buildResponseProcessing(data, customResponseProcessing) {\n const rp = this.buildElement(data);\n\n if (customResponseProcessing) {\n rp.xml = data.data;\n rp.processingType = 'custom';\n } else {\n rp.processingType = 'templateDriven';\n }\n\n return rp;\n },\n loadContainer(bodyObject, bodyData) {\n if (!Element.isA(bodyObject, '_container')) {\n throw new Error('bodyObject must be a QTI Container');\n }\n\n if (!(bodyData && typeof bodyData.body === 'string' && typeof bodyData.elements === 'object')) {\n throw new Error('wrong bodydata format');\n }\n //merge attributes when loading element data\n const attributes = _.defaults(bodyData.attributes || {}, bodyObject.attributes || {});\n bodyObject.setAttributes(attributes);\n\n for (let serial in bodyData.elements) {\n const eltData = bodyData.elements[serial];\n const element = this.buildElement(eltData);\n\n //check if class is loaded:\n if (element) {\n bodyObject.setElement(element, bodyData.body);\n }\n }\n\n bodyObject.body(xmlNsHandler.stripNs(bodyData.body));\n },\n buildElement(elementData) {\n if (!(elementData && elementData.qtiClass && elementData.serial)) {\n throw new Error('wrong elementData format');\n }\n\n const className = elementData.qtiClass;\n\n if (!this.qti[className]) {\n throw new Error(`the qti element class does not exist: ${className}`);\n }\n\n const elt = new this.qti[className](elementData.serial);\n this.loadElementData(elt, elementData);\n\n return elt;\n },\n loadElementData(element, data) {\n //merge attributes when loading element data\n const attributes = _.defaults(data.attributes || {}, element.attributes || {});\n element.setAttributes(attributes);\n\n let body = data.body;\n if (!body && data.text && data.qtiClass === 'inlineChoice') {\n body = { body: data.text, elements: {} };\n }\n if (element.body && body) {\n if (element.bdy) {\n this.loadContainer(element.getBody(), body);\n }\n }\n\n if (element.object && data.object) {\n if (element.object) {\n this.loadObjectData(element.object, data.object);\n }\n }\n\n if (Element.isA(element, 'interaction')) {\n this.loadInteractionData(element, data);\n } else if (Element.isA(element, 'choice')) {\n this.loadChoiceData(element, data);\n } else if (Element.isA(element, 'math')) {\n this.loadMathData(element, data);\n } else if (Element.isA(element, 'infoControl')) {\n this.loadPicData(element, data);\n } else if (Element.isA(element, '_tooltip')) {\n this.loadTooltipData(element, data);\n }\n\n return element;\n },\n loadInteractionData(interaction, data) {\n if (Element.isA(interaction, 'blockInteraction')) {\n if (data.prompt) {\n this.loadContainer(interaction.prompt.getBody(), data.prompt);\n }\n }\n\n this.buildInteractionChoices(interaction, data);\n\n if (Element.isA(interaction, 'customInteraction')) {\n this.loadPciData(interaction, data);\n }\n },\n buildInteractionChoices(interaction, data) {\n // note: Qti.ContainerInteraction (Qti.GapMatchInteraction and Qti.HottextInteraction) has already been parsed by builtElement(interacionData);\n if (data.choices) {\n if (Element.isA(interaction, 'matchInteraction')) {\n for (let set = 0; set < 2; set++) {\n if (!data.choices[set]) {\n throw new Error(`missing match set #${set}`);\n }\n\n const matchSet = data.choices[set];\n\n for (let serial in matchSet) {\n const choice = this.buildElement(matchSet[serial]);\n\n if (choice) {\n interaction.addChoice(choice, set);\n }\n }\n }\n } else {\n for (let serial in data.choices) {\n const choice = this.buildElement(data.choices[serial]);\n\n if (choice) {\n interaction.addChoice(choice);\n }\n }\n }\n\n if (Element.isA(interaction, 'graphicGapMatchInteraction')) {\n if (data.gapImgs) {\n for (let serial in data.gapImgs) {\n const gapImg = this.buildElement(data.gapImgs[serial]);\n\n if (gapImg) {\n interaction.addGapImg(gapImg);\n }\n }\n }\n }\n }\n },\n loadChoiceData(choice, data) {\n if (Element.isA(choice, 'textVariableChoice')) {\n choice.val(data.text);\n } else if (Element.isA(choice, 'gapImg')) ; else if (Element.isA(choice, 'gapText')) {\n // this ensure compatibility of Qti 2.1 items\n if (!choice.body()) {\n choice.body(data.text);\n }\n } else if (Element.isA(choice, 'containerChoice')) ;\n },\n loadObjectData(object, data) {\n object.setAttributes(data.attributes);\n\n //@todo: manage object like a container\n if (data._alt) {\n if (data._alt.qtiClass === 'object') {\n object._alt = Loader.buildElement(data._alt);\n } else {\n object._alt = data._alt;\n }\n }\n },\n loadMathData(math, data) {\n math.ns = data.ns || {};\n math.setMathML(data.mathML || '');\n _.forIn(data.annotations || {}, (value, encoding) => {\n math.setAnnotation(encoding, value);\n });\n },\n loadTooltipData(tooltip, data) {\n tooltip.content(data.content);\n },\n loadPciData(pci, data) {\n loadPortableCustomElementData(pci, data);\n },\n loadPicData(pic, data) {\n loadPortableCustomElementData(pic, data);\n }\n });\n\n return Loader;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/pci',['lodash'], function (_) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n\n var pci = {\n getRawValues: function(pciVar) {\n if (_.isPlainObject(pciVar)) {\n if (pciVar.base !== undefined) {\n return _.values(pciVar.base);\n } else if (pciVar.list) {\n return _.values(pciVar.list);\n }\n }\n throw 'unsupported type ';\n }\n };\n\n return pci;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/container',['lodash', 'jquery'], function (_, $) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016 (original work) Open Assessment Technologies SA\n **/\n\n /**\n * Prefix used to the variable storage\n * @type String\n */\n var _prefix = 'x-tao-';\n\n /**\n * Check if the element is of a qti container type\n *\n * @private\n * @param {Object} element\n * @returns {Boolean}\n */\n function _checkContainerType(element) {\n if (_.isFunction(element.initContainer) && _.isFunction(element.body)) {\n return true;\n } else {\n throw 'the element is not of a container type';\n }\n }\n\n /**\n * Get the body element of the container\n *\n * @private\n * @param {Object} element\n * @returns {JQuery}\n */\n function _getBodyDom(element) {\n if (_checkContainerType(element)) {\n return $('
    ')\n .html(element.body())\n .find('.x-tao-wrapper');\n }\n }\n\n /**\n * Add a class to the body element of the qti container\n *\n * @private\n * @param {Object} element\n * @param {String} newClass\n * @param {String} [oldClass]\n */\n function _setBodyDomClass(element, newClass, oldClass) {\n if (_checkContainerType(element) && (oldClass || newClass)) {\n var $wrapper = $('
    ').html(element.body());\n //set css class to element\n _setDomClass($wrapper, newClass, oldClass);\n //set to the model\n element.body($wrapper.html());\n }\n }\n\n /**\n * Switch class to the wrapped DOM\n *\n * @param {JQuery} $wrapper\n * @param {String} newClass\n * @param {String} oldClass\n * @returns {undefined}\n */\n function _setDomClass($wrapper, newClass, oldClass) {\n var $bodyDom = $wrapper.find('.x-tao-wrapper');\n if (!$bodyDom.length) {\n //create one\n $wrapper.wrapInner('
    ');\n $bodyDom = $wrapper.find('.x-tao-wrapper');\n }\n if (oldClass) {\n $bodyDom.removeClass(oldClass);\n }\n if (newClass) {\n $bodyDom.addClass(newClass);\n }\n }\n\n /**\n * Add manually the encoded information to a dom element\n *\n * @param {JQuery} $wrapper - the wrapper of the element that will holds the information\n * @param {String} dataName - the name of the information\n * @param {String} newValue - the new value to be added\n * @param {String} [oldValue] - the old value to be removed\n * @returns {undefined}\n */\n function setEncodedDataToDom($wrapper, dataName, newValue, oldValue) {\n _setDomClass($wrapper, _getEncodedDataString(dataName, newValue), _getEncodedDataString(dataName, oldValue));\n }\n\n /**\n * Get the full variable name for the data store\n *\n * @param {String} dataName\n * @param {String} value\n * @returns {String}\n */\n function _getEncodedDataString(dataName, value) {\n if (dataName && value) {\n return _prefix + dataName + '-' + value;\n }\n return '';\n }\n\n /**\n * Set a data string to the element identified by its dataName\n *\n * @param {Object} element\n * @param {String} dataName\n * @param {String} newValue\n * @returns {undefined}\n */\n function setEncodedData(element, dataName, newValue) {\n var oldValue = getEncodedData(element, dataName);\n return _setBodyDomClass(\n element,\n _getEncodedDataString(dataName, newValue),\n _getEncodedDataString(dataName, oldValue)\n );\n }\n\n /**\n * Remove the stored data from the element by its dataName\n *\n * @param {Object} element\n * @param {String} dataName\n * @returns {unresolved}\n */\n function removeEncodedData(element, dataName) {\n var oldValue = getEncodedData(element, dataName);\n if (dataName && oldValue) {\n _setBodyDomClass(element, '', _getEncodedDataString(dataName, oldValue));\n }\n }\n\n /**\n * Check if the stored data exist\n *\n * @param {Object} element\n * @param {String} dataName\n * @param {String} value\n * @returns {Boolean}\n */\n function hasEncodedData(element, dataName, value) {\n var $body = _getBodyDom(element);\n if ($body && $body.length && dataName && value) {\n return $body.hasClass(_getEncodedDataString(dataName, value));\n }\n return false;\n }\n\n /**\n * Get the encoded data identified by its dataName\n *\n * @param {Object} element\n * @param {String} dataName\n * @returns {String}\n */\n function getEncodedData(element, dataName) {\n var regex, matches;\n var $body = _getBodyDom(element);\n if (dataName && $body && $body.length && $body.attr('class')) {\n regex = new RegExp(_prefix + dataName + '-([a-zA-Z0-9-._]*)');\n matches = $body.attr('class').match(regex);\n if (matches) {\n return matches[1];\n }\n }\n }\n\n /**\n * Provide a set of helper functions to set,retirve and manage string data to a container type qti element.\n */\n var container = {\n setEncodedData: setEncodedData,\n hasEncodedData: hasEncodedData,\n getEncodedData: getEncodedData,\n removeEncodedData: removeEncodedData,\n setEncodedDataToDom: setEncodedDataToDom\n };\n\n return container;\n\n});\n\n","define('taoQtiItem/qtiRunner/modalFeedback/inlineRenderer',['lodash', 'jquery', 'context', 'taoQtiItem/qtiItem/helper/pci', 'taoQtiItem/qtiItem/helper/container', 'handlebars', 'lib/handlebars/helpers', 'iframeNotifier'], function (_, $$1, context, pci, containerHelper, Handlebars, Helpers0, iframeNotifier) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n $$1 = $$1 && Object.prototype.hasOwnProperty.call($$1, 'default') ? $$1['default'] : $$1;\n context = context && Object.prototype.hasOwnProperty.call(context, 'default') ? context['default'] : context;\n pci = pci && Object.prototype.hasOwnProperty.call(pci, 'default') ? pci['default'] : pci;\n containerHelper = containerHelper && Object.prototype.hasOwnProperty.call(containerHelper, 'default') ? containerHelper['default'] : containerHelper;\n Handlebars = Handlebars && Object.prototype.hasOwnProperty.call(Handlebars, 'default') ? Handlebars['default'] : Handlebars;\n Helpers0 = Helpers0 && Object.prototype.hasOwnProperty.call(Helpers0, 'default') ? Helpers0['default'] : Helpers0;\n iframeNotifier = iframeNotifier && Object.prototype.hasOwnProperty.call(iframeNotifier, 'default') ? iframeNotifier['default'] : iframeNotifier;\n\n if (!Helpers0.__initialized) {\n Helpers0(Handlebars);\n Helpers0.__initialized = true;\n }\n var Template = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\n helpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", helper, options, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\n\n\n buffer += \"
  • \\n \\n \"\n + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, \"OK\", options) : helperMissing.call(depth0, \"__\", \"OK\", options)))\n + \"\\n \\n
  • \";\n return buffer;\n });\n function previewOkBtn(data, options, asString) {\n var html = Template(data, options);\n return (asString || true) ? html : $(html);\n }\n\n if (!Helpers0.__initialized) {\n Helpers0(Handlebars);\n Helpers0.__initialized = true;\n }\n var Template$1 = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\n helpers = this.merge(helpers, Handlebars.helpers); \n\n\n return \"
  • \\n \\n \\n OK\\n \\n
  • \";\n });\n function deliveryOkBtn(data, options, asString) {\n var html = Template$1(data, options);\n return (asString || true) ? html : $(html);\n }\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2015 (original work) Open Assessment Techonologies SA;\n *\n */\n\n var timeout = (context.timeout > 0 ? context.timeout + 1 : 30) * 1000;\n\n /**\n * Main function for the module. It loads and render the feedbacks accodring to the given itemSession variables\n *\n * @param {Object} item - the standard tao qti item object\n * @param {Object} loader - the item loader instance\n * @param {Object} renderer - the item render instance\n * @param {Object} itemSession - session information containing the list of feedbacks to display\n * @param {Function} onCloseCallback - the callback to be executed when the feedbacks are closed\n * @param {Function} [onShowCallback] - the callback to be executed when the feedbacks are shown\n * @returns {Number} Number of feedbacks to be displayed\n */\n function showFeedbacks(item, loader, renderer, itemSession, onCloseCallback, onShowCallback) {\n var interactionsDisplayInfo = getInteractionsDisplayInfo(item);\n var messages = {};\n var renderedFeebacks = [];\n var renderingQueue = [];\n var $itemContainer = item.getContainer();\n var $itemBody = $itemContainer.children('.qti-itemBody');\n var firstFeedback;\n\n _.each(item.modalFeedbacks, function(feedback) {\n var feedbackIds, message, $container, comparedOutcome, _currentMessageGroupId, interactionInfo;\n var outcomeIdentifier = feedback.attr('outcomeIdentifier');\n var order = -1;\n\n //verify if the feedback should be displayed\n if (itemSession[outcomeIdentifier]) {\n //is the feedback in the list of feedbacks to be displayed ?\n feedbackIds = pci.getRawValues(itemSession[outcomeIdentifier]);\n if (_.indexOf(feedbackIds, feedback.id()) === -1) {\n return true; //continue with next feedback\n }\n\n //which group of feedbacks (interaction related) the feedback belongs to ?\n message = getFeedbackMessageSignature(feedback);\n comparedOutcome = containerHelper.getEncodedData(feedback, 'relatedOutcome');\n interactionInfo = _.find(interactionsDisplayInfo, { responseIdentifier: comparedOutcome });\n if (comparedOutcome && interactionInfo) {\n $container = interactionInfo.displayContainer;\n _currentMessageGroupId = interactionInfo.messageGroupId;\n order = interactionInfo.order;\n } else {\n $container = $itemBody;\n _currentMessageGroupId = '__item__';\n }\n //is this message already displayed ?\n if (!messages[_currentMessageGroupId]) {\n messages[_currentMessageGroupId] = [];\n }\n if (_.indexOf(messages[_currentMessageGroupId], message) >= 0) {\n return true; //continue\n } else {\n messages[_currentMessageGroupId].push(message);\n }\n\n //ok, display feedback\n renderingQueue.push({\n feedback: feedback,\n $container: $container,\n order: order\n });\n }\n });\n\n if (renderingQueue.length) {\n renderingQueue = _.sortBy(renderingQueue, 'order');\n\n //clear previously displayed feedbacks\n clearModalFeedbacks($itemContainer);\n\n //process rendering queue\n _.each(renderingQueue, function(renderingToken) {\n renderModalFeedback(\n renderingToken.feedback,\n loader,\n renderer,\n renderingToken.$container,\n $itemContainer,\n function(renderingData) {\n // keep the first feedback to force focus on it if needed\n if (!firstFeedback) {\n firstFeedback = $$1(renderingData.dom);\n }\n\n $$1('img', renderingData.dom).on('load', function() {\n iframeNotifier.parent('itemcontentchange');\n });\n\n //record rendered feedback for later reference\n renderedFeebacks.push(renderingData);\n if (renderedFeebacks.length === renderingQueue.length) {\n //rendering processing queue completed\n iframeNotifier.parent('itemcontentchange');\n\n // set the focus on the first feedback if needed\n // TODO: this is heavily related to the old TestRunner, with the ugly iframes.\n // To make this working, a search is made accross parent frames.\n // When the InlineFeedbacks will be ported to the new TestRunner, a strong improvement will be needed!\n if (firstFeedback) {\n autoscroll(firstFeedback);\n }\n\n //if an optional \"on show modal\" callback has been provided, execute it\n if (_.isFunction(onShowCallback)) {\n onShowCallback();\n }\n }\n }\n );\n });\n\n //if any feedback is displayed, replace the controls by a \"ok\" button\n replaceControl(renderedFeebacks, $itemContainer, onCloseCallback);\n }\n\n return renderingQueue.length;\n }\n\n /**\n * Gets the QTI Container element\n * @returns {jQuery|null}\n */\n function getQtiContainer() {\n var me = window;\n var $container = null;\n var max = 10;\n\n while (me && me.__knownParent__ && max--) {\n me = me.parent;\n if (me && me.$) {\n $container = me.$('#qti-content');\n if ($container.length) {\n return $container;\n }\n }\n }\n return null;\n }\n\n /**\n * Keeps an element visible inside the QTI container.\n * If the element is outside the container viewport, scroll to display it.\n * @param {String|jQuery|HTMLElement} element\n */\n function autoscroll(element) {\n var $element = $$1(element);\n var $container = getQtiContainer();\n var currentScrollTop, minScrollTop, maxScrollTop, scrollTop;\n\n if ($element.length && $container) {\n currentScrollTop = $container.scrollTop();\n maxScrollTop = $element.offset().top;\n minScrollTop = maxScrollTop - $container.height() + $element.outerHeight();\n scrollTop = Math.max(Math.min(maxScrollTop, currentScrollTop), minScrollTop);\n if (scrollTop !== currentScrollTop) {\n $container.animate({ scrollTop: scrollTop });\n }\n }\n }\n\n /**\n * Extract the display information for an interaction-related feedback\n *\n * @private\n * @param {Object} interaction - a qti interaction object\n * @returns {Object} Object containing useful display information\n */\n function extractDisplayInfo(interaction) {\n var $interactionContainer = interaction.getContainer();\n var responseIdentifier = interaction.attr('responseIdentifier');\n var messageGroupId, $displayContainer;\n\n if (interaction.is('inlineInteraction')) {\n $displayContainer = $interactionContainer.closest('[class*=\" col-\"], [class^=\"col-\"]');\n messageGroupId = $displayContainer.attr('data-messageGroupId');\n if (!messageGroupId) {\n //generate a messageFroupId\n messageGroupId = _.uniqueId('inline_message_group_');\n $displayContainer.attr('data-messageGroupId', messageGroupId);\n }\n } else {\n messageGroupId = responseIdentifier;\n $displayContainer = $interactionContainer;\n }\n\n return {\n responseIdentifier: responseIdentifier,\n interactionContainer: $interactionContainer,\n displayContainer: $displayContainer,\n messageGroupId: messageGroupId,\n order: -1\n };\n }\n\n /**\n * Get interaction display information sorted in the order of appearance within the item\n *\n * @param {Object} item\n * @returns {Array}\n */\n function getInteractionsDisplayInfo(item) {\n var interactionsDisplayInfo = [];\n var $itemContainer = item.getContainer();\n var interactionOrder = 0;\n\n //extract all interction related information needed to display their\n _.each(item.getComposingElements(), function(element) {\n var responseIdentifier;\n if (element.is('interaction')) {\n responseIdentifier = element.attr('responseIdentifier');\n interactionsDisplayInfo.push(extractDisplayInfo(element));\n }\n });\n\n //sort interactionsDisplayInfo on the item level\n $itemContainer.find('.qti-interaction').each(function() {\n var interactionContainer = this;\n _.each(interactionsDisplayInfo, function(_interactionInfo) {\n if (_interactionInfo.interactionContainer[0] === interactionContainer) {\n _interactionInfo.order = interactionOrder;\n return false;\n }\n });\n interactionOrder++;\n });\n interactionsDisplayInfo = _.sortBy(interactionsDisplayInfo, 'order');\n\n return interactionsDisplayInfo;\n }\n\n /**\n * Remove previously displayed feedbacks contained in the given container element\n *\n * @param {JQuery} $itemContainer\n */\n function clearModalFeedbacks($itemContainer) {\n $itemContainer.find('.qti-modalFeedback').remove();\n }\n\n /**\n * Render a modal feedback into a given container, scoped within an item container\n *\n * @private\n * @param {type} feedback - feedback object\n * @param {type} loader - loader instance\n * @param {type} renderer - renderer instance\n * @param {JQuery} $container - the targeted feedback container\n * @param {JQuery} $itemContainer - the item container\n * @param {type} renderedCallback - callback when the feedback has been rendered\n * @returns {undefined}\n */\n function renderModalFeedback(feedback, loader, renderer, $container, $itemContainer, renderedCallback) {\n //load (potential) new qti classes used in the modal feedback (e.g. math, img)\n renderer.load(function() {\n //render the modal feedback\n var $modalFeedback = $$1(\n feedback.render({\n inline: true\n })\n );\n var done = function done() {\n renderedCallback({\n identifier: feedback.id(),\n serial: feedback.getSerial(),\n dom: $modalFeedback\n });\n };\n $container.append($modalFeedback);\n\n // Race between postRendering and timeout\n // postRendering waits for everything to be resolved or one reject\n Promise.race([\n Promise.all(\n _.map(feedback.getComposingElements(), function(elt) {\n //render also internal elements, such as math or img\n return elt.postRender({}, '', renderer).pop();\n })\n ),\n new Promise(function(resolve, reject) {\n _.delay(reject, timeout, new Error('Post rendering ran out of time.'));\n })\n ])\n .then(done)\n .catch(function(err) {\n //in case of postRendering issue, we are also done\n done();\n throw new Error('Error in post rendering : ' + err);\n });\n }, loader.getLoadedClasses());\n }\n\n /**\n * Replace the controls in the running environment with an \"OK\" button to trigger the end of the feedback state\n *\n * @private\n * @todo FIX ME ! replace the hack to preview and delivery toolbar with a proper plugin in the new test runner is ready\n * @param {Array} renderedFeebacks\n * @param {JQuery} $itemContainer\n * @param {Function} callback\n */\n function replaceControl(renderedFeebacks, $itemContainer, callback) {\n var $scope, $controls, $toggleContainer;\n if (window.parent && window.parent.parent && window.parent.parent.$) {\n if ($itemContainer.parents('.tao-preview-scope').length) {\n //preview mode\n $scope = window.parent.parent.$('#preview-console');\n $controls = $scope.find('.preview-console-header .action-bar li:visible');\n $toggleContainer = $scope.find('.console-button-action-bar');\n initControlToggle(renderedFeebacks, $itemContainer, $controls, $toggleContainer, previewOkBtn, callback);\n } else {\n //delivery delivery\n $scope = window.parent.parent.$('body.qti-test-scope .bottom-action-bar');\n $controls = $scope.find('li:visible');\n $toggleContainer = $scope.find('.navi-box-list');\n initControlToggle(renderedFeebacks, $itemContainer, $controls, $toggleContainer, deliveryOkBtn, callback);\n }\n } else {\n //not in an iframe, add to item body for now\n $scope = $itemContainer.find('#modalFeedbacks');\n initControlToggle(renderedFeebacks, $itemContainer, $$1(), $scope, previewOkBtn, callback);\n }\n }\n\n /**\n * Initialize the \"OK\" button to trigger the end of the feedback mode\n *\n * @private\n * @param {Array} renderedFeebacks\n * @param {JQuery} $itemContainer\n * @param {JQuery} $controls\n * @param {JQuery} $toggleContainer\n * @param {Function} toggleButtonTemplate\n * @param {Function} callback\n */\n function initControlToggle(\n renderedFeebacks,\n $itemContainer,\n $controls,\n $toggleContainer,\n toggleButtonTemplate,\n callback\n ) {\n var $ok = $$1(toggleButtonTemplate()).click(function() {\n //end feedback mode, hide feedbacks\n _.each(renderedFeebacks, function(fb) {\n fb.dom.hide();\n });\n\n //restore controls\n uncover([$itemContainer]);\n $ok.remove();\n $controls.show();\n\n //exec callback\n callback();\n });\n\n $controls.hide();\n $toggleContainer.append($ok);\n cover([$itemContainer]);\n }\n\n /**\n * Cover the given interaction containers with a transparent layer to prevent user interacting with the item\n * @private\n * @param {Array} interactionContainers\n */\n function cover(interactionContainers) {\n var $cover = $$1('
    ');\n _.each(interactionContainers, function($interaction) {\n $interaction.append($cover);\n });\n }\n\n /**\n * Remove the layer set by the function cover()\n * @private\n * @param {Array} interactionContainers\n */\n function uncover(interactionContainers) {\n _.each(interactionContainers, function($interaction) {\n $interaction.find('.interaction-cover').remove();\n });\n }\n\n /**\n * Provide the feedbackMessage signature to check if the feedback contents should be considered equals\n *\n * @param {type} feedback\n * @returns {String}\n */\n function getFeedbackMessageSignature(feedback) {\n return ('' + feedback.body() + feedback.attr('title'))\n .toLowerCase()\n .trim()\n .replace(/x-tao-[a-zA-Z0-9\\-._\\s]*/g, '');\n }\n\n var inlineRenderer = {\n showFeedbacks: showFeedbacks\n };\n\n return inlineRenderer;\n\n});\n\n","define('taoQtiItem/qtiRunner/modalFeedback/modalRenderer',['lodash', 'jquery', 'async', 'taoQtiItem/qtiItem/helper/pci'], function (_, $, async, pci) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;\n async = async && Object.prototype.hasOwnProperty.call(async, 'default') ? async['default'] : async;\n pci = pci && Object.prototype.hasOwnProperty.call(pci, 'default') ? pci['default'] : pci;\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2015 (original work) Open Assessment Techonologies SA;\n *\n */\n\n /**\n * Main function for the module. It loads and render the feedbacks accodring to the given itemSession variables\n *\n * @param {Object} item - the standard tao qti item object\n * @param {Object} loader - the item loader instance\n * @param {Object} renderer - the item render instance\n * @param {Object} itemSession - session information containing the list of feedbacks to display\n * @param {Function} onCloseCallback - the callback to be executed when the feedbacks are closed\n * @param {Function} [onShowCallback] - the callback to be executed when the feedbacks are shown\n * @returns {Number} Number of feedbacks to be displayed\n */\n function showFeedbacks(item, loader, renderer, itemSession, onCloseCallback, onShowCallback) {\n var count,\n messages = [],\n feedbacksToBeDisplayed = [];\n\n //find which modal feedbacks should be displayed according to the current item session:\n _.each(item.modalFeedbacks, function(feedback) {\n var feedbackIds, message;\n var outcomeIdentifier = feedback.attr('outcomeIdentifier');\n\n if (itemSession[outcomeIdentifier]) {\n feedbackIds = pci.getRawValues(itemSession[outcomeIdentifier]);\n message = getFeedbackMessageSignature(feedback);\n if (_.indexOf(feedbackIds, feedback.id()) >= 0 && _.indexOf(messages, message) === -1) {\n //check content if is already in the display queue\n feedbacksToBeDisplayed.push(feedback);\n messages.push(message);\n }\n }\n });\n\n //record the number of feedbacks to be displayed:\n count = feedbacksToBeDisplayed.length;\n if (count) {\n //show in reverse order\n var callstack = [];\n\n //iterate from the right because the modal popup will pile up.\n _.eachRight(feedbacksToBeDisplayed, function(feedback) {\n //the end callback should be executed to the last displayed modal, which is the last displayed one\n var endCallback;\n if (callstack.length === 0) {\n endCallback = function() {\n onCloseCallback();\n };\n }\n\n callstack.push(function(cb) {\n renderModalFeedback(\n feedback,\n loader,\n renderer,\n function() {\n cb(null);\n },\n endCallback\n );\n });\n });\n\n async.series(callstack, function() {\n //all modal are ready and displayed\n if (_.isFunction(onShowCallback)) {\n onShowCallback();\n }\n });\n }\n\n return count;\n }\n\n /**\n * Render modal feedback as a modal popup\n *\n * @param {Object} feedback - object\n * @param {Object} loader - loader instance\n * @param {Object} renderer - renderer instance\n * @param {Function} [closeCallback] - feedback to be executed when the popop closes\n * @returns {undefined}\n */\n function renderModalFeedback(feedback, loader, renderer, renderedCallback, closeCallback) {\n var $feedback,\n $feedbackBox = $('#modalFeedbacks'); //feedback.getItem().getContainer().find('#')\n\n if (feedback.is('modalFeedback')) {\n //load (potential) new qti classes used in the modal feedback (e.g. math, img)\n renderer.load(function() {\n $feedback = $feedbackBox.find('#' + feedback.getSerial());\n if (!$feedback.length) {\n //render the modal feedback\n $feedback = feedback.render();\n $feedbackBox.append($feedback);\n } else {\n $feedback.modal();\n }\n\n renderedCallback();\n\n feedback.postRender({\n callback: closeCallback\n });\n }, loader.getLoadedClasses());\n }\n }\n\n /**\n * Provide the feedbackMessage signature to check if the feedback contents should be considered equals\n *\n * @param {type} feedback\n * @returns {String}\n */\n function getFeedbackMessageSignature(feedback) {\n return ('' + feedback.body() + feedback.attr('title'))\n .toLowerCase()\n .trim()\n .replace(/x-tao-[a-zA-Z0-9\\-._\\s]*/g, '');\n }\n\n var modalRenderer = {\n showFeedbacks: showFeedbacks\n };\n\n return modalRenderer;\n\n});\n\n","define('taoQtiItem/qtiRunner/core/QtiRunner',['jquery', 'lodash', 'context', 'module', 'iframeNotifier', 'taoQtiItem/qtiItem/core/Loader', 'taoQtiItem/qtiRunner/modalFeedback/inlineRenderer', 'taoQtiItem/qtiRunner/modalFeedback/modalRenderer'], function ($, _, context, module, iframeNotifier, ItemLoader, modalFeedbackInline, modalFeedbackModal) { 'use strict';\n\n $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n context = context && Object.prototype.hasOwnProperty.call(context, 'default') ? context['default'] : context;\n module = module && Object.prototype.hasOwnProperty.call(module, 'default') ? module['default'] : module;\n iframeNotifier = iframeNotifier && Object.prototype.hasOwnProperty.call(iframeNotifier, 'default') ? iframeNotifier['default'] : iframeNotifier;\n ItemLoader = ItemLoader && Object.prototype.hasOwnProperty.call(ItemLoader, 'default') ? ItemLoader['default'] : ItemLoader;\n modalFeedbackInline = modalFeedbackInline && Object.prototype.hasOwnProperty.call(modalFeedbackInline, 'default') ? modalFeedbackInline['default'] : modalFeedbackInline;\n modalFeedbackModal = modalFeedbackModal && Object.prototype.hasOwnProperty.call(modalFeedbackModal, 'default') ? modalFeedbackModal['default'] : modalFeedbackModal;\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2013 (original work) Open Assessment Techonologies SA (under the project TAO-PRODUCT);\n *\n *\n */\n\n var timeout = (context.timeout > 0 ? context.timeout + 1 : 30) * 1000;\n\n var QtiRunner = function() {\n this.item = null;\n this.rpEngine = null;\n this.renderer = null;\n this.loader = null;\n this.itemApi = undefined;\n };\n\n QtiRunner.prototype.updateItemApi = function() {\n var responses = this.getResponses();\n var states = this.getStates();\n var variables = [];\n // Transform responses into state variables.\n for (var key in states) {\n var value = states[key];\n // This is where we set variables that will be collected and stored\n // as the Item State. We do not want to store large files into\n // the state, and force the client to download these files\n // all over again. We then transform them as a place holder, that will\n // simply indicate that a file composes the state.\n\n if (value.response && typeof value.response.base !== 'undefined') {\n for (var property in value.response.base) {\n if (property === 'file') {\n var file = value.response.base.file;\n // QTI File found! Replace it with an appropriate placeholder.\n // The data is base64('qti_file_datatype_placeholder_data')\n value.response = {\n base: {\n file: {\n name: file.name,\n mime: 'qti+application/octet-stream',\n data: 'cXRpX2ZpbGVfZGF0YXR5cGVfcGxhY2Vob2xkZXJfZGF0YQ=='\n }\n }\n };\n }\n }\n }\n\n variables[key] = value;\n }\n\n //set all variables at once\n this.itemApi.setVariables(variables);\n\n // Save the responses that will be used for response processing.\n this.itemApi.saveResponses(responses);\n this.itemApi.resultApi.setQtiRunner(this);\n };\n\n QtiRunner.prototype.setItemApi = function(itemApi) {\n this.itemApi = itemApi;\n var that = this;\n var oldStateVariables = JSON.stringify(itemApi.stateVariables);\n\n itemApi.onKill(function(killCallback) {\n // If the responses did not change,\n // just close gracefully.\n\n // Collect new responses and update item API.\n that.updateItemApi();\n var newStateVariables = JSON.stringify(itemApi.stateVariables);\n\n // Store the results.\n if (oldStateVariables !== newStateVariables || itemApi.serviceApi.getHasBeenPaused()) {\n itemApi.submit(function() {\n // Send successful signal.\n itemApi.serviceApi.setHasBeenPaused(false);\n killCallback(0);\n });\n } else {\n killCallback(0);\n }\n });\n };\n\n QtiRunner.prototype.setRenderer = function(renderer) {\n if (renderer.isRenderer) {\n this.renderer = renderer;\n } else {\n throw 'invalid renderer';\n }\n };\n\n QtiRunner.prototype.getLoader = function() {\n if (!this.loader) {\n this.loader = new ItemLoader();\n }\n return this.loader;\n };\n\n QtiRunner.prototype.loadItemData = function(data, callback) {\n var self = this;\n this.getLoader().loadItemData(data, function(item) {\n self.item = item;\n callback(self.item);\n });\n };\n\n QtiRunner.prototype.loadElements = function(elements, callback) {\n if (this.getLoader().item) {\n this.getLoader().loadElements(elements, callback);\n } else {\n throw 'QtiRunner : cannot load elements in empty item';\n }\n };\n\n QtiRunner.prototype.renderItem = function(data, done) {\n var self = this;\n\n done = _.isFunction(done) ? done : _.noop;\n\n var render = function() {\n if (!self.item) {\n throw 'cannot render item: empty item';\n }\n if (self.renderer) {\n self.renderer.load(function() {\n self.item.setRenderer(self.renderer);\n self.item.render({}, $('#qti_item'));\n\n // Race between postRendering and timeout\n // postRendering waits for everything to be resolved or one reject\n Promise.race([\n Promise.all(self.item.postRender()),\n new Promise(function(resolve, reject) {\n _.delay(reject, timeout, new Error('Post rendering ran out of time.'));\n })\n ])\n .then(function() {\n self.item.getContainer().on('responseChange', function(e, data) {\n if (data.interaction && data.interaction.attr('responseIdentifier') && data.response) {\n iframeNotifier.parent('responsechange', [\n data.interaction.attr('responseIdentifier'),\n data.response\n ]);\n }\n });\n\n self.initInteractionsResponse();\n self.listenForThemeChange();\n done();\n })\n .catch(function(err) {\n //in case of postRendering issue, we are also done\n done();\n\n throw new Error('Error in post rendering : ' + err);\n });\n }, self.getLoader().getLoadedClasses());\n } else {\n throw 'cannot render item: no rendered set';\n }\n };\n\n if (typeof data === 'object') {\n this.loadItemData(data, render);\n } else {\n render();\n }\n };\n\n QtiRunner.prototype.initInteractionsResponse = function() {\n var self = this;\n if (self.item) {\n var interactions = self.item.getInteractions();\n for (var i in interactions) {\n var interaction = interactions[i];\n var responseId = interaction.attr('responseIdentifier');\n self.itemApi.getVariable(responseId, function(values) {\n if (values) {\n interaction.setState(values);\n iframeNotifier.parent('stateready', [responseId, values]);\n } else {\n var states = self.getStates();\n if (_.indexOf(states, responseId)) {\n self.itemApi.setVariable(responseId, states[responseId]);\n interaction.setState(states[responseId]);\n iframeNotifier.parent('stateready', [responseId, states[responseId]]);\n }\n }\n });\n }\n }\n };\n\n /**\n * If an event 'themechange' bubbles to \"#qti_item\" node\n * then we tell the renderer to switch the theme.\n */\n QtiRunner.prototype.listenForThemeChange = function listenForThemeChange() {\n var self = this;\n var $container = this.renderer.getContainer(this.item);\n if (!$container.length) {\n $container = $('.qti-item');\n }\n $container.off('themechange').on('themechange', function(e, themeName) {\n var themeLoader = self.renderer.getThemeLoader();\n themeName = themeName || e.originalEvent.detail;\n if (themeLoader) {\n themeLoader.change(themeName);\n }\n });\n };\n\n QtiRunner.prototype.validate = function() {\n this.updateItemApi();\n this.itemApi.finish();\n };\n\n QtiRunner.prototype.getResponses = function() {\n var responses = {};\n var interactions = this.item.getInteractions();\n\n _.forEach(interactions, function(interaction) {\n var response = {};\n try {\n response = interaction.getResponse();\n } catch (e) {\n console.error(e);\n }\n responses[interaction.attr('responseIdentifier')] = response;\n });\n\n return responses;\n };\n\n QtiRunner.prototype.getStates = function() {\n var states = {};\n var interactions = this.item.getInteractions();\n\n _.forEach(interactions, function(interaction) {\n var state = {};\n try {\n state = interaction.getState();\n } catch (e) {\n console.error(e);\n }\n states[interaction.attr('responseIdentifier')] = state;\n });\n\n return states;\n };\n\n QtiRunner.prototype.setResponseProcessing = function(callback) {\n this.rpEngine = callback;\n };\n\n QtiRunner.prototype.showFeedbacks = function(itemSession, callback, onShowCallback) {\n var inlineDisplay = !!module.config().inlineModalFeedback;\n\n //currently only modal feedbacks are available\n if (inlineDisplay) {\n return modalFeedbackInline.showFeedbacks(\n this.item,\n this.getLoader(),\n this.renderer,\n itemSession,\n callback,\n onShowCallback\n );\n } else {\n return modalFeedbackModal.showFeedbacks(\n this.item,\n this.getLoader(),\n this.renderer,\n itemSession,\n callback,\n onShowCallback\n );\n }\n };\n\n return QtiRunner;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/interactionHelper',['lodash', 'taoQtiItem/qtiItem/core/Element'], function (_, Element) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n Element = Element && Object.prototype.hasOwnProperty.call(Element, 'default') ? Element['default'] : Element;\n\n /**\n * Common helper functions\n */\n var interactionHelper = {\n convertChoices: function(choices, outputType) {\n var ret = [],\n _this = this;\n\n _.each(choices, function(c) {\n if (Element.isA(c, 'choice')) {\n switch (outputType) {\n case 'serial':\n ret.push(c.getSerial());\n break;\n case 'identifier':\n ret.push(c.id());\n break;\n default:\n ret.push(c);\n }\n } else if (_.isArray(c)) {\n ret.push(_this.convertChoices(c, outputType));\n }\n });\n\n return ret;\n },\n findChoices: function(interaction, choices, inputType) {\n var ret = [],\n _this = this;\n\n _.each(choices, function(c) {\n var choice;\n if (_.isString(c)) {\n if (inputType === 'serial') {\n choice = interaction.getChoice(c);\n if (choice) {\n ret.push(choice);\n }\n } else if (inputType === 'identifier') {\n choice = interaction.getChoiceByIdentifier(c);\n if (choice) {\n ret.push(choice);\n }\n } else {\n ret.push(c);\n }\n } else if (_.isArray(c)) {\n ret.push(_this.findChoices(interaction, c, inputType));\n } else {\n ret.push(c);\n }\n });\n\n return ret;\n },\n shuffleChoices: function(choices) {\n var r = [], //returned array\n f = {}, //fixed choices array\n j = 0;\n\n for (var i in choices) {\n if (Element.isA(choices[i], 'choice')) {\n var choice = choices[i];\n if (choice.attr('fixed')) {\n f[j] = choice;\n }\n r.push(choice);\n j++;\n } else {\n throw 'invalid element in array: is not a qti choice';\n }\n }\n\n for (var n = 0; n < r.length - 1; n++) {\n if (f[n]) {\n continue;\n }\n var k = -1;\n do {\n k = n + Math.floor(Math.random() * (r.length - n));\n } while (f[k]);\n var tmp = r[k];\n r[k] = r[n];\n r[n] = tmp;\n }\n\n return r;\n },\n serialToIdentifier: function(interaction, choiceSerial) {\n var choice = interaction.getChoice(choiceSerial);\n if (choice) {\n return choice.id();\n } else {\n return '';\n }\n }\n };\n\n return interactionHelper;\n\n});\n\n","define('taoQtiItem/qtiRunner/core/Renderer',['lodash', 'jquery', 'taoQtiItem/qtiItem/core/Element', 'taoQtiItem/qtiItem/helper/interactionHelper', 'ui/themeLoader', 'ui/themes', 'core/moduleLoader', 'handlebars'], function (_, $, Element, interactionHelper, themeLoader, themesHelper, moduleLoader, Handlebars) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;\n Element = Element && Object.prototype.hasOwnProperty.call(Element, 'default') ? Element['default'] : Element;\n interactionHelper = interactionHelper && Object.prototype.hasOwnProperty.call(interactionHelper, 'default') ? interactionHelper['default'] : interactionHelper;\n themeLoader = themeLoader && Object.prototype.hasOwnProperty.call(themeLoader, 'default') ? themeLoader['default'] : themeLoader;\n themesHelper = themesHelper && Object.prototype.hasOwnProperty.call(themesHelper, 'default') ? themesHelper['default'] : themesHelper;\n moduleLoader = moduleLoader && Object.prototype.hasOwnProperty.call(moduleLoader, 'default') ? moduleLoader['default'] : moduleLoader;\n Handlebars = Handlebars && Object.prototype.hasOwnProperty.call(Handlebars, 'default') ? Handlebars['default'] : Handlebars;\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2014-2022 (original work) Open Assessment Technlogies SA (under the project TAO-PRODUCT);\n *\n */\n\n //webpack trick : handlebar is usale only from cjs.\n //but anyway we should deprecate the practice to invoke\n //directly Handlebars at runtimej\n let hb = Handlebars;\n if(typeof hb.compile !== 'function'){\n hb = require('handlebars');\n }\n\n const _renderableClasses = [\n '_container',\n 'assessmentItem',\n 'stylesheet',\n 'responseDeclaration',\n 'outcomeDeclaration',\n 'responseProcessing',\n '_simpleFeedbackRule',\n '_tooltip',\n 'figure',\n 'img',\n 'figcaption',\n 'math',\n 'object',\n 'table',\n 'modalFeedback',\n 'rubricBlock',\n 'associateInteraction',\n 'choiceInteraction',\n 'extendedTextInteraction',\n 'gapMatchInteraction',\n 'graphicAssociateInteraction',\n 'graphicGapMatchInteraction',\n 'graphicOrderInteraction',\n 'hotspotInteraction',\n 'hottextInteraction',\n 'inlineChoiceInteraction',\n 'matchInteraction',\n 'mediaInteraction',\n 'orderInteraction',\n 'selectPointInteraction',\n 'sliderInteraction',\n 'textEntryInteraction',\n 'uploadInteraction',\n 'endAttemptInteraction',\n 'customInteraction',\n 'prompt',\n 'associableHotspot',\n 'gap',\n 'gapImg',\n 'gapText',\n 'hotspotChoice',\n 'hottext',\n 'inlineChoice',\n 'simpleAssociableChoice',\n 'simpleChoice',\n 'infoControl',\n 'include',\n 'printedVariable'\n ];\n\n /**\n * The list of qti element dependencies. It is used internally to load dependent qti classes\n */\n const _dependencies = {\n assessmentItem: ['stylesheet', '_container', 'prompt', 'modalFeedback'],\n rubricBlock: ['_container'],\n associateInteraction: ['simpleAssociableChoice'],\n choiceInteraction: ['simpleChoice'],\n gapMatchInteraction: ['gap', 'gapText'],\n graphicAssociateInteraction: ['associableHotspot'],\n graphicGapMatchInteraction: ['associableHotspot', 'gapImg'],\n graphicOrderInteraction: ['hotspotChoice'],\n hotspotInteraction: ['hotspotChoice'],\n hottextInteraction: ['hottext'],\n inlineChoiceInteraction: ['inlineChoice'],\n matchInteraction: ['simpleAssociableChoice'],\n orderInteraction: ['simpleChoice']\n };\n\n /**\n * The list of supported qti subclasses.\n */\n const _renderableSubclasses = {\n simpleAssociableChoice: ['associateInteraction', 'matchInteraction'],\n simpleChoice: ['choiceInteraction', 'orderInteraction']\n };\n\n /**\n * List of the default properties for the item\n */\n const _defaults = {\n shuffleChoices: true\n };\n\n const _isValidRenderer = function(renderer) {\n let valid = true;\n\n if (typeof renderer !== 'object') {\n return false;\n }\n\n let classCorrect = false;\n if (renderer.qtiClass) {\n if (_.indexOf(_renderableClasses, renderer.qtiClass) >= 0) {\n classCorrect = true;\n } else {\n const pos = renderer.qtiClass.indexOf('.');\n if (pos > 0) {\n const qtiClass = renderer.qtiClass.slice(0, pos);\n const subClass = renderer.qtiClass.slice(pos + 1);\n if (_renderableSubclasses[qtiClass] && _.indexOf(_renderableSubclasses[qtiClass], subClass) >= 0) {\n classCorrect = true;\n }\n }\n }\n }\n if (!classCorrect) {\n valid = false;\n throw new Error('invalid qti class name in renderer declaration : ' + renderer.qtiClass);\n }\n\n if (!renderer.template) {\n valid = false;\n throw new Error('missing template in renderer declaration : ' + renderer.qtiClass);\n }\n\n return valid;\n };\n\n /**\n * Get the location of the document, useful to define a baseUrl for the required context\n * @returns {String}\n */\n function getDocumentBaseUrl() {\n return window.location.protocol + '//' + window.location.host + window.location.pathname.replace(/([^\\/]*)$/, '');\n }\n\n /**\n * The built Renderer class\n * @constructor\n * @param {Object} [options] - the renderer options\n * @param {AssetManager} [options.assetManager] - The renderer needs an AssetManager to resolve URLs (see {@link taoItems/assets/manager})\n * @param {Boolean} [options.shuffleChoices = true] - Does the renderer take care of the shuffling\n * @param {Object} [options.decorators] - to set up rendering decorator\n * @param {preRenderDecorator} [options.decorators.before] - to set up a pre decorator\n * @param {postRenderDecorator} [options.decorators.after] - to set up a post decorator\n */\n const Renderer = function(options) {\n /**\n * Store the registered renderer location\n */\n const _locations = {};\n\n /**\n * Store loaded renderers\n */\n const _renderers = {};\n\n options = _.defaults(options || {}, _defaults);\n\n this.isRenderer = true;\n\n this.name = '';\n\n //store shuffled choice here\n this.shuffledChoices = [];\n\n /**\n * Get the actual renderer of the give qti class or subclass:\n * e.g. simplceChoice, simpleChoice.choiceInteraction, simpleChoice.orderInteraction\n */\n const _getClassRenderer = function(qtiClass) {\n let ret = null;\n if (_renderers[qtiClass]) {\n ret = _renderers[qtiClass];\n } else {\n const pos = qtiClass.indexOf('.');\n if (pos > 0) {\n qtiClass = qtiClass.slice(0, pos);\n if (_renderers[qtiClass]) {\n ret = _renderers[qtiClass];\n }\n }\n }\n return ret;\n };\n\n /**\n * Registers a QTI renderer class\n * @param {String} qtiClass\n * @param {Array} list\n * @returns {Boolean} `true` if the class has been successfully registered\n */\n function registerRendererClass(qtiClass, list) {\n let success = false;\n if (_locations[qtiClass] === false) {\n //mark this class as not renderable\n _renderers[qtiClass] = false;\n success = true;\n } else if (_locations[qtiClass]) {\n list.push(_locations[qtiClass]);\n success = true;\n }\n return success;\n }\n\n /**\n * Set the renderer options\n * @param {String} key - the name of the option\n * @param {*} value - the option vallue\n * @returns {Renderer} for chaining\n */\n this.setOption = function(key, value) {\n if (typeof key === 'string') {\n options[key] = value;\n }\n return this;\n };\n\n /**\n * Set the renderer options\n * @param {Object} opts - the options\n * @returns {Renderer} for chaining\n */\n this.setOptions = function(opts) {\n options = _.extend(options, opts);\n return this;\n };\n\n /**\n * Get the renderer option\n * @param {String} key - the name of the option\n * @returns {*|null} the option vallue\n */\n this.getOption = function(key) {\n if (typeof key === 'string' && options[key]) {\n return options[key];\n }\n return null;\n };\n\n this.getCustomMessage = function getCustomMessage(elementName, messageKey) {\n const messages = this.getOption('messages');\n if (messages && elementName && messages[elementName] && _.isString(messages[elementName][messageKey])) {\n //currently not translatable but potentially could be if the need raises\n return hb.compile(messages[elementName][messageKey]);\n } else {\n return null;\n }\n };\n\n /**\n * Get the bound assetManager\n * @returns {AssetManager} the assetManager\n */\n this.getAssetManager = function getAssetManager() {\n return options.assetManager;\n };\n\n /**\n * Get the bound theme loader\n * @returns {Object} the themeLoader\n */\n this.getThemeLoader = function getThemeLoader() {\n return this.themeLoader;\n };\n\n /**\n * Renders the template\n * @param {Object} element - the QTI model element\n * @param {Object} data - the data to give to the template\n * @param {String} [qtiSubclass] - to get the render of the element subclass (when element's qtiClass is abstract)\n * @returns {String} the template results\n * @throws {Error} if the renderer is not set or has no template bound\n */\n this.renderTpl = function(element, data, qtiSubclass) {\n let res;\n let ret = '';\n const qtiClass = qtiSubclass || element.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n const decorators = this.getOption('decorators');\n\n if (!renderer || !_.isFunction(renderer.template)) {\n throw new Error('no renderer template loaded under the class name : ' + qtiClass);\n }\n\n //pre rendering decoration\n if (_.isObject(decorators) && _.isFunction(decorators.before)) {\n /**\n * @callback preRenderDecoractor\n * @param {Object} element - the QTI model element\n * @param {String} [qtiSubclass] - to get the render of the element subclass (when element's qtiClass is abstract)\n * @returns {String} the decorator result\n */\n res = decorators.before(element, qtiSubclass);\n if (_.isString(res)) {\n ret += res;\n }\n }\n\n //render the template\n ret += renderer.template(data);\n\n //post rendering decoration\n if (_.isObject(decorators) && _.isFunction(decorators.after)) {\n /**\n * @callback postRenderDecoractor\n * @param {Object} element - the QTI model element\n * @param {String} [qtiSubclass] - to get the render of the element subclass (when element's qtiClass is abstract)\n * @returns {String} the decorator result\n */\n res = decorators.after(element, qtiSubclass);\n if (_.isString(res)) {\n ret += res;\n }\n }\n return ret;\n };\n\n this.getData = function(element, data, qtiSubclass) {\n let ret = data;\n const qtiClass = qtiSubclass || element.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n\n if (renderer) {\n if (typeof renderer.getData === 'function') {\n ret = renderer.getData.call(this, element, data);\n }\n }\n\n return ret;\n };\n\n this.renderDirect = function(tpl, data) {\n return hb.compile(tpl)(data);\n };\n\n this.getContainer = function(qtiElement, $scope, qtiSubclass) {\n let ret = null;\n const qtiClass = qtiSubclass || qtiElement.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n\n if (renderer) {\n ret = renderer.getContainer(qtiElement, $scope);\n } else {\n throw new Error('no renderer found for the class : ' + qtiElement.qtiClass);\n }\n return ret;\n };\n\n this.postRender = function(qtiElement, data, qtiSubclass) {\n const qtiClass = qtiSubclass || qtiElement.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n\n if (renderer && typeof renderer.render === 'function') {\n return renderer.render.call(this, qtiElement, data);\n }\n };\n\n this.setResponse = function(qtiInteraction, response, qtiSubclass) {\n let ret = false;\n const qtiClass = qtiSubclass || qtiInteraction.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n\n if (renderer) {\n if (typeof renderer.setResponse === 'function') {\n ret = renderer.setResponse.call(this, qtiInteraction, response);\n const $container = renderer.getContainer.call(this, qtiInteraction);\n if ($container instanceof $ && $container.length) {\n $container.trigger('responseSet', [qtiInteraction, response]);\n }\n }\n } else {\n throw new Error('no renderer registered under the name : ' + qtiClass);\n }\n return ret;\n };\n\n this.getResponse = function(qtiInteraction, qtiSubclass) {\n let ret = false;\n const qtiClass = qtiSubclass || qtiInteraction.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n\n if (renderer) {\n if (typeof renderer.getResponse === 'function') {\n ret = renderer.getResponse.call(this, qtiInteraction);\n }\n } else {\n throw new Error('no renderer registered under the name : ' + qtiClass);\n }\n return ret;\n };\n\n this.resetResponse = function(qtiInteraction, qtiSubclass) {\n let ret = false;\n const qtiClass = qtiSubclass || qtiInteraction.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n\n if (renderer) {\n if (typeof renderer.resetResponse === 'function') {\n ret = renderer.resetResponse.call(this, qtiInteraction);\n }\n } else {\n throw new Error('no renderer registered under the name : ' + qtiClass);\n }\n return ret;\n };\n\n /**\n * Retrieve the state of the interaction.\n * If the renderer has no state management, it falls back to the response management.\n *\n * @param {Object} qtiInteraction - the interaction\n * @param {String} [qtiSubClass] - (not sure of the type and how it is used - Sam ? )\n * @returns {Object} the interaction's state\n *\n * @throws {Error} if no renderer is registered\n */\n this.getState = function(qtiInteraction, qtiSubclass) {\n let ret = false;\n const qtiClass = qtiSubclass || qtiInteraction.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n\n if (renderer) {\n if (_.isFunction(renderer.getState)) {\n ret = renderer.getState.call(this, qtiInteraction);\n } else {\n ret = renderer.getResponse.call(this, qtiInteraction);\n }\n } else {\n throw new Error('no renderer registered under the name : ' + qtiClass);\n }\n return ret;\n };\n\n /**\n * Retrieve the state of the interaction.\n * If the renderer has no state management, it falls back to the response management.\n *\n * @param {Object} qtiInteraction - the interaction\n * @param {Object} state - the interaction's state\n * @param {String} [qtiSubClass] - (not sure of the type and how it is used - Sam ? )\n *\n * @throws {Error} if no renderer is found\n */\n this.setState = function(qtiInteraction, state, qtiSubclass) {\n const qtiClass = qtiSubclass || qtiInteraction.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n\n if (renderer) {\n if (_.isFunction(renderer.setState)) {\n renderer.setState.call(this, qtiInteraction, state);\n } else {\n renderer.resetResponse.call(this, qtiInteraction);\n renderer.setResponse.call(this, qtiInteraction, state);\n }\n } else {\n throw new Error('no renderer registered under the name : ' + qtiClass);\n }\n };\n\n /**\n * Calls the renderer destroy.\n * Ask the renderer to run destroy if exists.\n *\n * @throws {Error} if no renderer is found\n */\n this.destroy = function(qtiInteraction, qtiSubclass) {\n let ret = false;\n const qtiClass = qtiSubclass || qtiInteraction.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n\n if (renderer) {\n if (_.isFunction(renderer.destroy)) {\n ret = renderer.destroy.call(this, qtiInteraction);\n }\n } else {\n throw new Error('no renderer registered under the name : ' + qtiClass);\n }\n return ret;\n };\n\n this.getLoadedRenderers = function() {\n return _renderers;\n };\n\n this.register = function(renderersLocations) {\n _.extend(_locations, renderersLocations);\n };\n\n this.load = function(callback, requiredClasses) {\n const self = this;\n let required = [];\n\n const themeData = themesHelper.getCurrentThemeData();\n if (themeData) {\n options.themes = themeData;\n }\n if (options.themes) {\n //resolve themes paths\n options.themes.base = this.resolveUrl(options.themes.base);\n _.forEach(options.themes.available, function(theme, index) {\n options.themes.available[index].path = self.resolveUrl(theme.path);\n });\n this.themeLoader = themeLoader(options.themes).load(options.preload);\n }\n\n if (requiredClasses) {\n if (_.isArray(requiredClasses)) {\n //exclude abstract classes\n requiredClasses = _.intersection(requiredClasses, _renderableClasses);\n\n //add dependencies\n _.each(requiredClasses, function(reqClass) {\n const deps = _dependencies[reqClass];\n if (deps) {\n requiredClasses = _.union(requiredClasses, deps);\n }\n });\n\n _.forEach(requiredClasses, function(qtiClass) {\n let requiredSubClasses;\n if (_renderableSubclasses[qtiClass]) {\n requiredSubClasses = _.intersection(requiredClasses, _renderableSubclasses[qtiClass]);\n _.each(requiredSubClasses, function(subclass) {\n if (\n !registerRendererClass(qtiClass + '.' + subclass, required) &&\n !registerRendererClass(qtiClass, required)\n ) {\n throw new Error(\n self.name +\n ' : missing qti class location declaration: ' +\n qtiClass +\n ', subclass: ' +\n subclass\n );\n }\n });\n } else {\n if (!registerRendererClass(qtiClass, required)) {\n throw new Error(self.name + ' : missing qti class location declaration: ' + qtiClass);\n }\n }\n });\n } else {\n throw new Error('invalid argument type: expected array for arg \"requireClasses\"');\n }\n } else {\n required = _.values(_locations);\n }\n\n moduleLoader([], ()=> true)\n .addList( required.map( module => ({ module, category: 'qti'}) ) )\n .load()\n .then( loaded => {\n loaded.forEach( clazz => {\n if (_isValidRenderer(clazz)) {\n _renderers[clazz.qtiClass] = clazz;\n }\n\n });\n if (typeof callback === 'function') {\n callback.call(self, _renderers);\n }\n });\n\n return this;\n };\n\n /**\n * Unload the renderer\n */\n this.unload = function unload() {\n if (this.themeLoader) {\n themeLoader(options.themes).unload();\n }\n return this;\n };\n\n /**\n * Define the shuffling manually\n *\n * @param {Object} interaction - the interaction\n * @param {Array} choices - the shuffled choices\n * @param {String} identificationType -\n */\n this.setShuffledChoices = function(interaction, choices, identificationType) {\n if (Element.isA(interaction, 'interaction')) {\n this.shuffledChoices[interaction.getSerial()] = _.pluck(\n interactionHelper.findChoices(interaction, choices, identificationType),\n 'serial'\n );\n }\n };\n\n /**\n * Get the choices shuffled for this interaction.\n *\n * @param {Object} interaction - the interaction\n * @param {Boolean} reshuffle - by default choices are shuffled only once and store, but if true you can force shuffling again\n * @param {String} returnedType - the choice type\n * @returns {Array} the choices\n */\n this.getShuffledChoices = function(interaction, reshuffle, returnedType) {\n let choices = [];\n let serial, i;\n\n if (Element.isA(interaction, 'interaction')) {\n serial = interaction.getSerial();\n\n //1st time, we shuffle (or asked to force shuffling)\n if (!this.shuffledChoices[serial] || reshuffle) {\n if (Element.isA(interaction, 'matchInteraction')) {\n this.shuffledChoices[serial] = [];\n for (i = 0; i < 2; i++) {\n choices[i] = interactionHelper.shuffleChoices(interaction.getChoices(i));\n this.shuffledChoices[serial][i] = _.pluck(choices[i], 'serial');\n }\n } else {\n choices = interactionHelper.shuffleChoices(interaction.getChoices());\n this.shuffledChoices[serial] = _.pluck(choices, 'serial');\n }\n\n //otherwise get the choices from the serials\n } else {\n if (Element.isA(interaction, 'matchInteraction')) {\n _.forEach(choices, function(choice, index) {\n if (index < 2) {\n _.forEach(this.shuffledChoices[serial][i], function(choiceSerial) {\n choice.push(interaction.getChoice(choiceSerial));\n });\n }\n });\n } else {\n _.forEach(this.shuffledChoices[serial], function(choiceSerial) {\n choices.push(interaction.getChoice(choiceSerial));\n });\n }\n }\n\n //do some type convertion\n if (returnedType === 'serial' || returnedType === 'identifier') {\n return interactionHelper.convertChoices(choices, returnedType);\n }\n\n //pass value only, not ref\n return _.clone(choices);\n }\n\n return [];\n };\n\n this.getRenderers = function() {\n return _renderers;\n };\n\n this.getLocations = function() {\n return _locations;\n };\n\n /**\n * Resolve URLs using the defined assetManager's strategies\n * @param {String} url - the URL to resolve\n * @returns {String} the resolved URL\n */\n this.resolveUrl = function resolveUrl(url) {\n if (!options.assetManager) {\n return url;\n }\n if (typeof url === 'string' && url.length > 0) {\n return options.assetManager.resolve(url);\n }\n };\n\n /**\n * @deprecated in favor of resolveUrl\n */\n this.getAbsoluteUrl = function(relUrl) {\n //let until method is removed\n console.warn('DEPRECATED used getAbsoluteUrl with ', arguments);\n\n //allow relative url output only if explicitely said so\n if (this.getOption('userRelativeUrl')) {\n return relUrl.replace(/^\\.?\\//, '');\n }\n\n if (/^http(s)?:\\/\\//i.test(relUrl) || /^data:[^\\/]+\\/[^;]+(;charset=[\\w]+)?;base64,/.test(relUrl)) {\n //already absolute or base64 encoded\n return relUrl;\n } else {\n let absUrl = '';\n const runtimeLocations = this.getOption('runtimeLocations');\n\n if (runtimeLocations && _.size(runtimeLocations)) {\n _.forIn(runtimeLocations, function(runtimeLocation, typeIdentifier) {\n if (relUrl.indexOf(typeIdentifier) === 0) {\n absUrl = relUrl.replace(typeIdentifier, runtimeLocation);\n return false; //break\n }\n });\n }\n\n if (absUrl) {\n return absUrl;\n } else {\n const baseUrl = this.getOption('baseUrl') || getDocumentBaseUrl();\n return baseUrl + relUrl;\n }\n }\n };\n\n this.setAreaBroker = function setAreaBroker(areaBroker) {\n this._areaBroker = areaBroker;\n };\n\n this.getAreaBroker = function getAreaBroker() {\n if (this._areaBroker) {\n return this._areaBroker;\n }\n };\n\n this.getItemCreator = function getItemCreator() {\n return this.getOption('itemCreator');\n };\n };\n\n /**\n * Expose the renderer's factory\n * @exports taoQtiItem/qtiRunner/core/Renderer\n */\n var Renderer$1 = {\n /**\n * Creates a new Renderer by extending the Renderer's prototype\n * @param {Object} renderersLocations -\n * @param {String} [name] - the new renderer name\n * @param {Object} [defaultOptions] - the renderer options\n */\n build: function(renderersLocations, name, defaultOptions) {\n const NewRenderer = function() {\n const options = _.isPlainObject(arguments[0]) ? arguments[0] : {};\n\n Renderer.apply(this);\n\n this.register(renderersLocations);\n this.name = name || '';\n this.setOptions(_.defaults(options, defaultOptions || {}));\n };\n NewRenderer.prototype = Renderer.prototype;\n return NewRenderer;\n }\n };\n\n return Renderer$1;\n\n});\n\n","/*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/factory/factory',['lodash', 'core/promise', 'core/eventifier'], function (_, Promise, eventifier){\n 'use strict';\n\n var _requirejs = window.require;\n var _defaultLoadingOptions = {\n reload: false\n };\n\n var loadModuleConfig = function loadModuleConfig(manifest){\n return new Promise(function(resolve, reject){\n var requireConfigAliases = {};\n var baseUrl;\n var reqConfigs = [];\n var modules = {};\n\n if(!manifest || !manifest.runtime){\n return reject('invalid manifest');\n }\n\n baseUrl = manifest.baseUrl;\n\n if(_.isArray(manifest.runtime.config) && manifest.runtime.config.length){\n _.forEach(manifest.runtime.config, function(pciConfig){\n if(_.isString(pciConfig)){\n reqConfigs.push('json!' + baseUrl + '/' + pciConfig);\n }else{\n if(pciConfig.data){\n modules = _.defaults(modules, pciConfig.data.paths || {});\n }else if(pciConfig.file){\n reqConfigs.push('json!' + baseUrl + '/' + pciConfig.file);\n }\n }\n });\n }\n\n require(reqConfigs, function(){\n\n var runtimeModules = {};\n\n requireConfigAliases[manifest.typeIdentifier] = baseUrl;\n\n if(manifest.model === 'IMSPCI'){\n\n modules = _.reduce(arguments, function(acc, conf){\n return _.defaults(acc, conf.paths || {});\n }, modules);\n\n _.forEach(manifest.runtime.modules || {}, function(paths, id){\n if(paths && (_.isString(paths) || (_.isArray(paths) && paths.length))){\n runtimeModules[id] = paths;\n }\n });\n\n modules = _.merge(modules, runtimeModules);\n\n _.forEach(modules, function(paths, id){\n paths = _.isArray(paths) ? paths : [paths];\n requireConfigAliases[id] = _.map(paths, function(path){\n return baseUrl+'/'+path.replace(/\\.js$/, '');\n });\n });\n }\n\n resolve(requireConfigAliases);\n\n }, reject);\n\n\n });\n };\n\n /**\n * Evaluate if the given object is a proper portable element provider\n * @param {Object} provider\n * @returns {Boolean}\n */\n var isPortableElementProvider = function isPortableElementProvider(provider){\n return (provider && _.isFunction(provider.load));\n };\n\n return function portableElementRegistry(methods){\n\n var _loaded = false;\n var __providers = {};\n\n /**\n * The portable element registry instance\n * @typedef {portableElementRegistry}\n */\n return eventifier(_.defaults(methods || {}, {\n _registry : {},\n\n /**\n * Get a register portable element\n * @param {String} typeIdentifier\n * @param {String} version\n * @returns {Object}\n */\n get : function get(typeIdentifier, version){\n\n if(this._registry[typeIdentifier]){\n //check version\n if(version){\n return _.find(this._registry[typeIdentifier], {version : version});\n }else{\n //latest\n return _.last(this._registry[typeIdentifier]);\n }\n }\n },\n\n /**\n * Register a portable element provider\n * @param moduleName\n * @param {String|Object }provider - the portable provider object or module name\n * @returns {portableElementRegistry}\n */\n registerProvider : function registerProvider(moduleName, provider){\n __providers[moduleName] = isPortableElementProvider(provider) ? provider : null;\n _loaded = false;\n return this;\n },\n\n /**\n * Clear all previously registered providers\n * @returns {portableElementRegistry}\n */\n resetProviders : function resetProviders(){\n __providers = {};\n _loaded = false;\n return this;\n },\n\n /**\n * Load the providers\n * @param {Object} [options]\n * @param {Boolean} [options.reload] - force to reload the registered providers\n * @returns {Promise}\n */\n loadProviders : function loadProviders(options){\n var self = this;\n var loadPromise;\n\n if(_loaded && !options.reload){\n loadPromise = Promise.resolve([]);\n } else {\n loadPromise = new Promise(function(resolve, reject) {\n var providerLoadingStack = [];\n _.forIn(__providers, function(provider, id){\n if(provider === null){\n providerLoadingStack.push(id);\n }\n });\n _requirejs(providerLoadingStack, function(){\n _.each([].slice.call(arguments), function(provider){\n if(isPortableElementProvider(provider)){\n __providers[providerLoadingStack.shift()] = provider;\n }\n });\n resolve(__providers);\n _loaded = true;\n self.trigger('providersloaded', __providers);\n }, reject);\n });\n }\n\n return loadPromise;\n },\n\n /**\n * Get all versions of all portable elements registered\n * @returns {Object} - all portable elements and their versions\n */\n getAllVersions : function getAllVersions(){\n var all = {};\n _.forIn(this._registry, function (versions, id){\n all[id] = _.map(versions, 'version');\n });\n return all;\n },\n\n /**\n * Get the runtime for a given portable element\n * @param {String} typeIdentifier\n * @param {String} [version] - if the version is provided, the method will try to find that version\n * @returns {Object} the runtime model\n */\n getRuntime : function getRuntime(typeIdentifier, version){\n var portableElement = this.get(typeIdentifier, version);\n if(portableElement){\n return _.assign(portableElement.runtime, {\n id : portableElement.typeIdentifier,\n label : portableElement.label,\n baseUrl : portableElement.baseUrl,\n model : portableElement.model\n });\n }else{\n this.trigger('error', {\n message : 'no portable element runtime found',\n typeIdentifier : typeIdentifier,\n version : version\n });\n }\n },\n\n /**\n * Get the creator model for a given portable element\n * @param {String} typeIdentifier\n * @param {String} [version] - if the version is provided, the method will try to find that version\n * @returns {Object} the creator model\n */\n getCreator : function getCreator(typeIdentifier, version){\n var portableElement = this.get(typeIdentifier, version);\n if(portableElement && portableElement.creator){\n return _.assign(portableElement.creator, {\n id : portableElement.typeIdentifier,\n label : portableElement.label,\n baseUrl : portableElement.baseUrl,\n response : portableElement.response,\n model : portableElement.model,\n xmlns : portableElement.xmlns\n });\n }else{\n this.trigger('error', {\n message : 'no portable element runtime found',\n typeIdentifier : typeIdentifier,\n version : version\n });\n }\n },\n\n /**\n * Returned all enabled created from the registry\n * @returns {Object} the collection of creators\n */\n getLatestCreators : function getLatestCreators(){\n var all = {};\n _.forIn(this._registry, function (versions, id){\n var lastVersion = _.last(versions);\n\n //check if the portable element is creatable:\n if(lastVersion.creator && lastVersion.creator.hook && lastVersion.enabled){\n all[id] = lastVersion;\n }\n });\n return all;\n },\n\n /**\n * Get the baseUrl for a given portable element\n * @param {String} typeIdentifier\n * @param {String} [version] - if the version is provided, the method will try to find that version\n * @returns {String} the base url\n */\n getBaseUrl : function getBaseUrl(typeIdentifier, version){\n var runtime = this.get(typeIdentifier, version);\n if(runtime){\n return runtime.baseUrl;\n }\n return '';\n },\n\n /**\n * Load the runtimes from registered portable element provider(s)\n *\n * @param {Object} [options]\n * @param {Array} [options.include] - the exact list of portable element typeIdentifier that should be loaded\n * @param {Boolean} [options.reload] - tells if all interactions should be reloaded\n * @returns {Promise}\n */\n loadRuntimes : function loadRuntimes(options){\n var self = this;\n var loadPromise;\n\n options = _.defaults(options||{}, _defaultLoadingOptions);\n\n loadPromise = self.loadProviders(options).then(function(providers){\n\n var loadStack = [];\n\n _.forEach(providers, function (provider){\n if(provider){//check that the provider is loaded\n loadStack.push(provider.load());\n }\n });\n\n //performs the loadings in parallel\n return Promise.all(loadStack).then(function (results){//TODO could remove one level of promise\n\n var configLoadingStack = [];\n\n //update registry\n self._registry = _.reduce(results, function (acc, _pcis){\n return _.merge(acc, _pcis);\n }, self._registry || {});//incremental loading\n\n //pre-configuring the baseUrl of the portable element's source\n _.forIn(self._registry, function (versions, typeIdentifier){\n if(_.isArray(options.include) && _.indexOf(options.include, typeIdentifier) < 0){\n return true;\n }\n configLoadingStack.push(loadModuleConfig(self.get(typeIdentifier)));\n });\n\n return Promise.all(configLoadingStack).then(function(moduleConfigs){\n var requireConfigAliases = _.reduce(moduleConfigs, function(acc, paths){\n return _.merge(acc, paths);\n }, {});\n\n //save the required libs name => path to global require alias\n //TODO in future planned user story : change this to a local require context to solve conflicts in third party module naming\n _requirejs.config({paths : requireConfigAliases});\n });\n });\n\n });\n\n\n loadPromise\n .then(function() {\n self.trigger('runtimesloaded');\n })\n .catch(function(err) {\n self.trigger('error', err);\n });\n\n return loadPromise;\n },\n\n /**\n * Load the creators from registered portable element provider(s)\n *\n * @param {Object} [options]\n * @param {Array} [options.include] - the exact list of portable element typeIdentifier that should be loaded\n * @param {Boolean} [options.reload] - tells if all interactions should be reloaded\n * @returns {Promise}\n */\n loadCreators : function loadCreators(options){\n var loadPromise;\n var self = this;\n\n options = _.defaults(options||{}, _defaultLoadingOptions);\n\n loadPromise = self.loadRuntimes(options).then(function(){\n var requiredCreatorHooks = [];\n\n _.forIn(self._registry, function (versions, typeIdentifier){\n var portableElementModel = self.get(typeIdentifier);//currently use the latest version only\n if(portableElementModel.creator && portableElementModel.creator.hook){\n if(portableElementModel.enabled){\n if(_.isArray(options.include) && _.indexOf(options.include, typeIdentifier) < 0){\n return true;\n }\n }else{\n if(!_.isArray(options.include) || _.indexOf(options.include, typeIdentifier) < 0){\n return true;\n }\n }\n requiredCreatorHooks.push(portableElementModel.creator.hook.replace(/\\.js$/, ''));\n }\n });\n\n if(requiredCreatorHooks.length){\n return new Promise(function(resolve, reject){\n //@todo support caching?\n _requirejs(requiredCreatorHooks, function (){\n var creators = {};\n _.each(arguments, function (creatorHook){\n var id = creatorHook.getTypeIdentifier();\n var portableElementModel = self.get(id);\n var i = _.findIndex(self._registry[id], {version : portableElementModel.version});\n if(i < 0){\n self.trigger('error', 'no creator found for id/version ' + id + '/' + portableElementModel.version);\n }else{\n self._registry[id][i].creator.module = creatorHook;\n creators[id] = creatorHook;\n }\n });\n resolve(creators);\n }, reject);\n });\n }else{\n return Promise.resolve({});\n }\n\n });\n\n loadPromise\n .then(function(creators) {\n self.trigger('creatorsloaded', creators);\n return creators;\n })\n .catch(function(err) {\n self.trigger('error', err);\n });\n\n return loadPromise;\n },\n\n /**\n * enable a portable element\n * @param {String} typeIdentifier\n * @param {String} [version] - if the version is provided, the method will try to find that version\n * @returns {portableElementRegistry}\n */\n enable: function enable(typeIdentifier, version){\n var portableElement = this.get(typeIdentifier, version);\n if(portableElement){\n portableElement.enabled = true;\n }\n return this;\n },\n\n /**\n * disable a portable element\n * @param {String} typeIdentifier\n * @param {String} [version] - if the version is provided, the method will try to find that version\n * @returns {portableElementRegistry}\n */\n disable: function disable(typeIdentifier, version){\n var portableElement = this.get(typeIdentifier, version);\n if(portableElement){\n portableElement.enabled = false;\n }\n return this;\n },\n\n /**\n * check is a portable element is enabled\n * @param {String} typeIdentifier\n * @param {String} [version] - if the version is provided, the method will try to find that version\n * @returns {portableElementRegistry}\n */\n isEnabled: function isEnabled(typeIdentifier, version){\n var portableElement = this.get(typeIdentifier, version);\n return (portableElement && portableElement.enabled === true);\n }\n }));\n };\n});\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2015-2022 (original work) Open Assessment Technologies SA ;\n */\n/**\n * Utility to retrieve and manipualte QTI Elements\n */\ndefine('taoQtiItem/qtiCreator/helper/qtiElements',['jquery', 'lodash', 'i18n', 'services/features'], function ($, _, __, featuresService) {\n 'use strict';\n\n const QtiElements = {\n classes: {\n //abstract classes:\n itemBody: { parents: ['bodyElement'], contains: ['block'], abstract: true },\n atomicBlock: {\n parents: ['blockStatic', 'bodyElement', 'flowStatic'],\n contains: ['inline'],\n abstract: true\n },\n atomicInline: {\n parents: ['bodyElement', 'flowStatic', 'inlineStatic'],\n contains: ['inline'],\n abstract: true\n },\n simpleBlock: { parents: ['blockStatic', 'bodyElement', 'flowStatic'], contains: ['block'], abstract: true },\n simpleInline: {\n parents: ['bodyElement', 'flowStatic', 'inlineStatic'],\n contains: ['inline'],\n abstract: true\n },\n flowStatic: { parents: ['flow'], abstract: true },\n blockStatic: { parents: ['block'], abstract: true },\n inlineStatic: { parents: ['inline'], abstract: true },\n flow: { parents: ['objectFlow'], abstract: true },\n tableCell: { parents: ['bodyElement'], contains: ['flow'], abstract: true },\n //html-derived qti elements:\n caption: { parents: ['bodyElement'], contains: ['inline'], xhtml: true },\n col: { parents: ['bodyElement'], xhtml: true },\n colgroup: { parents: ['bodyElement'], contains: ['col'], xhtml: true },\n div: { parents: ['blockStatic', 'bodyElement', 'flowStatic'], contains: ['flow'], xhtml: true },\n dl: { parents: ['blockStatic', 'bodyElement', 'flowStatic'], contains: ['dlElement'], xhtml: true },\n dt: { parents: ['dlElement'], contains: ['inline'], xhtml: true },\n dd: { parents: ['dlElement'], contains: ['flow'], xhtml: true },\n hr: { parents: ['blockStatic', 'bodyElement', 'flowStatic'], xhtml: true },\n math: { parents: ['blockStatic', 'flowStatic', 'inlineStatic'], xhtml: true },\n li: { parents: ['bodyElement'], contains: ['flow'], xhtml: true },\n ol: { parents: ['blockStatic', 'bodyElement', 'flowStatic'], contains: ['li'], xhtml: true },\n ul: { parents: ['blockStatic', 'bodyElement', 'flowStatic'], contains: ['li'], xhtml: true },\n object: { parents: ['bodyElement', 'flowStatic', 'inlineStatic'], contains: ['objectFlow'], xhtml: true },\n param: { parents: ['objectFlow'], xhtml: true },\n table: {\n parents: ['blockStatic', 'bodyElement', 'flowStatic'],\n contains: ['caption', 'col', 'colgroup', 'thead', 'tfoot', 'tbody'],\n xhtml: true\n },\n tbody: { parents: ['bodyElement'], contains: ['tr'], xhtml: true },\n tfoot: { parents: ['bodyElement'], contains: ['tr'], xhtml: true },\n thead: { parents: ['bodyElement'], contains: ['tr'], xhtml: true },\n td: { parents: ['tableCell'], xhtml: true },\n th: { parents: ['tableCell'], xhtml: true },\n tr: { parents: ['bodyElement'], contains: ['tableCell'], xhtml: true },\n a: { parents: ['simpleInline'], xhtml: true },\n abbr: { parents: ['simpleInline'], xhtml: true },\n acronym: { parents: ['simpleInline'], xhtml: true },\n b: { parents: ['simpleInline'], xhtml: true },\n big: { parents: ['simpleInline'], xhtml: true },\n cite: { parents: ['simpleInline'], xhtml: true },\n code: { parents: ['simpleInline'], xhtml: true },\n dfn: { parents: ['simpleInline'], xhtml: true },\n em: { parents: ['simpleInline'], xhtml: true },\n i: { parents: ['simpleInline'], xhtml: true },\n kbd: { parents: ['simpleInline'], xhtml: true },\n q: { parents: ['simpleInline'], xhtml: true },\n samp: { parents: ['simpleInline'], xhtml: true },\n small: { parents: ['simpleInline'], xhtml: true },\n span: { parents: ['simpleInline'], xhtml: true },\n strong: { parents: ['simpleInline'], xhtml: true },\n sub: { parents: ['simpleInline'], xhtml: true },\n sup: { parents: ['simpleInline'], xhtml: true },\n tt: { parents: ['simpleInline'], xhtml: true },\n var: { parents: ['simpleInline'], xhtml: true },\n blockquote: { parents: ['simpleBlock'], xhtml: true },\n address: { parents: ['atomicBlock'], xhtml: true },\n h1: { parents: ['atomicBlock'], xhtml: true },\n h2: { parents: ['atomicBlock'], xhtml: true },\n h3: { parents: ['atomicBlock'], xhtml: true },\n h4: { parents: ['atomicBlock'], xhtml: true },\n h5: { parents: ['atomicBlock'], xhtml: true },\n h6: { parents: ['atomicBlock'], xhtml: true },\n p: { parents: ['atomicBlock'], xhtml: true },\n pre: { parents: ['atomicBlock'], xhtml: true },\n img: { parents: ['atomicInline'], xhtml: true, attributes: ['src', 'alt', 'longdesc', 'height', 'width'] },\n br: { parents: ['atomicInline'], xhtml: true },\n //qti elements:\n infoControl: { parents: ['blockStatic', 'bodyElement', 'flowStatic'], qti: true },\n textRun: { parents: ['inlineStatic', 'flowstatic'], qti: true },\n feedbackInline: { parents: ['simpleInline', 'feedbackElement'], qti: true },\n feedbackBlock: { parents: ['simpleBlock'], qti: true },\n rubricBlock: { parents: ['simpleBlock'], qti: true }, //strange qti 2.1 exception, marked as simpleBlock instead of\n blockInteraction: { parents: ['block', 'flow', 'interaction'], qti: true },\n inlineInteraction: { parents: ['inline', 'flow', 'interaction'], qti: true },\n gap: { parents: ['inlineStatic'], qti: true },\n hottext: { parents: ['flowstatic', 'inlineStatic'], contains: ['inlineStatic'], qti: true },\n printedVariable: { parents: ['bodyElement', 'flowStatic', 'inlineStatic', 'textOrVariable'], qti: true },\n prompt: { parents: ['bodyElement'], contains: ['inlineStatic'], qti: true },\n templateElement: { parents: ['bodyElement'], qti: true },\n templateBlock: {\n parents: ['blockStatic', 'flowStatic', 'templateElement'],\n contains: ['blockStatic'],\n qti: true\n },\n templateInline: {\n parents: ['inlineStatic', 'flowStatic', 'templateElement'],\n contains: ['inlineStatic'],\n qti: true\n },\n choiceInteraction: { parents: ['blockInteraction'], qti: true },\n associateInteraction: { parents: ['blockInteraction'], qti: true },\n orderInteraction: { parents: ['blockInteraction'], qti: true },\n matchInteraction: { parents: ['blockInteraction'], qti: true },\n hottextInteraction: { parents: ['blockInteraction'], qti: true },\n gapMatchInteraction: { parents: ['blockInteraction'], qti: true },\n mediaInteraction: { parents: ['blockInteraction'], qti: true },\n sliderInteraction: { parents: ['blockInteraction'], qti: true },\n uploadInteraction: { parents: ['blockInteraction'], qti: true },\n drawingInteraction: { parents: ['blockInteraction'], qti: true },\n graphicInteraction: { parents: ['blockInteraction'], qti: true },\n hotspotInteraction: { parents: ['graphicInteraction'], qti: true },\n graphicAssociateInteraction: { parents: ['graphicInteraction'], qti: true },\n graphicOrderInteraction: { parents: ['graphicInteraction'], qti: true },\n graphicGapMatchInteraction: { parents: ['graphicInteraction'], qti: true },\n selectPointInteraction: { parents: ['graphicInteraction'], qti: true },\n textEntryInteraction: { parents: ['stringInteraction', 'inlineInteraction'], qti: true },\n extendedTextInteraction: { parents: ['stringInteraction', 'blockInteraction'], qti: true },\n inlineChoiceInteraction: { parents: ['inlineInteraction'], qti: true },\n endAttemptInteraction: { parents: ['inlineInteraction'], qti: true },\n customInteraction: { parents: ['block', 'flow', 'interaction'], qti: true },\n _container: { parents: ['block'], qti: true } //a pseudo class introduced in TAO\n },\n\n cache: { containable: {}, children: {}, parents: {} },\n\n getAllowedContainersElements(qtiClass, $container) {\n const classes = QtiElements.getAllowedContainers(qtiClass);\n let jqSelector = '';\n for (let i in classes) {\n if (!classes[i].qti) {\n //html element:\n jqSelector += `${classes[i]}, `;\n }\n }\n\n if (jqSelector) {\n jqSelector = jqSelector.substring(0, jqSelector.length - 2);\n }\n\n return $(jqSelector, $container ? $container : $(document)).filter(':not([data-qti-type])');\n },\n\n getAllowedContainers(qtiClass) {\n let ret;\n if (QtiElements.cache.containable[qtiClass]) {\n ret = QtiElements.cache.containable[qtiClass];\n } else {\n ret = [];\n const parents = QtiElements.getParentClasses(qtiClass, true);\n for (let aClass in QtiElements.classes) {\n const model = QtiElements.classes[aClass];\n if (model.contains) {\n const intersect = _.intersection(model.contains, parents);\n if (intersect.length) {\n if (!model.abstract) {\n ret.push(aClass);\n }\n ret = _.union(ret, QtiElements.getChildClasses(aClass, true));\n }\n }\n }\n QtiElements.cache.containable[qtiClass] = ret;\n }\n\n return ret;\n },\n\n getAllowedContents(qtiClass, recursive, checked) {\n let ret = [];\n checked = checked || {};\n\n const model = QtiElements.classes[qtiClass];\n if (model && model.contains) {\n for (let i in model.contains) {\n const contain = model.contains[i];\n if (!checked[contain]) {\n checked[contain] = true;\n\n //qtiClass can contain everything defined as its contents\n ret.push(contain);\n\n //qtiClass can also contain subclass of its contents\n const children = QtiElements.getChildClasses(contain, true);\n for (let j in children) {\n const child = children[j];\n if (!checked[child]) {\n checked[child] = true;\n\n ret.push(child);\n\n //adding children allowed contents depends on the option \"recursive\"\n if (recursive) {\n ret = _.union(ret, QtiElements.getAllowedContents(child, true, checked));\n }\n }\n }\n\n //adding allowed contents of qtiClass' allowed contents depends on the option \"recursive\"\n if (recursive) {\n ret = _.union(ret, QtiElements.getAllowedContents(contain, true, checked));\n }\n }\n }\n }\n\n //qtiClass can contain all allowed contents of its parents:\n const parents = QtiElements.getParentClasses(qtiClass, true);\n for (let i in parents) {\n ret = _.union(ret, QtiElements.getAllowedContents(parents[i], recursive, checked));\n }\n\n return _.uniq(ret, false);\n },\n\n isAllowedClass(qtiContainerClass, qtiContentClass) {\n const allowedClasses = QtiElements.getAllowedContents(qtiContainerClass);\n return _.indexOf(allowedClasses, qtiContentClass) >= 0;\n },\n\n getParentClasses(qtiClass, recursive) {\n let ret;\n if (recursive && QtiElements.cache.parents[qtiClass]) {\n ret = QtiElements.cache.parents[qtiClass];\n } else {\n ret = [];\n if (QtiElements.classes[qtiClass]) {\n ret = QtiElements.classes[qtiClass].parents;\n if (recursive) {\n for (let i in ret) {\n ret = _.union(ret, QtiElements.getParentClasses(ret[i], recursive));\n }\n ret = _.uniq(ret, false);\n }\n }\n QtiElements.cache.parents[qtiClass] = ret;\n }\n\n return ret;\n },\n\n getChildClasses(qtiClass, recursive, type) {\n let ret;\n const cacheType = type ? type : 'all';\n if (recursive && QtiElements.cache.children[qtiClass] && QtiElements.cache.children[qtiClass][cacheType]) {\n ret = QtiElements.cache.children[qtiClass][cacheType];\n } else {\n ret = [];\n for (let aClass in QtiElements.classes) {\n const model = QtiElements.classes[aClass];\n if (_.indexOf(model.parents, qtiClass) >= 0) {\n if (type) {\n if (model[type]) {\n ret.push(aClass);\n }\n } else {\n ret.push(aClass);\n }\n if (recursive) {\n ret = _.union(ret, QtiElements.getChildClasses(aClass, recursive, type));\n }\n }\n }\n if (!QtiElements.cache.children[qtiClass]) {\n QtiElements.cache.children[qtiClass] = {};\n }\n QtiElements.cache.children[qtiClass][cacheType] = ret;\n }\n\n return ret;\n },\n\n isBlock(qtiClass) {\n return QtiElements.is(qtiClass, 'block');\n },\n\n isInline(qtiClass) {\n return QtiElements.is(qtiClass, 'inline');\n },\n\n is(qtiClass, topClass) {\n if (qtiClass === topClass) {\n return true;\n } else {\n const parents = QtiElements.getParentClasses(qtiClass, true);\n return _.indexOf(parents, topClass) >= 0;\n }\n },\n\n /**\n * Check wether an element is visible, using the feature viibility service\n * @param {string} qtiClass - see the list of available classes\n * @returns {boolean} true by default and false only if the element is explicitely registered as hidden\n */\n isVisible(qtiClass) {\n if (this.is(qtiClass, 'customInteraction')) {\n return featuresService.isVisible(`taoQtiItem/creator/customInteraction/${qtiClass.replace(/Interaction$/, '').replace(/^customInteraction\\./, '')}`);\n }\n if (this.is(qtiClass, 'interaction')) {\n return featuresService.isVisible(`taoQtiItem/creator/interaction/${qtiClass.replace(/Interaction$/, '')}`);\n }\n return true;\n },\n\n /**\n * Get the list of available elements for the authoring side\n * The list of those element is statically defined, but we filter out elements that should be visible\n * @returns {Object} the available elements\n */\n getAvailableAuthoringElements() {\n const tagTitles = {\n commonInteractions: __('Common Interactions'),\n inlineInteractions: __('Inline Interactions'),\n graphicInteractions: __('Graphic Interactions')\n };\n\n const authoringElements = {\n choiceInteraction: {\n label: __('Choice Interaction'),\n description: __(\n 'Select a single (radio buttons) or multiple (check boxes) responses among a set of choices.'\n ),\n icon: 'icon-choice',\n short: __('Choice'),\n qtiClass: 'choiceInteraction',\n tags: [tagTitles.commonInteractions, 'mcq'],\n group: 'common-interactions'\n },\n orderInteraction: {\n label: __('Order Interaction'),\n icon: 'icon-order',\n description: __('Arrange a list of choices in the correct order.'),\n short: __('Order'),\n qtiClass: 'orderInteraction',\n tags: [tagTitles.commonInteractions, 'ordering'],\n group: 'common-interactions'\n },\n associateInteraction: {\n label: __('Associate Interaction'),\n icon: 'icon-associate',\n description: __('Create pair(s) from a series of choices.'),\n short: __('Associate'),\n qtiClass: 'associateInteraction',\n tags: [tagTitles.commonInteractions, 'association'],\n group: 'common-interactions'\n },\n matchInteraction: {\n label: __('Match Interaction'),\n icon: 'icon-match',\n description: __(\n 'Create association(s) between two sets of choices displayed in a table (row and column).'\n ),\n short: __('Match'),\n qtiClass: 'matchInteraction',\n tags: [tagTitles.commonInteractions, 'association'],\n group: 'common-interactions'\n },\n hottextInteraction: {\n label: __('Hottext Interaction'),\n icon: 'icon-hottext',\n description: __('Select one or more text parts (hottext) within a text.'),\n short: __('Hottext'),\n qtiClass: 'hottextInteraction',\n tags: [tagTitles.commonInteractions, 'text'],\n group: 'common-interactions'\n },\n gapMatchInteraction: {\n label: __('Gap Match Interaction'),\n icon: 'icon-gap-match',\n description: __(' Fill in the gaps in a text from a set of choices.'),\n short: __('Gap Match'),\n qtiClass: 'gapMatchInteraction',\n tags: [tagTitles.commonInteractions, 'text', 'association'],\n group: 'common-interactions'\n },\n sliderInteraction: {\n label: __('Slider Interaction'),\n icon: 'icon-slider',\n description: __('Select a value within a numerical range.'),\n short: __('Slider'),\n qtiClass: 'sliderInteraction',\n tags: [tagTitles.commonInteractions, 'special'],\n group: 'common-interactions'\n },\n extendedTextInteraction: {\n label: __('Extended Text Interaction'),\n icon: 'icon-extended-text',\n description: __(\n 'Collect open-ended information in one or more text area(s) (strings or numeric values).'\n ),\n short: __('Extended Text'),\n qtiClass: 'extendedTextInteraction',\n tags: [tagTitles.commonInteractions, 'text'],\n group: 'common-interactions'\n },\n uploadInteraction: {\n label: __('File Upload Interaction'),\n icon: 'icon-upload',\n description: __('Upload a file (e.g. document, picture...) as a response.'),\n short: __('File Upload'),\n qtiClass: 'uploadInteraction',\n tags: [tagTitles.commonInteractions, 'special'],\n group: 'common-interactions'\n },\n mediaInteraction: {\n label: __('Media Interaction'),\n icon: 'icon-media',\n description: __(\n 'Control the playing parameters (auto-start, loop) of a video or audio file and report the number of time it has been played.'\n ),\n short: __('Media'),\n qtiClass: 'mediaInteraction',\n tags: [tagTitles.commonInteractions, 'media'],\n group: 'common-interactions'\n },\n _container: {\n label: __('Text Block'),\n icon: 'icon-font',\n description: __(\n 'Block contains the content (stimulus) of the item such as text or image. It is also required for Inline Interactions.'\n ),\n short: __('Block'),\n qtiClass: '_container',\n tags: [tagTitles.inlineInteractions, 'text'],\n group: 'inline-interactions'\n },\n inlineChoiceInteraction: {\n label: __('Inline Choice Interaction'),\n icon: 'icon-inline-choice',\n description: __('Select a choice from a drop-down list.'),\n short: __('Inline Choice'),\n qtiClass: 'inlineChoiceInteraction',\n tags: [tagTitles.inlineInteractions, 'inline-interactions', 'mcq'],\n group: 'inline-interactions'\n },\n textEntryInteraction: {\n label: __('Text Entry Interaction'),\n icon: 'icon-text-entry',\n description: __(\n 'Collect open-ended information in a short text input (strings or numeric values).'\n ),\n short: __('Text Entry'),\n qtiClass: 'textEntryInteraction',\n tags: [tagTitles.inlineInteractions, 'inline-interactions', 'text'],\n group: 'inline-interactions'\n },\n endAttemptInteraction: {\n label: __('End Attempt Interaction'),\n icon: 'icon-end-attempt',\n description: __('Trigger the end of the item attempt.'),\n short: __('End Attempt'),\n qtiClass: 'endAttemptInteraction',\n tags: [tagTitles.inlineInteractions, 'inline-interactions', 'button', 'submit'],\n group: 'inline-interactions'\n },\n hotspotInteraction: {\n label: __('Hotspot Interaction'),\n icon: 'icon-hotspot',\n description: __('Select one or more areas (hotspots) displayed on an picture.'),\n short: __('Hotspot'),\n qtiClass: 'hotspotInteraction',\n tags: [tagTitles.graphicInteractions, 'mcq'],\n group: 'graphic-interactions'\n },\n graphicOrderInteraction: {\n label: __('Graphic Order Interaction'),\n icon: 'icon-graphic-order',\n description: __('Order the areas (hotspots) displayed on a picture.'),\n short: __('Order'),\n qtiClass: 'graphicOrderInteraction',\n tags: [tagTitles.graphicInteractions, 'ordering'],\n group: 'graphic-interactions'\n },\n graphicAssociateInteraction: {\n label: __('Graphic Associate Interaction'),\n icon: 'icon-graphic-associate',\n description: __('Create association(s) between areas (hotspots) displayed on a picture.'),\n short: __('Associate'),\n qtiClass: 'graphicAssociateInteraction',\n tags: [tagTitles.graphicInteractions, 'association'],\n group: 'graphic-interactions'\n },\n graphicGapMatchInteraction: {\n label: __('Graphic Gap Match Interaction'),\n icon: 'icon-graphic-gap',\n description: __('Fill in the gaps on a picture with a set of image choices.'),\n short: __('Gap Match'),\n qtiClass: 'graphicGapMatchInteraction',\n tags: [tagTitles.graphicInteractions, 'association'],\n group: 'graphic-interactions'\n },\n selectPointInteraction: {\n label: __('Select Point Interaction'),\n icon: 'icon-select-point',\n description: __('Position one or more points on a picture (response areas are not displayed).'),\n short: __('Select Point'),\n qtiClass: 'selectPointInteraction',\n tags: [tagTitles.graphicInteractions],\n group: 'graphic-interactions'\n }\n };\n\n //filter out hidden elements\n const availableElements = {};\n for (const [elementId, element] of Object.entries(authoringElements)) {\n if (this.isVisible(elementId)) {\n availableElements[elementId] = element;\n }\n }\n return availableElements;\n }\n };\n\n return QtiElements;\n});\n\n","/*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016-2022 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/factory/ciRegistry',[\n 'lodash',\n 'i18n',\n 'taoQtiItem/portableElementRegistry/factory/factory',\n 'taoQtiItem/qtiCreator/helper/qtiElements'\n], function (_, __, portableElementRegistry, qtiElements) {\n 'use strict';\n\n /**\n * Create a ney interaction registry instance\n * interaction registry need to register newly loaded creator hooks in the list of available qti authoring elements\n *\n * @returns {Object} registry instance\n */\n return function customInteractionRegistry() {\n return portableElementRegistry({\n /**\n * Get the authoring information for a given custom interaction\n * @param {string} typeIdentifier - the interaction type identifier\n * @param {Object} [options]\n * @param {string|number} [options.version] - the interaction version\n * @param {boolean} [options.enabledOnly] - to only get interaction enabled && visible\n * @returns {Object} the authoring info\n */\n getAuthoringData(typeIdentifier, options = {}) {\n options = _.defaults(options || {}, { version: 0, enabledOnly: false });\n const pciModel = this.get(typeIdentifier, options.version);\n const qtiClass = `customInteraction.${pciModel.typeIdentifier}`;\n if (\n pciModel &&\n pciModel.creator &&\n pciModel.creator.hook &&\n pciModel.creator.icon &&\n ((pciModel.enabled && qtiElements.isVisible(qtiClass)) || !options.enabledOnly)\n ) {\n return {\n label: pciModel.label, //currently no translation available\n icon: pciModel.creator.icon.replace(new RegExp(`^${typeIdentifier}/`), pciModel.baseUrl),\n short: pciModel.short,\n description: pciModel.description,\n qtiClass, //custom interaction is block type\n tags: _.union([__('Custom Interactions')], pciModel.tags),\n group: 'custom-interactions'\n };\n }\n }\n }).on('creatorsloaded', function () {\n const creators = this.getLatestCreators();\n _.forEach(creators, function (creator, typeIdentifier) {\n qtiElements.classes[`customInteraction.${typeIdentifier}`] = {\n parents: ['customInteraction'],\n qti: true\n };\n });\n });\n };\n});\n\n","/*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/ciRegistry',['lodash', 'taoQtiItem/portableElementRegistry/factory/ciRegistry', 'module'], function (_, ciRegistry, module){\n 'use strict';\n\n //create a preregistered singleton of ciRegistry\n var registry = ciRegistry();\n var providers = [];\n var config = module.config();\n\n if(config && config.providers){\n providers = config.providers;\n }\n\n _.each(providers, function(provider){\n if(provider.name && provider.module){\n registry.registerProvider(provider.module);\n }\n });\n\n return registry;\n});\n","/*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/factory/icRegistry',[\n 'lodash',\n 'taoQtiItem/portableElementRegistry/factory/factory'\n], function (_, portableElementRegistry){\n 'use strict';\n\n /**\n * Info control registry has currently no additonal fonctionalities than the basic portable element registry\n *\n * @returns {Object} registry instance\n */\n return function infoControlRegistry(){\n return portableElementRegistry();\n }\n\n});\n","/*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/icRegistry',['lodash', 'taoQtiItem/portableElementRegistry/factory/icRegistry', 'module'], function (_, icRegistry, module){\n 'use strict';\n\n //create a preregistered singleton of icRegistry\n var registry = icRegistry();\n var providers = [];\n var config = module.config();\n\n if(config && config.providers){\n providers = config.providers;\n }\n\n _.each(providers, function(provider){\n if(provider.name && provider.module){\n registry.registerProvider(provider.module);\n }\n });\n\n return registry;\n});\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016 (original work) Open Assessment Technologies SA;\n */\n\ndefine('taoQtiItem/portableElementRegistry/assetManager/portableAssetStrategy',[\n 'taoQtiItem/portableElementRegistry/ciRegistry',\n 'taoQtiItem/portableElementRegistry/icRegistry'\n], function (ciRegistry, icRegistry) {\n 'use strict';\n\n function getBaseUrlByIdentifier(typeIdentifier) {\n if (ciRegistry.get(typeIdentifier)) {\n return ciRegistry.getBaseUrl(typeIdentifier);\n }\n if (icRegistry.get(typeIdentifier)) {\n return icRegistry.getBaseUrl(typeIdentifier);\n }\n return typeIdentifier;\n }\n\n //strategy to resolve portable info control and portable interactions paths.\n //It should never be reached in the stack the usual way and should be called only using resolveBy.\n return {\n name: 'portableElementLocation',\n handle: function handlePortableElementLocation(url) {\n\n if (url.file === url.path) {\n return getBaseUrlByIdentifier(url.file);\n } else if (url.source === url.relative) {\n return url.relative.replace(/^(\\.\\/)?([a-z_0-9]+)\\/(.*)/i, function (fullmatch, $1, typeIdentifier, relPath) {\n var runtimeLocation = getBaseUrlByIdentifier(typeIdentifier);\n if (runtimeLocation) {\n return runtimeLocation + '/' + relPath;\n }\n return fullmatch;\n });\n }\n }\n };\n});\n","define('taoQtiItem/qtiCommonRenderer/renderers/config',['lodash', 'context', 'ui/themes', 'taoItems/assets/manager', 'taoItems/assets/strategies', 'module', 'taoQtiItem/portableElementRegistry/assetManager/portableAssetStrategy'], function (_, context, themes, assetManagerFactory, assetStrategies, module, portableAssetStrategy) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n context = context && Object.prototype.hasOwnProperty.call(context, 'default') ? context['default'] : context;\n themes = themes && Object.prototype.hasOwnProperty.call(themes, 'default') ? themes['default'] : themes;\n assetManagerFactory = assetManagerFactory && Object.prototype.hasOwnProperty.call(assetManagerFactory, 'default') ? assetManagerFactory['default'] : assetManagerFactory;\n assetStrategies = assetStrategies && Object.prototype.hasOwnProperty.call(assetStrategies, 'default') ? assetStrategies['default'] : assetStrategies;\n module = module && Object.prototype.hasOwnProperty.call(module, 'default') ? module['default'] : module;\n portableAssetStrategy = portableAssetStrategy && Object.prototype.hasOwnProperty.call(portableAssetStrategy, 'default') ? portableAssetStrategy['default'] : portableAssetStrategy;\n\n /**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2014 (original work) Open Assessment Technologies SA;\n */\n\n var itemThemes = themes.get('items');\n var moduleConfig = module.config();\n\n //Create asset manager stack\n var assetManager = assetManagerFactory(\n [\n {\n name: 'theme',\n handle: function handleTheme(url) {\n if (\n itemThemes &&\n url.path &&\n (url.path === itemThemes.base || _.contains(_.pluck(itemThemes.available, 'path'), url.path))\n ) {\n return context.root_url + url.toString();\n }\n }\n },\n assetStrategies.taomedia,\n assetStrategies.external,\n assetStrategies.base64,\n assetStrategies.itemCssNoCache,\n assetStrategies.baseUrl,\n portableAssetStrategy\n ],\n { baseUrl: '' }\n ); //baseUrl is not predefined in the config, but should be set upon renderer instantiating\n\n //renderers locations\n var locations = {\n assessmentItem: 'taoQtiItem/qtiCommonRenderer/renderers/Item',\n _container: 'taoQtiItem/qtiCommonRenderer/renderers/Container',\n _simpleFeedbackRule: false,\n _tooltip: 'taoQtiItem/qtiCommonRenderer/renderers/Tooltip',\n stylesheet: 'taoQtiItem/qtiCommonRenderer/renderers/Stylesheet',\n outcomeDeclaration: false,\n responseDeclaration: false,\n responseProcessing: false,\n figure: 'taoQtiItem/qtiCommonRenderer/renderers/Figure',\n img: 'taoQtiItem/qtiCommonRenderer/renderers/Img',\n figcaption: 'taoQtiItem/qtiCommonRenderer/renderers/Figcaption',\n math: 'taoQtiItem/qtiCommonRenderer/renderers/Math',\n object: 'taoQtiItem/qtiCommonRenderer/renderers/Object',\n table: 'taoQtiItem/qtiCommonRenderer/renderers/Table',\n printedVariable: 'taoQtiItem/qtiCommonRenderer/renderers/PrintedVariable',\n rubricBlock: 'taoQtiItem/qtiCommonRenderer/renderers/RubricBlock',\n modalFeedback: 'taoQtiItem/qtiCommonRenderer/renderers/ModalFeedback',\n prompt: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/Prompt',\n choiceInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/ChoiceInteraction',\n extendedTextInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/ExtendedTextInteraction',\n orderInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/OrderInteraction',\n associateInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/AssociateInteraction',\n matchInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/MatchInteraction',\n textEntryInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/TextEntryInteraction',\n sliderInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/SliderInteraction',\n inlineChoiceInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/InlineChoiceInteraction',\n 'simpleChoice.choiceInteraction': 'taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleChoice.ChoiceInteraction',\n 'simpleChoice.orderInteraction': 'taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleChoice.OrderInteraction',\n hottext: 'taoQtiItem/qtiCommonRenderer/renderers/choices/Hottext',\n gap: 'taoQtiItem/qtiCommonRenderer/renderers/choices/Gap',\n gapText: 'taoQtiItem/qtiCommonRenderer/renderers/choices/GapText',\n 'simpleAssociableChoice.matchInteraction':\n 'taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleAssociableChoice.MatchInteraction',\n 'simpleAssociableChoice.associateInteraction':\n 'taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleAssociableChoice.AssociateInteraction',\n inlineChoice: 'taoQtiItem/qtiCommonRenderer/renderers/choices/InlineChoice',\n hottextInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/HottextInteraction',\n hotspotInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/HotspotInteraction',\n hotspotChoice: false,\n gapMatchInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/GapMatchInteraction',\n selectPointInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/SelectPointInteraction',\n graphicOrderInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/GraphicOrderInteraction',\n mediaInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/MediaInteraction',\n uploadInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/UploadInteraction',\n graphicGapMatchInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/GraphicGapMatchInteraction',\n gapImg: 'taoQtiItem/qtiCommonRenderer/renderers/choices/GapImg',\n graphicAssociateInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/GraphicAssociateInteraction',\n associableHotspot: false,\n customInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/PortableCustomInteraction',\n infoControl: 'taoQtiItem/qtiCommonRenderer/renderers/PortableInfoControl',\n include: 'taoQtiItem/qtiCommonRenderer/renderers/Include',\n endAttemptInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/EndAttemptInteraction'\n };\n\n var config = {\n name: 'commonRenderer',\n locations: locations,\n options: {\n assetManager: assetManager,\n themes: itemThemes,\n enableDragAndDrop: {\n associate: !!moduleConfig.associateDragAndDrop,\n gapMatch: !!moduleConfig.gapMatchDragAndDrop,\n graphicGapMatch: !!moduleConfig.graphicGapMatchDragAndDrop,\n order: !!moduleConfig.orderDragAndDrop\n },\n messages: moduleConfig.messages\n }\n };\n\n return config;\n\n});\n\n","define('taoQtiItem/qtiCommonRenderer/renderers/Renderer',['taoQtiItem/qtiRunner/core/Renderer', 'taoQtiItem/qtiCommonRenderer/renderers/config'], function (Renderer$1, config) { 'use strict';\n\n\tRenderer$1 = Renderer$1 && Object.prototype.hasOwnProperty.call(Renderer$1, 'default') ? Renderer$1['default'] : Renderer$1;\n\tconfig = config && Object.prototype.hasOwnProperty.call(config, 'default') ? config['default'] : config;\n\n\t/**\n\t * This program is free software; you can redistribute it and/or\n\t * modify it under the terms of the GNU General Public License\n\t * as published by the Free Software Foundation; under version 2\n\t * of the License (non-upgradable).\n\t *\n\t * This program is distributed in the hope that it will be useful,\n\t * but WITHOUT ANY WARRANTY; without even the implied warranty of\n\t * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\t * GNU General Public License for more details.\n\t *\n\t * You should have received a copy of the GNU General Public License\n\t * along with this program; if not, write to the Free Software\n\t * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n\t *\n\t * Copyright (c) 2014 (original work) Open Assessment Technologies SA;\n\t */\n\n\tvar Renderer = Renderer$1.build(config.locations, config.name, config.options);\n\n\treturn Renderer;\n\n});\n\n","define('taoQtiItem/runner/provider/manager/userModules',['lodash', 'module'], function (_, module) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n module = module && Object.prototype.hasOwnProperty.call(module, 'default') ? module['default'] : module;\n\n /**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016 (original work) Open Assessment Technologies SA ;\n */\n\n var userModules = {\n /**\n * Load user modules defined in the module config\n * @param {Array} [userModules] - manually specify user modules to load instead of getting them from the module config\n * @returns {Promise}\n */\n load: function load(userModules) {\n var config = module.config();\n\n if (!userModules || !_.isArray(userModules)) {\n if (config && config.userModules && _.isArray(config.userModules)) {\n userModules = config.userModules;\n } else {\n userModules = [];\n }\n }\n if(!userModules.length){\n return Promise.resolve();\n }\n return new Promise(function(resolve, reject) {\n window.require(userModules, function() {\n _.forEach(arguments, function(dependency) {\n if (dependency && _.isFunction(dependency.exec)) {\n dependency.exec();\n }\n });\n resolve();\n }, function(err) {\n reject(err.message);\n });\n });\n }\n };\n\n return userModules;\n\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2014 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n */\ndefine('taoQtiItem/runtime/qtiBootstrap',[\n 'jquery',\n 'lodash',\n 'module',\n 'taoQtiItem/qtiRunner/core/QtiRunner',\n 'taoQtiItem/qtiCommonRenderer/renderers/Renderer',\n 'iframeNotifier',\n 'core/history',\n 'taoQtiItem/runner/provider/manager/userModules'\n], function($, _, module, QtiRunner, Renderer, iframeNotifier, history, userModules){\n 'use strict';\n\n //fix backspace going back into the history\n history.fixBrokenBrowsers();\n\n /**\n * The bootstrap is used to set up a QTI item at runtime. It connects to the itemApi.\n *\n * @author Bertrand Chevrier \n * @exports taoQtiItem/runtime/qtiBootstrap\n *\n * @param {Object} runnerContext - the item context\n */\n return function bootstrap (runnerContext){\n\n //reconnect to global itemApi function\n window.onItemApiReady = function onItemApiReady(itemApi) {\n var qtiRunner = new QtiRunner();\n var coreItemData = runnerContext.itemData;\n var variableElementsData = _.merge(runnerContext.variableElements, itemApi.params.contentVariables || {});\n\n var renderer = new Renderer();\n\n // Makes the runner interface available from outside the frame\n // for preview.\n window.qtiRunner = qtiRunner;\n\n qtiRunner.setItemApi(itemApi);\n qtiRunner.setRenderer(renderer);\n\n qtiRunner.loadItemData(coreItemData, function() {\n\n qtiRunner.loadElements(variableElementsData, function() {\n\n qtiRunner.renderItem(undefined, function() {\n\n //userModules loading\n //we use any user modules bound to this module configuration instead of the ones bound to the new test runner\n var userModulesOverride;\n var config = module.config();\n if (config && config.userModules && _.isArray(config.userModules) && config.userModules.length > 0) {\n userModulesOverride = config.userModules;\n }\n userModules.load(userModulesOverride)\n .then(function() {\n\n //exec user scripts\n if (_.isArray(runnerContext.userScripts)) {\n require(runnerContext.userScripts, function() {\n _.forEach(arguments, function(dependency) {\n if (_.isFunction(dependency.exec)) {\n dependency.exec.call(null, runnerContext.userVars);\n }\n });\n });\n }\n\n iframeNotifier.parent('itemloaded');\n\n //IE9/10 loose the iframe focus, so we force getting it back.\n _.defer(function(){\n window.focus();\n });\n })\n .catch(function(err) {\n throw new Error('Error in user modules : ' + err.message);\n });\n\n });\n });\n });\n };\n\n //if the item is longer to load,\n _.defer(function(){\n //tell the parent to connect the item api\n iframeNotifier.parent('itemready');\n });\n\n };\n});\n\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2014 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n */\n\ndefine('taoQtiItem/runtime/qtiLoader',[\n 'taoQtiItem/runtime/qtiBootstrap',\n 'css!taoCss/tao-main-style'\n], function(qtiBootstrap){\n 'use strict';\n\n return {\n start : function start(){\n //the context is set into the template and bound to the tao namespace in global scope\n var runnerContext = window.tao.qtiRunnerContext;\n qtiBootstrap(runnerContext);\n }\n };\n});\n\n","\ndefine(\"taoQtiItem/loader/qtiLoader.bundle\", function(){});\n","window.bundles = (window.bundles || []).concat([\"taoQtiItem/loader/taoQtiItem.min\"]);\n"],"mappings":"ACsBA,YACA,gBAIA,CAAAA,YAAA,CAAAC,QAAA,CAAAC,cAAA,eACAC,SAAA,CAAAH,YAAA,CAAAI,YAAA,gBACAC,MAAA,CAAAL,YAAA,CAAAI,YAAA,gBAEAE,cAAA,UAAAA,eAAA,KACA,CAAAC,iBAAA,IACAC,cAAA,CAAAR,YAAA,CAAAI,YAAA,oBACAK,MAAA,CAAAT,YAAA,CAAAI,YAAA,gBACA,IACAG,iBAAA,CAAAG,IAAA,CAAAC,KAAA,CAAAF,MAAA,CACA,OAAAG,GAAA,EACAL,iBAAA,GACA,CACAM,MAAA,CAAAC,OAAA,EAAAN,cAAA,WAAAO,UAAA,EACA,IAAAC,eAAA,UAAAA,gBAAA,EACAH,MAAA,CAAAI,OAAA,GACAJ,MAAA,CAAAI,OAAA,IACAF,UAAA,CAAAG,KAAA,CAAAX,iBAAA,EAEA,EACAN,QAAA,CAAAkB,gBAAA,oBAAAH,eAAA,KACA,aAAAf,QAAA,CAAAmB,UAAA,EACAJ,eAAA,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AA,oDACAlB,MCFA,CAAAU,OAAA,EAAAV,MAAA,CAAAU,OAAA,MAAAC,MAAA"} \ No newline at end of file +{"version":3,"names":["loaderScript","document","getElementById","configUrl","getAttribute","bundle","loadController","controllerOptions","controllerPath","params","JSON","parse","err","window","require","controller","startController","started","start","addEventListener","readyState","loadBundles","loaded","bundles","concat","filter","item","index","indexOf","forEach","length","define","qtiClasses","_container","assessmentItem","responseProcessing","_simpleFeedbackRule","stylesheet","math","figure","img","figcaption","object","outcomeDeclaration","responseDeclaration","rubricBlock","associableHotspot","gap","gapImg","gapText","hotspotChoice","hottext","inlineChoice","simpleAssociableChoice","simpleChoice","associateInteraction","choiceInteraction","endAttemptInteraction","extendedTextInteraction","gapMatchInteraction","graphicAssociateInteraction","graphicGapMatchInteraction","graphicOrderInteraction","hotspotInteraction","hottextInteraction","inlineChoiceInteraction","matchInteraction","mediaInteraction","orderInteraction","prompt","selectPointInteraction","sliderInteraction","textEntryInteraction","uploadInteraction","feedbackBlock","feedbackInline","modalFeedback","customInteraction","infoControl","include","table","printedVariable","_tooltip","_","Object","prototype","hasOwnProperty","call","util","buildSerial","prefix","id","chars","i","charAt","Math","floor","random","buildId","usedIds","suffix","exists","TypeError","getUsedIds","contains","buildIdentifier","useSuffix","getUsedIdentifiers","isUndefined","replace","findInCollection","element","collectionNames","searchedSerial","found","isString","isArray","each","collectionName","collection","split","nameToken","elt","parent","isFunction","find","Error","addMarkupNamespace","markup","ns","$0","$1","$2","$3","$4","removeMarkupNamespaces","removeMarkupNamespace","getMarkupUsedNamespaces","namespaces","original","slash","node","push","uniq","$","rendererConfigHelper","getOptionsFromArguments","args","options","data","placeholder","subclass","renderer","arg","isRenderer","isPlainObject","console","log","_class","loggerFactory","rendererConfig","_instances","logger","Element","Class","extend","qtiClass","serial","rootElement","init","attributes","metaData","match","setAttributes","initContainer","arguments","initObject","is","getSerial","elts","getComposingElements","attr","name","value","prop","trigger","key","removeData","removeAttr","removeAttributes","warn","getAttributes","clone","attrNames","append","getBody","getObject","v","isA","getUsedClasses","ret","composingElts","body","location","getRootElement","setRelatedItem","setRootElement","getRelatedItem","setRenderer","getRenderer","render","rendering","_renderer","tplData","defaultData","tag","resolveUrl","merge","getData","renderTpl","replaceWith","postRender","altClassName","postRenderers","compact","getContainer","$scope","toArray","arr","type","isEmpty","addClass","className","clazz","_containClass","hasClass","removeClass","regex","RegExp","trim","toggleClass","state","isset","issetElement","unset","unsetElement","allClassStr","test","qtiElement","getElementBySerial","composingElements","getPrefix","html5Ns","prefixed","xmlNsHandler","stripNs","pattern","openRegEx","closeRegEx","restoreNs","xml","ignoreMarkup","xmlCopy","xmlRe","tagRe","xmlMatch","imsXsd","prefixAtt","tagMatch","responseRules","MATCH_CORRECT","responseIdentifier","outcomeIdentifier","responseIf","expression","expressions","identifier","baseType","MAP_RESPONSE","MAP_RESPONSE_POINT","responseRulesHelper","_templateNames","NONE","response","isUsingTemplate","tpl","template","isValidTemplateName","tplName","getTemplateUriFromName","getTemplateNameFromUri","tplUri","forIn","uri","getTemplateNameFromResponseRules","outcomeRules","keys","isEqual","itemScore","responseIdentifiers","outcomeExpressions","map","moduleLoader","responseHelper","itemScoreHelper","loadPortableCustomElementProperties","portableElement","rawProperties","properties","forOwn","e","loadPortableCustomElementData","typeIdentifier","entryPoint","libraries","setNamespace","xmlns","Loader","classesLocation","qti","setClassesLocation","qtiClassesList","getRequiredClasses","union","loadRequiredClasses","callback","reload","requiredClass","requiredClasses","required","module","category","addList","load","then","loadeded","QtiClass","getLoadedClasses","loadItemData","Qti","loadContainer","outcomes","outcome","buildOutcome","addOutcomeDeclaration","feedbacks","feedback","buildElement","addModalFeedback","stylesheets","addStylesheet","responses","responseRuleItemIndex","findIndex","_ref","responseRule","splice","buildResponse","addResponseDeclaration","feedbackRules","fbData","feedbackOutcomeIdentifier","feedbackOutcome","buildSimpleFeedbackRule","feedbackResponseRuleIndex","_ref2","setOutcomeResponseRule","responseKey","customResponseProcessing","some","setResponseProcessing","buildResponseProcessing","setNamespaces","setSchemaLocations","schemaLocations","setApipAccessibility","apipAccessibility","loadAndBuildElement","loadElement","loadElementData","loadElements","allElements","elementData","howMatch","defaultValue","correctResponse","correctResponses","mapEntries","size","mapping","areaMapping","mappingAttributes","feedbackRule","setCondition","condition","comparedValue","feedbackThen","modalFeedbacks","feedbackElse","comparedOutcome","rp","processingType","bodyObject","bodyData","elements","defaults","eltData","setElement","text","bdy","loadObjectData","loadInteractionData","loadChoiceData","loadMathData","loadPicData","loadTooltipData","interaction","buildInteractionChoices","loadPciData","choices","set","matchSet","choice","addChoice","gapImgs","addGapImg","val","_alt","setMathML","mathML","annotations","encoding","setAnnotation","tooltip","content","pci","pic","getRawValues","pciVar","base","values","list","_checkContainerType","_getBodyDom","html","_setBodyDomClass","newClass","oldClass","$wrapper","_setDomClass","$bodyDom","wrapInner","setEncodedDataToDom","dataName","newValue","oldValue","_getEncodedDataString","setEncodedData","getEncodedData","removeEncodedData","hasEncodedData","$body","matches","_prefix","container","$$1","context","containerHelper","Handlebars","Helpers0","iframeNotifier","previewOkBtn","asString","Template","deliveryOkBtn","Template$1","showFeedbacks","loader","itemSession","onCloseCallback","onShowCallback","firstFeedback","interactionsDisplayInfo","getInteractionsDisplayInfo","messages","renderedFeebacks","renderingQueue","$itemContainer","$itemBody","children","feedbackIds","message","$container","_currentMessageGroupId","interactionInfo","order","getFeedbackMessageSignature","displayContainer","messageGroupId","sortBy","clearModalFeedbacks","renderingToken","renderModalFeedback","renderingData","dom","on","autoscroll","replaceControl","getQtiContainer","me","max","__knownParent__","currentScrollTop","minScrollTop","maxScrollTop","scrollTop","$element","offset","top","height","outerHeight","min","animate","extractDisplayInfo","$displayContainer","$interactionContainer","closest","uniqueId","interactionContainer","interactionOrder","_interactionInfo","remove","renderedCallback","$modalFeedback","inline","done","Promise","race","all","pop","resolve","reject","delay","timeout","catch","$controls","$toggleContainer","parents","initControlToggle","toggleButtonTemplate","$ok","click","fb","hide","uncover","show","cover","interactionContainers","$cover","$interaction","toLowerCase","__initialized","compiler","main","depth0","helpers","partials","lookupProperty","propertyName","escapeExpression","hooks","helperMissing","nullContext","hash","loc","line","column","end","useData","inlineRenderer","async","count","feedbacksToBeDisplayed","callstack","eachRight","endCallback","cb","series","closeCallback","$feedback","$feedbackBox","modal","modalRenderer","ItemLoader","modalFeedbackInline","modalFeedbackModal","QtiRunner","rpEngine","itemApi","updateItemApi","getResponses","states","getStates","variables","property","file","mime","setVariables","saveResponses","resultApi","setQtiRunner","setItemApi","that","oldStateVariables","stringify","stateVariables","onKill","killCallback","newStateVariables","serviceApi","getHasBeenPaused","submit","setHasBeenPaused","getLoader","self","renderItem","noop","initInteractionsResponse","listenForThemeChange","interactions","getInteractions","responseId","getVariable","setState","setVariable","off","themeName","themeLoader","getThemeLoader","originalEvent","detail","change","validate","finish","getResponse","error","getState","inlineDisplay","config","inlineModalFeedback","_Mathfloor","interactionHelper","convertChoices","outputType","_this","c","findChoices","inputType","getChoice","getChoiceByIdentifier","shuffleChoices","r","f","j","n","k","tmp","serialToIdentifier","choiceSerial","themesHelper","getDocumentBaseUrl","protocol","host","pathname","hb","compile","_renderableClasses","_dependencies","_renderableSubclasses","_defaults","_isValidRenderer","valid","classCorrect","pos","slice","subClass","Renderer","registerRendererClass","success","_locations","_renderers","shuffledChoices","_getClassRenderer","setOption","setOptions","opts","getOption","getCustomMessage","elementName","messageKey","getAssetManager","assetManager","qtiSubclass","res","decorators","isObject","before","after","renderDirect","setResponse","qtiInteraction","resetResponse","destroy","getLoadedRenderers","register","renderersLocations","themeData","getCurrentThemeData","themes","available","theme","path","preload","intersection","reqClass","deps","requiredSubClasses","unload","setShuffledChoices","identificationType","pluck","getShuffledChoices","reshuffle","returnedType","getChoices","getRenderers","getLocations","url","getAbsoluteUrl","relUrl","absUrl","runtimeLocations","runtimeLocation","baseUrl","setAreaBroker","areaBroker","_areaBroker","getAreaBroker","getItemCreator","Renderer$1","build","defaultOptions","NewRenderer","apply","eventifier","_requirejs","_defaultLoadingOptions","loadModuleConfig","manifest","requireConfigAliases","reqConfigs","modules","runtime","pciConfig","paths","runtimeModules","model","reduce","acc","conf","isPortableElementProvider","provider","portableElementRegistry","methods","_loaded","__providers","_registry","get","version","last","registerProvider","moduleName","resetProviders","loadProviders","loadPromise","providerLoadingStack","shift","getAllVersions","versions","getRuntime","assign","label","getCreator","creator","getLatestCreators","lastVersion","hook","enabled","getBaseUrl","loadRuntimes","providers","loadStack","results","configLoadingStack","_pcis","moduleConfigs","loadCreators","requiredCreatorHooks","portableElementModel","creators","creatorHook","getTypeIdentifier","enable","disable","isEnabled","__","featuresService","QtiElements","classes","itemBody","abstract","atomicBlock","atomicInline","simpleBlock","simpleInline","flowStatic","blockStatic","inlineStatic","flow","tableCell","caption","xhtml","col","colgroup","div","dl","dt","dd","hr","li","ol","ul","param","tbody","tfoot","thead","td","th","tr","a","abbr","acronym","b","big","cite","code","dfn","em","kbd","q","samp","small","span","strong","sub","sup","tt","var","blockquote","address","h1","h2","h3","h4","h5","h6","p","pre","br","textRun","blockInteraction","inlineInteraction","templateElement","templateBlock","templateInline","drawingInteraction","graphicInteraction","cache","containable","getAllowedContainersElements","getAllowedContainers","jqSelector","substring","getParentClasses","aClass","intersect","getChildClasses","getAllowedContents","recursive","checked","contain","child","isAllowedClass","qtiContainerClass","qtiContentClass","allowedClasses","cacheType","isBlock","isInline","topClass","isVisible","getAvailableAuthoringElements","tagTitles","commonInteractions","inlineInteractions","graphicInteractions","authoringElements","description","icon","short","tags","group","availableElements","elementId","entries","qtiElements","customInteractionRegistry","getAuthoringData","enabledOnly","pciModel","ciRegistry","registry","infoControlRegistry","icRegistry","getBaseUrlByIdentifier","handle","handlePortableElementLocation","source","relative","fullmatch","relPath","assetManagerFactory","assetStrategies","portableAssetStrategy","itemThemes","moduleConfig","handleTheme","root_url","toString","taomedia","external","base64","itemCssNoCache","locations","\"simpleChoice.choiceInteraction\"","\"simpleChoice.orderInteraction\"","\"simpleAssociableChoice.matchInteraction\"","\"simpleAssociableChoice.associateInteraction\"","enableDragAndDrop","associate","associateDragAndDrop","gapMatch","gapMatchDragAndDrop","graphicGapMatch","graphicGapMatchDragAndDrop","orderDragAndDrop","userModules","dependency","exec","history","fixBrokenBrowsers","bootstrap","runnerContext","onItemApiReady","qtiRunner","coreItemData","itemData","variableElementsData","variableElements","contentVariables","userModulesOverride","userScripts","userVars","defer","focus","qtiBootstrap","tao","qtiRunnerContext"],"sources":["/Users/martinnicholson/work/currentgen/tao-community-handlebars4/tao/views/build/config-wrap-start-default.js","../../loader/bootstrap.js","../qtiItem/core/qtiClasses.js","../qtiItem/helper/util.js","../qtiItem/helper/rendererConfig.js","../qtiItem/core/Element.js","../qtiItem/helper/xmlNsHandler.js","../qtiItem/helper/responseRules.js","../qtiItem/helper/response.js","../qtiItem/helper/itemScore.js","../qtiItem/core/Loader.js","../qtiItem/helper/pci.js","../qtiItem/helper/container.js","../qtiRunner/modalFeedback/inlineRenderer.js","../qtiRunner/modalFeedback/modalRenderer.js","../qtiRunner/core/QtiRunner.js","../qtiItem/helper/interactionHelper.js","../qtiRunner/core/Renderer.js","../portableElementRegistry/factory/factory.js","../qtiCreator/helper/qtiElements.js","../portableElementRegistry/factory/ciRegistry.js","../portableElementRegistry/ciRegistry.js","../portableElementRegistry/factory/icRegistry.js","../portableElementRegistry/icRegistry.js","../portableElementRegistry/assetManager/portableAssetStrategy.js","../qtiCommonRenderer/renderers/config.js","../qtiCommonRenderer/renderers/Renderer.js","../runner/provider/manager/userModules.js","../runtime/qtiBootstrap.js","../runtime/qtiLoader.js","module-create.js","/Users/martinnicholson/work/currentgen/tao-community-handlebars4/tao/views/build/config-wrap-end-default.js"],"sourcesContent":["\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016-2018 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Bootstrap the app, start the entry controller\n * @author Bertrand Chevrier \n */\n(function(){\n 'use strict';\n\n\n\n var loaderScript = document.getElementById('amd-loader');\n var configUrl = loaderScript.getAttribute('data-config');\n var bundle = loaderScript.getAttribute('data-bundle');\n\n var loadController = function loadController(){\n var controllerOptions = {};\n var controllerPath = loaderScript.getAttribute('data-controller');\n var params = loaderScript.getAttribute('data-params');\n try{\n controllerOptions = JSON.parse(params);\n } catch(err){\n controllerOptions = {};\n }\n window.require([controllerPath], function(controller) {\n var startController = function startController(){\n if(!window.started){\n window.started = true;\n controller.start(controllerOptions);\n }\n };\n document.addEventListener('readystatechange', startController, false);\n if (document.readyState === 'complete') {\n startController();\n }\n });\n };\n\n //always start to load the config\n window.require([configUrl], function() {\n\n //define the global loading mechanism\n if(!window.loadBundles){\n //keep tracl of loaded bundles, even if require does it,\n //this prevent some unecessary cycles\n window.loaded = {};\n\n /**\n * Loading entry point for inter bundle dependency,\n * always take the bundles from the params and window.bundles\n * @param {String[]} [bundles] - an optional list of bundle to load\n */\n window.loadBundles = function loadBundles(bundles){\n bundles = bundles || [];\n bundles = bundles.concat(window.bundles)\n bundles = bundles.filter( function(item, index){\n return item && bundles.indexOf(item) === index && window.loaded[item] !== true;\n });\n require(bundles, function(){\n bundles.forEach( function( item ) {\n window.loaded[item] = true;\n });\n loadController();\n });\n }\n }\n\n if(bundle || (window.bundles && window.bundles.length)) {\n window.loadBundles([bundle]);\n } else {\n loadController();\n }\n });\n})();\n\ndefine(\"loader/bootstrap\", function(){});\n\n","define('taoQtiItem/qtiItem/core/qtiClasses',[],function () { 'use strict';\n\n var qtiClasses = {\n _container: 'taoQtiItem/qtiItem/core/Container',\n assessmentItem: 'taoQtiItem/qtiItem/core/Item',\n responseProcessing: 'taoQtiItem/qtiItem/core/ResponseProcessing',\n _simpleFeedbackRule: 'taoQtiItem/qtiItem/core/response/SimpleFeedbackRule',\n stylesheet: 'taoQtiItem/qtiItem/core/Stylesheet',\n math: 'taoQtiItem/qtiItem/core/Math',\n figure: 'taoQtiItem/qtiItem/core/Figure',\n img: 'taoQtiItem/qtiItem/core/Img',\n figcaption: 'taoQtiItem/qtiItem/core/Figcaption',\n object: 'taoQtiItem/qtiItem/core/Object',\n outcomeDeclaration: 'taoQtiItem/qtiItem/core/variables/OutcomeDeclaration',\n responseDeclaration: 'taoQtiItem/qtiItem/core/variables/ResponseDeclaration',\n rubricBlock: 'taoQtiItem/qtiItem/core/RubricBlock',\n associableHotspot: 'taoQtiItem/qtiItem/core/choices/AssociableHotspot',\n gap: 'taoQtiItem/qtiItem/core/choices/Gap',\n gapImg: 'taoQtiItem/qtiItem/core/choices/GapImg',\n gapText: 'taoQtiItem/qtiItem/core/choices/GapText',\n hotspotChoice: 'taoQtiItem/qtiItem/core/choices/HotspotChoice',\n hottext: 'taoQtiItem/qtiItem/core/choices/Hottext',\n inlineChoice: 'taoQtiItem/qtiItem/core/choices/InlineChoice',\n simpleAssociableChoice: 'taoQtiItem/qtiItem/core/choices/SimpleAssociableChoice',\n simpleChoice: 'taoQtiItem/qtiItem/core/choices/SimpleChoice',\n associateInteraction: 'taoQtiItem/qtiItem/core/interactions/AssociateInteraction',\n choiceInteraction: 'taoQtiItem/qtiItem/core/interactions/ChoiceInteraction',\n endAttemptInteraction: 'taoQtiItem/qtiItem/core/interactions/EndAttemptInteraction',\n extendedTextInteraction: 'taoQtiItem/qtiItem/core/interactions/ExtendedTextInteraction',\n gapMatchInteraction: 'taoQtiItem/qtiItem/core/interactions/GapMatchInteraction',\n graphicAssociateInteraction: 'taoQtiItem/qtiItem/core/interactions/GraphicAssociateInteraction',\n graphicGapMatchInteraction: 'taoQtiItem/qtiItem/core/interactions/GraphicGapMatchInteraction',\n graphicOrderInteraction: 'taoQtiItem/qtiItem/core/interactions/GraphicOrderInteraction',\n hotspotInteraction: 'taoQtiItem/qtiItem/core/interactions/HotspotInteraction',\n hottextInteraction: 'taoQtiItem/qtiItem/core/interactions/HottextInteraction',\n inlineChoiceInteraction: 'taoQtiItem/qtiItem/core/interactions/InlineChoiceInteraction',\n matchInteraction: 'taoQtiItem/qtiItem/core/interactions/MatchInteraction',\n mediaInteraction: 'taoQtiItem/qtiItem/core/interactions/MediaInteraction',\n orderInteraction: 'taoQtiItem/qtiItem/core/interactions/OrderInteraction',\n prompt: 'taoQtiItem/qtiItem/core/interactions/Prompt',\n selectPointInteraction: 'taoQtiItem/qtiItem/core/interactions/SelectPointInteraction',\n sliderInteraction: 'taoQtiItem/qtiItem/core/interactions/SliderInteraction',\n textEntryInteraction: 'taoQtiItem/qtiItem/core/interactions/TextEntryInteraction',\n uploadInteraction: 'taoQtiItem/qtiItem/core/interactions/UploadInteraction',\n feedbackBlock: 'taoQtiItem/qtiItem/core/feedbacks/FeedbackBlock',\n feedbackInline: 'taoQtiItem/qtiItem/core/feedbacks/FeedbackInline',\n modalFeedback: 'taoQtiItem/qtiItem/core/feedbacks/ModalFeedback',\n customInteraction: 'taoQtiItem/qtiItem/core/interactions/CustomInteraction',\n infoControl: 'taoQtiItem/qtiItem/core/PortableInfoControl',\n include: 'taoQtiItem/qtiItem/core/Include',\n table: 'taoQtiItem/qtiItem/core/Table',\n printedVariable: 'taoQtiItem/qtiItem/core/PrintedVariable',\n _tooltip: 'taoQtiItem/qtiItem/core/Tooltip'\n };\n\n return qtiClasses;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/util',['lodash'], function (_) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2015 (original work) Open Assessment Technologies SA\n *\n */\n\n var util = {\n buildSerial: function buildSerial(prefix) {\n var id = prefix || '';\n var chars = 'abcdefghijklmnopqrstuvwxyz0123456789';\n for (var i = 0; i < 22; i++) {\n id += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n return id;\n },\n\n /**\n * Generates an id for a Qti element (the generation is different from identifier)\n * @param {Object} item - the element related item\n * @param {String} prefix - identifier prefix\n * @returns {String} the identifier\n * @throws {TypeError} if there is no item\n */\n buildId: function buildId(item, prefix) {\n var id;\n var usedIds;\n var i = 1;\n var suffix = '';\n var exists = false;\n\n if (!item) {\n throw new TypeError('A item is required to generate a unique identifier');\n }\n\n usedIds = item.getUsedIds();\n\n do {\n exists = false;\n id = prefix + suffix;\n if (_.contains(usedIds, id)) {\n exists = true;\n suffix = '_' + i;\n i++;\n }\n } while (exists);\n\n return id;\n },\n\n /**\n * Generates an identifier for a Qti element\n * @param {Object} item - the element related item\n * @param {String} prefix - identifier prefix\n * @param {Boolean} [useSuffix = true] - add a \"_ + index\" to the identifier\n * @returns {String} the identifier\n * @throws {TypeError} if there is no item\n */\n buildIdentifier: function buildIdentifier(item, prefix, useSuffix) {\n var id;\n var usedIds;\n var suffix = '';\n var i = 1;\n var exists = false;\n\n if (!item) {\n throw new TypeError('A item is required to generate a unique identifier');\n }\n\n if (!prefix) {\n throw new TypeError('Prefix is required to build an identifier');\n }\n\n usedIds = item.getUsedIdentifiers();\n useSuffix = _.isUndefined(useSuffix) ? true : useSuffix;\n\n if (prefix) {\n prefix = prefix\n .replace(/_[0-9]+$/gi, '_') //detect incremental id of type choice_12, response_3, etc.\n .replace(/[^a-zA-Z0-9_]/gi, '_')\n .replace(/(_)+/gi, '_');\n if (useSuffix) {\n suffix = '_' + i;\n }\n }\n\n do {\n exists = false;\n id = prefix + suffix;\n if (usedIds[id]) {\n exists = true;\n suffix = '_' + i;\n i++;\n }\n } while (exists);\n\n return id;\n },\n\n findInCollection: function findInCollection(element, collectionNames, searchedSerial) {\n var found = null;\n\n if (_.isString(collectionNames)) {\n collectionNames = [collectionNames];\n }\n\n if (_.isArray(collectionNames)) {\n _.each(collectionNames, function(collectionName) {\n //get collection to search in (resolving case like interaction.choices.0\n var collection = element;\n _.each(collectionName.split('.'), function(nameToken) {\n collection = collection[nameToken];\n });\n var elt = collection[searchedSerial];\n\n if (elt) {\n found = { parent: element, element: elt };\n return false; //break the each loop\n }\n\n //search inside each elements:\n _.each(collection, function(elt) {\n if (_.isFunction(elt.find)) {\n found = elt.find(searchedSerial);\n if (found) {\n return false; //break the each loop\n }\n }\n });\n\n if (found) {\n return false; //break the each loop\n }\n });\n } else {\n throw new Error('invalid argument : collectionNames must be an array or a string');\n }\n\n return found;\n },\n addMarkupNamespace: function addMarkupNamespace(markup, ns) {\n if (ns) {\n markup = markup.replace(/<(\\/)?([a-z:]+)(\\s?)([^><]*)>/g, function($0, $1, $2, $3, $4) {\n if ($2.indexOf(':') > 0) {\n return $0;\n }\n $1 = $1 || '';\n $3 = $3 || '';\n return '<' + $1 + ns + ':' + $2 + $3 + $4 + '>';\n });\n return markup;\n }\n return markup;\n },\n removeMarkupNamespaces: function removeMarkupNamespace(markup) {\n return markup.replace(/<(\\/)?(\\w*):([^>]*)>/g, '<$1$3>');\n },\n getMarkupUsedNamespaces: function getMarkupUsedNamespaces(markup) {\n var namespaces = [];\n markup.replace(/<(\\/)?(\\w*):([^>]*)>/g, function(original, slash, ns, node) {\n namespaces.push(ns);\n return '<' + slash + node + '>';\n });\n return _.uniq(namespaces);\n }\n };\n\n return util;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/rendererConfig',['lodash', 'jquery'], function (_, $) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;\n\n var rendererConfigHelper = {};\n\n rendererConfigHelper.getOptionsFromArguments = function(args) {\n var options = {\n data: {},\n placeholder: null,\n subclass: '',\n renderer: null\n };\n\n _.each(args, function(arg) {\n if (arg) {\n if (arg.isRenderer) {\n options.renderer = arg;\n } else if (arg instanceof $ && arg.length) {\n options.placeholder = arg;\n } else if (_.isString(arg)) {\n options.subclass = arg;\n } else if (_.isPlainObject(arg)) {\n options.data = arg;\n } else {\n console.log('invalid arg', arg, args);\n }\n }\n });\n\n return options;\n };\n\n return rendererConfigHelper;\n\n});\n\n","define('taoQtiItem/qtiItem/core/Element',['jquery', 'lodash', 'class', 'core/logger', 'taoQtiItem/qtiItem/helper/util', 'taoQtiItem/qtiItem/helper/rendererConfig'], function ($, _, _class, loggerFactory, util, rendererConfig) { 'use strict';\n\n $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n loggerFactory = loggerFactory && Object.prototype.hasOwnProperty.call(loggerFactory, 'default') ? loggerFactory['default'] : loggerFactory;\n util = util && Object.prototype.hasOwnProperty.call(util, 'default') ? util['default'] : util;\n rendererConfig = rendererConfig && Object.prototype.hasOwnProperty.call(rendererConfig, 'default') ? rendererConfig['default'] : rendererConfig;\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2015 (original work) Open Assessment Technologies SA\n *\n */\n\n var _instances = {};\n\n /**\n * Create a logger\n */\n var logger = loggerFactory('taoQtiItem/qtiItem/core/Element');\n\n var Element = Class.extend({\n qtiClass: '',\n serial: '',\n rootElement: null,\n init: function(serial, attributes) {\n //init own attributes\n this.attributes = {};\n\n //system properties, for item creator internal use only\n this.metaData = {};\n\n //init call in the format init(attributes)\n if (typeof serial === 'object') {\n attributes = serial;\n serial = '';\n }\n\n if (!serial) {\n serial = util.buildSerial(this.qtiClass + '_');\n }\n\n if (serial && (typeof serial !== 'string' || !serial.match(/^[a-z_0-9]*$/i))) {\n throw 'invalid QTI serial : (' + typeof serial + ') ' + serial;\n }\n\n if (!_instances[serial]) {\n _instances[serial] = this;\n this.serial = serial;\n this.setAttributes(attributes || {});\n } else {\n throw 'a QTI Element with the same serial already exists ' + serial;\n }\n\n if (typeof this.initContainer === 'function') {\n this.initContainer(arguments[2] || '');\n }\n if (typeof this.initObject === 'function') {\n this.initObject();\n }\n },\n is: function(qtiClass) {\n return qtiClass === this.qtiClass;\n },\n placeholder: function() {\n return '{{' + this.serial + '}}';\n },\n getSerial: function() {\n return this.serial;\n },\n getUsedIdentifiers: function() {\n var usedIds = {};\n var elts = this.getComposingElements();\n for (var i in elts) {\n var elt = elts[i];\n var id = elt.attr('identifier');\n if (id) {\n //warning: simplistic implementation, allow only one unique identifier in the item no matter the element class/type\n usedIds[id] = elt;\n }\n }\n return usedIds;\n },\n\n /**\n * Get the ids in use. (id is different from identifier)\n * @returns {Array} of the ids in use\n */\n getUsedIds: function getUsedIds() {\n var usedIds = [];\n _.forEach(this.getComposingElements(), function(elt) {\n var id = elt.attr('id');\n if (id && !_.contains(usedIds, id)) {\n usedIds.push(id);\n }\n });\n return usedIds;\n },\n\n attr: function(name, value) {\n if (name) {\n if (value !== undefined) {\n this.attributes[name] = value;\n } else {\n if (typeof name === 'object') {\n for (var prop in name) {\n this.attr(prop, name[prop]);\n }\n } else if (typeof name === 'string') {\n if (this.attributes[name] === undefined) {\n return undefined;\n } else {\n return this.attributes[name];\n }\n }\n }\n }\n return this;\n },\n data: function(name, value) {\n if (name) {\n if (value !== undefined) {\n this.metaData[name] = value;\n $(document).trigger('metaChange.qti-widget', { element: this, key: name, value: value });\n } else {\n if (typeof name === 'object') {\n for (var prop in name) {\n this.data(prop, name[prop]);\n }\n } else if (typeof name === 'string') {\n if (this.metaData[name] === undefined) {\n return undefined;\n } else {\n return this.metaData[name];\n }\n }\n }\n }\n return this;\n },\n removeData: function(name) {\n delete this.metaData[name];\n return this;\n },\n removeAttr: function(name) {\n return this.removeAttributes(name);\n },\n setAttributes: function(attributes) {\n if (!_.isPlainObject(attributes)) {\n logger.warn('attributes should be a plain object');\n }\n this.attributes = attributes;\n return this;\n },\n getAttributes: function() {\n return _.clone(this.attributes);\n },\n removeAttributes: function(attrNames) {\n if (typeof attrNames === 'string') {\n attrNames = [attrNames];\n }\n for (var i in attrNames) {\n delete this.attributes[attrNames[i]];\n }\n return this;\n },\n getComposingElements: function() {\n var elts = {};\n function append(element) {\n elts[element.getSerial()] = element; //pass individual object by ref, instead of the whole list(object)\n elts = _.extend(elts, element.getComposingElements());\n }\n if (typeof this.initContainer === 'function') {\n append(this.getBody());\n }\n if (typeof this.initObject === 'function') {\n append(this.getObject());\n }\n _.each(this.metaData, function(v) {\n if (Element.isA(v, '_container')) {\n append(v);\n } else if (_.isArray(v)) {\n _.each(v, function(v) {\n if (Element.isA(v, '_container')) {\n append(v);\n }\n });\n }\n });\n return elts;\n },\n getUsedClasses: function() {\n var ret = [this.qtiClass],\n composingElts = this.getComposingElements();\n\n _.each(composingElts, function(elt) {\n ret.push(elt.qtiClass);\n });\n\n return _.uniq(ret);\n },\n find: function(serial) {\n var found = null;\n var object, body;\n\n if (typeof this.initObject === 'function') {\n object = this.getObject();\n if (object.serial === serial) {\n found = { parent: this, element: object, location: 'object' };\n }\n }\n\n if (!found && typeof this.initContainer === 'function') {\n body = this.getBody();\n if (body.serial === serial) {\n found = { parent: this, element: body, location: 'body' };\n } else {\n found = this.getBody().find(serial, this);\n }\n }\n\n return found;\n },\n parent: function() {\n var item = this.getRootElement();\n if (item) {\n var found = item.find(this.getSerial());\n if (found) {\n return found.parent;\n }\n }\n return null;\n },\n /**\n * @deprecated - use setRootElement() instead\n */\n setRelatedItem: function(item) {\n logger.warn('Deprecated use of setRelatedItem()');\n this.setRootElement(item);\n },\n setRootElement: function(item) {\n var composingElts, i;\n\n if (Element.isA(item, 'assessmentItem')) {\n this.rootElement = item;\n composingElts = this.getComposingElements();\n for (i in composingElts) {\n composingElts[i].setRootElement(item);\n }\n }\n },\n /**\n * @deprecated - use getRootElement() instead\n */\n getRelatedItem: function() {\n logger.warn('Deprecated use of getRelatedItem()');\n return this.getRootElement();\n },\n getRootElement: function() {\n var ret = null;\n if (Element.isA(this.rootElement, 'assessmentItem')) {\n ret = this.rootElement;\n }\n return ret;\n },\n setRenderer: function(renderer) {\n if (renderer && renderer.isRenderer) {\n this.renderer = renderer;\n var elts = this.getComposingElements();\n for (var serial in elts) {\n elts[serial].setRenderer(renderer);\n }\n } else {\n throw 'invalid qti rendering engine';\n }\n },\n getRenderer: function() {\n return this.renderer;\n },\n /**\n * Render the element. Arguments are all optional and can be given in any order.\n * Argument parsing is based on argument type and is done by taoQtiItem/qtiItem/core/helpers/rendererConfig\n * @param {Renderer} renderer - specify which renderer to use\n * @param {jQuery} placeholder - DOM element that will be replaced by the rendered element\n * @param {Object} data - template data for the rendering\n * @param {String} subclass - subclass enables different behaviour of the same qti class in different contexts (eg. we could have different rendering for simpleChoice according to where it is being used: simpleChoice.orderInteraction, simpleChoice.choiceInteraction...)\n * @returns {String} - the rendered element as an HTML string\n */\n render: function render() {\n var args = rendererConfig.getOptionsFromArguments(arguments);\n var _renderer = args.renderer || this.getRenderer();\n var rendering;\n\n var tplData = {},\n defaultData = {\n tag: this.qtiClass,\n serial: this.serial,\n attributes: this.getAttributes()\n };\n\n if (!_renderer) {\n throw new Error('render: no renderer found for the element ' + this.qtiClass + ':' + this.serial);\n }\n\n if (typeof this.initContainer === 'function') {\n //allow body to have a different renderer if it has its own renderer set\n defaultData.body = this.getBody().render(args.renderer);\n }\n if (typeof this.initObject === 'function') {\n defaultData.object = {\n attributes: this.object.getAttributes()\n };\n defaultData.object.attributes.data = _renderer.resolveUrl(this.object.attr('data'));\n }\n\n tplData = _.merge(defaultData, args.data || {});\n tplData = _renderer.getData(this, tplData, args.subclass);\n rendering = _renderer.renderTpl(this, tplData, args.subclass);\n if (args.placeholder) {\n args.placeholder.replaceWith(rendering);\n }\n\n return rendering;\n },\n postRender: function(data, altClassName, renderer) {\n var postRenderers = [];\n var _renderer = renderer || this.getRenderer();\n\n if (typeof this.initContainer === 'function') {\n //allow body to have a different renderer if it has its own renderer set\n postRenderers = this.getBody().postRender(data, '', renderer);\n }\n\n if (_renderer) {\n postRenderers.push(_renderer.postRender(this, data, altClassName));\n } else {\n throw 'postRender: no renderer found for the element ' + this.qtiClass + ':' + this.serial;\n }\n\n return _.compact(postRenderers);\n },\n getContainer: function($scope, subclass) {\n var renderer = this.getRenderer();\n if (renderer) {\n return renderer.getContainer(this, $scope, subclass);\n } else {\n throw 'getContainer: no renderer found for the element ' + this.qtiClass + ':' + this.serial;\n }\n },\n toArray: function() {\n var arr = {\n serial: this.serial,\n type: this.qtiClass,\n attributes: this.getAttributes()\n };\n\n if (typeof this.initContainer === 'function') {\n arr.body = this.getBody().toArray();\n }\n if (typeof this.initObject === 'function') {\n arr.object = this.object.toArray();\n }\n\n return arr;\n },\n isEmpty: function() {\n //tells whether the element should be considered empty or not, from the rendering point of view\n return false;\n },\n addClass: function(className) {\n var clazz = this.attr('class') || '';\n if (!_containClass(clazz, className)) {\n this.attr('class', clazz + (clazz.length ? ' ' : '') + className);\n }\n },\n hasClass: function(className) {\n return _containClass(this.attr('class'), className);\n },\n removeClass: function(className) {\n var clazz = this.attr('class') || '';\n if (clazz) {\n var regex = new RegExp('(?:^|\\\\s)' + className + '(?:\\\\s|$)');\n clazz = clazz.replace(regex, ' ').trim();\n\n if (clazz) {\n this.attr('class', clazz);\n } else {\n this.removeAttr('class');\n }\n }\n },\n /**\n * Add or remove class. Setting the optional state will force addition/removal.\n * State is here to keep the jQuery syntax\n *\n * @param {String} className\n * @param {Boolean} [state]\n */\n toggleClass: function(className, state) {\n if (typeof state === 'boolean') {\n return state ? this.addClass(className) : this.removeClass(className);\n }\n\n if (this.hasClass(className)) {\n return this.removeClass(className);\n }\n return this.addClass(className);\n },\n isset: function() {\n return Element.issetElement(this.serial);\n },\n unset: function() {\n return Element.unsetElement(this.serial);\n }\n });\n\n var _containClass = function(allClassStr, className) {\n var regex = new RegExp('(?:^|\\\\s)' + className + '(?:\\\\s|$)', '');\n return allClassStr && regex.test(allClassStr);\n };\n\n //helpers\n Element.isA = function(qtiElement, qtiClass) {\n return qtiElement instanceof Element && qtiElement.is(qtiClass);\n };\n\n Element.getElementBySerial = function(serial) {\n return _instances[serial];\n };\n\n Element.issetElement = function(serial) {\n return !!_instances[serial];\n };\n\n /**\n * Unset a registered element from it's serial\n * @param {String} serial - the element serial\n * @returns {Boolean} true if unset\n */\n Element.unsetElement = function(serial) {\n var element = Element.getElementBySerial(serial);\n\n if (element) {\n var composingElements = element.getComposingElements();\n _.each(composingElements, function(elt) {\n delete _instances[elt.serial];\n });\n delete _instances[element.serial];\n\n return true;\n }\n return false;\n };\n\n return Element;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/xmlNsHandler',[],function () { 'use strict';\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2017-2022 (original work) Open Assessment Technologies SA\n */\n\n /**\n * XML namespace handling\n */\n\n /**\n * Elements that need to be prefixed\n *\n * @see http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd\n * @type {string}\n */\n const prefixed = 'article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section';\n\n /**\n * Find a possibly existing prefix\n *\n * @param namespaces\n * @param html5Ns\n * @returns {*}\n */\n function getPrefix(namespaces, html5Ns) {\n let key;\n for (key in namespaces) {\n if (namespaces[key] === html5Ns) {\n return key;\n }\n }\n return 'qh5';\n }\n\n var xmlNsHandler = {\n /**\n * Remove prefix to make sure elements are properly displayed\n *\n * @param body\n */\n stripNs: function stripNs(body) {\n const pattern = '([\\\\w]+)\\\\:(' + prefixed + ')';\n const openRegEx = new RegExp('(<' + pattern + ')', 'gi');\n const closeRegEx = new RegExp('(<\\\\/' + pattern + '>)', 'gi');\n return body.replace(openRegEx, '<$3').replace(closeRegEx, '');\n },\n\n /**\n * Add a prefix to those elements that require one\n *\n * @param xml\n * @param namespaces\n * @returns {*}\n */\n restoreNs: function restoreNs(xml, namespaces, ignoreMarkup = false) {\n let xmlCopy = xml;\n if (ignoreMarkup) {\n // cut from xmlCopy ...\n // because markup should be html without namespace qh5\n xmlCopy = xml.replace(/((?=)+)/gim, '');\n }\n const xmlRe = new RegExp('(<(' + prefixed + ')[^>]*>|<\\\\/(' + prefixed + ')>)', 'gi');\n const tagRe = new RegExp('((<)(' + prefixed + ')([^>]*)(>)|(<\\\\/)(' + prefixed + ')(>))', 'i');\n const xmlMatch = xmlCopy.match(xmlRe);\n const imsXsd = 'http://www.imsglobal.org/xsd';\n const html5Ns = imsXsd + '/imsqtiv2p2_html5_v1p0';\n const prefix = getPrefix(namespaces, html5Ns);\n const prefixAtt = 'xmlns:' + prefix + '=\"' + html5Ns + '\"';\n let i = xmlMatch ? xmlMatch.length : 0;\n\n if (!xmlMatch) {\n return xml;\n }\n\n while (i--) {\n const tagMatch = xmlMatch[i].match(tagRe);\n xml = xml.replace(\n xmlMatch[i],\n tagMatch[5]\n ? '<' + prefix + ':' + tagMatch[3] + tagMatch[4] + '>'\n : ''\n );\n }\n\n // we found matches but no namespace has been set\n if (xmlMatch.length && xml.indexOf(prefixAtt) === -1) {\n xml = xml.replace(' ({\n qtiClass: 'responseCondition',\n responseIf: {\n qtiClass: 'responseIf',\n expression: {\n qtiClass: 'match',\n expressions: [\n {\n qtiClass: 'variable',\n attributes: {\n identifier: responseIdentifier,\n },\n },\n {\n qtiClass: 'correct',\n attributes: {\n identifier: responseIdentifier,\n },\n },\n ],\n },\n responseRules: [\n {\n qtiClass: 'setOutcomeValue',\n attributes: {\n identifier: outcomeIdentifier,\n },\n expression: {\n qtiClass: 'sum',\n expressions: [\n {\n qtiClass: 'variable',\n attributes: {\n identifier: outcomeIdentifier,\n },\n },\n {\n qtiClass: 'baseValue',\n attributes: {\n baseType: 'integer'\n },\n value: '1',\n },\n ],\n },\n },\n ],\n },\n }),\n MAP_RESPONSE: (responseIdentifier, outcomeIdentifier) => ({\n qtiClass: 'responseCondition',\n responseIf: {\n qtiClass: 'responseIf',\n expression: {\n qtiClass: 'not',\n expressions: [\n {\n qtiClass: 'isNull',\n expressions: [{\n qtiClass: 'variable',\n attributes: {\n identifier: responseIdentifier,\n },\n }],\n },\n ],\n },\n responseRules: [\n {\n qtiClass: 'setOutcomeValue',\n attributes: {\n identifier: outcomeIdentifier,\n },\n expression: {\n qtiClass: 'sum',\n expressions: [\n {\n qtiClass: 'variable',\n attributes: {\n identifier: outcomeIdentifier,\n }\n },\n {\n qtiClass: 'mapResponse',\n attributes: {\n identifier: responseIdentifier,\n },\n },\n ],\n },\n },\n ],\n },\n }),\n MAP_RESPONSE_POINT: (responseIdentifier, outcomeIdentifier) => ({\n qtiClass: 'responseCondition',\n responseIf: {\n qtiClass: 'responseIf',\n expression: {\n qtiClass: 'not',\n expressions: [\n {\n qtiClass: 'isNull',\n expressions: [{\n qtiClass: 'variable',\n attributes: {\n identifier: responseIdentifier,\n },\n }],\n },\n ],\n },\n responseRules: [\n {\n qtiClass: 'setOutcomeValue',\n attributes: {\n identifier: outcomeIdentifier,\n },\n expression: {\n qtiClass: 'sum',\n expressions: [\n {\n qtiClass: 'variable',\n attributes: {\n identifier: outcomeIdentifier,\n }\n },\n {\n qtiClass: 'mapResponsePoint',\n attributes: {\n identifier: responseIdentifier,\n },\n },\n ],\n },\n },\n ],\n },\n }),\n };\n\n return responseRules;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/response',['lodash', 'taoQtiItem/qtiItem/helper/responseRules'], function (_, responseRulesHelper) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n responseRulesHelper = responseRulesHelper && Object.prototype.hasOwnProperty.call(responseRulesHelper, 'default') ? responseRulesHelper['default'] : responseRulesHelper;\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2014-2020 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n */\n\n const _templateNames = {\n MATCH_CORRECT: 'http://www.imsglobal.org/question/qti_v2p1/rptemplates/match_correct',\n MAP_RESPONSE: 'http://www.imsglobal.org/question/qti_v2p1/rptemplates/map_response',\n MAP_RESPONSE_POINT: 'http://www.imsglobal.org/question/qti_v2p1/rptemplates/map_response_point',\n NONE: 'no_response_processing'\n };\n\n\n var response = {\n isUsingTemplate(response, tpl) {\n if (_.isString(tpl)) {\n if (tpl === response.template || _templateNames[tpl] === response.template) {\n return true;\n }\n }\n\n return false;\n },\n isValidTemplateName(tplName) {\n return !!this.getTemplateUriFromName(tplName);\n },\n getTemplateUriFromName(tplName) {\n return _templateNames[tplName] || '';\n },\n getTemplateNameFromUri(tplUri) {\n let tplName = '';\n\n _.forIn(_templateNames, (uri, name) => {\n if (uri === tplUri) {\n tplName = name;\n return false;\n }\n });\n\n return tplName;\n },\n getTemplateNameFromResponseRules(responseIdentifier, responseRules) {\n if (!responseRules) {\n return 'NONE';\n }\n\n const {\n responseIf: {\n responseRules: [outcomeRules = {}] = [],\n } = {}\n } = responseRules;\n const {\n attributes: {\n identifier: outcomeIdentifier,\n } = {},\n } = outcomeRules;\n\n if (!outcomeIdentifier) {\n return '';\n }\n\n return Object.keys(responseRulesHelper).find(\n (key) => _.isEqual(responseRules, responseRulesHelper[key](responseIdentifier, outcomeIdentifier))\n );\n }\n };\n\n return response;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/itemScore',[],function () { 'use strict';\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2020 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n */\n\n /**\n * Returns iteraction score response rule object\n *\n * @param {String} responseIdentifiers interactions reponse indentifiers\n * @returns {Obeject}\n */\n var itemScore = (responseIdentifiers) => {\n const outcomeExpressions = responseIdentifiers.map((outcomeIdentifier) => ({\n qtiClass: 'variable',\n attributes: {\n identifier: `SCORE_${outcomeIdentifier}`,\n },\n }));\n\n return {\n qtiClass: 'setOutcomeValue',\n attributes: {\n identifier: 'SCORE',\n },\n expression: {\n qtiClass: 'sum',\n expressions: outcomeExpressions,\n },\n };\n };\n\n return itemScore;\n\n});\n\n","define('taoQtiItem/qtiItem/core/Loader',['lodash', 'class', 'taoQtiItem/qtiItem/core/qtiClasses', 'taoQtiItem/qtiItem/core/Element', 'taoQtiItem/qtiItem/helper/xmlNsHandler', 'core/moduleLoader', 'taoQtiItem/qtiItem/helper/response', 'taoQtiItem/qtiItem/helper/itemScore'], function (_, _class, qtiClasses, Element, xmlNsHandler, moduleLoader, responseHelper, itemScoreHelper) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n qtiClasses = qtiClasses && Object.prototype.hasOwnProperty.call(qtiClasses, 'default') ? qtiClasses['default'] : qtiClasses;\n Element = Element && Object.prototype.hasOwnProperty.call(Element, 'default') ? Element['default'] : Element;\n xmlNsHandler = xmlNsHandler && Object.prototype.hasOwnProperty.call(xmlNsHandler, 'default') ? xmlNsHandler['default'] : xmlNsHandler;\n moduleLoader = moduleLoader && Object.prototype.hasOwnProperty.call(moduleLoader, 'default') ? moduleLoader['default'] : moduleLoader;\n responseHelper = responseHelper && Object.prototype.hasOwnProperty.call(responseHelper, 'default') ? responseHelper['default'] : responseHelper;\n itemScoreHelper = itemScoreHelper && Object.prototype.hasOwnProperty.call(itemScoreHelper, 'default') ? itemScoreHelper['default'] : itemScoreHelper;\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2015-2020 (original work) Open Assessment Technologies SA ;\n *\n */\n\n /**\n * If a property is given as a serialized JSON object, parse it directly to a JS object\n */\n const loadPortableCustomElementProperties = (portableElement, rawProperties) => {\n var properties = {};\n\n _.forOwn(rawProperties, (value, key) => {\n try {\n properties[key] = JSON.parse(value);\n } catch (e) {\n properties[key] = value;\n }\n });\n portableElement.properties = properties;\n };\n\n const loadPortableCustomElementData = (portableElement, data) => {\n portableElement.typeIdentifier = data.typeIdentifier;\n portableElement.markup = data.markup;\n portableElement.entryPoint = data.entryPoint;\n portableElement.libraries = data.libraries;\n portableElement.setNamespace('', data.xmlns);\n\n loadPortableCustomElementProperties(portableElement, data.properties);\n };\n\n var Loader = Class.extend({\n init(item, classesLocation) {\n this.qti = {}; //loaded qti classes are store here\n this.classesLocation = {};\n this.item = item || null; //starts either from scratch or with an existing item object\n\n this.setClassesLocation(classesLocation || qtiClasses); //load default location for qti classes model\n },\n setClassesLocation(qtiClassesList) {\n _.extend(this.classesLocation, qtiClassesList);\n\n return this;\n },\n getRequiredClasses(data) {\n let ret = [];\n\n for (let i in data) {\n if (i === 'qtiClass' && data[i] !== '_container' && i !== 'rootElement') {\n //although a _container is a concrete class in TAO, it is not defined in QTI standard\n ret.push(data[i]);\n } else if (typeof data[i] === 'object' && i !== 'responseRules') {\n //responseRules should'nt be part of the parsing\n ret = _.union(ret, this.getRequiredClasses(data[i]));\n }\n }\n\n return ret;\n },\n loadRequiredClasses(data, callback, reload) {\n let requiredClass;\n const requiredClasses = this.getRequiredClasses(data, reload);\n const required = [];\n\n for (let i in requiredClasses) {\n requiredClass = requiredClasses[i];\n if (this.classesLocation[requiredClass]) {\n required.push({\n module: this.classesLocation[requiredClass],\n category: 'qti'\n });\n } else {\n throw new Error(`missing qti class location declaration : ${requiredClass}`);\n }\n }\n\n moduleLoader([], () => true).addList(required).load().then(loadeded => {\n loadeded.forEach(QtiClass => {\n this.qti[QtiClass.prototype.qtiClass] = QtiClass;\n });\n callback.call(this, this.qti);\n });\n },\n getLoadedClasses() {\n return _.keys(this.qti);\n },\n loadItemData(data, callback) {\n this.loadRequiredClasses(data, Qti => {\n if (typeof data === 'object' && data.qtiClass === 'assessmentItem') {\n //unload an item from it's serial (in case of a reload)\n if (data.serial) {\n Element.unsetElement(data.serial);\n }\n\n this.item = new Qti.assessmentItem(data.serial, data.attributes || {});\n this.loadContainer(this.item.getBody(), data.body);\n\n for (let i in data.outcomes) {\n const outcome = this.buildOutcome(data.outcomes[i]);\n\n if (outcome) {\n this.item.addOutcomeDeclaration(outcome);\n }\n }\n\n for (let i in data.feedbacks) {\n const feedback = this.buildElement(data.feedbacks[i]);\n\n if (feedback) {\n this.item.addModalFeedback(feedback);\n }\n }\n\n for (let i in data.stylesheets) {\n const stylesheet = this.buildElement(data.stylesheets[i]);\n\n if (stylesheet) {\n this.item.addStylesheet(stylesheet);\n }\n }\n\n //important : build responses after all modal feedbacks and outcomes has been loaded, because the simple feedback rules need to reference them\n let responseRules = data.responseProcessing && data.responseProcessing.responseRules\n ? [...data.responseProcessing.responseRules]\n : [];\n for (let i in data.responses) {\n const responseIdentifier = data.responses[i].identifier;\n const responseRuleItemIndex = responseRules.findIndex(({ responseIf: {\n expression: {\n expressions: [expression = {}] = [],\n } = {}\n } = {} }) => expression.attributes\n && expression.attributes.identifier === responseIdentifier\n || (\n expression.expressions\n && expression.expressions[0]\n && expression.expressions[0].attributes\n && expression.expressions[0].attributes.identifier === responseIdentifier\n )\n );\n const [responseRule] = responseRuleItemIndex !== -1\n ? responseRules.splice(responseRuleItemIndex, 1)\n : [];\n\n const response = this.buildResponse(\n data.responses[i],\n responseRule\n );\n\n if (response) {\n this.item.addResponseDeclaration(response);\n\n const feedbackRules = data.responses[i].feedbackRules;\n\n if (feedbackRules) {\n _.forIn(feedbackRules, (fbData, serial) => {\n const {\n attributes: {\n identifier: feedbackOutcomeIdentifier,\n } = {}\n } = data.outcomes[fbData.feedbackOutcome] || {};\n response.feedbackRules[serial] = this.buildSimpleFeedbackRule(fbData, response);\n\n // remove feedback response rule from response rules array\n const feedbackResponseRuleIndex = responseRules.findIndex(({\n responseIf: {\n responseRules: [setOutcomeResponseRule = {}] = [],\n } = {}\n }) => {\n const { attributes = {}, qtiClass } = setOutcomeResponseRule;\n const outcomeIdentifier = attributes.identifier;\n\n return feedbackOutcomeIdentifier === outcomeIdentifier\n && qtiClass === 'setOutcomeValue';\n });\n\n if (feedbackResponseRuleIndex !== -1) {\n responseRules.splice(feedbackResponseRuleIndex, 1);\n }\n });\n }\n }\n }\n\n const responseIdentifiers = Object.keys(this.item.responses || {})\n .map((responseKey) => this.item.responses[responseKey].attributes.identifier);\n\n if (data.responseProcessing) {\n const customResponseProcessing =\n (\n responseRules.length > 0\n && !(\n responseRules.length === 1\n && _.isEqual(\n responseRules[0],\n itemScoreHelper(\n responseIdentifiers\n )\n )\n )\n )\n || (\n this.item.responses\n && Object.keys(this.item.responses)\n .some((responseKey) => !this.item.responses[responseKey].template)\n );\n\n this.item.setResponseProcessing(this.buildResponseProcessing(data.responseProcessing, customResponseProcessing));\n }\n this.item.setNamespaces(data.namespaces);\n this.item.setSchemaLocations(data.schemaLocations);\n this.item.setApipAccessibility(data.apipAccessibility);\n }\n\n if (typeof callback === 'function') {\n callback.call(this, this.item);\n }\n });\n },\n loadAndBuildElement(data, callback) {\n this.loadRequiredClasses(data, () => {\n const element = this.buildElement(data);\n\n if (typeof callback === 'function') {\n callback.call(this, element);\n }\n });\n },\n loadElement(element, data, callback) {\n this.loadRequiredClasses(data, () => {\n this.loadElementData(element, data);\n\n if (typeof callback === 'function') {\n callback.call(this, element);\n }\n });\n },\n /**\n * Load ALL given elements into existing loaded item\n *\n * @todo to be renamed to loadItemElements\n * @param {object} data\n * @param {function} callback\n * @returns {undefined}\n */\n loadElements(data, callback) {\n if (!this.item) {\n throw new Error('QtiLoader : cannot load elements in empty item');\n }\n\n this.loadRequiredClasses(data, () => {\n const allElements = this.item.getComposingElements();\n\n for (let i in data) {\n const elementData = data[i];\n\n if (elementData && elementData.qtiClass && elementData.serial) {\n //find and update element\n if (allElements[elementData.serial]) {\n this.loadElementData(allElements[elementData.serial], elementData);\n }\n }\n }\n\n if (typeof callback === 'function') {\n callback.call(this, this.item);\n }\n });\n },\n buildResponse(data, responseRule) {\n const response = this.buildElement(data);\n\n response.template = responseHelper.getTemplateUriFromName(\n responseHelper.getTemplateNameFromResponseRules(data.identifier, responseRule)\n )\n || data.howMatch\n || null;\n\n response.defaultValue = data.defaultValue || null;\n response.correctResponse = data.correctResponses || null;\n\n if (_.size(data.mapping)) {\n response.mapEntries = data.mapping;\n } else if (_.size(data.areaMapping)) {\n response.mapEntries = data.areaMapping;\n } else {\n response.mapEntries = {};\n }\n\n response.mappingAttributes = data.mappingAttributes || {};\n\n return response;\n },\n buildSimpleFeedbackRule(data, response) {\n const feedbackRule = this.buildElement(data);\n\n feedbackRule.setCondition(response, data.condition, data.comparedValue || null);\n\n // feedbackRule.comparedOutcome = this.item.responses[data.comparedOutcome] || null;\n feedbackRule.feedbackOutcome = this.item.outcomes[data.feedbackOutcome] || null;\n feedbackRule.feedbackThen = this.item.modalFeedbacks[data.feedbackThen] || null;\n feedbackRule.feedbackElse = this.item.modalFeedbacks[data.feedbackElse] || null;\n\n //associate the compared outcome to the feedbacks if applicable\n const comparedOutcome = feedbackRule.comparedOutcome;\n\n if (feedbackRule.feedbackThen) {\n feedbackRule.feedbackThen.data('relatedResponse', comparedOutcome);\n }\n\n if (feedbackRule.feedbackElse) {\n feedbackRule.feedbackElse.data('relatedResponse', comparedOutcome);\n }\n\n return feedbackRule;\n },\n buildOutcome(data) {\n const outcome = this.buildElement(data);\n outcome.defaultValue = data.defaultValue || null;\n\n return outcome;\n },\n buildResponseProcessing(data, customResponseProcessing) {\n const rp = this.buildElement(data);\n\n if (customResponseProcessing) {\n rp.xml = data.data;\n rp.processingType = 'custom';\n } else {\n rp.processingType = 'templateDriven';\n }\n\n return rp;\n },\n loadContainer(bodyObject, bodyData) {\n if (!Element.isA(bodyObject, '_container')) {\n throw new Error('bodyObject must be a QTI Container');\n }\n\n if (!(bodyData && typeof bodyData.body === 'string' && typeof bodyData.elements === 'object')) {\n throw new Error('wrong bodydata format');\n }\n //merge attributes when loading element data\n const attributes = _.defaults(bodyData.attributes || {}, bodyObject.attributes || {});\n bodyObject.setAttributes(attributes);\n\n for (let serial in bodyData.elements) {\n const eltData = bodyData.elements[serial];\n const element = this.buildElement(eltData);\n\n //check if class is loaded:\n if (element) {\n bodyObject.setElement(element, bodyData.body);\n }\n }\n\n bodyObject.body(xmlNsHandler.stripNs(bodyData.body));\n },\n buildElement(elementData) {\n if (!(elementData && elementData.qtiClass && elementData.serial)) {\n throw new Error('wrong elementData format');\n }\n\n const className = elementData.qtiClass;\n\n if (!this.qti[className]) {\n throw new Error(`the qti element class does not exist: ${className}`);\n }\n\n const elt = new this.qti[className](elementData.serial);\n this.loadElementData(elt, elementData);\n\n return elt;\n },\n loadElementData(element, data) {\n //merge attributes when loading element data\n const attributes = _.defaults(data.attributes || {}, element.attributes || {});\n element.setAttributes(attributes);\n\n let body = data.body;\n if (!body && data.text && data.qtiClass === 'inlineChoice') {\n body = { body: data.text, elements: {} };\n }\n if (element.body && body) {\n if (element.bdy) {\n this.loadContainer(element.getBody(), body);\n }\n }\n\n if (element.object && data.object) {\n if (element.object) {\n this.loadObjectData(element.object, data.object);\n }\n }\n\n if (Element.isA(element, 'interaction')) {\n this.loadInteractionData(element, data);\n } else if (Element.isA(element, 'choice')) {\n this.loadChoiceData(element, data);\n } else if (Element.isA(element, 'math')) {\n this.loadMathData(element, data);\n } else if (Element.isA(element, 'infoControl')) {\n this.loadPicData(element, data);\n } else if (Element.isA(element, '_tooltip')) {\n this.loadTooltipData(element, data);\n }\n\n return element;\n },\n loadInteractionData(interaction, data) {\n if (Element.isA(interaction, 'blockInteraction')) {\n if (data.prompt) {\n this.loadContainer(interaction.prompt.getBody(), data.prompt);\n }\n }\n\n this.buildInteractionChoices(interaction, data);\n\n if (Element.isA(interaction, 'customInteraction')) {\n this.loadPciData(interaction, data);\n }\n },\n buildInteractionChoices(interaction, data) {\n // note: Qti.ContainerInteraction (Qti.GapMatchInteraction and Qti.HottextInteraction) has already been parsed by builtElement(interacionData);\n if (data.choices) {\n if (Element.isA(interaction, 'matchInteraction')) {\n for (let set = 0; set < 2; set++) {\n if (!data.choices[set]) {\n throw new Error(`missing match set #${set}`);\n }\n\n const matchSet = data.choices[set];\n\n for (let serial in matchSet) {\n const choice = this.buildElement(matchSet[serial]);\n\n if (choice) {\n interaction.addChoice(choice, set);\n }\n }\n }\n } else {\n for (let serial in data.choices) {\n const choice = this.buildElement(data.choices[serial]);\n\n if (choice) {\n interaction.addChoice(choice);\n }\n }\n }\n\n if (Element.isA(interaction, 'graphicGapMatchInteraction')) {\n if (data.gapImgs) {\n for (let serial in data.gapImgs) {\n const gapImg = this.buildElement(data.gapImgs[serial]);\n\n if (gapImg) {\n interaction.addGapImg(gapImg);\n }\n }\n }\n }\n }\n },\n loadChoiceData(choice, data) {\n if (Element.isA(choice, 'textVariableChoice')) {\n choice.val(data.text);\n } else if (Element.isA(choice, 'gapImg')) ; else if (Element.isA(choice, 'gapText')) {\n // this ensure compatibility of Qti 2.1 items\n if (!choice.body()) {\n choice.body(data.text);\n }\n } else if (Element.isA(choice, 'containerChoice')) ;\n },\n loadObjectData(object, data) {\n object.setAttributes(data.attributes);\n\n //@todo: manage object like a container\n if (data._alt) {\n if (data._alt.qtiClass === 'object') {\n object._alt = Loader.buildElement(data._alt);\n } else {\n object._alt = data._alt;\n }\n }\n },\n loadMathData(math, data) {\n math.ns = data.ns || {};\n math.setMathML(data.mathML || '');\n _.forIn(data.annotations || {}, (value, encoding) => {\n math.setAnnotation(encoding, value);\n });\n },\n loadTooltipData(tooltip, data) {\n tooltip.content(data.content);\n },\n loadPciData(pci, data) {\n loadPortableCustomElementData(pci, data);\n },\n loadPicData(pic, data) {\n loadPortableCustomElementData(pic, data);\n }\n });\n\n return Loader;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/pci',['lodash'], function (_) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n\n var pci = {\n getRawValues: function(pciVar) {\n if (_.isPlainObject(pciVar)) {\n if (pciVar.base !== undefined) {\n return _.values(pciVar.base);\n } else if (pciVar.list) {\n return _.values(pciVar.list);\n }\n }\n throw 'unsupported type ';\n }\n };\n\n return pci;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/container',['lodash', 'jquery'], function (_, $) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016 (original work) Open Assessment Technologies SA\n **/\n\n /**\n * Prefix used to the variable storage\n * @type String\n */\n var _prefix = 'x-tao-';\n\n /**\n * Check if the element is of a qti container type\n *\n * @private\n * @param {Object} element\n * @returns {Boolean}\n */\n function _checkContainerType(element) {\n if (_.isFunction(element.initContainer) && _.isFunction(element.body)) {\n return true;\n } else {\n throw 'the element is not of a container type';\n }\n }\n\n /**\n * Get the body element of the container\n *\n * @private\n * @param {Object} element\n * @returns {JQuery}\n */\n function _getBodyDom(element) {\n if (_checkContainerType(element)) {\n return $('
    ')\n .html(element.body())\n .find('.x-tao-wrapper');\n }\n }\n\n /**\n * Add a class to the body element of the qti container\n *\n * @private\n * @param {Object} element\n * @param {String} newClass\n * @param {String} [oldClass]\n */\n function _setBodyDomClass(element, newClass, oldClass) {\n if (_checkContainerType(element) && (oldClass || newClass)) {\n var $wrapper = $('
    ').html(element.body());\n //set css class to element\n _setDomClass($wrapper, newClass, oldClass);\n //set to the model\n element.body($wrapper.html());\n }\n }\n\n /**\n * Switch class to the wrapped DOM\n *\n * @param {JQuery} $wrapper\n * @param {String} newClass\n * @param {String} oldClass\n * @returns {undefined}\n */\n function _setDomClass($wrapper, newClass, oldClass) {\n var $bodyDom = $wrapper.find('.x-tao-wrapper');\n if (!$bodyDom.length) {\n //create one\n $wrapper.wrapInner('
    ');\n $bodyDom = $wrapper.find('.x-tao-wrapper');\n }\n if (oldClass) {\n $bodyDom.removeClass(oldClass);\n }\n if (newClass) {\n $bodyDom.addClass(newClass);\n }\n }\n\n /**\n * Add manually the encoded information to a dom element\n *\n * @param {JQuery} $wrapper - the wrapper of the element that will holds the information\n * @param {String} dataName - the name of the information\n * @param {String} newValue - the new value to be added\n * @param {String} [oldValue] - the old value to be removed\n * @returns {undefined}\n */\n function setEncodedDataToDom($wrapper, dataName, newValue, oldValue) {\n _setDomClass($wrapper, _getEncodedDataString(dataName, newValue), _getEncodedDataString(dataName, oldValue));\n }\n\n /**\n * Get the full variable name for the data store\n *\n * @param {String} dataName\n * @param {String} value\n * @returns {String}\n */\n function _getEncodedDataString(dataName, value) {\n if (dataName && value) {\n return _prefix + dataName + '-' + value;\n }\n return '';\n }\n\n /**\n * Set a data string to the element identified by its dataName\n *\n * @param {Object} element\n * @param {String} dataName\n * @param {String} newValue\n * @returns {undefined}\n */\n function setEncodedData(element, dataName, newValue) {\n var oldValue = getEncodedData(element, dataName);\n return _setBodyDomClass(\n element,\n _getEncodedDataString(dataName, newValue),\n _getEncodedDataString(dataName, oldValue)\n );\n }\n\n /**\n * Remove the stored data from the element by its dataName\n *\n * @param {Object} element\n * @param {String} dataName\n * @returns {unresolved}\n */\n function removeEncodedData(element, dataName) {\n var oldValue = getEncodedData(element, dataName);\n if (dataName && oldValue) {\n _setBodyDomClass(element, '', _getEncodedDataString(dataName, oldValue));\n }\n }\n\n /**\n * Check if the stored data exist\n *\n * @param {Object} element\n * @param {String} dataName\n * @param {String} value\n * @returns {Boolean}\n */\n function hasEncodedData(element, dataName, value) {\n var $body = _getBodyDom(element);\n if ($body && $body.length && dataName && value) {\n return $body.hasClass(_getEncodedDataString(dataName, value));\n }\n return false;\n }\n\n /**\n * Get the encoded data identified by its dataName\n *\n * @param {Object} element\n * @param {String} dataName\n * @returns {String}\n */\n function getEncodedData(element, dataName) {\n var regex, matches;\n var $body = _getBodyDom(element);\n if (dataName && $body && $body.length && $body.attr('class')) {\n regex = new RegExp(_prefix + dataName + '-([a-zA-Z0-9-._]*)');\n matches = $body.attr('class').match(regex);\n if (matches) {\n return matches[1];\n }\n }\n }\n\n /**\n * Provide a set of helper functions to set,retirve and manage string data to a container type qti element.\n */\n var container = {\n setEncodedData: setEncodedData,\n hasEncodedData: hasEncodedData,\n getEncodedData: getEncodedData,\n removeEncodedData: removeEncodedData,\n setEncodedDataToDom: setEncodedDataToDom\n };\n\n return container;\n\n});\n\n","define('taoQtiItem/qtiRunner/modalFeedback/inlineRenderer',['lodash', 'jquery', 'context', 'taoQtiItem/qtiItem/helper/pci', 'taoQtiItem/qtiItem/helper/container', 'handlebars', 'lib/handlebars/helpers', 'iframeNotifier'], function (_, $$1, context, pci, containerHelper, Handlebars, Helpers0, iframeNotifier) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n $$1 = $$1 && Object.prototype.hasOwnProperty.call($$1, 'default') ? $$1['default'] : $$1;\n context = context && Object.prototype.hasOwnProperty.call(context, 'default') ? context['default'] : context;\n pci = pci && Object.prototype.hasOwnProperty.call(pci, 'default') ? pci['default'] : pci;\n containerHelper = containerHelper && Object.prototype.hasOwnProperty.call(containerHelper, 'default') ? containerHelper['default'] : containerHelper;\n Handlebars = Handlebars && Object.prototype.hasOwnProperty.call(Handlebars, 'default') ? Handlebars['default'] : Handlebars;\n Helpers0 = Helpers0 && Object.prototype.hasOwnProperty.call(Helpers0, 'default') ? Helpers0['default'] : Helpers0;\n iframeNotifier = iframeNotifier && Object.prototype.hasOwnProperty.call(iframeNotifier, 'default') ? iframeNotifier['default'] : iframeNotifier;\n\n if (!Helpers0.__initialized) {\n Helpers0(Handlebars);\n Helpers0.__initialized = true;\n }\n var Template = Handlebars.template({\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"
  • \\n \\n \"\n + container.escapeExpression((lookupProperty(helpers,\"__\")||(depth0 && lookupProperty(depth0,\"__\"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),\"OK\",{\"name\":\"__\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":3,\"column\":28},\"end\":{\"line\":3,\"column\":39}}}))\n + \"\\n \\n
  • \";\n },\"useData\":true});\n function previewOkBtn(data, options, asString) {\n var html = Template(data, options);\n return (asString || true) ? html : $(html);\n }\n\n if (!Helpers0.__initialized) {\n Helpers0(Handlebars);\n Helpers0.__initialized = true;\n }\n var Template$1 = Handlebars.template({\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n return \"
  • \\n \\n \\n OK\\n \\n
  • \";\n },\"useData\":true});\n function deliveryOkBtn(data, options, asString) {\n var html = Template$1(data, options);\n return (asString || true) ? html : $(html);\n }\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2015 (original work) Open Assessment Techonologies SA;\n *\n */\n\n var timeout = (context.timeout > 0 ? context.timeout + 1 : 30) * 1000;\n\n /**\n * Main function for the module. It loads and render the feedbacks accodring to the given itemSession variables\n *\n * @param {Object} item - the standard tao qti item object\n * @param {Object} loader - the item loader instance\n * @param {Object} renderer - the item render instance\n * @param {Object} itemSession - session information containing the list of feedbacks to display\n * @param {Function} onCloseCallback - the callback to be executed when the feedbacks are closed\n * @param {Function} [onShowCallback] - the callback to be executed when the feedbacks are shown\n * @returns {Number} Number of feedbacks to be displayed\n */\n function showFeedbacks(item, loader, renderer, itemSession, onCloseCallback, onShowCallback) {\n var interactionsDisplayInfo = getInteractionsDisplayInfo(item);\n var messages = {};\n var renderedFeebacks = [];\n var renderingQueue = [];\n var $itemContainer = item.getContainer();\n var $itemBody = $itemContainer.children('.qti-itemBody');\n var firstFeedback;\n\n _.each(item.modalFeedbacks, function(feedback) {\n var feedbackIds, message, $container, comparedOutcome, _currentMessageGroupId, interactionInfo;\n var outcomeIdentifier = feedback.attr('outcomeIdentifier');\n var order = -1;\n\n //verify if the feedback should be displayed\n if (itemSession[outcomeIdentifier]) {\n //is the feedback in the list of feedbacks to be displayed ?\n feedbackIds = pci.getRawValues(itemSession[outcomeIdentifier]);\n if (_.indexOf(feedbackIds, feedback.id()) === -1) {\n return true; //continue with next feedback\n }\n\n //which group of feedbacks (interaction related) the feedback belongs to ?\n message = getFeedbackMessageSignature(feedback);\n comparedOutcome = containerHelper.getEncodedData(feedback, 'relatedOutcome');\n interactionInfo = _.find(interactionsDisplayInfo, { responseIdentifier: comparedOutcome });\n if (comparedOutcome && interactionInfo) {\n $container = interactionInfo.displayContainer;\n _currentMessageGroupId = interactionInfo.messageGroupId;\n order = interactionInfo.order;\n } else {\n $container = $itemBody;\n _currentMessageGroupId = '__item__';\n }\n //is this message already displayed ?\n if (!messages[_currentMessageGroupId]) {\n messages[_currentMessageGroupId] = [];\n }\n if (_.indexOf(messages[_currentMessageGroupId], message) >= 0) {\n return true; //continue\n } else {\n messages[_currentMessageGroupId].push(message);\n }\n\n //ok, display feedback\n renderingQueue.push({\n feedback: feedback,\n $container: $container,\n order: order\n });\n }\n });\n\n if (renderingQueue.length) {\n renderingQueue = _.sortBy(renderingQueue, 'order');\n\n //clear previously displayed feedbacks\n clearModalFeedbacks($itemContainer);\n\n //process rendering queue\n _.each(renderingQueue, function(renderingToken) {\n renderModalFeedback(\n renderingToken.feedback,\n loader,\n renderer,\n renderingToken.$container,\n $itemContainer,\n function(renderingData) {\n // keep the first feedback to force focus on it if needed\n if (!firstFeedback) {\n firstFeedback = $$1(renderingData.dom);\n }\n\n $$1('img', renderingData.dom).on('load', function() {\n iframeNotifier.parent('itemcontentchange');\n });\n\n //record rendered feedback for later reference\n renderedFeebacks.push(renderingData);\n if (renderedFeebacks.length === renderingQueue.length) {\n //rendering processing queue completed\n iframeNotifier.parent('itemcontentchange');\n\n // set the focus on the first feedback if needed\n // TODO: this is heavily related to the old TestRunner, with the ugly iframes.\n // To make this working, a search is made accross parent frames.\n // When the InlineFeedbacks will be ported to the new TestRunner, a strong improvement will be needed!\n if (firstFeedback) {\n autoscroll(firstFeedback);\n }\n\n //if an optional \"on show modal\" callback has been provided, execute it\n if (_.isFunction(onShowCallback)) {\n onShowCallback();\n }\n }\n }\n );\n });\n\n //if any feedback is displayed, replace the controls by a \"ok\" button\n replaceControl(renderedFeebacks, $itemContainer, onCloseCallback);\n }\n\n return renderingQueue.length;\n }\n\n /**\n * Gets the QTI Container element\n * @returns {jQuery|null}\n */\n function getQtiContainer() {\n var me = window;\n var $container = null;\n var max = 10;\n\n while (me && me.__knownParent__ && max--) {\n me = me.parent;\n if (me && me.$) {\n $container = me.$('#qti-content');\n if ($container.length) {\n return $container;\n }\n }\n }\n return null;\n }\n\n /**\n * Keeps an element visible inside the QTI container.\n * If the element is outside the container viewport, scroll to display it.\n * @param {String|jQuery|HTMLElement} element\n */\n function autoscroll(element) {\n var $element = $$1(element);\n var $container = getQtiContainer();\n var currentScrollTop, minScrollTop, maxScrollTop, scrollTop;\n\n if ($element.length && $container) {\n currentScrollTop = $container.scrollTop();\n maxScrollTop = $element.offset().top;\n minScrollTop = maxScrollTop - $container.height() + $element.outerHeight();\n scrollTop = Math.max(Math.min(maxScrollTop, currentScrollTop), minScrollTop);\n if (scrollTop !== currentScrollTop) {\n $container.animate({ scrollTop: scrollTop });\n }\n }\n }\n\n /**\n * Extract the display information for an interaction-related feedback\n *\n * @private\n * @param {Object} interaction - a qti interaction object\n * @returns {Object} Object containing useful display information\n */\n function extractDisplayInfo(interaction) {\n var $interactionContainer = interaction.getContainer();\n var responseIdentifier = interaction.attr('responseIdentifier');\n var messageGroupId, $displayContainer;\n\n if (interaction.is('inlineInteraction')) {\n $displayContainer = $interactionContainer.closest('[class*=\" col-\"], [class^=\"col-\"]');\n messageGroupId = $displayContainer.attr('data-messageGroupId');\n if (!messageGroupId) {\n //generate a messageFroupId\n messageGroupId = _.uniqueId('inline_message_group_');\n $displayContainer.attr('data-messageGroupId', messageGroupId);\n }\n } else {\n messageGroupId = responseIdentifier;\n $displayContainer = $interactionContainer;\n }\n\n return {\n responseIdentifier: responseIdentifier,\n interactionContainer: $interactionContainer,\n displayContainer: $displayContainer,\n messageGroupId: messageGroupId,\n order: -1\n };\n }\n\n /**\n * Get interaction display information sorted in the order of appearance within the item\n *\n * @param {Object} item\n * @returns {Array}\n */\n function getInteractionsDisplayInfo(item) {\n var interactionsDisplayInfo = [];\n var $itemContainer = item.getContainer();\n var interactionOrder = 0;\n\n //extract all interction related information needed to display their\n _.each(item.getComposingElements(), function(element) {\n var responseIdentifier;\n if (element.is('interaction')) {\n responseIdentifier = element.attr('responseIdentifier');\n interactionsDisplayInfo.push(extractDisplayInfo(element));\n }\n });\n\n //sort interactionsDisplayInfo on the item level\n $itemContainer.find('.qti-interaction').each(function() {\n var interactionContainer = this;\n _.each(interactionsDisplayInfo, function(_interactionInfo) {\n if (_interactionInfo.interactionContainer[0] === interactionContainer) {\n _interactionInfo.order = interactionOrder;\n return false;\n }\n });\n interactionOrder++;\n });\n interactionsDisplayInfo = _.sortBy(interactionsDisplayInfo, 'order');\n\n return interactionsDisplayInfo;\n }\n\n /**\n * Remove previously displayed feedbacks contained in the given container element\n *\n * @param {JQuery} $itemContainer\n */\n function clearModalFeedbacks($itemContainer) {\n $itemContainer.find('.qti-modalFeedback').remove();\n }\n\n /**\n * Render a modal feedback into a given container, scoped within an item container\n *\n * @private\n * @param {type} feedback - feedback object\n * @param {type} loader - loader instance\n * @param {type} renderer - renderer instance\n * @param {JQuery} $container - the targeted feedback container\n * @param {JQuery} $itemContainer - the item container\n * @param {type} renderedCallback - callback when the feedback has been rendered\n * @returns {undefined}\n */\n function renderModalFeedback(feedback, loader, renderer, $container, $itemContainer, renderedCallback) {\n //load (potential) new qti classes used in the modal feedback (e.g. math, img)\n renderer.load(function() {\n //render the modal feedback\n var $modalFeedback = $$1(\n feedback.render({\n inline: true\n })\n );\n var done = function done() {\n renderedCallback({\n identifier: feedback.id(),\n serial: feedback.getSerial(),\n dom: $modalFeedback\n });\n };\n $container.append($modalFeedback);\n\n // Race between postRendering and timeout\n // postRendering waits for everything to be resolved or one reject\n Promise.race([\n Promise.all(\n _.map(feedback.getComposingElements(), function(elt) {\n //render also internal elements, such as math or img\n return elt.postRender({}, '', renderer).pop();\n })\n ),\n new Promise(function(resolve, reject) {\n _.delay(reject, timeout, new Error('Post rendering ran out of time.'));\n })\n ])\n .then(done)\n .catch(function(err) {\n //in case of postRendering issue, we are also done\n done();\n throw new Error('Error in post rendering : ' + err);\n });\n }, loader.getLoadedClasses());\n }\n\n /**\n * Replace the controls in the running environment with an \"OK\" button to trigger the end of the feedback state\n *\n * @private\n * @todo FIX ME ! replace the hack to preview and delivery toolbar with a proper plugin in the new test runner is ready\n * @param {Array} renderedFeebacks\n * @param {JQuery} $itemContainer\n * @param {Function} callback\n */\n function replaceControl(renderedFeebacks, $itemContainer, callback) {\n var $scope, $controls, $toggleContainer;\n if (window.parent && window.parent.parent && window.parent.parent.$) {\n if ($itemContainer.parents('.tao-preview-scope').length) {\n //preview mode\n $scope = window.parent.parent.$('#preview-console');\n $controls = $scope.find('.preview-console-header .action-bar li:visible');\n $toggleContainer = $scope.find('.console-button-action-bar');\n initControlToggle(renderedFeebacks, $itemContainer, $controls, $toggleContainer, previewOkBtn, callback);\n } else {\n //delivery delivery\n $scope = window.parent.parent.$('body.qti-test-scope .bottom-action-bar');\n $controls = $scope.find('li:visible');\n $toggleContainer = $scope.find('.navi-box-list');\n initControlToggle(renderedFeebacks, $itemContainer, $controls, $toggleContainer, deliveryOkBtn, callback);\n }\n } else {\n //not in an iframe, add to item body for now\n $scope = $itemContainer.find('#modalFeedbacks');\n initControlToggle(renderedFeebacks, $itemContainer, $$1(), $scope, previewOkBtn, callback);\n }\n }\n\n /**\n * Initialize the \"OK\" button to trigger the end of the feedback mode\n *\n * @private\n * @param {Array} renderedFeebacks\n * @param {JQuery} $itemContainer\n * @param {JQuery} $controls\n * @param {JQuery} $toggleContainer\n * @param {Function} toggleButtonTemplate\n * @param {Function} callback\n */\n function initControlToggle(\n renderedFeebacks,\n $itemContainer,\n $controls,\n $toggleContainer,\n toggleButtonTemplate,\n callback\n ) {\n var $ok = $$1(toggleButtonTemplate()).click(function() {\n //end feedback mode, hide feedbacks\n _.each(renderedFeebacks, function(fb) {\n fb.dom.hide();\n });\n\n //restore controls\n uncover([$itemContainer]);\n $ok.remove();\n $controls.show();\n\n //exec callback\n callback();\n });\n\n $controls.hide();\n $toggleContainer.append($ok);\n cover([$itemContainer]);\n }\n\n /**\n * Cover the given interaction containers with a transparent layer to prevent user interacting with the item\n * @private\n * @param {Array} interactionContainers\n */\n function cover(interactionContainers) {\n var $cover = $$1('
    ');\n _.each(interactionContainers, function($interaction) {\n $interaction.append($cover);\n });\n }\n\n /**\n * Remove the layer set by the function cover()\n * @private\n * @param {Array} interactionContainers\n */\n function uncover(interactionContainers) {\n _.each(interactionContainers, function($interaction) {\n $interaction.find('.interaction-cover').remove();\n });\n }\n\n /**\n * Provide the feedbackMessage signature to check if the feedback contents should be considered equals\n *\n * @param {type} feedback\n * @returns {String}\n */\n function getFeedbackMessageSignature(feedback) {\n return ('' + feedback.body() + feedback.attr('title'))\n .toLowerCase()\n .trim()\n .replace(/x-tao-[a-zA-Z0-9\\-._\\s]*/g, '');\n }\n\n var inlineRenderer = {\n showFeedbacks: showFeedbacks\n };\n\n return inlineRenderer;\n\n});\n\n","define('taoQtiItem/qtiRunner/modalFeedback/modalRenderer',['lodash', 'jquery', 'async', 'taoQtiItem/qtiItem/helper/pci'], function (_, $, async, pci) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;\n async = async && Object.prototype.hasOwnProperty.call(async, 'default') ? async['default'] : async;\n pci = pci && Object.prototype.hasOwnProperty.call(pci, 'default') ? pci['default'] : pci;\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2015 (original work) Open Assessment Techonologies SA;\n *\n */\n\n /**\n * Main function for the module. It loads and render the feedbacks accodring to the given itemSession variables\n *\n * @param {Object} item - the standard tao qti item object\n * @param {Object} loader - the item loader instance\n * @param {Object} renderer - the item render instance\n * @param {Object} itemSession - session information containing the list of feedbacks to display\n * @param {Function} onCloseCallback - the callback to be executed when the feedbacks are closed\n * @param {Function} [onShowCallback] - the callback to be executed when the feedbacks are shown\n * @returns {Number} Number of feedbacks to be displayed\n */\n function showFeedbacks(item, loader, renderer, itemSession, onCloseCallback, onShowCallback) {\n var count,\n messages = [],\n feedbacksToBeDisplayed = [];\n\n //find which modal feedbacks should be displayed according to the current item session:\n _.each(item.modalFeedbacks, function(feedback) {\n var feedbackIds, message;\n var outcomeIdentifier = feedback.attr('outcomeIdentifier');\n\n if (itemSession[outcomeIdentifier]) {\n feedbackIds = pci.getRawValues(itemSession[outcomeIdentifier]);\n message = getFeedbackMessageSignature(feedback);\n if (_.indexOf(feedbackIds, feedback.id()) >= 0 && _.indexOf(messages, message) === -1) {\n //check content if is already in the display queue\n feedbacksToBeDisplayed.push(feedback);\n messages.push(message);\n }\n }\n });\n\n //record the number of feedbacks to be displayed:\n count = feedbacksToBeDisplayed.length;\n if (count) {\n //show in reverse order\n var callstack = [];\n\n //iterate from the right because the modal popup will pile up.\n _.eachRight(feedbacksToBeDisplayed, function(feedback) {\n //the end callback should be executed to the last displayed modal, which is the last displayed one\n var endCallback;\n if (callstack.length === 0) {\n endCallback = function() {\n onCloseCallback();\n };\n }\n\n callstack.push(function(cb) {\n renderModalFeedback(\n feedback,\n loader,\n renderer,\n function() {\n cb(null);\n },\n endCallback\n );\n });\n });\n\n async.series(callstack, function() {\n //all modal are ready and displayed\n if (_.isFunction(onShowCallback)) {\n onShowCallback();\n }\n });\n }\n\n return count;\n }\n\n /**\n * Render modal feedback as a modal popup\n *\n * @param {Object} feedback - object\n * @param {Object} loader - loader instance\n * @param {Object} renderer - renderer instance\n * @param {Function} [closeCallback] - feedback to be executed when the popop closes\n * @returns {undefined}\n */\n function renderModalFeedback(feedback, loader, renderer, renderedCallback, closeCallback) {\n var $feedback,\n $feedbackBox = $('#modalFeedbacks'); //feedback.getItem().getContainer().find('#')\n\n if (feedback.is('modalFeedback')) {\n //load (potential) new qti classes used in the modal feedback (e.g. math, img)\n renderer.load(function() {\n $feedback = $feedbackBox.find('#' + feedback.getSerial());\n if (!$feedback.length) {\n //render the modal feedback\n $feedback = feedback.render();\n $feedbackBox.append($feedback);\n } else {\n $feedback.modal();\n }\n\n renderedCallback();\n\n feedback.postRender({\n callback: closeCallback\n });\n }, loader.getLoadedClasses());\n }\n }\n\n /**\n * Provide the feedbackMessage signature to check if the feedback contents should be considered equals\n *\n * @param {type} feedback\n * @returns {String}\n */\n function getFeedbackMessageSignature(feedback) {\n return ('' + feedback.body() + feedback.attr('title'))\n .toLowerCase()\n .trim()\n .replace(/x-tao-[a-zA-Z0-9\\-._\\s]*/g, '');\n }\n\n var modalRenderer = {\n showFeedbacks: showFeedbacks\n };\n\n return modalRenderer;\n\n});\n\n","define('taoQtiItem/qtiRunner/core/QtiRunner',['jquery', 'lodash', 'context', 'module', 'iframeNotifier', 'taoQtiItem/qtiItem/core/Loader', 'taoQtiItem/qtiRunner/modalFeedback/inlineRenderer', 'taoQtiItem/qtiRunner/modalFeedback/modalRenderer'], function ($, _, context, module, iframeNotifier, ItemLoader, modalFeedbackInline, modalFeedbackModal) { 'use strict';\n\n $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n context = context && Object.prototype.hasOwnProperty.call(context, 'default') ? context['default'] : context;\n module = module && Object.prototype.hasOwnProperty.call(module, 'default') ? module['default'] : module;\n iframeNotifier = iframeNotifier && Object.prototype.hasOwnProperty.call(iframeNotifier, 'default') ? iframeNotifier['default'] : iframeNotifier;\n ItemLoader = ItemLoader && Object.prototype.hasOwnProperty.call(ItemLoader, 'default') ? ItemLoader['default'] : ItemLoader;\n modalFeedbackInline = modalFeedbackInline && Object.prototype.hasOwnProperty.call(modalFeedbackInline, 'default') ? modalFeedbackInline['default'] : modalFeedbackInline;\n modalFeedbackModal = modalFeedbackModal && Object.prototype.hasOwnProperty.call(modalFeedbackModal, 'default') ? modalFeedbackModal['default'] : modalFeedbackModal;\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2013 (original work) Open Assessment Techonologies SA (under the project TAO-PRODUCT);\n *\n *\n */\n\n var timeout = (context.timeout > 0 ? context.timeout + 1 : 30) * 1000;\n\n var QtiRunner = function() {\n this.item = null;\n this.rpEngine = null;\n this.renderer = null;\n this.loader = null;\n this.itemApi = undefined;\n };\n\n QtiRunner.prototype.updateItemApi = function() {\n var responses = this.getResponses();\n var states = this.getStates();\n var variables = [];\n // Transform responses into state variables.\n for (var key in states) {\n var value = states[key];\n // This is where we set variables that will be collected and stored\n // as the Item State. We do not want to store large files into\n // the state, and force the client to download these files\n // all over again. We then transform them as a place holder, that will\n // simply indicate that a file composes the state.\n\n if (value.response && typeof value.response.base !== 'undefined') {\n for (var property in value.response.base) {\n if (property === 'file') {\n var file = value.response.base.file;\n // QTI File found! Replace it with an appropriate placeholder.\n // The data is base64('qti_file_datatype_placeholder_data')\n value.response = {\n base: {\n file: {\n name: file.name,\n mime: 'qti+application/octet-stream',\n data: 'cXRpX2ZpbGVfZGF0YXR5cGVfcGxhY2Vob2xkZXJfZGF0YQ=='\n }\n }\n };\n }\n }\n }\n\n variables[key] = value;\n }\n\n //set all variables at once\n this.itemApi.setVariables(variables);\n\n // Save the responses that will be used for response processing.\n this.itemApi.saveResponses(responses);\n this.itemApi.resultApi.setQtiRunner(this);\n };\n\n QtiRunner.prototype.setItemApi = function(itemApi) {\n this.itemApi = itemApi;\n var that = this;\n var oldStateVariables = JSON.stringify(itemApi.stateVariables);\n\n itemApi.onKill(function(killCallback) {\n // If the responses did not change,\n // just close gracefully.\n\n // Collect new responses and update item API.\n that.updateItemApi();\n var newStateVariables = JSON.stringify(itemApi.stateVariables);\n\n // Store the results.\n if (oldStateVariables !== newStateVariables || itemApi.serviceApi.getHasBeenPaused()) {\n itemApi.submit(function() {\n // Send successful signal.\n itemApi.serviceApi.setHasBeenPaused(false);\n killCallback(0);\n });\n } else {\n killCallback(0);\n }\n });\n };\n\n QtiRunner.prototype.setRenderer = function(renderer) {\n if (renderer.isRenderer) {\n this.renderer = renderer;\n } else {\n throw 'invalid renderer';\n }\n };\n\n QtiRunner.prototype.getLoader = function() {\n if (!this.loader) {\n this.loader = new ItemLoader();\n }\n return this.loader;\n };\n\n QtiRunner.prototype.loadItemData = function(data, callback) {\n var self = this;\n this.getLoader().loadItemData(data, function(item) {\n self.item = item;\n callback(self.item);\n });\n };\n\n QtiRunner.prototype.loadElements = function(elements, callback) {\n if (this.getLoader().item) {\n this.getLoader().loadElements(elements, callback);\n } else {\n throw 'QtiRunner : cannot load elements in empty item';\n }\n };\n\n QtiRunner.prototype.renderItem = function(data, done) {\n var self = this;\n\n done = _.isFunction(done) ? done : _.noop;\n\n var render = function() {\n if (!self.item) {\n throw 'cannot render item: empty item';\n }\n if (self.renderer) {\n self.renderer.load(function() {\n self.item.setRenderer(self.renderer);\n self.item.render({}, $('#qti_item'));\n\n // Race between postRendering and timeout\n // postRendering waits for everything to be resolved or one reject\n Promise.race([\n Promise.all(self.item.postRender()),\n new Promise(function(resolve, reject) {\n _.delay(reject, timeout, new Error('Post rendering ran out of time.'));\n })\n ])\n .then(function() {\n self.item.getContainer().on('responseChange', function(e, data) {\n if (data.interaction && data.interaction.attr('responseIdentifier') && data.response) {\n iframeNotifier.parent('responsechange', [\n data.interaction.attr('responseIdentifier'),\n data.response\n ]);\n }\n });\n\n self.initInteractionsResponse();\n self.listenForThemeChange();\n done();\n })\n .catch(function(err) {\n //in case of postRendering issue, we are also done\n done();\n\n throw new Error('Error in post rendering : ' + err);\n });\n }, self.getLoader().getLoadedClasses());\n } else {\n throw 'cannot render item: no rendered set';\n }\n };\n\n if (typeof data === 'object') {\n this.loadItemData(data, render);\n } else {\n render();\n }\n };\n\n QtiRunner.prototype.initInteractionsResponse = function() {\n var self = this;\n if (self.item) {\n var interactions = self.item.getInteractions();\n for (var i in interactions) {\n var interaction = interactions[i];\n var responseId = interaction.attr('responseIdentifier');\n self.itemApi.getVariable(responseId, function(values) {\n if (values) {\n interaction.setState(values);\n iframeNotifier.parent('stateready', [responseId, values]);\n } else {\n var states = self.getStates();\n if (_.indexOf(states, responseId)) {\n self.itemApi.setVariable(responseId, states[responseId]);\n interaction.setState(states[responseId]);\n iframeNotifier.parent('stateready', [responseId, states[responseId]]);\n }\n }\n });\n }\n }\n };\n\n /**\n * If an event 'themechange' bubbles to \"#qti_item\" node\n * then we tell the renderer to switch the theme.\n */\n QtiRunner.prototype.listenForThemeChange = function listenForThemeChange() {\n var self = this;\n var $container = this.renderer.getContainer(this.item);\n if (!$container.length) {\n $container = $('.qti-item');\n }\n $container.off('themechange').on('themechange', function(e, themeName) {\n var themeLoader = self.renderer.getThemeLoader();\n themeName = themeName || e.originalEvent.detail;\n if (themeLoader) {\n themeLoader.change(themeName);\n }\n });\n };\n\n QtiRunner.prototype.validate = function() {\n this.updateItemApi();\n this.itemApi.finish();\n };\n\n QtiRunner.prototype.getResponses = function() {\n var responses = {};\n var interactions = this.item.getInteractions();\n\n _.forEach(interactions, function(interaction) {\n var response = {};\n try {\n response = interaction.getResponse();\n } catch (e) {\n console.error(e);\n }\n responses[interaction.attr('responseIdentifier')] = response;\n });\n\n return responses;\n };\n\n QtiRunner.prototype.getStates = function() {\n var states = {};\n var interactions = this.item.getInteractions();\n\n _.forEach(interactions, function(interaction) {\n var state = {};\n try {\n state = interaction.getState();\n } catch (e) {\n console.error(e);\n }\n states[interaction.attr('responseIdentifier')] = state;\n });\n\n return states;\n };\n\n QtiRunner.prototype.setResponseProcessing = function(callback) {\n this.rpEngine = callback;\n };\n\n QtiRunner.prototype.showFeedbacks = function(itemSession, callback, onShowCallback) {\n var inlineDisplay = !!module.config().inlineModalFeedback;\n\n //currently only modal feedbacks are available\n if (inlineDisplay) {\n return modalFeedbackInline.showFeedbacks(\n this.item,\n this.getLoader(),\n this.renderer,\n itemSession,\n callback,\n onShowCallback\n );\n } else {\n return modalFeedbackModal.showFeedbacks(\n this.item,\n this.getLoader(),\n this.renderer,\n itemSession,\n callback,\n onShowCallback\n );\n }\n };\n\n return QtiRunner;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/interactionHelper',['lodash', 'taoQtiItem/qtiItem/core/Element'], function (_, Element) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n Element = Element && Object.prototype.hasOwnProperty.call(Element, 'default') ? Element['default'] : Element;\n\n /**\n * Common helper functions\n */\n var interactionHelper = {\n convertChoices: function(choices, outputType) {\n var ret = [],\n _this = this;\n\n _.each(choices, function(c) {\n if (Element.isA(c, 'choice')) {\n switch (outputType) {\n case 'serial':\n ret.push(c.getSerial());\n break;\n case 'identifier':\n ret.push(c.id());\n break;\n default:\n ret.push(c);\n }\n } else if (_.isArray(c)) {\n ret.push(_this.convertChoices(c, outputType));\n }\n });\n\n return ret;\n },\n findChoices: function(interaction, choices, inputType) {\n var ret = [],\n _this = this;\n\n _.each(choices, function(c) {\n var choice;\n if (_.isString(c)) {\n if (inputType === 'serial') {\n choice = interaction.getChoice(c);\n if (choice) {\n ret.push(choice);\n }\n } else if (inputType === 'identifier') {\n choice = interaction.getChoiceByIdentifier(c);\n if (choice) {\n ret.push(choice);\n }\n } else {\n ret.push(c);\n }\n } else if (_.isArray(c)) {\n ret.push(_this.findChoices(interaction, c, inputType));\n } else {\n ret.push(c);\n }\n });\n\n return ret;\n },\n shuffleChoices: function(choices) {\n var r = [], //returned array\n f = {}, //fixed choices array\n j = 0;\n\n for (var i in choices) {\n if (Element.isA(choices[i], 'choice')) {\n var choice = choices[i];\n if (choice.attr('fixed')) {\n f[j] = choice;\n }\n r.push(choice);\n j++;\n } else {\n throw 'invalid element in array: is not a qti choice';\n }\n }\n\n for (var n = 0; n < r.length - 1; n++) {\n if (f[n]) {\n continue;\n }\n var k = -1;\n do {\n k = n + Math.floor(Math.random() * (r.length - n));\n } while (f[k]);\n var tmp = r[k];\n r[k] = r[n];\n r[n] = tmp;\n }\n\n return r;\n },\n serialToIdentifier: function(interaction, choiceSerial) {\n var choice = interaction.getChoice(choiceSerial);\n if (choice) {\n return choice.id();\n } else {\n return '';\n }\n }\n };\n\n return interactionHelper;\n\n});\n\n","define('taoQtiItem/qtiRunner/core/Renderer',['lodash', 'jquery', 'taoQtiItem/qtiItem/core/Element', 'taoQtiItem/qtiItem/helper/interactionHelper', 'ui/themeLoader', 'ui/themes', 'core/moduleLoader', 'handlebars'], function (_, $, Element, interactionHelper, themeLoader, themesHelper, moduleLoader, Handlebars) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;\n Element = Element && Object.prototype.hasOwnProperty.call(Element, 'default') ? Element['default'] : Element;\n interactionHelper = interactionHelper && Object.prototype.hasOwnProperty.call(interactionHelper, 'default') ? interactionHelper['default'] : interactionHelper;\n themeLoader = themeLoader && Object.prototype.hasOwnProperty.call(themeLoader, 'default') ? themeLoader['default'] : themeLoader;\n themesHelper = themesHelper && Object.prototype.hasOwnProperty.call(themesHelper, 'default') ? themesHelper['default'] : themesHelper;\n moduleLoader = moduleLoader && Object.prototype.hasOwnProperty.call(moduleLoader, 'default') ? moduleLoader['default'] : moduleLoader;\n Handlebars = Handlebars && Object.prototype.hasOwnProperty.call(Handlebars, 'default') ? Handlebars['default'] : Handlebars;\n\n /*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2014-2022 (original work) Open Assessment Technlogies SA (under the project TAO-PRODUCT);\n *\n */\n\n //webpack trick : handlebar is usale only from cjs.\n //but anyway we should deprecate the practice to invoke\n //directly Handlebars at runtimej\n let hb = Handlebars;\n if(typeof hb.compile !== 'function'){\n hb = require('handlebars');\n }\n\n const _renderableClasses = [\n '_container',\n 'assessmentItem',\n 'stylesheet',\n 'responseDeclaration',\n 'outcomeDeclaration',\n 'responseProcessing',\n '_simpleFeedbackRule',\n '_tooltip',\n 'figure',\n 'img',\n 'figcaption',\n 'math',\n 'object',\n 'table',\n 'modalFeedback',\n 'rubricBlock',\n 'associateInteraction',\n 'choiceInteraction',\n 'extendedTextInteraction',\n 'gapMatchInteraction',\n 'graphicAssociateInteraction',\n 'graphicGapMatchInteraction',\n 'graphicOrderInteraction',\n 'hotspotInteraction',\n 'hottextInteraction',\n 'inlineChoiceInteraction',\n 'matchInteraction',\n 'mediaInteraction',\n 'orderInteraction',\n 'selectPointInteraction',\n 'sliderInteraction',\n 'textEntryInteraction',\n 'uploadInteraction',\n 'endAttemptInteraction',\n 'customInteraction',\n 'prompt',\n 'associableHotspot',\n 'gap',\n 'gapImg',\n 'gapText',\n 'hotspotChoice',\n 'hottext',\n 'inlineChoice',\n 'simpleAssociableChoice',\n 'simpleChoice',\n 'infoControl',\n 'include',\n 'printedVariable'\n ];\n\n /**\n * The list of qti element dependencies. It is used internally to load dependent qti classes\n */\n const _dependencies = {\n assessmentItem: ['stylesheet', '_container', 'prompt', 'modalFeedback'],\n rubricBlock: ['_container'],\n associateInteraction: ['simpleAssociableChoice'],\n choiceInteraction: ['simpleChoice'],\n gapMatchInteraction: ['gap', 'gapText'],\n graphicAssociateInteraction: ['associableHotspot'],\n graphicGapMatchInteraction: ['associableHotspot', 'gapImg'],\n graphicOrderInteraction: ['hotspotChoice'],\n hotspotInteraction: ['hotspotChoice'],\n hottextInteraction: ['hottext'],\n inlineChoiceInteraction: ['inlineChoice'],\n matchInteraction: ['simpleAssociableChoice'],\n orderInteraction: ['simpleChoice']\n };\n\n /**\n * The list of supported qti subclasses.\n */\n const _renderableSubclasses = {\n simpleAssociableChoice: ['associateInteraction', 'matchInteraction'],\n simpleChoice: ['choiceInteraction', 'orderInteraction']\n };\n\n /**\n * List of the default properties for the item\n */\n const _defaults = {\n shuffleChoices: true\n };\n\n const _isValidRenderer = function(renderer) {\n let valid = true;\n\n if (typeof renderer !== 'object') {\n return false;\n }\n\n let classCorrect = false;\n if (renderer.qtiClass) {\n if (_.indexOf(_renderableClasses, renderer.qtiClass) >= 0) {\n classCorrect = true;\n } else {\n const pos = renderer.qtiClass.indexOf('.');\n if (pos > 0) {\n const qtiClass = renderer.qtiClass.slice(0, pos);\n const subClass = renderer.qtiClass.slice(pos + 1);\n if (_renderableSubclasses[qtiClass] && _.indexOf(_renderableSubclasses[qtiClass], subClass) >= 0) {\n classCorrect = true;\n }\n }\n }\n }\n if (!classCorrect) {\n valid = false;\n throw new Error('invalid qti class name in renderer declaration : ' + renderer.qtiClass);\n }\n\n if (!renderer.template) {\n valid = false;\n throw new Error('missing template in renderer declaration : ' + renderer.qtiClass);\n }\n\n return valid;\n };\n\n /**\n * Get the location of the document, useful to define a baseUrl for the required context\n * @returns {String}\n */\n function getDocumentBaseUrl() {\n return window.location.protocol + '//' + window.location.host + window.location.pathname.replace(/([^\\/]*)$/, '');\n }\n\n /**\n * The built Renderer class\n * @constructor\n * @param {Object} [options] - the renderer options\n * @param {AssetManager} [options.assetManager] - The renderer needs an AssetManager to resolve URLs (see {@link taoItems/assets/manager})\n * @param {Boolean} [options.shuffleChoices = true] - Does the renderer take care of the shuffling\n * @param {Object} [options.decorators] - to set up rendering decorator\n * @param {preRenderDecorator} [options.decorators.before] - to set up a pre decorator\n * @param {postRenderDecorator} [options.decorators.after] - to set up a post decorator\n */\n const Renderer = function(options) {\n /**\n * Store the registered renderer location\n */\n const _locations = {};\n\n /**\n * Store loaded renderers\n */\n const _renderers = {};\n\n options = _.defaults(options || {}, _defaults);\n\n this.isRenderer = true;\n\n this.name = '';\n\n //store shuffled choice here\n this.shuffledChoices = [];\n\n /**\n * Get the actual renderer of the give qti class or subclass:\n * e.g. simplceChoice, simpleChoice.choiceInteraction, simpleChoice.orderInteraction\n */\n const _getClassRenderer = function(qtiClass) {\n let ret = null;\n if (_renderers[qtiClass]) {\n ret = _renderers[qtiClass];\n } else {\n const pos = qtiClass.indexOf('.');\n if (pos > 0) {\n qtiClass = qtiClass.slice(0, pos);\n if (_renderers[qtiClass]) {\n ret = _renderers[qtiClass];\n }\n }\n }\n return ret;\n };\n\n /**\n * Registers a QTI renderer class\n * @param {String} qtiClass\n * @param {Array} list\n * @returns {Boolean} `true` if the class has been successfully registered\n */\n function registerRendererClass(qtiClass, list) {\n let success = false;\n if (_locations[qtiClass] === false) {\n //mark this class as not renderable\n _renderers[qtiClass] = false;\n success = true;\n } else if (_locations[qtiClass]) {\n list.push(_locations[qtiClass]);\n success = true;\n }\n return success;\n }\n\n /**\n * Set the renderer options\n * @param {String} key - the name of the option\n * @param {*} value - the option vallue\n * @returns {Renderer} for chaining\n */\n this.setOption = function(key, value) {\n if (typeof key === 'string') {\n options[key] = value;\n }\n return this;\n };\n\n /**\n * Set the renderer options\n * @param {Object} opts - the options\n * @returns {Renderer} for chaining\n */\n this.setOptions = function(opts) {\n options = _.extend(options, opts);\n return this;\n };\n\n /**\n * Get the renderer option\n * @param {String} key - the name of the option\n * @returns {*|null} the option vallue\n */\n this.getOption = function(key) {\n if (typeof key === 'string' && options[key]) {\n return options[key];\n }\n return null;\n };\n\n this.getCustomMessage = function getCustomMessage(elementName, messageKey) {\n const messages = this.getOption('messages');\n if (messages && elementName && messages[elementName] && _.isString(messages[elementName][messageKey])) {\n //currently not translatable but potentially could be if the need raises\n return hb.compile(messages[elementName][messageKey]);\n } else {\n return null;\n }\n };\n\n /**\n * Get the bound assetManager\n * @returns {AssetManager} the assetManager\n */\n this.getAssetManager = function getAssetManager() {\n return options.assetManager;\n };\n\n /**\n * Get the bound theme loader\n * @returns {Object} the themeLoader\n */\n this.getThemeLoader = function getThemeLoader() {\n return this.themeLoader;\n };\n\n /**\n * Renders the template\n * @param {Object} element - the QTI model element\n * @param {Object} data - the data to give to the template\n * @param {String} [qtiSubclass] - to get the render of the element subclass (when element's qtiClass is abstract)\n * @returns {String} the template results\n * @throws {Error} if the renderer is not set or has no template bound\n */\n this.renderTpl = function(element, data, qtiSubclass) {\n let res;\n let ret = '';\n const qtiClass = qtiSubclass || element.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n const decorators = this.getOption('decorators');\n\n if (!renderer || !_.isFunction(renderer.template)) {\n throw new Error('no renderer template loaded under the class name : ' + qtiClass);\n }\n\n //pre rendering decoration\n if (_.isObject(decorators) && _.isFunction(decorators.before)) {\n /**\n * @callback preRenderDecoractor\n * @param {Object} element - the QTI model element\n * @param {String} [qtiSubclass] - to get the render of the element subclass (when element's qtiClass is abstract)\n * @returns {String} the decorator result\n */\n res = decorators.before(element, qtiSubclass);\n if (_.isString(res)) {\n ret += res;\n }\n }\n\n //render the template\n ret += renderer.template(data);\n\n //post rendering decoration\n if (_.isObject(decorators) && _.isFunction(decorators.after)) {\n /**\n * @callback postRenderDecoractor\n * @param {Object} element - the QTI model element\n * @param {String} [qtiSubclass] - to get the render of the element subclass (when element's qtiClass is abstract)\n * @returns {String} the decorator result\n */\n res = decorators.after(element, qtiSubclass);\n if (_.isString(res)) {\n ret += res;\n }\n }\n return ret;\n };\n\n this.getData = function(element, data, qtiSubclass) {\n let ret = data;\n const qtiClass = qtiSubclass || element.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n\n if (renderer) {\n if (typeof renderer.getData === 'function') {\n ret = renderer.getData.call(this, element, data);\n }\n }\n\n return ret;\n };\n\n this.renderDirect = function(tpl, data) {\n return hb.compile(tpl)(data);\n };\n\n this.getContainer = function(qtiElement, $scope, qtiSubclass) {\n let ret = null;\n const qtiClass = qtiSubclass || qtiElement.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n\n if (renderer) {\n ret = renderer.getContainer(qtiElement, $scope);\n } else {\n throw new Error('no renderer found for the class : ' + qtiElement.qtiClass);\n }\n return ret;\n };\n\n this.postRender = function(qtiElement, data, qtiSubclass) {\n const qtiClass = qtiSubclass || qtiElement.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n\n if (renderer && typeof renderer.render === 'function') {\n return renderer.render.call(this, qtiElement, data);\n }\n };\n\n this.setResponse = function(qtiInteraction, response, qtiSubclass) {\n let ret = false;\n const qtiClass = qtiSubclass || qtiInteraction.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n\n if (renderer) {\n if (typeof renderer.setResponse === 'function') {\n ret = renderer.setResponse.call(this, qtiInteraction, response);\n const $container = renderer.getContainer.call(this, qtiInteraction);\n if ($container instanceof $ && $container.length) {\n $container.trigger('responseSet', [qtiInteraction, response]);\n }\n }\n } else {\n throw new Error('no renderer registered under the name : ' + qtiClass);\n }\n return ret;\n };\n\n this.getResponse = function(qtiInteraction, qtiSubclass) {\n let ret = false;\n const qtiClass = qtiSubclass || qtiInteraction.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n\n if (renderer) {\n if (typeof renderer.getResponse === 'function') {\n ret = renderer.getResponse.call(this, qtiInteraction);\n }\n } else {\n throw new Error('no renderer registered under the name : ' + qtiClass);\n }\n return ret;\n };\n\n this.resetResponse = function(qtiInteraction, qtiSubclass) {\n let ret = false;\n const qtiClass = qtiSubclass || qtiInteraction.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n\n if (renderer) {\n if (typeof renderer.resetResponse === 'function') {\n ret = renderer.resetResponse.call(this, qtiInteraction);\n }\n } else {\n throw new Error('no renderer registered under the name : ' + qtiClass);\n }\n return ret;\n };\n\n /**\n * Retrieve the state of the interaction.\n * If the renderer has no state management, it falls back to the response management.\n *\n * @param {Object} qtiInteraction - the interaction\n * @param {String} [qtiSubClass] - (not sure of the type and how it is used - Sam ? )\n * @returns {Object} the interaction's state\n *\n * @throws {Error} if no renderer is registered\n */\n this.getState = function(qtiInteraction, qtiSubclass) {\n let ret = false;\n const qtiClass = qtiSubclass || qtiInteraction.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n\n if (renderer) {\n if (_.isFunction(renderer.getState)) {\n ret = renderer.getState.call(this, qtiInteraction);\n } else {\n ret = renderer.getResponse.call(this, qtiInteraction);\n }\n } else {\n throw new Error('no renderer registered under the name : ' + qtiClass);\n }\n return ret;\n };\n\n /**\n * Retrieve the state of the interaction.\n * If the renderer has no state management, it falls back to the response management.\n *\n * @param {Object} qtiInteraction - the interaction\n * @param {Object} state - the interaction's state\n * @param {String} [qtiSubClass] - (not sure of the type and how it is used - Sam ? )\n *\n * @throws {Error} if no renderer is found\n */\n this.setState = function(qtiInteraction, state, qtiSubclass) {\n const qtiClass = qtiSubclass || qtiInteraction.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n\n if (renderer) {\n if (_.isFunction(renderer.setState)) {\n renderer.setState.call(this, qtiInteraction, state);\n } else {\n renderer.resetResponse.call(this, qtiInteraction);\n renderer.setResponse.call(this, qtiInteraction, state);\n }\n } else {\n throw new Error('no renderer registered under the name : ' + qtiClass);\n }\n };\n\n /**\n * Calls the renderer destroy.\n * Ask the renderer to run destroy if exists.\n *\n * @throws {Error} if no renderer is found\n */\n this.destroy = function(qtiInteraction, qtiSubclass) {\n let ret = false;\n const qtiClass = qtiSubclass || qtiInteraction.qtiClass;\n const renderer = _getClassRenderer(qtiClass);\n\n if (renderer) {\n if (_.isFunction(renderer.destroy)) {\n ret = renderer.destroy.call(this, qtiInteraction);\n }\n } else {\n throw new Error('no renderer registered under the name : ' + qtiClass);\n }\n return ret;\n };\n\n this.getLoadedRenderers = function() {\n return _renderers;\n };\n\n this.register = function(renderersLocations) {\n _.extend(_locations, renderersLocations);\n };\n\n this.load = function(callback, requiredClasses) {\n const self = this;\n let required = [];\n\n const themeData = themesHelper.getCurrentThemeData();\n if (themeData) {\n options.themes = themeData;\n }\n if (options.themes) {\n //resolve themes paths\n options.themes.base = this.resolveUrl(options.themes.base);\n _.forEach(options.themes.available, function(theme, index) {\n options.themes.available[index].path = self.resolveUrl(theme.path);\n });\n this.themeLoader = themeLoader(options.themes).load(options.preload);\n }\n\n if (requiredClasses) {\n if (_.isArray(requiredClasses)) {\n //exclude abstract classes\n requiredClasses = _.intersection(requiredClasses, _renderableClasses);\n\n //add dependencies\n _.each(requiredClasses, function(reqClass) {\n const deps = _dependencies[reqClass];\n if (deps) {\n requiredClasses = _.union(requiredClasses, deps);\n }\n });\n\n _.forEach(requiredClasses, function(qtiClass) {\n let requiredSubClasses;\n if (_renderableSubclasses[qtiClass]) {\n requiredSubClasses = _.intersection(requiredClasses, _renderableSubclasses[qtiClass]);\n _.each(requiredSubClasses, function(subclass) {\n if (\n !registerRendererClass(qtiClass + '.' + subclass, required) &&\n !registerRendererClass(qtiClass, required)\n ) {\n throw new Error(\n self.name +\n ' : missing qti class location declaration: ' +\n qtiClass +\n ', subclass: ' +\n subclass\n );\n }\n });\n } else {\n if (!registerRendererClass(qtiClass, required)) {\n throw new Error(self.name + ' : missing qti class location declaration: ' + qtiClass);\n }\n }\n });\n } else {\n throw new Error('invalid argument type: expected array for arg \"requireClasses\"');\n }\n } else {\n required = _.values(_locations);\n }\n\n moduleLoader([], ()=> true)\n .addList( required.map( module => ({ module, category: 'qti'}) ) )\n .load()\n .then( loaded => {\n loaded.forEach( clazz => {\n if (_isValidRenderer(clazz)) {\n _renderers[clazz.qtiClass] = clazz;\n }\n\n });\n if (typeof callback === 'function') {\n callback.call(self, _renderers);\n }\n });\n\n return this;\n };\n\n /**\n * Unload the renderer\n */\n this.unload = function unload() {\n if (this.themeLoader) {\n themeLoader(options.themes).unload();\n }\n return this;\n };\n\n /**\n * Define the shuffling manually\n *\n * @param {Object} interaction - the interaction\n * @param {Array} choices - the shuffled choices\n * @param {String} identificationType -\n */\n this.setShuffledChoices = function(interaction, choices, identificationType) {\n if (Element.isA(interaction, 'interaction')) {\n this.shuffledChoices[interaction.getSerial()] = _.pluck(\n interactionHelper.findChoices(interaction, choices, identificationType),\n 'serial'\n );\n }\n };\n\n /**\n * Get the choices shuffled for this interaction.\n *\n * @param {Object} interaction - the interaction\n * @param {Boolean} reshuffle - by default choices are shuffled only once and store, but if true you can force shuffling again\n * @param {String} returnedType - the choice type\n * @returns {Array} the choices\n */\n this.getShuffledChoices = function(interaction, reshuffle, returnedType) {\n let choices = [];\n let serial, i;\n\n if (Element.isA(interaction, 'interaction')) {\n serial = interaction.getSerial();\n\n //1st time, we shuffle (or asked to force shuffling)\n if (!this.shuffledChoices[serial] || reshuffle) {\n if (Element.isA(interaction, 'matchInteraction')) {\n this.shuffledChoices[serial] = [];\n for (i = 0; i < 2; i++) {\n choices[i] = interactionHelper.shuffleChoices(interaction.getChoices(i));\n this.shuffledChoices[serial][i] = _.pluck(choices[i], 'serial');\n }\n } else {\n choices = interactionHelper.shuffleChoices(interaction.getChoices());\n this.shuffledChoices[serial] = _.pluck(choices, 'serial');\n }\n\n //otherwise get the choices from the serials\n } else {\n if (Element.isA(interaction, 'matchInteraction')) {\n _.forEach(choices, function(choice, index) {\n if (index < 2) {\n _.forEach(this.shuffledChoices[serial][i], function(choiceSerial) {\n choice.push(interaction.getChoice(choiceSerial));\n });\n }\n });\n } else {\n _.forEach(this.shuffledChoices[serial], function(choiceSerial) {\n choices.push(interaction.getChoice(choiceSerial));\n });\n }\n }\n\n //do some type convertion\n if (returnedType === 'serial' || returnedType === 'identifier') {\n return interactionHelper.convertChoices(choices, returnedType);\n }\n\n //pass value only, not ref\n return _.clone(choices);\n }\n\n return [];\n };\n\n this.getRenderers = function() {\n return _renderers;\n };\n\n this.getLocations = function() {\n return _locations;\n };\n\n /**\n * Resolve URLs using the defined assetManager's strategies\n * @param {String} url - the URL to resolve\n * @returns {String} the resolved URL\n */\n this.resolveUrl = function resolveUrl(url) {\n if (!options.assetManager) {\n return url;\n }\n if (typeof url === 'string' && url.length > 0) {\n return options.assetManager.resolve(url);\n }\n };\n\n /**\n * @deprecated in favor of resolveUrl\n */\n this.getAbsoluteUrl = function(relUrl) {\n //let until method is removed\n console.warn('DEPRECATED used getAbsoluteUrl with ', arguments);\n\n //allow relative url output only if explicitely said so\n if (this.getOption('userRelativeUrl')) {\n return relUrl.replace(/^\\.?\\//, '');\n }\n\n if (/^http(s)?:\\/\\//i.test(relUrl) || /^data:[^\\/]+\\/[^;]+(;charset=[\\w]+)?;base64,/.test(relUrl)) {\n //already absolute or base64 encoded\n return relUrl;\n } else {\n let absUrl = '';\n const runtimeLocations = this.getOption('runtimeLocations');\n\n if (runtimeLocations && _.size(runtimeLocations)) {\n _.forIn(runtimeLocations, function(runtimeLocation, typeIdentifier) {\n if (relUrl.indexOf(typeIdentifier) === 0) {\n absUrl = relUrl.replace(typeIdentifier, runtimeLocation);\n return false; //break\n }\n });\n }\n\n if (absUrl) {\n return absUrl;\n } else {\n const baseUrl = this.getOption('baseUrl') || getDocumentBaseUrl();\n return baseUrl + relUrl;\n }\n }\n };\n\n this.setAreaBroker = function setAreaBroker(areaBroker) {\n this._areaBroker = areaBroker;\n };\n\n this.getAreaBroker = function getAreaBroker() {\n if (this._areaBroker) {\n return this._areaBroker;\n }\n };\n\n this.getItemCreator = function getItemCreator() {\n return this.getOption('itemCreator');\n };\n };\n\n /**\n * Expose the renderer's factory\n * @exports taoQtiItem/qtiRunner/core/Renderer\n */\n var Renderer$1 = {\n /**\n * Creates a new Renderer by extending the Renderer's prototype\n * @param {Object} renderersLocations -\n * @param {String} [name] - the new renderer name\n * @param {Object} [defaultOptions] - the renderer options\n */\n build: function(renderersLocations, name, defaultOptions) {\n const NewRenderer = function() {\n const options = _.isPlainObject(arguments[0]) ? arguments[0] : {};\n\n Renderer.apply(this);\n\n this.register(renderersLocations);\n this.name = name || '';\n this.setOptions(_.defaults(options, defaultOptions || {}));\n };\n NewRenderer.prototype = Renderer.prototype;\n return NewRenderer;\n }\n };\n\n return Renderer$1;\n\n});\n\n","/*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/factory/factory',['lodash', 'core/promise', 'core/eventifier'], function (_, Promise, eventifier){\n 'use strict';\n\n var _requirejs = window.require;\n var _defaultLoadingOptions = {\n reload: false\n };\n\n var loadModuleConfig = function loadModuleConfig(manifest){\n return new Promise(function(resolve, reject){\n var requireConfigAliases = {};\n var baseUrl;\n var reqConfigs = [];\n var modules = {};\n\n if(!manifest || !manifest.runtime){\n return reject('invalid manifest');\n }\n\n baseUrl = manifest.baseUrl;\n\n if(_.isArray(manifest.runtime.config) && manifest.runtime.config.length){\n _.forEach(manifest.runtime.config, function(pciConfig){\n if(_.isString(pciConfig)){\n reqConfigs.push('json!' + baseUrl + '/' + pciConfig);\n }else{\n if(pciConfig.data){\n modules = _.defaults(modules, pciConfig.data.paths || {});\n }else if(pciConfig.file){\n reqConfigs.push('json!' + baseUrl + '/' + pciConfig.file);\n }\n }\n });\n }\n\n require(reqConfigs, function(){\n\n var runtimeModules = {};\n\n requireConfigAliases[manifest.typeIdentifier] = baseUrl;\n\n if(manifest.model === 'IMSPCI'){\n\n modules = _.reduce(arguments, function(acc, conf){\n return _.defaults(acc, conf.paths || {});\n }, modules);\n\n _.forEach(manifest.runtime.modules || {}, function(paths, id){\n if(paths && (_.isString(paths) || (_.isArray(paths) && paths.length))){\n runtimeModules[id] = paths;\n }\n });\n\n modules = _.merge(modules, runtimeModules);\n\n _.forEach(modules, function(paths, id){\n paths = _.isArray(paths) ? paths : [paths];\n requireConfigAliases[id] = _.map(paths, function(path){\n return baseUrl+'/'+path.replace(/\\.js$/, '');\n });\n });\n }\n\n resolve(requireConfigAliases);\n\n }, reject);\n\n\n });\n };\n\n /**\n * Evaluate if the given object is a proper portable element provider\n * @param {Object} provider\n * @returns {Boolean}\n */\n var isPortableElementProvider = function isPortableElementProvider(provider){\n return (provider && _.isFunction(provider.load));\n };\n\n return function portableElementRegistry(methods){\n\n var _loaded = false;\n var __providers = {};\n\n /**\n * The portable element registry instance\n * @typedef {portableElementRegistry}\n */\n return eventifier(_.defaults(methods || {}, {\n _registry : {},\n\n /**\n * Get a register portable element\n * @param {String} typeIdentifier\n * @param {String} version\n * @returns {Object}\n */\n get : function get(typeIdentifier, version){\n\n if(this._registry[typeIdentifier]){\n //check version\n if(version){\n return _.find(this._registry[typeIdentifier], {version : version});\n }else{\n //latest\n return _.last(this._registry[typeIdentifier]);\n }\n }\n },\n\n /**\n * Register a portable element provider\n * @param moduleName\n * @param {String|Object }provider - the portable provider object or module name\n * @returns {portableElementRegistry}\n */\n registerProvider : function registerProvider(moduleName, provider){\n __providers[moduleName] = isPortableElementProvider(provider) ? provider : null;\n _loaded = false;\n return this;\n },\n\n /**\n * Clear all previously registered providers\n * @returns {portableElementRegistry}\n */\n resetProviders : function resetProviders(){\n __providers = {};\n _loaded = false;\n return this;\n },\n\n /**\n * Load the providers\n * @param {Object} [options]\n * @param {Boolean} [options.reload] - force to reload the registered providers\n * @returns {Promise}\n */\n loadProviders : function loadProviders(options){\n var self = this;\n var loadPromise;\n\n if(_loaded && !options.reload){\n loadPromise = Promise.resolve([]);\n } else {\n loadPromise = new Promise(function(resolve, reject) {\n var providerLoadingStack = [];\n _.forIn(__providers, function(provider, id){\n if(provider === null){\n providerLoadingStack.push(id);\n }\n });\n _requirejs(providerLoadingStack, function(){\n _.each([].slice.call(arguments), function(provider){\n if(isPortableElementProvider(provider)){\n __providers[providerLoadingStack.shift()] = provider;\n }\n });\n resolve(__providers);\n _loaded = true;\n self.trigger('providersloaded', __providers);\n }, reject);\n });\n }\n\n return loadPromise;\n },\n\n /**\n * Get all versions of all portable elements registered\n * @returns {Object} - all portable elements and their versions\n */\n getAllVersions : function getAllVersions(){\n var all = {};\n _.forIn(this._registry, function (versions, id){\n all[id] = _.map(versions, 'version');\n });\n return all;\n },\n\n /**\n * Get the runtime for a given portable element\n * @param {String} typeIdentifier\n * @param {String} [version] - if the version is provided, the method will try to find that version\n * @returns {Object} the runtime model\n */\n getRuntime : function getRuntime(typeIdentifier, version){\n var portableElement = this.get(typeIdentifier, version);\n if(portableElement){\n return _.assign(portableElement.runtime, {\n id : portableElement.typeIdentifier,\n label : portableElement.label,\n baseUrl : portableElement.baseUrl,\n model : portableElement.model\n });\n }else{\n this.trigger('error', {\n message : 'no portable element runtime found',\n typeIdentifier : typeIdentifier,\n version : version\n });\n }\n },\n\n /**\n * Get the creator model for a given portable element\n * @param {String} typeIdentifier\n * @param {String} [version] - if the version is provided, the method will try to find that version\n * @returns {Object} the creator model\n */\n getCreator : function getCreator(typeIdentifier, version){\n var portableElement = this.get(typeIdentifier, version);\n if(portableElement && portableElement.creator){\n return _.assign(portableElement.creator, {\n id : portableElement.typeIdentifier,\n label : portableElement.label,\n baseUrl : portableElement.baseUrl,\n response : portableElement.response,\n model : portableElement.model,\n xmlns : portableElement.xmlns\n });\n }else{\n this.trigger('error', {\n message : 'no portable element runtime found',\n typeIdentifier : typeIdentifier,\n version : version\n });\n }\n },\n\n /**\n * Returned all enabled created from the registry\n * @returns {Object} the collection of creators\n */\n getLatestCreators : function getLatestCreators(){\n var all = {};\n _.forIn(this._registry, function (versions, id){\n var lastVersion = _.last(versions);\n\n //check if the portable element is creatable:\n if(lastVersion.creator && lastVersion.creator.hook && lastVersion.enabled){\n all[id] = lastVersion;\n }\n });\n return all;\n },\n\n /**\n * Get the baseUrl for a given portable element\n * @param {String} typeIdentifier\n * @param {String} [version] - if the version is provided, the method will try to find that version\n * @returns {String} the base url\n */\n getBaseUrl : function getBaseUrl(typeIdentifier, version){\n var runtime = this.get(typeIdentifier, version);\n if(runtime){\n return runtime.baseUrl;\n }\n return '';\n },\n\n /**\n * Load the runtimes from registered portable element provider(s)\n *\n * @param {Object} [options]\n * @param {Array} [options.include] - the exact list of portable element typeIdentifier that should be loaded\n * @param {Boolean} [options.reload] - tells if all interactions should be reloaded\n * @returns {Promise}\n */\n loadRuntimes : function loadRuntimes(options){\n var self = this;\n var loadPromise;\n\n options = _.defaults(options||{}, _defaultLoadingOptions);\n\n loadPromise = self.loadProviders(options).then(function(providers){\n\n var loadStack = [];\n\n _.forEach(providers, function (provider){\n if(provider){//check that the provider is loaded\n loadStack.push(provider.load());\n }\n });\n\n //performs the loadings in parallel\n return Promise.all(loadStack).then(function (results){//TODO could remove one level of promise\n\n var configLoadingStack = [];\n\n //update registry\n self._registry = _.reduce(results, function (acc, _pcis){\n return _.merge(acc, _pcis);\n }, self._registry || {});//incremental loading\n\n //pre-configuring the baseUrl of the portable element's source\n _.forIn(self._registry, function (versions, typeIdentifier){\n if(_.isArray(options.include) && _.indexOf(options.include, typeIdentifier) < 0){\n return true;\n }\n configLoadingStack.push(loadModuleConfig(self.get(typeIdentifier)));\n });\n\n return Promise.all(configLoadingStack).then(function(moduleConfigs){\n var requireConfigAliases = _.reduce(moduleConfigs, function(acc, paths){\n return _.merge(acc, paths);\n }, {});\n\n //save the required libs name => path to global require alias\n //TODO in future planned user story : change this to a local require context to solve conflicts in third party module naming\n _requirejs.config({paths : requireConfigAliases});\n });\n });\n\n });\n\n\n loadPromise\n .then(function() {\n self.trigger('runtimesloaded');\n })\n .catch(function(err) {\n self.trigger('error', err);\n });\n\n return loadPromise;\n },\n\n /**\n * Load the creators from registered portable element provider(s)\n *\n * @param {Object} [options]\n * @param {Array} [options.include] - the exact list of portable element typeIdentifier that should be loaded\n * @param {Boolean} [options.reload] - tells if all interactions should be reloaded\n * @returns {Promise}\n */\n loadCreators : function loadCreators(options){\n var loadPromise;\n var self = this;\n\n options = _.defaults(options||{}, _defaultLoadingOptions);\n\n loadPromise = self.loadRuntimes(options).then(function(){\n var requiredCreatorHooks = [];\n\n _.forIn(self._registry, function (versions, typeIdentifier){\n var portableElementModel = self.get(typeIdentifier);//currently use the latest version only\n if(portableElementModel.creator && portableElementModel.creator.hook){\n if(portableElementModel.enabled){\n if(_.isArray(options.include) && _.indexOf(options.include, typeIdentifier) < 0){\n return true;\n }\n }else{\n if(!_.isArray(options.include) || _.indexOf(options.include, typeIdentifier) < 0){\n return true;\n }\n }\n requiredCreatorHooks.push(portableElementModel.creator.hook.replace(/\\.js$/, ''));\n }\n });\n\n if(requiredCreatorHooks.length){\n return new Promise(function(resolve, reject){\n //@todo support caching?\n _requirejs(requiredCreatorHooks, function (){\n var creators = {};\n _.each(arguments, function (creatorHook){\n var id = creatorHook.getTypeIdentifier();\n var portableElementModel = self.get(id);\n var i = _.findIndex(self._registry[id], {version : portableElementModel.version});\n if(i < 0){\n self.trigger('error', 'no creator found for id/version ' + id + '/' + portableElementModel.version);\n }else{\n self._registry[id][i].creator.module = creatorHook;\n creators[id] = creatorHook;\n }\n });\n resolve(creators);\n }, reject);\n });\n }else{\n return Promise.resolve({});\n }\n\n });\n\n loadPromise\n .then(function(creators) {\n self.trigger('creatorsloaded', creators);\n return creators;\n })\n .catch(function(err) {\n self.trigger('error', err);\n });\n\n return loadPromise;\n },\n\n /**\n * enable a portable element\n * @param {String} typeIdentifier\n * @param {String} [version] - if the version is provided, the method will try to find that version\n * @returns {portableElementRegistry}\n */\n enable: function enable(typeIdentifier, version){\n var portableElement = this.get(typeIdentifier, version);\n if(portableElement){\n portableElement.enabled = true;\n }\n return this;\n },\n\n /**\n * disable a portable element\n * @param {String} typeIdentifier\n * @param {String} [version] - if the version is provided, the method will try to find that version\n * @returns {portableElementRegistry}\n */\n disable: function disable(typeIdentifier, version){\n var portableElement = this.get(typeIdentifier, version);\n if(portableElement){\n portableElement.enabled = false;\n }\n return this;\n },\n\n /**\n * check is a portable element is enabled\n * @param {String} typeIdentifier\n * @param {String} [version] - if the version is provided, the method will try to find that version\n * @returns {portableElementRegistry}\n */\n isEnabled: function isEnabled(typeIdentifier, version){\n var portableElement = this.get(typeIdentifier, version);\n return (portableElement && portableElement.enabled === true);\n }\n }));\n };\n});\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2015-2022 (original work) Open Assessment Technologies SA ;\n */\n/**\n * Utility to retrieve and manipualte QTI Elements\n */\ndefine('taoQtiItem/qtiCreator/helper/qtiElements',['jquery', 'lodash', 'i18n', 'services/features'], function ($, _, __, featuresService) {\n 'use strict';\n\n const QtiElements = {\n classes: {\n //abstract classes:\n itemBody: { parents: ['bodyElement'], contains: ['block'], abstract: true },\n atomicBlock: {\n parents: ['blockStatic', 'bodyElement', 'flowStatic'],\n contains: ['inline'],\n abstract: true\n },\n atomicInline: {\n parents: ['bodyElement', 'flowStatic', 'inlineStatic'],\n contains: ['inline'],\n abstract: true\n },\n simpleBlock: { parents: ['blockStatic', 'bodyElement', 'flowStatic'], contains: ['block'], abstract: true },\n simpleInline: {\n parents: ['bodyElement', 'flowStatic', 'inlineStatic'],\n contains: ['inline'],\n abstract: true\n },\n flowStatic: { parents: ['flow'], abstract: true },\n blockStatic: { parents: ['block'], abstract: true },\n inlineStatic: { parents: ['inline'], abstract: true },\n flow: { parents: ['objectFlow'], abstract: true },\n tableCell: { parents: ['bodyElement'], contains: ['flow'], abstract: true },\n //html-derived qti elements:\n caption: { parents: ['bodyElement'], contains: ['inline'], xhtml: true },\n col: { parents: ['bodyElement'], xhtml: true },\n colgroup: { parents: ['bodyElement'], contains: ['col'], xhtml: true },\n div: { parents: ['blockStatic', 'bodyElement', 'flowStatic'], contains: ['flow'], xhtml: true },\n dl: { parents: ['blockStatic', 'bodyElement', 'flowStatic'], contains: ['dlElement'], xhtml: true },\n dt: { parents: ['dlElement'], contains: ['inline'], xhtml: true },\n dd: { parents: ['dlElement'], contains: ['flow'], xhtml: true },\n hr: { parents: ['blockStatic', 'bodyElement', 'flowStatic'], xhtml: true },\n math: { parents: ['blockStatic', 'flowStatic', 'inlineStatic'], xhtml: true },\n li: { parents: ['bodyElement'], contains: ['flow'], xhtml: true },\n ol: { parents: ['blockStatic', 'bodyElement', 'flowStatic'], contains: ['li'], xhtml: true },\n ul: { parents: ['blockStatic', 'bodyElement', 'flowStatic'], contains: ['li'], xhtml: true },\n object: { parents: ['bodyElement', 'flowStatic', 'inlineStatic'], contains: ['objectFlow'], xhtml: true },\n param: { parents: ['objectFlow'], xhtml: true },\n table: {\n parents: ['blockStatic', 'bodyElement', 'flowStatic'],\n contains: ['caption', 'col', 'colgroup', 'thead', 'tfoot', 'tbody'],\n xhtml: true\n },\n tbody: { parents: ['bodyElement'], contains: ['tr'], xhtml: true },\n tfoot: { parents: ['bodyElement'], contains: ['tr'], xhtml: true },\n thead: { parents: ['bodyElement'], contains: ['tr'], xhtml: true },\n td: { parents: ['tableCell'], xhtml: true },\n th: { parents: ['tableCell'], xhtml: true },\n tr: { parents: ['bodyElement'], contains: ['tableCell'], xhtml: true },\n a: { parents: ['simpleInline'], xhtml: true },\n abbr: { parents: ['simpleInline'], xhtml: true },\n acronym: { parents: ['simpleInline'], xhtml: true },\n b: { parents: ['simpleInline'], xhtml: true },\n big: { parents: ['simpleInline'], xhtml: true },\n cite: { parents: ['simpleInline'], xhtml: true },\n code: { parents: ['simpleInline'], xhtml: true },\n dfn: { parents: ['simpleInline'], xhtml: true },\n em: { parents: ['simpleInline'], xhtml: true },\n i: { parents: ['simpleInline'], xhtml: true },\n kbd: { parents: ['simpleInline'], xhtml: true },\n q: { parents: ['simpleInline'], xhtml: true },\n samp: { parents: ['simpleInline'], xhtml: true },\n small: { parents: ['simpleInline'], xhtml: true },\n span: { parents: ['simpleInline'], xhtml: true },\n strong: { parents: ['simpleInline'], xhtml: true },\n sub: { parents: ['simpleInline'], xhtml: true },\n sup: { parents: ['simpleInline'], xhtml: true },\n tt: { parents: ['simpleInline'], xhtml: true },\n var: { parents: ['simpleInline'], xhtml: true },\n blockquote: { parents: ['simpleBlock'], xhtml: true },\n address: { parents: ['atomicBlock'], xhtml: true },\n h1: { parents: ['atomicBlock'], xhtml: true },\n h2: { parents: ['atomicBlock'], xhtml: true },\n h3: { parents: ['atomicBlock'], xhtml: true },\n h4: { parents: ['atomicBlock'], xhtml: true },\n h5: { parents: ['atomicBlock'], xhtml: true },\n h6: { parents: ['atomicBlock'], xhtml: true },\n p: { parents: ['atomicBlock'], xhtml: true },\n pre: { parents: ['atomicBlock'], xhtml: true },\n img: { parents: ['atomicInline'], xhtml: true, attributes: ['src', 'alt', 'longdesc', 'height', 'width'] },\n br: { parents: ['atomicInline'], xhtml: true },\n //qti elements:\n infoControl: { parents: ['blockStatic', 'bodyElement', 'flowStatic'], qti: true },\n textRun: { parents: ['inlineStatic', 'flowstatic'], qti: true },\n feedbackInline: { parents: ['simpleInline', 'feedbackElement'], qti: true },\n feedbackBlock: { parents: ['simpleBlock'], qti: true },\n rubricBlock: { parents: ['simpleBlock'], qti: true }, //strange qti 2.1 exception, marked as simpleBlock instead of\n blockInteraction: { parents: ['block', 'flow', 'interaction'], qti: true },\n inlineInteraction: { parents: ['inline', 'flow', 'interaction'], qti: true },\n gap: { parents: ['inlineStatic'], qti: true },\n hottext: { parents: ['flowstatic', 'inlineStatic'], contains: ['inlineStatic'], qti: true },\n printedVariable: { parents: ['bodyElement', 'flowStatic', 'inlineStatic', 'textOrVariable'], qti: true },\n prompt: { parents: ['bodyElement'], contains: ['inlineStatic'], qti: true },\n templateElement: { parents: ['bodyElement'], qti: true },\n templateBlock: {\n parents: ['blockStatic', 'flowStatic', 'templateElement'],\n contains: ['blockStatic'],\n qti: true\n },\n templateInline: {\n parents: ['inlineStatic', 'flowStatic', 'templateElement'],\n contains: ['inlineStatic'],\n qti: true\n },\n choiceInteraction: { parents: ['blockInteraction'], qti: true },\n associateInteraction: { parents: ['blockInteraction'], qti: true },\n orderInteraction: { parents: ['blockInteraction'], qti: true },\n matchInteraction: { parents: ['blockInteraction'], qti: true },\n hottextInteraction: { parents: ['blockInteraction'], qti: true },\n gapMatchInteraction: { parents: ['blockInteraction'], qti: true },\n mediaInteraction: { parents: ['blockInteraction'], qti: true },\n sliderInteraction: { parents: ['blockInteraction'], qti: true },\n uploadInteraction: { parents: ['blockInteraction'], qti: true },\n drawingInteraction: { parents: ['blockInteraction'], qti: true },\n graphicInteraction: { parents: ['blockInteraction'], qti: true },\n hotspotInteraction: { parents: ['graphicInteraction'], qti: true },\n graphicAssociateInteraction: { parents: ['graphicInteraction'], qti: true },\n graphicOrderInteraction: { parents: ['graphicInteraction'], qti: true },\n graphicGapMatchInteraction: { parents: ['graphicInteraction'], qti: true },\n selectPointInteraction: { parents: ['graphicInteraction'], qti: true },\n textEntryInteraction: { parents: ['stringInteraction', 'inlineInteraction'], qti: true },\n extendedTextInteraction: { parents: ['stringInteraction', 'blockInteraction'], qti: true },\n inlineChoiceInteraction: { parents: ['inlineInteraction'], qti: true },\n endAttemptInteraction: { parents: ['inlineInteraction'], qti: true },\n customInteraction: { parents: ['block', 'flow', 'interaction'], qti: true },\n _container: { parents: ['block'], qti: true } //a pseudo class introduced in TAO\n },\n\n cache: { containable: {}, children: {}, parents: {} },\n\n getAllowedContainersElements(qtiClass, $container) {\n const classes = QtiElements.getAllowedContainers(qtiClass);\n let jqSelector = '';\n for (let i in classes) {\n if (!classes[i].qti) {\n //html element:\n jqSelector += `${classes[i]}, `;\n }\n }\n\n if (jqSelector) {\n jqSelector = jqSelector.substring(0, jqSelector.length - 2);\n }\n\n return $(jqSelector, $container ? $container : $(document)).filter(':not([data-qti-type])');\n },\n\n getAllowedContainers(qtiClass) {\n let ret;\n if (QtiElements.cache.containable[qtiClass]) {\n ret = QtiElements.cache.containable[qtiClass];\n } else {\n ret = [];\n const parents = QtiElements.getParentClasses(qtiClass, true);\n for (let aClass in QtiElements.classes) {\n const model = QtiElements.classes[aClass];\n if (model.contains) {\n const intersect = _.intersection(model.contains, parents);\n if (intersect.length) {\n if (!model.abstract) {\n ret.push(aClass);\n }\n ret = _.union(ret, QtiElements.getChildClasses(aClass, true));\n }\n }\n }\n QtiElements.cache.containable[qtiClass] = ret;\n }\n\n return ret;\n },\n\n getAllowedContents(qtiClass, recursive, checked) {\n let ret = [];\n checked = checked || {};\n\n const model = QtiElements.classes[qtiClass];\n if (model && model.contains) {\n for (let i in model.contains) {\n const contain = model.contains[i];\n if (!checked[contain]) {\n checked[contain] = true;\n\n //qtiClass can contain everything defined as its contents\n ret.push(contain);\n\n //qtiClass can also contain subclass of its contents\n const children = QtiElements.getChildClasses(contain, true);\n for (let j in children) {\n const child = children[j];\n if (!checked[child]) {\n checked[child] = true;\n\n ret.push(child);\n\n //adding children allowed contents depends on the option \"recursive\"\n if (recursive) {\n ret = _.union(ret, QtiElements.getAllowedContents(child, true, checked));\n }\n }\n }\n\n //adding allowed contents of qtiClass' allowed contents depends on the option \"recursive\"\n if (recursive) {\n ret = _.union(ret, QtiElements.getAllowedContents(contain, true, checked));\n }\n }\n }\n }\n\n //qtiClass can contain all allowed contents of its parents:\n const parents = QtiElements.getParentClasses(qtiClass, true);\n for (let i in parents) {\n ret = _.union(ret, QtiElements.getAllowedContents(parents[i], recursive, checked));\n }\n\n return _.uniq(ret, false);\n },\n\n isAllowedClass(qtiContainerClass, qtiContentClass) {\n const allowedClasses = QtiElements.getAllowedContents(qtiContainerClass);\n return _.indexOf(allowedClasses, qtiContentClass) >= 0;\n },\n\n getParentClasses(qtiClass, recursive) {\n let ret;\n if (recursive && QtiElements.cache.parents[qtiClass]) {\n ret = QtiElements.cache.parents[qtiClass];\n } else {\n ret = [];\n if (QtiElements.classes[qtiClass]) {\n ret = QtiElements.classes[qtiClass].parents;\n if (recursive) {\n for (let i in ret) {\n ret = _.union(ret, QtiElements.getParentClasses(ret[i], recursive));\n }\n ret = _.uniq(ret, false);\n }\n }\n QtiElements.cache.parents[qtiClass] = ret;\n }\n\n return ret;\n },\n\n getChildClasses(qtiClass, recursive, type) {\n let ret;\n const cacheType = type ? type : 'all';\n if (recursive && QtiElements.cache.children[qtiClass] && QtiElements.cache.children[qtiClass][cacheType]) {\n ret = QtiElements.cache.children[qtiClass][cacheType];\n } else {\n ret = [];\n for (let aClass in QtiElements.classes) {\n const model = QtiElements.classes[aClass];\n if (_.indexOf(model.parents, qtiClass) >= 0) {\n if (type) {\n if (model[type]) {\n ret.push(aClass);\n }\n } else {\n ret.push(aClass);\n }\n if (recursive) {\n ret = _.union(ret, QtiElements.getChildClasses(aClass, recursive, type));\n }\n }\n }\n if (!QtiElements.cache.children[qtiClass]) {\n QtiElements.cache.children[qtiClass] = {};\n }\n QtiElements.cache.children[qtiClass][cacheType] = ret;\n }\n\n return ret;\n },\n\n isBlock(qtiClass) {\n return QtiElements.is(qtiClass, 'block');\n },\n\n isInline(qtiClass) {\n return QtiElements.is(qtiClass, 'inline');\n },\n\n is(qtiClass, topClass) {\n if (qtiClass === topClass) {\n return true;\n } else {\n const parents = QtiElements.getParentClasses(qtiClass, true);\n return _.indexOf(parents, topClass) >= 0;\n }\n },\n\n /**\n * Check wether an element is visible, using the feature viibility service\n * @param {string} qtiClass - see the list of available classes\n * @returns {boolean} true by default and false only if the element is explicitely registered as hidden\n */\n isVisible(qtiClass) {\n if (this.is(qtiClass, 'customInteraction')) {\n return featuresService.isVisible(`taoQtiItem/creator/customInteraction/${qtiClass.replace(/Interaction$/, '').replace(/^customInteraction\\./, '')}`);\n }\n if (this.is(qtiClass, 'interaction')) {\n return featuresService.isVisible(`taoQtiItem/creator/interaction/${qtiClass.replace(/Interaction$/, '')}`);\n }\n return true;\n },\n\n /**\n * Get the list of available elements for the authoring side\n * The list of those element is statically defined, but we filter out elements that should be visible\n * @returns {Object} the available elements\n */\n getAvailableAuthoringElements() {\n const tagTitles = {\n commonInteractions: __('Common Interactions'),\n inlineInteractions: __('Inline Interactions'),\n graphicInteractions: __('Graphic Interactions')\n };\n\n const authoringElements = {\n choiceInteraction: {\n label: __('Choice Interaction'),\n description: __(\n 'Select a single (radio buttons) or multiple (check boxes) responses among a set of choices.'\n ),\n icon: 'icon-choice',\n short: __('Choice'),\n qtiClass: 'choiceInteraction',\n tags: [tagTitles.commonInteractions, 'mcq'],\n group: 'common-interactions'\n },\n orderInteraction: {\n label: __('Order Interaction'),\n icon: 'icon-order',\n description: __('Arrange a list of choices in the correct order.'),\n short: __('Order'),\n qtiClass: 'orderInteraction',\n tags: [tagTitles.commonInteractions, 'ordering'],\n group: 'common-interactions'\n },\n associateInteraction: {\n label: __('Associate Interaction'),\n icon: 'icon-associate',\n description: __('Create pair(s) from a series of choices.'),\n short: __('Associate'),\n qtiClass: 'associateInteraction',\n tags: [tagTitles.commonInteractions, 'association'],\n group: 'common-interactions'\n },\n matchInteraction: {\n label: __('Match Interaction'),\n icon: 'icon-match',\n description: __(\n 'Create association(s) between two sets of choices displayed in a table (row and column).'\n ),\n short: __('Match'),\n qtiClass: 'matchInteraction',\n tags: [tagTitles.commonInteractions, 'association'],\n group: 'common-interactions'\n },\n hottextInteraction: {\n label: __('Hottext Interaction'),\n icon: 'icon-hottext',\n description: __('Select one or more text parts (hottext) within a text.'),\n short: __('Hottext'),\n qtiClass: 'hottextInteraction',\n tags: [tagTitles.commonInteractions, 'text'],\n group: 'common-interactions'\n },\n gapMatchInteraction: {\n label: __('Gap Match Interaction'),\n icon: 'icon-gap-match',\n description: __(' Fill in the gaps in a text from a set of choices.'),\n short: __('Gap Match'),\n qtiClass: 'gapMatchInteraction',\n tags: [tagTitles.commonInteractions, 'text', 'association'],\n group: 'common-interactions'\n },\n sliderInteraction: {\n label: __('Slider Interaction'),\n icon: 'icon-slider',\n description: __('Select a value within a numerical range.'),\n short: __('Slider'),\n qtiClass: 'sliderInteraction',\n tags: [tagTitles.commonInteractions, 'special'],\n group: 'common-interactions'\n },\n extendedTextInteraction: {\n label: __('Extended Text Interaction'),\n icon: 'icon-extended-text',\n description: __(\n 'Collect open-ended information in one or more text area(s) (strings or numeric values).'\n ),\n short: __('Extended Text'),\n qtiClass: 'extendedTextInteraction',\n tags: [tagTitles.commonInteractions, 'text'],\n group: 'common-interactions'\n },\n uploadInteraction: {\n label: __('File Upload Interaction'),\n icon: 'icon-upload',\n description: __('Upload a file (e.g. document, picture...) as a response.'),\n short: __('File Upload'),\n qtiClass: 'uploadInteraction',\n tags: [tagTitles.commonInteractions, 'special'],\n group: 'common-interactions'\n },\n mediaInteraction: {\n label: __('Media Interaction'),\n icon: 'icon-media',\n description: __(\n 'Control the playing parameters (auto-start, loop) of a video or audio file and report the number of time it has been played.'\n ),\n short: __('Media'),\n qtiClass: 'mediaInteraction',\n tags: [tagTitles.commonInteractions, 'media'],\n group: 'common-interactions'\n },\n _container: {\n label: __('Text Block'),\n icon: 'icon-font',\n description: __(\n 'Block contains the content (stimulus) of the item such as text or image. It is also required for Inline Interactions.'\n ),\n short: __('Block'),\n qtiClass: '_container',\n tags: [tagTitles.inlineInteractions, 'text'],\n group: 'inline-interactions'\n },\n inlineChoiceInteraction: {\n label: __('Inline Choice Interaction'),\n icon: 'icon-inline-choice',\n description: __('Select a choice from a drop-down list.'),\n short: __('Inline Choice'),\n qtiClass: 'inlineChoiceInteraction',\n tags: [tagTitles.inlineInteractions, 'inline-interactions', 'mcq'],\n group: 'inline-interactions'\n },\n textEntryInteraction: {\n label: __('Text Entry Interaction'),\n icon: 'icon-text-entry',\n description: __(\n 'Collect open-ended information in a short text input (strings or numeric values).'\n ),\n short: __('Text Entry'),\n qtiClass: 'textEntryInteraction',\n tags: [tagTitles.inlineInteractions, 'inline-interactions', 'text'],\n group: 'inline-interactions'\n },\n endAttemptInteraction: {\n label: __('End Attempt Interaction'),\n icon: 'icon-end-attempt',\n description: __('Trigger the end of the item attempt.'),\n short: __('End Attempt'),\n qtiClass: 'endAttemptInteraction',\n tags: [tagTitles.inlineInteractions, 'inline-interactions', 'button', 'submit'],\n group: 'inline-interactions'\n },\n hotspotInteraction: {\n label: __('Hotspot Interaction'),\n icon: 'icon-hotspot',\n description: __('Select one or more areas (hotspots) displayed on an picture.'),\n short: __('Hotspot'),\n qtiClass: 'hotspotInteraction',\n tags: [tagTitles.graphicInteractions, 'mcq'],\n group: 'graphic-interactions'\n },\n graphicOrderInteraction: {\n label: __('Graphic Order Interaction'),\n icon: 'icon-graphic-order',\n description: __('Order the areas (hotspots) displayed on a picture.'),\n short: __('Order'),\n qtiClass: 'graphicOrderInteraction',\n tags: [tagTitles.graphicInteractions, 'ordering'],\n group: 'graphic-interactions'\n },\n graphicAssociateInteraction: {\n label: __('Graphic Associate Interaction'),\n icon: 'icon-graphic-associate',\n description: __('Create association(s) between areas (hotspots) displayed on a picture.'),\n short: __('Associate'),\n qtiClass: 'graphicAssociateInteraction',\n tags: [tagTitles.graphicInteractions, 'association'],\n group: 'graphic-interactions'\n },\n graphicGapMatchInteraction: {\n label: __('Graphic Gap Match Interaction'),\n icon: 'icon-graphic-gap',\n description: __('Fill in the gaps on a picture with a set of image choices.'),\n short: __('Gap Match'),\n qtiClass: 'graphicGapMatchInteraction',\n tags: [tagTitles.graphicInteractions, 'association'],\n group: 'graphic-interactions'\n },\n selectPointInteraction: {\n label: __('Select Point Interaction'),\n icon: 'icon-select-point',\n description: __('Position one or more points on a picture (response areas are not displayed).'),\n short: __('Select Point'),\n qtiClass: 'selectPointInteraction',\n tags: [tagTitles.graphicInteractions],\n group: 'graphic-interactions'\n }\n };\n\n //filter out hidden elements\n const availableElements = {};\n for (const [elementId, element] of Object.entries(authoringElements)) {\n if (this.isVisible(elementId)) {\n availableElements[elementId] = element;\n }\n }\n return availableElements;\n }\n };\n\n return QtiElements;\n});\n\n","/*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016-2022 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/factory/ciRegistry',[\n 'lodash',\n 'i18n',\n 'taoQtiItem/portableElementRegistry/factory/factory',\n 'taoQtiItem/qtiCreator/helper/qtiElements'\n], function (_, __, portableElementRegistry, qtiElements) {\n 'use strict';\n\n /**\n * Create a ney interaction registry instance\n * interaction registry need to register newly loaded creator hooks in the list of available qti authoring elements\n *\n * @returns {Object} registry instance\n */\n return function customInteractionRegistry() {\n return portableElementRegistry({\n /**\n * Get the authoring information for a given custom interaction\n * @param {string} typeIdentifier - the interaction type identifier\n * @param {Object} [options]\n * @param {string|number} [options.version] - the interaction version\n * @param {boolean} [options.enabledOnly] - to only get interaction enabled && visible\n * @returns {Object} the authoring info\n */\n getAuthoringData(typeIdentifier, options = {}) {\n options = _.defaults(options || {}, { version: 0, enabledOnly: false });\n const pciModel = this.get(typeIdentifier, options.version);\n const qtiClass = `customInteraction.${pciModel.typeIdentifier}`;\n if (\n pciModel &&\n pciModel.creator &&\n pciModel.creator.hook &&\n pciModel.creator.icon &&\n ((pciModel.enabled && qtiElements.isVisible(qtiClass)) || !options.enabledOnly)\n ) {\n return {\n label: pciModel.label, //currently no translation available\n icon: pciModel.creator.icon.replace(new RegExp(`^${typeIdentifier}/`), pciModel.baseUrl),\n short: pciModel.short,\n description: pciModel.description,\n qtiClass, //custom interaction is block type\n tags: _.union([__('Custom Interactions')], pciModel.tags),\n group: 'custom-interactions'\n };\n }\n }\n }).on('creatorsloaded', function () {\n const creators = this.getLatestCreators();\n _.forEach(creators, function (creator, typeIdentifier) {\n qtiElements.classes[`customInteraction.${typeIdentifier}`] = {\n parents: ['customInteraction'],\n qti: true\n };\n });\n });\n };\n});\n\n","/*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/ciRegistry',['lodash', 'taoQtiItem/portableElementRegistry/factory/ciRegistry', 'module'], function (_, ciRegistry, module){\n 'use strict';\n\n //create a preregistered singleton of ciRegistry\n var registry = ciRegistry();\n var providers = [];\n var config = module.config();\n\n if(config && config.providers){\n providers = config.providers;\n }\n\n _.each(providers, function(provider){\n if(provider.name && provider.module){\n registry.registerProvider(provider.module);\n }\n });\n\n return registry;\n});\n","/*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/factory/icRegistry',[\n 'lodash',\n 'taoQtiItem/portableElementRegistry/factory/factory'\n], function (_, portableElementRegistry){\n 'use strict';\n\n /**\n * Info control registry has currently no additonal fonctionalities than the basic portable element registry\n *\n * @returns {Object} registry instance\n */\n return function infoControlRegistry(){\n return portableElementRegistry();\n }\n\n});\n","/*\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/icRegistry',['lodash', 'taoQtiItem/portableElementRegistry/factory/icRegistry', 'module'], function (_, icRegistry, module){\n 'use strict';\n\n //create a preregistered singleton of icRegistry\n var registry = icRegistry();\n var providers = [];\n var config = module.config();\n\n if(config && config.providers){\n providers = config.providers;\n }\n\n _.each(providers, function(provider){\n if(provider.name && provider.module){\n registry.registerProvider(provider.module);\n }\n });\n\n return registry;\n});\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016 (original work) Open Assessment Technologies SA;\n */\n\ndefine('taoQtiItem/portableElementRegistry/assetManager/portableAssetStrategy',[\n 'taoQtiItem/portableElementRegistry/ciRegistry',\n 'taoQtiItem/portableElementRegistry/icRegistry'\n], function (ciRegistry, icRegistry) {\n 'use strict';\n\n function getBaseUrlByIdentifier(typeIdentifier) {\n if (ciRegistry.get(typeIdentifier)) {\n return ciRegistry.getBaseUrl(typeIdentifier);\n }\n if (icRegistry.get(typeIdentifier)) {\n return icRegistry.getBaseUrl(typeIdentifier);\n }\n return typeIdentifier;\n }\n\n //strategy to resolve portable info control and portable interactions paths.\n //It should never be reached in the stack the usual way and should be called only using resolveBy.\n return {\n name: 'portableElementLocation',\n handle: function handlePortableElementLocation(url) {\n\n if (url.file === url.path) {\n return getBaseUrlByIdentifier(url.file);\n } else if (url.source === url.relative) {\n return url.relative.replace(/^(\\.\\/)?([a-z_0-9]+)\\/(.*)/i, function (fullmatch, $1, typeIdentifier, relPath) {\n var runtimeLocation = getBaseUrlByIdentifier(typeIdentifier);\n if (runtimeLocation) {\n return runtimeLocation + '/' + relPath;\n }\n return fullmatch;\n });\n }\n }\n };\n});\n","define('taoQtiItem/qtiCommonRenderer/renderers/config',['lodash', 'context', 'ui/themes', 'taoItems/assets/manager', 'taoItems/assets/strategies', 'module', 'taoQtiItem/portableElementRegistry/assetManager/portableAssetStrategy'], function (_, context, themes, assetManagerFactory, assetStrategies, module, portableAssetStrategy) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n context = context && Object.prototype.hasOwnProperty.call(context, 'default') ? context['default'] : context;\n themes = themes && Object.prototype.hasOwnProperty.call(themes, 'default') ? themes['default'] : themes;\n assetManagerFactory = assetManagerFactory && Object.prototype.hasOwnProperty.call(assetManagerFactory, 'default') ? assetManagerFactory['default'] : assetManagerFactory;\n assetStrategies = assetStrategies && Object.prototype.hasOwnProperty.call(assetStrategies, 'default') ? assetStrategies['default'] : assetStrategies;\n module = module && Object.prototype.hasOwnProperty.call(module, 'default') ? module['default'] : module;\n portableAssetStrategy = portableAssetStrategy && Object.prototype.hasOwnProperty.call(portableAssetStrategy, 'default') ? portableAssetStrategy['default'] : portableAssetStrategy;\n\n /**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2014 (original work) Open Assessment Technologies SA;\n */\n\n var itemThemes = themes.get('items');\n var moduleConfig = module.config();\n\n //Create asset manager stack\n var assetManager = assetManagerFactory(\n [\n {\n name: 'theme',\n handle: function handleTheme(url) {\n if (\n itemThemes &&\n url.path &&\n (url.path === itemThemes.base || _.contains(_.pluck(itemThemes.available, 'path'), url.path))\n ) {\n return context.root_url + url.toString();\n }\n }\n },\n assetStrategies.taomedia,\n assetStrategies.external,\n assetStrategies.base64,\n assetStrategies.itemCssNoCache,\n assetStrategies.baseUrl,\n portableAssetStrategy\n ],\n { baseUrl: '' }\n ); //baseUrl is not predefined in the config, but should be set upon renderer instantiating\n\n //renderers locations\n var locations = {\n assessmentItem: 'taoQtiItem/qtiCommonRenderer/renderers/Item',\n _container: 'taoQtiItem/qtiCommonRenderer/renderers/Container',\n _simpleFeedbackRule: false,\n _tooltip: 'taoQtiItem/qtiCommonRenderer/renderers/Tooltip',\n stylesheet: 'taoQtiItem/qtiCommonRenderer/renderers/Stylesheet',\n outcomeDeclaration: false,\n responseDeclaration: false,\n responseProcessing: false,\n figure: 'taoQtiItem/qtiCommonRenderer/renderers/Figure',\n img: 'taoQtiItem/qtiCommonRenderer/renderers/Img',\n figcaption: 'taoQtiItem/qtiCommonRenderer/renderers/Figcaption',\n math: 'taoQtiItem/qtiCommonRenderer/renderers/Math',\n object: 'taoQtiItem/qtiCommonRenderer/renderers/Object',\n table: 'taoQtiItem/qtiCommonRenderer/renderers/Table',\n printedVariable: 'taoQtiItem/qtiCommonRenderer/renderers/PrintedVariable',\n rubricBlock: 'taoQtiItem/qtiCommonRenderer/renderers/RubricBlock',\n modalFeedback: 'taoQtiItem/qtiCommonRenderer/renderers/ModalFeedback',\n prompt: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/Prompt',\n choiceInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/ChoiceInteraction',\n extendedTextInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/ExtendedTextInteraction',\n orderInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/OrderInteraction',\n associateInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/AssociateInteraction',\n matchInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/MatchInteraction',\n textEntryInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/TextEntryInteraction',\n sliderInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/SliderInteraction',\n inlineChoiceInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/InlineChoiceInteraction',\n 'simpleChoice.choiceInteraction': 'taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleChoice.ChoiceInteraction',\n 'simpleChoice.orderInteraction': 'taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleChoice.OrderInteraction',\n hottext: 'taoQtiItem/qtiCommonRenderer/renderers/choices/Hottext',\n gap: 'taoQtiItem/qtiCommonRenderer/renderers/choices/Gap',\n gapText: 'taoQtiItem/qtiCommonRenderer/renderers/choices/GapText',\n 'simpleAssociableChoice.matchInteraction':\n 'taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleAssociableChoice.MatchInteraction',\n 'simpleAssociableChoice.associateInteraction':\n 'taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleAssociableChoice.AssociateInteraction',\n inlineChoice: 'taoQtiItem/qtiCommonRenderer/renderers/choices/InlineChoice',\n hottextInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/HottextInteraction',\n hotspotInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/HotspotInteraction',\n hotspotChoice: false,\n gapMatchInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/GapMatchInteraction',\n selectPointInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/SelectPointInteraction',\n graphicOrderInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/GraphicOrderInteraction',\n mediaInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/MediaInteraction',\n uploadInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/UploadInteraction',\n graphicGapMatchInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/GraphicGapMatchInteraction',\n gapImg: 'taoQtiItem/qtiCommonRenderer/renderers/choices/GapImg',\n graphicAssociateInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/GraphicAssociateInteraction',\n associableHotspot: false,\n customInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/PortableCustomInteraction',\n infoControl: 'taoQtiItem/qtiCommonRenderer/renderers/PortableInfoControl',\n include: 'taoQtiItem/qtiCommonRenderer/renderers/Include',\n endAttemptInteraction: 'taoQtiItem/qtiCommonRenderer/renderers/interactions/EndAttemptInteraction'\n };\n\n var config = {\n name: 'commonRenderer',\n locations: locations,\n options: {\n assetManager: assetManager,\n themes: itemThemes,\n enableDragAndDrop: {\n associate: !!moduleConfig.associateDragAndDrop,\n gapMatch: !!moduleConfig.gapMatchDragAndDrop,\n graphicGapMatch: !!moduleConfig.graphicGapMatchDragAndDrop,\n order: !!moduleConfig.orderDragAndDrop\n },\n messages: moduleConfig.messages\n }\n };\n\n return config;\n\n});\n\n","define('taoQtiItem/qtiCommonRenderer/renderers/Renderer',['taoQtiItem/qtiRunner/core/Renderer', 'taoQtiItem/qtiCommonRenderer/renderers/config'], function (Renderer$1, config) { 'use strict';\n\n\tRenderer$1 = Renderer$1 && Object.prototype.hasOwnProperty.call(Renderer$1, 'default') ? Renderer$1['default'] : Renderer$1;\n\tconfig = config && Object.prototype.hasOwnProperty.call(config, 'default') ? config['default'] : config;\n\n\t/**\n\t * This program is free software; you can redistribute it and/or\n\t * modify it under the terms of the GNU General Public License\n\t * as published by the Free Software Foundation; under version 2\n\t * of the License (non-upgradable).\n\t *\n\t * This program is distributed in the hope that it will be useful,\n\t * but WITHOUT ANY WARRANTY; without even the implied warranty of\n\t * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\t * GNU General Public License for more details.\n\t *\n\t * You should have received a copy of the GNU General Public License\n\t * along with this program; if not, write to the Free Software\n\t * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n\t *\n\t * Copyright (c) 2014 (original work) Open Assessment Technologies SA;\n\t */\n\n\tvar Renderer = Renderer$1.build(config.locations, config.name, config.options);\n\n\treturn Renderer;\n\n});\n\n","define('taoQtiItem/runner/provider/manager/userModules',['lodash', 'module'], function (_, module) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n module = module && Object.prototype.hasOwnProperty.call(module, 'default') ? module['default'] : module;\n\n /**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016 (original work) Open Assessment Technologies SA ;\n */\n\n var userModules = {\n /**\n * Load user modules defined in the module config\n * @param {Array} [userModules] - manually specify user modules to load instead of getting them from the module config\n * @returns {Promise}\n */\n load: function load(userModules) {\n var config = module.config();\n\n if (!userModules || !_.isArray(userModules)) {\n if (config && config.userModules && _.isArray(config.userModules)) {\n userModules = config.userModules;\n } else {\n userModules = [];\n }\n }\n if(!userModules.length){\n return Promise.resolve();\n }\n return new Promise(function(resolve, reject) {\n window.require(userModules, function() {\n _.forEach(arguments, function(dependency) {\n if (dependency && _.isFunction(dependency.exec)) {\n dependency.exec();\n }\n });\n resolve();\n }, function(err) {\n reject(err.message);\n });\n });\n }\n };\n\n return userModules;\n\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2014 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n */\ndefine('taoQtiItem/runtime/qtiBootstrap',[\n 'jquery',\n 'lodash',\n 'module',\n 'taoQtiItem/qtiRunner/core/QtiRunner',\n 'taoQtiItem/qtiCommonRenderer/renderers/Renderer',\n 'iframeNotifier',\n 'core/history',\n 'taoQtiItem/runner/provider/manager/userModules'\n], function($, _, module, QtiRunner, Renderer, iframeNotifier, history, userModules){\n 'use strict';\n\n //fix backspace going back into the history\n history.fixBrokenBrowsers();\n\n /**\n * The bootstrap is used to set up a QTI item at runtime. It connects to the itemApi.\n *\n * @author Bertrand Chevrier \n * @exports taoQtiItem/runtime/qtiBootstrap\n *\n * @param {Object} runnerContext - the item context\n */\n return function bootstrap (runnerContext){\n\n //reconnect to global itemApi function\n window.onItemApiReady = function onItemApiReady(itemApi) {\n var qtiRunner = new QtiRunner();\n var coreItemData = runnerContext.itemData;\n var variableElementsData = _.merge(runnerContext.variableElements, itemApi.params.contentVariables || {});\n\n var renderer = new Renderer();\n\n // Makes the runner interface available from outside the frame\n // for preview.\n window.qtiRunner = qtiRunner;\n\n qtiRunner.setItemApi(itemApi);\n qtiRunner.setRenderer(renderer);\n\n qtiRunner.loadItemData(coreItemData, function() {\n\n qtiRunner.loadElements(variableElementsData, function() {\n\n qtiRunner.renderItem(undefined, function() {\n\n //userModules loading\n //we use any user modules bound to this module configuration instead of the ones bound to the new test runner\n var userModulesOverride;\n var config = module.config();\n if (config && config.userModules && _.isArray(config.userModules) && config.userModules.length > 0) {\n userModulesOverride = config.userModules;\n }\n userModules.load(userModulesOverride)\n .then(function() {\n\n //exec user scripts\n if (_.isArray(runnerContext.userScripts)) {\n require(runnerContext.userScripts, function() {\n _.forEach(arguments, function(dependency) {\n if (_.isFunction(dependency.exec)) {\n dependency.exec.call(null, runnerContext.userVars);\n }\n });\n });\n }\n\n iframeNotifier.parent('itemloaded');\n\n //IE9/10 loose the iframe focus, so we force getting it back.\n _.defer(function(){\n window.focus();\n });\n })\n .catch(function(err) {\n throw new Error('Error in user modules : ' + err.message);\n });\n\n });\n });\n });\n };\n\n //if the item is longer to load,\n _.defer(function(){\n //tell the parent to connect the item api\n iframeNotifier.parent('itemready');\n });\n\n };\n});\n\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2014 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n */\n\ndefine('taoQtiItem/runtime/qtiLoader',[\n 'taoQtiItem/runtime/qtiBootstrap',\n 'css!taoCss/tao-main-style'\n], function(qtiBootstrap){\n 'use strict';\n\n return {\n start : function start(){\n //the context is set into the template and bound to the tao namespace in global scope\n var runnerContext = window.tao.qtiRunnerContext;\n qtiBootstrap(runnerContext);\n }\n };\n});\n\n","\ndefine(\"taoQtiItem/loader/qtiLoader.bundle\", function(){});\n","window.bundles = (window.bundles || []).concat([\"taoQtiItem/loader/taoQtiItem.min\"]);\n"],"mappings":"ACsBA,YACA,gBAIA,CAAAA,YAAA,CAAAC,QAAA,CAAAC,cAAA,eACAC,SAAA,CAAAH,YAAA,CAAAI,YAAA,gBACAC,MAAA,CAAAL,YAAA,CAAAI,YAAA,gBAEAE,cAAA,UAAAA,eAAA,KACA,CAAAC,iBAAA,IACAC,cAAA,CAAAR,YAAA,CAAAI,YAAA,oBACAK,MAAA,CAAAT,YAAA,CAAAI,YAAA,gBACA,IACAG,iBAAA,CAAAG,IAAA,CAAAC,KAAA,CAAAF,MAAA,CACA,OAAAG,GAAA,EACAL,iBAAA,GACA,CACAM,MAAA,CAAAC,OAAA,EAAAN,cAAA,WAAAO,UAAA,EACA,IAAAC,eAAA,UAAAA,gBAAA,EACAH,MAAA,CAAAI,OAAA,GACAJ,MAAA,CAAAI,OAAA,IACAF,UAAA,CAAAG,KAAA,CAA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A07B,YAAA,EACA,aAEA,OACAv8B,KAAA,UAAAA,MAAA,EAEA,IAAA07B,aAAA,CAAA/7B,MAAA,CAAA68B,GAAA,CAAAC,gBAAA,CACAF,YAAA,CAAAb,aAAA,CACA,CACA,CACA,GC9BA76B,MAAA,oDACAlB,MCFA,CAAAU,OAAA,EAAAV,MAAA,CAAAU,OAAA,MAAAC,MAAA"} \ No newline at end of file diff --git a/views/js/loader/taoQtiItem.min.js b/views/js/loader/taoQtiItem.min.js index ad6a1b2596..5bc053c9e3 100644 --- a/views/js/loader/taoQtiItem.min.js +++ b/views/js/loader/taoQtiItem.min.js @@ -1,2 +1,2 @@ -define("taoQtiItem/portableElementRegistry/factory/factory",["lodash","core/promise","core/eventifier"],function(_,Promise,eventifier){"use strict";var _requirejs=window.require,_defaultLoadingOptions={reload:!1},loadModuleConfig=function loadModuleConfig(manifest){return new Promise(function(resolve,reject){var requireConfigAliases={},reqConfigs=[],modules={},baseUrl;return manifest&&manifest.runtime?void(baseUrl=manifest.baseUrl,_.isArray(manifest.runtime.config)&&manifest.runtime.config.length&&_.forEach(manifest.runtime.config,function(pciConfig){_.isString(pciConfig)?reqConfigs.push("json!"+baseUrl+"/"+pciConfig):pciConfig.data?modules=_.defaults(modules,pciConfig.data.paths||{}):pciConfig.file&&reqConfigs.push("json!"+baseUrl+"/"+pciConfig.file)}),require(reqConfigs,function(){var runtimeModules={};requireConfigAliases[manifest.typeIdentifier]=baseUrl,"IMSPCI"===manifest.model&&(modules=_.reduce(arguments,function(acc,conf){return _.defaults(acc,conf.paths||{})},modules),_.forEach(manifest.runtime.modules||{},function(paths,id){paths&&(_.isString(paths)||_.isArray(paths)&&paths.length)&&(runtimeModules[id]=paths)}),modules=_.merge(modules,runtimeModules),_.forEach(modules,function(paths,id){paths=_.isArray(paths)?paths:[paths],requireConfigAliases[id]=_.map(paths,function(path){return baseUrl+"/"+path.replace(/\.js$/,"")})})),resolve(requireConfigAliases)},reject)):reject("invalid manifest")})},isPortableElementProvider=function isPortableElementProvider(provider){return provider&&_.isFunction(provider.load)};return function portableElementRegistry(methods){var _loaded=!1,__providers={};return eventifier(_.defaults(methods||{},{_registry:{},get:function get(typeIdentifier,version){if(this._registry[typeIdentifier])return version?_.find(this._registry[typeIdentifier],{version:version}):_.last(this._registry[typeIdentifier])},registerProvider:function registerProvider(moduleName,provider){return __providers[moduleName]=isPortableElementProvider(provider)?provider:null,_loaded=!1,this},resetProviders:function resetProviders(){return __providers={},_loaded=!1,this},loadProviders:function loadProviders(options){var self=this,loadPromise;return loadPromise=_loaded&&!options.reload?Promise.resolve([]):new Promise(function(resolve,reject){var providerLoadingStack=[];_.forIn(__providers,function(provider,id){null===provider&&providerLoadingStack.push(id)}),_requirejs(providerLoadingStack,function(){_.each([].slice.call(arguments),function(provider){isPortableElementProvider(provider)&&(__providers[providerLoadingStack.shift()]=provider)}),resolve(__providers),_loaded=!0,self.trigger("providersloaded",__providers)},reject)}),loadPromise},getAllVersions:function getAllVersions(){var all={};return _.forIn(this._registry,function(versions,id){all[id]=_.map(versions,"version")}),all},getRuntime:function getRuntime(typeIdentifier,version){var portableElement=this.get(typeIdentifier,version);return portableElement?_.assign(portableElement.runtime,{id:portableElement.typeIdentifier,label:portableElement.label,baseUrl:portableElement.baseUrl,model:portableElement.model}):void this.trigger("error",{message:"no portable element runtime found",typeIdentifier:typeIdentifier,version:version})},getCreator:function getCreator(typeIdentifier,version){var portableElement=this.get(typeIdentifier,version);return portableElement&&portableElement.creator?_.assign(portableElement.creator,{id:portableElement.typeIdentifier,label:portableElement.label,baseUrl:portableElement.baseUrl,response:portableElement.response,model:portableElement.model,xmlns:portableElement.xmlns}):void this.trigger("error",{message:"no portable element runtime found",typeIdentifier:typeIdentifier,version:version})},getLatestCreators:function getLatestCreators(){var all={};return _.forIn(this._registry,function(versions,id){var lastVersion=_.last(versions);lastVersion.creator&&lastVersion.creator.hook&&lastVersion.enabled&&(all[id]=lastVersion)}),all},getBaseUrl:function getBaseUrl(typeIdentifier,version){var runtime=this.get(typeIdentifier,version);return runtime?runtime.baseUrl:""},loadRuntimes:function loadRuntimes(options){var self=this,loadPromise;return options=_.defaults(options||{},_defaultLoadingOptions),loadPromise=self.loadProviders(options).then(function(providers){var loadStack=[];return _.forEach(providers,function(provider){provider&&loadStack.push(provider.load())}),Promise.all(loadStack).then(function(results){var configLoadingStack=[];return self._registry=_.reduce(results,function(acc,_pcis){return _.merge(acc,_pcis)},self._registry||{}),_.forIn(self._registry,function(versions,typeIdentifier){return!!(_.isArray(options.include)&&0>_.indexOf(options.include,typeIdentifier))||void configLoadingStack.push(loadModuleConfig(self.get(typeIdentifier)))}),Promise.all(configLoadingStack).then(function(moduleConfigs){var requireConfigAliases=_.reduce(moduleConfigs,function(acc,paths){return _.merge(acc,paths)},{});_requirejs.config({paths:requireConfigAliases})})})}),loadPromise.then(function(){self.trigger("runtimesloaded")}).catch(function(err){self.trigger("error",err)}),loadPromise},loadCreators:function loadCreators(options){var self=this,loadPromise;return options=_.defaults(options||{},_defaultLoadingOptions),loadPromise=self.loadRuntimes(options).then(function(){var requiredCreatorHooks=[];return _.forIn(self._registry,function(versions,typeIdentifier){var portableElementModel=self.get(typeIdentifier);if(portableElementModel.creator&&portableElementModel.creator.hook){if(portableElementModel.enabled){if(_.isArray(options.include)&&0>_.indexOf(options.include,typeIdentifier))return!0;}else if(!_.isArray(options.include)||0>_.indexOf(options.include,typeIdentifier))return!0;requiredCreatorHooks.push(portableElementModel.creator.hook.replace(/\.js$/,""))}}),requiredCreatorHooks.length?new Promise(function(resolve,reject){_requirejs(requiredCreatorHooks,function(){var creators={};_.each(arguments,function(creatorHook){var id=creatorHook.getTypeIdentifier(),portableElementModel=self.get(id),i=_.findIndex(self._registry[id],{version:portableElementModel.version});0>i?self.trigger("error","no creator found for id/version "+id+"/"+portableElementModel.version):(self._registry[id][i].creator.module=creatorHook,creators[id]=creatorHook)}),resolve(creators)},reject)}):Promise.resolve({})}),loadPromise.then(function(creators){return self.trigger("creatorsloaded",creators),creators}).catch(function(err){self.trigger("error",err)}),loadPromise},enable:function enable(typeIdentifier,version){var portableElement=this.get(typeIdentifier,version);return portableElement&&(portableElement.enabled=!0),this},disable:function disable(typeIdentifier,version){var portableElement=this.get(typeIdentifier,version);return portableElement&&(portableElement.enabled=!1),this},isEnabled:function isEnabled(typeIdentifier,version){var portableElement=this.get(typeIdentifier,version);return portableElement&&!0===portableElement.enabled}}))}}),define("taoQtiItem/qtiCreator/helper/qtiElements",["jquery","lodash","i18n","services/features"],function($,_,__,featuresService){"use strict";const QtiElements={classes:{itemBody:{parents:["bodyElement"],contains:["block"],abstract:!0},atomicBlock:{parents:["blockStatic","bodyElement","flowStatic"],contains:["inline"],abstract:!0},atomicInline:{parents:["bodyElement","flowStatic","inlineStatic"],contains:["inline"],abstract:!0},simpleBlock:{parents:["blockStatic","bodyElement","flowStatic"],contains:["block"],abstract:!0},simpleInline:{parents:["bodyElement","flowStatic","inlineStatic"],contains:["inline"],abstract:!0},flowStatic:{parents:["flow"],abstract:!0},blockStatic:{parents:["block"],abstract:!0},inlineStatic:{parents:["inline"],abstract:!0},flow:{parents:["objectFlow"],abstract:!0},tableCell:{parents:["bodyElement"],contains:["flow"],abstract:!0},caption:{parents:["bodyElement"],contains:["inline"],xhtml:!0},col:{parents:["bodyElement"],xhtml:!0},colgroup:{parents:["bodyElement"],contains:["col"],xhtml:!0},div:{parents:["blockStatic","bodyElement","flowStatic"],contains:["flow"],xhtml:!0},dl:{parents:["blockStatic","bodyElement","flowStatic"],contains:["dlElement"],xhtml:!0},dt:{parents:["dlElement"],contains:["inline"],xhtml:!0},dd:{parents:["dlElement"],contains:["flow"],xhtml:!0},hr:{parents:["blockStatic","bodyElement","flowStatic"],xhtml:!0},math:{parents:["blockStatic","flowStatic","inlineStatic"],xhtml:!0},li:{parents:["bodyElement"],contains:["flow"],xhtml:!0},ol:{parents:["blockStatic","bodyElement","flowStatic"],contains:["li"],xhtml:!0},ul:{parents:["blockStatic","bodyElement","flowStatic"],contains:["li"],xhtml:!0},object:{parents:["bodyElement","flowStatic","inlineStatic"],contains:["objectFlow"],xhtml:!0},param:{parents:["objectFlow"],xhtml:!0},table:{parents:["blockStatic","bodyElement","flowStatic"],contains:["caption","col","colgroup","thead","tfoot","tbody"],xhtml:!0},tbody:{parents:["bodyElement"],contains:["tr"],xhtml:!0},tfoot:{parents:["bodyElement"],contains:["tr"],xhtml:!0},thead:{parents:["bodyElement"],contains:["tr"],xhtml:!0},td:{parents:["tableCell"],xhtml:!0},th:{parents:["tableCell"],xhtml:!0},tr:{parents:["bodyElement"],contains:["tableCell"],xhtml:!0},a:{parents:["simpleInline"],xhtml:!0},abbr:{parents:["simpleInline"],xhtml:!0},acronym:{parents:["simpleInline"],xhtml:!0},b:{parents:["simpleInline"],xhtml:!0},big:{parents:["simpleInline"],xhtml:!0},cite:{parents:["simpleInline"],xhtml:!0},code:{parents:["simpleInline"],xhtml:!0},dfn:{parents:["simpleInline"],xhtml:!0},em:{parents:["simpleInline"],xhtml:!0},i:{parents:["simpleInline"],xhtml:!0},kbd:{parents:["simpleInline"],xhtml:!0},q:{parents:["simpleInline"],xhtml:!0},samp:{parents:["simpleInline"],xhtml:!0},small:{parents:["simpleInline"],xhtml:!0},span:{parents:["simpleInline"],xhtml:!0},strong:{parents:["simpleInline"],xhtml:!0},sub:{parents:["simpleInline"],xhtml:!0},sup:{parents:["simpleInline"],xhtml:!0},tt:{parents:["simpleInline"],xhtml:!0},var:{parents:["simpleInline"],xhtml:!0},blockquote:{parents:["simpleBlock"],xhtml:!0},address:{parents:["atomicBlock"],xhtml:!0},h1:{parents:["atomicBlock"],xhtml:!0},h2:{parents:["atomicBlock"],xhtml:!0},h3:{parents:["atomicBlock"],xhtml:!0},h4:{parents:["atomicBlock"],xhtml:!0},h5:{parents:["atomicBlock"],xhtml:!0},h6:{parents:["atomicBlock"],xhtml:!0},p:{parents:["atomicBlock"],xhtml:!0},pre:{parents:["atomicBlock"],xhtml:!0},img:{parents:["atomicInline"],xhtml:!0,attributes:["src","alt","longdesc","height","width"]},br:{parents:["atomicInline"],xhtml:!0},infoControl:{parents:["blockStatic","bodyElement","flowStatic"],qti:!0},textRun:{parents:["inlineStatic","flowstatic"],qti:!0},feedbackInline:{parents:["simpleInline","feedbackElement"],qti:!0},feedbackBlock:{parents:["simpleBlock"],qti:!0},rubricBlock:{parents:["simpleBlock"],qti:!0},blockInteraction:{parents:["block","flow","interaction"],qti:!0},inlineInteraction:{parents:["inline","flow","interaction"],qti:!0},gap:{parents:["inlineStatic"],qti:!0},hottext:{parents:["flowstatic","inlineStatic"],contains:["inlineStatic"],qti:!0},printedVariable:{parents:["bodyElement","flowStatic","inlineStatic","textOrVariable"],qti:!0},prompt:{parents:["bodyElement"],contains:["inlineStatic"],qti:!0},templateElement:{parents:["bodyElement"],qti:!0},templateBlock:{parents:["blockStatic","flowStatic","templateElement"],contains:["blockStatic"],qti:!0},templateInline:{parents:["inlineStatic","flowStatic","templateElement"],contains:["inlineStatic"],qti:!0},choiceInteraction:{parents:["blockInteraction"],qti:!0},associateInteraction:{parents:["blockInteraction"],qti:!0},orderInteraction:{parents:["blockInteraction"],qti:!0},matchInteraction:{parents:["blockInteraction"],qti:!0},hottextInteraction:{parents:["blockInteraction"],qti:!0},gapMatchInteraction:{parents:["blockInteraction"],qti:!0},mediaInteraction:{parents:["blockInteraction"],qti:!0},sliderInteraction:{parents:["blockInteraction"],qti:!0},uploadInteraction:{parents:["blockInteraction"],qti:!0},drawingInteraction:{parents:["blockInteraction"],qti:!0},graphicInteraction:{parents:["blockInteraction"],qti:!0},hotspotInteraction:{parents:["graphicInteraction"],qti:!0},graphicAssociateInteraction:{parents:["graphicInteraction"],qti:!0},graphicOrderInteraction:{parents:["graphicInteraction"],qti:!0},graphicGapMatchInteraction:{parents:["graphicInteraction"],qti:!0},selectPointInteraction:{parents:["graphicInteraction"],qti:!0},textEntryInteraction:{parents:["stringInteraction","inlineInteraction"],qti:!0},extendedTextInteraction:{parents:["stringInteraction","blockInteraction"],qti:!0},inlineChoiceInteraction:{parents:["inlineInteraction"],qti:!0},endAttemptInteraction:{parents:["inlineInteraction"],qti:!0},customInteraction:{parents:["block","flow","interaction"],qti:!0},_container:{parents:["block"],qti:!0}},cache:{containable:{},children:{},parents:{}},getAllowedContainersElements(qtiClass,$container){const classes=QtiElements.getAllowedContainers(qtiClass);let jqSelector="";for(let i in classes)classes[i].qti||(jqSelector+=`${classes[i]}, `);return jqSelector&&(jqSelector=jqSelector.substring(0,jqSelector.length-2)),$(jqSelector,$container?$container:$(document)).filter(":not([data-qti-type])")},getAllowedContainers(qtiClass){let ret;if(QtiElements.cache.containable[qtiClass])ret=QtiElements.cache.containable[qtiClass];else{ret=[];const parents=QtiElements.getParentClasses(qtiClass,!0);for(let aClass in QtiElements.classes){const model=QtiElements.classes[aClass];if(model.contains){const intersect=_.intersection(model.contains,parents);intersect.length&&(!model.abstract&&ret.push(aClass),ret=_.union(ret,QtiElements.getChildClasses(aClass,!0)))}}QtiElements.cache.containable[qtiClass]=ret}return ret},getAllowedContents(qtiClass,recursive,checked){let ret=[];checked=checked||{};const model=QtiElements.classes[qtiClass];if(model&&model.contains)for(let i in model.contains){const contain=model.contains[i];if(!checked[contain]){checked[contain]=!0,ret.push(contain);const children=QtiElements.getChildClasses(contain,!0);for(let j in children){const child=children[j];checked[child]||(checked[child]=!0,ret.push(child),recursive&&(ret=_.union(ret,QtiElements.getAllowedContents(child,!0,checked))))}recursive&&(ret=_.union(ret,QtiElements.getAllowedContents(contain,!0,checked)))}}const parents=QtiElements.getParentClasses(qtiClass,!0);for(let i in parents)ret=_.union(ret,QtiElements.getAllowedContents(parents[i],recursive,checked));return _.uniq(ret,!1)},isAllowedClass(qtiContainerClass,qtiContentClass){const allowedClasses=QtiElements.getAllowedContents(qtiContainerClass);return 0<=_.indexOf(allowedClasses,qtiContentClass)},getParentClasses(qtiClass,recursive){let ret;if(recursive&&QtiElements.cache.parents[qtiClass])ret=QtiElements.cache.parents[qtiClass];else{if(ret=[],QtiElements.classes[qtiClass]&&(ret=QtiElements.classes[qtiClass].parents,recursive)){for(let i in ret)ret=_.union(ret,QtiElements.getParentClasses(ret[i],recursive));ret=_.uniq(ret,!1)}QtiElements.cache.parents[qtiClass]=ret}return ret},getChildClasses(qtiClass,recursive,type){let ret;const cacheType=type?type:"all";if(recursive&&QtiElements.cache.children[qtiClass]&&QtiElements.cache.children[qtiClass][cacheType])ret=QtiElements.cache.children[qtiClass][cacheType];else{for(let aClass in ret=[],QtiElements.classes){const model=QtiElements.classes[aClass];0<=_.indexOf(model.parents,qtiClass)&&(type?model[type]&&ret.push(aClass):ret.push(aClass),recursive&&(ret=_.union(ret,QtiElements.getChildClasses(aClass,recursive,type))))}QtiElements.cache.children[qtiClass]||(QtiElements.cache.children[qtiClass]={}),QtiElements.cache.children[qtiClass][cacheType]=ret}return ret},isBlock(qtiClass){return QtiElements.is(qtiClass,"block")},isInline(qtiClass){return QtiElements.is(qtiClass,"inline")},is(qtiClass,topClass){if(qtiClass===topClass)return!0;else{const parents=QtiElements.getParentClasses(qtiClass,!0);return 0<=_.indexOf(parents,topClass)}},isVisible(qtiClass){return this.is(qtiClass,"customInteraction")?featuresService.isVisible(`taoQtiItem/creator/customInteraction/${qtiClass.replace(/Interaction$/,"").replace(/^customInteraction\./,"")}`):!this.is(qtiClass,"interaction")||featuresService.isVisible(`taoQtiItem/creator/interaction/${qtiClass.replace(/Interaction$/,"")}`)},getAvailableAuthoringElements(){const tagTitles={commonInteractions:__("Common Interactions"),inlineInteractions:__("Inline Interactions"),graphicInteractions:__("Graphic Interactions")},authoringElements={choiceInteraction:{label:__("Choice Interaction"),description:__("Select a single (radio buttons) or multiple (check boxes) responses among a set of choices."),icon:"icon-choice",short:__("Choice"),qtiClass:"choiceInteraction",tags:[tagTitles.commonInteractions,"mcq"],group:"common-interactions"},orderInteraction:{label:__("Order Interaction"),icon:"icon-order",description:__("Arrange a list of choices in the correct order."),short:__("Order"),qtiClass:"orderInteraction",tags:[tagTitles.commonInteractions,"ordering"],group:"common-interactions"},associateInteraction:{label:__("Associate Interaction"),icon:"icon-associate",description:__("Create pair(s) from a series of choices."),short:__("Associate"),qtiClass:"associateInteraction",tags:[tagTitles.commonInteractions,"association"],group:"common-interactions"},matchInteraction:{label:__("Match Interaction"),icon:"icon-match",description:__("Create association(s) between two sets of choices displayed in a table (row and column)."),short:__("Match"),qtiClass:"matchInteraction",tags:[tagTitles.commonInteractions,"association"],group:"common-interactions"},hottextInteraction:{label:__("Hottext Interaction"),icon:"icon-hottext",description:__("Select one or more text parts (hottext) within a text."),short:__("Hottext"),qtiClass:"hottextInteraction",tags:[tagTitles.commonInteractions,"text"],group:"common-interactions"},gapMatchInteraction:{label:__("Gap Match Interaction"),icon:"icon-gap-match",description:__(" Fill in the gaps in a text from a set of choices."),short:__("Gap Match"),qtiClass:"gapMatchInteraction",tags:[tagTitles.commonInteractions,"text","association"],group:"common-interactions"},sliderInteraction:{label:__("Slider Interaction"),icon:"icon-slider",description:__("Select a value within a numerical range."),short:__("Slider"),qtiClass:"sliderInteraction",tags:[tagTitles.commonInteractions,"special"],group:"common-interactions"},extendedTextInteraction:{label:__("Extended Text Interaction"),icon:"icon-extended-text",description:__("Collect open-ended information in one or more text area(s) (strings or numeric values)."),short:__("Extended Text"),qtiClass:"extendedTextInteraction",tags:[tagTitles.commonInteractions,"text"],group:"common-interactions"},uploadInteraction:{label:__("File Upload Interaction"),icon:"icon-upload",description:__("Upload a file (e.g. document, picture...) as a response."),short:__("File Upload"),qtiClass:"uploadInteraction",tags:[tagTitles.commonInteractions,"special"],group:"common-interactions"},mediaInteraction:{label:__("Media Interaction"),icon:"icon-media",description:__("Control the playing parameters (auto-start, loop) of a video or audio file and report the number of time it has been played."),short:__("Media"),qtiClass:"mediaInteraction",tags:[tagTitles.commonInteractions,"media"],group:"common-interactions"},_container:{label:__("Text Block"),icon:"icon-font",description:__("Block contains the content (stimulus) of the item such as text or image. It is also required for Inline Interactions."),short:__("Block"),qtiClass:"_container",tags:[tagTitles.inlineInteractions,"text"],group:"inline-interactions"},inlineChoiceInteraction:{label:__("Inline Choice Interaction"),icon:"icon-inline-choice",description:__("Select a choice from a drop-down list."),short:__("Inline Choice"),qtiClass:"inlineChoiceInteraction",tags:[tagTitles.inlineInteractions,"inline-interactions","mcq"],group:"inline-interactions"},textEntryInteraction:{label:__("Text Entry Interaction"),icon:"icon-text-entry",description:__("Collect open-ended information in a short text input (strings or numeric values)."),short:__("Text Entry"),qtiClass:"textEntryInteraction",tags:[tagTitles.inlineInteractions,"inline-interactions","text"],group:"inline-interactions"},endAttemptInteraction:{label:__("End Attempt Interaction"),icon:"icon-end-attempt",description:__("Trigger the end of the item attempt."),short:__("End Attempt"),qtiClass:"endAttemptInteraction",tags:[tagTitles.inlineInteractions,"inline-interactions","button","submit"],group:"inline-interactions"},hotspotInteraction:{label:__("Hotspot Interaction"),icon:"icon-hotspot",description:__("Select one or more areas (hotspots) displayed on an picture."),short:__("Hotspot"),qtiClass:"hotspotInteraction",tags:[tagTitles.graphicInteractions,"mcq"],group:"graphic-interactions"},graphicOrderInteraction:{label:__("Graphic Order Interaction"),icon:"icon-graphic-order",description:__("Order the areas (hotspots) displayed on a picture."),short:__("Order"),qtiClass:"graphicOrderInteraction",tags:[tagTitles.graphicInteractions,"ordering"],group:"graphic-interactions"},graphicAssociateInteraction:{label:__("Graphic Associate Interaction"),icon:"icon-graphic-associate",description:__("Create association(s) between areas (hotspots) displayed on a picture."),short:__("Associate"),qtiClass:"graphicAssociateInteraction",tags:[tagTitles.graphicInteractions,"association"],group:"graphic-interactions"},graphicGapMatchInteraction:{label:__("Graphic Gap Match Interaction"),icon:"icon-graphic-gap",description:__("Fill in the gaps on a picture with a set of image choices."),short:__("Gap Match"),qtiClass:"graphicGapMatchInteraction",tags:[tagTitles.graphicInteractions,"association"],group:"graphic-interactions"},selectPointInteraction:{label:__("Select Point Interaction"),icon:"icon-select-point",description:__("Position one or more points on a picture (response areas are not displayed)."),short:__("Select Point"),qtiClass:"selectPointInteraction",tags:[tagTitles.graphicInteractions],group:"graphic-interactions"}},availableElements={};for(const[elementId,element]of Object.entries(authoringElements))this.isVisible(elementId)&&(availableElements[elementId]=element);return availableElements}};return QtiElements}),define("taoQtiItem/portableElementRegistry/factory/ciRegistry",["lodash","i18n","taoQtiItem/portableElementRegistry/factory/factory","taoQtiItem/qtiCreator/helper/qtiElements"],function(_,__,portableElementRegistry,qtiElements){"use strict";return function customInteractionRegistry(){return portableElementRegistry({getAuthoringData(typeIdentifier){let options=1{const execStack=[];return _.forEach(plugins,plugin=>{_.isFunction(plugin[method])&&execStack.push(plugin[method]())}),Promise.all(execStack)},qtiCreatorContext={init(){return pluginLoader.load().then(()=>{const pluginFactories=pluginLoader.getPlugins();return _.forEach(pluginFactories,pluginFactory=>{const plugin=pluginFactory(this);plugins[plugin.getName()]=plugin}),pluginRun("init").then(()=>{this.trigger("init")})}).catch(err=>{this.trigger("error",err)})},destroy(){return pluginRun("destroy").then(()=>{this.trigger("destroy")}).catch(function(err){this.trigger("error",err)})}};return eventifier(qtiCreatorContext)}}),define("taoQtiItem/qtiItem/core/qtiClasses",[],function(){"use strict";var qtiClasses={_container:"taoQtiItem/qtiItem/core/Container",assessmentItem:"taoQtiItem/qtiItem/core/Item",responseProcessing:"taoQtiItem/qtiItem/core/ResponseProcessing",_simpleFeedbackRule:"taoQtiItem/qtiItem/core/response/SimpleFeedbackRule",stylesheet:"taoQtiItem/qtiItem/core/Stylesheet",math:"taoQtiItem/qtiItem/core/Math",figure:"taoQtiItem/qtiItem/core/Figure",img:"taoQtiItem/qtiItem/core/Img",figcaption:"taoQtiItem/qtiItem/core/Figcaption",object:"taoQtiItem/qtiItem/core/Object",outcomeDeclaration:"taoQtiItem/qtiItem/core/variables/OutcomeDeclaration",responseDeclaration:"taoQtiItem/qtiItem/core/variables/ResponseDeclaration",rubricBlock:"taoQtiItem/qtiItem/core/RubricBlock",associableHotspot:"taoQtiItem/qtiItem/core/choices/AssociableHotspot",gap:"taoQtiItem/qtiItem/core/choices/Gap",gapImg:"taoQtiItem/qtiItem/core/choices/GapImg",gapText:"taoQtiItem/qtiItem/core/choices/GapText",hotspotChoice:"taoQtiItem/qtiItem/core/choices/HotspotChoice",hottext:"taoQtiItem/qtiItem/core/choices/Hottext",inlineChoice:"taoQtiItem/qtiItem/core/choices/InlineChoice",simpleAssociableChoice:"taoQtiItem/qtiItem/core/choices/SimpleAssociableChoice",simpleChoice:"taoQtiItem/qtiItem/core/choices/SimpleChoice",associateInteraction:"taoQtiItem/qtiItem/core/interactions/AssociateInteraction",choiceInteraction:"taoQtiItem/qtiItem/core/interactions/ChoiceInteraction",endAttemptInteraction:"taoQtiItem/qtiItem/core/interactions/EndAttemptInteraction",extendedTextInteraction:"taoQtiItem/qtiItem/core/interactions/ExtendedTextInteraction",gapMatchInteraction:"taoQtiItem/qtiItem/core/interactions/GapMatchInteraction",graphicAssociateInteraction:"taoQtiItem/qtiItem/core/interactions/GraphicAssociateInteraction",graphicGapMatchInteraction:"taoQtiItem/qtiItem/core/interactions/GraphicGapMatchInteraction",graphicOrderInteraction:"taoQtiItem/qtiItem/core/interactions/GraphicOrderInteraction",hotspotInteraction:"taoQtiItem/qtiItem/core/interactions/HotspotInteraction",hottextInteraction:"taoQtiItem/qtiItem/core/interactions/HottextInteraction",inlineChoiceInteraction:"taoQtiItem/qtiItem/core/interactions/InlineChoiceInteraction",matchInteraction:"taoQtiItem/qtiItem/core/interactions/MatchInteraction",mediaInteraction:"taoQtiItem/qtiItem/core/interactions/MediaInteraction",orderInteraction:"taoQtiItem/qtiItem/core/interactions/OrderInteraction",prompt:"taoQtiItem/qtiItem/core/interactions/Prompt",selectPointInteraction:"taoQtiItem/qtiItem/core/interactions/SelectPointInteraction",sliderInteraction:"taoQtiItem/qtiItem/core/interactions/SliderInteraction",textEntryInteraction:"taoQtiItem/qtiItem/core/interactions/TextEntryInteraction",uploadInteraction:"taoQtiItem/qtiItem/core/interactions/UploadInteraction",feedbackBlock:"taoQtiItem/qtiItem/core/feedbacks/FeedbackBlock",feedbackInline:"taoQtiItem/qtiItem/core/feedbacks/FeedbackInline",modalFeedback:"taoQtiItem/qtiItem/core/feedbacks/ModalFeedback",customInteraction:"taoQtiItem/qtiItem/core/interactions/CustomInteraction",infoControl:"taoQtiItem/qtiItem/core/PortableInfoControl",include:"taoQtiItem/qtiItem/core/Include",table:"taoQtiItem/qtiItem/core/Table",printedVariable:"taoQtiItem/qtiItem/core/PrintedVariable",_tooltip:"taoQtiItem/qtiItem/core/Tooltip"};return qtiClasses}),define("taoQtiItem/qtiItem/helper/util",["lodash"],function(_){"use strict";_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_;var util={buildSerial:function buildSerial(prefix){for(var id=prefix||"",chars="abcdefghijklmnopqrstuvwxyz0123456789",i=0;22>i;i++)id+=chars.charAt(Math.floor(Math.random()*chars.length));return id},buildId:function buildId(item,prefix){var i=1,suffix="",exists=!1,id,usedIds;if(!item)throw new TypeError("A item is required to generate a unique identifier");usedIds=item.getUsedIds();do exists=!1,id=prefix+suffix,_.contains(usedIds,id)&&(exists=!0,suffix="_"+i,i++);while(exists);return id},buildIdentifier:function buildIdentifier(item,prefix,useSuffix){var suffix="",i=1,exists=!1,id,usedIds;if(!item)throw new TypeError("A item is required to generate a unique identifier");if(!prefix)throw new TypeError("Prefix is required to build an identifier");usedIds=item.getUsedIdentifiers(),useSuffix=!!_.isUndefined(useSuffix)||useSuffix,prefix&&(prefix=prefix.replace(/_[0-9]+$/gi,"_").replace(/[^a-zA-Z0-9_]/gi,"_").replace(/(_)+/gi,"_"),useSuffix&&(suffix="_"+i));do exists=!1,id=prefix+suffix,usedIds[id]&&(exists=!0,suffix="_"+i,i++);while(exists);return id},findInCollection:function findInCollection(element,collectionNames,searchedSerial){var found=null;if(_.isString(collectionNames)&&(collectionNames=[collectionNames]),_.isArray(collectionNames))_.each(collectionNames,function(collectionName){var collection=element;_.each(collectionName.split("."),function(nameToken){collection=collection[nameToken]});var elt=collection[searchedSerial];return elt?(found={parent:element,element:elt},!1):(_.each(collection,function(elt){if(_.isFunction(elt.find)&&(found=elt.find(searchedSerial),found))return!1}),!found)&&void 0});else throw new Error("invalid argument : collectionNames must be an array or a string");return found},addMarkupNamespace:function addMarkupNamespace(markup,ns){return ns?(markup=markup.replace(/<(\/)?([a-z:]+)(\s?)([^><]*)>/g,function($0,$1,$2,$3,$4){return 0<$2.indexOf(":")?$0:($1=$1||"",$3=$3||"","<"+$1+ns+":"+$2+$3+$4+">")}),markup):markup},removeMarkupNamespaces:function removeMarkupNamespace(markup){return markup.replace(/<(\/)?(\w*):([^>]*)>/g,"<$1$3>")},getMarkupUsedNamespaces:function getMarkupUsedNamespaces(markup){var namespaces=[];return markup.replace(/<(\/)?(\w*):([^>]*)>/g,function(original,slash,ns,node){return namespaces.push(ns),"<"+slash+node+">"}),_.uniq(namespaces)}};return util}),define("taoQtiItem/qtiItem/helper/rendererConfig",["lodash","jquery"],function(_,$){"use strict";_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,$=$&&Object.prototype.hasOwnProperty.call($,"default")?$["default"]:$;var rendererConfigHelper={getOptionsFromArguments:function(args){var options={data:{},placeholder:null,subclass:"",renderer:null};return _.each(args,function(arg){arg&&(arg.isRenderer?options.renderer=arg:arg instanceof $&&arg.length?options.placeholder=arg:_.isString(arg)?options.subclass=arg:_.isPlainObject(arg)?options.data=arg:console.log("invalid arg",arg,args))}),options}};return rendererConfigHelper}),define("taoQtiItem/qtiItem/core/Element",["jquery","lodash","class","core/logger","taoQtiItem/qtiItem/helper/util","taoQtiItem/qtiItem/helper/rendererConfig"],function($,_,_class,loggerFactory,util,rendererConfig){"use strict";$=$&&Object.prototype.hasOwnProperty.call($,"default")?$["default"]:$,_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,loggerFactory=loggerFactory&&Object.prototype.hasOwnProperty.call(loggerFactory,"default")?loggerFactory["default"]:loggerFactory,util=util&&Object.prototype.hasOwnProperty.call(util,"default")?util["default"]:util,rendererConfig=rendererConfig&&Object.prototype.hasOwnProperty.call(rendererConfig,"default")?rendererConfig["default"]:rendererConfig;var _instances={},logger=loggerFactory("taoQtiItem/qtiItem/core/Element"),Element=Class.extend({qtiClass:"",serial:"",rootElement:null,init:function(serial,attributes){if(this.attributes={},this.metaData={},"object"==typeof serial&&(attributes=serial,serial=""),serial||(serial=util.buildSerial(this.qtiClass+"_")),serial&&("string"!=typeof serial||!serial.match(/^[a-z_0-9]*$/i)))throw"invalid QTI serial : ("+typeof serial+") "+serial;if(!_instances[serial])_instances[serial]=this,this.serial=serial,this.setAttributes(attributes||{});else throw"a QTI Element with the same serial already exists "+serial;"function"==typeof this.initContainer&&this.initContainer(arguments[2]||""),"function"==typeof this.initObject&&this.initObject()},is:function(qtiClass){return qtiClass===this.qtiClass},placeholder:function(){return"{{"+this.serial+"}}"},getSerial:function(){return this.serial},getUsedIdentifiers:function(){var usedIds={},elts=this.getComposingElements();for(var i in elts){var elt=elts[i],id=elt.attr("identifier");id&&(usedIds[id]=elt)}return usedIds},getUsedIds:function getUsedIds(){var usedIds=[];return _.forEach(this.getComposingElements(),function(elt){var id=elt.attr("id");id&&!_.contains(usedIds,id)&&usedIds.push(id)}),usedIds},attr:function(name,value){if(name)if(void 0!==value)this.attributes[name]=value;else if("object"==typeof name)for(var prop in name)this.attr(prop,name[prop]);else if("string"==typeof name)return void 0===this.attributes[name]?void 0:this.attributes[name];return this},data:function(name,value){if(name)if(void 0!==value)this.metaData[name]=value,$(document).trigger("metaChange.qti-widget",{element:this,key:name,value:value});else if("object"==typeof name)for(var prop in name)this.data(prop,name[prop]);else if("string"==typeof name)return void 0===this.metaData[name]?void 0:this.metaData[name];return this},removeData:function(name){return delete this.metaData[name],this},removeAttr:function(name){return this.removeAttributes(name)},setAttributes:function(attributes){return _.isPlainObject(attributes)||logger.warn("attributes should be a plain object"),this.attributes=attributes,this},getAttributes:function(){return _.clone(this.attributes)},removeAttributes:function(attrNames){for(var i in"string"==typeof attrNames&&(attrNames=[attrNames]),attrNames)delete this.attributes[attrNames[i]];return this},getComposingElements:function(){function append(element){elts[element.getSerial()]=element,elts=_.extend(elts,element.getComposingElements())}var elts={};return"function"==typeof this.initContainer&&append(this.getBody()),"function"==typeof this.initObject&&append(this.getObject()),_.each(this.metaData,function(v){Element.isA(v,"_container")?append(v):_.isArray(v)&&_.each(v,function(v){Element.isA(v,"_container")&&append(v)})}),elts},getUsedClasses:function(){var ret=[this.qtiClass],composingElts=this.getComposingElements();return _.each(composingElts,function(elt){ret.push(elt.qtiClass)}),_.uniq(ret)},find:function(serial){var found=null,object,body;return"function"==typeof this.initObject&&(object=this.getObject(),object.serial===serial&&(found={parent:this,element:object,location:"object"})),found||"function"!=typeof this.initContainer||(body=this.getBody(),found=body.serial===serial?{parent:this,element:body,location:"body"}:this.getBody().find(serial,this)),found},parent:function(){var item=this.getRootElement();if(item){var found=item.find(this.getSerial());if(found)return found.parent}return null},setRelatedItem:function(item){logger.warn("Deprecated use of setRelatedItem()"),this.setRootElement(item)},setRootElement:function(item){var composingElts,i;if(Element.isA(item,"assessmentItem"))for(i in this.rootElement=item,composingElts=this.getComposingElements(),composingElts)composingElts[i].setRootElement(item)},getRelatedItem:function(){return logger.warn("Deprecated use of getRelatedItem()"),this.getRootElement()},getRootElement:function(){var ret=null;return Element.isA(this.rootElement,"assessmentItem")&&(ret=this.rootElement),ret},setRenderer:function(renderer){if(renderer&&renderer.isRenderer){this.renderer=renderer;var elts=this.getComposingElements();for(var serial in elts)elts[serial].setRenderer(renderer)}else throw"invalid qti rendering engine"},getRenderer:function(){return this.renderer},render:function render(){var args=rendererConfig.getOptionsFromArguments(arguments),_renderer=args.renderer||this.getRenderer(),tplData={},defaultData={tag:this.qtiClass,serial:this.serial,attributes:this.getAttributes()},rendering;if(!_renderer)throw new Error("render: no renderer found for the element "+this.qtiClass+":"+this.serial);return"function"==typeof this.initContainer&&(defaultData.body=this.getBody().render(args.renderer)),"function"==typeof this.initObject&&(defaultData.object={attributes:this.object.getAttributes()},defaultData.object.attributes.data=_renderer.resolveUrl(this.object.attr("data"))),tplData=_.merge(defaultData,args.data||{}),tplData=_renderer.getData(this,tplData,args.subclass),rendering=_renderer.renderTpl(this,tplData,args.subclass),args.placeholder&&args.placeholder.replaceWith(rendering),rendering},postRender:function(data,altClassName,renderer){var postRenderers=[],_renderer=renderer||this.getRenderer();if("function"==typeof this.initContainer&&(postRenderers=this.getBody().postRender(data,"",renderer)),_renderer)postRenderers.push(_renderer.postRender(this,data,altClassName));else throw"postRender: no renderer found for the element "+this.qtiClass+":"+this.serial;return _.compact(postRenderers)},getContainer:function($scope,subclass){var renderer=this.getRenderer();if(renderer)return renderer.getContainer(this,$scope,subclass);throw"getContainer: no renderer found for the element "+this.qtiClass+":"+this.serial},toArray:function(){var arr={serial:this.serial,type:this.qtiClass,attributes:this.getAttributes()};return"function"==typeof this.initContainer&&(arr.body=this.getBody().toArray()),"function"==typeof this.initObject&&(arr.object=this.object.toArray()),arr},isEmpty:function(){return!1},addClass:function(className){var clazz=this.attr("class")||"";_containClass(clazz,className)||this.attr("class",clazz+(clazz.length?" ":"")+className)},hasClass:function(className){return _containClass(this.attr("class"),className)},removeClass:function(className){var clazz=this.attr("class")||"";if(clazz){var regex=new RegExp("(?:^|\\s)"+className+"(?:\\s|$)");clazz=clazz.replace(regex," ").trim(),clazz?this.attr("class",clazz):this.removeAttr("class")}},toggleClass:function(className,state){return"boolean"==typeof state?state?this.addClass(className):this.removeClass(className):this.hasClass(className)?this.removeClass(className):this.addClass(className)},isset:function(){return Element.issetElement(this.serial)},unset:function(){return Element.unsetElement(this.serial)}}),_containClass=function(allClassStr,className){var regex=new RegExp("(?:^|\\s)"+className+"(?:\\s|$)","");return allClassStr&®ex.test(allClassStr)};return Element.isA=function(qtiElement,qtiClass){return qtiElement instanceof Element&&qtiElement.is(qtiClass)},Element.getElementBySerial=function(serial){return _instances[serial]},Element.issetElement=function(serial){return!!_instances[serial]},Element.unsetElement=function(serial){var element=Element.getElementBySerial(serial);if(element){var composingElements=element.getComposingElements();return _.each(composingElements,function(elt){delete _instances[elt.serial]}),delete _instances[element.serial],!0}return!1},Element}),define("taoQtiItem/qtiItem/helper/xmlNsHandler",[],function(){"use strict";function getPrefix(namespaces,html5Ns){let key;for(key in namespaces)if(namespaces[key]===html5Ns)return key;return"qh5"}const prefixed="article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section";var xmlNsHandler={stripNs:function stripNs(body){const pattern="([\\w]+)\\:(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section)",openRegEx=/(<([\w]+)\:(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section))/gi,closeRegEx=/(<\/([\w]+)\:(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section)>)/gi;return body.replace(openRegEx,"<$3").replace(closeRegEx,"")},restoreNs:function restoreNs(xml,namespaces){let ignoreMarkup=!!(2)+)/gim,""));const xmlRe=/(<(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section)[^>]*>|<\/(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section)>)/gi,tagRe=/((<)(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section)([^>]*)(>)|(<\/)(article|aside|bdi|figure|footer|header|nav|rb|rp|rt|rtc|ruby|section)(>))/i,xmlMatch=xmlCopy.match(xmlRe),imsXsd="http://www.imsglobal.org/xsd",html5Ns=imsXsd+"/imsqtiv2p2_html5_v1p0",prefix=getPrefix(namespaces,html5Ns),prefixAtt="xmlns:"+prefix+"=\""+html5Ns+"\"";let i=xmlMatch?xmlMatch.length:0;if(!xmlMatch)return xml;for(;i--;){const tagMatch=xmlMatch[i].match(tagRe);xml=xml.replace(xmlMatch[i],tagMatch[5]?"<"+prefix+":"+tagMatch[3]+tagMatch[4]+">":"")}return xmlMatch.length&&-1===xml.indexOf(prefixAtt)&&(xml=xml.replace("({qtiClass:"responseCondition",responseIf:{qtiClass:"responseIf",expression:{qtiClass:"match",expressions:[{qtiClass:"variable",attributes:{identifier:responseIdentifier}},{qtiClass:"correct",attributes:{identifier:responseIdentifier}}]},responseRules:[{qtiClass:"setOutcomeValue",attributes:{identifier:outcomeIdentifier},expression:{qtiClass:"sum",expressions:[{qtiClass:"variable",attributes:{identifier:outcomeIdentifier}},{qtiClass:"baseValue",attributes:{baseType:"integer"},value:"1"}]}}]}}),MAP_RESPONSE:(responseIdentifier,outcomeIdentifier)=>({qtiClass:"responseCondition",responseIf:{qtiClass:"responseIf",expression:{qtiClass:"not",expressions:[{qtiClass:"isNull",expressions:[{qtiClass:"variable",attributes:{identifier:responseIdentifier}}]}]},responseRules:[{qtiClass:"setOutcomeValue",attributes:{identifier:outcomeIdentifier},expression:{qtiClass:"sum",expressions:[{qtiClass:"variable",attributes:{identifier:outcomeIdentifier}},{qtiClass:"mapResponse",attributes:{identifier:responseIdentifier}}]}}]}}),MAP_RESPONSE_POINT:(responseIdentifier,outcomeIdentifier)=>({qtiClass:"responseCondition",responseIf:{qtiClass:"responseIf",expression:{qtiClass:"not",expressions:[{qtiClass:"isNull",expressions:[{qtiClass:"variable",attributes:{identifier:responseIdentifier}}]}]},responseRules:[{qtiClass:"setOutcomeValue",attributes:{identifier:outcomeIdentifier},expression:{qtiClass:"sum",expressions:[{qtiClass:"variable",attributes:{identifier:outcomeIdentifier}},{qtiClass:"mapResponsePoint",attributes:{identifier:responseIdentifier}}]}}]}})};return responseRules}),define("taoQtiItem/qtiItem/helper/response",["lodash","taoQtiItem/qtiItem/helper/responseRules"],function(_,responseRulesHelper){"use strict";_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,responseRulesHelper=responseRulesHelper&&Object.prototype.hasOwnProperty.call(responseRulesHelper,"default")?responseRulesHelper["default"]:responseRulesHelper;const _templateNames={MATCH_CORRECT:"http://www.imsglobal.org/question/qti_v2p1/rptemplates/match_correct",MAP_RESPONSE:"http://www.imsglobal.org/question/qti_v2p1/rptemplates/map_response",MAP_RESPONSE_POINT:"http://www.imsglobal.org/question/qti_v2p1/rptemplates/map_response_point",NONE:"no_response_processing"};var response={isUsingTemplate(response,tpl){return!!(_.isString(tpl)&&(tpl===response.template||_templateNames[tpl]===response.template))},isValidTemplateName(tplName){return!!this.getTemplateUriFromName(tplName)},getTemplateUriFromName(tplName){return _templateNames[tplName]||""},getTemplateNameFromUri(tplUri){let tplName="";return _.forIn(_templateNames,(uri,name)=>{if(uri===tplUri)return tplName=name,!1}),tplName},getTemplateNameFromResponseRules(responseIdentifier,responseRules){if(!responseRules)return"NONE";const{responseIf:{responseRules:[outcomeRules={}]=[]}={}}=responseRules,{attributes:{identifier:outcomeIdentifier}={}}=outcomeRules;return outcomeIdentifier?Object.keys(responseRulesHelper).find(key=>_.isEqual(responseRules,responseRulesHelper[key](responseIdentifier,outcomeIdentifier))):""}};return response}),define("taoQtiItem/qtiItem/helper/itemScore",[],function(){"use strict";var itemScore=responseIdentifiers=>{const outcomeExpressions=responseIdentifiers.map(outcomeIdentifier=>({qtiClass:"variable",attributes:{identifier:`SCORE_${outcomeIdentifier}`}}));return{qtiClass:"setOutcomeValue",attributes:{identifier:"SCORE"},expression:{qtiClass:"sum",expressions:outcomeExpressions}}};return itemScore}),define("taoQtiItem/qtiItem/core/Loader",["lodash","class","taoQtiItem/qtiItem/core/qtiClasses","taoQtiItem/qtiItem/core/Element","taoQtiItem/qtiItem/helper/xmlNsHandler","core/moduleLoader","taoQtiItem/qtiItem/helper/response","taoQtiItem/qtiItem/helper/itemScore"],function(_,_class,qtiClasses,Element,xmlNsHandler,moduleLoader,responseHelper,itemScoreHelper){"use strict";_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,qtiClasses=qtiClasses&&Object.prototype.hasOwnProperty.call(qtiClasses,"default")?qtiClasses["default"]:qtiClasses,Element=Element&&Object.prototype.hasOwnProperty.call(Element,"default")?Element["default"]:Element,xmlNsHandler=xmlNsHandler&&Object.prototype.hasOwnProperty.call(xmlNsHandler,"default")?xmlNsHandler["default"]:xmlNsHandler,moduleLoader=moduleLoader&&Object.prototype.hasOwnProperty.call(moduleLoader,"default")?moduleLoader["default"]:moduleLoader,responseHelper=responseHelper&&Object.prototype.hasOwnProperty.call(responseHelper,"default")?responseHelper["default"]:responseHelper,itemScoreHelper=itemScoreHelper&&Object.prototype.hasOwnProperty.call(itemScoreHelper,"default")?itemScoreHelper["default"]:itemScoreHelper;const loadPortableCustomElementProperties=(portableElement,rawProperties)=>{var properties={};_.forOwn(rawProperties,(value,key)=>{try{properties[key]=JSON.parse(value)}catch(e){properties[key]=value}}),portableElement.properties=properties},loadPortableCustomElementData=(portableElement,data)=>{portableElement.typeIdentifier=data.typeIdentifier,portableElement.markup=data.markup,portableElement.entryPoint=data.entryPoint,portableElement.libraries=data.libraries,portableElement.setNamespace("",data.xmlns),loadPortableCustomElementProperties(portableElement,data.properties)};var Loader=Class.extend({init(item,classesLocation){this.qti={},this.classesLocation={},this.item=item||null,this.setClassesLocation(classesLocation||qtiClasses)},setClassesLocation(qtiClassesList){return _.extend(this.classesLocation,qtiClassesList),this},getRequiredClasses(data){let ret=[];for(let i in data)"qtiClass"==i&&"_container"!==data[i]&&"rootElement"!==i?ret.push(data[i]):"object"==typeof data[i]&&"responseRules"!==i&&(ret=_.union(ret,this.getRequiredClasses(data[i])));return ret},loadRequiredClasses(data,callback,reload){let requiredClass;const requiredClasses=this.getRequiredClasses(data,reload),required=[];for(let i in requiredClasses)if(requiredClass=requiredClasses[i],this.classesLocation[requiredClass])required.push({module:this.classesLocation[requiredClass],category:"qti"});else throw new Error(`missing qti class location declaration : ${requiredClass}`);moduleLoader([],()=>!0).addList(required).load().then(loadeded=>{loadeded.forEach(QtiClass=>{this.qti[QtiClass.prototype.qtiClass]=QtiClass}),callback.call(this,this.qti)})},getLoadedClasses(){return _.keys(this.qti)},loadItemData(data,callback){this.loadRequiredClasses(data,Qti=>{if("object"==typeof data&&"assessmentItem"===data.qtiClass){for(let i in data.serial&&Element.unsetElement(data.serial),this.item=new Qti.assessmentItem(data.serial,data.attributes||{}),this.loadContainer(this.item.getBody(),data.body),data.outcomes){const outcome=this.buildOutcome(data.outcomes[i]);outcome&&this.item.addOutcomeDeclaration(outcome)}for(let i in data.feedbacks){const feedback=this.buildElement(data.feedbacks[i]);feedback&&this.item.addModalFeedback(feedback)}for(let i in data.stylesheets){const stylesheet=this.buildElement(data.stylesheets[i]);stylesheet&&this.item.addStylesheet(stylesheet)}let responseRules=data.responseProcessing&&data.responseProcessing.responseRules?[...data.responseProcessing.responseRules]:[];for(let i in data.responses){const responseIdentifier=data.responses[i].identifier,responseRuleItemIndex=responseRules.findIndex(_ref=>{let{responseIf:{expression:{expressions:[expression={}]=[]}={}}={}}=_ref;return expression.attributes&&expression.attributes.identifier===responseIdentifier||expression.expressions&&expression.expressions[0]&&expression.expressions[0].attributes&&expression.expressions[0].attributes.identifier===responseIdentifier}),[responseRule]=-1===responseRuleItemIndex?[]:responseRules.splice(responseRuleItemIndex,1),response=this.buildResponse(data.responses[i],responseRule);if(response){this.item.addResponseDeclaration(response);const feedbackRules=data.responses[i].feedbackRules;feedbackRules&&_.forIn(feedbackRules,(fbData,serial)=>{const{attributes:{identifier:feedbackOutcomeIdentifier}={}}=data.outcomes[fbData.feedbackOutcome]||{};response.feedbackRules[serial]=this.buildSimpleFeedbackRule(fbData,response);const feedbackResponseRuleIndex=responseRules.findIndex(_ref2=>{let{responseIf:{responseRules:[setOutcomeResponseRule={}]=[]}={}}=_ref2;const{attributes={},qtiClass}=setOutcomeResponseRule,outcomeIdentifier=attributes.identifier;return feedbackOutcomeIdentifier===outcomeIdentifier&&"setOutcomeValue"===qtiClass});-1!==feedbackResponseRuleIndex&&responseRules.splice(feedbackResponseRuleIndex,1)})}}const responseIdentifiers=Object.keys(this.item.responses||{}).map(responseKey=>this.item.responses[responseKey].attributes.identifier);if(data.responseProcessing){const customResponseProcessing=0!this.item.responses[responseKey].template);this.item.setResponseProcessing(this.buildResponseProcessing(data.responseProcessing,customResponseProcessing))}this.item.setNamespaces(data.namespaces),this.item.setSchemaLocations(data.schemaLocations),this.item.setApipAccessibility(data.apipAccessibility)}"function"==typeof callback&&callback.call(this,this.item)})},loadAndBuildElement(data,callback){this.loadRequiredClasses(data,()=>{const element=this.buildElement(data);"function"==typeof callback&&callback.call(this,element)})},loadElement(element,data,callback){this.loadRequiredClasses(data,()=>{this.loadElementData(element,data),"function"==typeof callback&&callback.call(this,element)})},loadElements(data,callback){if(!this.item)throw new Error("QtiLoader : cannot load elements in empty item");this.loadRequiredClasses(data,()=>{const allElements=this.item.getComposingElements();for(let i in data){const elementData=data[i];elementData&&elementData.qtiClass&&elementData.serial&&allElements[elementData.serial]&&this.loadElementData(allElements[elementData.serial],elementData)}"function"==typeof callback&&callback.call(this,this.item)})},buildResponse(data,responseRule){const response=this.buildElement(data);return response.template=responseHelper.getTemplateUriFromName(responseHelper.getTemplateNameFromResponseRules(data.identifier,responseRule))||data.howMatch||null,response.defaultValue=data.defaultValue||null,response.correctResponse=data.correctResponses||null,response.mapEntries=_.size(data.mapping)?data.mapping:_.size(data.areaMapping)?data.areaMapping:{},response.mappingAttributes=data.mappingAttributes||{},response},buildSimpleFeedbackRule(data,response){const feedbackRule=this.buildElement(data);feedbackRule.setCondition(response,data.condition,data.comparedValue||null),feedbackRule.feedbackOutcome=this.item.outcomes[data.feedbackOutcome]||null,feedbackRule.feedbackThen=this.item.modalFeedbacks[data.feedbackThen]||null,feedbackRule.feedbackElse=this.item.modalFeedbacks[data.feedbackElse]||null;const comparedOutcome=feedbackRule.comparedOutcome;return feedbackRule.feedbackThen&&feedbackRule.feedbackThen.data("relatedResponse",comparedOutcome),feedbackRule.feedbackElse&&feedbackRule.feedbackElse.data("relatedResponse",comparedOutcome),feedbackRule},buildOutcome(data){const outcome=this.buildElement(data);return outcome.defaultValue=data.defaultValue||null,outcome},buildResponseProcessing(data,customResponseProcessing){const rp=this.buildElement(data);return customResponseProcessing?(rp.xml=data.data,rp.processingType="custom"):rp.processingType="templateDriven",rp},loadContainer(bodyObject,bodyData){if(!Element.isA(bodyObject,"_container"))throw new Error("bodyObject must be a QTI Container");if(!(bodyData&&"string"==typeof bodyData.body&&"object"==typeof bodyData.elements))throw new Error("wrong bodydata format");const attributes=_.defaults(bodyData.attributes||{},bodyObject.attributes||{});for(let serial in bodyObject.setAttributes(attributes),bodyData.elements){const eltData=bodyData.elements[serial],element=this.buildElement(eltData);element&&bodyObject.setElement(element,bodyData.body)}bodyObject.body(xmlNsHandler.stripNs(bodyData.body))},buildElement(elementData){if(!(elementData&&elementData.qtiClass&&elementData.serial))throw new Error("wrong elementData format");const className=elementData.qtiClass;if(!this.qti[className])throw new Error(`the qti element class does not exist: ${className}`);const elt=new this.qti[className](elementData.serial);return this.loadElementData(elt,elementData),elt},loadElementData(element,data){const attributes=_.defaults(data.attributes||{},element.attributes||{});element.setAttributes(attributes);let body=data.body;return!body&&data.text&&"inlineChoice"===data.qtiClass&&(body={body:data.text,elements:{}}),element.body&&body&&element.bdy&&this.loadContainer(element.getBody(),body),element.object&&data.object&&element.object&&this.loadObjectData(element.object,data.object),Element.isA(element,"interaction")?this.loadInteractionData(element,data):Element.isA(element,"choice")?this.loadChoiceData(element,data):Element.isA(element,"math")?this.loadMathData(element,data):Element.isA(element,"infoControl")?this.loadPicData(element,data):Element.isA(element,"_tooltip")&&this.loadTooltipData(element,data),element},loadInteractionData(interaction,data){Element.isA(interaction,"blockInteraction")&&data.prompt&&this.loadContainer(interaction.prompt.getBody(),data.prompt),this.buildInteractionChoices(interaction,data),Element.isA(interaction,"customInteraction")&&this.loadPciData(interaction,data)},buildInteractionChoices(interaction,data){if(data.choices){if(Element.isA(interaction,"matchInteraction"))for(let set=0;2>set;set++){if(!data.choices[set])throw new Error(`missing match set #${set}`);const matchSet=data.choices[set];for(let serial in matchSet){const choice=this.buildElement(matchSet[serial]);choice&&interaction.addChoice(choice,set)}}else for(let serial in data.choices){const choice=this.buildElement(data.choices[serial]);choice&&interaction.addChoice(choice)}if(Element.isA(interaction,"graphicGapMatchInteraction")&&data.gapImgs)for(let serial in data.gapImgs){const gapImg=this.buildElement(data.gapImgs[serial]);gapImg&&interaction.addGapImg(gapImg)}}},loadChoiceData(choice,data){if(Element.isA(choice,"textVariableChoice"))choice.val(data.text);else if(Element.isA(choice,"gapImg"));else if(Element.isA(choice,"gapText"))choice.body()||choice.body(data.text);else if(Element.isA(choice,"containerChoice"));},loadObjectData(object,data){object.setAttributes(data.attributes),data._alt&&("object"===data._alt.qtiClass?object._alt=Loader.buildElement(data._alt):object._alt=data._alt)},loadMathData(math,data){math.ns=data.ns||{},math.setMathML(data.mathML||""),_.forIn(data.annotations||{},(value,encoding)=>{math.setAnnotation(encoding,value)})},loadTooltipData(tooltip,data){tooltip.content(data.content)},loadPciData(pci,data){loadPortableCustomElementData(pci,data)},loadPicData(pic,data){loadPortableCustomElementData(pic,data)}});return Loader}),define("taoQtiItem/qtiCreator/model/helper/event",["jquery","lodash"],function($,_){"use strict";var namespace=".qti-creator",namespaceModel=".qti-creator",eventList=["containerBodyChange","containerElementAdded","elementCreated.qti-widget","attributeChange.qti-widget","choiceCreated.qti-widget","correctResponseChange.qti-widget","mapEntryChange.qti-widget","mapEntryRemove.qti-widget","deleted.qti-widget","choiceTextChange.qti-widget","responseTemplateChange.qti-widget","mappingAttributeChange.qti-widget","feedbackRuleConditionChange.qti-widget","feedbackRuleCreated.qti-widget","feedbackRuleRemoved.qti-widget","feedbackRuleElseCreated.qti-widget","feedbackRuleElseRemoved.qti-widget"],event={choiceCreated:function choiceCreated(choice,interaction){$(document).trigger("choiceCreated.qti-widget",{choice:choice,interaction:interaction})},choiceDeleted:function choiceDeleted(choice,interaction){$(document).trigger("choiceDeleted.qti-widget",{choice:choice,interaction:interaction})},deleted:function(element,parent){element.isset()&&element.unset(),$(document).off("."+element.getSerial()),$(document).trigger("deleted.qti-widget",{element:element,parent:parent})},getList:function(addedNamespace){var events=_.clone(eventList);return addedNamespace?_.map(events,function(e){return e+"."+addedNamespace}):events},initElementToWidgetListeners:function(){var ns=".widget-container";$(document).off(".widget-container").on(event.getList(".widget-container").join(" "),function(e,data){var element=data.element||data.container||null,widget=data&&element&&element.data("widget");!widget&&data.parent&&(element=data.parent,widget=element.data("widget")),widget&&widget.$container.trigger(e.type+".qti-creator"+namespaceModel,data)})},getNs:function(){return".qti-creator"},getNsModel:function(){return namespaceModel}};return event}),define("taoQtiItem/qtiCreator/model/helper/invalidator",["lodash"],function(_){"use strict";const invalidator={completelyValid:function(element){const item=element.getRootElement();if(item){const serial=element.getSerial(),invalidElements=item.data("invalid")||{};delete invalidElements[serial],item.data("invalid",invalidElements)}},valid:function(element,key){const item=element.getRootElement(),serial=element.getSerial();if(item){const invalidElements=item.data("invalid")||{};if(key)invalidElements[serial]&&invalidElements[serial][key]&&(delete invalidElements[serial][key],!_.size(invalidElements[serial])&&delete invalidElements[serial],item.data("invalid",invalidElements));else throw new Error("missing required argument \"key\"")}},invalid:function(element,key,message,stateName){const item=element.getRootElement(),serial=element.getSerial();if(item){const invalidElements=item.data("invalid")||{};if(key)invalidElements[serial]||(invalidElements[serial]={}),invalidElements[serial][key]={message:message||"",stateName:stateName||"active"},item.data("invalid",invalidElements);else throw new Error("missing required arguments \"key\"")}},isValid:function(element,key){const item=element.getRootElement(),serial=element.getSerial();if(item){const invalidElements=item.data("invalid")||{};return key?!(invalidElements[serial]&&invalidElements[serial][key]):!invalidElements[serial]}return!0}};return invalidator}),define("taoQtiItem/qtiCreator/model/mixin/editable",["lodash","jquery","core/encoder/entity","taoQtiItem/qtiItem/core/Element","taoQtiItem/qtiCreator/model/helper/event","taoQtiItem/qtiCreator/model/helper/invalidator"],function(_,$,entity,Element,event,invalidator){"use strict";const _removeSelf=function(element){let removed=!1;const related=element.getRootElement();if(related){const found=related.find(element.getSerial());if(found){const parent=found.parent;if(element.getResponseDeclaration){const response=element.getResponseDeclaration();response&&(invalidator.completelyValid(response),Element.unsetElement(response))}Element.isA(parent,"interaction")?("gapImg"===element.qtiClass?parent.removeGapImg(element):Element.isA(element,"choice")&&parent.removeChoice(element),removed=!0):"body"===found.location&&_.isFunction(parent.initContainer)?(_.isFunction(element.beforeRemove)&&element.beforeRemove(),parent.getBody().removeElement(element),removed=!0):Element.isA(parent,"_container")&&(_.isFunction(element.beforeRemove)&&element.beforeRemove(),parent.removeElement(element),removed=!0),removed&&(element.data("removed",!0),invalidator.completelyValid(element),event.deleted(element,parent))}}else throw new Error("no related item found");return removed},_removeElement=function(element,containerPropName,eltToBeRemoved){let targetSerial="",targetElt;return element[containerPropName]&&("string"==typeof eltToBeRemoved?(targetSerial=eltToBeRemoved,targetElt=Element.getElementBySerial(targetSerial)):eltToBeRemoved instanceof Element&&(targetSerial=eltToBeRemoved.getSerial(),targetElt=eltToBeRemoved),targetSerial&&(invalidator.completelyValid(targetElt),delete element[containerPropName][targetSerial],Element.unsetElement(targetSerial))),element},methods={init:function(serial,attributes){const attr={};"object"==typeof serial&&(attributes=serial,serial=""),_.isFunction(this.getDefaultAttributes)&&_.extend(attr,this.getDefaultAttributes()),_.extend(attr,attributes),this._super(serial,attr)},attr:function(key,value){const ret=this._super(key,value);return"undefined"!=typeof key&&"undefined"!=typeof value&&$(document).trigger("attributeChange.qti-widget",{element:this,key:key,value:entity.encode(value)}),_.isString(ret)?entity.decode(ret):ret},removeAttr:function(key){const ret=this._super(key);return $(document).trigger("attributeChange.qti-widget",{element:this,key:key,value:null}),ret},remove:function(){if(0===arguments.length)return _removeSelf(this);if(2===arguments.length)return _removeElement(this,arguments[0],arguments[1]);throw new Error("invalid number of argument given")}};return methods}),define("taoQtiItem/qtiCreator/model/qtiClasses",["lodash","taoQtiItem/qtiItem/core/qtiClasses"],function(_,qtiClasses){"use strict";return _.defaults({assessmentItem:"taoQtiItem/qtiCreator/model/Item",_container:"taoQtiItem/qtiCreator/model/Container",figure:"taoQtiItem/qtiCreator/model/Figure",img:"taoQtiItem/qtiCreator/model/Img",figcaption:"taoQtiItem/qtiCreator/model/Figcaption",math:"taoQtiItem/qtiCreator/model/Math",object:"taoQtiItem/qtiCreator/model/Object",table:"taoQtiItem/qtiCreator/model/Table",rubricBlock:"taoQtiItem/qtiCreator/model/RubricBlock",modalFeedback:"taoQtiItem/qtiCreator/model/feedbacks/ModalFeedback",choiceInteraction:"taoQtiItem/qtiCreator/model/interactions/ChoiceInteraction",orderInteraction:"taoQtiItem/qtiCreator/model/interactions/OrderInteraction",associateInteraction:"taoQtiItem/qtiCreator/model/interactions/AssociateInteraction",matchInteraction:"taoQtiItem/qtiCreator/model/interactions/MatchInteraction",inlineChoiceInteraction:"taoQtiItem/qtiCreator/model/interactions/InlineChoiceInteraction",simpleChoice:"taoQtiItem/qtiCreator/model/choices/SimpleChoice",simpleAssociableChoice:"taoQtiItem/qtiCreator/model/choices/SimpleAssociableChoice",inlineChoice:"taoQtiItem/qtiCreator/model/choices/InlineChoice",mediaInteraction:"taoQtiItem/qtiCreator/model/interactions/MediaInteraction",uploadInteraction:"taoQtiItem/qtiCreator/model/interactions/UploadInteraction",textEntryInteraction:"taoQtiItem/qtiCreator/model/interactions/TextEntryInteraction",sliderInteraction:"taoQtiItem/qtiCreator/model/interactions/SliderInteraction",extendedTextInteraction:"taoQtiItem/qtiCreator/model/interactions/ExtendedTextInteraction",hotspotInteraction:"taoQtiItem/qtiCreator/model/interactions/HotspotInteraction",selectPointInteraction:"taoQtiItem/qtiCreator/model/interactions/SelectPointInteraction",graphicInteraction:"taoQtiItem/qtiCreator/model/interactions/GraphicOrderInteraction",graphicAssociateInteraction:"taoQtiItem/qtiCreator/model/interactions/GraphicAssociateInteraction",graphicGapMatchInteraction:"taoQtiItem/qtiCreator/model/interactions/GraphicGapMatchInteraction",graphicOrderInteraction:"taoQtiItem/qtiCreator/model/interactions/GraphicOrderInteraction",hotspotChoice:"taoQtiItem/qtiCreator/model/choices/HotspotChoice",gapImg:"taoQtiItem/qtiCreator/model/choices/GapImg",associableHotspot:"taoQtiItem/qtiCreator/model/choices/AssociableHotspot",gapMatchInteraction:"taoQtiItem/qtiCreator/model/interactions/GapMatchInteraction",hottextInteraction:"taoQtiItem/qtiCreator/model/interactions/HottextInteraction",hottext:"taoQtiItem/qtiCreator/model/choices/Hottext",gapText:"taoQtiItem/qtiCreator/model/choices/GapText",gap:"taoQtiItem/qtiCreator/model/choices/Gap",responseDeclaration:"taoQtiItem/qtiCreator/model/variables/ResponseDeclaration",responseProcessing:"taoQtiItem/qtiCreator/model/ResponseProcessing",customInteraction:"taoQtiItem/qtiCreator/model/interactions/PortableCustomInteraction",endAttemptInteraction:"taoQtiItem/qtiCreator/model/interactions/EndAttemptInteraction",infoControl:"taoQtiItem/qtiCreator/model/PortableInfoControl",include:"taoQtiItem/qtiCreator/model/Include",printedVariable:"taoQtiItem/qtiCreator/model/PrintedVariable",_tooltip:"taoQtiItem/qtiCreator/model/Tooltip"},qtiClasses)}),define("taoQtiItem/qtiCreator/model/helper/container",["jquery","lodash","taoQtiItem/qtiCreator/model/qtiClasses"],function($,_,qtiClasses){"use strict";var methods={createElements:function(container,body,callback){var regex=/{{([a-z_]+)\.?([a-z_]*):new}}/ig,required={};body.replace(regex,function(original,qtiClass){if(qtiClasses[qtiClass])required[qtiClass]=qtiClasses[qtiClass];else throw new Error("missing required class : "+qtiClass)}),require(_.values(required),function(){var Qti=_.reduce([].slice.call(arguments),function(acc,qtiClassElt){return acc[qtiClassElt.prototype.qtiClass]=qtiClassElt,acc},{}),promises=[],$doc=$(document),newElts={},newBody=body.replace(regex,function(original,qtiClass,subClass){var elt=new Qti[qtiClass];return Qti[qtiClass]?(container.getRenderer()&&elt.setRenderer(container.getRenderer()),newElts[elt.getSerial()]=elt,subClass&&(elt.typeIdentifier=subClass),elt.placeholder()):original});container.setElements(newElts,newBody),_.each(newElts,function(elt){_.isFunction(elt.buildIdentifier)&&elt.buildIdentifier(),_.isFunction(elt.afterCreate)&&promises.push(elt.afterCreate())}),"function"==typeof callback&&Promise.all(promises).then(function(){_.each(newElts,function(elt){$doc.trigger("elementCreated.qti-widget",{parent:container.parent(),element:elt})}),callback.call(container,newElts)}).catch(function(err){container.getRenderer().getCreatorContext().trigger("error",err)})})}};return methods}),define("taoQtiItem/qtiCreator/model/mixin/editableContainer",["taoQtiItem/qtiCreator/model/helper/container"],function(containerHelper){"use strict";var methods={createElements:function(body,callback){var _this=this;containerHelper.createElements(_this.getBody(),body,function(newElts){callback.call(_this,newElts)})}};return methods}),define("taoQtiItem/qtiItem/core/IdentifiedElement",["taoQtiItem/qtiItem/core/Element","taoQtiItem/qtiItem/helper/util"],function(Element,util){"use strict";Element=Element&&Object.prototype.hasOwnProperty.call(Element,"default")?Element["default"]:Element,util=util&&Object.prototype.hasOwnProperty.call(util,"default")?util["default"]:util;var IdentifiedElement=Element.extend({buildIdentifier:function buildIdentifier(prefix,useSuffix){var item=this.getRootElement(),id=util.buildIdentifier(item,prefix||this.qtiClass,useSuffix);return id&&this.attr("identifier",id),this},id:function id(value){return value||this.attr("identifier")||this.buildIdentifier(this.qtiClass,!0),this.attr("identifier",value)}});return IdentifiedElement}),define("taoQtiItem/qtiItem/mixin/Mixin",[],function(){"use strict";var Mixin={augment:function(targetClass,methods,options){if("function"==typeof targetClass&&"object"==typeof methods)for(var methodName in methods)if(!Object.hasOwnProperty(targetClass.prototype,methodName))targetClass.prototype[methodName]=methods[methodName];else if(options&&options.append){var _parent=targetClass.prototype[methodName];targetClass.prototype[methodName]=function(){return methods[methodName].apply(this,arguments),_parent.apply(this,arguments)}}}};return Mixin}),define("taoQtiItem/qtiItem/core/Container",["jquery","lodash","taoQtiItem/qtiItem/core/Element","taoQtiItem/qtiItem/helper/rendererConfig"],function($,_,Element,rendererConfig){"use strict";$=$&&Object.prototype.hasOwnProperty.call($,"default")?$["default"]:$,_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,Element=Element&&Object.prototype.hasOwnProperty.call(Element,"default")?Element["default"]:Element,rendererConfig=rendererConfig&&Object.prototype.hasOwnProperty.call(rendererConfig,"default")?rendererConfig["default"]:rendererConfig;var Container=Element.extend({qtiClass:"_container",init:function(body){if(this._super(),body&&"string"!=typeof body)throw"the body of a container must be a string";this.bdy=body||"",this.elements={}},body:function(body){if("undefined"==typeof body)return this.bdy;if("string"==typeof body)this.bdy=body,$(document).trigger("containerBodyChange",{body:body,container:this,parent:this.parent()});else throw"body must be a string"},setElements:function(elements,body){var returnValue=!1;for(var i in elements){var elt=elements[i];if(elt instanceof Element)body=body||this.bdy,-1===body.indexOf(elt.placeholder())&&(body+=elt.placeholder()),elt.setRootElement(this.getRootElement()||null),this.elements[elt.getSerial()]=elt,$(document).trigger("containerElementAdded",{element:elt,container:this}),returnValue=!0;else throw returnValue=!1,"expected a qti element"}return this.body(body),returnValue},setElement:function(element,body){return this.setElements([element],body)},removeElement:function(element){var serial="";return"string"==typeof element?serial=element:element instanceof Element&&(serial=element.getSerial()),delete this.elements[serial],this.body(this.body().replace("{{"+serial+"}}","")),this},getElements:function(qtiClass){var elts={};if("string"==typeof qtiClass)for(var serial in this.elements)Element.isA(this.elements[serial],qtiClass)&&(elts[serial]=this.elements[serial]);else elts=_.clone(this.elements);return elts},getElement:function(serial){return this.elements[serial]?this.elements[serial]:null},getComposingElements:function(){var elements=this.getElements(),elts={};for(var serial in elements)elts[serial]=elements[serial],elts=_.extend(elts,elements[serial].getComposingElements());return elts},render:function(){var args=rendererConfig.getOptionsFromArguments(arguments),renderer=args.renderer||this.getRenderer(),elementsData=[],tpl=this.body();for(var serial in this.elements){var elt=this.elements[serial];if("function"==typeof elt.render)"_container"===elt.qtiClass?tpl=tpl.replace(elt.placeholder(),elt.render(renderer)):(tpl=tpl.replace(elt.placeholder(),"{{{"+serial+"}}}"),elementsData[serial]=elt.render(renderer));else throw"render() is not defined for the qti element: "+serial}if(renderer.isRenderer)return this._super({body:renderer.renderDirect(tpl,elementsData),contentModel:this.contentModel||"flow"},renderer,args.placeholder);throw"invalid qti renderer for qti container"},postRender:function(data,altClassName,renderer){renderer=renderer||this.getRenderer();var res=_(this.elements).filter(function(elt){return"function"==typeof elt.postRender}).map(function(elt){return elt.postRender(data,"",renderer)}).flatten(!0).value().concat(this._super(data,altClassName,renderer));return res},toArray:function(){var arr={serial:this.serial,body:this.bdy,elements:{}};for(var serial in this.elements)arr.elements[serial]=this.elements[serial].toArray();return arr},find:function(serial,parent){var found=null;return this.elements[serial]?found={parent:parent||this,element:this.elements[serial],location:"body"}:_.each(this.elements,function(elt){if(found=elt.find(serial),found)return!1}),found},isEmpty:function(){return!this.bdy}});return Container}),define("taoQtiItem/qtiItem/mixin/Container",["taoQtiItem/qtiItem/mixin/Mixin","taoQtiItem/qtiItem/core/Container"],function(Mixin,Container$1){"use strict";Mixin=Mixin&&Object.prototype.hasOwnProperty.call(Mixin,"default")?Mixin["default"]:Mixin,Container$1=Container$1&&Object.prototype.hasOwnProperty.call(Container$1,"default")?Container$1["default"]:Container$1;var methods={initContainer:function(body){this.bdy=new Container$1(body||""),this.bdy.setRootElement(this.getRootElement()||null),this.bdy.contentModel="blockStatic"},getBody:function(){return this.bdy},body:function(body){var ret=this.bdy.body(body);return body?this:ret},setElement:function(element,body){return this.bdy.setElement(element,body),this},removeElement:function(element){return this.bdy.removeElement(element)},getElements:function(qtiClass){return this.bdy.getElements(qtiClass)},getElement:function(serial){return this.bdy.getElement(serial)}},Container={augment:function(targetClass){Mixin.augment(targetClass,methods)},methods:methods};return Container}),define("taoQtiItem/qtiItem/mixin/ContainerItemBody",["taoQtiItem/qtiItem/mixin/Mixin","taoQtiItem/qtiItem/mixin/Container","lodash"],function(Mixin,Container,_){"use strict";Mixin=Mixin&&Object.prototype.hasOwnProperty.call(Mixin,"default")?Mixin["default"]:Mixin,Container=Container&&Object.prototype.hasOwnProperty.call(Container,"default")?Container["default"]:Container,_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_;var methods={};_.extend(methods,Container.methods),_.extend(methods,{initContainer:function(body){Container.methods.initContainer.call(this,body),this.bdy.contentModel="itemBody"}});var ContainerItemBody={augment:function(targetClass){Mixin.augment(targetClass,methods)},methods:methods};return ContainerItemBody}),define("taoQtiItem/qtiItem/core/Item",["taoQtiItem/qtiItem/core/Element","taoQtiItem/qtiItem/core/IdentifiedElement","taoQtiItem/qtiItem/mixin/ContainerItemBody","lodash","jquery","taoQtiItem/qtiItem/helper/util"],function(Element,IdentifiedElement,Container,_,$,util){"use strict";Element=Element&&Object.prototype.hasOwnProperty.call(Element,"default")?Element["default"]:Element,IdentifiedElement=IdentifiedElement&&Object.prototype.hasOwnProperty.call(IdentifiedElement,"default")?IdentifiedElement["default"]:IdentifiedElement,Container=Container&&Object.prototype.hasOwnProperty.call(Container,"default")?Container["default"]:Container,_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,$=$&&Object.prototype.hasOwnProperty.call($,"default")?$["default"]:$,util=util&&Object.prototype.hasOwnProperty.call(util,"default")?util["default"]:util;var Item=IdentifiedElement.extend({qtiClass:"assessmentItem",init:function init(serial,attributes){this._super(serial,attributes),this.rootElement=this,this.stylesheets={},this.responses={},this.outcomes={},this.modalFeedbacks={},this.namespaces={},this.schemaLocations={},this.responseProcessing=null,this.apipAccessibility=null},getInteractions:function getInteractions(){var interactions=[],elts=this.getComposingElements();for(var serial in elts)Element.isA(elts[serial],"interaction")&&interactions.push(elts[serial]);return interactions},addResponseDeclaration:function addResponseDeclaration(response){if(Element.isA(response,"responseDeclaration"))response.setRootElement(this),this.responses[response.getSerial()]=response;else throw"is not a qti response declaration";return this},getResponseDeclaration:function getResponseDeclaration(identifier){for(var i in this.responses)if(this.responses[i].attr("identifier")===identifier)return this.responses[i];return null},addOutcomeDeclaration:function addOutcomeDeclaration(outcome){if(Element.isA(outcome,"outcomeDeclaration"))outcome.setRootElement(this),this.outcomes[outcome.getSerial()]=outcome;else throw"is not a qti outcome declaration";return this},getOutcomeDeclaration:function getOutcomeDeclaration(identifier){var found;return _.forEach(this.outcomes,function(outcome){if(outcome.id()===identifier)return found=outcome,!1}),found},getOutcomes:function getOutcomes(){return _.clone(this.outcomes)},removeOutcome:function removeOutcome(identifier){var outcome=this.getOutcomeDeclaration(identifier);outcome&&(this.outcomes=_.omit(this.outcomes,outcome.getSerial()))},addModalFeedback:function addModalFeedback(feedback){if(Element.isA(feedback,"modalFeedback"))feedback.setRootElement(this),this.modalFeedbacks[feedback.getSerial()]=feedback;else throw"is not a qti modal feedback";return this},getComposingElements:function getComposingElements(){var elts=this._super(),_this=this;return _.forEach(["responses","outcomes","modalFeedbacks","stylesheets"],function(elementCollection){for(var i in _this[elementCollection]){var elt=_this[elementCollection][i];elts[i]=elt,elts=_.extend(elts,elt.getComposingElements())}}),this.responseProcessing instanceof Element&&(elts[this.responseProcessing.getSerial()]=this.responseProcessing),elts},find:function find(serial){var found=this._super(serial);return found||(found=util.findInCollection(this,["responses","outcomes","modalFeedbacks","stylesheets"],serial)),found},getResponses:function getResponses(){return _.clone(this.responses)},getRootElement:function getRootElement(){return this},addNamespace:function addNamespace(name,uri){this.namespaces[name]=uri},setNamespaces:function setNamespaces(namespaces){this.namespaces=namespaces},getNamespaces:function getNamespaces(){return _.clone(this.namespaces)},setSchemaLocations:function setSchemaLocations(locations){this.schemaLocations=locations},getSchemaLocations:function getSchemaLocations(){return _.clone(this.schemaLocations)},setApipAccessibility:function setApipAccessibility(apip){this.apipAccessibility=apip||null},getApipAccessibility:function getApipAccessibility(){return this.apipAccessibility},addStylesheet:function addStylesheet(stylesheet){if(Element.isA(stylesheet,"stylesheet"))stylesheet.setRootElement(this),this.stylesheets[stylesheet.getSerial()]=stylesheet;else throw"is not a qti stylesheet declaration";return this},removeStyleSheet:function removeStyleSheet(stylesheet){return delete this.stylesheets[stylesheet.getSerial()],this},stylesheetExists:function stylesheetExists(href){var exists=!1;return _.forEach(this.stylesheets,function(stylesheet){if(stylesheet.attr("href")===href)return exists=!0,!1}),exists},setResponseProcessing:function setResponseProcessing(rp){if(Element.isA(rp,"responseProcessing"))rp.setRootElement(this),this.responseProcessing=rp;else throw"is not a response processing";return this},toArray:function toArray(){var arr=this._super(),toArray=function(elt){return elt.toArray()};return arr.namespaces=this.namespaces,arr.schemaLocations=this.schemaLocations,arr.outcomes=_.map(this.outcomes,toArray),arr.responses=_.map(this.responses,toArray),arr.stylesheets=_.map(this.stylesheets,toArray),arr.modalFeedbacks=_.map(this.modalFeedbacks,toArray),arr.responseProcessing=this.responseProcessing.toArray(),arr},isEmpty:function isEmpty(){var body=this.body().trim();if(body){var $dummy=$("
    ").html(body),$children=$dummy.children();return!!(1===$children.length&&$children.hasClass("empty"))}return!0},clear:function clear(){var renderer=this.getRenderer();renderer&&_.isFunction(renderer.destroy)&&renderer.destroy(this)}});return Container.augment(Item),Item}),define("taoQtiItem/qtiItem/core/Stylesheet",["taoQtiItem/qtiItem/core/Element","lodash","taoQtiItem/qtiItem/helper/rendererConfig"],function(Element,_,rendererConfig){"use strict";Element=Element&&Object.prototype.hasOwnProperty.call(Element,"default")?Element["default"]:Element,_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,rendererConfig=rendererConfig&&Object.prototype.hasOwnProperty.call(rendererConfig,"default")?rendererConfig["default"]:rendererConfig;var Stylesheet=Element.extend({qtiClass:"stylesheet",render:function(){var args=rendererConfig.getOptionsFromArguments(arguments),renderer=args.renderer||this.getRenderer(),defaultData={};return defaultData.attributes={href:renderer.resolveUrl(this.attr("href"))},this._super(_.merge(defaultData,args.data),args.placeholder,args.subclass,renderer)}});return Stylesheet}),define("taoQtiItem/qtiCreator/model/Stylesheet",["lodash","taoQtiItem/qtiCreator/model/mixin/editable","taoQtiItem/qtiItem/core/Stylesheet"],function(_,editable,Stylesheet){"use strict";var methods={};return _.extend(methods,editable),_.extend(methods,{getDefaultAttributes:function(){return{href:"css/tao-user-styles.css",title:"",type:"text/css",media:"all"}}}),Stylesheet.extend(methods)}),define("taoQtiItem/qtiItem/core/ResponseProcessing",["taoQtiItem/qtiItem/core/Element"],function(Element){"use strict";Element=Element&&Object.prototype.hasOwnProperty.call(Element,"default")?Element["default"]:Element;var ResponseProcessing=Element.extend({qtiClass:"responseProcessing",processingType:"",xml:"",toArray:function(){var arr=this._super();return arr.processingType=this.processingType,arr.xml=this.xml,arr}});return ResponseProcessing}),define("taoQtiItem/qtiItem/helper/interactionHelper",["lodash","taoQtiItem/qtiItem/core/Element"],function(_,Element){"use strict";var _Mathfloor=Math.floor;_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,Element=Element&&Object.prototype.hasOwnProperty.call(Element,"default")?Element["default"]:Element;var interactionHelper={convertChoices:function(choices,outputType){var ret=[],_this=this;return _.each(choices,function(c){Element.isA(c,"choice")?"serial"===outputType?ret.push(c.getSerial()):"identifier"===outputType?ret.push(c.id()):ret.push(c):_.isArray(c)&&ret.push(_this.convertChoices(c,outputType))}),ret},findChoices:function(interaction,choices,inputType){var ret=[],_this=this;return _.each(choices,function(c){var choice;_.isString(c)?"serial"===inputType?(choice=interaction.getChoice(c),choice&&ret.push(choice)):"identifier"===inputType?(choice=interaction.getChoiceByIdentifier(c),choice&&ret.push(choice)):ret.push(c):_.isArray(c)?ret.push(_this.findChoices(interaction,c,inputType)):ret.push(c)}),ret},shuffleChoices:function(choices){var r=[],f={},j=0;for(var i in choices)if(Element.isA(choices[i],"choice")){var choice=choices[i];choice.attr("fixed")&&(f[j]=choice),r.push(choice),j++}else throw"invalid element in array: is not a qti choice";for(var n=0;n!0).addList(required.map(module=>({module,category:"qti"}))).load().then(loaded=>{loaded.forEach(clazz=>{_isValidRenderer(clazz)&&(_renderers[clazz.qtiClass]=clazz)}),"function"==typeof callback&&callback.call(self,_renderers)}),this},this.unload=function unload(){return this.themeLoader&&themeLoader(options.themes).unload(),this},this.setShuffledChoices=function(interaction,choices,identificationType){Element.isA(interaction,"interaction")&&(this.shuffledChoices[interaction.getSerial()]=_.pluck(interactionHelper.findChoices(interaction,choices,identificationType),"serial"))},this.getShuffledChoices=function(interaction,reshuffle,returnedType){let choices=[],serial,i;if(Element.isA(interaction,"interaction")){if(serial=interaction.getSerial(),this.shuffledChoices[serial]&&!reshuffle)Element.isA(interaction,"matchInteraction")?_.forEach(choices,function(choice,index){2>index&&_.forEach(this.shuffledChoices[serial][i],function(choiceSerial){choice.push(interaction.getChoice(choiceSerial))})}):_.forEach(this.shuffledChoices[serial],function(choiceSerial){choices.push(interaction.getChoice(choiceSerial))});else if(Element.isA(interaction,"matchInteraction"))for(this.shuffledChoices[serial]=[],i=0;2>i;i++)choices[i]=interactionHelper.shuffleChoices(interaction.getChoices(i)),this.shuffledChoices[serial][i]=_.pluck(choices[i],"serial");else choices=interactionHelper.shuffleChoices(interaction.getChoices()),this.shuffledChoices[serial]=_.pluck(choices,"serial");return"serial"===returnedType||"identifier"===returnedType?interactionHelper.convertChoices(choices,returnedType):_.clone(choices)}return[]},this.getRenderers=function(){return _renderers},this.getLocations=function(){return _locations},this.resolveUrl=function resolveUrl(url){return options.assetManager?"string"==typeof url&&0maxChoice||responseDeclaration.correctResponse.lengthscore&&0>=requiredChoiceCount&&(score=0),requiredChoiceCount--,gamp.add(acc,score)},0),responseDeclaration.mappingAttributes.upperBound&&(max=_Mathmin(max,parseFloat(responseDeclaration.mappingAttributes.upperBound||0)))}else"MAP_RESPONSE_POINT"===template&&(max=0);return max},orderInteractionBased:function orderInteractionBased(interaction){var minChoice=0,maxChoice=parseInt(interaction.attr("maxChoices")||0,10),responseDeclaration=interaction.getResponseDeclaration(),template=responseHelper.getTemplateNameFromUri(responseDeclaration.template),max;return maxChoice&&0&&0>maxChoice?0:("MATCH_CORRECT"===template?_.isArray(responseDeclaration.correctResponse)&&maxChoice&&responseDeclaration.correctResponse.length>maxChoice||0?max=0:responseDeclaration.correctResponse&&(!_.isArray(responseDeclaration.correctResponse)||responseDeclaration.correctResponse.length)?max=1:max=0:("MAP_RESPONSE"===template||"MAP_RESPONSE_POINT"===template)&&(max=0),max)},associateInteractionBased:function associateInteractionBased(interaction,options){var responseDeclaration=interaction.getResponseDeclaration(),template=responseHelper.getTemplateNameFromUri(responseDeclaration.template),maxAssoc=parseInt(interaction.attr("maxAssociations")||0,10),minAssoc=0,mapDefault=parseFloat(responseDeclaration.mappingAttributes.defaultValue||0),max,requiredAssoc,totalAnswerableResponse,usedChoices,choicesIdentifiers,sortedMapEntries,i,allPossibleMapEntries,infiniteScoringPair;if(options=_.defaults(options||{},{possiblePairs:[],checkInfinitePair:!1}),maxAssoc&&minAssoc&&maxAssocmaxAssoc||minAssoc)?max=0:(max=1,choicesIdentifiers=[],_.forEach(responseDeclaration.correctResponse,function(pair){var choices;_.isString(pair)&&(choices=pair.trim().split(" "),_.isArray(choices)&&2===choices.length&&(choicesIdentifiers.push(choices[0].trim()),choicesIdentifiers.push(choices[1].trim())))}),_.forEach(_.countBy(choicesIdentifiers),function(count,identifier){var choice=interaction.getChoiceByIdentifier(identifier),matchMax;return choice?(matchMax=parseInt(choice.attr("matchMax"),10),matchMax&&matchMaxi;i++){if(choiceId=choices[i],!_usedChoices[choiceId]){if(choice=interaction.getChoiceByIdentifier(choiceId),!choice)return!1;_usedChoices[choiceId]={used:0,max:parseInt(choice.attr("matchMax"),10)}}if(_usedChoices[choiceId].max&&_usedChoices[choiceId].used===_usedChoices[choiceId].max)return!1;_usedChoices[choiceId].used++}return infiniteScoringPair=infiniteScoringPair||options.checkInfinitePair&&0v.score&&0>=requiredAssoc&&(score=0),requiredAssoc--,gamp.add(acc,score)},0),responseDeclaration.mappingAttributes.upperBound&&(max=_Mathmin(max,parseFloat(responseDeclaration.mappingAttributes.upperBound||0)))}else"MAP_RESPONSE_POINT"===template&&(max=0);return max},gapMatchInteractionBased:function gapMatchInteractionBased(interaction){var responseDeclaration=interaction.getResponseDeclaration(),template=responseHelper.getTemplateNameFromUri(responseDeclaration.template),mapDefault=parseFloat(responseDeclaration.mappingAttributes.defaultValue||0),getMatchMaxOrderedChoices=function getMatchMaxOrderedChoices(choiceCollection){return _(choiceCollection).map(function(choice){return{matchMax:0===choice.attr("matchMax")?1/0:choice.attr("matchMax")||0,id:choice.id()}}).sortBy("matchMax").reverse().valueOf()},calculatePossiblePairs=function calculatePossiblePairs(gapMatchInteraction){var pairs=[],matchSet1=getMatchMaxOrderedChoices(gapMatchInteraction.getChoices()),matchSet2=getMatchMaxOrderedChoices(gapMatchInteraction.getGaps());return _.forEach(matchSet1,function(choice1){_.forEach(matchSet2,function(choice2){pairs.push([choice1.id,choice2.id])})}),pairs},max,skippableWrongResponse,totalAnswerableResponse,usedChoices,usedGaps,group1,group2,allPossibleMapEntries;if("MATCH_CORRECT"===template)responseDeclaration.correctResponse&&(!_.isArray(responseDeclaration.correctResponse)||responseDeclaration.correctResponse.length)?(max=1,group1=[],group2=[],_.forEach(responseDeclaration.correctResponse,function(pair){var choices;_.isString(pair)&&(choices=pair.trim().split(" "),_.isArray(choices)&&2===choices.length&&(group1.push(choices[0].trim()),group2.push(choices[1].trim())))}),_.forEach(_.countBy(group1),function(count,identifier){var choice=interaction.getChoiceByIdentifier(identifier),matchMax=parseInt(choice.attr("matchMax"),10);if(matchMax&&matchMaxlanguages.reduce((memo,lang)=>(memo[lang.code]=lang.label,memo),{}),useCKEFormatting=languages=>languages.map(lang=>`${lang.code}:${lang.label}:${lang.orientation}`),getList=()=>null===languagesRequest?languagesRequest=request(languagesUrl,null,null,headers):languagesRequest,isRTLbyLanguageCode=code=>getList().then(languages=>{const lang=languages.filter(lang=>lang.code===code);return lang[0]&&"rtl"===lang[0].orientation||!1});return{useLegacyFormatting,useCKEFormatting,getList,isRTLbyLanguageCode}}),define("taoQtiItem/qtiCreator/helper/itemLoader",["jquery","lodash","taoQtiItem/qtiItem/core/Loader","taoQtiItem/qtiCreator/model/Item","taoQtiItem/qtiCreator/model/qtiClasses","taoQtiItem/qtiItem/helper/itemScore","core/dataProvider/request","taoQtiItem/qtiCreator/widgets/helpers/qtiIdentifier","taoQtiItem/qtiCreator/helper/languages"],function($,_,Loader,Item,qtiClasses,itemScoreHelper,request,qtiIdentifier,languages){"use strict";const _generateIdentifier=function _generateIdentifier(uri){const pos=uri.lastIndexOf("#");return uri.substring(pos+1,pos+1+qtiIdentifier.maxQtiIdLength)},decodeHtml=function(str){const map={"&":"&","<":"<",">":">",""":"\"","'":"'"};return str.replace(/&|<|>|"|'/g,function(m){return map[m]})},qtiNamespace="http://www.imsglobal.org/xsd/imsqti_v2p2",qtiSchemaLocation={"http://www.imsglobal.org/xsd/imsqti_v2p2":"http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd"},creatorLoader={loadItem:function loadItem(config,callback){if(config.uri){const langList=languages.getList(),itemRdf=request(config.itemDataUrl,{uri:config.uri}).catch(d=>d);Promise.all([langList,itemRdf]).then(_ref3=>{let[languagesList,data]=_ref3;if(data.itemData)for(const response in data.itemData.responses){const newObject={};for(const mapKey in data.itemData.responses[response].mapping)newObject[decodeHtml(mapKey)]=data.itemData.responses[response].mapping[mapKey];data.itemData.responses[response].mapping=newObject}if(data.itemData&&"assessmentItem"===data.itemData.qtiClass){const loader=new Loader().setClassesLocation(qtiClasses),itemData=data.itemData;loader.loadItemData(itemData,function(loadedItem){loadedItem.isEmpty()&&loadedItem.body("");const namespaces=loadedItem.getNamespaces();namespaces[""]=qtiNamespace,loadedItem.setNamespaces(namespaces),loadedItem.setSchemaLocations(qtiSchemaLocation),languagesList&&loadedItem.data("languagesList",languagesList);const{responseProcessing:{processingType}={}}=loadedItem;if(!config.perInteractionRp&&"templateDriven"===processingType){const{responses={},responseProcessing:{data,responseRules=[]}={}}=itemData,responseIdentifiers=[];_.forOwn(responses,_ref4=>{let{identifier}=_ref4;responseIdentifiers.push(identifier)});const itemScoreRP=itemScoreHelper(responseIdentifiers);responseRules.some(responseRule=>_.isEqual(responseRule,itemScoreRP))&&loadedItem.responseProcessing.setProcessingType("custom",data)}callback(loadedItem,this.getLoadedClasses())})}else{const newItem=new Item().id(_generateIdentifier(config.uri)).attr("title",config.label);newItem.createResponseProcessing(),newItem.setNamespaces({"":qtiNamespace,xsi:"http://www.w3.org/2001/XMLSchema-instance",m:"http://www.w3.org/1998/Math/MathML"}),newItem.setSchemaLocations(qtiSchemaLocation),newItem.data("new",!0),languagesList&&newItem.data("languagesList",languagesList),callback(newItem)}})}}};return creatorLoader}),define("taoQtiItem/portableElementRegistry/assetManager/portableAssetStrategy",["taoQtiItem/portableElementRegistry/ciRegistry","taoQtiItem/portableElementRegistry/icRegistry"],function(ciRegistry,icRegistry){"use strict";function getBaseUrlByIdentifier(typeIdentifier){return ciRegistry.get(typeIdentifier)?ciRegistry.getBaseUrl(typeIdentifier):icRegistry.get(typeIdentifier)?icRegistry.getBaseUrl(typeIdentifier):typeIdentifier}return{name:"portableElementLocation",handle:function handlePortableElementLocation(url){if(url.file===url.path)return getBaseUrlByIdentifier(url.file);return url.source===url.relative?url.relative.replace(/^(\.\/)?([a-z_0-9]+)\/(.*)/i,function(fullmatch,$1,typeIdentifier,relPath){var runtimeLocation=getBaseUrlByIdentifier(typeIdentifier);return runtimeLocation?runtimeLocation+"/"+relPath:fullmatch}):void 0}}}),define("taoQtiItem/qtiCommonRenderer/renderers/config",["lodash","context","ui/themes","taoItems/assets/manager","taoItems/assets/strategies","module","taoQtiItem/portableElementRegistry/assetManager/portableAssetStrategy"],function(_,context,themes,assetManagerFactory,assetStrategies,module,portableAssetStrategy){"use strict";_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,context=context&&Object.prototype.hasOwnProperty.call(context,"default")?context["default"]:context,themes=themes&&Object.prototype.hasOwnProperty.call(themes,"default")?themes["default"]:themes,assetManagerFactory=assetManagerFactory&&Object.prototype.hasOwnProperty.call(assetManagerFactory,"default")?assetManagerFactory["default"]:assetManagerFactory,assetStrategies=assetStrategies&&Object.prototype.hasOwnProperty.call(assetStrategies,"default")?assetStrategies["default"]:assetStrategies,module=module&&Object.prototype.hasOwnProperty.call(module,"default")?module["default"]:module,portableAssetStrategy=portableAssetStrategy&&Object.prototype.hasOwnProperty.call(portableAssetStrategy,"default")?portableAssetStrategy["default"]:portableAssetStrategy;var itemThemes=themes.get("items"),moduleConfig=module.config(),assetManager=assetManagerFactory([{name:"theme",handle:function handleTheme(url){if(itemThemes&&url.path&&(url.path===itemThemes.base||_.contains(_.pluck(itemThemes.available,"path"),url.path)))return context.root_url+url.toString()}},assetStrategies.taomedia,assetStrategies.external,assetStrategies.base64,assetStrategies.itemCssNoCache,assetStrategies.baseUrl,portableAssetStrategy],{baseUrl:""}),locations={assessmentItem:"taoQtiItem/qtiCommonRenderer/renderers/Item",_container:"taoQtiItem/qtiCommonRenderer/renderers/Container",_simpleFeedbackRule:!1,_tooltip:"taoQtiItem/qtiCommonRenderer/renderers/Tooltip",stylesheet:"taoQtiItem/qtiCommonRenderer/renderers/Stylesheet",outcomeDeclaration:!1,responseDeclaration:!1,responseProcessing:!1,figure:"taoQtiItem/qtiCommonRenderer/renderers/Figure",img:"taoQtiItem/qtiCommonRenderer/renderers/Img",figcaption:"taoQtiItem/qtiCommonRenderer/renderers/Figcaption",math:"taoQtiItem/qtiCommonRenderer/renderers/Math",object:"taoQtiItem/qtiCommonRenderer/renderers/Object",table:"taoQtiItem/qtiCommonRenderer/renderers/Table",printedVariable:"taoQtiItem/qtiCommonRenderer/renderers/PrintedVariable",rubricBlock:"taoQtiItem/qtiCommonRenderer/renderers/RubricBlock",modalFeedback:"taoQtiItem/qtiCommonRenderer/renderers/ModalFeedback",prompt:"taoQtiItem/qtiCommonRenderer/renderers/interactions/Prompt",choiceInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/ChoiceInteraction",extendedTextInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/ExtendedTextInteraction",orderInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/OrderInteraction",associateInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/AssociateInteraction",matchInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/MatchInteraction",textEntryInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/TextEntryInteraction",sliderInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/SliderInteraction",inlineChoiceInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/InlineChoiceInteraction","simpleChoice.choiceInteraction":"taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleChoice.ChoiceInteraction","simpleChoice.orderInteraction":"taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleChoice.OrderInteraction",hottext:"taoQtiItem/qtiCommonRenderer/renderers/choices/Hottext",gap:"taoQtiItem/qtiCommonRenderer/renderers/choices/Gap",gapText:"taoQtiItem/qtiCommonRenderer/renderers/choices/GapText","simpleAssociableChoice.matchInteraction":"taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleAssociableChoice.MatchInteraction","simpleAssociableChoice.associateInteraction":"taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleAssociableChoice.AssociateInteraction",inlineChoice:"taoQtiItem/qtiCommonRenderer/renderers/choices/InlineChoice",hottextInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/HottextInteraction",hotspotInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/HotspotInteraction",hotspotChoice:!1,gapMatchInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/GapMatchInteraction",selectPointInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/SelectPointInteraction",graphicOrderInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/GraphicOrderInteraction",mediaInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/MediaInteraction",uploadInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/UploadInteraction",graphicGapMatchInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/GraphicGapMatchInteraction",gapImg:"taoQtiItem/qtiCommonRenderer/renderers/choices/GapImg",graphicAssociateInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/GraphicAssociateInteraction",associableHotspot:!1,customInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/PortableCustomInteraction",infoControl:"taoQtiItem/qtiCommonRenderer/renderers/PortableInfoControl",include:"taoQtiItem/qtiCommonRenderer/renderers/Include",endAttemptInteraction:"taoQtiItem/qtiCommonRenderer/renderers/interactions/EndAttemptInteraction"},config={name:"commonRenderer",locations:locations,options:{assetManager:assetManager,themes:itemThemes,enableDragAndDrop:{associate:!!moduleConfig.associateDragAndDrop,gapMatch:!!moduleConfig.gapMatchDragAndDrop,graphicGapMatch:!!moduleConfig.graphicGapMatchDragAndDrop,order:!!moduleConfig.orderDragAndDrop},messages:moduleConfig.messages}};return config}),define("taoQtiItem/qtiCreator/renderers/config",["lodash","context","taoQtiItem/qtiCommonRenderer/renderers/config","taoItems/assets/manager","taoItems/assets/strategies"],function(_,context,commonRenderConfig,assetManagerFactory,assetStrategies){"use strict";var assetManager=assetManagerFactory([assetStrategies.taomedia,assetStrategies.external,assetStrategies.base64,assetStrategies.baseUrl],{baseUrl:""}),locations=_.defaults({_container:"taoQtiItem/qtiCreator/renderers/Container",_tooltip:"taoQtiItem/qtiCreator/renderers/Tooltip",assessmentItem:"taoQtiItem/qtiCreator/renderers/Item",rubricBlock:"taoQtiItem/qtiCreator/renderers/RubricBlock",figure:"taoQtiItem/qtiCreator/renderers/Figure",img:"taoQtiItem/qtiCreator/renderers/Img",figcaption:"taoQtiItem/qtiCreator/renderers/Figcaption",math:"taoQtiItem/qtiCreator/renderers/Math",object:"taoQtiItem/qtiCreator/renderers/Object",table:"taoQtiItem/qtiCreator/renderers/Table",modalFeedback:"taoQtiItem/qtiCreator/renderers/ModalFeedback",choiceInteraction:"taoQtiItem/qtiCreator/renderers/interactions/ChoiceInteraction",orderInteraction:"taoQtiItem/qtiCreator/renderers/interactions/OrderInteraction",matchInteraction:"taoQtiItem/qtiCreator/renderers/interactions/MatchInteraction",associateInteraction:"taoQtiItem/qtiCreator/renderers/interactions/AssociateInteraction",inlineChoiceInteraction:"taoQtiItem/qtiCreator/renderers/interactions/InlineChoiceInteraction",textEntryInteraction:"taoQtiItem/qtiCreator/renderers/interactions/TextEntryInteraction",hotspotInteraction:"taoQtiItem/qtiCreator/renderers/interactions/HotspotInteraction",selectPointInteraction:"taoQtiItem/qtiCreator/renderers/interactions/SelectPointInteraction",graphicOrderInteraction:"taoQtiItem/qtiCreator/renderers/interactions/GraphicOrderInteraction",graphicAssociateInteraction:"taoQtiItem/qtiCreator/renderers/interactions/GraphicAssociateInteraction",graphicGapMatchInteraction:"taoQtiItem/qtiCreator/renderers/interactions/GraphicGapMatchInteraction",mediaInteraction:"taoQtiItem/qtiCreator/renderers/interactions/MediaInteraction",uploadInteraction:"taoQtiItem/qtiCreator/renderers/interactions/UploadInteraction",sliderInteraction:"taoQtiItem/qtiCreator/renderers/interactions/SliderInteraction",extendedTextInteraction:"taoQtiItem/qtiCreator/renderers/interactions/ExtendedTextInteraction",inlineChoice:"taoQtiItem/qtiCreator/renderers/choices/InlineChoice","simpleChoice.choiceInteraction":"taoQtiItem/qtiCreator/renderers/choices/SimpleChoice.ChoiceInteraction","simpleChoice.orderInteraction":"taoQtiItem/qtiCreator/renderers/choices/SimpleChoice.OrderInteraction","simpleAssociableChoice.associateInteraction":"taoQtiItem/qtiCreator/renderers/choices/SimpleAssociableChoice.AssociateInteraction","simpleAssociableChoice.matchInteraction":"taoQtiItem/qtiCreator/renderers/choices/SimpleAssociableChoice.MatchInteraction",gapMatchInteraction:"taoQtiItem/qtiCreator/renderers/interactions/GapMatchInteraction",hottextInteraction:"taoQtiItem/qtiCreator/renderers/interactions/HottextInteraction",customInteraction:"taoQtiItem/qtiCreator/renderers/interactions/PortableCustomInteraction",endAttemptInteraction:"taoQtiItem/qtiCreator/renderers/interactions/EndAttemptInteraction",infoControl:"taoQtiItem/qtiCreator/renderers/PortableInfoControl",include:"taoQtiItem/qtiCreator/renderers/Include",gap:"taoQtiItem/qtiCreator/renderers/choices/Gap",gapText:"taoQtiItem/qtiCreator/renderers/choices/GapText",hottext:"taoQtiItem/qtiCreator/renderers/choices/Hottext",printedVariable:"taoQtiItem/qtiCreator/renderers/PrintedVariable"},commonRenderConfig.locations);return{name:"creatorRenderer",locations:locations,options:{assetManager:assetManager}}}),define("taoQtiItem/qtiCreator/renderers/Renderer",["taoQtiItem/qtiRunner/core/Renderer","taoQtiItem/qtiCreator/renderers/config"],function(Renderer,config){"use strict";return Renderer.build(config.locations,config.name,config.options)}),define("taoQtiItem/qtiCreator/helper/creatorRenderer",["jquery","lodash","taoQtiItem/qtiCreator/renderers/Renderer","taoItems/assets/manager","taoItems/assets/strategies","util/dom"],function($,_,Renderer,assetManagerFactory,assetStrategies,dom){"use strict";var _creatorRenderer=null,_configurableInteractions=["endAttempt"],_extractInteractionsConfig=function _extractInteractionsConfig(config){var ret={};return config&&config.properties&&_.each(_configurableInteractions,function(interactionName){config.properties[interactionName]&&(ret[interactionName]=config.properties[interactionName])}),ret},get=function(reset,config,areaBroker){var $bodyEltForm;return config=config||{},config.properties=config.properties||{},(!_creatorRenderer||reset)&&($bodyEltForm=_creatorRenderer?_creatorRenderer.getOption("bodyElementOptionForm"):null,(reset||!$bodyEltForm||!$bodyEltForm.length||!dom.contains($bodyEltForm))&&(_creatorRenderer=new Renderer({lang:"",uri:"",shuffleChoices:!1,itemOptionForm:$("#item-editor-item-property-bar .panel"),interactionOptionForm:$("#item-editor-interaction-property-bar .panel"),choiceOptionForm:$("#item-editor-choice-property-bar .panel"),responseOptionForm:$("#item-editor-response-property-bar .panel"),bodyElementOptionForm:areaBroker.getElementPropertyPanelArea(),textOptionForm:$("#item-editor-text-property-bar .panel"),modalFeedbackOptionForm:$("#item-editor-modal-feedback-property-bar .panel"),mediaManager:{appendContainer:"#mediaManager",browseUrl:config.properties.getFilesUrl,uploadUrl:config.properties.fileUploadUrl,deleteUrl:config.properties.fileDeleteUrl,downloadUrl:config.properties.fileDownloadUrl,fileExistsUrl:config.properties.fileExistsUrl,mediaSourcesUrl:config.properties.mediaSourcesUrl},interactions:_extractInteractionsConfig(config),qtiCreatorContext:config.qtiCreatorContext}),_creatorRenderer.getAssetManager().setData({baseUrl:config.properties.baseUrl||""}),_creatorRenderer.setAreaBroker(areaBroker),_.assign(_creatorRenderer,{getCreatorContext:function getCreatorContext(){return this.getOption("qtiCreatorContext")}}))),_creatorRenderer};return{get:get,setOption:function(name,value){return get().setOption(name,value)},setOptions:function(options){return get().setOptions(options)},load:function(qtiClasses,done){return get().load(function(){_.isFunction(done)&&done.apply(this,arguments)},qtiClasses)}}}),define("taoQtiItem/qtiCommonRenderer/renderers/Renderer",["taoQtiItem/qtiRunner/core/Renderer","taoQtiItem/qtiCommonRenderer/renderers/config"],function(Renderer$1,config){"use strict";Renderer$1=Renderer$1&&Object.prototype.hasOwnProperty.call(Renderer$1,"default")?Renderer$1["default"]:Renderer$1,config=config&&Object.prototype.hasOwnProperty.call(config,"default")?config["default"]:config;var Renderer=Renderer$1.build(config.locations,config.name,config.options);return Renderer}),define("taoQtiItem/qtiCommonRenderer/helpers/container",["lodash","jquery","taoQtiItem/qtiItem/core/Element"],function(_,$,Element){"use strict";_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,$=$&&Object.prototype.hasOwnProperty.call($,"default")?$["default"]:$,Element=Element&&Object.prototype.hasOwnProperty.call(Element,"default")?Element["default"]:Element;let _containers={},_$containerContext=$();const _getSelector=function(element){const serial=element.getSerial();let selector=`[data-serial=${serial}]`;return Element.isA(element,"choice")?selector=`.qti-choice${selector}`:Element.isA(element,"interaction")&&(selector=`.qti-interaction${selector}`),selector},containerHelper={setContext($scope){_$containerContext=$scope},getContext(){return _$containerContext},get(element,$scope){const serial=element.getSerial();return $scope instanceof $&&$scope.length?$scope.find(_getSelector(element)):_$containerContext instanceof $&&_$containerContext.length?_$containerContext.find(_getSelector(element)):(_containers[serial]&&_containers[serial].length||(_containers[serial]=$(_getSelector(element))),_containers[serial])},reset(element){element instanceof Element&&_containers[element.getSerial()]&&(_containers=_.omit(_containers,element.getSerial()))},clear(){_containers={},_$containerContext=$()},trigger(eventType,element,data){eventType&&(data&&!_.isArray(data)&&(data=[data]),this.get(element).trigger(eventType,data))},triggerResponseChangeEvent(interaction,extraData){this.trigger("responseChange",interaction,[{interaction:interaction,response:interaction.getResponse()},extraData])},targetBlank($container){$container.on("click","a",function(e){e.preventDefault();const href=$(this).attr("href");href&&href.match(/^http/i)&&window.open(href,"_blank")})}};return containerHelper}),define("taoQtiItem/qtiCreator/helper/commonRenderer",["lodash","taoQtiItem/qtiCommonRenderer/renderers/Renderer","taoQtiItem/qtiCommonRenderer/helpers/container"],function(_,Renderer,containerHelper){"use strict";var _$previousContext=null,commonRenderer={render:function(item,$container){return commonRenderer.setContext($container),_renderer.load(function(){$container.append(item.render(this)),item.postRender({},"",this)},item.getUsedClasses())},get:function(reset,config){return(!_renderer||reset)&&(_renderer=new Renderer({shuffleChoices:!0}),config&&_renderer.getAssetManager().setData({baseUrl:config.properties.baseUrl||""})),_renderer},getOption:function(name){return _renderer.getOption(name)},setOption:function(name,value){return _renderer.setOption(name,value)},setOptions:function(options){return _renderer.setOptions(options)},setContext:function($context){return _$previousContext=$context,containerHelper.setContext($context)},restoreContext:function(){containerHelper.setContext(_$previousContext),_$previousContext=null},load:function(qtiClasses,done){var renderer=_renderer||this.get();return renderer.load(function(){_.isFunction(done)&&done.apply(this,arguments)},qtiClasses)}},_renderer;return commonRenderer}),define("taoQtiItem/qtiItem/helper/simpleParser",["lodash","jquery","taoQtiItem/qtiItem/helper/util","taoQtiItem/qtiItem/core/Loader"],function(_,$,util,Loader){"use strict";function _getElementSelector(qtiClass,ns){return ns?ns+"\\:"+qtiClass+","+qtiClass:qtiClass}function getQtiClassFromXmlDom($node){let qtiClass=$node.prop("tagName").toLowerCase();return qtiClass=qtiClass.replace(/.*:/,""),_qtiClassNames[qtiClass]?_qtiClassNames[qtiClass]:qtiClass}function buildElement($elt){const qtiClass=getQtiClassFromXmlDom($elt),elt={qtiClass:qtiClass,serial:util.buildSerial(qtiClass+"_"),attributes:{}};return $.each($elt[0].attributes,function(){let attrName;this.specified&&(attrName=_qtiAttributesNames[this.name]||this.name,elt.attributes[attrName]=this.value)}),elt}function buildMath($elt,options){const elt=buildElement($elt);return elt.annotations={},$elt.find(_getElementSelector("annotation",options.ns.math)).each(function(){const $annotation=$(this),encoding=$annotation.attr("encoding");encoding&&(elt.annotations[encoding]=_.unescape($annotation.html())),$annotation.remove()}),elt.mathML=$elt.html(),elt.ns={name:"m",uri:"http://www.w3.org/1998/Math/MathML"},elt}function buildTooltip(targetHtml,contentId,contentHtml){const qtiClass="_tooltip";return{elements:{},qtiClass:"_tooltip",serial:util.buildSerial("_tooltip_"),attributes:{"aria-describedby":contentId},content:contentHtml,body:{elements:{},serial:util.buildSerial("container"),body:targetHtml}}}function parseTable($elt,elt,options){elt.body={body:"",elements:{}};const $parsedTable=parseContainer($elt,options);return elt.body.body=$parsedTable.body,elt.body.elements=$parsedTable.elements,elt}function parseFigure($elt,elt,options){elt.body={body:"",elements:{}};const $parsedFigure=parseContainer($elt,options);elt.body.body=$parsedFigure.body,elt.body.elements=$parsedFigure.elements;const $figcaption=$elt.find(_getElementSelector("figcaption",options.ns.figcaption));if($figcaption.length){const element=buildElement($figcaption);element.body={body:$figcaption.html(),elements:{}},elt.body.elements[element.serial]=element,$figcaption.replaceWith(_placeholder(element))}return elt.body.body=$elt.html(),elt}function parseContainer($container,options){const ret={serial:util.buildSerial("_container_"),body:"",elements:{}};return $container.find("table").each(function(){const $qtiElement=$(this);let element=buildElement($qtiElement);element=parseTable($qtiElement,element,options),ret.elements[element.serial]=element,$qtiElement.replaceWith(_placeholder(element))}),$container.find(_getElementSelector("figure",options.ns.figure)).each(function(){const $qtiElement=$(this);let element=buildElement($qtiElement);element=parseFigure($qtiElement,element,options),ret.elements[element.serial]=element,$qtiElement.replaceWith(_placeholder(element))}),$container.find(_getElementSelector("math",options.ns.math)).each(function(){const $qtiElement=$(this),element=buildMath($qtiElement,options);ret.elements[element.serial]=element,$qtiElement.replaceWith(_placeholder(element))}),$container.find(_getElementSelector("include",options.ns.include)).each(function(){const $qtiElement=$(this),element=buildElement($qtiElement);ret.elements[element.serial]=element,$qtiElement.replaceWith(_placeholder(element))}),$container.find("[data-role=\"tooltip-target\"]").each(function(){let $target=$(this),contentId=$target.attr("aria-describedBy"),element,$content,contentHtml;contentId&&($content=$container.find("#"+contentId),$content.length&&(contentHtml=$content.html(),element=buildTooltip($target.html(),contentId,contentHtml),ret.elements[element.serial]=element,$target.replaceWith(_placeholder(element)),$content.remove()))}),_.each(_parsableElements,function(qtiClass){$container.find(qtiClass).each(function(){const $qtiElement=$(this),element=buildElement($qtiElement);ret.elements[element.serial]=element,$qtiElement.replaceWith(_placeholder(element))})}),ret.body=$container.html(),ret}function _placeholder(element){return"{{"+element.serial+"}}"}_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,$=$&&Object.prototype.hasOwnProperty.call($,"default")?$["default"]:$,util=util&&Object.prototype.hasOwnProperty.call(util,"default")?util["default"]:util,Loader=Loader&&Object.prototype.hasOwnProperty.call(Loader,"default")?Loader["default"]:Loader;const _parsableElements=["img","object","printedVariable"],_qtiClassNames={rubricblock:"rubricBlock",printedvariable:"printedVariable"},_qtiAttributesNames={powerform:"powerForm",mappingindicator:"mappingIndicator"},_defaultOptions={ns:{math:"",include:"xi",table:"table",image:"img",object:"",figure:"qh5",figcaption:"qh5"},loaded:null,model:null};let parser;parser={parse:function(xmlStr,opts){const options=_.merge(_.clone(_defaultOptions),opts||{}),$container=$(xmlStr),element=buildElement($container),data=parseContainer($container,options);let loader;return _.isUndefined(data.body)||(element.body=data),_.isFunction(options.loaded)&&options.model&&(loader=new Loader().setClassesLocation(options.model),loader.loadAndBuildElement(element,options.loaded)),element}};var parser$1=parser;return parser$1}),define("taoQtiItem/qtiItem/helper/xincludeLoader",["jquery","lodash","taoQtiItem/qtiItem/helper/simpleParser","taoQtiItem/qtiItem/core/Loader"],function($,_,simpleParser,Loader){"use strict";function load(xinclude,baseUrl,callback){const href=xinclude.attr("href");if(href&&baseUrl){const fileUrl=`text!${baseUrl}${href}`;require.undef(fileUrl),require([fileUrl],function(stimulusXml){const $wrapper=$.parseXML(stimulusXml),$sampleXMLrootNode=$wrapper.children,$stimulus=$("").append($sampleXMLrootNode),mathNs="m",data=simpleParser.parse($stimulus,{ns:{math:mathNs}});new Loader().loadElement(xinclude,data,function(){if(_.isFunction(callback)){const loadedClasses=this.getLoadedClasses();loadedClasses.push("_container"),callback(xinclude,data,loadedClasses)}})},function(){callback(xinclude,!1,[])})}}$=$&&Object.prototype.hasOwnProperty.call($,"default")?$["default"]:$,_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,simpleParser=simpleParser&&Object.prototype.hasOwnProperty.call(simpleParser,"default")?simpleParser["default"]:simpleParser,Loader=Loader&&Object.prototype.hasOwnProperty.call(Loader,"default")?Loader["default"]:Loader;var xincludeLoader={load};return xincludeLoader}),define("taoQtiItem/qtiCreator/helper/xincludeRenderer",["module","context","lodash","taoQtiItem/qtiCreator/helper/commonRenderer","taoQtiItem/qtiItem/helper/xincludeLoader","core/moduleLoader"],function(module,context,_,commonRenderer,xincludeLoader,moduleLoader){"use strict";const moduleConfig=module.config();let xincludeHandlers=[];return moduleConfig.handlers&&moduleLoader({},_.isFunction).addList(moduleConfig.handlers).load(context.bundle).then(handlers=>xincludeHandlers=handlers),{render:function render(xincludeWidget,baseUrl,newHref){const xinclude=xincludeWidget.element;newHref&&xinclude.attr("href",newHref),xincludeLoader.load(xinclude,baseUrl,function(xi,data,loadedClasses){if(data){const dataBody=data.body.body,hasClass=dataBody.match(/class="(?tao-\w+)?/);let className="";hasClass&&hasClass.groups&&hasClass.groups.className&&(className=hasClass.groups.className),commonRenderer.get().load(function(){_.each(xinclude.getComposingElements(),function(elt){elt.setRenderer(commonRenderer.get())}),xincludeWidget.refresh()},loadedClasses),xincludeHandlers.forEach(handler=>handler(xinclude.attr("href"),className,xi.serial))}else xinclude.removeAttr("href")})},getXincludeHandlers:function getXincludeHandlers(){return xincludeHandlers}}}),define("tpl!taoQtiItem/qtiCreator/tpl/toolbars/insertInteractionButton",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){function program1(depth0,data){var buffer="",stack1,helper;return buffer+="\n data-sub-group=\"",(helper=helpers.subGroup)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.subGroup,stack1="function"===typeof helper?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"\"\n",buffer}function program3(depth0,data){return"\n class=\"disabled\"\n title=\"element available in the final release\"\n"}function program5(depth0,data){var buffer="",stack1,helper;return buffer+="\n title=\"",(helper=helpers.title)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.title,stack1="function"===typeof helper?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"\"\n",buffer}function program7(depth0,data){var buffer="",stack1,helper;return buffer+="\n \n ",buffer}function program9(depth0,data){var buffer="",stack1,helper;return buffer+="\n \n ",buffer}this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var buffer="",functionType="function",escapeExpression=this.escapeExpression,self=this,stack1,helper;return buffer+="\n ",stack1=helpers["if"].call(depth0,depth0&&depth0.iconFont,{hash:{},inverse:self.program(9,program9,data),fn:self.program(7,program7,data),data:data}),(stack1||0===stack1)&&(buffer+=stack1),buffer+="\n\n
    ",(helper=helpers.short)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.short,stack1="function"===typeof helper?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"
    \n",buffer})}),define("tpl!taoQtiItem/qtiCreator/tpl/toolbars/insertInteractionGroup",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var buffer="",functionType="function",escapeExpression=this.escapeExpression,stack1,helper;return buffer+="
    \n

    ",(helper=helpers.label)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.label,stack1="function"===typeof helper?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"

    \n
    \n
      \n
      \n
      ",buffer})}),define("tpl!taoQtiItem/qtiCreator/tpl/toolbars/tooltip",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var buffer="",functionType="function",escapeExpression=this.escapeExpression,stack1,helper;return buffer+="
      \n \n
      \n ",(helper=helpers.message)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.message,stack1="function"===typeof helper?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"\n
      \n
      ",buffer})}),define("taoQtiItem/qtiCreator/editor/interactionsToolbar",["jquery","lodash","i18n","ui/hider","tpl!taoQtiItem/qtiCreator/tpl/toolbars/insertInteractionButton","tpl!taoQtiItem/qtiCreator/tpl/toolbars/insertInteractionGroup","tpl!taoQtiItem/qtiCreator/tpl/toolbars/tooltip","ui/tooltip"],function($,_,__,hider,insertInteractionTpl,insertSectionTpl,tooltipTpl,tooltip){"use strict";function getGroupId(groupId){return groupId.replace(/\W+/g,"-").toLowerCase()}function getGroupSectionId(groupId){return"sidebar-left-section-"+getGroupId(groupId)}function addGroup($sidebar,groupId,groupLabel){const groupSectionId=getGroupSectionId(groupId),$section=$(insertSectionTpl({id:groupSectionId,label:groupLabel}));return $sidebar.append($section),$section}function create($sidebar,interactions){_.each(interactions,function(interactionAuthoringData){add($sidebar,interactionAuthoringData)}),buildSubGroups($sidebar),$sidebar.data("interaction-toolbar-ready",!0),$sidebar.trigger(_events.interactiontoolbarready)}function getGroup($sidebar,groupId){const groupSectionId=getGroupSectionId(groupId);return $sidebar.find("#"+groupSectionId)}function isReady($sidebar){return!!$sidebar.data("interaction-toolbar-ready")}function whenReady($sidebar){return new Promise(function(resolve){isReady($sidebar)?resolve():$sidebar.on(_events.interactiontoolbarready,function(){resolve()})})}function remove($sidebar,interactionClass){$sidebar.find("li[data-qti-class=\""+interactionClass+"\"]").remove()}function disable($sidebar,interactionClass){hider.hide($sidebar.find("li[data-qti-class=\""+interactionClass+"\"]"))}function enable($sidebar,interactionClass){hider.show($sidebar.find("li[data-qti-class=\""+interactionClass+"\"]"))}function exists($sidebar,interactionClass){return!!$sidebar.find("li[data-qti-class=\""+interactionClass+"\"]").length}function add($sidebar,interactionAuthoringData){if(exists($sidebar,interactionAuthoringData.qtiClass))throw"the interaction is already in the sidebar";const groupId=interactionAuthoringData.group,groupLabel=interactionAuthoringData.tags[0]||"",subGroupId=interactionAuthoringData.tags[1],tplData={qtiClass:interactionAuthoringData.qtiClass,disabled:!!interactionAuthoringData.disabled,title:interactionAuthoringData.description,iconFont:/^icon-/.test(interactionAuthoringData.icon),icon:interactionAuthoringData.icon,short:interactionAuthoringData.short,dev:!1};let $group=getGroup($sidebar,groupId);subGroupId&&_subgroups[subGroupId]&&(tplData.subGroup=subGroupId),$group.length||($group=addGroup($sidebar,groupId,groupLabel)),subGroupId&&_subgroups[subGroupId]&&(tplData.subGroup=subGroupId),$group.length||($group=addGroup($sidebar,groupId,groupLabel));let $interaction=$(insertInteractionTpl(tplData));return $group.find(".tool-list").append($interaction),$interaction}function buildSubGroups($sidebar){$sidebar.find("[data-sub-group]").each(function(){var $element=$(this),$section=$element.parents("section"),subGroup=$element.data("sub-group"),$subGroupPanel,$subGroupList,$cover;subGroup&&($subGroupPanel=$section.find(".sub-group."+subGroup),$subGroupList=$subGroupPanel.find(".tool-list"),!$subGroupPanel.length&&($subGroupPanel=$("
      ",{class:"panel clearfix sub-group "+subGroup}),$subGroupList=$("
        ",{class:"tool-list plain clearfix"}),$subGroupPanel.append($subGroupList),$section.append($subGroupPanel),$cover=$("
        ",{class:"sub-group-cover blocking"}),$subGroupPanel.append($cover),$subGroupPanel.data("cover",$cover)),$subGroupList.append($element))}),addInlineInteractionTooltip()}function addInlineInteractionTooltip(){var $inlineInteractionsPanel=$("#sidebar-left-section-inline-interactions .inline-interactions"),$tooltip=$(tooltipTpl({message:__("Inline interactions need to be inserted into a text block.")})),timer;$inlineInteractionsPanel.append($tooltip),tooltip.lookup($inlineInteractionsPanel),$tooltip.css({position:"absolute",zIndex:11,top:0,right:10}),$inlineInteractionsPanel.on("mouseenter",".sub-group-cover",function(){timer=setTimeout(function(){$tooltip.find("[data-tooltip]").data("$tooltip").show()},300)}).on("mouseleave",".sub-group-cover",function(){$tooltip.find("[data-tooltip]").data("$tooltip").hide(),clearTimeout(timer)})}var _customInteractionTag=__("Custom Interactions"),_subgroups={"inline-interactions":"Inline Interactions"},_events={interactiontoolbarready:"interactiontoolbarready.qti-widget"};return{create:create,add:add,exists:exists,addGroup:addGroup,getGroupId:getGroupId,getGroupSectionId:getGroupSectionId,getGroup:getGroup,isReady:isReady,whenReady:whenReady,remove:remove,disable:disable,enable:enable,getCustomInteractionTag:function(){return _customInteractionTag}}}),define("taoQtiItem/qtiCreator/helper/panel",["jquery","lodash","i18n","taoQtiItem/qtiItem/core/Element"],function($,_,__,Element){"use strict";var _getItemContainer=function(){return $("#item-editor-panel")},showPanel=function($panel,$fold){$panel.show(),openSections($panel.children("section")),$fold&&$fold.length&&closeSections($fold.children("section"))},initFormVisibilityListener=function(){$(document).off(".panel");var $itemContainer=_getItemContainer(),_staticElements={_tooltip:"Tooltip",figure:"Figure",img:"Image",object:"Media",rubricBlock:"Rubric Block",math:"Math",table:"Table",include:"Shared Stimulus",infoControl:"Student Tool"},$formInteractionPanel=$("#item-editor-interaction-property-bar"),$formChoicePanel=$("#item-editor-choice-property-bar"),$formResponsePanel=$("#item-editor-response-property-bar"),$formItemPanel=$("#item-editor-item-property-bar"),$formBodyElementPanel=$("#item-editor-body-element-property-bar"),$formTextBlockPanel=$("#item-editor-text-property-bar"),$formModalFeedbackPanel=$("#item-editor-modal-feedback-property-bar"),$formStylePanel=$("#item-style-editor-bar"),$appearanceToggler=$("#appearance-trigger"),$menuLabel=$appearanceToggler.find(".menu-label"),$itemIcon=$appearanceToggler.find(".icon-item"),$styleIcon=$appearanceToggler.find(".icon-style"),_toggleAppearanceEditor=function(active){active?($appearanceToggler.addClass("active"),$formStylePanel.show(),$formItemPanel.hide(),$itemContainer.trigger("styleedit"),showPanel($formStylePanel),$menuLabel.text($menuLabel.data("item")),$itemIcon.show(),$styleIcon.hide()):($appearanceToggler.removeClass("active"),$formStylePanel.hide(),showPanel($formItemPanel),$menuLabel.text($menuLabel.data("style")),$itemIcon.hide(),$styleIcon.show())};$appearanceToggler.on("click",function(){$appearanceToggler.hasClass("active")?_toggleAppearanceEditor(!1):_toggleAppearanceEditor(!0)}),_.delay(function(){showPanel($formItemPanel)},200),$(document).on("afterStateInit.qti-widget.panel",function(e,element,state){switch(state.name){case"active":_toggleAppearanceEditor(!1),Element.isA(element,"assessmentItem")||$formItemPanel.hide();var label=_staticElements[element.qtiClass];label?($formBodyElementPanel.find("h2").html(label+" "+__("Properties")),showPanel($formBodyElementPanel)):"_container"===element.qtiClass&&showPanel($formTextBlockPanel),"modalFeedback"===element.qtiClass&&(showPanel($formModalFeedbackPanel),$formResponsePanel.hide());break;case"question":showPanel($formInteractionPanel);break;case"answer":showPanel($formResponsePanel);break;case"choice":showPanel($formChoicePanel,$formInteractionPanel);break;case"sleep":_staticElements[element.qtiClass]?$formBodyElementPanel.hide():"_container"===element.qtiClass&&$formTextBlockPanel.hide(),Element.isA(element,"choice")||$itemContainer.find(".widget-box.edit-active").length||showPanel($formItemPanel)}}).on("afterStateExit.qti-widget.panel",function(e,element,state){switch(state.name){case"active":"modalFeedback"===element.qtiClass&&(showPanel($formResponsePanel),$formModalFeedbackPanel.hide());break;case"question":element.is("interaction")&&($formChoicePanel.hide(),$formInteractionPanel.hide());break;case"choice":$formChoicePanel.hide(),showPanel($formInteractionPanel);break;case"answer":$formResponsePanel.hide()}}).on("elementCreated.qti-widget.panel",function(e,data){"_container"===data.element.qtiClass&&enableSubGroup("inline-interactions")}).on("deleted.qti-widget.panel",function(e,data){"_container"===data.element.qtiClass&&toggleInlineInteractionGroup()})},toggleInlineInteractionGroup=function(){var $itemContainer=_getItemContainer();$itemContainer.find(".widget-textBlock").length?enableSubGroup("inline-interactions"):disableSubGroup("inline-interactions")},heading="h2",section="section",panel="hr, .panel",closed="closed",ns="accordion",initSidebarAccordion=function($sidebar){var $sections=$sidebar.find(section),$allPanels=$sidebar.children(panel).hide(),$allTriggers=$sidebar.find(heading);return!(0!==$allTriggers.length)||void($allTriggers.each(function(){var $heading=$(this),$section=$heading.parents(section),$panel=$section.children(panel),$closer=$("",{class:"icon-up"}),$opener=$("",{class:"icon-down"}),action=$panel.is(":visible")?"open":"close";($heading.append($closer).append($opener).addClass(closed),!$heading.hasClass("_accordion"))&&($heading.addClass("_accordion"),$panel.on("panelclose."+ns+" panelopen."+ns,function(e,args){var fn="panelclose"===e.type?"add":"remove";args.heading[fn+"Class"](closed)}),$panel.trigger("panel"+action+"."+ns,{heading:$heading}))}),$sections.each(function(){$(this).find(heading).on("click",function(e,args){var $heading=$(this),$panel=$heading.parents(section).children(panel),preserveOthers=!!(args&&args.preserveOthers),actions={close:"hide",open:"fadeIn"},forceState=!!(args&&args.forceState)&&args.forceState,action,classFn;forceState&&(classFn="open"===forceState?"addClass":"removeClass",$heading[classFn](closed)),action=$heading.hasClass(closed)?"open":"close",!1,$panel.trigger("panel"+action+"."+ns,{heading:$heading})[actions[action]]()})}))},_toggleSections=function(sections,preserveOthers,state){sections.each(function(){$(this).find(heading).trigger("click",{preserveOthers:preserveOthers,forceState:state})})},closeSections=function(sections,preserveOthers){_toggleSections(sections,!!preserveOthers,"close")},openSections=function(sections,preserveOthers){_toggleSections(sections,!!preserveOthers,"open")},_toggleSubGroup=function(subGroup,state){if(subGroup=$("."+subGroup),subGroup.length){var fn="disable"===state?"addClass":"removeClass";subGroup.data("cover")[fn]("blocking")}},enableSubGroup=function(subGroup){_toggleSubGroup(subGroup,"enable")},disableSubGroup=function(subGroup){_toggleSubGroup(subGroup,"disable")};return{initFormVisibilityListener:initFormVisibilityListener,showPanel:showPanel,toggleInlineInteractionGroup:toggleInlineInteractionGroup,initSidebarAccordion:initSidebarAccordion,openSections:openSections,closeSections:closeSections,enableSubGroup:enableSubGroup,disableSubGroup:disableSubGroup}}),define("taoQtiItem/qtiCreator/editor/interactionsPanel",["taoQtiItem/qtiCreator/editor/interactionsToolbar","taoQtiItem/qtiCreator/helper/panel","taoQtiItem/qtiCreator/helper/qtiElements","taoQtiItem/portableElementRegistry/ciRegistry"],function(interactionsToolbar,panel,qtiElements,ciRegistry){"use strict";return function setUpInteractionPanel($container){const interactions=qtiElements.getAvailableAuthoringElements();for(const typeId in ciRegistry.getAllVersions()){const data=ciRegistry.getAuthoringData(typeId,{enabledOnly:!0});data&&data.tags&&data.tags[0]===interactionsToolbar.getCustomInteractionTag()&&(interactions[data.qtiClass]=data)}interactionsToolbar.create($container,interactions),panel.initSidebarAccordion($container),panel.closeSections($container.find("section")),panel.openSections($container.find("#sidebar-left-section-common-interactions"),!1),panel.toggleInlineInteractionGroup()}}),define("tpl!taoQtiItem/qtiCreator/tpl/toolbars/cssToggler",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var buffer="",functionType="function",escapeExpression=this.escapeExpression,stack1,helper;return buffer+="
      • \n \n ",(helper=helpers.label)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.label,stack1="function"===typeof helper?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"\n \n \n \n
      • ",buffer})}),define("taoQtiItem/qtiCreator/editor/styleEditor/styleEditor",["jquery","lodash","i18n","util/urlParser","core/promise","tpl!taoQtiItem/qtiCreator/tpl/toolbars/cssToggler","jquery.fileDownload"],function($,_,__,UrlParser,Promise,cssTpl){"use strict";let itemConfig,globalConfig;const _getUri=function(action){return globalConfig[`${action}CssUrl`]},_basename=function(path){return path.substring(path.lastIndexOf("/")+1)};let style={};const $styleElem=function(){let styleElem=$("#item-editor-user-styles");return styleElem.length?styleElem.empty():(styleElem=$("