From 35bc85bba891be3e0b0e265e0170ff89afae9e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20L=C3=BCth?= Date: Fri, 9 Feb 2018 01:45:35 +0100 Subject: [PATCH] build --- dist/cache/dispose.js | 2 +- dist/cache/dispose.js.map | 2 +- dist/demand.js | 4 ++-- dist/demand.js.map | 2 +- dist/handler/css.js | 2 +- dist/handler/css.js.map | 2 +- dist/handler/html.js | 2 +- dist/handler/html.js.map | 2 +- dist/handler/json.js | 2 +- dist/handler/json.js.map | 2 +- dist/handler/legacy.js | 2 +- dist/handler/legacy.js.map | 2 +- dist/handler/text.js | 2 +- dist/handler/text.js.map | 2 +- dist/plugin/cookie.js | 2 +- dist/plugin/cookie.js.map | 2 +- dist/plugin/lzstring.js | 2 +- dist/plugin/lzstring.js.map | 2 +- dist/plugin/sri.js | 2 +- dist/plugin/sri.js.map | 2 +- 20 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dist/cache/dispose.js b/dist/cache/dispose.js index 95e8954..1dc22ac 100644 --- a/dist/cache/dispose.js +++ b/dist/cache/dispose.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +/**! Qoopido.demand 5.0.0 | 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/cache/dispose.js.map b/dist/cache/dispose.js.map index ae35a39..2d8ed2b 100644 --- a/dist/cache/dispose.js.map +++ b/dist/cache/dispose.js.map @@ -1 +1 @@ -{"version":3,"sources":["cache/dispose.js"],"names":["localStorage","provide","functionIterate","PREFIX","SUFFIX","regexMatchState","RegExp","regexMatchProperties","getState","key","matches","state","getItem","match","Array","prototype","slice","call","getKey","id","filterStates","property","this","push","compareAccess","a","b","demand","clear","path","size","states","sort","length","shift"],"mappings":";CAAC,SAASA,GACT,aA2EAC,SAAU,4BAzEV,SAAoBC,GACnB,IAAIC,EAAuB,SAC1BC,EAAuB,QACvBC,EAAuB,IAAIC,OAAO,OAASH,EAAS,oBAAsBC,EAAS,QACnFG,EAAuB,kCAExB,SAASC,EAASC,GACjB,IACCC,EADGC,EAAQX,EAAaY,QAAQH,GAGjC,GAAGE,IAAUD,EAAUC,EAAME,MAAMN,IAClC,OAAOO,MAAMC,UAAUC,MAAMC,KAAKP,EAAS,GAI7C,SAASQ,EAAOC,GACf,MAAO,IAAMhB,EAAS,KAAOgB,EAAK,KAAOf,EAAS,IAgBnD,SAASgB,EAAaC,GACrB,IACCV,EADGE,EAAQQ,EAASR,MAAMR,GAGxBQ,KACFF,EAAWH,EAASU,EAAOL,EAAM,MAC3B,GAAKA,EAAM,GAEjBS,KAAKC,KAAKZ,IAIZ,SAASa,EAAcC,EAAGC,GACzB,OAAGD,EAAE,GAAKC,EAAE,IACH,EAGND,EAAE,GAAKC,EAAE,GACJ,EAGD,EAGR,OArCAxB,EAAgBF,EAAc,SAASqB,GACtC,IAAIR,EAAQQ,EAASR,MAAMR,GAGxBQ,IACML,EAASU,EAAOL,EAAM,KAEpB,IACTc,OAAOC,MAAMC,KAAKhB,EAAM,OA6BpB,SAAsBiB,GAC5B,IACCnB,EADGoB,KAOJ,IAJA7B,EAAgBF,EAAcoB,EAAcW,GAE5CA,EAAOC,KAAKR,GAENM,EAAO,GAAKC,EAAOE,QAExBH,IADAnB,EAASoB,EAAOG,SACD,GAEfP,OAAOC,MAAMC,KAAKlB,EAAM,OAvE5B,CA6EEX","file":"dispose.js","sourcesContent":["(function(localStorage) {\n\t'use strict';\n\n\tfunction definition(functionIterate) {\n\t\tvar PREFIX = 'demand',\n\t\t\tSUFFIX = 'state',\n\t\t\tregexMatchState = new RegExp('^\\\\[' + PREFIX + '\\\\]\\\\[(.+?)\\\\]\\\\[' + SUFFIX + '\\\\]$'),\n\t\t\tregexMatchProperties = /^(.+?),(\\d+),(\\d*),(.+?),(\\d+)$/;\n\n\t\tfunction getState(key) {\n\t\t\tvar state = localStorage.getItem(key),\n\t\t\t\tmatches;\n\n\t\t\tif(state && (matches = state.match(regexMatchProperties))) {\n\t\t\t\treturn Array.prototype.slice.call(matches, 1);\n\t\t\t}\n\t\t}\n\n\t\tfunction getKey(id) {\n\t\t\treturn '[' + PREFIX + '][' + id + '][' + SUFFIX + ']';\n\t\t}\n\n\t\tfunctionIterate(localStorage, function(property) {\n\t\t\tvar match = property.match(regexMatchState),\n\t\t\t\tstate;\n\n\t\t\tif(match) {\n\t\t\t\tstate = getState(getKey(match[1]));\n\n\t\t\t\tif(!state[4]) {\n\t\t\t\t\tdemand.clear.path(match[1]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfunction filterStates(property) {\n\t\t\tvar match = property.match(regexMatchState),\n\t\t\t\tstate;\n\n\t\t\tif(match) {\n\t\t\t\tstate = getState(getKey(match[1]));\n\t\t\t\tstate[5] = match[1];\n\n\t\t\t\tthis.push(state);\n\t\t\t}\n\t\t}\n\n\t\tfunction compareAccess(a, b) {\n\t\t\tif(a[4] < b[4]) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\tif(a[4] > b[4]) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn function cacheDispose(size) {\n\t\t\tvar states = [],\n\t\t\t\tstate;\n\n\t\t\tfunctionIterate(localStorage, filterStates, states);\n\n\t\t\tstates.sort(compareAccess);\n\n\t\t\twhile(size > 0 && states.length) {\n\t\t\t\tstate = states.shift();\n\t\t\t\tsize -= state[1];\n\n\t\t\t\tdemand.clear.path(state[5]);\n\t\t\t}\n\t\t};\n\t}\n\n\tprovide([ '/demand/function/iterate' ], definition);\n}(localStorage));"]} \ No newline at end of file +{"version":3,"sources":["cache/dispose.js"],"names":["localStorage","provide","functionIterate","PREFIX","SUFFIX","regexMatchState","RegExp","regexMatchProperties","getState","key","matches","state","getItem","match","Array","prototype","slice","call","getKey","id","filterStates","property","this","push","compareAccess","a","b","demand","clear","path","size","states","sort","length","shift"],"mappings":";CAAA,SAAUA,GACN,aA6DAC,SAAS,4BA3DT,SAAoBC,GAChB,IAAIC,EAAS,SACTC,EAAS,QACTC,EAAkB,IAAIC,OAAO,OAASH,EAAS,oBAAsBC,EAAS,QAC9EG,EAAuB,kCAE3B,SAASC,EAASC,GACd,IACIC,EADAC,EAAQX,EAAaY,QAAQH,GAEjC,GAAIE,IAAUD,EAAUC,EAAME,MAAMN,IAChC,OAAOO,MAAMC,UAAUC,MAAMC,KAAKP,EAAS,GAInD,SAASQ,EAAOC,GACZ,MAAO,IAAMhB,EAAS,KAAOgB,EAAK,KAAOf,EAAS,IAatD,SAASgB,EAAaC,GAClB,IACIV,EADAE,EAAQQ,EAASR,MAAMR,GAEvBQ,KACAF,EAAQH,EAASU,EAAOL,EAAM,MACxB,GAAKA,EAAM,GACjBS,KAAKC,KAAKZ,IAIlB,SAASa,EAAcC,EAAGC,GACtB,OAAID,EAAE,GAAKC,EAAE,IACD,EAERD,EAAE,GAAKC,EAAE,GACF,EAEJ,EAEX,OA9BAxB,EAAgBF,EAAc,SAASqB,GACnC,IAAIR,EAAQQ,EAASR,MAAMR,GAEvBQ,IACQL,EAASU,EAAOL,EAAM,KACnB,IACPc,OAAOC,MAAMC,KAAKhB,EAAM,OAwB7B,SAAsBiB,GACzB,IACInB,EADAoB,KAIJ,IAFA7B,EAAgBF,EAAcoB,EAAcW,GAC5CA,EAAOC,KAAKR,GACLM,EAAO,GAAKC,EAAOE,QAEtBH,IADAnB,EAAQoB,EAAOG,SACD,GACdP,OAAOC,MAAMC,KAAKlB,EAAM,OA1DxC,CA+DGX","file":"dispose.js","sourcesContent":["(function(localStorage) {\n \"use strict\";\n\n function definition(functionIterate) {\n var PREFIX = \"demand\",\n SUFFIX = \"state\",\n regexMatchState = new RegExp(\"^\\\\[\" + PREFIX + \"\\\\]\\\\[(.+?)\\\\]\\\\[\" + SUFFIX + \"\\\\]$\"),\n regexMatchProperties = /^(.+?),(\\d+),(\\d*),(.+?),(\\d+)$/;\n\n function getState(key) {\n var state = localStorage.getItem(key),\n matches;\n if (state && (matches = state.match(regexMatchProperties))) {\n return Array.prototype.slice.call(matches, 1)\n }\n }\n\n function getKey(id) {\n return \"[\" + PREFIX + \"][\" + id + \"][\" + SUFFIX + \"]\"\n }\n functionIterate(localStorage, function(property) {\n var match = property.match(regexMatchState),\n state;\n if (match) {\n state = getState(getKey(match[1]));\n if (!state[4]) {\n demand.clear.path(match[1])\n }\n }\n });\n\n function filterStates(property) {\n var match = property.match(regexMatchState),\n state;\n if (match) {\n state = getState(getKey(match[1]));\n state[5] = match[1];\n this.push(state)\n }\n }\n\n function compareAccess(a, b) {\n if (a[4] < b[4]) {\n return -1\n }\n if (a[4] > b[4]) {\n return 1\n }\n return 0\n }\n return function cacheDispose(size) {\n var states = [],\n state;\n functionIterate(localStorage, filterStates, states);\n states.sort(compareAccess);\n while (size > 0 && states.length) {\n state = states.shift();\n size -= state[1];\n demand.clear.path(state[5])\n }\n }\n }\n provide([\"/demand/function/iterate\"], definition)\n})(localStorage);"]} \ No newline at end of file diff --git a/dist/demand.js b/dist/demand.js index 278f2bb..141af7b 100644 --- a/dist/demand.js +++ b/dist/demand.js @@ -1,3 +1,3 @@ -/**! 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); +/**! Qoopido.demand 5.0.0 | 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="demand",l="/demand/",d=l+"abstract/",h=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,ce=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]=ce(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}}(),se=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=se();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 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(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=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(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 he(){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]||s.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}}(),c=a?e.localStorage:y,f=a&&"remainingSpace"in c,l={};function d(e){var t;return e.cache!==y?e.cache:(re(s.cache,function(n,r){0===e.path.indexOf(n)&&(!t||r.weight>t.weight)&&(t=r)}),t?t.state:x)}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 g(e,t){t[4]=he(),p(e,t.join(","))}function m(e,t,n){de.emit(e,t.id,t,n)}function w(){fe(this.clear.expired.bind(this.clear))}return de.on(O,function(e){fe(function(){t.clear(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&&d(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(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(){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(d(e)){t=[e.version,e.source.length,e.lifetime?he()+e.lifetime:y,r.version],o=n+"["+e.id+"]",m("preCache",e,t);try{if(u=f?c.remainingSpace:y,p(o+"[value]",e.source),g(o+i,t),u!==y&&c.remainingSpace===u)throw new Error;m("postCache",e,t)}catch(t){m(A,e)}}}:E,clear:a?function(e){var t=ke(e),r=n+"["+t+"]";h(r+i)&&(p(r+i),p(r+"[value]"),m("cacheClear",Se.get(t)||new Se(t,y,x)))}:function(){}},w.prototype.clear.all=a?function(){var e;re(c,function(t){(e=t.match(o))&&this(e[1])},this)}:E,w.prototype.clear.expired=a?function(){var e,t;re(c,function(r){(e=r.match(o))&&(t=v(n+"["+e[1]+"]"+i))&&t[2]>0&&t[2]<=he()&&this(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+se())}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,c=r.get(this);for(c.state===e&&(c.state=i,c.value=o);u=c[c.state].shift();)(a=u.handler.apply(y,c.value))&&"function"==typeof a.then?a.then(u.dfd.resolve,u.dfd.reject):u.dfd[c.state===t?"resolve":"reject"].apply(y,c.value);c[t].length=0,c[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),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.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 c(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]||s.handler,o.version=u[4]||s.version,o.lifetime=u[5]&&1e3*u[5]||s.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(h+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(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(),c,[])}},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,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,b),a.send(),o=t(c,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",se()),this}r=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(C,e,n),ce(n,t),de.emit(M,e,n)}function i(){var t,n,r=le(arguments),i=this!==e?this:y,o=0;for(de.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(){de.emit(T,y,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 Z(o,"boolean")?s.cache[""]={weight:0,state:o}:ee(o)&&re(o,t,s.cache),Z(u,j)&&(s.version=u),te(a)&&(s.timeout=1e3*Math.min(Math.max(a,2),12)),te(c)&&c>0&&(s.lifetime=1e3*c),Z(f,j)&&""!==f&&(s.pattern.base=new Oe("",f)),ee(l)&&re(l,n,s.pattern),ee(d)&&re(d,r,h),i},i.version="5.0.0",i.on=de.on.bind(i),i.get=function(e,t){var n=Se.get(e,t);return n&&n.value},i.list=Se.list,i.remove=Se.remove,i.cache={clear:Re.clear},de.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,de.emit(D,e.type,e))}function i(t){e.dfd.reject(new Me(_+(t?" (status)":""),e.id))}me.test(e.path)||re(s.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=h+"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,c=e.source,s=e.dfd,f=t[e.path];function l(){s.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(c);)c=c.replace(r[0],"");for(e.source=c,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(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 Me(F,e.id,arguments))}for(e.enqueue=x,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(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(c.resolve,d)},d)}},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[h+"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(d+"uuid",He),We(d+"handler",Le),We(h+"module",_e),We(h+"bundle",Fe),We(h+"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",ce),We(v+"iterate",re),We(v+"hash",Te),We(v+"defer",fe),We(v+"uuid",se),We(l+"weakmap",Pe),We(l+"descriptor",Y),We(l+"pledge",Ee),We(l+"queue",De),We(l+"xhr",Ae),We(l+"failure",Me),c&&c.main)switch(typeof c.main){case j:r(c.main);break;case R:i("main",c.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 df5655d..66465c3 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","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,EAAAD,EAAA,OAGAE,EAAAF,EAAA,SAIAG,EAAAN,aACAO,EAAAL,cAEAM,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A,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 +{"version":3,"sources":["demand.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","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","self","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":";CAAA,SAAUA,EAAQC,EAAYC,GAC1B,aACA,IAUIC,EAAQC,EAASC,EAAOC,EAVxBC,EAAWP,EAAOO,SAClBC,EAAU,WAAYR,GAAUA,EAAOG,OACvCM,GACIC,QAAS,QACTC,SACAC,QAAS,IACTC,WACAC,WACAC,QAAS,UAGbC,EAAY,SAGZC,EAAgB,WAChBC,EAAyBD,EAAgB,YACzCE,EAAwBF,EAAgB,WACxCG,EAAuBH,EAAgB,UACvCI,EAAyBJ,EAAgB,YACzCK,EAA0BL,EAAgB,aAC1CM,EAAc,QACdC,EAAO,KACPC,OAAYC,EACZC,GAAQ,EACRC,GAAO,EACPC,EAAmB,YACnBC,EAAgB,SAEhBC,EAAgB,SAChBC,EAAkB,WAClBC,EAAgB,SAChBC,EAAiB,aAIjBC,EAAsBC,eACtBC,EAAuBC,gBACvBC,EAAc,QACdC,EAAmBD,EAAc,OAGjCE,E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R,GAAa9V,EAAyB,aAAcsJ,IACpDwM,GAAa9V,EAAyB,oBAAqB0T,IAC3DoC,GAAa9V,EAAyB,QAAS2F,IAC/CmQ,GAAa9V,EAAyB,UAAWmE,IACjD2R,GAAa9V,EAAyB,OAAQ4R,IAC9CkE,GAAa9V,EAAyB,QAAS0G,IAC/CoP,GAAa9V,EAAyB,OAAQkG,IAC9C4P,GAAalW,EAAgB,UAAWgN,IACxCkJ,GAAalW,EAAgB,aAAcwD,GAC3C0S,GAAalW,EAAgB,SAAUuN,IACvC2I,GAAalW,EAAgB,QAAS0T,IACtCwC,GAAalW,EAAgB,MAAO8Q,IACpCoF,GAAalW,EAAgB,UAAWqP,IACpC9P,GAAWA,EAAQ4W,KACnB,cAAe5W,EAAQ4W,MACnB,KAAKtV,EACD3B,EAAOK,EAAQ4W,MACf,MACJ,KAAKpV,EACD5B,EAAQ,OAAQI,EAAQ4W,SAv/CxC,CA2/CiB,kBAAdhR,KAAKD,KAA2BkR,OAASjR,KAAMnG,WAAYC","file":"demand.js","sourcesContent":["(function(global, setTimeout, clearTimeout) {\n \"use strict\";\n var document = global.document,\n options = \"demand\" in global && global.demand,\n settings = {\n version: \"1.0.0\",\n cache: {},\n timeout: 8e3,\n pattern: {},\n modules: {},\n handler: \"module\"\n },\n demand, provide, queue, processor;\n var DEMAND_ID = \"demand\",\n PROVIDE_ID = \"provide\",\n PATH_ID = \"path\",\n MODULE_PREFIX = \"/\" + DEMAND_ID + \"/\",\n MODULE_PREFIX_ABSTRACT = MODULE_PREFIX + \"abstract/\",\n MODULE_PREFIX_HANDLER = MODULE_PREFIX + \"handler/\",\n MODULE_PREFIX_PLUGIN = MODULE_PREFIX + \"plugin/\",\n MODULE_PREFIX_FUNCTION = MODULE_PREFIX + \"function/\",\n MODULE_PREFIX_VALIDATOR = MODULE_PREFIX + \"validator/\",\n MOCK_PREFIX = \"mock:\",\n NULL = null,\n UNDEFINED = undefined,\n FALSE = false,\n TRUE = true,\n STRING_UNDEFINED = \"undefined\",\n STRING_STRING = \"string\",\n STRING_BOOLEAN = \"boolean\",\n STRING_OBJECT = \"object\",\n STRING_FUNCTION = \"function\",\n STRING_NUMBER = \"number\",\n FUNCTION_EMPTY = function() {},\n EVENT_PREFIX = \"pre\",\n EVENT_POSTFIX = \"post\",\n EVENT_CONFIGURE = \"Configure\",\n EVENT_PRE_CONFIGURE = EVENT_PREFIX + EVENT_CONFIGURE,\n EVENT_POST_CONFIGURE = EVENT_POSTFIX + EVENT_CONFIGURE,\n EVENT_CACHE = \"cache\",\n EVENT_CACHE_MISS = EVENT_CACHE + \"Miss\",\n EVENT_CACHE_HIT = EVENT_CACHE + \"Hit\",\n EVENT_CACHE_CLEAR = EVENT_CACHE + \"Clear\",\n EVENT_CACHE_EXCEED = EVENT_CACHE + \"Exceed\",\n EVENT_PRE_CACHE = EVENT_PREFIX + \"Cache\",\n EVENT_POST_CACHE = EVENT_POSTFIX + \"Cache\",\n EVENT_RESOLVE = \"Resolve\",\n EVENT_PRE_RESOLVE = EVENT_PREFIX + EVENT_RESOLVE,\n EVENT_POST_RESOLVE = EVENT_POSTFIX + EVENT_RESOLVE,\n EVENT_REQUEST = \"Request\",\n EVENT_PRE_REQUEST = EVENT_PREFIX + EVENT_REQUEST,\n EVENT_POST_REQUEST = EVENT_POSTFIX + EVENT_REQUEST,\n EVENT_PROCESS = \"Process\",\n EVENT_PRE_PROCESS = EVENT_PREFIX + EVENT_PROCESS,\n EVENT_POST_PROCESS = EVENT_POSTFIX + EVENT_PROCESS,\n EVENT_QUEUE = \"queue\",\n EVENT_QUEUE_ENQUEUE = EVENT_QUEUE + \"Enqueue\",\n EVENT_QUEUE_DEQUEUE = EVENT_QUEUE + \"Dequeue\",\n ERROR_LOAD = \"error loading\",\n ERROR_PROVIDE = \"error providing\",\n ERROR_RESOLVE = \"error resolving\",\n ERROR_PROVIDE_ANONYMOUS = \"unspecified anonymous provide\";\n var arrayPrototype = Array.prototype,\n arrayPrototypeSlice = arrayPrototype.slice,\n arrayPrototypeConcat = arrayPrototype.concat,\n object = Object,\n objectPrototype = object.prototype,\n objectPrototypeToString = objectPrototype.toString,\n objectCreate = object.create,\n objectDefineProperty = object.defineProperty,\n objectGetOwnPropertyNames = object.getOwnPropertyNames,\n objectGetOwnPropertyDescriptor = object.getOwnPropertyDescriptor,\n linkElement = document.createElement(\"a\");\n\n function ClassDescriptor(value, writable, configurable, enumerable) {\n return {\n __proto__: NULL,\n value: value,\n enumerable: !!enumerable,\n configurable: !!configurable,\n writable: !!writable\n }\n }(function(strPrototype) {\n function objectDefine(name, value, writable, configurable, enumerable) {\n objectDefineProperty(this, name, new ClassDescriptor(value, writable, configurable, enumerable))\n }\n\n function functionExtends(source) {\n var self = this,\n prototype = self[strPrototype],\n names = objectGetOwnPropertyNames(prototype),\n properties = {\n constructor: new ClassDescriptor(self, TRUE, TRUE)\n },\n i = 0,\n property;\n for (;\n (property = names[i]) && !properties[property]; i++) {\n properties[property] = objectGetOwnPropertyDescriptor(prototype, property)\n }\n try {\n self[strPrototype] = objectCreate(source[strPrototype] || source, properties)\n } catch (e) {}\n if (self[strPrototype] === prototype) {\n throw new TypeError(\"Unable to extend, prototype is not writable\")\n }\n return self\n }\n objectDefine.call(Object.prototype, \"define\", objectDefine);\n objectDefine.call(global.Object.prototype, \"define\", objectDefine);\n Function.prototype.define(\"extends\", functionExtends);\n global.Function.prototype.define(\"extends\", functionExtends)\n })(\"prototype\");\n\n function validatorIsTypeOf(object, type) {\n return typeof object === type\n }\n\n function validatorIsObject(object) {\n return object && validatorIsTypeOf(object, STRING_OBJECT)\n }\n\n function validatorIsPositive(value) {\n return validatorIsTypeOf(value, STRING_NUMBER) && isFinite(value) && Math.floor(value) === value && value >= 0\n }\n\n function validatorIsInstanceOf(object, module) {\n return object instanceof module\n }\n\n function functionIterate(source, callback, context) {\n var properties = object.keys(source),\n i = 0,\n property;\n for (;\n (property = properties[i]) !== UNDEFINED; i++) {\n if (callback.call(context, property, source[property]) === FALSE) {\n break\n }\n }\n return context\n }\n var functionMerge = function() {\n function mergeProperties(property, value) {\n var targetProperty = this[property],\n targetPropertyIsObject;\n if (value !== UNDEFINED) {\n if (validatorIsObject(value)) {\n targetPropertyIsObject = validatorIsObject(targetProperty);\n if (value.length !== UNDEFINED) {\n targetProperty = targetPropertyIsObject && targetProperty.length !== UNDEFINED ? targetProperty : []\n } else {\n targetProperty = targetPropertyIsObject && targetProperty.length === UNDEFINED ? targetProperty : {}\n }\n this[property] = functionMerge(targetProperty, value)\n } else {\n this[property] = value\n }\n }\n }\n return function functionMerge() {\n var target = arguments[0],\n i = 1,\n properties;\n for (;\n (properties = arguments[i]) !== UNDEFINED; i++) {\n functionIterate(properties, mergeProperties, target)\n }\n return target\n }\n }();\n var functionUuid = function() {\n var regex = new RegExp(\"[xy]\", \"g\");\n\n function randomize(character) {\n var r = Math.random() * 16 | 0;\n return (character === \"x\" ? r : r & 3 | 8).toString(16)\n }\n return function functionUuid() {\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(regex, randomize)\n }\n }();\n var functionDefer = function() {\n var hasSetImmediate = \"setImmediate\" in global,\n element, fallback;\n if (\"MutationObserver\" in global) {\n return function functionDefer(fn) {\n element = document.createElement(\"div\");\n new MutationObserver(function() {\n fn()\n }).observe(element, {\n attributes: TRUE\n });\n element.setAttribute(\"i\", \"1\")\n }\n }\n if (!hasSetImmediate && \"postMessage\" in global && !(\"importScripts\" in global) && \"addEventListener\" in global) {\n return function() {\n var storage = {};\n\n function onMessage(event) {\n var fn;\n if (event.source === global && event.data && (fn = storage[event.data])) {\n fn();\n delete storage[event.data]\n }\n }\n global.addEventListener(\"message\", onMessage, FALSE);\n return function functionDefer(fn) {\n var uuid = functionUuid();\n storage[uuid] = fn;\n global.postMessage(uuid, \"*\")\n }\n }()\n }\n if (!hasSetImmediate && \"onreadystatechange\" in (element = document.createElement(\"script\"))) {\n return function functionDefer(fn) {\n element.onreadystatechange = function onreadystatechange() {\n element.onreadystatechange = NULL;\n element.parentNode.removeChild(element);\n fn()\n };\n document.body.appendChild(element)\n }\n }\n fallback = hasSetImmediate ? setImmediate : setTimeout;\n return function functionDefer(fn) {\n fallback(fn)\n }\n }();\n\n function functionToArray(arrayLikeObject, start, end) {\n return arrayPrototypeSlice.call(arrayLikeObject, start, end)\n }\n var singletonEvent = function() {\n var TYPE_ON = \"on\",\n TYPE_AFTER = \"after\",\n regexMatchEvent = /^cache(Miss|Hit|Clear|Exceed)|queue(En|De)queue|(pre|post)(Resolve|Configure|Request|Process|Cache)$/,\n listener = {};\n\n function addListener(type, events, callback) {\n var event, pointer;\n if (validatorIsTypeOf(events, STRING_STRING) && validatorIsTypeOf(callback, STRING_FUNCTION)) {\n events = events.split(\" \");\n while (event = events.shift()) {\n event = event.split(\":\");\n if (regexMatchEvent.test(event[0])) {\n (listener[event[0]] || (listener[event[0]] = {\n on: [],\n after: []\n }))[type].push({\n callback: callback,\n filter: event[1]\n });\n if (type === TYPE_ON && event[0] === EVENT_POST_CONFIGURE && (pointer = settings.modules[event[1]])) {\n callback(pointer)\n }\n }\n }\n }\n }\n\n function Event() {}\n Event.prototype = {\n emit: function(event, filter) {\n var pointer = listener[event],\n parameter, i, item;\n if (pointer) {\n parameter = functionToArray(arguments, 2);\n for (i = 0; item = pointer[TYPE_ON][i]; i++) {\n if (!item.filter || item.filter === filter) {\n item.callback.apply(NULL, parameter)\n }\n }\n for (i = 0; item = pointer[TYPE_AFTER][i]; i++) {\n if (!item.filter || item.filter === filter) {\n item.callback.apply(NULL, parameter)\n }\n }\n }\n return this\n },\n on: function(events, callback) {\n addListener(TYPE_ON, events, callback);\n return this\n },\n after: function(events, callback) {\n addListener(TYPE_AFTER, events, callback);\n return this\n }\n };\n return new Event\n }();\n\n function functionGetTimestamp() {\n return +new Date\n }\n var functionEscapeRegex = function() {\n var regexMatchRegex = /[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g;\n return function functionEscapeRegex(value) {\n return value.replace(regexMatchRegex, \"\\\\$&\")\n }\n }();\n\n function functionResolveUrl(url) {\n linkElement.href = url;\n return linkElement.href\n }\n var regexIsAbsoluteUri = /^(http(s?):)?\\/\\//i,\n regexIsAbsolutePath = /^\\//,\n regexMatchSourcemap = /((?:\\/\\/|\\/\\*)#)\\s*(sourceMappingURL)\\s*=\\s*(?!(?:http[s]?:)?\\/\\/)(.+?)\\.map(?:\\s+)?(\\*\\/)?/g,\n regexMatchBaseUrl = new RegExp(\"^\" + functionEscapeRegex(functionResolveUrl(\"/\"))),\n regexMatchInternal = new RegExp(\"^\" + DEMAND_ID + \"|\" + PROVIDE_ID + \"|\" + PATH_ID + \"$\"),\n regexMatchParameter = /^(mock:)?([+-])?((?:[-\\w]+\\/?)+)?(?:@(.+?))?(?:#(\\d+))?!/;\n\n function functionResolvePath(uri, context) {\n var path = uri.replace(regexMatchParameter, \"\");\n if (!regexIsAbsolutePath.test(path) && !regexIsAbsoluteUri.test(path)) {\n path = \"/\" + functionResolveUrl((context && functionResolveUrl(context + \"/../\") || \"/\") + path).replace(regexMatchBaseUrl, \"\")\n }\n return path\n }\n\n function functionResolveId(uri, context) {\n var parameter = uri.match(regexMatchParameter);\n return (parameter && parameter[1] ? \"mock:\" : \"\") + (parameter && parameter[3] || settings.handler) + \"!\" + functionResolvePath(uri, context)\n }\n var singletonCache = function() {\n var STORAGE_PREFIX = \"[\" + DEMAND_ID + \"]\",\n STORAGE_SUFFIX_STATE = \"[state]\",\n STORAGE_SUFFIX_VALUE = \"[value]\",\n regexMatchState = new RegExp(\"^\" + functionEscapeRegex(STORAGE_PREFIX) + \"\\\\[(.+?)\\\\]\" + functionEscapeRegex(STORAGE_SUFFIX_STATE) + \"$\"),\n regexMatchProperties = /^(.+?),(\\d+),(\\d*),(.+?),(\\d+)$/,\n supportsLocalStorage = function() {\n try {\n return \"localStorage\" in global && global.localStorage\n } catch (exception) {\n return FALSE\n }\n }(),\n localStorage = supportsLocalStorage ? global.localStorage : NULL,\n supportsRemainingSpace = supportsLocalStorage && \"remainingSpace\" in localStorage,\n storage = {},\n cache;\n singletonEvent.on(EVENT_CACHE_MISS, function(dependency) {\n functionDefer(function() {\n cache.clear(dependency.id)\n })\n }).on(EVENT_CACHE_EXCEED, function(dependency) {\n demand(\"-!/\" + DEMAND_ID + \"/cache/dispose\").then(function(cacheDispose) {\n functionDefer(function() {\n cacheDispose(dependency.source.length);\n cache.set(dependency)\n })\n })\n }).on(EVENT_POST_REQUEST, function(dependency) {\n if (dependency.source && enabled(dependency)) {\n storage[dependency.id] = TRUE\n }\n }).after(EVENT_POST_PROCESS, function(dependency) {\n if (storage[dependency.id]) {\n functionDefer(function() {\n cache.set(dependency)\n })\n }\n });\n\n function enabled(dependency) {\n var match;\n if (dependency.cache !== NULL) {\n return dependency.cache\n }\n functionIterate(settings.cache, function(property, value) {\n if (dependency.path.indexOf(property) === 0 && (!match || value.weight > match.weight)) {\n match = value\n }\n });\n return match ? match.state : FALSE\n }\n\n function getKey(key) {\n return localStorage.getItem(key)\n }\n\n function setKey(key, value) {\n localStorage[value ? \"setItem\" : \"removeItem\"](key, value)\n }\n\n function getState(key) {\n var state = getKey(key),\n matches;\n if (state && (matches = state.match(regexMatchProperties))) {\n return functionToArray(matches, 1)\n }\n }\n\n function setState(key, state) {\n state[4] = functionGetTimestamp();\n setKey(key, state.join(\",\"))\n }\n\n function emit(event, dependency, state) {\n singletonEvent.emit(event, dependency.id, dependency, state)\n }\n\n function Cache() {\n functionDefer(this.clear.expired.bind(this.clear))\n }\n Cache.prototype = {\n get: supportsLocalStorage ? function(dependency) {\n var id, state;\n if (enabled(dependency)) {\n id = STORAGE_PREFIX + \"[\" + dependency.id + \"]\";\n state = getState(id + STORAGE_SUFFIX_STATE);\n if (!state) {\n return\n }\n if (state[0] !== dependency.version || state[2] && dependency.lifetime && state[2] <= functionGetTimestamp()) {\n dependency.invalid = true;\n return\n }\n dependency.source = getKey(id + STORAGE_SUFFIX_VALUE);\n functionDefer(function() {\n setState(id + STORAGE_SUFFIX_STATE, state)\n });\n return TRUE\n }\n } : FUNCTION_EMPTY,\n resolve: supportsLocalStorage ? function(dependency) {\n var self = this;\n if (self.get(dependency)) {\n emit(EVENT_CACHE_HIT, dependency)\n } else {\n emit(EVENT_CACHE_MISS, dependency)\n }\n } : function(dependency) {\n emit(EVENT_CACHE_MISS, dependency)\n },\n set: supportsLocalStorage ? function(dependency) {\n var state, id, spaceBefore;\n if (enabled(dependency)) {\n state = [dependency.version, dependency.source.length, dependency.lifetime ? functionGetTimestamp() + dependency.lifetime : NULL, demand.version];\n id = STORAGE_PREFIX + \"[\" + dependency.id + \"]\";\n emit(EVENT_PRE_CACHE, dependency, state);\n try {\n spaceBefore = supportsRemainingSpace ? localStorage.remainingSpace : NULL;\n setKey(id + STORAGE_SUFFIX_VALUE, dependency.source);\n setState(id + STORAGE_SUFFIX_STATE, state);\n if (spaceBefore !== NULL && localStorage.remainingSpace === spaceBefore) {\n throw new Error\n }\n emit(EVENT_POST_CACHE, dependency, state)\n } catch (error) {\n emit(EVENT_CACHE_EXCEED, dependency)\n }\n }\n } : FUNCTION_EMPTY,\n clear: supportsLocalStorage ? function(path) {\n var id = functionResolveId(path),\n key = STORAGE_PREFIX + \"[\" + id + \"]\";\n if (getKey(key + STORAGE_SUFFIX_STATE)) {\n setKey(key + STORAGE_SUFFIX_STATE);\n setKey(key + STORAGE_SUFFIX_VALUE);\n emit(EVENT_CACHE_CLEAR, ClassDependency.get(id) || new ClassDependency(id, NULL, FALSE))\n }\n } : function() {}\n };\n Cache.prototype.clear.all = supportsLocalStorage ? function() {\n var match;\n functionIterate(localStorage, function(property) {\n match = property.match(regexMatchState);\n match && this(match[1])\n }, this)\n } : FUNCTION_EMPTY;\n Cache.prototype.clear.expired = supportsLocalStorage ? function() {\n var match, state;\n functionIterate(localStorage, function(property) {\n match = property.match(regexMatchState);\n if (match) {\n state = getState(STORAGE_PREFIX + \"[\" + match[1] + \"]\" + STORAGE_SUFFIX_STATE);\n if (state && state[2] > 0 && state[2] <= functionGetTimestamp()) {\n this(match[1])\n }\n }\n }, this)\n } : FUNCTION_EMPTY;\n return cache = new Cache\n }();\n var ClassWeakmap = \"WeakMap\" in global ? global.WeakMap : function() {\n var prefix = \"weakmap-\";\n\n function getEntry(context, key) {\n var entry;\n if ((entry = key[context.id]) && entry[0] === key) {\n return entry\n }\n }\n\n function ClassWeakmap() {\n this.define(\"id\", prefix + functionUuid())\n }\n ClassWeakmap.prototype = {\n set: function(key, value) {\n var entry = getEntry(this, key);\n if (entry) {\n entry[1] = value\n } else {\n key.define(this.id, [key, value])\n }\n return this\n },\n get: function(key) {\n var entry = getEntry(this, key);\n if (entry) {\n return entry[1]\n }\n },\n delete: function(key) {\n var entry = getEntry(this, key);\n if (entry) {\n entry.length = 0;\n delete key[this.id]\n }\n },\n has: function(key) {\n return !!getEntry(this, key)\n }\n };\n return ClassWeakmap\n }();\n var ClassPledge = function() {\n var PLEDGE_PENDING = \"pending\",\n PLEDGE_RESOLVED = \"resolved\",\n PLEDGE_REJECTED = \"rejected\",\n storage = new ClassWeakmap;\n\n function resolve() {\n storage.get(this).handle(PLEDGE_RESOLVED, arguments)\n }\n\n function reject() {\n storage.get(this).handle(PLEDGE_REJECTED, arguments)\n }\n\n function handle(state, parameter) {\n var properties = storage.get(this),\n pointer, result;\n if (properties.state === PLEDGE_PENDING) {\n properties.state = state;\n properties.value = parameter\n }\n while (pointer = properties[properties.state].shift()) {\n result = pointer.handler.apply(NULL, properties.value);\n if (result && typeof result.then === \"function\") {\n result.then(pointer.dfd.resolve, pointer.dfd.reject)\n } else {\n pointer.dfd[properties.state === PLEDGE_RESOLVED ? \"resolve\" : \"reject\"].apply(NULL, properties.value)\n }\n }\n properties[PLEDGE_RESOLVED].length = 0;\n properties[PLEDGE_REJECTED].length = 0\n }\n\n function observe(pledge, index, properties) {\n pledge.then(function() {\n properties.resolved[index] = functionToArray(arguments);\n properties.count++;\n check(properties)\n }, function() {\n properties.rejected.push(functionToArray(arguments));\n check(properties)\n })\n }\n\n function check(properties) {\n if (properties.count === properties.total) {\n properties.dfd.resolve.apply(NULL, arrayPrototypeConcat.apply([], properties.resolved))\n } else if (properties.rejected.length + properties.count === properties.total) {\n properties.dfd.reject.apply(NULL, arrayPrototypeConcat.apply([], properties.rejected))\n }\n }\n\n function ClassPledge(executor) {\n var self = this;\n storage.set(this, {\n state: PLEDGE_PENDING,\n handle: handle.bind(self),\n value: NULL,\n resolved: [],\n rejected: [],\n count: 0\n });\n executor(resolve.bind(self), reject.bind(self));\n return self\n }\n ClassPledge.prototype = {\n catch: function(listener) {\n return this.then(FUNCTION_EMPTY, listener)\n },\n always: function(alwaysListener) {\n return this.then(alwaysListener, alwaysListener)\n },\n then: function(resolveListener, rejectListener) {\n var properties = storage.get(this),\n dfd = ClassPledge.defer();\n resolveListener && properties[PLEDGE_RESOLVED].push({\n handler: resolveListener,\n dfd: dfd\n });\n rejectListener && properties[PLEDGE_REJECTED].push({\n handler: rejectListener,\n dfd: dfd\n });\n if (properties.state !== PLEDGE_PENDING) {\n functionDefer(properties.handle)\n }\n return dfd.pledge\n },\n isPending: function() {\n return storage.get(this).state === PLEDGE_PENDING\n },\n isResolved: function() {\n return storage.get(this).state === PLEDGE_RESOLVED\n },\n isRejected: function() {\n return storage.get(this).state === PLEDGE_REJECTED\n }\n };\n ClassPledge.defer = function() {\n var self = {};\n self.pledge = new ClassPledge(function(resolveListener, rejectListener) {\n self.resolve = resolveListener;\n self.reject = rejectListener\n });\n return self\n };\n ClassPledge.all = function(pledges) {\n var dfd = ClassPledge.defer(),\n properties, i = 0,\n pledge;\n if (pledges.length) {\n properties = {\n dfd: dfd,\n resolved: [],\n rejected: [],\n total: pledges.length,\n count: 0\n };\n for (; pledge = pledges[i]; i++) {\n observe(pledge, i, properties)\n }\n } else {\n dfd.resolve()\n }\n return dfd.pledge\n };\n ClassPledge.race = function(pledges) {\n var dfd = ClassPledge.defer(),\n i = 0,\n pledge;\n for (; pledge = pledges[i]; i++) {\n pledge.then(dfd.resolve, dfd.reject)\n }\n if (!pledges.length) {\n dfd.resolve()\n }\n return dfd.pledge\n };\n return ClassPledge\n }();\n var ClassRegistry = function() {\n var storage = new ClassWeakmap;\n\n function ClassRegistry() {\n storage.set(this, {})\n }\n ClassRegistry.prototype = {\n get: function(key) {\n return key ? storage.get(this)[key] : storage.get(this)\n },\n set: function(key, value) {\n storage.get(this)[key] = value\n },\n remove: function(key) {\n delete storage.get(this)[key]\n }\n };\n return ClassRegistry\n }();\n\n function ClassFailure(message, module, stack) {\n var self = this;\n self.message = message;\n module && (self.module = module);\n stack && (self.stack = functionToArray(stack));\n return self\n }\n ClassFailure.prototype = {\n toString: function() {\n var self = this,\n result = DEMAND_ID + \": \" + self.message + \" \" + (self.module ? '\"' + self.module + '\"' : \"\");\n if (self.stack) {\n result = ClassFailure.traverse(self.stack, result, 1)\n }\n return result\n }\n };\n ClassFailure.traverse = function(stack, value, depth) {\n var indention = new Array(depth + 1).join(\" \"),\n i = 0,\n item;\n for (; item = stack[i]; i++) {\n value += \"\\n\" + indention + \"> \" + item.message + \" \" + (item.module ? '\"' + item.module + '\"' : \"\");\n if (item.stack) {\n value = ClassFailure.traverse(item.stack, value, depth + 1)\n }\n }\n return value\n };\n var ClassDependency = function() {\n var PREFIX_INTERNAL = \"internal!\",\n registry = new ClassRegistry,\n placeholder = [];\n\n function setProperty(property, value) {\n this[property] = value\n }\n\n function addPending(id, dependency) {\n if (dependency.pledge.isPending()) {\n this.push(id)\n }\n }\n\n function addResolved(id, dependency) {\n if (dependency.pledge.isResolved()) {\n this.push(id)\n }\n }\n\n function addRejected(id, dependency) {\n if (dependency.pledge.isRejected()) {\n this.push(id)\n }\n }\n\n function ClassDependency(uri, context, register) {\n var self = this,\n parameter = uri.match(regexMatchParameter) || placeholder;\n self.path = functionResolvePath(uri, context);\n self.mock = parameter[1] ? TRUE : FALSE;\n self.cache = parameter[2] ? parameter[1] === \"+\" : NULL;\n self.type = parameter[3] || settings.handler;\n self.version = parameter[4] || settings.version;\n self.lifetime = parameter[5] && parameter[5] * 1e3 || settings.lifetime;\n self.id = (self.mock ? MOCK_PREFIX : \"\") + self.type + \"!\" + self.path;\n self.uri = (self.mock ? MOCK_PREFIX : \"\") + self.type + \"@\" + self.version + (validatorIsPositive(self.lifetime) && self.lifetime > 0 ? \"#\" + self.lifetime : \"\") + \"!\" + self.path;\n self.dfd = ClassPledge.defer();\n self.pledge = self.dfd.pledge;\n self.invalid = false;\n self.pledge.then(function() {\n self.value = functionToArray(arguments)\n });\n register !== FALSE && registry.set(self.id, self);\n return self\n }\n ClassDependency.prototype = {\n enqueue: true\n };\n ClassDependency.get = function(uri, context) {\n return registry.get(functionResolveId(uri, context))\n };\n ClassDependency.resolve = function(uri, context) {\n var isInternal = context && regexMatchInternal.test(uri),\n dependency = isInternal ? this.get(PREFIX_INTERNAL + context + \"/\" + uri) : this.get(uri, context),\n value;\n if (!dependency) {\n if (isInternal) {\n dependency = new ClassDependency(PREFIX_INTERNAL + context + \"/\" + uri);\n switch (uri) {\n case DEMAND_ID:\n value = function() {\n return functionIterate(demand, setProperty, demand.bind(context))\n }();\n break;\n case PROVIDE_ID:\n value = provide.bind(context);\n break;\n case PATH_ID:\n value = context;\n break\n }\n dependency.dfd.resolve(value)\n } else {\n dependency = new ClassDependency(uri, context);\n demand(MODULE_PREFIX_HANDLER + dependency.type).then(function(handler) {\n dependency.handler = handler;\n if (dependency.mock) {\n dependency.dfd.resolve(handler)\n } else {\n singletonCache.resolve(dependency)\n }\n }, function() {\n dependency.dfd.reject(new ClassFailure(ERROR_LOAD + \" (handler)\", self.id))\n })\n }\n }\n return dependency\n };\n ClassDependency.remove = function(uri, context, cache) {\n var id = functionResolveId(uri, context),\n node = document.querySelector(\"[\" + DEMAND_ID + '-id=\"' + id + '\"]');\n registry.remove(id);\n registry.remove(MOCK_PREFIX + id);\n node && node.parentNode.removeChild(node);\n cache !== FALSE && singletonCache.clear(id)\n };\n ClassDependency.list = {\n all: function() {\n return object.keys(registry.get())\n },\n pending: function() {\n return functionIterate(registry.get(), addPending, [])\n },\n resolved: function() {\n return functionIterate(registry.get(), addResolved, [])\n },\n rejected: function() {\n return functionIterate(registry.get(), addRejected, [])\n }\n };\n return ClassDependency\n }();\n var ClassPattern = function() {\n var regexMatchTrailingSlash = /(.+)\\/$/;\n\n function setProperty(property, value) {\n this[property] = {\n url: functionResolveUrl(value).replace(regexMatchTrailingSlash, \"$1\"),\n match: new RegExp(\"^\" + functionEscapeRegex(value))\n }\n }\n\n function ClassPattern(pattern, url) {\n var self = this;\n self.weight = pattern.length;\n self.match = new RegExp(\"^\" + functionEscapeRegex(pattern));\n self.location = [].concat(url);\n functionIterate(self.location, setProperty, self.location)\n }\n ClassPattern.prototype = {\n matches: function(path) {\n return this.match.test(path)\n },\n process: function(path, index) {\n var current = this.location[index];\n if (current) {\n return path.replace(this.match, current.url)\n }\n }\n };\n return ClassPattern\n }();\n var ClassXhr = function(XMLHttpRequest) {\n var XDomainRequest = \"XDomainRequest\" in global && global.XDomainRequest || XMLHttpRequest;\n\n function checkState() {\n if (this.readyState < 4) {\n this.abort()\n }\n }\n return function ClassXhr(url) {\n var dfd = ClassPledge.defer(),\n xhr = regexMatchBaseUrl.test(url) ? new XMLHttpRequest : new XDomainRequest,\n boundCheckState = checkState.bind(xhr),\n timeout = settings.timeout,\n pointer;\n xhr.ontimeout = xhr.onerror = xhr.onabort = function() {\n dfd.reject(xhr.status)\n };\n xhr.onprogress = xhr.onreadystatechange = function() {\n clearTimeout(pointer);\n pointer = setTimeout(boundCheckState, timeout)\n };\n xhr.onload = function() {\n pointer = clearTimeout(pointer);\n if (!(\"status\" in xhr) || xhr.status === 200) {\n dfd.resolve(xhr.responseText, xhr.getResponseHeader && xhr.getResponseHeader(\"content-type\"))\n } else {\n dfd.reject(xhr.status)\n }\n };\n xhr.open(\"GET\", url, TRUE);\n xhr.send();\n pointer = setTimeout(boundCheckState, timeout);\n return dfd.pledge\n }\n }(XMLHttpRequest);\n\n function ClassLoader(dependency) {\n var regexMatchEmptySearch = /^(?:\\?|)$/,\n pattern;\n\n function resolve(response, type) {\n if (!type || !dependency.handler.validate || dependency.handler.validate(type)) {\n dependency.source = response;\n singletonEvent.emit(EVENT_POST_REQUEST, dependency.type, dependency)\n } else {\n dependency.dfd.reject(new ClassFailure(ERROR_LOAD + \" (content-type)\", dependency.id))\n }\n }\n\n function reject(status) {\n dependency.dfd.reject(new ClassFailure(ERROR_LOAD + (status ? \" (status)\" : \"\"), dependency.id))\n }\n\n function load(location) {\n location = location || 0;\n dependency.url = document.createElement(\"a\");\n dependency.url.href = pattern ? functionResolveUrl(pattern.process(dependency.path, location)) : dependency.path;\n if (dependency.invalid) {\n dependency.url.search += (regexMatchEmptySearch.test(dependency.url.search) ? \"\" : \"&\") + functionGetTimestamp()\n }\n singletonEvent.emit(EVENT_PRE_REQUEST, dependency.type, dependency);\n new ClassXhr(dependency.url).then(resolve, pattern ? function() {\n location++;\n if (pattern.location[location]) {\n load(location)\n } else {\n reject()\n }\n } : reject)\n }\n if (!regexIsAbsoluteUri.test(dependency.path)) {\n functionIterate(settings.pattern, function(property, value) {\n value.matches(dependency.path) && (!pattern || pattern.weight < value.weight) && (pattern = value)\n })\n }\n load()\n }\n demand = function() {\n function updateCacheSettings(property, value) {\n this[property] = {\n weight: property.length,\n state: value\n }\n }\n\n function updatePatternSettings(property, value) {\n property !== \"base\" && (this[property] = new ClassPattern(property, value))\n }\n\n function updateModuleSettings(property, value) {\n var temp = this[property] = this[property] || {};\n singletonEvent.emit(EVENT_PRE_CONFIGURE, property, temp);\n functionMerge(temp, value);\n singletonEvent.emit(EVENT_POST_CONFIGURE, property, temp)\n }\n\n function demand() {\n var dependencies = functionToArray(arguments),\n context = this !== global ? this : NULL,\n i = 0,\n uri, dfd, result;\n singletonEvent.emit(EVENT_PRE_RESOLVE, NULL, dependencies, context);\n for (; uri = dependencies[i]; i++) {\n if (validatorIsTypeOf(uri, STRING_STRING)) {\n dependencies[i] = ClassDependency.resolve(uri, context).pledge\n } else {\n dependencies[i] = (dfd = ClassPledge.defer()).pledge;\n dfd.resolve(uri)\n }\n }\n if (dependencies.length > 1) {\n result = ClassPledge.all(dependencies)\n } else {\n result = dependencies[0]\n }\n return result.always(function() {\n singletonEvent.emit(EVENT_POST_RESOLVE, NULL, dependencies, context)\n })\n }\n demand.configure = function(options) {\n var cache = options.cache,\n version = options.version,\n timeout = options.timeout,\n lifetime = options.lifetime,\n base = options.base,\n pattern = options.pattern,\n modules = options.modules,\n pointer = settings.modules;\n if (validatorIsTypeOf(cache, STRING_BOOLEAN)) {\n settings.cache[\"\"] = {\n weight: 0,\n state: cache\n }\n } else if (validatorIsObject(cache)) {\n functionIterate(cache, updateCacheSettings, settings.cache)\n }\n if (validatorIsTypeOf(version, STRING_STRING)) {\n settings.version = version\n }\n if (validatorIsPositive(timeout)) {\n settings.timeout = Math.min(Math.max(timeout, 2), 12) * 1e3\n }\n if (validatorIsPositive(lifetime) && lifetime > 0) {\n settings.lifetime = lifetime * 1e3\n }\n if (validatorIsTypeOf(base, STRING_STRING) && base !== \"\") {\n settings.pattern.base = new ClassPattern(\"\", base)\n }\n if (validatorIsObject(pattern)) {\n functionIterate(pattern, updatePatternSettings, settings.pattern)\n }\n if (validatorIsObject(modules)) {\n functionIterate(modules, updateModuleSettings, pointer)\n }\n return demand\n };\n demand.version = \"{{gulp:package.version}}\";\n demand.on = singletonEvent.on.bind(demand);\n demand.get = function(uri, context) {\n var dependency = ClassDependency.get(uri, context);\n return dependency && dependency.value\n };\n demand.list = ClassDependency.list;\n demand.remove = ClassDependency.remove;\n demand.cache = {\n clear: singletonCache.clear\n };\n singletonEvent.after(EVENT_CACHE_MISS, function(dependency) {\n new ClassLoader(dependency)\n }).after(EVENT_POST_REQUEST, function(dependency) {\n var pointer = dependency.handler.onPostRequest;\n pointer && pointer(dependency)\n }).after(EVENT_CACHE_HIT + \" \" + EVENT_POST_REQUEST, function(dependency) {\n singletonEvent.emit(EVENT_PRE_PROCESS, dependency.id, dependency)\n }).after(EVENT_PRE_REQUEST, function(dependency) {\n var pointer = dependency.handler.onPreRequest;\n pointer && pointer(dependency)\n }).after(EVENT_PRE_PROCESS, function(dependency) {\n var pointer = dependency.handler.onPreProcess;\n pointer && pointer(dependency);\n dependency.pledge.then(function() {\n singletonEvent.emit(EVENT_POST_PROCESS, dependency.id, dependency)\n });\n if (dependency.enqueue === true) {\n queue.enqueue(dependency)\n } else if (validatorIsInstanceOf(dependency.enqueue, ClassPledge)) {\n dependency.enqueue.then(function() {\n queue.enqueue(dependency)\n })\n }\n });\n return demand\n }();\n global.define(\"demand\", demand);\n\n function validatorIsArray(value) {\n return objectPrototypeToString.call(value) === \"[object Array]\"\n }\n provide = function provide() {\n var uri = validatorIsTypeOf(arguments[0], STRING_STRING) ? arguments[0] : NULL,\n context = this !== global ? this : NULL,\n dependencies = validatorIsArray(arguments[uri ? 1 : 0]) ? arguments[uri ? 1 : 0] : NULL,\n definition = dependencies ? arguments[uri ? 2 : 1] : arguments[uri ? 1 : 0],\n module, isFunction;\n if (!uri && processor.current) {\n module = processor.current;\n uri = module.uri;\n processor.process()\n }\n if (uri) {\n module = module || new ClassDependency(uri, context);\n isFunction = validatorIsTypeOf(definition, STRING_FUNCTION);\n if (dependencies) {\n demand.apply(module.path, dependencies).then(function() {\n module.dfd.resolve(isFunction ? definition.apply(NULL, arguments) : definition)\n }, function() {\n module.dfd.reject(new ClassFailure(ERROR_PROVIDE, module.id, arguments))\n })\n } else {\n module.dfd.resolve(isFunction ? definition() : definition)\n }\n return module.dfd.pledge\n } else {\n !validatorIsTypeOf(console, STRING_UNDEFINED) && console.error(new ClassFailure(ERROR_PROVIDE_ANONYMOUS))\n }\n };\n global.define(\"provide\", provide);\n demand.configure({\n cache: TRUE,\n base: \"/\",\n pattern: {\n \"/demand\": functionResolveUrl((options && options.url || location.href) + \"/../\").slice(0, -1)\n }\n });\n options && options.settings && demand.configure(options.settings);\n\n function functionHash(input) {\n var value = 5381,\n i = input.length;\n while (i) {\n value = value * 33 ^ input.charCodeAt(--i)\n }\n return value >>> 0\n }\n\n function AbstractUuid() {\n if (validatorIsTypeOf(this.uuid, STRING_UNDEFINED)) {\n this.define(\"uuid\", functionUuid())\n }\n return this\n }\n var ClassQueue = function() {\n var storage = new ClassWeakmap;\n\n function ClassQueue() {\n var self = AbstractUuid.call(this);\n storage.set(self, []);\n return self\n }\n ClassQueue.prototype = {\n enqueue: function() {\n storage.set(this, storage.get(this).concat(functionToArray(arguments)));\n singletonEvent.emit(EVENT_QUEUE_ENQUEUE, this.uuid)\n },\n dequeue: function() {\n singletonEvent.emit(EVENT_QUEUE_DEQUEUE, this.uuid);\n return storage.get(this).shift()\n },\n get current() {\n return storage.get(this)[0]\n },\n get length() {\n return storage.get(this).length\n }\n };\n return ClassQueue.extends(AbstractUuid)\n }();\n var ClassProcessor = function() {\n var storage = new ClassWeakmap;\n\n function ClassProcessor(queue) {\n var self = this,\n properties = {\n queue: queue,\n current: NULL\n };\n storage.set(self, properties);\n demand.on(EVENT_QUEUE_ENQUEUE + \":\" + queue.uuid, function() {\n !properties.current && self.process()\n })\n }\n ClassProcessor.prototype = {\n process: function() {\n var properties = storage.get(this),\n current;\n if (properties.queue.length) {\n current = properties.current = properties.queue.dequeue();\n if (!current.pledge.isRejected()) {\n current.handler.process && current.handler.process(current);\n return\n }\n }\n properties.current = NULL\n },\n get current() {\n return storage.get(this).current\n }\n };\n return ClassProcessor\n }();\n\n function functionResolveSourcemaps(url, source) {\n var match, replacement;\n while (match = regexMatchSourcemap.exec(source)) {\n linkElement.href = url;\n if (regexIsAbsoluteUri.test(match[2])) {\n replacement = linkElement.protocol + \"//\" + linkElement.host + match[3]\n } else {\n linkElement.pathname += \"/../\" + match[3];\n replacement = linkElement.protocol + \"//\" + linkElement.host + linkElement.pathname\n }\n source = source.replace(match[0], match[1] + \" \" + match[2] + \"=\" + replacement + \".map\" + (match[4] ? \" \" + match[4] : \"\"))\n }\n return source\n }\n\n function abstractHandler() {}\n abstractHandler.prototype = {\n validate: NULL,\n onPreRequest: NULL,\n onPostRequest: NULL,\n onPreProcess: NULL,\n process: NULL\n };\n var handlerModule = function() {\n var suffix = \".js\",\n target = document.getElementsByTagName(\"head\")[0],\n regexMatchType = /^(application|text)\\/(x-)?javascript/;\n\n function HandlerModule() {}\n HandlerModule.prototype = {\n validate: function(type) {\n return regexMatchType.test(type)\n },\n onPreRequest: function(dependency) {\n var pathname = dependency.url.pathname;\n dependency.url.pathname = pathname.slice(-suffix.length) !== suffix ? pathname + suffix : pathname\n },\n onPostRequest: function(dependency) {\n dependency.source = functionResolveSourcemaps(dependency.url, dependency.source)\n },\n process: function(dependency) {\n var script;\n if (dependency.source) {\n script = document.createElement(\"script\");\n script.async = TRUE;\n script.text = dependency.source;\n script.setAttribute(DEMAND_ID + \"-id\", dependency.id);\n target.appendChild(script)\n }\n }\n };\n return new(HandlerModule.extends(abstractHandler))\n }();\n\n function ClassFailure(message, module, stack) {\n var self = this;\n self.message = message;\n module && (self.module = module);\n stack && (self.stack = functionToArray(stack));\n return self\n }\n ClassFailure.prototype = {\n toString: function() {\n var self = this,\n result = DEMAND_ID + \": \" + self.message + \" \" + (self.module ? '\"' + self.module + '\"' : \"\");\n if (self.stack) {\n result = ClassFailure.traverse(self.stack, result, 1)\n }\n return result\n }\n };\n ClassFailure.traverse = function(stack, value, depth) {\n var indention = new Array(depth + 1).join(\" \"),\n i = 0,\n item;\n for (; item = stack[i]; i++) {\n value += \"\\n\" + indention + \"> \" + item.message + \" \" + (item.module ? '\"' + item.module + '\"' : \"\");\n if (item.stack) {\n value = ClassFailure.traverse(item.stack, value, depth + 1)\n }\n }\n return value\n };\n var handlerBundle = function() {\n var path = MODULE_PREFIX_HANDLER + \"bundle\",\n settings = {};\n demand.on(EVENT_POST_CONFIGURE + \":\" + path, function(options) {\n if (validatorIsObject(options)) {\n settings = options;\n functionIterate(settings, updateDependencies)\n }\n });\n\n function updateDependencies(uri, dependencies) {\n var i, dependency;\n for (i = 0; dependency = dependencies[i]; i++) {\n if (validatorIsTypeOf(dependency, STRING_STRING)) {\n dependencies[i] = functionResolveId(dependency)\n }\n }\n }\n\n function getType(dependencies) {\n var type, i = 0,\n temp;\n for (; temp = dependencies[i]; i++) {\n temp = temp.match(regexMatchParameter);\n temp = temp && temp[3] || settings.handler;\n if (type) {\n if (temp !== type) {\n return FALSE\n }\n } else {\n type = temp\n }\n }\n return type\n }\n\n function HandlerBundle() {}\n HandlerBundle.prototype = {\n validate: handlerModule.validate,\n onPreProcess: function(dependency) {\n var source = dependency.source,\n dfd = dependency.dfd,\n dependencies = settings[dependency.path],\n type, match, pledges, temp, i;\n dependency.enqueue = FALSE;\n\n function reject() {\n dfd.reject(new ClassFailure(ERROR_RESOLVE, dependency.id, arguments))\n }\n if (dependencies && (type = getType(dependencies))) {\n while (match = regexMatchSourcemap.exec(source)) {\n source = source.replace(match[0], \"\")\n }\n dependency.source = source;\n pledges = [];\n for (i = 0; temp = dependencies[i]; i++) {\n pledges.push(ClassDependency.resolve(MOCK_PREFIX + temp).pledge)\n }\n ClassPledge.all(pledges).then(function() {\n pledges.length = 0;\n for (i = 0; temp = dependencies[i]; i++) {\n temp = dependencies[i] = ClassDependency.get(temp) || new ClassDependency(temp);\n temp.handler = arguments[i];\n pledges.push(temp.pledge)\n }\n if (type === \"module\") {\n queue.enqueue.apply(queue, dependencies);\n handlerModule.process(dependency)\n } else {\n handlerModule.process(dependency);\n queue.enqueue.apply(queue, dependencies)\n }\n ClassPledge.all(pledges).then(dfd.resolve, reject)\n }, reject)\n } else {\n reject()\n }\n }\n };\n return new(HandlerBundle.extends(abstractHandler))\n }();\n var handlerComponent = function() {\n var suffix = \".html\",\n regexMatchType = /^text\\/.+$/;\n\n function HandlerComponent() {}\n HandlerComponent.prototype = {\n validate: function(type) {\n return regexMatchType.test(type)\n },\n onPreRequest: function(dependency) {\n var pathname = dependency.url.pathname;\n dependency.url.pathname = pathname.slice(-suffix.length) !== suffix ? pathname + suffix : pathname\n },\n onPostRequest: function(dependency) {\n dependency.source = functionResolveSourcemaps(dependency.url, dependency.source)\n },\n onPreProcess: function(dependency) {\n var context = dependency.path,\n dfd = dependency.dfd,\n container = document.createElement(\"body\"),\n modules = [],\n pledges = [],\n node, handler, path, uri;\n dependency.enqueue = FALSE;\n container.innerHTML = dependency.source;\n\n function reject() {\n dfd.reject(new ClassFailure(ERROR_RESOLVE, dependency.id, arguments))\n }\n while (node = container.firstElementChild) {\n if (handler = node.getAttribute(\"type\")) {\n path = node.getAttribute(\"path\");\n uri = handler + \"!\" + context + (path ? \"/\" + path : \"\");\n node.parentNode.removeChild(node);\n modules.push({\n source: node.textContent,\n uri: uri\n });\n pledges.push(ClassDependency.resolve(\"mock:\" + uri).pledge)\n }\n }\n ClassPledge.all(pledges).then(function() {\n var i = 0,\n module, dependency;\n pledges.length = 0;\n for (; module = modules[i]; i++) {\n dependency = ClassDependency.get(module.uri) || new ClassDependency(module.uri);\n dependency.source = functionResolveSourcemaps(dependency.url, module.source);\n dependency.handler = arguments[i];\n pledges.push(dependency.pledge);\n queue.enqueue(dependency)\n }\n ClassPledge.all(pledges).then(dfd.resolve, reject)\n }, reject)\n }\n };\n return new(HandlerComponent.extends(abstractHandler))\n }();\n var pluginGenie = function() {\n var path = MODULE_PREFIX_PLUGIN + \"genie\",\n pattern = [];\n\n function matchPattern(path) {\n var i = 0,\n pointer, match;\n for (; pointer = pattern[i]; i++) {\n if (path.indexOf(pointer.prefix) === 0 && (!match || pointer.weight > match.weight)) {\n match = pointer\n }\n }\n return match\n }\n\n function generateConfiguration(bundle) {\n var matches = bundle.matches,\n configuration = {\n pattern: {},\n modules: {\n \"/demand/handler/bundle\": {}\n }\n },\n i = 0,\n pointer, dependency;\n configuration.pattern[bundle.id] = bundle.fn(matches);\n configuration.modules[MODULE_PREFIX_HANDLER + \"bundle\"][bundle.id] = pointer = [];\n for (; dependency = matches[i]; i++) {\n pointer.push(dependency.path)\n }\n return configuration\n }\n\n function resolveDependencies() {\n var i = 0,\n dependency;\n for (; dependency = this[i]; i++) {\n dependency.dfd.resolve(arguments[i])\n }\n }\n\n function rejectDependencies() {\n var i = 0,\n dependency;\n for (; dependency = this[i]; i++) {\n dependency.dfd.reject(new ClassFailure(ERROR_RESOLVE, dependency.id))\n }\n }\n\n function addPattern(property, value) {\n pattern.push({\n prefix: property,\n weight: property.length,\n fn: value\n })\n }\n\n function resolveBundles(property, value) {\n var matches = value.matches,\n i = 0,\n dependency;\n if (matches.length > 1) {\n value.id = path + \"/\" + functionHash(JSON.stringify(value.matches));\n for (; dependency = matches[i]; i++) {\n matches[i] = new ClassDependency(dependency.uri)\n }\n demand.configure(generateConfiguration(value));\n demand(\"bundle!\" + value.id).then(resolveDependencies.bind(matches), rejectDependencies.bind(matches))\n }\n }\n demand.on(EVENT_POST_CONFIGURE + \":\" + path, function(options) {\n if (validatorIsObject(options)) {\n pattern.length = 0;\n functionIterate(options, addPattern)\n }\n }).on(EVENT_PRE_RESOLVE, function(dependencies, context) {\n var bundles = {},\n i = 0,\n dependency, pattern;\n for (; dependency = dependencies[i]; i++) {\n if (validatorIsTypeOf(dependency, STRING_STRING) && !regexMatchInternal.test(dependency) && !ClassDependency.get(dependency, context)) {\n dependency = new ClassDependency(dependency, context, FALSE);\n if (dependency.type === \"module\" && (pattern = matchPattern(dependency.path)) && !singletonCache.get(dependency)) {\n (bundles[pattern.prefix] || (bundles[pattern.prefix] = {\n fn: pattern.fn,\n matches: []\n })).matches.push(dependency)\n }\n }\n }\n functionIterate(bundles, resolveBundles)\n });\n return TRUE\n }();\n queue = new ClassQueue;\n processor = new ClassProcessor(queue);\n\n function assignModule(id, module) {\n provide(id, function() {\n return module\n })\n }\n assignModule(MODULE_PREFIX_ABSTRACT + \"uuid\", AbstractUuid);\n assignModule(MODULE_PREFIX_ABSTRACT + \"handler\", abstractHandler);\n assignModule(MODULE_PREFIX_HANDLER + \"module\", handlerModule);\n assignModule(MODULE_PREFIX_HANDLER + \"bundle\", handlerBundle);\n assignModule(MODULE_PREFIX_HANDLER + \"component\", handlerComponent);\n assignModule(MODULE_PREFIX_PLUGIN + \"genie\", pluginGenie);\n assignModule(MODULE_PREFIX_VALIDATOR + \"isTypeOf\", validatorIsTypeOf);\n assignModule(MODULE_PREFIX_VALIDATOR + \"isArray\", validatorIsArray);\n assignModule(MODULE_PREFIX_VALIDATOR + \"isObject\", validatorIsObject);\n assignModule(MODULE_PREFIX_VALIDATOR + \"isInstanceOf\", validatorIsInstanceOf);\n assignModule(MODULE_PREFIX_FUNCTION + \"resolveUrl\", functionResolveUrl);\n assignModule(MODULE_PREFIX_FUNCTION + \"resolveSourcemaps\", functionResolveSourcemaps);\n assignModule(MODULE_PREFIX_FUNCTION + \"merge\", functionMerge);\n assignModule(MODULE_PREFIX_FUNCTION + \"iterate\", functionIterate);\n assignModule(MODULE_PREFIX_FUNCTION + \"hash\", functionHash);\n assignModule(MODULE_PREFIX_FUNCTION + \"defer\", functionDefer);\n assignModule(MODULE_PREFIX_FUNCTION + \"uuid\", functionUuid);\n assignModule(MODULE_PREFIX + \"weakmap\", ClassWeakmap);\n assignModule(MODULE_PREFIX + \"descriptor\", ClassDescriptor);\n assignModule(MODULE_PREFIX + \"pledge\", ClassPledge);\n assignModule(MODULE_PREFIX + \"queue\", ClassQueue);\n assignModule(MODULE_PREFIX + \"xhr\", ClassXhr);\n assignModule(MODULE_PREFIX + \"failure\", ClassFailure);\n if (options && options.main) {\n switch (typeof options.main) {\n case STRING_STRING:\n demand(options.main);\n break;\n case STRING_FUNCTION:\n provide(\"main\", options.main());\n break\n }\n }\n})(this.name === \"demand-loader\" ? parent : this, setTimeout, clearTimeout);"]} \ No newline at end of file diff --git a/dist/handler/css.js b/dist/handler/css.js index 7f25aff..ea15161 100644 --- a/dist/handler/css.js +++ b/dist/handler/css.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +/**! Qoopido.demand 5.0.0 | 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/css.js.map b/dist/handler/css.js.map index 63a2049..c6c5e24 100644 --- a/dist/handler/css.js.map +++ b/dist/handler/css.js.map @@ -1 +1 @@ -{"version":3,"sources":["handler/css.js"],"names":["document","provide","abstractHandler","functionResolveSourcemaps","target","getElementsByTagName","resolver","createElement","regexMatchUrl","regexMatchImport","regexIsAbsolutePath","regexIsAbsoluteUri","regexMatchType","resolveUrl","url","href","replaceUri","source","match","replacement","test","replace","HandlerCss","prototype","validate","type","onPreRequest","dependency","pathname","slice","length","onPostRequest","base","host","exec","process","element","querySelector","id","setAttribute","appendChild","tagName","styleSheet","cssText","textContent","extends"],"mappings":";CAA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Ac,UAC9BkB,KAAO,WAEfW,EAAQG,aAAa,YAAaZ,EAAWW,IAC7ClC,EAAOoC,YAAYJ,IAGG,UAApBA,EAAQK,UACPL,EAAQM,WACVN,EAAQM,WAAWC,QAAUhB,EAAWV,OAExCmB,EAAQQ,YAAcjB,EAAWV,QAInChB,QAAQ,WAAa,OAAOmC,MAIvB,IAAKd,EAAWuB,QAAQ3C,MA9EjC,CAkFEF","file":"css.js","sourcesContent":["(function(document) {\n\t'use strict';\n\n\tfunction definition(abstractHandler, functionResolveSourcemaps) {\n\t\tvar suffix = '.css',\n\t\t\ttarget = document.getElementsByTagName('head')[0],\n\t\t\tresolver = document.createElement('a'),\n\t\t\tregexMatchUrl = /url\\s*\\(\\s*[\"']?(.+?)[\"']?\\s*\\)/gi,\n\t\t\tregexMatchImport = /@import\\s+[\"'](.+?)[\"']/gi,\n\t\t\tregexIsAbsolutePath = /^\\//i,\n\t\t\tregexIsAbsoluteUri = /^data:|http(s?):|\\/\\//i,\n\t\t\tregexMatchType = /^text\\/css/;\n\n\t\tfunction resolveUrl(url) {\n\t\t\tresolver.href = url;\n\n\t\t\treturn resolver;\n\t\t}\n\n\t\tfunction replaceUri(source, match, replacement) {\n\t\t\tif(!regexIsAbsoluteUri.test(match[1])) {\n\t\t\t\tsource = source.replace(match[0], replacement);\n\t\t\t}\n\n\t\t\treturn source;\n\t\t}\n\n\t\tfunction HandlerCss() {}\n\n\t\tHandlerCss.prototype = {\n\t\t\tvalidate: function(type) {\n\t\t\t\treturn regexMatchType.test(type);\n\t\t\t},\n\t\t\tonPreRequest: function(dependency) {\n\t\t\t\tvar pathname = dependency.url.pathname;\n\t\t\t\t\n\t\t\t\tdependency.url.pathname = pathname.slice(-suffix.length) !== suffix ? pathname + suffix : pathname;\n\t\t\t},\n\t\t\tonPostRequest: function(dependency) {\n\t\t\t\tvar url = resolveUrl(dependency.url + '/..'),\n\t\t\t\t\tbase = url.href,\n\t\t\t\t\thost = '//' + url.host,\n\t\t\t\t\tsource = dependency.source,\n\t\t\t\t\tmatch;\n\n\t\t\t\twhile((match = regexMatchUrl.exec(source))) {\n\t\t\t\t\tsource = replaceUri(source, match, 'url(\"' + resolveUrl(regexIsAbsolutePath.test(match[1]) ? host + match[1] : base + match[1]).href + '\")');\n\t\t\t\t}\n\n\t\t\t\twhile((match = regexMatchImport.exec(source))) {\n\t\t\t\t\tsource = replaceUri(source, match, '@import \"' + resolveUrl(regexIsAbsolutePath.test(match[1]) ? host + match[1] : base + match[1]).href + '\"');\n\t\t\t\t}\n\n\t\t\t\tdependency.source = functionResolveSourcemaps(dependency.url, source);\n\t\t\t},\n\t\t\tprocess: function(dependency) {\n\t\t\t\tvar element = document.querySelector('[demand-id=\"' + dependency.id + '\"]');\n\n\t\t\t\tif(!element) {\n\t\t\t\t\telement = document.createElement('style');\n\t\t\t\t\telement.type = 'text/css';\n\n\t\t\t\t\telement.setAttribute('demand-id', dependency.id);\n\t\t\t\t\ttarget.appendChild(element);\n\t\t\t\t}\n\n\t\t\t\tif(element.tagName === 'STYLE') {\n\t\t\t\t\tif(element.styleSheet) {\n\t\t\t\t\t\telement.styleSheet.cssText = dependency.source;\n\t\t\t\t\t} else {\n\t\t\t\t\t\telement.textContent = dependency.source;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tprovide(function() { return element; });\n\t\t\t}\n\t\t};\n\n\t\treturn new (HandlerCss.extends(abstractHandler));\n\t}\n\n\tprovide([ '/demand/abstract/handler', '/demand/function/resolveSourcemaps' ], definition);\n}(document));"]} \ No newline at end of file +{"version":3,"sources":["handler/css.js"],"names":["document","provide","abstractHandler","functionResolveSourcemaps","target","getElementsByTagName","resolver","createElement","regexMatchUrl","regexMatchImport","regexIsAbsolutePath","regexIsAbsoluteUri","regexMatchType","resolveUrl","url","href","replaceUri","source","match","replacement","test","replace","HandlerCss","prototype","validate","type","onPreRequest","dependency","pathname","slice","length","onPostRequest","base","host","exec","process","element","querySelector","id","setAttribute","appendChild","tagName","styleSheet","cssText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,EAAUpC,EAASO,cAAc,UACzBkB,KAAO,WACfW,EAAQG,aAAa,YAAaZ,EAAWW,IAC7ClC,EAAOoC,YAAYJ,IAEC,UAApBA,EAAQK,UACJL,EAAQM,WACRN,EAAQM,WAAWC,QAAUhB,EAAWV,OAExCmB,EAAQQ,YAAcjB,EAAWV,QAGzChB,QAAQ,WACJ,OAAOmC,MAIZ,IAAId,EAAWuB,QAAQ3C,MApEtC,CAuEGF","file":"css.js","sourcesContent":["(function(document) {\n \"use strict\";\n\n function definition(abstractHandler, functionResolveSourcemaps) {\n var suffix = \".css\",\n target = document.getElementsByTagName(\"head\")[0],\n resolver = document.createElement(\"a\"),\n regexMatchUrl = /url\\s*\\(\\s*[\"']?(.+?)[\"']?\\s*\\)/gi,\n regexMatchImport = /@import\\s+[\"'](.+?)[\"']/gi,\n regexIsAbsolutePath = /^\\//i,\n regexIsAbsoluteUri = /^data:|http(s?):|\\/\\//i,\n regexMatchType = /^text\\/css/;\n\n function resolveUrl(url) {\n resolver.href = url;\n return resolver\n }\n\n function replaceUri(source, match, replacement) {\n if (!regexIsAbsoluteUri.test(match[1])) {\n source = source.replace(match[0], replacement)\n }\n return source\n }\n\n function HandlerCss() {}\n HandlerCss.prototype = {\n validate: function(type) {\n return regexMatchType.test(type)\n },\n onPreRequest: function(dependency) {\n var pathname = dependency.url.pathname;\n dependency.url.pathname = pathname.slice(-suffix.length) !== suffix ? pathname + suffix : pathname\n },\n onPostRequest: function(dependency) {\n var url = resolveUrl(dependency.url + \"/..\"),\n base = url.href,\n host = \"//\" + url.host,\n source = dependency.source,\n match;\n while (match = regexMatchUrl.exec(source)) {\n source = replaceUri(source, match, 'url(\"' + resolveUrl(regexIsAbsolutePath.test(match[1]) ? host + match[1] : base + match[1]).href + '\")')\n }\n while (match = regexMatchImport.exec(source)) {\n source = replaceUri(source, match, '@import \"' + resolveUrl(regexIsAbsolutePath.test(match[1]) ? host + match[1] : base + match[1]).href + '\"')\n }\n dependency.source = functionResolveSourcemaps(dependency.url, source)\n },\n process: function(dependency) {\n var element = document.querySelector('[demand-id=\"' + dependency.id + '\"]');\n if (!element) {\n element = document.createElement(\"style\");\n element.type = \"text/css\";\n element.setAttribute(\"demand-id\", dependency.id);\n target.appendChild(element)\n }\n if (element.tagName === \"STYLE\") {\n if (element.styleSheet) {\n element.styleSheet.cssText = dependency.source\n } else {\n element.textContent = dependency.source\n }\n }\n provide(function() {\n return element\n })\n }\n };\n return new(HandlerCss.extends(abstractHandler))\n }\n provide([\"/demand/abstract/handler\", \"/demand/function/resolveSourcemaps\"], definition)\n})(document);"]} \ No newline at end of file diff --git a/dist/handler/html.js b/dist/handler/html.js index 95ac472..ff889ff 100644 --- a/dist/handler/html.js +++ b/dist/handler/html.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +/**! Qoopido.demand 5.0.0 | 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/html.js.map b/dist/handler/html.js.map index e2d89ff..2e10766 100644 --- a/dist/handler/html.js.map +++ b/dist/handler/html.js.map @@ -1 +1 @@ -{"version":3,"sources":["handler/html.js"],"names":["provide","abstractHandler","regexMatchType","container","document","createElement","HandlerHtml","prototype","validate","type","test","onPreRequest","dependency","pathname","url","slice","length","process","source","node","fragment","createDocumentFragment","innerHTML","firstElementChild","appendChild","parseHtml","extends"],"mappings":";CAAC,WACA,aAuCAA,SAAU,4BArCV,SAAoBC,GACnB,IACCC,EAAiB,cACjBC,EAAiBC,SAASC,cAAc,QAezC,SAASC,KAgBT,OAdAA,EAAYC,WACXC,SAAU,SAASC,GAClB,OAAOP,EAAeQ,KAAKD,IAE5BE,aAAc,SAASC,GACtB,IAAIC,EAAWD,EAAWE,IAAID,SAE9BD,EAAWE,IAAID,SA1BI,UA0BOA,EAASE,OA1BhB,QA0B8BC,QAAqBH,EA1BnD,QA0BuEA,GAE3FI,QAAS,SAASL,GACjBZ,QAAQ,WAAa,OAzBvB,SAAmBkB,GAClB,IACCC,EADGC,EAAWhB,SAASiB,yBAKxB,IAFAlB,EAAUmB,UAAYJ,EAEhBC,EAAOhB,EAAUoB,mBACtBH,EAASI,YAAYL,GAGtB,OAAOC,EAesBK,CAAUb,EAAWM,YAI5C,IAAKZ,EAAYoB,QAAQzB,MArClC","file":"html.js","sourcesContent":["(function() {\n\t'use strict';\n\n\tfunction definition(abstractHandler) {\n\t\tvar suffix = '.html',\n\t\t\tregexMatchType = /^text\\/html/,\n\t\t\tcontainer = document.createElement('body');\n\n\t\tfunction parseHtml(source) {\n\t\t\tvar fragment = document.createDocumentFragment(),\n\t\t\t\tnode;\n\n\t\t\tcontainer.innerHTML = source;\n\n\t\t\twhile(node = container.firstElementChild) {\n\t\t\t\tfragment.appendChild(node);\n\t\t\t}\n\n\t\t\treturn fragment;\n\t\t}\n\n\t\tfunction HandlerHtml() {}\n\n\t\tHandlerHtml.prototype = {\n\t\t\tvalidate: function(type) {\n\t\t\t\treturn regexMatchType.test(type);\n\t\t\t},\n\t\t\tonPreRequest: function(dependency) {\n\t\t\t\tvar pathname = dependency.url.pathname;\n\t\t\t\t\n\t\t\t\tdependency.url.pathname = pathname.slice(-suffix.length) !== suffix ? pathname + suffix : pathname;\n\t\t\t},\n\t\t\tprocess: function(dependency) {\n\t\t\t\tprovide(function() { return parseHtml(dependency.source); });\n\t\t\t}\n\t\t};\n\n\t\treturn new (HandlerHtml.extends(abstractHandler));\n\t}\n\n\tprovide([ '/demand/abstract/handler' ], definition);\n}());"]} \ No newline at end of file +{"version":3,"sources":["handler/html.js"],"names":["provide","abstractHandler","regexMatchType","container","document","createElement","HandlerHtml","prototype","validate","type","test","onPreRequest","dependency","pathname","url","slice","length","process","source","node","fragment","createDocumentFragment","innerHTML","firstElementChild","appendChild","parseHtml","extends"],"mappings":";CAAA,WACI,aAkCAA,SAAS,4BAhCT,SAAoBC,GAChB,IACIC,EAAiB,cACjBC,EAAYC,SAASC,cAAc,QAYvC,SAASC,KAeT,OAdAA,EAAYC,WACRC,SAAU,SAASC,GACf,OAAOP,EAAeQ,KAAKD,IAE/BE,aAAc,SAASC,GACnB,IAAIC,EAAWD,EAAWE,IAAID,SAC9BD,EAAWE,IAAID,SArBV,UAqBqBA,EAASE,OArB9B,QAqB4CC,QAAqBH,EArBjE,QAqBqFA,GAE9FI,QAAS,SAASL,GACdZ,QAAQ,WACJ,OArBZ,SAAmBkB,GACf,IACIC,EADAC,EAAWhB,SAASiB,yBAGxB,IADAlB,EAAUmB,UAAYJ,EACfC,EAAOhB,EAAUoB,mBACpBH,EAASI,YAAYL,GAEzB,OAAOC,EAcQK,CAAUb,EAAWM,YAIjC,IAAIZ,EAAYoB,QAAQzB,MAjCvC","file":"html.js","sourcesContent":["(function() {\n \"use strict\";\n\n function definition(abstractHandler) {\n var suffix = \".html\",\n regexMatchType = /^text\\/html/,\n container = document.createElement(\"body\");\n\n function parseHtml(source) {\n var fragment = document.createDocumentFragment(),\n node;\n container.innerHTML = source;\n while (node = container.firstElementChild) {\n fragment.appendChild(node)\n }\n return fragment\n }\n\n function HandlerHtml() {}\n HandlerHtml.prototype = {\n validate: function(type) {\n return regexMatchType.test(type)\n },\n onPreRequest: function(dependency) {\n var pathname = dependency.url.pathname;\n dependency.url.pathname = pathname.slice(-suffix.length) !== suffix ? pathname + suffix : pathname\n },\n process: function(dependency) {\n provide(function() {\n return parseHtml(dependency.source)\n })\n }\n };\n return new(HandlerHtml.extends(abstractHandler))\n }\n provide([\"/demand/abstract/handler\"], definition)\n})();"]} \ No newline at end of file diff --git a/dist/handler/json.js b/dist/handler/json.js index 8866bcc..1f794d0 100644 --- a/dist/handler/json.js +++ b/dist/handler/json.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +/**! Qoopido.demand 5.0.0 | 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/json.js.map b/dist/handler/json.js.map index 2d20019..094de97 100644 --- a/dist/handler/json.js.map +++ b/dist/handler/json.js.map @@ -1 +1 @@ -{"version":3,"sources":["handler/json.js"],"names":["provide","abstractHandler","regexMatchType","HandlerJson","prototype","validate","type","test","onPreRequest","dependency","pathname","url","slice","length","process","data","JSON","parse","source","extends"],"mappings":";CAAC,WACA,aA2BAA,SAAU,4BAzBV,SAAoBC,GACnB,IACCC,EAAiB,qBAElB,SAASC,KAkBT,OAhBAA,EAAYC,WACXC,SAAU,SAASC,GAClB,OAAOJ,EAAeK,KAAKD,IAE5BE,aAAc,SAASC,GACtB,IAAIC,EAAWD,EAAWE,IAAID,SAE9BD,EAAWE,IAAID,SAZI,UAYOA,EAASE,OAZhB,QAY8BC,QAAqBH,EAZnD,QAYuEA,GAE3FI,QAAS,SAASL,GACjB,IAAIM,EAAOC,KAAKC,MAAMR,EAAWS,QAEjClB,QAAQ,WAAa,OAAOe,MAIvB,IAAKZ,EAAYgB,QAAQlB,MAzBlC","file":"json.js","sourcesContent":["(function() {\n\t'use strict';\n\n\tfunction definition(abstractHandler) {\n\t\tvar suffix = '.json',\n\t\t\tregexMatchType = /^application\\/json/;\n\n\t\tfunction HandlerJson() {}\n\n\t\tHandlerJson.prototype = {\n\t\t\tvalidate: function(type) {\n\t\t\t\treturn regexMatchType.test(type);\n\t\t\t},\n\t\t\tonPreRequest: function(dependency) {\n\t\t\t\tvar pathname = dependency.url.pathname;\n\t\t\t\t\n\t\t\t\tdependency.url.pathname = pathname.slice(-suffix.length) !== suffix ? pathname + suffix : pathname;\n\t\t\t},\n\t\t\tprocess: function(dependency) {\n\t\t\t\tvar data = JSON.parse(dependency.source);\n\n\t\t\t\tprovide(function() { return data; });\n\t\t\t}\n\t\t};\n\n\t\treturn new (HandlerJson.extends(abstractHandler));\n\t}\n\n\tprovide([ '/demand/abstract/handler' ], definition);\n}());"]} \ No newline at end of file +{"version":3,"sources":["handler/json.js"],"names":["provide","abstractHandler","regexMatchType","HandlerJson","prototype","validate","type","test","onPreRequest","dependency","pathname","url","slice","length","process","data","JSON","parse","source","extends"],"mappings":";CAAA,WACI,aAwBAA,SAAS,4BAtBT,SAAoBC,GAChB,IACIC,EAAiB,qBAErB,SAASC,KAgBT,OAfAA,EAAYC,WACRC,SAAU,SAASC,GACf,OAAOJ,EAAeK,KAAKD,IAE/BE,aAAc,SAASC,GACnB,IAAIC,EAAWD,EAAWE,IAAID,SAC9BD,EAAWE,IAAID,SAVV,UAUqBA,EAASE,OAV9B,QAU4CC,QAAqBH,EAVjE,QAUqFA,GAE9FI,QAAS,SAASL,GACd,IAAIM,EAAOC,KAAKC,MAAMR,EAAWS,QACjClB,QAAQ,WACJ,OAAOe,MAIZ,IAAIZ,EAAYgB,QAAQlB,MAvBvC","file":"json.js","sourcesContent":["(function() {\n \"use strict\";\n\n function definition(abstractHandler) {\n var suffix = \".json\",\n regexMatchType = /^application\\/json/;\n\n function HandlerJson() {}\n HandlerJson.prototype = {\n validate: function(type) {\n return regexMatchType.test(type)\n },\n onPreRequest: function(dependency) {\n var pathname = dependency.url.pathname;\n dependency.url.pathname = pathname.slice(-suffix.length) !== suffix ? pathname + suffix : pathname\n },\n process: function(dependency) {\n var data = JSON.parse(dependency.source);\n provide(function() {\n return data\n })\n }\n };\n return new(HandlerJson.extends(abstractHandler))\n }\n provide([\"/demand/abstract/handler\"], definition)\n})();"]} \ No newline at end of file diff --git a/dist/handler/legacy.js b/dist/handler/legacy.js index 7ac6e3d..60880da 100644 --- a/dist/handler/legacy.js +++ b/dist/handler/legacy.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +/**! Qoopido.demand 5.0.0 | 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/legacy.js.map b/dist/handler/legacy.js.map index 022d442..01cb679 100644 --- a/dist/handler/legacy.js.map +++ b/dist/handler/legacy.js.map @@ -1 +1 @@ -{"version":3,"sources":["handler/legacy.js"],"names":["provide","path","Failure","handlerModule","isObject","settings","HandlerLegacy","demand","on","options","prototype","onPreRequest","dependency","dependencies","enqueue","apply","onPreProcess","process","boundResolve","result","dfd","this","probe","reject","bind","then","arguments","extends"],"mappings":";CAAC,WACA,aAgEAA,SAAU,OAAQ,kBAAmB,yBAA0B,8BA9D/D,SAAoBC,EAAMC,EAASC,EAAeC,GACjD,IAAIC,KAsBJ,SAASC,KAoCT,OAxDAC,OACEC,GAAG,iBAAmBP,EAAM,SAASQ,GACrCJ,EAAWD,EAASK,GAAWA,OAoBjCH,EAAcI,WACbC,aAAc,SAASC,GACtB,IAAIC,EAAeR,EAASO,EAAWX,OAASI,EAASO,EAAWX,MAAMY,aAE1EV,EAAcQ,aAAaC,GAExBC,IACFD,EAAWE,QAAUP,OAAOQ,MAAM,KAAMF,KAG1CG,aAAc,SAASJ,GACtB,IAAIC,EAAeR,EAASO,EAAWX,OAASI,EAASO,EAAWX,MAAMY,aAEvEA,GAA8C,kBAAvBD,EAAWE,UACpCF,EAAWE,QAAUP,OAAOQ,MAAM,KAAMF,KAG1CI,QAAS,SAASL,GACjB,IAAIM,EAnCN,WACC,IAGCC,EAFAC,EADWC,KACED,IACbE,EAAQjB,EAFGgB,KAEWpB,OAASI,EAFpBgB,KAEkCpB,MAAMqB,MAGpDnB,EAAcc,QALFI,MAOTC,IAAUH,EAASG,KACrBtB,QAAQ,WAAa,OAAOmB,IAE5BC,EAAIG,OAAO,IAAIrB,EAAQ,gBAVZmB,KAUkCpB,QAwBlBuB,KAAKZ,IAEN,IAAvBA,EAAWE,QACbI,IAEAN,EAAWE,QACTW,KACAP,EACA,WACCN,EAAWQ,IAAIG,OAAO,IAAIrB,EAAQ,kBAAmBU,EAAWX,KAAMyB,gBAOrE,IAAKpB,EAAcqB,QAAQxB,MA9DpC","file":"legacy.js","sourcesContent":["(function() {\n\t'use strict';\n\n\tfunction definition(path, Failure, handlerModule, isObject) {\n\t\tvar settings = {};\n\n\t\tdemand\n\t\t\t.on('postConfigure:' + path, function(options) {\n\t\t\t\tsettings = isObject(options) ? options : {};\n\t\t\t});\n\n\t\tfunction resolve() {\n\t\t\tvar self = this,\n\t\t\t\tdfd = self.dfd,\n\t\t\t\tprobe = settings[self.path] && settings[self.path].probe,\n\t\t\t\tresult;\n\n\t\t\thandlerModule.process(self);\n\n\t\t\tif(probe && (result = probe())) {\n\t\t\t\tprovide(function() { return result; });\n\t\t\t} else {\n\t\t\t\tdfd.reject(new Failure('error probing', self.path));\n\t\t\t}\n\t\t}\n\n\t\tfunction HandlerLegacy() {}\n\n\t\tHandlerLegacy.prototype = {\n\t\t\tonPreRequest: function(dependency) {\n\t\t\t\tvar dependencies = settings[dependency.path] && settings[dependency.path].dependencies;\n\n\t\t\t\thandlerModule.onPreRequest(dependency);\n\n\t\t\t\tif(dependencies) {\n\t\t\t\t\tdependency.enqueue = demand.apply(null, dependencies);\n\t\t\t\t}\n\t\t\t},\n\t\t\tonPreProcess: function(dependency) {\n\t\t\t\tvar dependencies = settings[dependency.path] && settings[dependency.path].dependencies;\n\n\t\t\t\tif(dependencies && typeof dependency.enqueue === 'boolean') {\n\t\t\t\t\tdependency.enqueue = demand.apply(null, dependencies);\n\t\t\t\t}\n\t\t\t},\n\t\t\tprocess: function(dependency) {\n\t\t\t\tvar boundResolve = resolve.bind(dependency);\n\n\t\t\t\tif(dependency.enqueue === true) {\n\t\t\t\t\tboundResolve();\n\t\t\t\t} else {\n\t\t\t\t\tdependency.enqueue\n\t\t\t\t\t\t.then(\n\t\t\t\t\t\t\tboundResolve,\n\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\tdependency.dfd.reject(new Failure('error resolving', dependency.path, arguments));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\treturn new (HandlerLegacy.extends(handlerModule));\n\t}\n\n\tprovide([ 'path', '/demand/failure', '/demand/handler/module', '/demand/validator/isObject' ], definition);\n}());"]} \ No newline at end of file +{"version":3,"sources":["handler/legacy.js"],"names":["provide","path","Failure","handlerModule","isObject","settings","HandlerLegacy","demand","on","options","prototype","onPreRequest","dependency","dependencies","enqueue","apply","onPreProcess","process","boundResolve","result","dfd","this","probe","reject","bind","then","arguments","extends"],"mappings":";CAAA,WACI,aAmDAA,SAAS,OAAQ,kBAAmB,yBAA0B,8BAjD9D,SAAoBC,EAAMC,EAASC,EAAeC,GAC9C,IAAIC,KAoBJ,SAASC,KA0BT,OA7CAC,OAAOC,GAAG,iBAAmBP,EAAM,SAASQ,GACxCJ,EAAWD,EAASK,GAAWA,OAmBnCH,EAAcI,WACVC,aAAc,SAASC,GACnB,IAAIC,EAAeR,EAASO,EAAWX,OAASI,EAASO,EAAWX,MAAMY,aAC1EV,EAAcQ,aAAaC,GACvBC,IACAD,EAAWE,QAAUP,OAAOQ,MAAM,KAAMF,KAGhDG,aAAc,SAASJ,GACnB,IAAIC,EAAeR,EAASO,EAAWX,OAASI,EAASO,EAAWX,MAAMY,aACtEA,GAA8C,kBAAvBD,EAAWE,UAClCF,EAAWE,QAAUP,OAAOQ,MAAM,KAAMF,KAGhDI,QAAS,SAASL,GACd,IAAIM,EA/BZ,WACI,IAGIC,EAFAC,EADOC,KACID,IACXE,EAAQjB,EAFDgB,KAEepB,OAASI,EAFxBgB,KAEsCpB,MAAMqB,MAEvDnB,EAAcc,QAJHI,MAKPC,IAAUH,EAASG,KACnBtB,QAAQ,WACJ,OAAOmB,IAGXC,EAAIG,OAAO,IAAIrB,EAAQ,gBAVhBmB,KAUsCpB,QAoBlBuB,KAAKZ,IACL,IAAvBA,EAAWE,QACXI,IAEAN,EAAWE,QAAQW,KAAKP,EAAc,WAClCN,EAAWQ,IAAIG,OAAO,IAAIrB,EAAQ,kBAAmBU,EAAWX,KAAMyB,gBAK/E,IAAIpB,EAAcqB,QAAQxB,MAlDzC","file":"legacy.js","sourcesContent":["(function() {\n \"use strict\";\n\n function definition(path, Failure, handlerModule, isObject) {\n var settings = {};\n demand.on(\"postConfigure:\" + path, function(options) {\n settings = isObject(options) ? options : {}\n });\n\n function resolve() {\n var self = this,\n dfd = self.dfd,\n probe = settings[self.path] && settings[self.path].probe,\n result;\n handlerModule.process(self);\n if (probe && (result = probe())) {\n provide(function() {\n return result\n })\n } else {\n dfd.reject(new Failure(\"error probing\", self.path))\n }\n }\n\n function HandlerLegacy() {}\n HandlerLegacy.prototype = {\n onPreRequest: function(dependency) {\n var dependencies = settings[dependency.path] && settings[dependency.path].dependencies;\n handlerModule.onPreRequest(dependency);\n if (dependencies) {\n dependency.enqueue = demand.apply(null, dependencies)\n }\n },\n onPreProcess: function(dependency) {\n var dependencies = settings[dependency.path] && settings[dependency.path].dependencies;\n if (dependencies && typeof dependency.enqueue === \"boolean\") {\n dependency.enqueue = demand.apply(null, dependencies)\n }\n },\n process: function(dependency) {\n var boundResolve = resolve.bind(dependency);\n if (dependency.enqueue === true) {\n boundResolve()\n } else {\n dependency.enqueue.then(boundResolve, function() {\n dependency.dfd.reject(new Failure(\"error resolving\", dependency.path, arguments))\n })\n }\n }\n };\n return new(HandlerLegacy.extends(handlerModule))\n }\n provide([\"path\", \"/demand/failure\", \"/demand/handler/module\", \"/demand/validator/isObject\"], definition)\n})();"]} \ No newline at end of file diff --git a/dist/handler/text.js b/dist/handler/text.js index 23185b7..acf7ec9 100644 --- a/dist/handler/text.js +++ b/dist/handler/text.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +/**! Qoopido.demand 5.0.0 | 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/handler/text.js.map b/dist/handler/text.js.map index 34b76f8..9fc4b3e 100644 --- a/dist/handler/text.js.map +++ b/dist/handler/text.js.map @@ -1 +1 @@ -{"version":3,"sources":["handler/text.js"],"names":["provide","abstractHandler","regexMatchType","HandlerText","prototype","validate","type","test","process","dependency","source","extends"],"mappings":";CAAC,WACA,aAmBAA,SAAU,4BAjBV,SAAoBC,GACnB,IAAIC,EAAiB,YAErB,SAASC,KAWT,OATAA,EAAYC,WACXC,SAAU,SAASC,GAClB,OAAOJ,EAAeK,KAAKD,IAE5BE,QAAS,SAASC,GACjBT,QAAQ,WAAa,OAAOS,EAAWC,WAIlC,IAAKP,EAAYQ,QAAQV,MAjBlC","file":"text.js","sourcesContent":["(function() {\n\t'use strict';\n\n\tfunction definition(abstractHandler) {\n\t\tvar regexMatchType = /^text\\/.+/;\n\n\t\tfunction HandlerText() {}\n\n\t\tHandlerText.prototype = {\n\t\t\tvalidate: function(type) {\n\t\t\t\treturn regexMatchType.test(type);\n\t\t\t},\n\t\t\tprocess: function(dependency) {\n\t\t\t\tprovide(function() { return dependency.source; });\n\t\t\t}\n\t\t};\n\n\t\treturn new (HandlerText.extends(abstractHandler));\n\t}\n\n\tprovide([ '/demand/abstract/handler' ], definition);\n}());"]} \ No newline at end of file +{"version":3,"sources":["handler/text.js"],"names":["provide","abstractHandler","regexMatchType","HandlerText","prototype","validate","type","test","process","dependency","source","extends"],"mappings":";CAAA,WACI,aAkBAA,SAAS,4BAhBT,SAAoBC,GAChB,IAAIC,EAAiB,YAErB,SAASC,KAWT,OAVAA,EAAYC,WACRC,SAAU,SAASC,GACf,OAAOJ,EAAeK,KAAKD,IAE/BE,QAAS,SAASC,GACdT,QAAQ,WACJ,OAAOS,EAAWC,WAIvB,IAAIP,EAAYQ,QAAQV,MAjBvC","file":"text.js","sourcesContent":["(function() {\n \"use strict\";\n\n function definition(abstractHandler) {\n var regexMatchType = /^text\\/.+/;\n\n function HandlerText() {}\n HandlerText.prototype = {\n validate: function(type) {\n return regexMatchType.test(type)\n },\n process: function(dependency) {\n provide(function() {\n return dependency.source\n })\n }\n };\n return new(HandlerText.extends(abstractHandler))\n }\n provide([\"/demand/abstract/handler\"], definition)\n})();"]} \ No newline at end of file diff --git a/dist/plugin/cookie.js b/dist/plugin/cookie.js index 69e69bd..3ecb9b0 100644 --- a/dist/plugin/cookie.js +++ b/dist/plugin/cookie.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +/**! Qoopido.demand 5.0.0 | 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/cookie.js.map b/dist/plugin/cookie.js.map index fec9c07..4f84e65 100644 --- a/dist/plugin/cookie.js.map +++ b/dist/plugin/cookie.js.map @@ -1 +1 @@ -{"version":3,"sources":["plugin/cookie.js"],"names":["document","provide","path","iterate","isObject","isTypeOf","enabled","past","pattern","setCookie","dependency","value","expiration","pointer","match","i","indexOf","weight","state","isEnabled","cookie","type","encodeURIComponent","demand","on","options","length","key","push","JSON","stringify"],"mappings":";CAAC,SAASA,GACT,aAmDAC,SAAU,OAAQ,2BAA4B,6BAA8B,8BAjD5E,SAAoBC,EAAMC,EAASC,EAAUC,GAC5C,IAGCC,EAHGC,EAAU,gCAEbC,KAyBD,SAASC,EAAUC,EAAYC,EAAOC,IAClCN,GAKJ,SAAmBJ,GAGlB,IAFA,IAAWW,EAASC,EAAhBC,EAAI,EAEDF,EAAUL,EAAQO,GAAKA,IACQ,IAAlCb,EAAKc,QAAQH,EAAQL,YAAoBM,GAASD,EAAQI,OAASH,EAAMG,UAC3EH,EAAQD,GAIV,QAAOC,GAAQA,EAAMI,MAdPC,CAAUT,EAAWR,SAClCF,EAASoB,OAAS,UAAYV,EAAWW,KAAO,KAAOX,EAAWR,KAAO,KAAOoB,mBAAmBX,GAAS,aAAeC,EAAa,YAgB1I,OAxCAW,OACCC,GAAG,iBAAmBtB,EAAM,SAASuB,GACjCrB,EAASqB,IACXjB,EAAQkB,OAAS,EAEjBvB,EAAQsB,EAAS,SAASE,EAAKhB,GAC9BH,EAAQoB,MAAOpB,QAASmB,EAAKV,OAAQU,EAAID,OAAQR,MAAOP,OAEhDN,EAASoB,EAAS,aAC3BnB,EAAUmB,KAGXD,GAAG,YAAa,SAASd,GACzBD,EAAUC,EAAY,GAAIH,KAE1BiB,GAAG,aAAc,SAASd,GAC1BD,EAAUC,EAAY,GAAIH,KAE1BiB,GAAG,YAAa,SAASd,EAAYQ,GACrCT,EAAUC,EAAYmB,KAAKC,UAAUZ,GAvB5B,oCA4CJ,IAjDT,CAqDElB","file":"cookie.js","sourcesContent":["(function(document) {\n\t'use strict';\n\n\tfunction definition(path, iterate, isObject, isTypeOf) {\n\t\tvar past = 'Thu, 01 Jan 1970 00:00:00 GMT',\n\t\t\tfuture = 'Fri, 31 Dec 9999 23:59:59 GMT',\n\t\t\tpattern = [],\n\t\t\tenabled;\n\t\t\n\t\tdemand.\n\t\t\ton('postConfigure:' + path, function(options) {\n\t\t\t\tif(isObject(options)) {\n\t\t\t\t\tpattern.length = 0;\n\n\t\t\t\t\titerate(options, function(key, value) {\n\t\t\t\t\t\tpattern.push({ pattern: key, weight: key.length, state: value });\n\t\t\t\t\t});\n\t\t\t\t} else if(isTypeOf(options, 'boolean')) {\n\t\t\t\t\tenabled = options;\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('cacheMiss', function(dependency) {\n\t\t\t\tsetCookie(dependency, '', past);\n\t\t\t})\n\t\t\t.on('cacheClear', function(dependency) {\n\t\t\t\tsetCookie(dependency, '', past);\n\t\t\t})\n\t\t\t.on('postCache', function(dependency, state) {\n\t\t\t\tsetCookie(dependency, JSON.stringify(state), future);\n\t\t\t});\n\n\t\tfunction setCookie(dependency, value, expiration) {\n\t\t\tif(enabled || isEnabled(dependency.path)) {\n\t\t\t\tdocument.cookie = 'demand[' + dependency.type + '][' + dependency.path + ']=' + encodeURIComponent(value) + '; expires=' + expiration + '; path=/';\n\t\t\t}\n\t\t}\n\n\t\tfunction isEnabled(path) {\n\t\t\tvar i = 0, pointer, match;\n\n\t\t\tfor(; (pointer = pattern[i]); i++) {\n\t\t\t\tif(path.indexOf(pointer.pattern) === 0 && (!match || pointer.weight > match.weight)) {\n\t\t\t\t\tmatch = pointer;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn match ? match.state : false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tprovide([ 'path', '/demand/function/iterate', '/demand/validator/isObject', '/demand/validator/isTypeOf' ], definition);\n}(document));"]} \ No newline at end of file +{"version":3,"sources":["plugin/cookie.js"],"names":["document","provide","path","iterate","isObject","isTypeOf","enabled","past","pattern","setCookie","dependency","value","expiration","pointer","match","i","indexOf","weight","state","isEnabled","cookie","type","encodeURIComponent","demand","on","options","length","key","push","JSON","stringify"],"mappings":";CAAA,SAAUA,GACN,aA8CAC,SAAS,OAAQ,2BAA4B,6BAA8B,8BA5C3E,SAAoBC,EAAMC,EAASC,EAAUC,GACzC,IAGIC,EAHAC,EAAO,gCAEPC,KAuBJ,SAASC,EAAUC,EAAYC,EAAOC,IAC9BN,GAKR,SAAmBJ,GAGf,IAFA,IACIW,EAASC,EADTC,EAAI,EAEDF,EAAUL,EAAQO,GAAIA,IACa,IAAlCb,EAAKc,QAAQH,EAAQL,YAAoBM,GAASD,EAAQI,OAASH,EAAMG,UACzEH,EAAQD,GAGhB,QAAOC,GAAQA,EAAMI,MAbNC,CAAUT,EAAWR,SAChCF,EAASoB,OAAS,UAAYV,EAAWW,KAAO,KAAOX,EAAWR,KAAO,KAAOoB,mBAAmBX,GAAS,aAAeC,EAAa,YAchJ,OArCAW,OAAOC,GAAG,iBAAmBtB,EAAM,SAASuB,GACpCrB,EAASqB,IACTjB,EAAQkB,OAAS,EACjBvB,EAAQsB,EAAS,SAASE,EAAKhB,GAC3BH,EAAQoB,MACJpB,QAASmB,EACTV,OAAQU,EAAID,OACZR,MAAOP,OAGRN,EAASoB,EAAS,aACzBnB,EAAUmB,KAEfD,GAAG,YAAa,SAASd,GACxBD,EAAUC,EAAY,GAAIH,KAC3BiB,GAAG,aAAc,SAASd,GACzBD,EAAUC,EAAY,GAAIH,KAC3BiB,GAAG,YAAa,SAASd,EAAYQ,GACpCT,EAAUC,EAAYmB,KAAKC,UAAUZ,GArB5B,oCAwCN,IA7Cf,CAgDGlB","file":"cookie.js","sourcesContent":["(function(document) {\n \"use strict\";\n\n function definition(path, iterate, isObject, isTypeOf) {\n var past = \"Thu, 01 Jan 1970 00:00:00 GMT\",\n future = \"Fri, 31 Dec 9999 23:59:59 GMT\",\n pattern = [],\n enabled;\n demand.on(\"postConfigure:\" + path, function(options) {\n if (isObject(options)) {\n pattern.length = 0;\n iterate(options, function(key, value) {\n pattern.push({\n pattern: key,\n weight: key.length,\n state: value\n })\n })\n } else if (isTypeOf(options, \"boolean\")) {\n enabled = options\n }\n }).on(\"cacheMiss\", function(dependency) {\n setCookie(dependency, \"\", past)\n }).on(\"cacheClear\", function(dependency) {\n setCookie(dependency, \"\", past)\n }).on(\"postCache\", function(dependency, state) {\n setCookie(dependency, JSON.stringify(state), future)\n });\n\n function setCookie(dependency, value, expiration) {\n if (enabled || isEnabled(dependency.path)) {\n document.cookie = \"demand[\" + dependency.type + \"][\" + dependency.path + \"]=\" + encodeURIComponent(value) + \"; expires=\" + expiration + \"; path=/\"\n }\n }\n\n function isEnabled(path) {\n var i = 0,\n pointer, match;\n for (; pointer = pattern[i]; i++) {\n if (path.indexOf(pointer.pattern) === 0 && (!match || pointer.weight > match.weight)) {\n match = pointer\n }\n }\n return match ? match.state : false\n }\n return true\n }\n provide([\"path\", \"/demand/function/iterate\", \"/demand/validator/isObject\", \"/demand/validator/isTypeOf\"], definition)\n})(document);"]} \ No newline at end of file diff --git a/dist/plugin/lzstring.js b/dist/plugin/lzstring.js index 818601c..6a90c72 100644 --- a/dist/plugin/lzstring.js +++ b/dist/plugin/lzstring.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +/**! Qoopido.demand 5.0.0 | 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/lzstring.js.map b/dist/plugin/lzstring.js.map index 8766722..402163f 100644 --- a/dist/plugin/lzstring.js.map +++ b/dist/plugin/lzstring.js.map @@ -1 +1 @@ -{"version":3,"sources":["../vendor/lz-string/libs/lz-string.js"],"names":["LZString","f","String","fromCharCode","keyStrBase64","keyStrUriSafe","baseReverseDic","getBaseValue","alphabet","character","i","length","charAt","compressToBase64","input","res","_compress","a","decompressFromBase64","_decompress","index","compressToUTF16","decompressFromUTF16","compressed","charCodeAt","compressToUint8Array","uncompressed","compress","buf","Uint8Array","TotalLen","current_value","decompressFromUint8Array","undefined","decompress","Array","result","forEach","c","push","join","compressToEncodedURIComponent","decompressFromEncodedURIComponent","replace","bitsPerChar","getCharFromInt","value","ii","context_dictionary","context_dictionaryToCreate","context_c","context_wc","context_w","context_enlargeIn","context_dictSize","context_numBits","context_data","context_data_val","context_data_position","Object","prototype","hasOwnProperty","call","Math","pow","resetValue","getNextValue","w","bits","resb","maxpower","power","dictionary","enlargeIn","dictSize","numBits","entry","data","val","position","define","amd","module","exports","angular","factory","global","provide","path","iterate","isObject","isTypeOf","pattern","weight","state","storage","isEnabled","pointer","match","indexOf","demand","on","options","key","dependency","id","source","this"],"mappings":";AASA,IAAAA,SAAA,WAGA,IAAAC,EAAAC,OAAAC,aACAC,EAAA,oEACAC,EAAA,oEACAC,KAEA,SAAAC,EAAAC,EAAAC,GACA,IAAAH,EAAAE,GAAA,CACAF,EAAAE,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ACAO,EAAAS,EAAAC,KAAA,KAGAJ,GAAA,WAAA,SAAAG,GACAR,EAAAQ,EAAAhB,QACAgB,EAAAE,OAAApB,EAAAtF,SAAAqB,gBAAAmF,EAAAE,WAGAL,GAAA,aAAA,SAAAG,GACAT,EAAAS,EAAAC,MACAD,EAAAE,OAAApB,EAAAtF,SAAAsB,oBAAAkF,EAAAE,YAgBA,IA/CA,CAmDAC","file":"lzstring.js","sourcesContent":["// Copyright (c) 2013 Pieroxy \n// This work is free. You can redistribute it and/or modify it\n// under the terms of the WTFPL, Version 2\n// For more information see LICENSE.txt or http://www.wtfpl.net/\n//\n// For more information, the home page:\n// http://pieroxy.net/blog/pages/lz-string/testing.html\n//\n// LZ-based compression algorithm, version 1.4.4\nvar LZString = (function() {\n\n// private property\nvar f = String.fromCharCode;\nvar keyStrBase64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\nvar keyStrUriSafe = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$\";\nvar baseReverseDic = {};\n\nfunction getBaseValue(alphabet, character) {\n if (!baseReverseDic[alphabet]) {\n baseReverseDic[alphabet] = {};\n for (var i=0 ; i>> 8;\n buf[i*2+1] = current_value % 256;\n }\n return buf;\n },\n\n //decompress from uint8array (UCS-2 big endian format)\n decompressFromUint8Array:function (compressed) {\n if (compressed===null || compressed===undefined){\n return LZString.decompress(compressed);\n } else {\n var buf=new Array(compressed.length/2); // 2 bytes per character\n for (var i=0, TotalLen=buf.length; i> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n // Add wc to the dictionary.\n context_dictionary[context_wc] = context_dictSize++;\n context_w = String(context_c);\n }\n }\n\n // Output the code for w.\n if (context_w !== \"\") {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n }\n\n // Mark the end of the stream\n value = 2;\n for (i=0 ; i> 1;\n }\n\n // Flush the last char\n while (true) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data.push(getCharFromInt(context_data_val));\n break;\n }\n else context_data_position++;\n }\n return context_data.join('');\n },\n\n decompress: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 32768, function(index) { return compressed.charCodeAt(index); });\n },\n\n _decompress: function (length, resetValue, getNextValue) {\n var dictionary = [],\n next,\n enlargeIn = 4,\n dictSize = 4,\n numBits = 3,\n entry = \"\",\n result = [],\n i,\n w,\n bits, resb, maxpower, power,\n c,\n data = {val:getNextValue(0), position:resetValue, index:1};\n\n for (i = 0; i < 3; i += 1) {\n dictionary[i] = i;\n }\n\n bits = 0;\n maxpower = Math.pow(2,2);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (next = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 2:\n return \"\";\n }\n dictionary[3] = c;\n w = c;\n result.push(c);\n while (true) {\n if (data.index > length) {\n return \"\";\n }\n\n bits = 0;\n maxpower = Math.pow(2,numBits);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (c = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 2:\n return result.join('');\n }\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n if (dictionary[c]) {\n entry = dictionary[c];\n } else {\n if (c === dictSize) {\n entry = w + w.charAt(0);\n } else {\n return null;\n }\n }\n result.push(entry);\n\n // Add w+entry[0] to the dictionary.\n dictionary[dictSize++] = w + entry.charAt(0);\n enlargeIn--;\n\n w = entry;\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n }\n }\n};\n return LZString;\n})();\n\nif (typeof define === 'function' && define.amd) {\n define(function () { return LZString; });\n} else if( typeof module !== 'undefined' && module != null ) {\n module.exports = LZString\n} else if( typeof angular !== 'undefined' && angular != null ) {\n angular.module('LZString', [])\n .factory('LZString', function () {\n return LZString;\n });\n}\n"]} \ No newline at end of file +{"version":3,"sources":["plugin/lzstring.js"],"names":["LZString","f","String","fromCharCode","keyStrBase64","keyStrUriSafe","baseReverseDic","getBaseValue","alphabet","character","i","length","charAt","compressToBase64","input","res","_compress","a","decompressFromBase64","_decompress","index","compressToUTF16","decompressFromUTF16","compressed","charCodeAt","compressToUint8Array","uncompressed","compress","buf","Uint8Array","TotalLen","current_value","decompressFromUint8Array","undefined","decompress","Array","result","forEach","c","push","join","compressToEncodedURIComponent","decompressFromEncodedURIComponent","replace","bitsPerChar","getCharFromInt","value","ii","context_dictionary","context_dictionaryToCreate","context_c","context_wc","context_w","context_enlargeIn","context_dictSize","context_numBits","context_data","context_data_val","context_data_position","Object","prototype","hasOwnProperty","call","Math","pow","resetValue","getNextValue","w","bits","resb","maxpower","power","dictionary","enlargeIn","dictSize","numBits","entry","data","val","position","define","amd","module","exports","angular","factory","global","provide","path","iterate","isObject","isTypeOf","pattern","weight","state","storage","isEnabled","pointer","match","indexOf","demand","on","options","key","dependency","id","source","this"],"mappings":";AAAA,IAAIA,SAAW,WACX,IAAIC,EAAIC,OAAOC,aACXC,EAAe,oEACfC,EAAgB,oEAChBC,KAEJ,SAASC,EAAaC,EAAUC,GAC5B,IAAKH,EAAeE,GAAW,CAC3BF,EAAeE,MACf,IAAK,IAAIE,EAAI,EAAGA,EAAIF,EAASG,O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C,GAAQA,EAAMJ,MAEzB,OAzCAM,OAAOC,GAAG,iBAAmBb,EAAM,SAASc,GACpCZ,EAASY,IACTV,EAAQjF,OAAS,EACjB8E,EAAQa,EAAS,SAASC,EAAKzD,GAC3B8C,EAAQrD,MACJqD,QAASW,EACTV,OAAQU,EAAI5F,OACZmF,MAAOhD,OAGR6C,EAASW,EAAS,YACzBV,EAAQrD,MACJqD,QAAS,GACTC,OAAQ,EACRC,MAAOQ,MAGhBD,GAAG,WAAY,SAASG,GACnBR,EAAUQ,EAAWhB,QACrBO,EAAQS,EAAWC,KAAM,KAE9BJ,GAAG,WAAY,SAASG,GACnBR,EAAUQ,EAAWhB,QACrBgB,EAAWE,OAASpB,EAAOtF,SAASqB,gBAAgBmF,EAAWE,WAEpEL,GAAG,aAAc,SAASG,GACrBT,EAAQS,EAAWC,MACnBD,EAAWE,OAASpB,EAAOtF,SAASsB,oBAAoBkF,EAAWE,YAcpE,IAnDd,CAsDEC","file":"lzstring.js","sourcesContent":["var LZString = function() {\n var f = String.fromCharCode;\n var keyStrBase64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n var keyStrUriSafe = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$\";\n var baseReverseDic = {};\n\n function getBaseValue(alphabet, character) {\n if (!baseReverseDic[alphabet]) {\n baseReverseDic[alphabet] = {};\n for (var i = 0; i < alphabet.length; i++) {\n baseReverseDic[alphabet][alphabet.charAt(i)] = i\n }\n }\n return baseReverseDic[alphabet][character]\n }\n var LZString = {\n compressToBase64: function(input) {\n if (input == null) return \"\";\n var res = LZString._compress(input, 6, function(a) {\n return keyStrBase64.charAt(a)\n });\n switch (res.length % 4) {\n default:\n case 0:\n return res;\n case 1:\n return res + \"===\";\n case 2:\n return res + \"==\";\n case 3:\n return res + \"=\"\n }\n },\n decompressFromBase64: function(input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n return LZString._decompress(input.length, 32, function(index) {\n return getBaseValue(keyStrBase64, input.charAt(index))\n })\n },\n compressToUTF16: function(input) {\n if (input == null) return \"\";\n return LZString._compress(input, 15, function(a) {\n return f(a + 32)\n }) + \" \"\n },\n decompressFromUTF16: function(compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 16384, function(index) {\n return compressed.charCodeAt(index) - 32\n })\n },\n compressToUint8Array: function(uncompressed) {\n var compressed = LZString.compress(uncompressed);\n var buf = new Uint8Array(compressed.length * 2);\n for (var i = 0, TotalLen = compressed.length; i < TotalLen; i++) {\n var current_value = compressed.charCodeAt(i);\n buf[i * 2] = current_value >>> 8;\n buf[i * 2 + 1] = current_value % 256\n }\n return buf\n },\n decompressFromUint8Array: function(compressed) {\n if (compressed === null || compressed === undefined) {\n return LZString.decompress(compressed)\n } else {\n var buf = new Array(compressed.length / 2);\n for (var i = 0, TotalLen = buf.length; i < TotalLen; i++) {\n buf[i] = compressed[i * 2] * 256 + compressed[i * 2 + 1]\n }\n var result = [];\n buf.forEach(function(c) {\n result.push(f(c))\n });\n return LZString.decompress(result.join(\"\"))\n }\n },\n compressToEncodedURIComponent: function(input) {\n if (input == null) return \"\";\n return LZString._compress(input, 6, function(a) {\n return keyStrUriSafe.charAt(a)\n })\n },\n decompressFromEncodedURIComponent: function(input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n input = input.replace(/ /g, \"+\");\n return LZString._decompress(input.length, 32, function(index) {\n return getBaseValue(keyStrUriSafe, input.charAt(index))\n })\n },\n compress: function(uncompressed) {\n return LZString._compress(uncompressed, 16, function(a) {\n return f(a)\n })\n },\n _compress: function(uncompressed, bitsPerChar, getCharFromInt) {\n if (uncompressed == null) return \"\";\n var i, value, context_dictionary = {},\n context_dictionaryToCreate = {},\n context_c = \"\",\n context_wc = \"\",\n context_w = \"\",\n context_enlargeIn = 2,\n context_dictSize = 3,\n context_numBits = 2,\n context_data = [],\n context_data_val = 0,\n context_data_position = 0,\n ii;\n for (ii = 0; ii < uncompressed.length; ii += 1) {\n context_c = uncompressed.charAt(ii);\n if (!Object.prototype.hasOwnProperty.call(context_dictionary, context_c)) {\n context_dictionary[context_c] = context_dictSize++;\n context_dictionaryToCreate[context_c] = true\n }\n context_wc = context_w + context_c;\n if (Object.prototype.hasOwnProperty.call(context_dictionary, context_wc)) {\n context_w = context_wc\n } else {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate, context_w)) {\n if (context_w.charCodeAt(0) < 256) {\n for (i = 0; i < context_numBits; i++) {\n context_data_val = context_data_val << 1;\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0\n } else {\n context_data_position++\n }\n }\n value = context_w.charCodeAt(0);\n for (i = 0; i < 8; i++) {\n context_data_val = context_data_val << 1 | value & 1;\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0\n } else {\n context_data_position++\n }\n value = value >> 1\n }\n } else {\n value = 1;\n for (i = 0; i < context_numBits; i++) {\n context_data_val = context_data_val << 1 | value;\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0\n } else {\n context_data_position++\n }\n value = 0\n }\n value = context_w.charCodeAt(0);\n for (i = 0; i < 16; i++) {\n context_data_val = context_data_val << 1 | value & 1;\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0\n } else {\n context_data_position++\n }\n value = value >> 1\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++\n }\n delete context_dictionaryToCreate[context_w]\n } else {\n value = context_dictionary[context_w];\n for (i = 0; i < context_numBits; i++) {\n context_data_val = context_data_val << 1 | value & 1;\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0\n } else {\n context_data_position++\n }\n value = value >> 1\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++\n }\n context_dictionary[context_wc] = context_dictSize++;\n context_w = String(context_c)\n }\n }\n if (context_w !== \"\") {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate, context_w)) {\n if (context_w.charCodeAt(0) < 256) {\n for (i = 0; i < context_numBits; i++) {\n context_data_val = context_data_val << 1;\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0\n } else {\n context_data_position++\n }\n }\n value = context_w.charCodeAt(0);\n for (i = 0; i < 8; i++) {\n context_data_val = context_data_val << 1 | value & 1;\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0\n } else {\n context_data_position++\n }\n value = value >> 1\n }\n } else {\n value = 1;\n for (i = 0; i < context_numBits; i++) {\n context_data_val = context_data_val << 1 | value;\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0\n } else {\n context_data_position++\n }\n value = 0\n }\n value = context_w.charCodeAt(0);\n for (i = 0; i < 16; i++) {\n context_data_val = context_data_val << 1 | value & 1;\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0\n } else {\n context_data_position++\n }\n value = value >> 1\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++\n }\n delete context_dictionaryToCreate[context_w]\n } else {\n value = context_dictionary[context_w];\n for (i = 0; i < context_numBits; i++) {\n context_data_val = context_data_val << 1 | value & 1;\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0\n } else {\n context_data_position++\n }\n value = value >> 1\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++\n }\n }\n value = 2;\n for (i = 0; i < context_numBits; i++) {\n context_data_val = context_data_val << 1 | value & 1;\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0\n } else {\n context_data_position++\n }\n value = value >> 1\n }\n while (true) {\n context_data_val = context_data_val << 1;\n if (context_data_position == bitsPerChar - 1) {\n context_data.push(getCharFromInt(context_data_val));\n break\n } else context_data_position++\n }\n return context_data.join(\"\")\n },\n decompress: function(compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 32768, function(index) {\n return compressed.charCodeAt(index)\n })\n },\n _decompress: function(length, resetValue, getNextValue) {\n var dictionary = [],\n next, enlargeIn = 4,\n dictSize = 4,\n numBits = 3,\n entry = \"\",\n result = [],\n i, w, bits, resb, maxpower, power, c, data = {\n val: getNextValue(0),\n position: resetValue,\n index: 1\n };\n for (i = 0; i < 3; i += 1) {\n dictionary[i] = i\n }\n bits = 0;\n maxpower = Math.pow(2, 2);\n power = 1;\n while (power != maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++)\n }\n bits |= (resb > 0 ? 1 : 0) * power;\n power <<= 1\n }\n switch (next = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2, 8);\n power = 1;\n while (power != maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++)\n }\n bits |= (resb > 0 ? 1 : 0) * power;\n power <<= 1\n }\n c = f(bits);\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2, 16);\n power = 1;\n while (power != maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++)\n }\n bits |= (resb > 0 ? 1 : 0) * power;\n power <<= 1\n }\n c = f(bits);\n break;\n case 2:\n return \"\"\n }\n dictionary[3] = c;\n w = c;\n result.push(c);\n while (true) {\n if (data.index > length) {\n return \"\"\n }\n bits = 0;\n maxpower = Math.pow(2, numBits);\n power = 1;\n while (power != maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++)\n }\n bits |= (resb > 0 ? 1 : 0) * power;\n power <<= 1\n }\n switch (c = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2, 8);\n power = 1;\n while (power != maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++)\n }\n bits |= (resb > 0 ? 1 : 0) * power;\n power <<= 1\n }\n dictionary[dictSize++] = f(bits);\n c = dictSize - 1;\n enlargeIn--;\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2, 16);\n power = 1;\n while (power != maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++)\n }\n bits |= (resb > 0 ? 1 : 0) * power;\n power <<= 1\n }\n dictionary[dictSize++] = f(bits);\n c = dictSize - 1;\n enlargeIn--;\n break;\n case 2:\n return result.join(\"\")\n }\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++\n }\n if (dictionary[c]) {\n entry = dictionary[c]\n } else {\n if (c === dictSize) {\n entry = w + w.charAt(0)\n } else {\n return null\n }\n }\n result.push(entry);\n dictionary[dictSize++] = w + entry.charAt(0);\n enlargeIn--;\n w = entry;\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++\n }\n }\n }\n };\n return LZString\n}();\nif (typeof define === \"function\" && define.amd) {\n define(function() {\n return LZString\n })\n} else if (typeof module !== \"undefined\" && module != null) {\n module.exports = LZString\n} else if (typeof angular !== \"undefined\" && angular != null) {\n angular.module(\"LZString\", []).factory(\"LZString\", function() {\n return LZString\n })\n}(function(global) {\n \"use strict\";\n\n function definition(path, iterate, isObject, isTypeOf) {\n var pattern = [{\n pattern: path,\n weight: path.length,\n state: false\n }],\n storage = {};\n demand.on(\"postConfigure:\" + path, function(options) {\n if (isObject(options)) {\n pattern.length = 0;\n iterate(options, function(key, value) {\n pattern.push({\n pattern: key,\n weight: key.length,\n state: value\n })\n })\n } else if (isTypeOf(options, \"boolean\")) {\n pattern.push({\n pattern: \"\",\n weight: 0,\n state: options\n })\n }\n }).on(\"cacheHit\", function(dependency) {\n if (isEnabled(dependency.path)) {\n storage[dependency.id] = true\n }\n }).on(\"preCache\", function(dependency) {\n if (isEnabled(dependency.path)) {\n dependency.source = global.LZString.compressToUTF16(dependency.source)\n }\n }).on(\"preProcess\", function(dependency) {\n if (storage[dependency.id]) {\n dependency.source = global.LZString.decompressFromUTF16(dependency.source)\n }\n });\n\n function isEnabled(path) {\n var i = 0,\n pointer, match;\n for (; pointer = pattern[i]; i++) {\n if (path.indexOf(pointer.pattern) === 0 && (!match || pointer.weight > match.weight)) {\n match = pointer\n }\n }\n return match ? match.state : false\n }\n return true\n }\n provide([\"path\", \"/demand/function/iterate\", \"/demand/validator/isObject\", \"/demand/validator/isTypeOf\"], definition)\n})(this);"]} \ No newline at end of file diff --git a/dist/plugin/sri.js b/dist/plugin/sri.js index c19a1a6..5eca9a8 100644 --- a/dist/plugin/sri.js +++ b/dist/plugin/sri.js @@ -1,3 +1,3 @@ -/**! Qoopido.demand 4.2.8 | https://github.com/dlueth/qoopido.demand | (c) 2018 Dirk Lueth */ +/**! Qoopido.demand 5.0.0 | 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} existingPacked A packed int array of bytes to\n\t * append the results to\n\t * @param {number} existingPackedLen The number of bits in the existingPacked\n\t * array\n\t * @param {number} bigEndianMod Modifier for whether hash function is\n\t * big or small endian\n\t * @return {{value : Array, binLen : number}} Hash list where\n\t * \"value\" contains the output number array and \"binLen\" is the binary\n\t * length of \"value\"\n\t */\n\tfunction str2packed(str, utfType, existingPacked, existingPackedLen, bigEndianMod)\n\t{\n\t\tvar packed, codePnt, codePntArr, byteCnt = 0, i, j, existingByteLen,\n\t\t\tintOffset, byteOffset, shiftModifier, transposeBytes;\n\n\t\tpacked = existingPacked || [0];\n\t\texistingPackedLen = existingPackedLen || 0;\n\t\texistingByteLen = existingPackedLen >>> 3;\n\n\t\tif (\"UTF8\" === utfType)\n\t\t{\n\t\t\tshiftModifier = (bigEndianMod === -1) ? 3 : 0;\n\t\t\tfor (i = 0; i < str.length; i += 1)\n\t\t\t{\n\t\t\t\tcodePnt = str.charCodeAt(i);\n\t\t\t\tcodePntArr = [];\n\n\t\t\t\tif (0x80 > codePnt)\n\t\t\t\t{\n\t\t\t\t\tcodePntArr.push(codePnt);\n\t\t\t\t}\n\t\t\t\telse if (0x800 > codePnt)\n\t\t\t\t{\n\t\t\t\t\tcodePntArr.push(0xC0 | (codePnt >>> 6));\n\t\t\t\t\tcodePntArr.push(0x80 | (codePnt & 0x3F));\n\t\t\t\t}\n\t\t\t\telse if ((0xd800 > codePnt) || (0xe000 <= codePnt)) {\n\t\t\t\t\tcodePntArr.push(\n\t\t\t\t\t\t0xe0 | (codePnt >>> 12),\n\t\t\t\t\t\t0x80 | ((codePnt >>> 6) & 0x3f),\n\t\t\t\t\t\t0x80 | (codePnt & 0x3f)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ti += 1;\n\t\t\t\t\tcodePnt = 0x10000 + (((codePnt & 0x3ff) << 10) | (str.charCodeAt(i) & 0x3ff));\n\t\t\t\t\tcodePntArr.push(\n\t\t\t\t\t\t0xf0 | (codePnt >>> 18),\n\t\t\t\t\t\t0x80 | ((codePnt >>> 12) & 0x3f),\n\t\t\t\t\t\t0x80 | ((codePnt >>> 6) & 0x3f),\n\t\t\t\t\t\t0x80 | (codePnt & 0x3f)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tfor (j = 0; j < codePntArr.length; j += 1)\n\t\t\t\t{\n\t\t\t\t\tbyteOffset = byteCnt + existingByteLen;\n\t\t\t\t\tintOffset = byteOffset >>> 2;\n\t\t\t\t\twhile (packed.length <= intOffset)\n\t\t\t\t\t{\n\t\t\t\t\t\tpacked.push(0);\n\t\t\t\t\t}\n\t\t\t\t\t/* Known bug kicks in here */\n\t\t\t\t\tpacked[intOffset] |= codePntArr[j] << (8 * (shiftModifier + bigEndianMod * (byteOffset % 4)));\n\t\t\t\t\tbyteCnt += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if ((\"UTF16BE\" === utfType) || \"UTF16LE\" === utfType)\n\t\t{\n\t\t\tshiftModifier = (bigEndianMod === -1) ? 2 : 0;\n\t\t\t/* Internally strings are UTF-16BE so transpose bytes under two conditions:\n\t\t\t\t* need LE and not switching endianness due to SHA-3\n\t\t\t\t* need BE and switching endianness due to SHA-3 */\n\t\t\ttransposeBytes = ((\"UTF16LE\" === utfType) && (bigEndianMod !== 1)) || ((\"UTF16LE\" !== utfType) && (bigEndianMod === 1));\n\t\t\tfor (i = 0; i < str.length; i += 1)\n\t\t\t{\n\t\t\t\tcodePnt = str.charCodeAt(i);\n\t\t\t\tif (transposeBytes === true)\n\t\t\t\t{\n\t\t\t\t\tj = codePnt & 0xFF;\n\t\t\t\t\tcodePnt = (j << 8) | (codePnt >>> 8);\n\t\t\t\t}\n\n\t\t\t\tbyteOffset = byteCnt + existingByteLen;\n\t\t\t\tintOffset = byteOffset >>> 2;\n\t\t\t\twhile (packed.length <= intOffset)\n\t\t\t\t{\n\t\t\t\t\tpacked.push(0);\n\t\t\t\t}\n\t\t\t\tpacked[intOffset] |= codePnt << (8 * (shiftModifier + bigEndianMod * (byteOffset % 4)));\n\t\t\t\tbyteCnt += 2;\n\t\t\t}\n\t\t}\n\t\treturn {\"value\" : packed, \"binLen\" : byteCnt * 8 + existingPackedLen};\n\t}\n\n\t/**\n\t * Convert a hex string to an array of big-endian words\n\t *\n\t * @private\n\t * @param {string} str String to be converted to binary representation\n\t * @param {Array} existingPacked A packed int array of bytes to\n\t * append the results to\n\t * @param {number} existingPackedLen The number of bits in the existingPacked\n\t * array\n\t * @param {number} bigEndianMod Modifier for whether hash function is\n\t * big or small endian\n\t * @return {{value : Array, binLen : number}} Hash list where\n\t * \"value\" contains the output number array and \"binLen\" is the binary\n\t * length of \"value\"\n\t */\n\tfunction hex2packed(str, existingPacked, existingPackedLen, bigEndianMod)\n\t{\n\t\tvar packed, length = str.length, i, num, intOffset, byteOffset,\n\t\t\texistingByteLen, shiftModifier;\n\n\t\tif (0 !== (length % 2))\n\t\t{\n\t\t\tthrow new Error(\"String of HEX type must be in byte increments\");\n\t\t}\n\n\t\tpacked = existingPacked || [0];\n\t\texistingPackedLen = existingPackedLen || 0;\n\t\texistingByteLen = existingPackedLen >>> 3;\n\t\tshiftModifier = (bigEndianMod === -1) ? 3 : 0;\n\n\t\tfor (i = 0; i < length; i += 2)\n\t\t{\n\t\t\tnum = parseInt(str.substr(i, 2), 16);\n\t\t\tif (!isNaN(num))\n\t\t\t{\n\t\t\t\tbyteOffset = (i >>> 1) + existingByteLen;\n\t\t\t\tintOffset = byteOffset >>> 2;\n\t\t\t\twhile (packed.length <= intOffset)\n\t\t\t\t{\n\t\t\t\t\tpacked.push(0);\n\t\t\t\t}\n\t\t\t\tpacked[intOffset] |= num << (8 * (shiftModifier + bigEndianMod * (byteOffset % 4)));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Error(\"String of HEX type contains invalid characters\");\n\t\t\t}\n\t\t}\n\n\t\treturn {\"value\" : packed, \"binLen\" : length * 4 + existingPackedLen};\n\t}\n\n\t/**\n\t * Convert a string of raw bytes to an array of big-endian words\n\t *\n\t * @private\n\t * @param {string} str String of raw bytes to be converted to binary representation\n\t * @param {Array} existingPacked A packed int array of bytes to\n\t * append the results to\n\t * @param {number} existingPackedLen The number of bits in the existingPacked\n\t * array\n\t * @param {number} bigEndianMod Modifier for whether hash function is\n\t * big or small endian\n\t * @return {{value : Array, binLen : number}} Hash list where\n\t * \"value\" contains the output number array and \"binLen\" is the binary\n\t * length of \"value\"\n\t */\n\tfunction bytes2packed(str, existingPacked, existingPackedLen, bigEndianMod)\n\t{\n\t\tvar packed, codePnt, i, existingByteLen, intOffset,\n\t\t\tbyteOffset, shiftModifier;\n\n\t\tpacked = existingPacked || [0];\n\t\texistingPackedLen = existingPackedLen || 0;\n\t\texistingByteLen = existingPackedLen >>> 3;\n\t\tshiftModifier = (bigEndianMod === -1) ? 3 : 0;\n\n\t\tfor (i = 0; i < str.length; i += 1)\n\t\t{\n\t\t\tcodePnt = str.charCodeAt(i);\n\n\t\t\tbyteOffset = i + existingByteLen;\n\t\t\tintOffset = byteOffset >>> 2;\n\t\t\tif (packed.length <= intOffset)\n\t\t\t{\n\t\t\t\tpacked.push(0);\n\t\t\t}\n\t\t\tpacked[intOffset] |= codePnt << (8 * (shiftModifier + bigEndianMod * (byteOffset % 4)));\n\t\t}\n\n\t\treturn {\"value\" : packed, \"binLen\" : str.length * 8 + existingPackedLen};\n\t}\n\n\t/**\n\t * Convert a base-64 string to an array of big-endian words\n\t *\n\t * @private\n\t * @param {string} str String to be converted to binary representation\n\t * @param {Array} existingPacked A packed int array of bytes to\n\t * append the results to\n\t * @param {number} existingPackedLen The number of bits in the existingPacked\n\t * array\n\t * @param {number} bigEndianMod Modifier for whether hash function is\n\t * big or small endian\n\t * @return {{value : Array, binLen : number}} Hash list where\n\t * \"value\" contains the output number array and \"binLen\" is the binary\n\t * length of \"value\"\n\t */\n\tfunction b642packed(str, existingPacked, existingPackedLen, bigEndianMod)\n\t{\n\t\tvar packed, byteCnt = 0, index, i, j, tmpInt, strPart, firstEqual,\n\t\t\tb64Tab = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",\n\t\t\texistingByteLen, intOffset, byteOffset, shiftModifier;\n\n\t\tif (-1 === str.search(/^[a-zA-Z0-9=+\\/]+$/))\n\t\t{\n\t\t\tthrow new Error(\"Invalid character in base-64 string\");\n\t\t}\n\n\t\tfirstEqual = str.indexOf(\"=\");\n\t\tstr = str.replace(/\\=/g, \"\");\n\t\tif ((-1 !== firstEqual) && (firstEqual < str.length))\n\t\t{\n\t\t\tthrow new Error(\"Invalid '=' found in base-64 string\");\n\t\t}\n\n\t\tpacked = existingPacked || [0];\n\t\texistingPackedLen = existingPackedLen || 0;\n\t\texistingByteLen = existingPackedLen >>> 3;\n\t\tshiftModifier = (bigEndianMod === -1) ? 3 : 0;\n\n\t\tfor (i = 0; i < str.length; i += 4)\n\t\t{\n\t\t\tstrPart = str.substr(i, 4);\n\t\t\ttmpInt = 0;\n\n\t\t\tfor (j = 0; j < strPart.length; j += 1)\n\t\t\t{\n\t\t\t\tindex = b64Tab.indexOf(strPart[j]);\n\t\t\t\ttmpInt |= index << (18 - (6 * j));\n\t\t\t}\n\n\t\t\tfor (j = 0; j < strPart.length - 1; j += 1)\n\t\t\t{\n\t\t\t\tbyteOffset = byteCnt + existingByteLen;\n\t\t\t\tintOffset = byteOffset >>> 2;\n\t\t\t\twhile (packed.length <= intOffset)\n\t\t\t\t{\n\t\t\t\t\tpacked.push(0);\n\t\t\t\t}\n\t\t\t\tpacked[intOffset] |= ((tmpInt >>> (16 - (j * 8))) & 0xFF) <<\n\t\t\t\t\t(8 * (shiftModifier + bigEndianMod * (byteOffset % 4)));\n\t\t\t\tbyteCnt += 1;\n\t\t\t}\n\t\t}\n\n\t\treturn {\"value\" : packed, \"binLen\" : byteCnt * 8 + existingPackedLen};\n\t}\n\n\t/**\n\t * Convert an ArrayBuffer to an array of big-endian words\n\t *\n\t * @private\n\t * @param {ArrayBuffer} arr ArrayBuffer to be converted to binary\n\t * representation\n\t * @param {Array} existingPacked A packed int array of bytes to\n\t * append the results to\n\t * @param {number} existingPackedLen The number of bits in the existingPacked\n\t * array\n\t * @param {number} bigEndianMod Modifier for whether hash function is\n\t * big or small endian\n\t * @return {{value : Array, binLen : number}} Hash list where\n\t * \"value\" contains the output number array and \"binLen\" is the binary\n\t * length of \"value\"\n\t */\n\tfunction arraybuffer2packed(arr, existingPacked, existingPackedLen, bigEndianMod)\n\t{\n\t\tvar packed, i, existingByteLen, intOffset, byteOffset, shiftModifier, arrView;\n\n\t\tpacked = existingPacked || [0];\n\t\texistingPackedLen = existingPackedLen || 0;\n\t\texistingByteLen = existingPackedLen >>> 3;\n\t\tshiftModifier = (bigEndianMod === -1) ? 3 : 0;\n\t\tarrView = new Uint8Array(arr);\n\n\t\tfor (i = 0; i < arr.byteLength; i += 1)\n\t\t{\n\t\t\tbyteOffset = i + existingByteLen;\n\t\t\tintOffset = byteOffset >>> 2;\n\t\t\tif (packed.length <= intOffset)\n\t\t\t{\n\t\t\t\tpacked.push(0);\n\t\t\t}\n\t\t\tpacked[intOffset] |= arrView[i] << (8 * (shiftModifier + bigEndianMod * (byteOffset % 4)));\n\t\t}\n\n\t\treturn {\"value\" : packed, \"binLen\" : arr.byteLength * 8 + existingPackedLen};\n\t}\n\n\t/**\n\t * Convert an array of big-endian words to a hex string.\n\t *\n\t * @private\n\t * @param {Array} packed Array of integers to be converted to\n\t * hexidecimal representation\n\t * @param {number} outputLength Length of output in bits\n\t * @param {number} bigEndianMod Modifier for whether hash function is\n\t * big or small endian\n\t * @param {{outputUpper : boolean, b64Pad : string}} formatOpts Hash list\n\t * containing validated output formatting options\n\t * @return {string} Hexidecimal representation of the parameter in string\n\t * form\n\t */\n\tfunction packed2hex(packed, outputLength, bigEndianMod, formatOpts)\n\t{\n\t\tvar hex_tab = \"0123456789abcdef\", str = \"\",\n\t\t\tlength = outputLength / 8, i, srcByte, shiftModifier;\n\n\t\tshiftModifier = (bigEndianMod === -1) ? 3 : 0;\n\n\t\tfor (i = 0; i < length; i += 1)\n\t\t{\n\t\t\t/* The below is more than a byte but it gets taken care of later */\n\t\t\tsrcByte = packed[i >>> 2] >>> (8 * (shiftModifier + bigEndianMod * (i % 4)));\n\t\t\tstr += hex_tab.charAt((srcByte >>> 4) & 0xF) +\n\t\t\t\thex_tab.charAt(srcByte & 0xF);\n\t\t}\n\n\t\treturn (formatOpts[\"outputUpper\"]) ? str.toUpperCase() : str;\n\t}\n\n\t/**\n\t * Convert an array of big-endian words to a base-64 string\n\t *\n\t * @private\n\t * @param {Array} packed Array of integers to be converted to\n\t * base-64 representation\n\t * @param {number} outputLength Length of output in bits\n\t * @param {number} bigEndianMod Modifier for whether hash function is\n\t * big or small endian\n\t * @param {{outputUpper : boolean, b64Pad : string}} formatOpts Hash list\n\t * containing validated output formatting options\n\t * @return {string} Base-64 encoded representation of the parameter in\n\t * string form\n\t */\n\tfunction packed2b64(packed, outputLength, bigEndianMod, formatOpts)\n\t{\n\t\tvar str = \"\", length = outputLength / 8, i, j, triplet, int1, int2, shiftModifier,\n\t\t\tb64Tab = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\n\t\tshiftModifier = (bigEndianMod === -1) ? 3 : 0;\n\n\t\tfor (i = 0; i < length; i += 3)\n\t\t{\n\t\t\tint1 = ((i + 1) < length) ? packed[(i + 1) >>> 2] : 0;\n\t\t\tint2 = ((i + 2) < length) ? packed[(i + 2) >>> 2] : 0;\n\t\t\ttriplet = (((packed[i >>> 2] >>> (8 * (shiftModifier + bigEndianMod * (i % 4)))) & 0xFF) << 16) |\n\t\t\t\t(((int1 >>> (8 * (shiftModifier + bigEndianMod * ((i + 1) % 4)))) & 0xFF) << 8) |\n\t\t\t\t((int2 >>> (8 * (shiftModifier + bigEndianMod * ((i + 2) % 4)))) & 0xFF);\n\t\t\tfor (j = 0; j < 4; j += 1)\n\t\t\t{\n\t\t\t\tif (i * 8 + j * 6 <= outputLength)\n\t\t\t\t{\n\t\t\t\t\tstr += b64Tab.charAt((triplet >>> 6 * (3 - j)) & 0x3F);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstr += formatOpts[\"b64Pad\"];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn str;\n\t}\n\n\t/**\n\t * Convert an array of big-endian words to raw bytes string\n\t *\n\t * @private\n\t * @param {Array} packed Array of integers to be converted to\n\t * a raw bytes string representation\n\t * @param {number} outputLength Length of output in bits\n\t * @param {number} bigEndianMod Modifier for whether hash function is\n\t * big or small endian\n\t * @return {string} Raw bytes representation of the parameter in string\n\t * form\n\t */\n\tfunction packed2bytes(packed, outputLength, bigEndianMod)\n\t{\n\t\tvar str = \"\", length = outputLength / 8, i, srcByte, shiftModifier;\n\n\t\tshiftModifier = (bigEndianMod === -1) ? 3 : 0;\n\n\t\tfor (i = 0; i < length; i += 1)\n\t\t{\n\t\t\tsrcByte = (packed[i >>> 2] >>> (8 * (shiftModifier + bigEndianMod * (i % 4)))) & 0xFF;\n\t\t\tstr += String.fromCharCode(srcByte);\n\t\t}\n\n\t\treturn str;\n\t}\n\n\t/**\n\t * Convert an array of big-endian words to an ArrayBuffer\n\t *\n\t * @private\n\t * @param {Array} packed Array of integers to be converted to\n\t * an ArrayBuffer\n\t * @param {number} outputLength Length of output in bits\n\t * @param {number} bigEndianMod Modifier for whether hash function is\n\t * big or small endian\n\t * @return {ArrayBuffer} Raw bytes representation of the parameter in an\n\t * ArrayBuffer\n\t */\n\tfunction packed2arraybuffer(packed, outputLength, bigEndianMod)\n\t{\n\t\tvar length = outputLength / 8, i, retVal = new ArrayBuffer(length), shiftModifier, arrView;\n\t\tarrView = new Uint8Array(retVal);\n\n\t\tshiftModifier = (bigEndianMod === -1) ? 3 : 0;\n\n\t\tfor (i = 0; i < length; i += 1)\n\t\t{\n\t\t\tarrView[i] = (packed[i >>> 2] >>> (8 * (shiftModifier + bigEndianMod * (i % 4)))) & 0xFF;\n\t\t}\n\n\t\treturn retVal;\n\t}\n\n\t/**\n\t * Validate hash list containing output formatting options, ensuring\n\t * presence of every option or adding the default value\n\t *\n\t * @private\n\t * @param {{outputUpper : (boolean|undefined), b64Pad : (string|undefined),\n\t * shakeLen : (number|undefined)}=} options Hash list of output formatting options\n\t * @return {{outputUpper : boolean, b64Pad : string, shakeLen : number}} Validated\n\t * hash list containing output formatting options\n\t */\n\tfunction getOutputOpts(options)\n\t{\n\t\tvar retVal = {\"outputUpper\" : false, \"b64Pad\" : \"=\", \"shakeLen\" : -1},\n\t\t\toutputOptions;\n\t\toutputOptions = options || {};\n\n\t\tretVal[\"outputUpper\"] = outputOptions[\"outputUpper\"] || false;\n\n\t\tif (true === outputOptions.hasOwnProperty(\"b64Pad\"))\n\t\t{\n\t\t\tretVal[\"b64Pad\"] = outputOptions[\"b64Pad\"];\n\t\t}\n\n\t\tif ((true === outputOptions.hasOwnProperty(\"shakeLen\")) && ((8 & SUPPORTED_ALGS) !== 0))\n\t\t{\n\t\t\tif (outputOptions[\"shakeLen\"] % 8 !== 0)\n\t\t\t{\n\t\t\t\tthrow new Error(\"shakeLen must be a multiple of 8\");\n\t\t\t}\n\t\t\tretVal[\"shakeLen\"] = outputOptions[\"shakeLen\"];\n\t\t}\n\n\t\tif (\"boolean\" !== typeof(retVal[\"outputUpper\"]))\n\t\t{\n\t\t\tthrow new Error(\"Invalid outputUpper formatting option\");\n\t\t}\n\n\t\tif (\"string\" !== typeof(retVal[\"b64Pad\"]))\n\t\t{\n\t\t\tthrow new Error(\"Invalid b64Pad formatting option\");\n\t\t}\n\n\t\treturn retVal;\n\t}\n\n\t/**\n\t * Function that takes an input format and UTF encoding and returns the\n\t * appropriate function used to convert the input.\n\t *\n\t * @private\n\t * @param {string} format The format of the string to be converted\n\t * @param {string} utfType The string encoding to use (UTF8, UTF16BE,\n\t *\tUTF16LE)\n\t * @param {number} bigEndianMod Modifier for whether hash function is\n\t * big or small endian\n\t * @return {function((string|ArrayBuffer), Array=, number=): {value :\n\t * Array, binLen : number}} Function that will convert an input\n\t * string to a packed int array\n\t */\n\tfunction getStrConverter(format, utfType, bigEndianMod)\n\t{\n\t\tvar retVal;\n\n\t\t/* Validate encoding */\n\t\tswitch (utfType)\n\t\t{\n\t\tcase \"UTF8\":\n\t\t\t/* Fallthrough */\n\t\tcase \"UTF16BE\":\n\t\t\t/* Fallthrough */\n\t\tcase \"UTF16LE\":\n\t\t\t/* Fallthrough */\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new Error(\"encoding must be UTF8, UTF16BE, or UTF16LE\");\n\t\t}\n\n\t\t/* Map inputFormat to the appropriate converter */\n\t\tswitch (format)\n\t\t{\n\t\tcase \"HEX\":\n\t\t\t/**\n\t\t\t * @param {string} str String of raw bytes to be converted to binary representation\n\t\t\t * @param {Array} existingBin A packed int array of bytes to\n\t\t\t * append the results to\n\t\t\t * @param {number} existingBinLen The number of bits in the existingBin\n\t\t\t * array\n\t\t\t * @return {{value : Array, binLen : number}} Hash list where\n\t\t\t * \"value\" contains the output number array and \"binLen\" is the binary\n\t\t\t * length of \"value\"\n\t\t\t */\n\t\t\tretVal = function(str, existingBin, existingBinLen)\n\t\t\t\t{\n\t\t\t\t return hex2packed(str, existingBin, existingBinLen, bigEndianMod);\n\t\t\t\t};\n\t\t\tbreak;\n\t\tcase \"TEXT\":\n\t\t\t/**\n\t\t\t * @param {string} str String of raw bytes to be converted to binary representation\n\t\t\t * @param {Array} existingBin A packed int array of bytes to\n\t\t\t * append the results to\n\t\t\t * @param {number} existingBinLen The number of bits in the existingBin\n\t\t\t * array\n\t\t\t * @return {{value : Array, binLen : number}} Hash list where\n\t\t\t * \"value\" contains the output number array and \"binLen\" is the binary\n\t\t\t * length of \"value\"\n\t\t\t */\n\t\t\tretVal = function(str, existingBin, existingBinLen)\n\t\t\t\t{\n\t\t\t\t\treturn str2packed(str, utfType, existingBin, existingBinLen, bigEndianMod);\n\t\t\t\t};\n\t\t\tbreak;\n\t\tcase \"B64\":\n\t\t\t/**\n\t\t\t * @param {string} str String of raw bytes to be converted to binary representation\n\t\t\t * @param {Array} existingBin A packed int array of bytes to\n\t\t\t * append the results to\n\t\t\t * @param {number} existingBinLen The number of bits in the existingBin\n\t\t\t * array\n\t\t\t * @return {{value : Array, binLen : number}} Hash list where\n\t\t\t * \"value\" contains the output number array and \"binLen\" is the binary\n\t\t\t * length of \"value\"\n\t\t\t */\n\t\t\tretVal = function(str, existingBin, existingBinLen)\n\t\t\t\t{\n\t\t\t\t return b642packed(str, existingBin, existingBinLen, bigEndianMod);\n\t\t\t\t};\n\t\t\tbreak;\n\t\tcase \"BYTES\":\n\t\t\t/**\n\t\t\t * @param {string} str String of raw bytes to be converted to binary representation\n\t\t\t * @param {Array} existingBin A packed int array of bytes to\n\t\t\t * append the results to\n\t\t\t * @param {number} existingBinLen The number of bits in the existingBin\n\t\t\t * array\n\t\t\t * @return {{value : Array, binLen : number}} Hash list where\n\t\t\t * \"value\" contains the output number array and \"binLen\" is the binary\n\t\t\t * length of \"value\"\n\t\t\t */\n\t\t\tretVal = function(str, existingBin, existingBinLen)\n\t\t\t\t{\n\t\t\t\t return bytes2packed(str, existingBin, existingBinLen, bigEndianMod);\n\t\t\t\t};\n\t\t\tbreak;\n\t\tcase \"ARRAYBUFFER\":\n\t\t\ttry {\n\t\t\t\tretVal = new ArrayBuffer(0);\n\t\t\t} catch(ignore) {\n\t\t\t\tthrow new Error(\"ARRAYBUFFER not supported by this environment\");\n\t\t\t}\n\t\t\t/**\n\t\t\t * @param {ArrayBuffer} arr ArrayBuffer to be converted to binary\n\t\t\t * representation\n\t\t\t * @param {Array} existingBin A packed int array of bytes to\n\t\t\t * append the results to\n\t\t\t * @param {number} existingBinLen The number of bits in the existingBin\n\t\t\t * array\n\t\t\t * @return {{value : Array, binLen : number}} Hash list where\n\t\t\t * \"value\" contains the output number array and \"binLen\" is the binary\n\t\t\t * length of \"value\"\n\t\t\t */\n\t\t\tretVal = function(arr, existingBin, existingBinLen)\n\t\t\t\t{\n\t\t\t\t return arraybuffer2packed(arr, existingBin, existingBinLen, bigEndianMod);\n\t\t\t\t};\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new Error(\"format must be HEX, TEXT, B64, BYTES, or ARRAYBUFFER\");\n\t\t}\n\n\t\treturn retVal;\n\t}\n\n\t/**\n\t * The 32-bit implementation of circular rotate left\n\t *\n\t * @private\n\t * @param {number} x The 32-bit integer argument\n\t * @param {number} n The number of bits to shift\n\t * @return {number} The x shifted circularly by n bits\n\t */\n\tfunction rotl_32(x, n)\n\t{\n\t\treturn (x << n) | (x >>> (32 - n));\n\t}\n\n\t/**\n\t * The 64-bit implementation of circular rotate left\n\t *\n\t * @private\n\t * @param {Int_64} x The 64-bit integer argument\n\t * @param {number} n The number of bits to shift\n\t * @return {Int_64} The x shifted circularly by n bits\n\t */\n\tfunction rotl_64(x, n)\n\t{\n\t\tif (n > 32)\n\t\t{\n\t\t\tn = n - 32;\n\t\t\treturn new Int_64(\n\t\t\t\tx.lowOrder << n | x.highOrder >>> (32 - n),\n\t\t\t\tx.highOrder << n | x.lowOrder >>> (32 - n)\n\t\t\t);\n\t\t}\n\t\telse if (0 !== n)\n\t\t{\n\t\t\treturn new Int_64(\n\t\t\t\tx.highOrder << n | x.lowOrder >>> (32 - n),\n\t\t\t\tx.lowOrder << n | x.highOrder >>> (32 - n)\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn x;\n\t\t}\n\t}\n\n\t/**\n\t * The 32-bit implementation of circular rotate right\n\t *\n\t * @private\n\t * @param {number} x The 32-bit integer argument\n\t * @param {number} n The number of bits to shift\n\t * @return {number} The x shifted circularly by n bits\n\t */\n\tfunction rotr_32(x, n)\n\t{\n\t\treturn (x >>> n) | (x << (32 - n));\n\t}\n\n\t/**\n\t * The 64-bit implementation of circular rotate right\n\t *\n\t * @private\n\t * @param {Int_64} x The 64-bit integer argument\n\t * @param {number} n The number of bits to shift\n\t * @return {Int_64} The x shifted circularly by n bits\n\t */\n\tfunction rotr_64(x, n)\n\t{\n\t\tvar retVal = null, tmp = new Int_64(x.highOrder, x.lowOrder);\n\n\t\tif (32 >= n)\n\t\t{\n\t\t\tretVal = new Int_64(\n\t\t\t\t\t(tmp.highOrder >>> n) | ((tmp.lowOrder << (32 - n)) & 0xFFFFFFFF),\n\t\t\t\t\t(tmp.lowOrder >>> n) | ((tmp.highOrder << (32 - n)) & 0xFFFFFFFF)\n\t\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tretVal = new Int_64(\n\t\t\t\t\t(tmp.lowOrder >>> (n - 32)) | ((tmp.highOrder << (64 - n)) & 0xFFFFFFFF),\n\t\t\t\t\t(tmp.highOrder >>> (n - 32)) | ((tmp.lowOrder << (64 - n)) & 0xFFFFFFFF)\n\t\t\t\t);\n\t\t}\n\n\t\treturn retVal;\n\t}\n\n\t/**\n\t * The 32-bit implementation of shift right\n\t *\n\t * @private\n\t * @param {number} x The 32-bit integer argument\n\t * @param {number} n The number of bits to shift\n\t * @return {number} The x shifted by n bits\n\t */\n\tfunction shr_32(x, n)\n\t{\n\t\treturn x >>> n;\n\t}\n\n\t/**\n\t * The 64-bit implementation of shift right\n\t *\n\t * @private\n\t * @param {Int_64} x The 64-bit integer argument\n\t * @param {number} n The number of bits to shift\n\t * @return {Int_64} The x shifted by n bits\n\t */\n\tfunction shr_64(x, n)\n\t{\n\t\tvar retVal = null;\n\n\t\tif (32 >= n)\n\t\t{\n\t\t\tretVal = new Int_64(\n\t\t\t\t\tx.highOrder >>> n,\n\t\t\t\t\tx.lowOrder >>> n | ((x.highOrder << (32 - n)) & 0xFFFFFFFF)\n\t\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tretVal = new Int_64(\n\t\t\t\t\t0,\n\t\t\t\t\tx.highOrder >>> (n - 32)\n\t\t\t\t);\n\t\t}\n\n\t\treturn retVal;\n\t}\n\n\t/**\n\t * The 32-bit implementation of the NIST specified Parity function\n\t *\n\t * @private\n\t * @param {number} x The first 32-bit integer argument\n\t * @param {number} y The second 32-bit integer argument\n\t * @param {number} z The third 32-bit integer argument\n\t * @return {number} The NIST specified output of the function\n\t */\n\tfunction parity_32(x, y, z)\n\t{\n\t\treturn x ^ y ^ z;\n\t}\n\n\t/**\n\t * The 32-bit implementation of the NIST specified Ch function\n\t *\n\t * @private\n\t * @param {number} x The first 32-bit integer argument\n\t * @param {number} y The second 32-bit integer argument\n\t * @param {number} z The third 32-bit integer argument\n\t * @return {number} The NIST specified output of the function\n\t */\n\tfunction ch_32(x, y, z)\n\t{\n\t\treturn (x & y) ^ (~x & z);\n\t}\n\n\t/**\n\t * The 64-bit implementation of the NIST specified Ch function\n\t *\n\t * @private\n\t * @param {Int_64} x The first 64-bit integer argument\n\t * @param {Int_64} y The second 64-bit integer argument\n\t * @param {Int_64} z The third 64-bit integer argument\n\t * @return {Int_64} The NIST specified output of the function\n\t */\n\tfunction ch_64(x, y, z)\n\t{\n\t\treturn new Int_64(\n\t\t\t\t(x.highOrder & y.highOrder) ^ (~x.highOrder & z.highOrder),\n\t\t\t\t(x.lowOrder & y.lowOrder) ^ (~x.lowOrder & z.lowOrder)\n\t\t\t);\n\t}\n\n\t/**\n\t * The 32-bit implementation of the NIST specified Maj function\n\t *\n\t * @private\n\t * @param {number} x The first 32-bit integer argument\n\t * @param {number} y The second 32-bit integer argument\n\t * @param {number} z The third 32-bit integer argument\n\t * @return {number} The NIST specified output of the function\n\t */\n\tfunction maj_32(x, y, z)\n\t{\n\t\treturn (x & y) ^ (x & z) ^ (y & z);\n\t}\n\n\t/**\n\t * The 64-bit implementation of the NIST specified Maj function\n\t *\n\t * @private\n\t * @param {Int_64} x The first 64-bit integer argument\n\t * @param {Int_64} y The second 64-bit integer argument\n\t * @param {Int_64} z The third 64-bit integer argument\n\t * @return {Int_64} The NIST specified output of the function\n\t */\n\tfunction maj_64(x, y, z)\n\t{\n\t\treturn new Int_64(\n\t\t\t\t(x.highOrder & y.highOrder) ^\n\t\t\t\t(x.highOrder & z.highOrder) ^\n\t\t\t\t(y.highOrder & z.highOrder),\n\t\t\t\t(x.lowOrder & y.lowOrder) ^\n\t\t\t\t(x.lowOrder & z.lowOrder) ^\n\t\t\t\t(y.lowOrder & z.lowOrder)\n\t\t\t);\n\t}\n\n\t/**\n\t * The 32-bit implementation of the NIST specified Sigma0 function\n\t *\n\t * @private\n\t * @param {number} x The 32-bit integer argument\n\t * @return {number} The NIST specified output of the function\n\t */\n\tfunction sigma0_32(x)\n\t{\n\t\treturn rotr_32(x, 2) ^ rotr_32(x, 13) ^ rotr_32(x, 22);\n\t}\n\n\t/**\n\t * The 64-bit implementation of the NIST specified Sigma0 function\n\t *\n\t * @private\n\t * @param {Int_64} x The 64-bit integer argument\n\t * @return {Int_64} The NIST specified output of the function\n\t */\n\tfunction sigma0_64(x)\n\t{\n\t\tvar rotr28 = rotr_64(x, 28), rotr34 = rotr_64(x, 34),\n\t\t\trotr39 = rotr_64(x, 39);\n\n\t\treturn new Int_64(\n\t\t\t\trotr28.highOrder ^ rotr34.highOrder ^ rotr39.highOrder,\n\t\t\t\trotr28.lowOrder ^ rotr34.lowOrder ^ rotr39.lowOrder);\n\t}\n\n\t/**\n\t * The 32-bit implementation of the NIST specified Sigma1 function\n\t *\n\t * @private\n\t * @param {number} x The 32-bit integer argument\n\t * @return {number} The NIST specified output of the function\n\t */\n\tfunction sigma1_32(x)\n\t{\n\t\treturn rotr_32(x, 6) ^ rotr_32(x, 11) ^ rotr_32(x, 25);\n\t}\n\n\t/**\n\t * The 64-bit implementation of the NIST specified Sigma1 function\n\t *\n\t * @private\n\t * @param {Int_64} x The 64-bit integer argument\n\t * @return {Int_64} The NIST specified output of the function\n\t */\n\tfunction sigma1_64(x)\n\t{\n\t\tvar rotr14 = rotr_64(x, 14), rotr18 = rotr_64(x, 18),\n\t\t\trotr41 = rotr_64(x, 41);\n\n\t\treturn new Int_64(\n\t\t\t\trotr14.highOrder ^ rotr18.highOrder ^ rotr41.highOrder,\n\t\t\t\trotr14.lowOrder ^ rotr18.lowOrder ^ rotr41.lowOrder);\n\t}\n\n\t/**\n\t * The 32-bit implementation of the NIST specified Gamma0 function\n\t *\n\t * @private\n\t * @param {number} x The 32-bit integer argument\n\t * @return {number} The NIST specified output of the function\n\t */\n\tfunction gamma0_32(x)\n\t{\n\t\treturn rotr_32(x, 7) ^ rotr_32(x, 18) ^ shr_32(x, 3);\n\t}\n\n\t/**\n\t * The 64-bit implementation of the NIST specified Gamma0 function\n\t *\n\t * @private\n\t * @param {Int_64} x The 64-bit integer argument\n\t * @return {Int_64} The NIST specified output of the function\n\t */\n\tfunction gamma0_64(x)\n\t{\n\t\tvar rotr1 = rotr_64(x, 1), rotr8 = rotr_64(x, 8), shr7 = shr_64(x, 7);\n\n\t\treturn new Int_64(\n\t\t\t\trotr1.highOrder ^ rotr8.highOrder ^ shr7.highOrder,\n\t\t\t\trotr1.lowOrder ^ rotr8.lowOrder ^ shr7.lowOrder\n\t\t\t);\n\t}\n\n\t/**\n\t * The 32-bit implementation of the NIST specified Gamma1 function\n\t *\n\t * @private\n\t * @param {number} x The 32-bit integer argument\n\t * @return {number} The NIST specified output of the function\n\t */\n\tfunction gamma1_32(x)\n\t{\n\t\treturn rotr_32(x, 17) ^ rotr_32(x, 19) ^ shr_32(x, 10);\n\t}\n\n\t/**\n\t * The 64-bit implementation of the NIST specified Gamma1 function\n\t *\n\t * @private\n\t * @param {Int_64} x The 64-bit integer argument\n\t * @return {Int_64} The NIST specified output of the function\n\t */\n\tfunction gamma1_64(x)\n\t{\n\t\tvar rotr19 = rotr_64(x, 19), rotr61 = rotr_64(x, 61),\n\t\t\tshr6 = shr_64(x, 6);\n\n\t\treturn new Int_64(\n\t\t\t\trotr19.highOrder ^ rotr61.highOrder ^ shr6.highOrder,\n\t\t\t\trotr19.lowOrder ^ rotr61.lowOrder ^ shr6.lowOrder\n\t\t\t);\n\t}\n\n\t/**\n\t * Add two 32-bit integers, wrapping at 2^32. This uses 16-bit operations\n\t * internally to work around bugs in some JS interpreters.\n\t *\n\t * @private\n\t * @param {number} a The first 32-bit integer argument to be added\n\t * @param {number} b The second 32-bit integer argument to be added\n\t * @return {number} The sum of a + b\n\t */\n\tfunction safeAdd_32_2(a, b)\n\t{\n\t\tvar lsw = (a & 0xFFFF) + (b & 0xFFFF),\n\t\t\tmsw = (a >>> 16) + (b >>> 16) + (lsw >>> 16);\n\n\t\treturn ((msw & 0xFFFF) << 16) | (lsw & 0xFFFF);\n\t}\n\n\t/**\n\t * Add four 32-bit integers, wrapping at 2^32. This uses 16-bit operations\n\t * internally to work around bugs in some JS interpreters.\n\t *\n\t * @private\n\t * @param {number} a The first 32-bit integer argument to be added\n\t * @param {number} b The second 32-bit integer argument to be added\n\t * @param {number} c The third 32-bit integer argument to be added\n\t * @param {number} d The fourth 32-bit integer argument to be added\n\t * @return {number} The sum of a + b + c + d\n\t */\n\tfunction safeAdd_32_4(a, b, c, d)\n\t{\n\t\tvar lsw = (a & 0xFFFF) + (b & 0xFFFF) + (c & 0xFFFF) + (d & 0xFFFF),\n\t\t\tmsw = (a >>> 16) + (b >>> 16) + (c >>> 16) + (d >>> 16) +\n\t\t\t\t(lsw >>> 16);\n\n\t\treturn ((msw & 0xFFFF) << 16) | (lsw & 0xFFFF);\n\t}\n\n\t/**\n\t * Add five 32-bit integers, wrapping at 2^32. This uses 16-bit operations\n\t * internally to work around bugs in some JS interpreters.\n\t *\n\t * @private\n\t * @param {number} a The first 32-bit integer argument to be added\n\t * @param {number} b The second 32-bit integer argument to be added\n\t * @param {number} c The third 32-bit integer argument to be added\n\t * @param {number} d The fourth 32-bit integer argument to be added\n\t * @param {number} e The fifth 32-bit integer argument to be added\n\t * @return {number} The sum of a + b + c + d + e\n\t */\n\tfunction safeAdd_32_5(a, b, c, d, e)\n\t{\n\t\tvar lsw = (a & 0xFFFF) + (b & 0xFFFF) + (c & 0xFFFF) + (d & 0xFFFF) +\n\t\t\t\t(e & 0xFFFF),\n\t\t\tmsw = (a >>> 16) + (b >>> 16) + (c >>> 16) + (d >>> 16) +\n\t\t\t\t(e >>> 16) + (lsw >>> 16);\n\n\t\treturn ((msw & 0xFFFF) << 16) | (lsw & 0xFFFF);\n\t}\n\n\t/**\n\t * Add two 64-bit integers, wrapping at 2^64. This uses 16-bit operations\n\t * internally to work around bugs in some JS interpreters.\n\t *\n\t * @private\n\t * @param {Int_64} x The first 64-bit integer argument to be added\n\t * @param {Int_64} y The second 64-bit integer argument to be added\n\t * @return {Int_64} The sum of x + y\n\t */\n\tfunction safeAdd_64_2(x, y)\n\t{\n\t\tvar lsw, msw, lowOrder, highOrder;\n\n\t\tlsw = (x.lowOrder & 0xFFFF) + (y.lowOrder & 0xFFFF);\n\t\tmsw = (x.lowOrder >>> 16) + (y.lowOrder >>> 16) + (lsw >>> 16);\n\t\tlowOrder = ((msw & 0xFFFF) << 16) | (lsw & 0xFFFF);\n\n\t\tlsw = (x.highOrder & 0xFFFF) + (y.highOrder & 0xFFFF) + (msw >>> 16);\n\t\tmsw = (x.highOrder >>> 16) + (y.highOrder >>> 16) + (lsw >>> 16);\n\t\thighOrder = ((msw & 0xFFFF) << 16) | (lsw & 0xFFFF);\n\n\t\treturn new Int_64(highOrder, lowOrder);\n\t}\n\n\t/**\n\t * Add four 64-bit integers, wrapping at 2^64. This uses 16-bit operations\n\t * internally to work around bugs in some JS interpreters.\n\t *\n\t * @private\n\t * @param {Int_64} a The first 64-bit integer argument to be added\n\t * @param {Int_64} b The second 64-bit integer argument to be added\n\t * @param {Int_64} c The third 64-bit integer argument to be added\n\t * @param {Int_64} d The fouth 64-bit integer argument to be added\n\t * @return {Int_64} The sum of a + b + c + d\n\t */\n\tfunction safeAdd_64_4(a, b, c, d)\n\t{\n\t\tvar lsw, msw, lowOrder, highOrder;\n\n\t\tlsw = (a.lowOrder & 0xFFFF) + (b.lowOrder & 0xFFFF) +\n\t\t\t(c.lowOrder & 0xFFFF) + (d.lowOrder & 0xFFFF);\n\t\tmsw = (a.lowOrder >>> 16) + (b.lowOrder >>> 16) +\n\t\t\t(c.lowOrder >>> 16) + (d.lowOrder >>> 16) + (lsw >>> 16);\n\t\tlowOrder = ((msw & 0xFFFF) << 16) | (lsw & 0xFFFF);\n\n\t\tlsw = (a.highOrder & 0xFFFF) + (b.highOrder & 0xFFFF) +\n\t\t\t(c.highOrder & 0xFFFF) + (d.highOrder & 0xFFFF) + (msw >>> 16);\n\t\tmsw = (a.highOrder >>> 16) + (b.highOrder >>> 16) +\n\t\t\t(c.highOrder >>> 16) + (d.highOrder >>> 16) + (lsw >>> 16);\n\t\thighOrder = ((msw & 0xFFFF) << 16) | (lsw & 0xFFFF);\n\n\t\treturn new Int_64(highOrder, lowOrder);\n\t}\n\n\t/**\n\t * Add five 64-bit integers, wrapping at 2^64. This uses 16-bit operations\n\t * internally to work around bugs in some JS interpreters.\n\t *\n\t * @private\n\t * @param {Int_64} a The first 64-bit integer argument to be added\n\t * @param {Int_64} b The second 64-bit integer argument to be added\n\t * @param {Int_64} c The third 64-bit integer argument to be added\n\t * @param {Int_64} d The fouth 64-bit integer argument to be added\n\t * @param {Int_64} e The fouth 64-bit integer argument to be added\n\t * @return {Int_64} The sum of a + b + c + d + e\n\t */\n\tfunction safeAdd_64_5(a, b, c, d, e)\n\t{\n\t\tvar lsw, msw, lowOrder, highOrder;\n\n\t\tlsw = (a.lowOrder & 0xFFFF) + (b.lowOrder & 0xFFFF) +\n\t\t\t(c.lowOrder & 0xFFFF) + (d.lowOrder & 0xFFFF) +\n\t\t\t(e.lowOrder & 0xFFFF);\n\t\tmsw = (a.lowOrder >>> 16) + (b.lowOrder >>> 16) +\n\t\t\t(c.lowOrder >>> 16) + (d.lowOrder >>> 16) + (e.lowOrder >>> 16) +\n\t\t\t(lsw >>> 16);\n\t\tlowOrder = ((msw & 0xFFFF) << 16) | (lsw & 0xFFFF);\n\n\t\tlsw = (a.highOrder & 0xFFFF) + (b.highOrder & 0xFFFF) +\n\t\t\t(c.highOrder & 0xFFFF) + (d.highOrder & 0xFFFF) +\n\t\t\t(e.highOrder & 0xFFFF) + (msw >>> 16);\n\t\tmsw = (a.highOrder >>> 16) + (b.highOrder >>> 16) +\n\t\t\t(c.highOrder >>> 16) + (d.highOrder >>> 16) +\n\t\t\t(e.highOrder >>> 16) + (lsw >>> 16);\n\t\thighOrder = ((msw & 0xFFFF) << 16) | (lsw & 0xFFFF);\n\n\t\treturn new Int_64(highOrder, lowOrder);\n\t}\n\n\t/**\n\t * XORs two given arguments.\n\t *\n\t * @private\n\t * @param {Int_64} a First argument to be XORed\n\t * @param {Int_64} b Second argument to be XORed\n\t * @return {Int_64} The XOR of the arguments\n\t */\n\tfunction xor_64_2(a, b)\n\t{\n\t\treturn new Int_64(\n\t\t\ta.highOrder ^ b.highOrder,\n\t\t\ta.lowOrder ^ b.lowOrder\n\t\t);\n\t}\n\n\t/**\n\t * XORs five given arguments.\n\t *\n\t * @private\n\t * @param {Int_64} a First argument to be XORed\n\t * @param {Int_64} b Second argument to be XORed\n\t * @param {Int_64} c Third argument to be XORed\n\t * @param {Int_64} d Fourth argument to be XORed\n\t * @param {Int_64} e Fifth argument to be XORed\n\t * @return {Int_64} The XOR of the arguments\n\t */\n\tfunction xor_64_5(a, b, c, d, e)\n\t{\n\t\treturn new Int_64(\n\t\t\ta.highOrder ^ b.highOrder ^ c.highOrder ^ d.highOrder ^ e.highOrder,\n\t\t\ta.lowOrder ^ b.lowOrder ^ c.lowOrder ^ d.lowOrder ^ e.lowOrder\n\t\t);\n\t}\n\n\t/**\n\t * Returns a clone of the given SHA3 state\n\t *\n\t * @private\n\t * @param {Array>} state The state to be cloned\n\t * @return {Array>} The cloned state\n\t */\n\tfunction cloneSHA3State(state) {\n\t\tvar clone = [], i;\n\t\tfor (i = 0; i < 5; i += 1)\n\t\t{\n\t\t\tclone[i] = state[i].slice();\n\t\t}\n\n\t\treturn clone;\n\t}\n\n\t/**\n\t * Gets the state values for the specified SHA variant\n\t *\n\t * @param {string} variant The SHA variant\n\t * @return {Array>} The initial state values\n\t */\n\tfunction getNewState(variant)\n\t{\n\t\tvar retVal = [], H_trunc, H_full, i;\n\n\t\tif ((\"SHA-1\" === variant) && ((1 & SUPPORTED_ALGS) !== 0))\n\t\t{\n\t\t\tretVal = [\n\t\t\t\t0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0\n\t\t\t];\n\t\t}\n\t\telse if ((variant.lastIndexOf(\"SHA-\", 0) === 0) && ((6 & SUPPORTED_ALGS) !== 0))\n\t\t{\n\t\t\tH_trunc = [\n\t\t\t\t0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n\t\t\t\t0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4\n\t\t\t];\n\t\t\tH_full = [\n\t\t\t\t0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A,\n\t\t\t\t0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19\n\t\t\t];\n\n\t\t\tswitch (variant)\n\t\t\t{\n\t\t\tcase \"SHA-224\":\n\t\t\t\tretVal = H_trunc;\n\t\t\t\tbreak;\n\t\t\tcase \"SHA-256\":\n\t\t\t\tretVal = H_full;\n\t\t\t\tbreak;\n\t\t\tcase \"SHA-384\":\n\t\t\t\tretVal = [\n\t\t\t\t\tnew Int_64(0xcbbb9d5d, H_trunc[0]),\n\t\t\t\t\tnew Int_64(0x0629a292a, H_trunc[1]),\n\t\t\t\t\tnew Int_64(0x9159015a, H_trunc[2]),\n\t\t\t\t\tnew Int_64(0x0152fecd8, H_trunc[3]),\n\t\t\t\t\tnew Int_64(0x67332667, H_trunc[4]),\n\t\t\t\t\tnew Int_64(0x98eb44a87, H_trunc[5]),\n\t\t\t\t\tnew Int_64(0xdb0c2e0d, H_trunc[6]),\n\t\t\t\t\tnew Int_64(0x047b5481d, H_trunc[7])\n\t\t\t\t];\n\t\t\t\tbreak;\n\t\t\tcase \"SHA-512\":\n\t\t\t\tretVal = [\n\t\t\t\t\tnew Int_64(H_full[0], 0xf3bcc908),\n\t\t\t\t\tnew Int_64(H_full[1], 0x84caa73b),\n\t\t\t\t\tnew Int_64(H_full[2], 0xfe94f82b),\n\t\t\t\t\tnew Int_64(H_full[3], 0x5f1d36f1),\n\t\t\t\t\tnew Int_64(H_full[4], 0xade682d1),\n\t\t\t\t\tnew Int_64(H_full[5], 0x2b3e6c1f),\n\t\t\t\t\tnew Int_64(H_full[6], 0xfb41bd6b),\n\t\t\t\t\tnew Int_64(H_full[7], 0x137e2179)\n\t\t\t\t];\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error(\"Unknown SHA variant\");\n\t\t\t}\n\t\t}\n\t\telse if (((variant.lastIndexOf(\"SHA3-\", 0) === 0) || (variant.lastIndexOf(\"SHAKE\", 0) === 0)) &&\n\t\t\t((8 & SUPPORTED_ALGS) !== 0))\n\t\t{\n\t\t\tfor (i = 0; i < 5; i += 1)\n\t\t\t{\n\t\t\t\tretVal[i] = [new Int_64(0, 0), new Int_64(0, 0), new Int_64(0, 0), new Int_64(0, 0), new Int_64(0, 0)];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Error(\"No SHA variants supported\");\n\t\t}\n\n\t\treturn retVal;\n\t}\n\n\t/**\n\t * Performs a round of SHA-1 hashing over a 512-byte block\n\t *\n\t * @private\n\t * @param {Array} block The binary array representation of the\n\t * block to hash\n\t * @param {Array} H The intermediate H values from a previous\n\t * round\n\t * @return {Array} The resulting H values\n\t */\n\tfunction roundSHA1(block, H)\n\t{\n\t\tvar W = [], a, b, c, d, e, T, ch = ch_32, parity = parity_32,\n\t\t\tmaj = maj_32, rotl = rotl_32, safeAdd_2 = safeAdd_32_2, t,\n\t\t\tsafeAdd_5 = safeAdd_32_5;\n\n\t\ta = H[0];\n\t\tb = H[1];\n\t\tc = H[2];\n\t\td = H[3];\n\t\te = H[4];\n\n\t\tfor (t = 0; t < 80; t += 1)\n\t\t{\n\t\t\tif (t < 16)\n\t\t\t{\n\t\t\t\tW[t] = block[t];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tW[t] = rotl(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);\n\t\t\t}\n\n\t\t\tif (t < 20)\n\t\t\t{\n\t\t\t\tT = safeAdd_5(rotl(a, 5), ch(b, c, d), e, 0x5a827999, W[t]);\n\t\t\t}\n\t\t\telse if (t < 40)\n\t\t\t{\n\t\t\t\tT = safeAdd_5(rotl(a, 5), parity(b, c, d), e, 0x6ed9eba1, W[t]);\n\t\t\t}\n\t\t\telse if (t < 60)\n\t\t\t{\n\t\t\t\tT = safeAdd_5(rotl(a, 5), maj(b, c, d), e, 0x8f1bbcdc, W[t]);\n\t\t\t} else {\n\t\t\t\tT = safeAdd_5(rotl(a, 5), parity(b, c, d), e, 0xca62c1d6, W[t]);\n\t\t\t}\n\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = rotl(b, 30);\n\t\t\tb = a;\n\t\t\ta = T;\n\t\t}\n\n\t\tH[0] = safeAdd_2(a, H[0]);\n\t\tH[1] = safeAdd_2(b, H[1]);\n\t\tH[2] = safeAdd_2(c, H[2]);\n\t\tH[3] = safeAdd_2(d, H[3]);\n\t\tH[4] = safeAdd_2(e, H[4]);\n\n\t\treturn H;\n\t}\n\n\t/**\n\t * Finalizes the SHA-1 hash\n\t *\n\t * @private\n\t * @param {Array} remainder Any leftover unprocessed packed ints\n\t * that still need to be processed\n\t * @param {number} remainderBinLen The number of bits in remainder\n\t * @param {number} processedBinLen The number of bits already\n\t * processed\n\t * @param {Array} H The intermediate H values from a previous\n\t * round\n\t * @param {number} outputLen Unused for this variant\n\t * @return {Array} The array of integers representing the SHA-1\n\t * hash of message\n\t */\n\tfunction finalizeSHA1(remainder, remainderBinLen, processedBinLen, H, outputLen)\n\t{\n\t\tvar i, appendedMessageLength, offset, totalLen;\n\n\t\t/* The 65 addition is a hack but it works. The correct number is\n\t\t actually 72 (64 + 8) but the below math fails if\n\t\t remainderBinLen + 72 % 512 = 0. Since remainderBinLen % 8 = 0,\n\t\t \"shorting\" the addition is OK. */\n\t\toffset = (((remainderBinLen + 65) >>> 9) << 4) + 15;\n\t\twhile (remainder.length <= offset)\n\t\t{\n\t\t\tremainder.push(0);\n\t\t}\n\t\t/* Append '1' at the end of the binary string */\n\t\tremainder[remainderBinLen >>> 5] |= 0x80 << (24 - (remainderBinLen % 32));\n\t\t/* Append length of binary string in the position such that the new\n\t\t * length is a multiple of 512. Logic does not work for even multiples\n\t\t * of 512 but there can never be even multiples of 512. JavaScript\n\t\t * numbers are limited to 2^53 so it's \"safe\" to treat the totalLen as\n\t\t * a 64-bit integer. */\n\t\ttotalLen = remainderBinLen + processedBinLen;\n\t\tremainder[offset] = totalLen & 0xFFFFFFFF;\n\t\t/* Bitwise operators treat the operand as a 32-bit number so need to\n\t\t * use hacky division and round to get access to upper 32-ish bits */\n\t\tremainder[offset - 1] = (totalLen / TWO_PWR_32) | 0;\n\n\t\tappendedMessageLength = remainder.length;\n\n\t\t/* This will always be at least 1 full chunk */\n\t\tfor (i = 0; i < appendedMessageLength; i += 16)\n\t\t{\n\t\t\tH = roundSHA1(remainder.slice(i, i + 16), H);\n\t\t}\n\n\t\treturn H;\n\t}\n\n\t/* Put this here so the K arrays aren't put on the stack for every block */\n\tvar K_sha2, K_sha512, r_sha3, rc_sha3;\n\tif ((6 & SUPPORTED_ALGS) !== 0)\n\t{\n\t\tK_sha2 = [\n\t\t\t0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,\n\t\t\t0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,\n\t\t\t0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,\n\t\t\t0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,\n\t\t\t0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,\n\t\t\t0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,\n\t\t\t0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7,\n\t\t\t0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,\n\t\t\t0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13,\n\t\t\t0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,\n\t\t\t0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3,\n\t\t\t0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,\n\t\t\t0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5,\n\t\t\t0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,\n\t\t\t0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208,\n\t\t\t0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2\n\t\t];\n\n\t\tif ((4 & SUPPORTED_ALGS) !== 0)\n\t\t{\n\t\t\t K_sha512 = [\n\t\t\t\tnew Int_64(K_sha2[ 0], 0xd728ae22), new Int_64(K_sha2[ 1], 0x23ef65cd),\n\t\t\t\tnew Int_64(K_sha2[ 2], 0xec4d3b2f), new Int_64(K_sha2[ 3], 0x8189dbbc),\n\t\t\t\tnew Int_64(K_sha2[ 4], 0xf348b538), new Int_64(K_sha2[ 5], 0xb605d019),\n\t\t\t\tnew Int_64(K_sha2[ 6], 0xaf194f9b), new Int_64(K_sha2[ 7], 0xda6d8118),\n\t\t\t\tnew Int_64(K_sha2[ 8], 0xa3030242), new Int_64(K_sha2[ 9], 0x45706fbe),\n\t\t\t\tnew Int_64(K_sha2[10], 0x4ee4b28c), new Int_64(K_sha2[11], 0xd5ffb4e2),\n\t\t\t\tnew Int_64(K_sha2[12], 0xf27b896f), new Int_64(K_sha2[13], 0x3b1696b1),\n\t\t\t\tnew Int_64(K_sha2[14], 0x25c71235), new Int_64(K_sha2[15], 0xcf692694),\n\t\t\t\tnew Int_64(K_sha2[16], 0x9ef14ad2), new Int_64(K_sha2[17], 0x384f25e3),\n\t\t\t\tnew Int_64(K_sha2[18], 0x8b8cd5b5), new Int_64(K_sha2[19], 0x77ac9c65),\n\t\t\t\tnew Int_64(K_sha2[20], 0x592b0275), new Int_64(K_sha2[21], 0x6ea6e483),\n\t\t\t\tnew Int_64(K_sha2[22], 0xbd41fbd4), new Int_64(K_sha2[23], 0x831153b5),\n\t\t\t\tnew Int_64(K_sha2[24], 0xee66dfab), new Int_64(K_sha2[25], 0x2db43210),\n\t\t\t\tnew Int_64(K_sha2[26], 0x98fb213f), new Int_64(K_sha2[27], 0xbeef0ee4),\n\t\t\t\tnew Int_64(K_sha2[28], 0x3da88fc2), new Int_64(K_sha2[29], 0x930aa725),\n\t\t\t\tnew Int_64(K_sha2[30], 0xe003826f), new Int_64(K_sha2[31], 0x0a0e6e70),\n\t\t\t\tnew Int_64(K_sha2[32], 0x46d22ffc), new Int_64(K_sha2[33], 0x5c26c926),\n\t\t\t\tnew Int_64(K_sha2[34], 0x5ac42aed), new Int_64(K_sha2[35], 0x9d95b3df),\n\t\t\t\tnew Int_64(K_sha2[36], 0x8baf63de), new Int_64(K_sha2[37], 0x3c77b2a8),\n\t\t\t\tnew Int_64(K_sha2[38], 0x47edaee6), new Int_64(K_sha2[39], 0x1482353b),\n\t\t\t\tnew Int_64(K_sha2[40], 0x4cf10364), new Int_64(K_sha2[41], 0xbc423001),\n\t\t\t\tnew Int_64(K_sha2[42], 0xd0f89791), new Int_64(K_sha2[43], 0x0654be30),\n\t\t\t\tnew Int_64(K_sha2[44], 0xd6ef5218), new Int_64(K_sha2[45], 0x5565a910),\n\t\t\t\tnew Int_64(K_sha2[46], 0x5771202a), new Int_64(K_sha2[47], 0x32bbd1b8),\n\t\t\t\tnew Int_64(K_sha2[48], 0xb8d2d0c8), new Int_64(K_sha2[49], 0x5141ab53),\n\t\t\t\tnew Int_64(K_sha2[50], 0xdf8eeb99), new Int_64(K_sha2[51], 0xe19b48a8),\n\t\t\t\tnew Int_64(K_sha2[52], 0xc5c95a63), new Int_64(K_sha2[53], 0xe3418acb),\n\t\t\t\tnew Int_64(K_sha2[54], 0x7763e373), new Int_64(K_sha2[55], 0xd6b2b8a3),\n\t\t\t\tnew Int_64(K_sha2[56], 0x5defb2fc), new Int_64(K_sha2[57], 0x43172f60),\n\t\t\t\tnew Int_64(K_sha2[58], 0xa1f0ab72), new Int_64(K_sha2[59], 0x1a6439ec),\n\t\t\t\tnew Int_64(K_sha2[60], 0x23631e28), new Int_64(K_sha2[61], 0xde82bde9),\n\t\t\t\tnew Int_64(K_sha2[62], 0xb2c67915), new Int_64(K_sha2[63], 0xe372532b),\n\t\t\t\tnew Int_64(0xca273ece, 0xea26619c), new Int_64(0xd186b8c7, 0x21c0c207),\n\t\t\t\tnew Int_64(0xeada7dd6, 0xcde0eb1e), new Int_64(0xf57d4f7f, 0xee6ed178),\n\t\t\t\tnew Int_64(0x06f067aa, 0x72176fba), new Int_64(0x0a637dc5, 0xa2c898a6),\n\t\t\t\tnew Int_64(0x113f9804, 0xbef90dae), new Int_64(0x1b710b35, 0x131c471b),\n\t\t\t\tnew Int_64(0x28db77f5, 0x23047d84), new Int_64(0x32caab7b, 0x40c72493),\n\t\t\t\tnew Int_64(0x3c9ebe0a, 0x15c9bebc), new Int_64(0x431d67c4, 0x9c100d4c),\n\t\t\t\tnew Int_64(0x4cc5d4be, 0xcb3e42b6), new Int_64(0x597f299c, 0xfc657e2a),\n\t\t\t\tnew Int_64(0x5fcb6fab, 0x3ad6faec), new Int_64(0x6c44198c, 0x4a475817)\n\t\t\t];\n\t\t}\n\t}\n\tif ((8 & SUPPORTED_ALGS) !== 0)\n\t{\n\t\trc_sha3 = [\n\t\t\tnew Int_64(0x00000000, 0x00000001), new Int_64(0x00000000, 0x00008082),\n\t\t\tnew Int_64(0x80000000, 0x0000808A), new Int_64(0x80000000, 0x80008000),\n\t\t\tnew Int_64(0x00000000, 0x0000808B), new Int_64(0x00000000, 0x80000001),\n\t\t\tnew Int_64(0x80000000, 0x80008081), new Int_64(0x80000000, 0x00008009),\n\t\t\tnew Int_64(0x00000000, 0x0000008A), new Int_64(0x00000000, 0x00000088),\n\t\t\tnew Int_64(0x00000000, 0x80008009), new Int_64(0x00000000, 0x8000000A),\n\t\t\tnew Int_64(0x00000000, 0x8000808B), new Int_64(0x80000000, 0x0000008B),\n\t\t\tnew Int_64(0x80000000, 0x00008089), new Int_64(0x80000000, 0x00008003),\n\t\t\tnew Int_64(0x80000000, 0x00008002), new Int_64(0x80000000, 0x00000080),\n\t\t\tnew Int_64(0x00000000, 0x0000800A), new Int_64(0x80000000, 0x8000000A),\n\t\t\tnew Int_64(0x80000000, 0x80008081), new Int_64(0x80000000, 0x00008080),\n\t\t\tnew Int_64(0x00000000, 0x80000001), new Int_64(0x80000000, 0x80008008)\n\t\t];\n\n\t\tr_sha3 = [\n\t\t\t[ 0, 36, 3, 41, 18],\n\t\t\t[ 1, 44, 10, 45, 2],\n\t\t\t[62, 6, 43, 15, 61],\n\t\t\t[28, 55, 25, 21, 56],\n\t\t\t[27, 20, 39, 8, 14]\n\t\t];\n\t}\n\n\t/**\n\t * Performs a round of SHA-2 hashing over a block\n\t *\n\t * @private\n\t * @param {Array} block The binary array representation of the\n\t * block to hash\n\t * @param {Array} H The intermediate H values from a previous\n\t * round\n\t * @param {string} variant The desired SHA-2 variant\n\t * @return {Array} The resulting H values\n\t */\n\tfunction roundSHA2(block, H, variant)\n\t{\n\t\tvar a, b, c, d, e, f, g, h, T1, T2, numRounds, t, binaryStringMult,\n\t\t\tsafeAdd_2, safeAdd_4, safeAdd_5, gamma0, gamma1, sigma0, sigma1,\n\t\t\tch, maj, Int, W = [], int1, int2, offset, K;\n\n\t\t/* Set up the various function handles and variable for the specific\n\t\t * variant */\n\t\tif ((variant === \"SHA-224\" || variant === \"SHA-256\") &&\n\t\t\t((2 & SUPPORTED_ALGS) !== 0))\n\t\t{\n\t\t\t/* 32-bit variant */\n\t\t\tnumRounds = 64;\n\t\t\tbinaryStringMult = 1;\n\t\t\tInt = Number;\n\t\t\tsafeAdd_2 = safeAdd_32_2;\n\t\t\tsafeAdd_4 = safeAdd_32_4;\n\t\t\tsafeAdd_5 = safeAdd_32_5;\n\t\t\tgamma0 = gamma0_32;\n\t\t\tgamma1 = gamma1_32;\n\t\t\tsigma0 = sigma0_32;\n\t\t\tsigma1 = sigma1_32;\n\t\t\tmaj = maj_32;\n\t\t\tch = ch_32;\n\t\t\tK = K_sha2;\n\t\t}\n\t\telse if ((variant === \"SHA-384\" || variant === \"SHA-512\") &&\n\t\t\t((4 & SUPPORTED_ALGS) !== 0))\n\t\t{\n\t\t\t/* 64-bit variant */\n\t\t\tnumRounds = 80;\n\t\t\tbinaryStringMult = 2;\n\t\t\tInt = Int_64;\n\t\t\tsafeAdd_2 = safeAdd_64_2;\n\t\t\tsafeAdd_4 = safeAdd_64_4;\n\t\t\tsafeAdd_5 = safeAdd_64_5;\n\t\t\tgamma0 = gamma0_64;\n\t\t\tgamma1 = gamma1_64;\n\t\t\tsigma0 = sigma0_64;\n\t\t\tsigma1 = sigma1_64;\n\t\t\tmaj = maj_64;\n\t\t\tch = ch_64;\n\t\t\tK = K_sha512;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Error(\"Unexpected error in SHA-2 implementation\");\n\t\t}\n\n\t\ta = H[0];\n\t\tb = H[1];\n\t\tc = H[2];\n\t\td = H[3];\n\t\te = H[4];\n\t\tf = H[5];\n\t\tg = H[6];\n\t\th = H[7];\n\n\t\tfor (t = 0; t < numRounds; t += 1)\n\t\t{\n\t\t\tif (t < 16)\n\t\t\t{\n\t\t\t\toffset = t * binaryStringMult;\n\t\t\t\tint1 = (block.length <= offset) ? 0 : block[offset];\n\t\t\t\tint2 = (block.length <= offset + 1) ? 0 : block[offset + 1];\n\t\t\t\t/* Bit of a hack - for 32-bit, the second term is ignored */\n\t\t\t\tW[t] = new Int(int1, int2);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tW[t] = safeAdd_4(\n\t\t\t\t\t\tgamma1(W[t - 2]), W[t - 7],\n\t\t\t\t\t\tgamma0(W[t - 15]), W[t - 16]\n\t\t\t\t\t);\n\t\t\t}\n\n\t\t\tT1 = safeAdd_5(h, sigma1(e), ch(e, f, g), K[t], W[t]);\n\t\t\tT2 = safeAdd_2(sigma0(a), maj(a, b, c));\n\t\t\th = g;\n\t\t\tg = f;\n\t\t\tf = e;\n\t\t\te = safeAdd_2(d, T1);\n\t\t\td = c;\n\t\t\tc = b;\n\t\t\tb = a;\n\t\t\ta = safeAdd_2(T1, T2);\n\t\t}\n\n\t\tH[0] = safeAdd_2(a, H[0]);\n\t\tH[1] = safeAdd_2(b, H[1]);\n\t\tH[2] = safeAdd_2(c, H[2]);\n\t\tH[3] = safeAdd_2(d, H[3]);\n\t\tH[4] = safeAdd_2(e, H[4]);\n\t\tH[5] = safeAdd_2(f, H[5]);\n\t\tH[6] = safeAdd_2(g, H[6]);\n\t\tH[7] = safeAdd_2(h, H[7]);\n\n\t\treturn H;\n\t}\n\n\t/**\n\t * Finalizes the SHA-2 hash\n\t *\n\t * @private\n\t * @param {Array} remainder Any leftover unprocessed packed ints\n\t * that still need to be processed\n\t * @param {number} remainderBinLen The number of bits in remainder\n\t * @param {number} processedBinLen The number of bits already\n\t * processed\n\t * @param {Array} H The intermediate H values from a previous\n\t * round\n\t * @param {string} variant The desired SHA-2 variant\n\t * @param {number} outputLen Unused for this variant\n\t * @return {Array} The array of integers representing the SHA-2\n\t * hash of message\n\t */\n\tfunction finalizeSHA2(remainder, remainderBinLen, processedBinLen, H, variant, outputLen)\n\t{\n\t\tvar i, appendedMessageLength, offset, retVal, binaryStringInc, totalLen;\n\n\t\tif ((variant === \"SHA-224\" || variant === \"SHA-256\") &&\n\t\t\t((2 & SUPPORTED_ALGS) !== 0))\n\t\t{\n\t\t\t/* 32-bit variant */\n\t\t\t/* The 65 addition is a hack but it works. The correct number is\n\t\t\t actually 72 (64 + 8) but the below math fails if\n\t\t\t remainderBinLen + 72 % 512 = 0. Since remainderBinLen % 8 = 0,\n\t\t\t \"shorting\" the addition is OK. */\n\t\t\toffset = (((remainderBinLen + 65) >>> 9) << 4) + 15;\n\t\t\tbinaryStringInc = 16;\n\t\t}\n\t\telse if ((variant === \"SHA-384\" || variant === \"SHA-512\") &&\n\t\t\t((4 & SUPPORTED_ALGS) !== 0))\n\t\t{\n\t\t\t/* 64-bit variant */\n\t\t\t/* The 129 addition is a hack but it works. The correct number is\n\t\t\t actually 136 (128 + 8) but the below math fails if\n\t\t\t remainderBinLen + 136 % 1024 = 0. Since remainderBinLen % 8 = 0,\n\t\t\t \"shorting\" the addition is OK. */\n\t\t\toffset = (((remainderBinLen + 129) >>> 10) << 5) + 31;\n\t\t\tbinaryStringInc = 32;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Error(\"Unexpected error in SHA-2 implementation\");\n\t\t}\n\n\t\twhile (remainder.length <= offset)\n\t\t{\n\t\t\tremainder.push(0);\n\t\t}\n\t\t/* Append '1' at the end of the binary string */\n\t\tremainder[remainderBinLen >>> 5] |= 0x80 << (24 - remainderBinLen % 32);\n\t\t/* Append length of binary string in the position such that the new\n\t\t * length is correct. JavaScript numbers are limited to 2^53 so it's\n\t\t * \"safe\" to treat the totalLen as a 64-bit integer. */\n\t\ttotalLen = remainderBinLen + processedBinLen;\n\t\tremainder[offset] = totalLen & 0xFFFFFFFF;\n\t\t/* Bitwise operators treat the operand as a 32-bit number so need to\n\t\t * use hacky division and round to get access to upper 32-ish bits */\n\t\tremainder[offset - 1] = (totalLen / TWO_PWR_32) | 0;\n\n\t\tappendedMessageLength = remainder.length;\n\n\t\t/* This will always be at least 1 full chunk */\n\t\tfor (i = 0; i < appendedMessageLength; i += binaryStringInc)\n\t\t{\n\t\t\tH = roundSHA2(remainder.slice(i, i + binaryStringInc), H, variant);\n\t\t}\n\n\t\tif ((\"SHA-224\" === variant) && ((2 & SUPPORTED_ALGS) !== 0))\n\t\t{\n\t\t\tretVal = [\n\t\t\t\tH[0], H[1], H[2], H[3],\n\t\t\t\tH[4], H[5], H[6]\n\t\t\t];\n\t\t}\n\t\telse if ((\"SHA-256\" === variant) && ((2 & SUPPORTED_ALGS) !== 0))\n\t\t{\n\t\t\tretVal = H;\n\t\t}\n\t\telse if ((\"SHA-384\" === variant) && ((4 & SUPPORTED_ALGS) !== 0))\n\t\t{\n\t\t\tretVal = [\n\t\t\t\tH[0].highOrder, H[0].lowOrder,\n\t\t\t\tH[1].highOrder, H[1].lowOrder,\n\t\t\t\tH[2].highOrder, H[2].lowOrder,\n\t\t\t\tH[3].highOrder, H[3].lowOrder,\n\t\t\t\tH[4].highOrder, H[4].lowOrder,\n\t\t\t\tH[5].highOrder, H[5].lowOrder\n\t\t\t];\n\t\t}\n\t\telse if ((\"SHA-512\" === variant) && ((4 & SUPPORTED_ALGS) !== 0))\n\t\t{\n\t\t\tretVal = [\n\t\t\t\tH[0].highOrder, H[0].lowOrder,\n\t\t\t\tH[1].highOrder, H[1].lowOrder,\n\t\t\t\tH[2].highOrder, H[2].lowOrder,\n\t\t\t\tH[3].highOrder, H[3].lowOrder,\n\t\t\t\tH[4].highOrder, H[4].lowOrder,\n\t\t\t\tH[5].highOrder, H[5].lowOrder,\n\t\t\t\tH[6].highOrder, H[6].lowOrder,\n\t\t\t\tH[7].highOrder, H[7].lowOrder\n\t\t\t];\n\t\t}\n\t\telse /* This should never be reached */\n\t\t{\n\t\t\tthrow new Error(\"Unexpected error in SHA-2 implementation\");\n\t\t}\n\n\t\treturn retVal;\n\t}\n\n\t/**\n\t * Performs a round of SHA-3 hashing over a block\n\t *\n\t * @private\n\t * @param {Array|null} block The binary array representation of the\n\t * block to hash\n\t * @param {Array>} state The binary array representation of the\n\t * block to hash\n\t * @return {Array>} The resulting state value\n\t */\n\tfunction roundSHA3(block, state)\n\t{\n\t\tvar round, x, y, B, C = [], D = [];\n\n\t\tif (null !== block)\n\t\t{\n\t\t\tfor (x = 0; x < block.length; x+=2)\n\t\t\t{\n\t\t\t\tstate[(x >>> 1) % 5][((x >>> 1) / 5) | 0] = xor_64_2(\n\t\t\t\t\tstate[(x >>> 1) % 5][((x >>> 1) / 5) | 0],\n\t\t\t\t\tnew Int_64(block[x + 1], block[x])\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tfor (round = 0; round < 24; round += 1)\n\t\t{\n\t\t\t/* getNewState doesn't care about variant beyond SHA3 so feed it a\n\t\t\t value that triggers the getNewState \"if\" statement\n\t\t\t*/\n\t\t\tB = getNewState(\"SHA3-\");\n\n\t\t\t/* Perform theta step */\n\t\t\tfor (x = 0; x < 5; x += 1)\n\t\t\t{\n\t\t\t\tC[x] = xor_64_5(state[x][0], state[x][1], state[x][2],\n\t\t\t\t\tstate[x][3], state[x][4]);\n\t\t\t}\n\t\t\tfor (x = 0; x < 5; x += 1)\n\t\t\t{\n\t\t\t\tD[x] = xor_64_2(C[(x + 4) % 5], rotl_64(C[(x + 1) % 5], 1));\n\t\t\t}\n\t\t\tfor (x = 0; x < 5; x += 1)\n\t\t\t{\n\t\t\t\tfor (y = 0; y < 5; y += 1)\n\t\t\t\t{\n\t\t\t\t\tstate[x][y] = xor_64_2(state[x][y], D[x]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Perform combined ro and pi steps */\n\t\t\tfor (x = 0; x < 5; x += 1)\n\t\t\t{\n\t\t\t\tfor (y = 0; y < 5; y += 1)\n\t\t\t\t{\n\t\t\t\t\tB[y][(2 * x + 3 * y) % 5] = rotl_64(\n\t\t\t\t\t\tstate[x][y],\n\t\t\t\t\t\tr_sha3[x][y]\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Perform chi step */\n\t\t\tfor (x = 0; x < 5; x += 1)\n\t\t\t{\n\t\t\t\tfor (y = 0; y < 5; y += 1)\n\t\t\t\t{\n\t\t\t\t\tstate[x][y] = xor_64_2(\n\t\t\t\t\t\tB[x][y],\n\t\t\t\t\t\tnew Int_64(\n\t\t\t\t\t\t\t~(B[(x + 1) % 5][y].highOrder) & B[(x + 2) % 5][y].highOrder,\n\t\t\t\t\t\t\t~(B[(x + 1) % 5][y].lowOrder) & B[(x + 2) % 5][y].lowOrder\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Perform iota step */\n\t\t\tstate[0][0] = xor_64_2(state[0][0], rc_sha3[round]);\n\t\t}\n\n\t\treturn state;\n\t}\n\n\t/**\n\t * Finalizes the SHA-3 hash\n\t *\n\t * @private\n\t * @param {Array} remainder Any leftover unprocessed packed ints\n\t * that still need to be processed\n\t * @param {number} remainderBinLen The number of bits in remainder\n\t * @param {number} processedBinLen The number of bits already\n\t * processed\n\t * @param {Array>} state The state from a previous round\n\t * @param {number} blockSize The block size/rate of the variant in bits\n\t * @param {number} delimiter The delimiter value for the variant\n\t * @param {number} outputLen The output length for the variant in bits\n\t * @return {Array} The array of integers representing the SHA-3\n\t * hash of message\n\t */\n\tfunction finalizeSHA3(remainder, remainderBinLen, processedBinLen, state, blockSize, delimiter, outputLen)\n\t{\n\t\tvar i, retVal = [], binaryStringInc = blockSize >>> 5, state_offset = 0,\n\t\t\tremainderIntLen = remainderBinLen >>> 5, temp;\n\n\n\t\t/* Process as many blocks as possible, some may be here for multiple rounds\n\t\t with SHAKE\n\t\t*/\n\t\tfor (i = 0; i < remainderIntLen && remainderBinLen >= blockSize; i += binaryStringInc)\n\t\t{\n\t\t\tstate = roundSHA3(remainder.slice(i, i + binaryStringInc), state);\n\t\t\tremainderBinLen -= blockSize;\n\t\t}\n\n\t\tremainder = remainder.slice(i);\n\t\tremainderBinLen = remainderBinLen % blockSize;\n\n\t\t/* Pad out the remainder to a full block */\n\t\twhile (remainder.length < binaryStringInc)\n\t\t{\n\t\t\tremainder.push(0);\n\t\t}\n\n\t\t/* Find the next \"empty\" byte for the 0x80 and append it via an xor */\n\t\ti = remainderBinLen >>> 3;\n\t\tremainder[i >> 2] ^= delimiter << (8 * (i % 4));\n\n\t\tremainder[binaryStringInc - 1] ^= 0x80000000;\n\t\tstate = roundSHA3(remainder, state);\n\n\t\twhile (retVal.length * 32 < outputLen)\n\t\t{\n\t\t\ttemp = state[state_offset % 5][(state_offset / 5) | 0];\n\t\t\tretVal.push(temp.lowOrder);\n\t\t\tif (retVal.length * 32 >= outputLen)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tretVal.push(temp.highOrder);\n\t\t\tstate_offset += 1;\n\n\t\t\tif (0 === ((state_offset * 64) % blockSize))\n\t\t\t{\n\t\t\t\troundSHA3(null, state);\n\t\t\t}\n\t\t}\n\n\t\treturn retVal;\n\t}\n\n\t/**\n\t * jsSHA is the workhorse of the library. Instantiate it with the string to\n\t * be hashed as the parameter\n\t *\n\t * @constructor\n\t * @this {jsSHA}\n\t * @param {string} variant The desired SHA variant (SHA-1, SHA-224, SHA-256,\n\t * SHA-384, SHA-512, SHA3-224, SHA3-256, SHA3-384, or SHA3-512)\n\t * @param {string} inputFormat The format of srcString: HEX, TEXT, B64,\n\t * BYTES, or ARRAYBUFFER\n\t * @param {{encoding: (string|undefined), numRounds: (number|undefined)}=}\n\t * options Optional values\n\t */\n\tvar jsSHA = function(variant, inputFormat, options)\n\t{\n\t\tvar processedLen = 0, remainder = [], remainderLen = 0, utfType,\n\t\t\tintermediateState, converterFunc, shaVariant = variant, outputBinLen,\n\t\t\tvariantBlockSize, roundFunc, finalizeFunc, stateCloneFunc,\n\t\t\thmacKeySet = false, keyWithIPad = [], keyWithOPad = [], numRounds,\n\t\t\tupdatedCalled = false, inputOptions, isSHAKE = false, bigEndianMod = -1;\n\n\t\tinputOptions = options || {};\n\t\tutfType = inputOptions[\"encoding\"] || \"UTF8\";\n\t\tnumRounds = inputOptions[\"numRounds\"] || 1;\n\n\t\tif ((numRounds !== parseInt(numRounds, 10)) || (1 > numRounds))\n\t\t{\n\t\t\tthrow new Error(\"numRounds must a integer >= 1\");\n\t\t}\n\n\t\tif ((\"SHA-1\" === shaVariant) && ((1 & SUPPORTED_ALGS) !== 0))\n\t\t{\n\t\t\tvariantBlockSize = 512;\n\t\t\troundFunc = roundSHA1;\n\t\t\tfinalizeFunc = finalizeSHA1;\n\t\t\toutputBinLen = 160;\n\t\t\tstateCloneFunc = function(state) { return state.slice();};\n\t\t}\n\t\telse if ((shaVariant.lastIndexOf(\"SHA-\", 0) === 0) && ((6 & SUPPORTED_ALGS) !== 0))\n\t\t{\n\t\t\troundFunc = function (block, H) {\n\t\t\t\treturn roundSHA2(block, H, shaVariant);\n\t\t\t};\n\t\t\tfinalizeFunc = function (remainder, remainderBinLen, processedBinLen, H, outputLen)\n\t\t\t{\n\t\t\t\treturn finalizeSHA2(remainder, remainderBinLen, processedBinLen, H, shaVariant, outputLen);\n\t\t\t};\n\t\t\tstateCloneFunc = function(state) { return state.slice(); };\n\n\t\t\tif ((\"SHA-224\" === shaVariant) && ((2 & SUPPORTED_ALGS) !== 0))\n\t\t\t{\n\t\t\t\tvariantBlockSize = 512;\n\t\t\t\toutputBinLen = 224;\n\t\t\t}\n\t\t\telse if ((\"SHA-256\" === shaVariant) && ((2 & SUPPORTED_ALGS) !== 0))\n\t\t\t{\n\t\t\t\tvariantBlockSize = 512;\n\t\t\t\toutputBinLen = 256;\n\t\t\t}\n\t\t\telse if ((\"SHA-384\" === shaVariant) && ((4 & SUPPORTED_ALGS) !== 0))\n\t\t\t{\n\t\t\t\tvariantBlockSize = 1024;\n\t\t\t\toutputBinLen = 384;\n\t\t\t}\n\t\t\telse if ((\"SHA-512\" === shaVariant) && ((4 & SUPPORTED_ALGS) !== 0))\n\t\t\t{\n\t\t\t\tvariantBlockSize = 1024;\n\t\t\t\toutputBinLen = 512;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Error(\"Chosen SHA variant is not supported\");\n\t\t\t}\n\t\t}\n\t\telse if (((shaVariant.lastIndexOf(\"SHA3-\", 0) === 0) || (shaVariant.lastIndexOf(\"SHAKE\", 0) === 0)) &&\n\t\t\t((8 & SUPPORTED_ALGS) !== 0))\n\t\t{\n\t\t\tvar delimiter = 0x06;\n\n\t\t\troundFunc = roundSHA3;\n\t\t\tstateCloneFunc = function(state) { return cloneSHA3State(state);};\n\t\t\tbigEndianMod = 1;\n\n\t\t\tif (\"SHA3-224\" === shaVariant)\n\t\t\t{\n\t\t\t\tvariantBlockSize = 1152;\n\t\t\t\toutputBinLen = 224;\n\n\t\t\t}\n\t\t\telse if (\"SHA3-256\" === shaVariant)\n\t\t\t{\n\t\t\t\tvariantBlockSize = 1088;\n\t\t\t\toutputBinLen = 256;\n\t\t\t}\n\t\t\telse if (\"SHA3-384\" === shaVariant)\n\t\t\t{\n\t\t\t\tvariantBlockSize = 832;\n\t\t\t\toutputBinLen = 384;\n\t\t\t}\n\t\t\telse if (\"SHA3-512\" === shaVariant)\n\t\t\t{\n\t\t\t\tvariantBlockSize = 576;\n\t\t\t\toutputBinLen = 512;\n\t\t\t}\n\t\t\telse if (\"SHAKE128\" === shaVariant)\n\t\t\t{\n\t\t\t\tvariantBlockSize = 1344;\n\t\t\t\toutputBinLen = -1;\n\t\t\t\tdelimiter = 0x1F;\n\t\t\t\tisSHAKE = true;\n\t\t\t}\n\t\t\telse if (\"SHAKE256\" === shaVariant)\n\t\t\t{\n\t\t\t\tvariantBlockSize = 1088;\n\t\t\t\toutputBinLen = -1;\n\t\t\t\tdelimiter = 0x1F;\n\t\t\t\tisSHAKE = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Error(\"Chosen SHA variant is not supported\");\n\t\t\t}\n\t\t\tfinalizeFunc = function (remainder, remainderBinLen, processedBinLen, state, outputLen)\n\t\t\t{\n\t\t\t\treturn finalizeSHA3(remainder, remainderBinLen, processedBinLen, state, variantBlockSize, delimiter, outputLen);\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Error(\"Chosen SHA variant is not supported\");\n\t\t}\n\t\tconverterFunc = getStrConverter(inputFormat, utfType, bigEndianMod);\n\t\tintermediateState = getNewState(shaVariant);\n\n\t\t/**\n\t\t * Sets the HMAC key for an eventual getHMAC call. Must be called\n\t\t * immediately after jsSHA object instantiation\n\t\t *\n\t\t * @expose\n\t\t * @param {string|ArrayBuffer} key The key used to calculate the HMAC\n\t\t * @param {string} inputFormat The format of key, HEX, TEXT, B64, BYTES,\n\t\t * or ARRAYBUFFER\n\t\t * @param {{encoding : (string|undefined)}=} options Associative array\n\t\t * of input format options\n\t\t */\n\t\tthis.setHMACKey = function(key, inputFormat, options)\n\t\t{\n\t\t\tvar keyConverterFunc, convertRet, keyBinLen, keyToUse, blockByteSize,\n\t\t\t\ti, lastArrayIndex, keyOptions;\n\n\t\t\tif (true === hmacKeySet)\n\t\t\t{\n\t\t\t\tthrow new Error(\"HMAC key already set\");\n\t\t\t}\n\n\t\t\tif (true === updatedCalled)\n\t\t\t{\n\t\t\t\tthrow new Error(\"Cannot set HMAC key after calling update\");\n\t\t\t}\n\n\t\t\tif ((isSHAKE === true) && ((8 & SUPPORTED_ALGS) !== 0))\n\t\t\t{\n\t\t\t\tthrow new Error(\"SHAKE is not supported for HMAC\");\n\t\t\t}\n\n\t\t\tkeyOptions = options || {};\n\t\t\tutfType = keyOptions[\"encoding\"] || \"UTF8\";\n\n\t\t\tkeyConverterFunc = getStrConverter(inputFormat, utfType, bigEndianMod);\n\n\t\t\tconvertRet = keyConverterFunc(key);\n\t\t\tkeyBinLen = convertRet[\"binLen\"];\n\t\t\tkeyToUse = convertRet[\"value\"];\n\n\t\t\tblockByteSize = variantBlockSize >>> 3;\n\n\t\t\t/* These are used multiple times, calculate and store them */\n\t\t\tlastArrayIndex = (blockByteSize / 4) - 1;\n\n\t\t\t/* Figure out what to do with the key based on its size relative to\n\t\t\t * the hash's block size */\n\t\t\tif (blockByteSize < (keyBinLen / 8))\n\t\t\t{\n\n\t\t\t\tkeyToUse = finalizeFunc(keyToUse, keyBinLen, 0,getNewState(shaVariant), outputBinLen);\n\t\t\t\t/* For all variants, the block size is bigger than the output\n\t\t\t\t * size so there will never be a useful byte at the end of the\n\t\t\t\t * string */\n\t\t\t\twhile (keyToUse.length <= lastArrayIndex)\n\t\t\t\t{\n\t\t\t\t\tkeyToUse.push(0);\n\t\t\t\t}\n\t\t\t\tkeyToUse[lastArrayIndex] &= 0xFFFFFF00;\n\t\t\t}\n\t\t\telse if (blockByteSize > (keyBinLen / 8))\n\t\t\t{\n\t\t\t\t/* If the blockByteSize is greater than the key length, there\n\t\t\t\t * will always be at LEAST one \"useless\" byte at the end of the\n\t\t\t\t * string */\n\t\t\t\twhile (keyToUse.length <= lastArrayIndex)\n\t\t\t\t{\n\t\t\t\t\tkeyToUse.push(0);\n\t\t\t\t}\n\t\t\t\tkeyToUse[lastArrayIndex] &= 0xFFFFFF00;\n\t\t\t}\n\n\t\t\t/* Create ipad and opad */\n\t\t\tfor (i = 0; i <= lastArrayIndex; i += 1)\n\t\t\t{\n\t\t\t\tkeyWithIPad[i] = keyToUse[i] ^ 0x36363636;\n\t\t\t\tkeyWithOPad[i] = keyToUse[i] ^ 0x5C5C5C5C;\n\t\t\t}\n\n\t\t\tintermediateState = roundFunc(keyWithIPad, intermediateState);\n\t\t\tprocessedLen = variantBlockSize;\n\n\t\t\thmacKeySet = true;\n\t\t};\n\n\t\t/**\n\t\t * Takes strString and hashes as many blocks as possible. Stores the\n\t\t * rest for either a future update or getHash call.\n\t\t *\n\t\t * @expose\n\t\t * @param {string|ArrayBuffer} srcString The string to be hashed\n\t\t */\n\t\tthis.update = function(srcString)\n\t\t{\n\t\t\tvar convertRet, chunkBinLen, chunkIntLen, chunk, i, updateProcessedLen = 0,\n\t\t\t\tvariantBlockIntInc = variantBlockSize >>> 5;\n\n\t\t\tconvertRet = converterFunc(srcString, remainder, remainderLen);\n\t\t\tchunkBinLen = convertRet[\"binLen\"];\n\t\t\tchunk = convertRet[\"value\"];\n\n\t\t\tchunkIntLen = chunkBinLen >>> 5;\n\t\t\tfor (i = 0; i < chunkIntLen; i += variantBlockIntInc)\n\t\t\t{\n\t\t\t\tif (updateProcessedLen + variantBlockSize <= chunkBinLen)\n\t\t\t\t{\n\t\t\t\t\tintermediateState = roundFunc(\n\t\t\t\t\t\tchunk.slice(i, i + variantBlockIntInc),\n\t\t\t\t\t\tintermediateState\n\t\t\t\t\t);\n\t\t\t\t\tupdateProcessedLen += variantBlockSize;\n\t\t\t\t}\n\t\t\t}\n\t\t\tprocessedLen += updateProcessedLen;\n\t\t\tremainder = chunk.slice(updateProcessedLen >>> 5);\n\t\t\tremainderLen = chunkBinLen % variantBlockSize;\n\t\t\tupdatedCalled = true;\n\n\t\t};\n\n\t\t/**\n\t\t * Returns the desired SHA hash of the string specified at instantiation\n\t\t * using the specified parameters\n\t\t *\n\t\t * @expose\n\t\t * @param {string} format The desired output formatting (B64, HEX,\n\t\t * BYTES, or ARRAYBUFFER)\n\t\t * @param {{outputUpper : (boolean|undefined), b64Pad : (string|undefined),\n\t\t * shakeLen : (number|undefined)}=} options Hash list of output formatting options\n\t\t * @return {string|ArrayBuffer} The string representation of the hash\n\t\t * in the format specified.\n\t\t */\n\t\tthis.getHash = function(format, options)\n\t\t{\n\t\t\tvar formatFunc, i, outputOptions, finalizedState;\n\n\t\t\tif (true === hmacKeySet)\n\t\t\t{\n\t\t\t\tthrow new Error(\"Cannot call getHash after setting HMAC key\");\n\t\t\t}\n\n\t\t\toutputOptions = getOutputOpts(options);\n\n\t\t\tif ((isSHAKE === true) && ((8 & SUPPORTED_ALGS) !== 0))\n\t\t\t{\n\t\t\t\tif (outputOptions[\"shakeLen\"] === -1)\n\t\t\t\t{\n\t\t\t\t\tthrow new Error(\"shakeLen must be specified in options\");\n\t\t\t\t}\n\t\t\t\toutputBinLen = outputOptions[\"shakeLen\"];\n\t\t\t}\n\n\t\t\t/* Validate the output format selection */\n\t\t\tswitch (format)\n\t\t\t{\n\t\t\tcase \"HEX\":\n\t\t\t\tformatFunc = function(binarray) {return packed2hex(binarray, outputBinLen, bigEndianMod, outputOptions);};\n\t\t\t\tbreak;\n\t\t\tcase \"B64\":\n\t\t\t\tformatFunc = function(binarray) {return packed2b64(binarray, outputBinLen, bigEndianMod, outputOptions);};\n\t\t\t\tbreak;\n\t\t\tcase \"BYTES\":\n\t\t\t\tformatFunc = function(binarray) {return packed2bytes(binarray, outputBinLen, bigEndianMod);};\n\t\t\t\tbreak;\n\t\t\tcase \"ARRAYBUFFER\":\n\t\t\t\ttry {\n\t\t\t\t\ti = new ArrayBuffer(0);\n\t\t\t\t} catch (ignore) {\n\t\t\t\t\tthrow new Error(\"ARRAYBUFFER not supported by this environment\");\n\t\t\t\t}\n\t\t\t\tformatFunc = function(binarray) {return packed2arraybuffer(binarray, outputBinLen, bigEndianMod);};\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error(\"format must be HEX, B64, BYTES, or ARRAYBUFFER\");\n\t\t\t}\n\n\t\t\tfinalizedState = finalizeFunc(remainder.slice(), remainderLen, processedLen, stateCloneFunc(intermediateState), outputBinLen);\n\t\t\tfor (i = 1; i < numRounds; i += 1)\n\t\t\t{\n\t\t\t\t/* This weird fix-up is only for the case of SHAKE algorithms\n\t\t\t\t * and outputBinLen is not a multiple of 32. In this case, the\n\t\t\t\t * very last block of finalizedState has data that needs to be\n\t\t\t\t * ignored because all the finalizeFunc calls need to have\n\t\t\t\t * unneeded bits set to 0.\n\t\t\t\t */\n\t\t\t\tif (((8 & SUPPORTED_ALGS) !== 0) && (isSHAKE === true) && (outputBinLen % 32 !== 0))\n\t\t\t\t{\n\t\t\t\t\tfinalizedState[finalizedState.length - 1] &= 0x00FFFFFF >>> 24 - (outputBinLen % 32);\n\t\t\t\t}\n\t\t\t\tfinalizedState = finalizeFunc(finalizedState, outputBinLen, 0, getNewState(shaVariant), outputBinLen);\n\t\t\t}\n\n\t\t\treturn formatFunc(finalizedState);\n\t\t};\n\n\t\t/**\n\t\t * Returns the the HMAC in the specified format using the key given by\n\t\t * a previous setHMACKey call.\n\t\t *\n\t\t * @expose\n\t\t * @param {string} format The desired output formatting\n\t\t * (B64, HEX, BYTES, or ARRAYBUFFER)\n\t\t * @param {{outputUpper : (boolean|undefined), b64Pad : (string|undefined),\n\t\t * shakeLen : (number|undefined)}=} options associative array of output\n\t\t * formatting options\n\t\t * @return {string|ArrayBuffer} The string representation of the hash in the\n\t\t * format specified.\n\t\t */\n\t\tthis.getHMAC = function(format, options)\n\t\t{\n\t\t\tvar formatFunc,\tfirstHash, outputOptions, finalizedState;\n\n\t\t\tif (false === hmacKeySet)\n\t\t\t{\n\t\t\t\tthrow new Error(\"Cannot call getHMAC without first setting HMAC key\");\n\t\t\t}\n\n\t\t\toutputOptions = getOutputOpts(options);\n\n\t\t\t/* Validate the output format selection */\n\t\t\tswitch (format)\n\t\t\t{\n\t\t\tcase \"HEX\":\n\t\t\t\tformatFunc = function(binarray) {return packed2hex(binarray, outputBinLen, bigEndianMod, outputOptions);};\n\t\t\t\tbreak;\n\t\t\tcase \"B64\":\n\t\t\t\tformatFunc = function(binarray) {return packed2b64(binarray, outputBinLen, bigEndianMod, outputOptions);};\n\t\t\t\tbreak;\n\t\t\tcase \"BYTES\":\n\t\t\t\tformatFunc = function(binarray) {return packed2bytes(binarray, outputBinLen, bigEndianMod);};\n\t\t\t\tbreak;\n\t\t\tcase \"ARRAYBUFFER\":\n\t\t\t\ttry {\n\t\t\t\t\tformatFunc = new ArrayBuffer(0);\n\t\t\t\t} catch(ignore) {\n\t\t\t\t\tthrow new Error(\"ARRAYBUFFER not supported by this environment\");\n\t\t\t\t}\n\t\t\t\tformatFunc = function(binarray) {return packed2arraybuffer(binarray, outputBinLen, bigEndianMod);};\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error(\"outputFormat must be HEX, B64, BYTES, or ARRAYBUFFER\");\n\t\t\t}\n\n\t\t\tfirstHash = finalizeFunc(remainder.slice(), remainderLen, processedLen, stateCloneFunc(intermediateState), outputBinLen);\n\t\t\tfinalizedState = roundFunc(keyWithOPad, getNewState(shaVariant));\n\t\t\tfinalizedState = finalizeFunc(firstHash, outputBinLen, variantBlockSize, finalizedState, outputBinLen);\n\n\t\t\treturn formatFunc(finalizedState);\n\t\t};\n\t};\n\n\tif ((\"function\" === typeof define) && (define[\"amd\"])) /* AMD Support */\n\t{\n\t\tdefine(function()\n\t\t{\n\t\t\treturn jsSHA;\n\t\t});\n\t} else if (\"undefined\" !== typeof exports) /* Node Support */\n\t{\n\t\tif ((\"undefined\" !== typeof module) && module[\"exports\"])\n\t\t{\n\t\t module[\"exports\"] = jsSHA;\n\t\t exports = jsSHA;\n\t\t}\n\t\telse {\n\t\t\texports = jsSHA;\n\t\t}\n\t} else { /* Browsers and Web Workers*/\n\t\tglobal[\"jsSHA\"] = jsSHA;\n\t}\n}(this));\n"]} \ No newline at end of file +{"version":3,"sources":["plugin/sri.js"],"names":["SUPPORTED_ALGS","global","K_sha2","K_sha512","r_sha3","rc_sha3","TWO_PWR_32","Int_64","msint_32","lsint_32","this","highOrder","lowOrder","packed2hex","packed","outputLength","bigEndianMod","formatOpts","i","srcByte","shiftModifier","hex_tab","str","length","charAt","toUpperCase","packed2b64","j","triplet","int1","int2","packed2bytes","String","fromCharCode","packed2arraybuffer","arrView","retVal","ArrayBuffer","Uint8Array","getOutputOpts","options","outputOptions","outputUpper","b64Pad","shakeLen","hasOwnProperty","Error","getStrConverter","format","utfType","existingBin","existingBinLen","existingPacked","existingPackedLen","num","intOffset","byteOffset","existingByteLen","parseInt","substr","isNaN","push","value","binLen","hex2packed","codePnt","codePntArr","transposeBytes","byteCnt","charCodeAt","str2packed","tmpInt","strPart","firstEqual","search","indexOf","replace","b642packed","bytes2packed","ignore","arr","byteLength","arraybuffer2packed","rotl_32","x","n","rotl_64","rotr_32","rotr_64","tmp","shr_32","shr_64","parity_32","y","z","ch_32","ch_64","maj_32","maj_64","sigma0_32","sigma0_64","rotr28","rotr34","rotr39","sigma1_32","sigma1_64","rotr14","rotr18","rotr41","gamma0_32","gamma0_64","rotr1","rotr8","shr7","gamma1_32","gamma1_64","rotr19","rotr61","shr6","safeAdd_32_2","a","b","lsw","safeAdd_32_4","c","d","safeAdd_32_5","e","safeAdd_64_2","msw","safeAdd_64_4","safeAdd_64_5","xor_64_2","getNewState","variant","H_trunc","H_full","lastIndexOf","roundSHA1","block","H","T","t","W","ch","parity","maj","rotl","safeAdd_2","safeAdd_5","finalizeSHA1","remainder","remainderBinLen","processedBinLen","outputLen","appendedMessageLength","offset","totalLen","slice","roundSHA2","f","g","h","T1","T2","numRounds","binaryStringMult","safeAdd_4","gamma0","gamma1","sigma0","sigma1","Int","K","Number","roundSHA3","state","round","B","C","D","jsSHA","inputFormat","intermediateState","converterFunc","outputBinLen","variantBlockSize","roundFunc","finalizeFunc","stateCloneFunc","inputOptions","processedLen","remainderLen","shaVariant","hmacKeySet","keyWithIPad","keyWithOPad","updatedCalled","isSHAKE","binaryStringInc","finalizeSHA2","delimiter","clone","cloneSHA3State","blockSize","temp","state_offset","remainderIntLen","finalizeSHA3","setHMACKey","key","convertRet","keyBinLen","keyToUse","blockByteSize","lastArrayIndex","keyConverterFunc","update","srcString","chunkBinLen","chunkIntLen","chunk","updateProcessedLen","variantBlockIntInc","getHash","formatFunc","finalizedState","binarray","getHMAC","firstHash","define","exports","module","provide","path","Failure","iterate","isObject","settings","demand","on","dependency","sha","hash","match","type","source","dfd","reject","id","error"],"mappings":";AAAA,IAAIA,eAAiB,IACrB,SAAUC,GACN,aACA,IA6jBIC,EAAQC,EAAUC,EAAQC,EA7jB1BC,EAAa,WAEjB,SAASC,EAAOC,EAAUC,GACtBC,KAAKC,UAAYH,EACjBE,KAAKE,SAAWH,EA0KpB,SAASI,EAAWC,EAAQC,EAAcC,EAAcC,GACpD,IAGIC,EAAGC,EAASC,EAHZC,EAAU,mBACVC,EAAM,GACNC,EAASR,EAAe,EAG5B,IADAK,GAAkC,IAAlBJ,EAAsB,EAAI,EACrCE,EAAI,EAAGA,EAAIK,EAAQL,GAAK,EACzBC,EAAUL,EAAOI,IAAM,KAAO,GAAKE,EAAgBJ,GAAgBE,EAAI,IACvEI,GAAOD,EAAQG,OAAOL,IAAY,EAAI,IAAME,EAAQG,OAAiB,GAAVL,GAE/D,OAAOF,EAAwB,YAAIK,EAAIG,cAAgBH,EAG3D,SAASI,EAAWZ,EAAQC,EAAcC,EAAcC,GACpD,IAEIC,EAAGS,EAAGC,EAASC,EAAMC,EAAMV,EAF3BE,EAAM,GACNC,EAASR,EAAe,EAG5B,IADAK,GAAkC,IAAlBJ,EAAsB,EAAI,EACrCE,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ASC,EAASC,GACxC,IAAIC,EA8BJ,OA7BAC,OAAOC,GAAG,iBAAmBN,EAAM,SAASlM,GACpCqM,EAASrM,KACTsM,EAAWtM,KAEhBwM,GAAG,cAAe,SAASC,GAC1B,IAAIzM,EAAS0M,EAAKC,EAcHT,EACXU,EAdJ,GAaeV,EAbSO,EAAWP,KAenCE,EAAQE,EAAU,SAAS5B,EAAKpJ,GAC5B,GAAIoJ,IAAQwB,EAER,OADAU,EAAQtL,GACD,IAlBXtB,EAqBG4M,IAAS,EApBZ,KACIF,EAAM,IAAIjP,EAAOoL,MAAM7I,EAAQ6M,KAAM,SACjC5B,OAAOwB,EAAWK,SACjBH,EAAOD,EAAIlB,QAAQ,UAAYxL,EAAQ2M,MACxCF,EAAWM,IAAIC,OAAO,IAAIb,EAAQ,6BAA+BnM,EAAQ2M,KAAO,aAAeA,EAAO,UAAWF,EAAWQ,KAElI,MAAOC,GACLT,EAAWM,IAAIC,OAAO,IAAIb,EAAQ,sCAAuCM,EAAWQ,SAezF,IAlCf,CAqCG/O","file":"sri.js","sourcesContent":["var SUPPORTED_ALGS = 8 | 4 | 2 | 1;\n(function(global) {\n \"use strict\";\n var TWO_PWR_32 = 4294967296;\n\n function Int_64(msint_32, lsint_32) {\n this.highOrder = msint_32;\n this.lowOrder = lsint_32\n }\n\n function str2packed(str, utfType, existingPacked, existingPackedLen, bigEndianMod) {\n var packed, codePnt, codePntArr, byteCnt = 0,\n i, j, existingByteLen, intOffset, byteOffset, shiftModifier, transposeBytes;\n packed = existingPacked || [0];\n existingPackedLen = existingPackedLen || 0;\n existingByteLen = existingPackedLen >>> 3;\n if (\"UTF8\" === utfType) {\n shiftModifier = bigEndianMod === -1 ? 3 : 0;\n for (i = 0; i < str.length; i += 1) {\n codePnt = str.charCodeAt(i);\n codePntArr = [];\n if (128 > codePnt) {\n codePntArr.push(codePnt)\n } else if (2048 > codePnt) {\n codePntArr.push(192 | codePnt >>> 6);\n codePntArr.push(128 | codePnt & 63)\n } else if (55296 > codePnt || 57344 <= codePnt) {\n codePntArr.push(224 | codePnt >>> 12, 128 | codePnt >>> 6 & 63, 128 | codePnt & 63)\n } else {\n i += 1;\n codePnt = 65536 + ((codePnt & 1023) << 10 | str.charCodeAt(i) & 1023);\n codePntArr.push(240 | codePnt >>> 18, 128 | codePnt >>> 12 & 63, 128 | codePnt >>> 6 & 63, 128 | codePnt & 63)\n }\n for (j = 0; j < codePntArr.length; j += 1) {\n byteOffset = byteCnt + existingByteLen;\n intOffset = byteOffset >>> 2;\n while (packed.length <= intOffset) {\n packed.push(0)\n }\n packed[intOffset] |= codePntArr[j] << 8 * (shiftModifier + bigEndianMod * (byteOffset % 4));\n byteCnt += 1\n }\n }\n } else if (\"UTF16BE\" === utfType || \"UTF16LE\" === utfType) {\n shiftModifier = bigEndianMod === -1 ? 2 : 0;\n transposeBytes = \"UTF16LE\" === utfType && bigEndianMod !== 1 || \"UTF16LE\" !== utfType && bigEndianMod === 1;\n for (i = 0; i < str.length; i += 1) {\n codePnt = str.charCodeAt(i);\n if (transposeBytes === true) {\n j = codePnt & 255;\n codePnt = j << 8 | codePnt >>> 8\n }\n byteOffset = byteCnt + existingByteLen;\n intOffset = byteOffset >>> 2;\n while (packed.length <= intOffset) {\n packed.push(0)\n }\n packed[intOffset] |= codePnt << 8 * (shiftModifier + bigEndianMod * (byteOffset % 4));\n byteCnt += 2\n }\n }\n return {\n value: packed,\n binLen: byteCnt * 8 + existingPackedLen\n }\n }\n\n function hex2packed(str, existingPacked, existingPackedLen, bigEndianMod) {\n var packed, length = str.length,\n i, num, intOffset, byteOffset, existingByteLen, shiftModifier;\n if (0 !== length % 2) {\n throw new Error(\"String of HEX type must be in byte increments\")\n }\n packed = existingPacked || [0];\n existingPackedLen = existingPackedLen || 0;\n existingByteLen = existingPackedLen >>> 3;\n shiftModifier = bigEndianMod === -1 ? 3 : 0;\n for (i = 0; i < length; i += 2) {\n num = parseInt(str.substr(i, 2), 16);\n if (!isNaN(num)) {\n byteOffset = (i >>> 1) + existingByteLen;\n intOffset = byteOffset >>> 2;\n while (packed.length <= intOffset) {\n packed.push(0)\n }\n packed[intOffset] |= num << 8 * (shiftModifier + bigEndianMod * (byteOffset % 4))\n } else {\n throw new Error(\"String of HEX type contains invalid characters\")\n }\n }\n return {\n value: packed,\n binLen: length * 4 + existingPackedLen\n }\n }\n\n function bytes2packed(str, existingPacked, existingPackedLen, bigEndianMod) {\n var packed, codePnt, i, existingByteLen, intOffset, byteOffset, shiftModifier;\n packed = existingPacked || [0];\n existingPackedLen = existingPackedLen || 0;\n existingByteLen = existingPackedLen >>> 3;\n shiftModifier = bigEndianMod === -1 ? 3 : 0;\n for (i = 0; i < str.length; i += 1) {\n codePnt = str.charCodeAt(i);\n byteOffset = i + existingByteLen;\n intOffset = byteOffset >>> 2;\n if (packed.length <= intOffset) {\n packed.push(0)\n }\n packed[intOffset] |= codePnt << 8 * (shiftModifier + bigEndianMod * (byteOffset % 4))\n }\n return {\n value: packed,\n binLen: str.length * 8 + existingPackedLen\n }\n }\n\n function b642packed(str, existingPacked, existingPackedLen, bigEndianMod) {\n var packed, byteCnt = 0,\n index, i, j, tmpInt, strPart, firstEqual, b64Tab = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",\n existingByteLen, intOffset, byteOffset, shiftModifier;\n if (-1 === str.search(/^[a-zA-Z0-9=+\\/]+$/)) {\n throw new Error(\"Invalid character in base-64 string\")\n }\n firstEqual = str.indexOf(\"=\");\n str = str.replace(/\\=/g, \"\");\n if (-1 !== firstEqual && firstEqual < str.length) {\n throw new Error(\"Invalid '=' found in base-64 string\")\n }\n packed = existingPacked || [0];\n existingPackedLen = existingPackedLen || 0;\n existingByteLen = existingPackedLen >>> 3;\n shiftModifier = bigEndianMod === -1 ? 3 : 0;\n for (i = 0; i < str.length; i += 4) {\n strPart = str.substr(i, 4);\n tmpInt = 0;\n for (j = 0; j < strPart.length; j += 1) {\n index = b64Tab.indexOf(strPart[j]);\n tmpInt |= index << 18 - 6 * j\n }\n for (j = 0; j < strPart.length - 1; j += 1) {\n byteOffset = byteCnt + existingByteLen;\n intOffset = byteOffset >>> 2;\n while (packed.length <= intOffset) {\n packed.push(0)\n }\n packed[intOffset] |= (tmpInt >>> 16 - j * 8 & 255) << 8 * (shiftModifier + bigEndianMod * (byteOffset % 4));\n byteCnt += 1\n }\n }\n return {\n value: packed,\n binLen: byteCnt * 8 + existingPackedLen\n }\n }\n\n function arraybuffer2packed(arr, existingPacked, existingPackedLen, bigEndianMod) {\n var packed, i, existingByteLen, intOffset, byteOffset, shiftModifier, arrView;\n packed = existingPacked || [0];\n existingPackedLen = existingPackedLen || 0;\n existingByteLen = existingPackedLen >>> 3;\n shiftModifier = bigEndianMod === -1 ? 3 : 0;\n arrView = new Uint8Array(arr);\n for (i = 0; i < arr.byteLength; i += 1) {\n byteOffset = i + existingByteLen;\n intOffset = byteOffset >>> 2;\n if (packed.length <= intOffset) {\n packed.push(0)\n }\n packed[intOffset] |= arrView[i] << 8 * (shiftModifier + bigEndianMod * (byteOffset % 4))\n }\n return {\n value: packed,\n binLen: arr.byteLength * 8 + existingPackedLen\n }\n }\n\n function packed2hex(packed, outputLength, bigEndianMod, formatOpts) {\n var hex_tab = \"0123456789abcdef\",\n str = \"\",\n length = outputLength / 8,\n i, srcByte, shiftModifier;\n shiftModifier = bigEndianMod === -1 ? 3 : 0;\n for (i = 0; i < length; i += 1) {\n srcByte = packed[i >>> 2] >>> 8 * (shiftModifier + bigEndianMod * (i % 4));\n str += hex_tab.charAt(srcByte >>> 4 & 15) + hex_tab.charAt(srcByte & 15)\n }\n return formatOpts[\"outputUpper\"] ? str.toUpperCase() : str\n }\n\n function packed2b64(packed, outputLength, bigEndianMod, formatOpts) {\n var str = \"\",\n length = outputLength / 8,\n i, j, triplet, int1, int2, shiftModifier, b64Tab = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n shiftModifier = bigEndianMod === -1 ? 3 : 0;\n for (i = 0; i < length; i += 3) {\n int1 = i + 1 < length ? packed[i + 1 >>> 2] : 0;\n int2 = i + 2 < length ? packed[i + 2 >>> 2] : 0;\n triplet = (packed[i >>> 2] >>> 8 * (shiftModifier + bigEndianMod * (i % 4)) & 255) << 16 | (int1 >>> 8 * (shiftModifier + bigEndianMod * ((i + 1) % 4)) & 255) << 8 | int2 >>> 8 * (shiftModifier + bigEndianMod * ((i + 2) % 4)) & 255;\n for (j = 0; j < 4; j += 1) {\n if (i * 8 + j * 6 <= outputLength) {\n str += b64Tab.charAt(triplet >>> 6 * (3 - j) & 63)\n } else {\n str += formatOpts[\"b64Pad\"]\n }\n }\n }\n return str\n }\n\n function packed2bytes(packed, outputLength, bigEndianMod) {\n var str = \"\",\n length = outputLength / 8,\n i, srcByte, shiftModifier;\n shiftModifier = bigEndianMod === -1 ? 3 : 0;\n for (i = 0; i < length; i += 1) {\n srcByte = packed[i >>> 2] >>> 8 * (shiftModifier + bigEndianMod * (i % 4)) & 255;\n str += String.fromCharCode(srcByte)\n }\n return str\n }\n\n function packed2arraybuffer(packed, outputLength, bigEndianMod) {\n var length = outputLength / 8,\n i, retVal = new ArrayBuffer(length),\n shiftModifier, arrView;\n arrView = new Uint8Array(retVal);\n shiftModifier = bigEndianMod === -1 ? 3 : 0;\n for (i = 0; i < length; i += 1) {\n arrView[i] = packed[i >>> 2] >>> 8 * (shiftModifier + bigEndianMod * (i % 4)) & 255\n }\n return retVal\n }\n\n function getOutputOpts(options) {\n var retVal = {\n outputUpper: false,\n b64Pad: \"=\",\n shakeLen: -1\n },\n outputOptions;\n outputOptions = options || {};\n retVal[\"outputUpper\"] = outputOptions[\"outputUpper\"] || false;\n if (true === outputOptions.hasOwnProperty(\"b64Pad\")) {\n retVal[\"b64Pad\"] = outputOptions[\"b64Pad\"]\n }\n if (true === outputOptions.hasOwnProperty(\"shakeLen\") && (8 & SUPPORTED_ALGS) !== 0) {\n if (outputOptions[\"shakeLen\"] % 8 !== 0) {\n throw new Error(\"shakeLen must be a multiple of 8\")\n }\n retVal[\"shakeLen\"] = outputOptions[\"shakeLen\"]\n }\n if (\"boolean\" !== typeof retVal[\"outputUpper\"]) {\n throw new Error(\"Invalid outputUpper formatting option\")\n }\n if (\"string\" !== typeof retVal[\"b64Pad\"]) {\n throw new Error(\"Invalid b64Pad formatting option\")\n }\n return retVal\n }\n\n function getStrConverter(format, utfType, bigEndianMod) {\n var retVal;\n switch (utfType) {\n case \"UTF8\":\n case \"UTF16BE\":\n case \"UTF16LE\":\n break;\n default:\n throw new Error(\"encoding must be UTF8, UTF16BE, or UTF16LE\")\n }\n switch (format) {\n case \"HEX\":\n retVal = function(str, existingBin, existingBinLen) {\n return hex2packed(str, existingBin, existingBinLen, bigEndianMod)\n };\n break;\n case \"TEXT\":\n retVal = function(str, existingBin, existingBinLen) {\n return str2packed(str, utfType, existingBin, existingBinLen, bigEndianMod)\n };\n break;\n case \"B64\":\n retVal = function(str, existingBin, existingBinLen) {\n return b642packed(str, existingBin, existingBinLen, bigEndianMod)\n };\n break;\n case \"BYTES\":\n retVal = function(str, existingBin, existingBinLen) {\n return bytes2packed(str, existingBin, existingBinLen, bigEndianMod)\n };\n break;\n case \"ARRAYBUFFER\":\n try {\n retVal = new ArrayBuffer(0)\n } catch (ignore) {\n throw new Error(\"ARRAYBUFFER not supported by this environment\")\n }\n retVal = function(arr, existingBin, existingBinLen) {\n return arraybuffer2packed(arr, existingBin, existingBinLen, bigEndianMod)\n };\n break;\n default:\n throw new Error(\"format must be HEX, TEXT, B64, BYTES, or ARRAYBUFFER\")\n }\n return retVal\n }\n\n function rotl_32(x, n) {\n return x << n | x >>> 32 - n\n }\n\n function rotl_64(x, n) {\n if (n > 32) {\n n = n - 32;\n return new Int_64(x.lowOrder << n | x.highOrder >>> 32 - n, x.highOrder << n | x.lowOrder >>> 32 - n)\n } else if (0 !== n) {\n return new Int_64(x.highOrder << n | x.lowOrder >>> 32 - n, x.lowOrder << n | x.highOrder >>> 32 - n)\n } else {\n return x\n }\n }\n\n function rotr_32(x, n) {\n return x >>> n | x << 32 - n\n }\n\n function rotr_64(x, n) {\n var retVal = null,\n tmp = new Int_64(x.highOrder, x.lowOrder);\n if (32 >= n) {\n retVal = new Int_64(tmp.highOrder >>> n | tmp.lowOrder << 32 - n & 4294967295, tmp.lowOrder >>> n | tmp.highOrder << 32 - n & 4294967295)\n } else {\n retVal = new Int_64(tmp.lowOrder >>> n - 32 | tmp.highOrder << 64 - n & 4294967295, tmp.highOrder >>> n - 32 | tmp.lowOrder << 64 - n & 4294967295)\n }\n return retVal\n }\n\n function shr_32(x, n) {\n return x >>> n\n }\n\n function shr_64(x, n) {\n var retVal = null;\n if (32 >= n) {\n retVal = new Int_64(x.highOrder >>> n, x.lowOrder >>> n | x.highOrder << 32 - n & 4294967295)\n } else {\n retVal = new Int_64(0, x.highOrder >>> n - 32)\n }\n return retVal\n }\n\n function parity_32(x, y, z) {\n return x ^ y ^ z\n }\n\n function ch_32(x, y, z) {\n return x & y ^ ~x & z\n }\n\n function ch_64(x, y, z) {\n return new Int_64(x.highOrder & y.highOrder ^ ~x.highOrder & z.highOrder, x.lowOrder & y.lowOrder ^ ~x.lowOrder & z.lowOrder)\n }\n\n function maj_32(x, y, z) {\n return x & y ^ x & z ^ y & z\n }\n\n function maj_64(x, y, z) {\n return new Int_64(x.highOrder & y.highOrder ^ x.highOrder & z.highOrder ^ y.highOrder & z.highOrder, x.lowOrder & y.lowOrder ^ x.lowOrder & z.lowOrder ^ y.lowOrder & z.lowOrder)\n }\n\n function sigma0_32(x) {\n return rotr_32(x, 2) ^ rotr_32(x, 13) ^ rotr_32(x, 22)\n }\n\n function sigma0_64(x) {\n var rotr28 = rotr_64(x, 28),\n rotr34 = rotr_64(x, 34),\n rotr39 = rotr_64(x, 39);\n return new Int_64(rotr28.highOrder ^ rotr34.highOrder ^ rotr39.highOrder, rotr28.lowOrder ^ rotr34.lowOrder ^ rotr39.lowOrder)\n }\n\n function sigma1_32(x) {\n return rotr_32(x, 6) ^ rotr_32(x, 11) ^ rotr_32(x, 25)\n }\n\n function sigma1_64(x) {\n var rotr14 = rotr_64(x, 14),\n rotr18 = rotr_64(x, 18),\n rotr41 = rotr_64(x, 41);\n return new Int_64(rotr14.highOrder ^ rotr18.highOrder ^ rotr41.highOrder, rotr14.lowOrder ^ rotr18.lowOrder ^ rotr41.lowOrder)\n }\n\n function gamma0_32(x) {\n return rotr_32(x, 7) ^ rotr_32(x, 18) ^ shr_32(x, 3)\n }\n\n function gamma0_64(x) {\n var rotr1 = rotr_64(x, 1),\n rotr8 = rotr_64(x, 8),\n shr7 = shr_64(x, 7);\n return new Int_64(rotr1.highOrder ^ rotr8.highOrder ^ shr7.highOrder, rotr1.lowOrder ^ rotr8.lowOrder ^ shr7.lowOrder)\n }\n\n function gamma1_32(x) {\n return rotr_32(x, 17) ^ rotr_32(x, 19) ^ shr_32(x, 10)\n }\n\n function gamma1_64(x) {\n var rotr19 = rotr_64(x, 19),\n rotr61 = rotr_64(x, 61),\n shr6 = shr_64(x, 6);\n return new Int_64(rotr19.highOrder ^ rotr61.highOrder ^ shr6.highOrder, rotr19.lowOrder ^ rotr61.lowOrder ^ shr6.lowOrder)\n }\n\n function safeAdd_32_2(a, b) {\n var lsw = (a & 65535) + (b & 65535),\n msw = (a >>> 16) + (b >>> 16) + (lsw >>> 16);\n return (msw & 65535) << 16 | lsw & 65535\n }\n\n function safeAdd_32_4(a, b, c, d) {\n var lsw = (a & 65535) + (b & 65535) + (c & 65535) + (d & 65535),\n msw = (a >>> 16) + (b >>> 16) + (c >>> 16) + (d >>> 16) + (lsw >>> 16);\n return (msw & 65535) << 16 | lsw & 65535\n }\n\n function safeAdd_32_5(a, b, c, d, e) {\n var lsw = (a & 65535) + (b & 65535) + (c & 65535) + (d & 65535) + (e & 65535),\n msw = (a >>> 16) + (b >>> 16) + (c >>> 16) + (d >>> 16) + (e >>> 16) + (lsw >>> 16);\n return (msw & 65535) << 16 | lsw & 65535\n }\n\n function safeAdd_64_2(x, y) {\n var lsw, msw, lowOrder, highOrder;\n lsw = (x.lowOrder & 65535) + (y.lowOrder & 65535);\n msw = (x.lowOrder >>> 16) + (y.lowOrder >>> 16) + (lsw >>> 16);\n lowOrder = (msw & 65535) << 16 | lsw & 65535;\n lsw = (x.highOrder & 65535) + (y.highOrder & 65535) + (msw >>> 16);\n msw = (x.highOrder >>> 16) + (y.highOrder >>> 16) + (lsw >>> 16);\n highOrder = (msw & 65535) << 16 | lsw & 65535;\n return new Int_64(highOrder, lowOrder)\n }\n\n function safeAdd_64_4(a, b, c, d) {\n var lsw, msw, lowOrder, highOrder;\n lsw = (a.lowOrder & 65535) + (b.lowOrder & 65535) + (c.lowOrder & 65535) + (d.lowOrder & 65535);\n msw = (a.lowOrder >>> 16) + (b.lowOrder >>> 16) + (c.lowOrder >>> 16) + (d.lowOrder >>> 16) + (lsw >>> 16);\n lowOrder = (msw & 65535) << 16 | lsw & 65535;\n lsw = (a.highOrder & 65535) + (b.highOrder & 65535) + (c.highOrder & 65535) + (d.highOrder & 65535) + (msw >>> 16);\n msw = (a.highOrder >>> 16) + (b.highOrder >>> 16) + (c.highOrder >>> 16) + (d.highOrder >>> 16) + (lsw >>> 16);\n highOrder = (msw & 65535) << 16 | lsw & 65535;\n return new Int_64(highOrder, lowOrder)\n }\n\n function safeAdd_64_5(a, b, c, d, e) {\n var lsw, msw, lowOrder, highOrder;\n lsw = (a.lowOrder & 65535) + (b.lowOrder & 65535) + (c.lowOrder & 65535) + (d.lowOrder & 65535) + (e.lowOrder & 65535);\n msw = (a.lowOrder >>> 16) + (b.lowOrder >>> 16) + (c.lowOrder >>> 16) + (d.lowOrder >>> 16) + (e.lowOrder >>> 16) + (lsw >>> 16);\n lowOrder = (msw & 65535) << 16 | lsw & 65535;\n lsw = (a.highOrder & 65535) + (b.highOrder & 65535) + (c.highOrder & 65535) + (d.highOrder & 65535) + (e.highOrder & 65535) + (msw >>> 16);\n msw = (a.highOrder >>> 16) + (b.highOrder >>> 16) + (c.highOrder >>> 16) + (d.highOrder >>> 16) + (e.highOrder >>> 16) + (lsw >>> 16);\n highOrder = (msw & 65535) << 16 | lsw & 65535;\n return new Int_64(highOrder, lowOrder)\n }\n\n function xor_64_2(a, b) {\n return new Int_64(a.highOrder ^ b.highOrder, a.lowOrder ^ b.lowOrder)\n }\n\n function xor_64_5(a, b, c, d, e) {\n return new Int_64(a.highOrder ^ b.highOrder ^ c.highOrder ^ d.highOrder ^ e.highOrder, a.lowOrder ^ b.lowOrder ^ c.lowOrder ^ d.lowOrder ^ e.lowOrder)\n }\n\n function cloneSHA3State(state) {\n var clone = [],\n i;\n for (i = 0; i < 5; i += 1) {\n clone[i] = state[i].slice()\n }\n return clone\n }\n\n function getNewState(variant) {\n var retVal = [],\n H_trunc, H_full, i;\n if (\"SHA-1\" === variant && (1 & SUPPORTED_ALGS) !== 0) {\n retVal = [1732584193, 4023233417, 2562383102, 271733878, 3285377520]\n } else if (variant.lastIndexOf(\"SHA-\", 0) === 0 && (6 & SUPPORTED_ALGS) !== 0) {\n H_trunc = [3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428];\n H_full = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225];\n switch (variant) {\n case \"SHA-224\":\n retVal = H_trunc;\n break;\n case \"SHA-256\":\n retVal = H_full;\n break;\n case \"SHA-384\":\n retVal = [new Int_64(3418070365, H_trunc[0]), new Int_64(1654270250, H_trunc[1]), new Int_64(2438529370, H_trunc[2]), new Int_64(355462360, H_trunc[3]), new Int_64(1731405415, H_trunc[4]), new Int_64(41048885895, H_trunc[5]), new Int_64(3675008525, H_trunc[6]), new Int_64(1203062813, H_trunc[7])];\n break;\n case \"SHA-512\":\n retVal = [new Int_64(H_full[0], 4089235720), new Int_64(H_full[1], 2227873595), new Int_64(H_full[2], 4271175723), new Int_64(H_full[3], 1595750129), new Int_64(H_full[4], 2917565137), new Int_64(H_full[5], 725511199), new Int_64(H_full[6], 4215389547), new Int_64(H_full[7], 327033209)];\n break;\n default:\n throw new Error(\"Unknown SHA variant\")\n }\n } else if ((variant.lastIndexOf(\"SHA3-\", 0) === 0 || variant.lastIndexOf(\"SHAKE\", 0) === 0) && (8 & SUPPORTED_ALGS) !== 0) {\n for (i = 0; i < 5; i += 1) {\n retVal[i] = [new Int_64(0, 0), new Int_64(0, 0), new Int_64(0, 0), new Int_64(0, 0), new Int_64(0, 0)]\n }\n } else {\n throw new Error(\"No SHA variants supported\")\n }\n return retVal\n }\n\n function roundSHA1(block, H) {\n var W = [],\n a, b, c, d, e, T, ch = ch_32,\n parity = parity_32,\n maj = maj_32,\n rotl = rotl_32,\n safeAdd_2 = safeAdd_32_2,\n t, safeAdd_5 = safeAdd_32_5;\n a = H[0];\n b = H[1];\n c = H[2];\n d = H[3];\n e = H[4];\n for (t = 0; t < 80; t += 1) {\n if (t < 16) {\n W[t] = block[t]\n } else {\n W[t] = rotl(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1)\n }\n if (t < 20) {\n T = safeAdd_5(rotl(a, 5), ch(b, c, d), e, 1518500249, W[t])\n } else if (t < 40) {\n T = safeAdd_5(rotl(a, 5), parity(b, c, d), e, 1859775393, W[t])\n } else if (t < 60) {\n T = safeAdd_5(rotl(a, 5), maj(b, c, d), e, 2400959708, W[t])\n } else {\n T = safeAdd_5(rotl(a, 5), parity(b, c, d), e, 3395469782, W[t])\n }\n e = d;\n d = c;\n c = rotl(b, 30);\n b = a;\n a = T\n }\n H[0] = safeAdd_2(a, H[0]);\n H[1] = safeAdd_2(b, H[1]);\n H[2] = safeAdd_2(c, H[2]);\n H[3] = safeAdd_2(d, H[3]);\n H[4] = safeAdd_2(e, H[4]);\n return H\n }\n\n function finalizeSHA1(remainder, remainderBinLen, processedBinLen, H, outputLen) {\n var i, appendedMessageLength, offset, totalLen;\n offset = (remainderBinLen + 65 >>> 9 << 4) + 15;\n while (remainder.length <= offset) {\n remainder.push(0)\n }\n remainder[remainderBinLen >>> 5] |= 128 << 24 - remainderBinLen % 32;\n totalLen = remainderBinLen + processedBinLen;\n remainder[offset] = totalLen & 4294967295;\n remainder[offset - 1] = totalLen / TWO_PWR_32 | 0;\n appendedMessageLength = remainder.length;\n for (i = 0; i < appendedMessageLength; i += 16) {\n H = roundSHA1(remainder.slice(i, i + 16), H)\n }\n return H\n }\n var K_sha2, K_sha512, r_sha3, rc_sha3;\n if ((6 & SUPPORTED_ALGS) !== 0) {\n K_sha2 = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298];\n if ((4 & SUPPORTED_ALGS) !== 0) {\n K_sha512 = [new Int_64(K_sha2[0], 3609767458), new Int_64(K_sha2[1], 602891725), new Int_64(K_sha2[2], 3964484399), new Int_64(K_sha2[3], 2173295548), new Int_64(K_sha2[4], 4081628472), new Int_64(K_sha2[5], 3053834265), new Int_64(K_sha2[6], 2937671579), new Int_64(K_sha2[7], 3664609560), new Int_64(K_sha2[8], 2734883394), new Int_64(K_sha2[9], 1164996542), new Int_64(K_sha2[10], 1323610764), new Int_64(K_sha2[11], 3590304994), new Int_64(K_sha2[12], 4068182383), new Int_64(K_sha2[13], 991336113), new Int_64(K_sha2[14], 633803317), new Int_64(K_sha2[15], 3479774868), new Int_64(K_sha2[16], 2666613458), new Int_64(K_sha2[17], 944711139), new Int_64(K_sha2[18], 2341262773), new Int_64(K_sha2[19], 2007800933), new Int_64(K_sha2[20], 1495990901), new Int_64(K_sha2[21], 1856431235), new Int_64(K_sha2[22], 3175218132), new Int_64(K_sha2[23], 2198950837), new Int_64(K_sha2[24], 3999719339), new Int_64(K_sha2[25], 766784016), new Int_64(K_sha2[26], 2566594879), new Int_64(K_sha2[27], 3203337956), new Int_64(K_sha2[28], 1034457026), new Int_64(K_sha2[29], 2466948901), new Int_64(K_sha2[30], 3758326383), new Int_64(K_sha2[31], 168717936), new Int_64(K_sha2[32], 1188179964), new Int_64(K_sha2[33], 1546045734), new Int_64(K_sha2[34], 1522805485), new Int_64(K_sha2[35], 2643833823), new Int_64(K_sha2[36], 2343527390), new Int_64(K_sha2[37], 1014477480), new Int_64(K_sha2[38], 1206759142), new Int_64(K_sha2[39], 344077627), new Int_64(K_sha2[40], 1290863460), new Int_64(K_sha2[41], 3158454273), new Int_64(K_sha2[42], 3505952657), new Int_64(K_sha2[43], 106217008), new Int_64(K_sha2[44], 3606008344), new Int_64(K_sha2[45], 1432725776), new Int_64(K_sha2[46], 1467031594), new Int_64(K_sha2[47], 851169720), new Int_64(K_sha2[48], 3100823752), new Int_64(K_sha2[49], 1363258195), new Int_64(K_sha2[50], 3750685593), new Int_64(K_sha2[51], 3785050280), new Int_64(K_sha2[52], 3318307427), new Int_64(K_sha2[53], 3812723403), new Int_64(K_sha2[54], 2003034995), new Int_64(K_sha2[55], 3602036899), new Int_64(K_sha2[56], 1575990012), new Int_64(K_sha2[57], 1125592928), new Int_64(K_sha2[58], 2716904306), new Int_64(K_sha2[59], 442776044), new Int_64(K_sha2[60], 593698344), new Int_64(K_sha2[61], 3733110249), new Int_64(K_sha2[62], 2999351573), new Int_64(K_sha2[63], 3815920427), new Int_64(3391569614, 3928383900), new Int_64(3515267271, 566280711), new Int_64(3940187606, 3454069534), new Int_64(4118630271, 4000239992), new Int_64(116418474, 1914138554), new Int_64(174292421, 2731055270), new Int_64(289380356, 3203993006), new Int_64(460393269, 320620315), new Int_64(685471733, 587496836), new Int_64(852142971, 1086792851), new Int_64(1017036298, 365543100), new Int_64(1126000580, 2618297676), new Int_64(1288033470, 3409855158), new Int_64(1501505948, 4234509866), new Int_64(1607167915, 987167468), new Int_64(1816402316, 1246189591)]\n }\n }\n if ((8 & SUPPORTED_ALGS) !== 0) {\n rc_sha3 = [new Int_64(0, 1), new Int_64(0, 32898), new Int_64(2147483648, 32906), new Int_64(2147483648, 2147516416), new Int_64(0, 32907), new Int_64(0, 2147483649), new Int_64(2147483648, 2147516545), new Int_64(2147483648, 32777), new Int_64(0, 138), new Int_64(0, 136), new Int_64(0, 2147516425), new Int_64(0, 2147483658), new Int_64(0, 2147516555), new Int_64(2147483648, 139), new Int_64(2147483648, 32905), new Int_64(2147483648, 32771), new Int_64(2147483648, 32770), new Int_64(2147483648, 128), new Int_64(0, 32778), new Int_64(2147483648, 2147483658), new Int_64(2147483648, 2147516545), new Int_64(2147483648, 32896), new Int_64(0, 2147483649), new Int_64(2147483648, 2147516424)];\n r_sha3 = [\n [0, 36, 3, 41, 18],\n [1, 44, 10, 45, 2],\n [62, 6, 43, 15, 61],\n [28, 55, 25, 21, 56],\n [27, 20, 39, 8, 14]\n ]\n }\n\n function roundSHA2(block, H, variant) {\n var a, b, c, d, e, f, g, h, T1, T2, numRounds, t, binaryStringMult, safeAdd_2, safeAdd_4, safeAdd_5, gamma0, gamma1, sigma0, sigma1, ch, maj, Int, W = [],\n int1, int2, offset, K;\n if ((variant === \"SHA-224\" || variant === \"SHA-256\") && (2 & SUPPORTED_ALGS) !== 0) {\n numRounds = 64;\n binaryStringMult = 1;\n Int = Number;\n safeAdd_2 = safeAdd_32_2;\n safeAdd_4 = safeAdd_32_4;\n safeAdd_5 = safeAdd_32_5;\n gamma0 = gamma0_32;\n gamma1 = gamma1_32;\n sigma0 = sigma0_32;\n sigma1 = sigma1_32;\n maj = maj_32;\n ch = ch_32;\n K = K_sha2\n } else if ((variant === \"SHA-384\" || variant === \"SHA-512\") && (4 & SUPPORTED_ALGS) !== 0) {\n numRounds = 80;\n binaryStringMult = 2;\n Int = Int_64;\n safeAdd_2 = safeAdd_64_2;\n safeAdd_4 = safeAdd_64_4;\n safeAdd_5 = safeAdd_64_5;\n gamma0 = gamma0_64;\n gamma1 = gamma1_64;\n sigma0 = sigma0_64;\n sigma1 = sigma1_64;\n maj = maj_64;\n ch = ch_64;\n K = K_sha512\n } else {\n throw new Error(\"Unexpected error in SHA-2 implementation\")\n }\n a = H[0];\n b = H[1];\n c = H[2];\n d = H[3];\n e = H[4];\n f = H[5];\n g = H[6];\n h = H[7];\n for (t = 0; t < numRounds; t += 1) {\n if (t < 16) {\n offset = t * binaryStringMult;\n int1 = block.length <= offset ? 0 : block[offset];\n int2 = block.length <= offset + 1 ? 0 : block[offset + 1];\n W[t] = new Int(int1, int2)\n } else {\n W[t] = safeAdd_4(gamma1(W[t - 2]), W[t - 7], gamma0(W[t - 15]), W[t - 16])\n }\n T1 = safeAdd_5(h, sigma1(e), ch(e, f, g), K[t], W[t]);\n T2 = safeAdd_2(sigma0(a), maj(a, b, c));\n h = g;\n g = f;\n f = e;\n e = safeAdd_2(d, T1);\n d = c;\n c = b;\n b = a;\n a = safeAdd_2(T1, T2)\n }\n H[0] = safeAdd_2(a, H[0]);\n H[1] = safeAdd_2(b, H[1]);\n H[2] = safeAdd_2(c, H[2]);\n H[3] = safeAdd_2(d, H[3]);\n H[4] = safeAdd_2(e, H[4]);\n H[5] = safeAdd_2(f, H[5]);\n H[6] = safeAdd_2(g, H[6]);\n H[7] = safeAdd_2(h, H[7]);\n return H\n }\n\n function finalizeSHA2(remainder, remainderBinLen, processedBinLen, H, variant, outputLen) {\n var i, appendedMessageLength, offset, retVal, binaryStringInc, totalLen;\n if ((variant === \"SHA-224\" || variant === \"SHA-256\") && (2 & SUPPORTED_ALGS) !== 0) {\n offset = (remainderBinLen + 65 >>> 9 << 4) + 15;\n binaryStringInc = 16\n } else if ((variant === \"SHA-384\" || variant === \"SHA-512\") && (4 & SUPPORTED_ALGS) !== 0) {\n offset = (remainderBinLen + 129 >>> 10 << 5) + 31;\n binaryStringInc = 32\n } else {\n throw new Error(\"Unexpected error in SHA-2 implementation\")\n }\n while (remainder.length <= offset) {\n remainder.push(0)\n }\n remainder[remainderBinLen >>> 5] |= 128 << 24 - remainderBinLen % 32;\n totalLen = remainderBinLen + processedBinLen;\n remainder[offset] = totalLen & 4294967295;\n remainder[offset - 1] = totalLen / TWO_PWR_32 | 0;\n appendedMessageLength = remainder.length;\n for (i = 0; i < appendedMessageLength; i += binaryStringInc) {\n H = roundSHA2(remainder.slice(i, i + binaryStringInc), H, variant)\n }\n if (\"SHA-224\" === variant && (2 & SUPPORTED_ALGS) !== 0) {\n retVal = [H[0], H[1], H[2], H[3], H[4], H[5], H[6]]\n } else if (\"SHA-256\" === variant && (2 & SUPPORTED_ALGS) !== 0) {\n retVal = H\n } else if (\"SHA-384\" === variant && (4 & SUPPORTED_ALGS) !== 0) {\n retVal = [H[0].highOrder, H[0].lowOrder, H[1].highOrder, H[1].lowOrder, H[2].highOrder, H[2].lowOrder, H[3].highOrder, H[3].lowOrder, H[4].highOrder, H[4].lowOrder, H[5].highOrder, H[5].lowOrder]\n } else if (\"SHA-512\" === variant && (4 & SUPPORTED_ALGS) !== 0) {\n retVal = [H[0].highOrder, H[0].lowOrder, H[1].highOrder, H[1].lowOrder, H[2].highOrder, H[2].lowOrder, H[3].highOrder, H[3].lowOrder, H[4].highOrder, H[4].lowOrder, H[5].highOrder, H[5].lowOrder, H[6].highOrder, H[6].lowOrder, H[7].highOrder, H[7].lowOrder]\n } else {\n throw new Error(\"Unexpected error in SHA-2 implementation\")\n }\n return retVal\n }\n\n function roundSHA3(block, state) {\n var round, x, y, B, C = [],\n D = [];\n if (null !== block) {\n for (x = 0; x < block.length; x += 2) {\n state[(x >>> 1) % 5][(x >>> 1) / 5 | 0] = xor_64_2(state[(x >>> 1) % 5][(x >>> 1) / 5 | 0], new Int_64(block[x + 1], block[x]))\n }\n }\n for (round = 0; round < 24; round += 1) {\n B = getNewState(\"SHA3-\");\n for (x = 0; x < 5; x += 1) {\n C[x] = xor_64_5(state[x][0], state[x][1], state[x][2], state[x][3], state[x][4])\n }\n for (x = 0; x < 5; x += 1) {\n D[x] = xor_64_2(C[(x + 4) % 5], rotl_64(C[(x + 1) % 5], 1))\n }\n for (x = 0; x < 5; x += 1) {\n for (y = 0; y < 5; y += 1) {\n state[x][y] = xor_64_2(state[x][y], D[x])\n }\n }\n for (x = 0; x < 5; x += 1) {\n for (y = 0; y < 5; y += 1) {\n B[y][(2 * x + 3 * y) % 5] = rotl_64(state[x][y], r_sha3[x][y])\n }\n }\n for (x = 0; x < 5; x += 1) {\n for (y = 0; y < 5; y += 1) {\n state[x][y] = xor_64_2(B[x][y], new Int_64(~B[(x + 1) % 5][y].highOrder & B[(x + 2) % 5][y].highOrder, ~B[(x + 1) % 5][y].lowOrder & B[(x + 2) % 5][y].lowOrder))\n }\n }\n state[0][0] = xor_64_2(state[0][0], rc_sha3[round])\n }\n return state\n }\n\n function finalizeSHA3(remainder, remainderBinLen, processedBinLen, state, blockSize, delimiter, outputLen) {\n var i, retVal = [],\n binaryStringInc = blockSize >>> 5,\n state_offset = 0,\n remainderIntLen = remainderBinLen >>> 5,\n temp;\n for (i = 0; i < remainderIntLen && remainderBinLen >= blockSize; i += binaryStringInc) {\n state = roundSHA3(remainder.slice(i, i + binaryStringInc), state);\n remainderBinLen -= blockSize\n }\n remainder = remainder.slice(i);\n remainderBinLen = remainderBinLen % blockSize;\n while (remainder.length < binaryStringInc) {\n remainder.push(0)\n }\n i = remainderBinLen >>> 3;\n remainder[i >> 2] ^= delimiter << 8 * (i % 4);\n remainder[binaryStringInc - 1] ^= 2147483648;\n state = roundSHA3(remainder, state);\n while (retVal.length * 32 < outputLen) {\n temp = state[state_offset % 5][state_offset / 5 | 0];\n retVal.push(temp.lowOrder);\n if (retVal.length * 32 >= outputLen) {\n break\n }\n retVal.push(temp.highOrder);\n state_offset += 1;\n if (0 === state_offset * 64 % blockSize) {\n roundSHA3(null, state)\n }\n }\n return retVal\n }\n var jsSHA = function(variant, inputFormat, options) {\n var processedLen = 0,\n remainder = [],\n remainderLen = 0,\n utfType, intermediateState, converterFunc, shaVariant = variant,\n outputBinLen, variantBlockSize, roundFunc, finalizeFunc, stateCloneFunc, hmacKeySet = false,\n keyWithIPad = [],\n keyWithOPad = [],\n numRounds, updatedCalled = false,\n inputOptions, isSHAKE = false,\n bigEndianMod = -1;\n inputOptions = options || {};\n utfType = inputOptions[\"encoding\"] || \"UTF8\";\n numRounds = inputOptions[\"numRounds\"] || 1;\n if (numRounds !== parseInt(numRounds, 10) || 1 > numRounds) {\n throw new Error(\"numRounds must a integer >= 1\")\n }\n if (\"SHA-1\" === shaVariant && (1 & SUPPORTED_ALGS) !== 0) {\n variantBlockSize = 512;\n roundFunc = roundSHA1;\n finalizeFunc = finalizeSHA1;\n outputBinLen = 160;\n stateCloneFunc = function(state) {\n return state.slice()\n }\n } else if (shaVariant.lastIndexOf(\"SHA-\", 0) === 0 && (6 & SUPPORTED_ALGS) !== 0) {\n roundFunc = function(block, H) {\n return roundSHA2(block, H, shaVariant)\n };\n finalizeFunc = function(remainder, remainderBinLen, processedBinLen, H, outputLen) {\n return finalizeSHA2(remainder, remainderBinLen, processedBinLen, H, shaVariant, outputLen)\n };\n stateCloneFunc = function(state) {\n return state.slice()\n };\n if (\"SHA-224\" === shaVariant && (2 & SUPPORTED_ALGS) !== 0) {\n variantBlockSize = 512;\n outputBinLen = 224\n } else if (\"SHA-256\" === shaVariant && (2 & SUPPORTED_ALGS) !== 0) {\n variantBlockSize = 512;\n outputBinLen = 256\n } else if (\"SHA-384\" === shaVariant && (4 & SUPPORTED_ALGS) !== 0) {\n variantBlockSize = 1024;\n outputBinLen = 384\n } else if (\"SHA-512\" === shaVariant && (4 & SUPPORTED_ALGS) !== 0) {\n variantBlockSize = 1024;\n outputBinLen = 512\n } else {\n throw new Error(\"Chosen SHA variant is not supported\")\n }\n } else if ((shaVariant.lastIndexOf(\"SHA3-\", 0) === 0 || shaVariant.lastIndexOf(\"SHAKE\", 0) === 0) && (8 & SUPPORTED_ALGS) !== 0) {\n var delimiter = 6;\n roundFunc = roundSHA3;\n stateCloneFunc = function(state) {\n return cloneSHA3State(state)\n };\n bigEndianMod = 1;\n if (\"SHA3-224\" === shaVariant) {\n variantBlockSize = 1152;\n outputBinLen = 224\n } else if (\"SHA3-256\" === shaVariant) {\n variantBlockSize = 1088;\n outputBinLen = 256\n } else if (\"SHA3-384\" === shaVariant) {\n variantBlockSize = 832;\n outputBinLen = 384\n } else if (\"SHA3-512\" === shaVariant) {\n variantBlockSize = 576;\n outputBinLen = 512\n } else if (\"SHAKE128\" === shaVariant) {\n variantBlockSize = 1344;\n outputBinLen = -1;\n delimiter = 31;\n isSHAKE = true\n } else if (\"SHAKE256\" === shaVariant) {\n variantBlockSize = 1088;\n outputBinLen = -1;\n delimiter = 31;\n isSHAKE = true\n } else {\n throw new Error(\"Chosen SHA variant is not supported\")\n }\n finalizeFunc = function(remainder, remainderBinLen, processedBinLen, state, outputLen) {\n return finalizeSHA3(remainder, remainderBinLen, processedBinLen, state, variantBlockSize, delimiter, outputLen)\n }\n } else {\n throw new Error(\"Chosen SHA variant is not supported\")\n }\n converterFunc = getStrConverter(inputFormat, utfType, bigEndianMod);\n intermediateState = getNewState(shaVariant);\n this.setHMACKey = function(key, inputFormat, options) {\n var keyConverterFunc, convertRet, keyBinLen, keyToUse, blockByteSize, i, lastArrayIndex, keyOptions;\n if (true === hmacKeySet) {\n throw new Error(\"HMAC key already set\")\n }\n if (true === updatedCalled) {\n throw new Error(\"Cannot set HMAC key after calling update\")\n }\n if (isSHAKE === true && (8 & SUPPORTED_ALGS) !== 0) {\n throw new Error(\"SHAKE is not supported for HMAC\")\n }\n keyOptions = options || {};\n utfType = keyOptions[\"encoding\"] || \"UTF8\";\n keyConverterFunc = getStrConverter(inputFormat, utfType, bigEndianMod);\n convertRet = keyConverterFunc(key);\n keyBinLen = convertRet[\"binLen\"];\n keyToUse = convertRet[\"value\"];\n blockByteSize = variantBlockSize >>> 3;\n lastArrayIndex = blockByteSize / 4 - 1;\n if (blockByteSize < keyBinLen / 8) {\n keyToUse = finalizeFunc(keyToUse, keyBinLen, 0, getNewState(shaVariant), outputBinLen);\n while (keyToUse.length <= lastArrayIndex) {\n keyToUse.push(0)\n }\n keyToUse[lastArrayIndex] &= 4294967040\n } else if (blockByteSize > keyBinLen / 8) {\n while (keyToUse.length <= lastArrayIndex) {\n keyToUse.push(0)\n }\n keyToUse[lastArrayIndex] &= 4294967040\n }\n for (i = 0; i <= lastArrayIndex; i += 1) {\n keyWithIPad[i] = keyToUse[i] ^ 909522486;\n keyWithOPad[i] = keyToUse[i] ^ 1549556828\n }\n intermediateState = roundFunc(keyWithIPad, intermediateState);\n processedLen = variantBlockSize;\n hmacKeySet = true\n };\n this.update = function(srcString) {\n var convertRet, chunkBinLen, chunkIntLen, chunk, i, updateProcessedLen = 0,\n variantBlockIntInc = variantBlockSize >>> 5;\n convertRet = converterFunc(srcString, remainder, remainderLen);\n chunkBinLen = convertRet[\"binLen\"];\n chunk = convertRet[\"value\"];\n chunkIntLen = chunkBinLen >>> 5;\n for (i = 0; i < chunkIntLen; i += variantBlockIntInc) {\n if (updateProcessedLen + variantBlockSize <= chunkBinLen) {\n intermediateState = roundFunc(chunk.slice(i, i + variantBlockIntInc), intermediateState);\n updateProcessedLen += variantBlockSize\n }\n }\n processedLen += updateProcessedLen;\n remainder = chunk.slice(updateProcessedLen >>> 5);\n remainderLen = chunkBinLen % variantBlockSize;\n updatedCalled = true\n };\n this.getHash = function(format, options) {\n var formatFunc, i, outputOptions, finalizedState;\n if (true === hmacKeySet) {\n throw new Error(\"Cannot call getHash after setting HMAC key\")\n }\n outputOptions = getOutputOpts(options);\n if (isSHAKE === true && (8 & SUPPORTED_ALGS) !== 0) {\n if (outputOptions[\"shakeLen\"] === -1) {\n throw new Error(\"shakeLen must be specified in options\")\n }\n outputBinLen = outputOptions[\"shakeLen\"]\n }\n switch (format) {\n case \"HEX\":\n formatFunc = function(binarray) {\n return packed2hex(binarray, outputBinLen, bigEndianMod, outputOptions)\n };\n break;\n case \"B64\":\n formatFunc = function(binarray) {\n return packed2b64(binarray, outputBinLen, bigEndianMod, outputOptions)\n };\n break;\n case \"BYTES\":\n formatFunc = function(binarray) {\n return packed2bytes(binarray, outputBinLen, bigEndianMod)\n };\n break;\n case \"ARRAYBUFFER\":\n try {\n i = new ArrayBuffer(0)\n } catch (ignore) {\n throw new Error(\"ARRAYBUFFER not supported by this environment\")\n }\n formatFunc = function(binarray) {\n return packed2arraybuffer(binarray, outputBinLen, bigEndianMod)\n };\n break;\n default:\n throw new Error(\"format must be HEX, B64, BYTES, or ARRAYBUFFER\")\n }\n finalizedState = finalizeFunc(remainder.slice(), remainderLen, processedLen, stateCloneFunc(intermediateState), outputBinLen);\n for (i = 1; i < numRounds; i += 1) {\n if ((8 & SUPPORTED_ALGS) !== 0 && isSHAKE === true && outputBinLen % 32 !== 0) {\n finalizedState[finalizedState.length - 1] &= 16777215 >>> 24 - outputBinLen % 32\n }\n finalizedState = finalizeFunc(finalizedState, outputBinLen, 0, getNewState(shaVariant), outputBinLen)\n }\n return formatFunc(finalizedState)\n };\n this.getHMAC = function(format, options) {\n var formatFunc, firstHash, outputOptions, finalizedState;\n if (false === hmacKeySet) {\n throw new Error(\"Cannot call getHMAC without first setting HMAC key\")\n }\n outputOptions = getOutputOpts(options);\n switch (format) {\n case \"HEX\":\n formatFunc = function(binarray) {\n return packed2hex(binarray, outputBinLen, bigEndianMod, outputOptions)\n };\n break;\n case \"B64\":\n formatFunc = function(binarray) {\n return packed2b64(binarray, outputBinLen, bigEndianMod, outputOptions)\n };\n break;\n case \"BYTES\":\n formatFunc = function(binarray) {\n return packed2bytes(binarray, outputBinLen, bigEndianMod)\n };\n break;\n case \"ARRAYBUFFER\":\n try {\n formatFunc = new ArrayBuffer(0)\n } catch (ignore) {\n throw new Error(\"ARRAYBUFFER not supported by this environment\")\n }\n formatFunc = function(binarray) {\n return packed2arraybuffer(binarray, outputBinLen, bigEndianMod)\n };\n break;\n default:\n throw new Error(\"outputFormat must be HEX, B64, BYTES, or ARRAYBUFFER\")\n }\n firstHash = finalizeFunc(remainder.slice(), remainderLen, processedLen, stateCloneFunc(intermediateState), outputBinLen);\n finalizedState = roundFunc(keyWithOPad, getNewState(shaVariant));\n finalizedState = finalizeFunc(firstHash, outputBinLen, variantBlockSize, finalizedState, outputBinLen);\n return formatFunc(finalizedState)\n }\n };\n if (\"function\" === typeof define && define[\"amd\"]) {\n define(function() {\n return jsSHA\n })\n } else if (\"undefined\" !== typeof exports) {\n if (\"undefined\" !== typeof module && module[\"exports\"]) {\n module[\"exports\"] = jsSHA;\n exports = jsSHA\n } else {\n exports = jsSHA\n }\n } else {\n global[\"jsSHA\"] = jsSHA\n }\n})(this);\n(function(global) {\n \"use strict\";\n\n function definition(path, Failure, iterate, isObject) {\n var settings;\n demand.on(\"postConfigure:\" + path, function(options) {\n if (isObject(options)) {\n settings = options\n }\n }).on(\"postRequest\", function(dependency) {\n var options, sha, hash;\n if (options = isEnabled(dependency.path)) {\n try {\n sha = new global.jsSHA(options.type, \"TEXT\");\n sha.update(dependency.source);\n if ((hash = sha.getHash(\"B64\")) !== options.hash) {\n dependency.dfd.reject(new Failure('hash mismatch, should be \"' + options.hash + '\" but is \"' + hash + '\" (sri)', dependency.id))\n }\n } catch (error) {\n dependency.dfd.reject(new Failure(\"unsupported hashing algorithm (sri)\", dependency.id))\n }\n }\n });\n\n function isEnabled(path) {\n var match;\n iterate(settings, function(key, value) {\n if (key === path) {\n match = value;\n return false\n }\n });\n return match || false\n }\n return true\n }\n provide([\"path\", \"/demand/failure\", \"/demand/function/iterate\", \"/demand/validator/isObject\"], definition)\n})(this);"]} \ No newline at end of file