From 5a634e5f3419b04c1f1a2db01ee4422c8130d31d Mon Sep 17 00:00:00 2001 From: Aleksej Tikhanovich Date: Thu, 17 Oct 2024 17:08:12 +0200 Subject: [PATCH] fix: bundle js --- views/js/loader/qtiLoader.min.js.map | 2 +- views/js/loader/taoQtiItem.min.js.map | 2 +- views/js/loader/taoQtiItemRunner.es5.min.js.map | 2 +- views/js/loader/taoQtiItemRunner.min.js.map | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/views/js/loader/qtiLoader.min.js.map b/views/js/loader/qtiLoader.min.js.map index 0c1f532baf..587f01a3c7 100644 --- a/views/js/loader/qtiLoader.min.js.map +++ b/views/js/loader/qtiLoader.min.js.map @@ -1 +1 @@ -{"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","includes","buildIdentifier","useSuffix","getUsedIdentifiers","isUndefined","replace","findInCollection","element","collectionNames","searchedSerial","found","isString","isArray","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","each","_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","depth0","helpers","partials","compilerInfo","helper","buffer","helperMissing","escapeExpression","__","hash","inlineRenderer","async","count","feedbacksToBeDisplayed","callstack","forEachRight","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","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","contains","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":["/github/workspace/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","/github/workspace/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 (usedIds && usedIds.includes(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 _.forEach(collectionNames, function (collectionName) {\n //get collection to search in (resolving case like interaction.choices.0\n var collection = element;\n _.forEach(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 _.forEach(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 _.forEach(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 && !usedIds.includes(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 _.forEach(this.metaData, function (v) {\n if (Element.isA(v, '_container')) {\n append(v);\n } else if (_.isArray(v)) {\n _.forEach(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 _.forEach(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 _.forEach(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 (typeof pciVar.base !== 'undefined') {\n return _.values(pciVar.base);\n } else if (pciVar.list) {\n return _.values(pciVar.list);\n }\n }\n throw new Error('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 _.forEach(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 _.forEach(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 _.forEach(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 _.forEach(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 _.forEach(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 _.forEach(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 _.forEach(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 _.forEach(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 _.forEachRight(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 _.forEach(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 _.forEach(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 _.forEach(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 _.forEach(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 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()] = interactionHelper\n .findChoices(interaction, choices, identificationType)\n .map(val => val.serial);\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] = choices[i].map(val => val.serial);\n }\n } else {\n choices = interactionHelper.shuffleChoices(interaction.getChoices());\n this.shuffledChoices[serial] = choices.map(val => val.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 _.forEach([].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 _.forEach(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);\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);\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 new 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 _.forEach(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 _.forEach(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',['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 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 ||\n (itemThemes.available && itemThemes.available.map(val => val.path).includes(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,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A,CAAA3V,MAAA,aACA,EAEA,CACA,GCzFA3F,MAAA,iCACA,kCACA,4BACA,UAAAk7B,YAAA,EACA,aAEA,OACA/7B,KAAA,UAAAA,MAAA,EAEA,IAAAk7B,aAAA,CAAAv7B,MAAA,CAAAq8B,GAAA,CAAAC,gBAAA,CACAF,YAAA,CAAAb,aAAA,CACA,CACA,CACA,GC9BAr6B,MAAA,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","includes","buildIdentifier","useSuffix","getUsedIdentifiers","isUndefined","replace","findInCollection","element","collectionNames","searchedSerial","found","isString","isArray","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","each","_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","depth0","helpers","partials","compilerInfo","helper","buffer","helperMissing","escapeExpression","__","hash","inlineRenderer","async","count","feedbacksToBeDisplayed","callstack","forEachRight","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","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","contains","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/aleksej/Work/OAT/code/nextgen-stack/tao/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/aleksej/Work/OAT/code/nextgen-stack/tao/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 (usedIds && usedIds.includes(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 _.forEach(collectionNames, function (collectionName) {\n //get collection to search in (resolving case like interaction.choices.0\n var collection = element;\n _.forEach(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 _.forEach(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 _.forEach(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 && !usedIds.includes(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 _.forEach(this.metaData, function (v) {\n if (Element.isA(v, '_container')) {\n append(v);\n } else if (_.isArray(v)) {\n _.forEach(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 _.forEach(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 _.forEach(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 (typeof pciVar.base !== 'undefined') {\n return _.values(pciVar.base);\n } else if (pciVar.list) {\n return _.values(pciVar.list);\n }\n }\n throw new Error('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 _.forEach(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 _.forEach(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 _.forEach(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 _.forEach(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 _.forEach(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 _.forEach(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 _.forEach(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 _.forEach(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 _.forEachRight(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 _.forEach(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 _.forEach(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 _.forEach(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 _.forEach(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 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()] = interactionHelper\n .findChoices(interaction, choices, identificationType)\n .map(val => val.serial);\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] = choices[i].map(val => val.serial);\n }\n } else {\n choices = interactionHelper.shuffleChoices(interaction.getChoices());\n this.shuffledChoices[serial] = choices.map(val => val.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 _.forEach([].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 _.forEach(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);\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);\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 new 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 _.forEach(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 _.forEach(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',['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 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 ||\n (itemThemes.available && itemThemes.available.map(val => val.path).includes(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,E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ACA,UAAAk7B,YAAA,EACA,aAEA,OACA/7B,KAAA,UAAAA,MAAA,EAEA,IAAAk7B,aAAA,CAAAv7B,MAAA,CAAAq8B,GAAA,CAAAC,gBAAA,CACAF,YAAA,CAAAb,aAAA,CACA,CACA,CACA,GC9BAr6B,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.map b/views/js/loader/taoQtiItem.min.js.map index 79a95d4dea..7e893dcebc 100644 --- a/views/js/loader/taoQtiItem.min.js.map +++ b/views/js/loader/taoQtiItem.min.js.map @@ -1 +1 @@ -{"version":3,"names":["define","_","Promise","eventifier","_requirejs","window","require","_defaultLoadingOptions","reload","loadModuleConfig","manifest","resolve","reject","requireConfigAliases","reqConfigs","modules","baseUrl","runtime","isArray","config","length","forEach","pciConfig","isString","push","data","defaults","paths","file","runtimeModules","typeIdentifier","model","reduce","arguments","acc","conf","id","merge","map","path","replace","isPortableElementProvider","provider","isFunction","load","portableElementRegistry","methods","_loaded","__providers","_registry","get","version","find","last","registerProvider","moduleName","resetProviders","loadProviders","options","self","loadPromise","providerLoadingStack","forIn","slice","call","shift","trigger","getAllVersions","all","versions","getRuntime","portableElement","assign","label","message","getCreator","creator","response","xmlns","getLatestCreators","lastVersion","hook","enabled","getBaseUrl","loadRuntimes","then","providers","loadStack","results","configLoadingStack","_pcis","include","indexOf","moduleConfigs","catch","err","loadCreators","requiredCreatorHooks","portableElementModel","creators","creatorHook","getTypeIdentifier","i","findIndex","module","enable","disable","isEnabled","$","__","featuresService","QtiElements","classes","itemBody","parents","contains","abstract","atomicBlock","atomicInline","simpleBlock","simpleInline","flowStatic","blockStatic","inlineStatic","flow","tableCell","caption","xhtml","col","colgroup","div","dl","dt","dd","hr","math","li","ol","ul","object","param","table","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","img","attributes","br","infoControl","qti","textRun","feedbackInline","feedbackBlock","rubricBlock","blockInteraction","inlineInteraction","gap","hottext","printedVariable","prompt","templateElement","templateBlock","templateInline","choiceInteraction","associateInteraction","orderInteraction","matchInteraction","hottextInteraction","gapMatchInteraction","mediaInteraction","sliderInteraction","uploadInteraction","drawingInteraction","graphicInteraction","hotspotInteraction","graphicAssociateInteraction","graphicOrderInteraction","graphicGapMatchInteraction","selectPointInteraction","textEntryInteraction","extendedTextInteraction","inlineChoiceInteraction","endAttemptInteraction","customInteraction","_container","cache","containable","children","getAllowedContainersElements","qtiClass","$container","getAllowedContainers","jqSelector","substring","document","filter","ret","getParentClasses","aClass","intersect","intersection","union","getChildClasses","getAllowedContents","recursive","checked","contain","j","child","uniq","isAllowedClass","qtiContainerClass","qtiContentClass","allowedClasses","type","cacheType","isBlock","is","isInline","topClass","isVisible","getAvailableAuthoringElements","tagTitles","commonInteractions","inlineInteractions","graphicInteractions","authoringElements","description","icon","short","tags","group","availableElements","elementId","element","Object","entries","qtiElements","customInteractionRegistry","getAuthoringData","enabledOnly","pciModel","RegExp","on","ciRegistry","registry","name","infoControlRegistry","icRegistry","pluginFactory","$window","pluginName","ns","throttleDelayMs","init","qtiCreatorContext","getHost","throttle","destroy","off","pluginLoader","windowResizer","content","qtiCreatorContextFactory","plugins","pluginRun","method","execStack","plugin","pluginFactories","getPlugins","getName","qtiClasses","assessmentItem","responseProcessing","_simpleFeedbackRule","stylesheet","figure","figcaption","outcomeDeclaration","responseDeclaration","associableHotspot","gapImg","gapText","hotspotChoice","inlineChoice","simpleAssociableChoice","simpleChoice","modalFeedback","_tooltip","prototype","hasOwnProperty","util","buildSerial","prefix","chars","charAt","Math","floor","random","buildId","item","suffix","exists","usedIds","TypeError","getUsedIds","includes","buildIdentifier","useSuffix","getUsedIdentifiers","isUndefined","findInCollection","collectionNames","searchedSerial","found","collectionName","collection","split","nameToken","elt","parent","Error","addMarkupNamespace","markup","$0","$1","$2","$3","$4","removeMarkupNamespaces","removeMarkupNamespace","getMarkupUsedNamespaces","namespaces","original","slash","node","rendererConfigHelper","getOptionsFromArguments","args","placeholder","subclass","renderer","arg","isRenderer","isPlainObject","console","log","_class","loggerFactory","rendererConfig","_instances","logger","Element","Class","extend","serial","rootElement","metaData","match","setAttributes","initContainer","initObject","getSerial","elts","getComposingElements","attr","value","prop","key","removeData","removeAttr","removeAttributes","warn","getAttributes","clone","attrNames","append","getBody","getObject","v","isA","getUsedClasses","composingElts","body","location","getRootElement","setRelatedItem","setRootElement","getRelatedItem","setRenderer","getRenderer","render","_renderer","tplData","defaultData","tag","rendering","resolveUrl","getData","renderTpl","replaceWith","postRender","altClassName","postRenderers","compact","getContainer","$scope","toArray","arr","isEmpty","addClass","className","clazz","_containClass","hasClass","removeClass","regex","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","isUsingTemplate","tpl","template","isValidTemplateName","tplName","getTemplateUriFromName","getTemplateNameFromUri","tplUri","uri","getTemplateNameFromResponseRules","outcomeRules","keys","isEqual","itemScore","responseIdentifiers","outcomeExpressions","moduleLoader","responseHelper","itemScoreHelper","loadPortableCustomElementProperties","rawProperties","properties","forOwn","JSON","parse","e","loadPortableCustomElementData","entryPoint","libraries","setNamespace","Loader","classesLocation","setClassesLocation","qtiClassesList","getRequiredClasses","loadRequiredClasses","callback","requiredClass","requiredClasses","required","category","addList","loadeded","QtiClass","getLoadedClasses","loadItemData","Qti","loadContainer","outcomes","outcome","buildOutcome","addOutcomeDeclaration","feedbacks","feedback","buildElement","addModalFeedback","stylesheets","addStylesheet","responses","responseRuleItemIndex","_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","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","pci","pic","namespace","namespaceModel","eventList","event","choiceCreated","choiceDeleted","deleted","getList","addedNamespace","events","initElementToWidgetListeners","join","container","widget","getNs","getNsModel","invalidator","completelyValid","invalidElements","valid","invalid","stateName","isValid","entity","_removeSelf","removed","related","getResponseDeclaration","removeGapImg","removeChoice","beforeRemove","removeElement","_removeElement","containerPropName","eltToBeRemoved","targetSerial","targetElt","getDefaultAttributes","_super","encode","decode","remove","createElements","values","qtiClassElt","promises","$doc","newElts","newBody","subClass","setElements","afterCreate","getCreatorContext","containerHelper","_this","IdentifiedElement","Mixin","augment","targetClass","methodName","_parent","apply","Container","returnValue","getElements","getElement","elementsData","renderDirect","contentModel","res","flatten","concat","Container$1","ContainerItemBody","Item","getInteractions","interactions","getOutcomeDeclaration","getOutcomes","removeOutcome","omit","elementCollection","getResponses","addNamespace","getNamespaces","locations","getSchemaLocations","apip","getApipAccessibility","removeStyleSheet","stylesheetExists","href","$dummy","html","$children","clear","Stylesheet","editable","title","media","ResponseProcessing","_Mathfloor","interactionHelper","convertChoices","outputType","c","findChoices","inputType","getChoice","getChoiceByIdentifier","shuffleChoices","r","f","n","k","tmp","serialToIdentifier","choiceSerial","themeLoader","themesHelper","Handlebars","getDocumentBaseUrl","protocol","host","pathname","hb","compile","_renderableClasses","_dependencies","_renderableSubclasses","_defaults","_isValidRenderer","classCorrect","pos","Renderer","registerRendererClass","list","success","_locations","_renderers","shuffledChoices","_getClassRenderer","setOption","setOptions","opts","getOption","getCustomMessage","elementName","messageKey","messages","getAssetManager","assetManager","getThemeLoader","qtiSubclass","decorators","isObject","before","after","setResponse","qtiInteraction","getResponse","resetResponse","getState","setState","getLoadedRenderers","register","renderersLocations","themeData","getCurrentThemeData","themes","base","available","theme","index","preload","reqClass","deps","requiredSubClasses","loaded","unload","setShuffledChoices","identificationType","getShuffledChoices","reshuffle","returnedType","getChoices","getRenderers","getLocations","url","getAbsoluteUrl","relUrl","absUrl","runtimeLocations","runtimeLocation","setAreaBroker","areaBroker","_areaBroker","getAreaBroker","getItemCreator","Renderer$1","build","defaultOptions","NewRenderer","assetManagerFactory","handle","normalizeStrategy","toString","VariableDeclaration","setDefaultValue","getDefaultValue","OutcomeDeclaration","gamp","_Mathmin","min","pairExists","pair","externalScoredValues","maxScore","setNormalMaximum","scoreOutcome","normalMaximum","interactionMaxScore","getNormalMaximum","isNumber","add","setMaxScore","hasInvalidInteraction","maxScoreOutcome","cardinality","normalMinimum","customOutcomes","parseFloat","externalScored","isAllResponseProcessingRulesNone","outcomesWithExternalScored","isResponsesEmpty","getMatchMaxOrderedChoices","choiceCollection","matchMax","parseInt","isNaN","sortBy","reverse","valueOf","choiceInteractionBased","mapDefault","max","maxChoice","minChoice","scoreMaps","requiredChoiceCount","totalAnswerableResponse","sortedMapEntries","missingMapsCount","maxChoices","minChoices","times","score","upperBound","orderInteractionBased","associateInteractionBased","maxAssoc","minAssoc","requiredAssoc","usedChoices","choicesIdentifiers","allPossibleMapEntries","infiniteScoringPair","possiblePairs","checkInfinitePair","countBy","count","forEachRight","mapEntry","choiceId","_usedChoices","cloneDeep","used","gapMatchInteractionBased","calculatePossiblePairs","pairs","matchSet1","matchSet2","getGaps","choice1","choice2","skippableWrongResponse","usedGaps","group1","group2","gapId","selectPointInteractionBased","mappedValue","sliderInteractionBased","textEntryInteractionBased","isPossibleResponse","patternMask","customInteractionBased","Array","XmlRenderer","XmlRendererPerInteractionRP","xmlRendererProviders","default","perInteractionRP","xmlRenderer","_render","error","setProvider","providerName","setProcessingType","setTemplate","notAllowTemplate","ModalFeedback","showHide","context","features","editableContainer","adaptive","timeDependent","\"xml:lang\"","base_authoring_lang","createResponseProcessing","createStyleSheet","createOutcomeDeclaration","createModalFeedback","deleteResponseDeclaration","rule","qtiIdPattern","patternContent","flags","defaultInvalidQtiIdMessage","invalidQtiIdMessage","isDisabled","maxQtiIdLength","urlUtil","request","languagesUrl","route","headers","\"Accept-version\"","languagesRequest","useLegacyFormatting","languages","memo","lang","useCKEFormatting","orientation","isRTLbyLanguageCode","_Mathfloor2","itemIdentifier","uniqueNumericIdentifier","dateString","Date","now","randString","defaultIdentifier","qtiIdentifier","lastIndexOf","decodeHtml","str","\"&\"","\"<\"","\">\"","\""\"","\"'\"","m","qtiNamespace","qtiSchemaLocation","\"http://www.imsglobal.org/xsd/imsqti_v2p2\"","creatorLoader","loadItem","langList","itemRdf","itemDataUrl","d","_ref3","languagesList","itemData","newObject","mapKey","loader","loadedItem","perInteractionRp","_ref4","itemScoreRP","identifierGenerationStrategy","newItem","\"\"","xsi","getBaseUrlByIdentifier","handlePortableElementLocation","source","relative","fullmatch","relPath","assetStrategies","portableAssetStrategy","itemThemes","moduleConfig","handleTheme","root_url","taomedia","external","base64","itemCssNoCache","\"simpleChoice.choiceInteraction\"","\"simpleChoice.orderInteraction\"","\"simpleAssociableChoice.matchInteraction\"","\"simpleAssociableChoice.associateInteraction\"","enableDragAndDrop","associate","associateDragAndDrop","gapMatch","gapMatchDragAndDrop","graphicGapMatch","graphicGapMatchDragAndDrop","order","orderDragAndDrop","commonRenderConfig","dom","_creatorRenderer","_configurableInteractions","_extractInteractionsConfig","interactionName","reset","$bodyEltForm","itemOptionForm","interactionOptionForm","choiceOptionForm","responseOptionForm","bodyElementOptionForm","getElementPropertyPanelArea","textOptionForm","modalFeedbackOptionForm","mediaManager","appendContainer","browseUrl","getFilesUrl","uploadUrl","fileUploadUrl","deleteUrl","fileDeleteUrl","downloadUrl","fileDownloadUrl","fileExistsUrl","mediaSourcesUrl","setData","done","_containers","_$containerContext","_getSelector","selector","setContext","getContext","eventType","triggerResponseChangeEvent","extraData","targetBlank","preventDefault","open","_$previousContext","commonRenderer","$context","restoreContext","_getElementSelector","getQtiClassFromXmlDom","$node","toLowerCase","_qtiClassNames","$elt","each","attrName","specified","_qtiAttributesNames","buildMath","$annotation","unescape","buildTooltip","targetHtml","contentId","contentHtml","\"aria-describedby\"","parseTable","$parsedTable","parseContainer","parseFigure","$parsedFigure","$figcaption","_placeholder","$qtiElement","$target","$content","_parsableElements","rubricblock","printedvariable","powerform","mappingindicator","_defaultOptions","image","parser","xmlStr","parser$1","simpleParser","xinclude","fileUrl","undef","stimulusXml","$wrapper","parseXML","$sampleXMLrootNode","$stimulus","mathNs","loadedClasses","xincludeLoader","xincludeHandlers","handlers","bundle","xincludeWidget","newHref","xi","dataBody","groups","refresh","handler","getXincludeHandlers","depth0","helpers","partials","program1","buffer","stack1","helper","subGroup","hash","escapeExpression","program3","program5","program7","program9","compilerInfo","functionType","inverse","noop","fn","program","disabled","iconFont","hider","insertInteractionTpl","insertSectionTpl","tooltipTpl","getGroupId","groupId","getGroupSectionId","addGroup","$sidebar","groupLabel","groupSectionId","$section","create","interactionAuthoringData","buildSubGroups","_events","interactiontoolbarready","getGroup","isReady","whenReady","interactionClass","hide","show","subGroupId","dev","$group","_subgroups","$interaction","$element","$subGroupPanel","$subGroupList","$cover","class","addInlineInteractionTooltip","$inlineInteractionsPanel","$tooltip","timer","lookup","css","position","zIndex","top","right","setTimeout","clearTimeout","_customInteractionTag","\"inline-interactions\"","getCustomInteractionTag","_getItemContainer","showPanel","$panel","$fold","openSections","closeSections","initFormVisibilityListener","$itemContainer","_staticElements","$formInteractionPanel","$formChoicePanel","$formResponsePanel","$formItemPanel","$formBodyElementPanel","$formTextBlockPanel","$formModalFeedbackPanel","$formStylePanel","$appearanceToggler","$menuLabel","$itemIcon","$styleIcon","_toggleAppearanceEditor","active","delay","enableSubGroup","toggleInlineInteractionGroup","disableSubGroup","heading","section","panel","closed","initSidebarAccordion","$sections","$allPanels","$allTriggers","$heading","$closer","$opener","action","preserveOthers","actions","close","forceState","classFn","_toggleSections","sections","_toggleSubGroup","interactionsToolbar","setUpInteractionPanel","liquidsInteractionAvailable","liquidsInteractionId","typeId","editLabelTxt","deleteTxt","downloadTxt","UrlParser","cssTpl","itemConfig","globalConfig","_getUri","_basename","style","$styleElem","styleElem","empty","currentItem","common","preparingMessageHtml","failMessageHtml","isInValidLocalTxt","customStylesheet","customStylesheetHref","erase","dontAppend","key1","key2","mSelector","mProp","property","verifyInit","save","isStyles","post","cssJson","stringify","stylesheetUri","fail","xhr","status","download","fileDownload","successCallback","httpMethod","listEntry","fileName","loadStylesheet","link","stylesheetLoad","isLocal","isInvalidLocal","isInit","pendingStylesheetsInit","initializing","_link","_href","_sep","getTime","checkCORS","when","ajax","addItemStylesheets","currentStylesheet","removeOrphanedStylesheets","removeStylesheetOnDeletePassage","passageSerial","getItem","resizerTarget","getJSON","_style","width","getStyle","cleanCache","helperMissing","styleEditor","genericFeedbackPopup","confirmDialog","styleSheetToggler","_createInfoBox","$messageBox","closeTrigger","fadeOut","cssToggler","uploader","customCssToggler","closest","stylesheetObj","input","labelBox","prev","isCustomCss","cssUri","resourcemgr","root","params","filters","pathParam","select","files","l","hooks","deleteFile","filePath","startsWith","$style","one","deleteStylesheet","cssLinks","initLabelEditor","downloadStylesheet","saveLabel","handleAvailability","linkDom","styleSheets","sheet","target","keyCode","\"sans-serif\"","serif","monospace","fontStacks","fontSelector","$selector","normalize","font","clean","resetButton","toLabel","toUpperCase","format","originalOption","select2","optGroup","normalizeFont","option","fontFamily","formatResult","formatSelection","first","dataAttrHandler","$popups","$trigger","$popup","$actionBar","baseOffsetTop","offset","height","maxHeight","isNull","$titleArea","$title","popup","_trigger","getTarget","$dragger","not","draggable","rgbToHex","color","toHexPair","inp","rgbArr","exec","colorSelector","colorPicker","widgetBox","titleElement","resetButtons","colorTriggers","colorTriggerLabels","currentProperty","widgetObj","setTitle","setTriggerColor","farbtastic","linkTo","$tmpTrigger","nodeName","setColor","has","$this","$colorTrigger","fontSizeChanger","$fontSizeChanger","itemSelector","figcaptionSelector","$item","$resetBtn","$input","itemFontSize","resizeFont","figcaptionSize","blur","oldSelector","itemResizer","targetWidth","innerWidth","itemWidthPrompt","sliderBox","slider","sliderSettings","range","start","resizeItem","slideDown","slideUp","noUiSlider","round","itemLoader","creatorRenderer","xincludeRenderer","interactionPanel","propertiesPanel","eventHelper","loadCustomInteractions","interactionsIds","loadInfoControls","itemCreatorFactory","itemCreator","silent","itemWidget","reasons","beforeSaveProcess","getItemPanelArea","usedCustomInteractionIds","getInteractionPanelArea","getContentCreatorPanelArea","getPropertyPanelArea","getConfig","requireAreas","partial","testId","cssClass","buttonTpl","defer","getMenuArea","removeProp","previewerFactory","previewHandler","currentTarget","enablePreviewIfNotEmpty","disablePreviewIfEmpty","_this2","readOnly","fullPage","pluginsOptions","createButton","translate","spreadClass","initHideOnPrint","siblings","printHandler","print","getTitleArea","uuid","dialog","saveChanges","changeTrackerFactory","wrapperSelector","changeTracker","eventNS","styleChanges","asking","originalItem","onStyleChange","detail","getSerializedItem","install","hasChanged","leave","uninstall","isConnected","DISABLE_FIGURE_WIDGET","stopImmediatePropagation","confirmBefore","click","confirmDlg","buttons","autoRender","autoDestroy","onSaveBtn","onDontsaveBtn","onCancelBtn","cancel","serialized","preview","exit","featureFlags","FEATURE_FLAG_DISABLE_FIGURE_WIDGET","qtiResponseIdPattern","validators","qtiResponseIdentifier","_qtiIdPattern","typeToMessage","invalidIdentifier","validateIdentifier","qtiValidators","validate","ids","URL","spinner","updateResponseDeclaration","updateCardinality","correct","getCorrect","setCorrect","createTooltip","formElementTooltip","dispose","validationCallback","validatorOptions","updateTitleContent","getAttrsOptions","allowNull","attrMethodNames","floatVal","minCallback","numericValue","isActualNumber","formElement","initWidget","$form","setChangeCallbacks","applyCallback","cb","callbackSimple","callbackWithValidation","saveInvalid","invalidate","validateOnInit","groupValidator","removeChangeCallback","getAttributeChangeCallback","allowEmpty","getMinMaxAttributeCallbacks","attributeNameMin","attributeNameMax","callbacks","getLowerUpperAttributeCallbacks","attributeNameLower","attributeNameUpper","listing","readonly","program4","program2","hidden","program6","interpretation","titleDelete","titleEdit","longInterpretation","program8","selected","panelTpl","listingTpl","getRpUsedVariables","rpXml","variables","$rp","renderListing","$outcomeEditorPanel","readOnlyRpVariables","scoreMaxScoreVisible","outcomesData","none","human","externalScoredOptions","externalMachine","isValidScoringTrait","_ns","externalScoredValidOptions","attachScoringTraitWarningTooltip","$field","widgetTooltip","warning","placement","removeScoringTraitWarningTooltip","$responsePanel","$outcomeContainer","outcomeElement","$labelContainer","$incrementerContainer","$identifierLabel","$identifierInput","isScoreOutcome","isScoringTraitValidationEnabled","incrementer","focus","$outcomeValueContainer","showScoringTraitWarningOnInvalidValue","newOutcome","outcomeEditor","menu","loadingBar","areaBrokerFactory","loadAreaBroker","menuLeft","menuRight","contentCreatorPanel","editorBar","toolbar","propertyPanel","itemPanel","itemPropertyPanel","itemStylePanel","modalContainer","elementPropertyPanel","indexController","reportError","stop","allowCustomTemplate","_ref5","contextPlugins","exclude","QtiPreview","QtiCreator","MathJax","$math","wrap","$wrap","Hub","Queue","setPortableElementPrefix","obj","useSource","runtimeSrc","src","allModulesFiles","moduleKey","_portableElementManifests","_moduleName","addManifestPath","pathToManifest","getModuleName","_requiredManifests","ok","origin","sideLoadingProviderFactory","portableElements","ckConfigurator$1","editor","toolbarType","underline","ckConfigurator","raphael","scaleRaphael","_Mathround","_Mathfloor3","basic","stroke","\"stroke-width\"","\"stroke-dasharray\"","\"stroke-linejoin\"","fill","\"fill-opacity\"","cursor","hover","selectable","layer","opacity","assoc","\"stroke-linecap\"","gstyle","\"imageset-rect-stroke\"","\"imageset-rect-no-stroke\"","\"imageset-img\"","\"order-text\"","\"font-family\"","\"font-weight\"","\"font-size\"","\"score-text-default\"","\"score-text\"","\"small-text\"","\"layer-pos-text\"","\"target-hover\"","\"target-success\"","\"assoc-layer\"","\"stroke-opacity\"","\"assoc-bullet\"","\"close-bg\"","\"touch-circle\"","shapeMap","poly","coordsValidator","rect","ellipse","circle","qti2raphCoordsMapper","coords","paper","raph2qtiCoordsMapper","x","y","cx","cy","rx","ry","GraphicHelper","setStyle","responsivePaper","resizePaper","givenWidth","containerWidth","stopPropagation","diff","$editor","outerWidth","maxWidth","$body","responsive","factor","imgWidth","containerHeight","imgHeight","changeSize","resize","resizer","innerHeight","imgId","setViewBox","createElement","shaper","shapeCoords","qtiCoords","raphaelCoords","toFront","flashing","updateElementState","touchEffect","touchstart","createTouchCircle","getBBox","createTarget","point","w","baseSize","half","targetSize","transform","tBBox","coord","mapper","result","bbox","radius","tCircle","animate","createText","left","disableEvents","setAttribute","fontSize","scaledFontSize","updateTitle","createShapeText","shape","shapeClick","createBorderedImage","padding","halfPad","rw","rh","ix","iy","iw","ih","border","shadow","glow","offsetx","offsety","move","duration","animation","animateWith","removeChild","highlightError","restoredState","evt","el","getPoint","clickPoint","getBoundingClientRect","pw","cw","ph","ch","pageX","pageY","clientX","clientY","scrollLeft","documentElement","scrollTop","Helpers0","instructionTpl","asString","Template","__initialized","_notificationLevels","Instruction","defaultMessage","currentMessage","level","$dom","isValidLevel","checkState","getId","update","timeout","setLevel","getLevel","setMessage","$$1","notifTpl","_instructions","instructionManager","validateInstructions","instruction","appendInstruction","validateCallback","removeInstructions","resetInstructions","minMaxChoiceInstructions","onError","choiceCount","minInstructionSet","msg","appendNotification","prepend","$notif","_remove","removeNotifications","informLoaded","leading","attach","$head","$link","onload","onerror","appendTo","detach","itemStylesheetHandler","regexChar","regexWords","patternMaskHelper","parsePattern","createMaxWordPattern","createMaxCharPattern","printBase","withType","_formatters","formatter","printList","printRecord","record","boolean","integer","float","string","directedPair","intOrIdentifier","PciPrettyPrint","pciPrettyPrint","_qtiModelPciResponseCardinalities","single","multiple","ordered","PciResponse","unserialize","mappedCardinality","responseValues","serialize","prettyPrint","fixMarkupMediaSources","imgSrcPattern","substr","resolved","PortableElement","adaptSize","waitForMedia","sizeAdapter","$elements","addEventListener","rel","resetSize","resetHeight","mimeTypes","delimetr","uploadMime","getMimeTypes","setExpectedTypes","types","selectedType","getExpectedTypes","includeEquivalents","equivalents","mimes","mime","mimeData","equivalent","Gap","objetLabel","objectLabel","GapImg","GapText","Hottext","InlineChoice","SimpleAssociableChoice_AssociateInteraction","SimpleAssociableChoice_MatchInteraction","unique","allowElimination","SimpleChoice_ChoiceInteraction","SimpleChoice_OrderInteraction","equal","Figcaption","imageTpl","widgetTpl","Template$1","showFigure","Figure","elem","FLOAT_LEFT_CLASS","FLOAT_RIGHT_CLASS","CENTER_CLASS","childElement","$figure","$img","program11","program13","program15","program17","program19","program21","role","alt","Img","Include","instructionMgr","pciResponse","interact","interactUtils","pairTpl","blockHelperMissing","setChoice","$choice","usage","_setChoice","responseMappingMode","$resultArea","$pair","thisPairSerial","$otherRepeatedPair","$otherPair","otherPairSerial","fadeIn","unsetChoice","$filledChoice","triggerChange","$parent","$sibling","isNumberOfMaxAssociationsZero","swapping","renderEmptyPairs","scrollObserverFactory","$scrollContainer","resetScrollObserver","currentDraggable","beforeY","beforeX","afterY","afterX","onScrollCb","getAttribute","webkitTransform","findScrollContainer","$el","ovf","dynamicDrop","getScrollContainer","draggedElement","_getRawResponse","_setInstructions","_iFrameDragFix","draggableSelector","iFrameDragFixOn","$activeDrop","resultSelector","fire","eq","relatedTarget","choiceSelector","$choiceArea","$activeChoice","scrollObserver","$bin","binSelector","_getChoice","isDragAndDropEnabled","dragOptions","dropOptions","scaleX","scaleY","_resetSelection","_unsetChoice","_isInsertionMode","_isModeEditing","_activateChoice","_handleChoiceActivate","_activateResult","_handleResultActivate","inertia","autoScroll","restrict","restriction","endOnly","elementRect","bottom","onstart","scale","calculateScale","onmove","moveElement","dx","dy","onend","restoreOriginalPosition","iFrameDragFixOff","styleCursor","overlap","ondragenter","ondragleave","dropzone","ondrop","tapOn","_setPairs","addedPairs","$emptyPair","$divs","next","sort","aIndex","bIndex","AssociateInteraction","listStyle","allowEliminationVisible","horizontal","promptId","KEY_CODE_SPACE","KEY_CODE_ENTER","KEY_CODE_LEFT","KEY_CODE_UP","KEY_CODE_RIGHT","KEY_CODE_DOWN","_triggerInput","$choiceBox","$choiceBoxes","isBoolean","_pseudoLabel","inputSelector","$qtiChoice","charCode","eliminator","dataset","eliminable","querySelector","originalEvent","classList","toggle","removeAttribute","highlightInvalidInput","$icon","choiceStyle","iconStyle","isEliminable","getCustomData","listStyleVisible","listStyles","pop","eliminated","ChoiceInteraction","_setVal","change","EndAttemptInteraction","strLimiter","ckEditor","converter","countTpl","expectedLength","minStrings","placeholderType","_styleUpdater","themeLoaded","_getNumStrings","_isMultiple","limiter","inputLimiter","placeholderText","getItemLanguage","itemLang","itemLocale","ckOptions","resize_enabled","secure","forceCustomDomain","language","num","_setPattern","_getFormat","hideXhtmlConstraints","hideXhtmlRecommendations","qtiItemStyle","$editorBody","qtiItem","currentStyle","getComputedStyle","\"background-color\"","_setUpCKEditor","listenTextInput","_getCKEditor","_setMultipleVal","setText","numericBase","maxStrings","editorValue","convertedValue","convert","_getTextareaValue","expectedLines","isCke","patternRegEx","$textarea","$charsCounter","$wordsCounter","maxWords","maxLength","$maxLengthCounter","$maxWordsCounter","ignoreKeyCodes","spaceKeyCodes","isComposing","hasCompositionJustEnded","acceptKeyCode","emptyOrSpace","txt","hasSpace","getCharBefore","getCharAfter","noSpaceNode","NODE_TEXT","isBlockBoundary","getPreviousNotEmptyNode","getPreviousNode","getText","previousSourceNode","getPreviousSourceNode","nodeElement","parentNode","ownerDocument","getNextNotEmptyNode","getNextNode","nextSourceNode","getNextSourceNode","cancelEvent","invalidToolip","patternHandler","newValue","debounce","keyLimitHandler","which","wordsCount","getWordsCount","charsCount","getCharsCount","middle","sel","getSelection","getRanges","startContainer","startOffset","endContainer","endOffset","getSelectedText","selectionStart","selectionEnd","textarea","updateCounter","nonKeyLimitHandler","dataValue","clipboardData","dataTransfer","limitByWordCount","limitByCharCount","insertHtml","end","handleCompositionStart","handleCompositionEnd","currentValue","handleBeforeInput","previousSnapshot","getSnapshot","createRange","moveToElementEditablePosition","selectRanges","raw","_ckEditorData","patt","_destroyCkEditor","instances","_stripTags","tempNode","innerHTML","textContent","setReadOnly","clearText","countChars","countWords","countExpectedLength","countMaxLength","countMaxWords","constraintHints","program14","program10","maxStringLoop","program12","program16","program18","program23","dompurify","program25","unless","program26","ExtendedTextInteraction","_choiceUsages","getGap","gapSelector","_handleChoiceSelect","_handleFilledGapSelect","_handleGapSelect","$flowContainer","filledGapSelector","$dragged","GapMatchInteraction","graphic","_getActiveElement","getById","_createPath","srcElement","destElement","onRemove","showCloser","closerBg","removeSet","closer","hideCloser","toBack","unclick","vset","_vsets","without","sx","sy","dest","srcBullet","destBullet","midPath","getPointAtLength","getTotalLength","selectLigne","attrs","_isMatchable","matchable","matching","_shapesSelectable","assocs","activeChoice","assocsElement","_shapesUnSelectable","_paperUnSelect","_renderChoice","maxAssociations","pull","background","responseValue","el1","el2","toRemove","GraphicAssociateInteraction","mouseEvent","activeDrop","isDirectedPairFlipped","flipDirectedPair","gapFillers","gapFiller","$gapImages","bgImage","getGapImg","usages","_selectShape","trackResponse","$clone","shapeOffset","activeOffset","currentCount","$gapList","$active","$imageBox","boxOffset","display","\"z-index\"","animationEnd","gapFillerImage","rElement","raphaelid","handleShapeSelect","onClickShape","_renderGapList","toggleActiveGapState","_setInactiveGapState","_setActiveGapState","gapFillersSelector","onClickGapImg","newSize","responseChoice","responseGap","items","GraphicGapMatchInteraction","_createTexts","texts","number","_renderOrderList","$orderList","$orderer","$orderers","_showText","transf","_hideText","_unselectShape","unsetNumbers","activeNumber","GraphicOrderInteraction","HotspotInteraction","pseudoLabel","$inupt","currentChoices","HottextInteraction","_emptyValue","optionSelector","choiceTooltip","getItemDir","itemDir","dirClass","opt","outerHTML","minimumResultsForSearch","containerCssClass","dropdownCssClass","$selectedIndex","selectedIndex","ev","choiceIdentifier","InlineChoiceInteraction","depth1","programWithDepth","inWarning","_onCheckboxSelected","_filterResponse","_inferValue","firstId","secondId","currentResponse","minAssociations","_countChoices","_maxMatchReached","association","overflow","_getChoiceDefinitionByIdentifier","matchMin","_countAssociations","rawResponse","rawChoices","_getRawChoices","matchset","superClosure","onMaxChoicesReached","report","onMatchMaxReached","originalBackgroundColor","originalColor","backgroundColor","responseCount","prependTo","MatchInteraction","inferValue","mediaplayer","canPreviewMedia","firefox","reFirefoxVersion","navigator","userAgent","webm","reWebM","maxPlays","canBePlayed","currentWidth","mediaElement","initMediaPlayer","mediaUrl","canPause","canSeek","volume","autoStart","loop","renderTo","timesPlayed","restorePlayerState","playerState","setVolume","muted","mute","startMuted","seek","pause","player","getPosition","getVolume","MediaInteraction","program27","orientationSelectionEnabled","_freezeSize","$orderArea","instructionMax","isSingleOrder","initialOrder","$resultItems","deactivateChoice","item1","item2","$choices","_isDropzoneVisible","$dropzoneElement","_insertDropzone","draggedMiddle","_getMiddleOf","previousMiddle","insertPosition","currentMiddle","_adjustDropzonePosition","draggedBox","$prevResult","$nextResult","prevMiddle","nextMiddle","elementBox","$iconAdd","$iconRemove","$iconBefore","$iconAfter","$dragContainer","_activeControls","_resetControls","_setSelection","_addChoiceToSelection","$results","_toggleResultSelection","_removeChoice","_moveResultBefore","$prev","_moveResultAfter","$next","hasBeenDroppedInResultArea","dropzoneIndex","selectors","unbindInteractEvents","OrderInteraction","_pciHooks","pciHook","notifyReady","pciInstance","notifyDone","onready","ondone","createPciInstance","pciTypeIdentifier","registeredPCI","qtiCustomInteractionContext","instanciator","getPci","_taoCustomInteraction","setPci","instance","commonPciRenderer","getRequiredModules","requireEntries","lib","createInstance","pciAssetManager","pciAssetResolve","resolveBy","initialize","setSerializedState","getSerializedState","sharedContext","defaultPciRenderer","setPCIConstructor","pciConstructor","pciConstructorDataKey","getPCIConstructor","contentLanguage","itemLanguage","userLanguage","locale","propVal","propKey","pciReadyCallback","readyPromise","templateVariables","boundTo","pciDoneCallback","getInstance","oncompleted","setReviewState","RESPONSE","info","imsPciRenderer","_setPciModel","pciRenderer","_getPciRenderer","onPci","serializedState","PortableCustomInteraction","Prompt","getRawResponse","points","addPoint","pointChange","isTouch","enableSelection","isResponsive","untouchstart","imageClicked","SelectPointInteraction","nouislider","_slideTo","sliderCurrentValue","sliderValue","direction","getPropertyValue","$sliderLabels","$sliderCurrentValue","$sliderValue","lowerBound","step","steps","inArray","reversedLabels","sliderSize","stepLabel","middleStep","leftOffset","middleValue","attributesNew","startValue","SliderInteraction","hideTooltip","showTooltip","textEntryTooltip","validateDecimalInput","separatorName","\".\"","\",\"","\" \"","thousandsSeparator","getThousandsSeparator","decimalSeparator","getDecimalSeparator","thousandsSeparatorName","decimalSeparatorName","escapedThousandsSeparator","escapedDecimalSeparator","regexPattern","decimalError","maxChars","updateMaxCharsTooltip","messageType","updatePatternMaskTooltip","inputValue","TextEntryInteraction","mimetype","uploadHelper","progressbar","previewer","modal","_Mathround2","_Mathmin2","resetGui","callResetGui","changeListener","_initialInstructions","_handleSelectedFiles","FileReader","bind","accept","_readyInstructions","validateFileType","expectedTypes","filetype","getMimeType","getMessageWrongType","userSelectedType","messageWrongType","expectedTypeLabels","filename","reader","base64Data","commaPosition","base64Raw","$previewArea","$originalImg","$largeDisplay","itemWidth","winWidth","fullHeight","imgNaturalWidth","isOversized","modalWidth","naturalWidth","$modalBody","modalOverlayClass","onloadstart","onprogress","_Mathceil","ceil","percentProgress","total","readAsDataURL","UploadInteraction","block","processSectionDelay","_Math","reference","$self","_checkContainerType","_getBodyDom","_setBodyDomClass","newClass","oldClass","_setDomClass","$bodyDom","wrapInner","setEncodedDataToDom","dataName","oldValue","_getEncodedDataString","setEncodedData","getEncodedData","removeEncodedData","hasEncodedData","matches","_prefix","coreContainerHelper","inline","feedbackStyle","modalFeedbackRenderer","fb","$modal","$itemBody","requiredHeight","outerHeight","startClosed","minHeight","_Object","previewOptions","_picHooks","taoQtiInfoControlContext","picHook","picInstance","proto","constructor","qtiInfoControlContext","_getPic","_taoInfoControl","picAssetManager","PortableInfoControl","PrintedVariable","QtiRenderer","rendererProvider","use","RubricBlock","rubric","summary","Table","Tooltip","tooltipDOM","renderedTooltip","exports","interactablePcis","isInteractionDisabledForPci","pciType","defineProperty","lodash","program28","program32","program30","_getTextContainerValue","innerText","udpateCounter","video","portableCustomInteraction","isInteractionDisabled","isReviewMode","i18n","downloadLink","\"min-width\"","\"min-height\"","ReviewRenderer","componentFactory","pluginLoaderFactory","componentTpl","itemAuthoringFactory","api","itemAuthoring","spread","getColUnits","cssClasses","colMatch","setUnitsFromClass","units","jQuery","_Mathabs","abs","_Mathround3","_Mathmax","t","u","o","s","expr","visible","andSelf","ui","BACKSPACE","COMMA","DELETE","DOWN","END","ENTER","ESCAPE","HOME","LEFT","NUMPAD_ADD","NUMPAD_DECIMAL","NUMPAD_DIVIDE","NUMPAD_ENTER","NUMPAD_MULTIPLY","NUMPAD_SUBTRACT","PAGE_DOWN","PAGE_UP","PERIOD","RIGHT","SPACE","TAB","UP","_focus","scrollParent","ie","uniqueId","removeUniqueId","createPseudo","focusable","tabbable","appendChild","offsetHeight","borderWidth","support","selectstart","jquery","camelCase","ie6","disableSelection","unbind","nodeType","hasScroll","isOverAxis","isOver","h","scrollbarWidth","offsetWidth","clientWidth","getScrollInfo","isWindow","scrollWidth","scrollHeight","getWithinInfo","of","g","within","E","collision","S","at","T","N","C","my","offsetFractions","marginLeft","marginTop","targetHeight","elemWidth","elemHeight","collisionPosition","collisionWidth","collisionHeight","bgiframe","using","vertical","important","fit","flip","flipfit","getElementsByTagName","visibility","margin","insertBefore","firstChild","cssText","uiBackCompat","cleanData","triggerHandler","Widget","_createWidget","_proto","_childConstructors","_superApply","widgetEventPrefix","widgetName","widgetBaseClass","widgetFullName","bridge","pushStack","_init","defaultElement","eventNamespace","_getCreateOptions","bindings","hoverable","_on","defaultView","parentWindow","_create","_getCreateEventData","_destroy","_setOptions","_setOption","guid","delegate","_off","undelegate","_delay","_hoverable","mouseenter","mouseleave","_focusable","focusin","focusout","Event","isDefaultPrevented","effect","isEmptyObject","complete","effects","easing","queue","metadata","mouseup","distance","_mouseInit","_mouseDown","started","_mouseDestroy","_mouseMoveDelegate","_mouseUpDelegate","_mouseStarted","_mouseUp","_mouseDownEvent","_mouseCapture","mouseDelayMet","_mouseDelayTimer","_mouseDistanceMet","_mouseDelayMet","_mouseStart","_mouseMove","documentMode","button","_mouseDrag","_mouseStop","mouse","addClasses","axis","connectToSortable","containment","cursorAt","grid","iframeFix","refreshPositions","revert","revertDuration","scope","scroll","scrollSensitivity","scrollSpeed","snap","snapMode","snapTolerance","stack","_getHandle","_createHelper","_cacheHelperProportions","ddmanager","current","_cacheMargins","cssPosition","positionAbs","margins","_getParentOffset","_getRelativeOffset","originalPosition","_generatePosition","originalPageX","originalPageY","_adjustOffsetFromHelper","_setContainment","_clear","dropBehaviour","prepareOffsets","dragStart","_convertPositionTo","_uiHash","drag","drop","dropped","dragStop","helperProportions","offsetParent","tagName","relative_container","cancelHelperRemoval","sortables","shouldRevert","_helper","_intersectsWith","containerCache","fromOutside","_cursor","_opacity","overflowOffset","snapElements","String","snapping","release","snapItem","makeArray","_zIndex","activeClass","greedy","hoverClass","tolerance","isover","isout","proportions","droppables","_activate","_deactivate","_over","_out","_drop","absolute","clickOffset","parentsUntil","greedyChild","MAX_UNITS","_syncHandleHeight","$row","_deleteResizables","_setColUnits","newUnits","oldUnits","$parentRow","totalUnits","_createResizables","createResizables","marginWidth","activeWidth","$col","$nextCol","nextMin","unitWidth","activeHeight","$activeZone","$handle","_syncOutlineHeight","$overlay","\"border-right-width\"","nextUnits","preserveGlobalEvents","syncHandleHeight","selection","containElement","commonAncestorContainer","selectedChildNodes","cloneContents","childNodes","wrapSelection","rangeCount","getRangeAt","cloneRange","surroundContents","removeAllRanges","addRange","unwrapSelection","$editable","textWrapper","wrappedText","unwrap","resizable","contentHelper","getContent","inner","destroyGridWidgets","serializeElements","getChangeCallback","$pseudoContainer","getChangeCallbackForBlockStatic","contents","nodeValue","existingElements","$qtiElementWidget","inClone","arrow","leftCover","popupTpl","contentTpl","$anchor","positions","_computePosition","_renderContent","_activatePanel","_activateElement","_done","_cancel","getPopup","reposition","activatePanel","groupName","activateElement","popupWidth","arrowWidth","_anchor","_popup","_arrow","_filterInteractions","filtered","unshift","_pushState","currentState","registeredStates","stateStack","_popState","createEventName","eventName","$original","buildContainer","offEvents","getRequiredOptions","initCreator","ready","changeState","getCurrentState","superStateName","exitedStates","enteredStates","superState","difference","_superStateName","registerState","State","registerStates","states","afterStateInit","beforeStateInit","afterStateExit","beforeStateExit","rebuild","postRenderOpts","contentEditableState","qtiElementEventName","live","eventNames","$document","eventNameToken","what","why","classTitles","getQtiClassTitle","defaultConfig","responseButton","answerEditors","questionEditors","contentButton","undo","structure","bar","isTextButton","handleConfig","extendDefaultConfig","buildToolbar","tlbWrapper","tlb","box","ic","buttonConfig","barConfig","defaultBarConfig","offsetTop","StaticWidget","createToolbar","\"data-serial\"","createOkButton","\"data-edit\"","_isValidStateDefinition","superStates","$editableWidgets","$parentWidget","Clone","initFn","exitFn","createBundle","arg0","arg1","arg2","stateBundle","newStates","excluded","throwMissingRequiredImplementationError","functionName","stateFactory","SleepState","StaticStateSleep","_widget","gridContentHelper","$placeholder","$widget","changeInnerWidgetState","_changeInnerWidgetState","outerWidget","innerWidget","checkIfWidgetShouldSleep","outerContainer","getEditorBarArea","$modalFeedbacksArea","Active","deletingInfoTpl","_timeout","undoDeleting","_confirmDeletion","fadeDelay","_bindEvents","ctrlKey","metaKey","deletingHelper","createInfoBox","widgets","\"margin-left\"","confirmDeletion","_Mathround4","distributeUnits","cols","_cols","minimized","decimals","avg","refactoredTotalUnits","refactoredUnits","decimal","middleUnitValue","lastUnitValue","redistributeUnits","totalRefactoredUnits","negative","positive","rounded","distribute","redistribute","autogeneratedCodeStartCommentText","autogeneratedCodeEndCommentText","autogeneratedCodeStartComment","autogeneratedCodeEndComment","isCommentNode","Node","COMMENT_NODE","decodeURIComponent","findAutogeneratedCodeCommentSibling","siblingDirection","commentNode","siblingNode","commentsByDirection","previousSibling","nextSibling","isWrapped","wrapWithAutogeneratedComment","removeAutogeneratedComments","replaceAll","search","replacement","removeAutogeneratedCommentNodes","prevCommentNode","nextCommentNode","gridUnits","comments","gridHelper","DeletingState","updateBody","$elementToRemove","getElementToRemove","hideWidget","showMessage","showWidget","messageBox","$tbody","$tds","$subCol","$colMulti","_isCol","attrClass","_redistributeUnits","$otherCols","$thisCol","deleteElement","factory","TextBlockStateSleep","mathJax","qtiImage","qtiMedia","qtiInclude","horizontalRule","furiganaPlugin","CKEditor","featureFlag","_buildEditor","$editableContainer","$toolbarArea","getToolbarArea","isHiddenPlugin","registeredPluginNames","registered","removePlugins","removePluginName","languagePluginEnabled","ckConfig","dtdMode","autoParagraph","enterMode","ENTER_P","floatSpaceDockedOffsetY","language_list","sharedSpaces","taoQtiItem","insert","tempWidget","$newContent","$newImgPlaceholder","insertAfter","_htmlEncode","createdWidget","createdElement","_activateInnerWidget","focusManager","instanceReady","markupChanged","_detectWidgetDeletion","managePlaceholder","_rebuildWidgets","restoreState","shieldInnerContent","_shieldInnerContent","autofocus","configLoaded","getTooltypeFromContainer","highlight","afterPaste","togglePlaceholder","nonEmptyContent","removePlaceholder","placeholderClass","disableCellAlignment","_find","dataAttribute","$collection","widgetInner","_findWidgetContainer","undoCmd","getCommand","resetUndo","undoManager","addShield","$shield","containerWidget","listenToWidgetCreation","targetWidget","encodedStr","passthroughInnerContent","editorFactory","disableAutoInline","hasEditor","buildEditor","editorOptions","languagesData","buildTasks","destroyEditor","destructTasks","escape","scrolling","textBlockCssClass","scrollingAvailable","scrollingHeights","typeCaster","wrapperTextCls","wrapperIncludeCls","wrapperFocusCls","newUIclass","isScrolling","strToBool","selectedHeight","initSelect","isScroll","wrapContent","wrapType","setScrollingHeight","cutScrollClasses","clearClasses","htmlEditor","formTpl","itemScrollingMethods","wrapperCls","TextActive","initForm","changeCallback","blockCls","changeCallbacks","scrollingHeight","toolbarTpl","TextWidget","\"data-qti-class\"","\"data-html-editable\"","$tlb","adderTpl","elementSelector","$editorPanel","_getItemBody","_initInsertion","_wrap","$colRow","$itemEditorPanel","_insertElement","_endInsertion","_appendButton","$adder","$widgetParent","onPciReady","\"data-new\"","$colParent","$widgetElem","widgetElem","$textBlock","ckeProtector","observeContentChanges","contextDomNode","MutationObserver","WebKitMutationObserver","MozMutationObserver","observer","mutations","observe","subtree","characterData","getSelector","protect","selectorParam","iWidth","iHeight","cover","getProtectedWidgetBySerial","positionCover","wrapper","iOffset","unprotect","groupToggler","$colorPicker","$colorPickerInput","allQtiClasses","DOMPurify","htmls","markupSelector","extractHtmlFromMarkup","containerEditors","resetRenderer","editorContent","cleanup","sanitize","createFakeWidget","markupStr","$found","_eventName","_buildArrows","insertZoneWidth","$insertRight","_removeArrows","$insertLeft","_arrowFall","$insert","interval","relY","$arrow","setInterval","pow","clearInterval","dtdHandler","_qtiHtmlEditableTypes","targetFinder","dh","inheritedFunctions","fns","Function","getTargetsFor","$targets","$qtiContainers","getParentsOf","parentSelector","$qtiContainer","$closest","_Mathmax2","_destroyDroppableInlines","_destroyDroppableBlocks","_toBeRemoved","_restoreTmpCol","_getNewRow","\"data-units\"","_getNewCol","originalClasses","droppableGridEditor","createDroppableBlocks","minUnits","$colInitial","initialPosition","$cols","_appendPlaceholder","_resetPlaceholder","_insertBetween","distributedUnits","$newCol","newUnit","cumulatedUnits","_appendToNextRow","_resetColsHeight","addBack","prevAll","nextAll","$previousCol","$newRow","$selectedCol","_mapQtiToHtml","_pulseTimer","_pulse","intervalDuration","createDroppableInlines","_showPlaceholder","createTextNode","\"data-inline\"","parentOffset","relX","destroyDroppables","droppable","_insertableDefaultsOptions","createInsertable","$to","createDraggable","createMovable","\"initial-position\"","\"initial-class\"","_destroyDraggables","isCreated","gridEditor","elementClass","addInsertables","$elts","$grid","createMovables","setContent","MathEditor","tex","processing","$buffer","mathMLstr","_stripMathTags","_stripComments","setTex","texStr","_processArguments","mathEditor","renderFromMathML","jaxQueue","mathStr","_wrapMathTags","Push","$script","renderFromTex","texJax","_getJaxByElement","texToMathML","elementJax","displayBlock","toMathML","restart","Callback","After","_Mathround5","variadic","numFixedArgs","__slice","varArg","iterator","generator","send","yield_","cons","pray","cond","prayDirection","dir","prayWellFormed","leftward","rightward","ends","insistOnInterVer","MathQuill","MQ1","getInterface","MQ","blockId","ctrlr","byId","controller","APIClasses","KIND_OF_MQ","currentOptions","newOptions","processor","optionProcessors","MIN","MAX","L","R","Options","registerEmbed","EMBEDS","AbstractMathQuill","P","Progenote","__controller","__options","__mathquillify","classNames","createTextarea","jQ","latex","exportText","renderLatexMath","blurred","exportLatex","reflow","postOrder","kind","EditableField","super_","delegateMouseEvents","editablesTextareaEvents","write","writeLatex","scrollHoriz","cmd","notify","klass","LatexCmds","replaces","replaceSelection","createLeftOf","insAtRightEnd","selectLeft","clearSelection","moveToDirEnd","insAtDirEnd","moveToLeftEnd","moveToRightEnd","keystroke","typedText","dropEmbedded","elementFromPoint","Embed","API","defAPIClass","APIClass","mq","Controller","RootBlock","RootBlockMixin","names","makeTextBlock","TextBlock","ctrlSeq","htmlTemplate","insLeftOfMeUnlessAtEnd","ancestorCmd","insLeftOf","insRightOf","DelimsMixin","jQadd","delimjQs","contentjQ","bindCharBracketPair","OPP_BRACKS","CharCmds","Bracket","mqCmdId","mqBlockId","moreArgs","ownProperty","undefined","SuperclassBare","_superclass","definition","Bare","extensions","mixin","def","ext","insDirOf","Point","copy","pt","uniqueNodeId","jQize","cmdId","createDir","adopt","selectChildren","leftEnd","rightEnd","Selection","bubble","ancestor","recurse","descendant","eachChild","Fragment","foldChildren","fold","withDirAdopt","withDir","oppDir","disown","accum","disowned","Cursor","initParent","_jQ","blink","upDownCache","intervalId","withDirInsertAt","oldParent","insAtLeftEnd","jumpUpDown","from","to","cached","unwrapGramp","gramp","greatgramp","uncle","cousin","siblingDeleted","startSelection","anticursor","ancestors","endSelection","lca","antiAncestor","selectionChanged","deleteSelection","seln","wrapAll","notifyees","onNotify","interfaceVersion","noConflict","origMathQuill","Parser","parseError","stream","skip","eof","or","alternative","onSuccess","onFailure","failure","newStream","nextParser","many","xs","firstFailure","secondFailure","succeed","atMost","atLeast","two","len","expected","head","re","letter","letters","digit","digits","whitespace","optWhitespace","any","saneKeyboardEvents","_StringfromCharCode","fromCharCode","keyVal","KEY_VALUES","modifiers","altKey","shiftKey","checkTextareaFor","checker","checkTextarea","timeoutId","shouldBeSelected","hasSelection","handleKey","keydown","onKeydown","keypress","onKeypress","onBlur","onPaste","pastedText","paste","focusBlurEvents","windowBlur","blurTimeout","ctrlDeleteDir","backspace","escapeDir","selectRight","moveLeft","moveRight","moveUp","moveDown","deleteForward","moveOutOf","moveTowards","deleteOutOf","deleteTowards","unselectInto","selectOutOf","selectTowards","moveUpDown","dirInto","dirOutOf","leftRightIntoCmdGoes","updown","moveDir","deleteDir","hadSelection","selectDir","latexMathParser","commandToBlock","MathBlock","joinBlocks","blocks","firstBlock","variable","Letter","symbol","VanillaSymbol","controlSequence","cmdKlass","command","mathGroup","mathSequence","mathBlock","optMathBlock","latexMath","optBlock","finalizeInsert","siblingCreated","renderLatexText","mathMode","rootMathCommand","RootMathCommand","createBlocks","rootMathBlock","escapedDollar","textChar","latexText","commands","ultimateRootjQ","mousemove","docmousemove","textareaSpan","rootjQ","unselectable","nodeId","targetParent","rootRect","scrollBy","overLeft","overRight","substituteTextarea","setTextareaSelection","forceIERedraw","textareaSelectionTimeout","statelessClipboard","selectFn","staticMathTextareaEvents","keyboardEventsShim","MathElement","MathCommand","textTemplate","replacedFragment","numBlocks","placeCursor","newBlock","updownInto","getBounds","bounds","cmdBounds","leftLeftBound","blockBounds","tokens","token","nesting","child_text","Symbol","BinaryOperator","spaceBehavesLikeTab","chToCmd","Digit","StaticMath","innerFields","MathField","returned","RootMathBlock","fuseChildren","textPcDom","textPc","TextPiece","replacedText","textBlock","textContents","appendText","leftBlock","leftPc","avgChWidth","approxPosition","splitRight","displ","prevDispl","anticursorPosition","cursorPosition","newTextPc","endChar","appendData","prependText","insertData","insTextAtDirEnd","newPc","splitText","deleteData","textnormal","textrm","textup","textmd","italic","italics","emph","textit","textsl","bold","textbf","sf","textsf","texttt","textsc","uppercase","lowercase","RootTextBlock","TextField","LatexCommandInput","_replacedFragment","renderCommand","notin","cong","equiv","oplus","otimes","ne","neq","ast","star","loast","lowast","therefor","therefore","cuz","because","propto","asymp","approx","isin","ni","notni","niton","notcontains","doesnotcontain","subset","supset","superset","nsub","notsub","nsubset","notsubset","nsup","notsup","nsupset","notsupset","nsuperset","notsuperset","sube","subeq","subsete","subseteq","supe","supeq","supsete","supseteq","supersete","superseteq","nsube","nsubeq","notsube","notsubeq","nsubsete","nsubseteq","notsubsete","notsubseteq","nsupe","nsupeq","notsupe","notsupeq","nsupsete","nsupseteq","notsupsete","notsupseteq","nsupersete","nsuperseteq","notsupersete","notsuperseteq","naturals","Naturals","primes","Primes","projective","Projective","probability","Probability","Z","integers","Integers","Q","rationals","Rationals","reals","Reals","complex","Complex","complexes","Complexes","complexplane","Complexplane","ComplexPlane","H","Hamiltonian","quaternions","Quaternions","quad","emsp","qquad","diamond","bigtriangleup","ominus","uplus","bigtriangledown","sqcap","triangleleft","sqcup","triangleright","odot","circledot","bigcirc","dagger","ddagger","wr","amalg","models","prec","succ","preceq","succeq","simeq","mid","ll","gg","parallel","nparallel","bowtie","sqsubset","sqsupset","smile","sqsubseteq","sqsupseteq","doteq","frown","vdash","dashv","nless","ngtr","longleftarrow","longrightarrow","Longleftarrow","Longrightarrow","longleftrightarrow","updownarrow","Longleftrightarrow","Updownarrow","mapsto","nearrow","hookleftarrow","hookrightarrow","searrow","leftharpoonup","rightharpoonup","swarrow","leftharpoondown","rightharpoondown","nwarrow","ldots","cdots","vdots","ddots","surd","triangle","ell","flat","natural","sharp","wp","bot","clubsuit","diamondsuit","heartsuit","spadesuit","parallelogram","square","oint","bigcap","bigcup","bigsqcup","bigvee","bigwedge","bigodot","bigotimes","bigoplus","biguplus","lfloor","rfloor","lceil","rceil","opencurlybrace","lbrace","closecurlybrace","rbrace","lbrack","rbrack","int","integral","vert","perp","perpendicular","nabla","del","hbar","AA","Angstrom","angstrom","ring","circ","bull","bullet","setminus","smallsetminus","neg","dots","ellip","hellip","ellipsis","hellipsis","converges","darr","dnarr","dnarrow","downarrow","dArr","dnArr","dnArrow","Downarrow","diverges","uarr","uparrow","uArr","Uparrow","rarr","rightarrow","implies","rArr","Rightarrow","gets","larr","leftarrow","impliedby","lArr","Leftarrow","harr","lrarr","leftrightarrow","iff","hArr","lrArr","Leftrightarrow","Re","Real","real","Im","imag","imagin","imaginary","Imaginary","part","infty","infin","infinity","alef","alefsym","aleph","alephsym","xist","xists","exist","and","land","wedge","lor","vee","O","emptyset","oslash","Oslash","nothing","varnothing","cup","cap","deg","degree","ang","angle","measuredangle","autoSubscriptNumerals","Variable","isItalic","SupSub","autoCommands","_maxLength","cmds","dict","OperatorName","nonOperatorSymbol","autoCmds","italicize","bool","finalizeTree","autoUnItalicize","autoOps","autoOperatorNames","outer","word","isBuiltIn","BuiltInOpNames","TwoWordOpNames","AutoOpNames","limsup","liminf","projlim","injlim","mostOps","builtInTrigs","autoTrigs","moreNonstandardOps","operatorname","space","prime","backslash","NonSymbolaSymbol","alpha","beta","gamma","delta","zeta","eta","theta","iota","kappa","mu","nu","rho","sigma","tau","chi","psi","omega","phi","phiv","varphi","epsilon","epsiv","varepsilon","piv","varpi","sigmaf","sigmav","varsigma","thetav","vartheta","thetasym","upsilon","upsi","gammad","Gammad","digamma","kappav","varkappa","rhov","varrho","pi","π","lambda","Upsilon","Upsi","upsih","Upsih","Gamma","Delta","Theta","Lambda","Xi","Pi","Sigma","Phi","Psi","Omega","forall","LatexFragment","frag","PlusMinus","contactWeld","pm","plusmn","plusminus","mp","mnplus","minusplus","sdot","cdot","Inequality","strict","strictness","swap","less","ctrlSeqStrict","htmlStrict","textStrict","greater","lt","gt","le","leq","ge","geq","Equality","divide","divides","sim","div_style","transformPropNames","WebkitTransform","MozTransform","OTransform","msTransform","transformPropName","calculateMarginRight","innerjQ","Style","mathrm","mathit","mathbf","mathsf","mathtt","overline","overrightarrow","overleftarrow","TextColor","textcolor","cls","supSubsRequireOperand","supsub","addBlock","respace","charsThatBreakOutOfSupSub","upInto","upOutOf","downOutOf","downInto","oppositeSupsub","lastChild","subscript","superscript","supscript","SummationNotation","sumStartsWithNEquals","simplify","supOrSub","sum","summation","prod","product","coprod","coproduct","Fraction","frac","dfrac","cfrac","fraction","LiveFraction","over","SquareRoot","sqrt","nthroot","NthRoot","Vec","vec","side","sides","oppBrack","expectedSide","restrictMismatchedBrackets","\"(\"","\"[\"","closeOpposing","brack","deleteSide","outward","sib","farEnd","wasSolid","origEnd","intentionalBlur","\")\"","\"]\"","\"{\"","\"}\"","\"\\\\{\"","\"\\\\}\"","\"⟨\"","\"⟩\"","\"\\\\langle \"","\"\\\\rangle \"","\"|\"","langle","rangle","Binomial","binom","binomial","Choose","choose","MathQuillMathField","registerInnerField","embed","htmlString","layoutTpl","mathField","allToolGroups","toolGroup","createToolGroup","tools","toolGroupId","$toolGroup","\"data-identifier\"","toolId","toolConfig","allTools","createTool","\"data-latex\"","\"data-fn\"","desc","eventNs","exp","ln","cos","sin","lte","gte","mathInputFactory","mathInputApi","setLatex","latexString","getLatex","_initMathQuill","MQConfig","edit","onChange","$component","$toolbar","$inputField","component","choiceSelectorTpl","formatOption","createOptionTitle","threshold","fullText","shortText","titleLength","isCardinality","choiceText","$selectBox","dropdownAutoWidth","setSelectedChoices","getSelectedChoices","choiceSelectorFactory","_selectedChoices","choicesId","listenStateChange","getStates","liveXmlPreview","$destination","rawXml","_printXml","_formatXml","vkbeautify","$code","Prism","highlightElement","dummyElement","maths","finalOptions","searchRecurse","parentElement","checkFigureInItemData","makeDraggable","makeResizable","makeStackable","makeWindowed","resizableEdges","windowPopupFactory","specs","windowPopup","edges","stackingScope","convertXMLToHTML","xmlNode","htmlNode","childNode","ELEMENT_NODE","TEXT_NODE","parseXmlToDom","xmlString","DOMParser","xmlDoc","parseFromString","loadXIncludeElement","xiIncludeElementHref","processContentItem","contentItem","tempDiv","xiIncludeElements","querySelectorAll","xiIncludePromises","flatMap","xiElement","newContent","loadByElementPages","pages","containsXIInclude","pageUpdatePromises","page","hasXIInclude","contentPromises","updatedContentItems","Choice","getInteraction","QtiChoice","QtiHotspot","QtiAssociableHotspot","QtiGap","QtiObject","getMediaType","audio","QtiGapImg","ContainerChoice","QtiContainerChoice","QtiGapText","fixed","QtiHotspotChoice","ContainerInline","QtiInlineChoice","QtiSimpleAssociableChoice","QtiSimpleChoice","ContainerFigcaption","getNamespace","relatedItem","nsUriFragment","defaultNsName","defaultNsUri","NamespacedElement","ContainerFigure","imgElements","addCaption","removeCaption","getDefaultMethods","getDefaultProperties","afterCreatePromise","creatorModule","getMarkupTemplate","createResponse","renderMarkup","markupTpl","markupData","getDefaultMarkupTemplateData","getMarkupData","updateMarkup","escapedIdentifier","entry","ResponseDeclaration","getFeedbackRules","responseId","cardinalities","comparison","SimpleFeedbackRule","_comparedValues","setFeedbackElse","_toString","templateUri","getTemplate","resetCorrect","setMappingAttribute","removeMappingAttribute","getMappingAttribute","toggleMappingForm","mappingDisabled","setMapEntry","caseSensitive","mapKeys","mapKeysReverse","removeMapEntry","canBeEmpty","getMapEntries","removeMapEntries","createFeedbackRule","getFeedbackRule","deleteFeedbackRule","createFeedbackElse","deleteFeedbackElse","createOutcomeDeclarationIfNotExists","deleteResponse","QtiInteraction","_type","choiceShuffle","interactionData","renderedChoice","Interaction","BlockInteraction","editableInteraction","shuffle","createChoice","rank","InlineInteraction","ContainerInteraction","getNextPlaceholder","allChoices","existingChoicesLabels","choiceBody","placeHolderIndex","placeHolderPrefix","placeHolder","createGap","$serialElt","QtiBlockInteraction","QtiObjectInteraction","QtiGraphicInteraction","backgroundImage","GraphicInteraction","AssociableHotspot","getGapImgs","graphicGapInteraction","createGapImg","SimpleAssociableChoice","ObjectInteraction","autostart","minPlays","propNames","propName","getProperties","getMarkupNamespace","markupNs","defaultMarkupNsName","defaultMarkupNsUri","setMarkupNamespace","CustomElement","CustomInteraction","pciReadyCallbacks","triggerPciReady","offPci","triggerPci","_throwMissingImplementationError","fnName","nsName","_stripNamespace","_isEmptyMathML","hasContent","mathText","parseHTML","getAnnotation","removeAnnotation","getMathML","Math$1","mathModel","_pciModels","pciCreatorContext","readyStack","onReady","triggerReady","powerForm","delimiter","field","mappingIndicator","view","ContainerTable","Table$1","tooltipContent","tooltipContentId","blockAdder","interations","history","back","backHandler","getMenuLeftArea","multiColEnabled","separatorEnabled","dualColClass","separatorClass","addClassToTarget","removeClassFromTarget","qtiCreatorProperties","$stylePanel","$layoutEditorPanel","multiColManager","$checkbox","setCheckBox","isCheckboxChecked","setTargetClass","separatorManager","ChoiceWidget","listenToInteractionStates","invalidInfoBoxTpl","$itemEditorBar","Sleep","ChoiceStateSleep","ChoiceStateActive","interactionShuffle","formElementHelper","initShufflePinToggle","$shuffleToggle","pinIcon","unPinIcon","toggleVisibility","callee","initDelete","QuestionState","contentToolbarTpl","ChoiceStateQuestion","removeToolbar","shuffleIsVisible","interactionSerial","Answer","ChoiceStateAnswer","ChoiceStateChoice","_updateChoiceIdentifierInResponse","oldId","newId","escapedOldId","_updateChoiceIdentifier","_get","$choiceContainer","ex","_cache","_setCache","_getCache","updateChoiceIdentifier","updateResponseIdentifier","identifierHelper","GapStateChoice","gapTpl","GapStateQuestion","GapWidget","CreatorGap","SimpleAssociableChoiceStateChoice","GapTextStateChoice","Question","GapTextStateQuestion","ENTER_BR","GapTextWidget","CreatorGapText","SimpleChoiceStateChoice","SimpleChoice","HottextStateChoice","HottextStateQuestion","inlineStaticElements","hottextHtmlReplacement","hottextBody","HottextWidget","CreatorHottext","initStateQuestion","exitStateQuestion","InlineChoiceStateChoice","InlineChoiceWidget","CreatorInlineChoice","SimpleAssociableChoiceStateQuestion","SimpleAssociableChoiceWidget","SimpleChoiceWidget","CreatorSimpleChoice","CreatorSimpleAssociableChoice","SimpleChoiceStateQuestion","$realLabel","CreatorFigcaption","FigureStateSleep","_qtiClassToDummies","inlineHelper","checkFileExists","fileSrcAttrName","fileExists","positionFloat","ActiveState","FigureStateActive","buildInlineContainer","textNode","contenteditable","buildBlockContainer","alignmentHelper","FigureWidget","initAlignment","CreatorFigure","imageElem","ImgStateSleep","ImgStateActive","ImgWidget","FigureModel","findParentElement","CreatorImg","figureRenderer","IncludeStateActive","_initUpload","$uploadTrigger","$href","_openResourceMgr","disableUpload","$mgr","iframe","styleTao","styleTaoQtiItem","IncludeWidget","CreatorXInclude","\"user-select\"","\"pointer-events\"","gripTpl","movable","$grip","switcher","okButtonTpl","_convertToTitle","InteractionWidget","$responseForm","listenToChoiceStates","listenToIncludeStates","$interactionContainer","answer","$ok","editableContent","InteractionStateSleep","_containsInModalFeedbackElts","searchSerial","InteractionStateActive","inModalFeedback","addChoiceTpl","InteractionStateQuestion","addNewChoiceButton","$newChoicePlaceholder","qtiChoiceClassName","InteractionStateChoice","fieldName","lowerThreshold","upperThreshold","helpMessage","toggler","hideTooltips","minMaxTpl","_Mathmax3","syncValues","allowDecimal","minMaxFactory","setUpConfig","controls","fields","isFieldSupported","minMax","getFields","getValue","getMinValue","getMaxValue","setValue","intValue","setMinValue","setMaxValue","updateThresholds","lower","upper","fieldOptions","isFieldEnabled","keyup","enableField","initialValue","disableField","fromField","minValue","maxValue","convertToNumber","disableToggler","enableToggler","setUpFieldListener","fieldConfig","fieldControl","deepConfig","listOfBaseTypes","isInfinityMatchMax","defineCorrect","showIdentifier","templates","editMapping","editFeedbacks","availableConditions","hideScore","addElse","_scoreTooltipContent","syncMaxChoices","getMax","_syncMaxChoices","$min","$max","setScore","$scoreInput","_resetScore","fbRule","$select","onSetScore","$comparedValue","onUnsetCorrect","initCompare","getAvailableConditions","_availableConditions","onSet","onUnset","initChoice","$choiceSelectorContainer","cSelector","selectedChoices","onSetChoices","intialValue","onUnsetChoices","$cContainer","filterChoices","selecter","ruleTpl","modalFeedbackConditions","_renderFeedbackRule","feedbackElseSerial","$rule","_initFeedbackEventListener","$feedbacksPanel","$feedbacks","$lastRule","$fbContainer","fbSerial","fbModal","$deleteButton","newCondition","oldCondition","$btn","modalFeedbackWidget","_getModalFeedbackWidget","_widgets","$feedbacksContainer","initFeedbacksPanel","$feedbackRules","renderFeedbackRule","minMaxComponentFactory","responseFormTpl","modalFeedbackRule","modalFeedbackConfigKey","showResponseIdentifierKey","getAvailableTemplates","CUSTOM","_getAvailableListOfBaseTypes","listOfBaseType","_getAvailableRpTemplates","filteredTemplates","allTemplates","templateName","answerStateHelper","forward","newDefineCorrectActive","defineCorrectActive","corrects","initResponseForm","allQtiElements","_toggleCorrectWidgets","$correctWidgets","rpTemplates","Number","MAX_SAFE_INTEGER","formChangeCallbacks","isCorrectDefined","InteractionStateAnswer","initInteractionStateAnswer","exitInteractionStateAnswer","Correct","InteractionStateCorrect","Map","answerState","InteractionStateMap","NoRp","exitStateNoRp","outcomeScore","Custom","overlayTpl","InteractionStateCustom","$e","BlockInteractionStateQuestion","buildPromptEditor","destroyPromptEditor","enabledFeatures","AssociateInteractionStateQuestion","AssociateInteractionStateChoice","setPlaceholder","ResponseWidget","formatResponse","getResponseSummary","sortedIdPair","sortedIdPairKey","formatedRes","pairString","unformatResponse","formatedResponse","responseWidget","AssociateInteractionStateCorrect","responseToolbarTpl","bindResponseChangeListener","_saveCorrect","$miniToolbar","$filled","pairIdentifier","$correct","$score","AssociateInteractionWidget","CreatorAssociateInteraction","constraints","choiceOptionsAvailable","orientationAvailable","_Mathmax4","getListStyle","listStylePrefix","exitState","realCount","ChoiceInteractionStateQuestion","allowedChoices","DEFAULT_MIN","DEFAULT_MAX","currListStyle","minMaxComponent","selectedCase","prevValues","numberOfChoices","checkOtherEdgeCases","firstRender","createMinMaxComponent","deleteMinMax","allowedChoice","liststyler","oldStyle","newStyle","interactionParam","setAttrMaxMinChoices","resetToSingleNone","setSelectedCase","$checkboxIcons","$checkboxInputs","ChoiceInteractionStateChoice","scoreTpl","labelTpl","_fixInputs","$radio","createScoreWidgets","createCorrectWidgets","$label","$scores","$corrects","_toggleCorrectInputs","ChoiceInteractionStateCorrect","ChoiceInteractionStateMap","ChoiceInteractionWidget","CreatorChoiceInteraction","InlineInteractionWidget","InlineInteractionStateSleep","positionWidget","itemOffset","originalOffset","restrictedIdentifiers","responseSerial","hasRestrictedIdentifier","_prepareRestrictedIdentifier","EndAttemptInteractionStateQuestion","$mainOption","restrictedIdentifier","interactionTpl","EndAttemptInteractionWidget","renderInteraction","previous","CreatorEndAttemptInteraction","interactionsConfig","endAttempt","formats","constraintsAvailable","initState","ExtendedTextInteractionStateQuestion","attribute","attrValue","isMathEntry","$counterMaxWords","$counterMaxLength","plain","$inputs","$constraintsBlock","$recommendationsBlock","$textCounter","preformatted","hasMath","previousFormat","isMath","constraint","getCorrectResponse","setCorrectResponse","convertConfig","rewriteCorrectResponse","stringResponseHelper","ExtendedTextInteractionStateSleep","initStateNoRp","ExtendedTextInteractionWidget","CreatorExtendedTextInteraction","_Mathmin3","searchQtiElement","rootNode","currentNode","containForbiddenQtiElement","isElement","isQtiElement","isQtiClassFromWhiteList","whiteListQtiClasses","isRangeValid","isSameNode","isInRuby","allowQtiElements","canWrap","providedRange","isCollapsed","wrapWith","wrapHTMLWith","extractContents","insertNode","isMultipleSelection","selectionText","words","getCloneOfContents","getNextTextSibling","isParent","getCloneOfContentsInBatch","Boolean","wordLength","remainingLength","wordRange","rollover","nextTextPart","spaces","setStart","currentNodeText","currentNodeLength","takeLength","setEnd","htmlContentHelper","selectionWrapper","newGapTpl","GapMatchInteractionStateQuestion","syncCardinality","preventSingleChoiceDeletion","$bodyTlb","initGapCreator","interactionWidget","$newGapBtn","$newGap","createChoiceFromSelection","replaceSelectionWithGap","$newChoiceContent","$addChoiceBtn","qtiEltsRegexp","$nestedWidgets","nestedElts","newChoiceElt","newChoiceBody","newChoiceWidget","eltSerial","eltWidget","newGapElt","newGapWidget","_toggleDeleteButtonVisibility","$deleteButtons","GapMatchInteractionStateCorrect","bodyLength","numberOfGaps","invokeMap","leftTitle","pairLeft","rightTitle","pairRight","defaultScore","createPopup","separator","formFactory","adder","$left","$right","$options","currentLeft","currentRight","leftId","rightId","lval","rval","pairScoringForm","addPair","deleter","removePair","preparePairs","formatPair","formatLeft","formatRight","updateFormBindings","scoreMin","scoreMax","scoringFormFactory","initMapState","currentResponses","displayGaps","updateForm","exitMapState","formatedChoices","mappingChange","GapMatchInteractionWidget","CreatorGapMatchInteraction","GraphicInteractionWidget","createPaper","_len","_key","_createPlaceholder","$upload","createChoices","_currentChoices","responsiveMetaChange","_ref6","initSleepState","exitSleepState","showTarget","sidebarTmpl","shapeSideBar","$imageEditor","$sideBar","$forms","activate","deactivate","Raphael","shapeHandlers","getCoords","getHandlingCoords","scaleFactor","halfWidth","halfHeight","midTop","midRight","midBot","midLeft","parsePathString","segment","topLeft","topRight","botRight","botLeft","handlerCoords","hshape","commonGraphicHelper","_Mathpow","getStartPoint","startPoint","shapeResizer","resized","resizeRectangle","resizeCircle","resizeEllipse","boxDest","resizePath","pointIndex","_Mathmax5","_Mathmin4","mover","shapeMover","moveRectangle","moveCircle","moveEllipse","movePath","defaultShift","minX","minY","maxX","maxY","clientShift","pointX","pointY","graphicHelper","pathBuilder","_path","getPath","closeMe","pointSize","closeCb","onClose","shapeFactory","drawing","startDrawingPath","startPositionTarget","startWithMouse","created","builder","unmousedown","unmousemove","unmouseup","smoothResize","mousedown","startDrawing","shapeEditor","handling","resizing","moving","quitHandling","enterHandling","startResize","layerTxt","stopPoint","pick","keyResize","startMove","mousePoint","moved","keyResizer","undrag","removeShape","interactionShapeEditor","editors","editShape","shapeOptions","shapeChanging","shapeChange","shapeRemoved","currents","createShape","factories","editCreatedShape","shapeCreated","unmouseover","unmouseout","imageUtil","getSize","encodeURIComponent","resourceManager","$src","$width","$height","$type","setupImage","$bgImage","setupMediaSizer","$mediaSizer","mediasizer","showResponsiveToggle","showSync","applyToMedium","encodeAsXmlAttr","widgetReady","imageSelector","choiceFormTpl","_Mathround6","initQuestionState","enterChoiceForm","$choiceForm","$top","leaveChoiceForm","choiceForm","_editor","newChoice","exitQuestionState","GraphicAssociateInteractionStateQuestion","getMaxPairs","initCorrectState","exitCorrectState","showChoicesId","removePaths","getPairValues","GraphicWidget","GraphicAssociateInteractionWidget","scaleChoices","CreatorGraphicAssociateInteraction","gapImgFormTpl","mediaTlbTpl","applyMediasizerValues","naturalHeight","createGapImgAddOption","$addOption","gapImgObj","setUpGapImg","gapImgSelectorOptions","$deleteBtn","$gapImgBox","enterGapImgForm","infinityMatchMax","initMediasizer","$gapImgElem","GraphicGapMatchInteractionStateQuestion","createGapImgs","scaleGapList","removeGapFillers","gapSrcs","formated","GraphicGapMatchInteractionWidget","isInfinitePair","choiceMatchMax","checkTemplates","isChoiceInfinitePair","CreatorGraphicGapMatchInteraction","renderOrderList","GraphicOrderInteractionStateQuestion","scaleOrderList","GraphicOrderInteractionWidget","CreatorGraphicOrderInteraction","HotspotInteractionStateQuestion","_Mathround7","_Mathmax6","createShapePopups","minWidth","$shape","wfactor","noCorrect","grahicScorePopup","mappingFormTpl","initResponseMapping","scoreTexts","scoreDefault","correctDefined","responseParam","scoreText","HotspotInteractionWidget","CreatorHotspotInteraction","newHottextBtnTpl","newHottextMultipleBtnTpl","allowedInlineStaticElts","HottextInteractionStateQuestion","initHottextCreator","validateAndCreateHottext","_ref7","$newHottextClone","$cloneContent","disallowHTMLInHottext","createNewHottext","$newHottextBtn","$newHottextMultipleBtn","$newHottext","cloneContentBatch","$hottextContent","$inlineStaticWidgets","newHottextElt","newHottextBody","resolveCreateNewHottext","onceCreatingFinished","newHottextWidget","createScoreForm","meta","toggleCorrectState","inputVal","$hottext","HottextInteractionWidget","CreatorHottextInteraction","InlineChoiceInteractionStateQuestion","$addChoice","renderChoice","buildChoice","CommonRenderer","$responseWidget","InlineChoiceInteractionStateCorrect","selectedChoice","inlineChoiceInteractionTpl","inlineChoiceTpl","InlineChoiceInteractionWidget","$choiceOptionForm","shuffleChoice","CreatorInlineChoiceInteraction","otherMatchSetCount","AssociateInteractionQuestionState","rowTpl","cellTpl","MatchInteractionStateQuestion","$matchArea","_postRender","pairId","MatchInteractionStateCorrect","interactionContainer","matchInteractionArea","MatchInteractionWidget","CreatorMatchInteraction","isAudio","hidePlayer","autostartDelayMs","sequential","isFlaAvailable","mediaEditorComponent","_Mathround8","_Mathmax7","_Mathmin5","_Mathfloor4","mediaEditor","destroyInteraction","getIsAudio","MediaInteractionStateQuestion","defaultVideoHeight","defaultAudioHeight","reRender","switchToAudio","videoResponsiveWidth","originalSize","getMediaOriginalSize","scaleWidth","scaleHeight","createMediaEditor","mediaDimension","switchToVideo","nMedia","newWidth","switchMode","setUpUploader","openResourceMgr","setUpCallbacks","boundInteraction","renderForm","_NumberisNaN","attrValueNumeric","attrValueNumericMs","youTubeUrl","parsedUrl","searchParams","initAnswerState","exitAnswerState","MediaInteractionWidget","controlPlaying","execute","OrderInteractionStateQuestion","minMaxPanel","deleteMinMaxComponent","makeSignleOrder","makeSortOrder","_createResponseWidget","_destroyResponseWidget","_formatResponse","_unformatResponse","OrderInteractionWidget","CreatorOrderInteraction","CreatorCustomInteraction","pciCreator","getWidget","SelectPointInteractionStateQuestion","_Mathround9","_targets","setCurrentResponses","createEditor","listenResponseAttrChange","areaId","area","getAreaIndex","createResponseArea","setUpScoringArea","declareScoreInputControls","$scorePopup","caretTo","createTextRange","setSelectionRange","qtiPoint","scoreElt","$reference","setElt","$separator","targetId","SelectPointInteractionWidget","shapeType","CreatorSelectPointInteraction","dialogConfirm","responseManager","getErrorMessage","sliderInteractionHelper","SliderInteractionStateQuestion","sliderLength","$lowerBoundLabel","$qtiSlider","$upperBoundLabel","SliderInteractionStateCorrect","$sliderElt","SliderInteractionWidget","CreatorSliderInteraction","baseAvailable","recommendationsAvailable","TextEntryInteractionStateQuestion","setErrorNotification","submitButton","$submitButton","$correctInput","optionTpl","_getRelatedTextKey","TextEntryInteractionStateMap","initMapEntries","initFormCallbacks","hideCorrectInput","$text","oldText","$tr","correctValue","appendOption","$newOption","preventNullMapEntries","$del","TextEntryInteractionWidget","CreatorTextEntryInteraction","ANY_KIND","UploadInteractionStateQuestion","preselected","defaultList","formatNoMatches","setAnyKind","interactionChanged","newTypes","currentTypes","typesWithoutAny","UploadInteractionWidget","isPreviewable","disableIdentifier","showTimeDependent","showRemoveInstructions","removeInstructionClasses","removeInstructionClass","ItemStateActive","enterActiveState","itemElements","itemHasClass","itemAddClass","itemRemoveClass","itemRemoveClasses","titleChange","langChange","isRTL","devTools","hasUnsupportedInteraction","$qti","ItemWidget","_detachElements","containerElements","elementSerial","saveItemUrl","itemUri","initTextWidgets","initGridEditor","debug","rejectError","contentType","dataType","initUiComponents","$saveBtn","$widgetNewElem","initTextWidget","$originalContainer","subContainers","isTextBlock","$subElement","$subWidget","$clonedContainer","$originalTextBlock","textBlockId","$subContainer","subContainerElements","subContainerBody","serializedItemBody","containerData","$pre","CreatorItem","_normalizeItemBody","$child","MathStateSleep","mathml","mathjax","popupMode","popupFormTpl","dynamicComponent","_attachMathmlWarning","$mathField","_throttle","MathActive","popups","$mathml","editMode","$popupsContainer","$latex","_toggleMode","latexWysiwyg","createLatexWysiwygPopup","createLargeEditorPopup","center","initFormChangeListener","targetPopup","popupOptions","windowTitle","$popupContent","mathInput","currentLatex","_disableForm","_enableForm","smallField","$popupField","mode","panels","MathWidget","isEditable","CreatorMath","feedbackStyles","_prepareFeedbackStyles","styles","buildTitleEditor","htmleditor","inplacer","destroyTitleEditor","buildBodyEditor","destroyBodyEditor","indices","sidebar","cke","ckeBase","ckeNose","ckeToolbar","raised","raise","baseIndex","$elem","_ckeIsReady","dfd","Deferred","iteration","poll","promise","ModalFeedbackStateActive","ModalFeedbackWidget","modalTpl","ObjectStateSleep","_Mathround10","_Mathmax8","_Mathmin6","$panelObjectSize","$panelMediaSize","_config","renderingThrottle","fileFilters","ObjectStateActive","refreshRendering","qtiObject","setMediaSizeEditor","hideShowPanels","align","ObjectWidget","CreatorObject","CreatorPortableInfoControl","picCreator","PrintedVariableStateSleep","PrintedVariableStateActive","printedVarEl","$printedVarDom","pv","CreatorPrintedVariable","RubriBlockStateSleep","RubricBlockStateActive","RubricBlockWidget","CreatorRubricBlock","TableStateSleep","deleteTitle","makeAlignable","triggerEvent","delete","insertRow","insertCol","tableActionsApi","hideDelete","$delete","showDelete","tableActionsFactory","tableActionsComponent","$insertRow","$insertCol","hAlignOptions","tableModelFactory","replaceElementByItsContent","$tableTagContent","addClassOnCurrentRow","currentCellPos","getCurrentCellPos","$currentCol","tableModel","getRowCells","addClassOnCurrentCol","getColCells","clearCellClasses","updateTable","getRowCount","rowActions","getColCount","colActions","displayTableActions","hideTableActions","$tableContainer","selectedCells","$currentCell","hAlignWith","vAlignWith","currentCell","cellIndex","rowIndex","tabletools","CKEDITOR","getSelectedCells","deleteColRow","insertRowAfter","insertColAfter","hAlignCenter","hAlignRight","TableStateActive","$caption","$first","$curCap","$paragraphsInCaption","$p","hAlign","$itemPanel","$tablePropTrigger","openTableProperties","execCommand","currentSelection","$toolbars","TableWidget","CreatorTable","makeContainable","popupControlTpl","windowClass","alignable","autoContain","popupControls","popupControlsPresets","widgetPopupApi","renderPopupControls","controlsEvents","$controlsArea","$popupControls","control","isActive","controlId","containIn","paddingTop","widgetPopupFactory","widgetPopup","preventEnter","editorFieldFactory","EditorFieldApi","EditorFieldComponent","widgetPopupConfig","hasCloser","hasBin","tooltipEditorFactory","tooltipEditorComponent","fieldToFocus","$targetEditorContainer","$contentEditorContainer","$closeBtn","targetEditor","contentEditor","TooltipStateActive","tooltipEditor","creatorContext","$tooltipContainer","destroyTooltip","alignEditorOn","alignWith","hPos","vPos","vOrigin","hOffset","vOffset","newParentBody","TooltipWidget","noTooltipTpl","CreatorTooltip","tooltipsVisible","replayTimeout","pciMediaManager","pciMediaManagerFactory","$heightContainer","mediaProps","mediaPropsDefaults","configChangeCallback","confchangeCallback","getForm","getChangeCallbacks","CustomInteractionStateQuestion","initColorPickers","$colorTriggers","$itemEditorWidgetBar","destroyColorPickers","CustomInteractionWidget","GapMatchInteractionStateAnswer","hasAutogeneratedCodeCommentSibling","commentFound","InfoControlWidget","QtiTextVariableChoice","QtiTextEntry","Feedback","FeedbackBlock","FeedbackInline","EventMgr","getRawValues","pciVar","getFeedbackMessageSignature","extractDisplayInfo","messageGroupId","$displayContainer","displayContainer","getInteractionsDisplayInfo","interactionsDisplayInfo","interactionOrder","_interactionInfo","getFeedbacks","itemSession","renderingQueue","feedbackIds","_currentMessageGroupId","interactionInfo","_$xml","loadXML","getDOM","iframeNotifier","previewOkBtn","deliveryOkBtn","showFeedbacks","onCloseCallback","onShowCallback","renderedFeebacks","firstFeedback","clearModalFeedbacks","renderingToken","renderModalFeedback","renderingData","autoscroll","replaceControl","getQtiContainer","me","__knownParent__","currentScrollTop","minScrollTop","maxScrollTop","renderedCallback","$modalFeedback","race","$controls","$toggleContainer","initControlToggle","toggleButtonTemplate","uncover","interactionContainers","inlineRenderer","async","feedbacksToBeDisplayed","callstack","endCallback","series","closeCallback","$feedbackBox","$feedback","modalRenderer","ItemLoader","modalFeedbackInline","modalFeedbackModal","QtiRunner","rpEngine","itemApi","updateItemApi","setVariables","saveResponses","resultApi","setQtiRunner","setItemApi","that","oldStateVariables","stateVariables","onKill","killCallback","newStateVariables","serviceApi","getHasBeenPaused","submit","setHasBeenPaused","getLoader","renderItem","initInteractionsResponse","listenForThemeChange","getVariable","setVariable","themeName","finish","inlineDisplay","inlineModalFeedback","depth2","propertiesTpl","renderPortableElementProperties","renderImsPortableElementProperties","registerHelper","correctTpl","mapTpl","mapPointTpl","renderRpTpl","rpTpl","renderInteractionRp","renderedObject","replaceNonBreakingSpaceCharacters","mergeSiblings","tagsToMerge","matchedTags","condenseImgTags","handleRtTags","addClosingSlash","xhtmlEntities","xhtmlEncode","skipReplaceNonBreakingSpaceCharacters","encodeOutcomeInfo","relatedResponse","figureTpl","elementTpl","cleanImg","mapValues","portableElementProperties","primaryConfiguration","fallbackConfiguration","primaryPath","fallbackPath","imsPortableElementProperties","oatTpl","imsTpl","\"http://www.imsglobal.org/xsd/portableCustomInteraction\"","\"http://www.imsglobal.org/xsd/portableCustomInteraction_v1\"","resultData","isAreaMapping","isRecord","fieldIdentifier","hasMapEntries","program20","custom","templateDriven","responseProcessingTpl","_renderFeedbackRules","outcomeIdentifiers","itemScoreTpl","renderFeedbackRules","mapResponsePoint","noData","tplCondition","tplCorrect","tplIncorrect","tplChoices","ruleXml","else","_values","newData","styleSheet"],"sources":["/github/workspace/tao/views/build/config-wrap-start-default.js","../portableElementRegistry/factory/factory.js","../qtiCreator/helper/qtiElements.js","../portableElementRegistry/factory/ciRegistry.js","../portableElementRegistry/ciRegistry.js","../portableElementRegistry/factory/icRegistry.js","../portableElementRegistry/icRegistry.js","../qtiCreator/context/plugins/content/windowResizer.js","../qtiCreator/context/loader.js","../qtiCreator/context/qtiCreatorContext.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","../qtiCreator/model/helper/event.js","../qtiCreator/model/helper/invalidator.js","../qtiCreator/model/mixin/editable.js","../qtiCreator/model/qtiClasses.js","../qtiCreator/model/helper/container.js","../qtiCreator/model/mixin/editableContainer.js","../qtiItem/core/IdentifiedElement.js","../qtiItem/mixin/Mixin.js","../qtiItem/core/Container.js","../qtiItem/mixin/Container.js","../qtiItem/mixin/ContainerItemBody.js","../qtiItem/core/Item.js","../qtiItem/core/Stylesheet.js","../qtiCreator/model/Stylesheet.js","../qtiItem/core/ResponseProcessing.js","../qtiItem/helper/interactionHelper.js","../qtiRunner/core/Renderer.js","../qtiXmlRenderer/renderers/config.js","../qtiXmlRenderer/renderers/Renderer.js","../qtiItem/core/variables/VariableDeclaration.js","../qtiItem/core/variables/OutcomeDeclaration.js","../qtiItem/helper/maxScore.js","../qtiXmlRenderer/renderers/RendererPerInteractionRP.js","../qtiCreator/helper/xmlRenderer.js","../qtiCreator/model/ResponseProcessing.js","../qtiCreator/model/variables/OutcomeDeclaration.js","../qtiItem/core/feedbacks/ModalFeedback.js","../qtiCreator/model/feedbacks/ModalFeedback.js","../qtiCreator/model/Item.js","../qtiCreator/widgets/helpers/qtiIdentifier.js","../qtiCreator/helper/languages.js","../qtiCreator/helper/itemIdentifier.js","../qtiCreator/helper/itemLoader.js","../portableElementRegistry/assetManager/portableAssetStrategy.js","../qtiCommonRenderer/renderers/config.js","../qtiCreator/renderers/config.js","../qtiCreator/renderers/Renderer.js","../qtiCreator/helper/creatorRenderer.js","../qtiCommonRenderer/renderers/Renderer.js","../qtiCommonRenderer/helpers/container.js","../qtiCreator/helper/commonRenderer.js","../qtiItem/helper/simpleParser.js","../qtiItem/helper/xincludeLoader.js","../qtiCreator/helper/xincludeRenderer.js","../qtiCreator/tpl/toolbars/insertInteractionButton!tpl","../qtiCreator/tpl/toolbars/insertInteractionGroup!tpl","../qtiCreator/tpl/toolbars/tooltip!tpl","../qtiCreator/editor/interactionsToolbar.js","../qtiCreator/helper/panel.js","../qtiCreator/editor/interactionsPanel.js","../qtiCreator/tpl/toolbars/cssToggler!tpl","../qtiCreator/editor/styleEditor/styleEditor.js","../qtiCreator/tpl/notifications/genericFeedbackPopup!tpl","../qtiCreator/editor/styleEditor/styleSheetToggler.js","json!taoQtiItem/qtiCreator/editor/resources/font-stacks.json","../qtiCreator/editor/styleEditor/fontSelector.js","../qtiCreator/helper/popup.js","../qtiCreator/editor/styleEditor/colorSelector.js","../qtiCreator/editor/styleEditor/fontSizeChanger.js","../qtiCreator/editor/styleEditor/itemResizer.js","../qtiCreator/editor/propertiesPanel.js","../qtiCreator/itemCreator.js","../qtiCreator/editor/areaBroker.js","../qtiCreator/plugins/button!tpl","../qtiCreator/plugins/menu/save.js","../qtiCreator/plugins/menu/preview.js","../qtiCreator/plugins/menu/print.js","../qtiCreator/plugins/content/title.js","../qtiCreator/helper/saveChanges.js","../qtiCreator/helper/changeTracker.js","../qtiCreator/plugins/content/changeTracker.js","../qtiCreator/widgets/helpers/qtiResponseIdentifier.js","../qtiCreator/widgets/helpers/validators.js","../qtiCreator/widgets/helpers/formElement.js","../qtiCreator/tpl/outcomeEditor/panel!tpl","../qtiCreator/tpl/outcomeEditor/listing!tpl","../qtiCreator/plugins/panel/outcomeEditor.js","../qtiCreator/plugins/loader.js","../controller/creator/index.js","../controller/routes.js","../mathRenderer/mathRenderer.js","../portableElementRegistry/provider/localManifestProvider.js","../portableElementRegistry/provider/sideLoadingProviderFactory.js","../qtiCommonRenderer/helpers/ckConfigurator.js","../qtiCommonRenderer/helpers/Graphic.js","../qtiCommonRenderer/helpers/instructions/Instruction.js","../qtiCommonRenderer/helpers/instructions/instructionManager.js","../qtiCommonRenderer/helpers/itemStylesheetHandler.js","../qtiCommonRenderer/helpers/patternMask.js","../qtiCommonRenderer/helpers/PciPrettyPrint.js","../qtiCommonRenderer/helpers/PciResponse.js","../qtiCommonRenderer/helpers/PortableElement.js","../qtiCommonRenderer/helpers/sizeAdapter.js","../qtiCommonRenderer/helpers/uploadMime.js","../qtiCommonRenderer/renderers/choices/Gap.js","../qtiCommonRenderer/renderers/choices/GapImg.js","../qtiCommonRenderer/renderers/choices/GapText.js","../qtiCommonRenderer/renderers/choices/Hottext.js","../qtiCommonRenderer/renderers/choices/InlineChoice.js","../qtiCommonRenderer/renderers/choices/SimpleAssociableChoice.AssociateInteraction.js","../qtiCommonRenderer/renderers/choices/SimpleAssociableChoice.MatchInteraction.js","../qtiCommonRenderer/renderers/choices/SimpleChoice.ChoiceInteraction.js","../qtiCommonRenderer/renderers/choices/SimpleChoice.OrderInteraction.js","../qtiCommonRenderer/renderers/Container.js","../qtiCommonRenderer/renderers/Figcaption.js","../qtiCommonRenderer/renderers/Figure.js","../qtiCommonRenderer/renderers/Img.js","../qtiCommonRenderer/renderers/Include.js","../qtiCommonRenderer/renderers/interactions/AssociateInteraction.js","../qtiCommonRenderer/renderers/interactions/ChoiceInteraction.js","../qtiCommonRenderer/renderers/interactions/EndAttemptInteraction.js","../qtiCommonRenderer/renderers/interactions/ExtendedTextInteraction.js","../qtiCommonRenderer/renderers/interactions/GapMatchInteraction.js","../qtiCommonRenderer/renderers/interactions/GraphicAssociateInteraction.js","../qtiCommonRenderer/renderers/interactions/GraphicGapMatchInteraction.js","../qtiCommonRenderer/renderers/interactions/GraphicOrderInteraction.js","../qtiCommonRenderer/renderers/interactions/HotspotInteraction.js","../qtiCommonRenderer/renderers/interactions/HottextInteraction.js","../qtiCommonRenderer/renderers/interactions/InlineChoiceInteraction.js","../qtiCommonRenderer/renderers/interactions/MatchInteraction.js","../qtiCommonRenderer/renderers/interactions/MediaInteraction.js","../qtiCommonRenderer/renderers/interactions/OrderInteraction.js","../../qtiCustomInteractionContext.js","../qtiCommonRenderer/renderers/interactions/pci/instanciator.js","../qtiCommonRenderer/renderers/interactions/pci/common.js","../qtiCommonRenderer/renderers/interactions/pci/ims.js","../qtiCommonRenderer/renderers/interactions/PortableCustomInteraction.js","../qtiCommonRenderer/renderers/interactions/Prompt.js","../qtiCommonRenderer/renderers/interactions/SelectPointInteraction.js","../qtiCommonRenderer/renderers/interactions/SliderInteraction.js","../qtiCommonRenderer/renderers/interactions/TextEntryInteraction.js","../qtiCommonRenderer/renderers/interactions/UploadInteraction.js","../qtiCommonRenderer/renderers/Item.js","../qtiCommonRenderer/renderers/Math.js","../qtiItem/helper/container.js","../qtiCommonRenderer/renderers/ModalFeedback.js","../qtiCommonRenderer/renderers/Object.js","../../qtiInfoControlContext.js","../qtiCommonRenderer/renderers/PortableInfoControl.js","../qtiCommonRenderer/renderers/PrintedVariable.js","../qtiCommonRenderer/renderers/rendererProvider.js","../qtiCommonRenderer/renderers/RubricBlock.js","../qtiCommonRenderer/renderers/Stylesheet.js","../qtiCommonRenderer/renderers/Table.js","../qtiCommonRenderer/renderers/Tooltip.js","../reviewRenderer/helpers/pci.js","../reviewRenderer/renderers/choices/Hottext.js","../reviewRenderer/renderers/choices/SimpleChoice.ChoiceInteraction.js","../reviewRenderer/renderers/config.js","../reviewRenderer/renderers/interactions/AssociateInteraction.js","../reviewRenderer/renderers/interactions/ChoiceInteraction.js","../reviewRenderer/renderers/interactions/ExtendedTextInteraction.js","../reviewRenderer/renderers/interactions/GapMatchInteraction.js","../reviewRenderer/renderers/interactions/GraphicAssociateInteraction.js","../reviewRenderer/renderers/interactions/GraphicGapMatchInteraction.js","../reviewRenderer/renderers/interactions/GraphicOrderInteraction.js","../reviewRenderer/renderers/interactions/HotspotInteraction.js","../reviewRenderer/renderers/interactions/InlineChoiceInteraction.js","../reviewRenderer/renderers/interactions/MatchInteraction.js","../reviewRenderer/renderers/interactions/MediaInteraction.js","../reviewRenderer/renderers/interactions/OrderInteraction.js","../reviewRenderer/renderers/interactions/PortableCustomInteraction.js","../reviewRenderer/renderers/interactions/SelectPointInteraction.js","../reviewRenderer/renderers/interactions/SliderInteraction.js","../reviewRenderer/renderers/interactions/TextEntryInteraction.js","../reviewRenderer/renderers/interactions/UploadInteraction.js","../reviewRenderer/renderers/Renderer.js","../reviewRenderer/renderers/rendererProvider.js","../qtiCreator/component/tpl/itemAuthoring!tpl","css!taoQtiItemCss/qti-runner","../../taoQtiItemCss/themes/default!css","css!taoQtiItemCss/item-creator","../qtiCreator/component/itemAuthoring.js","../qtiCreator/editor/blockAdder/tpl/addColumnRow!tpl","../qtiCreator/editor/gridEditor/config.js","../qtiCreator/editor/gridEditor/helper.js","../lib/jqueryui_dragdrop.js","../qtiCreator/editor/gridEditor/resizable.js","../qtiCreator/widgets/helpers/textWrapper.js","../qtiCreator/editor/gridEditor/content.js","../qtiCreator/editor/elementSelector/tpl/popup!tpl","../qtiCreator/editor/elementSelector/tpl/content!tpl","../qtiCreator/editor/elementSelector/selector.js","../qtiCreator/widgets/Widget.js","../qtiCreator/helper/classTitles.js","../qtiCreator/editor/widgetToolbar.js","../qtiCreator/widgets/static/Widget.js","../qtiCreator/widgets/states/factory.js","../qtiCreator/widgets/states/Sleep.js","../qtiCreator/widgets/static/states/Sleep.js","../qtiCreator/widgets/helpers/content.js","../qtiCreator/widgets/states/Active.js","../qtiCreator/widgets/static/states/Active.js","../qtiCreator/widgets/states/Inactive.js","../qtiCreator/tpl/notifications/deletingInfoBox!tpl","../qtiCreator/widgets/helpers/deletingState.js","../qtiCreator/helper/gridUnits.js","../qtiCreator/widgets/helpers/comments.js","../qtiCreator/widgets/states/Deleting.js","../qtiCreator/widgets/static/states/states.js","../qtiCreator/widgets/static/text/states/Sleep.js","../qtiCreator/helper/ckConfigurator.js","../qtiCreator/editor/ckEditor/featureFlag.js","../qtiCreator/editor/ckEditor/htmlEditor.js","../qtiCreator/tpl/forms/static/text!tpl","../qtiCreator/widgets/static/helpers/itemScrollingMethods.js","../qtiCreator/widgets/static/text/states/Active.js","../qtiCreator/widgets/static/text/states/states.js","../qtiCreator/tpl/toolbars/textBlock!tpl","../qtiCreator/widgets/static/text/Widget.js","../qtiCreator/editor/blockAdder/blockAdder.js","../qtiCreator/editor/ckEditor/ckProtector.js","../qtiCreator/editor/ckEditor/groupToggler.js","../qtiCreator/editor/colorPicker/tpl/popup!tpl","../qtiCreator/editor/colorPicker/colorPicker.js","../qtiCreator/model/Container.js","../qtiCreator/editor/containerEditor.js","../qtiCreator/editor/customInteractionRegistry.js","../qtiCreator/editor/gridEditor/arrow.js","../qtiCreator/editor/targetFinder.js","../qtiCreator/editor/gridEditor/droppable.js","../qtiCreator/editor/gridEditor/draggable.js","../qtiCreator/editor/infoControlRegistry.js","../qtiCreator/editor/jquery.gridEditor.js","../qtiCreator/editor/MathEditor.js","../lib/mathquill/mathquill.js","../qtiCreator/editor/mathInput/tpl/mathInput!tpl","../lib/mathquill/mathquill!css","../qtiCreator/editor/mathInput/mathInput.js","../qtiCreator/tpl/toolbars/choiceSelector!tpl","../qtiCreator/editor/response/choiceSelector.js","../qtiCreator/editor/simpleContentEditableElement.js","../qtiCreator/helper/devTools.js","../qtiCreator/helper/dummyElement.js","../qtiCreator/helper/findParentElement.js","../qtiCreator/helper/windowPopup.js","../qtiCreator/helper/xincludeLoader.js","../qtiItem/core/choices/Choice.js","../qtiItem/core/choices/Hotspot.js","../qtiItem/core/choices/AssociableHotspot.js","../qtiCreator/model/choices/AssociableHotspot.js","../qtiItem/core/choices/Gap.js","../qtiCreator/model/choices/Gap.js","../qtiItem/core/Object.js","../qtiItem/core/choices/GapImg.js","../qtiCreator/model/choices/GapImg.js","../qtiItem/core/choices/ContainerChoice.js","../qtiItem/core/choices/GapText.js","../qtiCreator/model/choices/GapText.js","../qtiItem/core/choices/HotspotChoice.js","../qtiCreator/model/choices/HotspotChoice.js","../qtiItem/mixin/ContainerInline.js","../qtiItem/core/choices/Hottext.js","../qtiCreator/model/choices/Hottext.js","../qtiItem/core/choices/ContainerInlineChoice.js","../qtiItem/core/choices/InlineChoice.js","../qtiCreator/model/choices/InlineChoice.js","../qtiItem/core/choices/SimpleAssociableChoice.js","../qtiCreator/model/choices/SimpleAssociableChoice.js","../qtiItem/core/choices/SimpleChoice.js","../qtiCreator/model/choices/SimpleChoice.js","../qtiItem/mixin/ContainerFigcaption.js","../qtiItem/mixin/NamespacedElement.js","../qtiItem/core/Figcaption.js","../qtiCreator/model/Figcaption.js","../qtiItem/mixin/ContainerFigure.js","../qtiItem/core/Figure.js","../qtiItem/core/Img.js","../qtiCreator/model/Img.js","../qtiCreator/model/Figure.js","../qtiCreator/model/helper/portableElement.js","../qtiCreator/model/helper/response.js","../qtiItem/core/Include.js","../qtiCreator/model/Include.js","../qtiItem/core/variables/ResponseDeclaration.js","../qtiItem/core/response/SimpleFeedbackRule.js","../qtiCreator/model/variables/ResponseDeclaration.js","../qtiCreator/model/mixin/editableInteraction.js","../qtiItem/core/interactions/Interaction.js","../qtiItem/core/interactions/Prompt.js","../qtiItem/core/interactions/BlockInteraction.js","../qtiItem/core/interactions/AssociateInteraction.js","../qtiCreator/model/interactions/AssociateInteraction.js","../qtiItem/core/interactions/ChoiceInteraction.js","../qtiCreator/model/interactions/ChoiceInteraction.js","../qtiItem/core/interactions/InlineInteraction.js","../qtiItem/core/interactions/EndAttemptInteraction.js","../qtiCreator/model/interactions/EndAttemptInteraction.js","../qtiItem/core/interactions/ExtendedTextInteraction.js","../qtiCreator/model/interactions/ExtendedTextInteraction.js","../qtiItem/core/interactions/ContainerInteraction.js","../qtiItem/core/interactions/GapMatchInteraction.js","../qtiCreator/model/interactions/GapMatchInteraction.js","../qtiItem/core/interactions/ObjectInteraction.js","../qtiItem/core/interactions/GraphicInteraction.js","../qtiItem/core/interactions/GraphicAssociateInteraction.js","../qtiCreator/model/interactions/GraphicAssociateInteraction.js","../qtiItem/core/interactions/GraphicGapMatchInteraction.js","../qtiCreator/model/interactions/GraphicGapMatchInteraction.js","../qtiItem/core/interactions/GraphicOrderInteraction.js","../qtiCreator/model/interactions/GraphicOrderInteraction.js","../qtiItem/core/interactions/HotspotInteraction.js","../qtiCreator/model/interactions/HotspotInteraction.js","../qtiItem/core/interactions/HottextInteraction.js","../qtiCreator/model/interactions/HottextInteraction.js","../qtiItem/core/interactions/InlineChoiceInteraction.js","../qtiCreator/model/interactions/InlineChoiceInteraction.js","../qtiItem/core/interactions/MatchInteraction.js","../qtiCreator/model/interactions/MatchInteraction.js","../qtiItem/core/interactions/MediaInteraction.js","../qtiCreator/model/interactions/MediaInteraction.js","../qtiItem/core/interactions/OrderInteraction.js","../qtiCreator/model/interactions/OrderInteraction.js","../qtiItem/mixin/CustomElement.js","../qtiItem/core/interactions/CustomInteraction.js","../qtiCreator/model/interactions/PortableCustomInteraction.js","../qtiItem/core/interactions/SelectPointInteraction.js","../qtiCreator/model/interactions/SelectPointInteraction.js","../qtiItem/core/interactions/SliderInteraction.js","../qtiCreator/model/interactions/SliderInteraction.js","../qtiItem/core/interactions/TextEntryInteraction.js","../qtiCreator/model/interactions/TextEntryInteraction.js","../qtiItem/core/interactions/UploadInteraction.js","../qtiCreator/model/interactions/UploadInteraction.js","../qtiItem/core/Math.js","../qtiCreator/model/Math.js","../qtiCreator/model/Object.js","../qtiCreator/model/pciCreatorContext.js","../qtiItem/core/PortableInfoControl.js","../qtiCreator/model/PortableInfoControl.js","../qtiItem/core/PrintedVariable.js","../qtiCreator/model/PrintedVariable.js","../qtiItem/core/RubricBlock.js","../qtiCreator/model/RubricBlock.js","../qtiItem/mixin/ContainerTable.js","../qtiItem/core/Table.js","../qtiCreator/model/Table.js","../qtiItem/core/Tooltip.js","../qtiCreator/model/Tooltip.js","../qtiCreator/plugins/content/blockAdder.js","../qtiCreator/plugins/navigation/back.js","../qtiCreator/tpl/layoutEditor/panel!tpl","../qtiCreator/plugins/panel/layoutEditor.js","../qtiCreator/widgets/choices/Widget.js","../qtiCreator/widgets/states/Answer.js","../qtiCreator/widgets/states/Choice.js","../qtiCreator/widgets/states/Correct.js","../qtiCreator/widgets/states/Map.js","../qtiCreator/widgets/states/NoRp.js","../qtiCreator/widgets/states/Question.js","../qtiCreator/tpl/notifications/invalidInfoBox!tpl","../qtiCreator/widgets/states/Invalid.js","../qtiCreator/widgets/states/states.js","../qtiCreator/widgets/choices/states/Sleep.js","../qtiCreator/widgets/choices/states/Active.js","../qtiCreator/tpl/toolbars/simpleChoice.content!tpl","../qtiCreator/widgets/choices/helpers/formElement.js","../qtiCreator/widgets/choices/states/Question.js","../qtiCreator/widgets/choices/states/Answer.js","../qtiCreator/widgets/choices/states/states.js","../qtiCreator/widgets/choices/states/Choice.js","../qtiCreator/tpl/forms/choices/gap!tpl","../qtiCreator/widgets/helpers/identifier.js","../qtiCreator/widgets/choices/gap/states/Choice.js","../qtiCreator/tpl/toolbars/gap!tpl","../qtiCreator/widgets/choices/gap/states/Question.js","../qtiCreator/widgets/choices/gap/states/states.js","../qtiCreator/widgets/choices/gap/Widget.js","../qtiCreator/renderers/choices/Gap.js","../qtiCreator/tpl/forms/choices/simpleAssociableChoice!tpl","../qtiCreator/widgets/choices/simpleAssociableChoice/states/Choice.js","../qtiCreator/widgets/choices/gapText/states/Choice.js","../qtiCreator/widgets/choices/gapText/states/Question.js","../qtiCreator/widgets/choices/gapText/states/states.js","../qtiCreator/widgets/choices/gapText/Widget.js","../qtiCreator/renderers/choices/GapText.js","../qtiCreator/tpl/forms/choices/choice!tpl","../qtiCreator/widgets/choices/simpleChoice/states/Choice.js","../qtiCreator/widgets/choices/hottext/states/Choice.js","../qtiCreator/tpl/toolbars/hottext!tpl","../qtiCreator/widgets/choices/hottext/states/Question.js","../qtiCreator/widgets/choices/hottext/states/states.js","../qtiCreator/widgets/choices/hottext/Widget.js","../qtiCreator/renderers/choices/Hottext.js","../qtiCreator/widgets/choices/inlineChoice/states/Question.js","../qtiCreator/widgets/choices/inlineChoice/states/Choice.js","../qtiCreator/widgets/choices/inlineChoice/states/states.js","../qtiCreator/widgets/choices/inlineChoice/Widget.js","../qtiCreator/renderers/choices/InlineChoice.js","../qtiCreator/widgets/choices/simpleAssociableChoice/states/Question.js","../qtiCreator/widgets/choices/simpleAssociableChoice/states/states.js","../qtiCreator/widgets/choices/simpleAssociableChoice/Widget.js","../qtiCreator/renderers/choices/SimpleAssociableChoice.AssociateInteraction.js","../qtiCreator/renderers/choices/SimpleAssociableChoice.MatchInteraction.js","../qtiCreator/widgets/choices/simpleChoice/states/Question.js","../qtiCreator/widgets/choices/simpleChoice/states/states.js","../qtiCreator/widgets/choices/simpleChoice/Widget.js","../qtiCreator/renderers/choices/SimpleChoice.ChoiceInteraction.js","../qtiCreator/renderers/choices/SimpleChoice.OrderInteraction.js","../qtiCreator/tpl/container!tpl","../qtiCreator/renderers/Container.js","../qtiCreator/renderers/Figcaption.js","../qtiCreator/widgets/static/figure/states/Sleep.js","../qtiCreator/tpl/forms/static/figure!tpl","../qtiCreator/widgets/static/helpers/inline.js","../qtiCreator/widgets/static/figure/states/Active.js","../qtiCreator/widgets/static/figure/states/states.js","../qtiCreator/widgets/static/helpers/widget.js","../qtiCreator/tpl/toolbars/media!tpl","../qtiCreator/widgets/static/figure/Widget.js","../qtiCreator/renderers/Figure.js","../qtiCreator/widgets/static/img/states/Sleep.js","../qtiCreator/tpl/forms/static/img!tpl","../qtiCreator/widgets/static/img/states/Active.js","../qtiCreator/widgets/static/img/states/states.js","../qtiCreator/widgets/static/img/Widget.js","../qtiCreator/renderers/Img.js","../qtiCreator/tpl/forms/static/include!tpl","../qtiCreator/widgets/static/include/states/Active.js","../qtiCreator/widgets/static/include/states/states.js","../qtiCreator/widgets/static/include/Widget.js","../qtiCreator/tpl/include!tpl","../qtiCreator/renderers/Include.js","../qtiCreator/tpl/toolbars/grip!tpl","../qtiCreator/widgets/helpers/movable.js","../qtiCreator/tpl/toolbars/interaction!tpl","../qtiCreator/tpl/toolbars/okButton!tpl","../qtiCreator/widgets/interactions/Widget.js","../qtiCreator/widgets/interactions/states/Sleep.js","../qtiCreator/widgets/interactions/states/Active.js","../qtiCreator/tpl/toolbars/addChoice!tpl","../qtiCreator/widgets/interactions/states/Question.js","../qtiCreator/widgets/interactions/states/Choice.js","../qtiCreator/widgets/component/minMax/minMax!tpl","../qtiCreator/widgets/component/minMax/minMax.js","../qtiCreator/tpl/forms/response/responseForm!tpl","../qtiCreator/tpl/modalFeedback/rule!tpl","../qtiCreator/tpl/modalFeedback/panel!tpl","../qtiCreator/widgets/interactions/helpers/formElement.js","../qtiCreator/widgets/helpers/modalFeedbackConditions.js","../qtiCreator/widgets/helpers/modalFeedbackRule.js","../qtiCreator/widgets/interactions/helpers/answerState.js","../qtiCreator/widgets/interactions/states/Answer.js","../qtiCreator/widgets/interactions/states/Correct.js","../qtiCreator/widgets/interactions/states/Map.js","../qtiCreator/widgets/interactions/states/NoRp.js","../qtiCreator/widgets/states/Custom.js","../qtiCreator/tpl/notifications/widgetOverlay!tpl","../qtiCreator/widgets/interactions/states/Custom.js","../qtiCreator/widgets/interactions/states/states.js","../qtiCreator/widgets/interactions/blockInteraction/states/Question.js","../qtiCreator/widgets/interactions/blockInteraction/states/states.js","../qtiCreator/tpl/forms/interactions/associate!tpl","../qtiCreator/widgets/interactions/associateInteraction/states/Question.js","../qtiCreator/widgets/interactions/associateInteraction/states/Choice.js","../qtiCreator/widgets/helpers/placeholder.js","../qtiCreator/widgets/interactions/associateInteraction/ResponseWidget.js","../qtiCreator/widgets/interactions/associateInteraction/states/Correct.js","../qtiCreator/tpl/toolbars/associableChoice.answer!tpl","../qtiCreator/widgets/interactions/associateInteraction/states/Map.js","../qtiCreator/widgets/interactions/associateInteraction/states/states.js","../qtiCreator/widgets/interactions/associateInteraction/Widget.js","../qtiCreator/renderers/interactions/AssociateInteraction.js","../qtiCreator/tpl/forms/interactions/choice!tpl","../qtiCreator/widgets/interactions/choiceInteraction/states/Question.js","../qtiCreator/widgets/interactions/choiceInteraction/states/Choice.js","../qtiCreator/tpl/toolbars/simpleChoice.score!tpl","../qtiCreator/tpl/toolbars/simpleChoice.label!tpl","../qtiCreator/widgets/interactions/choiceInteraction/ResponseWidget.js","../qtiCreator/widgets/interactions/choiceInteraction/states/Correct.js","../qtiCreator/widgets/interactions/choiceInteraction/states/Map.js","../qtiCreator/widgets/interactions/choiceInteraction/states/states.js","../qtiCreator/widgets/interactions/choiceInteraction/Widget.js","../qtiCreator/renderers/interactions/ChoiceInteraction.js","../qtiCreator/widgets/interactions/inlineInteraction/Widget.js","../qtiCreator/widgets/interactions/inlineInteraction/states/Sleep.js","../qtiCreator/widgets/interactions/inlineInteraction/states/Active.js","../qtiCreator/widgets/interactions/inlineInteraction/states/states.js","../qtiCreator/tpl/forms/interactions/endAttempt!tpl","../qtiCreator/widgets/interactions/endAttemptInteraction/states/Question.js","../qtiCreator/widgets/interactions/endAttemptInteraction/states/states.js","../qtiCreator/tpl/inlineInteraction/endAttemptInteraction!tpl","../qtiCreator/widgets/interactions/endAttemptInteraction/Widget.js","../qtiCreator/tpl/inlineInteraction/endAttemptInteraction.placeholder!tpl","../qtiCreator/renderers/interactions/EndAttemptInteraction.js","../qtiCreator/tpl/forms/interactions/extendedText!tpl","../qtiCreator/widgets/interactions/extendedTextInteraction/states/Question.js","../qtiCreator/widgets/helpers/stringResponse.js","../qtiCreator/widgets/interactions/extendedTextInteraction/states/Correct.js","../qtiCreator/widgets/interactions/extendedTextInteraction/states/Sleep.js","../qtiCreator/widgets/interactions/extendedTextInteraction/states/NoRp.js","../qtiCreator/widgets/interactions/extendedTextInteraction/states/states.js","../qtiCreator/widgets/interactions/extendedTextInteraction/Widget.js","../qtiCreator/renderers/interactions/ExtendedTextInteraction.js","../qtiCreator/widgets/helpers/selectionWrapper.js","../qtiCreator/tpl/forms/interactions/gapMatch!tpl","tpl!taoQtiItem/qtiCreator/tpl/toolbars/gap-create","../qtiCreator/tpl/toolbars/htmlEditorTrigger!tpl","../qtiCreator/widgets/interactions/gapMatchInteraction/states/Question.js","../qtiCreator/widgets/interactions/gapMatchInteraction/states/Correct.js","../qtiCreator/tpl/forms/response/pairScoreMappingForm!tpl","../qtiCreator/tpl/forms/response/pairScoreForm!tpl","../qtiCreator/widgets/interactions/helpers/pairScoringForm.js","../qtiCreator/widgets/interactions/gapMatchInteraction/states/Map.js","../qtiCreator/widgets/interactions/gapMatchInteraction/states/states.js","../qtiCreator/widgets/interactions/gapMatchInteraction/Widget.js","../qtiCreator/renderers/interactions/GapMatchInteraction.js","../qtiCreator/widgets/interactions/graphicInteraction/Widget.js","../qtiCreator/widgets/interactions/helpers/responsiveMetaChange.js","../qtiCreator/widgets/interactions/graphicAssociateInteraction/states/Sleep.js","../qtiCreator/tpl/graphicInteraction/sidebar!tpl","../qtiCreator/widgets/interactions/helpers/shapeSideBar.js","../qtiCreator/widgets/interactions/helpers/shapeHandlers.js","../qtiCreator/widgets/interactions/helpers/shapeResizer.js","../qtiCreator/widgets/interactions/helpers/shapeMover.js","../qtiCreator/widgets/interactions/helpers/pathBuilder.js","../qtiCreator/widgets/interactions/helpers/shapeFactory.js","../qtiCreator/widgets/interactions/helpers/shapeEditor.js","../qtiCreator/widgets/interactions/helpers/graphicInteractionShapeEditor.js","../qtiCreator/widgets/interactions/helpers/resourceManager.js","../qtiCreator/widgets/interactions/helpers/imageSelector.js","../qtiCreator/tpl/forms/interactions/graphicAssociate!tpl","../qtiCreator/tpl/forms/choices/associableHotspot!tpl","../qtiCreator/widgets/interactions/helpers/bgImage.js","../qtiCreator/widgets/interactions/graphicAssociateInteraction/states/Question.js","../qtiCreator/widgets/interactions/graphicAssociateInteraction/states/Correct.js","../qtiCreator/widgets/interactions/graphicAssociateInteraction/states/Map.js","../qtiCreator/widgets/interactions/graphicAssociateInteraction/states/states.js","../qtiCreator/widgets/interactions/graphicAssociateInteraction/Widget.js","../qtiCreator/renderers/interactions/GraphicAssociateInteraction.js","../qtiCreator/widgets/interactions/graphicGapMatchInteraction/states/Sleep.js","../qtiCreator/tpl/forms/interactions/graphicGapMatch!tpl","../qtiCreator/tpl/forms/choices/gapImg!tpl","../qtiCreator/widgets/interactions/graphicGapMatchInteraction/states/Question.js","../qtiCreator/widgets/interactions/graphicGapMatchInteraction/states/Correct.js","../qtiCreator/widgets/interactions/graphicGapMatchInteraction/states/Map.js","../qtiCreator/widgets/interactions/graphicGapMatchInteraction/states/states.js","../qtiCreator/widgets/interactions/graphicGapMatchInteraction/Widget.js","../qtiCreator/renderers/interactions/GraphicGapMatchInteraction.js","../qtiCreator/widgets/interactions/graphicOrderInteraction/states/Sleep.js","../qtiCreator/tpl/forms/interactions/graphicOrder!tpl","../qtiCreator/tpl/forms/choices/hotspot!tpl","../qtiCreator/widgets/interactions/graphicOrderInteraction/states/Question.js","../qtiCreator/widgets/interactions/graphicOrderInteraction/states/Correct.js","../qtiCreator/widgets/interactions/graphicOrderInteraction/states/states.js","../qtiCreator/widgets/interactions/graphicOrderInteraction/Widget.js","../qtiCreator/renderers/interactions/GraphicOrderInteraction.js","../qtiCreator/widgets/interactions/hotspotInteraction/states/Sleep.js","../qtiCreator/tpl/forms/interactions/hotspot!tpl","../qtiCreator/widgets/interactions/hotspotInteraction/states/Question.js","../qtiCreator/widgets/interactions/hotspotInteraction/states/Correct.js","../qtiCreator/widgets/interactions/helpers/graphicScorePopup.js","../qtiCreator/tpl/forms/response/graphicScoreMappingForm!tpl","../qtiCreator/widgets/interactions/hotspotInteraction/states/Map.js","../qtiCreator/widgets/interactions/hotspotInteraction/states/states.js","../qtiCreator/widgets/interactions/hotspotInteraction/Widget.js","../qtiCreator/renderers/interactions/HotspotInteraction.js","../qtiCreator/tpl/forms/interactions/hottext!tpl","tpl!taoQtiItem/qtiCreator/tpl/toolbars/hottext-create","tpl!taoQtiItem/qtiCreator/tpl/toolbars/hottext-create-multiple","../qtiCreator/widgets/interactions/hottextInteraction/states/Question.js","../qtiCreator/widgets/interactions/hottextInteraction/states/Correct.js","../qtiCreator/tpl/interactions/hottextInteraction.score!tpl","../qtiCreator/widgets/interactions/hottextInteraction/states/Map.js","../qtiCreator/widgets/interactions/hottextInteraction/states/states.js","../qtiCreator/widgets/interactions/hottextInteraction/Widget.js","../qtiCreator/renderers/interactions/HottextInteraction.js","../qtiCreator/tpl/forms/interactions/inlineChoice!tpl","../qtiCreator/widgets/interactions/inlineChoiceInteraction/states/Question.js","../qtiCreator/widgets/interactions/inlineChoiceInteraction/ResponseWidget.js","../qtiCreator/widgets/interactions/inlineChoiceInteraction/states/Correct.js","../qtiCreator/widgets/interactions/inlineChoiceInteraction/states/Map.js","../qtiCreator/widgets/interactions/inlineChoiceInteraction/states/NoRp.js","../qtiCreator/widgets/interactions/inlineChoiceInteraction/states/states.js","../qtiCreator/tpl/inlineInteraction/inlineChoiceInteraction!tpl","../qtiCreator/tpl/inlineInteraction/inlineChoice!tpl","../qtiCreator/widgets/interactions/inlineChoiceInteraction/Widget.js","../qtiCreator/tpl/inlineInteraction/inlineChoiceInteraction.placeholder!tpl","../qtiCreator/renderers/interactions/InlineChoiceInteraction.js","../qtiCreator/tpl/toolbars/matchInteraction.adder!tpl","../qtiCreator/tpl/interactions/matchInteraction.row!tpl","../qtiCreator/tpl/interactions/matchInteraction.cell!tpl","../qtiCreator/widgets/interactions/matchInteraction/states/Question.js","../qtiCreator/tpl/toolbars/matchInteraction.score!tpl","../qtiCreator/widgets/interactions/matchInteraction/ResponseWidget.js","../qtiCreator/widgets/interactions/matchInteraction/states/Correct.js","../qtiCreator/widgets/interactions/matchInteraction/states/Map.js","../qtiCreator/widgets/interactions/matchInteraction/states/states.js","../qtiCreator/widgets/interactions/matchInteraction/Widget.js","../qtiCreator/renderers/interactions/MatchInteraction.js","../qtiCreator/tpl/forms/interactions/media!tpl","../qtiCreator/widgets/interactions/mediaInteraction/states/Question.js","../qtiCreator/widgets/interactions/mediaInteraction/states/Answer.js","../qtiCreator/widgets/interactions/mediaInteraction/states/Sleep.js","../qtiCreator/widgets/interactions/mediaInteraction/states/states.js","../qtiCreator/widgets/interactions/mediaInteraction/Widget.js","../qtiCreator/tpl/interactions/mediaInteraction!tpl","../qtiCreator/renderers/interactions/MediaInteraction.js","../qtiCreator/tpl/forms/interactions/order!tpl","../qtiCreator/widgets/interactions/orderInteraction/states/Question.js","../qtiCreator/widgets/interactions/orderInteraction/states/Correct.js","../qtiCreator/widgets/interactions/orderInteraction/states/states.js","../qtiCreator/widgets/interactions/orderInteraction/Widget.js","../qtiCreator/renderers/interactions/OrderInteraction.js","../qtiCreator/renderers/interactions/PortableCustomInteraction.js","../qtiCreator/widgets/interactions/selectPointInteraction/states/Sleep.js","../qtiCreator/tpl/forms/interactions/selectPoint!tpl","../qtiCreator/widgets/interactions/selectPointInteraction/states/Question.js","../qtiCreator/widgets/interactions/selectPointInteraction/states/Map.js","../qtiCreator/widgets/interactions/selectPointInteraction/states/states.js","../qtiCreator/widgets/interactions/selectPointInteraction/Widget.js","../qtiCreator/renderers/interactions/SelectPointInteraction.js","../qtiCreator/tpl/forms/interactions/slider!tpl","../qtiCreator/widgets/interactions/sliderInteraction/Helper.js","../qtiCreator/widgets/interactions/sliderInteraction/states/Question.js","../qtiCreator/widgets/interactions/sliderInteraction/states/Correct.js","../qtiCreator/widgets/interactions/sliderInteraction/states/states.js","../qtiCreator/widgets/interactions/sliderInteraction/Widget.js","../qtiCreator/renderers/interactions/SliderInteraction.js","../qtiCreator/tpl/forms/interactions/textEntry!tpl","../qtiCreator/widgets/interactions/textEntryInteraction/states/Question.js","../qtiCreator/widgets/interactions/textEntryInteraction/states/Correct.js","../qtiCreator/tpl/inlineInteraction/textEntry!tpl","../qtiCreator/widgets/interactions/textEntryInteraction/states/Map.js","../qtiCreator/widgets/interactions/textEntryInteraction/states/states.js","../qtiCreator/tpl/inlineInteraction/textEntryInteraction!tpl","../qtiCreator/widgets/interactions/textEntryInteraction/Widget.js","../qtiCreator/tpl/inlineInteraction/textEntryInteraction.placeholder!tpl","../qtiCreator/renderers/interactions/TextEntryInteraction.js","../qtiCreator/tpl/forms/interactions/upload!tpl","../qtiCreator/widgets/interactions/uploadInteraction/states/Question.js","../qtiCreator/widgets/interactions/uploadInteraction/states/states.js","../qtiCreator/widgets/interactions/uploadInteraction/Widget.js","../qtiCreator/tpl/interactions/uploadInteraction!tpl","../qtiCreator/renderers/interactions/UploadInteraction.js","../qtiCreator/tpl/forms/item!tpl","../qtiCreator/widgets/item/states/Active.js","../qtiCreator/widgets/item/states/states.js","../qtiCreator/widgets/item/Widget.js","../qtiCreator/tpl/item!tpl","../qtiCreator/renderers/Item.js","../qtiCreator/widgets/static/math/states/Sleep.js","../qtiCreator/tpl/forms/static/math!tpl","../qtiCreator/tpl/forms/static/mathPopup!tpl","../qtiCreator/widgets/static/math/states/Active.js","../qtiCreator/widgets/static/math/states/states.js","../qtiCreator/widgets/static/math/Widget.js","../qtiCreator/renderers/Math.js","../qtiCreator/widgets/static/modalFeedback/states/Sleep.js","../qtiCreator/tpl/forms/static/modalFeedback!tpl","../qtiCreator/widgets/static/modalFeedback/states/Active.js","../qtiCreator/widgets/static/modalFeedback/states/states.js","../qtiCreator/widgets/static/modalFeedback/Widget.js","../qtiCreator/tpl/modalFeedback/modal!tpl","../qtiCreator/renderers/ModalFeedback.js","../qtiCreator/widgets/static/object/states/Sleep.js","../qtiCreator/tpl/forms/static/object!tpl","../qtiCreator/widgets/static/object/states/Active.js","../qtiCreator/widgets/static/object/states/states.js","../qtiCreator/widgets/static/object/Widget.js","../qtiCreator/renderers/Object.js","../qtiCreator/renderers/PortableInfoControl.js","../qtiCreator/widgets/static/printedVariable/states/Sleep.js","../qtiCreator/tpl/forms/static/printedVariable!tpl","../qtiCreator/widgets/static/printedVariable/states/Active.js","../qtiCreator/widgets/static/printedVariable/states/states.js","../qtiCreator/widgets/static/printedVariable/Widget.js","../qtiCreator/tpl/printedVariable!tpl","../qtiCreator/renderers/PrintedVariable.js","../qtiCreator/widgets/static/rubricBlock/states/Sleep.js","../qtiCreator/tpl/forms/static/rubricBlock!tpl","../qtiCreator/widgets/static/rubricBlock/states/Active.js","../qtiCreator/widgets/static/rubricBlock/states/states.js","../qtiCreator/widgets/static/rubricBlock/Widget.js","../qtiCreator/renderers/RubricBlock.js","../qtiCreator/widgets/static/table/states/Sleep.js","../qtiCreator/widgets/static/table/components/tableActions!tpl","../qtiCreator/widgets/static/table/components/tableActions.js","../qtiCreator/tpl/forms/static/table!tpl","../qtiCreator/widgets/static/table/states/Active.js","../qtiCreator/widgets/static/table/states/states.js","../qtiCreator/tpl/toolbars/table!tpl","../qtiCreator/widgets/static/table/Widget.js","../qtiCreator/tpl/table!tpl","../qtiCreator/renderers/Table.js","../qtiCreator/widgets/static/tooltip/states/Sleep.js","../qtiCreator/widgets/helpers/widgetPopup/popupControl!tpl","../qtiCreator/widgets/helpers/widgetPopup/widgetPopup.js","../qtiCreator/widgets/static/tooltip/components/editorField!tpl","../qtiCreator/widgets/static/tooltip/components/editorField.js","../qtiCreator/widgets/static/tooltip/components/tooltipEditor!tpl","../qtiCreator/widgets/static/tooltip/components/tooltipEditor.js","../qtiCreator/tpl/forms/static/tooltip!tpl","../qtiCreator/widgets/static/tooltip/states/Active.js","../qtiCreator/widgets/static/tooltip/states/states.js","../qtiCreator/widgets/static/tooltip/Widget.js","../qtiCreator/tpl/tooltip!tpl","../qtiCreator/tpl/notooltip!tpl","../qtiCreator/renderers/Tooltip.js","../qtiCreator/widgets/helpers/pciMediaManager/propertiesForm!tpl","../qtiCreator/widgets/helpers/pciMediaManager/pciMediaManager.js","../qtiCreator/widgets/interactions/customInteraction/states/Question.js","../qtiCreator/widgets/interactions/customInteraction/states/Sleep.js","../qtiCreator/widgets/interactions/customInteraction/states/states.js","../qtiCreator/widgets/interactions/customInteraction/Widget.js","../qtiCreator/widgets/interactions/gapMatchInteraction/states/Answer.js","../qtiCreator/widgets/interactions/selectPointInteraction/states/Answer.js","../qtiCreator/widgets/static/helpers/comments.js","../qtiCreator/widgets/static/portableInfoControl/states/states.js","../qtiCreator/widgets/static/portableInfoControl/Widget.js","../qtiItem/core/choices/TextVariableChoice.js","../qtiItem/core/choices/TextEntry.js","../qtiItem/core/feedbacks/Feedback.js","../qtiItem/core/feedbacks/FeedbackBlock.js","../qtiItem/core/feedbacks/FeedbackInline.js","../qtiItem/helper/EventMgr.js","../qtiItem/helper/pci.js","../qtiItem/helper/modalFeedback.js","../qtiItem/helper/Parser.js","../qtiRunner/modalFeedback/inlineRenderer.js","../qtiRunner/modalFeedback/modalRenderer.js","../qtiRunner/core/QtiRunner.js","../qtiXmlRenderer/tpl/interactions/portableCustomInteraction/properties!tpl","../qtiXmlRenderer/helper/portableElementTpl.js","../qtiXmlRenderer/tpl/responses/match_correct!tpl","../qtiXmlRenderer/tpl/responses/map_response!tpl","../qtiXmlRenderer/tpl/responses/map_response_point!tpl","../qtiXmlRenderer/helper/responseProcessingTpl.js","../qtiXmlRenderer/tpl/element!tpl","../qtiXmlRenderer/renderers/choices/AssociableHotspot.js","../qtiXmlRenderer/renderers/choices/Gap.js","../qtiXmlRenderer/tpl/choices/gapImg!tpl","../qtiXmlRenderer/renderers/choices/GapImg.js","../qtiXmlRenderer/renderers/choices/GapText.js","../qtiXmlRenderer/renderers/choices/HotspotChoice.js","../qtiXmlRenderer/renderers/choices/Hottext.js","../qtiXmlRenderer/renderers/choices/InlineChoice.js","../qtiXmlRenderer/renderers/choices/SimpleAssociableChoice.js","../qtiXmlRenderer/renderers/choices/SimpleChoice.js","../qtiXmlRenderer/tpl/container!tpl","../qtiXmlRenderer/renderers/Container.js","../qtiXmlRenderer/renderers/feedbacks/ModalFeedback.js","../qtiXmlRenderer/renderers/Figcaption.js","../qtiXmlRenderer/tpl/figure!tpl","../qtiXmlRenderer/renderers/Figure.js","../qtiXmlRenderer/renderers/Img.js","../qtiXmlRenderer/tpl/include!tpl","../qtiXmlRenderer/renderers/Include.js","../qtiXmlRenderer/tpl/interactions/blockInteraction!tpl","../qtiXmlRenderer/renderers/interactions/AssociateInteraction.js","../qtiXmlRenderer/renderers/interactions/ChoiceInteraction.js","../qtiXmlRenderer/renderers/interactions/EndAttemptInteraction.js","../qtiXmlRenderer/renderers/interactions/ExtendedTextInteraction.js","../qtiXmlRenderer/renderers/interactions/GapMatchInteraction.js","../qtiXmlRenderer/renderers/interactions/GraphicAssociateInteraction.js","../qtiXmlRenderer/tpl/interactions/graphicGapMatchInteraction!tpl","../qtiXmlRenderer/renderers/interactions/GraphicGapMatchInteraction.js","../qtiXmlRenderer/renderers/interactions/GraphicOrderInteraction.js","../qtiXmlRenderer/renderers/interactions/HotspotInteraction.js","../qtiXmlRenderer/tpl/interactions/hottextInteraction!tpl","../qtiXmlRenderer/renderers/interactions/HottextInteraction.js","../qtiXmlRenderer/renderers/interactions/InlineChoiceInteraction.js","../qtiXmlRenderer/tpl/interactions/matchInteraction!tpl","../qtiXmlRenderer/renderers/interactions/MatchInteraction.js","../qtiXmlRenderer/tpl/interactions/mediaInteraction!tpl","../qtiXmlRenderer/renderers/interactions/MediaInteraction.js","../qtiXmlRenderer/renderers/interactions/OrderInteraction.js","../qtiXmlRenderer/tpl/interactions/portableCustomInteraction/main!tpl","../qtiXmlRenderer/tpl/interactions/portableCustomInteraction/oat!tpl","../qtiXmlRenderer/tpl/interactions/portableCustomInteraction/ims!tpl","../qtiXmlRenderer/renderers/interactions/PortableCustomInteraction.js","../qtiXmlRenderer/renderers/interactions/Prompt.js","../qtiXmlRenderer/renderers/interactions/SelectPointInteraction.js","../qtiXmlRenderer/renderers/interactions/SliderInteraction.js","../qtiXmlRenderer/renderers/interactions/TextEntryInteraction.js","../qtiXmlRenderer/renderers/interactions/UploadInteraction.js","../qtiXmlRenderer/tpl/item!tpl","../qtiXmlRenderer/renderers/Item.js","../qtiXmlRenderer/renderers/Math.js","../qtiXmlRenderer/tpl/object!tpl","../qtiXmlRenderer/renderers/Object.js","../qtiXmlRenderer/tpl/outcomeDeclaration!tpl","../qtiXmlRenderer/renderers/OutcomeDeclaration.js","../qtiXmlRenderer/tpl/portableInfoControl!tpl","../qtiXmlRenderer/renderers/PortableInfoControl.js","../qtiXmlRenderer/tpl/printedVariable!tpl","../qtiXmlRenderer/renderers/PrintedVariable.js","../qtiXmlRenderer/tpl/responseDeclaration!tpl","../qtiXmlRenderer/renderers/ResponseDeclaration.js","../qtiXmlRenderer/tpl/responseProcessing!tpl","../qtiXmlRenderer/renderers/ResponseProcessing.js","../qtiXmlRenderer/tpl/responses/item_score!tpl","../qtiXmlRenderer/renderers/ResponseProcessingPerInteractionRP.js","../qtiXmlRenderer/tpl/responses/rule!tpl","../qtiXmlRenderer/tpl/responses/rule_condition!tpl","../qtiXmlRenderer/tpl/responses/rule_correct!tpl","../qtiXmlRenderer/tpl/responses/rule_incorrect!tpl","../qtiXmlRenderer/tpl/responses/rule_choices!tpl","../qtiXmlRenderer/renderers/responses/SimpleFeedbackRule.js","../qtiXmlRenderer/renderers/RubricBlock.js","../qtiXmlRenderer/renderers/Stylesheet.js","../qtiXmlRenderer/tpl/table!tpl","../qtiXmlRenderer/renderers/Table.js","../qtiXmlRenderer/tpl/tooltip!tpl","../qtiXmlRenderer/renderers/Tooltip.js","onLayerEnd0.js","module-create.js","/github/workspace/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 (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 _.forEach([].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 _.forEach(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);\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);\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 new 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 _.forEach(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 _.forEach(providers, function(provider){\n if(provider.name && provider.module){\n registry.registerProvider(provider.module);\n }\n });\n\n return registry;\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) 2017 (original work) Open Assessment Technologies SA ;\n */\n/**\n * This plugin triggers the resize event on the qti creator context.\n * It allows other creator components to listen to this event rather than binding their events directly on window\n *\n * @author Christophe Noël \n */\ndefine('taoQtiItem/qtiCreator/context/plugins/content/windowResizer',[\n 'jquery',\n 'lodash',\n 'core/plugin'\n], function($, _, pluginFactory){\n 'use strict';\n\n var $window = $(window),\n pluginName = 'windowResizer',\n ns = '.itemcreatorwindowresizer',\n throttleDelayMs = 200;\n\n /**\n * Returns the configured plugin\n * @returns {Function} the plugin\n */\n return pluginFactory({\n\n name : pluginName,\n\n init : function init(){\n var qtiCreatorContext = this.getHost();\n\n $window.on('resize' + ns, _.throttle(function() {\n qtiCreatorContext.trigger('resize');\n }, throttleDelayMs));\n },\n\n destroy : function destroy() {\n $window.off('resize' + ns);\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) 2017 (original work) Open Assessment Technologies SA ;\n */\n/**\n * The plugin loader with the \"required\" plugins\n *\n * @author Christophe Noël \n */\ndefine('taoQtiItem/qtiCreator/context/loader',[\n 'core/pluginLoader',\n 'taoQtiItem/qtiCreator/context/plugins/content/windowResizer'\n], function(pluginLoader, windowResizer){\n 'use strict';\n\n /**\n * Instantiate the plugin loader with all the required plugins configured\n */\n return pluginLoader({\n content: [windowResizer]\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) 2017 (original work) Open Assessment Technologies SA;\n */\n/**\n * This object provide a shared context for the Qti Creator elements (widgets, renderer, etc.)\n * It differs from the itemCreator in the sense that it should not be bound to the context of *items* creation,\n * but should be usable in a broader context of QTI authoring\n *\n * @author Christophe Noël \n */\ndefine('taoQtiItem/qtiCreator/context/qtiCreatorContext',[\n 'lodash',\n 'core/eventifier',\n 'core/promise',\n 'taoQtiItem/qtiCreator/context/loader'\n], function(_, eventifier, Promise, pluginLoader) {\n 'use strict';\n\n /**\n * @returns {qtiCreatorContext}\n */\n return function qtiCreatorContextFactory() {\n\n const plugins = {};\n\n /**\n * Run a method in all plugins\n *\n * @param {String} method - the method to run\n * @returns {Promise} once that resolve when all plugins are done\n */\n const pluginRun = method => {\n const execStack = [];\n\n _.forEach(plugins, plugin => {\n if(_.isFunction(plugin[method])){\n execStack.push(plugin[method]());\n }\n });\n\n return Promise.all(execStack);\n };\n\n /**\n * @typedef {Object} qtiCreatorContext\n */\n const qtiCreatorContext = {\n /**\n * @fires qtiCreatorContext#init\n * @returns {Promise}\n */\n init() {\n return pluginLoader\n .load()\n .then(() => {\n const pluginFactories = pluginLoader.getPlugins();\n\n // instantiate the plugins first\n _.forEach(pluginFactories, pluginFactory => {\n const plugin = pluginFactory(this);\n plugins[plugin.getName()] = plugin;\n });\n\n // then initialise them\n return pluginRun('init')\n .then(() => {\n /**\n * @event qtiCreatorContext#init the initialization is done\n */\n this.trigger('init');\n });\n })\n .catch(err => {\n this.trigger('error', err);\n });\n },\n\n /**\n * @fires qtiCreatorContext#destroy\n * @returns {Promise}\n */\n destroy() {\n return pluginRun('destroy')\n .then(() => {\n /**\n * @event qtiCreatorContext#destroy the destroy process is done\n */\n this.trigger('destroy');\n })\n .catch(function(err) {\n this.trigger('error', err);\n });\n }\n };\n\n return eventifier(qtiCreatorContext);\n };\n\n});\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 (usedIds && usedIds.includes(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 _.forEach(collectionNames, function (collectionName) {\n //get collection to search in (resolving case like interaction.choices.0\n var collection = element;\n _.forEach(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 _.forEach(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 _.forEach(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 && !usedIds.includes(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 _.forEach(this.metaData, function (v) {\n if (Element.isA(v, '_container')) {\n append(v);\n } else if (_.isArray(v)) {\n _.forEach(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 _.forEach(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 _.forEach(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","/*\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-2018 (original work) Open Assessment Technologies SA;\n *\n */\n\n/**\n * Event helper\n */\ndefine('taoQtiItem/qtiCreator/model/helper/event',['jquery', 'lodash'], function($, _){\n \"use strict\";\n\n var namespace = '.qti-creator';\n var namespaceModel = '.qti-creator';\n var eventList = [\n 'containerBodyChange',\n 'containerElementAdded',\n 'elementCreated.qti-widget',\n 'attributeChange.qti-widget',\n 'choiceCreated.qti-widget',\n 'correctResponseChange.qti-widget',\n 'mapEntryChange.qti-widget',\n 'mapEntryRemove.qti-widget',\n 'deleted.qti-widget',\n 'choiceTextChange.qti-widget',\n 'responseTemplateChange.qti-widget',\n 'mappingAttributeChange.qti-widget',\n 'feedbackRuleConditionChange.qti-widget',\n 'feedbackRuleCreated.qti-widget',\n 'feedbackRuleRemoved.qti-widget',\n 'feedbackRuleElseCreated.qti-widget',\n 'feedbackRuleElseRemoved.qti-widget'\n ];\n\n var event = {\n\n /**\n * Trigger the choiceCreated event\n * @param {Object} choice - the new choice (model)\n * @param {Object} interaction - the interaction the choice belongs to (model)\n */\n choiceCreated : function choiceCreated(choice, interaction){\n $(document).trigger('choiceCreated.qti-widget', {choice : choice, interaction : interaction});\n },\n\n /**\n * Trigger the choiceDeleted event\n * @param {Object} choice - the removed choice (model)\n * @param {Object} interaction - the interaction the choice belongs to (model)\n */\n choiceDeleted : function choiceDeleted(choice, interaction){\n $(document).trigger('choiceDeleted.qti-widget', {choice : choice, interaction : interaction});\n },\n\n deleted : function(element, parent){\n\n if(element.isset()){\n element.unset();\n }\n\n $(document).off('.' + element.getSerial());\n $(document).trigger('deleted.qti-widget', {element : element, parent : parent});\n },\n getList : function(addedNamespace){\n var events = _.clone(eventList);\n if(addedNamespace){\n return _.map(events, function(e){\n return e + '.' + addedNamespace;\n });\n }else{\n return events;\n }\n },\n initElementToWidgetListeners : function(){\n\n var ns = '.widget-container';\n\n //forward all event to the widget $container\n $(document).off(ns).on(event.getList(ns).join(' '), function(e, data){\n var element = data.element || data.container || null,\n widget = data && element && element.data('widget');\n\n // for backward compatibility reasons, we only look for the widget in parent as the last resort\n if (!widget && data.parent) {\n element = data.parent;\n widget = element.data('widget');\n }\n\n if(widget){\n widget.$container.trigger(e.type + namespace + namespaceModel, data);\n }\n });\n\n },\n getNs : function(){\n return namespace;\n },\n getNsModel : function(){\n return namespaceModel;\n }\n };\n\n return event;\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-2021 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/qtiCreator/model/helper/invalidator',['lodash'], function (_) {\n 'use strict';\n const invalidator = {\n completelyValid: function (element) {\n const item = element.getRootElement();\n if (item) {\n const serial = element.getSerial();\n const invalidElements = item.data('invalid') || {};\n\n delete invalidElements[serial];\n item.data('invalid', invalidElements);\n }\n },\n valid: function (element, key) {\n const item = element.getRootElement();\n const serial = element.getSerial();\n\n if (item) {\n const invalidElements = item.data('invalid') || {};\n\n if (key) {\n if (invalidElements[serial] && invalidElements[serial][key]) {\n delete invalidElements[serial][key];\n if (!_.size(invalidElements[serial])) {\n delete invalidElements[serial];\n }\n\n item.data('invalid', invalidElements);\n }\n } else {\n throw new Error('missing required argument \"key\"');\n }\n }\n },\n invalid: function (element, key, message, stateName) {\n const item = element.getRootElement();\n const serial = element.getSerial();\n\n if (item) {\n const invalidElements = item.data('invalid') || {};\n\n if (key) {\n if (!invalidElements[serial]) {\n invalidElements[serial] = {};\n }\n\n invalidElements[serial][key] = {\n message: message || '',\n stateName: stateName || 'active'\n };\n item.data('invalid', invalidElements);\n } else {\n throw new Error('missing required arguments \"key\"');\n }\n }\n },\n isValid: function (element, key) {\n const item = element.getRootElement();\n const serial = element.getSerial();\n\n if (item) {\n const invalidElements = item.data('invalid') || {};\n if (!key) {\n return !invalidElements[serial];\n } else {\n return !(invalidElements[serial] && invalidElements[serial][key]);\n }\n }\n return true;\n }\n };\n\n return invalidator;\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 Technologies SA\n *\n */\ndefine('taoQtiItem/qtiCreator/model/mixin/editable',[\n 'lodash',\n 'jquery',\n 'core/encoder/entity',\n 'taoQtiItem/qtiItem/core/Element',\n 'taoQtiItem/qtiCreator/model/helper/event',\n 'taoQtiItem/qtiCreator/model/helper/invalidator'\n], function (_, $, entity, Element, event, invalidator) {\n 'use strict';\n\n const _removeSelf = function (element) {\n let removed = false;\n const related = element.getRootElement();\n\n if (related) {\n const found = related.find(element.getSerial());\n\n if (found) {\n const parent = found.parent;\n if (element.getResponseDeclaration) {\n const response = element.getResponseDeclaration();\n if (response) {\n invalidator.completelyValid(response);\n Element.unsetElement(response);\n }\n }\n if (Element.isA(parent, 'interaction')) {\n if (element.qtiClass === 'gapImg') {\n parent.removeGapImg(element);\n } else if (Element.isA(element, 'choice')) {\n parent.removeChoice(element);\n }\n removed = true;\n } else if (found.location === 'body' && _.isFunction(parent.initContainer)) {\n if (_.isFunction(element.beforeRemove)) {\n element.beforeRemove();\n }\n\n parent.getBody().removeElement(element);\n removed = true;\n } else if (Element.isA(parent, '_container')) {\n if (_.isFunction(element.beforeRemove)) {\n element.beforeRemove();\n }\n\n parent.removeElement(element);\n removed = true;\n }\n\n if (removed) {\n //mark it instantly as removed in case its is being used somewhere else\n element.data('removed', true);\n invalidator.completelyValid(element);\n event.deleted(element, parent);\n }\n }\n } else {\n throw new Error('no related item found');\n }\n\n return removed;\n };\n\n const _removeElement = function (element, containerPropName, eltToBeRemoved) {\n let targetSerial = '',\n targetElt;\n\n if (element[containerPropName]) {\n if (typeof eltToBeRemoved === 'string') {\n targetSerial = eltToBeRemoved;\n targetElt = Element.getElementBySerial(targetSerial);\n } else if (eltToBeRemoved instanceof Element) {\n targetSerial = eltToBeRemoved.getSerial();\n targetElt = eltToBeRemoved;\n }\n\n if (targetSerial) {\n invalidator.completelyValid(targetElt);\n delete element[containerPropName][targetSerial];\n Element.unsetElement(targetSerial);\n }\n }\n\n return element;\n };\n\n const methods = {\n init: function (serial, attributes) {\n const attr = {};\n\n //init call in the format init(attributes)\n if (typeof serial === 'object') {\n attributes = serial;\n serial = '';\n }\n\n if (_.isFunction(this.getDefaultAttributes)) {\n _.extend(attr, this.getDefaultAttributes());\n }\n _.extend(attr, attributes);\n\n this._super(serial, attr);\n },\n\n /**\n * Get or set an attribute\n * @param {String} key - the attribute name\n * @param {String} [value] - only to set the new value, let empty for a get\n * @returns {String} the attribute value\n */\n attr: function (key, value) {\n const ret = this._super(key, value);\n\n if (typeof key !== 'undefined' && typeof value !== 'undefined') {\n $(document).trigger('attributeChange.qti-widget', {\n element: this,\n key: key,\n value: entity.encode(value)\n });\n }\n return _.isString(ret) ? entity.decode(ret) : ret;\n },\n\n removeAttr: function (key) {\n const ret = this._super(key);\n $(document).trigger('attributeChange.qti-widget', { element: this, key: key, value: null });\n return ret;\n },\n remove: function () {\n if (arguments.length === 0) {\n return _removeSelf(this);\n } else if (arguments.length === 2) {\n return _removeElement(this, arguments[0], arguments[1]);\n } else {\n throw new Error('invalid number of argument given');\n }\n }\n };\n\n return methods;\n});\n\n","/**\n * Define the location of all qti classes used in the QTI Creator\n */\ndefine('taoQtiItem/qtiCreator/model/qtiClasses',['lodash', 'taoQtiItem/qtiItem/core/qtiClasses'], function(_, qtiClasses){\n \"use strict\";\n //clone the qtiClasses instead of modifying it by direct extend:\n return _.defaults({\n 'assessmentItem' : 'taoQtiItem/qtiCreator/model/Item',\n '_container' : 'taoQtiItem/qtiCreator/model/Container',\n 'figure' : 'taoQtiItem/qtiCreator/model/Figure',\n 'img' : 'taoQtiItem/qtiCreator/model/Img',\n 'figcaption' : 'taoQtiItem/qtiCreator/model/Figcaption',\n 'math' : 'taoQtiItem/qtiCreator/model/Math',\n 'object' : 'taoQtiItem/qtiCreator/model/Object',\n 'table' : 'taoQtiItem/qtiCreator/model/Table',\n 'rubricBlock' : 'taoQtiItem/qtiCreator/model/RubricBlock',\n 'modalFeedback' : 'taoQtiItem/qtiCreator/model/feedbacks/ModalFeedback',\n 'choiceInteraction' : 'taoQtiItem/qtiCreator/model/interactions/ChoiceInteraction',\n 'orderInteraction' : 'taoQtiItem/qtiCreator/model/interactions/OrderInteraction',\n 'associateInteraction' : 'taoQtiItem/qtiCreator/model/interactions/AssociateInteraction',\n 'matchInteraction' : 'taoQtiItem/qtiCreator/model/interactions/MatchInteraction',\n 'inlineChoiceInteraction' : 'taoQtiItem/qtiCreator/model/interactions/InlineChoiceInteraction',\n 'simpleChoice' : 'taoQtiItem/qtiCreator/model/choices/SimpleChoice',\n 'simpleAssociableChoice' : 'taoQtiItem/qtiCreator/model/choices/SimpleAssociableChoice',\n 'inlineChoice' : 'taoQtiItem/qtiCreator/model/choices/InlineChoice',\n 'mediaInteraction' : 'taoQtiItem/qtiCreator/model/interactions/MediaInteraction',\n 'uploadInteraction' : 'taoQtiItem/qtiCreator/model/interactions/UploadInteraction',\n 'textEntryInteraction' : 'taoQtiItem/qtiCreator/model/interactions/TextEntryInteraction',\n 'sliderInteraction' : 'taoQtiItem/qtiCreator/model/interactions/SliderInteraction',\n 'extendedTextInteraction' : 'taoQtiItem/qtiCreator/model/interactions/ExtendedTextInteraction',\n 'hotspotInteraction' : 'taoQtiItem/qtiCreator/model/interactions/HotspotInteraction',\n 'selectPointInteraction' : 'taoQtiItem/qtiCreator/model/interactions/SelectPointInteraction',\n 'graphicInteraction' : 'taoQtiItem/qtiCreator/model/interactions/GraphicOrderInteraction',\n 'graphicAssociateInteraction' : 'taoQtiItem/qtiCreator/model/interactions/GraphicAssociateInteraction',\n 'graphicGapMatchInteraction' : 'taoQtiItem/qtiCreator/model/interactions/GraphicGapMatchInteraction',\n 'graphicOrderInteraction' : 'taoQtiItem/qtiCreator/model/interactions/GraphicOrderInteraction',\n 'hotspotChoice' : 'taoQtiItem/qtiCreator/model/choices/HotspotChoice',\n 'gapImg' : 'taoQtiItem/qtiCreator/model/choices/GapImg',\n 'associableHotspot' : 'taoQtiItem/qtiCreator/model/choices/AssociableHotspot',\n 'gapMatchInteraction' : 'taoQtiItem/qtiCreator/model/interactions/GapMatchInteraction',\n 'hottextInteraction' : 'taoQtiItem/qtiCreator/model/interactions/HottextInteraction',\n 'hottext' : 'taoQtiItem/qtiCreator/model/choices/Hottext',\n 'gapText' : 'taoQtiItem/qtiCreator/model/choices/GapText',\n 'gap' : 'taoQtiItem/qtiCreator/model/choices/Gap',\n 'responseDeclaration' : 'taoQtiItem/qtiCreator/model/variables/ResponseDeclaration',\n 'responseProcessing' : 'taoQtiItem/qtiCreator/model/ResponseProcessing',\n 'customInteraction' : 'taoQtiItem/qtiCreator/model/interactions/PortableCustomInteraction',\n 'endAttemptInteraction' : 'taoQtiItem/qtiCreator/model/interactions/EndAttemptInteraction',\n 'infoControl' : 'taoQtiItem/qtiCreator/model/PortableInfoControl',\n 'include' : 'taoQtiItem/qtiCreator/model/Include',\n 'printedVariable' : 'taoQtiItem/qtiCreator/model/PrintedVariable',\n '_tooltip' : 'taoQtiItem/qtiCreator/model/Tooltip'\n }, qtiClasses);\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-2018 (original work) Open Assessment Technologies SA\n *\n */\ndefine('taoQtiItem/qtiCreator/model/helper/container',['jquery', 'lodash', 'taoQtiItem/qtiCreator/model/qtiClasses'], function($, _, qtiClasses){\n \"use strict\";\n var methods = {\n createElements : function(container, body, callback){\n\n var regex = /{{([a-z_]+)\\.?([a-z_]*):new}}/ig;\n\n //first pass to get required qti classes, but do not replace\n var required = {};\n body.replace(regex,\n function(original, qtiClass){\n if(qtiClasses[qtiClass]){\n required[qtiClass] = qtiClasses[qtiClass];\n }else{\n throw new Error('missing required class : ' + qtiClass);\n }\n });\n\n //second pass after requiring classes:\n require(_.values(required), function(){\n\n //register and name all loaded classes:\n var Qti = _.reduce([].slice.call(arguments), function (acc, qtiClassElt) {\n acc[qtiClassElt.prototype.qtiClass] = qtiClassElt;\n\n return acc;\n }, {});\n var promises = [];\n var $doc = $(document);\n\n //create new elements\n var newElts = {};\n var newBody = body.replace(regex,\n function(original, qtiClass, subClass){\n var elt = new Qti[qtiClass]();\n if(Qti[qtiClass]){\n //create new element\n if(container.getRenderer()){\n elt.setRenderer(container.getRenderer());\n }\n newElts[elt.getSerial()] = elt;\n\n //manage sub-classed qtiClass\n if(subClass){\n //@todo generalize it from customInteraction\n elt.typeIdentifier = subClass;\n }\n\n return elt.placeholder();\n }else{\n return original;\n }\n });\n\n //insert them:\n container.setElements(newElts, newBody);\n\n //operations after insertions:\n _.forEach(newElts, function(elt){\n if(_.isFunction(elt.buildIdentifier)){\n elt.buildIdentifier();\n }\n if(_.isFunction(elt.afterCreate)){\n promises.push(elt.afterCreate());\n }\n });\n\n if(typeof(callback) === 'function'){\n Promise.all(promises).then(function(){\n _.forEach(newElts, function(elt){\n $doc.trigger('elementCreated.qti-widget', {parent : container.parent(), element : elt});\n });\n callback.call(container, newElts);\n }).catch(function(err){\n container.getRenderer().getCreatorContext().trigger('error', err);\n });\n }\n });\n\n }\n };\n\n return methods;\n});\n\n","define('taoQtiItem/qtiCreator/model/mixin/editableContainer',['taoQtiItem/qtiCreator/model/helper/container'], function(containerHelper){\n \"use strict\";\n var methods = {\n createElements : function(body, callback){\n \n var _this = this;\n containerHelper.createElements(_this.getBody(), body, function(newElts){\n callback.call(_this, newElts);\n });\n\n }\n };\n\n return methods;\n});\n","define('taoQtiItem/qtiItem/core/IdentifiedElement',['taoQtiItem/qtiItem/core/Element', 'taoQtiItem/qtiItem/helper/util'], function (Element, util) { 'use strict';\n\n Element = Element && Object.prototype.hasOwnProperty.call(Element, 'default') ? Element['default'] : Element;\n util = util && Object.prototype.hasOwnProperty.call(util, 'default') ? util['default'] : util;\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 /**\n * IdentifiedElement model\n */\n var IdentifiedElement = Element.extend({\n /**\n * Generates and assign an identifier\n * @param {String} prefix - identifier prefix\n * @param {Boolean} [useSuffix = true] - add a \"_ + index\" to the identifier\n * @returns {Object} for chaining\n */\n buildIdentifier: function buildIdentifier(prefix, useSuffix) {\n var item = this.getRootElement();\n var id = util.buildIdentifier(item, prefix || this.qtiClass, useSuffix);\n if (id) {\n this.attr('identifier', id);\n }\n return this;\n },\n\n /**\n * Get/set and identifier. It will be generated if it doesn't exists.\n * @param {String} [value] - set the value or get it if not set.\n * @returns {String} the identifier\n */\n id: function id(value) {\n if (!value && !this.attr('identifier')) {\n this.buildIdentifier(this.qtiClass, true);\n }\n return this.attr('identifier', value);\n }\n });\n\n return IdentifiedElement;\n\n});\n\n","define('taoQtiItem/qtiItem/mixin/Mixin',[],function () { 'use strict';\n\n //@todo : need refactoring of qti item mixin with lodash.mixin()\n var Mixin = {\n augment: function(targetClass, methods, options) {\n if (typeof targetClass === 'function' && typeof methods === 'object') {\n for (var methodName in methods) {\n if (!Object.hasOwnProperty(targetClass.prototype, methodName)) {\n targetClass.prototype[methodName] = methods[methodName];\n } else {\n if (options && options.append) {\n var _parent = targetClass.prototype[methodName];\n targetClass.prototype[methodName] = function() {\n methods[methodName].apply(this, arguments);\n return _parent.apply(this, arguments);\n };\n }\n }\n }\n }\n }\n };\n\n return Mixin;\n\n});\n\n","define('taoQtiItem/qtiItem/core/Container',['jquery', 'lodash', 'taoQtiItem/qtiItem/core/Element', 'taoQtiItem/qtiItem/helper/rendererConfig'], function ($, _, Element, rendererConfig) { '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 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) 2014 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n */\n\n var Container = Element.extend({\n qtiClass: '_container',\n init: function (body) {\n this._super(); //generate serial, attributes array always empty\n if (body && typeof body !== 'string') {\n throw 'the body of a container must be a string';\n }\n this.bdy = body || '';\n this.elements = {};\n },\n body: function (body) {\n if (typeof body === 'undefined') {\n return this.bdy;\n } else {\n if (typeof body === 'string') {\n this.bdy = body;\n $(document).trigger('containerBodyChange', {\n body: body,\n container: this,\n parent: this.parent()\n });\n } else {\n throw 'body must be a string';\n }\n }\n },\n setElements: function (elements, body) {\n var returnValue = false;\n\n for (var i in elements) {\n var elt = elements[i];\n if (elt instanceof Element) {\n body = body || this.bdy;\n if (body.indexOf(elt.placeholder()) === -1) {\n body += elt.placeholder(); //append the element if no placeholder found\n }\n\n elt.setRootElement(this.getRootElement() || null);\n this.elements[elt.getSerial()] = elt;\n $(document).trigger('containerElementAdded', {\n element: elt,\n container: this\n });\n\n returnValue = true;\n } else {\n returnValue = false;\n throw 'expected a qti element';\n }\n }\n\n this.body(body);\n\n return returnValue;\n },\n setElement: function (element, body) {\n return this.setElements([element], body);\n },\n removeElement: function (element) {\n var serial = '';\n if (typeof element === 'string') {\n serial = element;\n } else if (element instanceof Element) {\n serial = element.getSerial();\n }\n delete this.elements[serial];\n this.body(this.body().replace('{{' + serial + '}}', ''));\n return this;\n },\n getElements: function (qtiClass) {\n var elts = {};\n if (typeof qtiClass === 'string') {\n for (var serial in this.elements) {\n if (Element.isA(this.elements[serial], qtiClass)) {\n elts[serial] = this.elements[serial];\n }\n }\n } else {\n elts = _.clone(this.elements);\n }\n return elts;\n },\n getElement: function (serial) {\n return this.elements[serial] ? this.elements[serial] : null;\n },\n getComposingElements: function () {\n var elements = this.getElements();\n var elts = {};\n for (var serial in elements) {\n elts[serial] = elements[serial]; //pass individual object by ref, instead of the whole list(object)\n elts = _.extend(elts, elements[serial].getComposingElements());\n }\n return elts;\n },\n render: function () {\n var args = rendererConfig.getOptionsFromArguments(arguments),\n renderer = args.renderer || this.getRenderer(),\n elementsData = [],\n tpl = this.body();\n\n for (var serial in this.elements) {\n var elt = this.elements[serial];\n if (typeof elt.render === 'function') {\n if (elt.qtiClass === '_container') {\n //@todo : container rendering merging, to be tested\n tpl = tpl.replace(elt.placeholder(), elt.render(renderer));\n } else {\n tpl = tpl\n .replace(elt.placeholder(), serial)\n .replace(new RegExp(`{${serial}`), `{${serial}`)\n .replace(serial, '{{{' + serial + '}}}');\n elementsData[serial] = elt.render(renderer);\n }\n } else {\n throw 'render() is not defined for the qti element: ' + serial;\n }\n }\n\n if (renderer.isRenderer) {\n return this._super(\n {\n body: renderer.renderDirect(tpl, elementsData),\n contentModel: this.contentModel || 'flow'\n },\n renderer,\n args.placeholder\n );\n } else {\n throw 'invalid qti renderer for qti container';\n }\n },\n postRender: function (data, altClassName, renderer) {\n renderer = renderer || this.getRenderer();\n\n var res = _(this.elements)\n .filter(function (elt) {\n return typeof elt.postRender === 'function';\n })\n .map(function (elt) {\n return elt.postRender(data, '', renderer);\n })\n .flatten(true)\n .value()\n .concat(this._super(data, altClassName, renderer));\n return res;\n },\n toArray: function () {\n var arr = {\n serial: this.serial,\n body: this.bdy,\n elements: {}\n };\n\n for (var serial in this.elements) {\n arr.elements[serial] = this.elements[serial].toArray();\n }\n\n return arr;\n },\n find: function (serial, parent) {\n var found = null;\n\n if (this.elements[serial]) {\n found = { parent: parent || this, element: this.elements[serial], location: 'body' };\n } else {\n _.forEach(this.elements, function (elt) {\n found = elt.find(serial);\n if (found) {\n return false; //break loop\n }\n });\n }\n\n return found;\n },\n isEmpty: function () {\n return !this.bdy;\n }\n });\n\n return Container;\n\n});\n\n","define('taoQtiItem/qtiItem/mixin/Container',['taoQtiItem/qtiItem/mixin/Mixin', 'taoQtiItem/qtiItem/core/Container'], function (Mixin, Container$1) { 'use strict';\n\n Mixin = Mixin && Object.prototype.hasOwnProperty.call(Mixin, 'default') ? Mixin['default'] : Mixin;\n Container$1 = Container$1 && Object.prototype.hasOwnProperty.call(Container$1, 'default') ? Container$1['default'] : Container$1;\n\n var methods = {\n initContainer: function(body) {\n this.bdy = new Container$1(body || '');\n this.bdy.setRootElement(this.getRootElement() || null);\n this.bdy.contentModel = 'blockStatic';\n },\n getBody: function() {\n return this.bdy;\n },\n body: function(body) {\n var ret = this.bdy.body(body);\n return body ? this : ret; //for method chaining on get\n },\n setElement: function(element, body) {\n this.bdy.setElement(element, body);\n return this;\n },\n removeElement: function(element) {\n return this.bdy.removeElement(element);\n },\n getElements: function(qtiClass) {\n return this.bdy.getElements(qtiClass);\n },\n getElement: function(serial) {\n return this.bdy.getElement(serial);\n }\n };\n\n var Container = {\n augment: function(targetClass) {\n Mixin.augment(targetClass, methods);\n },\n methods: methods\n };\n\n return Container;\n\n});\n\n","define('taoQtiItem/qtiItem/mixin/ContainerItemBody',['taoQtiItem/qtiItem/mixin/Mixin', 'taoQtiItem/qtiItem/mixin/Container', 'lodash'], function (Mixin, Container, _) { 'use strict';\n\n Mixin = Mixin && Object.prototype.hasOwnProperty.call(Mixin, 'default') ? Mixin['default'] : Mixin;\n Container = Container && Object.prototype.hasOwnProperty.call(Container, 'default') ? Container['default'] : Container;\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n\n var methods = {};\n _.extend(methods, Container.methods);\n _.extend(methods, {\n initContainer: function(body) {\n Container.methods.initContainer.call(this, body);\n this.bdy.contentModel = 'itemBody';\n }\n });\n\n var ContainerItemBody = {\n augment: function(targetClass) {\n Mixin.augment(targetClass, methods);\n },\n methods: methods\n };\n\n return ContainerItemBody;\n\n});\n\n","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';\n\n Element = Element && Object.prototype.hasOwnProperty.call(Element, 'default') ? Element['default'] : Element;\n IdentifiedElement = IdentifiedElement && Object.prototype.hasOwnProperty.call(IdentifiedElement, 'default') ? IdentifiedElement['default'] : IdentifiedElement;\n Container = Container && Object.prototype.hasOwnProperty.call(Container, 'default') ? Container['default'] : Container;\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;\n util = util && Object.prototype.hasOwnProperty.call(util, 'default') ? util['default'] : util;\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 Technlogies SA (under the project TAO-PRODUCT);\n *\n */\n\n var Item = IdentifiedElement.extend({\n qtiClass: 'assessmentItem',\n init: function init(serial, attributes) {\n this._super(serial, attributes);\n this.rootElement = this;\n this.stylesheets = {};\n this.responses = {};\n this.outcomes = {};\n this.modalFeedbacks = {};\n this.namespaces = {};\n this.schemaLocations = {};\n this.responseProcessing = null;\n this.apipAccessibility = null;\n },\n getInteractions: function getInteractions() {\n var interactions = [];\n var elts = this.getComposingElements();\n for (var serial in elts) {\n if (Element.isA(elts[serial], 'interaction')) {\n interactions.push(elts[serial]);\n }\n }\n return interactions;\n },\n addResponseDeclaration: function addResponseDeclaration(response) {\n if (Element.isA(response, 'responseDeclaration')) {\n response.setRootElement(this);\n this.responses[response.getSerial()] = response;\n } else {\n throw 'is not a qti response declaration';\n }\n return this;\n },\n getResponseDeclaration: function getResponseDeclaration(identifier) {\n for (var i in this.responses) {\n if (this.responses[i].attr('identifier') === identifier) {\n return this.responses[i];\n }\n }\n return null;\n },\n addOutcomeDeclaration: function addOutcomeDeclaration(outcome) {\n if (Element.isA(outcome, 'outcomeDeclaration')) {\n outcome.setRootElement(this);\n this.outcomes[outcome.getSerial()] = outcome;\n } else {\n throw 'is not a qti outcome declaration';\n }\n return this;\n },\n getOutcomeDeclaration: function getOutcomeDeclaration(identifier) {\n var found;\n _.forEach(this.outcomes, function(outcome) {\n if (outcome.id() === identifier) {\n found = outcome;\n return false;\n }\n });\n return found;\n },\n getOutcomes: function getOutcomes() {\n return _.clone(this.outcomes);\n },\n removeOutcome: function removeOutcome(identifier) {\n var outcome = this.getOutcomeDeclaration(identifier);\n if (outcome) {\n this.outcomes = _.omit(this.outcomes, outcome.getSerial());\n }\n },\n addModalFeedback: function addModalFeedback(feedback) {\n if (Element.isA(feedback, 'modalFeedback')) {\n feedback.setRootElement(this);\n this.modalFeedbacks[feedback.getSerial()] = feedback;\n } else {\n throw 'is not a qti modal feedback';\n }\n return this;\n },\n getComposingElements: function getComposingElements() {\n var elts = this._super(),\n _this = this;\n _.forEach(['responses', 'outcomes', 'modalFeedbacks', 'stylesheets'], function(elementCollection) {\n for (var i in _this[elementCollection]) {\n var elt = _this[elementCollection][i];\n elts[i] = elt;\n elts = _.extend(elts, elt.getComposingElements());\n }\n });\n if (this.responseProcessing instanceof Element) {\n elts[this.responseProcessing.getSerial()] = this.responseProcessing;\n }\n return elts;\n },\n find: function find(serial) {\n var found = this._super(serial);\n\n if (!found) {\n found = util.findInCollection(this, ['responses', 'outcomes', 'modalFeedbacks', 'stylesheets'], serial);\n }\n\n return found;\n },\n getResponses: function getResponses() {\n return _.clone(this.responses);\n },\n getRootElement: function getRootElement() {\n return this;\n },\n addNamespace: function addNamespace(name, uri) {\n this.namespaces[name] = uri;\n },\n setNamespaces: function setNamespaces(namespaces) {\n this.namespaces = namespaces;\n },\n getNamespaces: function getNamespaces() {\n return _.clone(this.namespaces);\n },\n setSchemaLocations: function setSchemaLocations(locations) {\n this.schemaLocations = locations;\n },\n getSchemaLocations: function getSchemaLocations() {\n return _.clone(this.schemaLocations);\n },\n setApipAccessibility: function setApipAccessibility(apip) {\n this.apipAccessibility = apip || null;\n },\n getApipAccessibility: function getApipAccessibility() {\n return this.apipAccessibility;\n },\n addStylesheet: function addStylesheet(stylesheet) {\n if (Element.isA(stylesheet, 'stylesheet')) {\n stylesheet.setRootElement(this);\n this.stylesheets[stylesheet.getSerial()] = stylesheet;\n } else {\n throw 'is not a qti stylesheet declaration';\n }\n return this;\n },\n removeStyleSheet: function removeStyleSheet(stylesheet) {\n delete this.stylesheets[stylesheet.getSerial()];\n return this;\n },\n stylesheetExists: function stylesheetExists(href) {\n var exists = false;\n _.forEach(this.stylesheets, function(stylesheet) {\n if (stylesheet.attr('href') === href) {\n exists = true;\n return false; //break each loop\n }\n });\n return exists;\n },\n setResponseProcessing: function setResponseProcessing(rp) {\n if (Element.isA(rp, 'responseProcessing')) {\n rp.setRootElement(this);\n this.responseProcessing = rp;\n } else {\n throw 'is not a response processing';\n }\n return this;\n },\n toArray: function toArray() {\n var arr = this._super();\n var toArray = function(elt) {\n return elt.toArray();\n };\n arr.namespaces = this.namespaces;\n arr.schemaLocations = this.schemaLocations;\n arr.outcomes = _.map(this.outcomes, toArray);\n arr.responses = _.map(this.responses, toArray);\n arr.stylesheets = _.map(this.stylesheets, toArray);\n arr.modalFeedbacks = _.map(this.modalFeedbacks, toArray);\n arr.responseProcessing = this.responseProcessing.toArray();\n return arr;\n },\n isEmpty: function isEmpty() {\n var body = this.body().trim();\n\n if (body) {\n //hack to fix #2652\n var $dummy = $('
    ').html(body),\n $children = $dummy.children();\n\n if ($children.length === 1 && $children.hasClass('empty')) {\n return true;\n } else {\n return false;\n }\n } else {\n return true;\n }\n },\n\n /**\n * Clean up an item rendering.\n * Ask the renderer to run destroy if exists.\n */\n clear: function clear() {\n var renderer = this.getRenderer();\n if (renderer) {\n if (_.isFunction(renderer.destroy)) {\n renderer.destroy(this);\n }\n }\n }\n });\n\n Container.augment(Item);\n\n return Item;\n\n});\n\n","define('taoQtiItem/qtiItem/core/Stylesheet',['taoQtiItem/qtiItem/core/Element', 'lodash', 'taoQtiItem/qtiItem/helper/rendererConfig'], function (Element, _, rendererConfig) { 'use strict';\n\n Element = Element && Object.prototype.hasOwnProperty.call(Element, 'default') ? Element['default'] : Element;\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n rendererConfig = rendererConfig && Object.prototype.hasOwnProperty.call(rendererConfig, 'default') ? rendererConfig['default'] : rendererConfig;\n\n var Stylesheet = Element.extend({\n qtiClass: 'stylesheet',\n render: function() {\n var args = rendererConfig.getOptionsFromArguments(arguments),\n renderer = args.renderer || this.getRenderer(),\n defaultData = {};\n\n defaultData.attributes = { href: renderer.resolveUrl(this.attr('href')) };\n\n return this._super(_.merge(defaultData, args.data), args.placeholder, args.subclass, renderer);\n }\n });\n\n return Stylesheet;\n\n});\n\n","define('taoQtiItem/qtiCreator/model/Stylesheet',[\n 'lodash',\n 'taoQtiItem/qtiCreator/model/mixin/editable',\n 'taoQtiItem/qtiItem/core/Stylesheet'\n], function(_, editable, Stylesheet){\n \"use strict\";\n var methods = {};\n _.extend(methods, editable);\n _.extend(methods, {\n getDefaultAttributes : function(){\n return {\n href : 'css/tao-user-styles.css',\n title : '',\n type:'text/css',\n media:'all'\n };\n }\n });\n\n return Stylesheet.extend(methods);\n});\n","define('taoQtiItem/qtiItem/core/ResponseProcessing',['taoQtiItem/qtiItem/core/Element'], function (Element) { 'use strict';\n\n Element = Element && Object.prototype.hasOwnProperty.call(Element, 'default') ? Element['default'] : Element;\n\n var ResponseProcessing = Element.extend({\n qtiClass: 'responseProcessing',\n processingType: '',\n xml: '',\n toArray: function() {\n var arr = this._super();\n arr.processingType = this.processingType;\n arr.xml = this.xml;\n return arr;\n }\n });\n\n return ResponseProcessing;\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 _.forEach(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 _.forEach(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 _.forEach(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 _.forEach(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 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()] = interactionHelper\n .findChoices(interaction, choices, identificationType)\n .map(val => val.serial);\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] = choices[i].map(val => val.serial);\n }\n } else {\n choices = interactionHelper.shuffleChoices(interaction.getChoices());\n this.shuffledChoices[serial] = choices.map(val => val.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) 2014-2022 (original work) Open Assessment Technlogies SA;\n *\n */\n\n/**\n * Config of the QTI XML renderer\n *\n * @author Sam Sipasseuth \n * @author Bertrand Chevrier \n */\ndefine('taoQtiItem/qtiXmlRenderer/renderers/config',[\n 'taoItems/assets/manager'\n], function(assetManagerFactory){\n 'use strict';\n\n //all assets are normalized (relative)\n const assetManager = assetManagerFactory([{\n name : 'nomalize',\n handle: function normalizeStrategy(url){\n if(url){\n return url.toString().replace(/^\\.?\\//, '');\n }\n }\n }]);\n\n /**\n * The XML Renderer config\n */\n return {\n name : 'xmlRenderer',\n locations : {\n '_container' : 'taoQtiItem/qtiXmlRenderer/renderers/Container',\n 'assessmentItem' : 'taoQtiItem/qtiXmlRenderer/renderers/Item',\n 'stylesheet' : 'taoQtiItem/qtiXmlRenderer/renderers/Stylesheet',\n 'responseDeclaration' : 'taoQtiItem/qtiXmlRenderer/renderers/ResponseDeclaration',\n 'outcomeDeclaration' : 'taoQtiItem/qtiXmlRenderer/renderers/OutcomeDeclaration',\n 'responseProcessing' : 'taoQtiItem/qtiXmlRenderer/renderers/ResponseProcessing',\n '_simpleFeedbackRule' : 'taoQtiItem/qtiXmlRenderer/renderers/responses/SimpleFeedbackRule',\n '_tooltip' : 'taoQtiItem/qtiXmlRenderer/renderers/Tooltip',\n 'math' : 'taoQtiItem/qtiXmlRenderer/renderers/Math',\n 'figure' : 'taoQtiItem/qtiXmlRenderer/renderers/Figure',\n 'img' : 'taoQtiItem/qtiXmlRenderer/renderers/Img',\n 'figcaption' : 'taoQtiItem/qtiXmlRenderer/renderers/Figcaption',\n 'object' : 'taoQtiItem/qtiXmlRenderer/renderers/Object',\n 'table' : 'taoQtiItem/qtiXmlRenderer/renderers/Table',\n 'modalFeedback' : 'taoQtiItem/qtiXmlRenderer/renderers/feedbacks/ModalFeedback',\n 'rubricBlock' : 'taoQtiItem/qtiXmlRenderer/renderers/RubricBlock',\n 'associateInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/AssociateInteraction',\n 'choiceInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/ChoiceInteraction',\n 'extendedTextInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/ExtendedTextInteraction',\n 'gapMatchInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/GapMatchInteraction',\n 'graphicAssociateInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/GraphicAssociateInteraction',\n 'graphicGapMatchInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/GraphicGapMatchInteraction',\n 'graphicOrderInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/GraphicOrderInteraction',\n 'hotspotInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/HotspotInteraction',\n 'hottextInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/HottextInteraction',\n 'inlineChoiceInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/InlineChoiceInteraction',\n 'matchInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/MatchInteraction',\n 'mediaInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/MediaInteraction',\n 'orderInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/OrderInteraction',\n 'selectPointInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/SelectPointInteraction',\n 'sliderInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/SliderInteraction',\n 'textEntryInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/TextEntryInteraction',\n 'uploadInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/UploadInteraction',\n 'prompt' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/Prompt',\n 'associableHotspot' : 'taoQtiItem/qtiXmlRenderer/renderers/choices/AssociableHotspot',\n 'gap' : 'taoQtiItem/qtiXmlRenderer/renderers/choices/Gap',\n 'gapImg' : 'taoQtiItem/qtiXmlRenderer/renderers/choices/GapImg',\n 'gapText' : 'taoQtiItem/qtiXmlRenderer/renderers/choices/GapText',\n 'hotspotChoice' : 'taoQtiItem/qtiXmlRenderer/renderers/choices/HotspotChoice',\n 'hottext' : 'taoQtiItem/qtiXmlRenderer/renderers/choices/Hottext',\n 'inlineChoice' : 'taoQtiItem/qtiXmlRenderer/renderers/choices/InlineChoice',\n 'simpleAssociableChoice' : 'taoQtiItem/qtiXmlRenderer/renderers/choices/SimpleAssociableChoice',\n 'simpleChoice' : 'taoQtiItem/qtiXmlRenderer/renderers/choices/SimpleChoice',\n 'customInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/PortableCustomInteraction',\n 'endAttemptInteraction' : 'taoQtiItem/qtiXmlRenderer/renderers/interactions/EndAttemptInteraction',\n 'infoControl' : 'taoQtiItem/qtiXmlRenderer/renderers/PortableInfoControl',\n 'include' : 'taoQtiItem/qtiXmlRenderer/renderers/Include',\n 'printedVariable' : 'taoQtiItem/qtiXmlRenderer/renderers/PrintedVariable'\n },\n options : {\n assetManager : assetManager\n }\n };\n});\n\n","define('taoQtiItem/qtiXmlRenderer/renderers/Renderer',['taoQtiItem/qtiRunner/core/Renderer', 'taoQtiItem/qtiXmlRenderer/renderers/config'], function(Renderer, config){\n 'use strict';\n\n return Renderer.build(config.locations, config.name, config.options);\n});\n\n","define('taoQtiItem/qtiItem/core/variables/VariableDeclaration',['taoQtiItem/qtiItem/core/IdentifiedElement'], function (IdentifiedElement) { 'use strict';\n\n IdentifiedElement = IdentifiedElement && Object.prototype.hasOwnProperty.call(IdentifiedElement, 'default') ? IdentifiedElement['default'] : IdentifiedElement;\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-2017 (original work) Open Assessment Technologies SA;\n *\n */\n\n /**\n * It is the top abstract class for all variable classes\n * (so not renderable and qtiClass undefined)\n */\n var VariableDeclaration = IdentifiedElement.extend({\n init: function init(serial, attributes) {\n this._super(serial, attributes);\n this.defaultValue = null;\n },\n is: function is(qtiClass) {\n return qtiClass === 'variableDeclaration' || this._super(qtiClass);\n },\n toArray: function toArray() {\n var arr = this._super();\n arr.defaultValue = this.defaultValue;\n return arr;\n },\n setDefaultValue: function setDefaultValue(value) {\n this.defaultValue = value;\n },\n getDefaultValue: function getDefaultValue() {\n return this.defaultValue;\n }\n });\n\n return VariableDeclaration;\n\n});\n\n","define('taoQtiItem/qtiItem/core/variables/OutcomeDeclaration',['taoQtiItem/qtiItem/core/variables/VariableDeclaration'], function (VariableDeclaration) { 'use strict';\n\n VariableDeclaration = VariableDeclaration && Object.prototype.hasOwnProperty.call(VariableDeclaration, 'default') ? VariableDeclaration['default'] : VariableDeclaration;\n\n var OutcomeDeclaration = VariableDeclaration.extend({\n qtiClass: 'outcomeDeclaration'\n });\n\n return OutcomeDeclaration;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/maxScore',['lodash', 'lib/gamp/gamp', 'taoQtiItem/qtiItem/helper/response', 'taoQtiItem/qtiItem/core/variables/OutcomeDeclaration'], function (_, gamp, responseHelper, OutcomeDeclaration) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n gamp = gamp && Object.prototype.hasOwnProperty.call(gamp, 'default') ? gamp['default'] : gamp;\n responseHelper = responseHelper && Object.prototype.hasOwnProperty.call(responseHelper, 'default') ? responseHelper['default'] : responseHelper;\n OutcomeDeclaration = OutcomeDeclaration && Object.prototype.hasOwnProperty.call(OutcomeDeclaration, 'default') ? OutcomeDeclaration['default'] : OutcomeDeclaration;\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 (original work) Open Assessment Technologies SA;\n *\n */\n\n var pairExists = function pairExists(collection, pair) {\n if (pair.length !== 2) {\n return false;\n }\n return collection[pair[0] + ' ' + pair[1]] || collection[pair[1] + ' ' + pair[0]];\n };\n const externalScoredValues = ['human', 'externalMachine'];\n\n var maxScore = {\n /**\n * Set the normal maximum to the item\n * @param {Object} item - the standard qti item model object\n */\n setNormalMaximum(item) {\n var normalMaximum,\n scoreOutcome = item.getOutcomeDeclaration('SCORE');\n\n //try setting the computed normal maximum only if the processing type is known, i.e. 'templateDriven'\n if (\n scoreOutcome &&\n item.responseProcessing &&\n item.responseProcessing.processingType === 'templateDriven' &&\n !externalScoredValues.includes(scoreOutcome.attr('externalScored'))\n ) {\n const interactions = item.getInteractions();\n normalMaximum = _.reduce(\n interactions,\n function (acc, interaction) {\n var interactionMaxScore = interaction.getNormalMaximum();\n if (_.isNumber(interactionMaxScore)) {\n return gamp.add(acc, interactionMaxScore);\n } else {\n return false;\n }\n },\n 0\n );\n\n if (_.isNumber(normalMaximum)) {\n scoreOutcome.attr('normalMaximum', normalMaximum);\n } else {\n scoreOutcome.removeAttr('normalMaximum');\n }\n }\n },\n\n /**\n * Set the maximum score of the item\n * @param {Object} item - the standard qti item model object\n */\n setMaxScore(item) {\n var hasInvalidInteraction = false,\n scoreOutcome = item.getOutcomeDeclaration('SCORE'),\n maxScore,\n maxScoreOutcome;\n\n if (!scoreOutcome) {\n // add new score outcome if not already defined\n scoreOutcome = new OutcomeDeclaration({\n cardinality: 'single',\n baseType: 'float',\n normalMinimum: 0.0,\n normalMaximum: 0.0\n });\n item.addOutcomeDeclaration(scoreOutcome);\n scoreOutcome.buildIdentifier('SCORE', false);\n }\n const customOutcomes = _(item.getOutcomes()).filter(function (outcome) {\n return outcome.id() !== 'SCORE' && outcome.id() !== 'MAXSCORE';\n });\n //try setting the computed normal maximum only if the processing type is known, i.e. 'templateDriven'\n if (scoreOutcome && item.responseProcessing && item.responseProcessing.processingType === 'templateDriven') {\n const interactions = item.getInteractions();\n if (externalScoredValues.includes(scoreOutcome.attr('externalScored'))) {\n maxScore = scoreOutcome.attr('normalMaximum') || 0;\n } else {\n maxScore = _.reduce(\n interactions,\n function (acc, interaction) {\n var interactionMaxScore = interaction.getNormalMaximum();\n if (_.isNumber(interactionMaxScore)) {\n return gamp.add(acc, interactionMaxScore);\n } else {\n hasInvalidInteraction = true;\n return acc;\n }\n },\n 0\n );\n\n if (customOutcomes.size()) {\n maxScore = customOutcomes.reduce(function (acc, outcome) {\n return gamp.add(acc, parseFloat(outcome.attr('normalMaximum') || 0));\n }, maxScore);\n }\n }\n\n maxScoreOutcome = item.getOutcomeDeclaration('MAXSCORE');\n if (!hasInvalidInteraction || customOutcomes.size()) {\n if (!maxScoreOutcome) {\n //add new outcome\n maxScoreOutcome = new OutcomeDeclaration({\n cardinality: 'single',\n baseType: 'float'\n });\n\n //attach the outcome to the item before generating item-level unique id\n item.addOutcomeDeclaration(maxScoreOutcome);\n maxScoreOutcome.buildIdentifier('MAXSCORE', false);\n }\n maxScoreOutcome.setDefaultValue(maxScore);\n }\n\n //handle special case when MAXSCORE is set up manually for some interaction like ExtendedText\n if (hasInvalidInteraction && maxScoreOutcome) {\n if (maxScoreOutcome.attributes && maxScoreOutcome.attributes.externalScored) {\n if (_.isUndefined(maxScoreOutcome.defaultValue)) {\n maxScoreOutcome.setDefaultValue(1);\n }\n } else {\n item.removeOutcome('MAXSCORE');\n }\n }\n\n const isAllResponseProcessingRulesNone = !interactions.some(interaction => {\n const responseDeclaration = interaction.getResponseDeclaration();\n const template = responseHelper.getTemplateNameFromUri(responseDeclaration.template);\n return template !== 'NONE';\n });\n const outcomesWithExternalScored = customOutcomes.filter(outcome => {\n return externalScoredValues.includes(outcome.attr('externalScored'));\n });\n const isResponsesEmpty = _.isEmpty(item.responses);\n // remove MAXSCORE and SCORE outcome variables when all interactions are configured with none response processing rule,\n // and the externalScored property of the SCORE variable is set to None\n // and there are no other outcome variables with externalScored property set to human or externalMachine\n // or in case all interactions are without responses\n if (\n (!scoreOutcome.attr('externalScored') &&\n isAllResponseProcessingRulesNone &&\n outcomesWithExternalScored.size() === 0) ||\n isResponsesEmpty\n ) {\n item.removeOutcome('MAXSCORE');\n item.removeOutcome('SCORE');\n }\n // remove custom outcomes if all interactions are without responses\n if (isResponsesEmpty) {\n customOutcomes.forEach(outcome => {\n item.removeOutcome(outcome.id());\n });\n }\n }\n },\n\n /**\n * Sort an array of associable choices by its matchMax attr value\n * @param {Array} choiceCollection\n * @returns {Array}\n */\n getMatchMaxOrderedChoices(choiceCollection) {\n return _(choiceCollection)\n .map(function (choice) {\n var matchMax = parseInt(choice.attr('matchMax'), 10);\n if (_.isNaN(matchMax)) {\n matchMax = 0;\n }\n return {\n matchMax: matchMax === 0 ? Infinity : matchMax,\n id: choice.id()\n };\n })\n .sortBy('matchMax')\n .reverse()\n .valueOf();\n },\n\n /**\n * Compute the maximum score of a \"choice\" typed interaction\n * @param {Object} interaction - a standard interaction model object\n * @returns {Number}\n */\n choiceInteractionBased(interaction, options) {\n var responseDeclaration = interaction.getResponseDeclaration();\n var mapDefault = parseFloat(responseDeclaration.mappingAttributes.defaultValue || 0);\n var template = responseHelper.getTemplateNameFromUri(responseDeclaration.template);\n var max,\n maxChoice,\n minChoice,\n scoreMaps,\n requiredChoiceCount,\n totalAnswerableResponse,\n sortedMapEntries,\n missingMapsCount;\n\n options = _.defaults(options || {}, { maxChoices: 0, minChoices: 0 });\n maxChoice = parseInt(interaction.attr('maxChoices') || options.maxChoices, 10);\n minChoice = 0 ;\n if (maxChoice && minChoice && maxChoice < minChoice) {\n return 0;\n }\n\n if (template === 'MATCH_CORRECT') {\n if (\n maxChoice &&\n _.isArray(responseDeclaration.correctResponse) &&\n (responseDeclaration.correctResponse.length > maxChoice ||\n responseDeclaration.correctResponse.length < minChoice)\n ) {\n //max choice does not enable selecting the correct responses\n max = 0;\n } else if (\n !responseDeclaration.correctResponse ||\n (_.isArray(responseDeclaration.correctResponse) && !responseDeclaration.correctResponse.length)\n ) {\n //no correct response defined -> score always zero\n max = 0;\n } else {\n max = 1;\n }\n } else if (template === 'MAP_RESPONSE') {\n //at least a map entry is required to be valid QTI\n if (!responseDeclaration.mapEntries || !_.size(responseDeclaration.mapEntries)) {\n return 0;\n }\n\n //prepare constraint params\n requiredChoiceCount = minChoice;\n totalAnswerableResponse = maxChoice === 0 ? Infinity : maxChoice;\n\n //sort the score map entries by the score\n scoreMaps = _.values(responseDeclaration.mapEntries);\n\n sortedMapEntries = _(scoreMaps)\n .map(function (v) {\n return parseFloat(v);\n })\n .sortBy()\n .reverse()\n .valueOf()\n .slice(0, totalAnswerableResponse);\n\n //if there is not enough map defined, compared to the minChoice constraint, fill in the rest of required choices with the default map\n missingMapsCount = minChoice - sortedMapEntries.length;\n _.times(missingMapsCount, function () {\n sortedMapEntries.push(mapDefault);\n });\n\n //if the map default is positive, the optimal strategy involves using as much mapDefault as possible\n if (mapDefault && mapDefault > 0) {\n if (maxChoice) {\n missingMapsCount = maxChoice - sortedMapEntries.length;\n } else {\n missingMapsCount = _.size(interaction.getChoices()) - sortedMapEntries.length;\n }\n if (missingMapsCount > 0) {\n _.times(missingMapsCount, function () {\n sortedMapEntries.push(mapDefault);\n });\n }\n }\n\n //calculate the maximum reachable score by choice map\n max = sortedMapEntries.reduce(function (acc, v) {\n var score = v;\n if (score < 0 && requiredChoiceCount <= 0) {\n //if the score is negative check if we have the choice not to pick it\n score = 0;\n }\n requiredChoiceCount--;\n return gamp.add(acc, score);\n }, 0);\n\n //compare the calculated maximum with the mapping upperbound\n if (responseDeclaration.mappingAttributes.upperBound) {\n max = Math.min(max, parseFloat(responseDeclaration.mappingAttributes.upperBound || 0));\n }\n } else if (template === 'MAP_RESPONSE_POINT') {\n //map point response processing does not work on choice based interaction\n max = 0;\n } else if (template === 'NONE') {\n // set max to zero\n max = 0;\n }\n return max;\n },\n\n /**\n * Compute the maximum score of a \"order\" typed interaction\n * @param {Object} interaction - a standard interaction model object\n * @returns {Number}\n */\n orderInteractionBased(interaction) {\n var minChoice = 0 ;\n var maxChoice = parseInt(interaction.attr('maxChoices') || 0, 10);\n var responseDeclaration = interaction.getResponseDeclaration();\n var template = responseHelper.getTemplateNameFromUri(responseDeclaration.template);\n var max;\n\n if (maxChoice && minChoice && maxChoice < minChoice) {\n return 0;\n }\n\n if (template === 'MATCH_CORRECT') {\n if (\n (_.isArray(responseDeclaration.correctResponse) &&\n maxChoice &&\n responseDeclaration.correctResponse.length > maxChoice) ||\n (minChoice )\n ) {\n //max choice does not enable selecting the correct responses\n max = 0;\n } else if (\n !responseDeclaration.correctResponse ||\n (_.isArray(responseDeclaration.correctResponse) && !responseDeclaration.correctResponse.length)\n ) {\n //no correct response defined -> score always zero\n max = 0;\n } else {\n max = 1;\n }\n } else if (template === 'MAP_RESPONSE' || template === 'MAP_RESPONSE_POINT') {\n //map response processing does not work on order based interaction\n max = 0;\n } else if (template === 'NONE') {\n // set max to zero\n max = 0;\n }\n return max;\n },\n\n /**\n * Compute the maximum score of a \"associate\" typed interaction\n * @param {Object} interaction - a standard interaction model object\n * @returns {Number}\n */\n associateInteractionBased(interaction, options) {\n var responseDeclaration = interaction.getResponseDeclaration();\n var template = responseHelper.getTemplateNameFromUri(responseDeclaration.template);\n var maxAssoc = parseInt(interaction.attr('maxAssociations') || 0, 10);\n var minAssoc = 0 ;\n var mapDefault = parseFloat(responseDeclaration.mappingAttributes.defaultValue || 0);\n var max,\n requiredAssoc,\n totalAnswerableResponse,\n usedChoices,\n choicesIdentifiers,\n sortedMapEntries,\n i,\n allPossibleMapEntries,\n infiniteScoringPair;\n\n options = _.defaults(options || {}, { possiblePairs: [], checkInfinitePair: false });\n\n if (maxAssoc && minAssoc && maxAssoc < minAssoc) {\n return 0;\n }\n\n if (template === 'MATCH_CORRECT') {\n if (\n !responseDeclaration.correctResponse ||\n (_.isArray(responseDeclaration.correctResponse) &&\n (!responseDeclaration.correctResponse.length ||\n (maxAssoc && responseDeclaration.correctResponse.length > maxAssoc) ||\n (minAssoc )))\n ) {\n //no correct response defined -> score always zero\n max = 0;\n } else {\n max = 1; //is possible until proven otherwise\n\n //get the list of choices used in map entries\n choicesIdentifiers = [];\n _.forEach(responseDeclaration.correctResponse, function (pair) {\n var choices;\n if (!_.isString(pair)) {\n return;\n }\n choices = pair.trim().split(' ');\n if (_.isArray(choices) && choices.length === 2) {\n choicesIdentifiers.push(choices[0].trim());\n choicesIdentifiers.push(choices[1].trim());\n }\n });\n\n //check if the choices usage are possible within the constraint defined in the interaction\n _.forEach(_.countBy(choicesIdentifiers), function (count, identifier) {\n var matchMax;\n var choice = interaction.getChoiceByIdentifier(identifier);\n if (!choice) {\n max = 0;\n return false;\n }\n matchMax = parseInt(choice.attr('matchMax'), 10);\n if (matchMax && matchMax < count) {\n max = 0;\n return false;\n }\n });\n }\n } else if (template === 'MAP_RESPONSE') {\n requiredAssoc = minAssoc;\n totalAnswerableResponse = maxAssoc === 0 ? Infinity : maxAssoc;\n usedChoices = {};\n\n //at least a map entry is required to be valid QTI\n if (!responseDeclaration.mapEntries || !_.size(responseDeclaration.mapEntries)) {\n return 0;\n }\n\n allPossibleMapEntries = _.clone(responseDeclaration.mapEntries);\n if (mapDefault && mapDefault > 0) {\n _.forEachRight(options.possiblePairs, function (pair) {\n if (!pairExists(allPossibleMapEntries, pair)) {\n allPossibleMapEntries[pair[0] + ' ' + pair[1]] = mapDefault;\n }\n });\n }\n\n //get the sorted list of mapentries ordered by the score\n sortedMapEntries = _(allPossibleMapEntries)\n .map(function (score, pair) {\n return {\n score: parseFloat(score),\n pair: pair\n };\n })\n .sortBy('score')\n .reverse()\n .filter(function (mapEntry) {\n var pair = mapEntry.pair;\n var choices, choiceId, choice, _usedChoices;\n\n if (!_.isString(pair)) {\n return false;\n }\n\n //check that the pair is possible in term of matchMax\n choices = pair.trim().split(' ');\n if (_.isArray(choices) && choices.length === 2) {\n //clone the global used choices array to brings the changes in that object first before storing in the actual object\n _usedChoices = _.cloneDeep(usedChoices);\n\n for (i = 0; i < 2; i++) {\n choiceId = choices[i];\n\n //collect choices usage to check if the pair is possible\n if (!_usedChoices[choiceId]) {\n choice = interaction.getChoiceByIdentifier(choiceId);\n if (!choice) {\n //unexisting choice, skip\n return false;\n }\n _usedChoices[choiceId] = {\n used: 0,\n max: parseInt(choice.attr('matchMax'), 10)\n };\n }\n if (\n _usedChoices[choiceId].max &&\n _usedChoices[choiceId].used === _usedChoices[choiceId].max\n ) {\n //skip\n return false;\n } else {\n _usedChoices[choiceId].used++;\n }\n }\n\n //identify the edge case when we can get infinite association pair that create an infinite score\n infiniteScoringPair =\n infiniteScoringPair ||\n (options.checkInfinitePair &&\n mapEntry.score > 0 &&\n _usedChoices[choices[0]].max === 0 &&\n _usedChoices[choices[1]].max === 0);\n\n //update the global used choices array\n _.assign(usedChoices, _usedChoices);\n return true;\n } else {\n //is not a correct response pair\n return false;\n }\n })\n .valueOf()\n .slice(0, totalAnswerableResponse);\n\n //infinite score => no normalMaximum should be generated for it\n if (infiniteScoringPair) {\n return false;\n }\n\n //reduce the ordered list of map entries to calculate the max score\n max = sortedMapEntries.reduce(function (acc, v) {\n var score = v.score;\n if (v.score < 0 && requiredAssoc <= 0) {\n //if the score is negative check if we have the choice not to pick it\n score = 0;\n }\n requiredAssoc--;\n return gamp.add(acc, score);\n }, 0);\n\n //compare the calculated maximum with the mapping upperbound\n if (responseDeclaration.mappingAttributes.upperBound) {\n max = Math.min(max, parseFloat(responseDeclaration.mappingAttributes.upperBound || 0));\n }\n } else if (template === 'MAP_RESPONSE_POINT') {\n max = 0;\n } else if (template === 'NONE') {\n // set max to zero\n max = 0;\n }\n return max;\n },\n\n /**\n * Compute the maximum score of a \"gap match\" typed interaction\n * @param {Object} interaction - a standard interaction model object\n * @returns {Number}\n */\n gapMatchInteractionBased(interaction) {\n var responseDeclaration = interaction.getResponseDeclaration();\n var template = responseHelper.getTemplateNameFromUri(responseDeclaration.template);\n var mapDefault = parseFloat(responseDeclaration.mappingAttributes.defaultValue || 0);\n var max,\n skippableWrongResponse,\n totalAnswerableResponse,\n usedChoices,\n usedGaps,\n group1,\n group2,\n allPossibleMapEntries;\n var getMatchMaxOrderedChoices = function getMatchMaxOrderedChoices(choiceCollection) {\n return _(choiceCollection)\n .map(function (choice) {\n return {\n matchMax: choice.attr('matchMax') === 0 ? Infinity : choice.attr('matchMax') || 0,\n id: choice.id()\n };\n })\n .sortBy('matchMax')\n .reverse()\n .valueOf();\n };\n var calculatePossiblePairs = function calculatePossiblePairs(gapMatchInteraction) {\n //get max number of pairs\n var pairs = [];\n var matchSet1 = getMatchMaxOrderedChoices(gapMatchInteraction.getChoices());\n var matchSet2 = getMatchMaxOrderedChoices(gapMatchInteraction.getGaps());\n\n _.forEach(matchSet1, function (choice1) {\n _.forEach(matchSet2, function (choice2) {\n pairs.push([choice1.id, choice2.id]);\n });\n });\n\n return pairs;\n };\n\n if (template === 'MATCH_CORRECT') {\n if (\n !responseDeclaration.correctResponse ||\n (_.isArray(responseDeclaration.correctResponse) && !responseDeclaration.correctResponse.length)\n ) {\n //no correct response defined -> score always zero\n max = 0;\n } else {\n max = 1; //is possible until proven otherwise\n group1 = [];\n group2 = [];\n _.forEach(responseDeclaration.correctResponse, function (pair) {\n var choices;\n if (!_.isString(pair)) {\n return;\n }\n choices = pair.trim().split(' ');\n if (_.isArray(choices) && choices.length === 2) {\n group1.push(choices[0].trim());\n group2.push(choices[1].trim());\n }\n });\n\n _.forEach(_.countBy(group1), function (count, identifier) {\n var choice = interaction.getChoiceByIdentifier(identifier);\n var matchMax = parseInt(choice.attr('matchMax'), 10);\n if (matchMax && matchMax < count) {\n max = 0;\n return false;\n }\n });\n\n _.forEach(_.countBy(group2), function (count) {\n var matchMax = 1; //match max for a gap is always 1\n if ( matchMax < count) {\n max = 0;\n return false;\n }\n });\n }\n } else if (template === 'MAP_RESPONSE') {\n skippableWrongResponse = Infinity ;\n totalAnswerableResponse = Infinity ;\n usedChoices = {};\n usedGaps = {};\n\n //at least a map entry is required to be valid QTI\n if (!responseDeclaration.mapEntries || !_.size(responseDeclaration.mapEntries)) {\n return 0;\n }\n\n allPossibleMapEntries = _.clone(responseDeclaration.mapEntries);\n if (mapDefault && mapDefault > 0) {\n _.forEachRight(calculatePossiblePairs(interaction), function (pair) {\n if (!pairExists(allPossibleMapEntries, pair)) {\n allPossibleMapEntries[pair[0] + ' ' + pair[1]] = mapDefault;\n }\n });\n }\n\n max = _(allPossibleMapEntries)\n .map(function (score, pair) {\n return {\n score: parseFloat(score),\n pair: pair\n };\n })\n .sortBy('score')\n .reverse()\n .filter(function (mapEntry) {\n var pair = mapEntry.pair;\n var _usedChoices = _.cloneDeep(usedChoices);\n var choices, choiceId, gapId, choice;\n\n if (!_.isString(pair)) {\n return false;\n }\n\n choices = pair.trim().split(' ');\n if (_.isArray(choices) && choices.length === 2) {\n choiceId = choices[0];\n gapId = choices[1];\n if (!_usedChoices[choiceId]) {\n choice = interaction.getChoiceByIdentifier(choiceId);\n if (!choice) {\n //inexisting choice, skip\n return false;\n }\n _usedChoices[choiceId] = {\n used: 0,\n max: parseInt(choice.attr('matchMax'), 10)\n };\n }\n if (_usedChoices[choiceId].max && _usedChoices[choiceId].used === _usedChoices[choiceId].max) {\n //skip\n return false;\n }\n _usedChoices[choiceId].used++;\n\n if (!usedGaps[gapId]) {\n usedGaps[gapId] = {\n used: 0,\n max: 1\n };\n }\n if (usedGaps[gapId].max && usedGaps[gapId].used === usedGaps[gapId].max) {\n //skip\n return false;\n }\n usedGaps[gapId].used++;\n\n //if an only if it is ok, we merge the temporary used choices array into the global one\n _.assign(usedChoices, _usedChoices);\n return true;\n } else {\n //is not a correct response pair\n return false;\n }\n })\n .valueOf()\n .slice(0, totalAnswerableResponse)\n .reduce(function (acc, v) {\n var score = v.score;\n if (score >= 0) {\n return acc + score;\n } else if (skippableWrongResponse > 0) {\n skippableWrongResponse--;\n return acc;\n } else {\n return acc + score;\n }\n }, 0);\n\n //console.log(usedChoices, allPossibleMapEntries, sortedMaps);\n\n //compare the calculated maximum with the mapping upperbound\n if (responseDeclaration.mappingAttributes.upperBound) {\n max = Math.min(max, parseFloat(responseDeclaration.mappingAttributes.upperBound || 0));\n }\n } else if (template === 'MAP_RESPONSE_POINT') {\n max = false;\n } else if (template === 'NONE') {\n // set max to zero\n max = 0;\n }\n return max;\n },\n\n /**\n * Compute the maximum score of a \"select point\" typed interaction\n * @param {Object} interaction - a standard interaction model object\n * @returns {Number}\n */\n selectPointInteractionBased(interaction) {\n var maxChoice = parseInt(interaction.attr('maxChoices'), 10);\n var responseDeclaration = interaction.getResponseDeclaration();\n var template = responseHelper.getTemplateNameFromUri(responseDeclaration.template);\n var max, skippableWrongResponse, totalAnswerableResponse;\n\n if (template === 'MATCH_CORRECT' || template === 'MAP_RESPONSE') {\n //such templates are not allowed\n return 0;\n } else if (template === 'MAP_RESPONSE_POINT') {\n //calculate the maximum reachable score by choice map\n skippableWrongResponse = Infinity ;\n totalAnswerableResponse = maxChoice === 0 ? Infinity : maxChoice;\n\n max = _(responseDeclaration.mapEntries)\n .map(function (v) {\n return parseFloat(v.mappedValue);\n })\n .sortBy()\n .reverse()\n .valueOf()\n .slice(0, totalAnswerableResponse)\n .reduce(function (acc, v) {\n if (v >= 0) {\n return acc + v;\n } else if (skippableWrongResponse > 0) {\n skippableWrongResponse--;\n return acc;\n } else {\n return acc + v;\n }\n }, 0);\n max = parseFloat(max);\n\n //compare the calculated maximum with the mapping upperbound\n if (responseDeclaration.mappingAttributes.upperBound) {\n max = Math.min(max, parseFloat(responseDeclaration.mappingAttributes.upperBound || 0));\n }\n } else if (template === 'NONE') {\n // set max to zero\n max = 0;\n }\n return max;\n },\n\n /**\n * Compute the maximum score of a \"slider\" typed interaction\n * @param {Object} interaction - a standard interaction model object\n * @returns {Number}\n */\n sliderInteractionBased(interaction) {\n var responseDeclaration = interaction.getResponseDeclaration();\n var template = responseHelper.getTemplateNameFromUri(responseDeclaration.template);\n var max, scoreMaps;\n\n if (template === 'MATCH_CORRECT') {\n if (\n !responseDeclaration.correctResponse ||\n (_.isArray(responseDeclaration.correctResponse) && !responseDeclaration.correctResponse.length)\n ) {\n //no correct response defined -> score always zero\n max = 0;\n } else {\n max = 1;\n }\n } else if (template === 'MAP_RESPONSE') {\n //at least a map entry is required to be valid QTI\n if (!responseDeclaration.mapEntries || !_.size(responseDeclaration.mapEntries)) {\n return 0;\n }\n\n //calculate the maximum reachable score by choice map\n scoreMaps = _.values(responseDeclaration.mapEntries);\n max = _(scoreMaps)\n .map(function (v) {\n return parseFloat(v);\n })\n .max();\n max = parseFloat(max);\n\n //compare the calculated maximum with the mapping upperbound\n if (responseDeclaration.mappingAttributes.upperBound) {\n max = Math.min(max, parseFloat(responseDeclaration.mappingAttributes.upperBound || 0));\n }\n } else if (template === 'MAP_RESPONSE_POINT') {\n max = 0;\n } else if (template === 'NONE') {\n // set max to zero\n max = 0;\n }\n return max;\n },\n\n /**\n * Compute the maximum score of a \"text entry\" typed interaction\n * @param {Object} interaction - a standard interaction model object\n * @returns {Number}\n */\n textEntryInteractionBased(interaction) {\n var responseDeclaration = interaction.getResponseDeclaration();\n var template = responseHelper.getTemplateNameFromUri(responseDeclaration.template);\n var max, scoreMaps;\n\n /**\n * Check that a response is possible or not according to the defined patternmask\n * @param {String} value\n * @returns {Boolean}\n */\n var isPossibleResponse = function isPossibleResponse(value) {\n var patternMask = interaction.attr('patternMask');\n if (patternMask) {\n return !!value.match(new RegExp(patternMask));\n } else {\n //no restriction by pattern so always possible\n return true;\n }\n };\n\n if (template === 'MATCH_CORRECT') {\n if (\n !responseDeclaration.correctResponse ||\n (_.isArray(responseDeclaration.correctResponse) && !responseDeclaration.correctResponse.length)\n ) {\n //no correct response defined -> score always zero\n max = 0;\n } else {\n max = isPossibleResponse(responseDeclaration.correctResponse[0]) ? 1 : 0;\n }\n } else if (template === 'MAP_RESPONSE') {\n //at least a map entry is required to be valid QTI\n if (!responseDeclaration.mapEntries || !_.size(responseDeclaration.mapEntries)) {\n return 0;\n }\n\n //calculate the maximum reachable score by choice map\n scoreMaps = _.values(\n _.filter(responseDeclaration.mapEntries, function (score, key) {\n return isPossibleResponse(key);\n })\n );\n max = _(scoreMaps)\n .map(function (v) {\n return parseFloat(v);\n })\n .max();\n max = parseFloat(max);\n\n //compare the calculated maximum with the mapping upperbound\n if (responseDeclaration.mappingAttributes.upperBound) {\n max = Math.min(max, parseFloat(responseDeclaration.mappingAttributes.upperBound || 0));\n }\n } else if (template === 'MAP_RESPONSE_POINT') {\n max = 0;\n } else if (template === 'NONE') {\n // set max to zero\n max = 0;\n }\n return max;\n },\n\n /**\n * Compute the maximum score of a \"custom\" typed interaction\n * @param {Object} interaction - a standard interaction model object\n * @returns {Number}\n */\n customInteractionBased(interaction) {\n const responseDeclaration = interaction.getResponseDeclaration();\n const template = responseHelper.getTemplateNameFromUri(responseDeclaration.template);\n let max;\n if (template === 'MATCH_CORRECT') {\n if (Array.isArray(responseDeclaration.correctResponse) && responseDeclaration.correctResponse.length) {\n max = 1;\n } else {\n max = 0;\n }\n } else if (template === 'MAP_RESPONSE') {\n //at least a map entry is required to be valid QTI\n if (!responseDeclaration.mapEntries || !_.size(responseDeclaration.mapEntries)) {\n return 0;\n }\n\n const values = _.values(responseDeclaration.mapEntries).map(function (v) {\n return parseFloat(v);\n });\n max = _.max(values);\n\n //compare the calculated maximum with the mapping upperbound\n if (responseDeclaration.mappingAttributes.upperBound) {\n max = Math.min(max, parseFloat(responseDeclaration.mappingAttributes.upperBound || 0));\n }\n } else if (template === 'NONE') {\n // set max to zero\n max = 0;\n } else {\n max = 0;\n }\n return max;\n }\n };\n\n return maxScore;\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) 2020 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/qtiXmlRenderer/renderers/RendererPerInteractionRP',[\n 'taoQtiItem/qtiRunner/core/Renderer',\n 'taoQtiItem/qtiXmlRenderer/renderers/config'\n],\n function (Renderer, config) {\n 'use strict';\n\n return Renderer.build(\n Object.assign(\n {},\n config.locations,\n {\n responseProcessing: 'taoQtiItem/qtiXmlRenderer/renderers/ResponseProcessingPerInteractionRP',\n }\n ),\n config.name,\n config.options\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-2017 (original work) Open Assessment Technologies SA ;\n */\ndefine('taoQtiItem/qtiCreator/helper/xmlRenderer',[\n 'core/logger',\n 'taoQtiItem/qtiXmlRenderer/renderers/Renderer',\n 'taoQtiItem/qtiItem/helper/maxScore',\n 'taoQtiItem/qtiItem/core/Element',\n 'taoQtiItem/qtiXmlRenderer/renderers/RendererPerInteractionRP',\n], function(loggerFactory, XmlRenderer, maxScore, Element, XmlRendererPerInteractionRP){\n 'use strict';\n\n const logger = loggerFactory('taoQtiItem/qtiCreator/helper/xmlRenderer');\n\n const xmlRendererProviders = {\n default: new XmlRenderer({\n shuffleChoices : false\n }).load(),\n perInteractionRP: new XmlRendererPerInteractionRP({\n shuffleChoices : false\n }).load(),\n }\n\n // set default xml renderer provider\n let xmlRenderer = xmlRendererProviders.default;\n\n /**\n * Render elment to XML\n *\n * @param {Object} element\n * @param {Object} options\n * @param {string} options.notAllowTemplate - not allow to render as response processing template\n *\n * @returns {String} rendered XML\n */\n var _render = function(element, options){\n var xml = '';\n try{\n if(element instanceof Element) {\n if (element.is('assessmentItem')) {\n maxScore.setNormalMaximum(element);\n maxScore.setMaxScore(element);\n }\n\n xml = element.render(\n xmlRenderer,\n options\n );\n }\n }catch(e){\n logger.error(e);\n }\n return xml;\n };\n\n return {\n render : _render,\n get() {\n return xmlRenderer;\n },\n setProvider(providerName) {\n if (!xmlRendererProviders[providerName]) {\n throw new Error('Unknown xml renderer provider');\n }\n\n xmlRenderer = xmlRendererProviders[providerName];\n }\n };\n});\n\n","define('taoQtiItem/qtiCreator/model/ResponseProcessing',[\n 'lodash',\n 'taoQtiItem/qtiCreator/model/mixin/editable',\n 'taoQtiItem/qtiItem/core/ResponseProcessing',\n 'taoQtiItem/qtiCreator/helper/xmlRenderer'\n], function(_, editable, ResponseProcessing, xmlRenderer){\n \"use strict\";\n var methods = {};\n _.extend(methods, editable);\n _.extend(methods, {\n getDefaultAttributes : function(){\n return {};\n },\n setProcessingType : function(processingType, xml){\n\n if(this.processingType !== processingType){\n\n if(this.processingType === 'custom'){\n\n //change all response template to default : \"correct\"\n _.forEach(this.getRootElement().getResponses(), function(r){\n r.setTemplate('MATCH_CORRECT');\n });\n }\n\n if (processingType === 'custom') {\n // set current response processing as default\n this.xml = xml || xmlRenderer.render(this.getRootElement().responseProcessing, { notAllowTemplate: true });\n\n // change all response template \"custom\"\n _.forEach(this.getRootElement().getResponses(), function(r){\n r.setTemplate('CUSTOM');\n });\n }\n\n this.processingType = processingType;\n }\n\n }\n });\n\n return ResponseProcessing.extend(methods);\n});\n\n","define('taoQtiItem/qtiCreator/model/variables/OutcomeDeclaration',['lodash', 'taoQtiItem/qtiCreator/model/mixin/editable', 'taoQtiItem/qtiItem/core/variables/OutcomeDeclaration'], function(_, editable, OutcomeDeclaration){\n \"use strict\";\n var methods = {};\n _.extend(methods, editable);\n return OutcomeDeclaration.extend(methods);\n});\n\n","define('taoQtiItem/qtiItem/core/feedbacks/ModalFeedback',['taoQtiItem/qtiItem/core/IdentifiedElement', 'taoQtiItem/qtiItem/mixin/Container'], function (IdentifiedElement, Container) { 'use strict';\n\n IdentifiedElement = IdentifiedElement && Object.prototype.hasOwnProperty.call(IdentifiedElement, 'default') ? IdentifiedElement['default'] : IdentifiedElement;\n Container = Container && Object.prototype.hasOwnProperty.call(Container, 'default') ? Container['default'] : Container;\n\n var ModalFeedback = IdentifiedElement.extend({\n qtiClass: 'modalFeedback',\n is: function(qtiClass) {\n return qtiClass === 'feedback' || this._super(qtiClass);\n }\n });\n\n Container.augment(ModalFeedback);\n\n return ModalFeedback;\n\n});\n\n","define('taoQtiItem/qtiCreator/model/feedbacks/ModalFeedback',[\n 'lodash',\n 'i18n',\n 'taoQtiItem/qtiCreator/model/mixin/editable',\n 'taoQtiItem/qtiItem/core/feedbacks/ModalFeedback'\n], function (_, __, editable, ModalFeedback) {\n \"use strict\";\n var methods = {};\n _.extend(methods, editable);\n _.extend(methods, {\n getDefaultAttributes : function(){\n return {\n title : __('modal feedback title'),\n showHide : 'show'\n };\n }\n });\n \n return ModalFeedback.extend(methods);\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-2019 (original work) Open Assessment Technologies SA ;\n *\n */\ndefine('taoQtiItem/qtiCreator/model/Item',[\n 'lodash',\n 'context',\n 'i18n',\n 'services/features',\n 'taoQtiItem/qtiCreator/model/mixin/editable',\n 'taoQtiItem/qtiCreator/model/mixin/editableContainer',\n 'taoQtiItem/qtiItem/core/Item',\n 'taoQtiItem/qtiCreator/model/Stylesheet',\n 'taoQtiItem/qtiCreator/model/ResponseProcessing',\n 'taoQtiItem/qtiCreator/model/variables/OutcomeDeclaration',\n 'taoQtiItem/qtiCreator/model/feedbacks/ModalFeedback'\n], function(_, context, __, features, editable, editableContainer, Item, Stylesheet, ResponseProcessing, OutcomeDeclaration, ModalFeedback){\n \"use strict\";\n var methods = {};\n _.extend(methods, editable);\n _.extend(methods, editableContainer);\n _.extend(methods, {\n getDefaultAttributes : function(){\n return {\n identifier : 'myItem_1',\n title : 'Item title',\n adaptive : false,\n timeDependent : false,\n 'xml:lang' : context.base_authoring_lang || 'en-US'\n };\n },\n createResponseProcessing : function(){\n var rp = new ResponseProcessing();\n rp.processingType = 'templateDriven';\n this.setResponseProcessing(rp);\n return rp;\n },\n createStyleSheet : function(href){\n if(href && _.isString(href)){\n var stylesheet = new Stylesheet({href : href});\n stylesheet.setRenderer(this.getRenderer());\n this.addStylesheet(stylesheet);\n return stylesheet;\n }else{\n throw 'missing or invalid type for the required arg \"href\"';\n return null;\n }\n },\n createOutcomeDeclaration : function(attributes){\n\n var identifier = attributes.identifier || '';\n delete attributes.identifier;\n var outcome = new OutcomeDeclaration(attributes);\n\n this.addOutcomeDeclaration(outcome);\n outcome.buildIdentifier(identifier);\n\n return outcome;\n },\n getOutcomeDeclaration : function getOutcomeDeclaration(identifier){\n var found;\n _.forEach(this.outcomes, function (outcome) {\n if (outcome.id() === identifier) {\n found = outcome;\n return false;\n }\n });\n return found;\n },\n removeOutcome : function removeOutcome(identifier){\n var outcome = this.getOutcomeDeclaration(identifier);\n if(outcome){\n this.outcomes = _.omit(this.outcomes, outcome.getSerial());\n }\n },\n createModalFeedback : function(attributes, response){\n\n var identifier = attributes.identifier || '';\n delete attributes.identifier;\n var modalFeedback = new ModalFeedback(attributes);\n\n this.addModalFeedback(modalFeedback);\n modalFeedback.buildIdentifier(identifier);\n modalFeedback.body(__('Some feedback text.'));\n if(response && response.qtiClass === 'responseDeclaration'){\n modalFeedback.data('relatedResponse', response);\n }\n\n return modalFeedback;\n },\n deleteResponseDeclaration : function(response){\n var self = this;\n var serial;\n if(_.isString(response)){\n serial = response;\n }else if(response && response.qtiClass === 'responseDeclaration'){\n serial = response.getSerial();\n }\n if(this.responses[serial]){\n //remove feedback rules:\n _.forEach(this.responses[serial].feedbackRules, function(rule){\n var feedbacks = [];\n if(rule.feedbackThen && rule.feedbackThen.is('modalFeedback')){\n feedbacks.push(rule.feedbackThen.serial);\n }\n if(rule.feedbackElse && rule.feedbackElse.is('modalFeedback')){\n feedbacks.push(rule.feedbackElse.serial);\n }\n self.modalFeedbacks = _.omit(self.modalFeedbacks, feedbacks);\n\n if(rule.feedbackOutcome && rule.feedbackOutcome.is('outcomeDeclaration')){\n self.outcomes = _.omit(self.outcomes, rule.feedbackOutcome.serial);\n }\n });\n this.responses = _.omit(this.responses, serial);\n }\n return this;\n }\n });\n return Item.extend(methods);\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) 2022 (original work) Open Assessment Technologies SA\n *\n */\ndefine('taoQtiItem/qtiCreator/widgets/helpers/qtiIdentifier',['module', 'i18n'], function (module, __) {\n 'use strict';\n\n const qtiIdPattern = module.config().qtiIdPattern || '/^[a-zA-Z_]{1}[a-zA-Z0-9_.-]*$/u';\n const [, patternContent, flags] = qtiIdPattern.match(/^\\/(.+)\\/(\\w*)$/);\n const defaultInvalidQtiIdMessage = 'Identifiers must start with a letter or an underscore and contain only letters, numbers, dots, underscores ( _ ), or hyphens ( - ).';\n const message = module.config().invalidQtiIdMessage || defaultInvalidQtiIdMessage;\n const invalidQtiIdMessage = __(message);\n const isDisabled = module.config().isDisabled || false;\n\n return {\n pattern: new RegExp(patternContent, flags),\n invalidQtiIdMessage,\n maxQtiIdLength: 32,\n isDisabled\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/**\n * Languages utils to handle getting list of available language name, code and direction.\n * Note:\n * v1 example: [{\"ar-arb\": \"Arabic\"}, ...]\n * v2 example: [{code: \"ar-arb\", label: \"Arabic\", orientation: \"rtl\", uri: \"http://www.tao.lu/Ontologies/TAO.rdf#Langar-arb\"}, ...]\n */\ndefine('taoQtiItem/qtiCreator/helper/languages',['util/url', 'core/dataProvider/request'], function (urlUtil, request) {\n 'use strict';\n\n const languagesUrl = urlUtil.route('index', 'Languages', 'tao');\n const headers = { 'Accept-version': 'v2' };\n\n let languagesRequest = null;\n\n /**\n * Format languages to v1 format to avoid breaking changes in existing code,\n * Warning Please avoid usage of this method for new development.\n * uses legacyLanguagesData as a cache\n *\n * @param {Array} languages languages v2 format\n * @returns {Array} languages v1 data format\n */\n const useLegacyFormatting = languages => {\n return languages.reduce((memo, lang) => {\n memo[lang.code] = lang.label;\n\n return memo;\n }, {});\n };\n\n /**\n * Format languages to CKE format\n * example: lang\n * uses legacyLanguagesData as a cache\n *\n * @param {Array} languages languages v2 format\n * @returns {Array} languages v1 data format\n */\n const useCKEFormatting = languages => {\n return languages.map(lang => {\n return `${lang.code}:${lang.label}:${lang.orientation}`;\n });\n };\n\n /**\n * Create a Promise request getting the list of available languages\n * or return the cached Promise if already requested\n *\n * @returns {Promise} Promise with languages v2 format\n */\n const getList = () => {\n if (languagesRequest === null) {\n return (languagesRequest = request(languagesUrl, null, null, headers));\n } else {\n return languagesRequest;\n }\n };\n\n /**\n * Return promise with boolean if language by provided code is RTL\n *\n * @param {String} code language code ex: 'ar-arb'\n * @returns {Promise} Promise with resolved boolean is rtl\n */\n const isRTLbyLanguageCode = code => {\n return getList().then(languages => {\n const lang = languages.filter(lang => lang.code === code);\n return lang[0] && lang[0].orientation === 'rtl' || false;\n });\n };\n\n return {\n useLegacyFormatting,\n useCKEFormatting,\n getList,\n isRTLbyLanguageCode\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) 2024 (original work) Open Assessment Technologies SA ;\n */\n\ndefine('taoQtiItem/qtiCreator/helper/itemIdentifier',[], function() {\n const itemIdentifier = {\n uniqueNumericIdentifier() {\n const dateString = Math.floor(Date.now() / 100000)\n .toString()\n .slice(0, 7);\n const randString = (Math.floor(Math.random() * 90) + 10)\n .toString()\n .slice(0, 2);\n return dateString + randString;\n },\n defaultIdentifier(uri, qtiIdentifier) {\n if (!uri || !qtiIdentifier) {\n throw new Error(\"Missing uri or qtiIdentifier\");\n }\n const pos = uri.lastIndexOf(\"#\");\n // identifier by default should be no more then 32\n return uri.substring(pos + 1, pos + 1 + qtiIdentifier.maxQtiIdLength);\n },\n };\n\n return itemIdentifier;\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 */\ndefine('taoQtiItem/qtiCreator/helper/itemLoader',[\n 'jquery',\n 'lodash',\n 'taoQtiItem/qtiItem/core/Loader',\n 'taoQtiItem/qtiCreator/model/Item',\n 'taoQtiItem/qtiCreator/model/qtiClasses',\n 'taoQtiItem/qtiItem/helper/itemScore',\n 'core/dataProvider/request',\n 'taoQtiItem/qtiCreator/widgets/helpers/qtiIdentifier',\n 'taoQtiItem/qtiCreator/helper/languages',\n 'taoQtiItem/qtiCreator/helper/itemIdentifier'\n], function ($, _, Loader, Item, qtiClasses, itemScoreHelper, request, qtiIdentifier, languages, itemIdentifier) {\n 'use strict';\n const decodeHtml = function (str) {\n const map = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n return str.replace(/&|<|>|"|'/g, function (m) {\n return map[m];\n });\n };\n\n const qtiNamespace = 'http://www.imsglobal.org/xsd/imsqti_v2p2';\n\n const qtiSchemaLocation = {\n 'http://www.imsglobal.org/xsd/imsqti_v2p2': 'http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd'\n };\n\n const creatorLoader = {\n loadItem: function loadItem(config, callback) {\n if (config.uri) {\n const langList = languages.getList();\n\n // request doesn't handle empty response with 200 code. See: core/request.js:240\n const itemRdf = request(config.itemDataUrl, { uri: config.uri }).catch(d => d);\n\n Promise.all([langList, itemRdf]).then(([languagesList, data]) => {\n if (data.itemData) {\n for (const response in data.itemData.responses) {\n const newObject = {};\n for (const mapKey in data.itemData.responses[response].mapping) {\n newObject[decodeHtml(mapKey)] = data.itemData.responses[response].mapping[mapKey];\n }\n data.itemData.responses[response].mapping = newObject;\n }\n }\n\n if (data.itemData && data.itemData.qtiClass === 'assessmentItem') {\n const loader = new Loader().setClassesLocation(qtiClasses);\n const itemData = data.itemData;\n\n loader.loadItemData(itemData, function (loadedItem) {\n //hack to fix #2652\n if (loadedItem.isEmpty()) {\n loadedItem.body('');\n }\n\n // convert item to current QTI version\n const namespaces = loadedItem.getNamespaces();\n namespaces[''] = qtiNamespace;\n loadedItem.setNamespaces(namespaces);\n loadedItem.setSchemaLocations(qtiSchemaLocation);\n\n //add languages list to the item\n if (languagesList) {\n loadedItem.data('languagesList', languagesList);\n }\n\n const { responseProcessing: { processingType } = {} } = loadedItem;\n if (!config.perInteractionRp && processingType === 'templateDriven') {\n const {\n responses = {},\n responseProcessing: {\n data,\n responseRules = []\n } = {}\n } = itemData;\n const responseIdentifiers = [];\n\n _.forOwn(responses, ({ identifier }) => {\n responseIdentifiers.push(identifier);\n });\n\n const itemScoreRP = itemScoreHelper(responseIdentifiers);\n if (responseRules.some(responseRule => _.isEqual(responseRule, itemScoreRP))) {\n loadedItem.responseProcessing.setProcessingType('custom', data);\n }\n }\n\n callback(loadedItem, this.getLoadedClasses());\n });\n } else {\n let identifier;\n if (config.identifierGenerationStrategy === 'uniqueNumeric') {\n identifier = itemIdentifier.uniqueNumericIdentifier();\n } else {\n identifier = itemIdentifier.defaultIdentifier(config.uri, qtiIdentifier);\n }\n const newItem = new Item().id(identifier).attr('title', config.label);\n\n newItem.createResponseProcessing();\n\n //set default namespaces\n newItem.setNamespaces({\n '': qtiNamespace,\n xsi: 'http://www.w3.org/2001/XMLSchema-instance',\n m: 'http://www.w3.org/1998/Math/MathML'\n }); //note : always add math element : since it has become difficult to know when a math element has been added to the item\n\n //set default schema location\n newItem.setSchemaLocations(qtiSchemaLocation);\n\n //tag the item as a new one\n newItem.data('new', true);\n\n //add languages list to the item\n if (languagesList) {\n newItem.data('languagesList', languagesList);\n }\n\n callback(newItem);\n }\n });\n }\n }\n };\n\n return creatorLoader;\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/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',['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 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 ||\n (itemThemes.available && itemThemes.available.map(val => val.path).includes(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","/**\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 */\ndefine('taoQtiItem/qtiCreator/renderers/config',[\n 'lodash',\n 'context',\n 'taoQtiItem/qtiCommonRenderer/renderers/config',\n 'taoItems/assets/manager',\n 'taoItems/assets/strategies'\n], function(_, context, commonRenderConfig, assetManagerFactory, assetStrategies){\n 'use strict';\n\n //asset manager using base url\n var assetManager = assetManagerFactory([\n assetStrategies.taomedia,\n assetStrategies.external,\n assetStrategies.base64,\n assetStrategies.baseUrl\n ], {baseUrl : ''});\n\n var locations = _.defaults({\n '_container' : 'taoQtiItem/qtiCreator/renderers/Container',\n '_tooltip' : 'taoQtiItem/qtiCreator/renderers/Tooltip',\n 'assessmentItem' : 'taoQtiItem/qtiCreator/renderers/Item',\n 'rubricBlock' : 'taoQtiItem/qtiCreator/renderers/RubricBlock',\n 'figure' : 'taoQtiItem/qtiCreator/renderers/Figure',\n 'img' : 'taoQtiItem/qtiCreator/renderers/Img',\n 'figcaption' : 'taoQtiItem/qtiCreator/renderers/Figcaption',\n 'math' : 'taoQtiItem/qtiCreator/renderers/Math',\n 'object' : 'taoQtiItem/qtiCreator/renderers/Object',\n 'table' : 'taoQtiItem/qtiCreator/renderers/Table',\n 'modalFeedback' : 'taoQtiItem/qtiCreator/renderers/ModalFeedback',\n 'choiceInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/ChoiceInteraction',\n 'orderInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/OrderInteraction',\n 'matchInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/MatchInteraction',\n 'associateInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/AssociateInteraction',\n 'inlineChoiceInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/InlineChoiceInteraction',\n 'textEntryInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/TextEntryInteraction',\n 'hotspotInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/HotspotInteraction',\n 'selectPointInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/SelectPointInteraction',\n 'graphicOrderInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/GraphicOrderInteraction',\n 'graphicAssociateInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/GraphicAssociateInteraction',\n 'graphicGapMatchInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/GraphicGapMatchInteraction',\n 'mediaInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/MediaInteraction',\n 'uploadInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/UploadInteraction',\n 'sliderInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/SliderInteraction',\n 'extendedTextInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/ExtendedTextInteraction',\n 'inlineChoice' : 'taoQtiItem/qtiCreator/renderers/choices/InlineChoice',\n 'simpleChoice.choiceInteraction' : 'taoQtiItem/qtiCreator/renderers/choices/SimpleChoice.ChoiceInteraction',\n 'simpleChoice.orderInteraction' : 'taoQtiItem/qtiCreator/renderers/choices/SimpleChoice.OrderInteraction',\n 'simpleAssociableChoice.associateInteraction' : 'taoQtiItem/qtiCreator/renderers/choices/SimpleAssociableChoice.AssociateInteraction',\n 'simpleAssociableChoice.matchInteraction' : 'taoQtiItem/qtiCreator/renderers/choices/SimpleAssociableChoice.MatchInteraction',\n 'gapMatchInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/GapMatchInteraction',\n 'hottextInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/HottextInteraction',\n 'customInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/PortableCustomInteraction',\n 'endAttemptInteraction' : 'taoQtiItem/qtiCreator/renderers/interactions/EndAttemptInteraction',\n 'infoControl' : 'taoQtiItem/qtiCreator/renderers/PortableInfoControl',\n 'include' : 'taoQtiItem/qtiCreator/renderers/Include',\n 'gap' : 'taoQtiItem/qtiCreator/renderers/choices/Gap',\n 'gapText' : 'taoQtiItem/qtiCreator/renderers/choices/GapText',\n 'hottext' : 'taoQtiItem/qtiCreator/renderers/choices/Hottext',\n 'printedVariable' : 'taoQtiItem/qtiCreator/renderers/PrintedVariable'\n }, commonRenderConfig.locations);\n\n return {\n name : 'creatorRenderer',\n locations : locations,\n options : {\n assetManager : assetManager\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;\n */\n\n/**\n * Define the Qti Item Creator Renderer\n */\ndefine('taoQtiItem/qtiCreator/renderers/Renderer',[\n 'taoQtiItem/qtiRunner/core/Renderer',\n 'taoQtiItem/qtiCreator/renderers/config'\n], function(Renderer, config){\n 'use strict';\n\n return Renderer.build(config.locations, config.name, config.options);\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 Technologies SA (under the project TAO-PRODUCT);\n */\ndefine('taoQtiItem/qtiCreator/helper/creatorRenderer',[\n 'jquery',\n 'lodash',\n 'taoQtiItem/qtiCreator/renderers/Renderer',\n 'taoItems/assets/manager',\n 'taoItems/assets/strategies',\n 'util/dom'\n], function($, _, Renderer, assetManagerFactory, assetStrategies, dom){\n \"use strict\";\n\n //configure and instanciate once only:\n var _creatorRenderer = null;\n\n //list of configurable interactions\n //some interactions allow additional non-standard but sometimes useful configuration\n var _configurableInteractions = ['endAttempt'];\n\n /**\n * Extract interaction-specific configuration from the main one\n *\n * @param {object} config - the configuration object of the creatorRenderer\n * @returns {module.exports.properties|Function.properties|config.properties}\n */\n var _extractInteractionsConfig = function _extractInteractionsConfig(config){\n var ret = {};\n if(config && config.properties){\n _.forEach(_configurableInteractions, function(interactionName){\n if(config.properties[interactionName]){\n ret[interactionName] = config.properties[interactionName];\n }\n });\n }\n return ret;\n };\n\n /**\n * Get a preconfigured renderer singleton\n *\n * @param {Boolean} reset\n * @param {Object} config\n * @param {Object} areaBroker - the QtiCreator area broker\n * @returns {Object} - a configured instance of creatorRenderer\n */\n var get = function(reset, config, areaBroker){\n var $bodyEltForm;\n\n config = config || {};\n config.properties = config.properties || {};\n\n if(!_creatorRenderer || reset){\n\n $bodyEltForm = _creatorRenderer ? _creatorRenderer.getOption('bodyElementOptionForm') : null;\n if(reset ||\n !$bodyEltForm ||\n !$bodyEltForm.length ||\n !dom.contains($bodyEltForm)){\n\n _creatorRenderer = new Renderer({\n //assetManager : assetManager,\n lang : '',\n uri : '',\n shuffleChoices : false,\n itemOptionForm : $('#item-editor-item-property-bar .panel'),\n interactionOptionForm : $('#item-editor-interaction-property-bar .panel'),\n choiceOptionForm : $('#item-editor-choice-property-bar .panel'),\n responseOptionForm : $('#item-editor-response-property-bar .panel'),\n bodyElementOptionForm : areaBroker.getElementPropertyPanelArea(),\n textOptionForm : $('#item-editor-text-property-bar .panel'),\n modalFeedbackOptionForm : $('#item-editor-modal-feedback-property-bar .panel'),\n mediaManager : {\n appendContainer : '#mediaManager',\n browseUrl : config.properties.getFilesUrl,\n uploadUrl : config.properties.fileUploadUrl,\n deleteUrl : config.properties.fileDeleteUrl,\n downloadUrl : config.properties.fileDownloadUrl,\n fileExistsUrl : config.properties.fileExistsUrl,\n mediaSourcesUrl : config.properties.mediaSourcesUrl\n },\n interactions : _extractInteractionsConfig(config),\n qtiCreatorContext : config.qtiCreatorContext\n });\n\n //update the resolver baseUrl\n _creatorRenderer.getAssetManager().setData({baseUrl : config.properties.baseUrl || '' });\n\n _creatorRenderer.setAreaBroker(areaBroker);\n\n // extend creator renderer to give access to the creator context\n _.assign(_creatorRenderer, {\n getCreatorContext: function getCreatorContext() {\n return this.getOption('qtiCreatorContext');\n }\n });\n }\n }\n\n return _creatorRenderer;\n };\n\n\n return {\n get : get,\n\n setOption : function(name, value){\n return get().setOption(name, value);\n },\n setOptions : function(options){\n return get().setOptions(options);\n },\n load : function(qtiClasses, done){\n return get().load(function(){\n if(_.isFunction(done)){\n done.apply(this, arguments);\n }\n }, qtiClasses);\n }\n };\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/qtiCommonRenderer/helpers/container',['lodash', 'jquery', 'taoQtiItem/qtiItem/core/Element'], function (_, $, Element) { '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\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 //containers are cached, so do not forget to remove them.\n let _containers = {};\n let _$containerContext = $();\n\n /**\n * Build the selector for your element (from the element serial)\n * @private\n * @param {QtiElement} element\n * @returns {String} the selector\n */\n const _getSelector = function (element) {\n const serial = element.getSerial();\n let selector = `[data-serial=${serial}]`;\n\n if (Element.isA(element, 'choice')) {\n selector = `.qti-choice${selector}`;\n } else if (Element.isA(element, 'interaction')) {\n selector = `.qti-interaction${selector}`;\n }\n\n return selector;\n };\n\n /**\n * Helps you to retrieve the DOM element (as a jquery element)\n * @exports taoQtiItem/qtiCommonRenderer/helpers/containerHelper\n */\n const containerHelper = {\n /**\n * Set a global scope to look for element container\n * @param {jQueryElement} [$scope] - if you want to retrieve the element in a particular scope or context\n */\n setContext($scope) {\n _$containerContext = $scope;\n },\n\n /**\n * Returns current scope\n * @returns {jQueryElement}\n */\n getContext() {\n return _$containerContext;\n },\n\n /**\n * Get the container of the given element\n * @param {QtiElement} element - the QTI Element to find the container for\n * @param {jQueryElement} [$scope] - if you want to retrieve the element in a particular scope or context\n * @returns {jQueryElement} the container\n */\n get(element, $scope) {\n const serial = element.getSerial();\n\n if ($scope instanceof $ && $scope.length) {\n //find in the given context\n return $scope.find(_getSelector(element));\n } else if (_$containerContext instanceof $ && _$containerContext.length) {\n //find in the globally set context\n return _$containerContext.find(_getSelector(element));\n } else if (!_containers[serial] || !_containers[serial].length) {\n //find in the global context\n _containers[serial] = $(_getSelector(element));\n }\n\n return _containers[serial];\n },\n\n /**\n * getContainer use a cache to store elements. This methods helps you to purge it.\n * @param {Element} element - find the container of this element\n */\n reset(element) {\n if (element instanceof Element && _containers[element.getSerial()]) {\n _containers = _.omit(_containers, element.getSerial());\n }\n },\n\n /**\n * Clear the containers cache\n */\n clear() {\n _containers = {};\n _$containerContext = $();\n },\n\n /**\n * Trigger an event on the element's container\n * @param {String} eventType - the name of the event\n * @param {QtiElement} element - find the container of this element\n * @param {Array} [data] - data to give to the event\n */\n trigger(eventType, element, data) {\n if (eventType) {\n if (data && !_.isArray(data)) {\n data = [data];\n }\n this.get(element).trigger(eventType, data);\n }\n },\n\n /**\n * Alias to trigger a responseChange Event from an interaction\n * @param {QtiElement} interaction - the interaction that had a response changed\n * @param {Object} [extraData] - additionnal data to give to the event\n */\n triggerResponseChangeEvent(interaction, extraData) {\n this.trigger('responseChange', interaction, [\n {\n interaction: interaction,\n response: interaction.getResponse()\n },\n extraData\n ]);\n },\n\n /**\n * Make all links to opens in another tab/window\n * @param {jQueryElement} $container\n */\n targetBlank($container) {\n $container.on('click', 'a', function (e) {\n e.preventDefault();\n const href = $(this).attr('href');\n if (href && href.match(/^http/i)) {\n window.open(href, '_blank');\n }\n });\n }\n };\n\n return containerHelper;\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 (original work) Open Assessment Technologies SA ;\n */\ndefine('taoQtiItem/qtiCreator/helper/commonRenderer',[\n 'lodash',\n 'taoQtiItem/qtiCommonRenderer/renderers/Renderer',\n 'taoQtiItem/qtiCommonRenderer/helpers/container'\n], function(_, Renderer, containerHelper){\n \"use strict\";\n\n //store the current execution context of the common renderer (preview)\n var _$previousContext = null;\n\n //configure and instanciate once only:\n var _renderer;\n\n var commonRenderer = {\n render : function(item, $container){\n\n commonRenderer.setContext($container);\n\n return _renderer.load(function(){\n\n $container.append(item.render(this));\n item.postRender({}, '', this);\n\n }, item.getUsedClasses());\n },\n get : function(reset, config){\n if(!_renderer || reset){\n\n //create new instance of common renderer\n _renderer = new Renderer({\n shuffleChoices : true\n });\n\n if(config){\n //update the resolver baseUrl\n _renderer.getAssetManager().setData({baseUrl : config.properties.baseUrl || '' });\n }\n }\n return _renderer;\n },\n getOption : function(name){\n return _renderer.getOption(name);\n },\n setOption : function(name, value){\n return _renderer.setOption(name, value);\n },\n setOptions : function(options){\n return _renderer.setOptions(options);\n },\n setContext : function($context){\n _$previousContext = $context;\n return containerHelper.setContext($context);\n },\n restoreContext : function(){\n containerHelper.setContext(_$previousContext);\n _$previousContext = null;\n },\n load : function(qtiClasses, done){\n var renderer = _renderer || this.get();\n return renderer.load(function(){\n if(_.isFunction(done)){\n done.apply(this, arguments);\n }\n }, qtiClasses);\n }\n };\n\n return commonRenderer;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/simpleParser',['lodash', 'jquery', 'taoQtiItem/qtiItem/helper/util', 'taoQtiItem/qtiItem/core/Loader'], function (_, $, util, Loader) { 'use strict';\n\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;\n util = util && Object.prototype.hasOwnProperty.call(util, 'default') ? util['default'] : util;\n Loader = Loader && Object.prototype.hasOwnProperty.call(Loader, 'default') ? Loader['default'] : Loader;\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) 2021 (original work) Open Assessment Technologies SA\n **/\n\n const _parsableElements = ['img', 'object', 'printedVariable'];\n const _qtiClassNames = {\n rubricblock: 'rubricBlock',\n printedvariable: 'printedVariable'\n };\n const _qtiAttributesNames = {\n powerform: 'powerForm',\n mappingindicator: 'mappingIndicator'\n };\n\n const _defaultOptions = {\n ns: {\n math: '',\n include: 'xi',\n table: 'table',\n image: 'img',\n object: '',\n figure: 'qh5',\n figcaption: 'qh5'\n },\n loaded: null,\n model: null\n };\n\n let parser;\n\n function _getElementSelector(qtiClass, ns) {\n return ns ? ns + '\\\\:' + qtiClass + ',' + qtiClass : qtiClass;\n }\n\n function getQtiClassFromXmlDom($node) {\n let qtiClass = $node.prop('tagName').toLowerCase();\n\n //remove ns :\n qtiClass = qtiClass.replace(/.*:/, '');\n\n return _qtiClassNames[qtiClass] ? _qtiClassNames[qtiClass] : qtiClass;\n }\n\n function buildElement($elt) {\n const qtiClass = getQtiClassFromXmlDom($elt);\n\n const elt = {\n qtiClass: qtiClass,\n serial: util.buildSerial(qtiClass + '_'),\n attributes: {}\n };\n\n $.each($elt[0].attributes, function () {\n let attrName;\n if (this.specified) {\n attrName = _qtiAttributesNames[this.name] || this.name;\n elt.attributes[attrName] = this.value;\n }\n });\n\n return elt;\n }\n\n function buildMath($elt, options) {\n const elt = buildElement($elt);\n\n //set annotations:\n elt.annotations = {};\n $elt.find(_getElementSelector('annotation', options.ns.math)).each(function () {\n const $annotation = $(this);\n const encoding = $annotation.attr('encoding');\n if (encoding) {\n elt.annotations[encoding] = _.unescape($annotation.html());\n }\n $annotation.remove();\n });\n\n //set math xml\n elt.mathML = $elt.html();\n\n //set ns:\n elt.ns = {\n name: 'm',\n uri: 'http://www.w3.org/1998/Math/MathML' //@todo : remove hardcoding there\n };\n\n return elt;\n }\n\n function buildTooltip(targetHtml, contentId, contentHtml) {\n const qtiClass = '_tooltip';\n\n return {\n elements: {},\n qtiClass: qtiClass,\n serial: util.buildSerial(qtiClass + '_'),\n attributes: {\n 'aria-describedby': contentId\n },\n content: contentHtml,\n body: {\n elements: {},\n serial: util.buildSerial('container'),\n body: targetHtml\n }\n };\n }\n\n function parseTable($elt, elt, options) {\n elt.body = {\n body: '',\n elements: {}\n };\n\n const $parsedTable = parseContainer($elt, options);\n elt.body.body = $parsedTable.body;\n elt.body.elements = $parsedTable.elements;\n return elt;\n }\n\n function parseFigure($elt, elt, options) {\n elt.body = {\n body: '',\n elements: {}\n };\n\n const $parsedFigure = parseContainer($elt, options);\n elt.body.body = $parsedFigure.body;\n elt.body.elements = $parsedFigure.elements;\n const $figcaption = $elt.find(_getElementSelector('figcaption', options.ns.figcaption));\n if ($figcaption.length) {\n const element = buildElement($figcaption);\n element.body = {\n body: $figcaption.html(),\n elements: {}\n };\n elt.body.elements[element.serial] = element;\n $figcaption.replaceWith(_placeholder(element));\n }\n elt.body.body = $elt.html();\n return elt;\n }\n\n function parseContainer($container, options) {\n const ret = {\n serial: util.buildSerial('_container_'),\n body: '',\n elements: {}\n };\n // table should be in top as it needs to be parsed first\n $container.find('table').each(function () {\n const $qtiElement = $(this);\n let element = buildElement($qtiElement);\n\n element = parseTable($qtiElement, element, options);\n ret.elements[element.serial] = element;\n $qtiElement.replaceWith(_placeholder(element));\n });\n\n // figure should be in top as it needs to be parsed first\n $container.find(_getElementSelector('figure', options.ns.figure)).each(function () {\n const $qtiElement = $(this);\n let element = buildElement($qtiElement);\n\n element = parseFigure($qtiElement, element, options);\n ret.elements[element.serial] = element;\n $qtiElement.replaceWith(_placeholder(element));\n });\n\n $container.find(_getElementSelector('math', options.ns.math)).each(function () {\n const $qtiElement = $(this);\n const element = buildMath($qtiElement, options);\n\n ret.elements[element.serial] = element;\n $qtiElement.replaceWith(_placeholder(element));\n });\n\n $container.find(_getElementSelector('include', options.ns.include)).each(function () {\n const $qtiElement = $(this);\n const element = buildElement($qtiElement);\n\n ret.elements[element.serial] = element;\n $qtiElement.replaceWith(_placeholder(element));\n });\n\n $container.find('[data-role=\"tooltip-target\"]').each(function () {\n let element,\n $target = $(this),\n $content,\n contentId = $target.attr('aria-describedBy'),\n contentHtml;\n\n if (contentId) {\n $content = $container.find('#' + contentId);\n if ($content.length) {\n contentHtml = $content.html();\n\n element = buildTooltip($target.html(), contentId, contentHtml);\n\n ret.elements[element.serial] = element;\n $target.replaceWith(_placeholder(element));\n $content.remove();\n }\n }\n });\n\n _.forEach(_parsableElements, function (qtiClass) {\n $container.find(qtiClass).each(function () {\n const $qtiElement = $(this);\n const element = buildElement($qtiElement);\n ret.elements[element.serial] = element;\n $qtiElement.replaceWith(_placeholder(element));\n });\n });\n\n ret.body = $container.html();\n return ret;\n }\n\n function _placeholder(element) {\n return '{{' + element.serial + '}}';\n }\n\n parser = {\n parse: function (xmlStr, opts) {\n const options = _.merge(_.clone(_defaultOptions), opts || {});\n\n const $container = $(xmlStr);\n\n const element = buildElement($container);\n\n const data = parseContainer($container, options);\n\n let loader;\n\n if (!_.isUndefined(data.body)) {\n element.body = data;\n }\n\n if (_.isFunction(options.loaded) && options.model) {\n loader = new Loader().setClassesLocation(options.model);\n loader.loadAndBuildElement(element, options.loaded);\n }\n\n return element;\n }\n };\n\n var parser$1 = parser;\n\n return parser$1;\n\n});\n\n","define('taoQtiItem/qtiItem/helper/xincludeLoader',['jquery', 'lodash', 'taoQtiItem/qtiItem/helper/simpleParser', 'taoQtiItem/qtiItem/core/Loader'], function ($, _, simpleParser, Loader) { 'use strict';\n\n $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;\n _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;\n simpleParser = simpleParser && Object.prototype.hasOwnProperty.call(simpleParser, 'default') ? simpleParser['default'] : simpleParser;\n Loader = Loader && Object.prototype.hasOwnProperty.call(Loader, 'default') ? Loader['default'] : Loader;\n\n function load(xinclude, baseUrl, callback) {\n const href = xinclude.attr('href');\n if (href && baseUrl) {\n const fileUrl = `text!${baseUrl}${href}`;\n // reset the previous definition of the XML, to receive updated passage\n require.undef(fileUrl);\n // require xml\n require([fileUrl], function (stimulusXml) {\n const $wrapper = $.parseXML(stimulusXml);\n const $sampleXMLrootNode = $wrapper.children;\n const $stimulus = $('').append($sampleXMLrootNode);\n const mathNs = 'm'; //for 'http://www.w3.org/1998/Math/MathML'\n const data = simpleParser.parse($stimulus, {\n ns: {\n math: mathNs\n }\n });\n\n new Loader().loadElement(xinclude, data, function () {\n if (_.isFunction(callback)) {\n const loadedClasses = this.getLoadedClasses();\n loadedClasses.push('_container'); //the _container class is always required\n callback(xinclude, data, loadedClasses);\n }\n });\n }, function () {\n //in case the file does not exist\n callback(xinclude, false, []);\n });\n }\n }\n\n var xincludeLoader = {\n load\n };\n\n return xincludeLoader;\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 (original work) Open Assessment Technologies SA ;\n */\ndefine('taoQtiItem/qtiCreator/helper/xincludeRenderer',[\n 'module',\n 'context',\n 'lodash',\n 'taoQtiItem/qtiCreator/helper/commonRenderer',\n 'taoQtiItem/qtiItem/helper/xincludeLoader',\n 'core/moduleLoader'\n], function (module, context, _, commonRenderer, xincludeLoader, moduleLoader) {\n 'use strict';\n\n const moduleConfig = module.config();\n let xincludeHandlers = [];\n if (moduleConfig.handlers) {\n /*\n * This loads all the modules from module configuration, which are in the `handlers` array.\n */\n moduleLoader({}, _.isFunction)\n .addList(moduleConfig.handlers)\n .load(context.bundle)\n .then(handlers => xincludeHandlers = handlers);\n }\n\n return {\n /**\n * Render (or re-render) the xinclude widget based on the current href and givenBaseUrl\n *\n * @param {Object} xincludeWidget\n * @param {String} baseUrl\n * @param {String} newHref\n * @returns {undefined}\n */\n render: function render(xincludeWidget, baseUrl, newHref) {\n xincludeWidget.$container.attr('contenteditable', false);\n const xinclude = xincludeWidget.element;\n if (newHref) {\n xinclude.attr('href', newHref);\n }\n xincludeLoader.load(xinclude, baseUrl, function (xi, data, loadedClasses) {\n if (data) {\n const dataBody = data.body.body;\n const hasClass = dataBody.match(/class=\"(?tao-\\w+)?/); // eslint-disable-line no-console\n\n let className = '';\n if (hasClass && hasClass.groups && hasClass.groups.className) {\n className = hasClass.groups.className;\n }\n //loading success :\n commonRenderer.get().load(function () {\n //set commonRenderer to the composing elements only (because xinclude is \"read-only\")\n _.forEach(xinclude.getComposingElements(), function (elt) {\n elt.setRenderer(commonRenderer.get());\n });\n\n //reload the wiget to rfresh the rendering with the new href\n xincludeWidget.refresh();\n }, loadedClasses);\n xincludeHandlers.forEach(handler => handler(xinclude.attr('href'), className, xi.serial));\n } else {\n //loading failure :\n xinclude.removeAttr('href');\n }\n });\n },\n /**\n * Return xinclude handlers\n * @returns {Array}\n */\n getXincludeHandlers: function getXincludeHandlers() {\n return xincludeHandlers;\n }\n };\n});\n\n","\ndefine('tpl!taoQtiItem/qtiCreator/tpl/toolbars/insertInteractionButton', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, functionType=\"function\", escapeExpression=this.escapeExpression, self=this;\n\nfunction program1(depth0,data) {\n \n var buffer = \"\", stack1, helper;\n buffer += \"\\n data-sub-group=\\\"\";\n if (helper = helpers.subGroup) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.subGroup); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \"\\\"\\n\";\n return buffer;\n }\n\nfunction program3(depth0,data) {\n \n \n return \"\\n class=\\\"disabled\\\"\\n title=\\\"element available in the final release\\\"\\n\";\n }\n\nfunction program5(depth0,data) {\n \n var buffer = \"\", stack1, helper;\n buffer += \"\\n title=\\\"\";\n if (helper = helpers.title) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.title); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \"\\\"\\n\";\n return buffer;\n }\n\nfunction program7(depth0,data) {\n \n var buffer = \"\", stack1, helper;\n buffer += \"\\n \\n \";\n return buffer;\n }\n\nfunction program9(depth0,data) {\n \n var buffer = \"\", stack1, helper;\n buffer += \"\\n \\n \";\n return buffer;\n }\n\n buffer += \"\\n \";\n stack1 = helpers['if'].call(depth0, (depth0 && depth0.iconFont), {hash:{},inverse:self.program(9, program9, data),fn:self.program(7, program7, data),data:data});\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += \"\\n\\n
    \";\n if (helper = helpers['short']) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0['short']); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \"
    \\n\";\n return buffer;\n }); });\n","\ndefine('tpl!taoQtiItem/qtiCreator/tpl/toolbars/insertInteractionGroup', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, functionType=\"function\", escapeExpression=this.escapeExpression;\n\n\n buffer += \"
    \\n

    \";\n if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \"

    \\n
    \\n
      \\n
      \\n
      \";\n return buffer;\n }); });\n","\ndefine('tpl!taoQtiItem/qtiCreator/tpl/toolbars/tooltip', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, functionType=\"function\", escapeExpression=this.escapeExpression;\n\n\n buffer += \"
      \\n \\n
      \\n \";\n if (helper = helpers.message) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.message); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \"\\n
      \\n
      \";\n return buffer;\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-2017 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/qtiCreator/editor/interactionsToolbar',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'ui/hider',\n 'tpl!taoQtiItem/qtiCreator/tpl/toolbars/insertInteractionButton',\n 'tpl!taoQtiItem/qtiCreator/tpl/toolbars/insertInteractionGroup',\n 'tpl!taoQtiItem/qtiCreator/tpl/toolbars/tooltip',\n 'ui/tooltip'\n], function($, _, __, hider, insertInteractionTpl, insertSectionTpl, tooltipTpl, tooltip){\n 'use strict';\n\n /**\n * String to identify a custom interaction from the authoring data\n *\n * @type String\n */\n var _customInteractionTag = __('Custom Interactions');\n\n /**\n * Interaction types that require a sub group in the toolbar\n *\n * @type Object\n */\n var _subgroups = {\n 'inline-interactions' : 'Inline Interactions'\n };\n\n var _events = {\n interactiontoolbarready : 'interactiontoolbarready.qti-widget'\n };\n\n function getGroupId(groupId){\n return groupId.replace(/\\W+/g, '-').toLowerCase();\n }\n\n function getGroupSectionId(groupId){\n return 'sidebar-left-section-' + getGroupId(groupId);\n }\n\n function addGroup($sidebar, groupId, groupLabel){\n\n const groupSectionId = getGroupSectionId(groupId);\n\n const $section = $(insertSectionTpl({\n id : groupSectionId,\n label : groupLabel\n }));\n\n $sidebar.append($section);\n\n return $section;\n }\n\n function create($sidebar, interactions){\n\n _.forEach(interactions, function(interactionAuthoringData){\n add($sidebar, interactionAuthoringData);\n });\n\n buildSubGroups($sidebar);\n\n //set it ad \"ready\":\n $sidebar.data('interaction-toolbar-ready', true);\n $sidebar.trigger(_events.interactiontoolbarready);//interactiontoolbarready.qti-widget\n }\n\n function getGroup($sidebar, groupId){\n\n const groupSectionId = getGroupSectionId(groupId);\n return $sidebar.find('#' + groupSectionId);\n }\n\n function isReady($sidebar){\n return !!$sidebar.data('interaction-toolbar-ready');\n }\n\n function whenReady($sidebar){\n return new Promise(function(resolve){\n if(isReady($sidebar)){\n resolve();\n }else{\n $sidebar.on(_events.interactiontoolbarready, function(){\n resolve();\n });\n }\n });\n }\n\n function remove($sidebar, interactionClass){\n $sidebar.find('li[data-qti-class=\"' + interactionClass + '\"]').remove();\n }\n\n function disable($sidebar, interactionClass){\n hider.hide($sidebar.find('li[data-qti-class=\"' + interactionClass + '\"]'));\n }\n\n function enable($sidebar, interactionClass){\n hider.show($sidebar.find('li[data-qti-class=\"' + interactionClass + '\"]'));\n }\n\n function exists($sidebar, interactionClass){\n return !!$sidebar.find('li[data-qti-class=\"' + interactionClass + '\"]').length;\n }\n\n function add($sidebar, interactionAuthoringData){\n\n if(exists($sidebar, interactionAuthoringData.qtiClass)){\n throw 'the interaction is already in the sidebar';\n }\n\n const groupId = interactionAuthoringData.group,\n groupLabel = interactionAuthoringData.tags[0] || '',\n subGroupId = interactionAuthoringData.tags[1],\n tplData = {\n qtiClass : interactionAuthoringData.qtiClass,\n disabled : !!interactionAuthoringData.disabled,\n title : interactionAuthoringData.description,\n iconFont : /^icon-/.test(interactionAuthoringData.icon),\n icon : interactionAuthoringData.icon,\n short : interactionAuthoringData.short,\n dev : false\n };\n let $group = getGroup($sidebar, groupId);\n\n\n if(subGroupId && _subgroups[subGroupId]){\n tplData.subGroup = subGroupId;\n }\n\n if(!$group.length){\n //the group does not exist yet : create a
      for the group\n $group = addGroup($sidebar, groupId, groupLabel);\n }\n\n if(subGroupId && _subgroups[subGroupId]){\n tplData.subGroup = subGroupId;\n }\n\n if(!$group.length){\n //the group does not exist yet : create a
      for the group\n $group = addGroup($sidebar, groupId, groupLabel);\n }\n\n let $interaction = $(insertInteractionTpl(tplData));\n $group.find('.tool-list').append($interaction);\n\n return $interaction;\n }\n\n function buildSubGroups($sidebar){\n\n $sidebar.find('[data-sub-group]').each(function(){\n\n var $element = $(this),\n $section = $element.parents('section'),\n subGroup = $element.data('sub-group'),\n $subGroupPanel,\n $subGroupList,\n $cover;\n\n if(!subGroup){\n return;\n }\n\n $subGroupPanel = $section.find('.sub-group.' + subGroup);\n $subGroupList = $subGroupPanel.find('.tool-list');\n if(!$subGroupPanel.length){\n $subGroupPanel = $('
      ', {'class' : 'panel clearfix sub-group ' + subGroup});\n $subGroupList = $('
        ', {'class' : 'tool-list plain clearfix'});\n $subGroupPanel.append($subGroupList);\n $section.append($subGroupPanel);\n $cover = $('
        ', {'class' : 'sub-group-cover blocking'});\n $subGroupPanel.append($cover);\n $subGroupPanel.data('cover', $cover);\n }\n $subGroupList.append($element);\n });\n\n addInlineInteractionTooltip();\n }\n\n /**\n * add tooltip to explain special requirement and behaviours for inline interactions\n * may need to generalize it in the future\n */\n function addInlineInteractionTooltip(){\n\n var timer,\n $inlineInteractionsPanel = $('#sidebar-left-section-inline-interactions .inline-interactions'),\n $tooltip = $(tooltipTpl({\n message : __('Inline interactions need to be inserted into a text block.')\n }));\n\n $inlineInteractionsPanel.append($tooltip);\n tooltip.lookup($inlineInteractionsPanel);\n\n $tooltip.css({\n position : 'absolute',\n zIndex : 11,\n top : 0,\n right : 10\n });\n\n $inlineInteractionsPanel.on('mouseenter', '.sub-group-cover', function(){\n\n timer = setTimeout(function(){\n $tooltip.find('[data-tooltip]').data('$tooltip').show();\n }, 300);\n\n }).on('mouseleave', '.sub-group-cover', function(){\n $tooltip.find('[data-tooltip]').data('$tooltip').hide();\n clearTimeout(timer);\n });\n }\n\n return {\n create : create,\n add : add,\n exists : exists,\n addGroup : addGroup,\n getGroupId : getGroupId,\n getGroupSectionId : getGroupSectionId,\n getGroup : getGroup,\n isReady : isReady,\n whenReady : whenReady,\n remove : remove,\n disable : disable,\n enable : enable,\n getCustomInteractionTag : function(){\n return _customInteractionTag;\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) 2015 (original work) Open Assessment Technologies SA ;\n */\ndefine('taoQtiItem/qtiCreator/helper/panel',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'taoQtiItem/qtiItem/core/Element'\n], function($, _, __, Element){\n \"use strict\";\n\n var _getItemContainer = function(){\n return $('#item-editor-panel');\n };\n\n var showPanel = function($panel, $fold){\n\n $panel.show();\n openSections($panel.children('section'));\n\n if($fold && $fold.length){\n closeSections($fold.children('section'));\n }\n };\n\n var initFormVisibilityListener = function(){\n\n //first of all, clear all listener\n $(document).off('.panel');\n\n var $itemContainer = _getItemContainer();\n\n var _staticElements = {\n _tooltip : 'Tooltip',\n figure : 'Figure',\n img : 'Image',\n object : 'Media',\n rubricBlock : 'Rubric Block',\n math : 'Math',\n table : 'Table',\n include : 'Shared Stimulus',\n infoControl : 'Student Tool'\n };\n\n // all sections on the right sidebar are invisible by default\n var $formInteractionPanel = $('#item-editor-interaction-property-bar'),\n $formChoicePanel = $('#item-editor-choice-property-bar'),\n $formResponsePanel = $('#item-editor-response-property-bar'),\n $formItemPanel = $('#item-editor-item-property-bar'),\n $formBodyElementPanel = $('#item-editor-body-element-property-bar'),\n $formTextBlockPanel = $('#item-editor-text-property-bar'),\n $formModalFeedbackPanel = $('#item-editor-modal-feedback-property-bar'),\n $formStylePanel = $('#item-style-editor-bar'),\n $appearanceToggler = $('#appearance-trigger'),\n $menuLabel = $appearanceToggler.find('.menu-label'),\n $itemIcon = $appearanceToggler.find('.icon-item'),\n $styleIcon = $appearanceToggler.find('.icon-style');\n\n var _toggleAppearanceEditor = function(active){\n\n if(active){\n\n $appearanceToggler.addClass('active');\n $formStylePanel.show();\n $formItemPanel.hide();\n\n //current widget sleep:\n $itemContainer.trigger('styleedit');\n\n /* At the time of writing this the following sections are available:\n *\n * #sidebar-left-section-text\n * #sidebar-left-section-block-interactions\n * #sidebar-left-section-inline-interactions\n * #sidebar-left-section-graphic-interactions\n * #sidebar-left-section-media\n * #sidebar-right-css-manager\n * #sidebar-right-style-editor\n * #sidebar-right-item-properties\n * #sidebar-right-body-element-properties\n * #sidebar-right-text-block-properties\n * #sidebar-right-interaction-properties\n * #sidebar-right-choice-properties\n * #sidebar-right-response-properties\n */\n showPanel($formStylePanel);\n $menuLabel.text($menuLabel.data('item'));\n $itemIcon.show();\n $styleIcon.hide();\n }else{\n $appearanceToggler.removeClass('active');\n $formStylePanel.hide();\n showPanel($formItemPanel);\n $menuLabel.text($menuLabel.data('style'));\n $itemIcon.hide();\n $styleIcon.show();\n }\n };\n\n $appearanceToggler.on('click', function(){\n\n if($appearanceToggler.hasClass('active')){\n _toggleAppearanceEditor(false);\n }else{\n _toggleAppearanceEditor(true);\n }\n });\n\n //@todo : fix this timeout event\n _.delay(function(){\n showPanel($formItemPanel);\n }, 200);\n\n $(document).on('afterStateInit.qti-widget.panel', function(e, element, state){\n\n switch(state.name){\n case 'active':\n\n _toggleAppearanceEditor(false);\n if(!Element.isA(element, 'assessmentItem')){\n $formItemPanel.hide();\n }\n\n var label = _staticElements[element.qtiClass];\n if(label){\n $formBodyElementPanel.find('h2').html(label + ' ' + __('Properties'));\n showPanel($formBodyElementPanel);\n }else if(element.qtiClass === '_container'){\n showPanel($formTextBlockPanel);\n }\n\n if(element.qtiClass === 'modalFeedback'){\n showPanel($formModalFeedbackPanel);\n $formResponsePanel.hide();\n }\n break;\n\n case 'question':\n\n showPanel($formInteractionPanel);\n break;\n\n case 'answer':\n\n showPanel($formResponsePanel);\n break;\n\n case 'choice':\n showPanel($formChoicePanel, $formInteractionPanel);\n break;\n\n case 'sleep':\n\n if(_staticElements[element.qtiClass]){\n $formBodyElementPanel.hide();\n }else if(element.qtiClass === '_container'){\n $formTextBlockPanel.hide();\n }\n\n if(!Element.isA(element, 'choice')){\n if(!$itemContainer.find('.widget-box.edit-active').length){\n showPanel($formItemPanel);\n }\n }\n break;\n }\n\n }).on('afterStateExit.qti-widget.panel', function(e, element, state){\n\n switch(state.name){\n case 'active':\n if(element.qtiClass === 'modalFeedback'){\n showPanel($formResponsePanel);\n $formModalFeedbackPanel.hide();\n }\n break;\n case 'question':\n if(element.is('interaction')){\n $formChoicePanel.hide();\n $formInteractionPanel.hide();\n }\n break;\n case 'choice':\n $formChoicePanel.hide();\n showPanel($formInteractionPanel);\n break;\n case 'answer':\n $formResponsePanel.hide();\n break;\n }\n\n }).on('elementCreated.qti-widget.panel', function(e, data){\n\n if(data.element.qtiClass === '_container'){\n enableSubGroup('inline-interactions');\n }\n\n }).on('deleted.qti-widget.panel', function(e, data){\n\n if(data.element.qtiClass === '_container'){\n toggleInlineInteractionGroup();\n }\n\n });\n };\n\n var toggleInlineInteractionGroup = function(){\n\n var $itemContainer = _getItemContainer();\n if($itemContainer.find('.widget-textBlock').length){\n enableSubGroup('inline-interactions');\n }else{\n disableSubGroup('inline-interactions');\n }\n };\n\n // selectors and classes\n var heading = 'h2',\n section = 'section',\n panel = 'hr, .panel',\n closed = 'closed',\n ns = 'accordion';\n\n var initSidebarAccordion = function($sidebar){\n\n var $sections = $sidebar.find(section),\n $allPanels = $sidebar.children(panel).hide(),\n $allTriggers = $sidebar.find(heading);\n\n if($allTriggers.length === 0){\n return true;\n }\n\n // setup events\n $allTriggers.each(function(){\n var $heading = $(this),\n $section = $heading.parents(section),\n $panel = $section.children(panel),\n $closer = $('', {'class' : 'icon-up'}),\n $opener = $('', {'class' : 'icon-down'}),\n action = $panel.is(':visible') ? 'open' : 'close';\n\n $heading.append($closer).append($opener).addClass(closed);\n\n // this allows multiple calls, required when blocks are added dynamically\n if($heading.hasClass('_accordion')) {\n return;\n }\n else {\n $heading.addClass('_accordion');\n }\n\n // toggle heading class arrow (actually switch arrow)\n $panel.on('panelclose.' + ns + ' panelopen.' + ns, function(e, args){\n var fn = e.type === 'panelclose' ? 'add' : 'remove';\n args.heading[fn + 'Class'](closed);\n });\n\n $panel.trigger('panel' + action + '.' + ns, {heading : $heading});\n\n });\n\n $sections.each(function(){\n\n // assign click action to headings\n $(this).find(heading).on('click', function(e, args){\n\n var $heading = $(this),\n $panel = $heading.parents(section).children(panel),\n preserveOthers = !!(args && args.preserveOthers),\n actions = {\n close : 'hide',\n open : 'fadeIn'\n },\n action,\n forceState = (args && args.forceState ? args.forceState : false),\n classFn;\n\n if(forceState){\n classFn = forceState === 'open' ? 'addClass' : 'removeClass';\n $heading[classFn](closed);\n }\n\n action = $heading.hasClass(closed) ? 'open' : 'close';\n\n // whether or not to close other sections in the same sidebar\n // @todo (optional): remove 'false' in the condition below\n // to change the style to accordion, i.e. to allow for only one open section\n if(false && !preserveOthers){\n $allPanels.not($panel).each(function(){\n var $panel = $(this),\n $heading = $panel.parent().find(heading),\n _action = 'close';\n\n $panel.trigger('panel' + _action + '.' + ns, {heading : $heading})[actions[_action]]();\n });\n }\n\n $panel.trigger('panel' + action + '.' + ns, {heading : $heading})[actions[action]]();\n });\n\n });\n };\n\n /**\n * Toggle section display\n *\n * @param sections\n */\n var _toggleSections = function(sections, preserveOthers, state){\n sections.each(function(){\n $(this).find(heading).trigger('click', {preserveOthers : preserveOthers, forceState : state});\n });\n };\n\n /**\n * Close specific sections\n *\n * @param sections\n */\n var closeSections = function(sections, preserveOthers){\n _toggleSections(sections, !!preserveOthers, 'close');\n };\n\n /**\n * Open specific sections\n *\n * @param sections\n */\n var openSections = function(sections, preserveOthers){\n _toggleSections(sections, !!preserveOthers, 'open');\n };\n\n /**\n * toggle availability of sub group\n * @param subGroup\n */\n var _toggleSubGroup = function(subGroup, state){\n subGroup = $('.' + subGroup);\n if(subGroup.length){\n var fn = state === 'disable' ? 'addClass' : 'removeClass';\n subGroup.data('cover')[fn]('blocking');\n }\n };\n\n /**\n * enable sub group\n * @param subGroup\n */\n var enableSubGroup = function(subGroup){\n _toggleSubGroup(subGroup, 'enable');\n };\n\n /**\n * disable sub group\n * @param subGroup\n */\n var disableSubGroup = function(subGroup){\n _toggleSubGroup(subGroup, 'disable');\n };\n\n return {\n initFormVisibilityListener : initFormVisibilityListener,\n showPanel : showPanel,\n toggleInlineInteractionGroup : toggleInlineInteractionGroup,\n initSidebarAccordion : initSidebarAccordion,\n openSections : openSections,\n closeSections : closeSections,\n enableSubGroup : enableSubGroup,\n disableSubGroup : disableSubGroup\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 */\n\n/**\n * This module let's you set up the interaction panel\n *\n * @author Bertrand Chevrier \n */\ndefine('taoQtiItem/qtiCreator/editor/interactionsPanel',[\n 'taoQtiItem/qtiCreator/editor/interactionsToolbar',\n 'taoQtiItem/qtiCreator/helper/panel',\n 'taoQtiItem/qtiCreator/helper/qtiElements',\n 'taoQtiItem/portableElementRegistry/ciRegistry',\n 'services/features'\n], function (interactionsToolbar, panel, qtiElements, ciRegistry, features) {\n 'use strict';\n\n /**\n * Set up the interaction selection panel\n * @param {jQueryElement} $container - the panel container\n */\n return function setUpInteractionPanel($container) {\n const interactions = qtiElements.getAvailableAuthoringElements();\n const liquidsInteractionAvailable = features.isVisible('taoQtiItem/creator/interaction/pci/liquidsInteraction');\n const liquidsInteractionId = 'liquidsInteraction';\n for (const typeId in ciRegistry.getAllVersions()) {\n if(typeId === liquidsInteractionId && !liquidsInteractionAvailable) continue;\n const data = ciRegistry.getAuthoringData(typeId, { enabledOnly: true });\n if (data && data.tags && data.tags[0] === interactionsToolbar.getCustomInteractionTag()) {\n interactions[data.qtiClass] = data;\n }\n }\n\n //create toolbar:\n interactionsToolbar.create($container, interactions);\n\n //init accordions:\n panel.initSidebarAccordion($container);\n panel.closeSections($container.find('section'));\n panel.openSections($container.find('#sidebar-left-section-common-interactions'), false);\n\n //init special subgroup\n panel.toggleInlineInteractionGroup();\n };\n});\n\n","\ndefine('tpl!taoQtiItem/qtiCreator/tpl/toolbars/cssToggler', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, functionType=\"function\", escapeExpression=this.escapeExpression;\n\n\n buffer += \"
      • \\n \\n \";\n if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \"\\n \\n \\n \\n
      • \";\n return buffer;\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-2021 (original work) Open Assessment Technologies SA ;\n *\n */\n\n/**\n *\n * @author dieter \n */\n\ndefine('taoQtiItem/qtiCreator/editor/styleEditor/styleEditor',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'util/urlParser',\n 'core/promise',\n 'tpl!taoQtiItem/qtiCreator/tpl/toolbars/cssToggler',\n 'jquery.fileDownload'\n], function ($, _, __, UrlParser, Promise, cssTpl) {\n 'use strict';\n\n let itemConfig;\n\n /**\n * qtiItemCreator config provided from QtiCreator\n * used for generation of the ajax uri\n */\n let globalConfig;\n\n /**\n * generate Ajax URI\n * @param {String} action\n * @returns {*}\n */\n const _getUri = function (action) {\n return globalConfig[`${action}CssUrl`];\n };\n\n /**\n * Extract the file name from a path\n * @param {String} path\n * @returns {*}\n * @private\n */\n const _basename = function (path) {\n return path.substring(path.lastIndexOf('/') + 1);\n };\n\n // stylesheet as object\n let style = {};\n // DOM element to hold the style\n const $styleElem = (function () {\n let styleElem = $('#item-editor-user-styles');\n if (!styleElem.length) {\n styleElem = $('