From 0bb538568321e936b83b4a130b1992af957c3a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20L=C3=BCth?= Date: Wed, 7 Feb 2018 23:06:15 +0100 Subject: [PATCH 1/9] add WeakMap Polyfill --- src/class/weakmap.js | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/class/weakmap.js diff --git a/src/class/weakmap.js b/src/class/weakmap.js new file mode 100644 index 0000000..e7f705d --- /dev/null +++ b/src/class/weakmap.js @@ -0,0 +1,55 @@ +/* global + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + objectDefineProperty, + AbstractUuid, + ClassDescriptor +*/ + +//=require constants.js +//=require shortcuts.js +//=require abstract/uuid.js +//=require class/descriptor.js + +var ClassWeakMap = 'WeakMap' in global ? global.WeakMap : (function() { + var prefix = 'weakmap-'; + + function ClassWeakMap() { + return AbstractUuid.call(this); + } + + ClassWeakMap.prototype = { + set: function(key, value) { + var self = this, + entry; + + if((entry = key[self.uuid]) && entry[0] === key) { + entry[1] = value; + } else { + objectDefineProperty(key, prefix + self.uuid, new ClassDescriptor([ key, value ])); + } + + return self; + }, + get: function(key) { + var entry; + + if((entry = key[prefix + self.uuid]) && entry[0] === key) { + return entry[1]; + } + }, + delete: function(key) { + var entry; + + if((entry = key[prefix + self.uuid])) { + entry.length = 0; + } + }, + has: function(key) { + var entry; + + return !!(entry = key[prefix + self.uuid]) && entry[0] === key; + } + }; + + return ClassWeakMap.extends(AbstractUuid); +}()); From 668e55910356d2d035fda9612984bead0f4e139d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20L=C3=BCth?= Date: Wed, 7 Feb 2018 23:40:46 +0100 Subject: [PATCH 2/9] add global assignment --- src/class/weakmap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class/weakmap.js b/src/class/weakmap.js index e7f705d..28af051 100644 --- a/src/class/weakmap.js +++ b/src/class/weakmap.js @@ -10,7 +10,7 @@ //=require abstract/uuid.js //=require class/descriptor.js -var ClassWeakMap = 'WeakMap' in global ? global.WeakMap : (function() { +var ClassWeakMap = 'WeakMap' in global ? global.WeakMap : global.WeakMap = (function() { var prefix = 'weakmap-'; function ClassWeakMap() { From afa80030e6884f0a31ae200a92ac3e9b3ee26631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20L=C3=BCth?= Date: Wed, 7 Feb 2018 23:40:55 +0100 Subject: [PATCH 3/9] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c6f1578..f0cca48 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "qoopido.demand", "title": "Qoopido.demand", "description": "Promise like module loader using XHR requests and localStorage caching to dynamically load JavaScript and CSS + dynamic dependency resolution + support for custom handlers", - "version": "4.2.7", + "version": "4.2.8-alpha.1", "homepage": "https://github.com/dlueth/qoopido.demand", "author": { "name": "Dirk Lueth", From 6a51698281b6a14be3d6052cb7536b86c87e8e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20L=C3=BCth?= Date: Thu, 8 Feb 2018 00:28:08 +0100 Subject: [PATCH 4/9] fix context bug in weakmap --- src/class/weakmap.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/class/weakmap.js b/src/class/weakmap.js index 28af051..bac1e49 100644 --- a/src/class/weakmap.js +++ b/src/class/weakmap.js @@ -19,35 +19,34 @@ var ClassWeakMap = 'WeakMap' in global ? global.WeakMap : global.WeakMap = (func ClassWeakMap.prototype = { set: function(key, value) { - var self = this, - entry; + var entry; - if((entry = key[self.uuid]) && entry[0] === key) { + if((entry = key[this.uuid]) && entry[0] === key) { entry[1] = value; } else { - objectDefineProperty(key, prefix + self.uuid, new ClassDescriptor([ key, value ])); + objectDefineProperty(key, prefix + this.uuid, new ClassDescriptor([ key, value ])); } - return self; + return this; }, get: function(key) { var entry; - if((entry = key[prefix + self.uuid]) && entry[0] === key) { + if((entry = key[prefix + this.uuid]) && entry[0] === key) { return entry[1]; } }, delete: function(key) { var entry; - if((entry = key[prefix + self.uuid])) { + if((entry = key[prefix + this.uuid])) { entry.length = 0; } }, has: function(key) { var entry; - return !!(entry = key[prefix + self.uuid]) && entry[0] === key; + return !!(entry = key[prefix + this.uuid]) && entry[0] === key; } }; From 036349b5c004a4edf8f926f89bec0da1b1cf2fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20L=C3=BCth?= Date: Thu, 8 Feb 2018 01:22:35 +0100 Subject: [PATCH 5/9] remove global assignment --- src/class/weakmap.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/class/weakmap.js b/src/class/weakmap.js index bac1e49..607021b 100644 --- a/src/class/weakmap.js +++ b/src/class/weakmap.js @@ -10,7 +10,7 @@ //=require abstract/uuid.js //=require class/descriptor.js -var ClassWeakMap = 'WeakMap' in global ? global.WeakMap : global.WeakMap = (function() { +var ClassWeakMap = 'WeakMap' in global ? global.WeakMap : (function() { var prefix = 'weakmap-'; function ClassWeakMap() { @@ -41,6 +41,8 @@ var ClassWeakMap = 'WeakMap' in global ? global.WeakMap : global.WeakMap = (func if((entry = key[prefix + this.uuid])) { entry.length = 0; + + delete key[prefix + this.uuid]; } }, has: function(key) { From 87c6f0d987942e5d5b3442d978d720b86622388b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20L=C3=BCth?= Date: Thu, 8 Feb 2018 01:23:08 +0100 Subject: [PATCH 6/9] remove collision detection to reduce memory consumption --- src/function/uuid.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/function/uuid.js b/src/function/uuid.js index e9c6998..60d933d 100644 --- a/src/function/uuid.js +++ b/src/function/uuid.js @@ -3,8 +3,7 @@ */ var functionUuid = (function() { - var regex = new RegExp('[xy]', 'g'), - storage = {}; + var regex = new RegExp('[xy]', 'g'); function randomize(character) { var r = Math.random() * 16 | 0; @@ -13,14 +12,6 @@ var functionUuid = (function() { } return function functionUuid() { - var uuid; - - do { - uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(regex, randomize); - } while(storage[uuid]); - - storage[uuid] = 1; - - return uuid; + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(regex, randomize); }; -}()); \ No newline at end of file +}()); From dba80d19a8ee511ade965b4e91384e4dc2e90239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20L=C3=BCth?= Date: Thu, 8 Feb 2018 10:07:26 +0100 Subject: [PATCH 7/9] refactor storage to use weakmap --- src/class/pledge.js | 40 ++++++++++++++++++---------------------- src/class/processor.js | 32 +++++++++++++++----------------- src/class/queue.js | 18 +++++++++--------- src/class/registry.js | 17 ++++------------- src/class/weakmap.js | 8 ++++---- src/demand.js | 12 ++++++++---- src/function/defer.js | 12 +++++++----- 7 files changed, 65 insertions(+), 74 deletions(-) diff --git a/src/class/pledge.js b/src/class/pledge.js index 6856971..bf3e9f8 100644 --- a/src/class/pledge.js +++ b/src/class/pledge.js @@ -2,33 +2,29 @@ global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, FUNCTION_EMPTY, NULL, arrayPrototypeConcat, - functionDefer, functionUuid, functionToArray, - AbstractUuid + functionDefer, functionToArray */ //=require constants.js //=require shortcuts.js //=require function/defer.js -//=require function/uuid.js //=require function/toArray.js -//=require abstract/uuid.js var ClassPledge = (function() { var PLEDGE_PENDING = 'pending', PLEDGE_RESOLVED = 'resolved', - PLEDGE_REJECTED = 'rejected', - storage = {}; + PLEDGE_REJECTED = 'rejected'; function resolve() { - storage[this.uuid].handle(PLEDGE_RESOLVED, arguments); + storage.get(this).handle(PLEDGE_RESOLVED, arguments); } function reject() { - storage[this.uuid].handle(PLEDGE_REJECTED, arguments); + storage.get(this).handle(PLEDGE_REJECTED, arguments); } function handle(state, parameter) { - var properties = storage[this.uuid], + var properties = storage.get(this), pointer, result; if(properties.state === PLEDGE_PENDING) { @@ -76,12 +72,12 @@ var ClassPledge = (function() { } function ClassPledge(executor) { - var self = AbstractUuid.call(this); + var self = this; - storage[self.uuid] = { state: PLEDGE_PENDING, handle: handle.bind(self), value: NULL, resolved: [], rejected: [], count: 0 }; + storage.set(this, { state: PLEDGE_PENDING, handle: handle.bind(self), value: NULL, resolved: [], rejected: [], count: 0 }); executor(resolve.bind(self), reject.bind(self)); - + return self; } @@ -93,7 +89,7 @@ var ClassPledge = (function() { return this.then(alwaysListener, alwaysListener); }, then: function(resolveListener, rejectListener) { - var properties = storage[this.uuid], + var properties = storage.get(this), dfd = ClassPledge.defer(); resolveListener && properties[PLEDGE_RESOLVED].push({ handler: resolveListener, dfd: dfd }); @@ -106,13 +102,13 @@ var ClassPledge = (function() { return dfd.pledge; }, isPending: function() { - return storage[this.uuid].state === PLEDGE_PENDING; + return storage.get(this).state === PLEDGE_PENDING; }, isResolved: function() { - return storage[this.uuid].state === PLEDGE_RESOLVED; + return storage.get(this).state === PLEDGE_RESOLVED; }, isRejected: function() { - return storage[this.uuid].state === PLEDGE_REJECTED; + return storage.get(this).state === PLEDGE_REJECTED; } }; @@ -130,10 +126,10 @@ var ClassPledge = (function() { ClassPledge.all = function(pledges) { var dfd = ClassPledge.defer(), properties, i = 0, pledge; - + if(pledges.length) { - properties = (storage[functionUuid()] = { dfd: dfd, resolved: [], rejected: [], total: pledges.length, count: 0 }) - + properties = { dfd: dfd, resolved: [], rejected: [], total: pledges.length, count: 0 }; + for(; pledge = pledges[i]; i++) { observe(pledge, i, properties) } @@ -151,7 +147,7 @@ var ClassPledge = (function() { for(; pledge = pledges[i]; i++) { pledge.then(dfd.resolve, dfd.reject); } - + if(!pledges.length) { dfd.resolve(); } @@ -159,5 +155,5 @@ var ClassPledge = (function() { return dfd.pledge; }; - return ClassPledge.extends(AbstractUuid); -}()); \ No newline at end of file + return ClassPledge; +}()); diff --git a/src/class/processor.js b/src/class/processor.js index a89628f..18827d7 100644 --- a/src/class/processor.js +++ b/src/class/processor.js @@ -1,45 +1,43 @@ /* global global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, EVENT_QUEUE_ENQUEUE, NULL, - singletonEvent, - AbstractUuid + singletonEvent */ //=require constants.js -//=require abstract/uuid.js function ClassProcessor(queue) { - var self = AbstractUuid.call(this), - pointer = storage[self.uuid] = { queue: queue, current: NULL }; + var self = this, + properties = { queue: queue, current: NULL }; + + storage.set(self, properties); demand .on(EVENT_QUEUE_ENQUEUE + ':' + queue.uuid, function() { - !pointer.current && self.process(); + !properties.current && self.process(); }); - - return self; } ClassProcessor.prototype = { process: function() { - var pointer = storage[this.uuid], + var properties = storage.get(this), current; - if(pointer.queue.length) { - current = pointer.current = pointer.queue.dequeue(); + if(properties.queue.length) { + current = properties.current = properties.queue.dequeue(); if(!current.pledge.isRejected()) { - current.handler.process && current.handler.process(current); + current.handler.process && current.handler.process(current); - return; + return; } } - pointer.current = NULL; + properties.current = NULL; }, get current() { - return storage[this.uuid].current; + return storage.get(this).current; } }; - -ClassProcessor.extends(AbstractUuid); \ No newline at end of file + +ClassProcessor; diff --git a/src/class/queue.js b/src/class/queue.js index 198a894..48888ec 100644 --- a/src/class/queue.js +++ b/src/class/queue.js @@ -14,28 +14,28 @@ function ClassQueue() { var self = AbstractUuid.call(this); - storage[self.uuid] = []; - + storage.set(self, []); + return self; } - + ClassQueue.prototype = { enqueue: function() { - storage[this.uuid] = storage[this.uuid].concat(functionToArray(arguments)); + storage.set(this, storage.get(this).concat(functionToArray(arguments))); singletonEvent.emit(EVENT_QUEUE_ENQUEUE, this.uuid); }, dequeue: function() { singletonEvent.emit(EVENT_QUEUE_DEQUEUE, this.uuid); - return storage[this.uuid].shift(); + return storage.get(this).shift(); }, get current() { - return storage[this.uuid][0]; + return storage.get(this)[0]; }, get length() { - return storage[this.uuid].length; + return storage.get(this).length; } }; - -ClassQueue.extends(AbstractUuid); \ No newline at end of file + +ClassQueue.extends(AbstractUuid); diff --git a/src/class/registry.js b/src/class/registry.js index 5b8f949..4ac2b81 100644 --- a/src/class/registry.js +++ b/src/class/registry.js @@ -1,28 +1,19 @@ /* global global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, - AbstractUuid */ -//=require abstract/uuid.js - function ClassRegistry() { - var self = AbstractUuid.call(this); - - storage[self.uuid] = {}; - - return self; + storage.set(this, {}); } ClassRegistry.prototype = { get: function(key) { - return key ? storage[this.uuid][key] : storage[this.uuid]; + return key ? storage.get(this)[key] : storage.get(this); }, set: function(key, value) { - storage[this.uuid][key] = value; + storage.get(this)[key] = value; }, remove: function(key) { - delete storage[this.uuid][key]; + delete storage.get(this)[key]; } }; - -ClassRegistry.extends(AbstractUuid); \ No newline at end of file diff --git a/src/class/weakmap.js b/src/class/weakmap.js index 607021b..006bbfd 100644 --- a/src/class/weakmap.js +++ b/src/class/weakmap.js @@ -10,14 +10,14 @@ //=require abstract/uuid.js //=require class/descriptor.js -var ClassWeakMap = 'WeakMap' in global ? global.WeakMap : (function() { +var ClassWeakmap = 'WeakMap' in global ? global.WeakMap : (function() { var prefix = 'weakmap-'; - function ClassWeakMap() { + function ClassWeakmap() { return AbstractUuid.call(this); } - ClassWeakMap.prototype = { + ClassWeakmap.prototype = { set: function(key, value) { var entry; @@ -52,5 +52,5 @@ var ClassWeakMap = 'WeakMap' in global ? global.WeakMap : (function() { } }; - return ClassWeakMap.extends(AbstractUuid); + return ClassWeakmap.extends(AbstractUuid); }()); diff --git a/src/demand.js b/src/demand.js index bedb0df..1994c79 100644 --- a/src/demand.js +++ b/src/demand.js @@ -4,7 +4,7 @@ validatorIsTypeOf, validatorIsArray, validatorIsObject, validatorIsInstanceOf, functionResolveUrl, functionResolveSourcemaps, functionMerge, functionIterate, functionDefer, functionHash, functionUuid, AbstractUuid, abstractHandler, - ClassDependency, ClassQueue, ClassProcessor, ClassPledge, ClassXhr, ClassFailure, ClassDescriptor, + ClassDependency, ClassQueue, ClassProcessor, ClassPledge, ClassXhr, ClassFailure, ClassDescriptor, ClassWeakmap, handlerModule, handlerBundle, handlerComponent, pluginGenie */ @@ -17,13 +17,16 @@ var document = global.document, options = 'demand' in global && global.demand, settings = { version: '1.0.0', cache: {}, timeout: 8000, pattern: {}, modules: {}, handler: 'module' }, - storage = {}, - demand, provide, queue, processor; + storage, demand, provide, queue, processor; /* eslint-enable no-unused-vars */ // include inheritance //=require inheritance.js + // include weakmap + //=require class/weakmap.js + storage = new ClassWeakmap(); + // include main components //=require function/demand.js //=require function/provide.js @@ -66,6 +69,7 @@ assignModule(MODULE_PREFIX_FUNCTION + 'hash', functionHash); assignModule(MODULE_PREFIX_FUNCTION + 'defer', functionDefer); assignModule(MODULE_PREFIX_FUNCTION + 'uuid', functionUuid); + assignModule(MODULE_PREFIX + 'weakmap', ClassWeakmap); assignModule(MODULE_PREFIX + 'descriptor', ClassDescriptor); assignModule(MODULE_PREFIX + 'pledge', ClassPledge); assignModule(MODULE_PREFIX + 'queue', ClassQueue); @@ -84,4 +88,4 @@ break; } } -}(this.name === 'demand-loader' ? parent : this, setTimeout, clearTimeout)); \ No newline at end of file +}(this.name === 'demand-loader' ? parent : this, setTimeout, clearTimeout)); diff --git a/src/function/defer.js b/src/function/defer.js index 4b6d87a..14834d9 100644 --- a/src/function/defer.js +++ b/src/function/defer.js @@ -39,10 +39,12 @@ var functionDefer = (function() { if(!hasSetImmediate && 'postMessage' in global && !('importScripts' in global) && 'addEventListener' in global) { return (function() { function onMessage(event) { - if(event.source === global && event.data && storage[event.data]) { - storage[event.data](); + var fn; - delete storage[event.data]; + if(event.source === global && event.data && (fn = storage.get(event.data))) { + fn(); + + storage.delete(event.data); } } @@ -51,7 +53,7 @@ var functionDefer = (function() { return function functionDefer(fn) { var uuid = functionUuid(); - storage[uuid] = fn; + storage.set(uuid, fn); global.postMessage(uuid, '*'); }; @@ -78,4 +80,4 @@ var functionDefer = (function() { return function functionDefer(fn) { fallback(fn); }; -}()); \ No newline at end of file +}()); From 2d60c357a5f04fb70fa12260e88c2d9278d182a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20L=C3=BCth?= Date: Thu, 8 Feb 2018 13:31:32 +0100 Subject: [PATCH 8/9] refactoring --- src/abstract/handler.js | 24 +++++------- src/abstract/uuid.js | 7 +--- src/class/dependency.js | 2 +- src/class/descriptor.js | 4 +- src/class/failure.js | 22 +++++------ src/class/loader.js | 7 ++-- src/class/pattern.js | 4 +- src/class/pledge.js | 9 +++-- src/class/processor.js | 62 +++++++++++++++++-------------- src/class/queue.js | 54 +++++++++++++++------------ src/class/registry.js | 37 +++++++++++------- src/class/weakmap.js | 42 +++++++++++---------- src/class/xhr.js | 2 +- src/constants.js | 2 +- src/demand.js | 8 +--- src/function/defer.js | 14 +++---- src/function/demand.js | 20 +++++----- src/function/escapeRegex.js | 5 +-- src/function/getTimestamp.js | 2 +- src/function/hash.js | 4 +- src/function/iterate.js | 4 +- src/function/merge.js | 4 +- src/function/provide.js | 6 +-- src/function/resolveId.js | 4 +- src/function/resolvePath.js | 4 +- src/function/resolveSourcemaps.js | 14 +++---- src/function/resolveUrl.js | 4 +- src/function/toArray.js | 4 +- src/function/uuid.js | 2 +- src/handler/bundle.js | 4 +- src/handler/component.js | 4 +- src/handler/module.js | 6 +-- src/inheritance.js | 13 ++++--- src/plugin/genie.js | 4 +- src/shortcuts.js | 4 +- src/singleton/cache.js | 2 +- src/singleton/event.js | 2 +- src/validator/isArray.js | 4 +- src/validator/isObject.js | 4 +- src/validator/isPositive.js | 4 +- src/validator/isTypeOf.js | 4 +- src/variables.js | 16 ++++---- 42 files changed, 231 insertions(+), 217 deletions(-) diff --git a/src/abstract/handler.js b/src/abstract/handler.js index 4b9ba2f..39c80b0 100644 --- a/src/abstract/handler.js +++ b/src/abstract/handler.js @@ -1,22 +1,18 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, NULL */ //=require constants.js -var abstractHandler = (function() { - function AbstractHandler() { +function abstractHandler() { - } +} - AbstractHandler.prototype = { - validate: NULL, - onPreRequest: NULL, - onPostRequest: NULL, - onPreProcess: NULL, - process: NULL - }; - - return AbstractHandler; -}()); \ No newline at end of file +abstractHandler.prototype = { + validate: NULL, + onPreRequest: NULL, + onPostRequest: NULL, + onPreProcess: NULL, + process: NULL +}; diff --git a/src/abstract/uuid.js b/src/abstract/uuid.js index d4d1a97..b35b541 100644 --- a/src/abstract/uuid.js +++ b/src/abstract/uuid.js @@ -1,21 +1,18 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, STRING_UNDEFINED, - objectDefineProperty, validatorIsTypeOf, functionUuid, - ClassDescriptor */ //=require constants.js //=require shortcuts.js //=require validator/isTypeOf.js //=require function/uuid.js -//=require class/descriptor.js function AbstractUuid() { if(validatorIsTypeOf(this.uuid, STRING_UNDEFINED)) { - objectDefineProperty(this, 'uuid', new ClassDescriptor(functionUuid())); + this.define('uuid', functionUuid()); } return this; diff --git a/src/class/dependency.js b/src/class/dependency.js index f3c7a55..8302145 100644 --- a/src/class/dependency.js +++ b/src/class/dependency.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, DEMAND_ID, MODULE_PREFIX_HANDLER, ERROR_LOAD, DEMAND_ID, PROVIDE_ID, PATH_ID, MOCK_PREFIX, NULL, TRUE, FALSE, object, regexMatchInternal, regexMatchParameter, diff --git a/src/class/descriptor.js b/src/class/descriptor.js index 8253188..fa00001 100644 --- a/src/class/descriptor.js +++ b/src/class/descriptor.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, NULL */ @@ -13,4 +13,4 @@ function ClassDescriptor(value, writable, configurable, enumerable) { configurable: !!configurable, writable: !!writable }; -} \ No newline at end of file +} diff --git a/src/class/failure.js b/src/class/failure.js index d322652..db57200 100644 --- a/src/class/failure.js +++ b/src/class/failure.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, DEMAND_ID, functionToArray */ @@ -9,15 +9,15 @@ function ClassFailure(message, module, stack) { var self = this; - + self.message = message; - + module && (self.module = module); stack && (self.stack = functionToArray(stack)); - + return self; } - + ClassFailure.prototype = { /* only for reference message: NULL, @@ -31,22 +31,22 @@ ClassFailure.prototype = { if(self.stack) { result = ClassFailure.traverse(self.stack, result, 1); } - + return result; } }; - + ClassFailure.traverse = function(stack, value, depth) { var indention = new Array(depth + 1).join(' '), i = 0, item; - + for(; item = stack[i]; i++) { value += '\n' + indention + '> ' + item.message + ' ' + (item.module ? '"' + item.module + '"' : ''); - + if(item.stack) { value = ClassFailure.traverse(item.stack, value, depth + 1); } } - + return value; -}; \ No newline at end of file +}; diff --git a/src/class/loader.js b/src/class/loader.js index 23ba97c..f6fe206 100644 --- a/src/class/loader.js +++ b/src/class/loader.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, DEMAND_ID, EVENT_PRE_REQUEST, EVENT_POST_REQUEST, ERROR_LOAD, regexIsAbsoluteUri, linkElement, @@ -17,10 +17,9 @@ //=require class/xhr.js //=require class/failure.js -var regexMatchEmptySearch = /^(?:\?|)$/; - function ClassLoader(dependency) { - var pattern; + var regexMatchEmptySearch = /^(?:\?|)$/, + pattern; function resolve(response, type) { if(!type || !dependency.handler.validate || dependency.handler.validate(type)) { diff --git a/src/class/pattern.js b/src/class/pattern.js index 41dc02d..a72d5f5 100644 --- a/src/class/pattern.js +++ b/src/class/pattern.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, functionResolveUrl, functionEscapeRegex, functionIterate */ @@ -46,4 +46,4 @@ var ClassPattern = (function() { }; return ClassPattern; -}()); \ No newline at end of file +}()); diff --git a/src/class/pledge.js b/src/class/pledge.js index bf3e9f8..6fe36ad 100644 --- a/src/class/pledge.js +++ b/src/class/pledge.js @@ -1,19 +1,22 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, FUNCTION_EMPTY, NULL, arrayPrototypeConcat, - functionDefer, functionToArray + functionDefer, functionToArray, + ClassWeakmap */ //=require constants.js //=require shortcuts.js //=require function/defer.js //=require function/toArray.js +//=require class/weakmap.js var ClassPledge = (function() { var PLEDGE_PENDING = 'pending', PLEDGE_RESOLVED = 'resolved', - PLEDGE_REJECTED = 'rejected'; + PLEDGE_REJECTED = 'rejected', + storage = new ClassWeakmap(); function resolve() { storage.get(this).handle(PLEDGE_RESOLVED, arguments); diff --git a/src/class/processor.js b/src/class/processor.js index 18827d7..4913507 100644 --- a/src/class/processor.js +++ b/src/class/processor.js @@ -1,43 +1,49 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, EVENT_QUEUE_ENQUEUE, NULL, - singletonEvent + singletonEvent, + ClassWeakmap */ //=require constants.js +//=require class/weakmap.js -function ClassProcessor(queue) { - var self = this, - properties = { queue: queue, current: NULL }; +var ClassProcessor = (function() { + var storage = new ClassWeakmap(); - storage.set(self, properties); + function ClassProcessor(queue) { + var self = this, + properties = { queue: queue, current: NULL }; - demand - .on(EVENT_QUEUE_ENQUEUE + ':' + queue.uuid, function() { - !properties.current && self.process(); - }); -} + storage.set(self, properties); -ClassProcessor.prototype = { - process: function() { - var properties = storage.get(this), - current; + demand + .on(EVENT_QUEUE_ENQUEUE + ':' + queue.uuid, function() { + !properties.current && self.process(); + }); + } + + ClassProcessor.prototype = { + process: function() { + var properties = storage.get(this), + current; - if(properties.queue.length) { - current = properties.current = properties.queue.dequeue(); + if(properties.queue.length) { + current = properties.current = properties.queue.dequeue(); - if(!current.pledge.isRejected()) { - current.handler.process && current.handler.process(current); + if(!current.pledge.isRejected()) { + current.handler.process && current.handler.process(current); - return; + return; + } } - } - properties.current = NULL; - }, - get current() { - return storage.get(this).current; - } -}; + properties.current = NULL; + }, + get current() { + return storage.get(this).current; + } + }; -ClassProcessor; + return ClassProcessor; +}()); diff --git a/src/class/queue.js b/src/class/queue.js index 48888ec..703597e 100644 --- a/src/class/queue.js +++ b/src/class/queue.js @@ -1,41 +1,47 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, EVENT_QUEUE_ENQUEUE, EVENT_QUEUE_DEQUEUE, functionToArray, singletonEvent, + ClassWeakmap, AbstractUuid */ //=require constants.js //=require function/toArray.js //=require singleton/event.js +//=require class/weakmap.js //=require abstract/uuid.js -function ClassQueue() { - var self = AbstractUuid.call(this); +var ClassQueue = (function() { + var storage = new ClassWeakmap(); - storage.set(self, []); + function ClassQueue() { + var self = AbstractUuid.call(this); - return self; -} + storage.set(self, []); -ClassQueue.prototype = { - enqueue: function() { - storage.set(this, storage.get(this).concat(functionToArray(arguments))); - - singletonEvent.emit(EVENT_QUEUE_ENQUEUE, this.uuid); - }, - dequeue: function() { - singletonEvent.emit(EVENT_QUEUE_DEQUEUE, this.uuid); - - return storage.get(this).shift(); - }, - get current() { - return storage.get(this)[0]; - }, - get length() { - return storage.get(this).length; + return self; } -}; -ClassQueue.extends(AbstractUuid); + ClassQueue.prototype = { + enqueue: function() { + storage.set(this, storage.get(this).concat(functionToArray(arguments))); + + singletonEvent.emit(EVENT_QUEUE_ENQUEUE, this.uuid); + }, + dequeue: function() { + singletonEvent.emit(EVENT_QUEUE_DEQUEUE, this.uuid); + + return storage.get(this).shift(); + }, + get current() { + return storage.get(this)[0]; + }, + get length() { + return storage.get(this).length; + } + }; + + return ClassQueue.extends(AbstractUuid); +}()); diff --git a/src/class/registry.js b/src/class/registry.js index 4ac2b81..1a3a475 100644 --- a/src/class/registry.js +++ b/src/class/registry.js @@ -1,19 +1,28 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, + ClassWeakmap */ -function ClassRegistry() { - storage.set(this, {}); -} +//=require class/weakmap.js -ClassRegistry.prototype = { - get: function(key) { - return key ? storage.get(this)[key] : storage.get(this); - }, - set: function(key, value) { - storage.get(this)[key] = value; - }, - remove: function(key) { - delete storage.get(this)[key]; +var ClassRegistry = (function() { + var storage = new ClassWeakmap(); + + function ClassRegistry() { + storage.set(this, {}); } -}; + + ClassRegistry.prototype = { + get: function(key) { + return key ? storage.get(this)[key] : storage.get(this); + }, + set: function(key, value) { + storage.get(this)[key] = value; + }, + remove: function(key) { + delete storage.get(this)[key]; + } + }; + + return ClassRegistry; +}()); diff --git a/src/class/weakmap.js b/src/class/weakmap.js index 006bbfd..274bff0 100644 --- a/src/class/weakmap.js +++ b/src/class/weakmap.js @@ -1,56 +1,58 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, - objectDefineProperty, - AbstractUuid, - ClassDescriptor + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, + functionUuid, */ //=require constants.js -//=require shortcuts.js -//=require abstract/uuid.js -//=require class/descriptor.js +//=require function/uuid.js var ClassWeakmap = 'WeakMap' in global ? global.WeakMap : (function() { var prefix = 'weakmap-'; + function getEntry(context, key) { + var entry; + + if((entry = key[context.id]) && entry[0] === key) { + return entry; + } + } + function ClassWeakmap() { - return AbstractUuid.call(this); + this.define('id', prefix + functionUuid()); } ClassWeakmap.prototype = { set: function(key, value) { - var entry; + var entry = getEntry(this, key); - if((entry = key[this.uuid]) && entry[0] === key) { + if(entry) { entry[1] = value; } else { - objectDefineProperty(key, prefix + this.uuid, new ClassDescriptor([ key, value ])); + key.define(this.id, [ key, value ]); } return this; }, get: function(key) { - var entry; + var entry = getEntry(this, key); - if((entry = key[prefix + this.uuid]) && entry[0] === key) { + if(entry) { return entry[1]; } }, delete: function(key) { - var entry; + var entry = getEntry(this, key); - if((entry = key[prefix + this.uuid])) { + if(entry) { entry.length = 0; - delete key[prefix + this.uuid]; + delete key[this.id]; } }, has: function(key) { - var entry; - - return !!(entry = key[prefix + this.uuid]) && entry[0] === key; + return !!getEntry(this, key); } }; - return ClassWeakmap.extends(AbstractUuid); + return ClassWeakmap; }()); diff --git a/src/class/xhr.js b/src/class/xhr.js index a393f7b..7919e87 100644 --- a/src/class/xhr.js +++ b/src/class/xhr.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, TRUE, regexMatchBaseUrl, ClassPledge diff --git a/src/constants.js b/src/constants.js index dab870b..f0b3955 100644 --- a/src/constants.js +++ b/src/constants.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout */ var DEMAND_ID = 'demand', diff --git a/src/demand.js b/src/demand.js index 1994c79..55398d1 100644 --- a/src/demand.js +++ b/src/demand.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, MODULE_PREFIX, MODULE_PREFIX_HANDLER, MODULE_PREFIX_VALIDATOR, MODULE_PREFIX_PLUGIN, MODULE_PREFIX_FUNCTION, MODULE_PREFIX_ABSTRACT, STRING_STRING, STRING_FUNCTION, TRUE, validatorIsTypeOf, validatorIsArray, validatorIsObject, validatorIsInstanceOf, functionResolveUrl, functionResolveSourcemaps, functionMerge, functionIterate, functionDefer, functionHash, functionUuid, @@ -17,16 +17,12 @@ var document = global.document, options = 'demand' in global && global.demand, settings = { version: '1.0.0', cache: {}, timeout: 8000, pattern: {}, modules: {}, handler: 'module' }, - storage, demand, provide, queue, processor; + demand, provide, queue, processor; /* eslint-enable no-unused-vars */ // include inheritance //=require inheritance.js - // include weakmap - //=require class/weakmap.js - storage = new ClassWeakmap(); - // include main components //=require function/demand.js //=require function/provide.js diff --git a/src/function/defer.js b/src/function/defer.js index 14834d9..4ceb8d4 100644 --- a/src/function/defer.js +++ b/src/function/defer.js @@ -5,7 +5,7 @@ */ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, NULL, TRUE, FALSE, functionUuid */ @@ -38,13 +38,15 @@ var functionDefer = (function() { if(!hasSetImmediate && 'postMessage' in global && !('importScripts' in global) && 'addEventListener' in global) { return (function() { + var storage = {}; + function onMessage(event) { var fn; - if(event.source === global && event.data && (fn = storage.get(event.data))) { + if(event.source === global && event.data && (fn = storage[event.data])) { fn(); - storage.delete(event.data); + delete storage[event.data]; } } @@ -53,7 +55,7 @@ var functionDefer = (function() { return function functionDefer(fn) { var uuid = functionUuid(); - storage.set(uuid, fn); + storage[uuid] = fn; global.postMessage(uuid, '*'); }; @@ -73,9 +75,7 @@ var functionDefer = (function() { }; } - /* eslint-disable no-undef */ - fallback = hasSetImmediate ? setImmediate : setTimeout; - /* eslint-enable no-undef */ + fallback = hasSetImmediate ? setImmediate : setTimeout; // eslint-disable-line no-undef return function functionDefer(fn) { fallback(fn); diff --git a/src/function/demand.js b/src/function/demand.js index 9fabadc..52fbed1 100644 --- a/src/function/demand.js +++ b/src/function/demand.js @@ -1,9 +1,9 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, STRING_BOOLEAN, STRING_STRING, EVENT_PRE_RESOLVE, EVENT_POST_RESOLVE, EVENT_PRE_CONFIGURE, EVENT_POST_CONFIGURE, EVENT_CACHE_MISS, EVENT_CACHE_HIT, EVENT_PRE_REQUEST, EVENT_POST_REQUEST, EVENT_PRE_PROCESS, EVENT_POST_PROCESS, NULL, FALSE, validatorIsTypeOf, validatorIsObject, validatorIsPositive, validatorIsInstanceOf, functionIterate, functionMerge, functionDefer, functionToArray, - ClassPledge, ClassDependency, ClassPattern, ClassLoader, + ClassPledge, ClassDependency, ClassPattern, ClassLoader, singletonEvent, singletonCache */ @@ -47,9 +47,9 @@ demand = global.demand = (function() { var dependencies = functionToArray(arguments), context = this !== global ? this : NULL, i = 0, uri, dfd, result; - + singletonEvent.emit(EVENT_PRE_RESOLVE, NULL, dependencies, context); - + for(; (uri = dependencies[i]); i++) { if(validatorIsTypeOf(uri, STRING_STRING)) { dependencies[i] = ClassDependency.resolve(uri, context).pledge; @@ -59,13 +59,13 @@ demand = global.demand = (function() { dfd.resolve(uri); } } - + if(dependencies.length > 1) { result = ClassPledge.all(dependencies); } else { result = dependencies[0]; } - + return result.always(function() { singletonEvent.emit(EVENT_POST_RESOLVE, NULL, dependencies, context); }); @@ -135,14 +135,14 @@ demand = global.demand = (function() { }) .after(EVENT_PRE_REQUEST, function(dependency) { var pointer = dependency.handler.onPreRequest; - + pointer && pointer(dependency); }) .after(EVENT_PRE_PROCESS, function(dependency) { var pointer = dependency.handler.onPreProcess; - + pointer && pointer(dependency); - + dependency.pledge.then(function() { singletonEvent.emit(EVENT_POST_PROCESS, dependency.id, dependency); }); @@ -155,4 +155,4 @@ demand = global.demand = (function() { }); return demand; -}()); \ No newline at end of file +}()); diff --git a/src/function/escapeRegex.js b/src/function/escapeRegex.js index 0c45f90..f9f954d 100644 --- a/src/function/escapeRegex.js +++ b/src/function/escapeRegex.js @@ -1,10 +1,9 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout */ var functionEscapeRegex = (function() { - // eslint-disable-next-line no-useless-escape - var regexMatchRegex = /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g; + var regexMatchRegex = /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g; // eslint-disable-line no-useless-escape return function functionEscapeRegex(value) { return value.replace(regexMatchRegex, '\\$&'); diff --git a/src/function/getTimestamp.js b/src/function/getTimestamp.js index d488184..0ed7e6e 100644 --- a/src/function/getTimestamp.js +++ b/src/function/getTimestamp.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout */ function functionGetTimestamp() { diff --git a/src/function/hash.js b/src/function/hash.js index a19e14a..438a129 100644 --- a/src/function/hash.js +++ b/src/function/hash.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout */ /** @@ -20,4 +20,4 @@ function functionHash(input){ } return value >>> 0; -} \ No newline at end of file +} diff --git a/src/function/iterate.js b/src/function/iterate.js index 3b96e92..1c2a2a9 100644 --- a/src/function/iterate.js +++ b/src/function/iterate.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, UNDEFINED, FALSE, object */ @@ -32,4 +32,4 @@ function functionIterate(source, callback, context) { } return context; -} \ No newline at end of file +} diff --git a/src/function/merge.js b/src/function/merge.js index 97e84cb..7de1269 100644 --- a/src/function/merge.js +++ b/src/function/merge.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, UNDEFINED, validatorIsObject, functionIterate @@ -50,4 +50,4 @@ var functionMerge = (function() { return target; }; -}()); \ No newline at end of file +}()); diff --git a/src/function/provide.js b/src/function/provide.js index b656a72..76c7810 100644 --- a/src/function/provide.js +++ b/src/function/provide.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, STRING_STRING, STRING_UNDEFINED, STRING_FUNCTION, ERROR_PROVIDE, ERROR_PROVIDE_ANONYMOUS, NULL, validatorIsTypeOf, validatorIsArray, ClassDependency, ClassFailure @@ -43,8 +43,6 @@ provide = global.provide = function provide() { return module.dfd.pledge; } else { - /* eslint-disable no-console */ - !validatorIsTypeOf(console, STRING_UNDEFINED) && console.error(new ClassFailure(ERROR_PROVIDE_ANONYMOUS)); - /* eslint-enable no-console */ + !validatorIsTypeOf(console, STRING_UNDEFINED) && console.error(new ClassFailure(ERROR_PROVIDE_ANONYMOUS)); // eslint-disable-line no-console } }; diff --git a/src/function/resolveId.js b/src/function/resolveId.js index 03cb1e7..d5a9c33 100644 --- a/src/function/resolveId.js +++ b/src/function/resolveId.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, regexMatchParameter, functionResolvePath */ @@ -11,4 +11,4 @@ function functionResolveId(uri, context) { var parameter = uri.match(regexMatchParameter); return ((parameter && parameter[1]) ? 'mock:' : '') + ((parameter && parameter[3]) || settings.handler) + '!' + functionResolvePath(uri, context); -} \ No newline at end of file +} diff --git a/src/function/resolvePath.js b/src/function/resolvePath.js index 03777c1..1250b2c 100644 --- a/src/function/resolvePath.js +++ b/src/function/resolvePath.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, regexMatchParameter, regexMatchBaseUrl, regexIsAbsolutePath, regexIsAbsoluteUri, functionResolveUrl */ @@ -15,4 +15,4 @@ function functionResolvePath(uri, context) { } return path; -} \ No newline at end of file +} diff --git a/src/function/resolveSourcemaps.js b/src/function/resolveSourcemaps.js index ec5acff..84a9e9b 100644 --- a/src/function/resolveSourcemaps.js +++ b/src/function/resolveSourcemaps.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, regexMatchSourcemap, regexIsAbsoluteUri linkElement */ @@ -9,20 +9,20 @@ function functionResolveSourcemaps(url, source) { var match, replacement; - + while(match = regexMatchSourcemap.exec(source)) { linkElement.href = url; - + if(regexIsAbsoluteUri.test(match[2])) { replacement = linkElement.protocol + '//' + linkElement.host + match[3]; } else { linkElement.pathname += '/../' + match[3]; - + replacement = linkElement.protocol + '//' + linkElement.host + linkElement.pathname; } - + source = source.replace(match[0], match[1] + ' ' + match[2] + '=' + replacement + '.map' + (match[4] ? ' ' + match[4] : '')); } - + return source; -} \ No newline at end of file +} diff --git a/src/function/resolveUrl.js b/src/function/resolveUrl.js index a994d7d..3232aa4 100644 --- a/src/function/resolveUrl.js +++ b/src/function/resolveUrl.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, linkElement */ @@ -9,4 +9,4 @@ function functionResolveUrl(url) { linkElement.href = url; return linkElement.href; -} \ No newline at end of file +} diff --git a/src/function/toArray.js b/src/function/toArray.js index 9a7e5f2..e964013 100644 --- a/src/function/toArray.js +++ b/src/function/toArray.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, arrayPrototypeSlice */ @@ -7,4 +7,4 @@ function functionToArray(arrayLikeObject, start, end) { return arrayPrototypeSlice.call(arrayLikeObject, start, end); -} \ No newline at end of file +} diff --git a/src/function/uuid.js b/src/function/uuid.js index 60d933d..5ca2d3d 100644 --- a/src/function/uuid.js +++ b/src/function/uuid.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout */ var functionUuid = (function() { diff --git a/src/handler/bundle.js b/src/handler/bundle.js index d53a5e6..37fdc57 100644 --- a/src/handler/bundle.js +++ b/src/handler/bundle.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, MODULE_PREFIX_HANDLER, EVENT_POST_CONFIGURE, ERROR_RESOLVE, MOCK_PREFIX, STRING_STRING, FALSE, TRUE, regexMatchParameter, regexMatchSourcemap, validatorIsTypeOf, validatorIsObject, @@ -121,4 +121,4 @@ var handlerBundle = (function() { }; return new (HandlerBundle.extends(abstractHandler)); -}()); \ No newline at end of file +}()); diff --git a/src/handler/component.js b/src/handler/component.js index 48b675a..0d74380 100644 --- a/src/handler/component.js +++ b/src/handler/component.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, FALSE, EVENT_POST_REQUEST, ERROR_RESOLVE, functionResolveSourcemaps, abstractHandler, @@ -81,4 +81,4 @@ var handlerComponent = (function() { }; return new (HandlerComponent.extends(abstractHandler)); -}()); \ No newline at end of file +}()); diff --git a/src/handler/module.js b/src/handler/module.js index 02cb10e..dcfcc9a 100644 --- a/src/handler/module.js +++ b/src/handler/module.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, DEMAND_ID, EVENT_PRE_REQUEST, EVENT_POST_REQUEST, TRUE, functionResolveSourcemaps, abstractHandler @@ -22,7 +22,7 @@ var handlerModule = (function() { }, onPreRequest: function(dependency) { var pathname = dependency.url.pathname; - + dependency.url.pathname = pathname.slice(-suffix.length) !== suffix ? pathname + suffix : pathname; }, onPostRequest: function(dependency) { @@ -44,4 +44,4 @@ var handlerModule = (function() { }; return new (HandlerModule.extends(abstractHandler)); -}()); \ No newline at end of file +}()); diff --git a/src/inheritance.js b/src/inheritance.js index 7172391..f5a7dc8 100644 --- a/src/inheritance.js +++ b/src/inheritance.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, TRUE, objectCreate, objectDefineProperty, objectGetOwnPropertyNames, objectGetOwnPropertyDescriptor, ClassDescriptor @@ -10,7 +10,9 @@ //=require class/descriptor.js (function(strPrototype) { - var descriptor; + function objectDefine(name, value, writable, configurable, enumerable) { + objectDefineProperty(this, name, new ClassDescriptor(value, writable, configurable, enumerable)); + } function functionExtends(source) { var self = this, @@ -38,8 +40,9 @@ return self; } - descriptor = new ClassDescriptor(functionExtends); + objectDefine.call(Object.prototype, 'define', objectDefine); + objectDefine.call(global.Object.prototype, 'define', objectDefine); - objectDefineProperty(Function.prototype, 'extends', descriptor); - objectDefineProperty(global.Function.prototype, 'extends', descriptor); + Function.prototype.define('extends', functionExtends); + global.Function.prototype.define('extends', functionExtends); }('prototype')); diff --git a/src/plugin/genie.js b/src/plugin/genie.js index dfefa6d..1b0b8d5 100644 --- a/src/plugin/genie.js +++ b/src/plugin/genie.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, MODULE_PREFIX_PLUGIN, MODULE_PREFIX_HANDLER, EVENT_POST_CONFIGURE, EVENT_PRE_RESOLVE, STRING_STRING, ERROR_RESOLVE, FALSE, TRUE, regexMatchInternal, validatorIsObject, validatorIsTypeOf, @@ -115,4 +115,4 @@ var pluginGenie = (function() { }); return TRUE; -}()); \ No newline at end of file +}()); diff --git a/src/shortcuts.js b/src/shortcuts.js index 91a1e99..547622d 100644 --- a/src/shortcuts.js +++ b/src/shortcuts.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout */ var arrayPrototype = Array.prototype, @@ -12,4 +12,4 @@ var arrayPrototype = Array.prototype, objectDefineProperty = object.defineProperty, objectGetOwnPropertyNames = object.getOwnPropertyNames, objectGetOwnPropertyDescriptor = object.getOwnPropertyDescriptor, - linkElement = document.createElement('a'); \ No newline at end of file + linkElement = document.createElement('a'); diff --git a/src/singleton/cache.js b/src/singleton/cache.js index 70b09ea..887d02b 100644 --- a/src/singleton/cache.js +++ b/src/singleton/cache.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, DEMAND_ID, FUNCTION_EMPTY, EVENT_POST_REQUEST, EVENT_POST_PROCESS, EVENT_CACHE_HIT, EVENT_CACHE_MISS, EVENT_CACHE_EXCEED, EVENT_CACHE_CLEAR, EVENT_PRE_CACHE, EVENT_PRE_CACHE, EVENT_POST_CACHE, STRING_STRING, NULL, FALSE, TRUE, validatorIsTypeOf, functionGetTimestamp, functionEscapeRegex, functionIterate, functionDefer, functionResolveId, functionToArray, diff --git a/src/singleton/event.js b/src/singleton/event.js index b0634bf..5f72328 100644 --- a/src/singleton/event.js +++ b/src/singleton/event.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, NULL, STRING_STRING, STRING_FUNCTION, EVENT_POST_CONFIGURE, validatorIsTypeOf, functionToArray diff --git a/src/validator/isArray.js b/src/validator/isArray.js index 5892515..b7923e0 100644 --- a/src/validator/isArray.js +++ b/src/validator/isArray.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, objectPrototypeToString */ @@ -17,4 +17,4 @@ function validatorIsArray(value) { return objectPrototypeToString.call(value) === '[object Array]'; -} \ No newline at end of file +} diff --git a/src/validator/isObject.js b/src/validator/isObject.js index 473d2d3..2ee6059 100644 --- a/src/validator/isObject.js +++ b/src/validator/isObject.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, STRING_OBJECT, validatorIsTypeOf */ @@ -19,4 +19,4 @@ function validatorIsObject(object) { return object && validatorIsTypeOf(object, STRING_OBJECT); -} \ No newline at end of file +} diff --git a/src/validator/isPositive.js b/src/validator/isPositive.js index 7570f94..ec48701 100644 --- a/src/validator/isPositive.js +++ b/src/validator/isPositive.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, STRING_NUMBER, validatorIsTypeOf */ @@ -19,4 +19,4 @@ function validatorIsPositive(value) { return validatorIsTypeOf(value, STRING_NUMBER) && isFinite(value) && Math.floor(value) === value && value >= 0; -} \ No newline at end of file +} diff --git a/src/validator/isTypeOf.js b/src/validator/isTypeOf.js index 544f8e0..a71b4f6 100644 --- a/src/validator/isTypeOf.js +++ b/src/validator/isTypeOf.js @@ -1,5 +1,5 @@ /* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout */ /** @@ -15,4 +15,4 @@ function validatorIsTypeOf(object, type) { return typeof object === type; -} \ No newline at end of file +} diff --git a/src/variables.js b/src/variables.js index 2c2b603..4faa268 100644 --- a/src/variables.js +++ b/src/variables.js @@ -1,5 +1,5 @@ -/* global - global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage, +/* global + global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, DEMAND_ID, PROVIDE_ID, PATH_ID, functionEscapeRegex, functionResolveUrl */ @@ -8,9 +8,9 @@ //=require function/escapeRegex.js //=require function/resolveUrl.js -var regexIsAbsoluteUri = /^(http(s?):)?\/\//i, - regexIsAbsolutePath = /^\//, - regexMatchSourcemap = /((?:\/\/|\/\*)#)\s*(sourceMappingURL)\s*=\s*(?!(?:http[s]?:)?\/\/)(.+?)\.map(?:\s+)?(\*\/)?/g, - regexMatchBaseUrl = new RegExp('^' + functionEscapeRegex(functionResolveUrl('/'))), - regexMatchInternal = new RegExp('^' + DEMAND_ID + '|' + PROVIDE_ID + '|' + PATH_ID + '$'), - regexMatchParameter = /^(mock:)?([+-])?((?:[-\w]+\/?)+)?(?:@(.+?))?(?:#(\d+))?!/; \ No newline at end of file +var regexIsAbsoluteUri = /^(http(s?):)?\/\//i, + regexIsAbsolutePath = /^\//, + regexMatchSourcemap = /((?:\/\/|\/\*)#)\s*(sourceMappingURL)\s*=\s*(?!(?:http[s]?:)?\/\/)(.+?)\.map(?:\s+)?(\*\/)?/g, + regexMatchBaseUrl = new RegExp('^' + functionEscapeRegex(functionResolveUrl('/'))), + regexMatchInternal = new RegExp('^' + DEMAND_ID + '|' + PROVIDE_ID + '|' + PATH_ID + '$'), + regexMatchParameter = /^(mock:)?([+-])?((?:[-\w]+\/?)+)?(?:@(.+?))?(?:#(\d+))?!/; From 4c52cf5bc37bd461caba91ceaf6aed0801a67280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20L=C3=BCth?= Date: Thu, 8 Feb 2018 13:38:19 +0100 Subject: [PATCH 9/9] bump & build --- dist/cache/dispose.js | 2 +- dist/demand.js | 4 ++-- dist/demand.js.map | 2 +- dist/handler/css.js | 2 +- dist/handler/html.js | 2 +- dist/handler/json.js | 2 +- dist/handler/legacy.js | 2 +- dist/handler/text.js | 2 +- dist/plugin/cookie.js | 2 +- dist/plugin/lzstring.js | 2 +- dist/plugin/sri.js | 2 +- package.json | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dist/cache/dispose.js b/dist/cache/dispose.js index 4e14fb9..95e8954 100644 --- a/dist/cache/dispose.js +++ b/dist/cache/dispose.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.7 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ !function(t){"use strict";provide(["/demand/function/iterate"],function(n){var r="demand",e="state",a=new RegExp("^\\["+r+"\\]\\[(.+?)\\]\\["+e+"\\]$"),c=/^(.+?),(\d+),(\d*),(.+?),(\d+)$/;function i(n){var r,e=t.getItem(n);if(e&&(r=e.match(c)))return Array.prototype.slice.call(r,1)}function o(t){return"["+r+"]["+t+"]["+e+"]"}function u(t){var n,r=t.match(a);r&&((n=i(o(r[1])))[5]=r[1],this.push(n))}function d(t,n){return t[4]n[4]?1:0}return n(t,function(t){var n=t.match(a);n&&(i(o(n[1]))[4]||demand.clear.path(n[1]))}),function(r){var e,a=[];for(n(t,u,a),a.sort(d);r>0&&a.length;)r-=(e=a.shift())[1],demand.clear.path(e[5])}})}(localStorage); //# sourceMappingURL=dispose.js.map diff --git a/dist/demand.js b/dist/demand.js index 2adf2a6..278f2bb 100644 --- a/dist/demand.js +++ b/dist/demand.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.7 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ -!function(e,t,n){"use strict";var r,i,o,u,a=e.document,c="demand"in e&&e.demand,s={version:"1.0.0",cache:{},timeout:8e3,pattern:{},modules:{},handler:"module"},f={},l="demand",d="/demand/",h=d+"abstract/",p=d+"handler/",v=d+"plugin/",m=d+"function/",g=d+"validator/",y="mock:",w=null,x=void 0,b=!1,q=!0,j="undefined",R="string",k="object",P="function",E="number",C=function(){},S="preConfigure",M="postConfigure",O="cache",A=O+"Miss",$=O+"Exceed",T="preResolve",H="postResolve",D="preRequest",I="postRequest",N="preProcess",L="postProcess",_="queueEnqueue",F="error loading",U="error resolving",X=Array.prototype,B=X.slice,G=X.concat,J=Object,z=J.prototype.toString,K=J.create,Q=J.defineProperty,V=J.getOwnPropertyNames,W=J.getOwnPropertyDescriptor,Y=a.createElement("a");function Z(e,t,n,r){return{__proto__:w,value:e,enumerable:!!r,configurable:!!n,writable:!!t}}function ee(e,t){return typeof e===t}function te(e){return e&&ee(e,k)}function ne(e){return ee(e,E)&&isFinite(e)&&Math.floor(e)===e&&e>=0}function re(e,t){return e instanceof t}function ie(e,t,n){for(var r,i=J.keys(e),o=0;(r=i[o])!==x&&t.call(n,r,e[r])!==b;o++);return n}!function(t){var n;n=new Z(function(e){for(var n,r=this[t],i=V(r),o={constructor:new Z(this,q,q)},u=0;(n=i[u])&&!o[n];u++)o[n]=W(r,n);try{this[t]=K(e[t]||e,o)}catch(e){}if(this[t]===r)throw new TypeError("Unable to extend, prototype is not writable");return this}),Q(Function.prototype,"extends",n),Q(e.Function.prototype,"extends",n)}("prototype");var oe,ue,ae,ce=function(){function e(e,t){var n,r=this[e];t!==x&&(te(t)?(n=te(r),r=t.length!==x?n&&r.length!==x?r:[]:n&&r.length===x?r:{},this[e]=ce(r,t)):this[e]=t)}return function(){for(var t,n=arguments[0],r=1;(t=arguments[r])!==x;r++)ie(t,e,n);return n}}(),se=function(){var e=new RegExp("[xy]","g"),t={};function n(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}return function(){var r;do{r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(e,n)}while(t[r]);return t[r]=1,r}}(),fe=(ae="setImmediate"in e,"MutationObserver"in e?function(e){oe=a.createElement("div"),new MutationObserver(function(){e()}).observe(oe,{attributes:q}),oe.setAttribute("i","1")}:!ae&&"postMessage"in e&&!("importScripts"in e)&&"addEventListener"in e?(e.addEventListener("message",function(t){t.source===e&&t.data&&f[t.data]&&(f[t.data](),delete f[t.data])},b),function(t){var n=se();f[n]=t,e.postMessage(n,"*")}):!ae&&"onreadystatechange"in(oe=a.createElement("script"))?function(e){oe.onreadystatechange=function(){oe.onreadystatechange=w,oe.parentNode.removeChild(oe),e()},a.body.appendChild(oe)}:(ue=ae?setImmediate:t,function(e){ue(e)}));function le(e,t,n){return B.call(e,t,n)}var de=function(){var e="on",t=/^cache(Miss|Hit|Clear|Exceed)|queue(En|De)queue|(pre|post)(Resolve|Configure|Request|Process|Cache)$/,n={};function r(r,i,o){var u,a;if(ee(i,R)&&ee(o,P))for(i=i.split(" ");u=i.shift();)u=u.split(":"),t.test(u[0])&&((n[u[0]]||(n[u[0]]={on:[],after:[]}))[r].push({callback:o,filter:u[1]}),r===e&&u[0]===M&&(a=s.modules[u[1]])&&o(a))}function i(){}return i.prototype={emit:function(t,r){var i,o,u,a=n[t];if(a){for(i=le(arguments,2),o=0;u=a[e][o];o++)u.filter&&u.filter!==r||u.callback.apply(w,i);for(o=0;u=a.after[o];o++)u.filter&&u.filter!==r||u.callback.apply(w,i)}return this},on:function(t,n){return r(e,t,n),this},after:function(e,t){return r("after",e,t),this}},new i}();function he(){return+new Date}var pe,ve=(pe=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,function(e){return e.replace(pe,"\\$&")});function me(e){return Y.href=e,Y.href}var ge=/^(http(s?):)?\/\//i,ye=/^\//,we=/((?:\/\/|\/\*)#)\s*(sourceMappingURL)\s*=\s*(?!(?:http[s]?:)?\/\/)(.+?)\.map(?:\s+)?(\*\/)?/g,xe=new RegExp("^"+ve(me("/"))),be=new RegExp("^demand|provide|path$"),qe=/^(mock:)?([+-])?((?:[-\w]+\/?)+)?(?:@(.+?))?(?:#(\d+))?!/;function je(e,t){var n=e.replace(qe,"");return ye.test(n)||ge.test(n)||(n="/"+me((t&&me(t+"/../")||"/")+n).replace(xe,"")),n}function Re(e,t){var n=e.match(qe);return(n&&n[1]?"mock:":"")+(n&&n[3]||s.handler)+"!"+je(e,t)}var ke=function(){var t,n="[demand]",i="[state]",o=new RegExp("^"+ve(n)+"\\[(.+?)\\]"+ve(i)+"$"),u=/^(.+?),(\d+),(\d*),(.+?),(\d+)$/,a=function(){try{return"localStorage"in e&&e.localStorage}catch(e){return b}}(),c=a?e.localStorage:w,f=a&&"remainingSpace"in c,l={};function d(e){var t;return e.cache!==w?e.cache:(ie(s.cache,function(n,r){0===e.path.indexOf(n)&&(!t||r.weight>t.weight)&&(t=r)}),t?t.state:b)}function h(e){return c.getItem(e)}function p(e,t){c[t?"setItem":"removeItem"](e,t)}function v(e){var t,n=h(e);if(n&&(t=n.match(u)))return le(t,1)}function m(e,t){t[4]=he(),p(e,t.join(","))}function g(e,t,n){de.emit(e,t.id,t,n)}function y(){fe(this.clear.expired.bind(this.clear))}return de.on(A,function(e){fe(function(){t.clear.path(e.id)})}).on($,function(e){r("-!/demand/cache/dispose").then(function(n){fe(function(){n(e.source.length),t.set(e)})})}).on(I,function(e){e.source&&d(e)&&(l[e.id]=q)}).after(L,function(e){l[e.id]&&fe(function(){t.set(e)})}),y.prototype={get:a?function(e){var t,r;if(d(e)){if(t=n+"["+e.id+"]",!(r=v(t+i)))return;return r[0]!==e.version||r[2]&&e.lifetime&&r[2]<=he()?void(e.invalid=!0):(e.source=h(t+"[value]"),fe(function(){m(t+i,r)}),q)}}:C,resolve:a?function(e){this.get(e)?g("cacheHit",e):g(A,e)}:function(e){g(A,e)},set:a?function(e){var t,o,u;if(d(e)){t=[e.version,e.source.length,e.lifetime?he()+e.lifetime:w,r.version],o=n+"["+e.id+"]",g("preCache",e,t);try{if(u=f?c.remainingSpace:w,p(o+"[value]",e.source),m(o+i,t),u!==w&&c.remainingSpace===u)throw new Error;g("postCache",e,t)}catch(t){g($,e)}}}:C,clear:{path:a?function(e){var t=Re(e),r=n+"["+t+"]";h(r+i)&&(p(r+i),p(r+"[value]"),g("cacheClear",Me.get(t)||new Me(t,w,b)))}:C,all:a?function(){var e;ie(c,function(t){(e=t.match(o))&&this.path(e[1])},this)}:C,expired:a?function(){var e,t,r=this;ie(c,function(u){(e=u.match(o))&&(t=v(n+"["+e[1]+"]"+i))&&t[2]>0&&t[2]<=he()&&r.path(e[1])},this)}:C}},t=new y}();function Pe(){return ee(this.uuid,j)&&Q(this,"uuid",new Z(se())),this}var Ee=function(){var e="pending",t="resolved",n="rejected",r={};function i(e,t,n){e.then(function(){n.resolved[t]=le(arguments),n.count++,o(n)},function(){n.rejected.push(le(arguments)),o(n)})}function o(e){e.count===e.total?e.dfd.resolve.apply(w,G.apply([],e.resolved)):e.rejected.length+e.count===e.total&&e.dfd.reject.apply(w,G.apply([],e.rejected))}function u(i){var o=Pe.call(this);return r[o.uuid]={state:e,handle:function(i,o){var u,a,c=r[this.uuid];for(c.state===e&&(c.state=i,c.value=o);u=c[c.state].shift();)(a=u.handler.apply(w,c.value))&&"function"==typeof a.then?a.then(u.dfd.resolve,u.dfd.reject):u.dfd[c.state===t?"resolve":"reject"].apply(w,c.value);c[t].length=0,c[n].length=0}.bind(o),value:w,resolved:[],rejected:[],count:0},i(function(){r[this.uuid].handle(t,arguments)}.bind(o),function(){r[this.uuid].handle(n,arguments)}.bind(o)),o}return u.prototype={catch:function(e){return this.then(C,e)},always:function(e){return this.then(e,e)},then:function(i,o){var a=r[this.uuid],c=u.defer();return i&&a[t].push({handler:i,dfd:c}),o&&a[n].push({handler:o,dfd:c}),a.state!==e&&fe(a.handle),c.pledge},isPending:function(){return r[this.uuid].state===e},isResolved:function(){return r[this.uuid].state===t},isRejected:function(){return r[this.uuid].state===n}},u.defer=function(){var e={};return e.pledge=new u(function(t,n){e.resolve=t,e.reject=n}),e},u.all=function(e){var t,n,o=u.defer(),a=0;if(e.length)for(t=r[se()]={dfd:o,resolved:[],rejected:[],total:e.length,count:0};n=e[a];a++)i(n,a,t);else o.resolve();return o.pledge},u.race=function(e){for(var t,n=u.defer(),r=0;t=e[r];r++)t.then(n.resolve,n.reject);return e.length||n.resolve(),n.pledge},u.extends(Pe)}();function Ce(){var e=Pe.call(this);return f[e.uuid]={},e}function Se(e,t,n){return this.message=e,t&&(this.module=t),n&&(this.stack=le(n)),this}Ce.prototype={get:function(e){return e?f[this.uuid][e]:f[this.uuid]},set:function(e,t){f[this.uuid][e]=t},remove:function(e){delete f[this.uuid][e]}},Ce.extends(Pe),Se.prototype={toString:function(){var e=l+": "+this.message+" "+(this.module?'"'+this.module+'"':"");return this.stack&&(e=Se.traverse(this.stack,e,1)),e}},Se.traverse=function(e,t,n){for(var r,i=new Array(n+1).join(" "),o=0;r=e[o];o++)t+="\n"+i+"> "+r.message+" "+(r.module?'"'+r.module+'"':""),r.stack&&(t=Se.traverse(r.stack,t,n+1));return t};var Me=function(){var e=new Ce,t=[];function n(e,t){this[e]=t}function o(e,t){t.pledge.isPending()&&this.push(e)}function u(e,t){t.pledge.isResolved()&&this.push(e)}function c(e,t){t.pledge.isRejected()&&this.push(e)}function f(n,r,i){var o=this,u=n.match(qe)||t;return o.path=je(n,r),o.mock=u[1]?q:b,o.cache=u[2]?"+"===u[1]:w,o.type=u[3]||s.handler,o.version=u[4]||s.version,o.lifetime=u[5]&&1e3*u[5]||s.lifetime,o.id=(o.mock?y:"")+o.type+"!"+o.path,o.uri=(o.mock?y:"")+o.type+"@"+o.version+(ne(o.lifetime)&&o.lifetime>0?"#"+o.lifetime:"")+"!"+o.path,o.dfd=Ee.defer(),o.pledge=o.dfd.pledge,o.invalid=!1,o.pledge.then(function(){o.value=le(arguments)}),i!==b&&e.set(o.id,o),o}return f.prototype={enqueue:!0},f.get=function(t,n){return e.get(Re(t,n))},f.resolve=function(e,t){var o,u=t&&be.test(e),a=u?this.get("internal!"+t+"/"+e):this.get(e,t);if(!a)if(u){switch(a=new f("internal!"+t+"/"+e),e){case l:o=ie(r,n,r.bind(t));break;case"provide":o=i.bind(t);break;case"path":o=t}a.dfd.resolve(o)}else a=new f(e,t),r(p+a.type).then(function(e){a.handler=e,a.mock?a.dfd.resolve(e):ke.resolve(a)},function(){a.dfd.reject(new Se(F+" (handler)",self.id))});return a},f.remove=function(t,n,r){var i=Re(t,n),o=a.querySelector('[demand-id="'+i+'"]');e.remove(i),e.remove(y+i),o&&o.parentNode.removeChild(o),r!==b&&ke.clear.path(i)},f.list={all:function(){return J.keys(e.get())},pending:function(){return ie(e.get(),o,[])},resolved:function(){return ie(e.get(),u,[])},rejected:function(){return ie(e.get(),c,[])}},f}(),Oe=function(){var e=/(.+)\/$/;function t(t,n){this[t]={url:me(n).replace(e,"$1"),match:new RegExp("^"+ve(n))}}function n(e,n){this.weight=e.length,this.match=new RegExp("^"+ve(e)),this.location=[].concat(n),ie(this.location,t,this.location)}return n.prototype={matches:function(e){return this.match.test(e)},process:function(e,t){var n=this.location[t];if(n)return e.replace(this.match,n.url)}},n}(),Ae=function(r){var i="XDomainRequest"in e&&e.XDomainRequest||r;return function(e){var o,u=Ee.defer(),a=xe.test(e)?new r:new i,c=function(){this.readyState<4&&this.abort()}.bind(a),f=s.timeout;return a.ontimeout=a.onerror=a.onabort=function(){u.reject(a.status)},a.onprogress=a.onreadystatechange=function(){n(o),o=t(c,f)},a.onload=function(){o=n(o),"status"in a&&200!==a.status?u.reject(a.status):u.resolve(a.responseText,a.getResponseHeader&&a.getResponseHeader("content-type"))},a.open("GET",e,q),a.send(),o=t(c,f),u.pledge}}(XMLHttpRequest),$e=/^(?:\?|)$/;function Te(e){return"[object Array]"===z.call(e)}function He(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return t>>>0}function De(){var e=Pe.call(this);return f[e.uuid]=[],e}function Ie(e){var t=Pe.call(this),n=f[t.uuid]={queue:e,current:w};return r.on(_+":"+e.uuid,function(){!n.current&&t.process()}),t}function Ne(e,t){for(var n,r;n=we.exec(t);)Y.href=e,ge.test(n[2])?r=Y.protocol+"//"+Y.host+n[3]:(Y.pathname+="/../"+n[3],r=Y.protocol+"//"+Y.host+Y.pathname),t=t.replace(n[0],n[1]+" "+n[2]+"="+r+".map"+(n[4]?" "+n[4]:""));return t}r=e.demand=function(){function t(e,t){this[e]={weight:e.length,state:t}}function n(e,t){"base"!==e&&(this[e]=new Oe(e,t))}function r(e,t){var n=this[e]=this[e]||{};de.emit(S,e,n),ce(n,t),de.emit(M,e,n)}function i(){var t,n,r=le(arguments),i=this!==e?this:w,o=0;for(de.emit(T,w,r,i);t=r[o];o++)ee(t,R)?r[o]=Me.resolve(t,i).pledge:(r[o]=(n=Ee.defer()).pledge,n.resolve(t));return(r.length>1?Ee.all(r):r[0]).always(function(){de.emit(H,w,r,i)})}return i.configure=function(e){var o=e.cache,u=e.version,a=e.timeout,c=e.lifetime,f=e.base,l=e.pattern,d=e.modules,h=s.modules;return ee(o,"boolean")?s.cache[""]={weight:0,state:o}:te(o)&&ie(o,t,s.cache),ee(u,R)&&(s.version=u),ne(a)&&(s.timeout=1e3*Math.min(Math.max(a,2),12)),ne(c)&&c>0&&(s.lifetime=1e3*c),ee(f,R)&&""!==f&&(s.pattern.base=new Oe("",f)),te(l)&&ie(l,n,s.pattern),te(d)&&ie(d,r,h),i},i.version="4.2.7",i.on=de.on.bind(i),i.get=function(e,t){var n=Me.get(e,t);return n&&n.value},i.remove=Me.remove,i.list=Me.list,i.clear=ke.clear,de.after(A,function(e){new function(e){var t;function n(t,n){n&&e.handler.validate&&!e.handler.validate(n)?e.dfd.reject(new Se(F+" (content-type)",e.id)):(e.source=t,de.emit(I,e.type,e))}function r(t){e.dfd.reject(new Se(F+(t?" (status)":""),e.id))}ge.test(e.path)||ie(s.pattern,function(n,r){r.matches(e.path)&&(!t||t.weight "+r.message+" "+(r.module?'"'+r.module+'"':""),r.stack&&(t=Se.traverse(r.stack,t,n+1));return t};var Fe=function(){var e=p+"bundle",t={};function n(e,t){var n,r;for(n=0;r=t[n];n++)ee(r,R)&&(t[n]=Re(r))}function i(){}return r.on(M+":"+e,function(e){te(e)&&ie(t=e,n)}),i.prototype={validate:_e.validate,onPreProcess:function(e){var n,r,i,u,a,c=e.source,s=e.dfd,f=t[e.path];function l(){s.reject(new Se(U,e.id,arguments))}if(e.enqueue=b,f&&(n=function(e){for(var n,r,i=0;r=e[i];i++)if(r=(r=r.match(qe))&&r[3]||t.handler,n){if(r!==n)return b}else n=r;return n}(f))){for(;r=we.exec(c);)c=c.replace(r[0],"");for(e.source=c,i=[],a=0;u=f[a];a++)i.push(Me.resolve(y+u).pledge);Ee.all(i).then(function(){for(i.length=0,a=0;u=f[a];a++)(u=f[a]=Me.get(u)||new Me(u)).handler=arguments[a],i.push(u.pledge);"module"===n?(o.enqueue.apply(o,f),_e.process(e)):(_e.process(e),o.enqueue.apply(o,f)),Ee.all(i).then(s.resolve,l)},l)}else l()}},new(i.extends(Le))}(),Ue=function(){var e=/^text\/.+$/;function t(){}return t.prototype={validate:function(t){return e.test(t)},onPreRequest:function(e){var t=e.url.pathname;e.url.pathname=".html"!==t.slice(-".html".length)?t+".html":t},onPostRequest:function(e){e.source=Ne(e.url,e.source)},onPreProcess:function(e){var t,n,r,i,u=e.path,c=e.dfd,s=a.createElement("body"),f=[],l=[];function d(){c.reject(new Se(U,e.id,arguments))}for(e.enqueue=b,s.innerHTML=e.source;t=s.firstElementChild;)(n=t.getAttribute("type"))&&(i=n+"!"+u+((r=t.getAttribute("path"))?"/"+r:""),t.parentNode.removeChild(t),f.push({source:t.textContent,uri:i}),l.push(Me.resolve("mock:"+i).pledge));Ee.all(l).then(function(){var e,t,n=0;for(l.length=0;e=f[n];n++)(t=Me.get(e.uri)||new Me(e.uri)).source=Ne(t.url,e.source),t.handler=arguments[n],l.push(t.pledge),o.enqueue(t);Ee.all(l).then(c.resolve,d)},d)}},new(t.extends(Le))}(),Xe=function(){var e=v+"genie",t=[];function n(e){for(var n,r,i=0;n=t[i];i++)0===e.indexOf(n.prefix)&&(!r||n.weight>r.weight)&&(r=n);return r}function i(e,n){t.push({prefix:e,weight:e.length,fn:n})}function o(t,n){var i,o=n.matches,u=0;if(o.length>1){for(n.id=e+"/"+He(JSON.stringify(n.matches));i=o[u];u++)o[u]=new Me(i.uri);r.configure(function(e){var t,n,r=e.matches,i={pattern:{},modules:{"/demand/handler/bundle":{}}},o=0;for(i.pattern[e.id]=e.fn(r),i.modules[p+"bundle"][e.id]=t=[];n=r[o];o++)t.push(n.path);return i}(n)),r("bundle!"+n.id).then(function(){for(var e,t=0;e=this[t];t++)e.dfd.resolve(arguments[t])}.bind(o),function(){for(var e,t=0;e=this[t];t++)e.dfd.reject(new Se(U,e.id))}.bind(o))}}return r.on(M+":"+e,function(e){te(e)&&(t.length=0,ie(e,i))}).on(T,function(e,t){for(var r,i,u={},a=0;r=e[a];a++)!ee(r,R)||be.test(r)||Me.get(r,t)||"module"===(r=new Me(r,t,b)).type&&(i=n(r.path))&&!ke.get(r)&&(u[i.prefix]||(u[i.prefix]={fn:i.fn,matches:[]})).matches.push(r);ie(u,o)}),q}();function Be(e,t){i(e,function(){return t})}if(o=new De,u=new Ie(o),Be(h+"uuid",Pe),Be(h+"handler",Le),Be(p+"module",_e),Be(p+"bundle",Fe),Be(p+"component",Ue),Be(v+"genie",Xe),Be(g+"isTypeOf",ee),Be(g+"isArray",Te),Be(g+"isObject",te),Be(g+"isInstanceOf",re),Be(m+"resolveUrl",me),Be(m+"resolveSourcemaps",Ne),Be(m+"merge",ce),Be(m+"iterate",ie),Be(m+"hash",He),Be(m+"defer",fe),Be(m+"uuid",se),Be(d+"descriptor",Z),Be(d+"pledge",Ee),Be(d+"queue",De),Be(d+"xhr",Ae),Be(d+"failure",Se),c&&c.main)switch(typeof c.main){case R:r(c.main);break;case P:i("main",c.main())}}("demand-loader"===this.name?parent:this,setTimeout,clearTimeout); +/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +!function(e,t,n){"use strict";var r,i,o,u,a=e.document,s="demand"in e&&e.demand,c={version:"1.0.0",cache:{},timeout:8e3,pattern:{},modules:{},handler:"module"},f="demand",l="/demand/",h=l+"abstract/",d=l+"handler/",p=l+"plugin/",v=l+"function/",g=l+"validator/",m="mock:",y=null,w=void 0,x=!1,b=!0,q="undefined",j="string",k="object",R="function",P="number",E=function(){},C="preConfigure",M="postConfigure",S="cache",O=S+"Miss",A=S+"Exceed",$="preResolve",T="postResolve",H="preRequest",D="postRequest",I="preProcess",N="postProcess",L="queueEnqueue",_="error loading",F="error resolving",U=Array.prototype,X=U.slice,W=U.concat,B=Object,G=B.prototype.toString,J=B.create,z=B.defineProperty,K=B.getOwnPropertyNames,Q=B.getOwnPropertyDescriptor,V=a.createElement("a");function Y(e,t,n,r){return{__proto__:y,value:e,enumerable:!!r,configurable:!!n,writable:!!t}}function Z(e,t){return typeof e===t}function ee(e){return e&&Z(e,k)}function te(e){return Z(e,P)&&isFinite(e)&&Math.floor(e)===e&&e>=0}function ne(e,t){return e instanceof t}function re(e,t,n){for(var r,i=B.keys(e),o=0;(r=i[o])!==w&&t.call(n,r,e[r])!==x;o++);return n}!function(t){function n(e,t,n,r,i){z(this,e,new Y(t,n,r,i))}function r(e){for(var n,r=this[t],i=K(r),o={constructor:new Y(this,b,b)},u=0;(n=i[u])&&!o[n];u++)o[n]=Q(r,n);try{this[t]=J(e[t]||e,o)}catch(e){}if(this[t]===r)throw new TypeError("Unable to extend, prototype is not writable");return this}n.call(Object.prototype,"define",n),n.call(e.Object.prototype,"define",n),Function.prototype.define("extends",r),e.Function.prototype.define("extends",r)}("prototype");var ie,oe,ue,ae,se=function(){function e(e,t){var n,r=this[e];t!==w&&(ee(t)?(n=ee(r),r=t.length!==w?n&&r.length!==w?r:[]:n&&r.length===w?r:{},this[e]=se(r,t)):this[e]=t)}return function(){for(var t,n=arguments[0],r=1;(t=arguments[r])!==w;r++)re(t,e,n);return n}}(),ce=function(){var e=new RegExp("[xy]","g");function t(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(e,t)}}(),fe=(ae="setImmediate"in e,"MutationObserver"in e?function(e){oe=a.createElement("div"),new MutationObserver(function(){e()}).observe(oe,{attributes:b}),oe.setAttribute("i","1")}:!ae&&"postMessage"in e&&!("importScripts"in e)&&"addEventListener"in e?(ie={},e.addEventListener("message",function(t){var n;t.source===e&&t.data&&(n=ie[t.data])&&(n(),delete ie[t.data])},x),function(t){var n=ce();ie[n]=t,e.postMessage(n,"*")}):!ae&&"onreadystatechange"in(oe=a.createElement("script"))?function(e){oe.onreadystatechange=function(){oe.onreadystatechange=y,oe.parentNode.removeChild(oe),e()},a.body.appendChild(oe)}:(ue=ae?setImmediate:t,function(e){ue(e)}));function le(e,t,n){return X.call(e,t,n)}var he=function(){var e="on",t=/^cache(Miss|Hit|Clear|Exceed)|queue(En|De)queue|(pre|post)(Resolve|Configure|Request|Process|Cache)$/,n={};function r(r,i,o){var u,a;if(Z(i,j)&&Z(o,R))for(i=i.split(" ");u=i.shift();)u=u.split(":"),t.test(u[0])&&((n[u[0]]||(n[u[0]]={on:[],after:[]}))[r].push({callback:o,filter:u[1]}),r===e&&u[0]===M&&(a=c.modules[u[1]])&&o(a))}function i(){}return i.prototype={emit:function(t,r){var i,o,u,a=n[t];if(a){for(i=le(arguments,2),o=0;u=a[e][o];o++)u.filter&&u.filter!==r||u.callback.apply(y,i);for(o=0;u=a.after[o];o++)u.filter&&u.filter!==r||u.callback.apply(y,i)}return this},on:function(t,n){return r(e,t,n),this},after:function(e,t){return r("after",e,t),this}},new i}();function de(){return+new Date}var pe,ve=(pe=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,function(e){return e.replace(pe,"\\$&")});function ge(e){return V.href=e,V.href}var me=/^(http(s?):)?\/\//i,ye=/^\//,we=/((?:\/\/|\/\*)#)\s*(sourceMappingURL)\s*=\s*(?!(?:http[s]?:)?\/\/)(.+?)\.map(?:\s+)?(\*\/)?/g,xe=new RegExp("^"+ve(ge("/"))),be=new RegExp("^demand|provide|path$"),qe=/^(mock:)?([+-])?((?:[-\w]+\/?)+)?(?:@(.+?))?(?:#(\d+))?!/;function je(e,t){var n=e.replace(qe,"");return ye.test(n)||me.test(n)||(n="/"+ge((t&&ge(t+"/../")||"/")+n).replace(xe,"")),n}function ke(e,t){var n=e.match(qe);return(n&&n[1]?"mock:":"")+(n&&n[3]||c.handler)+"!"+je(e,t)}var Re=function(){var t,n="[demand]",i="[state]",o=new RegExp("^"+ve(n)+"\\[(.+?)\\]"+ve(i)+"$"),u=/^(.+?),(\d+),(\d*),(.+?),(\d+)$/,a=function(){try{return"localStorage"in e&&e.localStorage}catch(e){return x}}(),s=a?e.localStorage:y,f=a&&"remainingSpace"in s,l={};function h(e){var t;return e.cache!==y?e.cache:(re(c.cache,function(n,r){0===e.path.indexOf(n)&&(!t||r.weight>t.weight)&&(t=r)}),t?t.state:x)}function d(e){return s.getItem(e)}function p(e,t){s[t?"setItem":"removeItem"](e,t)}function v(e){var t,n=d(e);if(n&&(t=n.match(u)))return le(t,1)}function g(e,t){t[4]=de(),p(e,t.join(","))}function m(e,t,n){he.emit(e,t.id,t,n)}function w(){fe(this.clear.expired.bind(this.clear))}return he.on(O,function(e){fe(function(){t.clear.path(e.id)})}).on(A,function(e){r("-!/demand/cache/dispose").then(function(n){fe(function(){n(e.source.length),t.set(e)})})}).on(D,function(e){e.source&&h(e)&&(l[e.id]=b)}).after(N,function(e){l[e.id]&&fe(function(){t.set(e)})}),w.prototype={get:a?function(e){var t,r;if(h(e)){if(t=n+"["+e.id+"]",!(r=v(t+i)))return;return r[0]!==e.version||r[2]&&e.lifetime&&r[2]<=de()?void(e.invalid=!0):(e.source=d(t+"[value]"),fe(function(){g(t+i,r)}),b)}}:E,resolve:a?function(e){this.get(e)?m("cacheHit",e):m(O,e)}:function(e){m(O,e)},set:a?function(e){var t,o,u;if(h(e)){t=[e.version,e.source.length,e.lifetime?de()+e.lifetime:y,r.version],o=n+"["+e.id+"]",m("preCache",e,t);try{if(u=f?s.remainingSpace:y,p(o+"[value]",e.source),g(o+i,t),u!==y&&s.remainingSpace===u)throw new Error;m("postCache",e,t)}catch(t){m(A,e)}}}:E,clear:{path:a?function(e){var t=ke(e),r=n+"["+t+"]";d(r+i)&&(p(r+i),p(r+"[value]"),m("cacheClear",Se.get(t)||new Se(t,y,x)))}:E,all:a?function(){var e;re(s,function(t){(e=t.match(o))&&this.path(e[1])},this)}:E,expired:a?function(){var e,t,r=this;re(s,function(u){(e=u.match(o))&&(t=v(n+"["+e[1]+"]"+i))&&t[2]>0&&t[2]<=de()&&r.path(e[1])},this)}:E}},t=new w}(),Pe="WeakMap"in e?e.WeakMap:function(){var e="weakmap-";function t(e,t){var n;if((n=t[e.id])&&n[0]===t)return n}function n(){this.define("id",e+ce())}return n.prototype={set:function(e,n){var r=t(this,e);return r?r[1]=n:e.define(this.id,[e,n]),this},get:function(e){var n=t(this,e);if(n)return n[1]},delete:function(e){var n=t(this,e);n&&(n.length=0,delete e[this.id])},has:function(e){return!!t(this,e)}},n}(),Ee=function(){var e="pending",t="resolved",n="rejected",r=new Pe;function i(e,t,n){e.then(function(){n.resolved[t]=le(arguments),n.count++,o(n)},function(){n.rejected.push(le(arguments)),o(n)})}function o(e){e.count===e.total?e.dfd.resolve.apply(y,W.apply([],e.resolved)):e.rejected.length+e.count===e.total&&e.dfd.reject.apply(y,W.apply([],e.rejected))}function u(i){return r.set(this,{state:e,handle:function(i,o){var u,a,s=r.get(this);for(s.state===e&&(s.state=i,s.value=o);u=s[s.state].shift();)(a=u.handler.apply(y,s.value))&&"function"==typeof a.then?a.then(u.dfd.resolve,u.dfd.reject):u.dfd[s.state===t?"resolve":"reject"].apply(y,s.value);s[t].length=0,s[n].length=0}.bind(this),value:y,resolved:[],rejected:[],count:0}),i(function(){r.get(this).handle(t,arguments)}.bind(this),function(){r.get(this).handle(n,arguments)}.bind(this)),this}return u.prototype={catch:function(e){return this.then(E,e)},always:function(e){return this.then(e,e)},then:function(i,o){var a=r.get(this),s=u.defer();return i&&a[t].push({handler:i,dfd:s}),o&&a[n].push({handler:o,dfd:s}),a.state!==e&&fe(a.handle),s.pledge},isPending:function(){return r.get(this).state===e},isResolved:function(){return r.get(this).state===t},isRejected:function(){return r.get(this).state===n}},u.defer=function(){var e={};return e.pledge=new u(function(t,n){e.resolve=t,e.reject=n}),e},u.all=function(e){var t,n,r=u.defer(),o=0;if(e.length)for(t={dfd:r,resolved:[],rejected:[],total:e.length,count:0};n=e[o];o++)i(n,o,t);else r.resolve();return r.pledge},u.race=function(e){for(var t,n=u.defer(),r=0;t=e[r];r++)t.then(n.resolve,n.reject);return e.length||n.resolve(),n.pledge},u}(),Ce=function(){var e=new Pe;function t(){e.set(this,{})}return t.prototype={get:function(t){return t?e.get(this)[t]:e.get(this)},set:function(t,n){e.get(this)[t]=n},remove:function(t){delete e.get(this)[t]}},t}();function Me(e,t,n){return this.message=e,t&&(this.module=t),n&&(this.stack=le(n)),this}Me.prototype={toString:function(){var e=f+": "+this.message+" "+(this.module?'"'+this.module+'"':"");return this.stack&&(e=Me.traverse(this.stack,e,1)),e}},Me.traverse=function(e,t,n){for(var r,i=new Array(n+1).join(" "),o=0;r=e[o];o++)t+="\n"+i+"> "+r.message+" "+(r.module?'"'+r.module+'"':""),r.stack&&(t=Me.traverse(r.stack,t,n+1));return t};var Se=function(){var e=new Ce,t=[];function n(e,t){this[e]=t}function o(e,t){t.pledge.isPending()&&this.push(e)}function u(e,t){t.pledge.isResolved()&&this.push(e)}function s(e,t){t.pledge.isRejected()&&this.push(e)}function l(n,r,i){var o=this,u=n.match(qe)||t;return o.path=je(n,r),o.mock=u[1]?b:x,o.cache=u[2]?"+"===u[1]:y,o.type=u[3]||c.handler,o.version=u[4]||c.version,o.lifetime=u[5]&&1e3*u[5]||c.lifetime,o.id=(o.mock?m:"")+o.type+"!"+o.path,o.uri=(o.mock?m:"")+o.type+"@"+o.version+(te(o.lifetime)&&o.lifetime>0?"#"+o.lifetime:"")+"!"+o.path,o.dfd=Ee.defer(),o.pledge=o.dfd.pledge,o.invalid=!1,o.pledge.then(function(){o.value=le(arguments)}),i!==x&&e.set(o.id,o),o}return l.prototype={enqueue:!0},l.get=function(t,n){return e.get(ke(t,n))},l.resolve=function(e,t){var o,u=t&&be.test(e),a=u?this.get("internal!"+t+"/"+e):this.get(e,t);if(!a)if(u){switch(a=new l("internal!"+t+"/"+e),e){case f:o=re(r,n,r.bind(t));break;case"provide":o=i.bind(t);break;case"path":o=t}a.dfd.resolve(o)}else a=new l(e,t),r(d+a.type).then(function(e){a.handler=e,a.mock?a.dfd.resolve(e):Re.resolve(a)},function(){a.dfd.reject(new Me(_+" (handler)",self.id))});return a},l.remove=function(t,n,r){var i=ke(t,n),o=a.querySelector('[demand-id="'+i+'"]');e.remove(i),e.remove(m+i),o&&o.parentNode.removeChild(o),r!==x&&Re.clear.path(i)},l.list={all:function(){return B.keys(e.get())},pending:function(){return re(e.get(),o,[])},resolved:function(){return re(e.get(),u,[])},rejected:function(){return re(e.get(),s,[])}},l}(),Oe=function(){var e=/(.+)\/$/;function t(t,n){this[t]={url:ge(n).replace(e,"$1"),match:new RegExp("^"+ve(n))}}function n(e,n){this.weight=e.length,this.match=new RegExp("^"+ve(e)),this.location=[].concat(n),re(this.location,t,this.location)}return n.prototype={matches:function(e){return this.match.test(e)},process:function(e,t){var n=this.location[t];if(n)return e.replace(this.match,n.url)}},n}(),Ae=function(r){var i="XDomainRequest"in e&&e.XDomainRequest||r;return function(e){var o,u=Ee.defer(),a=xe.test(e)?new r:new i,s=function(){this.readyState<4&&this.abort()}.bind(a),f=c.timeout;return a.ontimeout=a.onerror=a.onabort=function(){u.reject(a.status)},a.onprogress=a.onreadystatechange=function(){n(o),o=t(s,f)},a.onload=function(){o=n(o),"status"in a&&200!==a.status?u.reject(a.status):u.resolve(a.responseText,a.getResponseHeader&&a.getResponseHeader("content-type"))},a.open("GET",e,b),a.send(),o=t(s,f),u.pledge}}(XMLHttpRequest);function $e(e){return"[object Array]"===G.call(e)}function Te(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return t>>>0}function He(){return Z(this.uuid,q)&&this.define("uuid",ce()),this}r=e.demand=function(){function t(e,t){this[e]={weight:e.length,state:t}}function n(e,t){"base"!==e&&(this[e]=new Oe(e,t))}function r(e,t){var n=this[e]=this[e]||{};he.emit(C,e,n),se(n,t),he.emit(M,e,n)}function i(){var t,n,r=le(arguments),i=this!==e?this:y,o=0;for(he.emit($,y,r,i);t=r[o];o++)Z(t,j)?r[o]=Se.resolve(t,i).pledge:(r[o]=(n=Ee.defer()).pledge,n.resolve(t));return(r.length>1?Ee.all(r):r[0]).always(function(){he.emit(T,y,r,i)})}return i.configure=function(e){var o=e.cache,u=e.version,a=e.timeout,s=e.lifetime,f=e.base,l=e.pattern,h=e.modules,d=c.modules;return Z(o,"boolean")?c.cache[""]={weight:0,state:o}:ee(o)&&re(o,t,c.cache),Z(u,j)&&(c.version=u),te(a)&&(c.timeout=1e3*Math.min(Math.max(a,2),12)),te(s)&&s>0&&(c.lifetime=1e3*s),Z(f,j)&&""!==f&&(c.pattern.base=new Oe("",f)),ee(l)&&re(l,n,c.pattern),ee(h)&&re(h,r,d),i},i.version="4.2.8",i.on=he.on.bind(i),i.get=function(e,t){var n=Se.get(e,t);return n&&n.value},i.remove=Se.remove,i.list=Se.list,i.clear=Re.clear,he.after(O,function(e){new function(e){var t,n=/^(?:\?|)$/;function r(t,n){n&&e.handler.validate&&!e.handler.validate(n)?e.dfd.reject(new Me(_+" (content-type)",e.id)):(e.source=t,he.emit(D,e.type,e))}function i(t){e.dfd.reject(new Me(_+(t?" (status)":""),e.id))}me.test(e.path)||re(c.pattern,function(n,r){r.matches(e.path)&&(!t||t.weight "+r.message+" "+(r.module?'"'+r.module+'"':""),r.stack&&(t=Me.traverse(r.stack,t,n+1));return t};var Fe=function(){var e=d+"bundle",t={};function n(e,t){var n,r;for(n=0;r=t[n];n++)Z(r,j)&&(t[n]=ke(r))}function i(){}return r.on(M+":"+e,function(e){ee(e)&&re(t=e,n)}),i.prototype={validate:_e.validate,onPreProcess:function(e){var n,r,i,u,a,s=e.source,c=e.dfd,f=t[e.path];function l(){c.reject(new Me(F,e.id,arguments))}if(e.enqueue=x,f&&(n=function(e){for(var n,r,i=0;r=e[i];i++)if(r=(r=r.match(qe))&&r[3]||t.handler,n){if(r!==n)return x}else n=r;return n}(f))){for(;r=we.exec(s);)s=s.replace(r[0],"");for(e.source=s,i=[],a=0;u=f[a];a++)i.push(Se.resolve(m+u).pledge);Ee.all(i).then(function(){for(i.length=0,a=0;u=f[a];a++)(u=f[a]=Se.get(u)||new Se(u)).handler=arguments[a],i.push(u.pledge);"module"===n?(o.enqueue.apply(o,f),_e.process(e)):(_e.process(e),o.enqueue.apply(o,f)),Ee.all(i).then(c.resolve,l)},l)}else l()}},new(i.extends(Le))}(),Ue=function(){var e=/^text\/.+$/;function t(){}return t.prototype={validate:function(t){return e.test(t)},onPreRequest:function(e){var t=e.url.pathname;e.url.pathname=".html"!==t.slice(-".html".length)?t+".html":t},onPostRequest:function(e){e.source=Ne(e.url,e.source)},onPreProcess:function(e){var t,n,r,i,u=e.path,s=e.dfd,c=a.createElement("body"),f=[],l=[];function h(){s.reject(new Me(F,e.id,arguments))}for(e.enqueue=x,c.innerHTML=e.source;t=c.firstElementChild;)(n=t.getAttribute("type"))&&(i=n+"!"+u+((r=t.getAttribute("path"))?"/"+r:""),t.parentNode.removeChild(t),f.push({source:t.textContent,uri:i}),l.push(Se.resolve("mock:"+i).pledge));Ee.all(l).then(function(){var e,t,n=0;for(l.length=0;e=f[n];n++)(t=Se.get(e.uri)||new Se(e.uri)).source=Ne(t.url,e.source),t.handler=arguments[n],l.push(t.pledge),o.enqueue(t);Ee.all(l).then(s.resolve,h)},h)}},new(t.extends(Le))}(),Xe=function(){var e=p+"genie",t=[];function n(e){for(var n,r,i=0;n=t[i];i++)0===e.indexOf(n.prefix)&&(!r||n.weight>r.weight)&&(r=n);return r}function i(e,n){t.push({prefix:e,weight:e.length,fn:n})}function o(t,n){var i,o=n.matches,u=0;if(o.length>1){for(n.id=e+"/"+Te(JSON.stringify(n.matches));i=o[u];u++)o[u]=new Se(i.uri);r.configure(function(e){var t,n,r=e.matches,i={pattern:{},modules:{"/demand/handler/bundle":{}}},o=0;for(i.pattern[e.id]=e.fn(r),i.modules[d+"bundle"][e.id]=t=[];n=r[o];o++)t.push(n.path);return i}(n)),r("bundle!"+n.id).then(function(){for(var e,t=0;e=this[t];t++)e.dfd.resolve(arguments[t])}.bind(o),function(){for(var e,t=0;e=this[t];t++)e.dfd.reject(new Me(F,e.id))}.bind(o))}}return r.on(M+":"+e,function(e){ee(e)&&(t.length=0,re(e,i))}).on($,function(e,t){for(var r,i,u={},a=0;r=e[a];a++)!Z(r,j)||be.test(r)||Se.get(r,t)||"module"===(r=new Se(r,t,x)).type&&(i=n(r.path))&&!Re.get(r)&&(u[i.prefix]||(u[i.prefix]={fn:i.fn,matches:[]})).matches.push(r);re(u,o)}),b}();function We(e,t){i(e,function(){return t})}if(o=new De,u=new Ie(o),We(h+"uuid",He),We(h+"handler",Le),We(d+"module",_e),We(d+"bundle",Fe),We(d+"component",Ue),We(p+"genie",Xe),We(g+"isTypeOf",Z),We(g+"isArray",$e),We(g+"isObject",ee),We(g+"isInstanceOf",ne),We(v+"resolveUrl",ge),We(v+"resolveSourcemaps",Ne),We(v+"merge",se),We(v+"iterate",re),We(v+"hash",Te),We(v+"defer",fe),We(v+"uuid",ce),We(l+"weakmap",Pe),We(l+"descriptor",Y),We(l+"pledge",Ee),We(l+"queue",De),We(l+"xhr",Ae),We(l+"failure",Me),s&&s.main)switch(typeof s.main){case j:r(s.main);break;case R:i("main",s.main())}}("demand-loader"===this.name?parent:this,setTimeout,clearTimeout); //# sourceMappingURL=demand.js.map diff --git a/dist/demand.js.map b/dist/demand.js.map index b900b51..df5655d 100644 --- a/dist/demand.js.map +++ b/dist/demand.js.map @@ -1 +1 @@ -{"version":3,"sources":["demand.js","constants.js","shortcuts.js","class/descriptor.js","validator/isTypeOf.js","validator/isObject.js","validator/isPositive.js","validator/isInstanceOf.js","function/iterate.js","inheritance.js","function/merge.js","function/defer.js","function/uuid.js","function/toArray.js","singleton/event.js","function/getTimestamp.js","function/escapeRegex.js","function/resolveUrl.js","variables.js","function/resolvePath.js","function/resolveId.js","singleton/cache.js","abstract/uuid.js","class/pledge.js","class/registry.js","class/failure.js","class/dependency.js","class/pattern.js","class/xhr.js","class/loader.js","validator/isArray.js","function/hash.js","class/queue.js","class/processor.js","function/resolveSourcemaps.js","function/demand.js","function/provide.js","abstract/handler.js","handler/module.js","class/Failure.js","handler/bundle.js","handler/component.js","plugin/genie.js"],"names":["global","setTimeout","clearTimeout","demand","provide","queue","processor","document","options","settings","version","cache","timeout","pattern","modules","handler","storage","DEMAND_ID","MODULE_PREFIX","MODULE_PREFIX_ABSTRACT","MODULE_PREFIX_HANDLER","MODULE_PREFIX_PLUGIN","MODULE_PREFIX_FUNCTION","MODULE_PREFIX_VALIDATOR","MOCK_PREFIX","NULL","UNDEFINED","undefined","FALSE","TRUE","STRING_UNDEFINED","STRING_STRING","STRING_OBJECT","STRING_FUNCTION","STRING_NUMBER","FUNCTION_EMPTY","EVENT_PRE_CONFIGURE","EVENT_PREFIX","EVENT_POST_CONFIGURE","EVENT_POSTFIX","EVENT_CACHE","EVENT_CACHE_MISS","EVENT_CACHE_EXCEED","EVENT_PRE_RESOLVE","EVENT_POST_RESOLVE","EVENT_PRE_REQUEST","EVENT_POST_REQUEST","EVENT_PRE_PROCESS","EVENT_POST_PROCESS","EVENT_QUEUE_ENQUEUE","EVENT_QUEUE","ERROR_LOAD","ERROR_RESOLVE","arrayPrototype","Array","prototype","arrayPrototypeSlice","slice","arrayPrototypeConcat","concat","object","Object","objectPrototypeToString","toString","objectCreate","create","objectDefineProperty","defineProperty","objectGetOwnPropertyNames","getOwnPropertyNames","objectGetOwnPropertyDescriptor","getOwnPropertyDescriptor","linkElement","createElement","ClassDescriptor","value","writable","configurable","enumerable","__proto__","validatorIsTypeOf","type","validatorIsObject","validatorIsPositive","isFinite","Math","floor","validatorIsInstanceOf","module","functionIterate","source","callback","context","property","properties","keys","i","call","strPrototype","descriptor","this","names","constructor","e","TypeError","Function","element","fallback","hasSetImmediate","functionMerge","mergeProperties","targetPropertyIsObject","targetProperty","length","target","arguments","functionUuid","regex","RegExp","randomize","character","r","random","uuid","replace","functionDefer","fn","MutationObserver","observe","attributes","setAttribute","addEventListener","event","data","postMessage","onreadystatechange","parentNode","removeChild","body","appendChild","setImmediate","functionToArray","arrayLikeObject","start","end","singletonEvent","TYPE_ON","regexMatchEvent","listener","addListener","events","pointer","split","shift","test","on","after","push","filter","Event","emit","parameter","item","apply","functionGetTimestamp","Date","regexMatchRegex","functionEscapeRegex","functionResolveUrl","url","href","regexIsAbsoluteUri","regexIsAbsolutePath","regexMatchSourcemap","regexMatchBaseUrl","regexMatchInternal","regexMatchParameter","functionResolvePath","uri","path","functionResolveId","match","singletonCache","STORAGE_PREFIX","STORAGE_SUFFIX_STATE","regexMatchState","regexMatchProperties","supportsLocalStorage","localStorage","exception","supportsRemainingSpace","enabled","dependency","indexOf","weight","state","getKey","key","getItem","setKey","getState","matches","setState","join","id","Cache","clear","expired","bind","then","cacheDispose","set","get","lifetime","invalid","resolve","spaceBefore","remainingSpace","Error","error","ClassDependency","all","self","AbstractUuid","ClassPledge","PLEDGE_PENDING","PLEDGE_RESOLVED","PLEDGE_REJECTED","pledge","index","resolved","count","check","rejected","total","dfd","reject","executor","handle","result","catch","always","alwaysListener","resolveListener","rejectListener","defer","isPending","isResolved","isRejected","pledges","race","extends","ClassRegistry","ClassFailure","message","stack","remove","traverse","depth","indention","registry","placeholder","setProperty","addPending","addResolved","addRejected","register","mock","enqueue","isInternal","node","querySelector","list","pending","ClassPattern","regexMatchTrailingSlash","location","process","current","ClassXhr","XMLHttpRequest","XDomainRequest","xhr","boundCheckState","readyState","abort","ontimeout","onerror","onabort","status","onprogress","onload","responseText","getResponseHeader","open","send","regexMatchEmptySearch","validatorIsArray","functionHash","input","charCodeAt","ClassQueue","ClassProcessor","functionResolveSourcemaps","replacement","exec","protocol","host","pathname","updateCacheSettings","updatePatternSettings","updateModuleSettings","temp","dependencies","configure","base","min","max","response","validate","load","search","onPostRequest","EVENT_CACHE_HIT","onPreRequest","onPreProcess","isFunction","definition","console","/demand","dequeue","abstractHandler","AbstractHandler","handlerModule","getElementsByTagName","regexMatchType","HandlerModule","script","async","text","handlerBundle","updateDependencies","HandlerBundle","getType","handlerComponent","HandlerComponent","container","innerHTML","firstElementChild","getAttribute","textContent","pluginGenie","matchPattern","prefix","addPattern","resolveBundles","JSON","stringify","bundle","configuration","/demand/handler/bundle","generateConfiguration","bundles","assignModule","main","name","parent"],"mappings":";CAYA,SAAAA,EAAAC,EAAAC,GACA,aAGA,IAIAC,EAAAC,EAAAC,EAAAC,EAJAC,EAAAP,EAAAO,SACAC,EAAA,WAAAR,GAAAA,EAAAG,OACAM,GAAAC,QAAA,QAAAC,SAAAC,QAAA,IAAAC,WAAAC,WAAAC,QAAA,UACAC,KCfAC,EAAA,SAGAC,EAAA,WACAC,EAAAD,EAAA,YACAE,EAAAF,EAAA,WACAG,EAAAH,EAAA,UACAI,EAAAJ,EAAA,YACAK,EAAAL,EAAA,aACAM,EAAA,QACAC,EAAA,KACAC,OAAAC,EACAC,GAAA,EACAC,GAAA,EACAC,EAAA,YACAC,EAAA,SAEAC,EAAA,SACAC,EAAA,WACAC,EAAA,SACAC,EAAA,aAIAC,EAAAC,eACAC,EAAAC,gBACAC,EAAA,QACAC,EAAAD,EAAA,OAGAE,EAAAF,EAAA,SAIAG,EAAAN,aACAO,EAAAL,cAEAM,EAAAR,aACAS,EAAAP,cAEAQ,EAAAV,aACAW,EAAAT,cAEAU,EAAAC,eAEAC,EAAA,gBAEAC,EAAA,kBC/CAC,EAAAC,MAAAC,UACAC,EAAAH,EAAAI,MACAC,EAAAL,EAAAM,OACAC,EAAAC,OAEAC,EADAF,EAAAL,UACAQ,SACAC,EAAAJ,EAAAK,OACAC,EAAAN,EAAAO,eACAC,EAAAR,EAAAS,oBACAC,EAAAV,EAAAW,yBACAC,EAAAjE,EAAAkE,cAAA,KCPA,SAAAC,EAAAC,EAAAC,EAAAC,EAAAC,GACA,OACAC,UAAAtD,EACAkD,MAA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tV,EAAA,QAAA0U,IACAY,GAAApV,EAAA,WAAAyD,IACA2R,GAAApV,EAAA,UAAAkR,IACAkE,GAAApV,EAAA,WAAA2D,IACAyR,GAAApV,EAAA,eAAAgE,IACAoR,GAAArV,EAAA,aAAAkJ,IACAmM,GAAArV,EAAA,oBAAAyR,IACA4D,GAAArV,EAAA,QAAAuF,IACA8P,GAAArV,EAAA,UAAAmE,IACAkR,GAAArV,EAAA,OAAAoR,IACAiE,GAAArV,EAAA,QAAAuG,IACA8O,GAAArV,EAAA,OAAA8F,IACAuP,GAAAzV,EAAA,aAAAwD,GACAiS,GAAAzV,EAAA,SAAA8M,IACA2I,GAAAzV,EAAA,QAAA2R,IACA8D,GAAAzV,EAAA,MAAAqQ,IACAoF,GAAAzV,EAAA,UAAA2O,IAEArP,GAAAA,EAAAoW,KACA,cAAApW,EAAAoW,MACA,KAAA7U,EACA5B,EAAAK,EAAAoW,MAEA,MACA,KAAA3U,EACA7B,EAAA,OAAAI,EAAAoW,SArEA,CA0EA,kBAAAxQ,KAAAyQ,KAAAC,OAAA1Q,KAAAnG,WAAAC","file":"demand.js","sourcesContent":["/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tMODULE_PREFIX, MODULE_PREFIX_HANDLER, MODULE_PREFIX_VALIDATOR, MODULE_PREFIX_PLUGIN, MODULE_PREFIX_FUNCTION, MODULE_PREFIX_ABSTRACT, STRING_STRING, STRING_FUNCTION, TRUE,\n\tvalidatorIsTypeOf, validatorIsArray, validatorIsObject, validatorIsInstanceOf,\n\tfunctionResolveUrl, functionResolveSourcemaps, functionMerge, functionIterate, functionDefer, functionHash, functionUuid,\n\tAbstractUuid, abstractHandler,\n\tClassDependency, ClassQueue, ClassProcessor, ClassPledge, ClassXhr, ClassFailure, ClassDescriptor,\n\thandlerModule, handlerBundle, handlerComponent,\n \tpluginGenie\n*/\n\n/*eslint no-unused-vars: [2, { \"vars\": \"local\", \"args\": \"none\" }]*/\n(function(global, setTimeout, clearTimeout) {\n\t'use strict';\n\n\t/* eslint-disable no-unused-vars */\n\tvar document = global.document,\n\t\toptions = 'demand' in global && global.demand,\n\t\tsettings = { version: '1.0.0', cache: {}, timeout: 8000, pattern: {}, modules: {}, handler: 'module' },\n\t\tstorage = {},\n\t\tdemand, provide, queue, processor;\n\t/* eslint-enable no-unused-vars */\n\n\t// include inheritance\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tTRUE,\n\t\t\tobjectCreate, objectDefineProperty, objectGetOwnPropertyNames, objectGetOwnPropertyDescriptor,\n\t\t\tClassDescriptor\n\t\t*/\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage\n\t\t*/\n\t\t\n\t\tvar DEMAND_ID = 'demand',\n\t\t\tPROVIDE_ID = 'provide',\n\t\t\tPATH_ID = 'path',\n\t\t\tMODULE_PREFIX = '/' + DEMAND_ID + '/',\n\t\t\tMODULE_PREFIX_ABSTRACT = MODULE_PREFIX + 'abstract/',\n\t\t\tMODULE_PREFIX_HANDLER = MODULE_PREFIX + 'handler/',\n\t\t\tMODULE_PREFIX_PLUGIN = MODULE_PREFIX + 'plugin/',\n\t\t\tMODULE_PREFIX_FUNCTION = MODULE_PREFIX + 'function/',\n\t\t\tMODULE_PREFIX_VALIDATOR = MODULE_PREFIX + 'validator/',\n\t\t\tMOCK_PREFIX = 'mock:',\n\t\t\tNULL = null,\n\t\t\tUNDEFINED = undefined,\n\t\t\tFALSE = false,\n\t\t\tTRUE = true,\n\t\t\tSTRING_UNDEFINED = 'undefined',\n\t\t\tSTRING_STRING = 'string',\n\t\t\tSTRING_BOOLEAN = 'boolean',\n\t\t\tSTRING_OBJECT = 'object',\n\t\t\tSTRING_FUNCTION = 'function',\n\t\t\tSTRING_NUMBER = 'number',\n\t\t\tFUNCTION_EMPTY = function() {},\n\t\t\tEVENT_PREFIX = 'pre',\n\t\t\tEVENT_POSTFIX = 'post',\n\t\t\tEVENT_CONFIGURE = 'Configure',\n\t\t\tEVENT_PRE_CONFIGURE = EVENT_PREFIX + EVENT_CONFIGURE,\n\t\t\tEVENT_POST_CONFIGURE = EVENT_POSTFIX + EVENT_CONFIGURE,\n\t\t\tEVENT_CACHE = 'cache',\n\t\t\tEVENT_CACHE_MISS = EVENT_CACHE + 'Miss',\n\t\t\tEVENT_CACHE_HIT = EVENT_CACHE + 'Hit',\n\t\t\tEVENT_CACHE_CLEAR = EVENT_CACHE + 'Clear',\n\t\t\tEVENT_CACHE_EXCEED = EVENT_CACHE + 'Exceed',\n\t\t\tEVENT_PRE_CACHE = EVENT_PREFIX + 'Cache',\n\t\t\tEVENT_POST_CACHE = EVENT_POSTFIX + 'Cache',\n\t\t\tEVENT_RESOLVE = 'Resolve',\n\t\t\tEVENT_PRE_RESOLVE = EVENT_PREFIX + EVENT_RESOLVE,\n\t\t\tEVENT_POST_RESOLVE = EVENT_POSTFIX + EVENT_RESOLVE,\n\t\t\tEVENT_REQUEST = 'Request',\n\t\t\tEVENT_PRE_REQUEST = EVENT_PREFIX + EVENT_REQUEST,\n\t\t\tEVENT_POST_REQUEST = EVENT_POSTFIX + EVENT_REQUEST,\n\t\t\tEVENT_PROCESS = 'Process',\n\t\t\tEVENT_PRE_PROCESS = EVENT_PREFIX + EVENT_PROCESS,\n\t\t\tEVENT_POST_PROCESS = EVENT_POSTFIX + EVENT_PROCESS,\n\t\t\tEVENT_QUEUE = 'queue',\n\t\t\tEVENT_QUEUE_ENQUEUE = EVENT_QUEUE + 'Enqueue',\n\t\t\tEVENT_QUEUE_DEQUEUE = EVENT_QUEUE + 'Dequeue',\n\t\t\tERROR_LOAD = 'error loading',\n\t\t\tERROR_PROVIDE = 'error providing',\n\t\t\tERROR_RESOLVE = 'error resolving',\n\t\t\tERROR_PROVIDE_ANONYMOUS = 'unspecified anonymous provide';\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage\n\t\t*/\n\t\t\n\t\tvar arrayPrototype = Array.prototype,\n\t\t\tarrayPrototypeSlice = arrayPrototype.slice,\n\t\t\tarrayPrototypeConcat = arrayPrototype.concat,\n\t\t\tobject = Object,\n\t\t\tobjectPrototype = object.prototype,\n\t\t\tobjectPrototypeToString = objectPrototype.toString,\n\t\t\tobjectCreate = object.create,\n\t\t\tobjectDefineProperty = object.defineProperty,\n\t\t\tobjectGetOwnPropertyNames = object.getOwnPropertyNames,\n\t\t\tobjectGetOwnPropertyDescriptor = object.getOwnPropertyDescriptor,\n\t\t\tlinkElement = document.createElement('a');\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tNULL\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t\n\t\tfunction ClassDescriptor(value, writable, configurable, enumerable) {\n\t\t\treturn {\n\t\t\t\t__proto__: NULL,\n\t\t\t\tvalue: value,\n\t\t\t\tenumerable: !!enumerable,\n\t\t\t\tconfigurable: !!configurable,\n\t\t\t\twritable: !!writable\n\t\t\t};\n\t\t}\n\t\t\n\t\t(function(strPrototype) {\n\t\t\tvar descriptor;\n\t\t\n\t\t\tfunction functionExtends(source) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tprototype = self[strPrototype],\n\t\t\t\t\tnames = objectGetOwnPropertyNames(prototype),\n\t\t\t\t\tproperties = { constructor: new ClassDescriptor(self, TRUE, TRUE)},\n\t\t\t\t\ti = 0, property;\n\t\t\n\t\t\t\tfor(; (property = names[i]) && !properties[property]; i++) {\n\t\t\t\t\tproperties[property] = objectGetOwnPropertyDescriptor(prototype, property);\n\t\t\t\t}\n\t\t\n\t\t\t\ttry {\n\t\t\t\t\tself[strPrototype] = objectCreate(source[strPrototype] || source, properties);\n\t\t\t\t} catch(e) {\n\t\t\t\t\t// ES6 class prototypes are readonly at least in Chrome\n\t\t\t\t\t// (and assignment throws an error in strict mode) ...\n\t\t\t\t}\n\t\t\n\t\t\t\t// ... which is handled here\n\t\t\t\tif(self[strPrototype] === prototype) {\n\t\t\t\t\tthrow new TypeError('Unable to extend, prototype is not writable');\n\t\t\t\t}\n\t\t\n\t\t\t\treturn self;\n\t\t\t}\n\t\t\n\t\t\tdescriptor = new ClassDescriptor(functionExtends);\n\t\t\n\t\t\tobjectDefineProperty(Function.prototype, 'extends', descriptor);\n\t\t\tobjectDefineProperty(global.Function.prototype, 'extends', descriptor);\n\t\t}('prototype'));\n\t\t\n\n\t// include main components\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tSTRING_BOOLEAN, STRING_STRING, EVENT_PRE_RESOLVE, EVENT_POST_RESOLVE, EVENT_PRE_CONFIGURE, EVENT_POST_CONFIGURE, EVENT_CACHE_MISS, EVENT_CACHE_HIT, EVENT_PRE_REQUEST, EVENT_POST_REQUEST, EVENT_PRE_PROCESS, EVENT_POST_PROCESS, NULL, FALSE,\n\t\t\tvalidatorIsTypeOf, validatorIsObject, validatorIsPositive, validatorIsInstanceOf,\n\t\t\tfunctionIterate, functionMerge, functionDefer, functionToArray,\n\t\t\tClassPledge, ClassDependency, ClassPattern, ClassLoader, \n\t\t\tsingletonEvent, singletonCache\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage\n\t\t*/\n\t\t\n\t\t/**\n\t\t * isTypeOf\n\t\t *\n\t\t * Check whether a given object is of specified type\n\t\t *\n\t\t * @param object\n\t\t * @param {string} type\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\t\n\t\tfunction validatorIsTypeOf(object, type) {\n\t\t\treturn typeof object === type;\n\t\t}\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tSTRING_OBJECT,\n\t\t\tvalidatorIsTypeOf\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require validator/isTypeOf.js\n\t\t\n\t\t/**\n\t\t * isObject\n\t\t *\n\t\t * Check whether a given object is of type object\n\t\t *\n\t\t * @param object\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\t\n\t\tfunction validatorIsObject(object) {\n\t\t\treturn object && validatorIsTypeOf(object, STRING_OBJECT);\n\t\t}\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tSTRING_NUMBER,\n\t\t\tvalidatorIsTypeOf\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require validator/isTypeOf.js\n\t\t\n\t\t/**\n\t\t * isPositive\n\t\t *\n\t\t * Check whether a given value is a positive integer\n\t\t *\n\t\t * @param value\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\t\n\t\tfunction validatorIsPositive(value) {\n\t\t\treturn validatorIsTypeOf(value, STRING_NUMBER) && isFinite(value) && Math.floor(value) === value && value >= 0;\n\t\t}\n\t\t/**\n\t\t * isInstanceOf\n\t\t *\n\t\t * Check whether a given object is an instance of specified type\n\t\t *\n\t\t * @param object\n\t\t * @param module\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tfunction validatorIsInstanceOf(object, module) {\n\t\t\treturn object instanceof module;\n\t\t}\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tUNDEFINED, FALSE,\n\t\t\tobject\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require shortcuts.js\n\t\t\n\t\t/**\n\t\t * iterate\n\t\t *\n\t\t * Iterate over enumerable & own properties of a given\n\t\t * object and pass current property as well as its value\n\t\t * to a callback function\n\t\t *\n\t\t * @param {object} object\n\t\t * @param {function} callback\n\t\t * @param context\n\t\t *\n\t\t * @return mixed\n\t\t */\n\t\t\n\t\tfunction functionIterate(source, callback, context) {\n\t\t\tvar properties = object.keys(source),\n\t\t\t\ti = 0, property;\n\t\t\n\t\t\tfor(; (property = properties[i]) !== UNDEFINED; i++) {\n\t\t\t\tif(callback.call(context, property, source[property]) === FALSE) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn context;\n\t\t}\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tUNDEFINED,\n\t\t\tvalidatorIsObject,\n\t\t\tfunctionIterate\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require validator/isObject.js\n\t\t//=require function/iterate.js\n\t\t\n\t\t/**\n\t\t * merge\n\t\t *\n\t\t * Merge two or more objects into the first one passed in\n\t\t *\n\t\t * @param {...object} object\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tvar functionMerge = (function() {\n\t\t\tfunction mergeProperties(property, value) {\n\t\t\t\tvar targetProperty = this[property],\n\t\t\t\t\ttargetPropertyIsObject;\n\t\t\n\t\t\t\tif(value !== UNDEFINED) {\n\t\t\t\t\tif(validatorIsObject(value)) {\n\t\t\t\t\t\ttargetPropertyIsObject = validatorIsObject(targetProperty);\n\t\t\n\t\t\t\t\t\tif(value.length !== UNDEFINED) {\n\t\t\t\t\t\t\ttargetProperty = (targetPropertyIsObject && targetProperty.length !== UNDEFINED) ? targetProperty : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttargetProperty = (targetPropertyIsObject && targetProperty.length === UNDEFINED) ? targetProperty : {};\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\tthis[property] = functionMerge(targetProperty, value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis[property] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn function functionMerge() {\n\t\t\t\tvar target = arguments[0],\n\t\t\t\t\ti = 1, properties;\n\t\t\n\t\t\t\tfor(; (properties = arguments[i]) !== UNDEFINED; i++) {\n\t\t\t\t\tfunctionIterate(properties, mergeProperties, target);\n\t\t\t\t}\n\t\t\n\t\t\t\treturn target;\n\t\t\t};\n\t\t}());\n\t\t/**\n\t\t * Based on setAsap:\n\t\t * Repo: https://github.com/taylorhakes/setAsap\n\t\t * License: https://github.com/taylorhakes/setAsap/blob/master/LICENSE\n\t\t */\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tNULL, TRUE, FALSE,\n\t\t\tfunctionUuid\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require shortcuts.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage\n\t\t*/\n\t\t\n\t\tvar functionUuid = (function() {\n\t\t\tvar regex = new RegExp('[xy]', 'g'),\n\t\t\t\tstorage = {};\n\t\t\n\t\t\tfunction randomize(character) {\n\t\t\t\tvar r = Math.random() * 16 | 0;\n\t\t\n\t\t\t\treturn ((character === 'x') ? r : (r & 0x3 | 0x8)).toString(16);\n\t\t\t}\n\t\t\n\t\t\treturn function functionUuid() {\n\t\t\t\tvar uuid;\n\t\t\n\t\t\t\tdo {\n\t\t\t\t\tuuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(regex, randomize);\n\t\t\t\t} while(storage[uuid]);\n\t\t\n\t\t\t\tstorage[uuid] = 1;\n\t\t\n\t\t\t\treturn uuid;\n\t\t\t};\n\t\t}());\n\t\t\n\t\t/**\n\t\t * defer\n\t\t *\n\t\t * delay function execution like setImmediate does\n\t\t *\n\t\t * @param {function} function\n\t\t */\n\t\tvar functionDefer = (function() {\n\t\t\tvar hasSetImmediate = 'setImmediate' in global,\n\t\t\t\telement, fallback;\n\t\t\n\t\t\tif('MutationObserver' in global) {\n\t\t\t\treturn function functionDefer(fn) {\n\t\t\t\t\telement = document.createElement('div');\n\t\t\n\t\t\t\t\tnew MutationObserver(function() { fn(); })\n\t\t\t\t\t\t.observe(element, { attributes: TRUE });\n\t\t\n\t\t\t\t\telement.setAttribute('i', '1');\n\t\t\t\t};\n\t\t\t}\n\t\t\n\t\t\tif(!hasSetImmediate && 'postMessage' in global && !('importScripts' in global) && 'addEventListener' in global) {\n\t\t\t\treturn (function() {\n\t\t\t\t\tfunction onMessage(event) {\n\t\t\t\t\t\tif(event.source === global && event.data && storage[event.data]) {\n\t\t\t\t\t\t\tstorage[event.data]();\n\t\t\n\t\t\t\t\t\t\tdelete storage[event.data];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tglobal.addEventListener('message', onMessage, FALSE);\n\t\t\n\t\t\t\t\treturn function functionDefer(fn) {\n\t\t\t\t\t\tvar uuid = functionUuid();\n\t\t\n\t\t\t\t\t\tstorage[uuid] = fn;\n\t\t\n\t\t\t\t\t\tglobal.postMessage(uuid, '*');\n\t\t\t\t\t};\n\t\t\t\t}());\n\t\t\t}\n\t\t\n\t\t\tif(!hasSetImmediate && 'onreadystatechange' in (element = document.createElement('script'))) {\n\t\t\t\treturn function functionDefer(fn) {\n\t\t\t\t\telement.onreadystatechange = function onreadystatechange() {\n\t\t\t\t\t\telement.onreadystatechange = NULL;\n\t\t\t\t\t\telement.parentNode.removeChild(element);\n\t\t\n\t\t\t\t\t\tfn();\n\t\t\t\t\t};\n\t\t\n\t\t\t\t\tdocument.body.appendChild(element);\n\t\t\t\t};\n\t\t\t}\n\t\t\n\t\t\t/* eslint-disable no-undef */\n\t\t\tfallback = hasSetImmediate ? setImmediate : setTimeout;\n\t\t\t/* eslint-enable no-undef */\n\t\t\n\t\t\treturn function functionDefer(fn) {\n\t\t\t\tfallback(fn);\n\t\t\t};\n\t\t}());\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tarrayPrototypeSlice\n\t\t*/\n\t\t\n\t\t//=require shortcuts.js\n\t\t\n\t\tfunction functionToArray(arrayLikeObject, start, end) {\n\t\t\treturn arrayPrototypeSlice.call(arrayLikeObject, start, end);\n\t\t}\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tNULL, STRING_STRING, STRING_FUNCTION, EVENT_POST_CONFIGURE,\n\t\t\tvalidatorIsTypeOf,\n\t\t\tfunctionToArray\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require validator/isTypeOf.js\n\t\t//=require function/toArray.js\n\t\t\n\t\tvar singletonEvent = (function() {\n\t\t\tvar TYPE_ON = 'on',\n\t\t\t\tTYPE_AFTER = 'after',\n\t\t\t\tregexMatchEvent = /^cache(Miss|Hit|Clear|Exceed)|queue(En|De)queue|(pre|post)(Resolve|Configure|Request|Process|Cache)$/,\n\t\t\t\tlistener = {};\n\t\t\n\t\t\tfunction addListener(type, events, callback) {\n\t\t\t\tvar event, pointer;\n\t\t\n\t\t\t\tif(validatorIsTypeOf(events, STRING_STRING) && validatorIsTypeOf(callback, STRING_FUNCTION)) {\n\t\t\t\t\tevents = events.split(' ');\n\t\t\n\t\t\t\t\twhile(event = events.shift()) {\n\t\t\t\t\t\tevent = event.split(':');\n\t\t\n\t\t\t\t\t\tif(regexMatchEvent.test(event[0])) {\n\t\t\t\t\t\t\t(listener[event[0]] || (listener[event[0]] = { on: [], after: [] }))[type].push({ callback: callback, filter: event[1] });\n\t\t\n\t\t\t\t\t\t\tif(type === TYPE_ON && event[0] === EVENT_POST_CONFIGURE && (pointer = settings.modules[event[1]])) {\n\t\t\t\t\t\t\t\tcallback(pointer);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction Event() {}\n\t\t\n\t\t\tEvent.prototype = {\n\t\t\t\temit: function (event, filter) {\n\t\t\t\t\tvar pointer = listener[event],\n\t\t\t\t\t\tparameter, i, item;\n\t\t\n\t\t\t\t\tif(pointer) {\n\t\t\t\t\t\tparameter = functionToArray(arguments, 2);\n\t\t\n\t\t\t\t\t\tfor(i = 0; (item = pointer[TYPE_ON][i]); i++) {\n\t\t\t\t\t\t\tif(!item.filter || item.filter === filter) {\n\t\t\t\t\t\t\t\titem.callback.apply(NULL, parameter);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\tfor(i = 0; (item = pointer[TYPE_AFTER][i]); i++) {\n\t\t\t\t\t\t\tif(!item.filter || item.filter === filter) {\n\t\t\t\t\t\t\t\titem.callback.apply(NULL, parameter);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\ton: function(events, callback) {\n\t\t\t\t\taddListener(TYPE_ON, events, callback);\n\t\t\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tafter: function(events, callback) {\n\t\t\t\t\taddListener(TYPE_AFTER, events, callback);\n\t\t\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\treturn new Event();\n\t\t}());\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tDEMAND_ID, FUNCTION_EMPTY, EVENT_POST_REQUEST, EVENT_POST_PROCESS, EVENT_CACHE_HIT, EVENT_CACHE_MISS, EVENT_CACHE_EXCEED, EVENT_CACHE_CLEAR, EVENT_PRE_CACHE, EVENT_PRE_CACHE, EVENT_POST_CACHE, STRING_STRING, NULL, FALSE, TRUE,\n\t\t\tvalidatorIsTypeOf,\n\t\t\tfunctionGetTimestamp, functionEscapeRegex, functionIterate, functionDefer, functionResolveId, functionToArray,\n\t\t\tClassDependency,\n\t\t\tsingletonEvent\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require validator/isTypeOf.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage\n\t\t*/\n\t\t\n\t\tfunction functionGetTimestamp() {\n\t\t\treturn +new Date();\n\t\t}\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage\n\t\t*/\n\t\t\n\t\tvar functionEscapeRegex = (function() {\n\t\t\t// eslint-disable-next-line no-useless-escape\n\t\t\tvar regexMatchRegex = /[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g;\n\t\t\n\t\t\treturn function functionEscapeRegex(value) {\n\t\t\t\treturn value.replace(regexMatchRegex, '\\\\$&');\n\t\t\t};\n\t\t}());\n\t\t\n\t\t//=require function/iterate.js\n\t\t//=require function/defer.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tregexMatchParameter,\n\t\t\tfunctionResolvePath\n\t\t*/\n\t\t\n\t\t/* global \n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tDEMAND_ID, PROVIDE_ID, PATH_ID,\n\t\t\tfunctionEscapeRegex, functionResolveUrl\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require function/escapeRegex.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tlinkElement\n\t\t*/\n\t\t\n\t\t//=require shortcuts.js\n\t\t\n\t\tfunction functionResolveUrl(url) {\n\t\t\tlinkElement.href = url;\n\t\t\n\t\t\treturn linkElement.href;\n\t\t}\n\t\t\n\t\tvar regexIsAbsoluteUri = /^(http(s?):)?\\/\\//i,\n\t\t\tregexIsAbsolutePath = /^\\//,\n\t\t\tregexMatchSourcemap = /((?:\\/\\/|\\/\\*)#)\\s*(sourceMappingURL)\\s*=\\s*(?!(?:http[s]?:)?\\/\\/)(.+?)\\.map(?:\\s+)?(\\*\\/)?/g,\n\t\t\tregexMatchBaseUrl = new RegExp('^' + functionEscapeRegex(functionResolveUrl('/'))),\n\t\t\tregexMatchInternal = new RegExp('^' + DEMAND_ID + '|' + PROVIDE_ID + '|' + PATH_ID + '$'),\n\t\t\tregexMatchParameter = /^(mock:)?([+-])?((?:[-\\w]+\\/?)+)?(?:@(.+?))?(?:#(\\d+))?!/;\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tregexMatchParameter, regexMatchBaseUrl, regexIsAbsolutePath, regexIsAbsoluteUri,\n\t\t\tfunctionResolveUrl\n\t\t*/\n\t\t\n\t\t//=require variables.js\n\t\t//=require function/resolveUrl.js\n\t\t\n\t\tfunction functionResolvePath(uri, context) {\n\t\t\tvar path = uri.replace(regexMatchParameter, '');\n\t\t\n\t\t\tif(!regexIsAbsolutePath.test(path) && !regexIsAbsoluteUri.test(path)) {\n\t\t\t\tpath = '/' + functionResolveUrl(((context && functionResolveUrl(context + '/../')) || '/') + path).replace(regexMatchBaseUrl, '');\n\t\t\t}\n\t\t\n\t\t\treturn path;\n\t\t}\n\t\t\n\t\tfunction functionResolveId(uri, context) {\n\t\t\tvar parameter = uri.match(regexMatchParameter);\n\t\t\n\t\t\treturn ((parameter && parameter[1]) ? 'mock:' : '') + ((parameter && parameter[3]) || settings.handler) + '!' + functionResolvePath(uri, context);\n\t\t}\n\t\t//=require function/toArray.js\n\t\t//=require singleton/event.js\n\t\t\n\t\tvar singletonCache = (function() {\n\t\t\tvar STORAGE_PREFIX = '[' + DEMAND_ID + ']',\n\t\t\t\tSTORAGE_SUFFIX_STATE = '[state]',\n\t\t\t\tSTORAGE_SUFFIX_VALUE = '[value]',\n\t\t\t\tregexMatchState = new RegExp('^' + functionEscapeRegex(STORAGE_PREFIX) + '\\\\[(.+?)\\\\]' + functionEscapeRegex(STORAGE_SUFFIX_STATE) + '$'),\n\t\t\t\tregexMatchProperties = /^(.+?),(\\d+),(\\d*),(.+?),(\\d+)$/,\n\t\t\t\tsupportsLocalStorage = (function() { try { return 'localStorage' in global && global.localStorage; } catch(exception) { return FALSE; } }()),\n\t\t\t\tlocalStorage = supportsLocalStorage ? global.localStorage : NULL,\n\t\t\t\tsupportsRemainingSpace = supportsLocalStorage && 'remainingSpace' in localStorage,\n\t\t\t\tstorage = {},\n\t\t\t\tcache;\n\t\t\n\t\t\tsingletonEvent\n\t\t\t\t.on(EVENT_CACHE_MISS, function(dependency) {\n\t\t\t\t\tfunctionDefer(function() {\n\t\t\t\t\t\tcache.clear.path(dependency.id);\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.on(EVENT_CACHE_EXCEED, function(dependency) {\n\t\t\t\t\tdemand('-!/' + DEMAND_ID + '/cache/dispose').then(function(cacheDispose) {\n\t\t\t\t\t\tfunctionDefer(function() {\n\t\t\t\t\t\t\tcacheDispose(dependency.source.length);\n\t\t\n\t\t\t\t\t\t\tcache.set(dependency);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.on(EVENT_POST_REQUEST, function(dependency) {\n\t\t\t\t\tif(dependency.source && enabled(dependency)) {\n\t\t\t\t\t\tstorage[dependency.id] = TRUE;\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.after(EVENT_POST_PROCESS, function(dependency) {\n\t\t\t\t\tif(storage[dependency.id]) {\n\t\t\t\t\t\tfunctionDefer(function() {\n\t\t\t\t\t\t\tcache.set(dependency);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\t\tfunction enabled(dependency) {\n\t\t\t\tvar match;\n\t\t\n\t\t\t\tif(dependency.cache !== NULL) {\n\t\t\t\t\treturn dependency.cache;\n\t\t\t\t}\n\t\t\n\t\t\t\tfunctionIterate(settings.cache, function(property, value) {\n\t\t\t\t\tif(dependency.path.indexOf(property) === 0 && (!match || value.weight > match.weight)) {\n\t\t\t\t\t\tmatch = value;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\t\t\treturn match ? match.state : FALSE;\n\t\t\t}\n\t\t\n\t\t\tfunction getKey(key) {\n\t\t\t\treturn localStorage.getItem(key);\n\t\t\t}\n\t\t\n\t\t\tfunction setKey(key, value) {\n\t\t\t\tlocalStorage[value ? 'setItem' : 'removeItem'](key, value);\n\t\t\t}\n\t\t\n\t\t\tfunction getState(key) {\n\t\t\t\tvar state = getKey(key),\n\t\t\t\t\tmatches;\n\t\t\n\t\t\t\tif(state && (matches = state.match(regexMatchProperties))) {\n\t\t\t\t\treturn functionToArray(matches, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction setState(key, state) {\n\t\t\t\tstate[4] = functionGetTimestamp();\n\t\t\n\t\t\t\tsetKey(key, state.join(','));\n\t\t\t}\n\t\t\n\t\t\tfunction emit(event, dependency, state) {\n\t\t\t\tsingletonEvent.emit(event, dependency.id, dependency, state);\n\t\t\t}\n\t\t\n\t\t\tfunction Cache() {\n\t\t\t\tfunctionDefer(this.clear.expired.bind(this.clear));\n\t\t\t}\n\t\t\n\t\t\tCache.prototype = {\n\t\t\t\tget: supportsLocalStorage ? function(dependency) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar id, state;\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(enabled(dependency)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tid = STORAGE_PREFIX + '[' + dependency.id + ']';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstate = getState(id + STORAGE_SUFFIX_STATE);\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!state) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(state[0] !== dependency.version || (state[2] && dependency.lifetime && state[2] <= functionGetTimestamp())) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdependency.invalid = true;\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdependency.source = getKey(id + STORAGE_SUFFIX_VALUE);\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfunctionDefer(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetState(id + STORAGE_SUFFIX_STATE, state);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY,\n\t\t\t\tresolve: supportsLocalStorage ? function(dependency) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar self = this;\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(self.get(dependency)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_CACHE_HIT, dependency);\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_CACHE_MISS, dependency);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t} : function(dependency) { emit(EVENT_CACHE_MISS, dependency); },\n\t\t\t\tset: supportsLocalStorage ? function(dependency) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar state, id, spaceBefore;\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(enabled(dependency)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstate = [ dependency.version, dependency.source.length, dependency.lifetime ? functionGetTimestamp() + dependency.lifetime : NULL, demand.version ];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tid = STORAGE_PREFIX + '[' + dependency.id + ']';\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_PRE_CACHE, dependency, state);\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tspaceBefore = supportsRemainingSpace ? localStorage.remainingSpace : NULL;\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetKey(id + STORAGE_SUFFIX_VALUE, dependency.source);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetState(id + STORAGE_SUFFIX_STATE, state);\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// strict equality check with \"===\" is required due to spaceBefore might be \"0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(spaceBefore !== NULL && localStorage.remainingSpace === spaceBefore) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthrow new Error();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_POST_CACHE, dependency, state);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch(error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_CACHE_EXCEED, dependency);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY,\n\t\t\t\tclear: {\n\t\t\t\t\tpath: supportsLocalStorage ? function(path) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar id = functionResolveId(path),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey = STORAGE_PREFIX + '[' + id + ']';\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(getKey(key + STORAGE_SUFFIX_STATE)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetKey(key + STORAGE_SUFFIX_STATE);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetKey(key + STORAGE_SUFFIX_VALUE);\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_CACHE_CLEAR, ClassDependency.get(id) || new ClassDependency(id, NULL, FALSE));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY,\n\t\t\t\t\tall: supportsLocalStorage ? function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar match;\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfunctionIterate(localStorage, function(property) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmatch = property.match(regexMatchState);\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmatch && this.path(match[1]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}, this);\n\t\t\t\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY,\n\t\t\t\t\texpired: supportsLocalStorage ? function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar self = this,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmatch, state;\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfunctionIterate(localStorage, function(property) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmatch = property.match(regexMatchState);\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(match) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstate = getState(STORAGE_PREFIX + '[' + match[1] + ']' + STORAGE_SUFFIX_STATE);\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(state && state[2] > 0 && state[2] <= functionGetTimestamp()) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tself.path(match[1]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}, this);\n\t\t\t\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\treturn (cache = new Cache());\n\t\t}());\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t \tFUNCTION_EMPTY, NULL,\n\t\t\tarrayPrototypeConcat,\n\t\t\tfunctionDefer, functionUuid, functionToArray,\n\t\t\tAbstractUuid\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require shortcuts.js\n\t\t//=require function/defer.js\n\t\t//=require function/uuid.js\n\t\t//=require function/toArray.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tSTRING_UNDEFINED,\n\t\t\tobjectDefineProperty,\n\t\t\tvalidatorIsTypeOf,\n\t\t\tfunctionUuid,\n\t\t\tClassDescriptor\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require shortcuts.js\n\t\t//=require validator/isTypeOf.js\n\t\t//=require function/uuid.js\n\t\t//=require class/descriptor.js\n\t\t\n\t\tfunction AbstractUuid() {\n\t\t\tif(validatorIsTypeOf(this.uuid, STRING_UNDEFINED)) {\n\t\t\t\tobjectDefineProperty(this, 'uuid', new ClassDescriptor(functionUuid()));\n\t\t\t}\n\t\t\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t\n\t\tvar ClassPledge = (function() {\n\t\t\tvar PLEDGE_PENDING = 'pending',\n\t\t\t\tPLEDGE_RESOLVED = 'resolved',\n\t\t\t\tPLEDGE_REJECTED = 'rejected',\n\t\t\t\tstorage = {};\n\t\t\n\t\t\tfunction resolve() {\n\t\t\t\tstorage[this.uuid].handle(PLEDGE_RESOLVED, arguments);\n\t\t\t}\n\t\t\n\t\t\tfunction reject() {\n\t\t\t\tstorage[this.uuid].handle(PLEDGE_REJECTED, arguments);\n\t\t\t}\n\t\t\n\t\t\tfunction handle(state, parameter) {\n\t\t\t\tvar properties = storage[this.uuid],\n\t\t\t\t\tpointer, result;\n\t\t\n\t\t\t\tif(properties.state === PLEDGE_PENDING) {\n\t\t\t\t\tproperties.state = state;\n\t\t\t\t\tproperties.value = parameter;\n\t\t\t\t}\n\t\t\n\t\t\t\twhile(pointer = properties[properties.state].shift()) {\n\t\t\t\t\tresult = pointer.handler.apply(NULL, properties.value);\n\t\t\n\t\t\t\t\tif(result && typeof result.then === 'function') {\n\t\t\t\t\t\tresult.then(pointer.dfd.resolve, pointer.dfd.reject);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpointer.dfd[properties.state === PLEDGE_RESOLVED ? 'resolve' : 'reject'].apply(NULL, properties.value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\tproperties[PLEDGE_RESOLVED].length = 0;\n\t\t\t\tproperties[PLEDGE_REJECTED].length = 0;\n\t\t\t}\n\t\t\n\t\t\tfunction observe(pledge, index, properties) {\n\t\t\t\tpledge.then(\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tproperties.resolved[index] = functionToArray(arguments);\n\t\t\n\t\t\t\t\t\tproperties.count++;\n\t\t\n\t\t\t\t\t\tcheck(properties);\n\t\t\t\t\t},\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tproperties.rejected.push(functionToArray(arguments));\n\t\t\n\t\t\t\t\t\tcheck(properties);\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t\n\t\t\tfunction check(properties) {\n\t\t\t\tif(properties.count === properties.total) {\n\t\t\t\t\tproperties.dfd.resolve.apply(NULL, arrayPrototypeConcat.apply([], properties.resolved));\n\t\t\t\t} else if(properties.rejected.length + properties.count === properties.total) {\n\t\t\t\t\tproperties.dfd.reject.apply(NULL, arrayPrototypeConcat.apply([], properties.rejected));\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction ClassPledge(executor) {\n\t\t\t\tvar self = AbstractUuid.call(this);\n\t\t\n\t\t\t\tstorage[self.uuid] = { state: PLEDGE_PENDING, handle: handle.bind(self), value: NULL, resolved: [], rejected: [], count: 0 };\n\t\t\n\t\t\t\texecutor(resolve.bind(self), reject.bind(self));\n\t\t\t\t\n\t\t\t\treturn self;\n\t\t\t}\n\t\t\n\t\t\tClassPledge.prototype = {\n\t\t\t\t'catch': function(listener) {\n\t\t\t\t\treturn this.then(FUNCTION_EMPTY, listener);\n\t\t\t\t},\n\t\t\t\talways: function(alwaysListener) {\n\t\t\t\t\treturn this.then(alwaysListener, alwaysListener);\n\t\t\t\t},\n\t\t\t\tthen: function(resolveListener, rejectListener) {\n\t\t\t\t\tvar properties = storage[this.uuid],\n\t\t\t\t\t\tdfd = ClassPledge.defer();\n\t\t\n\t\t\t\t\tresolveListener && properties[PLEDGE_RESOLVED].push({ handler: resolveListener, dfd: dfd });\n\t\t\t\t\trejectListener && properties[PLEDGE_REJECTED].push({ handler: rejectListener, dfd: dfd });\n\t\t\n\t\t\t\t\tif(properties.state !== PLEDGE_PENDING) {\n\t\t\t\t\t\tfunctionDefer(properties.handle);\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\treturn dfd.pledge;\n\t\t\t\t},\n\t\t\t\tisPending: function() {\n\t\t\t\t\treturn storage[this.uuid].state === PLEDGE_PENDING;\n\t\t\t\t},\n\t\t\t\tisResolved: function() {\n\t\t\t\t\treturn storage[this.uuid].state === PLEDGE_RESOLVED;\n\t\t\t\t},\n\t\t\t\tisRejected: function() {\n\t\t\t\t\treturn storage[this.uuid].state === PLEDGE_REJECTED;\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\tClassPledge.defer = function() {\n\t\t\t\tvar self = {};\n\t\t\n\t\t\t\tself.pledge = new ClassPledge(function(resolveListener, rejectListener) {\n\t\t\t\t\tself.resolve = resolveListener;\n\t\t\t\t\tself.reject = rejectListener;\n\t\t\t\t});\n\t\t\n\t\t\t\treturn self;\n\t\t\t};\n\t\t\n\t\t\tClassPledge.all = function(pledges) {\n\t\t\t\tvar dfd = ClassPledge.defer(),\n\t\t\t\t\tproperties, i = 0, pledge;\n\t\t\t\t\n\t\t\t\tif(pledges.length) {\n\t\t\t\t\tproperties = (storage[functionUuid()] = { dfd: dfd, resolved: [], rejected: [], total: pledges.length, count: 0 })\n\t\t\t\t\t\n\t\t\t\t\tfor(; pledge = pledges[i]; i++) {\n\t\t\t\t\t\tobserve(pledge, i, properties)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdfd.resolve();\n\t\t\t\t}\n\t\t\n\t\t\t\treturn dfd.pledge;\n\t\t\t};\n\t\t\n\t\t\tClassPledge.race = function(pledges) {\n\t\t\t\tvar dfd = ClassPledge.defer(),\n\t\t\t\t\ti = 0, pledge;\n\t\t\n\t\t\t\tfor(; pledge = pledges[i]; i++) {\n\t\t\t\t\tpledge.then(dfd.resolve, dfd.reject);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!pledges.length) {\n\t\t\t\t\tdfd.resolve();\n\t\t\t\t}\n\t\t\n\t\t\t\treturn dfd.pledge;\n\t\t\t};\n\t\t\n\t\t\treturn ClassPledge.extends(AbstractUuid);\n\t\t}());\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tDEMAND_ID, MODULE_PREFIX_HANDLER, ERROR_LOAD, DEMAND_ID, PROVIDE_ID, PATH_ID, MOCK_PREFIX, NULL, TRUE, FALSE,\n\t\t\tobject,\n\t\t\tregexMatchInternal, regexMatchParameter,\n\t\t\tvalidatorIsPositive,\n\t\t\tfunctionResolvePath, functionResolveId, functionResolveUrl, functionIterate, functionToArray,\n\t\t\tClassRegistry, ClassPledge, ClassFailure,\n\t\t\tsingletonCache\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require shortcuts.js\n\t\t//=require variables.js\n\t\t//=require validator/isPositive.js\n\t\t//=require function/resolvePath.js\n\t\t//=require function/resolveId.js\n\t\t//=require function/resolveUrl.js\n\t\t//=require function/iterate.js\n\t\t//=require function/toArray.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tAbstractUuid\n\t\t*/\n\t\t\n\t\t//=require abstract/uuid.js\n\t\t\n\t\tfunction ClassRegistry() {\n\t\t\tvar self = AbstractUuid.call(this);\n\t\t\n\t\t\tstorage[self.uuid] = {};\n\t\t\t\n\t\t\treturn self;\n\t\t}\n\t\t\n\t\tClassRegistry.prototype = {\n\t\t\tget: function(key) {\n\t\t\t\treturn key ? storage[this.uuid][key] : storage[this.uuid];\n\t\t\t},\n\t\t\tset: function(key, value) {\n\t\t\t\tstorage[this.uuid][key] = value;\n\t\t\t},\n\t\t\tremove: function(key) {\n\t\t\t\tdelete storage[this.uuid][key];\n\t\t\t}\n\t\t};\n\t\t\n\t\tClassRegistry.extends(AbstractUuid);\n\t\t//=require class/pledge.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tDEMAND_ID,\n\t\t\tfunctionToArray\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require function/toArray.js\n\t\t\n\t\tfunction ClassFailure(message, module, stack) {\n\t\t\tvar self = this;\n\t\t\t\n\t\t\tself.message = message;\n\t\t\t\t\n\t\t\tmodule && (self.module = module);\n\t\t\tstack && (self.stack = functionToArray(stack));\n\t\t\t\n\t\t\treturn self;\n\t\t}\n\t\t\t\n\t\tClassFailure.prototype = {\n\t\t\t/* only for reference\n\t\t\t message: NULL,\n\t\t\t module: NULL,\n\t\t\t stack: NULL,\n\t\t\t */\n\t\t\ttoString: function() {\n\t\t\t\tvar self = this,\n\t\t\t\t\tresult = DEMAND_ID + ': ' + self.message + ' ' + (self.module ? '\"' + self.module + '\"' : '');\n\t\t\n\t\t\t\tif(self.stack) {\n\t\t\t\t\tresult = ClassFailure.traverse(self.stack, result, 1);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn result;\n\t\t\t}\n\t\t};\n\t\t\t\n\t\tClassFailure.traverse = function(stack, value, depth) {\n\t\t\tvar indention = new Array(depth + 1).join(' '),\n\t\t\t\ti = 0, item;\n\t\t\t\t\n\t\t\tfor(; item = stack[i]; i++) {\n\t\t\t\tvalue += '\\n' + indention + '> ' + item.message + ' ' + (item.module ? '\"' + item.module + '\"' : '');\n\t\t\t\t\t\n\t\t\t\tif(item.stack) {\n\t\t\t\t\tvalue = ClassFailure.traverse(item.stack, value, depth + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\treturn value;\n\t\t};\n\t\t//=require singleton/cache.js\n\t\t\n\t\tvar ClassDependency = (function() {\n\t\t\tvar PREFIX_INTERNAL = 'internal!',\n\t\t\t\tregistry = new ClassRegistry(),\n\t\t\t\tplaceholder = [];\n\t\t\n\t\t\tfunction setProperty(property, value) {\n\t\t\t\tthis[property] = value;\n\t\t\t}\n\t\t\n\t\t\tfunction addPending(id, dependency) {\n\t\t\t\tif(dependency.pledge.isPending()) {\n\t\t\t\t\tthis.push(id);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction addResolved(id, dependency) {\n\t\t\t\tif(dependency.pledge.isResolved()) {\n\t\t\t\t\tthis.push(id);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction addRejected(id, dependency) {\n\t\t\t\tif(dependency.pledge.isRejected()) {\n\t\t\t\t\tthis.push(id);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction ClassDependency(uri, context, register) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tparameter = uri.match(regexMatchParameter) || placeholder;\n\t\t\n\t\t\t\tself.path = functionResolvePath(uri, context);\n\t\t\t\tself.mock = parameter[1] ? TRUE : FALSE;\n\t\t\t\tself.cache = parameter[2] ? parameter[1] === '+' : NULL;\n\t\t\t\tself.type = parameter[3] || settings.handler;\n\t\t\t\tself.version = parameter[4] || settings.version;\n\t\t\t\tself.lifetime = (parameter[5] && parameter[5] * 1000) || settings.lifetime;\n\t\t\t\tself.id = (self.mock ? MOCK_PREFIX : '' ) + self.type + '!' + self.path;\n\t\t\t\tself.uri = (self.mock ? MOCK_PREFIX : '' ) + self.type + '@' + self.version + (validatorIsPositive(self.lifetime) && self.lifetime > 0 ? '#' + self.lifetime : '' ) + '!' + self.path;\n\t\t\t\tself.dfd = ClassPledge.defer();\n\t\t\t\tself.pledge = self.dfd.pledge;\n\t\t\t\tself.invalid = false;\n\t\t\n\t\t\t\tself.pledge.then(function() {\n\t\t\t\t\tself.value = functionToArray(arguments);\n\t\t\t\t});\n\t\t\n\t\t\t\t(register !== FALSE) && registry.set(self.id, self);\n\t\t\n\t\t\t\treturn self;\n\t\t\t}\n\t\t\n\t\t\tClassDependency.prototype = {\n\t\t\t\tenqueue: true // handled by handler\n\t\t\t\t/* only for reference\n\t\t\t \tpath: NULL,\n\t\t\t \tmock: NULL,\n\t\t\t\tcache: NULL,\n\t\t\t\ttype: NULL,\n\t\t\t\tversion: NULL,\n\t\t\t\tlifetime: NULL,\n\t\t\t \tid: NULL,\n\t\t\t \turi: NULL,\n\t\t\t\tdfd: NULL,\n\t\t\t\tpledge: NULL,\n\t\t\t\tvalue: NULL,\n\t\t\t\thandler: NULL, // set by Dependency.resolve\n\t\t\t \tsource: NULL, // set by Cache or Loader\n\t\t\t \turl: NULL // optional, set by Loader\n\t\t\t\t*/\n\t\t\t};\n\t\t\n\t\t\tClassDependency.get = function(uri, context) {\n\t\t\t\treturn registry.get(functionResolveId(uri, context));\n\t\t\t};\n\t\t\n\t\t\tClassDependency.resolve = function(uri, context) {\n\t\t\t\tvar isInternal = context && regexMatchInternal.test(uri),\n\t\t\t\t\tdependency = isInternal ? this.get(PREFIX_INTERNAL + context + '/' + uri) : this.get(uri, context),\n\t\t\t\t\tvalue;\n\t\t\n\t\t\t\tif(!dependency) {\n\t\t\t\t\tif(isInternal) {\n\t\t\t\t\t\tdependency = new ClassDependency(PREFIX_INTERNAL + context + '/' + uri);\n\t\t\n\t\t\t\t\t\tswitch(uri) {\n\t\t\t\t\t\t\tcase DEMAND_ID:\n\t\t\t\t\t\t\t\tvalue = (function() {\n\t\t\t\t\t\t\t\t\treturn functionIterate(demand, setProperty, demand.bind(context));\n\t\t\t\t\t\t\t\t}());\n\t\t\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase PROVIDE_ID:\n\t\t\t\t\t\t\t\tvalue = provide.bind(context);\n\t\t\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase PATH_ID:\n\t\t\t\t\t\t\t\tvalue = context;\n\t\t\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\tdependency.dfd.resolve(value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdependency = new ClassDependency(uri, context);\n\t\t\n\t\t\t\t\t\tdemand(MODULE_PREFIX_HANDLER + dependency.type)\n\t\t\t\t\t\t\t.then(\n\t\t\t\t\t\t\t\tfunction(handler) {\n\t\t\t\t\t\t\t\t\tdependency.handler = handler;\n\t\t\n\t\t\t\t\t\t\t\t\tif(dependency.mock) {\n\t\t\t\t\t\t\t\t\t\tdependency.dfd.resolve(handler);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tsingletonCache.resolve(dependency);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\tdependency.dfd.reject(new ClassFailure(ERROR_LOAD + ' (handler)', self.id));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\treturn dependency;\n\t\t\t};\n\t\t\n\t\t\tClassDependency.remove = function(uri, context, cache) {\n\t\t\t\tvar id = functionResolveId(uri, context),\n\t\t\t\t\tnode = document.querySelector('[' + DEMAND_ID + '-id=\"' + id + '\"]');\n\t\t\n\t\t\t\tregistry.remove(id);\n\t\t\t\tregistry.remove(MOCK_PREFIX + id);\n\t\t\n\t\t\t\tnode && node.parentNode.removeChild(node);\n\t\t\n\t\t\t\t(cache !== FALSE) && singletonCache.clear.path(id);\n\t\t\t};\n\t\t\n\t\t\tClassDependency.list = {\n\t\t\t\tall: function() {\n\t\t\t\t\treturn object.keys(registry.get());\n\t\t\t\t},\n\t\t\t\tpending: function() {\n\t\t\t\t\treturn functionIterate(registry.get(), addPending, []);\n\t\t\t\t},\n\t\t\t\tresolved: function() {\n\t\t\t\t\treturn functionIterate(registry.get(), addResolved, []);\n\t\t\t\t},\n\t\t\t\trejected: function() {\n\t\t\t\t\treturn functionIterate(registry.get(), addRejected, []);\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\treturn ClassDependency;\n\t\t}());\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tfunctionResolveUrl, functionEscapeRegex, functionIterate\n\t\t*/\n\t\t\n\t\t//=require function/resolveUrl.js\n\t\t//=require function/escapeRegex.js\n\t\t//=require function/iterate.js\n\t\t\n\t\tvar ClassPattern = (function() {\n\t\t\tvar regexMatchTrailingSlash = /(.+)\\/$/;\n\t\t\n\t\t\tfunction setProperty(property, value) {\n\t\t\t\tthis[property] = {\n\t\t\t\t\turl: functionResolveUrl(value).replace(regexMatchTrailingSlash, '$1'),\n\t\t\t\t\tmatch: new RegExp('^' + functionEscapeRegex(value))\n\t\t\t\t};\n\t\t\t}\n\t\t\n\t\t\tfunction ClassPattern(pattern, url) {\n\t\t\t\tvar self = this;\n\t\t\n\t\t\t\tself.weight = pattern.length;\n\t\t\t\tself.match = new RegExp('^' + functionEscapeRegex(pattern));\n\t\t\t\tself.location = [].concat(url);\n\t\t\n\t\t\t\tfunctionIterate(self.location, setProperty, self.location);\n\t\t\t}\n\t\t\n\t\t\tClassPattern.prototype = {\n\t\t\t\t/* only for reference\n\t\t\t\t weight: 0,\n\t\t\t\t match: NULL,\n\t\t\t\t location: NULL,\n\t\t\t\t */\n\t\t\t\tmatches: function(path) {\n\t\t\t\t\treturn this.match.test(path);\n\t\t\t\t},\n\t\t\t\tprocess: function(path, index) {\n\t\t\t\t\tvar current = this.location[index];\n\t\t\n\t\t\t\t\tif(current) {\n\t\t\t\t\t\treturn path.replace(this.match, current.url);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\treturn ClassPattern;\n\t\t}());\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tDEMAND_ID, EVENT_PRE_REQUEST, EVENT_POST_REQUEST, ERROR_LOAD,\n\t\t\tregexIsAbsoluteUri,\n\t\t\tlinkElement,\n\t\t\tfunctionIterate, functionResolveUrl, functionGetTimestamp,\n\t\t\tClassXhr, ClassFailure,\n\t\t\tsingletonEvent\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require variables.js\n\t\t//=require shortcuts.js\n\t\t//=require function/resolveUrl.js\n\t\t//=require function/iterate.js\n\t\t//=require singleton/event.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tTRUE,\n\t\t\tregexMatchBaseUrl,\n\t\t\tClassPledge\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require shortcuts.js\n\t\t//=require variables.js\n\t\t//=require class/pledge.js\n\t\t\n\t\tvar ClassXhr = (function(XMLHttpRequest) {\n\t\t\tvar XDomainRequest = 'XDomainRequest' in global && global.XDomainRequest || XMLHttpRequest;\n\t\t\n\t\t\tfunction checkState() {\n\t\t\t\tif(this.readyState < 4) {\n\t\t\t\t\tthis.abort();\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn function ClassXhr(url) {\n\t\t\t\tvar dfd = ClassPledge.defer(),\n\t\t\t\t\txhr = regexMatchBaseUrl.test(url) ? new XMLHttpRequest() : new XDomainRequest(),\n\t\t\t\t\tboundCheckState = checkState.bind(xhr),\n\t\t\t\t\ttimeout = settings.timeout,\n\t\t\t\t\tpointer;\n\t\t\n\t\t\t\txhr.ontimeout = xhr.onerror = xhr.onabort = function() {\n\t\t\t\t\tdfd.reject(xhr.status);\n\t\t\t\t};\n\t\t\t\txhr.onprogress = xhr.onreadystatechange = function() {\n\t\t\t\t\tclearTimeout(pointer);\n\t\t\n\t\t\t\t\tpointer = setTimeout(boundCheckState, timeout);\n\t\t\t\t};\n\t\t\t\txhr.onload = function() {\n\t\t\t\t\tpointer = clearTimeout(pointer);\n\t\t\n\t\t\t\t\tif(!('status' in xhr) || xhr.status === 200) {\n\t\t\t\t\t\tdfd.resolve(xhr.responseText, xhr.getResponseHeader && xhr.getResponseHeader('content-type'));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdfd.reject(xhr.status);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\n\t\t\t\txhr.open('GET', url, TRUE);\n\t\t\t\txhr.send();\n\t\t\n\t\t\t\tpointer = setTimeout(boundCheckState, timeout);\n\t\t\n\t\t\t\treturn dfd.pledge;\n\t\t\t};\n\t\t}(XMLHttpRequest));\n\t\t\n\t\t//=require class/failure.js\n\t\t\n\t\tvar regexMatchEmptySearch = /^(?:\\?|)$/;\n\t\t\n\t\tfunction ClassLoader(dependency) {\n\t\t\tvar pattern;\n\t\t\n\t\t\tfunction resolve(response, type) {\n\t\t\t\tif(!type || !dependency.handler.validate || dependency.handler.validate(type)) {\n\t\t\t\t\tdependency.source = response;\n\t\t\n\t\t\t\t\tsingletonEvent.emit(EVENT_POST_REQUEST, dependency.type, dependency);\n\t\t\t\t} else {\n\t\t\t\t\tdependency.dfd.reject(new ClassFailure(ERROR_LOAD + ' (content-type)', dependency.id));\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction reject(status) {\n\t\t\t\tdependency.dfd.reject(new ClassFailure(ERROR_LOAD + (status ? ' (status)' : ''), dependency.id));\n\t\t\t}\n\t\t\n\t\t\tfunction load(location) {\n\t\t\t\tlocation = location || 0;\n\t\t\t\tdependency.url = document.createElement('a');\n\t\t\n\t\t\t\tdependency.url.href = pattern ? functionResolveUrl(pattern.process(dependency.path, location)) : dependency.path;\n\t\t\n\t\t\t\tif(dependency.invalid) {\n\t\t\t\t\tdependency.url.search += ((regexMatchEmptySearch.test(dependency.url.search)) ? '' : '&') + functionGetTimestamp();\n\t\t\t\t}\n\t\t\n\t\t\t\tsingletonEvent.emit(EVENT_PRE_REQUEST, dependency.type, dependency);\n\t\t\n\t\t\t\tnew ClassXhr(dependency.url).then(\n\t\t\t\t\tresolve,\n\t\t\t\t\t(\n\t\t\t\t\t\tpattern ?\n\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\tlocation++;\n\t\t\n\t\t\t\t\t\t\tif(pattern.location[location]) {\n\t\t\t\t\t\t\t\tload(location);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treject();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t:\n\t\t\t\t\t\treject\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\n\t\t\tif(!regexIsAbsoluteUri.test(dependency.path)) {\n\t\t\t\tfunctionIterate(settings.pattern, function(property, value) {\n\t\t\t\t\tvalue.matches(dependency.path) && (!pattern || pattern.weight < value.weight) && (pattern = value);\n\t\t\t\t});\n\t\t\t}\n\t\t\n\t\t\tload();\n\t\t}\n\t\t\n\t\t\n\t\t/*eslint no-global-assign: [2, { \"exceptions\": [\"demand\"] }]*/\n\t\tdemand = global.demand = (function() {\n\t\t\tfunction updateCacheSettings(property, value) {\n\t\t\t\tthis[property] = { weight: property.length, state: value };\n\t\t\t}\n\t\t\n\t\t\tfunction updatePatternSettings(property, value) {\n\t\t\t\tproperty !== 'base' && (this[property] = new ClassPattern(property, value));\n\t\t\t}\n\t\t\n\t\t\tfunction updateModuleSettings(property, value) {\n\t\t\t\tvar temp = this[property] = this[property] || {};\n\t\t\n\t\t\t\tsingletonEvent.emit(EVENT_PRE_CONFIGURE, property, temp);\n\t\t\n\t\t\t\tfunctionMerge(temp, value);\n\t\t\n\t\t\t\tsingletonEvent.emit(EVENT_POST_CONFIGURE, property, temp);\n\t\t\t}\n\t\t\n\t\t\tfunction demand() {\n\t\t\t\tvar dependencies = functionToArray(arguments),\n\t\t\t\t\tcontext = this !== global ? this : NULL,\n\t\t\t\t\ti = 0, uri, dfd, result;\n\t\t\t\t\n\t\t\t\tsingletonEvent.emit(EVENT_PRE_RESOLVE, NULL, dependencies, context);\n\t\t\t\t\n\t\t\t\tfor(; (uri = dependencies[i]); i++) {\n\t\t\t\t\tif(validatorIsTypeOf(uri, STRING_STRING)) {\n\t\t\t\t\t\tdependencies[i] = ClassDependency.resolve(uri, context).pledge;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdependencies[i] = (dfd = ClassPledge.defer()).pledge;\n\t\t\n\t\t\t\t\t\tdfd.resolve(uri);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(dependencies.length > 1) {\n\t\t\t\t\tresult = ClassPledge.all(dependencies);\n\t\t\t\t} else {\n\t\t\t\t\tresult = dependencies[0];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn result.always(function() {\n\t\t\t\t\tsingletonEvent.emit(EVENT_POST_RESOLVE, NULL, dependencies, context);\n\t\t\t\t});\n\t\t\t}\n\t\t\n\t\t\tdemand.configure = function(options) {\n\t\t\t\tvar cache = options.cache,\n\t\t\t\t\tversion = options.version,\n\t\t\t\t\ttimeout = options.timeout,\n\t\t\t\t\tlifetime = options.lifetime,\n\t\t\t\t\tbase = options.base,\n\t\t\t\t\tpattern = options.pattern,\n\t\t\t\t\tmodules = options.modules,\n\t\t\t\t\tpointer = settings.modules;\n\t\t\n\t\t\t\tif(validatorIsTypeOf(cache, STRING_BOOLEAN)) {\n\t\t\t\t\tsettings.cache[''] = { weight: 0, state: cache };\n\t\t\t\t} else if(validatorIsObject(cache)) {\n\t\t\t\t\tfunctionIterate(cache, updateCacheSettings, settings.cache);\n\t\t\t\t}\n\t\t\n\t\t\t\tif(validatorIsTypeOf(version, STRING_STRING)) {\n\t\t\t\t\tsettings.version = version;\n\t\t\t\t}\n\t\t\n\t\t\t\tif(validatorIsPositive(timeout)) {\n\t\t\t\t\tsettings.timeout = Math.min(Math.max(timeout, 2), 12) * 1000;\n\t\t\t\t}\n\t\t\n\t\t\t\tif(validatorIsPositive(lifetime) && lifetime > 0) {\n\t\t\t\t\tsettings.lifetime = lifetime * 1000;\n\t\t\t\t}\n\t\t\n\t\t\t\tif(validatorIsTypeOf(base, STRING_STRING) && base !== '') {\n\t\t\t\t\tsettings.pattern.base = new ClassPattern('', base);\n\t\t\t\t}\n\t\t\n\t\t\t\tif(validatorIsObject(pattern)) {\n\t\t\t\t\tfunctionIterate(pattern, updatePatternSettings, settings.pattern);\n\t\t\t\t}\n\t\t\n\t\t\t\tif(validatorIsObject(modules)) {\n\t\t\t\t\tfunctionIterate(modules, updateModuleSettings, pointer);\n\t\t\t\t}\n\t\t\n\t\t\t\treturn demand;\n\t\t\t};\n\t\t\n\t\t\tdemand.version = '{{gulp:package.version}}';\n\t\t\tdemand.on = singletonEvent.on.bind(demand);\n\t\t\tdemand.get = function(uri, context) { var dependency = ClassDependency.get(uri, context); return dependency && dependency.value; };\n\t\t\tdemand.remove = ClassDependency.remove;\n\t\t\tdemand.list = ClassDependency.list;\n\t\t\tdemand.clear = singletonCache.clear;\n\t\t\n\t\t\tsingletonEvent\n\t\t\t\t.after(EVENT_CACHE_MISS, function(dependency) {\n\t\t\t\t\tnew ClassLoader(dependency);\n\t\t\t\t})\n\t\t\t\t.after(EVENT_POST_REQUEST, function(dependency) {\n\t\t\t\t\tvar pointer = dependency.handler.onPostRequest;\n\t\t\n\t\t\t\t\tpointer && pointer(dependency);\n\t\t\t\t})\n\t\t\t\t.after(EVENT_CACHE_HIT + ' ' + EVENT_POST_REQUEST, function(dependency) {\n\t\t\t\t\tsingletonEvent.emit(EVENT_PRE_PROCESS, dependency.id, dependency);\n\t\t\t\t})\n\t\t\t\t.after(EVENT_PRE_REQUEST, function(dependency) {\n\t\t\t\t\tvar pointer = dependency.handler.onPreRequest;\n\t\t\t\n\t\t\t\t\tpointer && pointer(dependency);\n\t\t\t\t})\n\t\t\t\t.after(EVENT_PRE_PROCESS, function(dependency) {\n\t\t\t\t\tvar pointer = dependency.handler.onPreProcess;\n\t\t\t\t\t\n\t\t\t\t\tpointer && pointer(dependency);\n\t\t\t\t\t\n\t\t\t\t\tdependency.pledge.then(function() {\n\t\t\t\t\t\tsingletonEvent.emit(EVENT_POST_PROCESS, dependency.id, dependency);\n\t\t\t\t\t});\n\t\t\n\t\t\t\t\tif(dependency.enqueue === true) {\n\t\t\t\t\t\tqueue.enqueue(dependency);\n\t\t\t\t\t} else if(validatorIsInstanceOf(dependency.enqueue, ClassPledge)) {\n\t\t\t\t\t\tdependency.enqueue.then(function() { queue.enqueue(dependency); });\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\t\treturn demand;\n\t\t}());\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tSTRING_STRING, STRING_UNDEFINED, STRING_FUNCTION, ERROR_PROVIDE, ERROR_PROVIDE_ANONYMOUS, NULL,\n\t\t\tvalidatorIsTypeOf, validatorIsArray,\n\t\t\tClassDependency, ClassFailure\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require validator/isTypeOf.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tobjectPrototypeToString\n\t\t*/\n\t\t\n\t\t//=require shortcuts.js\n\t\t\n\t\t/**\n\t\t * isArray\n\t\t *\n\t\t * Check whether a given value is of type array\n\t\t *\n\t\t * @param value\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\t\n\t\tfunction validatorIsArray(value) {\n\t\t\treturn objectPrototypeToString.call(value) === '[object Array]';\n\t\t}\n\t\t//=require class/dependency.js\n\t\t//=require class/failure.js\n\t\t\n\t\t/*eslint no-global-assign: [2, { \"exceptions\": [\"provide\"] }]*/\n\t\tprovide = global.provide = function provide() {\n\t\t\tvar uri = validatorIsTypeOf(arguments[0], STRING_STRING) ? arguments[0] : NULL,\n\t\t\t\tcontext = this !== global ? this : NULL,\n\t\t\t\tdependencies = validatorIsArray(arguments[uri ? 1 : 0]) ? arguments[uri ? 1 : 0] : NULL,\n\t\t\t\tdefinition = dependencies ? arguments[uri ? 2 : 1] : arguments[uri ? 1 : 0],\n\t\t\t\tmodule, isFunction;\n\t\t\n\t\t\tif(!uri && processor.current) {\n\t\t\t\tmodule = processor.current;\n\t\t\t\turi = module.uri;\n\t\t\n\t\t\t\tprocessor.process();\n\t\t\t}\n\t\t\n\t\t\tif(uri) {\n\t\t\t\tmodule = module || new ClassDependency(uri, context);\n\t\t\t\tisFunction = validatorIsTypeOf(definition, STRING_FUNCTION);\n\t\t\n\t\t\t\tif(dependencies) {\n\t\t\t\t\tdemand\n\t\t\t\t\t\t.apply(module.path, dependencies)\n\t\t\t\t\t\t.then(\n\t\t\t\t\t\t\tfunction() { module.dfd.resolve(isFunction ? definition.apply(NULL, arguments) : definition); },\n\t\t\t\t\t\t\tfunction() { module.dfd.reject(new ClassFailure(ERROR_PROVIDE, module.id, arguments)); }\n\t\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tmodule.dfd.resolve(isFunction ? definition() : definition);\n\t\t\t\t}\n\t\t\n\t\t\t\treturn module.dfd.pledge;\n\t\t\t} else {\n\t\t\t\t/* eslint-disable no-console */\n\t\t\t\t!validatorIsTypeOf(console, STRING_UNDEFINED) && console.error(new ClassFailure(ERROR_PROVIDE_ANONYMOUS));\n\t\t\t\t/* eslint-enable no-console */\n\t\t\t}\n\t\t};\n\t\t\n\n\t// process initial configuration\n\t\tdemand.configure({ cache: TRUE, base: '/', pattern: { '/demand': functionResolveUrl(((options && options.url) || location.href) + '/../').slice(0, -1)} });\n\t\toptions && options.settings && demand.configure(options.settings);\n\n\t// include additional components\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage\n\t\t*/\n\t\t\n\t\t/**\n\t\t * hash\n\t\t *\n\t\t * Generate a hash for a given string\n\t\t *\n\t\t * @param {string} input\n\t\t *\n\t\t * @return {number}\n\t\t */\n\t\tfunction functionHash(input){\n\t\t\tvar value = 5381,\n\t\t\t\ti = input.length;\n\t\t\n\t\t\twhile(i) {\n\t\t\t\tvalue = (value * 33) ^ input.charCodeAt(--i);\n\t\t\t}\n\t\t\n\t\t\treturn value >>> 0;\n\t\t}\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tEVENT_QUEUE_ENQUEUE, EVENT_QUEUE_DEQUEUE,\n\t\t\tfunctionToArray,\n\t\t\tsingletonEvent,\n\t\t\tAbstractUuid\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require function/toArray.js\n\t\t//=require singleton/event.js\n\t\t//=require abstract/uuid.js\n\t\t\n\t\tfunction ClassQueue() {\n\t\t\tvar self = AbstractUuid.call(this);\n\t\t\n\t\t\tstorage[self.uuid] = [];\n\t\t\t\n\t\t\treturn self;\n\t\t}\n\t\t\t\n\t\tClassQueue.prototype = {\n\t\t\tenqueue: function() {\n\t\t\t\tstorage[this.uuid] = storage[this.uuid].concat(functionToArray(arguments));\n\t\t\n\t\t\t\tsingletonEvent.emit(EVENT_QUEUE_ENQUEUE, this.uuid);\n\t\t\t},\n\t\t\tdequeue: function() {\n\t\t\t\tsingletonEvent.emit(EVENT_QUEUE_DEQUEUE, this.uuid);\n\t\t\n\t\t\t\treturn storage[this.uuid].shift();\n\t\t\t},\n\t\t\tget current() {\n\t\t\t\treturn storage[this.uuid][0];\n\t\t\t},\n\t\t\tget length() {\n\t\t\t\treturn storage[this.uuid].length;\n\t\t\t}\n\t\t};\n\t\t\t\n\t\tClassQueue.extends(AbstractUuid);\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tEVENT_QUEUE_ENQUEUE, NULL,\n\t\t\tsingletonEvent,\n\t\t\tAbstractUuid\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require abstract/uuid.js\n\t\t\n\t\tfunction ClassProcessor(queue) {\n\t\t\tvar self = AbstractUuid.call(this),\n\t\t\t\tpointer = storage[self.uuid] = { queue: queue, current: NULL };\n\t\t\n\t\t\tdemand\n\t\t\t\t.on(EVENT_QUEUE_ENQUEUE + ':' + queue.uuid, function() {\n\t\t\t\t\t!pointer.current && self.process();\n\t\t\t\t});\n\t\t\t\n\t\t\treturn self;\n\t\t}\n\t\t\n\t\tClassProcessor.prototype = {\n\t\t\tprocess: function() {\n\t\t\t\tvar pointer = storage[this.uuid],\n\t\t\t\t\tcurrent;\n\t\t\n\t\t\t\tif(pointer.queue.length) {\n\t\t\t\t\tcurrent = pointer.current = pointer.queue.dequeue();\n\t\t\n\t\t\t\t\tif(!current.pledge.isRejected()) {\n\t\t current.handler.process && current.handler.process(current);\n\t\t\n\t\t return;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\tpointer.current = NULL;\n\t\t\t},\n\t\t\tget current() {\n\t\t\t\treturn storage[this.uuid].current;\n\t\t\t}\n\t\t};\n\t\t\t\n\t\tClassProcessor.extends(AbstractUuid);\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tDEMAND_ID, EVENT_PRE_REQUEST, EVENT_POST_REQUEST, TRUE,\n\t\t\tfunctionResolveSourcemaps,\n\t\t\tabstractHandler\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tregexMatchSourcemap, regexIsAbsoluteUri\n\t\t\tlinkElement\n\t\t*/\n\t\t\n\t\t//=require variables.js\n\t\t//=require shortcuts.js\n\t\t\n\t\tfunction functionResolveSourcemaps(url, source) {\n\t\t\tvar match, replacement;\n\t\t\t\n\t\t\twhile(match = regexMatchSourcemap.exec(source)) {\n\t\t\t\tlinkElement.href = url;\n\t\t\t\t\n\t\t\t\tif(regexIsAbsoluteUri.test(match[2])) {\n\t\t\t\t\treplacement = linkElement.protocol + '//' + linkElement.host + match[3];\n\t\t\t\t} else {\n\t\t\t\t\tlinkElement.pathname += '/../' + match[3];\n\t\t\t\t\t\n\t\t\t\t\treplacement = linkElement.protocol + '//' + linkElement.host + linkElement.pathname;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsource = source.replace(match[0], match[1] + ' ' + match[2] + '=' + replacement + '.map' + (match[4] ? ' ' + match[4] : ''));\n\t\t\t}\n\t\t\t\n\t\t\treturn source;\n\t\t}\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tNULL\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t\n\t\tvar abstractHandler = (function() {\n\t\t\tfunction AbstractHandler() {\n\t\t\n\t\t\t}\n\t\t\n\t\t\tAbstractHandler.prototype = {\n\t\t\t\tvalidate: NULL,\n\t\t\t\tonPreRequest: NULL,\n\t\t\t\tonPostRequest: NULL,\n\t\t\t\tonPreProcess: NULL,\n\t\t\t\tprocess: NULL\n\t\t\t};\n\t\t\n\t\t\treturn AbstractHandler;\n\t\t}());\n\t\t\n\t\tvar handlerModule = (function() {\n\t\t\tvar suffix = '.js',\n\t\t\t\ttarget = document.getElementsByTagName('head')[0],\n\t\t\t\tregexMatchType = /^(application|text)\\/(x-)?javascript/;\n\t\t\n\t\t\tfunction HandlerModule() {}\n\t\t\n\t\t\tHandlerModule.prototype = {\n\t\t\t\tvalidate: function(type) {\n\t\t\t\t\treturn regexMatchType.test(type);\n\t\t\t\t},\n\t\t\t\tonPreRequest: function(dependency) {\n\t\t\t\t\tvar pathname = dependency.url.pathname;\n\t\t\t\t\t\n\t\t\t\t\tdependency.url.pathname = pathname.slice(-suffix.length) !== suffix ? pathname + suffix : pathname;\n\t\t\t\t},\n\t\t\t\tonPostRequest: function(dependency) {\n\t\t\t\t\tdependency.source = functionResolveSourcemaps(dependency.url, dependency.source);\n\t\t\t\t},\n\t\t\t\tprocess: function(dependency) {\n\t\t\t\t\tvar script;\n\t\t\n\t\t\t\t\tif(dependency.source) {\n\t\t\t\t\t\tscript = document.createElement('script');\n\t\t\t\t\t\tscript.async = TRUE;\n\t\t\t\t\t\tscript.text = dependency.source;\n\t\t\n\t\t\t\t\t\tscript.setAttribute(DEMAND_ID + '-id', dependency.id);\n\t\t\n\t\t\t\t\t\ttarget.appendChild(script);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\treturn new (HandlerModule.extends(abstractHandler));\n\t\t}());\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tMODULE_PREFIX_HANDLER, EVENT_POST_CONFIGURE, ERROR_RESOLVE, MOCK_PREFIX, STRING_STRING, FALSE, TRUE,\n\t\t\tregexMatchParameter, regexMatchSourcemap,\n\t\t\tvalidatorIsTypeOf, validatorIsObject,\n\t\t\tfunctionIterate, functionResolveId,\n\t\t\tabstractHandler,\n\t\t\tClassDependency, ClassPledge, ClassFailure,\n\t\t\thandlerModule\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require variables.js\n\t\t//=require validator/isTypeOf.js\n\t\t//=require validator/isObject.js\n\t\t//=require function/iterate.js\n\t\t//=require function/resolveId.js\n\t\t//=require abstract/handler.js\n\t\t//=require class/dependency.js\n\t\t//=require class/pledge.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tDEMAND_ID,\n\t\t\tfunctionToArray\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require function/toArray.js\n\t\t\n\t\tfunction ClassFailure(message, module, stack) {\n\t\t\tvar self = this;\n\t\t\t\n\t\t\tself.message = message;\n\t\t\t\t\n\t\t\tmodule && (self.module = module);\n\t\t\tstack && (self.stack = functionToArray(stack));\n\t\t\t\n\t\t\treturn self;\n\t\t}\n\t\t\t\n\t\tClassFailure.prototype = {\n\t\t\t/* only for reference\n\t\t\t message: NULL,\n\t\t\t module: NULL,\n\t\t\t stack: NULL,\n\t\t\t */\n\t\t\ttoString: function() {\n\t\t\t\tvar self = this,\n\t\t\t\t\tresult = DEMAND_ID + ': ' + self.message + ' ' + (self.module ? '\"' + self.module + '\"' : '');\n\t\t\n\t\t\t\tif(self.stack) {\n\t\t\t\t\tresult = ClassFailure.traverse(self.stack, result, 1);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn result;\n\t\t\t}\n\t\t};\n\t\t\t\n\t\tClassFailure.traverse = function(stack, value, depth) {\n\t\t\tvar indention = new Array(depth + 1).join(' '),\n\t\t\t\ti = 0, item;\n\t\t\t\t\n\t\t\tfor(; item = stack[i]; i++) {\n\t\t\t\tvalue += '\\n' + indention + '> ' + item.message + ' ' + (item.module ? '\"' + item.module + '\"' : '');\n\t\t\t\t\t\n\t\t\t\tif(item.stack) {\n\t\t\t\t\tvalue = ClassFailure.traverse(item.stack, value, depth + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\treturn value;\n\t\t};\n\t\t//=require handler/module.js\n\t\t\n\t\tvar handlerBundle = (function() {\n\t\t\tvar path = MODULE_PREFIX_HANDLER + 'bundle',\n\t\t\t\tsettings = {};\n\t\t\n\t\t\tdemand\n\t\t\t\t.on(EVENT_POST_CONFIGURE + ':' + path, function(options) {\n\t\t\t\t\tif(validatorIsObject(options)) {\n\t\t\t\t\t\tsettings = options;\n\t\t\n\t\t\t\t\t\tfunctionIterate(settings, updateDependencies);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\t\tfunction updateDependencies(uri, dependencies) {\n\t\t\t\tvar i, dependency;\n\t\t\n\t\t\t\tfor(i = 0; (dependency = dependencies[i]); i++) {\n\t\t\t\t\tif(validatorIsTypeOf(dependency, STRING_STRING)) {\n\t\t\t\t\t\tdependencies[i] = functionResolveId(dependency);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction getType(dependencies) {\n\t\t\t\tvar type, i = 0, temp;\n\t\t\n\t\t\t\tfor(; (temp = dependencies[i]); i++) {\n\t\t\t\t\ttemp = temp.match(regexMatchParameter);\n\t\t\t\t\ttemp = (temp && temp[3]) || settings.handler;\n\t\t\n\t\t\t\t\tif(type) {\n\t\t\t\t\t\tif(temp !== type) {\n\t\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttype = temp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\treturn type;\n\t\t\t}\n\t\t\n\t\t\tfunction HandlerBundle() {}\n\t\t\n\t\t\tHandlerBundle.prototype = {\n\t\t\t\tvalidate: handlerModule.validate,\n\t\t\t\tonPreProcess: function(dependency) {\n\t\t\t\t\tvar source = dependency.source,\n\t\t\t\t\t\tdfd = dependency.dfd,\n\t\t\t\t\t\tdependencies = settings[dependency.path],\n\t\t\t\t\t\ttype, match, pledges, temp, i;\n\t\t\n\t\t\t\t\tdependency.enqueue = FALSE;\n\t\t\n\t\t\t\t\tfunction reject() {\n\t\t\t\t\t\tdfd.reject(new ClassFailure(ERROR_RESOLVE, dependency.id, arguments));\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tif(dependencies && (type = getType(dependencies))) {\n\t\t\t\t\t\twhile(match = regexMatchSourcemap.exec(source)) {\n\t\t\t\t\t\t\tsource = source.replace(match[0], '');\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\tdependency.source = source;\n\t\t\t\t\t\tpledges = [];\n\t\t\n\t\t\t\t\t\tfor(i = 0; (temp = dependencies[i]); i++) {\n\t\t\t\t\t\t\tpledges.push(ClassDependency.resolve(MOCK_PREFIX + temp).pledge);\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\tClassPledge.all(pledges).then(\n\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\tpledges.length = 0;\n\t\t\n\t\t\t\t\t\t\t\tfor(i = 0; (temp = dependencies[i]); i++) {\n\t\t\t\t\t\t\t\t\ttemp = dependencies[i] = ClassDependency.get(temp) || new ClassDependency(temp);\n\t\t\t\t\t\t\t\t\ttemp.handler = arguments[i];\n\t\t\n\t\t\t\t\t\t\t\t\tpledges.push(temp.pledge);\n\t\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t\tif(type === 'module') {\n\t\t\t\t\t\t\t\t\tqueue.enqueue.apply(queue, dependencies);\n\t\t\t\t\t\t\t\t\thandlerModule.process(dependency);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\thandlerModule.process(dependency);\n\t\t\t\t\t\t\t\t\tqueue.enqueue.apply(queue, dependencies);\n\t\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t\tClassPledge.all(pledges).then(dfd.resolve, reject);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\treject\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treject();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\treturn new (HandlerBundle.extends(abstractHandler));\n\t\t}());\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tFALSE, EVENT_POST_REQUEST, ERROR_RESOLVE,\n\t\t\tfunctionResolveSourcemaps,\n\t\t\tabstractHandler,\n\t\t\tClassDependency, ClassPledge, ClassFailure\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require function/resolveSourcemaps.js\n\t\t//=require abstract/handler.js\n\t\t//=require class/dependency.js\n\t\t//=require class/pledge.js\n\t\t//=require class/Failure.js\n\t\t\n\t\tvar handlerComponent = (function() {\n\t\t\tvar suffix = '.html',\n\t\t\t\tregexMatchType = /^text\\/.+$/;\n\t\t\n\t\t\tfunction HandlerComponent() {}\n\t\t\n\t\t\tHandlerComponent.prototype = {\n\t\t\t\tvalidate: function(type) {\n\t\t\t\t\treturn regexMatchType.test(type);\n\t\t\t\t},\n\t\t\t\tonPreRequest: function(dependency) {\n\t\t\t\t\tvar pathname = dependency.url.pathname;\n\t\t\t\t\t\n\t\t\t\t\tdependency.url.pathname = pathname.slice(-suffix.length) !== suffix ? pathname + suffix : pathname;\n\t\t\t\t},\n\t\t\t\tonPostRequest: function(dependency) {\n\t\t\t\t\tdependency.source = functionResolveSourcemaps(dependency.url, dependency.source);\n\t\t\t\t},\n\t\t\t\tonPreProcess: function(dependency) {\n\t\t\t\t\tvar context = dependency.path,\n\t\t\t\t\t\tdfd = dependency.dfd,\n\t\t\t\t\t\tcontainer = document.createElement('body'),\n\t\t\t\t\t\tmodules = [],\n\t\t\t\t\t\tpledges = [],\n\t\t\t\t\t\tnode, handler, path, uri;\n\t\t\n\t\t\t\t\tdependency.enqueue = FALSE;\n\t\t\t\t\tcontainer.innerHTML = dependency.source;\n\t\t\n\t\t\t\t\tfunction reject() {\n\t\t\t\t\t\tdfd.reject(new ClassFailure(ERROR_RESOLVE, dependency.id, arguments));\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\twhile(node = container.firstElementChild) {\n\t\t\t\t\t\tif(handler = node.getAttribute('type')) {\n\t\t\t\t\t\t\tpath = node.getAttribute('path');\n\t\t\t\t\t\t\turi = handler + '!' + context + (path ? '/' + path : '');\n\t\t\n\t\t\t\t\t\t\tnode.parentNode.removeChild(node);\n\t\t\t\t\t\t\tmodules.push({ source: node.textContent, uri: uri });\n\t\t\t\t\t\t\tpledges.push(ClassDependency.resolve('mock:' + uri).pledge);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tClassPledge.all(pledges).then(\n\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\tvar i = 0, module, dependency;\n\t\t\n\t\t\t\t\t\t\tpledges.length = 0;\n\t\t\n\t\t\t\t\t\t\tfor(; (module = modules[i]); i++) {\n\t\t\t\t\t\t\t\tdependency = ClassDependency.get(module.uri) || new ClassDependency(module.uri);\n\t\t\t\t\t\t\t\tdependency.source = functionResolveSourcemaps(dependency.url, module.source);\n\t\t\t\t\t\t\t\tdependency.handler = arguments[i];\n\t\t\n\t\t\t\t\t\t\t\tpledges.push(dependency.pledge);\n\t\t\n\t\t\t\t\t\t\t\tqueue.enqueue(dependency);\n\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\tClassPledge.all(pledges).then(dfd.resolve, reject);\n\t\t\t\t\t\t},\n\t\t\t\t\t\treject\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\treturn new (HandlerComponent.extends(abstractHandler));\n\t\t}());\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\t\t\tMODULE_PREFIX_PLUGIN, MODULE_PREFIX_HANDLER, EVENT_POST_CONFIGURE, EVENT_PRE_RESOLVE, STRING_STRING, ERROR_RESOLVE, FALSE, TRUE,\n\t\t\tregexMatchInternal,\n\t\t\tvalidatorIsObject, validatorIsTypeOf,\n\t\t\tfunctionIterate, functionHash,\n\t\t\tClassDependency, ClassFailure,\n\t\t\tsingletonCache\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require variables.js\n\t\t//=require validator/isTypeOf.js\n\t\t//=require validator/isObject.js\n\t\t//=require function/iterate.js\n\t\t//=require function/hash.js\n\t\t//=require class/dependency.js\n\t\t//=require class/failure.js\n\t\t//=require singleton/cache.js\n\t\t\n\t\tvar pluginGenie = (function() {\n\t\t\tvar path = MODULE_PREFIX_PLUGIN + 'genie',\n\t\t\t\tpattern = [];\n\t\t\n\t\t\tfunction matchPattern(path) {\n\t\t\t\tvar i = 0, pointer, match;\n\t\t\n\t\t\t\tfor(; (pointer = pattern[i]); i++) {\n\t\t\t\t\tif(path.indexOf(pointer.prefix) === 0 && (!match || pointer.weight > match.weight)) {\n\t\t\t\t\t\tmatch = pointer;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\treturn match;\n\t\t\t}\n\t\t\n\t\t\tfunction generateConfiguration(bundle) {\n\t\t\t\tvar matches = bundle.matches,\n\t\t\t\t\tconfiguration = { pattern: {}, modules: { '/demand/handler/bundle': {} } },\n\t\t\t\t\ti = 0, pointer, dependency;\n\t\t\n\t\t\t\tconfiguration.pattern[bundle.id] = bundle.fn(matches);\n\t\t\t\tconfiguration.modules[MODULE_PREFIX_HANDLER + 'bundle'][bundle.id] = pointer = [];\n\t\t\n\t\t\t\tfor(; (dependency = matches[i]); i++) {\n\t\t\t\t\tpointer.push(dependency.path);\n\t\t\t\t}\n\t\t\n\t\t\t\treturn configuration;\n\t\t\t}\n\t\t\n\t\t\tfunction resolveDependencies() {\n\t\t\t\tvar i = 0, dependency;\n\t\t\n\t\t\t\tfor(; (dependency = this[i]); i++) {\n\t\t\t\t\tdependency.dfd.resolve(arguments[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction rejectDependencies() {\n\t\t\t\tvar i = 0, dependency;\n\t\t\n\t\t\t\tfor(; (dependency = this[i]); i++) {\n\t\t\t\t\tdependency.dfd.reject(new ClassFailure(ERROR_RESOLVE, dependency.id));\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction addPattern(property, value) {\n\t\t\t\tpattern.push({ prefix: property, weight: property.length, fn: value });\n\t\t\t}\n\t\t\n\t\t\tfunction resolveBundles(property, value) {\n\t\t\t\tvar matches = value.matches,\n\t\t\t\t\ti = 0, dependency;\n\t\t\n\t\t\t\tif(matches.length > 1) {\n\t\t\t\t\tvalue.id = path + '/' + functionHash(JSON.stringify(value.matches));\n\t\t\n\t\t\t\t\tfor(; (dependency = matches[i]); i++) {\n\t\t\t\t\t\tmatches[i] = new ClassDependency(dependency.uri);\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tdemand.configure(generateConfiguration(value));\n\t\t\t\t\tdemand('bundle!' + value.id)\n\t\t\t\t\t\t.then(\n\t\t\t\t\t\t\tresolveDependencies.bind(matches),\n\t\t\t\t\t\t\trejectDependencies.bind(matches)\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tdemand\n\t\t\t\t.on(EVENT_POST_CONFIGURE + ':' + path, function(options) {\n\t\t\t\t\tif(validatorIsObject(options)) {\n\t\t\t\t\t\tpattern.length = 0;\n\t\t\n\t\t\t\t\t\tfunctionIterate(options, addPattern);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.on(EVENT_PRE_RESOLVE, function(dependencies, context) {\n\t\t\t\t\tvar bundles = {},\n\t\t\t\t\t\ti = 0, dependency, pattern;\n\t\t\n\t\t\t\t\tfor(; (dependency = dependencies[i]); i++) {\n\t\t\t\t\t\tif(validatorIsTypeOf(dependency, STRING_STRING) && !regexMatchInternal.test(dependency) && !ClassDependency.get(dependency, context)) {\n\t\t\t\t\t\t\tdependency = new ClassDependency(dependency, context, FALSE);\n\t\t\n\t\t\t\t\t\t\tif(dependency.type === 'module' && (pattern = matchPattern(dependency.path)) && !singletonCache.get(dependency)) {\n\t\t\t\t\t\t\t\t(bundles[pattern.prefix] || (bundles[pattern.prefix] = { fn: pattern.fn, matches: [] })).matches.push(dependency);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tfunctionIterate(bundles, resolveBundles);\n\t\t\t\t});\n\t\t\n\t\t\treturn TRUE;\n\t\t}());\n\n\t// initialize\n\t\tqueue = new ClassQueue();\n\t\tprocessor = new ClassProcessor(queue);\n\n\t\tfunction assignModule(id, module) {\n\t\t\tprovide(id, function() { return module; });\n\t\t}\n\n\t\tassignModule(MODULE_PREFIX_ABSTRACT + 'uuid', AbstractUuid);\n\t\tassignModule(MODULE_PREFIX_ABSTRACT + 'handler', abstractHandler);\n\t\tassignModule(MODULE_PREFIX_HANDLER + 'module', handlerModule);\n\t\tassignModule(MODULE_PREFIX_HANDLER + 'bundle', handlerBundle);\n\t\tassignModule(MODULE_PREFIX_HANDLER + 'component', handlerComponent);\n\t\tassignModule(MODULE_PREFIX_PLUGIN + 'genie', pluginGenie);\n\t\tassignModule(MODULE_PREFIX_VALIDATOR + 'isTypeOf', validatorIsTypeOf);\n\t\tassignModule(MODULE_PREFIX_VALIDATOR + 'isArray', validatorIsArray);\n\t\tassignModule(MODULE_PREFIX_VALIDATOR + 'isObject', validatorIsObject);\n\t\tassignModule(MODULE_PREFIX_VALIDATOR + 'isInstanceOf', validatorIsInstanceOf);\n\t\tassignModule(MODULE_PREFIX_FUNCTION + 'resolveUrl', functionResolveUrl);\n\t\tassignModule(MODULE_PREFIX_FUNCTION + 'resolveSourcemaps', functionResolveSourcemaps);\n\t\tassignModule(MODULE_PREFIX_FUNCTION + 'merge', functionMerge);\n\t\tassignModule(MODULE_PREFIX_FUNCTION + 'iterate', functionIterate);\n\t\tassignModule(MODULE_PREFIX_FUNCTION + 'hash', functionHash);\n\t\tassignModule(MODULE_PREFIX_FUNCTION + 'defer', functionDefer);\n\t\tassignModule(MODULE_PREFIX_FUNCTION + 'uuid', functionUuid);\n\t\tassignModule(MODULE_PREFIX + 'descriptor', ClassDescriptor);\n\t\tassignModule(MODULE_PREFIX + 'pledge', ClassPledge);\n\t\tassignModule(MODULE_PREFIX + 'queue', ClassQueue);\n\t\tassignModule(MODULE_PREFIX + 'xhr', ClassXhr);\n\t\tassignModule(MODULE_PREFIX + 'failure', ClassFailure);\n\n\t\tif(options && options.main) {\n\t\t\tswitch(typeof options.main) {\n\t\t\t\tcase STRING_STRING:\n\t\t\t\t\tdemand(options.main);\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase STRING_FUNCTION:\n\t\t\t\t\tprovide('main', options.main());\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n}(this.name === 'demand-loader' ? parent : this, setTimeout, clearTimeout));","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage\n*/\n\nvar DEMAND_ID = 'demand',\n\tPROVIDE_ID = 'provide',\n\tPATH_ID = 'path',\n\tMODULE_PREFIX = '/' + DEMAND_ID + '/',\n\tMODULE_PREFIX_ABSTRACT = MODULE_PREFIX + 'abstract/',\n\tMODULE_PREFIX_HANDLER = MODULE_PREFIX + 'handler/',\n\tMODULE_PREFIX_PLUGIN = MODULE_PREFIX + 'plugin/',\n\tMODULE_PREFIX_FUNCTION = MODULE_PREFIX + 'function/',\n\tMODULE_PREFIX_VALIDATOR = MODULE_PREFIX + 'validator/',\n\tMOCK_PREFIX = 'mock:',\n\tNULL = null,\n\tUNDEFINED = undefined,\n\tFALSE = false,\n\tTRUE = true,\n\tSTRING_UNDEFINED = 'undefined',\n\tSTRING_STRING = 'string',\n\tSTRING_BOOLEAN = 'boolean',\n\tSTRING_OBJECT = 'object',\n\tSTRING_FUNCTION = 'function',\n\tSTRING_NUMBER = 'number',\n\tFUNCTION_EMPTY = function() {},\n\tEVENT_PREFIX = 'pre',\n\tEVENT_POSTFIX = 'post',\n\tEVENT_CONFIGURE = 'Configure',\n\tEVENT_PRE_CONFIGURE = EVENT_PREFIX + EVENT_CONFIGURE,\n\tEVENT_POST_CONFIGURE = EVENT_POSTFIX + EVENT_CONFIGURE,\n\tEVENT_CACHE = 'cache',\n\tEVENT_CACHE_MISS = EVENT_CACHE + 'Miss',\n\tEVENT_CACHE_HIT = EVENT_CACHE + 'Hit',\n\tEVENT_CACHE_CLEAR = EVENT_CACHE + 'Clear',\n\tEVENT_CACHE_EXCEED = EVENT_CACHE + 'Exceed',\n\tEVENT_PRE_CACHE = EVENT_PREFIX + 'Cache',\n\tEVENT_POST_CACHE = EVENT_POSTFIX + 'Cache',\n\tEVENT_RESOLVE = 'Resolve',\n\tEVENT_PRE_RESOLVE = EVENT_PREFIX + EVENT_RESOLVE,\n\tEVENT_POST_RESOLVE = EVENT_POSTFIX + EVENT_RESOLVE,\n\tEVENT_REQUEST = 'Request',\n\tEVENT_PRE_REQUEST = EVENT_PREFIX + EVENT_REQUEST,\n\tEVENT_POST_REQUEST = EVENT_POSTFIX + EVENT_REQUEST,\n\tEVENT_PROCESS = 'Process',\n\tEVENT_PRE_PROCESS = EVENT_PREFIX + EVENT_PROCESS,\n\tEVENT_POST_PROCESS = EVENT_POSTFIX + EVENT_PROCESS,\n\tEVENT_QUEUE = 'queue',\n\tEVENT_QUEUE_ENQUEUE = EVENT_QUEUE + 'Enqueue',\n\tEVENT_QUEUE_DEQUEUE = EVENT_QUEUE + 'Dequeue',\n\tERROR_LOAD = 'error loading',\n\tERROR_PROVIDE = 'error providing',\n\tERROR_RESOLVE = 'error resolving',\n\tERROR_PROVIDE_ANONYMOUS = 'unspecified anonymous provide';\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage\n*/\n\nvar arrayPrototype = Array.prototype,\n\tarrayPrototypeSlice = arrayPrototype.slice,\n\tarrayPrototypeConcat = arrayPrototype.concat,\n\tobject = Object,\n\tobjectPrototype = object.prototype,\n\tobjectPrototypeToString = objectPrototype.toString,\n\tobjectCreate = object.create,\n\tobjectDefineProperty = object.defineProperty,\n\tobjectGetOwnPropertyNames = object.getOwnPropertyNames,\n\tobjectGetOwnPropertyDescriptor = object.getOwnPropertyDescriptor,\n\tlinkElement = document.createElement('a');","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tNULL\n*/\n\n//=require constants.js\n\nfunction ClassDescriptor(value, writable, configurable, enumerable) {\n\treturn {\n\t\t__proto__: NULL,\n\t\tvalue: value,\n\t\tenumerable: !!enumerable,\n\t\tconfigurable: !!configurable,\n\t\twritable: !!writable\n\t};\n}","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage\n*/\n\n/**\n * isTypeOf\n *\n * Check whether a given object is of specified type\n *\n * @param object\n * @param {string} type\n *\n * @return {boolean}\n */\n\nfunction validatorIsTypeOf(object, type) {\n\treturn typeof object === type;\n}","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tSTRING_OBJECT,\n\tvalidatorIsTypeOf\n*/\n\n//=require constants.js\n//=require validator/isTypeOf.js\n\n/**\n * isObject\n *\n * Check whether a given object is of type object\n *\n * @param object\n *\n * @return {boolean}\n */\n\nfunction validatorIsObject(object) {\n\treturn object && validatorIsTypeOf(object, STRING_OBJECT);\n}","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tSTRING_NUMBER,\n\tvalidatorIsTypeOf\n*/\n\n//=require constants.js\n//=require validator/isTypeOf.js\n\n/**\n * isPositive\n *\n * Check whether a given value is a positive integer\n *\n * @param value\n *\n * @return {boolean}\n */\n\nfunction validatorIsPositive(value) {\n\treturn validatorIsTypeOf(value, STRING_NUMBER) && isFinite(value) && Math.floor(value) === value && value >= 0;\n}","/**\n * isInstanceOf\n *\n * Check whether a given object is an instance of specified type\n *\n * @param object\n * @param module\n *\n * @return {boolean}\n */\nfunction validatorIsInstanceOf(object, module) {\n\treturn object instanceof module;\n}","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tUNDEFINED, FALSE,\n\tobject\n*/\n\n//=require constants.js\n//=require shortcuts.js\n\n/**\n * iterate\n *\n * Iterate over enumerable & own properties of a given\n * object and pass current property as well as its value\n * to a callback function\n *\n * @param {object} object\n * @param {function} callback\n * @param context\n *\n * @return mixed\n */\n\nfunction functionIterate(source, callback, context) {\n\tvar properties = object.keys(source),\n\t\ti = 0, property;\n\n\tfor(; (property = properties[i]) !== UNDEFINED; i++) {\n\t\tif(callback.call(context, property, source[property]) === FALSE) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn context;\n}","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tTRUE,\n\tobjectCreate, objectDefineProperty, objectGetOwnPropertyNames, objectGetOwnPropertyDescriptor,\n\tClassDescriptor\n*/\n\n//=require constants.js\n//=require shortcuts.js\n//=require class/descriptor.js\n\n(function(strPrototype) {\n\tvar descriptor;\n\n\tfunction functionExtends(source) {\n\t\tvar self = this,\n\t\t\tprototype = self[strPrototype],\n\t\t\tnames = objectGetOwnPropertyNames(prototype),\n\t\t\tproperties = { constructor: new ClassDescriptor(self, TRUE, TRUE)},\n\t\t\ti = 0, property;\n\n\t\tfor(; (property = names[i]) && !properties[property]; i++) {\n\t\t\tproperties[property] = objectGetOwnPropertyDescriptor(prototype, property);\n\t\t}\n\n\t\ttry {\n\t\t\tself[strPrototype] = objectCreate(source[strPrototype] || source, properties);\n\t\t} catch(e) {\n\t\t\t// ES6 class prototypes are readonly at least in Chrome\n\t\t\t// (and assignment throws an error in strict mode) ...\n\t\t}\n\n\t\t// ... which is handled here\n\t\tif(self[strPrototype] === prototype) {\n\t\t\tthrow new TypeError('Unable to extend, prototype is not writable');\n\t\t}\n\n\t\treturn self;\n\t}\n\n\tdescriptor = new ClassDescriptor(functionExtends);\n\n\tobjectDefineProperty(Function.prototype, 'extends', descriptor);\n\tobjectDefineProperty(global.Function.prototype, 'extends', descriptor);\n}('prototype'));\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tUNDEFINED,\n\tvalidatorIsObject,\n\tfunctionIterate\n*/\n\n//=require constants.js\n//=require validator/isObject.js\n//=require function/iterate.js\n\n/**\n * merge\n *\n * Merge two or more objects into the first one passed in\n *\n * @param {...object} object\n *\n * @return {object}\n */\nvar functionMerge = (function() {\n\tfunction mergeProperties(property, value) {\n\t\tvar targetProperty = this[property],\n\t\t\ttargetPropertyIsObject;\n\n\t\tif(value !== UNDEFINED) {\n\t\t\tif(validatorIsObject(value)) {\n\t\t\t\ttargetPropertyIsObject = validatorIsObject(targetProperty);\n\n\t\t\t\tif(value.length !== UNDEFINED) {\n\t\t\t\t\ttargetProperty = (targetPropertyIsObject && targetProperty.length !== UNDEFINED) ? targetProperty : [];\n\t\t\t\t} else {\n\t\t\t\t\ttargetProperty = (targetPropertyIsObject && targetProperty.length === UNDEFINED) ? targetProperty : {};\n\t\t\t\t}\n\n\t\t\t\tthis[property] = functionMerge(targetProperty, value);\n\t\t\t} else {\n\t\t\t\tthis[property] = value;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn function functionMerge() {\n\t\tvar target = arguments[0],\n\t\t\ti = 1, properties;\n\n\t\tfor(; (properties = arguments[i]) !== UNDEFINED; i++) {\n\t\t\tfunctionIterate(properties, mergeProperties, target);\n\t\t}\n\n\t\treturn target;\n\t};\n}());","/**\n * Based on setAsap:\n * Repo: https://github.com/taylorhakes/setAsap\n * License: https://github.com/taylorhakes/setAsap/blob/master/LICENSE\n */\n\n/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tNULL, TRUE, FALSE,\n\tfunctionUuid\n*/\n\n//=require constants.js\n//=require shortcuts.js\n//=require function/uuid.js\n\n/**\n * defer\n *\n * delay function execution like setImmediate does\n *\n * @param {function} function\n */\nvar functionDefer = (function() {\n\tvar hasSetImmediate = 'setImmediate' in global,\n\t\telement, fallback;\n\n\tif('MutationObserver' in global) {\n\t\treturn function functionDefer(fn) {\n\t\t\telement = document.createElement('div');\n\n\t\t\tnew MutationObserver(function() { fn(); })\n\t\t\t\t.observe(element, { attributes: TRUE });\n\n\t\t\telement.setAttribute('i', '1');\n\t\t};\n\t}\n\n\tif(!hasSetImmediate && 'postMessage' in global && !('importScripts' in global) && 'addEventListener' in global) {\n\t\treturn (function() {\n\t\t\tfunction onMessage(event) {\n\t\t\t\tif(event.source === global && event.data && storage[event.data]) {\n\t\t\t\t\tstorage[event.data]();\n\n\t\t\t\t\tdelete storage[event.data];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tglobal.addEventListener('message', onMessage, FALSE);\n\n\t\t\treturn function functionDefer(fn) {\n\t\t\t\tvar uuid = functionUuid();\n\n\t\t\t\tstorage[uuid] = fn;\n\n\t\t\t\tglobal.postMessage(uuid, '*');\n\t\t\t};\n\t\t}());\n\t}\n\n\tif(!hasSetImmediate && 'onreadystatechange' in (element = document.createElement('script'))) {\n\t\treturn function functionDefer(fn) {\n\t\t\telement.onreadystatechange = function onreadystatechange() {\n\t\t\t\telement.onreadystatechange = NULL;\n\t\t\t\telement.parentNode.removeChild(element);\n\n\t\t\t\tfn();\n\t\t\t};\n\n\t\t\tdocument.body.appendChild(element);\n\t\t};\n\t}\n\n\t/* eslint-disable no-undef */\n\tfallback = hasSetImmediate ? setImmediate : setTimeout;\n\t/* eslint-enable no-undef */\n\n\treturn function functionDefer(fn) {\n\t\tfallback(fn);\n\t};\n}());","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage\n*/\n\nvar functionUuid = (function() {\n\tvar regex = new RegExp('[xy]', 'g'),\n\t\tstorage = {};\n\n\tfunction randomize(character) {\n\t\tvar r = Math.random() * 16 | 0;\n\n\t\treturn ((character === 'x') ? r : (r & 0x3 | 0x8)).toString(16);\n\t}\n\n\treturn function functionUuid() {\n\t\tvar uuid;\n\n\t\tdo {\n\t\t\tuuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(regex, randomize);\n\t\t} while(storage[uuid]);\n\n\t\tstorage[uuid] = 1;\n\n\t\treturn uuid;\n\t};\n}());","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tarrayPrototypeSlice\n*/\n\n//=require shortcuts.js\n\nfunction functionToArray(arrayLikeObject, start, end) {\n\treturn arrayPrototypeSlice.call(arrayLikeObject, start, end);\n}","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tNULL, STRING_STRING, STRING_FUNCTION, EVENT_POST_CONFIGURE,\n\tvalidatorIsTypeOf,\n\tfunctionToArray\n*/\n\n//=require constants.js\n//=require validator/isTypeOf.js\n//=require function/toArray.js\n\nvar singletonEvent = (function() {\n\tvar TYPE_ON = 'on',\n\t\tTYPE_AFTER = 'after',\n\t\tregexMatchEvent = /^cache(Miss|Hit|Clear|Exceed)|queue(En|De)queue|(pre|post)(Resolve|Configure|Request|Process|Cache)$/,\n\t\tlistener = {};\n\n\tfunction addListener(type, events, callback) {\n\t\tvar event, pointer;\n\n\t\tif(validatorIsTypeOf(events, STRING_STRING) && validatorIsTypeOf(callback, STRING_FUNCTION)) {\n\t\t\tevents = events.split(' ');\n\n\t\t\twhile(event = events.shift()) {\n\t\t\t\tevent = event.split(':');\n\n\t\t\t\tif(regexMatchEvent.test(event[0])) {\n\t\t\t\t\t(listener[event[0]] || (listener[event[0]] = { on: [], after: [] }))[type].push({ callback: callback, filter: event[1] });\n\n\t\t\t\t\tif(type === TYPE_ON && event[0] === EVENT_POST_CONFIGURE && (pointer = settings.modules[event[1]])) {\n\t\t\t\t\t\tcallback(pointer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction Event() {}\n\n\tEvent.prototype = {\n\t\temit: function (event, filter) {\n\t\t\tvar pointer = listener[event],\n\t\t\t\tparameter, i, item;\n\n\t\t\tif(pointer) {\n\t\t\t\tparameter = functionToArray(arguments, 2);\n\n\t\t\t\tfor(i = 0; (item = pointer[TYPE_ON][i]); i++) {\n\t\t\t\t\tif(!item.filter || item.filter === filter) {\n\t\t\t\t\t\titem.callback.apply(NULL, parameter);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor(i = 0; (item = pointer[TYPE_AFTER][i]); i++) {\n\t\t\t\t\tif(!item.filter || item.filter === filter) {\n\t\t\t\t\t\titem.callback.apply(NULL, parameter);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\ton: function(events, callback) {\n\t\t\taddListener(TYPE_ON, events, callback);\n\n\t\t\treturn this;\n\t\t},\n\t\tafter: function(events, callback) {\n\t\t\taddListener(TYPE_AFTER, events, callback);\n\n\t\t\treturn this;\n\t\t}\n\t};\n\n\treturn new Event();\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage\n*/\n\nfunction functionGetTimestamp() {\n\treturn +new Date();\n}\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage\n*/\n\nvar functionEscapeRegex = (function() {\n\t// eslint-disable-next-line no-useless-escape\n\tvar regexMatchRegex = /[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g;\n\n\treturn function functionEscapeRegex(value) {\n\t\treturn value.replace(regexMatchRegex, '\\\\$&');\n\t};\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tlinkElement\n*/\n\n//=require shortcuts.js\n\nfunction functionResolveUrl(url) {\n\tlinkElement.href = url;\n\n\treturn linkElement.href;\n}","/* global \n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tDEMAND_ID, PROVIDE_ID, PATH_ID,\n\tfunctionEscapeRegex, functionResolveUrl\n*/\n\n//=require constants.js\n//=require function/escapeRegex.js\n//=require function/resolveUrl.js\n\nvar regexIsAbsoluteUri = /^(http(s?):)?\\/\\//i,\n\tregexIsAbsolutePath = /^\\//,\n\tregexMatchSourcemap = /((?:\\/\\/|\\/\\*)#)\\s*(sourceMappingURL)\\s*=\\s*(?!(?:http[s]?:)?\\/\\/)(.+?)\\.map(?:\\s+)?(\\*\\/)?/g,\n\tregexMatchBaseUrl = new RegExp('^' + functionEscapeRegex(functionResolveUrl('/'))),\n\tregexMatchInternal = new RegExp('^' + DEMAND_ID + '|' + PROVIDE_ID + '|' + PATH_ID + '$'),\n\tregexMatchParameter = /^(mock:)?([+-])?((?:[-\\w]+\\/?)+)?(?:@(.+?))?(?:#(\\d+))?!/;","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tregexMatchParameter, regexMatchBaseUrl, regexIsAbsolutePath, regexIsAbsoluteUri,\n\tfunctionResolveUrl\n*/\n\n//=require variables.js\n//=require function/resolveUrl.js\n\nfunction functionResolvePath(uri, context) {\n\tvar path = uri.replace(regexMatchParameter, '');\n\n\tif(!regexIsAbsolutePath.test(path) && !regexIsAbsoluteUri.test(path)) {\n\t\tpath = '/' + functionResolveUrl(((context && functionResolveUrl(context + '/../')) || '/') + path).replace(regexMatchBaseUrl, '');\n\t}\n\n\treturn path;\n}","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tregexMatchParameter,\n\tfunctionResolvePath\n*/\n\n//=require variables.js\n//=require function/resolvePath.js\n\nfunction functionResolveId(uri, context) {\n\tvar parameter = uri.match(regexMatchParameter);\n\n\treturn ((parameter && parameter[1]) ? 'mock:' : '') + ((parameter && parameter[3]) || settings.handler) + '!' + functionResolvePath(uri, context);\n}","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tDEMAND_ID, FUNCTION_EMPTY, EVENT_POST_REQUEST, EVENT_POST_PROCESS, EVENT_CACHE_HIT, EVENT_CACHE_MISS, EVENT_CACHE_EXCEED, EVENT_CACHE_CLEAR, EVENT_PRE_CACHE, EVENT_PRE_CACHE, EVENT_POST_CACHE, STRING_STRING, NULL, FALSE, TRUE,\n\tvalidatorIsTypeOf,\n\tfunctionGetTimestamp, functionEscapeRegex, functionIterate, functionDefer, functionResolveId, functionToArray,\n\tClassDependency,\n\tsingletonEvent\n*/\n\n//=require constants.js\n//=require validator/isTypeOf.js\n//=require function/getTimestamp.js\n//=require function/escapeRegex.js\n//=require function/iterate.js\n//=require function/defer.js\n//=require function/resolveId.js\n//=require function/toArray.js\n//=require singleton/event.js\n\nvar singletonCache = (function() {\n\tvar STORAGE_PREFIX = '[' + DEMAND_ID + ']',\n\t\tSTORAGE_SUFFIX_STATE = '[state]',\n\t\tSTORAGE_SUFFIX_VALUE = '[value]',\n\t\tregexMatchState = new RegExp('^' + functionEscapeRegex(STORAGE_PREFIX) + '\\\\[(.+?)\\\\]' + functionEscapeRegex(STORAGE_SUFFIX_STATE) + '$'),\n\t\tregexMatchProperties = /^(.+?),(\\d+),(\\d*),(.+?),(\\d+)$/,\n\t\tsupportsLocalStorage = (function() { try { return 'localStorage' in global && global.localStorage; } catch(exception) { return FALSE; } }()),\n\t\tlocalStorage = supportsLocalStorage ? global.localStorage : NULL,\n\t\tsupportsRemainingSpace = supportsLocalStorage && 'remainingSpace' in localStorage,\n\t\tstorage = {},\n\t\tcache;\n\n\tsingletonEvent\n\t\t.on(EVENT_CACHE_MISS, function(dependency) {\n\t\t\tfunctionDefer(function() {\n\t\t\t\tcache.clear.path(dependency.id);\n\t\t\t});\n\t\t})\n\t\t.on(EVENT_CACHE_EXCEED, function(dependency) {\n\t\t\tdemand('-!/' + DEMAND_ID + '/cache/dispose').then(function(cacheDispose) {\n\t\t\t\tfunctionDefer(function() {\n\t\t\t\t\tcacheDispose(dependency.source.length);\n\n\t\t\t\t\tcache.set(dependency);\n\t\t\t\t});\n\t\t\t});\n\t\t})\n\t\t.on(EVENT_POST_REQUEST, function(dependency) {\n\t\t\tif(dependency.source && enabled(dependency)) {\n\t\t\t\tstorage[dependency.id] = TRUE;\n\t\t\t}\n\t\t})\n\t\t.after(EVENT_POST_PROCESS, function(dependency) {\n\t\t\tif(storage[dependency.id]) {\n\t\t\t\tfunctionDefer(function() {\n\t\t\t\t\tcache.set(dependency);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\tfunction enabled(dependency) {\n\t\tvar match;\n\n\t\tif(dependency.cache !== NULL) {\n\t\t\treturn dependency.cache;\n\t\t}\n\n\t\tfunctionIterate(settings.cache, function(property, value) {\n\t\t\tif(dependency.path.indexOf(property) === 0 && (!match || value.weight > match.weight)) {\n\t\t\t\tmatch = value;\n\t\t\t}\n\t\t});\n\n\t\treturn match ? match.state : FALSE;\n\t}\n\n\tfunction getKey(key) {\n\t\treturn localStorage.getItem(key);\n\t}\n\n\tfunction setKey(key, value) {\n\t\tlocalStorage[value ? 'setItem' : 'removeItem'](key, value);\n\t}\n\n\tfunction getState(key) {\n\t\tvar state = getKey(key),\n\t\t\tmatches;\n\n\t\tif(state && (matches = state.match(regexMatchProperties))) {\n\t\t\treturn functionToArray(matches, 1);\n\t\t}\n\t}\n\n\tfunction setState(key, state) {\n\t\tstate[4] = functionGetTimestamp();\n\n\t\tsetKey(key, state.join(','));\n\t}\n\n\tfunction emit(event, dependency, state) {\n\t\tsingletonEvent.emit(event, dependency.id, dependency, state);\n\t}\n\n\tfunction Cache() {\n\t\tfunctionDefer(this.clear.expired.bind(this.clear));\n\t}\n\n\tCache.prototype = {\n\t\tget: supportsLocalStorage ? function(dependency) {\n\t\t\t\t\t\t\t\t\t\t\tvar id, state;\n\n\t\t\t\t\t\t\t\t\t\t\tif(enabled(dependency)) {\n\t\t\t\t\t\t\t\t\t\t\t\tid = STORAGE_PREFIX + '[' + dependency.id + ']';\n\t\t\t\t\t\t\t\t\t\t\t\tstate = getState(id + STORAGE_SUFFIX_STATE);\n\n\t\t\t\t\t\t\t\t\t\t\t\tif(!state) {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tif(state[0] !== dependency.version || (state[2] && dependency.lifetime && state[2] <= functionGetTimestamp())) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tdependency.invalid = true;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdependency.source = getKey(id + STORAGE_SUFFIX_VALUE);\n\n\t\t\t\t\t\t\t\t\t\t\t\tfunctionDefer(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetState(id + STORAGE_SUFFIX_STATE, state);\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY,\n\t\tresolve: supportsLocalStorage ? function(dependency) {\n\t\t\t\t\t\t\t\t\t\t\tvar self = this;\n\n\t\t\t\t\t\t\t\t\t\t\tif(self.get(dependency)) {\n\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_CACHE_HIT, dependency);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_CACHE_MISS, dependency);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} : function(dependency) { emit(EVENT_CACHE_MISS, dependency); },\n\t\tset: supportsLocalStorage ? function(dependency) {\n\t\t\t\t\t\t\t\t\t\t\tvar state, id, spaceBefore;\n\n\t\t\t\t\t\t\t\t\t\t\tif(enabled(dependency)) {\n\t\t\t\t\t\t\t\t\t\t\t\tstate = [ dependency.version, dependency.source.length, dependency.lifetime ? functionGetTimestamp() + dependency.lifetime : NULL, demand.version ];\n\t\t\t\t\t\t\t\t\t\t\t\tid = STORAGE_PREFIX + '[' + dependency.id + ']';\n\n\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_PRE_CACHE, dependency, state);\n\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\tspaceBefore = supportsRemainingSpace ? localStorage.remainingSpace : NULL;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetKey(id + STORAGE_SUFFIX_VALUE, dependency.source);\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetState(id + STORAGE_SUFFIX_STATE, state);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// strict equality check with \"===\" is required due to spaceBefore might be \"0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(spaceBefore !== NULL && localStorage.remainingSpace === spaceBefore) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthrow new Error();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_POST_CACHE, dependency, state);\n\t\t\t\t\t\t\t\t\t\t\t\t} catch(error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_CACHE_EXCEED, dependency);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY,\n\t\tclear: {\n\t\t\tpath: supportsLocalStorage ? function(path) {\n\t\t\t\t\t\t\t\t\t\t\t\tvar id = functionResolveId(path),\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey = STORAGE_PREFIX + '[' + id + ']';\n\n\t\t\t\t\t\t\t\t\t\t\t\tif(getKey(key + STORAGE_SUFFIX_STATE)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetKey(key + STORAGE_SUFFIX_STATE);\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetKey(key + STORAGE_SUFFIX_VALUE);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_CACHE_CLEAR, ClassDependency.get(id) || new ClassDependency(id, NULL, FALSE));\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY,\n\t\t\tall: supportsLocalStorage ? function() {\n\t\t\t\t\t\t\t\t\t\t\t\tvar match;\n\n\t\t\t\t\t\t\t\t\t\t\t\tfunctionIterate(localStorage, function(property) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tmatch = property.match(regexMatchState);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tmatch && this.path(match[1]);\n\t\t\t\t\t\t\t\t\t\t\t\t}, this);\n\t\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY,\n\t\t\texpired: supportsLocalStorage ? function() {\n\t\t\t\t\t\t\t\t\t\t\t\tvar self = this,\n\t\t\t\t\t\t\t\t\t\t\t\t\tmatch, state;\n\n\t\t\t\t\t\t\t\t\t\t\t\tfunctionIterate(localStorage, function(property) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tmatch = property.match(regexMatchState);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(match) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstate = getState(STORAGE_PREFIX + '[' + match[1] + ']' + STORAGE_SUFFIX_STATE);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(state && state[2] > 0 && state[2] <= functionGetTimestamp()) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tself.path(match[1]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}, this);\n\t\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY\n\t\t}\n\t};\n\n\treturn (cache = new Cache());\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tSTRING_UNDEFINED,\n\tobjectDefineProperty,\n\tvalidatorIsTypeOf,\n\tfunctionUuid,\n\tClassDescriptor\n*/\n\n//=require constants.js\n//=require shortcuts.js\n//=require validator/isTypeOf.js\n//=require function/uuid.js\n//=require class/descriptor.js\n\nfunction AbstractUuid() {\n\tif(validatorIsTypeOf(this.uuid, STRING_UNDEFINED)) {\n\t\tobjectDefineProperty(this, 'uuid', new ClassDescriptor(functionUuid()));\n\t}\n\n\treturn this;\n}\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n \tFUNCTION_EMPTY, NULL,\n\tarrayPrototypeConcat,\n\tfunctionDefer, functionUuid, functionToArray,\n\tAbstractUuid\n*/\n\n//=require constants.js\n//=require shortcuts.js\n//=require function/defer.js\n//=require function/uuid.js\n//=require function/toArray.js\n//=require abstract/uuid.js\n\nvar ClassPledge = (function() {\n\tvar PLEDGE_PENDING = 'pending',\n\t\tPLEDGE_RESOLVED = 'resolved',\n\t\tPLEDGE_REJECTED = 'rejected',\n\t\tstorage = {};\n\n\tfunction resolve() {\n\t\tstorage[this.uuid].handle(PLEDGE_RESOLVED, arguments);\n\t}\n\n\tfunction reject() {\n\t\tstorage[this.uuid].handle(PLEDGE_REJECTED, arguments);\n\t}\n\n\tfunction handle(state, parameter) {\n\t\tvar properties = storage[this.uuid],\n\t\t\tpointer, result;\n\n\t\tif(properties.state === PLEDGE_PENDING) {\n\t\t\tproperties.state = state;\n\t\t\tproperties.value = parameter;\n\t\t}\n\n\t\twhile(pointer = properties[properties.state].shift()) {\n\t\t\tresult = pointer.handler.apply(NULL, properties.value);\n\n\t\t\tif(result && typeof result.then === 'function') {\n\t\t\t\tresult.then(pointer.dfd.resolve, pointer.dfd.reject);\n\t\t\t} else {\n\t\t\t\tpointer.dfd[properties.state === PLEDGE_RESOLVED ? 'resolve' : 'reject'].apply(NULL, properties.value);\n\t\t\t}\n\t\t}\n\n\t\tproperties[PLEDGE_RESOLVED].length = 0;\n\t\tproperties[PLEDGE_REJECTED].length = 0;\n\t}\n\n\tfunction observe(pledge, index, properties) {\n\t\tpledge.then(\n\t\t\tfunction() {\n\t\t\t\tproperties.resolved[index] = functionToArray(arguments);\n\n\t\t\t\tproperties.count++;\n\n\t\t\t\tcheck(properties);\n\t\t\t},\n\t\t\tfunction() {\n\t\t\t\tproperties.rejected.push(functionToArray(arguments));\n\n\t\t\t\tcheck(properties);\n\t\t\t}\n\t\t);\n\t}\n\n\tfunction check(properties) {\n\t\tif(properties.count === properties.total) {\n\t\t\tproperties.dfd.resolve.apply(NULL, arrayPrototypeConcat.apply([], properties.resolved));\n\t\t} else if(properties.rejected.length + properties.count === properties.total) {\n\t\t\tproperties.dfd.reject.apply(NULL, arrayPrototypeConcat.apply([], properties.rejected));\n\t\t}\n\t}\n\n\tfunction ClassPledge(executor) {\n\t\tvar self = AbstractUuid.call(this);\n\n\t\tstorage[self.uuid] = { state: PLEDGE_PENDING, handle: handle.bind(self), value: NULL, resolved: [], rejected: [], count: 0 };\n\n\t\texecutor(resolve.bind(self), reject.bind(self));\n\t\t\n\t\treturn self;\n\t}\n\n\tClassPledge.prototype = {\n\t\t'catch': function(listener) {\n\t\t\treturn this.then(FUNCTION_EMPTY, listener);\n\t\t},\n\t\talways: function(alwaysListener) {\n\t\t\treturn this.then(alwaysListener, alwaysListener);\n\t\t},\n\t\tthen: function(resolveListener, rejectListener) {\n\t\t\tvar properties = storage[this.uuid],\n\t\t\t\tdfd = ClassPledge.defer();\n\n\t\t\tresolveListener && properties[PLEDGE_RESOLVED].push({ handler: resolveListener, dfd: dfd });\n\t\t\trejectListener && properties[PLEDGE_REJECTED].push({ handler: rejectListener, dfd: dfd });\n\n\t\t\tif(properties.state !== PLEDGE_PENDING) {\n\t\t\t\tfunctionDefer(properties.handle);\n\t\t\t}\n\n\t\t\treturn dfd.pledge;\n\t\t},\n\t\tisPending: function() {\n\t\t\treturn storage[this.uuid].state === PLEDGE_PENDING;\n\t\t},\n\t\tisResolved: function() {\n\t\t\treturn storage[this.uuid].state === PLEDGE_RESOLVED;\n\t\t},\n\t\tisRejected: function() {\n\t\t\treturn storage[this.uuid].state === PLEDGE_REJECTED;\n\t\t}\n\t};\n\n\tClassPledge.defer = function() {\n\t\tvar self = {};\n\n\t\tself.pledge = new ClassPledge(function(resolveListener, rejectListener) {\n\t\t\tself.resolve = resolveListener;\n\t\t\tself.reject = rejectListener;\n\t\t});\n\n\t\treturn self;\n\t};\n\n\tClassPledge.all = function(pledges) {\n\t\tvar dfd = ClassPledge.defer(),\n\t\t\tproperties, i = 0, pledge;\n\t\t\n\t\tif(pledges.length) {\n\t\t\tproperties = (storage[functionUuid()] = { dfd: dfd, resolved: [], rejected: [], total: pledges.length, count: 0 })\n\t\t\t\n\t\t\tfor(; pledge = pledges[i]; i++) {\n\t\t\t\tobserve(pledge, i, properties)\n\t\t\t}\n\t\t} else {\n\t\t\tdfd.resolve();\n\t\t}\n\n\t\treturn dfd.pledge;\n\t};\n\n\tClassPledge.race = function(pledges) {\n\t\tvar dfd = ClassPledge.defer(),\n\t\t\ti = 0, pledge;\n\n\t\tfor(; pledge = pledges[i]; i++) {\n\t\t\tpledge.then(dfd.resolve, dfd.reject);\n\t\t}\n\t\t\n\t\tif(!pledges.length) {\n\t\t\tdfd.resolve();\n\t\t}\n\n\t\treturn dfd.pledge;\n\t};\n\n\treturn ClassPledge.extends(AbstractUuid);\n}());","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tAbstractUuid\n*/\n\n//=require abstract/uuid.js\n\nfunction ClassRegistry() {\n\tvar self = AbstractUuid.call(this);\n\n\tstorage[self.uuid] = {};\n\t\n\treturn self;\n}\n\nClassRegistry.prototype = {\n\tget: function(key) {\n\t\treturn key ? storage[this.uuid][key] : storage[this.uuid];\n\t},\n\tset: function(key, value) {\n\t\tstorage[this.uuid][key] = value;\n\t},\n\tremove: function(key) {\n\t\tdelete storage[this.uuid][key];\n\t}\n};\n\nClassRegistry.extends(AbstractUuid);","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tDEMAND_ID,\n\tfunctionToArray\n*/\n\n//=require constants.js\n//=require function/toArray.js\n\nfunction ClassFailure(message, module, stack) {\n\tvar self = this;\n\t\n\tself.message = message;\n\t\t\n\tmodule && (self.module = module);\n\tstack && (self.stack = functionToArray(stack));\n\t\n\treturn self;\n}\n\t\nClassFailure.prototype = {\n\t/* only for reference\n\t message: NULL,\n\t module: NULL,\n\t stack: NULL,\n\t */\n\ttoString: function() {\n\t\tvar self = this,\n\t\t\tresult = DEMAND_ID + ': ' + self.message + ' ' + (self.module ? '\"' + self.module + '\"' : '');\n\n\t\tif(self.stack) {\n\t\t\tresult = ClassFailure.traverse(self.stack, result, 1);\n\t\t}\n\t\t\t\n\t\treturn result;\n\t}\n};\n\t\nClassFailure.traverse = function(stack, value, depth) {\n\tvar indention = new Array(depth + 1).join(' '),\n\t\ti = 0, item;\n\t\t\n\tfor(; item = stack[i]; i++) {\n\t\tvalue += '\\n' + indention + '> ' + item.message + ' ' + (item.module ? '\"' + item.module + '\"' : '');\n\t\t\t\n\t\tif(item.stack) {\n\t\t\tvalue = ClassFailure.traverse(item.stack, value, depth + 1);\n\t\t}\n\t}\n\t\t\n\treturn value;\n};","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tDEMAND_ID, MODULE_PREFIX_HANDLER, ERROR_LOAD, DEMAND_ID, PROVIDE_ID, PATH_ID, MOCK_PREFIX, NULL, TRUE, FALSE,\n\tobject,\n\tregexMatchInternal, regexMatchParameter,\n\tvalidatorIsPositive,\n\tfunctionResolvePath, functionResolveId, functionResolveUrl, functionIterate, functionToArray,\n\tClassRegistry, ClassPledge, ClassFailure,\n\tsingletonCache\n*/\n\n//=require constants.js\n//=require shortcuts.js\n//=require variables.js\n//=require validator/isPositive.js\n//=require function/resolvePath.js\n//=require function/resolveId.js\n//=require function/resolveUrl.js\n//=require function/iterate.js\n//=require function/toArray.js\n//=require class/registry.js\n//=require class/pledge.js\n//=require class/failure.js\n//=require singleton/cache.js\n\nvar ClassDependency = (function() {\n\tvar PREFIX_INTERNAL = 'internal!',\n\t\tregistry = new ClassRegistry(),\n\t\tplaceholder = [];\n\n\tfunction setProperty(property, value) {\n\t\tthis[property] = value;\n\t}\n\n\tfunction addPending(id, dependency) {\n\t\tif(dependency.pledge.isPending()) {\n\t\t\tthis.push(id);\n\t\t}\n\t}\n\n\tfunction addResolved(id, dependency) {\n\t\tif(dependency.pledge.isResolved()) {\n\t\t\tthis.push(id);\n\t\t}\n\t}\n\n\tfunction addRejected(id, dependency) {\n\t\tif(dependency.pledge.isRejected()) {\n\t\t\tthis.push(id);\n\t\t}\n\t}\n\n\tfunction ClassDependency(uri, context, register) {\n\t\tvar self = this,\n\t\t\tparameter = uri.match(regexMatchParameter) || placeholder;\n\n\t\tself.path = functionResolvePath(uri, context);\n\t\tself.mock = parameter[1] ? TRUE : FALSE;\n\t\tself.cache = parameter[2] ? parameter[1] === '+' : NULL;\n\t\tself.type = parameter[3] || settings.handler;\n\t\tself.version = parameter[4] || settings.version;\n\t\tself.lifetime = (parameter[5] && parameter[5] * 1000) || settings.lifetime;\n\t\tself.id = (self.mock ? MOCK_PREFIX : '' ) + self.type + '!' + self.path;\n\t\tself.uri = (self.mock ? MOCK_PREFIX : '' ) + self.type + '@' + self.version + (validatorIsPositive(self.lifetime) && self.lifetime > 0 ? '#' + self.lifetime : '' ) + '!' + self.path;\n\t\tself.dfd = ClassPledge.defer();\n\t\tself.pledge = self.dfd.pledge;\n\t\tself.invalid = false;\n\n\t\tself.pledge.then(function() {\n\t\t\tself.value = functionToArray(arguments);\n\t\t});\n\n\t\t(register !== FALSE) && registry.set(self.id, self);\n\n\t\treturn self;\n\t}\n\n\tClassDependency.prototype = {\n\t\tenqueue: true // handled by handler\n\t\t/* only for reference\n\t \tpath: NULL,\n\t \tmock: NULL,\n\t\tcache: NULL,\n\t\ttype: NULL,\n\t\tversion: NULL,\n\t\tlifetime: NULL,\n\t \tid: NULL,\n\t \turi: NULL,\n\t\tdfd: NULL,\n\t\tpledge: NULL,\n\t\tvalue: NULL,\n\t\thandler: NULL, // set by Dependency.resolve\n\t \tsource: NULL, // set by Cache or Loader\n\t \turl: NULL // optional, set by Loader\n\t\t*/\n\t};\n\n\tClassDependency.get = function(uri, context) {\n\t\treturn registry.get(functionResolveId(uri, context));\n\t};\n\n\tClassDependency.resolve = function(uri, context) {\n\t\tvar isInternal = context && regexMatchInternal.test(uri),\n\t\t\tdependency = isInternal ? this.get(PREFIX_INTERNAL + context + '/' + uri) : this.get(uri, context),\n\t\t\tvalue;\n\n\t\tif(!dependency) {\n\t\t\tif(isInternal) {\n\t\t\t\tdependency = new ClassDependency(PREFIX_INTERNAL + context + '/' + uri);\n\n\t\t\t\tswitch(uri) {\n\t\t\t\t\tcase DEMAND_ID:\n\t\t\t\t\t\tvalue = (function() {\n\t\t\t\t\t\t\treturn functionIterate(demand, setProperty, demand.bind(context));\n\t\t\t\t\t\t}());\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PROVIDE_ID:\n\t\t\t\t\t\tvalue = provide.bind(context);\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PATH_ID:\n\t\t\t\t\t\tvalue = context;\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tdependency.dfd.resolve(value);\n\t\t\t} else {\n\t\t\t\tdependency = new ClassDependency(uri, context);\n\n\t\t\t\tdemand(MODULE_PREFIX_HANDLER + dependency.type)\n\t\t\t\t\t.then(\n\t\t\t\t\t\tfunction(handler) {\n\t\t\t\t\t\t\tdependency.handler = handler;\n\n\t\t\t\t\t\t\tif(dependency.mock) {\n\t\t\t\t\t\t\t\tdependency.dfd.resolve(handler);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsingletonCache.resolve(dependency);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\tdependency.dfd.reject(new ClassFailure(ERROR_LOAD + ' (handler)', self.id));\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\treturn dependency;\n\t};\n\n\tClassDependency.remove = function(uri, context, cache) {\n\t\tvar id = functionResolveId(uri, context),\n\t\t\tnode = document.querySelector('[' + DEMAND_ID + '-id=\"' + id + '\"]');\n\n\t\tregistry.remove(id);\n\t\tregistry.remove(MOCK_PREFIX + id);\n\n\t\tnode && node.parentNode.removeChild(node);\n\n\t\t(cache !== FALSE) && singletonCache.clear.path(id);\n\t};\n\n\tClassDependency.list = {\n\t\tall: function() {\n\t\t\treturn object.keys(registry.get());\n\t\t},\n\t\tpending: function() {\n\t\t\treturn functionIterate(registry.get(), addPending, []);\n\t\t},\n\t\tresolved: function() {\n\t\t\treturn functionIterate(registry.get(), addResolved, []);\n\t\t},\n\t\trejected: function() {\n\t\t\treturn functionIterate(registry.get(), addRejected, []);\n\t\t}\n\t};\n\n\treturn ClassDependency;\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tfunctionResolveUrl, functionEscapeRegex, functionIterate\n*/\n\n//=require function/resolveUrl.js\n//=require function/escapeRegex.js\n//=require function/iterate.js\n\nvar ClassPattern = (function() {\n\tvar regexMatchTrailingSlash = /(.+)\\/$/;\n\n\tfunction setProperty(property, value) {\n\t\tthis[property] = {\n\t\t\turl: functionResolveUrl(value).replace(regexMatchTrailingSlash, '$1'),\n\t\t\tmatch: new RegExp('^' + functionEscapeRegex(value))\n\t\t};\n\t}\n\n\tfunction ClassPattern(pattern, url) {\n\t\tvar self = this;\n\n\t\tself.weight = pattern.length;\n\t\tself.match = new RegExp('^' + functionEscapeRegex(pattern));\n\t\tself.location = [].concat(url);\n\n\t\tfunctionIterate(self.location, setProperty, self.location);\n\t}\n\n\tClassPattern.prototype = {\n\t\t/* only for reference\n\t\t weight: 0,\n\t\t match: NULL,\n\t\t location: NULL,\n\t\t */\n\t\tmatches: function(path) {\n\t\t\treturn this.match.test(path);\n\t\t},\n\t\tprocess: function(path, index) {\n\t\t\tvar current = this.location[index];\n\n\t\t\tif(current) {\n\t\t\t\treturn path.replace(this.match, current.url);\n\t\t\t}\n\t\t}\n\t};\n\n\treturn ClassPattern;\n}());","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tTRUE,\n\tregexMatchBaseUrl,\n\tClassPledge\n*/\n\n//=require constants.js\n//=require shortcuts.js\n//=require variables.js\n//=require class/pledge.js\n\nvar ClassXhr = (function(XMLHttpRequest) {\n\tvar XDomainRequest = 'XDomainRequest' in global && global.XDomainRequest || XMLHttpRequest;\n\n\tfunction checkState() {\n\t\tif(this.readyState < 4) {\n\t\t\tthis.abort();\n\t\t}\n\t}\n\n\treturn function ClassXhr(url) {\n\t\tvar dfd = ClassPledge.defer(),\n\t\t\txhr = regexMatchBaseUrl.test(url) ? new XMLHttpRequest() : new XDomainRequest(),\n\t\t\tboundCheckState = checkState.bind(xhr),\n\t\t\ttimeout = settings.timeout,\n\t\t\tpointer;\n\n\t\txhr.ontimeout = xhr.onerror = xhr.onabort = function() {\n\t\t\tdfd.reject(xhr.status);\n\t\t};\n\t\txhr.onprogress = xhr.onreadystatechange = function() {\n\t\t\tclearTimeout(pointer);\n\n\t\t\tpointer = setTimeout(boundCheckState, timeout);\n\t\t};\n\t\txhr.onload = function() {\n\t\t\tpointer = clearTimeout(pointer);\n\n\t\t\tif(!('status' in xhr) || xhr.status === 200) {\n\t\t\t\tdfd.resolve(xhr.responseText, xhr.getResponseHeader && xhr.getResponseHeader('content-type'));\n\t\t\t} else {\n\t\t\t\tdfd.reject(xhr.status);\n\t\t\t}\n\t\t};\n\n\t\txhr.open('GET', url, TRUE);\n\t\txhr.send();\n\n\t\tpointer = setTimeout(boundCheckState, timeout);\n\n\t\treturn dfd.pledge;\n\t};\n}(XMLHttpRequest));\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tDEMAND_ID, EVENT_PRE_REQUEST, EVENT_POST_REQUEST, ERROR_LOAD,\n\tregexIsAbsoluteUri,\n\tlinkElement,\n\tfunctionIterate, functionResolveUrl, functionGetTimestamp,\n\tClassXhr, ClassFailure,\n\tsingletonEvent\n*/\n\n//=require constants.js\n//=require variables.js\n//=require shortcuts.js\n//=require function/resolveUrl.js\n//=require function/iterate.js\n//=require singleton/event.js\n//=require class/xhr.js\n//=require class/failure.js\n\nvar regexMatchEmptySearch = /^(?:\\?|)$/;\n\nfunction ClassLoader(dependency) {\n\tvar pattern;\n\n\tfunction resolve(response, type) {\n\t\tif(!type || !dependency.handler.validate || dependency.handler.validate(type)) {\n\t\t\tdependency.source = response;\n\n\t\t\tsingletonEvent.emit(EVENT_POST_REQUEST, dependency.type, dependency);\n\t\t} else {\n\t\t\tdependency.dfd.reject(new ClassFailure(ERROR_LOAD + ' (content-type)', dependency.id));\n\t\t}\n\t}\n\n\tfunction reject(status) {\n\t\tdependency.dfd.reject(new ClassFailure(ERROR_LOAD + (status ? ' (status)' : ''), dependency.id));\n\t}\n\n\tfunction load(location) {\n\t\tlocation = location || 0;\n\t\tdependency.url = document.createElement('a');\n\n\t\tdependency.url.href = pattern ? functionResolveUrl(pattern.process(dependency.path, location)) : dependency.path;\n\n\t\tif(dependency.invalid) {\n\t\t\tdependency.url.search += ((regexMatchEmptySearch.test(dependency.url.search)) ? '' : '&') + functionGetTimestamp();\n\t\t}\n\n\t\tsingletonEvent.emit(EVENT_PRE_REQUEST, dependency.type, dependency);\n\n\t\tnew ClassXhr(dependency.url).then(\n\t\t\tresolve,\n\t\t\t(\n\t\t\t\tpattern ?\n\t\t\t\tfunction() {\n\t\t\t\t\tlocation++;\n\n\t\t\t\t\tif(pattern.location[location]) {\n\t\t\t\t\t\tload(location);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treject();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t:\n\t\t\t\treject\n\t\t\t)\n\t\t);\n\t}\n\n\tif(!regexIsAbsoluteUri.test(dependency.path)) {\n\t\tfunctionIterate(settings.pattern, function(property, value) {\n\t\t\tvalue.matches(dependency.path) && (!pattern || pattern.weight < value.weight) && (pattern = value);\n\t\t});\n\t}\n\n\tload();\n}\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tobjectPrototypeToString\n*/\n\n//=require shortcuts.js\n\n/**\n * isArray\n *\n * Check whether a given value is of type array\n *\n * @param value\n *\n * @return {boolean}\n */\n\nfunction validatorIsArray(value) {\n\treturn objectPrototypeToString.call(value) === '[object Array]';\n}","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage\n*/\n\n/**\n * hash\n *\n * Generate a hash for a given string\n *\n * @param {string} input\n *\n * @return {number}\n */\nfunction functionHash(input){\n\tvar value = 5381,\n\t\ti = input.length;\n\n\twhile(i) {\n\t\tvalue = (value * 33) ^ input.charCodeAt(--i);\n\t}\n\n\treturn value >>> 0;\n}","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tEVENT_QUEUE_ENQUEUE, EVENT_QUEUE_DEQUEUE,\n\tfunctionToArray,\n\tsingletonEvent,\n\tAbstractUuid\n*/\n\n//=require constants.js\n//=require function/toArray.js\n//=require singleton/event.js\n//=require abstract/uuid.js\n\nfunction ClassQueue() {\n\tvar self = AbstractUuid.call(this);\n\n\tstorage[self.uuid] = [];\n\t\n\treturn self;\n}\n\t\nClassQueue.prototype = {\n\tenqueue: function() {\n\t\tstorage[this.uuid] = storage[this.uuid].concat(functionToArray(arguments));\n\n\t\tsingletonEvent.emit(EVENT_QUEUE_ENQUEUE, this.uuid);\n\t},\n\tdequeue: function() {\n\t\tsingletonEvent.emit(EVENT_QUEUE_DEQUEUE, this.uuid);\n\n\t\treturn storage[this.uuid].shift();\n\t},\n\tget current() {\n\t\treturn storage[this.uuid][0];\n\t},\n\tget length() {\n\t\treturn storage[this.uuid].length;\n\t}\n};\n\t\nClassQueue.extends(AbstractUuid);","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tEVENT_QUEUE_ENQUEUE, NULL,\n\tsingletonEvent,\n\tAbstractUuid\n*/\n\n//=require constants.js\n//=require abstract/uuid.js\n\nfunction ClassProcessor(queue) {\n\tvar self = AbstractUuid.call(this),\n\t\tpointer = storage[self.uuid] = { queue: queue, current: NULL };\n\n\tdemand\n\t\t.on(EVENT_QUEUE_ENQUEUE + ':' + queue.uuid, function() {\n\t\t\t!pointer.current && self.process();\n\t\t});\n\t\n\treturn self;\n}\n\nClassProcessor.prototype = {\n\tprocess: function() {\n\t\tvar pointer = storage[this.uuid],\n\t\t\tcurrent;\n\n\t\tif(pointer.queue.length) {\n\t\t\tcurrent = pointer.current = pointer.queue.dequeue();\n\n\t\t\tif(!current.pledge.isRejected()) {\n current.handler.process && current.handler.process(current);\n\n return;\n\t\t\t}\n\t\t}\n\n\t\tpointer.current = NULL;\n\t},\n\tget current() {\n\t\treturn storage[this.uuid].current;\n\t}\n};\n\t\nClassProcessor.extends(AbstractUuid);","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tregexMatchSourcemap, regexIsAbsoluteUri\n\tlinkElement\n*/\n\n//=require variables.js\n//=require shortcuts.js\n\nfunction functionResolveSourcemaps(url, source) {\n\tvar match, replacement;\n\t\n\twhile(match = regexMatchSourcemap.exec(source)) {\n\t\tlinkElement.href = url;\n\t\t\n\t\tif(regexIsAbsoluteUri.test(match[2])) {\n\t\t\treplacement = linkElement.protocol + '//' + linkElement.host + match[3];\n\t\t} else {\n\t\t\tlinkElement.pathname += '/../' + match[3];\n\t\t\t\n\t\t\treplacement = linkElement.protocol + '//' + linkElement.host + linkElement.pathname;\n\t\t}\n\t\t\n\t\tsource = source.replace(match[0], match[1] + ' ' + match[2] + '=' + replacement + '.map' + (match[4] ? ' ' + match[4] : ''));\n\t}\n\t\n\treturn source;\n}","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tSTRING_BOOLEAN, STRING_STRING, EVENT_PRE_RESOLVE, EVENT_POST_RESOLVE, EVENT_PRE_CONFIGURE, EVENT_POST_CONFIGURE, EVENT_CACHE_MISS, EVENT_CACHE_HIT, EVENT_PRE_REQUEST, EVENT_POST_REQUEST, EVENT_PRE_PROCESS, EVENT_POST_PROCESS, NULL, FALSE,\n\tvalidatorIsTypeOf, validatorIsObject, validatorIsPositive, validatorIsInstanceOf,\n\tfunctionIterate, functionMerge, functionDefer, functionToArray,\n\tClassPledge, ClassDependency, ClassPattern, ClassLoader, \n\tsingletonEvent, singletonCache\n*/\n\n//=require constants.js\n//=require validator/isTypeOf.js\n//=require validator/isObject.js\n//=require validator/isPositive.js\n//=require validator/isInstanceOf.js\n//=require function/iterate.js\n//=require function/merge.js\n//=require function/defer.js\n//=require function/toArray.js\n//=require singleton/event.js\n//=require singleton/cache.js\n//=require class/pledge.js\n//=require class/dependency.js\n//=require class/pattern.js\n//=require class/loader.js\n\n/*eslint no-global-assign: [2, { \"exceptions\": [\"demand\"] }]*/\ndemand = global.demand = (function() {\n\tfunction updateCacheSettings(property, value) {\n\t\tthis[property] = { weight: property.length, state: value };\n\t}\n\n\tfunction updatePatternSettings(property, value) {\n\t\tproperty !== 'base' && (this[property] = new ClassPattern(property, value));\n\t}\n\n\tfunction updateModuleSettings(property, value) {\n\t\tvar temp = this[property] = this[property] || {};\n\n\t\tsingletonEvent.emit(EVENT_PRE_CONFIGURE, property, temp);\n\n\t\tfunctionMerge(temp, value);\n\n\t\tsingletonEvent.emit(EVENT_POST_CONFIGURE, property, temp);\n\t}\n\n\tfunction demand() {\n\t\tvar dependencies = functionToArray(arguments),\n\t\t\tcontext = this !== global ? this : NULL,\n\t\t\ti = 0, uri, dfd, result;\n\t\t\n\t\tsingletonEvent.emit(EVENT_PRE_RESOLVE, NULL, dependencies, context);\n\t\t\n\t\tfor(; (uri = dependencies[i]); i++) {\n\t\t\tif(validatorIsTypeOf(uri, STRING_STRING)) {\n\t\t\t\tdependencies[i] = ClassDependency.resolve(uri, context).pledge;\n\t\t\t} else {\n\t\t\t\tdependencies[i] = (dfd = ClassPledge.defer()).pledge;\n\n\t\t\t\tdfd.resolve(uri);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(dependencies.length > 1) {\n\t\t\tresult = ClassPledge.all(dependencies);\n\t\t} else {\n\t\t\tresult = dependencies[0];\n\t\t}\n\t\t\n\t\treturn result.always(function() {\n\t\t\tsingletonEvent.emit(EVENT_POST_RESOLVE, NULL, dependencies, context);\n\t\t});\n\t}\n\n\tdemand.configure = function(options) {\n\t\tvar cache = options.cache,\n\t\t\tversion = options.version,\n\t\t\ttimeout = options.timeout,\n\t\t\tlifetime = options.lifetime,\n\t\t\tbase = options.base,\n\t\t\tpattern = options.pattern,\n\t\t\tmodules = options.modules,\n\t\t\tpointer = settings.modules;\n\n\t\tif(validatorIsTypeOf(cache, STRING_BOOLEAN)) {\n\t\t\tsettings.cache[''] = { weight: 0, state: cache };\n\t\t} else if(validatorIsObject(cache)) {\n\t\t\tfunctionIterate(cache, updateCacheSettings, settings.cache);\n\t\t}\n\n\t\tif(validatorIsTypeOf(version, STRING_STRING)) {\n\t\t\tsettings.version = version;\n\t\t}\n\n\t\tif(validatorIsPositive(timeout)) {\n\t\t\tsettings.timeout = Math.min(Math.max(timeout, 2), 12) * 1000;\n\t\t}\n\n\t\tif(validatorIsPositive(lifetime) && lifetime > 0) {\n\t\t\tsettings.lifetime = lifetime * 1000;\n\t\t}\n\n\t\tif(validatorIsTypeOf(base, STRING_STRING) && base !== '') {\n\t\t\tsettings.pattern.base = new ClassPattern('', base);\n\t\t}\n\n\t\tif(validatorIsObject(pattern)) {\n\t\t\tfunctionIterate(pattern, updatePatternSettings, settings.pattern);\n\t\t}\n\n\t\tif(validatorIsObject(modules)) {\n\t\t\tfunctionIterate(modules, updateModuleSettings, pointer);\n\t\t}\n\n\t\treturn demand;\n\t};\n\n\tdemand.version = '{{gulp:package.version}}';\n\tdemand.on = singletonEvent.on.bind(demand);\n\tdemand.get = function(uri, context) { var dependency = ClassDependency.get(uri, context); return dependency && dependency.value; };\n\tdemand.remove = ClassDependency.remove;\n\tdemand.list = ClassDependency.list;\n\tdemand.clear = singletonCache.clear;\n\n\tsingletonEvent\n\t\t.after(EVENT_CACHE_MISS, function(dependency) {\n\t\t\tnew ClassLoader(dependency);\n\t\t})\n\t\t.after(EVENT_POST_REQUEST, function(dependency) {\n\t\t\tvar pointer = dependency.handler.onPostRequest;\n\n\t\t\tpointer && pointer(dependency);\n\t\t})\n\t\t.after(EVENT_CACHE_HIT + ' ' + EVENT_POST_REQUEST, function(dependency) {\n\t\t\tsingletonEvent.emit(EVENT_PRE_PROCESS, dependency.id, dependency);\n\t\t})\n\t\t.after(EVENT_PRE_REQUEST, function(dependency) {\n\t\t\tvar pointer = dependency.handler.onPreRequest;\n\t\n\t\t\tpointer && pointer(dependency);\n\t\t})\n\t\t.after(EVENT_PRE_PROCESS, function(dependency) {\n\t\t\tvar pointer = dependency.handler.onPreProcess;\n\t\t\t\n\t\t\tpointer && pointer(dependency);\n\t\t\t\n\t\t\tdependency.pledge.then(function() {\n\t\t\t\tsingletonEvent.emit(EVENT_POST_PROCESS, dependency.id, dependency);\n\t\t\t});\n\n\t\t\tif(dependency.enqueue === true) {\n\t\t\t\tqueue.enqueue(dependency);\n\t\t\t} else if(validatorIsInstanceOf(dependency.enqueue, ClassPledge)) {\n\t\t\t\tdependency.enqueue.then(function() { queue.enqueue(dependency); });\n\t\t\t}\n\t\t});\n\n\treturn demand;\n}());","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tSTRING_STRING, STRING_UNDEFINED, STRING_FUNCTION, ERROR_PROVIDE, ERROR_PROVIDE_ANONYMOUS, NULL,\n\tvalidatorIsTypeOf, validatorIsArray,\n\tClassDependency, ClassFailure\n*/\n\n//=require constants.js\n//=require validator/isTypeOf.js\n//=require validator/isArray.js\n//=require class/dependency.js\n//=require class/failure.js\n\n/*eslint no-global-assign: [2, { \"exceptions\": [\"provide\"] }]*/\nprovide = global.provide = function provide() {\n\tvar uri = validatorIsTypeOf(arguments[0], STRING_STRING) ? arguments[0] : NULL,\n\t\tcontext = this !== global ? this : NULL,\n\t\tdependencies = validatorIsArray(arguments[uri ? 1 : 0]) ? arguments[uri ? 1 : 0] : NULL,\n\t\tdefinition = dependencies ? arguments[uri ? 2 : 1] : arguments[uri ? 1 : 0],\n\t\tmodule, isFunction;\n\n\tif(!uri && processor.current) {\n\t\tmodule = processor.current;\n\t\turi = module.uri;\n\n\t\tprocessor.process();\n\t}\n\n\tif(uri) {\n\t\tmodule = module || new ClassDependency(uri, context);\n\t\tisFunction = validatorIsTypeOf(definition, STRING_FUNCTION);\n\n\t\tif(dependencies) {\n\t\t\tdemand\n\t\t\t\t.apply(module.path, dependencies)\n\t\t\t\t.then(\n\t\t\t\t\tfunction() { module.dfd.resolve(isFunction ? definition.apply(NULL, arguments) : definition); },\n\t\t\t\t\tfunction() { module.dfd.reject(new ClassFailure(ERROR_PROVIDE, module.id, arguments)); }\n\t\t\t\t);\n\t\t} else {\n\t\t\tmodule.dfd.resolve(isFunction ? definition() : definition);\n\t\t}\n\n\t\treturn module.dfd.pledge;\n\t} else {\n\t\t/* eslint-disable no-console */\n\t\t!validatorIsTypeOf(console, STRING_UNDEFINED) && console.error(new ClassFailure(ERROR_PROVIDE_ANONYMOUS));\n\t\t/* eslint-enable no-console */\n\t}\n};\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tNULL\n*/\n\n//=require constants.js\n\nvar abstractHandler = (function() {\n\tfunction AbstractHandler() {\n\n\t}\n\n\tAbstractHandler.prototype = {\n\t\tvalidate: NULL,\n\t\tonPreRequest: NULL,\n\t\tonPostRequest: NULL,\n\t\tonPreProcess: NULL,\n\t\tprocess: NULL\n\t};\n\n\treturn AbstractHandler;\n}());","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tDEMAND_ID, EVENT_PRE_REQUEST, EVENT_POST_REQUEST, TRUE,\n\tfunctionResolveSourcemaps,\n\tabstractHandler\n*/\n\n//=require constants.js\n//=require function/resolveSourcemaps.js\n//=require abstract/handler.js\n\nvar handlerModule = (function() {\n\tvar suffix = '.js',\n\t\ttarget = document.getElementsByTagName('head')[0],\n\t\tregexMatchType = /^(application|text)\\/(x-)?javascript/;\n\n\tfunction HandlerModule() {}\n\n\tHandlerModule.prototype = {\n\t\tvalidate: function(type) {\n\t\t\treturn regexMatchType.test(type);\n\t\t},\n\t\tonPreRequest: function(dependency) {\n\t\t\tvar pathname = dependency.url.pathname;\n\t\t\t\n\t\t\tdependency.url.pathname = pathname.slice(-suffix.length) !== suffix ? pathname + suffix : pathname;\n\t\t},\n\t\tonPostRequest: function(dependency) {\n\t\t\tdependency.source = functionResolveSourcemaps(dependency.url, dependency.source);\n\t\t},\n\t\tprocess: function(dependency) {\n\t\t\tvar script;\n\n\t\t\tif(dependency.source) {\n\t\t\t\tscript = document.createElement('script');\n\t\t\t\tscript.async = TRUE;\n\t\t\t\tscript.text = dependency.source;\n\n\t\t\t\tscript.setAttribute(DEMAND_ID + '-id', dependency.id);\n\n\t\t\t\ttarget.appendChild(script);\n\t\t\t}\n\t\t}\n\t};\n\n\treturn new (HandlerModule.extends(abstractHandler));\n}());","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tDEMAND_ID,\n\tfunctionToArray\n*/\n\n//=require constants.js\n//=require function/toArray.js\n\nfunction ClassFailure(message, module, stack) {\n\tvar self = this;\n\t\n\tself.message = message;\n\t\t\n\tmodule && (self.module = module);\n\tstack && (self.stack = functionToArray(stack));\n\t\n\treturn self;\n}\n\t\nClassFailure.prototype = {\n\t/* only for reference\n\t message: NULL,\n\t module: NULL,\n\t stack: NULL,\n\t */\n\ttoString: function() {\n\t\tvar self = this,\n\t\t\tresult = DEMAND_ID + ': ' + self.message + ' ' + (self.module ? '\"' + self.module + '\"' : '');\n\n\t\tif(self.stack) {\n\t\t\tresult = ClassFailure.traverse(self.stack, result, 1);\n\t\t}\n\t\t\t\n\t\treturn result;\n\t}\n};\n\t\nClassFailure.traverse = function(stack, value, depth) {\n\tvar indention = new Array(depth + 1).join(' '),\n\t\ti = 0, item;\n\t\t\n\tfor(; item = stack[i]; i++) {\n\t\tvalue += '\\n' + indention + '> ' + item.message + ' ' + (item.module ? '\"' + item.module + '\"' : '');\n\t\t\t\n\t\tif(item.stack) {\n\t\t\tvalue = ClassFailure.traverse(item.stack, value, depth + 1);\n\t\t}\n\t}\n\t\t\n\treturn value;\n};","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tMODULE_PREFIX_HANDLER, EVENT_POST_CONFIGURE, ERROR_RESOLVE, MOCK_PREFIX, STRING_STRING, FALSE, TRUE,\n\tregexMatchParameter, regexMatchSourcemap,\n\tvalidatorIsTypeOf, validatorIsObject,\n\tfunctionIterate, functionResolveId,\n\tabstractHandler,\n\tClassDependency, ClassPledge, ClassFailure,\n\thandlerModule\n*/\n\n//=require constants.js\n//=require variables.js\n//=require validator/isTypeOf.js\n//=require validator/isObject.js\n//=require function/iterate.js\n//=require function/resolveId.js\n//=require abstract/handler.js\n//=require class/dependency.js\n//=require class/pledge.js\n//=require class/Failure.js\n//=require handler/module.js\n\nvar handlerBundle = (function() {\n\tvar path = MODULE_PREFIX_HANDLER + 'bundle',\n\t\tsettings = {};\n\n\tdemand\n\t\t.on(EVENT_POST_CONFIGURE + ':' + path, function(options) {\n\t\t\tif(validatorIsObject(options)) {\n\t\t\t\tsettings = options;\n\n\t\t\t\tfunctionIterate(settings, updateDependencies);\n\t\t\t}\n\t\t});\n\n\tfunction updateDependencies(uri, dependencies) {\n\t\tvar i, dependency;\n\n\t\tfor(i = 0; (dependency = dependencies[i]); i++) {\n\t\t\tif(validatorIsTypeOf(dependency, STRING_STRING)) {\n\t\t\t\tdependencies[i] = functionResolveId(dependency);\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getType(dependencies) {\n\t\tvar type, i = 0, temp;\n\n\t\tfor(; (temp = dependencies[i]); i++) {\n\t\t\ttemp = temp.match(regexMatchParameter);\n\t\t\ttemp = (temp && temp[3]) || settings.handler;\n\n\t\t\tif(type) {\n\t\t\t\tif(temp !== type) {\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttype = temp;\n\t\t\t}\n\t\t}\n\n\t\treturn type;\n\t}\n\n\tfunction HandlerBundle() {}\n\n\tHandlerBundle.prototype = {\n\t\tvalidate: handlerModule.validate,\n\t\tonPreProcess: function(dependency) {\n\t\t\tvar source = dependency.source,\n\t\t\t\tdfd = dependency.dfd,\n\t\t\t\tdependencies = settings[dependency.path],\n\t\t\t\ttype, match, pledges, temp, i;\n\n\t\t\tdependency.enqueue = FALSE;\n\n\t\t\tfunction reject() {\n\t\t\t\tdfd.reject(new ClassFailure(ERROR_RESOLVE, dependency.id, arguments));\n\t\t\t}\n\n\t\t\tif(dependencies && (type = getType(dependencies))) {\n\t\t\t\twhile(match = regexMatchSourcemap.exec(source)) {\n\t\t\t\t\tsource = source.replace(match[0], '');\n\t\t\t\t}\n\n\t\t\t\tdependency.source = source;\n\t\t\t\tpledges = [];\n\n\t\t\t\tfor(i = 0; (temp = dependencies[i]); i++) {\n\t\t\t\t\tpledges.push(ClassDependency.resolve(MOCK_PREFIX + temp).pledge);\n\t\t\t\t}\n\n\t\t\t\tClassPledge.all(pledges).then(\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tpledges.length = 0;\n\n\t\t\t\t\t\tfor(i = 0; (temp = dependencies[i]); i++) {\n\t\t\t\t\t\t\ttemp = dependencies[i] = ClassDependency.get(temp) || new ClassDependency(temp);\n\t\t\t\t\t\t\ttemp.handler = arguments[i];\n\n\t\t\t\t\t\t\tpledges.push(temp.pledge);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(type === 'module') {\n\t\t\t\t\t\t\tqueue.enqueue.apply(queue, dependencies);\n\t\t\t\t\t\t\thandlerModule.process(dependency);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\thandlerModule.process(dependency);\n\t\t\t\t\t\t\tqueue.enqueue.apply(queue, dependencies);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tClassPledge.all(pledges).then(dfd.resolve, reject);\n\t\t\t\t\t},\n\t\t\t\t\treject\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\treject();\n\t\t\t}\n\t\t}\n\t};\n\n\treturn new (HandlerBundle.extends(abstractHandler));\n}());","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tFALSE, EVENT_POST_REQUEST, ERROR_RESOLVE,\n\tfunctionResolveSourcemaps,\n\tabstractHandler,\n\tClassDependency, ClassPledge, ClassFailure\n*/\n\n//=require constants.js\n//=require function/resolveSourcemaps.js\n//=require abstract/handler.js\n//=require class/dependency.js\n//=require class/pledge.js\n//=require class/Failure.js\n\nvar handlerComponent = (function() {\n\tvar suffix = '.html',\n\t\tregexMatchType = /^text\\/.+$/;\n\n\tfunction HandlerComponent() {}\n\n\tHandlerComponent.prototype = {\n\t\tvalidate: function(type) {\n\t\t\treturn regexMatchType.test(type);\n\t\t},\n\t\tonPreRequest: function(dependency) {\n\t\t\tvar pathname = dependency.url.pathname;\n\t\t\t\n\t\t\tdependency.url.pathname = pathname.slice(-suffix.length) !== suffix ? pathname + suffix : pathname;\n\t\t},\n\t\tonPostRequest: function(dependency) {\n\t\t\tdependency.source = functionResolveSourcemaps(dependency.url, dependency.source);\n\t\t},\n\t\tonPreProcess: function(dependency) {\n\t\t\tvar context = dependency.path,\n\t\t\t\tdfd = dependency.dfd,\n\t\t\t\tcontainer = document.createElement('body'),\n\t\t\t\tmodules = [],\n\t\t\t\tpledges = [],\n\t\t\t\tnode, handler, path, uri;\n\n\t\t\tdependency.enqueue = FALSE;\n\t\t\tcontainer.innerHTML = dependency.source;\n\n\t\t\tfunction reject() {\n\t\t\t\tdfd.reject(new ClassFailure(ERROR_RESOLVE, dependency.id, arguments));\n\t\t\t}\n\n\t\t\twhile(node = container.firstElementChild) {\n\t\t\t\tif(handler = node.getAttribute('type')) {\n\t\t\t\t\tpath = node.getAttribute('path');\n\t\t\t\t\turi = handler + '!' + context + (path ? '/' + path : '');\n\n\t\t\t\t\tnode.parentNode.removeChild(node);\n\t\t\t\t\tmodules.push({ source: node.textContent, uri: uri });\n\t\t\t\t\tpledges.push(ClassDependency.resolve('mock:' + uri).pledge);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tClassPledge.all(pledges).then(\n\t\t\t\tfunction() {\n\t\t\t\t\tvar i = 0, module, dependency;\n\n\t\t\t\t\tpledges.length = 0;\n\n\t\t\t\t\tfor(; (module = modules[i]); i++) {\n\t\t\t\t\t\tdependency = ClassDependency.get(module.uri) || new ClassDependency(module.uri);\n\t\t\t\t\t\tdependency.source = functionResolveSourcemaps(dependency.url, module.source);\n\t\t\t\t\t\tdependency.handler = arguments[i];\n\n\t\t\t\t\t\tpledges.push(dependency.pledge);\n\n\t\t\t\t\t\tqueue.enqueue(dependency);\n\t\t\t\t\t}\n\n\t\t\t\t\tClassPledge.all(pledges).then(dfd.resolve, reject);\n\t\t\t\t},\n\t\t\t\treject\n\t\t\t);\n\t\t}\n\t};\n\n\treturn new (HandlerComponent.extends(abstractHandler));\n}());","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,\n\tMODULE_PREFIX_PLUGIN, MODULE_PREFIX_HANDLER, EVENT_POST_CONFIGURE, EVENT_PRE_RESOLVE, STRING_STRING, ERROR_RESOLVE, FALSE, TRUE,\n\tregexMatchInternal,\n\tvalidatorIsObject, validatorIsTypeOf,\n\tfunctionIterate, functionHash,\n\tClassDependency, ClassFailure,\n\tsingletonCache\n*/\n\n//=require constants.js\n//=require variables.js\n//=require validator/isTypeOf.js\n//=require validator/isObject.js\n//=require function/iterate.js\n//=require function/hash.js\n//=require class/dependency.js\n//=require class/failure.js\n//=require singleton/cache.js\n\nvar pluginGenie = (function() {\n\tvar path = MODULE_PREFIX_PLUGIN + 'genie',\n\t\tpattern = [];\n\n\tfunction matchPattern(path) {\n\t\tvar i = 0, pointer, match;\n\n\t\tfor(; (pointer = pattern[i]); i++) {\n\t\t\tif(path.indexOf(pointer.prefix) === 0 && (!match || pointer.weight > match.weight)) {\n\t\t\t\tmatch = pointer;\n\t\t\t}\n\t\t}\n\n\t\treturn match;\n\t}\n\n\tfunction generateConfiguration(bundle) {\n\t\tvar matches = bundle.matches,\n\t\t\tconfiguration = { pattern: {}, modules: { '/demand/handler/bundle': {} } },\n\t\t\ti = 0, pointer, dependency;\n\n\t\tconfiguration.pattern[bundle.id] = bundle.fn(matches);\n\t\tconfiguration.modules[MODULE_PREFIX_HANDLER + 'bundle'][bundle.id] = pointer = [];\n\n\t\tfor(; (dependency = matches[i]); i++) {\n\t\t\tpointer.push(dependency.path);\n\t\t}\n\n\t\treturn configuration;\n\t}\n\n\tfunction resolveDependencies() {\n\t\tvar i = 0, dependency;\n\n\t\tfor(; (dependency = this[i]); i++) {\n\t\t\tdependency.dfd.resolve(arguments[i]);\n\t\t}\n\t}\n\n\tfunction rejectDependencies() {\n\t\tvar i = 0, dependency;\n\n\t\tfor(; (dependency = this[i]); i++) {\n\t\t\tdependency.dfd.reject(new ClassFailure(ERROR_RESOLVE, dependency.id));\n\t\t}\n\t}\n\n\tfunction addPattern(property, value) {\n\t\tpattern.push({ prefix: property, weight: property.length, fn: value });\n\t}\n\n\tfunction resolveBundles(property, value) {\n\t\tvar matches = value.matches,\n\t\t\ti = 0, dependency;\n\n\t\tif(matches.length > 1) {\n\t\t\tvalue.id = path + '/' + functionHash(JSON.stringify(value.matches));\n\n\t\t\tfor(; (dependency = matches[i]); i++) {\n\t\t\t\tmatches[i] = new ClassDependency(dependency.uri);\n\t\t\t}\n\n\t\t\tdemand.configure(generateConfiguration(value));\n\t\t\tdemand('bundle!' + value.id)\n\t\t\t\t.then(\n\t\t\t\t\tresolveDependencies.bind(matches),\n\t\t\t\t\trejectDependencies.bind(matches)\n\t\t\t\t);\n\t\t}\n\t}\n\n\tdemand\n\t\t.on(EVENT_POST_CONFIGURE + ':' + path, function(options) {\n\t\t\tif(validatorIsObject(options)) {\n\t\t\t\tpattern.length = 0;\n\n\t\t\t\tfunctionIterate(options, addPattern);\n\t\t\t}\n\t\t})\n\t\t.on(EVENT_PRE_RESOLVE, function(dependencies, context) {\n\t\t\tvar bundles = {},\n\t\t\t\ti = 0, dependency, pattern;\n\n\t\t\tfor(; (dependency = dependencies[i]); i++) {\n\t\t\t\tif(validatorIsTypeOf(dependency, STRING_STRING) && !regexMatchInternal.test(dependency) && !ClassDependency.get(dependency, context)) {\n\t\t\t\t\tdependency = new ClassDependency(dependency, context, FALSE);\n\n\t\t\t\t\tif(dependency.type === 'module' && (pattern = matchPattern(dependency.path)) && !singletonCache.get(dependency)) {\n\t\t\t\t\t\t(bundles[pattern.prefix] || (bundles[pattern.prefix] = { fn: pattern.fn, matches: [] })).matches.push(dependency);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunctionIterate(bundles, resolveBundles);\n\t\t});\n\n\treturn TRUE;\n}());"]} \ No newline at end of file +{"version":3,"sources":["demand.js","constants.js","shortcuts.js","class/descriptor.js","validator/isTypeOf.js","validator/isObject.js","validator/isPositive.js","validator/isInstanceOf.js","function/iterate.js","inheritance.js","function/merge.js","function/defer.js","function/uuid.js","function/toArray.js","singleton/event.js","function/getTimestamp.js","function/escapeRegex.js","function/resolveUrl.js","variables.js","function/resolvePath.js","function/resolveId.js","singleton/cache.js","class/weakmap.js","class/pledge.js","class/registry.js","class/failure.js","class/dependency.js","class/pattern.js","class/xhr.js","validator/isArray.js","function/hash.js","abstract/uuid.js","function/demand.js","class/loader.js","function/provide.js","class/queue.js","class/processor.js","function/resolveSourcemaps.js","abstract/handler.js","handler/module.js","class/Failure.js","handler/bundle.js","handler/component.js","plugin/genie.js"],"names":["global","setTimeout","clearTimeout","demand","provide","queue","processor","document","options","settings","version","cache","timeout","pattern","modules","handler","DEMAND_ID","MODULE_PREFIX","MODULE_PREFIX_ABSTRACT","MODULE_PREFIX_HANDLER","MODULE_PREFIX_PLUGIN","MODULE_PREFIX_FUNCTION","MODULE_PREFIX_VALIDATOR","MOCK_PREFIX","NULL","UNDEFINED","undefined","FALSE","TRUE","STRING_UNDEFINED","STRING_STRING","STRING_OBJECT","STRING_FUNCTION","STRING_NUMBER","FUNCTION_EMPTY","EVENT_PRE_CONFIGURE","EVENT_PREFIX","EVENT_POST_CONFIGURE","EVENT_POSTFIX","EVENT_CACHE","EVENT_CACHE_MISS","EVENT_CACHE_EXCEED","EVENT_PRE_RESOLVE","EVENT_POST_RESOLVE","EVENT_PRE_REQUEST","EVENT_POST_REQUEST","EVENT_PRE_PROCESS","EVENT_POST_PROCESS","EVENT_QUEUE_ENQUEUE","EVENT_QUEUE","ERROR_LOAD","ERROR_RESOLVE","arrayPrototype","Array","prototype","arrayPrototypeSlice","slice","arrayPrototypeConcat","concat","object","Object","objectPrototypeToString","toString","objectCreate","create","objectDefineProperty","defineProperty","objectGetOwnPropertyNames","getOwnPropertyNames","objectGetOwnPropertyDescriptor","getOwnPropertyDescriptor","linkElement","createElement","ClassDescriptor","value","writable","configurable","enumerable","__proto__","validatorIsTypeOf","type","validatorIsObject","validatorIsPositive","isFinite","Math","floor","validatorIsInstanceOf","module","functionIterate","source","callback","context","property","properties","keys","i","call","strPrototype","objectDefine","name","this","functionExtends","names","constructor","e","TypeError","Function","define","storage","element","fallback","hasSetImmediate","functionMerge","mergeProperties","targetPropertyIsObject","targetProperty","length","target","arguments","functionUuid","regex","RegExp","randomize","character","r","random","replace","functionDefer","fn","MutationObserver","observe","attributes","setAttribute","addEventListener","event","data","uuid","postMessage","onreadystatechange","parentNode","removeChild","body","appendChild","setImmediate","functionToArray","arrayLikeObject","start","end","singletonEvent","TYPE_ON","regexMatchEvent","listener","addListener","events","pointer","split","shift","test","on","after","push","filter","Event","emit","parameter","item","apply","functionGetTimestamp","Date","regexMatchRegex","functionEscapeRegex","functionResolveUrl","url","href","regexIsAbsoluteUri","regexIsAbsolutePath","regexMatchSourcemap","regexMatchBaseUrl","regexMatchInternal","regexMatchParameter","functionResolvePath","uri","path","functionResolveId","match","singletonCache","STORAGE_PREFIX","STORAGE_SUFFIX_STATE","regexMatchState","regexMatchProperties","supportsLocalStorage","localStorage","exception","supportsRemainingSpace","enabled","dependency","indexOf","weight","state","getKey","key","getItem","setKey","getState","matches","setState","join","id","Cache","clear","expired","bind","then","cacheDispose","set","get","lifetime","invalid","resolve","spaceBefore","remainingSpace","Error","error","ClassDependency","all","self","ClassWeakmap","WeakMap","prefix","getEntry","entry","delete","has","ClassPledge","PLEDGE_PENDING","PLEDGE_RESOLVED","PLEDGE_REJECTED","pledge","index","resolved","count","check","rejected","total","dfd","reject","executor","handle","result","catch","always","alwaysListener","resolveListener","rejectListener","defer","isPending","isResolved","isRejected","pledges","race","ClassRegistry","remove","ClassFailure","message","stack","traverse","depth","indention","registry","placeholder","setProperty","addPending","addResolved","addRejected","register","mock","enqueue","isInternal","node","querySelector","list","pending","ClassPattern","regexMatchTrailingSlash","location","process","current","ClassXhr","XMLHttpRequest","XDomainRequest","xhr","boundCheckState","readyState","abort","ontimeout","onerror","onabort","status","onprogress","onload","responseText","getResponseHeader","open","send","validatorIsArray","functionHash","input","charCodeAt","AbstractUuid","updateCacheSettings","updatePatternSettings","updateModuleSettings","temp","dependencies","configure","base","min","max","regexMatchEmptySearch","response","validate","load","search","onPostRequest","EVENT_CACHE_HIT","onPreRequest","onPreProcess","isFunction","definition","console","/demand","ClassQueue","dequeue","extends","ClassProcessor","functionResolveSourcemaps","replacement","exec","protocol","host","pathname","abstractHandler","handlerModule","getElementsByTagName","regexMatchType","HandlerModule","script","async","text","handlerBundle","updateDependencies","HandlerBundle","getType","handlerComponent","HandlerComponent","container","innerHTML","firstElementChild","getAttribute","textContent","pluginGenie","matchPattern","addPattern","resolveBundles","JSON","stringify","bundle","configuration","/demand/handler/bundle","generateConfiguration","bundles","assignModule","main","parent"],"mappings":";CAYA,SAAAA,EAAAC,EAAAC,GACA,aAGA,IAGAC,EAAAC,EAAAC,EAAAC,EAHAC,EAAAP,EAAAO,SACAC,EAAA,WAAAR,GAAAA,EAAAG,OACAM,GAAAC,QAAA,QAAAC,SAAAC,QAAA,IAAAC,WAAAC,WAAAC,QAAA,UCdAC,EAAA,SAGAC,EAAA,WACAC,EAAAD,EAAA,YACAE,EAAAF,EAAA,WACAG,EAAAH,EAAA,UACAI,EAAAJ,EAAA,YACAK,EAAAL,EAAA,aACAM,EAAA,QACAC,EAAA,KACAC,OAAAC,EACAC,GAAA,EACAC,GAAA,EACAC,EAAA,YACAC,EAAA,SAEAC,EAAA,SACAC,EAAA,WACAC,EAAA,SACAC,EAAA,aAIAC,EAAAC,eACAC,EAAAC,gBACAC,EAAA,QACAC,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AAhW,EAAA,YAAA8U,IACAkB,GAAA/V,EAAA,QAAAoV,IACAW,GAAA7V,EAAA,WAAAyD,GACAoS,GAAA7V,EAAA,UAAA0R,IACAmE,GAAA7V,EAAA,WAAA2D,IACAkS,GAAA7V,EAAA,eAAAgE,IACA6R,GAAA9V,EAAA,aAAAsJ,IACAwM,GAAA9V,EAAA,oBAAA0T,IACAoC,GAAA9V,EAAA,QAAA2F,IACAmQ,GAAA9V,EAAA,UAAAmE,IACA2R,GAAA9V,EAAA,OAAA4R,IACAkE,GAAA9V,EAAA,QAAA0G,IACAoP,GAAA9V,EAAA,OAAAkG,IACA4P,GAAAlW,EAAA,UAAAiN,IACAiJ,GAAAlW,EAAA,aAAAwD,GACA0S,GAAAlW,EAAA,SAAAwN,IACA0I,GAAAlW,EAAA,QAAA0T,IACAwC,GAAAlW,EAAA,MAAA8Q,IACAoF,GAAAlW,EAAA,UAAAqP,IAEA9P,GAAAA,EAAA4W,KACA,cAAA5W,EAAA4W,MACA,KAAAtV,EACA3B,EAAAK,EAAA4W,MAEA,MACA,KAAApV,EACA5B,EAAA,OAAAI,EAAA4W,SArEA,CA0EA,kBAAAhR,KAAAD,KAAAkR,OAAAjR,KAAAnG,WAAAC","file":"demand.js","sourcesContent":["/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tMODULE_PREFIX, MODULE_PREFIX_HANDLER, MODULE_PREFIX_VALIDATOR, MODULE_PREFIX_PLUGIN, MODULE_PREFIX_FUNCTION, MODULE_PREFIX_ABSTRACT, STRING_STRING, STRING_FUNCTION, TRUE,\n\tvalidatorIsTypeOf, validatorIsArray, validatorIsObject, validatorIsInstanceOf,\n\tfunctionResolveUrl, functionResolveSourcemaps, functionMerge, functionIterate, functionDefer, functionHash, functionUuid,\n\tAbstractUuid, abstractHandler,\n\tClassDependency, ClassQueue, ClassProcessor, ClassPledge, ClassXhr, ClassFailure, ClassDescriptor, ClassWeakmap,\n\thandlerModule, handlerBundle, handlerComponent,\n \tpluginGenie\n*/\n\n/*eslint no-unused-vars: [2, { \"vars\": \"local\", \"args\": \"none\" }]*/\n(function(global, setTimeout, clearTimeout) {\n\t'use strict';\n\n\t/* eslint-disable no-unused-vars */\n\tvar document = global.document,\n\t\toptions = 'demand' in global && global.demand,\n\t\tsettings = { version: '1.0.0', cache: {}, timeout: 8000, pattern: {}, modules: {}, handler: 'module' },\n\t\tdemand, provide, queue, processor;\n\t/* eslint-enable no-unused-vars */\n\n\t// include inheritance\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tTRUE,\n\t\t\tobjectCreate, objectDefineProperty, objectGetOwnPropertyNames, objectGetOwnPropertyDescriptor,\n\t\t\tClassDescriptor\n\t\t*/\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout\n\t\t*/\n\t\t\n\t\tvar DEMAND_ID = 'demand',\n\t\t\tPROVIDE_ID = 'provide',\n\t\t\tPATH_ID = 'path',\n\t\t\tMODULE_PREFIX = '/' + DEMAND_ID + '/',\n\t\t\tMODULE_PREFIX_ABSTRACT = MODULE_PREFIX + 'abstract/',\n\t\t\tMODULE_PREFIX_HANDLER = MODULE_PREFIX + 'handler/',\n\t\t\tMODULE_PREFIX_PLUGIN = MODULE_PREFIX + 'plugin/',\n\t\t\tMODULE_PREFIX_FUNCTION = MODULE_PREFIX + 'function/',\n\t\t\tMODULE_PREFIX_VALIDATOR = MODULE_PREFIX + 'validator/',\n\t\t\tMOCK_PREFIX = 'mock:',\n\t\t\tNULL = null,\n\t\t\tUNDEFINED = undefined,\n\t\t\tFALSE = false,\n\t\t\tTRUE = true,\n\t\t\tSTRING_UNDEFINED = 'undefined',\n\t\t\tSTRING_STRING = 'string',\n\t\t\tSTRING_BOOLEAN = 'boolean',\n\t\t\tSTRING_OBJECT = 'object',\n\t\t\tSTRING_FUNCTION = 'function',\n\t\t\tSTRING_NUMBER = 'number',\n\t\t\tFUNCTION_EMPTY = function() {},\n\t\t\tEVENT_PREFIX = 'pre',\n\t\t\tEVENT_POSTFIX = 'post',\n\t\t\tEVENT_CONFIGURE = 'Configure',\n\t\t\tEVENT_PRE_CONFIGURE = EVENT_PREFIX + EVENT_CONFIGURE,\n\t\t\tEVENT_POST_CONFIGURE = EVENT_POSTFIX + EVENT_CONFIGURE,\n\t\t\tEVENT_CACHE = 'cache',\n\t\t\tEVENT_CACHE_MISS = EVENT_CACHE + 'Miss',\n\t\t\tEVENT_CACHE_HIT = EVENT_CACHE + 'Hit',\n\t\t\tEVENT_CACHE_CLEAR = EVENT_CACHE + 'Clear',\n\t\t\tEVENT_CACHE_EXCEED = EVENT_CACHE + 'Exceed',\n\t\t\tEVENT_PRE_CACHE = EVENT_PREFIX + 'Cache',\n\t\t\tEVENT_POST_CACHE = EVENT_POSTFIX + 'Cache',\n\t\t\tEVENT_RESOLVE = 'Resolve',\n\t\t\tEVENT_PRE_RESOLVE = EVENT_PREFIX + EVENT_RESOLVE,\n\t\t\tEVENT_POST_RESOLVE = EVENT_POSTFIX + EVENT_RESOLVE,\n\t\t\tEVENT_REQUEST = 'Request',\n\t\t\tEVENT_PRE_REQUEST = EVENT_PREFIX + EVENT_REQUEST,\n\t\t\tEVENT_POST_REQUEST = EVENT_POSTFIX + EVENT_REQUEST,\n\t\t\tEVENT_PROCESS = 'Process',\n\t\t\tEVENT_PRE_PROCESS = EVENT_PREFIX + EVENT_PROCESS,\n\t\t\tEVENT_POST_PROCESS = EVENT_POSTFIX + EVENT_PROCESS,\n\t\t\tEVENT_QUEUE = 'queue',\n\t\t\tEVENT_QUEUE_ENQUEUE = EVENT_QUEUE + 'Enqueue',\n\t\t\tEVENT_QUEUE_DEQUEUE = EVENT_QUEUE + 'Dequeue',\n\t\t\tERROR_LOAD = 'error loading',\n\t\t\tERROR_PROVIDE = 'error providing',\n\t\t\tERROR_RESOLVE = 'error resolving',\n\t\t\tERROR_PROVIDE_ANONYMOUS = 'unspecified anonymous provide';\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout\n\t\t*/\n\t\t\n\t\tvar arrayPrototype = Array.prototype,\n\t\t\tarrayPrototypeSlice = arrayPrototype.slice,\n\t\t\tarrayPrototypeConcat = arrayPrototype.concat,\n\t\t\tobject = Object,\n\t\t\tobjectPrototype = object.prototype,\n\t\t\tobjectPrototypeToString = objectPrototype.toString,\n\t\t\tobjectCreate = object.create,\n\t\t\tobjectDefineProperty = object.defineProperty,\n\t\t\tobjectGetOwnPropertyNames = object.getOwnPropertyNames,\n\t\t\tobjectGetOwnPropertyDescriptor = object.getOwnPropertyDescriptor,\n\t\t\tlinkElement = document.createElement('a');\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tNULL\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t\n\t\tfunction ClassDescriptor(value, writable, configurable, enumerable) {\n\t\t\treturn {\n\t\t\t\t__proto__: NULL,\n\t\t\t\tvalue: value,\n\t\t\t\tenumerable: !!enumerable,\n\t\t\t\tconfigurable: !!configurable,\n\t\t\t\twritable: !!writable\n\t\t\t};\n\t\t}\n\t\t\n\t\t\n\t\t(function(strPrototype) {\n\t\t\tfunction objectDefine(name, value, writable, configurable, enumerable) {\n\t\t\t\tobjectDefineProperty(this, name, new ClassDescriptor(value, writable, configurable, enumerable));\n\t\t\t}\n\t\t\n\t\t\tfunction functionExtends(source) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tprototype = self[strPrototype],\n\t\t\t\t\tnames = objectGetOwnPropertyNames(prototype),\n\t\t\t\t\tproperties = { constructor: new ClassDescriptor(self, TRUE, TRUE)},\n\t\t\t\t\ti = 0, property;\n\t\t\n\t\t\t\tfor(; (property = names[i]) && !properties[property]; i++) {\n\t\t\t\t\tproperties[property] = objectGetOwnPropertyDescriptor(prototype, property);\n\t\t\t\t}\n\t\t\n\t\t\t\ttry {\n\t\t\t\t\tself[strPrototype] = objectCreate(source[strPrototype] || source, properties);\n\t\t\t\t} catch(e) {\n\t\t\t\t\t// ES6 class prototypes are readonly at least in Chrome\n\t\t\t\t\t// (and assignment throws an error in strict mode) ...\n\t\t\t\t}\n\t\t\n\t\t\t\t// ... which is handled here\n\t\t\t\tif(self[strPrototype] === prototype) {\n\t\t\t\t\tthrow new TypeError('Unable to extend, prototype is not writable');\n\t\t\t\t}\n\t\t\n\t\t\t\treturn self;\n\t\t\t}\n\t\t\n\t\t\tobjectDefine.call(Object.prototype, 'define', objectDefine);\n\t\t\tobjectDefine.call(global.Object.prototype, 'define', objectDefine);\n\t\t\n\t\t\tFunction.prototype.define('extends', functionExtends);\n\t\t\tglobal.Function.prototype.define('extends', functionExtends);\n\t\t}('prototype'));\n\t\t\n\n\t// include main components\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tSTRING_BOOLEAN, STRING_STRING, EVENT_PRE_RESOLVE, EVENT_POST_RESOLVE, EVENT_PRE_CONFIGURE, EVENT_POST_CONFIGURE, EVENT_CACHE_MISS, EVENT_CACHE_HIT, EVENT_PRE_REQUEST, EVENT_POST_REQUEST, EVENT_PRE_PROCESS, EVENT_POST_PROCESS, NULL, FALSE,\n\t\t\tvalidatorIsTypeOf, validatorIsObject, validatorIsPositive, validatorIsInstanceOf,\n\t\t\tfunctionIterate, functionMerge, functionDefer, functionToArray,\n\t\t\tClassPledge, ClassDependency, ClassPattern, ClassLoader,\n\t\t\tsingletonEvent, singletonCache\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout\n\t\t*/\n\t\t\n\t\t/**\n\t\t * isTypeOf\n\t\t *\n\t\t * Check whether a given object is of specified type\n\t\t *\n\t\t * @param object\n\t\t * @param {string} type\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\t\n\t\tfunction validatorIsTypeOf(object, type) {\n\t\t\treturn typeof object === type;\n\t\t}\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tSTRING_OBJECT,\n\t\t\tvalidatorIsTypeOf\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require validator/isTypeOf.js\n\t\t\n\t\t/**\n\t\t * isObject\n\t\t *\n\t\t * Check whether a given object is of type object\n\t\t *\n\t\t * @param object\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\t\n\t\tfunction validatorIsObject(object) {\n\t\t\treturn object && validatorIsTypeOf(object, STRING_OBJECT);\n\t\t}\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tSTRING_NUMBER,\n\t\t\tvalidatorIsTypeOf\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require validator/isTypeOf.js\n\t\t\n\t\t/**\n\t\t * isPositive\n\t\t *\n\t\t * Check whether a given value is a positive integer\n\t\t *\n\t\t * @param value\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\t\n\t\tfunction validatorIsPositive(value) {\n\t\t\treturn validatorIsTypeOf(value, STRING_NUMBER) && isFinite(value) && Math.floor(value) === value && value >= 0;\n\t\t}\n\t\t\n\t\t/**\n\t\t * isInstanceOf\n\t\t *\n\t\t * Check whether a given object is an instance of specified type\n\t\t *\n\t\t * @param object\n\t\t * @param module\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tfunction validatorIsInstanceOf(object, module) {\n\t\t\treturn object instanceof module;\n\t\t}\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tUNDEFINED, FALSE,\n\t\t\tobject\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require shortcuts.js\n\t\t\n\t\t/**\n\t\t * iterate\n\t\t *\n\t\t * Iterate over enumerable & own properties of a given\n\t\t * object and pass current property as well as its value\n\t\t * to a callback function\n\t\t *\n\t\t * @param {object} object\n\t\t * @param {function} callback\n\t\t * @param context\n\t\t *\n\t\t * @return mixed\n\t\t */\n\t\t\n\t\tfunction functionIterate(source, callback, context) {\n\t\t\tvar properties = object.keys(source),\n\t\t\t\ti = 0, property;\n\t\t\n\t\t\tfor(; (property = properties[i]) !== UNDEFINED; i++) {\n\t\t\t\tif(callback.call(context, property, source[property]) === FALSE) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn context;\n\t\t}\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tUNDEFINED,\n\t\t\tvalidatorIsObject,\n\t\t\tfunctionIterate\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require validator/isObject.js\n\t\t//=require function/iterate.js\n\t\t\n\t\t/**\n\t\t * merge\n\t\t *\n\t\t * Merge two or more objects into the first one passed in\n\t\t *\n\t\t * @param {...object} object\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tvar functionMerge = (function() {\n\t\t\tfunction mergeProperties(property, value) {\n\t\t\t\tvar targetProperty = this[property],\n\t\t\t\t\ttargetPropertyIsObject;\n\t\t\n\t\t\t\tif(value !== UNDEFINED) {\n\t\t\t\t\tif(validatorIsObject(value)) {\n\t\t\t\t\t\ttargetPropertyIsObject = validatorIsObject(targetProperty);\n\t\t\n\t\t\t\t\t\tif(value.length !== UNDEFINED) {\n\t\t\t\t\t\t\ttargetProperty = (targetPropertyIsObject && targetProperty.length !== UNDEFINED) ? targetProperty : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttargetProperty = (targetPropertyIsObject && targetProperty.length === UNDEFINED) ? targetProperty : {};\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\tthis[property] = functionMerge(targetProperty, value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis[property] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn function functionMerge() {\n\t\t\t\tvar target = arguments[0],\n\t\t\t\t\ti = 1, properties;\n\t\t\n\t\t\t\tfor(; (properties = arguments[i]) !== UNDEFINED; i++) {\n\t\t\t\t\tfunctionIterate(properties, mergeProperties, target);\n\t\t\t\t}\n\t\t\n\t\t\t\treturn target;\n\t\t\t};\n\t\t}());\n\t\t\n\t\t/**\n\t\t * Based on setAsap:\n\t\t * Repo: https://github.com/taylorhakes/setAsap\n\t\t * License: https://github.com/taylorhakes/setAsap/blob/master/LICENSE\n\t\t */\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tNULL, TRUE, FALSE,\n\t\t\tfunctionUuid\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require shortcuts.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout\n\t\t*/\n\t\t\n\t\tvar functionUuid = (function() {\n\t\t\tvar regex = new RegExp('[xy]', 'g');\n\t\t\n\t\t\tfunction randomize(character) {\n\t\t\t\tvar r = Math.random() * 16 | 0;\n\t\t\n\t\t\t\treturn ((character === 'x') ? r : (r & 0x3 | 0x8)).toString(16);\n\t\t\t}\n\t\t\n\t\t\treturn function functionUuid() {\n\t\t\t\treturn 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(regex, randomize);\n\t\t\t};\n\t\t}());\n\t\t\n\t\t\n\t\t/**\n\t\t * defer\n\t\t *\n\t\t * delay function execution like setImmediate does\n\t\t *\n\t\t * @param {function} function\n\t\t */\n\t\tvar functionDefer = (function() {\n\t\t\tvar hasSetImmediate = 'setImmediate' in global,\n\t\t\t\telement, fallback;\n\t\t\n\t\t\tif('MutationObserver' in global) {\n\t\t\t\treturn function functionDefer(fn) {\n\t\t\t\t\telement = document.createElement('div');\n\t\t\n\t\t\t\t\tnew MutationObserver(function() { fn(); })\n\t\t\t\t\t\t.observe(element, { attributes: TRUE });\n\t\t\n\t\t\t\t\telement.setAttribute('i', '1');\n\t\t\t\t};\n\t\t\t}\n\t\t\n\t\t\tif(!hasSetImmediate && 'postMessage' in global && !('importScripts' in global) && 'addEventListener' in global) {\n\t\t\t\treturn (function() {\n\t\t\t\t\tvar storage = {};\n\t\t\n\t\t\t\t\tfunction onMessage(event) {\n\t\t\t\t\t\tvar fn;\n\t\t\n\t\t\t\t\t\tif(event.source === global && event.data && (fn = storage[event.data])) {\n\t\t\t\t\t\t\tfn();\n\t\t\n\t\t\t\t\t\t\tdelete storage[event.data];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tglobal.addEventListener('message', onMessage, FALSE);\n\t\t\n\t\t\t\t\treturn function functionDefer(fn) {\n\t\t\t\t\t\tvar uuid = functionUuid();\n\t\t\n\t\t\t\t\t\tstorage[uuid] = fn;\n\t\t\n\t\t\t\t\t\tglobal.postMessage(uuid, '*');\n\t\t\t\t\t};\n\t\t\t\t}());\n\t\t\t}\n\t\t\n\t\t\tif(!hasSetImmediate && 'onreadystatechange' in (element = document.createElement('script'))) {\n\t\t\t\treturn function functionDefer(fn) {\n\t\t\t\t\telement.onreadystatechange = function onreadystatechange() {\n\t\t\t\t\t\telement.onreadystatechange = NULL;\n\t\t\t\t\t\telement.parentNode.removeChild(element);\n\t\t\n\t\t\t\t\t\tfn();\n\t\t\t\t\t};\n\t\t\n\t\t\t\t\tdocument.body.appendChild(element);\n\t\t\t\t};\n\t\t\t}\n\t\t\n\t\t\tfallback = hasSetImmediate ? setImmediate : setTimeout; // eslint-disable-line no-undef\n\t\t\n\t\t\treturn function functionDefer(fn) {\n\t\t\t\tfallback(fn);\n\t\t\t};\n\t\t}());\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tarrayPrototypeSlice\n\t\t*/\n\t\t\n\t\t//=require shortcuts.js\n\t\t\n\t\tfunction functionToArray(arrayLikeObject, start, end) {\n\t\t\treturn arrayPrototypeSlice.call(arrayLikeObject, start, end);\n\t\t}\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tNULL, STRING_STRING, STRING_FUNCTION, EVENT_POST_CONFIGURE,\n\t\t\tvalidatorIsTypeOf,\n\t\t\tfunctionToArray\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require validator/isTypeOf.js\n\t\t//=require function/toArray.js\n\t\t\n\t\tvar singletonEvent = (function() {\n\t\t\tvar TYPE_ON = 'on',\n\t\t\t\tTYPE_AFTER = 'after',\n\t\t\t\tregexMatchEvent = /^cache(Miss|Hit|Clear|Exceed)|queue(En|De)queue|(pre|post)(Resolve|Configure|Request|Process|Cache)$/,\n\t\t\t\tlistener = {};\n\t\t\n\t\t\tfunction addListener(type, events, callback) {\n\t\t\t\tvar event, pointer;\n\t\t\n\t\t\t\tif(validatorIsTypeOf(events, STRING_STRING) && validatorIsTypeOf(callback, STRING_FUNCTION)) {\n\t\t\t\t\tevents = events.split(' ');\n\t\t\n\t\t\t\t\twhile(event = events.shift()) {\n\t\t\t\t\t\tevent = event.split(':');\n\t\t\n\t\t\t\t\t\tif(regexMatchEvent.test(event[0])) {\n\t\t\t\t\t\t\t(listener[event[0]] || (listener[event[0]] = { on: [], after: [] }))[type].push({ callback: callback, filter: event[1] });\n\t\t\n\t\t\t\t\t\t\tif(type === TYPE_ON && event[0] === EVENT_POST_CONFIGURE && (pointer = settings.modules[event[1]])) {\n\t\t\t\t\t\t\t\tcallback(pointer);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction Event() {}\n\t\t\n\t\t\tEvent.prototype = {\n\t\t\t\temit: function (event, filter) {\n\t\t\t\t\tvar pointer = listener[event],\n\t\t\t\t\t\tparameter, i, item;\n\t\t\n\t\t\t\t\tif(pointer) {\n\t\t\t\t\t\tparameter = functionToArray(arguments, 2);\n\t\t\n\t\t\t\t\t\tfor(i = 0; (item = pointer[TYPE_ON][i]); i++) {\n\t\t\t\t\t\t\tif(!item.filter || item.filter === filter) {\n\t\t\t\t\t\t\t\titem.callback.apply(NULL, parameter);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\tfor(i = 0; (item = pointer[TYPE_AFTER][i]); i++) {\n\t\t\t\t\t\t\tif(!item.filter || item.filter === filter) {\n\t\t\t\t\t\t\t\titem.callback.apply(NULL, parameter);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\ton: function(events, callback) {\n\t\t\t\t\taddListener(TYPE_ON, events, callback);\n\t\t\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tafter: function(events, callback) {\n\t\t\t\t\taddListener(TYPE_AFTER, events, callback);\n\t\t\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\treturn new Event();\n\t\t}());\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tDEMAND_ID, FUNCTION_EMPTY, EVENT_POST_REQUEST, EVENT_POST_PROCESS, EVENT_CACHE_HIT, EVENT_CACHE_MISS, EVENT_CACHE_EXCEED, EVENT_CACHE_CLEAR, EVENT_PRE_CACHE, EVENT_PRE_CACHE, EVENT_POST_CACHE, STRING_STRING, NULL, FALSE, TRUE,\n\t\t\tvalidatorIsTypeOf,\n\t\t\tfunctionGetTimestamp, functionEscapeRegex, functionIterate, functionDefer, functionResolveId, functionToArray,\n\t\t\tClassDependency,\n\t\t\tsingletonEvent\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require validator/isTypeOf.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout\n\t\t*/\n\t\t\n\t\tfunction functionGetTimestamp() {\n\t\t\treturn +new Date();\n\t\t}\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout\n\t\t*/\n\t\t\n\t\tvar functionEscapeRegex = (function() {\n\t\t\tvar regexMatchRegex = /[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g; // eslint-disable-line no-useless-escape\n\t\t\n\t\t\treturn function functionEscapeRegex(value) {\n\t\t\t\treturn value.replace(regexMatchRegex, '\\\\$&');\n\t\t\t};\n\t\t}());\n\t\t\n\t\t//=require function/iterate.js\n\t\t//=require function/defer.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tregexMatchParameter,\n\t\t\tfunctionResolvePath\n\t\t*/\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tDEMAND_ID, PROVIDE_ID, PATH_ID,\n\t\t\tfunctionEscapeRegex, functionResolveUrl\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require function/escapeRegex.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tlinkElement\n\t\t*/\n\t\t\n\t\t//=require shortcuts.js\n\t\t\n\t\tfunction functionResolveUrl(url) {\n\t\t\tlinkElement.href = url;\n\t\t\n\t\t\treturn linkElement.href;\n\t\t}\n\t\t\n\t\t\n\t\tvar regexIsAbsoluteUri = /^(http(s?):)?\\/\\//i,\n\t\t\tregexIsAbsolutePath = /^\\//,\n\t\t\tregexMatchSourcemap = /((?:\\/\\/|\\/\\*)#)\\s*(sourceMappingURL)\\s*=\\s*(?!(?:http[s]?:)?\\/\\/)(.+?)\\.map(?:\\s+)?(\\*\\/)?/g,\n\t\t\tregexMatchBaseUrl = new RegExp('^' + functionEscapeRegex(functionResolveUrl('/'))),\n\t\t\tregexMatchInternal = new RegExp('^' + DEMAND_ID + '|' + PROVIDE_ID + '|' + PATH_ID + '$'),\n\t\t\tregexMatchParameter = /^(mock:)?([+-])?((?:[-\\w]+\\/?)+)?(?:@(.+?))?(?:#(\\d+))?!/;\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tregexMatchParameter, regexMatchBaseUrl, regexIsAbsolutePath, regexIsAbsoluteUri,\n\t\t\tfunctionResolveUrl\n\t\t*/\n\t\t\n\t\t//=require variables.js\n\t\t//=require function/resolveUrl.js\n\t\t\n\t\tfunction functionResolvePath(uri, context) {\n\t\t\tvar path = uri.replace(regexMatchParameter, '');\n\t\t\n\t\t\tif(!regexIsAbsolutePath.test(path) && !regexIsAbsoluteUri.test(path)) {\n\t\t\t\tpath = '/' + functionResolveUrl(((context && functionResolveUrl(context + '/../')) || '/') + path).replace(regexMatchBaseUrl, '');\n\t\t\t}\n\t\t\n\t\t\treturn path;\n\t\t}\n\t\t\n\t\t\n\t\tfunction functionResolveId(uri, context) {\n\t\t\tvar parameter = uri.match(regexMatchParameter);\n\t\t\n\t\t\treturn ((parameter && parameter[1]) ? 'mock:' : '') + ((parameter && parameter[3]) || settings.handler) + '!' + functionResolvePath(uri, context);\n\t\t}\n\t\t\n\t\t//=require function/toArray.js\n\t\t//=require singleton/event.js\n\t\t\n\t\tvar singletonCache = (function() {\n\t\t\tvar STORAGE_PREFIX = '[' + DEMAND_ID + ']',\n\t\t\t\tSTORAGE_SUFFIX_STATE = '[state]',\n\t\t\t\tSTORAGE_SUFFIX_VALUE = '[value]',\n\t\t\t\tregexMatchState = new RegExp('^' + functionEscapeRegex(STORAGE_PREFIX) + '\\\\[(.+?)\\\\]' + functionEscapeRegex(STORAGE_SUFFIX_STATE) + '$'),\n\t\t\t\tregexMatchProperties = /^(.+?),(\\d+),(\\d*),(.+?),(\\d+)$/,\n\t\t\t\tsupportsLocalStorage = (function() { try { return 'localStorage' in global && global.localStorage; } catch(exception) { return FALSE; } }()),\n\t\t\t\tlocalStorage = supportsLocalStorage ? global.localStorage : NULL,\n\t\t\t\tsupportsRemainingSpace = supportsLocalStorage && 'remainingSpace' in localStorage,\n\t\t\t\tstorage = {},\n\t\t\t\tcache;\n\t\t\n\t\t\tsingletonEvent\n\t\t\t\t.on(EVENT_CACHE_MISS, function(dependency) {\n\t\t\t\t\tfunctionDefer(function() {\n\t\t\t\t\t\tcache.clear.path(dependency.id);\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.on(EVENT_CACHE_EXCEED, function(dependency) {\n\t\t\t\t\tdemand('-!/' + DEMAND_ID + '/cache/dispose').then(function(cacheDispose) {\n\t\t\t\t\t\tfunctionDefer(function() {\n\t\t\t\t\t\t\tcacheDispose(dependency.source.length);\n\t\t\n\t\t\t\t\t\t\tcache.set(dependency);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.on(EVENT_POST_REQUEST, function(dependency) {\n\t\t\t\t\tif(dependency.source && enabled(dependency)) {\n\t\t\t\t\t\tstorage[dependency.id] = TRUE;\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.after(EVENT_POST_PROCESS, function(dependency) {\n\t\t\t\t\tif(storage[dependency.id]) {\n\t\t\t\t\t\tfunctionDefer(function() {\n\t\t\t\t\t\t\tcache.set(dependency);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\t\tfunction enabled(dependency) {\n\t\t\t\tvar match;\n\t\t\n\t\t\t\tif(dependency.cache !== NULL) {\n\t\t\t\t\treturn dependency.cache;\n\t\t\t\t}\n\t\t\n\t\t\t\tfunctionIterate(settings.cache, function(property, value) {\n\t\t\t\t\tif(dependency.path.indexOf(property) === 0 && (!match || value.weight > match.weight)) {\n\t\t\t\t\t\tmatch = value;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\t\t\treturn match ? match.state : FALSE;\n\t\t\t}\n\t\t\n\t\t\tfunction getKey(key) {\n\t\t\t\treturn localStorage.getItem(key);\n\t\t\t}\n\t\t\n\t\t\tfunction setKey(key, value) {\n\t\t\t\tlocalStorage[value ? 'setItem' : 'removeItem'](key, value);\n\t\t\t}\n\t\t\n\t\t\tfunction getState(key) {\n\t\t\t\tvar state = getKey(key),\n\t\t\t\t\tmatches;\n\t\t\n\t\t\t\tif(state && (matches = state.match(regexMatchProperties))) {\n\t\t\t\t\treturn functionToArray(matches, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction setState(key, state) {\n\t\t\t\tstate[4] = functionGetTimestamp();\n\t\t\n\t\t\t\tsetKey(key, state.join(','));\n\t\t\t}\n\t\t\n\t\t\tfunction emit(event, dependency, state) {\n\t\t\t\tsingletonEvent.emit(event, dependency.id, dependency, state);\n\t\t\t}\n\t\t\n\t\t\tfunction Cache() {\n\t\t\t\tfunctionDefer(this.clear.expired.bind(this.clear));\n\t\t\t}\n\t\t\n\t\t\tCache.prototype = {\n\t\t\t\tget: supportsLocalStorage ? function(dependency) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar id, state;\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(enabled(dependency)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tid = STORAGE_PREFIX + '[' + dependency.id + ']';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstate = getState(id + STORAGE_SUFFIX_STATE);\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!state) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(state[0] !== dependency.version || (state[2] && dependency.lifetime && state[2] <= functionGetTimestamp())) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdependency.invalid = true;\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdependency.source = getKey(id + STORAGE_SUFFIX_VALUE);\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfunctionDefer(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetState(id + STORAGE_SUFFIX_STATE, state);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY,\n\t\t\t\tresolve: supportsLocalStorage ? function(dependency) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar self = this;\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(self.get(dependency)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_CACHE_HIT, dependency);\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_CACHE_MISS, dependency);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t} : function(dependency) { emit(EVENT_CACHE_MISS, dependency); },\n\t\t\t\tset: supportsLocalStorage ? function(dependency) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar state, id, spaceBefore;\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(enabled(dependency)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstate = [ dependency.version, dependency.source.length, dependency.lifetime ? functionGetTimestamp() + dependency.lifetime : NULL, demand.version ];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tid = STORAGE_PREFIX + '[' + dependency.id + ']';\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_PRE_CACHE, dependency, state);\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tspaceBefore = supportsRemainingSpace ? localStorage.remainingSpace : NULL;\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetKey(id + STORAGE_SUFFIX_VALUE, dependency.source);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetState(id + STORAGE_SUFFIX_STATE, state);\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// strict equality check with \"===\" is required due to spaceBefore might be \"0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(spaceBefore !== NULL && localStorage.remainingSpace === spaceBefore) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthrow new Error();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_POST_CACHE, dependency, state);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch(error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_CACHE_EXCEED, dependency);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY,\n\t\t\t\tclear: {\n\t\t\t\t\tpath: supportsLocalStorage ? function(path) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar id = functionResolveId(path),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey = STORAGE_PREFIX + '[' + id + ']';\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(getKey(key + STORAGE_SUFFIX_STATE)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetKey(key + STORAGE_SUFFIX_STATE);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetKey(key + STORAGE_SUFFIX_VALUE);\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_CACHE_CLEAR, ClassDependency.get(id) || new ClassDependency(id, NULL, FALSE));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY,\n\t\t\t\t\tall: supportsLocalStorage ? function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar match;\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfunctionIterate(localStorage, function(property) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmatch = property.match(regexMatchState);\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmatch && this.path(match[1]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}, this);\n\t\t\t\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY,\n\t\t\t\t\texpired: supportsLocalStorage ? function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar self = this,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmatch, state;\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfunctionIterate(localStorage, function(property) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmatch = property.match(regexMatchState);\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(match) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstate = getState(STORAGE_PREFIX + '[' + match[1] + ']' + STORAGE_SUFFIX_STATE);\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(state && state[2] > 0 && state[2] <= functionGetTimestamp()) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tself.path(match[1]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}, this);\n\t\t\t\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\treturn (cache = new Cache());\n\t\t}());\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t \tFUNCTION_EMPTY, NULL,\n\t\t\tarrayPrototypeConcat,\n\t\t\tfunctionDefer, functionToArray,\n\t\t\tClassWeakmap\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require shortcuts.js\n\t\t//=require function/defer.js\n\t\t//=require function/toArray.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tfunctionUuid,\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require function/uuid.js\n\t\t\n\t\tvar ClassWeakmap = 'WeakMap' in global ? global.WeakMap : (function() {\n\t\t\tvar prefix = 'weakmap-';\n\t\t\n\t\t\tfunction getEntry(context, key) {\n\t\t\t\tvar entry;\n\t\t\n\t\t\t\tif((entry = key[context.id]) && entry[0] === key) {\n\t\t\t\t\treturn entry;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction ClassWeakmap() {\n\t\t\t\tthis.define('id', prefix + functionUuid());\n\t\t\t}\n\t\t\n\t\t\tClassWeakmap.prototype = {\n\t\t\t\tset: function(key, value) {\n\t\t\t\t\tvar entry = getEntry(this, key);\n\t\t\n\t\t\t\t\tif(entry) {\n\t\t\t\t\t\tentry[1] = value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tkey.define(this.id, [ key, value ]);\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tget: function(key) {\n\t\t\t\t\tvar entry = getEntry(this, key);\n\t\t\n\t\t\t\t\tif(entry) {\n\t\t\t\t\t\treturn entry[1];\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tdelete: function(key) {\n\t\t\t\t\tvar entry = getEntry(this, key);\n\t\t\n\t\t\t\t\tif(entry) {\n\t\t\t\t\t\tentry.length = 0;\n\t\t\n\t\t\t\t\t\tdelete key[this.id];\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\thas: function(key) {\n\t\t\t\t\treturn !!getEntry(this, key);\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\treturn ClassWeakmap;\n\t\t}());\n\t\t\n\t\t\n\t\tvar ClassPledge = (function() {\n\t\t\tvar PLEDGE_PENDING = 'pending',\n\t\t\t\tPLEDGE_RESOLVED = 'resolved',\n\t\t\t\tPLEDGE_REJECTED = 'rejected',\n\t\t\t\tstorage = new ClassWeakmap();\n\t\t\n\t\t\tfunction resolve() {\n\t\t\t\tstorage.get(this).handle(PLEDGE_RESOLVED, arguments);\n\t\t\t}\n\t\t\n\t\t\tfunction reject() {\n\t\t\t\tstorage.get(this).handle(PLEDGE_REJECTED, arguments);\n\t\t\t}\n\t\t\n\t\t\tfunction handle(state, parameter) {\n\t\t\t\tvar properties = storage.get(this),\n\t\t\t\t\tpointer, result;\n\t\t\n\t\t\t\tif(properties.state === PLEDGE_PENDING) {\n\t\t\t\t\tproperties.state = state;\n\t\t\t\t\tproperties.value = parameter;\n\t\t\t\t}\n\t\t\n\t\t\t\twhile(pointer = properties[properties.state].shift()) {\n\t\t\t\t\tresult = pointer.handler.apply(NULL, properties.value);\n\t\t\n\t\t\t\t\tif(result && typeof result.then === 'function') {\n\t\t\t\t\t\tresult.then(pointer.dfd.resolve, pointer.dfd.reject);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpointer.dfd[properties.state === PLEDGE_RESOLVED ? 'resolve' : 'reject'].apply(NULL, properties.value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\tproperties[PLEDGE_RESOLVED].length = 0;\n\t\t\t\tproperties[PLEDGE_REJECTED].length = 0;\n\t\t\t}\n\t\t\n\t\t\tfunction observe(pledge, index, properties) {\n\t\t\t\tpledge.then(\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tproperties.resolved[index] = functionToArray(arguments);\n\t\t\n\t\t\t\t\t\tproperties.count++;\n\t\t\n\t\t\t\t\t\tcheck(properties);\n\t\t\t\t\t},\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tproperties.rejected.push(functionToArray(arguments));\n\t\t\n\t\t\t\t\t\tcheck(properties);\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t\n\t\t\tfunction check(properties) {\n\t\t\t\tif(properties.count === properties.total) {\n\t\t\t\t\tproperties.dfd.resolve.apply(NULL, arrayPrototypeConcat.apply([], properties.resolved));\n\t\t\t\t} else if(properties.rejected.length + properties.count === properties.total) {\n\t\t\t\t\tproperties.dfd.reject.apply(NULL, arrayPrototypeConcat.apply([], properties.rejected));\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction ClassPledge(executor) {\n\t\t\t\tvar self = this;\n\t\t\n\t\t\t\tstorage.set(this, { state: PLEDGE_PENDING, handle: handle.bind(self), value: NULL, resolved: [], rejected: [], count: 0 });\n\t\t\n\t\t\t\texecutor(resolve.bind(self), reject.bind(self));\n\t\t\n\t\t\t\treturn self;\n\t\t\t}\n\t\t\n\t\t\tClassPledge.prototype = {\n\t\t\t\t'catch': function(listener) {\n\t\t\t\t\treturn this.then(FUNCTION_EMPTY, listener);\n\t\t\t\t},\n\t\t\t\talways: function(alwaysListener) {\n\t\t\t\t\treturn this.then(alwaysListener, alwaysListener);\n\t\t\t\t},\n\t\t\t\tthen: function(resolveListener, rejectListener) {\n\t\t\t\t\tvar properties = storage.get(this),\n\t\t\t\t\t\tdfd = ClassPledge.defer();\n\t\t\n\t\t\t\t\tresolveListener && properties[PLEDGE_RESOLVED].push({ handler: resolveListener, dfd: dfd });\n\t\t\t\t\trejectListener && properties[PLEDGE_REJECTED].push({ handler: rejectListener, dfd: dfd });\n\t\t\n\t\t\t\t\tif(properties.state !== PLEDGE_PENDING) {\n\t\t\t\t\t\tfunctionDefer(properties.handle);\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\treturn dfd.pledge;\n\t\t\t\t},\n\t\t\t\tisPending: function() {\n\t\t\t\t\treturn storage.get(this).state === PLEDGE_PENDING;\n\t\t\t\t},\n\t\t\t\tisResolved: function() {\n\t\t\t\t\treturn storage.get(this).state === PLEDGE_RESOLVED;\n\t\t\t\t},\n\t\t\t\tisRejected: function() {\n\t\t\t\t\treturn storage.get(this).state === PLEDGE_REJECTED;\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\tClassPledge.defer = function() {\n\t\t\t\tvar self = {};\n\t\t\n\t\t\t\tself.pledge = new ClassPledge(function(resolveListener, rejectListener) {\n\t\t\t\t\tself.resolve = resolveListener;\n\t\t\t\t\tself.reject = rejectListener;\n\t\t\t\t});\n\t\t\n\t\t\t\treturn self;\n\t\t\t};\n\t\t\n\t\t\tClassPledge.all = function(pledges) {\n\t\t\t\tvar dfd = ClassPledge.defer(),\n\t\t\t\t\tproperties, i = 0, pledge;\n\t\t\n\t\t\t\tif(pledges.length) {\n\t\t\t\t\tproperties = { dfd: dfd, resolved: [], rejected: [], total: pledges.length, count: 0 };\n\t\t\n\t\t\t\t\tfor(; pledge = pledges[i]; i++) {\n\t\t\t\t\t\tobserve(pledge, i, properties)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdfd.resolve();\n\t\t\t\t}\n\t\t\n\t\t\t\treturn dfd.pledge;\n\t\t\t};\n\t\t\n\t\t\tClassPledge.race = function(pledges) {\n\t\t\t\tvar dfd = ClassPledge.defer(),\n\t\t\t\t\ti = 0, pledge;\n\t\t\n\t\t\t\tfor(; pledge = pledges[i]; i++) {\n\t\t\t\t\tpledge.then(dfd.resolve, dfd.reject);\n\t\t\t\t}\n\t\t\n\t\t\t\tif(!pledges.length) {\n\t\t\t\t\tdfd.resolve();\n\t\t\t\t}\n\t\t\n\t\t\t\treturn dfd.pledge;\n\t\t\t};\n\t\t\n\t\t\treturn ClassPledge;\n\t\t}());\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tDEMAND_ID, MODULE_PREFIX_HANDLER, ERROR_LOAD, DEMAND_ID, PROVIDE_ID, PATH_ID, MOCK_PREFIX, NULL, TRUE, FALSE,\n\t\t\tobject,\n\t\t\tregexMatchInternal, regexMatchParameter,\n\t\t\tvalidatorIsPositive,\n\t\t\tfunctionResolvePath, functionResolveId, functionResolveUrl, functionIterate, functionToArray,\n\t\t\tClassRegistry, ClassPledge, ClassFailure,\n\t\t\tsingletonCache\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require shortcuts.js\n\t\t//=require variables.js\n\t\t//=require validator/isPositive.js\n\t\t//=require function/resolvePath.js\n\t\t//=require function/resolveId.js\n\t\t//=require function/resolveUrl.js\n\t\t//=require function/iterate.js\n\t\t//=require function/toArray.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tClassWeakmap\n\t\t*/\n\t\t\n\t\t//=require class/weakmap.js\n\t\t\n\t\tvar ClassRegistry = (function() {\n\t\t\tvar storage = new ClassWeakmap();\n\t\t\n\t\t\tfunction ClassRegistry() {\n\t\t\t\tstorage.set(this, {});\n\t\t\t}\n\t\t\n\t\t\tClassRegistry.prototype = {\n\t\t\t\tget: function(key) {\n\t\t\t\t\treturn key ? storage.get(this)[key] : storage.get(this);\n\t\t\t\t},\n\t\t\t\tset: function(key, value) {\n\t\t\t\t\tstorage.get(this)[key] = value;\n\t\t\t\t},\n\t\t\t\tremove: function(key) {\n\t\t\t\t\tdelete storage.get(this)[key];\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\treturn ClassRegistry;\n\t\t}());\n\t\t\n\t\t//=require class/pledge.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tDEMAND_ID,\n\t\t\tfunctionToArray\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require function/toArray.js\n\t\t\n\t\tfunction ClassFailure(message, module, stack) {\n\t\t\tvar self = this;\n\t\t\n\t\t\tself.message = message;\n\t\t\n\t\t\tmodule && (self.module = module);\n\t\t\tstack && (self.stack = functionToArray(stack));\n\t\t\n\t\t\treturn self;\n\t\t}\n\t\t\n\t\tClassFailure.prototype = {\n\t\t\t/* only for reference\n\t\t\t message: NULL,\n\t\t\t module: NULL,\n\t\t\t stack: NULL,\n\t\t\t */\n\t\t\ttoString: function() {\n\t\t\t\tvar self = this,\n\t\t\t\t\tresult = DEMAND_ID + ': ' + self.message + ' ' + (self.module ? '\"' + self.module + '\"' : '');\n\t\t\n\t\t\t\tif(self.stack) {\n\t\t\t\t\tresult = ClassFailure.traverse(self.stack, result, 1);\n\t\t\t\t}\n\t\t\n\t\t\t\treturn result;\n\t\t\t}\n\t\t};\n\t\t\n\t\tClassFailure.traverse = function(stack, value, depth) {\n\t\t\tvar indention = new Array(depth + 1).join(' '),\n\t\t\t\ti = 0, item;\n\t\t\n\t\t\tfor(; item = stack[i]; i++) {\n\t\t\t\tvalue += '\\n' + indention + '> ' + item.message + ' ' + (item.module ? '\"' + item.module + '\"' : '');\n\t\t\n\t\t\t\tif(item.stack) {\n\t\t\t\t\tvalue = ClassFailure.traverse(item.stack, value, depth + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn value;\n\t\t};\n\t\t\n\t\t//=require singleton/cache.js\n\t\t\n\t\tvar ClassDependency = (function() {\n\t\t\tvar PREFIX_INTERNAL = 'internal!',\n\t\t\t\tregistry = new ClassRegistry(),\n\t\t\t\tplaceholder = [];\n\t\t\n\t\t\tfunction setProperty(property, value) {\n\t\t\t\tthis[property] = value;\n\t\t\t}\n\t\t\n\t\t\tfunction addPending(id, dependency) {\n\t\t\t\tif(dependency.pledge.isPending()) {\n\t\t\t\t\tthis.push(id);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction addResolved(id, dependency) {\n\t\t\t\tif(dependency.pledge.isResolved()) {\n\t\t\t\t\tthis.push(id);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction addRejected(id, dependency) {\n\t\t\t\tif(dependency.pledge.isRejected()) {\n\t\t\t\t\tthis.push(id);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction ClassDependency(uri, context, register) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tparameter = uri.match(regexMatchParameter) || placeholder;\n\t\t\n\t\t\t\tself.path = functionResolvePath(uri, context);\n\t\t\t\tself.mock = parameter[1] ? TRUE : FALSE;\n\t\t\t\tself.cache = parameter[2] ? parameter[1] === '+' : NULL;\n\t\t\t\tself.type = parameter[3] || settings.handler;\n\t\t\t\tself.version = parameter[4] || settings.version;\n\t\t\t\tself.lifetime = (parameter[5] && parameter[5] * 1000) || settings.lifetime;\n\t\t\t\tself.id = (self.mock ? MOCK_PREFIX : '' ) + self.type + '!' + self.path;\n\t\t\t\tself.uri = (self.mock ? MOCK_PREFIX : '' ) + self.type + '@' + self.version + (validatorIsPositive(self.lifetime) && self.lifetime > 0 ? '#' + self.lifetime : '' ) + '!' + self.path;\n\t\t\t\tself.dfd = ClassPledge.defer();\n\t\t\t\tself.pledge = self.dfd.pledge;\n\t\t\t\tself.invalid = false;\n\t\t\n\t\t\t\tself.pledge.then(function() {\n\t\t\t\t\tself.value = functionToArray(arguments);\n\t\t\t\t});\n\t\t\n\t\t\t\t(register !== FALSE) && registry.set(self.id, self);\n\t\t\n\t\t\t\treturn self;\n\t\t\t}\n\t\t\n\t\t\tClassDependency.prototype = {\n\t\t\t\tenqueue: true // handled by handler\n\t\t\t\t/* only for reference\n\t\t\t \tpath: NULL,\n\t\t\t \tmock: NULL,\n\t\t\t\tcache: NULL,\n\t\t\t\ttype: NULL,\n\t\t\t\tversion: NULL,\n\t\t\t\tlifetime: NULL,\n\t\t\t \tid: NULL,\n\t\t\t \turi: NULL,\n\t\t\t\tdfd: NULL,\n\t\t\t\tpledge: NULL,\n\t\t\t\tvalue: NULL,\n\t\t\t\thandler: NULL, // set by Dependency.resolve\n\t\t\t \tsource: NULL, // set by Cache or Loader\n\t\t\t \turl: NULL // optional, set by Loader\n\t\t\t\t*/\n\t\t\t};\n\t\t\n\t\t\tClassDependency.get = function(uri, context) {\n\t\t\t\treturn registry.get(functionResolveId(uri, context));\n\t\t\t};\n\t\t\n\t\t\tClassDependency.resolve = function(uri, context) {\n\t\t\t\tvar isInternal = context && regexMatchInternal.test(uri),\n\t\t\t\t\tdependency = isInternal ? this.get(PREFIX_INTERNAL + context + '/' + uri) : this.get(uri, context),\n\t\t\t\t\tvalue;\n\t\t\n\t\t\t\tif(!dependency) {\n\t\t\t\t\tif(isInternal) {\n\t\t\t\t\t\tdependency = new ClassDependency(PREFIX_INTERNAL + context + '/' + uri);\n\t\t\n\t\t\t\t\t\tswitch(uri) {\n\t\t\t\t\t\t\tcase DEMAND_ID:\n\t\t\t\t\t\t\t\tvalue = (function() {\n\t\t\t\t\t\t\t\t\treturn functionIterate(demand, setProperty, demand.bind(context));\n\t\t\t\t\t\t\t\t}());\n\t\t\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase PROVIDE_ID:\n\t\t\t\t\t\t\t\tvalue = provide.bind(context);\n\t\t\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase PATH_ID:\n\t\t\t\t\t\t\t\tvalue = context;\n\t\t\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\tdependency.dfd.resolve(value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdependency = new ClassDependency(uri, context);\n\t\t\n\t\t\t\t\t\tdemand(MODULE_PREFIX_HANDLER + dependency.type)\n\t\t\t\t\t\t\t.then(\n\t\t\t\t\t\t\t\tfunction(handler) {\n\t\t\t\t\t\t\t\t\tdependency.handler = handler;\n\t\t\n\t\t\t\t\t\t\t\t\tif(dependency.mock) {\n\t\t\t\t\t\t\t\t\t\tdependency.dfd.resolve(handler);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tsingletonCache.resolve(dependency);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\tdependency.dfd.reject(new ClassFailure(ERROR_LOAD + ' (handler)', self.id));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\treturn dependency;\n\t\t\t};\n\t\t\n\t\t\tClassDependency.remove = function(uri, context, cache) {\n\t\t\t\tvar id = functionResolveId(uri, context),\n\t\t\t\t\tnode = document.querySelector('[' + DEMAND_ID + '-id=\"' + id + '\"]');\n\t\t\n\t\t\t\tregistry.remove(id);\n\t\t\t\tregistry.remove(MOCK_PREFIX + id);\n\t\t\n\t\t\t\tnode && node.parentNode.removeChild(node);\n\t\t\n\t\t\t\t(cache !== FALSE) && singletonCache.clear.path(id);\n\t\t\t};\n\t\t\n\t\t\tClassDependency.list = {\n\t\t\t\tall: function() {\n\t\t\t\t\treturn object.keys(registry.get());\n\t\t\t\t},\n\t\t\t\tpending: function() {\n\t\t\t\t\treturn functionIterate(registry.get(), addPending, []);\n\t\t\t\t},\n\t\t\t\tresolved: function() {\n\t\t\t\t\treturn functionIterate(registry.get(), addResolved, []);\n\t\t\t\t},\n\t\t\t\trejected: function() {\n\t\t\t\t\treturn functionIterate(registry.get(), addRejected, []);\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\treturn ClassDependency;\n\t\t}());\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tfunctionResolveUrl, functionEscapeRegex, functionIterate\n\t\t*/\n\t\t\n\t\t//=require function/resolveUrl.js\n\t\t//=require function/escapeRegex.js\n\t\t//=require function/iterate.js\n\t\t\n\t\tvar ClassPattern = (function() {\n\t\t\tvar regexMatchTrailingSlash = /(.+)\\/$/;\n\t\t\n\t\t\tfunction setProperty(property, value) {\n\t\t\t\tthis[property] = {\n\t\t\t\t\turl: functionResolveUrl(value).replace(regexMatchTrailingSlash, '$1'),\n\t\t\t\t\tmatch: new RegExp('^' + functionEscapeRegex(value))\n\t\t\t\t};\n\t\t\t}\n\t\t\n\t\t\tfunction ClassPattern(pattern, url) {\n\t\t\t\tvar self = this;\n\t\t\n\t\t\t\tself.weight = pattern.length;\n\t\t\t\tself.match = new RegExp('^' + functionEscapeRegex(pattern));\n\t\t\t\tself.location = [].concat(url);\n\t\t\n\t\t\t\tfunctionIterate(self.location, setProperty, self.location);\n\t\t\t}\n\t\t\n\t\t\tClassPattern.prototype = {\n\t\t\t\t/* only for reference\n\t\t\t\t weight: 0,\n\t\t\t\t match: NULL,\n\t\t\t\t location: NULL,\n\t\t\t\t */\n\t\t\t\tmatches: function(path) {\n\t\t\t\t\treturn this.match.test(path);\n\t\t\t\t},\n\t\t\t\tprocess: function(path, index) {\n\t\t\t\t\tvar current = this.location[index];\n\t\t\n\t\t\t\t\tif(current) {\n\t\t\t\t\t\treturn path.replace(this.match, current.url);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\treturn ClassPattern;\n\t\t}());\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tDEMAND_ID, EVENT_PRE_REQUEST, EVENT_POST_REQUEST, ERROR_LOAD,\n\t\t\tregexIsAbsoluteUri,\n\t\t\tlinkElement,\n\t\t\tfunctionIterate, functionResolveUrl, functionGetTimestamp,\n\t\t\tClassXhr, ClassFailure,\n\t\t\tsingletonEvent\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require variables.js\n\t\t//=require shortcuts.js\n\t\t//=require function/resolveUrl.js\n\t\t//=require function/iterate.js\n\t\t//=require singleton/event.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tTRUE,\n\t\t\tregexMatchBaseUrl,\n\t\t\tClassPledge\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require shortcuts.js\n\t\t//=require variables.js\n\t\t//=require class/pledge.js\n\t\t\n\t\tvar ClassXhr = (function(XMLHttpRequest) {\n\t\t\tvar XDomainRequest = 'XDomainRequest' in global && global.XDomainRequest || XMLHttpRequest;\n\t\t\n\t\t\tfunction checkState() {\n\t\t\t\tif(this.readyState < 4) {\n\t\t\t\t\tthis.abort();\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn function ClassXhr(url) {\n\t\t\t\tvar dfd = ClassPledge.defer(),\n\t\t\t\t\txhr = regexMatchBaseUrl.test(url) ? new XMLHttpRequest() : new XDomainRequest(),\n\t\t\t\t\tboundCheckState = checkState.bind(xhr),\n\t\t\t\t\ttimeout = settings.timeout,\n\t\t\t\t\tpointer;\n\t\t\n\t\t\t\txhr.ontimeout = xhr.onerror = xhr.onabort = function() {\n\t\t\t\t\tdfd.reject(xhr.status);\n\t\t\t\t};\n\t\t\t\txhr.onprogress = xhr.onreadystatechange = function() {\n\t\t\t\t\tclearTimeout(pointer);\n\t\t\n\t\t\t\t\tpointer = setTimeout(boundCheckState, timeout);\n\t\t\t\t};\n\t\t\t\txhr.onload = function() {\n\t\t\t\t\tpointer = clearTimeout(pointer);\n\t\t\n\t\t\t\t\tif(!('status' in xhr) || xhr.status === 200) {\n\t\t\t\t\t\tdfd.resolve(xhr.responseText, xhr.getResponseHeader && xhr.getResponseHeader('content-type'));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdfd.reject(xhr.status);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\n\t\t\t\txhr.open('GET', url, TRUE);\n\t\t\t\txhr.send();\n\t\t\n\t\t\t\tpointer = setTimeout(boundCheckState, timeout);\n\t\t\n\t\t\t\treturn dfd.pledge;\n\t\t\t};\n\t\t}(XMLHttpRequest));\n\t\t\n\t\t//=require class/failure.js\n\t\t\n\t\tfunction ClassLoader(dependency) {\n\t\t\tvar regexMatchEmptySearch = /^(?:\\?|)$/,\n\t\t\t\tpattern;\n\t\t\n\t\t\tfunction resolve(response, type) {\n\t\t\t\tif(!type || !dependency.handler.validate || dependency.handler.validate(type)) {\n\t\t\t\t\tdependency.source = response;\n\t\t\n\t\t\t\t\tsingletonEvent.emit(EVENT_POST_REQUEST, dependency.type, dependency);\n\t\t\t\t} else {\n\t\t\t\t\tdependency.dfd.reject(new ClassFailure(ERROR_LOAD + ' (content-type)', dependency.id));\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction reject(status) {\n\t\t\t\tdependency.dfd.reject(new ClassFailure(ERROR_LOAD + (status ? ' (status)' : ''), dependency.id));\n\t\t\t}\n\t\t\n\t\t\tfunction load(location) {\n\t\t\t\tlocation = location || 0;\n\t\t\t\tdependency.url = document.createElement('a');\n\t\t\n\t\t\t\tdependency.url.href = pattern ? functionResolveUrl(pattern.process(dependency.path, location)) : dependency.path;\n\t\t\n\t\t\t\tif(dependency.invalid) {\n\t\t\t\t\tdependency.url.search += ((regexMatchEmptySearch.test(dependency.url.search)) ? '' : '&') + functionGetTimestamp();\n\t\t\t\t}\n\t\t\n\t\t\t\tsingletonEvent.emit(EVENT_PRE_REQUEST, dependency.type, dependency);\n\t\t\n\t\t\t\tnew ClassXhr(dependency.url).then(\n\t\t\t\t\tresolve,\n\t\t\t\t\t(\n\t\t\t\t\t\tpattern ?\n\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\tlocation++;\n\t\t\n\t\t\t\t\t\t\tif(pattern.location[location]) {\n\t\t\t\t\t\t\t\tload(location);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treject();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t:\n\t\t\t\t\t\treject\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\n\t\t\tif(!regexIsAbsoluteUri.test(dependency.path)) {\n\t\t\t\tfunctionIterate(settings.pattern, function(property, value) {\n\t\t\t\t\tvalue.matches(dependency.path) && (!pattern || pattern.weight < value.weight) && (pattern = value);\n\t\t\t\t});\n\t\t\t}\n\t\t\n\t\t\tload();\n\t\t}\n\t\t\n\t\t\n\t\t/*eslint no-global-assign: [2, { \"exceptions\": [\"demand\"] }]*/\n\t\tdemand = global.demand = (function() {\n\t\t\tfunction updateCacheSettings(property, value) {\n\t\t\t\tthis[property] = { weight: property.length, state: value };\n\t\t\t}\n\t\t\n\t\t\tfunction updatePatternSettings(property, value) {\n\t\t\t\tproperty !== 'base' && (this[property] = new ClassPattern(property, value));\n\t\t\t}\n\t\t\n\t\t\tfunction updateModuleSettings(property, value) {\n\t\t\t\tvar temp = this[property] = this[property] || {};\n\t\t\n\t\t\t\tsingletonEvent.emit(EVENT_PRE_CONFIGURE, property, temp);\n\t\t\n\t\t\t\tfunctionMerge(temp, value);\n\t\t\n\t\t\t\tsingletonEvent.emit(EVENT_POST_CONFIGURE, property, temp);\n\t\t\t}\n\t\t\n\t\t\tfunction demand() {\n\t\t\t\tvar dependencies = functionToArray(arguments),\n\t\t\t\t\tcontext = this !== global ? this : NULL,\n\t\t\t\t\ti = 0, uri, dfd, result;\n\t\t\n\t\t\t\tsingletonEvent.emit(EVENT_PRE_RESOLVE, NULL, dependencies, context);\n\t\t\n\t\t\t\tfor(; (uri = dependencies[i]); i++) {\n\t\t\t\t\tif(validatorIsTypeOf(uri, STRING_STRING)) {\n\t\t\t\t\t\tdependencies[i] = ClassDependency.resolve(uri, context).pledge;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdependencies[i] = (dfd = ClassPledge.defer()).pledge;\n\t\t\n\t\t\t\t\t\tdfd.resolve(uri);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\tif(dependencies.length > 1) {\n\t\t\t\t\tresult = ClassPledge.all(dependencies);\n\t\t\t\t} else {\n\t\t\t\t\tresult = dependencies[0];\n\t\t\t\t}\n\t\t\n\t\t\t\treturn result.always(function() {\n\t\t\t\t\tsingletonEvent.emit(EVENT_POST_RESOLVE, NULL, dependencies, context);\n\t\t\t\t});\n\t\t\t}\n\t\t\n\t\t\tdemand.configure = function(options) {\n\t\t\t\tvar cache = options.cache,\n\t\t\t\t\tversion = options.version,\n\t\t\t\t\ttimeout = options.timeout,\n\t\t\t\t\tlifetime = options.lifetime,\n\t\t\t\t\tbase = options.base,\n\t\t\t\t\tpattern = options.pattern,\n\t\t\t\t\tmodules = options.modules,\n\t\t\t\t\tpointer = settings.modules;\n\t\t\n\t\t\t\tif(validatorIsTypeOf(cache, STRING_BOOLEAN)) {\n\t\t\t\t\tsettings.cache[''] = { weight: 0, state: cache };\n\t\t\t\t} else if(validatorIsObject(cache)) {\n\t\t\t\t\tfunctionIterate(cache, updateCacheSettings, settings.cache);\n\t\t\t\t}\n\t\t\n\t\t\t\tif(validatorIsTypeOf(version, STRING_STRING)) {\n\t\t\t\t\tsettings.version = version;\n\t\t\t\t}\n\t\t\n\t\t\t\tif(validatorIsPositive(timeout)) {\n\t\t\t\t\tsettings.timeout = Math.min(Math.max(timeout, 2), 12) * 1000;\n\t\t\t\t}\n\t\t\n\t\t\t\tif(validatorIsPositive(lifetime) && lifetime > 0) {\n\t\t\t\t\tsettings.lifetime = lifetime * 1000;\n\t\t\t\t}\n\t\t\n\t\t\t\tif(validatorIsTypeOf(base, STRING_STRING) && base !== '') {\n\t\t\t\t\tsettings.pattern.base = new ClassPattern('', base);\n\t\t\t\t}\n\t\t\n\t\t\t\tif(validatorIsObject(pattern)) {\n\t\t\t\t\tfunctionIterate(pattern, updatePatternSettings, settings.pattern);\n\t\t\t\t}\n\t\t\n\t\t\t\tif(validatorIsObject(modules)) {\n\t\t\t\t\tfunctionIterate(modules, updateModuleSettings, pointer);\n\t\t\t\t}\n\t\t\n\t\t\t\treturn demand;\n\t\t\t};\n\t\t\n\t\t\tdemand.version = '{{gulp:package.version}}';\n\t\t\tdemand.on = singletonEvent.on.bind(demand);\n\t\t\tdemand.get = function(uri, context) { var dependency = ClassDependency.get(uri, context); return dependency && dependency.value; };\n\t\t\tdemand.remove = ClassDependency.remove;\n\t\t\tdemand.list = ClassDependency.list;\n\t\t\tdemand.clear = singletonCache.clear;\n\t\t\n\t\t\tsingletonEvent\n\t\t\t\t.after(EVENT_CACHE_MISS, function(dependency) {\n\t\t\t\t\tnew ClassLoader(dependency);\n\t\t\t\t})\n\t\t\t\t.after(EVENT_POST_REQUEST, function(dependency) {\n\t\t\t\t\tvar pointer = dependency.handler.onPostRequest;\n\t\t\n\t\t\t\t\tpointer && pointer(dependency);\n\t\t\t\t})\n\t\t\t\t.after(EVENT_CACHE_HIT + ' ' + EVENT_POST_REQUEST, function(dependency) {\n\t\t\t\t\tsingletonEvent.emit(EVENT_PRE_PROCESS, dependency.id, dependency);\n\t\t\t\t})\n\t\t\t\t.after(EVENT_PRE_REQUEST, function(dependency) {\n\t\t\t\t\tvar pointer = dependency.handler.onPreRequest;\n\t\t\n\t\t\t\t\tpointer && pointer(dependency);\n\t\t\t\t})\n\t\t\t\t.after(EVENT_PRE_PROCESS, function(dependency) {\n\t\t\t\t\tvar pointer = dependency.handler.onPreProcess;\n\t\t\n\t\t\t\t\tpointer && pointer(dependency);\n\t\t\n\t\t\t\t\tdependency.pledge.then(function() {\n\t\t\t\t\t\tsingletonEvent.emit(EVENT_POST_PROCESS, dependency.id, dependency);\n\t\t\t\t\t});\n\t\t\n\t\t\t\t\tif(dependency.enqueue === true) {\n\t\t\t\t\t\tqueue.enqueue(dependency);\n\t\t\t\t\t} else if(validatorIsInstanceOf(dependency.enqueue, ClassPledge)) {\n\t\t\t\t\t\tdependency.enqueue.then(function() { queue.enqueue(dependency); });\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\t\treturn demand;\n\t\t}());\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tSTRING_STRING, STRING_UNDEFINED, STRING_FUNCTION, ERROR_PROVIDE, ERROR_PROVIDE_ANONYMOUS, NULL,\n\t\t\tvalidatorIsTypeOf, validatorIsArray,\n\t\t\tClassDependency, ClassFailure\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require validator/isTypeOf.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tobjectPrototypeToString\n\t\t*/\n\t\t\n\t\t//=require shortcuts.js\n\t\t\n\t\t/**\n\t\t * isArray\n\t\t *\n\t\t * Check whether a given value is of type array\n\t\t *\n\t\t * @param value\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\t\n\t\tfunction validatorIsArray(value) {\n\t\t\treturn objectPrototypeToString.call(value) === '[object Array]';\n\t\t}\n\t\t\n\t\t//=require class/dependency.js\n\t\t//=require class/failure.js\n\t\t\n\t\t/*eslint no-global-assign: [2, { \"exceptions\": [\"provide\"] }]*/\n\t\tprovide = global.provide = function provide() {\n\t\t\tvar uri = validatorIsTypeOf(arguments[0], STRING_STRING) ? arguments[0] : NULL,\n\t\t\t\tcontext = this !== global ? this : NULL,\n\t\t\t\tdependencies = validatorIsArray(arguments[uri ? 1 : 0]) ? arguments[uri ? 1 : 0] : NULL,\n\t\t\t\tdefinition = dependencies ? arguments[uri ? 2 : 1] : arguments[uri ? 1 : 0],\n\t\t\t\tmodule, isFunction;\n\t\t\n\t\t\tif(!uri && processor.current) {\n\t\t\t\tmodule = processor.current;\n\t\t\t\turi = module.uri;\n\t\t\n\t\t\t\tprocessor.process();\n\t\t\t}\n\t\t\n\t\t\tif(uri) {\n\t\t\t\tmodule = module || new ClassDependency(uri, context);\n\t\t\t\tisFunction = validatorIsTypeOf(definition, STRING_FUNCTION);\n\t\t\n\t\t\t\tif(dependencies) {\n\t\t\t\t\tdemand\n\t\t\t\t\t\t.apply(module.path, dependencies)\n\t\t\t\t\t\t.then(\n\t\t\t\t\t\t\tfunction() { module.dfd.resolve(isFunction ? definition.apply(NULL, arguments) : definition); },\n\t\t\t\t\t\t\tfunction() { module.dfd.reject(new ClassFailure(ERROR_PROVIDE, module.id, arguments)); }\n\t\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tmodule.dfd.resolve(isFunction ? definition() : definition);\n\t\t\t\t}\n\t\t\n\t\t\t\treturn module.dfd.pledge;\n\t\t\t} else {\n\t\t\t\t!validatorIsTypeOf(console, STRING_UNDEFINED) && console.error(new ClassFailure(ERROR_PROVIDE_ANONYMOUS)); // eslint-disable-line no-console\n\t\t\t}\n\t\t};\n\t\t\n\n\t// process initial configuration\n\t\tdemand.configure({ cache: TRUE, base: '/', pattern: { '/demand': functionResolveUrl(((options && options.url) || location.href) + '/../').slice(0, -1)} });\n\t\toptions && options.settings && demand.configure(options.settings);\n\n\t// include additional components\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout\n\t\t*/\n\t\t\n\t\t/**\n\t\t * hash\n\t\t *\n\t\t * Generate a hash for a given string\n\t\t *\n\t\t * @param {string} input\n\t\t *\n\t\t * @return {number}\n\t\t */\n\t\tfunction functionHash(input){\n\t\t\tvar value = 5381,\n\t\t\t\ti = input.length;\n\t\t\n\t\t\twhile(i) {\n\t\t\t\tvalue = (value * 33) ^ input.charCodeAt(--i);\n\t\t\t}\n\t\t\n\t\t\treturn value >>> 0;\n\t\t}\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tEVENT_QUEUE_ENQUEUE, EVENT_QUEUE_DEQUEUE,\n\t\t\tfunctionToArray,\n\t\t\tsingletonEvent,\n\t\t\tClassWeakmap,\n\t\t\tAbstractUuid\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require function/toArray.js\n\t\t//=require singleton/event.js\n\t\t//=require class/weakmap.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tSTRING_UNDEFINED,\n\t\t\tvalidatorIsTypeOf,\n\t\t\tfunctionUuid,\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require shortcuts.js\n\t\t//=require validator/isTypeOf.js\n\t\t//=require function/uuid.js\n\t\t\n\t\tfunction AbstractUuid() {\n\t\t\tif(validatorIsTypeOf(this.uuid, STRING_UNDEFINED)) {\n\t\t\t\tthis.define('uuid', functionUuid());\n\t\t\t}\n\t\t\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t\n\t\tvar ClassQueue = (function() {\n\t\t\tvar storage = new ClassWeakmap();\n\t\t\n\t\t\tfunction ClassQueue() {\n\t\t\t\tvar self = AbstractUuid.call(this);\n\t\t\n\t\t\t\tstorage.set(self, []);\n\t\t\n\t\t\t\treturn self;\n\t\t\t}\n\t\t\n\t\t\tClassQueue.prototype = {\n\t\t\t\tenqueue: function() {\n\t\t\t\t\tstorage.set(this, storage.get(this).concat(functionToArray(arguments)));\n\t\t\n\t\t\t\t\tsingletonEvent.emit(EVENT_QUEUE_ENQUEUE, this.uuid);\n\t\t\t\t},\n\t\t\t\tdequeue: function() {\n\t\t\t\t\tsingletonEvent.emit(EVENT_QUEUE_DEQUEUE, this.uuid);\n\t\t\n\t\t\t\t\treturn storage.get(this).shift();\n\t\t\t\t},\n\t\t\t\tget current() {\n\t\t\t\t\treturn storage.get(this)[0];\n\t\t\t\t},\n\t\t\t\tget length() {\n\t\t\t\t\treturn storage.get(this).length;\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\treturn ClassQueue.extends(AbstractUuid);\n\t\t}());\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tEVENT_QUEUE_ENQUEUE, NULL,\n\t\t\tsingletonEvent,\n\t\t\tClassWeakmap\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require class/weakmap.js\n\t\t\n\t\tvar ClassProcessor = (function() {\n\t\t\tvar storage = new ClassWeakmap();\n\t\t\n\t\t\tfunction ClassProcessor(queue) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tproperties = { queue: queue, current: NULL };\n\t\t\n\t\t\t\tstorage.set(self, properties);\n\t\t\n\t\t\t\tdemand\n\t\t\t\t\t.on(EVENT_QUEUE_ENQUEUE + ':' + queue.uuid, function() {\n\t\t\t\t\t\t!properties.current && self.process();\n\t\t\t\t\t});\n\t\t\t}\n\t\t\n\t\t\tClassProcessor.prototype = {\n\t\t\t\tprocess: function() {\n\t\t\t\t\tvar properties = storage.get(this),\n\t\t\t\t\t\tcurrent;\n\t\t\n\t\t\t\t\tif(properties.queue.length) {\n\t\t\t\t\t\tcurrent = properties.current = properties.queue.dequeue();\n\t\t\n\t\t\t\t\t\tif(!current.pledge.isRejected()) {\n\t\t\t\t\t\t\tcurrent.handler.process && current.handler.process(current);\n\t\t\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tproperties.current = NULL;\n\t\t\t\t},\n\t\t\t\tget current() {\n\t\t\t\t\treturn storage.get(this).current;\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\treturn ClassProcessor;\n\t\t}());\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tDEMAND_ID, EVENT_PRE_REQUEST, EVENT_POST_REQUEST, TRUE,\n\t\t\tfunctionResolveSourcemaps,\n\t\t\tabstractHandler\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tregexMatchSourcemap, regexIsAbsoluteUri\n\t\t\tlinkElement\n\t\t*/\n\t\t\n\t\t//=require variables.js\n\t\t//=require shortcuts.js\n\t\t\n\t\tfunction functionResolveSourcemaps(url, source) {\n\t\t\tvar match, replacement;\n\t\t\n\t\t\twhile(match = regexMatchSourcemap.exec(source)) {\n\t\t\t\tlinkElement.href = url;\n\t\t\n\t\t\t\tif(regexIsAbsoluteUri.test(match[2])) {\n\t\t\t\t\treplacement = linkElement.protocol + '//' + linkElement.host + match[3];\n\t\t\t\t} else {\n\t\t\t\t\tlinkElement.pathname += '/../' + match[3];\n\t\t\n\t\t\t\t\treplacement = linkElement.protocol + '//' + linkElement.host + linkElement.pathname;\n\t\t\t\t}\n\t\t\n\t\t\t\tsource = source.replace(match[0], match[1] + ' ' + match[2] + '=' + replacement + '.map' + (match[4] ? ' ' + match[4] : ''));\n\t\t\t}\n\t\t\n\t\t\treturn source;\n\t\t}\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tNULL\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t\n\t\tfunction abstractHandler() {\n\t\t\n\t\t}\n\t\t\n\t\tabstractHandler.prototype = {\n\t\t\tvalidate: NULL,\n\t\t\tonPreRequest: NULL,\n\t\t\tonPostRequest: NULL,\n\t\t\tonPreProcess: NULL,\n\t\t\tprocess: NULL\n\t\t};\n\t\t\n\t\t\n\t\tvar handlerModule = (function() {\n\t\t\tvar suffix = '.js',\n\t\t\t\ttarget = document.getElementsByTagName('head')[0],\n\t\t\t\tregexMatchType = /^(application|text)\\/(x-)?javascript/;\n\t\t\n\t\t\tfunction HandlerModule() {}\n\t\t\n\t\t\tHandlerModule.prototype = {\n\t\t\t\tvalidate: function(type) {\n\t\t\t\t\treturn regexMatchType.test(type);\n\t\t\t\t},\n\t\t\t\tonPreRequest: function(dependency) {\n\t\t\t\t\tvar pathname = dependency.url.pathname;\n\t\t\n\t\t\t\t\tdependency.url.pathname = pathname.slice(-suffix.length) !== suffix ? pathname + suffix : pathname;\n\t\t\t\t},\n\t\t\t\tonPostRequest: function(dependency) {\n\t\t\t\t\tdependency.source = functionResolveSourcemaps(dependency.url, dependency.source);\n\t\t\t\t},\n\t\t\t\tprocess: function(dependency) {\n\t\t\t\t\tvar script;\n\t\t\n\t\t\t\t\tif(dependency.source) {\n\t\t\t\t\t\tscript = document.createElement('script');\n\t\t\t\t\t\tscript.async = TRUE;\n\t\t\t\t\t\tscript.text = dependency.source;\n\t\t\n\t\t\t\t\t\tscript.setAttribute(DEMAND_ID + '-id', dependency.id);\n\t\t\n\t\t\t\t\t\ttarget.appendChild(script);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\treturn new (HandlerModule.extends(abstractHandler));\n\t\t}());\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tMODULE_PREFIX_HANDLER, EVENT_POST_CONFIGURE, ERROR_RESOLVE, MOCK_PREFIX, STRING_STRING, FALSE, TRUE,\n\t\t\tregexMatchParameter, regexMatchSourcemap,\n\t\t\tvalidatorIsTypeOf, validatorIsObject,\n\t\t\tfunctionIterate, functionResolveId,\n\t\t\tabstractHandler,\n\t\t\tClassDependency, ClassPledge, ClassFailure,\n\t\t\thandlerModule\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require variables.js\n\t\t//=require validator/isTypeOf.js\n\t\t//=require validator/isObject.js\n\t\t//=require function/iterate.js\n\t\t//=require function/resolveId.js\n\t\t//=require abstract/handler.js\n\t\t//=require class/dependency.js\n\t\t//=require class/pledge.js\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tDEMAND_ID,\n\t\t\tfunctionToArray\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require function/toArray.js\n\t\t\n\t\tfunction ClassFailure(message, module, stack) {\n\t\t\tvar self = this;\n\t\t\n\t\t\tself.message = message;\n\t\t\n\t\t\tmodule && (self.module = module);\n\t\t\tstack && (self.stack = functionToArray(stack));\n\t\t\n\t\t\treturn self;\n\t\t}\n\t\t\n\t\tClassFailure.prototype = {\n\t\t\t/* only for reference\n\t\t\t message: NULL,\n\t\t\t module: NULL,\n\t\t\t stack: NULL,\n\t\t\t */\n\t\t\ttoString: function() {\n\t\t\t\tvar self = this,\n\t\t\t\t\tresult = DEMAND_ID + ': ' + self.message + ' ' + (self.module ? '\"' + self.module + '\"' : '');\n\t\t\n\t\t\t\tif(self.stack) {\n\t\t\t\t\tresult = ClassFailure.traverse(self.stack, result, 1);\n\t\t\t\t}\n\t\t\n\t\t\t\treturn result;\n\t\t\t}\n\t\t};\n\t\t\n\t\tClassFailure.traverse = function(stack, value, depth) {\n\t\t\tvar indention = new Array(depth + 1).join(' '),\n\t\t\t\ti = 0, item;\n\t\t\n\t\t\tfor(; item = stack[i]; i++) {\n\t\t\t\tvalue += '\\n' + indention + '> ' + item.message + ' ' + (item.module ? '\"' + item.module + '\"' : '');\n\t\t\n\t\t\t\tif(item.stack) {\n\t\t\t\t\tvalue = ClassFailure.traverse(item.stack, value, depth + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn value;\n\t\t};\n\t\t\n\t\t//=require handler/module.js\n\t\t\n\t\tvar handlerBundle = (function() {\n\t\t\tvar path = MODULE_PREFIX_HANDLER + 'bundle',\n\t\t\t\tsettings = {};\n\t\t\n\t\t\tdemand\n\t\t\t\t.on(EVENT_POST_CONFIGURE + ':' + path, function(options) {\n\t\t\t\t\tif(validatorIsObject(options)) {\n\t\t\t\t\t\tsettings = options;\n\t\t\n\t\t\t\t\t\tfunctionIterate(settings, updateDependencies);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\t\tfunction updateDependencies(uri, dependencies) {\n\t\t\t\tvar i, dependency;\n\t\t\n\t\t\t\tfor(i = 0; (dependency = dependencies[i]); i++) {\n\t\t\t\t\tif(validatorIsTypeOf(dependency, STRING_STRING)) {\n\t\t\t\t\t\tdependencies[i] = functionResolveId(dependency);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction getType(dependencies) {\n\t\t\t\tvar type, i = 0, temp;\n\t\t\n\t\t\t\tfor(; (temp = dependencies[i]); i++) {\n\t\t\t\t\ttemp = temp.match(regexMatchParameter);\n\t\t\t\t\ttemp = (temp && temp[3]) || settings.handler;\n\t\t\n\t\t\t\t\tif(type) {\n\t\t\t\t\t\tif(temp !== type) {\n\t\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttype = temp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\treturn type;\n\t\t\t}\n\t\t\n\t\t\tfunction HandlerBundle() {}\n\t\t\n\t\t\tHandlerBundle.prototype = {\n\t\t\t\tvalidate: handlerModule.validate,\n\t\t\t\tonPreProcess: function(dependency) {\n\t\t\t\t\tvar source = dependency.source,\n\t\t\t\t\t\tdfd = dependency.dfd,\n\t\t\t\t\t\tdependencies = settings[dependency.path],\n\t\t\t\t\t\ttype, match, pledges, temp, i;\n\t\t\n\t\t\t\t\tdependency.enqueue = FALSE;\n\t\t\n\t\t\t\t\tfunction reject() {\n\t\t\t\t\t\tdfd.reject(new ClassFailure(ERROR_RESOLVE, dependency.id, arguments));\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tif(dependencies && (type = getType(dependencies))) {\n\t\t\t\t\t\twhile(match = regexMatchSourcemap.exec(source)) {\n\t\t\t\t\t\t\tsource = source.replace(match[0], '');\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\tdependency.source = source;\n\t\t\t\t\t\tpledges = [];\n\t\t\n\t\t\t\t\t\tfor(i = 0; (temp = dependencies[i]); i++) {\n\t\t\t\t\t\t\tpledges.push(ClassDependency.resolve(MOCK_PREFIX + temp).pledge);\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\tClassPledge.all(pledges).then(\n\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\tpledges.length = 0;\n\t\t\n\t\t\t\t\t\t\t\tfor(i = 0; (temp = dependencies[i]); i++) {\n\t\t\t\t\t\t\t\t\ttemp = dependencies[i] = ClassDependency.get(temp) || new ClassDependency(temp);\n\t\t\t\t\t\t\t\t\ttemp.handler = arguments[i];\n\t\t\n\t\t\t\t\t\t\t\t\tpledges.push(temp.pledge);\n\t\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t\tif(type === 'module') {\n\t\t\t\t\t\t\t\t\tqueue.enqueue.apply(queue, dependencies);\n\t\t\t\t\t\t\t\t\thandlerModule.process(dependency);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\thandlerModule.process(dependency);\n\t\t\t\t\t\t\t\t\tqueue.enqueue.apply(queue, dependencies);\n\t\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t\tClassPledge.all(pledges).then(dfd.resolve, reject);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\treject\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treject();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\treturn new (HandlerBundle.extends(abstractHandler));\n\t\t}());\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tFALSE, EVENT_POST_REQUEST, ERROR_RESOLVE,\n\t\t\tfunctionResolveSourcemaps,\n\t\t\tabstractHandler,\n\t\t\tClassDependency, ClassPledge, ClassFailure\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require function/resolveSourcemaps.js\n\t\t//=require abstract/handler.js\n\t\t//=require class/dependency.js\n\t\t//=require class/pledge.js\n\t\t//=require class/Failure.js\n\t\t\n\t\tvar handlerComponent = (function() {\n\t\t\tvar suffix = '.html',\n\t\t\t\tregexMatchType = /^text\\/.+$/;\n\t\t\n\t\t\tfunction HandlerComponent() {}\n\t\t\n\t\t\tHandlerComponent.prototype = {\n\t\t\t\tvalidate: function(type) {\n\t\t\t\t\treturn regexMatchType.test(type);\n\t\t\t\t},\n\t\t\t\tonPreRequest: function(dependency) {\n\t\t\t\t\tvar pathname = dependency.url.pathname;\n\t\t\t\t\t\n\t\t\t\t\tdependency.url.pathname = pathname.slice(-suffix.length) !== suffix ? pathname + suffix : pathname;\n\t\t\t\t},\n\t\t\t\tonPostRequest: function(dependency) {\n\t\t\t\t\tdependency.source = functionResolveSourcemaps(dependency.url, dependency.source);\n\t\t\t\t},\n\t\t\t\tonPreProcess: function(dependency) {\n\t\t\t\t\tvar context = dependency.path,\n\t\t\t\t\t\tdfd = dependency.dfd,\n\t\t\t\t\t\tcontainer = document.createElement('body'),\n\t\t\t\t\t\tmodules = [],\n\t\t\t\t\t\tpledges = [],\n\t\t\t\t\t\tnode, handler, path, uri;\n\t\t\n\t\t\t\t\tdependency.enqueue = FALSE;\n\t\t\t\t\tcontainer.innerHTML = dependency.source;\n\t\t\n\t\t\t\t\tfunction reject() {\n\t\t\t\t\t\tdfd.reject(new ClassFailure(ERROR_RESOLVE, dependency.id, arguments));\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\twhile(node = container.firstElementChild) {\n\t\t\t\t\t\tif(handler = node.getAttribute('type')) {\n\t\t\t\t\t\t\tpath = node.getAttribute('path');\n\t\t\t\t\t\t\turi = handler + '!' + context + (path ? '/' + path : '');\n\t\t\n\t\t\t\t\t\t\tnode.parentNode.removeChild(node);\n\t\t\t\t\t\t\tmodules.push({ source: node.textContent, uri: uri });\n\t\t\t\t\t\t\tpledges.push(ClassDependency.resolve('mock:' + uri).pledge);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tClassPledge.all(pledges).then(\n\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\tvar i = 0, module, dependency;\n\t\t\n\t\t\t\t\t\t\tpledges.length = 0;\n\t\t\n\t\t\t\t\t\t\tfor(; (module = modules[i]); i++) {\n\t\t\t\t\t\t\t\tdependency = ClassDependency.get(module.uri) || new ClassDependency(module.uri);\n\t\t\t\t\t\t\t\tdependency.source = functionResolveSourcemaps(dependency.url, module.source);\n\t\t\t\t\t\t\t\tdependency.handler = arguments[i];\n\t\t\n\t\t\t\t\t\t\t\tpledges.push(dependency.pledge);\n\t\t\n\t\t\t\t\t\t\t\tqueue.enqueue(dependency);\n\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\tClassPledge.all(pledges).then(dfd.resolve, reject);\n\t\t\t\t\t\t},\n\t\t\t\t\t\treject\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t};\n\t\t\n\t\t\treturn new (HandlerComponent.extends(abstractHandler));\n\t\t}());\n\t\t\n\t\t/* global\n\t\t\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\t\t\tMODULE_PREFIX_PLUGIN, MODULE_PREFIX_HANDLER, EVENT_POST_CONFIGURE, EVENT_PRE_RESOLVE, STRING_STRING, ERROR_RESOLVE, FALSE, TRUE,\n\t\t\tregexMatchInternal,\n\t\t\tvalidatorIsObject, validatorIsTypeOf,\n\t\t\tfunctionIterate, functionHash,\n\t\t\tClassDependency, ClassFailure,\n\t\t\tsingletonCache\n\t\t*/\n\t\t\n\t\t//=require constants.js\n\t\t//=require variables.js\n\t\t//=require validator/isTypeOf.js\n\t\t//=require validator/isObject.js\n\t\t//=require function/iterate.js\n\t\t//=require function/hash.js\n\t\t//=require class/dependency.js\n\t\t//=require class/failure.js\n\t\t//=require singleton/cache.js\n\t\t\n\t\tvar pluginGenie = (function() {\n\t\t\tvar path = MODULE_PREFIX_PLUGIN + 'genie',\n\t\t\t\tpattern = [];\n\t\t\n\t\t\tfunction matchPattern(path) {\n\t\t\t\tvar i = 0, pointer, match;\n\t\t\n\t\t\t\tfor(; (pointer = pattern[i]); i++) {\n\t\t\t\t\tif(path.indexOf(pointer.prefix) === 0 && (!match || pointer.weight > match.weight)) {\n\t\t\t\t\t\tmatch = pointer;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\treturn match;\n\t\t\t}\n\t\t\n\t\t\tfunction generateConfiguration(bundle) {\n\t\t\t\tvar matches = bundle.matches,\n\t\t\t\t\tconfiguration = { pattern: {}, modules: { '/demand/handler/bundle': {} } },\n\t\t\t\t\ti = 0, pointer, dependency;\n\t\t\n\t\t\t\tconfiguration.pattern[bundle.id] = bundle.fn(matches);\n\t\t\t\tconfiguration.modules[MODULE_PREFIX_HANDLER + 'bundle'][bundle.id] = pointer = [];\n\t\t\n\t\t\t\tfor(; (dependency = matches[i]); i++) {\n\t\t\t\t\tpointer.push(dependency.path);\n\t\t\t\t}\n\t\t\n\t\t\t\treturn configuration;\n\t\t\t}\n\t\t\n\t\t\tfunction resolveDependencies() {\n\t\t\t\tvar i = 0, dependency;\n\t\t\n\t\t\t\tfor(; (dependency = this[i]); i++) {\n\t\t\t\t\tdependency.dfd.resolve(arguments[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction rejectDependencies() {\n\t\t\t\tvar i = 0, dependency;\n\t\t\n\t\t\t\tfor(; (dependency = this[i]); i++) {\n\t\t\t\t\tdependency.dfd.reject(new ClassFailure(ERROR_RESOLVE, dependency.id));\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tfunction addPattern(property, value) {\n\t\t\t\tpattern.push({ prefix: property, weight: property.length, fn: value });\n\t\t\t}\n\t\t\n\t\t\tfunction resolveBundles(property, value) {\n\t\t\t\tvar matches = value.matches,\n\t\t\t\t\ti = 0, dependency;\n\t\t\n\t\t\t\tif(matches.length > 1) {\n\t\t\t\t\tvalue.id = path + '/' + functionHash(JSON.stringify(value.matches));\n\t\t\n\t\t\t\t\tfor(; (dependency = matches[i]); i++) {\n\t\t\t\t\t\tmatches[i] = new ClassDependency(dependency.uri);\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tdemand.configure(generateConfiguration(value));\n\t\t\t\t\tdemand('bundle!' + value.id)\n\t\t\t\t\t\t.then(\n\t\t\t\t\t\t\tresolveDependencies.bind(matches),\n\t\t\t\t\t\t\trejectDependencies.bind(matches)\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tdemand\n\t\t\t\t.on(EVENT_POST_CONFIGURE + ':' + path, function(options) {\n\t\t\t\t\tif(validatorIsObject(options)) {\n\t\t\t\t\t\tpattern.length = 0;\n\t\t\n\t\t\t\t\t\tfunctionIterate(options, addPattern);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.on(EVENT_PRE_RESOLVE, function(dependencies, context) {\n\t\t\t\t\tvar bundles = {},\n\t\t\t\t\t\ti = 0, dependency, pattern;\n\t\t\n\t\t\t\t\tfor(; (dependency = dependencies[i]); i++) {\n\t\t\t\t\t\tif(validatorIsTypeOf(dependency, STRING_STRING) && !regexMatchInternal.test(dependency) && !ClassDependency.get(dependency, context)) {\n\t\t\t\t\t\t\tdependency = new ClassDependency(dependency, context, FALSE);\n\t\t\n\t\t\t\t\t\t\tif(dependency.type === 'module' && (pattern = matchPattern(dependency.path)) && !singletonCache.get(dependency)) {\n\t\t\t\t\t\t\t\t(bundles[pattern.prefix] || (bundles[pattern.prefix] = { fn: pattern.fn, matches: [] })).matches.push(dependency);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tfunctionIterate(bundles, resolveBundles);\n\t\t\t\t});\n\t\t\n\t\t\treturn TRUE;\n\t\t}());\n\t\t\n\n\t// initialize\n\t\tqueue = new ClassQueue();\n\t\tprocessor = new ClassProcessor(queue);\n\n\t\tfunction assignModule(id, module) {\n\t\t\tprovide(id, function() { return module; });\n\t\t}\n\n\t\tassignModule(MODULE_PREFIX_ABSTRACT + 'uuid', AbstractUuid);\n\t\tassignModule(MODULE_PREFIX_ABSTRACT + 'handler', abstractHandler);\n\t\tassignModule(MODULE_PREFIX_HANDLER + 'module', handlerModule);\n\t\tassignModule(MODULE_PREFIX_HANDLER + 'bundle', handlerBundle);\n\t\tassignModule(MODULE_PREFIX_HANDLER + 'component', handlerComponent);\n\t\tassignModule(MODULE_PREFIX_PLUGIN + 'genie', pluginGenie);\n\t\tassignModule(MODULE_PREFIX_VALIDATOR + 'isTypeOf', validatorIsTypeOf);\n\t\tassignModule(MODULE_PREFIX_VALIDATOR + 'isArray', validatorIsArray);\n\t\tassignModule(MODULE_PREFIX_VALIDATOR + 'isObject', validatorIsObject);\n\t\tassignModule(MODULE_PREFIX_VALIDATOR + 'isInstanceOf', validatorIsInstanceOf);\n\t\tassignModule(MODULE_PREFIX_FUNCTION + 'resolveUrl', functionResolveUrl);\n\t\tassignModule(MODULE_PREFIX_FUNCTION + 'resolveSourcemaps', functionResolveSourcemaps);\n\t\tassignModule(MODULE_PREFIX_FUNCTION + 'merge', functionMerge);\n\t\tassignModule(MODULE_PREFIX_FUNCTION + 'iterate', functionIterate);\n\t\tassignModule(MODULE_PREFIX_FUNCTION + 'hash', functionHash);\n\t\tassignModule(MODULE_PREFIX_FUNCTION + 'defer', functionDefer);\n\t\tassignModule(MODULE_PREFIX_FUNCTION + 'uuid', functionUuid);\n\t\tassignModule(MODULE_PREFIX + 'weakmap', ClassWeakmap);\n\t\tassignModule(MODULE_PREFIX + 'descriptor', ClassDescriptor);\n\t\tassignModule(MODULE_PREFIX + 'pledge', ClassPledge);\n\t\tassignModule(MODULE_PREFIX + 'queue', ClassQueue);\n\t\tassignModule(MODULE_PREFIX + 'xhr', ClassXhr);\n\t\tassignModule(MODULE_PREFIX + 'failure', ClassFailure);\n\n\t\tif(options && options.main) {\n\t\t\tswitch(typeof options.main) {\n\t\t\t\tcase STRING_STRING:\n\t\t\t\t\tdemand(options.main);\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase STRING_FUNCTION:\n\t\t\t\t\tprovide('main', options.main());\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n}(this.name === 'demand-loader' ? parent : this, setTimeout, clearTimeout));\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout\n*/\n\nvar DEMAND_ID = 'demand',\n\tPROVIDE_ID = 'provide',\n\tPATH_ID = 'path',\n\tMODULE_PREFIX = '/' + DEMAND_ID + '/',\n\tMODULE_PREFIX_ABSTRACT = MODULE_PREFIX + 'abstract/',\n\tMODULE_PREFIX_HANDLER = MODULE_PREFIX + 'handler/',\n\tMODULE_PREFIX_PLUGIN = MODULE_PREFIX + 'plugin/',\n\tMODULE_PREFIX_FUNCTION = MODULE_PREFIX + 'function/',\n\tMODULE_PREFIX_VALIDATOR = MODULE_PREFIX + 'validator/',\n\tMOCK_PREFIX = 'mock:',\n\tNULL = null,\n\tUNDEFINED = undefined,\n\tFALSE = false,\n\tTRUE = true,\n\tSTRING_UNDEFINED = 'undefined',\n\tSTRING_STRING = 'string',\n\tSTRING_BOOLEAN = 'boolean',\n\tSTRING_OBJECT = 'object',\n\tSTRING_FUNCTION = 'function',\n\tSTRING_NUMBER = 'number',\n\tFUNCTION_EMPTY = function() {},\n\tEVENT_PREFIX = 'pre',\n\tEVENT_POSTFIX = 'post',\n\tEVENT_CONFIGURE = 'Configure',\n\tEVENT_PRE_CONFIGURE = EVENT_PREFIX + EVENT_CONFIGURE,\n\tEVENT_POST_CONFIGURE = EVENT_POSTFIX + EVENT_CONFIGURE,\n\tEVENT_CACHE = 'cache',\n\tEVENT_CACHE_MISS = EVENT_CACHE + 'Miss',\n\tEVENT_CACHE_HIT = EVENT_CACHE + 'Hit',\n\tEVENT_CACHE_CLEAR = EVENT_CACHE + 'Clear',\n\tEVENT_CACHE_EXCEED = EVENT_CACHE + 'Exceed',\n\tEVENT_PRE_CACHE = EVENT_PREFIX + 'Cache',\n\tEVENT_POST_CACHE = EVENT_POSTFIX + 'Cache',\n\tEVENT_RESOLVE = 'Resolve',\n\tEVENT_PRE_RESOLVE = EVENT_PREFIX + EVENT_RESOLVE,\n\tEVENT_POST_RESOLVE = EVENT_POSTFIX + EVENT_RESOLVE,\n\tEVENT_REQUEST = 'Request',\n\tEVENT_PRE_REQUEST = EVENT_PREFIX + EVENT_REQUEST,\n\tEVENT_POST_REQUEST = EVENT_POSTFIX + EVENT_REQUEST,\n\tEVENT_PROCESS = 'Process',\n\tEVENT_PRE_PROCESS = EVENT_PREFIX + EVENT_PROCESS,\n\tEVENT_POST_PROCESS = EVENT_POSTFIX + EVENT_PROCESS,\n\tEVENT_QUEUE = 'queue',\n\tEVENT_QUEUE_ENQUEUE = EVENT_QUEUE + 'Enqueue',\n\tEVENT_QUEUE_DEQUEUE = EVENT_QUEUE + 'Dequeue',\n\tERROR_LOAD = 'error loading',\n\tERROR_PROVIDE = 'error providing',\n\tERROR_RESOLVE = 'error resolving',\n\tERROR_PROVIDE_ANONYMOUS = 'unspecified anonymous provide';\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout\n*/\n\nvar arrayPrototype = Array.prototype,\n\tarrayPrototypeSlice = arrayPrototype.slice,\n\tarrayPrototypeConcat = arrayPrototype.concat,\n\tobject = Object,\n\tobjectPrototype = object.prototype,\n\tobjectPrototypeToString = objectPrototype.toString,\n\tobjectCreate = object.create,\n\tobjectDefineProperty = object.defineProperty,\n\tobjectGetOwnPropertyNames = object.getOwnPropertyNames,\n\tobjectGetOwnPropertyDescriptor = object.getOwnPropertyDescriptor,\n\tlinkElement = document.createElement('a');\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tNULL\n*/\n\n//=require constants.js\n\nfunction ClassDescriptor(value, writable, configurable, enumerable) {\n\treturn {\n\t\t__proto__: NULL,\n\t\tvalue: value,\n\t\tenumerable: !!enumerable,\n\t\tconfigurable: !!configurable,\n\t\twritable: !!writable\n\t};\n}\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout\n*/\n\n/**\n * isTypeOf\n *\n * Check whether a given object is of specified type\n *\n * @param object\n * @param {string} type\n *\n * @return {boolean}\n */\n\nfunction validatorIsTypeOf(object, type) {\n\treturn typeof object === type;\n}\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tSTRING_OBJECT,\n\tvalidatorIsTypeOf\n*/\n\n//=require constants.js\n//=require validator/isTypeOf.js\n\n/**\n * isObject\n *\n * Check whether a given object is of type object\n *\n * @param object\n *\n * @return {boolean}\n */\n\nfunction validatorIsObject(object) {\n\treturn object && validatorIsTypeOf(object, STRING_OBJECT);\n}\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tSTRING_NUMBER,\n\tvalidatorIsTypeOf\n*/\n\n//=require constants.js\n//=require validator/isTypeOf.js\n\n/**\n * isPositive\n *\n * Check whether a given value is a positive integer\n *\n * @param value\n *\n * @return {boolean}\n */\n\nfunction validatorIsPositive(value) {\n\treturn validatorIsTypeOf(value, STRING_NUMBER) && isFinite(value) && Math.floor(value) === value && value >= 0;\n}\n","/**\n * isInstanceOf\n *\n * Check whether a given object is an instance of specified type\n *\n * @param object\n * @param module\n *\n * @return {boolean}\n */\nfunction validatorIsInstanceOf(object, module) {\n\treturn object instanceof module;\n}","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tUNDEFINED, FALSE,\n\tobject\n*/\n\n//=require constants.js\n//=require shortcuts.js\n\n/**\n * iterate\n *\n * Iterate over enumerable & own properties of a given\n * object and pass current property as well as its value\n * to a callback function\n *\n * @param {object} object\n * @param {function} callback\n * @param context\n *\n * @return mixed\n */\n\nfunction functionIterate(source, callback, context) {\n\tvar properties = object.keys(source),\n\t\ti = 0, property;\n\n\tfor(; (property = properties[i]) !== UNDEFINED; i++) {\n\t\tif(callback.call(context, property, source[property]) === FALSE) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn context;\n}\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tTRUE,\n\tobjectCreate, objectDefineProperty, objectGetOwnPropertyNames, objectGetOwnPropertyDescriptor,\n\tClassDescriptor\n*/\n\n//=require constants.js\n//=require shortcuts.js\n//=require class/descriptor.js\n\n(function(strPrototype) {\n\tfunction objectDefine(name, value, writable, configurable, enumerable) {\n\t\tobjectDefineProperty(this, name, new ClassDescriptor(value, writable, configurable, enumerable));\n\t}\n\n\tfunction functionExtends(source) {\n\t\tvar self = this,\n\t\t\tprototype = self[strPrototype],\n\t\t\tnames = objectGetOwnPropertyNames(prototype),\n\t\t\tproperties = { constructor: new ClassDescriptor(self, TRUE, TRUE)},\n\t\t\ti = 0, property;\n\n\t\tfor(; (property = names[i]) && !properties[property]; i++) {\n\t\t\tproperties[property] = objectGetOwnPropertyDescriptor(prototype, property);\n\t\t}\n\n\t\ttry {\n\t\t\tself[strPrototype] = objectCreate(source[strPrototype] || source, properties);\n\t\t} catch(e) {\n\t\t\t// ES6 class prototypes are readonly at least in Chrome\n\t\t\t// (and assignment throws an error in strict mode) ...\n\t\t}\n\n\t\t// ... which is handled here\n\t\tif(self[strPrototype] === prototype) {\n\t\t\tthrow new TypeError('Unable to extend, prototype is not writable');\n\t\t}\n\n\t\treturn self;\n\t}\n\n\tobjectDefine.call(Object.prototype, 'define', objectDefine);\n\tobjectDefine.call(global.Object.prototype, 'define', objectDefine);\n\n\tFunction.prototype.define('extends', functionExtends);\n\tglobal.Function.prototype.define('extends', functionExtends);\n}('prototype'));\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tUNDEFINED,\n\tvalidatorIsObject,\n\tfunctionIterate\n*/\n\n//=require constants.js\n//=require validator/isObject.js\n//=require function/iterate.js\n\n/**\n * merge\n *\n * Merge two or more objects into the first one passed in\n *\n * @param {...object} object\n *\n * @return {object}\n */\nvar functionMerge = (function() {\n\tfunction mergeProperties(property, value) {\n\t\tvar targetProperty = this[property],\n\t\t\ttargetPropertyIsObject;\n\n\t\tif(value !== UNDEFINED) {\n\t\t\tif(validatorIsObject(value)) {\n\t\t\t\ttargetPropertyIsObject = validatorIsObject(targetProperty);\n\n\t\t\t\tif(value.length !== UNDEFINED) {\n\t\t\t\t\ttargetProperty = (targetPropertyIsObject && targetProperty.length !== UNDEFINED) ? targetProperty : [];\n\t\t\t\t} else {\n\t\t\t\t\ttargetProperty = (targetPropertyIsObject && targetProperty.length === UNDEFINED) ? targetProperty : {};\n\t\t\t\t}\n\n\t\t\t\tthis[property] = functionMerge(targetProperty, value);\n\t\t\t} else {\n\t\t\t\tthis[property] = value;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn function functionMerge() {\n\t\tvar target = arguments[0],\n\t\t\ti = 1, properties;\n\n\t\tfor(; (properties = arguments[i]) !== UNDEFINED; i++) {\n\t\t\tfunctionIterate(properties, mergeProperties, target);\n\t\t}\n\n\t\treturn target;\n\t};\n}());\n","/**\n * Based on setAsap:\n * Repo: https://github.com/taylorhakes/setAsap\n * License: https://github.com/taylorhakes/setAsap/blob/master/LICENSE\n */\n\n/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tNULL, TRUE, FALSE,\n\tfunctionUuid\n*/\n\n//=require constants.js\n//=require shortcuts.js\n//=require function/uuid.js\n\n/**\n * defer\n *\n * delay function execution like setImmediate does\n *\n * @param {function} function\n */\nvar functionDefer = (function() {\n\tvar hasSetImmediate = 'setImmediate' in global,\n\t\telement, fallback;\n\n\tif('MutationObserver' in global) {\n\t\treturn function functionDefer(fn) {\n\t\t\telement = document.createElement('div');\n\n\t\t\tnew MutationObserver(function() { fn(); })\n\t\t\t\t.observe(element, { attributes: TRUE });\n\n\t\t\telement.setAttribute('i', '1');\n\t\t};\n\t}\n\n\tif(!hasSetImmediate && 'postMessage' in global && !('importScripts' in global) && 'addEventListener' in global) {\n\t\treturn (function() {\n\t\t\tvar storage = {};\n\n\t\t\tfunction onMessage(event) {\n\t\t\t\tvar fn;\n\n\t\t\t\tif(event.source === global && event.data && (fn = storage[event.data])) {\n\t\t\t\t\tfn();\n\n\t\t\t\t\tdelete storage[event.data];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tglobal.addEventListener('message', onMessage, FALSE);\n\n\t\t\treturn function functionDefer(fn) {\n\t\t\t\tvar uuid = functionUuid();\n\n\t\t\t\tstorage[uuid] = fn;\n\n\t\t\t\tglobal.postMessage(uuid, '*');\n\t\t\t};\n\t\t}());\n\t}\n\n\tif(!hasSetImmediate && 'onreadystatechange' in (element = document.createElement('script'))) {\n\t\treturn function functionDefer(fn) {\n\t\t\telement.onreadystatechange = function onreadystatechange() {\n\t\t\t\telement.onreadystatechange = NULL;\n\t\t\t\telement.parentNode.removeChild(element);\n\n\t\t\t\tfn();\n\t\t\t};\n\n\t\t\tdocument.body.appendChild(element);\n\t\t};\n\t}\n\n\tfallback = hasSetImmediate ? setImmediate : setTimeout; // eslint-disable-line no-undef\n\n\treturn function functionDefer(fn) {\n\t\tfallback(fn);\n\t};\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout\n*/\n\nvar functionUuid = (function() {\n\tvar regex = new RegExp('[xy]', 'g');\n\n\tfunction randomize(character) {\n\t\tvar r = Math.random() * 16 | 0;\n\n\t\treturn ((character === 'x') ? r : (r & 0x3 | 0x8)).toString(16);\n\t}\n\n\treturn function functionUuid() {\n\t\treturn 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(regex, randomize);\n\t};\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tarrayPrototypeSlice\n*/\n\n//=require shortcuts.js\n\nfunction functionToArray(arrayLikeObject, start, end) {\n\treturn arrayPrototypeSlice.call(arrayLikeObject, start, end);\n}\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tNULL, STRING_STRING, STRING_FUNCTION, EVENT_POST_CONFIGURE,\n\tvalidatorIsTypeOf,\n\tfunctionToArray\n*/\n\n//=require constants.js\n//=require validator/isTypeOf.js\n//=require function/toArray.js\n\nvar singletonEvent = (function() {\n\tvar TYPE_ON = 'on',\n\t\tTYPE_AFTER = 'after',\n\t\tregexMatchEvent = /^cache(Miss|Hit|Clear|Exceed)|queue(En|De)queue|(pre|post)(Resolve|Configure|Request|Process|Cache)$/,\n\t\tlistener = {};\n\n\tfunction addListener(type, events, callback) {\n\t\tvar event, pointer;\n\n\t\tif(validatorIsTypeOf(events, STRING_STRING) && validatorIsTypeOf(callback, STRING_FUNCTION)) {\n\t\t\tevents = events.split(' ');\n\n\t\t\twhile(event = events.shift()) {\n\t\t\t\tevent = event.split(':');\n\n\t\t\t\tif(regexMatchEvent.test(event[0])) {\n\t\t\t\t\t(listener[event[0]] || (listener[event[0]] = { on: [], after: [] }))[type].push({ callback: callback, filter: event[1] });\n\n\t\t\t\t\tif(type === TYPE_ON && event[0] === EVENT_POST_CONFIGURE && (pointer = settings.modules[event[1]])) {\n\t\t\t\t\t\tcallback(pointer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction Event() {}\n\n\tEvent.prototype = {\n\t\temit: function (event, filter) {\n\t\t\tvar pointer = listener[event],\n\t\t\t\tparameter, i, item;\n\n\t\t\tif(pointer) {\n\t\t\t\tparameter = functionToArray(arguments, 2);\n\n\t\t\t\tfor(i = 0; (item = pointer[TYPE_ON][i]); i++) {\n\t\t\t\t\tif(!item.filter || item.filter === filter) {\n\t\t\t\t\t\titem.callback.apply(NULL, parameter);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor(i = 0; (item = pointer[TYPE_AFTER][i]); i++) {\n\t\t\t\t\tif(!item.filter || item.filter === filter) {\n\t\t\t\t\t\titem.callback.apply(NULL, parameter);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\ton: function(events, callback) {\n\t\t\taddListener(TYPE_ON, events, callback);\n\n\t\t\treturn this;\n\t\t},\n\t\tafter: function(events, callback) {\n\t\t\taddListener(TYPE_AFTER, events, callback);\n\n\t\t\treturn this;\n\t\t}\n\t};\n\n\treturn new Event();\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout\n*/\n\nfunction functionGetTimestamp() {\n\treturn +new Date();\n}\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout\n*/\n\nvar functionEscapeRegex = (function() {\n\tvar regexMatchRegex = /[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g; // eslint-disable-line no-useless-escape\n\n\treturn function functionEscapeRegex(value) {\n\t\treturn value.replace(regexMatchRegex, '\\\\$&');\n\t};\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tlinkElement\n*/\n\n//=require shortcuts.js\n\nfunction functionResolveUrl(url) {\n\tlinkElement.href = url;\n\n\treturn linkElement.href;\n}\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tDEMAND_ID, PROVIDE_ID, PATH_ID,\n\tfunctionEscapeRegex, functionResolveUrl\n*/\n\n//=require constants.js\n//=require function/escapeRegex.js\n//=require function/resolveUrl.js\n\nvar regexIsAbsoluteUri = /^(http(s?):)?\\/\\//i,\n\tregexIsAbsolutePath = /^\\//,\n\tregexMatchSourcemap = /((?:\\/\\/|\\/\\*)#)\\s*(sourceMappingURL)\\s*=\\s*(?!(?:http[s]?:)?\\/\\/)(.+?)\\.map(?:\\s+)?(\\*\\/)?/g,\n\tregexMatchBaseUrl = new RegExp('^' + functionEscapeRegex(functionResolveUrl('/'))),\n\tregexMatchInternal = new RegExp('^' + DEMAND_ID + '|' + PROVIDE_ID + '|' + PATH_ID + '$'),\n\tregexMatchParameter = /^(mock:)?([+-])?((?:[-\\w]+\\/?)+)?(?:@(.+?))?(?:#(\\d+))?!/;\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tregexMatchParameter, regexMatchBaseUrl, regexIsAbsolutePath, regexIsAbsoluteUri,\n\tfunctionResolveUrl\n*/\n\n//=require variables.js\n//=require function/resolveUrl.js\n\nfunction functionResolvePath(uri, context) {\n\tvar path = uri.replace(regexMatchParameter, '');\n\n\tif(!regexIsAbsolutePath.test(path) && !regexIsAbsoluteUri.test(path)) {\n\t\tpath = '/' + functionResolveUrl(((context && functionResolveUrl(context + '/../')) || '/') + path).replace(regexMatchBaseUrl, '');\n\t}\n\n\treturn path;\n}\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tregexMatchParameter,\n\tfunctionResolvePath\n*/\n\n//=require variables.js\n//=require function/resolvePath.js\n\nfunction functionResolveId(uri, context) {\n\tvar parameter = uri.match(regexMatchParameter);\n\n\treturn ((parameter && parameter[1]) ? 'mock:' : '') + ((parameter && parameter[3]) || settings.handler) + '!' + functionResolvePath(uri, context);\n}\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tDEMAND_ID, FUNCTION_EMPTY, EVENT_POST_REQUEST, EVENT_POST_PROCESS, EVENT_CACHE_HIT, EVENT_CACHE_MISS, EVENT_CACHE_EXCEED, EVENT_CACHE_CLEAR, EVENT_PRE_CACHE, EVENT_PRE_CACHE, EVENT_POST_CACHE, STRING_STRING, NULL, FALSE, TRUE,\n\tvalidatorIsTypeOf,\n\tfunctionGetTimestamp, functionEscapeRegex, functionIterate, functionDefer, functionResolveId, functionToArray,\n\tClassDependency,\n\tsingletonEvent\n*/\n\n//=require constants.js\n//=require validator/isTypeOf.js\n//=require function/getTimestamp.js\n//=require function/escapeRegex.js\n//=require function/iterate.js\n//=require function/defer.js\n//=require function/resolveId.js\n//=require function/toArray.js\n//=require singleton/event.js\n\nvar singletonCache = (function() {\n\tvar STORAGE_PREFIX = '[' + DEMAND_ID + ']',\n\t\tSTORAGE_SUFFIX_STATE = '[state]',\n\t\tSTORAGE_SUFFIX_VALUE = '[value]',\n\t\tregexMatchState = new RegExp('^' + functionEscapeRegex(STORAGE_PREFIX) + '\\\\[(.+?)\\\\]' + functionEscapeRegex(STORAGE_SUFFIX_STATE) + '$'),\n\t\tregexMatchProperties = /^(.+?),(\\d+),(\\d*),(.+?),(\\d+)$/,\n\t\tsupportsLocalStorage = (function() { try { return 'localStorage' in global && global.localStorage; } catch(exception) { return FALSE; } }()),\n\t\tlocalStorage = supportsLocalStorage ? global.localStorage : NULL,\n\t\tsupportsRemainingSpace = supportsLocalStorage && 'remainingSpace' in localStorage,\n\t\tstorage = {},\n\t\tcache;\n\n\tsingletonEvent\n\t\t.on(EVENT_CACHE_MISS, function(dependency) {\n\t\t\tfunctionDefer(function() {\n\t\t\t\tcache.clear.path(dependency.id);\n\t\t\t});\n\t\t})\n\t\t.on(EVENT_CACHE_EXCEED, function(dependency) {\n\t\t\tdemand('-!/' + DEMAND_ID + '/cache/dispose').then(function(cacheDispose) {\n\t\t\t\tfunctionDefer(function() {\n\t\t\t\t\tcacheDispose(dependency.source.length);\n\n\t\t\t\t\tcache.set(dependency);\n\t\t\t\t});\n\t\t\t});\n\t\t})\n\t\t.on(EVENT_POST_REQUEST, function(dependency) {\n\t\t\tif(dependency.source && enabled(dependency)) {\n\t\t\t\tstorage[dependency.id] = TRUE;\n\t\t\t}\n\t\t})\n\t\t.after(EVENT_POST_PROCESS, function(dependency) {\n\t\t\tif(storage[dependency.id]) {\n\t\t\t\tfunctionDefer(function() {\n\t\t\t\t\tcache.set(dependency);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\tfunction enabled(dependency) {\n\t\tvar match;\n\n\t\tif(dependency.cache !== NULL) {\n\t\t\treturn dependency.cache;\n\t\t}\n\n\t\tfunctionIterate(settings.cache, function(property, value) {\n\t\t\tif(dependency.path.indexOf(property) === 0 && (!match || value.weight > match.weight)) {\n\t\t\t\tmatch = value;\n\t\t\t}\n\t\t});\n\n\t\treturn match ? match.state : FALSE;\n\t}\n\n\tfunction getKey(key) {\n\t\treturn localStorage.getItem(key);\n\t}\n\n\tfunction setKey(key, value) {\n\t\tlocalStorage[value ? 'setItem' : 'removeItem'](key, value);\n\t}\n\n\tfunction getState(key) {\n\t\tvar state = getKey(key),\n\t\t\tmatches;\n\n\t\tif(state && (matches = state.match(regexMatchProperties))) {\n\t\t\treturn functionToArray(matches, 1);\n\t\t}\n\t}\n\n\tfunction setState(key, state) {\n\t\tstate[4] = functionGetTimestamp();\n\n\t\tsetKey(key, state.join(','));\n\t}\n\n\tfunction emit(event, dependency, state) {\n\t\tsingletonEvent.emit(event, dependency.id, dependency, state);\n\t}\n\n\tfunction Cache() {\n\t\tfunctionDefer(this.clear.expired.bind(this.clear));\n\t}\n\n\tCache.prototype = {\n\t\tget: supportsLocalStorage ? function(dependency) {\n\t\t\t\t\t\t\t\t\t\t\tvar id, state;\n\n\t\t\t\t\t\t\t\t\t\t\tif(enabled(dependency)) {\n\t\t\t\t\t\t\t\t\t\t\t\tid = STORAGE_PREFIX + '[' + dependency.id + ']';\n\t\t\t\t\t\t\t\t\t\t\t\tstate = getState(id + STORAGE_SUFFIX_STATE);\n\n\t\t\t\t\t\t\t\t\t\t\t\tif(!state) {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tif(state[0] !== dependency.version || (state[2] && dependency.lifetime && state[2] <= functionGetTimestamp())) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tdependency.invalid = true;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdependency.source = getKey(id + STORAGE_SUFFIX_VALUE);\n\n\t\t\t\t\t\t\t\t\t\t\t\tfunctionDefer(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetState(id + STORAGE_SUFFIX_STATE, state);\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY,\n\t\tresolve: supportsLocalStorage ? function(dependency) {\n\t\t\t\t\t\t\t\t\t\t\tvar self = this;\n\n\t\t\t\t\t\t\t\t\t\t\tif(self.get(dependency)) {\n\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_CACHE_HIT, dependency);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_CACHE_MISS, dependency);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} : function(dependency) { emit(EVENT_CACHE_MISS, dependency); },\n\t\tset: supportsLocalStorage ? function(dependency) {\n\t\t\t\t\t\t\t\t\t\t\tvar state, id, spaceBefore;\n\n\t\t\t\t\t\t\t\t\t\t\tif(enabled(dependency)) {\n\t\t\t\t\t\t\t\t\t\t\t\tstate = [ dependency.version, dependency.source.length, dependency.lifetime ? functionGetTimestamp() + dependency.lifetime : NULL, demand.version ];\n\t\t\t\t\t\t\t\t\t\t\t\tid = STORAGE_PREFIX + '[' + dependency.id + ']';\n\n\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_PRE_CACHE, dependency, state);\n\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\tspaceBefore = supportsRemainingSpace ? localStorage.remainingSpace : NULL;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetKey(id + STORAGE_SUFFIX_VALUE, dependency.source);\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetState(id + STORAGE_SUFFIX_STATE, state);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// strict equality check with \"===\" is required due to spaceBefore might be \"0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(spaceBefore !== NULL && localStorage.remainingSpace === spaceBefore) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthrow new Error();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_POST_CACHE, dependency, state);\n\t\t\t\t\t\t\t\t\t\t\t\t} catch(error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_CACHE_EXCEED, dependency);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY,\n\t\tclear: {\n\t\t\tpath: supportsLocalStorage ? function(path) {\n\t\t\t\t\t\t\t\t\t\t\t\tvar id = functionResolveId(path),\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey = STORAGE_PREFIX + '[' + id + ']';\n\n\t\t\t\t\t\t\t\t\t\t\t\tif(getKey(key + STORAGE_SUFFIX_STATE)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetKey(key + STORAGE_SUFFIX_STATE);\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetKey(key + STORAGE_SUFFIX_VALUE);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\temit(EVENT_CACHE_CLEAR, ClassDependency.get(id) || new ClassDependency(id, NULL, FALSE));\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY,\n\t\t\tall: supportsLocalStorage ? function() {\n\t\t\t\t\t\t\t\t\t\t\t\tvar match;\n\n\t\t\t\t\t\t\t\t\t\t\t\tfunctionIterate(localStorage, function(property) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tmatch = property.match(regexMatchState);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tmatch && this.path(match[1]);\n\t\t\t\t\t\t\t\t\t\t\t\t}, this);\n\t\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY,\n\t\t\texpired: supportsLocalStorage ? function() {\n\t\t\t\t\t\t\t\t\t\t\t\tvar self = this,\n\t\t\t\t\t\t\t\t\t\t\t\t\tmatch, state;\n\n\t\t\t\t\t\t\t\t\t\t\t\tfunctionIterate(localStorage, function(property) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tmatch = property.match(regexMatchState);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(match) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstate = getState(STORAGE_PREFIX + '[' + match[1] + ']' + STORAGE_SUFFIX_STATE);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(state && state[2] > 0 && state[2] <= functionGetTimestamp()) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tself.path(match[1]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}, this);\n\t\t\t\t\t\t\t\t\t\t\t} : FUNCTION_EMPTY\n\t\t}\n\t};\n\n\treturn (cache = new Cache());\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tfunctionUuid,\n*/\n\n//=require constants.js\n//=require function/uuid.js\n\nvar ClassWeakmap = 'WeakMap' in global ? global.WeakMap : (function() {\n\tvar prefix = 'weakmap-';\n\n\tfunction getEntry(context, key) {\n\t\tvar entry;\n\n\t\tif((entry = key[context.id]) && entry[0] === key) {\n\t\t\treturn entry;\n\t\t}\n\t}\n\n\tfunction ClassWeakmap() {\n\t\tthis.define('id', prefix + functionUuid());\n\t}\n\n\tClassWeakmap.prototype = {\n\t\tset: function(key, value) {\n\t\t\tvar entry = getEntry(this, key);\n\n\t\t\tif(entry) {\n\t\t\t\tentry[1] = value;\n\t\t\t} else {\n\t\t\t\tkey.define(this.id, [ key, value ]);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tget: function(key) {\n\t\t\tvar entry = getEntry(this, key);\n\n\t\t\tif(entry) {\n\t\t\t\treturn entry[1];\n\t\t\t}\n\t\t},\n\t\tdelete: function(key) {\n\t\t\tvar entry = getEntry(this, key);\n\n\t\t\tif(entry) {\n\t\t\t\tentry.length = 0;\n\n\t\t\t\tdelete key[this.id];\n\t\t\t}\n\t\t},\n\t\thas: function(key) {\n\t\t\treturn !!getEntry(this, key);\n\t\t}\n\t};\n\n\treturn ClassWeakmap;\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n \tFUNCTION_EMPTY, NULL,\n\tarrayPrototypeConcat,\n\tfunctionDefer, functionToArray,\n\tClassWeakmap\n*/\n\n//=require constants.js\n//=require shortcuts.js\n//=require function/defer.js\n//=require function/toArray.js\n//=require class/weakmap.js\n\nvar ClassPledge = (function() {\n\tvar PLEDGE_PENDING = 'pending',\n\t\tPLEDGE_RESOLVED = 'resolved',\n\t\tPLEDGE_REJECTED = 'rejected',\n\t\tstorage = new ClassWeakmap();\n\n\tfunction resolve() {\n\t\tstorage.get(this).handle(PLEDGE_RESOLVED, arguments);\n\t}\n\n\tfunction reject() {\n\t\tstorage.get(this).handle(PLEDGE_REJECTED, arguments);\n\t}\n\n\tfunction handle(state, parameter) {\n\t\tvar properties = storage.get(this),\n\t\t\tpointer, result;\n\n\t\tif(properties.state === PLEDGE_PENDING) {\n\t\t\tproperties.state = state;\n\t\t\tproperties.value = parameter;\n\t\t}\n\n\t\twhile(pointer = properties[properties.state].shift()) {\n\t\t\tresult = pointer.handler.apply(NULL, properties.value);\n\n\t\t\tif(result && typeof result.then === 'function') {\n\t\t\t\tresult.then(pointer.dfd.resolve, pointer.dfd.reject);\n\t\t\t} else {\n\t\t\t\tpointer.dfd[properties.state === PLEDGE_RESOLVED ? 'resolve' : 'reject'].apply(NULL, properties.value);\n\t\t\t}\n\t\t}\n\n\t\tproperties[PLEDGE_RESOLVED].length = 0;\n\t\tproperties[PLEDGE_REJECTED].length = 0;\n\t}\n\n\tfunction observe(pledge, index, properties) {\n\t\tpledge.then(\n\t\t\tfunction() {\n\t\t\t\tproperties.resolved[index] = functionToArray(arguments);\n\n\t\t\t\tproperties.count++;\n\n\t\t\t\tcheck(properties);\n\t\t\t},\n\t\t\tfunction() {\n\t\t\t\tproperties.rejected.push(functionToArray(arguments));\n\n\t\t\t\tcheck(properties);\n\t\t\t}\n\t\t);\n\t}\n\n\tfunction check(properties) {\n\t\tif(properties.count === properties.total) {\n\t\t\tproperties.dfd.resolve.apply(NULL, arrayPrototypeConcat.apply([], properties.resolved));\n\t\t} else if(properties.rejected.length + properties.count === properties.total) {\n\t\t\tproperties.dfd.reject.apply(NULL, arrayPrototypeConcat.apply([], properties.rejected));\n\t\t}\n\t}\n\n\tfunction ClassPledge(executor) {\n\t\tvar self = this;\n\n\t\tstorage.set(this, { state: PLEDGE_PENDING, handle: handle.bind(self), value: NULL, resolved: [], rejected: [], count: 0 });\n\n\t\texecutor(resolve.bind(self), reject.bind(self));\n\n\t\treturn self;\n\t}\n\n\tClassPledge.prototype = {\n\t\t'catch': function(listener) {\n\t\t\treturn this.then(FUNCTION_EMPTY, listener);\n\t\t},\n\t\talways: function(alwaysListener) {\n\t\t\treturn this.then(alwaysListener, alwaysListener);\n\t\t},\n\t\tthen: function(resolveListener, rejectListener) {\n\t\t\tvar properties = storage.get(this),\n\t\t\t\tdfd = ClassPledge.defer();\n\n\t\t\tresolveListener && properties[PLEDGE_RESOLVED].push({ handler: resolveListener, dfd: dfd });\n\t\t\trejectListener && properties[PLEDGE_REJECTED].push({ handler: rejectListener, dfd: dfd });\n\n\t\t\tif(properties.state !== PLEDGE_PENDING) {\n\t\t\t\tfunctionDefer(properties.handle);\n\t\t\t}\n\n\t\t\treturn dfd.pledge;\n\t\t},\n\t\tisPending: function() {\n\t\t\treturn storage.get(this).state === PLEDGE_PENDING;\n\t\t},\n\t\tisResolved: function() {\n\t\t\treturn storage.get(this).state === PLEDGE_RESOLVED;\n\t\t},\n\t\tisRejected: function() {\n\t\t\treturn storage.get(this).state === PLEDGE_REJECTED;\n\t\t}\n\t};\n\n\tClassPledge.defer = function() {\n\t\tvar self = {};\n\n\t\tself.pledge = new ClassPledge(function(resolveListener, rejectListener) {\n\t\t\tself.resolve = resolveListener;\n\t\t\tself.reject = rejectListener;\n\t\t});\n\n\t\treturn self;\n\t};\n\n\tClassPledge.all = function(pledges) {\n\t\tvar dfd = ClassPledge.defer(),\n\t\t\tproperties, i = 0, pledge;\n\n\t\tif(pledges.length) {\n\t\t\tproperties = { dfd: dfd, resolved: [], rejected: [], total: pledges.length, count: 0 };\n\n\t\t\tfor(; pledge = pledges[i]; i++) {\n\t\t\t\tobserve(pledge, i, properties)\n\t\t\t}\n\t\t} else {\n\t\t\tdfd.resolve();\n\t\t}\n\n\t\treturn dfd.pledge;\n\t};\n\n\tClassPledge.race = function(pledges) {\n\t\tvar dfd = ClassPledge.defer(),\n\t\t\ti = 0, pledge;\n\n\t\tfor(; pledge = pledges[i]; i++) {\n\t\t\tpledge.then(dfd.resolve, dfd.reject);\n\t\t}\n\n\t\tif(!pledges.length) {\n\t\t\tdfd.resolve();\n\t\t}\n\n\t\treturn dfd.pledge;\n\t};\n\n\treturn ClassPledge;\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tClassWeakmap\n*/\n\n//=require class/weakmap.js\n\nvar ClassRegistry = (function() {\n\tvar storage = new ClassWeakmap();\n\n\tfunction ClassRegistry() {\n\t\tstorage.set(this, {});\n\t}\n\n\tClassRegistry.prototype = {\n\t\tget: function(key) {\n\t\t\treturn key ? storage.get(this)[key] : storage.get(this);\n\t\t},\n\t\tset: function(key, value) {\n\t\t\tstorage.get(this)[key] = value;\n\t\t},\n\t\tremove: function(key) {\n\t\t\tdelete storage.get(this)[key];\n\t\t}\n\t};\n\n\treturn ClassRegistry;\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tDEMAND_ID,\n\tfunctionToArray\n*/\n\n//=require constants.js\n//=require function/toArray.js\n\nfunction ClassFailure(message, module, stack) {\n\tvar self = this;\n\n\tself.message = message;\n\n\tmodule && (self.module = module);\n\tstack && (self.stack = functionToArray(stack));\n\n\treturn self;\n}\n\nClassFailure.prototype = {\n\t/* only for reference\n\t message: NULL,\n\t module: NULL,\n\t stack: NULL,\n\t */\n\ttoString: function() {\n\t\tvar self = this,\n\t\t\tresult = DEMAND_ID + ': ' + self.message + ' ' + (self.module ? '\"' + self.module + '\"' : '');\n\n\t\tif(self.stack) {\n\t\t\tresult = ClassFailure.traverse(self.stack, result, 1);\n\t\t}\n\n\t\treturn result;\n\t}\n};\n\nClassFailure.traverse = function(stack, value, depth) {\n\tvar indention = new Array(depth + 1).join(' '),\n\t\ti = 0, item;\n\n\tfor(; item = stack[i]; i++) {\n\t\tvalue += '\\n' + indention + '> ' + item.message + ' ' + (item.module ? '\"' + item.module + '\"' : '');\n\n\t\tif(item.stack) {\n\t\t\tvalue = ClassFailure.traverse(item.stack, value, depth + 1);\n\t\t}\n\t}\n\n\treturn value;\n};\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tDEMAND_ID, MODULE_PREFIX_HANDLER, ERROR_LOAD, DEMAND_ID, PROVIDE_ID, PATH_ID, MOCK_PREFIX, NULL, TRUE, FALSE,\n\tobject,\n\tregexMatchInternal, regexMatchParameter,\n\tvalidatorIsPositive,\n\tfunctionResolvePath, functionResolveId, functionResolveUrl, functionIterate, functionToArray,\n\tClassRegistry, ClassPledge, ClassFailure,\n\tsingletonCache\n*/\n\n//=require constants.js\n//=require shortcuts.js\n//=require variables.js\n//=require validator/isPositive.js\n//=require function/resolvePath.js\n//=require function/resolveId.js\n//=require function/resolveUrl.js\n//=require function/iterate.js\n//=require function/toArray.js\n//=require class/registry.js\n//=require class/pledge.js\n//=require class/failure.js\n//=require singleton/cache.js\n\nvar ClassDependency = (function() {\n\tvar PREFIX_INTERNAL = 'internal!',\n\t\tregistry = new ClassRegistry(),\n\t\tplaceholder = [];\n\n\tfunction setProperty(property, value) {\n\t\tthis[property] = value;\n\t}\n\n\tfunction addPending(id, dependency) {\n\t\tif(dependency.pledge.isPending()) {\n\t\t\tthis.push(id);\n\t\t}\n\t}\n\n\tfunction addResolved(id, dependency) {\n\t\tif(dependency.pledge.isResolved()) {\n\t\t\tthis.push(id);\n\t\t}\n\t}\n\n\tfunction addRejected(id, dependency) {\n\t\tif(dependency.pledge.isRejected()) {\n\t\t\tthis.push(id);\n\t\t}\n\t}\n\n\tfunction ClassDependency(uri, context, register) {\n\t\tvar self = this,\n\t\t\tparameter = uri.match(regexMatchParameter) || placeholder;\n\n\t\tself.path = functionResolvePath(uri, context);\n\t\tself.mock = parameter[1] ? TRUE : FALSE;\n\t\tself.cache = parameter[2] ? parameter[1] === '+' : NULL;\n\t\tself.type = parameter[3] || settings.handler;\n\t\tself.version = parameter[4] || settings.version;\n\t\tself.lifetime = (parameter[5] && parameter[5] * 1000) || settings.lifetime;\n\t\tself.id = (self.mock ? MOCK_PREFIX : '' ) + self.type + '!' + self.path;\n\t\tself.uri = (self.mock ? MOCK_PREFIX : '' ) + self.type + '@' + self.version + (validatorIsPositive(self.lifetime) && self.lifetime > 0 ? '#' + self.lifetime : '' ) + '!' + self.path;\n\t\tself.dfd = ClassPledge.defer();\n\t\tself.pledge = self.dfd.pledge;\n\t\tself.invalid = false;\n\n\t\tself.pledge.then(function() {\n\t\t\tself.value = functionToArray(arguments);\n\t\t});\n\n\t\t(register !== FALSE) && registry.set(self.id, self);\n\n\t\treturn self;\n\t}\n\n\tClassDependency.prototype = {\n\t\tenqueue: true // handled by handler\n\t\t/* only for reference\n\t \tpath: NULL,\n\t \tmock: NULL,\n\t\tcache: NULL,\n\t\ttype: NULL,\n\t\tversion: NULL,\n\t\tlifetime: NULL,\n\t \tid: NULL,\n\t \turi: NULL,\n\t\tdfd: NULL,\n\t\tpledge: NULL,\n\t\tvalue: NULL,\n\t\thandler: NULL, // set by Dependency.resolve\n\t \tsource: NULL, // set by Cache or Loader\n\t \turl: NULL // optional, set by Loader\n\t\t*/\n\t};\n\n\tClassDependency.get = function(uri, context) {\n\t\treturn registry.get(functionResolveId(uri, context));\n\t};\n\n\tClassDependency.resolve = function(uri, context) {\n\t\tvar isInternal = context && regexMatchInternal.test(uri),\n\t\t\tdependency = isInternal ? this.get(PREFIX_INTERNAL + context + '/' + uri) : this.get(uri, context),\n\t\t\tvalue;\n\n\t\tif(!dependency) {\n\t\t\tif(isInternal) {\n\t\t\t\tdependency = new ClassDependency(PREFIX_INTERNAL + context + '/' + uri);\n\n\t\t\t\tswitch(uri) {\n\t\t\t\t\tcase DEMAND_ID:\n\t\t\t\t\t\tvalue = (function() {\n\t\t\t\t\t\t\treturn functionIterate(demand, setProperty, demand.bind(context));\n\t\t\t\t\t\t}());\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PROVIDE_ID:\n\t\t\t\t\t\tvalue = provide.bind(context);\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PATH_ID:\n\t\t\t\t\t\tvalue = context;\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tdependency.dfd.resolve(value);\n\t\t\t} else {\n\t\t\t\tdependency = new ClassDependency(uri, context);\n\n\t\t\t\tdemand(MODULE_PREFIX_HANDLER + dependency.type)\n\t\t\t\t\t.then(\n\t\t\t\t\t\tfunction(handler) {\n\t\t\t\t\t\t\tdependency.handler = handler;\n\n\t\t\t\t\t\t\tif(dependency.mock) {\n\t\t\t\t\t\t\t\tdependency.dfd.resolve(handler);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsingletonCache.resolve(dependency);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\tdependency.dfd.reject(new ClassFailure(ERROR_LOAD + ' (handler)', self.id));\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\treturn dependency;\n\t};\n\n\tClassDependency.remove = function(uri, context, cache) {\n\t\tvar id = functionResolveId(uri, context),\n\t\t\tnode = document.querySelector('[' + DEMAND_ID + '-id=\"' + id + '\"]');\n\n\t\tregistry.remove(id);\n\t\tregistry.remove(MOCK_PREFIX + id);\n\n\t\tnode && node.parentNode.removeChild(node);\n\n\t\t(cache !== FALSE) && singletonCache.clear.path(id);\n\t};\n\n\tClassDependency.list = {\n\t\tall: function() {\n\t\t\treturn object.keys(registry.get());\n\t\t},\n\t\tpending: function() {\n\t\t\treturn functionIterate(registry.get(), addPending, []);\n\t\t},\n\t\tresolved: function() {\n\t\t\treturn functionIterate(registry.get(), addResolved, []);\n\t\t},\n\t\trejected: function() {\n\t\t\treturn functionIterate(registry.get(), addRejected, []);\n\t\t}\n\t};\n\n\treturn ClassDependency;\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tfunctionResolveUrl, functionEscapeRegex, functionIterate\n*/\n\n//=require function/resolveUrl.js\n//=require function/escapeRegex.js\n//=require function/iterate.js\n\nvar ClassPattern = (function() {\n\tvar regexMatchTrailingSlash = /(.+)\\/$/;\n\n\tfunction setProperty(property, value) {\n\t\tthis[property] = {\n\t\t\turl: functionResolveUrl(value).replace(regexMatchTrailingSlash, '$1'),\n\t\t\tmatch: new RegExp('^' + functionEscapeRegex(value))\n\t\t};\n\t}\n\n\tfunction ClassPattern(pattern, url) {\n\t\tvar self = this;\n\n\t\tself.weight = pattern.length;\n\t\tself.match = new RegExp('^' + functionEscapeRegex(pattern));\n\t\tself.location = [].concat(url);\n\n\t\tfunctionIterate(self.location, setProperty, self.location);\n\t}\n\n\tClassPattern.prototype = {\n\t\t/* only for reference\n\t\t weight: 0,\n\t\t match: NULL,\n\t\t location: NULL,\n\t\t */\n\t\tmatches: function(path) {\n\t\t\treturn this.match.test(path);\n\t\t},\n\t\tprocess: function(path, index) {\n\t\t\tvar current = this.location[index];\n\n\t\t\tif(current) {\n\t\t\t\treturn path.replace(this.match, current.url);\n\t\t\t}\n\t\t}\n\t};\n\n\treturn ClassPattern;\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tTRUE,\n\tregexMatchBaseUrl,\n\tClassPledge\n*/\n\n//=require constants.js\n//=require shortcuts.js\n//=require variables.js\n//=require class/pledge.js\n\nvar ClassXhr = (function(XMLHttpRequest) {\n\tvar XDomainRequest = 'XDomainRequest' in global && global.XDomainRequest || XMLHttpRequest;\n\n\tfunction checkState() {\n\t\tif(this.readyState < 4) {\n\t\t\tthis.abort();\n\t\t}\n\t}\n\n\treturn function ClassXhr(url) {\n\t\tvar dfd = ClassPledge.defer(),\n\t\t\txhr = regexMatchBaseUrl.test(url) ? new XMLHttpRequest() : new XDomainRequest(),\n\t\t\tboundCheckState = checkState.bind(xhr),\n\t\t\ttimeout = settings.timeout,\n\t\t\tpointer;\n\n\t\txhr.ontimeout = xhr.onerror = xhr.onabort = function() {\n\t\t\tdfd.reject(xhr.status);\n\t\t};\n\t\txhr.onprogress = xhr.onreadystatechange = function() {\n\t\t\tclearTimeout(pointer);\n\n\t\t\tpointer = setTimeout(boundCheckState, timeout);\n\t\t};\n\t\txhr.onload = function() {\n\t\t\tpointer = clearTimeout(pointer);\n\n\t\t\tif(!('status' in xhr) || xhr.status === 200) {\n\t\t\t\tdfd.resolve(xhr.responseText, xhr.getResponseHeader && xhr.getResponseHeader('content-type'));\n\t\t\t} else {\n\t\t\t\tdfd.reject(xhr.status);\n\t\t\t}\n\t\t};\n\n\t\txhr.open('GET', url, TRUE);\n\t\txhr.send();\n\n\t\tpointer = setTimeout(boundCheckState, timeout);\n\n\t\treturn dfd.pledge;\n\t};\n}(XMLHttpRequest));\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tobjectPrototypeToString\n*/\n\n//=require shortcuts.js\n\n/**\n * isArray\n *\n * Check whether a given value is of type array\n *\n * @param value\n *\n * @return {boolean}\n */\n\nfunction validatorIsArray(value) {\n\treturn objectPrototypeToString.call(value) === '[object Array]';\n}\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout\n*/\n\n/**\n * hash\n *\n * Generate a hash for a given string\n *\n * @param {string} input\n *\n * @return {number}\n */\nfunction functionHash(input){\n\tvar value = 5381,\n\t\ti = input.length;\n\n\twhile(i) {\n\t\tvalue = (value * 33) ^ input.charCodeAt(--i);\n\t}\n\n\treturn value >>> 0;\n}\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tSTRING_UNDEFINED,\n\tvalidatorIsTypeOf,\n\tfunctionUuid,\n*/\n\n//=require constants.js\n//=require shortcuts.js\n//=require validator/isTypeOf.js\n//=require function/uuid.js\n\nfunction AbstractUuid() {\n\tif(validatorIsTypeOf(this.uuid, STRING_UNDEFINED)) {\n\t\tthis.define('uuid', functionUuid());\n\t}\n\n\treturn this;\n}\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tSTRING_BOOLEAN, STRING_STRING, EVENT_PRE_RESOLVE, EVENT_POST_RESOLVE, EVENT_PRE_CONFIGURE, EVENT_POST_CONFIGURE, EVENT_CACHE_MISS, EVENT_CACHE_HIT, EVENT_PRE_REQUEST, EVENT_POST_REQUEST, EVENT_PRE_PROCESS, EVENT_POST_PROCESS, NULL, FALSE,\n\tvalidatorIsTypeOf, validatorIsObject, validatorIsPositive, validatorIsInstanceOf,\n\tfunctionIterate, functionMerge, functionDefer, functionToArray,\n\tClassPledge, ClassDependency, ClassPattern, ClassLoader,\n\tsingletonEvent, singletonCache\n*/\n\n//=require constants.js\n//=require validator/isTypeOf.js\n//=require validator/isObject.js\n//=require validator/isPositive.js\n//=require validator/isInstanceOf.js\n//=require function/iterate.js\n//=require function/merge.js\n//=require function/defer.js\n//=require function/toArray.js\n//=require singleton/event.js\n//=require singleton/cache.js\n//=require class/pledge.js\n//=require class/dependency.js\n//=require class/pattern.js\n//=require class/loader.js\n\n/*eslint no-global-assign: [2, { \"exceptions\": [\"demand\"] }]*/\ndemand = global.demand = (function() {\n\tfunction updateCacheSettings(property, value) {\n\t\tthis[property] = { weight: property.length, state: value };\n\t}\n\n\tfunction updatePatternSettings(property, value) {\n\t\tproperty !== 'base' && (this[property] = new ClassPattern(property, value));\n\t}\n\n\tfunction updateModuleSettings(property, value) {\n\t\tvar temp = this[property] = this[property] || {};\n\n\t\tsingletonEvent.emit(EVENT_PRE_CONFIGURE, property, temp);\n\n\t\tfunctionMerge(temp, value);\n\n\t\tsingletonEvent.emit(EVENT_POST_CONFIGURE, property, temp);\n\t}\n\n\tfunction demand() {\n\t\tvar dependencies = functionToArray(arguments),\n\t\t\tcontext = this !== global ? this : NULL,\n\t\t\ti = 0, uri, dfd, result;\n\n\t\tsingletonEvent.emit(EVENT_PRE_RESOLVE, NULL, dependencies, context);\n\n\t\tfor(; (uri = dependencies[i]); i++) {\n\t\t\tif(validatorIsTypeOf(uri, STRING_STRING)) {\n\t\t\t\tdependencies[i] = ClassDependency.resolve(uri, context).pledge;\n\t\t\t} else {\n\t\t\t\tdependencies[i] = (dfd = ClassPledge.defer()).pledge;\n\n\t\t\t\tdfd.resolve(uri);\n\t\t\t}\n\t\t}\n\n\t\tif(dependencies.length > 1) {\n\t\t\tresult = ClassPledge.all(dependencies);\n\t\t} else {\n\t\t\tresult = dependencies[0];\n\t\t}\n\n\t\treturn result.always(function() {\n\t\t\tsingletonEvent.emit(EVENT_POST_RESOLVE, NULL, dependencies, context);\n\t\t});\n\t}\n\n\tdemand.configure = function(options) {\n\t\tvar cache = options.cache,\n\t\t\tversion = options.version,\n\t\t\ttimeout = options.timeout,\n\t\t\tlifetime = options.lifetime,\n\t\t\tbase = options.base,\n\t\t\tpattern = options.pattern,\n\t\t\tmodules = options.modules,\n\t\t\tpointer = settings.modules;\n\n\t\tif(validatorIsTypeOf(cache, STRING_BOOLEAN)) {\n\t\t\tsettings.cache[''] = { weight: 0, state: cache };\n\t\t} else if(validatorIsObject(cache)) {\n\t\t\tfunctionIterate(cache, updateCacheSettings, settings.cache);\n\t\t}\n\n\t\tif(validatorIsTypeOf(version, STRING_STRING)) {\n\t\t\tsettings.version = version;\n\t\t}\n\n\t\tif(validatorIsPositive(timeout)) {\n\t\t\tsettings.timeout = Math.min(Math.max(timeout, 2), 12) * 1000;\n\t\t}\n\n\t\tif(validatorIsPositive(lifetime) && lifetime > 0) {\n\t\t\tsettings.lifetime = lifetime * 1000;\n\t\t}\n\n\t\tif(validatorIsTypeOf(base, STRING_STRING) && base !== '') {\n\t\t\tsettings.pattern.base = new ClassPattern('', base);\n\t\t}\n\n\t\tif(validatorIsObject(pattern)) {\n\t\t\tfunctionIterate(pattern, updatePatternSettings, settings.pattern);\n\t\t}\n\n\t\tif(validatorIsObject(modules)) {\n\t\t\tfunctionIterate(modules, updateModuleSettings, pointer);\n\t\t}\n\n\t\treturn demand;\n\t};\n\n\tdemand.version = '{{gulp:package.version}}';\n\tdemand.on = singletonEvent.on.bind(demand);\n\tdemand.get = function(uri, context) { var dependency = ClassDependency.get(uri, context); return dependency && dependency.value; };\n\tdemand.remove = ClassDependency.remove;\n\tdemand.list = ClassDependency.list;\n\tdemand.clear = singletonCache.clear;\n\n\tsingletonEvent\n\t\t.after(EVENT_CACHE_MISS, function(dependency) {\n\t\t\tnew ClassLoader(dependency);\n\t\t})\n\t\t.after(EVENT_POST_REQUEST, function(dependency) {\n\t\t\tvar pointer = dependency.handler.onPostRequest;\n\n\t\t\tpointer && pointer(dependency);\n\t\t})\n\t\t.after(EVENT_CACHE_HIT + ' ' + EVENT_POST_REQUEST, function(dependency) {\n\t\t\tsingletonEvent.emit(EVENT_PRE_PROCESS, dependency.id, dependency);\n\t\t})\n\t\t.after(EVENT_PRE_REQUEST, function(dependency) {\n\t\t\tvar pointer = dependency.handler.onPreRequest;\n\n\t\t\tpointer && pointer(dependency);\n\t\t})\n\t\t.after(EVENT_PRE_PROCESS, function(dependency) {\n\t\t\tvar pointer = dependency.handler.onPreProcess;\n\n\t\t\tpointer && pointer(dependency);\n\n\t\t\tdependency.pledge.then(function() {\n\t\t\t\tsingletonEvent.emit(EVENT_POST_PROCESS, dependency.id, dependency);\n\t\t\t});\n\n\t\t\tif(dependency.enqueue === true) {\n\t\t\t\tqueue.enqueue(dependency);\n\t\t\t} else if(validatorIsInstanceOf(dependency.enqueue, ClassPledge)) {\n\t\t\t\tdependency.enqueue.then(function() { queue.enqueue(dependency); });\n\t\t\t}\n\t\t});\n\n\treturn demand;\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tDEMAND_ID, EVENT_PRE_REQUEST, EVENT_POST_REQUEST, ERROR_LOAD,\n\tregexIsAbsoluteUri,\n\tlinkElement,\n\tfunctionIterate, functionResolveUrl, functionGetTimestamp,\n\tClassXhr, ClassFailure,\n\tsingletonEvent\n*/\n\n//=require constants.js\n//=require variables.js\n//=require shortcuts.js\n//=require function/resolveUrl.js\n//=require function/iterate.js\n//=require singleton/event.js\n//=require class/xhr.js\n//=require class/failure.js\n\nfunction ClassLoader(dependency) {\n\tvar regexMatchEmptySearch = /^(?:\\?|)$/,\n\t\tpattern;\n\n\tfunction resolve(response, type) {\n\t\tif(!type || !dependency.handler.validate || dependency.handler.validate(type)) {\n\t\t\tdependency.source = response;\n\n\t\t\tsingletonEvent.emit(EVENT_POST_REQUEST, dependency.type, dependency);\n\t\t} else {\n\t\t\tdependency.dfd.reject(new ClassFailure(ERROR_LOAD + ' (content-type)', dependency.id));\n\t\t}\n\t}\n\n\tfunction reject(status) {\n\t\tdependency.dfd.reject(new ClassFailure(ERROR_LOAD + (status ? ' (status)' : ''), dependency.id));\n\t}\n\n\tfunction load(location) {\n\t\tlocation = location || 0;\n\t\tdependency.url = document.createElement('a');\n\n\t\tdependency.url.href = pattern ? functionResolveUrl(pattern.process(dependency.path, location)) : dependency.path;\n\n\t\tif(dependency.invalid) {\n\t\t\tdependency.url.search += ((regexMatchEmptySearch.test(dependency.url.search)) ? '' : '&') + functionGetTimestamp();\n\t\t}\n\n\t\tsingletonEvent.emit(EVENT_PRE_REQUEST, dependency.type, dependency);\n\n\t\tnew ClassXhr(dependency.url).then(\n\t\t\tresolve,\n\t\t\t(\n\t\t\t\tpattern ?\n\t\t\t\tfunction() {\n\t\t\t\t\tlocation++;\n\n\t\t\t\t\tif(pattern.location[location]) {\n\t\t\t\t\t\tload(location);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treject();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t:\n\t\t\t\treject\n\t\t\t)\n\t\t);\n\t}\n\n\tif(!regexIsAbsoluteUri.test(dependency.path)) {\n\t\tfunctionIterate(settings.pattern, function(property, value) {\n\t\t\tvalue.matches(dependency.path) && (!pattern || pattern.weight < value.weight) && (pattern = value);\n\t\t});\n\t}\n\n\tload();\n}\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tSTRING_STRING, STRING_UNDEFINED, STRING_FUNCTION, ERROR_PROVIDE, ERROR_PROVIDE_ANONYMOUS, NULL,\n\tvalidatorIsTypeOf, validatorIsArray,\n\tClassDependency, ClassFailure\n*/\n\n//=require constants.js\n//=require validator/isTypeOf.js\n//=require validator/isArray.js\n//=require class/dependency.js\n//=require class/failure.js\n\n/*eslint no-global-assign: [2, { \"exceptions\": [\"provide\"] }]*/\nprovide = global.provide = function provide() {\n\tvar uri = validatorIsTypeOf(arguments[0], STRING_STRING) ? arguments[0] : NULL,\n\t\tcontext = this !== global ? this : NULL,\n\t\tdependencies = validatorIsArray(arguments[uri ? 1 : 0]) ? arguments[uri ? 1 : 0] : NULL,\n\t\tdefinition = dependencies ? arguments[uri ? 2 : 1] : arguments[uri ? 1 : 0],\n\t\tmodule, isFunction;\n\n\tif(!uri && processor.current) {\n\t\tmodule = processor.current;\n\t\turi = module.uri;\n\n\t\tprocessor.process();\n\t}\n\n\tif(uri) {\n\t\tmodule = module || new ClassDependency(uri, context);\n\t\tisFunction = validatorIsTypeOf(definition, STRING_FUNCTION);\n\n\t\tif(dependencies) {\n\t\t\tdemand\n\t\t\t\t.apply(module.path, dependencies)\n\t\t\t\t.then(\n\t\t\t\t\tfunction() { module.dfd.resolve(isFunction ? definition.apply(NULL, arguments) : definition); },\n\t\t\t\t\tfunction() { module.dfd.reject(new ClassFailure(ERROR_PROVIDE, module.id, arguments)); }\n\t\t\t\t);\n\t\t} else {\n\t\t\tmodule.dfd.resolve(isFunction ? definition() : definition);\n\t\t}\n\n\t\treturn module.dfd.pledge;\n\t} else {\n\t\t!validatorIsTypeOf(console, STRING_UNDEFINED) && console.error(new ClassFailure(ERROR_PROVIDE_ANONYMOUS)); // eslint-disable-line no-console\n\t}\n};\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tEVENT_QUEUE_ENQUEUE, EVENT_QUEUE_DEQUEUE,\n\tfunctionToArray,\n\tsingletonEvent,\n\tClassWeakmap,\n\tAbstractUuid\n*/\n\n//=require constants.js\n//=require function/toArray.js\n//=require singleton/event.js\n//=require class/weakmap.js\n//=require abstract/uuid.js\n\nvar ClassQueue = (function() {\n\tvar storage = new ClassWeakmap();\n\n\tfunction ClassQueue() {\n\t\tvar self = AbstractUuid.call(this);\n\n\t\tstorage.set(self, []);\n\n\t\treturn self;\n\t}\n\n\tClassQueue.prototype = {\n\t\tenqueue: function() {\n\t\t\tstorage.set(this, storage.get(this).concat(functionToArray(arguments)));\n\n\t\t\tsingletonEvent.emit(EVENT_QUEUE_ENQUEUE, this.uuid);\n\t\t},\n\t\tdequeue: function() {\n\t\t\tsingletonEvent.emit(EVENT_QUEUE_DEQUEUE, this.uuid);\n\n\t\t\treturn storage.get(this).shift();\n\t\t},\n\t\tget current() {\n\t\t\treturn storage.get(this)[0];\n\t\t},\n\t\tget length() {\n\t\t\treturn storage.get(this).length;\n\t\t}\n\t};\n\n\treturn ClassQueue.extends(AbstractUuid);\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tEVENT_QUEUE_ENQUEUE, NULL,\n\tsingletonEvent,\n\tClassWeakmap\n*/\n\n//=require constants.js\n//=require class/weakmap.js\n\nvar ClassProcessor = (function() {\n\tvar storage = new ClassWeakmap();\n\n\tfunction ClassProcessor(queue) {\n\t\tvar self = this,\n\t\t\tproperties = { queue: queue, current: NULL };\n\n\t\tstorage.set(self, properties);\n\n\t\tdemand\n\t\t\t.on(EVENT_QUEUE_ENQUEUE + ':' + queue.uuid, function() {\n\t\t\t\t!properties.current && self.process();\n\t\t\t});\n\t}\n\n\tClassProcessor.prototype = {\n\t\tprocess: function() {\n\t\t\tvar properties = storage.get(this),\n\t\t\t\tcurrent;\n\n\t\t\tif(properties.queue.length) {\n\t\t\t\tcurrent = properties.current = properties.queue.dequeue();\n\n\t\t\t\tif(!current.pledge.isRejected()) {\n\t\t\t\t\tcurrent.handler.process && current.handler.process(current);\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tproperties.current = NULL;\n\t\t},\n\t\tget current() {\n\t\t\treturn storage.get(this).current;\n\t\t}\n\t};\n\n\treturn ClassProcessor;\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tregexMatchSourcemap, regexIsAbsoluteUri\n\tlinkElement\n*/\n\n//=require variables.js\n//=require shortcuts.js\n\nfunction functionResolveSourcemaps(url, source) {\n\tvar match, replacement;\n\n\twhile(match = regexMatchSourcemap.exec(source)) {\n\t\tlinkElement.href = url;\n\n\t\tif(regexIsAbsoluteUri.test(match[2])) {\n\t\t\treplacement = linkElement.protocol + '//' + linkElement.host + match[3];\n\t\t} else {\n\t\t\tlinkElement.pathname += '/../' + match[3];\n\n\t\t\treplacement = linkElement.protocol + '//' + linkElement.host + linkElement.pathname;\n\t\t}\n\n\t\tsource = source.replace(match[0], match[1] + ' ' + match[2] + '=' + replacement + '.map' + (match[4] ? ' ' + match[4] : ''));\n\t}\n\n\treturn source;\n}\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tNULL\n*/\n\n//=require constants.js\n\nfunction abstractHandler() {\n\n}\n\nabstractHandler.prototype = {\n\tvalidate: NULL,\n\tonPreRequest: NULL,\n\tonPostRequest: NULL,\n\tonPreProcess: NULL,\n\tprocess: NULL\n};\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tDEMAND_ID, EVENT_PRE_REQUEST, EVENT_POST_REQUEST, TRUE,\n\tfunctionResolveSourcemaps,\n\tabstractHandler\n*/\n\n//=require constants.js\n//=require function/resolveSourcemaps.js\n//=require abstract/handler.js\n\nvar handlerModule = (function() {\n\tvar suffix = '.js',\n\t\ttarget = document.getElementsByTagName('head')[0],\n\t\tregexMatchType = /^(application|text)\\/(x-)?javascript/;\n\n\tfunction HandlerModule() {}\n\n\tHandlerModule.prototype = {\n\t\tvalidate: function(type) {\n\t\t\treturn regexMatchType.test(type);\n\t\t},\n\t\tonPreRequest: function(dependency) {\n\t\t\tvar pathname = dependency.url.pathname;\n\n\t\t\tdependency.url.pathname = pathname.slice(-suffix.length) !== suffix ? pathname + suffix : pathname;\n\t\t},\n\t\tonPostRequest: function(dependency) {\n\t\t\tdependency.source = functionResolveSourcemaps(dependency.url, dependency.source);\n\t\t},\n\t\tprocess: function(dependency) {\n\t\t\tvar script;\n\n\t\t\tif(dependency.source) {\n\t\t\t\tscript = document.createElement('script');\n\t\t\t\tscript.async = TRUE;\n\t\t\t\tscript.text = dependency.source;\n\n\t\t\t\tscript.setAttribute(DEMAND_ID + '-id', dependency.id);\n\n\t\t\t\ttarget.appendChild(script);\n\t\t\t}\n\t\t}\n\t};\n\n\treturn new (HandlerModule.extends(abstractHandler));\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tDEMAND_ID,\n\tfunctionToArray\n*/\n\n//=require constants.js\n//=require function/toArray.js\n\nfunction ClassFailure(message, module, stack) {\n\tvar self = this;\n\n\tself.message = message;\n\n\tmodule && (self.module = module);\n\tstack && (self.stack = functionToArray(stack));\n\n\treturn self;\n}\n\nClassFailure.prototype = {\n\t/* only for reference\n\t message: NULL,\n\t module: NULL,\n\t stack: NULL,\n\t */\n\ttoString: function() {\n\t\tvar self = this,\n\t\t\tresult = DEMAND_ID + ': ' + self.message + ' ' + (self.module ? '\"' + self.module + '\"' : '');\n\n\t\tif(self.stack) {\n\t\t\tresult = ClassFailure.traverse(self.stack, result, 1);\n\t\t}\n\n\t\treturn result;\n\t}\n};\n\nClassFailure.traverse = function(stack, value, depth) {\n\tvar indention = new Array(depth + 1).join(' '),\n\t\ti = 0, item;\n\n\tfor(; item = stack[i]; i++) {\n\t\tvalue += '\\n' + indention + '> ' + item.message + ' ' + (item.module ? '\"' + item.module + '\"' : '');\n\n\t\tif(item.stack) {\n\t\t\tvalue = ClassFailure.traverse(item.stack, value, depth + 1);\n\t\t}\n\t}\n\n\treturn value;\n};\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tMODULE_PREFIX_HANDLER, EVENT_POST_CONFIGURE, ERROR_RESOLVE, MOCK_PREFIX, STRING_STRING, FALSE, TRUE,\n\tregexMatchParameter, regexMatchSourcemap,\n\tvalidatorIsTypeOf, validatorIsObject,\n\tfunctionIterate, functionResolveId,\n\tabstractHandler,\n\tClassDependency, ClassPledge, ClassFailure,\n\thandlerModule\n*/\n\n//=require constants.js\n//=require variables.js\n//=require validator/isTypeOf.js\n//=require validator/isObject.js\n//=require function/iterate.js\n//=require function/resolveId.js\n//=require abstract/handler.js\n//=require class/dependency.js\n//=require class/pledge.js\n//=require class/Failure.js\n//=require handler/module.js\n\nvar handlerBundle = (function() {\n\tvar path = MODULE_PREFIX_HANDLER + 'bundle',\n\t\tsettings = {};\n\n\tdemand\n\t\t.on(EVENT_POST_CONFIGURE + ':' + path, function(options) {\n\t\t\tif(validatorIsObject(options)) {\n\t\t\t\tsettings = options;\n\n\t\t\t\tfunctionIterate(settings, updateDependencies);\n\t\t\t}\n\t\t});\n\n\tfunction updateDependencies(uri, dependencies) {\n\t\tvar i, dependency;\n\n\t\tfor(i = 0; (dependency = dependencies[i]); i++) {\n\t\t\tif(validatorIsTypeOf(dependency, STRING_STRING)) {\n\t\t\t\tdependencies[i] = functionResolveId(dependency);\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getType(dependencies) {\n\t\tvar type, i = 0, temp;\n\n\t\tfor(; (temp = dependencies[i]); i++) {\n\t\t\ttemp = temp.match(regexMatchParameter);\n\t\t\ttemp = (temp && temp[3]) || settings.handler;\n\n\t\t\tif(type) {\n\t\t\t\tif(temp !== type) {\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttype = temp;\n\t\t\t}\n\t\t}\n\n\t\treturn type;\n\t}\n\n\tfunction HandlerBundle() {}\n\n\tHandlerBundle.prototype = {\n\t\tvalidate: handlerModule.validate,\n\t\tonPreProcess: function(dependency) {\n\t\t\tvar source = dependency.source,\n\t\t\t\tdfd = dependency.dfd,\n\t\t\t\tdependencies = settings[dependency.path],\n\t\t\t\ttype, match, pledges, temp, i;\n\n\t\t\tdependency.enqueue = FALSE;\n\n\t\t\tfunction reject() {\n\t\t\t\tdfd.reject(new ClassFailure(ERROR_RESOLVE, dependency.id, arguments));\n\t\t\t}\n\n\t\t\tif(dependencies && (type = getType(dependencies))) {\n\t\t\t\twhile(match = regexMatchSourcemap.exec(source)) {\n\t\t\t\t\tsource = source.replace(match[0], '');\n\t\t\t\t}\n\n\t\t\t\tdependency.source = source;\n\t\t\t\tpledges = [];\n\n\t\t\t\tfor(i = 0; (temp = dependencies[i]); i++) {\n\t\t\t\t\tpledges.push(ClassDependency.resolve(MOCK_PREFIX + temp).pledge);\n\t\t\t\t}\n\n\t\t\t\tClassPledge.all(pledges).then(\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tpledges.length = 0;\n\n\t\t\t\t\t\tfor(i = 0; (temp = dependencies[i]); i++) {\n\t\t\t\t\t\t\ttemp = dependencies[i] = ClassDependency.get(temp) || new ClassDependency(temp);\n\t\t\t\t\t\t\ttemp.handler = arguments[i];\n\n\t\t\t\t\t\t\tpledges.push(temp.pledge);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(type === 'module') {\n\t\t\t\t\t\t\tqueue.enqueue.apply(queue, dependencies);\n\t\t\t\t\t\t\thandlerModule.process(dependency);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\thandlerModule.process(dependency);\n\t\t\t\t\t\t\tqueue.enqueue.apply(queue, dependencies);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tClassPledge.all(pledges).then(dfd.resolve, reject);\n\t\t\t\t\t},\n\t\t\t\t\treject\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\treject();\n\t\t\t}\n\t\t}\n\t};\n\n\treturn new (HandlerBundle.extends(abstractHandler));\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tFALSE, EVENT_POST_REQUEST, ERROR_RESOLVE,\n\tfunctionResolveSourcemaps,\n\tabstractHandler,\n\tClassDependency, ClassPledge, ClassFailure\n*/\n\n//=require constants.js\n//=require function/resolveSourcemaps.js\n//=require abstract/handler.js\n//=require class/dependency.js\n//=require class/pledge.js\n//=require class/Failure.js\n\nvar handlerComponent = (function() {\n\tvar suffix = '.html',\n\t\tregexMatchType = /^text\\/.+$/;\n\n\tfunction HandlerComponent() {}\n\n\tHandlerComponent.prototype = {\n\t\tvalidate: function(type) {\n\t\t\treturn regexMatchType.test(type);\n\t\t},\n\t\tonPreRequest: function(dependency) {\n\t\t\tvar pathname = dependency.url.pathname;\n\t\t\t\n\t\t\tdependency.url.pathname = pathname.slice(-suffix.length) !== suffix ? pathname + suffix : pathname;\n\t\t},\n\t\tonPostRequest: function(dependency) {\n\t\t\tdependency.source = functionResolveSourcemaps(dependency.url, dependency.source);\n\t\t},\n\t\tonPreProcess: function(dependency) {\n\t\t\tvar context = dependency.path,\n\t\t\t\tdfd = dependency.dfd,\n\t\t\t\tcontainer = document.createElement('body'),\n\t\t\t\tmodules = [],\n\t\t\t\tpledges = [],\n\t\t\t\tnode, handler, path, uri;\n\n\t\t\tdependency.enqueue = FALSE;\n\t\t\tcontainer.innerHTML = dependency.source;\n\n\t\t\tfunction reject() {\n\t\t\t\tdfd.reject(new ClassFailure(ERROR_RESOLVE, dependency.id, arguments));\n\t\t\t}\n\n\t\t\twhile(node = container.firstElementChild) {\n\t\t\t\tif(handler = node.getAttribute('type')) {\n\t\t\t\t\tpath = node.getAttribute('path');\n\t\t\t\t\turi = handler + '!' + context + (path ? '/' + path : '');\n\n\t\t\t\t\tnode.parentNode.removeChild(node);\n\t\t\t\t\tmodules.push({ source: node.textContent, uri: uri });\n\t\t\t\t\tpledges.push(ClassDependency.resolve('mock:' + uri).pledge);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tClassPledge.all(pledges).then(\n\t\t\t\tfunction() {\n\t\t\t\t\tvar i = 0, module, dependency;\n\n\t\t\t\t\tpledges.length = 0;\n\n\t\t\t\t\tfor(; (module = modules[i]); i++) {\n\t\t\t\t\t\tdependency = ClassDependency.get(module.uri) || new ClassDependency(module.uri);\n\t\t\t\t\t\tdependency.source = functionResolveSourcemaps(dependency.url, module.source);\n\t\t\t\t\t\tdependency.handler = arguments[i];\n\n\t\t\t\t\t\tpledges.push(dependency.pledge);\n\n\t\t\t\t\t\tqueue.enqueue(dependency);\n\t\t\t\t\t}\n\n\t\t\t\t\tClassPledge.all(pledges).then(dfd.resolve, reject);\n\t\t\t\t},\n\t\t\t\treject\n\t\t\t);\n\t\t}\n\t};\n\n\treturn new (HandlerComponent.extends(abstractHandler));\n}());\n","/* global\n\tglobal, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout,\n\tMODULE_PREFIX_PLUGIN, MODULE_PREFIX_HANDLER, EVENT_POST_CONFIGURE, EVENT_PRE_RESOLVE, STRING_STRING, ERROR_RESOLVE, FALSE, TRUE,\n\tregexMatchInternal,\n\tvalidatorIsObject, validatorIsTypeOf,\n\tfunctionIterate, functionHash,\n\tClassDependency, ClassFailure,\n\tsingletonCache\n*/\n\n//=require constants.js\n//=require variables.js\n//=require validator/isTypeOf.js\n//=require validator/isObject.js\n//=require function/iterate.js\n//=require function/hash.js\n//=require class/dependency.js\n//=require class/failure.js\n//=require singleton/cache.js\n\nvar pluginGenie = (function() {\n\tvar path = MODULE_PREFIX_PLUGIN + 'genie',\n\t\tpattern = [];\n\n\tfunction matchPattern(path) {\n\t\tvar i = 0, pointer, match;\n\n\t\tfor(; (pointer = pattern[i]); i++) {\n\t\t\tif(path.indexOf(pointer.prefix) === 0 && (!match || pointer.weight > match.weight)) {\n\t\t\t\tmatch = pointer;\n\t\t\t}\n\t\t}\n\n\t\treturn match;\n\t}\n\n\tfunction generateConfiguration(bundle) {\n\t\tvar matches = bundle.matches,\n\t\t\tconfiguration = { pattern: {}, modules: { '/demand/handler/bundle': {} } },\n\t\t\ti = 0, pointer, dependency;\n\n\t\tconfiguration.pattern[bundle.id] = bundle.fn(matches);\n\t\tconfiguration.modules[MODULE_PREFIX_HANDLER + 'bundle'][bundle.id] = pointer = [];\n\n\t\tfor(; (dependency = matches[i]); i++) {\n\t\t\tpointer.push(dependency.path);\n\t\t}\n\n\t\treturn configuration;\n\t}\n\n\tfunction resolveDependencies() {\n\t\tvar i = 0, dependency;\n\n\t\tfor(; (dependency = this[i]); i++) {\n\t\t\tdependency.dfd.resolve(arguments[i]);\n\t\t}\n\t}\n\n\tfunction rejectDependencies() {\n\t\tvar i = 0, dependency;\n\n\t\tfor(; (dependency = this[i]); i++) {\n\t\t\tdependency.dfd.reject(new ClassFailure(ERROR_RESOLVE, dependency.id));\n\t\t}\n\t}\n\n\tfunction addPattern(property, value) {\n\t\tpattern.push({ prefix: property, weight: property.length, fn: value });\n\t}\n\n\tfunction resolveBundles(property, value) {\n\t\tvar matches = value.matches,\n\t\t\ti = 0, dependency;\n\n\t\tif(matches.length > 1) {\n\t\t\tvalue.id = path + '/' + functionHash(JSON.stringify(value.matches));\n\n\t\t\tfor(; (dependency = matches[i]); i++) {\n\t\t\t\tmatches[i] = new ClassDependency(dependency.uri);\n\t\t\t}\n\n\t\t\tdemand.configure(generateConfiguration(value));\n\t\t\tdemand('bundle!' + value.id)\n\t\t\t\t.then(\n\t\t\t\t\tresolveDependencies.bind(matches),\n\t\t\t\t\trejectDependencies.bind(matches)\n\t\t\t\t);\n\t\t}\n\t}\n\n\tdemand\n\t\t.on(EVENT_POST_CONFIGURE + ':' + path, function(options) {\n\t\t\tif(validatorIsObject(options)) {\n\t\t\t\tpattern.length = 0;\n\n\t\t\t\tfunctionIterate(options, addPattern);\n\t\t\t}\n\t\t})\n\t\t.on(EVENT_PRE_RESOLVE, function(dependencies, context) {\n\t\t\tvar bundles = {},\n\t\t\t\ti = 0, dependency, pattern;\n\n\t\t\tfor(; (dependency = dependencies[i]); i++) {\n\t\t\t\tif(validatorIsTypeOf(dependency, STRING_STRING) && !regexMatchInternal.test(dependency) && !ClassDependency.get(dependency, context)) {\n\t\t\t\t\tdependency = new ClassDependency(dependency, context, FALSE);\n\n\t\t\t\t\tif(dependency.type === 'module' && (pattern = matchPattern(dependency.path)) && !singletonCache.get(dependency)) {\n\t\t\t\t\t\t(bundles[pattern.prefix] || (bundles[pattern.prefix] = { fn: pattern.fn, matches: [] })).matches.push(dependency);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunctionIterate(bundles, resolveBundles);\n\t\t});\n\n\treturn TRUE;\n}());\n"]} \ No newline at end of file diff --git a/dist/handler/css.js b/dist/handler/css.js index 1449620..7f25aff 100644 --- a/dist/handler/css.js +++ b/dist/handler/css.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.7 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ !function(e){"use strict";provide(["/demand/abstract/handler","/demand/function/resolveSourcemaps"],function(t,r){var n=e.getElementsByTagName("head")[0],s=e.createElement("a"),c=/url\s*\(\s*["']?(.+?)["']?\s*\)/gi,o=/@import\s+["'](.+?)["']/gi,u=/^\//i,a=/^data:|http(s?):|\/\//i,i=/^text\/css/;function d(e){return s.href=e,s}function l(e,t,r){return a.test(t[1])||(e=e.replace(t[0],r)),e}function f(){}return f.prototype={validate:function(e){return i.test(e)},onPreRequest:function(e){var t=e.url.pathname;e.url.pathname=".css"!==t.slice(-".css".length)?t+".css":t},onPostRequest:function(e){for(var t,n=d(e.url+"/.."),s=n.href,a="//"+n.host,i=e.source;t=c.exec(i);)i=l(i,t,'url("'+d(u.test(t[1])?a+t[1]:s+t[1]).href+'")');for(;t=o.exec(i);)i=l(i,t,'@import "'+d(u.test(t[1])?a+t[1]:s+t[1]).href+'"');e.source=r(e.url,i)},process:function(t){var r=e.querySelector('[demand-id="'+t.id+'"]');r||((r=e.createElement("style")).type="text/css",r.setAttribute("demand-id",t.id),n.appendChild(r)),"STYLE"===r.tagName&&(r.styleSheet?r.styleSheet.cssText=t.source:r.textContent=t.source),provide(function(){return r})}},new(f.extends(t))})}(document); //# sourceMappingURL=css.js.map diff --git a/dist/handler/html.js b/dist/handler/html.js index 348de41..95ac472 100644 --- a/dist/handler/html.js +++ b/dist/handler/html.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.7 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ !function(){"use strict";provide(["/demand/abstract/handler"],function(t){var e=/^text\/html/,n=document.createElement("body");function r(){}return r.prototype={validate:function(t){return e.test(t)},onPreRequest:function(t){var e=t.url.pathname;t.url.pathname=".html"!==e.slice(-".html".length)?e+".html":e},process:function(t){provide(function(){return function(t){var e,r=document.createDocumentFragment();for(n.innerHTML=t;e=n.firstElementChild;)r.appendChild(e);return r}(t.source)})}},new(r.extends(t))})}(); //# sourceMappingURL=html.js.map diff --git a/dist/handler/json.js b/dist/handler/json.js index 9c35500..8866bcc 100644 --- a/dist/handler/json.js +++ b/dist/handler/json.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.7 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ !function(){"use strict";provide(["/demand/abstract/handler"],function(n){var t=/^application\/json/;function e(){}return e.prototype={validate:function(n){return t.test(n)},onPreRequest:function(n){var t=n.url.pathname;n.url.pathname=".json"!==t.slice(-".json".length)?t+".json":t},process:function(n){var t=JSON.parse(n.source);provide(function(){return t})}},new(e.extends(n))})}(); //# sourceMappingURL=json.js.map diff --git a/dist/handler/legacy.js b/dist/handler/legacy.js index 924b1a8..7ac6e3d 100644 --- a/dist/handler/legacy.js +++ b/dist/handler/legacy.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.7 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ !function(){"use strict";provide(["path","/demand/failure","/demand/handler/module","/demand/validator/isObject"],function(e,n,t,r){var o={};function u(){}return demand.on("postConfigure:"+e,function(e){o=r(e)?e:{}}),u.prototype={onPreRequest:function(e){var n=o[e.path]&&o[e.path].dependencies;t.onPreRequest(e),n&&(e.enqueue=demand.apply(null,n))},onPreProcess:function(e){var n=o[e.path]&&o[e.path].dependencies;n&&"boolean"==typeof e.enqueue&&(e.enqueue=demand.apply(null,n))},process:function(e){var r=function(){var e,r=this.dfd,u=o[this.path]&&o[this.path].probe;t.process(this),u&&(e=u())?provide(function(){return e}):r.reject(new n("error probing",this.path))}.bind(e);!0===e.enqueue?r():e.enqueue.then(r,function(){e.dfd.reject(new n("error resolving",e.path,arguments))})}},new(u.extends(t))})}(); //# sourceMappingURL=legacy.js.map diff --git a/dist/handler/text.js b/dist/handler/text.js index 2402db7..23185b7 100644 --- a/dist/handler/text.js +++ b/dist/handler/text.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.7 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ !function(){"use strict";provide(["/demand/abstract/handler"],function(t){var n=/^text\/.+/;function e(){}return e.prototype={validate:function(t){return n.test(t)},process:function(t){provide(function(){return t.source})}},new(e.extends(t))})}(); //# sourceMappingURL=text.js.map diff --git a/dist/plugin/cookie.js b/dist/plugin/cookie.js index a35ceec..69e69bd 100644 --- a/dist/plugin/cookie.js +++ b/dist/plugin/cookie.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.7 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ !function(n){"use strict";provide(["path","/demand/function/iterate","/demand/validator/isObject","/demand/validator/isTypeOf"],function(t,e,o,i){var a,c="Thu, 01 Jan 1970 00:00:00 GMT",r=[];function u(t,e,o){(a||function(n){for(var t,e,o=0;t=r[o];o++)0===n.indexOf(t.pattern)&&(!e||t.weight>e.weight)&&(e=t);return!!e&&e.state}(t.path))&&(n.cookie="demand["+t.type+"]["+t.path+"]="+encodeURIComponent(e)+"; expires="+o+"; path=/")}return demand.on("postConfigure:"+t,function(n){o(n)?(r.length=0,e(n,function(n,t){r.push({pattern:n,weight:n.length,state:t})})):i(n,"boolean")&&(a=n)}).on("cacheMiss",function(n){u(n,"",c)}).on("cacheClear",function(n){u(n,"",c)}).on("postCache",function(n,t){u(n,JSON.stringify(t),"Fri, 31 Dec 9999 23:59:59 GMT")}),!0})}(document); //# sourceMappingURL=cookie.js.map diff --git a/dist/plugin/lzstring.js b/dist/plugin/lzstring.js index e9a56fb..818601c 100644 --- a/dist/plugin/lzstring.js +++ b/dist/plugin/lzstring.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.7 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ var LZString=function(){var n=String.fromCharCode,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",e={};function t(n,o){if(!e[n]){e[n]={};for(var r=0;r>>8,r[2*e+1]=s%256}return r},decompressFromUint8Array:function(o){if(null===o||void 0===o)return i.decompress(o);for(var r=new Array(o.length/2),e=0,t=r.length;e>=1}else{for(t=1,e=0;e>=1}0==--f&&(f=Math.pow(2,h),h++),delete a[p]}else for(t=s[p],e=0;e>=1;0==--f&&(f=Math.pow(2,h),h++),s[c]=l++,p=String(u)}if(""!==p){if(Object.prototype.hasOwnProperty.call(a,p)){if(p.charCodeAt(0)<256){for(e=0;e>=1}else{for(t=1,e=0;e>=1}0==--f&&(f=Math.pow(2,h),h++),delete a[p]}else for(t=s[p],e=0;e>=1;0==--f&&(f=Math.pow(2,h),h++)}for(t=2,e=0;e>=1;for(;;){if(m<<=1,g==o-1){d.push(r(m));break}g++}return d.join("")},decompress:function(n){return null==n?"":""==n?null:i._decompress(n.length,32768,function(o){return n.charCodeAt(o)})},_decompress:function(o,r,e){var t,i,s,a,u,c,p,f=[],l=4,h=4,d=3,m="",g=[],v={val:e(0),position:r,index:1};for(t=0;t<3;t+=1)f[t]=t;for(s=0,u=Math.pow(2,2),c=1;c!=u;)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=r,v.val=e(v.index++)),s|=(a>0?1:0)*c,c<<=1;switch(s){case 0:for(s=0,u=Math.pow(2,8),c=1;c!=u;)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=r,v.val=e(v.index++)),s|=(a>0?1:0)*c,c<<=1;p=n(s);break;case 1:for(s=0,u=Math.pow(2,16),c=1;c!=u;)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=r,v.val=e(v.index++)),s|=(a>0?1:0)*c,c<<=1;p=n(s);break;case 2:return""}for(f[3]=p,i=p,g.push(p);;){if(v.index>o)return"";for(s=0,u=Math.pow(2,d),c=1;c!=u;)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=r,v.val=e(v.index++)),s|=(a>0?1:0)*c,c<<=1;switch(p=s){case 0:for(s=0,u=Math.pow(2,8),c=1;c!=u;)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=r,v.val=e(v.index++)),s|=(a>0?1:0)*c,c<<=1;f[h++]=n(s),p=h-1,l--;break;case 1:for(s=0,u=Math.pow(2,16),c=1;c!=u;)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=r,v.val=e(v.index++)),s|=(a>0?1:0)*c,c<<=1;f[h++]=n(s),p=h-1,l--;break;case 2:return g.join("")}if(0==l&&(l=Math.pow(2,d),d++),f[p])m=f[p];else{if(p!==h)return null;m=i+i.charAt(0)}g.push(m),f[h++]=i+m.charAt(0),i=m,0==--l&&(l=Math.pow(2,d),d++)}}};return i}();"function"==typeof define&&define.amd?define(function(){return LZString}):"undefined"!=typeof module&&null!=module?module.exports=LZString:"undefined"!=typeof angular&&null!=angular&&angular.module("LZString",[]).factory("LZString",function(){return LZString}),function(n){"use strict";provide(["path","/demand/function/iterate","/demand/validator/isObject","/demand/validator/isTypeOf"],function(o,r,e,t){var i=[{pattern:o,weight:o.length,state:!1}],s={};function a(n){for(var o,r,e=0;o=i[e];e++)0===n.indexOf(o.pattern)&&(!r||o.weight>r.weight)&&(r=o);return!!r&&r.state}return demand.on("postConfigure:"+o,function(n){e(n)?(i.length=0,r(n,function(n,o){i.push({pattern:n,weight:n.length,state:o})})):t(n,"boolean")&&i.push({pattern:"",weight:0,state:n})}).on("cacheHit",function(n){a(n.path)&&(s[n.id]=!0)}).on("preCache",function(o){a(o.path)&&(o.source=n.LZString.compressToUTF16(o.source))}).on("preProcess",function(o){s[o.id]&&(o.source=n.LZString.decompressFromUTF16(o.source))}),!0})}(this); //# sourceMappingURL=lzstring.js.map diff --git a/dist/plugin/sri.js b/dist/plugin/sri.js index c426e2a..c19a1a6 100644 --- a/dist/plugin/sri.js +++ b/dist/plugin/sri.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.7 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ var SUPPORTED_ALGS=15;!function(r){"use strict";var e,n,t,o,i=4294967296;function h(r,e){this.highOrder=r,this.lowOrder=e}function w(r,e,n,t){var o,i,h,w="0123456789abcdef",d="",u=e/8;for(h=-1===n?3:0,o=0;o>>2]>>>8*(h+n*(o%4)),d+=w.charAt(i>>>4&15)+w.charAt(15&i);return t.outputUpper?d.toUpperCase():d}function d(r,e,n,t){var o,i,h,w,d,u,f="",a=e/8;for(u=-1===n?3:0,o=0;o>>2]:0,d=o+2>>2]:0,h=(r[o>>>2]>>>8*(u+n*(o%4))&255)<<16|(w>>>8*(u+n*((o+1)%4))&255)<<8|d>>>8*(u+n*((o+2)%4))&255,i=0;i<4;i+=1)f+=8*o+6*i<=e?"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h>>>6*(3-i)&63):t.b64Pad;return f}function u(r,e,n){var t,o,i,h="",w=e/8;for(i=-1===n?3:0,t=0;t>>2]>>>8*(i+n*(t%4))&255,h+=String.fromCharCode(o);return h}function f(r,e,n){var t,o,i,h=e/8,w=new ArrayBuffer(h);for(i=new Uint8Array(w),o=-1===n?3:0,t=0;t>>2]>>>8*(o+n*(t%4))&255;return w}function a(r){var e,n={outputUpper:!1,b64Pad:"=",shakeLen:-1};if(e=r||{},n.outputUpper=e.outputUpper||!1,!0===e.hasOwnProperty("b64Pad")&&(n.b64Pad=e.b64Pad),!0===e.hasOwnProperty("shakeLen")&&0!=(8&SUPPORTED_ALGS)){if(e.shakeLen%8!=0)throw new Error("shakeLen must be a multiple of 8");n.shakeLen=e.shakeLen}if("boolean"!=typeof n.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof n.b64Pad)throw new Error("Invalid b64Pad formatting option");return n}function O(r,e,n){var t;switch(e){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(r){case"HEX":t=function(r,e,t){return function(r,e,n,t){var o,i,h,w,d,u,f,a=r.length;if(0!=a%2)throw new Error("String of HEX type must be in byte increments");for(o=e||[0],u=(n=n||0)>>>3,f=-1===t?3:0,i=0;i>>1)+u)>>>2;o.length<=w;)o.push(0);o[w]|=h<<8*(f+t*(d%4))}return{value:o,binLen:4*a+n}}(r,e,t,n)};break;case"TEXT":t=function(r,t,o){return function(r,e,n,t,o){var i,h,w,d,u,f,a,O,l,s,c=0;if(i=n||[0],f=(t=t||0)>>>3,"UTF8"===e)for(l=-1===o?3:0,d=0;d(h=r.charCodeAt(d))?w.push(h):2048>h?(w.push(192|h>>>6),w.push(128|63&h)):55296>h||57344<=h?w.push(224|h>>>12,128|h>>>6&63,128|63&h):(d+=1,h=65536+((1023&h)<<10|1023&r.charCodeAt(d)),w.push(240|h>>>18,128|h>>>12&63,128|h>>>6&63,128|63&h)),u=0;u>>2;i.length<=a;)i.push(0);i[a]|=w[u]<<8*(l+o*(O%4)),c+=1}else if("UTF16BE"===e||"UTF16LE"===e)for(l=-1===o?2:0,s="UTF16LE"===e&&1!==o||"UTF16LE"!==e&&1===o,d=0;d>>8),a=(O=c+f)>>>2;i.length<=a;)i.push(0);i[a]|=h<<8*(l+o*(O%4)),c+=2}return{value:i,binLen:8*c+t}}(r,e,t,o,n)};break;case"B64":t=function(r,e,t){return function(r,e,n,t){var o,i,h,w,d,u,f,a,O,l,s=0;if(-1===r.search(/^[a-zA-Z0-9=+\/]+$/))throw new Error("Invalid character in base-64 string");if(u=r.indexOf("="),r=r.replace(/\=/g,""),-1!==u&&u