define("taoTests/runner/areaBroker",["lodash","ui/areaBroker"],function(_,areaBroker$1){'use strict';_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,areaBroker$1=areaBroker$1&&Object.prototype.hasOwnProperty.call(areaBroker$1,"default")?areaBroker$1["default"]:areaBroker$1;var areaBroker=_.partial(areaBroker$1,["content","toolbox","navigation","control","header","panel"]);return areaBroker}),define("taoTests/runner/dataHolder",[],function(){'use strict';var defaultObjects=["testContext","testMap"];return function(){var map=new Map;return defaultObjects.forEach(function(entry){map.set(entry,{})}),map}}),define("taoTests/runner/plugin",["lodash","core/plugin"],function(_,pluginFactory){'use strict';_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,pluginFactory=pluginFactory&&Object.prototype.hasOwnProperty.call(pluginFactory,"default")?pluginFactory["default"]:pluginFactory;var plugin=_.partialRight(pluginFactory,{hostName:"testRunner"});return plugin}),define("taoTests/runner/probeOverseer",["lodash","moment","lib/uuid","lib/moment-timezone.min"],function(_,moment,uuid){'use strict';function probeOverseerFactory(runner){function collectEvent(probe){var eventNs=".probe-".concat(probe.name),probeHandler=function(){var now=moment(),data={id:uuid(12,16),type:probe.name,timestamp:now.format("x")/1e3,timezone:now.tz(timeZone).format("Z")};"function"==typeof probe.capture&&(data.context=probe.capture.apply(probe,[runner].concat(slice.call(arguments)))),overseer.push(data)};return probe.latency?collectLatencyEvent(probe):void _.forEach(probe.events,function(eventName){var listen=0=name.length)throw new TypeError("A channel must have a name");if(!_.isFunction(handler))throw new TypeError("A handler must be attached to a channel");return this.getCommunicator().then(function(communicatorInstance){communicatorInstance.channel(name,handler)}).catch(_.noop),this.on("channel-".concat(name),handler),this},send:function(channel,message){return this.getCommunicator().then(function(communicatorInstance){return communicatorInstance.send(channel,message)})},addCallActionParams:function(params){return _.isPlainObject(params)&&_.merge(extraCallParams,params),this},getTestData:function(){return delegate("getTestData")},getTestContext:function(){return delegate("getTestContext")},getTestMap:function(){return delegate("getTestMap")},sendVariables:function(variables,deferred){return delegate("sendVariables",variables,deferred)},callTestAction:function(action,params,deferred){return delegate("callTestAction",action,getParams(params),deferred)},getItem:function(uri,params){return delegate("getItem",uri,params)},submitItem:function(uri,state,response,params){return delegate("submitItem",uri,state,response,getParams(params))},callItemAction:function(uri,action,params,deferred){return delegate("callItemAction",uri,action,getParams(params),deferred)},telemetry:function(uri,signal,params){return delegate("telemetry",uri,signal,params)}}),connectivity.on("offline",function(){proxy.setOffline("device")}).on("online",function(){proxy.setOnline()}),proxy.on("message",function(channel,message){this.trigger("channel-".concat(channel),message)}).use(function(request,response,next){response.data&&response.data.messages&&_.forEach(response.data.messages,function(msg){msg.channel?proxy.trigger("message",msg.channel,msg.message):proxy.trigger("message","malformed",msg)}),next()}).use(function(request,response,next){proxy.isConnectivityError(response.data)?proxy.setOffline("request"):response.data&&!0===response.data.sent&&proxy.setOnline(),next()}),delegateProxy=delegator(proxy,proxyAdapter,{name:"proxy",wrapper:function(response){return Promise.resolve(response)}}),proxy}_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,async=async&&Object.prototype.hasOwnProperty.call(async,"default")?async["default"]:async,delegator=delegator&&Object.prototype.hasOwnProperty.call(delegator,"default")?delegator["default"]:delegator,eventifier=eventifier&&Object.prototype.hasOwnProperty.call(eventifier,"default")?eventifier["default"]:eventifier,providerRegistry=providerRegistry&&Object.prototype.hasOwnProperty.call(providerRegistry,"default")?providerRegistry["default"]:providerRegistry,tokenHandlerFactory=tokenHandlerFactory&&Object.prototype.hasOwnProperty.call(tokenHandlerFactory,"default")?tokenHandlerFactory["default"]:tokenHandlerFactory,connectivity=connectivity&&Object.prototype.hasOwnProperty.call(connectivity,"default")?connectivity["default"]:connectivity;var _defaults={},_slice=[].slice,proxy=providerRegistry(proxyFactory);return proxy}),define("taoTests/runner/providerLoader",["core/logger","core/providerLoader","core/pluginLoader","core/communicator","taoTests/runner/runner","taoTests/runner/proxy","taoItems/runner/api/itemRunner"],function(loggerFactory,providerLoader,pluginLoader,_communicator,_runner,_proxy,_itemRunner){'use strict';function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}loggerFactory=loggerFactory&&Object.prototype.hasOwnProperty.call(loggerFactory,"default")?loggerFactory["default"]:loggerFactory,providerLoader=providerLoader&&Object.prototype.hasOwnProperty.call(providerLoader,"default")?providerLoader["default"]:providerLoader,pluginLoader=pluginLoader&&Object.prototype.hasOwnProperty.call(pluginLoader,"default")?pluginLoader["default"]:pluginLoader,_communicator=_communicator&&Object.prototype.hasOwnProperty.call(_communicator,"default")?_communicator["default"]:_communicator,_runner=_runner&&Object.prototype.hasOwnProperty.call(_runner,"default")?_runner["default"]:_runner,_proxy=_proxy&&Object.prototype.hasOwnProperty.call(_proxy,"default")?_proxy["default"]:_proxy,_itemRunner=_itemRunner&&Object.prototype.hasOwnProperty.call(_itemRunner,"default")?_itemRunner["default"]:_itemRunner;var logger=loggerFactory("taoTests/runner/loader");return function(){var providers=0= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),"
\n"});return runnerComponentFactory}),define("taoTests/runner/testStore",["lodash","core/store","core/logger"],function(_,store,loggerFactory){'use strict';function testStoreLoader(testId,preselectedBackend){var testMode,storeNames=[],volatiles=[],changeTracking={},isStoreModeUnified=function(){return _.isUndefined(testMode)?selectStoreMode(testId,preselectedBackend).then(function(result){return testMode=result&&"undefined"!=typeof modes[result]?result:modes.unified,logger.debug("Test store mode ".concat(result," for ").concat(testId)),result===modes.unified}):Promise.resolve(testMode===modes.unified)};if(_.isEmpty(testId))throw new TypeError("The store must be identified with a unique test identifier");return{getStore:function(storeName){var trackChange=function(){_.isBoolean(changeTracking[storeName])&&(changeTracking[storeName]=!0)};if(_.isEmpty(storeName))throw new TypeError("A store name must be provided to get the store");return _.contains(storeNames,storeName)||storeNames.push(storeName),isStoreModeUnified().then(function(isUnified){var loadStore;return loadStore=isUnified?store(testId,preselectedBackend):store("".concat(storeName,"-").concat(testId),preselectedBackend),loadStore.then(function(loadedStore){var keyPattern=new RegExp("^".concat(storeName,"__")),storeKey=function(key){return isUnified?"".concat(storeName,"__").concat(key):key};return{getItem:function(key){return loadedStore.getItem(storeKey(key))},getItems:function(){return isUnified?loadedStore.getItems().then(function(entries){return _.transform(entries,function(acc,entry,key){return keyPattern.test(key)&&(acc[key.replace(keyPattern,"")]=entry),acc},{})}):loadedStore.getItems()},setItem:function(key,value){return trackChange(),loadedStore.setItem(storeKey(key),value)},removeItem:function(key){return trackChange(),loadedStore.removeItem(storeKey(key))},clear:function(){return trackChange(),isUnified?loadedStore.getItems().then(function(entries){_.forEach(entries,function(entry,key){keyPattern.test(key)&&loadedStore.removeItem(key)})}):loadedStore.clear()}}})})},setVolatile:function(storeName){return _.contains(volatiles,storeName)||volatiles.push(storeName),this},clearVolatileIfStoreChange:function(storeId){var self=this,shouldClear=!1;return store.getIdentifier(preselectedBackend).then(function(savedStoreId){return _.isEmpty(storeId)||_.isEmpty(savedStoreId)||savedStoreId===storeId||(logger.info("Storage change detected (".concat(savedStoreId," != ").concat(storeId,") => volatiles data wipe out !")),shouldClear=!0),shouldClear}).then(function(clear){return!!clear&&self.clearVolatileStores()})},clearVolatileStores:function(){var self=this,clearing=volatiles.map(function(storeName){return self.getStore(storeName).then(function(storeInstance){return storeInstance.clear()})});return Promise.all(clearing).then(function(results){return results&&results.length===volatiles.length})},startChangeTracking:function(storeName){return changeTracking[storeName]=!1,this},hasChanges:function(storeName){return!0===changeTracking[storeName]},resetChanges:function(storeName){return _.isBoolean(changeTracking[storeName])&&(changeTracking[storeName]=!1),this},remove:function(){var legacyStoreExp=new RegExp("-".concat(testId,"$"));return isStoreModeUnified().then(function(isUnified){return isUnified?store(testId,preselectedBackend).then(function(storeInstance){return storeInstance.removeStore()}):store.removeAll(function(storeName){return legacyStoreExp.test(storeName)},preselectedBackend)})},getStorageIdentifier:function(){return store.getIdentifier(preselectedBackend)}}}_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,store=store&&Object.prototype.hasOwnProperty.call(store,"default")?store["default"]:store,loggerFactory=loggerFactory&&Object.prototype.hasOwnProperty.call(loggerFactory,"default")?loggerFactory["default"]:loggerFactory;var logger=loggerFactory("taoQtiTest/runner/provider/testStore"),legacyPrefixes=["actions-","duration-","test-probe","timer-"],modes={unified:"unified",fragmented:"fragmented"},selectStoreMode=function(testId,preselectedBackend){return store.getAll(function(storeName){return _.some(legacyPrefixes,function(prefix){return!_.isEmpty(storeName)&&prefix+testId===storeName})},preselectedBackend).then(function(foundStores){return _.isArray(foundStores)&&0