diff --git a/README.md b/README.md index e740085..5653823 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,12 @@ # TechnicalIndicators -A javascript technical indicators written in javascript. +A javascript technical indicators written in typescript. # Installation -## Node.js versions >= 6.4 +## Node.js versions >= 10 ``` bash npm install --save technicalindicators @@ -17,17 +17,9 @@ npm install --save technicalindicators const SMA = require('technicalindicators').SMA; ``` -## Node.js versions < 6.4 +## Node.js versions < 10 -``` bash -npm install --save babel-polyfill -npm install --save technicalindicators -``` - -``` javascript -require('babel-polyfill'); -const SMA = require('technicalindicators/dist/browser').SMA; -``` +For nodejs version below 10 use 1.x versions of this library. ## Webpack @@ -44,17 +36,47 @@ module.exports = { ## Browser -For browser install using bower or npm, but it is necessary to include the babel-polyfill otherwise you will get an error. For example see [index.html](https://github.com/anandanand84/technicalindicators/blob/master/index.html "index.html") +For browsers install using npm, + +For ES6 browsers use + +``` bash +npm install --save technicalindicators +``` + +```html + +``` + +For ES5 support it is necessary to include the babel-polyfill and respective file browser.js otherwise you will get an error. For example see [index.html](https://github.com/anandanand84/technicalindicators/blob/master/index.html "index.html") ``` bash npm install --save technicalindicators npm install --save babel-polyfill -bower install --save technicalindicators ``` ``` html - + +``` + +### Pattern detection + +If using pattern detection it is necessary to include the tensorflowjs library before this library is loaded and the model files present in tf_model dir in this repository should be accessible at location /tf_model/ in server. + +For ES6 + +``` html + + +``` + +For ES5 + +``` html + + + ``` All indicators will be available in window object. So you can just use @@ -140,7 +162,7 @@ Finds pattern in the given set of data, patterns include, DB, DT, HS, IHS, TU, T ``` -When running in browser the file model.bin present in dist/model.bin in the respository should be accessible on your server at the location at /dist/model.bin. +When running in browser the dir /tf_model/ present in this respository should be accessible on your server at the location at /tf_model/. The model is trained using 400 count of values, so try to provide values close to 400 for a reliable prediction of DB, DT, HS, IHS TD(Trending Down) and TU(Trending up) works fine even with lower values. diff --git a/declarations/patterndetection/patterndetection.d.ts b/declarations/patterndetection/patterndetection.d.ts index e7a40b9..ae63c82 100644 --- a/declarations/patterndetection/patterndetection.d.ts +++ b/declarations/patterndetection/patterndetection.d.ts @@ -4,12 +4,12 @@ export declare class PatternDetectorInput extends IndicatorInput { constructor(values: number[]); } export declare enum AvailablePatterns { - 'TD' = 0, - 'IHS' = 1, - 'HS' = 2, - 'TU' = 3, - 'DT' = 4, - 'DB' = 5, + 'IHS' = 0, + 'TU' = 1, + 'DB' = 2, + 'HS' = 3, + 'TD' = 4, + 'DT' = 5, } export declare class PatternDetectorOutput { patternId: AvailablePatterns; diff --git a/dist/browser.es6.js b/dist/browser.es6.js index 4c11267..ad8107c 100644 --- a/dist/browser.es6.js +++ b/dist/browser.es6.js @@ -1,224 +1 @@ -(function(e,t){'use strict';function a(e,t){Nn[e]=t}function r(e){return Nn[e]}function o(e){let t=r('precision');return t?parseFloat(e.toPrecision(t)):e}function n(e){Hn.reverseInputs(e);var t=new Wn(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function i(e){Hn.reverseInputs(e);var t=new Xn(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function s(e){Hn.reverseInputs(e);var t=new $n(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function u(e){Hn.reverseInputs(e);var t=new Kn(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function l(e){Hn.reverseInputs(e);var t=new Zn(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function p(e){Hn.reverseInputs(e);var t=new Qn(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function d(e){Hn.reverseInputs(e);var t=new Yn(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function c(e){Hn.reverseInputs(e);var t=new Jn(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function h(e){Hn.reverseInputs(e);var t=new ei(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function g(e){Hn.reverseInputs(e);var t=new ti(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function m(e){Hn.reverseInputs(e);var t=new ai(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function f(e){Hn.reverseInputs(e);var t=new ni(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function _(e){Hn.reverseInputs(e);var t=new si(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function x(e){Hn.reverseInputs(e);var t=new ui(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function y(e){Hn.reverseInputs(e);var t=new li(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function v(e){Hn.reverseInputs(e);var t=new pi(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function b(e){Hn.reverseInputs(e);var t=new di(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function S(e){Hn.reverseInputs(e);var t=new ci(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function T(e){Hn.reverseInputs(e);var t=new hi(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function w(e){Hn.reverseInputs(e);var t=new gi(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function P(e){Hn.reverseInputs(e);var t=new mi(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function C(e){Hn.reverseInputs(e);var t=new fi(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function k(e){Hn.reverseInputs(e);var t=new _i(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function F(e){Hn.reverseInputs(e);var t=new xi(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function M(e){Hn.reverseInputs(e);var t=new yi(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function D(e){Hn.reverseInputs(e);var t=new vi(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function I(e,t,a,r){return e<=a&&t>=a||a<=e&&r>=e}function R(e){Hn.reverseInputs(e);var t=new bi(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function A(e){Hn.reverseInputs(e);var t=new Si(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function L(e){Hn.reverseInputs(e);var t=new Ti(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function j(e){Hn.reverseInputs(e);var t=new wi(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function z(e){Hn.reverseInputs(e);var t=new Pi(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function G(e){Hn.reverseInputs(e);var t=new Ci(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function O(e){Hn.reverseInputs(e);var t=new ki(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}function q(e){Hn.reverseInputs(e);var t=new Fi(e).result;return e.reversedInput&&(t.open.reverse(),t.high.reverse(),t.low.reverse(),t.close.reverse(),t.volume.reverse(),t.timestamp.reverse()),Hn.reverseInputs(e),t}function U(e){Hn.reverseInputs(e);var t=new Mi(e).result;return e.reversedInput&&(t.open.reverse(),t.high.reverse(),t.low.reverse(),t.close.reverse(),t.volume.reverse(),t.timestamp.reverse()),Hn.reverseInputs(e),t}function B(e){return new Ii().hasPattern(e)}function N(e){return new Ei().hasPattern(e)}function V(e){return new Ri().hasPattern(e)}function H(e){return new Ai().hasPattern(e)}function W(e){return new Li().hasPattern(e)}function X(e){return new ji().hasPattern(e)}function $(e){return new zi().hasPattern(e)}function K(e){return new Gi().hasPattern(e)}function Z(e){return new Oi().hasPattern(e)}function Q(e){return new qi().hasPattern(e)}function Y(e){return new Ui().hasPattern(e)}function J(e){return new Bi().hasPattern(e)}function ee(e){return new Ni().hasPattern(e)}function te(e){return new Vi().hasPattern(e)}function ae(e){return new Hi().hasPattern(e)}function re(e){return new Wi().hasPattern(e)}function oe(e){return new Xi().hasPattern(e)}function ne(e){return new Ki().hasPattern(e)}function ie(e){return new Zi().hasPattern(e)}function se(e){return new Qi().hasPattern(e)}function ue(e){return new Yi().hasPattern(e)}function le(e){return new Ji().hasPattern(e)}function pe(e){return new es().hasPattern(e)}function de(e){return new ts().hasPattern(e)}function ce(e){return new as().hasPattern(e)}function he(e){return new rs().hasPattern(e)}function ge(e){return new os().hasPattern(e)}function me(e){return new ns().hasPattern(e)}function fe(e){return new is().hasPattern(e)}function _e(e){return new ss().hasPattern(e)}function xe(e){return new ls().hasPattern(e)}function ye(e){return new ps().hasPattern(e)}function ve(e){return new ds().hasPattern(e)}function be(e){return new cs().hasPattern(e)}function Se(e){return new hs().hasPattern(e)}function Te(e){return new gs().hasPattern(e)}function we(e){return new ms().hasPattern(e)}function Pe(e,t){let a=[0,23.6,38.2,50,61.8,78.6,100,127.2,161.8,261.8,423.6],r;return r=ea)return!1;var r=t.length-1;return a==r?t.pop():el.call(t,a,1),--this.size,!0}function Qe(e){var t=this.__data__,a=Yu(t,e);return 0>a?void 0:t[a][1]}function Ye(e){return-1r?(++this.size,a.push([e,t])):a[r][1]=t,this}function et(e){var t=-1,a=null==e?0:e.length;for(this.clear();++ts))return!1;var l=n.get(e);if(l&&n.get(t))return l==t;var p=-1,d=!0,c=a&sp?new rp:void 0;for(n.set(e,t),n.set(t,e);++pe?-1:1;return t*Ic}return e===e?e:0}function Fa(e){var t=Ec(e),a=t%1;return t===t?a?t-a:t:0}function Ma(e,t,a){var r=null==e?0:e.length;if(!r)return-1;var o=null==a?0:Rc(a);return 0>o&&(o=Ac(r+o,0)),Sc(e,sc(t,3),o)}function Da(e,t,a){'__proto__'==t&&Oc?Oc(e,t,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[t]=a}function Ia(e,t,a){var r=e[t];Bc.call(e,t)&&Qu(r,a)&&(a!==void 0||t in e)||qc(e,t,a)}function Ea(e,t,a,r){if(!Bu(e))return e;t=Wd(t,e);for(var o=-1,n=t.length,i=e;null!=i&&++o=rh)return arguments[0];return e.apply(void 0,arguments)}}function Ba(e){return uh(Jc(e,void 0,Zc),e+'')}function Na(e){return!!e.constructor&&'function'==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function Va(e){return'function'==typeof e.readFloatLE&&'function'==typeof e.slice&&Na(e.slice(0,0))}function Ha(e){return'[object Array]'===mh.call(e)}function Wa(e){return'[object ArrayBuffer]'===mh.call(e)}function Xa(e){return'undefined'!=typeof FormData&&e instanceof FormData}function $a(e){var t;return t='undefined'!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer,t}function Ka(e){return'string'==typeof e}function Za(e){return'number'==typeof e}function Qa(e){return'undefined'==typeof e}function Ya(e){return null!==e&&'object'==typeof e}function Ja(e){return'[object Date]'===mh.call(e)}function er(e){return'[object File]'===mh.call(e)}function tr(e){return'[object Blob]'===mh.call(e)}function ar(e){return'[object Function]'===mh.call(e)}function rr(e){return Ya(e)&&ar(e.pipe)}function or(e){return'undefined'!=typeof URLSearchParams&&e instanceof URLSearchParams}function nr(e){return e.replace(/^\s*/,'').replace(/\s*$/,'')}function ir(){return'undefined'!=typeof navigator&&'ReactNative'===navigator.product?!1:'undefined'!=typeof window&&'undefined'!=typeof document}function sr(e,t){if(null!==e&&'undefined'!=typeof e)if('object'!=typeof e&&(e=[e]),Ha(e))for(var a=0,r=e.length;a>8-8*(r%1))){if(i=t.charCodeAt(r+=3/4),255t&&(a='View_Nil'+e);var r='generic'===e;if(-1===t){var o='function '+a+'(a){this.data=a;};var proto='+a+'.prototype;proto.dtype=\''+e+'\';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new '+a+'(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_'+a+'(a){return new '+a+'(a);}',n=new Function(o);return n()}if(0===t){var o='function '+a+'(a,d) {this.data = a;this.offset = d};var proto='+a+'.prototype;proto.dtype=\''+e+'\';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function '+a+'_copy() {return new '+a+'(this.data,this.offset)};proto.pick=function '+a+'_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function '+a+'_get(){return '+(r?'this.data.get(this.offset)':'this.data[this.offset]')+'};proto.set=function '+a+'_set(v){return '+(r?'this.data.set(this.offset,v)':'this.data[this.offset]=v')+'};return function construct_'+a+'(a,b,c,d){return new '+a+'(a,d)}',n=new Function('TrivialArray',o);return n(ng[e][0])}var o=['\'use strict\''],s=rg(t),u=s.map(function(e){return'i'+e}),l='this.offset+'+s.map(function(e){return'this.stride['+e+']*i'+e}).join('+'),p=s.map(function(e){return'b'+e}).join(','),d=s.map(function(e){return'c'+e}).join(',');o.push('function '+a+'(a,'+p+','+d+',d){this.data=a','this.shape=['+p+']','this.stride=['+d+']','this.offset=d|0}','var proto='+a+'.prototype','proto.dtype=\''+e+'\'','proto.dimension='+t),o.push('Object.defineProperty(proto,\'size\',{get:function '+a+'_size(){return '+s.map(function(e){return'this.shape['+e+']'}).join('*'),'}})'),1===t?o.push('proto.order=[0]'):(o.push('Object.defineProperty(proto,\'order\',{get:'),4>t?(o.push('function '+a+'_order(){'),2===t?o.push('return (Math.abs(this.stride[0])>Math.abs(this.stride[1]))?[1,0]:[0,1]}})'):3===t&&o.push('var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})')):o.push('ORDER})')),o.push('proto.set=function '+a+'_set('+u.join(',')+',v){'),r?o.push('return this.data.set('+l+',v)}'):o.push('return this.data['+l+']=v}'),o.push('proto.get=function '+a+'_get('+u.join(',')+'){'),r?o.push('return this.data.get('+l+')}'):o.push('return this.data['+l+']}'),o.push('proto.index=function '+a+'_index(',u.join(),'){return '+l+'}'),o.push('proto.hi=function '+a+'_hi('+u.join(',')+'){return new '+a+'(this.data,'+s.map(function(e){return['(typeof i',e,'!==\'number\'||i',e,'<0)?this.shape[',e,']:i',e,'|0'].join('')}).join(',')+','+s.map(function(e){return'this.stride['+e+']'}).join(',')+',this.offset)}');var c=s.map(function(e){return'a'+e+'=this.shape['+e+']'}),h=s.map(function(e){return'c'+e+'=this.stride['+e+']'});o.push('proto.lo=function '+a+'_lo('+u.join(',')+'){var b=this.offset,d=0,'+c.join(',')+','+h.join(','));for(var g=0;g=0){d=i'+g+'|0;b+=c'+g+'*d;a'+g+'-=d}');o.push('return new '+a+'(this.data,'+s.map(function(e){return'a'+e}).join(',')+','+s.map(function(e){return'c'+e}).join(',')+',b)}'),o.push('proto.step=function '+a+'_step('+u.join(',')+'){var '+s.map(function(e){return'a'+e+'=this.shape['+e+']'}).join(',')+','+s.map(function(e){return'b'+e+'=this.stride['+e+']'}).join(',')+',c=this.offset,d=0,ceil=Math.ceil');for(var g=0;g=0){c=(c+this.stride['+g+']*i'+g+')|0}else{a.push(this.shape['+g+']);b.push(this.stride['+g+'])}');o.push('var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}'),o.push('return function construct_'+a+'(data,shape,stride,offset){return new '+a+'(data,'+s.map(function(e){return'shape['+e+']'}).join(',')+','+s.map(function(e){return'stride['+e+']'}).join(',')+',offset)}');var n=new Function('CTOR_LIST','ORDER',o.join('\n'));return n(ng[e],wr)}function Cr(e){if(gh(e))return'buffer';if(og)switch(Object.prototype.toString.call(e)){case'[object Float64Array]':return'float64';case'[object Float32Array]':return'float32';case'[object Int8Array]':return'int8';case'[object Int16Array]':return'int16';case'[object Int32Array]':return'int32';case'[object Uint8Array]':return'uint8';case'[object Uint16Array]':return'uint16';case'[object Uint32Array]':return'uint32';case'[object Uint8ClampedArray]':return'uint8_clamped';}return Array.isArray(e)?'array':'generic'}function kr(e,t,a,r){if(e===void 0){var o=ng.array[0];return o([])}'number'==typeof e&&(e=[e]);t===void 0&&(t=[e.length]);var n=t.length;if(a===void 0){a=Array(n);for(var s=n-1,i=1;0<=s;--s)a[s]=i,i*=t[s]}if(void 0===r){r=0;for(var s=0;sa[s]&&(r-=(t[s]-1)*a[s])}for(var u=Cr(e),l=ng[u];l.length<=n+1;)l.push(Pr(u,l.length-1));var o=l[n+1];return o(e,t,a,r)}function Fr(e,t){for(var r=1,o=e.length,n=e[0],a=e[0],s=1;s0;){'].join('')),l.push(['if(j',p,'<',s,'){'].join('')),l.push(['s',t[p],'=j',p].join('')),l.push(['j',p,'=0'].join('')),l.push(['}else{s',t[p],'=',s].join('')),l.push(['j',p,'-=',s,'}'].join('')),u&&l.push(['index[',t[p],']=j',p].join(''));for(var p=0,i;p=i.count)){var u=new RegExp(i.name,'g'),l='',p=t.arrayArgs.indexOf(s);switch(t.argTypes[s]){case'offset':var d=t.offsetArgIndex.indexOf(s),c=t.offsetArgs[d];p=c.array,l='+q'+d;case'array':l='p'+p+l;var h='l'+s,g='a'+p;if(0===t.arrayBlockIndices[p])1===i.count?'generic'===a[p]?i.lvalue?(o.push(['var ',h,'=',g,'.get(',l,')'].join('')),r=r.replace(u,h),n.push([g,'.set(',l,',',h,')'].join(''))):r=r.replace(u,[g,'.get(',l,')'].join('')):r=r.replace(u,[g,'[',l,']'].join('')):'generic'===a[p]?(o.push(['var ',h,'=',g,'.get(',l,')'].join('')),r=r.replace(u,h),i.lvalue&&n.push([g,'.set(',l,',',h,')'].join(''))):(o.push(['var ',h,'=',g,'[',l,']'].join('')),r=r.replace(u,h),i.lvalue&&n.push([g,'[',l,']=',h].join('')));else{for(var m=[i.name],f=[l],_=0;_e.arrayBlockIndices[n]?(u.push(0),l.push(a),i.push(a),s.push(a+e.arrayBlockIndices[n])):(u.push(e.arrayBlockIndices[n]),l.push(e.arrayBlockIndices[n]+a),i.push(0),s.push(e.arrayBlockIndices[n]));for(var d=[],c=0;ce.arrayBlockIndices[0]?','+e.arrayBlockIndices[0]+')':')'].join('')],u=[],l=[],p=0,i;p0;) {'),t.push('if (!('+l.join(' && ')+')) throw new Error(\'cwise: Arrays do not all have the same shape!\')'),t.push('}'));for(var p=0;p=t.arrayArgs.length)throw new Error('cwise: No array arguments specified');if(t.pre.args.length>a.length)throw new Error('cwise: Too many arguments in pre() block');if(t.body.args.length>a.length)throw new Error('cwise: Too many arguments in body() block');if(t.post.args.length>a.length)throw new Error('cwise: Too many arguments in post() block');return t.debug=!!e.printCode||!!e.debug,t.funcName=e.funcName||'cwise',t.blockSize=e.blockSize||64,lg(t)}function qr(e,t){var a=[],r=[],o;if(t!==void 0&&!Array.isArray(t))throw new Error('axes must be an Array list of dimensions to squeeze');for(o=0;ovg.indexOf(t)&&0>bg.indexOf(t)&&console.warn('cwise: Unknown argument \''+t+'\' passed to expression compiler');for(var a=0;at&&(t=-t>o?0:o+t),a=a>o?o:a,0>a&&(a+=o),o=t>a?0:a-t>>>0,t>>>=0;for(var n=Array(o);++rt?0:t)):[]}function Kr(e,t){for(var a=-1,r=e.length,o;++ad;++d)n.push('for(var i',d,'=',s[d],';i',d,'>0;){','var w',d,'=',em,';','if(i',d,'<',em,'){','w',d,'=i',d,';','i',d,'=0;','}else{','i',d,'-=',em,';','}');n.push.apply(n,Yr(u,'o',e,'i0','i1','w1')),n.push('for(i=0;i=r)return[];var o=Array(r),n;if(a===e.length-1)for(n=0;na?1:0;if(n&&(a=-a),0===a)e(0<1/a?0:2147483648,r,o);else if(isNaN(a))e(2143289344,r,o);else if(3.4028234663852886e38>>0,r,o);else if(1.1754943508222875e-38>a)e((n<<31|En(a/1.401298464324817e-45))>>>0,r,o);else{var i=kn(Fn(a)/t),s=8388607&En(8388608*(a*zn(2,-i)));e((n<<31|i+127<<23|s)>>>0,r,o)}}function r(e,t,a){var r=e(t,a),o=2*(r>>31)+1,n=255&r>>>23,i=8388607&r;return 255==n?i?NaN:o*Infinity:0==n?1.401298464324817e-45*o*i:o*zn(2,n-150)*(i+8388608)}e.writeFloatLE=a.bind(null,Bo),e.writeFloatBE=a.bind(null,No),e.readFloatLE=r.bind(null,Vo),e.readFloatBE=r.bind(null,Ho)}():function(){function t(e,t,a){n[0]=e,t[a]=i[0],t[a+1]=i[1],t[a+2]=i[2],t[a+3]=i[3]}function a(e,t,a){n[0]=e,t[a]=i[3],t[a+1]=i[2],t[a+2]=i[1],t[a+3]=i[0]}function r(e,t){return i[0]=e[t],i[1]=e[t+1],i[2]=e[t+2],i[3]=e[t+3],n[0]}function o(e,t){return i[3]=e[t],i[2]=e[t+1],i[1]=e[t+2],i[0]=e[t+3],n[0]}var n=new Float32Array([0]),i=new Uint8Array(n.buffer),s=128===i[3];e.writeFloatLE=s?t:a,e.writeFloatBE=s?a:t,e.readFloatLE=s?r:o,e.readFloatBE=s?o:r}(),'undefined'==typeof Float64Array?function(){function a(e,a,r,o,n,i){var s=0>o?1:0;if(s&&(o=-o),0===o)e(0,n,i+a),e(0<1/o?0:2147483648,n,i+r);else if(isNaN(o))e(0,n,i+a),e(2146959360,n,i+r);else if(1.7976931348623157e308>>0,n,i+r);else{var u;if(2.2250738585072014e-308>o)u=o/5e-324,e(u>>>0,n,i+a),e((s<<31|u/4294967296)>>>0,n,i+r);else{var l=kn(Fn(o)/t);1024===l&&(l=1023),u=o*zn(2,-l),e(4503599627370496*u>>>0,n,i+a),e((s<<31|l+1023<<20|1048575&1048576*u)>>>0,n,i+r)}}}function r(e,t,a,r,o){var n=e(r,o+t),i=e(r,o+a),s=2*(i>>31)+1,u=2047&i>>>20,l=4294967296*(1048575&i)+n;return 2047==u?l?NaN:s*Infinity:0==u?5e-324*s*l:s*zn(2,u-1075)*(l+4503599627370496)}e.writeDoubleLE=a.bind(null,Bo,0,4),e.writeDoubleBE=a.bind(null,No,4,0),e.readDoubleLE=r.bind(null,Vo,0,4),e.readDoubleBE=r.bind(null,Ho,4,0)}():function(){function t(e,t,a){n[0]=e,t[a]=i[0],t[a+1]=i[1],t[a+2]=i[2],t[a+3]=i[3],t[a+4]=i[4],t[a+5]=i[5],t[a+6]=i[6],t[a+7]=i[7]}function a(e,t,a){n[0]=e,t[a]=i[7],t[a+1]=i[6],t[a+2]=i[5],t[a+3]=i[4],t[a+4]=i[3],t[a+5]=i[2],t[a+6]=i[1],t[a+7]=i[0]}function r(e,t){return i[0]=e[t],i[1]=e[t+1],i[2]=e[t+2],i[3]=e[t+3],i[4]=e[t+4],i[5]=e[t+5],i[6]=e[t+6],i[7]=e[t+7],n[0]}function o(e,t){return i[7]=e[t],i[6]=e[t+1],i[5]=e[t+2],i[4]=e[t+3],i[3]=e[t+4],i[2]=e[t+5],i[1]=e[t+6],i[0]=e[t+7],n[0]}var n=new Float64Array([0]),i=new Uint8Array(n.buffer),s=128===i[7];e.writeDoubleLE=s?t:a,e.writeDoubleBE=s?a:t,e.readDoubleLE=s?r:o,e.readDoubleBE=s?o:r}(),e}function Bo(e,t,a){t[a]=255&e,t[a+1]=255&e>>>8,t[a+2]=255&e>>>16,t[a+3]=e>>>24}function No(e,t,a){t[a]=e>>>24,t[a+1]=255&e>>>16,t[a+2]=255&e>>>8,t[a+3]=255&e}function Vo(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function Ho(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function Wo(e){try{var t=eval('quire'.replace(/^/,'re'))(e);if(t&&(t.length||Object.keys(t).length))return t}catch(t){}return null}function Xo(e,t,a){var r=a||8192,o=null,n=r;return function(a){if(1>a||a>r>>>1)return e(a);n+a>r&&(o=e(r),n=0);var i=t.call(o,n,n+=a);return 7&n&&(n=(7|n)+1),i}}function $o(e,t){this.lo=e>>>0,this.hi=t>>>0}function Ko(e,t,a){this.fn=e,this.len=t,this.next=void 0,this.val=a}function Zo(){}function Qo(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function Yo(){this.len=0,this.head=new Ko(Zo,0,0),this.tail=this.head,this.states=null}function Jo(e,t,a){t[a]=255&e}function en(e,t,a){for(;127>>=7;t[a]=e}function tn(e,t){this.len=e,this.next=void 0,this.val=t}function an(e,t,a){for(;e.hi;)t[a++]=128|127&e.lo,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;127>>=7;t[a++]=e.lo}function rn(e,t,a){t[a]=255&e,t[a+1]=255&e>>>8,t[a+2]=255&e>>>16,t[a+3]=e>>>24}function on(){ox.call(this)}function nn(e,t,a){40>e.length?rx.utf8.write(e,t,a):t.utf8Write(e,a)}function sn(e,t){return RangeError('index out of range: '+e.pos+' + '+(t||1)+' > '+e.len)}function un(e){this.buf=e,this.pos=0,this.len=e.length}function ln(){var e=new gx(0,0),t=0;if(4t;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,128>this.buf[this.pos++])return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,128>this.buf[this.pos++])return e;t=0}else{for(;3>t;++t){if(this.pos>=this.len)throw sn(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,128>this.buf[this.pos++])return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}if(4t;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,128>this.buf[this.pos++])return e;}else for(;5>t;++t){if(this.pos>=this.len)throw sn(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,128>this.buf[this.pos++])return e}throw Error('invalid varint encoding')}function pn(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function dn(){if(this.pos+8>this.len)throw sn(this,8);return new gx(pn(this.buf,this.pos+=4),pn(this.buf,this.pos+=4))}function cn(e){hx.call(this,e)}function hn(e,t,a){if('function'!=typeof e)throw TypeError('rpcImpl must be a function');rx.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!a}function gn(e){return'number'==typeof e&&Mx(e)}function mn(e){var t=null==e?0:e.length;return t?Kc(e,Ix):[]}function fn(e,t){var a=function(e,t,a){return e+(t-e)*a},r=[],o=new Number((e.length-1)/(t-1));r[0]=e[0];for(var n=1;ne+t*t,0),a=jn(t);return e.map((e)=>e/a)}function xn(t){return Gx(this,void 0,void 0,function*(){200>t.values.length&&console.warn('Pattern detector requires atleast 250 data for a reliable prediction, received just ',t.values.length),yield Ux.ready(),Hn.reverseInputs(t);var a=t.values,r=_n(fn(a,400));let o=yield Ux.predict({input:new Float32Array(r)});var n=o.output.indexOf(An(...o.output));return Hn.reverseInputs(t),{pattern:e.AvailablePatterns[n],patternId:n,probability:100*o.output[n]}})}function yn(t){return Gx(this,void 0,void 0,function*(){var a=yield xn(t);return a.patternId===e.AvailablePatterns.DB&&75this._length?e&&e.data:(e===this._tail?(this._tail=e.prev,this._tail.next=void 0,this._current=this._tail):(e.next.prev=e.prev,e.prev.next=e.next,this._current=e.prev),this._next=this._current.next,e.next=this._head,e.prev=void 0,this._head.prev=e,this._head=e,e.data)}removeCurrent(){var e=this._current;if(0!==this._length)return(this._length--,0===this._length)?(this._head=this._tail=this._current=this._next=void 0,e.data):(e===this._tail?(this._tail=e.prev,this._tail.next=void 0,this._current=this._tail):e===this._head?(this._head=e.next,this._head.prev=void 0,this._current=this._head):(e.next.prev=e.prev,e.prev.next=e.next,this._current=e.prev),this._next=this._current.next,e.data)}resetCursor(){return this._current=this._next=this._head,this}next(){var e=this._next;if(void 0!==e)return this._next=e.next,this._current=e,e.data}}class qn extends On{constructor(e,t,a,r){if(super(),this.size=e,this.maintainHigh=t,this.maintainLow=a,this.maintainSum=r,this.totalPushed=0,this.periodHigh=0,this.periodLow=Infinity,this.periodSum=0,!e||'number'!=typeof e)throw'Size required and should be a number.';this._push=this.push,this.push=function(e){this.add(e),this.totalPushed++}}add(e){this.length===this.size?(this.lastShift=this.shift(),this._push(e),this.maintainHigh&&this.lastShift==this.periodHigh&&this.calculatePeriodHigh(),this.maintainLow&&this.lastShift==this.periodLow&&this.calculatePeriodLow(),this.maintainSum&&(this.periodSum-=this.lastShift)):this._push(e),this.maintainHigh&&this.periodHigh<=e&&(this.periodHigh=e),this.maintainLow&&this.periodLow>=e&&(this.periodLow=e),this.maintainSum&&(this.periodSum+=e)}*iterator(){for(this.resetCursor();this.next();)yield this.current}calculatePeriodHigh(){for(this.resetCursor(),this.next()&&(this.periodHigh=this.current);this.next();)this.periodHigh<=this.current&&(this.periodHigh=this.current)}calculatePeriodLow(){for(this.resetCursor(),this.next()&&(this.periodLow=this.current);this.next();)this.periodLow>=this.current&&(this.periodLow=this.current)}}class Un{}class Bn{constructor(){this.open=[],this.high=[],this.low=[],this.close=[],this.volume=[],this.timestamp=[]}}let Nn={};class Vn{}class Hn{constructor(e){this.format=e.format||o}static reverseInputs(e){e.reversedInput&&(e.values?e.values.reverse():void 0,e.open?e.open.reverse():void 0,e.high?e.high.reverse():void 0,e.low?e.low.reverse():void 0,e.close?e.close.reverse():void 0,e.volume?e.volume.reverse():void 0,e.timestamp?e.timestamp.reverse():void 0)}getResult(){return this.result}}class Wn extends Hn{constructor(e){super(e),this.period=e.period,this.price=e.values;this.generator=function*(e){var t=new On,a=0,r=1,o=yield,n;for(t.push(0);;)r{var t=this.generator.next(e);t.value!==void 0&&this.result.push(this.format(t.value))})}nextValue(e){var t=this.generator.next(e).value;if(t!=void 0)return this.format(t)}}Wn.calculate=n;class Xn extends Hn{constructor(e){super(e);var t=e.period,a=e.values,r;this.result=[],r=new Wn({period:t,values:[]});this.generator=function*(){for(var e=yield,a;;)void 0!=a&&void 0!==e?(a=(e-a)*(2/(t+1))+a,e=yield a):(e=yield,a=r.nextValue(e),a&&(e=yield a))}(),this.generator.next(),this.generator.next(),a.forEach((e)=>{var t=this.generator.next(e);t.value!=void 0&&this.result.push(this.format(t.value))})}nextValue(e){var t=this.generator.next(e).value;if(t!=void 0)return this.format(t)}}Xn.calculate=i;class $n extends Hn{constructor(e){super(e);var t=e.period,a=e.values;this.result=[],this.generator=function*(){for(let a=new On;;)if(a.length{var t=this.generator.next(e);t.value!=void 0&&this.result.push(this.format(t.value))})}nextValue(e){var t=this.generator.next(e).value;if(t!=void 0)return this.format(t)}}$n.calculate=s;class Kn extends Hn{constructor(e){super(e);var t=e.period,a=e.values,r;this.result=[],r=new Wn({period:t,values:[]});this.generator=function*(){for(var e=yield,a;;)void 0!=a&&void 0!==e?(a=(e-a)*(1/t)+a,e=yield a):(e=yield,a=r.nextValue(e),void 0!==a&&(e=yield a))}(),this.generator.next(),this.generator.next(),a.forEach((e)=>{var t=this.generator.next(e);t.value!=void 0&&this.result.push(this.format(t.value))})}nextValue(e){var t=this.generator.next(e).value;if(t!=void 0)return this.format(t)}}Kn.calculate=u;class Zn extends Hn{constructor(e){super(e);var t=e.SimpleMAOscillator?Wn:Xn,a=e.SimpleMASignal?Wn:Xn,r=new t({period:e.fastPeriod,values:[],format:(e)=>e}),o=new t({period:e.slowPeriod,values:[],format:(e)=>e}),n=new a({period:e.signalPeriod,values:[],format:(e)=>e}),i=this.format;this.result=[],this.generator=function*(){for(var t=0,a,s,u,l,p,d;;){if(t{var t=this.generator.next(e);t.value!=void 0&&this.result.push(t.value)})}nextValue(e){var t=this.generator.next(e).value;return t}}Zn.calculate=l;class Qn extends Hn{constructor(e){super(e);let t=e.values,a=e.period,r=this.format;this.generator=function*(e){var t=yield,a=1,o=0,n=t,i,s;for(t=yield;;)s=t-n,s=0{var t=this.generator.next(e);t.value!==void 0&&this.result.push(t.value)})}nextValue(e){return this.generator.next(e).value}}Qn.calculate=p;class Yn extends Hn{constructor(e){super(e);let t=e.values,a=e.period,r=this.format;this.generator=function*(e){var t=yield,a=1,o=0,n=t,i,s;for(t=yield;;)s=n-t,s=0{var t=this.generator.next(e);t.value!==void 0&&this.result.push(t.value)})}nextValue(e){return this.generator.next(e).value}}Yn.calculate=d;class Jn extends Hn{constructor(e){super(e);var t=e.period,a=e.values,r=new Qn({period:t,values:[]}),o=new Yn({period:t,values:[]});let n=1;this.generator=function*(){for(var e=yield,t,a,i,s;;)t=r.nextValue(e),a=o.nextValue(e),void 0!==t&&void 0!==a&&(0===a?s=100:0===t?s=0:(i=t/a,i=isNaN(i)?0:i,s=parseFloat((100-100/(1+i)).toFixed(2)))),n++,e=yield s}(t),this.generator.next(),this.result=[],a.forEach((e)=>{var t=this.generator.next(e);t.value!==void 0&&this.result.push(t.value)})}nextValue(e){return this.generator.next(e).value}}Jn.calculate=c;class ei extends Hn{constructor(e){super(e);var t=e.period,a=e.values,r=new Wn({period:t,values:[],format:(e)=>e});this.result=[],this.generator=function*(){var e=new qn(t),a,o;a=yield;for(var n;;){if(e.push(a),o=r.nextValue(a),o){let a=0;for(let t of e.iterator())a+=zn(t-o,2);n=jn(a/t)}a=yield n}}(),this.generator.next(),a.forEach((e)=>{var t=this.generator.next(e);t.value!=void 0&&this.result.push(this.format(t.value))})}nextValue(e){var t=this.generator.next(e);if(t.value!=void 0)return this.format(t.value)}}ei.calculate=h;class ti extends Hn{constructor(e){super(e);var t=e.period,a=e.values,r=e.stdDev,o=this.format,n,i;this.result=[],n=new Wn({period:t,values:[],format:(e)=>e}),i=new ei({period:t,values:[],format:(e)=>e}),this.generator=function*(){var e,t,a,s;for(t=yield;;){if(a=n.nextValue(t),s=i.nextValue(t),a){let n=o(a),i=o(a+s*r),u=o(a-s*r),l=o((t-u)/(i-u));e={middle:n,upper:i,lower:u,pb:l}}t=yield e}}(),this.generator.next(),a.forEach((e)=>{var t=this.generator.next(e);t.value!=void 0&&this.result.push(t.value)})}nextValue(e){return this.generator.next(e).value}}ti.calculate=g;class ai extends Hn{constructor(e){super(e),this.period=e.period,this.price=e.values;this.generator=function*(e){for(var t=new On,a=0,r=1,o=yield,n=0;;)r{var t=this.generator.next(e);t.value!=void 0&&this.result.push(this.format(t.value))})}nextValue(e){var t=this.generator.next(e).value;if(t!=void 0)return this.format(t)}}ai.calculate=m;class ri extends Hn{constructor(e){super(e);var t=e.low,a=e.high,r=this.format;if(t.length!=a.length)throw'Inputs(low,high) not of equal size';this.result=[],this.generator=function*(){for(var e=yield,t,a;;){if(a){let o=e.high-a.high,n=a.low-e.low;t=r(n>o&&0{var o=this.generator.next({high:a[r],low:t[r]});o.value!==void 0&&this.result.push(o.value)})}static calculate(e){Hn.reverseInputs(e);var t=new ri(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}nextValue(e){return this.generator.next(e).value}}class oi extends Hn{constructor(e){super(e);var t=e.low,a=e.high,r=this.format;if(t.length!=a.length)throw'Inputs(low,high) not of equal size';this.result=[],this.generator=function*(){for(var e=yield,t,a;;){if(a){let o=e.high-a.high,n=a.low-e.low;t=r(o>n&&0{var o=this.generator.next({high:a[r],low:t[r]});o.value!==void 0&&this.result.push(o.value)})}static calculate(e){Hn.reverseInputs(e);var t=new oi(e).result;return e.reversedInput&&t.reverse(),Hn.reverseInputs(e),t}nextValue(e){return this.generator.next(e).value}}class ni extends Hn{constructor(e){super(e);var t=e.low,a=e.high,r=e.close,o=this.format;if(t.length!=a.length)throw'Inputs(low,high) not of equal size';this.result=[],this.generator=function*(){for(var e=yield,t,a;;)void 0==t&&(t=e.close,e=yield a),a=An(e.high-e.low,isNaN(Ln(e.high-t))?0:Ln(e.high-t),isNaN(Ln(e.low-t))?0:Ln(e.low-t)),t=e.close,void 0!=a&&(a=o(a)),e=yield a}(),this.generator.next(),t.forEach((e,o)=>{var n=this.generator.next({high:a[o],low:t[o],close:r[o]});n.value!=void 0&&this.result.push(n.value)})}nextValue(e){return this.generator.next(e).value}}ni.calculate=f;class ii extends Vn{}class si extends Hn{constructor(e){super(e);var t=e.low,a=e.high,r=e.close,o=e.period,n=this.format,i=new oi({high:[],low:[]}),s=new ri({high:[],low:[]}),u=new ai({period:o,values:[],format:(e)=>e}),l=new ai({period:o,values:[],format:(e)=>e}),p=new ai({period:o,values:[],format:(e)=>e}),d=new Kn({period:o,values:[],format:(e)=>e}),c=new ni({low:[],high:[],close:[]});if(t.length!==a.length||a.length!==r.length)throw'Inputs(low,high, close) not of equal size';this.result=[],ii,this.generator=function*(){var e=yield,t,a,r,o,n,h,g;for(t=0,a=0,r=0;;){let t=c.nextValue(e),a=i.nextValue(e),r=s.nextValue(e);if(t===void 0){e=yield;continue}let m=p.nextValue(t),f=u.nextValue(a),_=l.nextValue(r);if(m!=void 0&&f!=void 0&&_!=void 0){o=100*f/m,n=100*_/m;let e=Ln(o-n),t=o+n;h=100*(e/t),g=d.nextValue(h)}e=yield{adx:g,pdi:o,mdi:n}}}(),this.generator.next(),t.forEach((e,o)=>{var i=this.generator.next({high:a[o],low:t[o],close:r[o]});i.value!=void 0&&i.value.adx!=void 0&&this.result.push({adx:n(i.value.adx),pdi:n(i.value.pdi),mdi:n(i.value.mdi)})})}nextValue(e){let t=this.generator.next(e).value;if(t!=void 0&&t.adx!=void 0)return{adx:this.format(t.adx),pdi:this.format(t.pdi),mdi:this.format(t.mdi)}}}si.calculate=_;class ui extends Hn{constructor(e){super(e);var t=e.low,a=e.high,r=e.close,o=e.period,n=this.format;if(t.length!==a.length||a.length!==r.length)throw'Inputs(low,high, close) not of equal size';var i=new ni({low:[],high:[],close:[]}),s=new Kn({period:o,values:[],format:(e)=>e});this.result=[],this.generator=function*(){for(var e=yield,t,a;;)a=i.nextValue({low:e.low,high:e.high,close:e.close}),t=void 0===a?void 0:s.nextValue(a),e=yield t}(),this.generator.next(),t.forEach((e,o)=>{var i=this.generator.next({high:a[o],low:t[o],close:r[o]});i.value!==void 0&&this.result.push(n(i.value))})}nextValue(e){return this.generator.next(e).value}}ui.calculate=x;class li extends Hn{constructor(e){super(e);var t=e.period,a=e.values;this.result=[],this.generator=function*(){let e=1;for(var a=new qn(t),r=yield,o;;)a.push(r),e{var t=this.generator.next(e);t.value==void 0||isNaN(t.value)||this.result.push(this.format(t.value))})}nextValue(e){var t=this.generator.next(e);if(t.value!=void 0&&!isNaN(t.value))return this.format(t.value)}}li.calculate=y;class pi extends Hn{constructor(e){super(e);let t=e.values,a=e.ROCPer1,r=e.ROCPer2,o=e.ROCPer3,n=e.ROCPer4,i=e.SMAROCPer1,s=e.SMAROCPer2,u=e.SMAROCPer3,l=e.SMAROCPer4,p=e.signalPeriod,d=new li({period:a,values:[]}),c=new li({period:r,values:[]}),h=new li({period:o,values:[]}),g=new li({period:n,values:[]}),m=new Wn({period:i,values:[],format:(e)=>e}),f=new Wn({period:s,values:[],format:(e)=>e}),_=new Wn({period:u,values:[],format:(e)=>e}),x=new Wn({period:l,values:[],format:(e)=>e}),y=new Wn({period:p,values:[],format:(e)=>e});var v=this.format;this.result=[];let b=An(a+i,r+s,o+u,n+l);this.generator=function*(){for(let e=1,t=yield,a,r,o,n,i,s,u;;){let l=d.nextValue(t),p=c.nextValue(t),S=h.nextValue(t),T=g.nextValue(t);r=l===void 0?void 0:m.nextValue(l),o=p===void 0?void 0:f.nextValue(p),n=S===void 0?void 0:_.nextValue(S),i=T===void 0?void 0:x.nextValue(T),e{let t=this.generator.next(e);t.value!=void 0&&this.result.push(t.value)})}nextValue(e){let t=this.generator.next(e);if(t.value!=void 0)return t.value}}pi.calculate=v;class di extends Hn{constructor(e){super(e);let t=e.high||[],a=e.low||[];this.result=[],this.generator=function*(e,t){for(let a=!0,r=e,o=yield,n,i,s,u;;)n?(s+=r*(i-s),a?(s=Rn(s,u.low,o.low),n.high>i&&(i=n.high,r=Rn(r+e,t))):(s=An(s,u.high,o.high),n.lows)&&(r=e,s=i,a=!a,i=a?n.high:n.low)):(s=o.low,i=o.high),u=o,n&&(o=n),n=yield s}(e.step,e.max),this.generator.next(),a.forEach((e,r)=>{var o=this.generator.next({high:t[r],low:a[r]});o.value!==void 0&&this.result.push(o.value)})}nextValue(e){let t=this.generator.next(e);if(t.value!==void 0)return t.value}}di.calculate=b;class ci extends Hn{constructor(e){super(e);let t=e.low,a=e.high,r=e.close,o=e.period,n=e.signalPeriod,i=this.format;if(t.length!==a.length||a.length!==r.length)throw'Inputs(low,high, close) not of equal size';this.result=[],this.generator=function*(){let e=1,t=new qn(o,!0,!1),a=new qn(o,!1,!0),r=new Wn({period:n,values:[],format:(e)=>e}),s,u;for(var l=yield;;){if(t.push(l.high),a.push(l.low),e{var n=this.generator.next({high:a[o],low:t[o],close:r[o]});n.value!==void 0&&this.result.push(n.value)})}nextValue(e){let t=this.generator.next(e);if(t.value!==void 0)return t.value}}ci.calculate=S;class hi extends Hn{constructor(e){super(e);let t=e.low,a=e.high,r=e.close,o=e.period,n=this.format;if(t.length!==a.length||a.length!==r.length)throw'Inputs(low,high, close) not of equal size';this.result=[],this.generator=function*(){let e=1,t=new qn(o,!0,!1),a=new qn(o,!1,!0),r,i;var s=yield;for(let u;;){if(t.push(s.high),a.push(s.low),e{var n=this.generator.next({high:a[o],low:t[o],close:r[o]});n.value!==void 0&&this.result.push(n.value)})}nextValue(e){var t=this.generator.next(e);if(t.value!=void 0)return this.format(t.value)}}hi.calculate=T;class gi extends Hn{constructor(e){super(e);var t=e.high,a=e.low,r=e.close,o=e.volume;if(a.length!==t.length||t.length!==r.length||t.length!==o.length)throw'Inputs(low,high, close, volumes) not of equal size';this.result=[],this.generator=function*(){var e=0,t;for(t=yield;;){let a=(t.close-t.low-(t.high-t.close))/(t.high-t.low);a=isNaN(a)?1:a;let r=a*t.volume;e+=r,t=yield En(e)}}(),this.generator.next(),t.forEach((e,t)=>{var n={high:e,low:a[t],close:r[t],volume:o[t]},i=this.generator.next(n);i.value!=void 0&&this.result.push(i.value)})}nextValue(e){return this.generator.next(e).value}}gi.calculate=w;class mi extends Hn{constructor(e){super(e);var t=e.close,a=e.volume;this.result=[],this.generator=function*(){var e=0,t,a;for(t=yield,t.close&&'number'==typeof t.close&&(a=t.close,t=yield);;)a{let o={close:t[r],volume:a[r]},n=this.generator.next(o);n.value!=void 0&&this.result.push(n.value)})}nextValue(e){return this.generator.next(e).value}}mi.calculate=P;class fi extends Hn{constructor(e){super(e);let t=e.values,a=e.period,r=this.format,o=new Xn({period:a,values:[],format:(e)=>e}),n=new Xn({period:a,values:[],format:(e)=>e}),i=new Xn({period:a,values:[],format:(e)=>e}),s=new li({period:1,values:[],format:(e)=>e});this.result=[],this.generator=function*(){for(let e=yield;;){let t=o.nextValue(e),a=t?n.nextValue(t):void 0,u=a?i.nextValue(a):void 0,l=u?s.nextValue(u):void 0;e=yield l?r(l):void 0}}(),this.generator.next(),t.forEach((e)=>{let t=this.generator.next(e);t.value!==void 0&&this.result.push(t.value)})}nextValue(e){let t=this.generator.next(e);if(t.value!==void 0)return t.value}}fi.calculate=C;class _i extends Hn{constructor(e){super(e);var t=e.close,a=e.volume,r=e.period||1;if(a.length!==t.length)throw'Inputs(volume, close) not of equal size';let o=new Xn({values:[],period:r});this.result=[],this.generator=function*(){var e=yield,t=yield;for(let a;;)a=(t.close-e.close)*t.volume,e=t,t=yield o.nextValue(a)}(),this.generator.next(),a.forEach((e,r)=>{var o=this.generator.next({close:t[r],volume:a[r]});o.value!=void 0&&this.result.push(o.value)})}nextValue(e){let t=this.generator.next(e).value;if(t!=void 0)return t}}_i.calculate=k;class xi extends Hn{constructor(e){super(e);var t=e.low,a=e.high,r=e.close,o=e.period,n=this.format;var i=new qn(o),s=new Wn({period:o,values:[],format:(e)=>e});if(t.length!==a.length||a.length!==r.length)throw'Inputs(low,high, close) not of equal size';this.result=[],this.generator=function*(){for(var e=yield;;){let t=(e.high+e.low+e.close)/3;i.push(t);let a=s.nextValue(t),r=null,o=0,n;if(a!=void 0){for(let e of i.iterator())o+=Ln(e-a);r=o/20,n=(t-a)/(.015*r)}e=yield n}}(),this.generator.next(),t.forEach((e,o)=>{var n=this.generator.next({high:a[o],low:t[o],close:r[o]});n.value!=void 0&&this.result.push(n.value)})}nextValue(e){let t=this.generator.next(e).value;if(t!=void 0)return t}}xi.calculate=F;class yi extends Hn{constructor(e){super(e);var t=e.high,a=e.low,r=e.fastPeriod,o=e.slowPeriod,n=new Wn({values:[],period:o}),i=new Wn({values:[],period:r});this.result=[],this.generator=function*(){var e,t,a,r,o;for(t=yield;;)a=(t.high+t.low)/2,r=n.nextValue(a),o=i.nextValue(a),void 0!==r&&void 0!==o&&(e=o-r),t=yield e}(),this.generator.next(),t.forEach((e,t)=>{var r={high:e,low:a[t]},o=this.generator.next(r);o.value!=void 0&&this.result.push(this.format(o.value))})}nextValue(e){var t=this.generator.next(e);if(t.value!=void 0)return this.format(t.value)}}yi.calculate=M;class vi extends Hn{constructor(e){super(e);var t=e.low,a=e.high,r=e.close,o=e.volume,n=this.format;if(t.length!==a.length||a.length!==r.length)throw'Inputs(low,high, close) not of equal size';this.result=[],this.generator=function*(){var e=yield;for(let t=0,a=0;;){let r=(e.high+e.low+e.close)/3,o=e.volume*r;t+=o,a+=e.volume,e=yield t/a}}(),this.generator.next(),t.forEach((e,n)=>{var i=this.generator.next({high:a[n],low:t[n],close:r[n],volume:o[n]});i.value!=void 0&&this.result.push(i.value)})}nextValue(e){let t=this.generator.next(e).value;if(t!=void 0)return t}}vi.calculate=D;class bi extends Hn{constructor(e){super(e);var t=e.high,a=e.low,r=e.close,o=e.open,n=e.volume,s=e.noOfBars;if(a.length!==t.length||t.length!==r.length||t.length!==n.length)throw'Inputs(low,high, close, volumes) not of equal size';this.result=[];var i=An(...t,...a,...r,...o),u=Rn(...t,...a,...r,...o),l=u;for(let p=0;pg?c+=m:d+=m)}this.result.push({rangeStart:e,rangeEnd:p,bullishVolume:d,bearishVolume:c,totalVolume:h})}}nextValue(){throw'Next value not supported for volume profile'}}bi.calculate=R;class Si extends Hn{constructor(e){super(e),this.result=[],this.generator=function*(){for(let e=yield;;)e=yield(e.high+e.low+e.close)/3}(),this.generator.next(),e.low.forEach((t,a)=>{var r=this.generator.next({high:e.high[a],low:e.low[a],close:e.close[a]});this.result.push(r.value)})}nextValue(e){var t=this.generator.next(e).value;return t}}Si.calculate=A;class Ti extends Hn{constructor(e){super(e);var t=e.high,a=e.low,r=e.close,o=e.volume,n=e.period,i=new Si({low:[],high:[],close:[]}),s=new qn(n,!1,!1,!0),u=new qn(n,!1,!1,!0);if(a.length!==t.length||t.length!==r.length||t.length!==o.length)throw'Inputs(low,high, close, volumes) not of equal size';this.result=[],this.generator=function*(){var e=0,t,a,r,o,l,p;let d=null,c=null;for(a=yield,r=a.close,a=yield;;){var{high:h,low:g,close:m,volume:f}=a,_=0,x=0;d=i.nextValue({high:h,low:g,close:m}),e=d*f,null!=d&&null!=c&&(d>c?_=e:x=e,s.push(_),u.push(x),o=s.periodSum,p=u.periodSum,s.totalPushed>=n&&s.totalPushed>=n&&(l=o/p,t=100-100/(1+l))),c=d,a=yield t}}(),this.generator.next(),t.forEach((e,t)=>{var n={high:e,low:a[t],close:r[t],volume:o[t]},i=this.generator.next(n);i.value!=void 0&&this.result.push(parseFloat(i.value.toFixed(2)))})}nextValue(e){var t=this.generator.next(e);if(t.value!=void 0)return parseFloat(t.value.toFixed(2))}}Ti.calculate=L;class wi extends Hn{constructor(e){super(e);let t=e.values,a=e.rsiPeriod,r=e.stochasticPeriod,o=e.kPeriod,n=e.dPeriod,i=this.format;this.result=[],this.generator=function*(){let e=new Jn({period:a,values:[]}),t=new ci({period:r,high:[],low:[],close:[],signalPeriod:o}),i=new Wn({period:n,values:[],format:(e)=>e}),s,u,l,p;for(var c=yield;;){if(s=e.nextValue(c),void 0!==s){var h={high:s,low:s,close:s};u=t.nextValue(h),void 0!==u&&void 0!==u.d&&(l=i.nextValue(u.d),void 0!==l&&(p={stochRSI:u.k,k:u.d,d:l}))}c=yield p}}(),this.generator.next(),t.forEach((e)=>{var t=this.generator.next(e);t.value!==void 0&&this.result.push(t.value)})}nextValue(e){let t=this.generator.next(e);if(t.value!==void 0)return t.value}}wi.calculate=j;class Pi extends Hn{constructor(e){super(e);var t=e.values,a=e.period;this.result=[];var r=new qn(a,!0,!1,!1);this.generator=function*(){var e,t;for(e=yield;;)r.push(e),r.totalPushed>=a&&(t=r.periodHigh),e=yield t}(),this.generator.next(),t.forEach((e)=>{var t=this.generator.next(e);t.value!=void 0&&this.result.push(t.value)})}nextValue(e){var t=this.generator.next(e);if(t.value!=void 0)return t.value}}Pi.calculate=z;class Ci extends Hn{constructor(e){super(e);var t=e.values,a=e.period;this.result=[];var r=new qn(a,!1,!0,!1);this.generator=function*(){var e,t;for(e=yield;;)r.push(e),r.totalPushed>=a&&(t=r.periodLow),e=yield t}(),this.generator.next(),t.forEach((e)=>{var t=this.generator.next(e);t.value!=void 0&&this.result.push(t.value)})}nextValue(e){var t=this.generator.next(e);if(t.value!=void 0)return t.value}}Ci.calculate=G;class ki extends Hn{constructor(e){super(e);var t=e.values,a=e.period;this.result=[];var r=new qn(a,!1,!1,!0);this.generator=function*(){var e,t;for(e=yield;;)r.push(e),r.totalPushed>=a&&(t=r.periodSum),e=yield t}(),this.generator.next(),t.forEach((e)=>{var t=this.generator.next(e);t.value!=void 0&&this.result.push(t.value)})}nextValue(e){var t=this.generator.next(e);if(t.value!=void 0)return t.value}}ki.calculate=O;class Fi extends Hn{constructor(e){super(e);this.format;let t=e.useATR,a=e.brickSize||0;if(t){let t=x(Object.assign({},e));a=t[t.length-1]}if(this.result=new Bn,0===a)return void console.error('Not enough data to calculate brickSize for renko when using ATR');let r=0,o=0,n=Infinity,i=0,s=0,u=0;this.generator=function*(){for(let e=yield;;){if(0==r){r=e.close,o=e.high,n=e.low,i=e.close,s=e.volume,u=e.timestamp,e=yield;continue}let t=Ln(e.close-i),l=Ln(e.close-r);if(t>=a&&l>=a){let u=t>l?r:i,p={open:u,high:o>e.high?o:e.high,low:ne.close?u-a:u+a,volume:s+e.volume,timestamp:e.timestamp};r=p.open,o=p.close,n=p.close,i=p.close,s=0,e=yield p}else o=o>e.high?o:e.high,n=n{var r=this.generator.next({open:e.open[a],high:e.high[a],low:e.low[a],close:e.close[a],volume:e.volume[a],timestamp:e.timestamp[a]});r.value&&(this.result.open.push(r.value.open),this.result.high.push(r.value.high),this.result.low.push(r.value.low),this.result.close.push(r.value.close),this.result.volume.push(r.value.volume),this.result.timestamp.push(r.value.timestamp))})}nextValue(){return console.error('Cannot calculate next value on Renko, Every value has to be recomputed for every change, use calcualte method'),null}}Fi.calculate=q;class Mi extends Hn{constructor(e){super(e);this.format;this.result=new Bn;let t=null,a=0,r=Infinity,o=0,n=0,i=0;this.generator=function*(){for(let e=yield,s=null;;){if(null==t)t=(e.close+e.open)/2,a=e.high,r=e.low,o=(e.close+e.open+e.high+e.low)/4,n=e.volume||0,i=e.timestamp||0,s={open:t,high:a,low:r,close:o,volume:e.volume||0,timestamp:e.timestamp||0};else{let n=(e.close+e.open+e.high+e.low)/4,i=(t+o)/2,u=An(i,n,e.high),l=Rn(e.low,i,n);s={close:n,open:i,high:u,low:l,volume:e.volume||0,timestamp:e.timestamp||0},o=n,t=i,a=u,r=l}e=yield s}}(),this.generator.next(),e.low.forEach((t,a)=>{var r=this.generator.next({open:e.open[a],high:e.high[a],low:e.low[a],close:e.close[a],volume:e.volume?e.volume[a]:e.volume,timestamp:e.timestamp?e.timestamp[a]:e.timestamp});r.value&&(this.result.open.push(r.value.open),this.result.high.push(r.value.high),this.result.low.push(r.value.low),this.result.close.push(r.value.close),this.result.volume.push(r.value.volume),this.result.timestamp.push(r.value.timestamp))})}nextValue(e){var t=this.generator.next(e).value;return t}}Mi.calculate=U;class Di{constructor(){}approximateEqual(e,t){let a=1*parseFloat(Ln(e-t).toPrecision(4)),r=1*parseFloat((1e-3*e).toPrecision(4));return a<=r}logic(){throw'this has to be implemented'}getAllPatternIndex(e){if(e.close.lengtht.call(this,e)?a:void 0).filter((e)=>e)}hasPattern(e){if(e.close.lengthr<=e.close.length-t);return a}}class Ii extends Di{constructor(){super(),this.name='MorningStar',this.requiredCount=3}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],s=e.high[1],u=e.low[1],l=e.open[2],p=e.close[2],d=e.high[2],c=e.low[2];return au&&o>s&&ss&&i(t+a)/2}}class Ei extends Di{constructor(){super(),this.name='BullishEngulfingPattern',this.requiredCount=2}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],s=e.high[1],u=e.low[1];return an&&a>n&&tn&&au&&r>s}}class Ai extends Di{constructor(){super(),this.requiredCount=2,this.name='BullishHaramiCross'}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],s=e.high[1],u=e.low[1],l=this.approximateEqual(n,i);return t>n&&au&&r>s&&l}}class Li extends Di{constructor(){super(),this.name='Doji',this.requiredCount=1}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=this.approximateEqual(t,a),i=n&&this.approximateEqual(t,r),s=n&&this.approximateEqual(a,o);return n&&i==s}}class ji extends Di{constructor(){super(),this.name='MorningDojiStar',this.requiredCount=3}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],s=e.high[1],u=e.low[1],l=e.open[2],p=e.close[2],d=e.high[2],c=e.low[2],h=new Li().hasPattern({open:[n],close:[i],high:[s],low:[u]});return as&&i(t+a)/2}}class zi extends Di{constructor(){super(),this.requiredCount=3,this.name='DownsideTasukiGap'}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],s=e.high[1],u=e.low[1],l=e.open[2],p=e.close[2],d=e.high[2],c=e.low[2];return al&&sl&&in&&pn&&i>(t+a)/2&&i>n}}class qi extends Di{constructor(){super(),this.name='ThreeWhiteSoldiers',this.requiredCount=3}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],s=e.high[1],u=e.low[1],l=e.open[2],p=e.close[2],d=e.high[2],c=e.low[2];return s>r&&d>s&&tn&&nl&&lt;return n=n&&this.approximateEqual(a,r),n=n&&a-t<=2*(t-o),n}}class Bi extends Di{constructor(){super(),this.name='BullishInvertedHammerStick',this.requiredCount=1}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=a>t;return n=n&&this.approximateEqual(t,o),n=n&&a-t<=2*(r-a),n}}class Ni extends Di{constructor(){super(),this.name='BearishHammerStick',this.requiredCount=1}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=t>a;return n=n&&this.approximateEqual(t,r),n=n&&t-a<=2*(a-o),n}}class Vi extends Di{constructor(){super(),this.name='BearishInvertedHammerStick',this.requiredCount=1}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=t>a;return n=n&&this.approximateEqual(a,o),n=n&&t-a<=2*(r-t),n}}class Hi extends Di{constructor(){super(),this.name='HammerPattern',this.requiredCount=5}logic(e){let t=this.downwardTrend(e);return t=t&&this.includesHammer(e),t=t&&this.hasConfirmation(e),t}downwardTrend(e,t=!0){let a=t?3:4,r=p({values:e.close.slice(0,a),period:a-1}),o=d({values:e.close.slice(0,a),period:a-1});return o>r}includesHammer(e,t=!0){let a=t?3:4,r=t?4:void 0,o={open:e.open.slice(a,r),close:e.close.slice(a,r),low:e.low.slice(a,r),high:e.high.slice(a,r)},n=ee(o);return n=n||te(o),n=n||Y(o),n=n||J(o),n}hasConfirmation(e){let t={open:e.open[3],close:e.close[3],low:e.low[3],high:e.high[3]},a={open:e.open[4],close:e.close[4],low:e.low[4],high:e.high[4]},r=a.opent}}let $i=[new Ei,new zi,new Ri,new Ai,new ji,new Ii,new Gi,new Oi,new qi,new Ui,new Bi,new Hi,new Wi,new Xi];class Ki extends Di{constructor(){super(),this.name='Bullish Candlesticks'}hasPattern(e){return $i.reduce(function(t,a){let r=a.hasPattern(e);return t||r},!1)}}class Zi extends Di{constructor(){super(),this.name='BearishEngulfingPattern',this.requiredCount=2}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],s=e.high[1],u=e.low[1];return a>t&&ti}}class Qi extends Di{constructor(){super(),this.requiredCount=2,this.name='BearishHarami'}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],s=e.high[1],u=e.low[1];return tn&&a>i&&ts}}class Yi extends Di{constructor(){super(),this.requiredCount=2,this.name='BearishHaramiCross'}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],s=e.high[1],u=e.low[1],l=this.approximateEqual(n,i);return tn&&a>i&&ts&&l}}class Ji extends Di{constructor(){super(),this.name='EveningDojiStar',this.requiredCount=3}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],s=e.high[1],u=e.low[1],l=e.open[2],p=e.close[2],d=e.high[2],c=e.low[2],h=new Li().hasPattern({open:[n],close:[i],high:[s],low:[u]});return a>t&&h&&s>r&&u>r&&ll&&l>p&&p<(t+a)/2}}class es extends Di{constructor(){super(),this.name='EveningStar',this.requiredCount=3}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],s=e.high[1],u=e.low[1],l=e.open[2],p=e.close[2],d=e.high[2],c=e.low[2];return a>t&&rr&&u>r&&ll&&l>p&&p<(t+a)/2}}class ts extends Di{constructor(){super(),this.name='BearishMarubozu',this.requiredCount=1}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=this.approximateEqual(t,r)&&this.approximateEqual(o,a)&&t>a&&t>o;return n}}class as extends Di{constructor(){super(),this.name='ThreeBlackCrows',this.requiredCount=3}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],s=e.high[1],u=e.low[1],l=e.open[2],p=e.close[2],d=e.high[2],c=e.low[2];return o>u&&u>c&&t>a&&n>i&&l>p&&t>n&&n>a&&n>l&&l>i}}class rs extends Di{constructor(){super(),this.name='HangingMan',this.requiredCount=5}logic(e){let t=this.upwardTrend(e);return t=t&&this.includesHammer(e),t=t&&this.hasConfirmation(e),t}upwardTrend(e,t=!0){let a=t?3:4,r=p({values:e.close.slice(0,a),period:a-1}),o=d({values:e.close.slice(0,a),period:a-1});return r>o}includesHammer(e,t=!0){let a=t?3:4,r=t?4:void 0,o={open:e.open.slice(a,r),close:e.close.slice(a,r),low:e.low.slice(a,r),high:e.high.slice(a,r)},n=ee(o);return n=n||Y(o),n}hasConfirmation(e){let t={open:e.open[3],close:e.close[3],low:e.low[3],high:e.high[3]},a={open:e.open[4],close:e.close[4],low:e.low[4],high:e.high[4]},r=a.open>a.close;return r&&t.close>a.close}}class os extends rs{constructor(){super(),this.name='HangingManUnconfirmed'}logic(e){let t=this.upwardTrend(e,!1);return t=t&&this.includesHammer(e,!1),t}}class ns extends Di{constructor(){super(),this.name='ShootingStar',this.requiredCount=5}logic(e){let t=this.upwardTrend(e);return t=t&&this.includesHammer(e),t=t&&this.hasConfirmation(e),t}upwardTrend(e,t=!0){let a=t?3:4,r=p({values:e.close.slice(0,a),period:a-1}),o=d({values:e.close.slice(0,a),period:a-1});return r>o}includesHammer(e,t=!0){let a=t?3:4,r=t?4:void 0,o={open:e.open.slice(a,r),close:e.close.slice(a,r),low:e.low.slice(a,r),high:e.high.slice(a,r)},n=te(o);return n=n||J(o),n}hasConfirmation(e){let t={open:e.open[3],close:e.close[3],low:e.low[3],high:e.high[3]},a={open:e.open[4],close:e.close[4],low:e.low[4],high:e.high[4]},r=a.open>a.close;return r&&t.close>a.close}}class is extends ns{constructor(){super(),this.name='ShootingStarUnconfirmed'}logic(e){let t=this.upwardTrend(e,!1);return t=t&&this.includesHammer(e,!1),t}}class ss extends Di{constructor(){super(),this.name='TweezerTop',this.requiredCount=5}logic(e){return this.upwardTrend(e)&&e.high[3]==e.high[4]}upwardTrend(e){let t=p({values:e.close.slice(0,3),period:2}),a=d({values:e.close.slice(0,3),period:2});return t>a}}let us=[new Zi,new Qi,new Yi,new Ji,new es,new ts,new as,new Ni,new Vi,new rs,new os,new ns,new is,new ss];class ls extends Di{constructor(){super(),this.name='Bearish Candlesticks'}hasPattern(e){return us.reduce(function(t,a){return t||a.hasPattern(e)},!1)}}class ps extends Di{constructor(){super(),this.name='AbandonedBaby',this.requiredCount=3}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],s=e.high[1],u=e.low[1],l=e.open[2],p=e.close[2],d=e.high[2],c=e.low[2],h=new Li().hasPattern({open:[n],close:[i],high:[s],low:[u]});return as&&p>l&&dt&&ir&&i<(a+t)/2&&i>t}}class cs extends Di{constructor(){super(),this.requiredCount=1,this.name='DragonFlyDoji'}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=this.approximateEqual(t,a),i=n&&this.approximateEqual(t,r),s=n&&this.approximateEqual(a,o);return n&&i&&!s}}class hs extends Di{constructor(){super(),this.requiredCount=1,this.name='GraveStoneDoji'}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=this.approximateEqual(t,a),i=n&&this.approximateEqual(t,r),s=n&&this.approximateEqual(a,o);return n&&s&&!i}}class gs extends Di{constructor(){super(),this.name='BullishSpinningTop',this.requiredCount=1}logic(e){let t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=Ln(a-t),i=Ln(r-a),s=Ln(t-o);return nt&&(t=An(0,t+e.length)),e[t]}var i=e('./util'),s=i.canEvaluate,u=i.isIdentifier,l;t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(r,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t;if(!!('number'==typeof e))t=n;else if(s){var a=l(e);t=null===a?o:a}else t=o;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t){t.exports=function(t,a,r,o){var n=e('./util'),i=n.tryCatch,s=n.errorObj,u=t._async;t.prototype['break']=t.prototype.cancel=function(){if(!o.cancellation())return this._warn('cancellation is disabled');for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var a=e._cancellationParent;if(null==a||!a._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}else e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=a}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===void 0||0>=this._branchesRemainingToCancel},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):!(this._branchHasCancelled(),!this._enoughBranchesHaveCancelled())&&(this._invokeOnCancel(),!0)},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),u.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){0, no stack trace)'}function w(e){var t=41;return e.lengthe)){for(var t=[],a={},r=0,o=this;void 0!==o;++r)t.push(o),o=o._parent;e=this._length=r;for(var r=e-1,n;0<=r;--r)n=t[r].stack,void 0===a[n]&&(a[n]=r);for(var r=0;ro||0>n||!i||!u||i!==u||o>=n||(Y=function(e){if(R.test(e))return!0;var t=C(e);return t&&t.fileName===i&&o<=t.line&&t.line<=n})}},warn:g,deprecated:function(e,t){var a=e+' is deprecated and will be removed in a future version.';return t&&(a+=' Use '+t+' instead.'),g(a)},CapturedTrace:k,fireDomEvent:X,fireGlobalEvent:$}}},{"./errors":12,"./util":36}],10:[function(e,t){t.exports=function(e){function t(){return this.value}function a(){throw this.reason}e.prototype['return']=e.prototype.thenReturn=function(a){return a instanceof e&&a.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:a},void 0)},e.prototype['throw']=e.prototype.thenThrow=function(e){return this._then(a,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(1>=arguments.length)return this._then(void 0,a,void 0,{reason:e},void 0);var t=arguments[1];return this.caught(e,function(){throw t})},e.prototype.catchReturn=function(a){if(1>=arguments.length)return a instanceof e&&a.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:a},void 0);var r=arguments[1];r instanceof e&&r.suppressUnhandledRejections();return this.caught(a,function(){return r})}}},{}],11:[function(e,t){t.exports=function(e,t){function a(){return o(this)}var r=e.reduce,o=e.all;e.prototype.each=function(e){return r(this,e,t,0)._then(a,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return r(this,e,t,t)},e.each=function(e,o){return r(e,o,t,0)._then(a,void 0,void 0,e,void 0)},e.mapSeries=function(e,a){return r(e,a,t,t)}}},{}],12:[function(e,t){function a(e,t){function a(r){return this instanceof a?void(l(this,'message','string'==typeof r?r:t),l(this,'name',e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)):new a(r)}return u(a,Error),a}function r(e){return this instanceof r?void(l(this,'name','OperationalError'),l(this,'message',e),this.cause=e,this.isOperational=!0,e instanceof Error?(l(this,'message',e.message),l(this,'stack',e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)):new r(e)}var o=e('./es5'),n=o.freeze,s=e('./util'),u=s.inherits,l=s.notEnumerableProp,p=a('Warning','warning'),d=a('CancellationError','cancellation error'),c=a('TimeoutError','timeout error'),h=a('AggregateError','aggregate error'),g,m;try{g=TypeError,m=RangeError}catch(t){g=a('TypeError','type error'),m=a('RangeError','range error')}for(var f='join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse'.split(' '),_=0;_a)){if(1<=u&&this._inFlight>=u)return r[a]=e,this._queue.push(a),!1;null!==s&&(s[a]=e);var l=this._promise,p=this._callback,h=l._boundValue();l._pushContext();var g=d(p).call(h,e,a,n),m=l._popContext();if(i.checkForgottenReturns(g,m,null===s?'Promise.map':'Promise.filter',l),g===c)return this._reject(g.e),!0;var f=o(g,this._promise);if(f instanceof t){f=f._target();var _=f._bitField;if(0==(50397184&_))return 1<=u&&this._inFlight++,r[a]=f,f._proxy(this,-1*(a+1)),!1;if(0!=(33554432&_))g=f._value();else return 0==(16777216&_)?(this._cancel(),!0):(this._reject(f._reason()),!0)}r[a]=g}else if(a=-1*a-1,r[a]=e,1<=u&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0;var x=++this._totalResolved;return!!(x>=n)&&(null===s?this._resolve(r):this._filter(r,s),!0)},s.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,a=this._values;0>>16)){if(e===this){var a=u();return this._attachExtraTrace(a),this._reject(a)}this._setFulfilled(),this._rejectionHandler0=e,0<(65535&t)&&(0==(134217728&t)?f.settlePromises(this):this._settlePromises())}},o.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16))return this._setRejected(),this._fulfillmentHandler0=e,this._isFinal()?f.fatalError(e,c.isNode):void(0<(65535&t)?f.settlePromises(this):this._ensurePossibleRejectionHandled())},o.prototype._fulfillPromises=function(e,t){for(var a=1;a=this._length)&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var a=0;a=this._length){var r;if(this._isMap)r=c(this._values);else{r={};for(var o=this.length(),n=0,i=this.length();n>1},t.prototype.props=function(){return i(this)},t.props=function(e){return i(e)}}},{"./es5":13,"./util":36}],26:[function(e,t){function a(e,t,a,r,o){for(var n=0;n=this._length)&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(e,t){var a=new n;return a._bitField=33554432,a._settledValueField=e,this._promiseResolved(t,a)},o.prototype._promiseRejected=function(e,t){var a=new n;return a._bitField=16777216,a._settledValueField=e,this._promiseResolved(t,a)},t.settle=function(e){return r.deprecated('.settle()','.reflect()'),new o(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t){t.exports=function(t,a,r){function o(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function n(e,t){if((0|t)!==t||0>t)return r('expecting a positive integer\n\n See http://goo.gl/MqrFmX\n');var a=new o(e),n=a.promise();return a.setHowMany(t),a.init(),n}var i=e('./util'),s=e('./errors').RangeError,u=e('./errors').AggregateError,l=i.isArray,p={};i.inherits(o,a),o.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var e=l(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},o.prototype.init=function(){this._initialized=!0,this._init()},o.prototype.setUnwrap=function(){this._unwrap=!0},o.prototype.howMany=function(){return this._howMany},o.prototype.setHowMany=function(e){this._howMany=e},o.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},o.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},o.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(p),this._checkOutcome())},o.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new u,e=this.length();e=l)return p._fulfill();var n=u(e[s++]);if(n instanceof t&&n._isDisposable()){try{n=r(n._getDisposer().tryDispose(a),e.promise)}catch(t){return i(t)}if(n instanceof t)return n._then(o,i,null,null,null)}o()}var s=0,l=e.length,p=new t(n);return o(),p}function p(e,t,a){this._data=e,this._promise=t,this._context=a}function d(e,t,a){this.constructor$(e,t,a)}function c(e){return p.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function h(e){this.length=e,this.promise=null,this[e-1]=null}var g=e('./util'),m=e('./errors').TypeError,f=e('./util').inherits,_=g.errorObj,x=g.tryCatch,y={};p.prototype.data=function(){return this._data},p.prototype.promise=function(){return this._promise},p.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():y},p.prototype.tryDispose=function(e){var t=this.resource(),a=this._context;void 0!==a&&a._pushContext();var r=t===y?null:this.doDispose(t,e);return void 0!==a&&a._popContext(),this._promise._unsetDisposable(),this._data=null,r},p.isDisposer=function(e){return null!=e&&'function'==typeof e.resource&&'function'==typeof e.tryDispose},f(d,p),d.prototype.doDispose=function(e,t){var a=this.data();return a.call(e,e,t)},h.prototype._resultCancelled=function(){for(var e=this.length,a=0,r;ae)return a('you must pass at least 2 arguments to Promise.using');var o=arguments[e-1];if('function'!=typeof o)return a('expecting a function but got '+g.classString(o));var n=!0,u;2===e&&Array.isArray(arguments[0])?(u=arguments[0],e=u.length,n=!1):(u=arguments,e--);for(var d=new h(e),m=0,f;me}};Ih.headers={common:{Accept:'application/json, text/plain, */*'}},fh.forEach(['delete','get','head'],function(e){Ih.headers[e]={}}),fh.forEach(['post','put','patch'],function(e){Ih.headers[e]=fh.merge(Dh)});var Eh=Ih;gr.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},gr.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},gr.prototype.forEach=function(e){fh.forEach(this.handlers,function(t){null!==t&&e(t)})};var Rh=gr,Ah=function(e,t,a){return fh.forEach(a,function(a){e=a(e,t)}),e},Lh=function(e){return!!(e&&e.__CANCEL__)},jh=function(e){return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)},zh=function(e,t){return t?e.replace(/\/+$/,'')+'/'+t.replace(/^\/+/,''):e},Gh=function(e){mr(e),e.baseURL&&!jh(e.url)&&(e.url=zh(e.baseURL,e.url)),e.headers=e.headers||{},e.data=Ah(e.data,e.headers,e.transformRequest),e.headers=fh.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),fh.forEach(['delete','get','head','post','put','patch','common'],function(t){delete e.headers[t]});var t=e.adapter||Eh.adapter;return t(e).then(function(t){return mr(e),t.data=Ah(t.data,t.headers,e.transformResponse),t},function(t){return Lh(t)||(mr(e),t&&t.response&&(t.response.data=Ah(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})};fr.prototype.request=function(e){'string'==typeof e&&(e=fh.merge({url:arguments[0]},arguments[1])),e=fh.merge(Eh,this.defaults,{method:'get'},e),e.method=e.method.toLowerCase();var t=[Gh,void 0],a=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)a=a.then(t.shift(),t.shift());return a},fh.forEach(['delete','get','head','options'],function(e){fr.prototype[e]=function(t,a){return this.request(fh.merge(a||{},{method:e,url:t}))}}),fh.forEach(['post','put','patch'],function(e){fr.prototype[e]=function(t,a,r){return this.request(fh.merge(r||{},{method:e,url:t,data:a}))}});var Oh=fr;_r.prototype.toString=function(){return'Cancel'+(this.message?': '+this.message:'')},_r.prototype.__CANCEL__=!0;var qh=_r;xr.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},xr.source=function(){var e=new xr(function(e){t=e}),t;return{token:e,cancel:t}};var Uh=xr,Bh=function(e){return function(t){return e.apply(null,t)}},Nh=yr(Eh);Nh.Axios=Oh,Nh.create=function(e){return yr(fh.merge(Eh,e))},Nh.Cancel=qh,Nh.CancelToken=Uh,Nh.isCancel=Lh,Nh.all=function(e){return Promise.all(e)},Nh.spread=Bh;var Vh=Nh,Hh=Nh;Vh.default=Hh;var Wh=Vh,Xh=ke(function(e){(function(){var t,a,r,o,n,i;'undefined'!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:'undefined'!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-n)/1e6},a=process.hrtime,t=function(){var e;return e=a(),1e9*e[0]+e[1]},o=t(),i=1e9*process.uptime(),n=o-i):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(fs)}),$h=ke(function(e){function t(){}function a(e,t,a){this.fn=e,this.context=t,this.once=a||!1}function r(e,t,r,o,n){if('function'!=typeof r)throw new TypeError('The listener must be a function');var i=new a(r,o||e,n),u=s?s+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],i]:e._events[u].push(i):(e._events[u]=i,e._eventsCount++),e}function o(e,a){0==--e._eventsCount?e._events=new t:delete e._events[a]}function n(){this._events=new t,this._eventsCount=0}var i=Object.prototype.hasOwnProperty,s='~';Object.create&&(t.prototype=Object.create(null),!new t().__proto__&&(s=!1)),n.prototype.eventNames=function(){var e=[],t,a;if(0===this._eventsCount)return e;for(a in t=this._events)i.call(t,a)&&e.push(s?a.slice(1):a);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},n.prototype.listeners=function(e){var t=s?s+e:e,a=this._events[t];if(!a)return[];if(a.fn)return[a.fn];for(var r=0,o=a.length,n=Array(o);r{const n=a.getUniformLocation(e,o);'float'===r?a.uniform1f(n,t):('int'===r||'bool'===r)&&a.uniform1i(n,t)})}bindInputTextures(e,t,a){const r=this.context;t.forEach(({input:t,name:o},n)=>{if(r.activeTexture(r.TEXTURE0+n),!t.glTextureFragments){const{textureTarget:e}=this.getWebGLTextureOptions(t.glTextureType,t.glTextureFormat);r.bindTexture(e,t.glTexture)}else if(t.glTextureFragmentsAsColStack){const{textureTarget:e}=this.getWebGLTextureOptions(t.glTextureType,t.glTextureFormat);r.bindTexture(e,t.glTextureFragmentsAsColStack)}else{const{textureTarget:e}=this.getWebGLTextureOptions(t.glTextureType,t.glTextureFormat);r.bindTexture(e,t.glTextureFragments[a])}r.uniform1i(r.getUniformLocation(e,o),n)})}bindOutputTexture(e,t){const a=this.context;a.viewport(0,0,t[1],t[0]),this.framebuffer=this.framebuffer||a.createFramebuffer(),a.bindFramebuffer(a.FRAMEBUFFER,this.framebuffer),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,e,0)}runProgram({program:e,output:t,inputs:a,uniforms:r,supportsTextureFragments:o=!1}){if(!e)throw new Error('[WebGL2] missing program');if(!t)throw new Error('[WebGL2] missing output');if(!a)throw new Error('[WebGL2] missing inputs');const n=this.context;if(this.selectProgram(e),r&&Array.isArray(r)&&this.bindUniforms(e,r),t.glTextureFragments){if(!o)throw new Error('[WebGL2] program does not support texture fragments');const r=a.filter((e)=>e.input.glTextureFragments&&!e.input.glTextureFragmentsAsColStack),i=t.glTextureFragments.length;if(r.some((e)=>e.input.glTextureFragments.length!==i))throw new Error('[WebGL2] number of texture fragments in inputs and output do not match');for(let r=0;re.deleteTexture(t)),this._refs.buffers.forEach((t)=>e.deleteBuffer(t)),this._refs={textures:[],buffers:[]}}};t.webgl2=a;const r=a.MAX_TEXTURE_SIZE;t.MAX_TEXTURE_SIZE=r;const o=a.MAX_TEXTURE_IMAGE_UNITS;t.MAX_TEXTURE_IMAGE_UNITS=o});Ce(Kh);var Zh=ke(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;t.default=class{constructor(e={}){this.layerClass='Layer',this.name=e.name,this.description='',this.gpu=Kh.webgl2.isSupported&&e.gpu,this.params=[],this.weights={},this.inbound=[],this.outbound=[]}throwError(e){throw new Error(`[${this.layerClass} layer: ${this.name||''}] ${e}`)}toggleGPU(e){const t='undefined'==typeof e?!this.gpu:e;this.gpu=Kh.webgl2.isSupported&&t}setWeights(e,t=!0){this.params.forEach((a,r)=>{this.weights[a]=e[r],this.gpu&&t&&this.weights[a].createGLTexture({type:'2d',format:'float'})})}call(e){return this.output=e,this.output}}});Ce(Zh);var Qh=In,Yh=An,Jh=vr,eg=br,tg=eg(),ag=tg,rg=Sr,og='undefined'!=typeof Float64Array,ng={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]},ig=kr,sg=Dr,ug=jr,lg=zr,pg=Or,dg=ke(function(e,t){function a(e){if(!e)return n;for(var t=0,r;t>',rrshift:'>>>'};(function(){for(var e in i){var a=i[e];t[e]=o({args:['array','array','array'],body:{args:['a','b','c'],body:'a=b'+a+'c'},funcName:e}),t[e+'eq']=o({args:['array','array'],body:{args:['a','b'],body:'a'+a+'=b'},rvalue:!0,funcName:e+'eq'}),t[e+'s']=o({args:['array','array','scalar'],body:{args:['a','b','s'],body:'a=b'+a+'s'},funcName:e+'s'}),t[e+'seq']=o({args:['array','scalar'],body:{args:['a','s'],body:'a'+a+'=s'},rvalue:!0,funcName:e+'seq'})}})();var s={not:'!',bnot:'~',neg:'-',recip:'1.0/'};(function(){for(var e in s){var a=s[e];t[e]=o({args:['array','array'],body:{args:['a','b'],body:'a='+a+'b'},funcName:e}),t[e+'eq']=o({args:['array'],body:{args:['a'],body:'a='+a+'a'},rvalue:!0,count:2,funcName:e+'eq'})}})();var u={and:'&&',or:'||',eq:'===',neq:'!==',lt:'<',gt:'>',leq:'<=',geq:'>='};(function(){for(var e in u){var a=u[e];t[e]=o({args:['array','array','array'],body:{args:['a','b','c'],body:'a=b'+a+'c'},funcName:e}),t[e+'s']=o({args:['array','array','scalar'],body:{args:['a','b','s'],body:'a=b'+a+'s'},funcName:e+'s'}),t[e+'eq']=o({args:['array','array'],body:{args:['a','b'],body:'a=a'+a+'b'},rvalue:!0,count:2,funcName:e+'eq'}),t[e+'seq']=o({args:['array','scalar'],body:{args:['a','s'],body:'a=a'+a+'s'},rvalue:!0,count:2,funcName:e+'seq'})}})();var l=['abs','acos','asin','atan','ceil','cos','exp','floor','log','round','sin','sqrt','tan'];(function(){for(var e=0,a;ethis_s){this_s=-a}else if(a>this_s){this_s=a}',localVars:[],thisVars:['this_s']},post:{args:[],localVars:[],thisVars:['this_s'],body:'return this_s'},funcName:'norminf'}),t.norm1=pg({args:['array'],pre:{args:[],localVars:[],thisVars:['this_s'],body:'this_s=0'},body:{args:[{name:'a',lvalue:!1,rvalue:!0,count:3}],body:'this_s+=a<0?-a:a',localVars:[],thisVars:['this_s']},post:{args:[],localVars:[],thisVars:['this_s'],body:'return this_s'},funcName:'norm1'}),t.sup=pg({args:['array'],pre:{body:'this_h=-Infinity',args:[],thisVars:['this_h'],localVars:[]},body:{body:'if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_',args:[{name:'_inline_1_arg0_',lvalue:!1,rvalue:!0,count:2}],thisVars:['this_h'],localVars:[]},post:{body:'return this_h',args:[],thisVars:['this_h'],localVars:[]}}),t.inf=pg({args:['array'],pre:{body:'this_h=Infinity',args:[],thisVars:['this_h'],localVars:[]},body:{body:'if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}',args:[{name:'_inline_1_arg0_',lvalue:!1,rvalue:!0,count:2},{name:'_inline_1_arg1_',lvalue:!1,rvalue:!0,count:2}],thisVars:['this_i','this_v'],localVars:['_inline_1_k']},post:{body:'{return this_i}',args:[],thisVars:['this_i'],localVars:[]}}),t.random=o({args:['array'],pre:{args:[],body:'this_f=Math.random',thisVars:['this_f']},body:{args:['a'],body:'a=this_f()',thisVars:['this_f']},funcName:'random'}),t.assign=o({args:['array','array'],body:{args:['a','b'],body:'a=b'},funcName:'assign'}),t.assigns=o({args:['array','scalar'],body:{args:['a','b'],body:'a=b'},funcName:'assigns'}),t.equals=pg({args:['array','array'],pre:n,body:{args:[{name:'x',lvalue:!1,rvalue:!0,count:1},{name:'y',lvalue:!1,rvalue:!0,count:1}],body:'if(x!==y){return false}',localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:'return true'},funcName:'equals'})}),cg=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.checkShape=function(e,t){if(e.length&&t.length&&e.length!==t.reduce((e,t)=>e*t,1))throw new Error('[Tensor] specified shape incompatible with data.')},t.data3DLayoutForGL=function(e,t,a){const r=new e(t.data.length),n=(0,o.default)(new e(a[0]*a[1]),[a[0],a[1]]);let u=0;for(let o=0;oe*t,1),i=(0,o.default)(new Int32Array(n),e);if(t){const e=In(jn(n)),t=(0,o.default)(new Int32Array(e**2),[e,e]),a=(0,o.default)(new Int32Array(e**2),[e,e]),r=(0,o.default)(new Int32Array(e**2),[e,e]);for(let a=0;aa&&(a=e.length+a);const t=e[a],u=(0,o.default)(new Int32Array(n),e),l=(0,o.default)(new Int32Array(n),e),p=[...e.slice(0,a),...e.slice(a+1)],d=p.reduce((e,t)=>e*t,1),c=(0,o.default)(new Int32Array((0,r.default)(d)),p),h=Array(e.length).fill(null);for(let e=0;ee*t,1)),t):this.tensor=(0,o.default)(new this.arrayType([]),[])}createGLTexture({type:e='2d',format:t='float',supportsTextureFragments:a=!1}){let r=[];if(1===this.tensor.shape.length)r=[1,this.tensor.shape[0]],this.is1D=!0;else if(2===this.tensor.shape.length)r=this.tensor.shape;else if(3===this.tensor.shape.length&&('2d_array'===e||'3d'===e))r=this.tensor.shape;else throw new Error('[Tensor] cannot create WebGL2 texture.');if(this.glTextureShape=r,this.glTextureType=e,this.glTextureFormat=t,'2d'===e)this.glTextureShape[0]>Kh.MAX_TEXTURE_SIZE&&a?this._create2DRowFragmentedGLTexture():this._create2DGLTexture();else if('2d_array'===e||'3d'===e)this._create3DGLTexture();else throw new Error(`[Tensor] invalid type ${e}.`)}_create2DGLTexture(){const e=Kh.webgl2.context,t=Kh.webgl2.getWebGLTextureOptions(this.glTextureType,this.glTextureFormat),{textureTarget:a,textureInternalFormat:r,textureFormat:o,textureType:n}=t;this.glTexture=e.createTexture(),Kh.webgl2.storeRef('texture',this.glTexture),e.bindTexture(a,this.glTexture);const i=this.glTextureShape,s=this.tensor.data;e.texImage2D(a,0,r,i[1],i[0],0,o,n,s),e.texParameteri(a,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(a,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(a,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(a,e.TEXTURE_MIN_FILTER,e.NEAREST)}_create2DRowFragmentedGLTexture(){const e=Kh.webgl2.context,t=Kh.webgl2.getWebGLTextureOptions(this.glTextureType,this.glTextureFormat),{textureTarget:a,textureInternalFormat:r,textureFormat:o,textureType:n}=t;this.glTextureFragments=[],this.glTextureFragmentShape=[Kh.MAX_TEXTURE_SIZE,this.glTextureShape[1]];const i=this.glTextureFragmentShape,s=In(this.glTextureShape[0]/Kh.MAX_TEXTURE_SIZE);let u=0;for(let t=0;te*t,1));e.texImage2D(a,0,r,i[1],i[0],0,o,n,s),e.texParameteri(a,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(a,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(a,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(a,e.TEXTURE_MIN_FILTER,e.NEAREST)}else e.bindTexture(a,this.glTextureFragmentsAsColStack);const i=e.createFramebuffer();e.bindFramebuffer(e.READ_FRAMEBUFFER,i),this.glTextureFragments.forEach((t,r)=>{e.framebufferTexture2D(e.READ_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),e.copyTexSubImage2D(a,0,r*this.glTextureFragmentShape[1],0,0,0,this.glTextureFragmentShape[1],this.glTextureFragmentShape[0])}),e.deleteFramebuffer(i)}removeGLTextureFragmentsAsColStack(){if(this.glTextureFragmentsAsColStack){const e=Kh.webgl2.context;e.deleteTexture(this.glTextureFragmentsAsColStack),delete this.glTextureFragmentsAsColStack,delete this.glTextureFragmentsAsColStackShape}}deleteGLTexture(){const e=Kh.webgl2.context;this.glTexture&&(e.deleteTexture(this.glTexture),delete this.glTexture),this.glTextureFragments&&(this.glTextureFragments.forEach((t)=>{e.deleteTexture(t)}),delete this.glTextureFragments)}replaceTensorData(e){if(e&&e.length&&e instanceof this.arrayType)this.tensor.data.set(e);else if(e&&e.length&&e instanceof Array)this.tensor.data.set(new this.arrayType(e));else throw new Error('[Tensor] invalid input for replaceTensorData method.');if(this.glTexture){const e=Kh.webgl2.context,t=Kh.webgl2.getWebGLTextureOptions(this.glTextureType,this.glTextureFormat),{textureTarget:a,textureFormat:o,textureType:n}=t;e.bindTexture(a,this.glTexture);const i=this.glTextureShape;if('2d'===this.glTextureType){const t=this.tensor.data;e.texSubImage2D(a,0,0,0,i[1],i[0],o,n,t,0)}else if('2d_array'===this.glTextureType||'3d'===this.glTextureType){const t=r.data3DLayoutForGL(this.arrayType,this.tensor,i);e.texSubImage3D(a,0,0,0,0,i[1],i[0],i[2],o,n,t,0)}}}transferFromGLTexture(){if(this.glTextureFragments){this.tensor=(0,o.default)(new this.arrayType(this.glTextureShape[0]*this.glTextureShape[1]),this.glTextureShape);let e=0;for(let t=0;te*t,1),s=(0,o.default)(new this.arrayType(n*t),[n,t]),u=(0,o.default)(new this.arrayType(n),a),l=(0,o.default)(new this.arrayType(n),[n]),p=Array(this.tensor.shape.length).fill(null);for(let a=0;ae&&(e=this.originalShape.length+e);const t=this.tensor.shape[0],a=this.tensor.shape[1],r=(0,o.default)(new this.arrayType(this.originalShape.reduce((e,t)=>e*t,1)),this.originalShape),s=(0,o.default)(new this.arrayType(t),[t]),n=[...this.originalShape.slice(0,e),...this.originalShape.slice(e+1)],u=(0,o.default)(new this.arrayType(n.reduce((e,t)=>e*t,1)),n),l=Array(this.originalShape.length).fill(null);for(let t=0;te*t,1),t=(0,o.default)(new this.arrayType(e),this.originalShape);t.data.set(this.tensor.data.subarray(0,e)),this.tensor=t}}});Ce(gg);var mg=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(xd),o=a(Zh),n=a(gg);class i extends o.default{constructor(e={}){super(e),this.layerClass='InputLayer';const{shape:t=[]}=e;this.shape=e.batch_input_shape&&e.batch_input_shape.length?e.batch_input_shape.slice(1):t,this.description=`shape: ${JSON.stringify(this.shape)}`}call(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}_callCPU(e){this.inputShape=e.tensor.shape,(0,r.default)(this.inputShape,this.shape)||this.throwError(`input tensor shape ${e.tensor.shape} does not match specified shape ${this.shape}.`),this.output=new n.default(e.tensor.data,e.tensor.shape)}_callGPU(e){this.inputShape=e.glTexture||e.glTextureFragments?e.is2DReshaped||e.is2DSquareReshaped?e.originalShape:e.tensor.shape:e.tensor.shape,(0,r.default)(this.inputShape,this.shape)||this.throwError(`input tensor shape ${e.tensor.shape} does not match specified shape ${this.shape}.`),e.glTexture||(2>=e.tensor.shape.length?e.createGLTexture({type:'2d',format:'float',supportsTextureFragments:!0}):2=e}function r(e){return 0<='0123456789abcdefABCDEF'.indexOf(e)}function o(e){return 0<='01234567'.indexOf(e)}function n(e){return 32===e||9===e||11===e||12===e||160===e||5760<=e&&0<=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)}function i(e){return 10===e||13===e||8232===e||8233===e}function s(e){return 36===e||95===e||65<=e&&90>=e||97<=e&&122>=e||92===e||128<=e&&rt.NonAsciiIdentifierStart.test(Dn(e))}function u(e){return 36===e||95===e||65<=e&&90>=e||97<=e&&122>=e||48<=e&&57>=e||92===e||128<=e&&rt.NonAsciiIdentifierPart.test(Dn(e))}function l(e){return'class'===e||'enum'===e||'export'===e||'extends'===e||'import'===e||'super'===e}function p(e){return'implements'===e||'interface'===e||'package'===e||'private'===e||'protected'===e||'public'===e||'static'===e||'yield'===e||'let'===e}function d(e){return'eval'===e||'arguments'===e}function c(e){if(it&&p(e))return!0;switch(e.length){case 2:return'if'===e||'in'===e||'do'===e;case 3:return'var'===e||'for'===e||'new'===e||'try'===e||'let'===e;case 4:return'this'===e||'else'===e||'case'===e||'void'===e||'with'===e||'enum'===e;case 5:return'while'===e||'break'===e||'catch'===e||'throw'===e||'const'===e||'yield'===e||'class'===e||'super'===e;case 6:return'return'===e||'typeof'===e||'delete'===e||'switch'===e||'export'===e||'import'===e;case 7:return'default'===e||'finally'===e||'extends'===e;case 8:return'function'===e||'continue'===e||'debugger'===e;case 10:return'instanceof'===e;default:return!1;}}function h(e,a,r,o,n){var i;t('number'==typeof r,'Comment must have valid position');ht.lastCommentStart>=r||(ht.lastCommentStart=r,i={type:e,value:a},gt.range&&(i.range=[r,o]),gt.loc&&(i.loc=n),gt.comments.push(i),gt.attachComment&&(gt.leadingComments.push(i),gt.trailingComments.push(i)))}function g(e){var t,a,r,o;for(t=st-e,a={start:{line:ut,column:st-lt-e}};st=pt&&U({},at.UnexpectedToken,'ILLEGAL');else if(42===a){if(47===nt.charCodeAt(st+1))return++st,++st,void(gt.comments&&(r=nt.slice(e+2,st-2),t.end={line:ut,column:st-lt},h('Block',r,e,st,t)));++st}else++st;U({},at.UnexpectedToken,'ILLEGAL')}function f(){var e,t;for(t=0===st;st>>='===i)?(st+=4,{type:Qe.Punctuator,value:i,lineNumber:ut,lineStart:lt,start:e,end:st}):(n=i.substr(0,3),'>>>'===n||'<<='===n||'>>='===n)?(st+=3,{type:Qe.Punctuator,value:n,lineNumber:ut,lineStart:lt,start:e,end:st}):(o=n.substr(0,2),a===o[1]&&0<='+-<>&|'.indexOf(a)||'=>'===o?(st+=2,{type:Qe.Punctuator,value:o,lineNumber:ut,lineStart:lt,start:e,end:st}):0<='<>=!+-*%&|^/'.indexOf(a)?(++st,{type:Qe.Punctuator,value:a,lineNumber:ut,lineStart:lt,start:e,end:st}):void U({},at.UnexpectedToken,'ILLEGAL'))}function S(e){for(var t='';st=pt)?{type:Qe.EOF,lineNumber:ut,lineStart:lt,start:st,end:st}:(e=nt.charCodeAt(st),s(e)?v():40===e||41===e||59===e?b():39===e||34===e?C():46===e?a(nt.charCodeAt(st+1))?P():b():a(e)?P():gt.tokenize&&47===e?R():b())}function L(){var e,t,a;return f(),e={start:{line:ut,column:st-lt}},t=A(),e.end={line:ut,column:st-lt},t.type!==Qe.EOF&&(a=nt.slice(t.start,t.end),gt.tokens.push({type:Ye[t.type],value:a,range:[t.start,t.end],loc:e})),t}function j(){var e;return e=ct,st=e.end,ut=e.lineNumber,lt=e.lineStart,ct='undefined'==typeof gt.tokens?A():L(),st=e.end,ut=e.lineNumber,lt=e.lineStart,e}function z(){var e,t,a;e=st,t=ut,a=lt,ct='undefined'==typeof gt.tokens?A():L(),st=e,ut=t,lt=a}function G(e,t){this.line=e,this.column=t}function O(e,t,a,r){this.start=new G(e,t),this.end=new G(a,r)}function q(){var e,t,a,r;return e=st,t=ut,a=lt,f(),r=ut!==t,st=e,ut=t,lt=a,r}function U(e,a){var r=Array.prototype.slice.call(arguments,2),o=a.replace(/%(\d)/g,function(e,a){return t(a>='===e||'>>>='===e||'&='===e||'^='===e||'|='===e)}function K(){var e=st,t=ut,a=lt,r=ct,o;return 59===nt.charCodeAt(st)||W(';')?void j():(o=ut,f(),ut===o?void(ct.type!==Qe.EOF&&!W('}')&&N(ct)):(st=e,ut=t,lt=a,void(ct=r)))}function Z(e){return e.type===et.Identifier||e.type===et.MemberExpression}function Q(){var e=[],t;for(t=ct,V('[');!W(']');)W(',')?(j(),e.push(null)):(e.push(fe()),W(']')||V(','));return j(),dt.markEnd(dt.createArrayExpression(e),t)}function Y(e,t){var a,r,o;return a=it,o=ct,r=Ne(),t&&it&&d(e[0].name)&&B(t,at.StrictParamName),it=a,dt.markEnd(dt.createFunctionExpression(null,e,[],r),o)}function J(){var e,t;return t=ct,e=j(),e.type===Qe.StringLiteral||e.type===Qe.NumericLiteral?(it&&e.octal&&B(e,at.StrictOctalLiteral),dt.markEnd(dt.createLiteral(e),t)):dt.markEnd(dt.createIdentifier(e.value),t)}function ee(){var e,t,a,r,o,n;return(e=ct,n=ct,e.type===Qe.Identifier)?(a=J(),'get'===e.value&&!W(':'))?(t=J(),V('('),V(')'),r=Y([]),dt.markEnd(dt.createProperty('get',t,r),n)):'set'!==e.value||W(':')?(V(':'),r=fe(),dt.markEnd(dt.createProperty('init',a,r),n)):(t=J(),V('('),e=ct,e.type===Qe.Identifier?(o=[ve()],V(')'),r=Y(o,e)):(V(')'),B(e,at.UnexpectedToken,e.value),r=Y([])),dt.markEnd(dt.createProperty('set',t,r),n)):e.type===Qe.EOF||e.type===Qe.Punctuator?void N(e):(t=J(),V(':'),r=fe(),dt.markEnd(dt.createProperty('init',t,r),n))}function te(){var e=[],t={},a=String,r,o,n,i,s;for(s=ct,V('{');!W('}');)r=ee(),o=r.key.type===et.Identifier?r.key.name:a(r.key.value),i='init'===r.kind?tt.Data:'get'===r.kind?tt.Get:tt.Set,n='$'+o,Object.prototype.hasOwnProperty.call(t,n)?(t[n]===tt.Data?it&&i===tt.Data?B({},at.StrictDuplicateProperty):i!==tt.Data&&B({},at.AccessorDataProperty):i===tt.Data?B({},at.AccessorDataProperty):t[n]&i&&B({},at.AccessorGetSet),t[n]|=i):t[n]=i,e.push(r),W('}')||V(',');return V('}'),dt.markEnd(dt.createObjectExpression(e),s)}function ae(){var e;return V('('),e=_e(),V(')'),e}function re(){var e,t,a,r;if(W('('))return ae();if(W('['))return Q();if(W('{'))return te();if(e=ct.type,r=ct,e===Qe.Identifier)a=dt.createIdentifier(j().value);else if(e===Qe.StringLiteral||e===Qe.NumericLiteral)it&&ct.octal&&B(ct,at.StrictOctalLiteral),a=dt.createLiteral(j());else if(e===Qe.Keyword){if(X('function'))return We();X('this')?(j(),a=dt.createThisExpression()):N(j())}else e===Qe.BooleanLiteral?(t=j(),t.value='true'===t.value,a=dt.createLiteral(t)):e===Qe.NullLiteral?(t=j(),t.value=null,a=dt.createLiteral(t)):W('/')||W('/=')?(a='undefined'==typeof gt.tokens?dt.createLiteral(D()):dt.createLiteral(I()),z()):N(j());return dt.markEnd(a,r)}function oe(){var e=[];if(V('('),!W(')'))for(;st':case'<=':case'>=':case'instanceof':a=7;break;case'in':a=t?7:0;break;case'<<':case'>>':case'>>>':a=8;break;case'+':case'-':a=9;break;case'*':case'/':case'%':a=11;break;default:}return a}function ge(){var e,t,a,r,o,n,s,u,l,p;if(e=ct,l=ce(),r=ct,o=he(r,ht.allowIn),0===o)return l;for(r.prec=o,j(),t=[e,ct],s=ce(),n=[l,r,s];0<(o=he(ct,ht.allowIn));){for(;2',Ye[Qe.Identifier]='Identifier',Ye[Qe.Keyword]='Keyword',Ye[Qe.NullLiteral]='Null',Ye[Qe.NumericLiteral]='Numeric',Ye[Qe.Punctuator]='Punctuator',Ye[Qe.StringLiteral]='String',Ye[Qe.RegularExpression]='RegularExpression',Je=['(','{','[','in','typeof','instanceof','new','return','case','delete','throw','void','=','+=','-=','*=','/=','%=','<<=','>>=','>>>=','&=','|=','^=',',','+','-','*','/','%','++','--','<<','>>','>>>','&','|','^','!','~','&&','||','?',':','===','==','>=','<=','<','>','!=','!=='],et={AssignmentExpression:'AssignmentExpression',ArrayExpression:'ArrayExpression',BlockStatement:'BlockStatement',BinaryExpression:'BinaryExpression',BreakStatement:'BreakStatement',CallExpression:'CallExpression',CatchClause:'CatchClause',ConditionalExpression:'ConditionalExpression',ContinueStatement:'ContinueStatement',DoWhileStatement:'DoWhileStatement',DebuggerStatement:'DebuggerStatement',EmptyStatement:'EmptyStatement',ExpressionStatement:'ExpressionStatement',ForStatement:'ForStatement',ForInStatement:'ForInStatement',FunctionDeclaration:'FunctionDeclaration',FunctionExpression:'FunctionExpression',Identifier:'Identifier',IfStatement:'IfStatement',Literal:'Literal',LabeledStatement:'LabeledStatement',LogicalExpression:'LogicalExpression',MemberExpression:'MemberExpression',NewExpression:'NewExpression',ObjectExpression:'ObjectExpression',Program:'Program',Property:'Property',ReturnStatement:'ReturnStatement',SequenceExpression:'SequenceExpression',SwitchStatement:'SwitchStatement',SwitchCase:'SwitchCase',ThisExpression:'ThisExpression',ThrowStatement:'ThrowStatement',TryStatement:'TryStatement',UnaryExpression:'UnaryExpression',UpdateExpression:'UpdateExpression',VariableDeclaration:'VariableDeclaration',VariableDeclarator:'VariableDeclarator',WhileStatement:'WhileStatement',WithStatement:'WithStatement'},tt={Data:1,Get:2,Set:4},at={UnexpectedToken:'Unexpected token %0',UnexpectedNumber:'Unexpected number',UnexpectedString:'Unexpected string',UnexpectedIdentifier:'Unexpected identifier',UnexpectedReserved:'Unexpected reserved word',UnexpectedEOS:'Unexpected end of input',NewlineAfterThrow:'Illegal newline after throw',InvalidRegExp:'Invalid regular expression',UnterminatedRegExp:'Invalid regular expression: missing /',InvalidLHSInAssignment:'Invalid left-hand side in assignment',InvalidLHSInForIn:'Invalid left-hand side in for-in',MultipleDefaultsInSwitch:'More than one default clause in switch statement',NoCatchOrFinally:'Missing catch or finally after try',UnknownLabel:'Undefined label \'%0\'',Redeclaration:'%0 \'%1\' has already been declared',IllegalContinue:'Illegal continue statement',IllegalBreak:'Illegal break statement',IllegalReturn:'Illegal return statement',StrictModeWith:'Strict mode code may not include a with statement',StrictCatchVariable:'Catch variable may not be eval or arguments in strict mode',StrictVarName:'Variable name may not be eval or arguments in strict mode',StrictParamName:'Parameter name eval or arguments is not allowed in strict mode',StrictParamDupe:'Strict mode function may not have duplicate parameter names',StrictFunctionName:'Function name may not be eval or arguments in strict mode',StrictOctalLiteral:'Octal literals are not allowed in strict mode.',StrictDelete:'Delete of an unqualified identifier in strict mode.',StrictDuplicateProperty:'Duplicate data property in object literal not allowed in strict mode',AccessorDataProperty:'Object literal may not have data and accessor property with the same name',AccessorGetSet:'Object literal may not have multiple get/set accessors with the same name',StrictLHSAssignment:'Assignment to eval or arguments is not allowed in strict mode',StrictLHSPostfix:'Postfix increment/decrement may not have eval or arguments operand in strict mode',StrictLHSPrefix:'Prefix increment/decrement may not have eval or arguments operand in strict mode',StrictReservedWord:'Use of future reserved word in strict mode'},rt={NonAsciiIdentifierStart:/[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]/,NonAsciiIdentifierPart:/[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]/},ot={name:'SyntaxTree',processComment:function(e){var t,a;if(!(e.type===et.Program&&0=e.range[1]?(a=gt.trailingComments,gt.trailingComments=[]):gt.trailingComments.length=0:0=e.range[1]&&(a=gt.bottomRightStack[gt.bottomRightStack.length-1].trailingComments,delete gt.bottomRightStack[gt.bottomRightStack.length-1].trailingComments);0=e.range[0];)t=gt.bottomRightStack.pop();t?t.leadingComments&&t.leadingComments[t.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=t.leadingComments,delete t.leadingComments):0=e?e=0:1<=e&&(e=1)}})});Ce(Dg);var Ig=ke(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e){return e}});Ce(Ig);var Eg=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),Object.defineProperty(t,'softmax',{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,'elu',{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,'selu',{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,'softplus',{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,'softsign',{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,'relu',{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,'tanh',{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,'sigmoid',{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,'hard_sigmoid',{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,'linear',{enumerable:!0,get:function(){return c.default}});var r=a(fg),o=a(Tg),n=a(wg),i=a(Pg),s=a(Cg),u=a(kg),l=a(Fg),p=a(Mg),d=a(Dg),c=a(Ig)});Ce(Eg);var Rg=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(Zh),o=a(gg);class n extends r.default{constructor(e={}){super(e),this.layerClass='LeakyReLU';const{alpha:t=0.3}=e;this.description=`alpha: ${t}`,this.alpha=t,this.gpu&&(this.program=Kh.webgl2.compileProgram('#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D x;\nuniform float alpha;\nout vec4 outColor;\n\nvoid main() {\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\n outColor = max(v, 0.0) + alpha * min(v, 0.0);\n}\n'))}call(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}_callCPU(e){this.output=e,(0,Eg.relu)(this.output,{alpha:this.alpha})}_callGPU(e){e.glTexture||e.glTextureFragments||e.createGLTexture({type:'2d',format:'float',supportsTextureFragments:!0}),this.output||(this.output=new o.default([],e.glTextureShape),this.output.createGLTexture({type:'2d',format:'float',supportsTextureFragments:!0}),e.is1D?this.output.is1D=e.is1D:(e.is2DReshaped||e.is2DSquareReshaped)&&(e.is2DReshaped?this.output.is2DReshaped=e.is2DReshaped:e.is2DSquareReshaped&&(this.output.is2DSquareReshaped=e.is2DSquareReshaped),this.output.originalShape=e.originalShape,this.output.indicesForReshaped=e.indicesForReshaped)),Kh.webgl2.runProgram({program:this.program,output:this.output,inputs:[{input:e,name:'x'}],uniforms:[{value:this.alpha,type:'float',name:'alpha'}],supportsTextureFragments:!0}),0===this.outbound.length&&(this.output.transferFromGLTexture(),this.output.is2DReshaped?this.output.reshapeFrom2D():this.output.is2DSquareReshaped&&this.output.reshapeFrom2DSquare())}}t.default=n});Ce(Rg);var Ag=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(Zh),o=a(gg),n=a(Sg);class i extends r.default{constructor(e={}){super(e),Object.defineProperty(this,'_compute',{configurable:!0,enumerable:!0,writable:!0,value:(0,n.default)({args:['array','array'],body:function(e,t){e=An(e,0)+t*Rn(e,0)}})}),this.layerClass='PReLU',this.params=['alpha'],this.gpu&&(this.program=Kh.webgl2.compileProgram('#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D x;\nuniform sampler2D alpha;\nout vec4 outColor;\n\nvoid main() {\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\n vec4 a = texture(alpha, vec2(outTex.x, outTex.y));\n outColor = max(v, 0.0) + a * min(v, 0.0);\n}\n'))}call(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}_callCPU(e){this.output=e,this._compute(this.output.tensor,this.weights.alpha.tensor)}_callGPU(e){e.glTexture||e.glTextureFragments||e.createGLTexture({type:'2d',format:'float',supportsTextureFragments:!0}),this.output||(this.output=new o.default([],e.glTextureShape),this.output.createGLTexture({type:'2d',format:'float',supportsTextureFragments:!0}),e.is1D?this.output.is1D=e.is1D:(e.is2DReshaped||e.is2DSquareReshaped)&&(e.is2DReshaped?this.output.is2DReshaped=e.is2DReshaped:e.is2DSquareReshaped&&(this.output.is2DSquareReshaped=e.is2DSquareReshaped),this.output.originalShape=e.originalShape,this.output.indicesForReshaped=e.indicesForReshaped)),Kh.webgl2.runProgram({program:this.program,output:this.output,inputs:[{input:e,name:'x'},{input:this.weights.alpha,name:'alpha'}],supportsTextureFragments:!0}),0===this.outbound.length&&(this.output.transferFromGLTexture(),this.output.is2DReshaped?this.output.reshapeFrom2D():this.output.is2DSquareReshaped&&this.output.reshapeFrom2DSquare())}}t.default=i});Ce(Ag);var Lg=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(Zh),o=a(gg),n=a(Sg);class i extends r.default{constructor(e={}){super(e),s.call(this),this.layerClass='ELU';const{alpha:t=1}=e;this.description=`alpha: ${t}`,this.alpha=t,this.gpu&&(this.program=Kh.webgl2.compileProgram('#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D x;\nuniform float alpha;\nout vec4 outColor;\n\nvoid main() {\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\n outColor = max(v, 0.0) + alpha * (exp(min(v, 0.0)) - 1.0);\n}\n'))}call(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}_callCPU(e){this.output=e,this._compute(this.output.tensor,this.alpha)}_callGPU(e){e.glTexture||e.glTextureFragments||e.createGLTexture({type:'2d',format:'float',supportsTextureFragments:!0}),this.output||(this.output=new o.default([],e.glTextureShape),this.output.createGLTexture({type:'2d',format:'float',supportsTextureFragments:!0}),e.is1D?this.output.is1D=e.is1D:(e.is2DReshaped||e.is2DSquareReshaped)&&(e.is2DReshaped?this.output.is2DReshaped=e.is2DReshaped:e.is2DSquareReshaped&&(this.output.is2DSquareReshaped=e.is2DSquareReshaped),this.output.originalShape=e.originalShape,this.output.indicesForReshaped=e.indicesForReshaped)),Kh.webgl2.runProgram({program:this.program,output:this.output,inputs:[{input:e,name:'x'}],uniforms:[{value:this.alpha,type:'float',name:'alpha'}],supportsTextureFragments:!0}),0===this.outbound.length&&(this.output.transferFromGLTexture(),this.output.is2DReshaped?this.output.reshapeFrom2D():this.output.is2DSquareReshaped&&this.output.reshapeFrom2DSquare())}}t.default=i;var s=function(){Object.defineProperty(this,'_compute',{configurable:!0,enumerable:!0,writable:!0,value:(0,n.default)({args:['array','scalar'],body:function(e,t){e=An(e,0)+t*(Mn(Rn(e,0))-1)}})})}});Ce(Lg);var jg=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(Zh),o=a(gg),n=a(Sg);class i extends r.default{constructor(e={}){super(e),s.call(this),this.layerClass='ThresholdedReLU';const{theta:t=1}=e;this.description=`theta: ${t}`,this.theta=t,this.gpu&&(this.program=Kh.webgl2.compileProgram('#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D x;\nuniform float theta;\nout vec4 outColor;\n\nvoid main() {\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\n outColor = v * float(greaterThan(v, vec4(theta)));\n}\n'))}call(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}_callCPU(e){this.output=e,this._compute(this.output.tensor,this.theta)}_callGPU(e){e.glTexture||e.glTextureFragments||e.createGLTexture({type:'2d',format:'float',supportsTextureFragments:!0}),this.output||(this.output=new o.default([],e.glTextureShape),this.output.createGLTexture({type:'2d',format:'float',supportsTextureFragments:!0}),e.is1D?this.output.is1D=e.is1D:(e.is2DReshaped||e.is2DSquareReshaped)&&(e.is2DReshaped?this.output.is2DReshaped=e.is2DReshaped:e.is2DSquareReshaped&&(this.output.is2DSquareReshaped=e.is2DSquareReshaped),this.output.originalShape=e.originalShape,this.output.indicesForReshaped=e.indicesForReshaped)),Kh.webgl2.runProgram({program:this.program,output:this.output,inputs:[{input:e,name:'x'}],uniforms:[{value:this.theta,type:'float',name:'theta'}],supportsTextureFragments:!0}),0===this.outbound.length&&(this.output.transferFromGLTexture(),this.output.is2DReshaped?this.output.reshapeFrom2D():this.output.is2DSquareReshaped&&this.output.reshapeFrom2DSquare())}}t.default=i;var s=function(){Object.defineProperty(this,'_compute',{configurable:!0,enumerable:!0,writable:!0,value:(0,n.default)({args:['array','scalar'],body:function(e,t){e*=+(e>t)}})})}});Ce(jg);var zg=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),Object.defineProperty(t,'LeakyReLU',{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,'PReLU',{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,'ELU',{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,'ThresholdedReLU',{enumerable:!0,get:function(){return i.default}});var r=a(Rg),o=a(Ag),n=a(Lg),i=a(jg)});Ce(zg);var Gg=ke(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t){const r=`#version 300 es -precision highp float; - -in vec2 outTex; -uniform sampler2D inputs[${e}]; -out vec4 outColor; - -void main() { - int out_y = int(float(${t[0]}) * outTex.y); - int out_x = int(float(${t[1]}) * outTex.x); - - outColor = vec4(${(0,a.default)(e).map((e)=>`texelFetch(inputs[${e}], ivec2(out_x, out_y), 0).r`).join(' + ')}); -} -`;return r};var a=function(e){return e&&e.__esModule?e:{default:e}}(ag)});Ce(Gg);var Og=ke(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t){const r=`#version 300 es -precision highp float; - -in vec2 outTex; -uniform sampler2D inputs[${e}]; -out vec4 outColor; - -void main() { - int out_y = int(float(${t[0]}) * outTex.y); - int out_x = int(float(${t[1]}) * outTex.x); - - outColor = vec4((${(0,a.default)(e).map((e)=>`texelFetch(inputs[${e}], ivec2(out_x, out_y), 0).r`).join(' + ')}) / float(${e})); -} -`;return r};var a=function(e){return e&&e.__esModule?e:{default:e}}(ag)});Ce(Og);var qg=Xr,Ug=$r,Bg=Kr,Ng=Zr,Vg=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t,a,s){const u=t.map((e)=>e[s]),l=(0,n.default)(e+1).map((e)=>(0,o.default)((0,r.default)(u,e))),p=0===s?'out_y':'out_x';let i=` - int n = 0; - int offset = 0; - if (${p} >= ${l[1]} && ${p} < ${l[2]}) { - n = 1; - offset = ${l[1]}; - }`;2` else if (${p} >= ${l[e]} && ${p} < ${l[e+1]}) { - n = ${e}; - offset = ${l[e]}; - }`).join('')} -`);let d='outColor = vec4(0.0);';if(0===s||1===s){const t=(e)=>`out_x${1===s?` - ${l[e]}`:''}`,a=(e)=>`out_y${0===s?` - ${l[e]}`:''}`;d=` - if (n == 0) { - outColor = vec4(texelFetch(inputs[0], ivec2(out_x, out_y), 0).r); - }${(0,n.default)(1,e).map((e)=>` else if (n == ${e}) { - outColor = vec4(texelFetch(inputs[${e}], ivec2(${t(e)}, ${a(e)}), 0).r); - }`).join('')} -`}const c=`#version 300 es -precision highp float; - -in vec2 outTex; -uniform sampler2D inputs[${e}]; -out vec4 outColor; - -void main() { - int out_y = int(float(${a[0]}) * outTex.y); - int out_x = int(float(${a[1]}) * outTex.x); -${i} -${d} -} -`;return c};var r=a(Ug),o=a(Ng),n=a(ag)});Ce(Vg);var Hg=ke(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t){const a=`#version 300 es -precision highp float; - -in vec2 outTex; -uniform sampler2D inputs[${e}]; -out vec4 outColor; - -void main() { - int out_y = int(float(${t[0]}) * outTex.y); - int out_x = int(float(${t[1]}) * outTex.x); - - float val = texelFetch(inputs[0], ivec2(out_x, out_y), 0).r; - for (int i = 1; i < ${e}; i++) { - val = max(val, texelFetch(inputs[i], ivec2(out_x, out_y), 0).r); - } - - outColor = vec4(val); -} -`;return a}});Ce(Hg);var Wg=ke(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t){const a=`#version 300 es -precision highp float; - -in vec2 outTex; -uniform sampler2D inputs[${e}]; -out vec4 outColor; - -void main() { - int out_y = int(float(${t[0]}) * outTex.y); - int out_x = int(float(${t[1]}) * outTex.x); - - float val = texelFetch(inputs[0], ivec2(out_x, out_y), 0).r; - for (int i = 1; i < ${e}; i++) { - val = min(val, texelFetch(inputs[i], ivec2(out_x, out_y), 0).r); - } - - outColor = vec4(val); -} -`;return a}});Ce(Wg);var Xg=ke(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t){const r=`#version 300 es -precision highp float; - -in vec2 outTex; -uniform sampler2D inputs[${e}]; -out vec4 outColor; - -void main() { - int out_y = int(float(${t[0]}) * outTex.y); - int out_x = int(float(${t[1]}) * outTex.x); - - outColor = vec4(${(0,a.default)(e).map((e)=>`texelFetch(inputs[${e}], ivec2(out_x, out_y), 0).r`).join(' * ')}); -} -`;return r};var a=function(e){return e&&e.__esModule?e:{default:e}}(ag)});Ce(Xg);var $g=ke(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t){const a=`#version 300 es -precision highp float; - -in vec2 outTex; -uniform sampler2D inputs[2]; -out vec4 outColor; - -void main() { - int out_y = int(float(${t[0]}) * outTex.y); - int out_x = int(float(${t[1]}) * outTex.x); - - outColor = vec4(texelFetch(inputs[0], ivec2(out_x, out_y), 0).r - texelFetch(inputs[1], ivec2(out_x, out_y), 0).r); -} -`;return a}});Ce($g);var Kg=ke(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t,a,r,o){const n=r?`sum += texelFetch(bias, ivec2(out_x, 0), 0).r;`:'',i=o?`int fragmentIndex = int(floor(float(rowIndex) / float(${t[0]}))); - rowIndex = int(mod(float(rowIndex), float(${t[0]}))); - colIndex += fragmentIndex * ${t[1]};`:'',s=`#version 300 es -precision highp float; -precision highp isampler2D; - -in vec2 outTex; -uniform sampler2D x; -uniform isampler2D indexMap; -uniform sampler2D kernel; -uniform sampler2D bias; -out vec4 outColor; - -void main() { - int out_y = int(float(${e[0]}) * outTex.y); - int out_x = int(float(${e[1]}) * outTex.x); - - float sum = 0.; - for (int i = 0; i < ${a[1]}; ++i) { - int index = texelFetch(indexMap, ivec2(i, out_y), 0).r; - if (index != -1) { - int rowIndex = int(floor(float(index) / float(${t[1]}))); - int colIndex = int(mod(float(index), float(${t[1]}))); - ${i} - sum += texelFetch(x, ivec2(colIndex, rowIndex), 0).r * texelFetch(kernel, ivec2(out_x, i), 0).r; - } - } - - ${n} - outColor = vec4(sum); -} -`;return s}});Ce(Kg);var Zg=ke(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t,a,r,o){const n=r?`sum += texelFetch(bias, ivec2(out_x, 0), 0).r;`:'',i=o?`int fragmentIndex = int(floor(float(rowIndex) / float(${t[0]}))); - rowIndex = int(mod(float(rowIndex), float(${t[0]}))); - colIndex += fragmentIndex * ${t[1]};`:'',s=`#version 300 es -precision highp float; -precision highp isampler2D; - -in vec2 outTex; -uniform sampler2D matMulResult; -uniform isampler2D indexMap; -uniform sampler2D bias; -out vec4 outColor; - -void main() { - int out_y = int(float(${e[0]}) * outTex.y); - int out_x = int(float(${e[1]}) * outTex.x); - - float sum = 0.; - for (int n = 0; n < ${a[1]}; ++n) { - int index = texelFetch(indexMap, ivec2(n, out_y), 0).r; - if (index != -1) { - int rowIndex = int(floor(float(index) / float(${t[1]}))); - int colIndex = int(mod(float(index), float(${t[1]}))); - ${i} - sum += texelFetch(matMulResult, ivec2(colIndex + out_x, rowIndex), 0).r; - } - } - - ${n} - outColor = vec4(sum); -} -`;return s}});Ce(Zg);var Qg=ke(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t,a){let r;return r=a?`#version 300 es -precision highp float; - -in vec2 outTex; -uniform sampler2D featureMaps; -uniform sampler2D weights; -out vec4 outColor; - -void main() { - int out_y = int(float(${e[0]}) * outTex.y); - int out_x = int(float(${e[1]}) * outTex.x); - - int featureMapsRow = out_x + ${e[0]} * out_y; - - float sum = 0.; - for (int k = 0; k < ${t}; ++k) { - float f = texelFetch(featureMaps, ivec2(k, featureMapsRow), 0).r; - float w = texelFetch(weights, ivec2(k, 0), 0).r; - sum += f * w; - } - - outColor = vec4(max(sum, 0.0)); -} -`:`#version 300 es -precision highp float; - -in vec2 outTex; -uniform sampler2D featureMaps; -uniform sampler2D weights; -out vec4 outColor; - -void main() { - int out_y = int(float(${e[0]}) * outTex.y); - int out_x = int(float(${e[1]}) * outTex.x); - - float sum = 0.; - for (int k = 0; k < ${t}; ++k) { - float f = texelFetch(featureMaps, ivec2(k, out_y), 0).r; - float w = texelFetch(weights, ivec2(out_x, k), 0).r; - sum += f * w; - } - - outColor = vec4(max(sum, 0.0)); -} -`,r}});Ce(Qg);var Yg=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,...t){switch(e){case'add':return(0,r.default)(...t);case'average':return(0,o.default)(...t);case'concatenate':return(0,n.default)(...t);case'maximum':return(0,i.default)(...t);case'minimum':return(0,s.default)(...t);case'multiply':return(0,u.default)(...t);case'subtract':return(0,l.default)(...t);case'conv2d':return(0,p.default)(...t);case'conv2dTranspose':return(0,d.default)(...t);case'cam':return(0,c.default)(...t);default:throw new Error('GLSL program not found');}};var r=a(Gg),o=a(Og),n=a(Vg),i=a(Hg),s=a(Wg),u=a(Xg),l=a($g),p=a(Kg),d=a(Zg),c=a(Qg)});Ce(Yg);var Jg=no,em=32,tm=lo,am={},rm=ke(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.linear=t.hard_sigmoid=t.sigmoid=t.tanh=t.relu=t.softsign=t.softplus=t.selu=t.elu=t.softmax=void 0;t.softmax='#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D x;\nout vec4 outColor;\n\nvoid main() {\n ivec2 size = textureSize(x, 0);\n int out_x = int(float(size[0]) * outTex.x);\n int out_y = int(float(size[1]) * outTex.y);\n\n float maxval = 0.0;\n for (int i = 0; i < int(size[0]); ++i) {\n float val = texelFetch(x, ivec2(i, out_y), 0).r;\n if (i == 0 || val > maxval) {\n maxval = val;\n }\n }\n\n float sum = 0.0;\n for (int i = 0; i < int(size[0]); ++i) {\n float val = texelFetch(x, ivec2(i, out_y), 0).r;\n sum += exp(val - maxval);\n }\n\n outColor = exp(texture(x, vec2(outTex.x, outTex.y)) - maxval) / sum;\n}\n';t.elu='#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D x;\nout vec4 outColor;\n\nvoid main() {\n float alpha = 1.0;\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\n outColor = max(v, 0.0) + alpha * (exp(min(v, 0.0)) - 1.0);\n}\n';t.selu='#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D x;\nout vec4 outColor;\n\nvoid main() {\n float alpha = 1.6732632423543772848170429916717;\n float scale = 1.0507009873554804934193349852946;\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\n outColor = scale * (max(v, 0.0) + alpha * (exp(min(v, 0.0)) - 1.0));\n}\n';t.softplus='#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D x;\nout vec4 outColor;\n\nvoid main() {\n outColor = log(1.0 + exp(texture(x, vec2(outTex.x, outTex.y))));\n}\n';t.softsign='#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D x;\nout vec4 outColor;\n\nvoid main() {\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\n v /= 1.0 + abs(v);\n outColor = v;\n}\n';t.relu='#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D x;\nout vec4 outColor;\n\nvoid main() {\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\n outColor = max(v, 0.0);\n}\n';t.tanh='#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D x;\nout vec4 outColor;\n\nvoid main() {\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\n outColor = tanh(v);\n}\n';t.sigmoid='#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D x;\nout vec4 outColor;\n\nvoid main() {\n outColor = 1.0 / (1.0 + exp(-1.0 * texture(x, vec2(outTex.x, outTex.y))));\n}\n';t.hard_sigmoid='#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D x;\nout vec4 outColor;\n\nvoid main() {\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\n v = v * 0.2 + 0.5;\n v = max(v, 0.0);\n v = min(v, 1.0);\n outColor = v;\n}\n';t.linear='#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D x;\nout vec4 outColor;\n\nvoid main() {\n outColor = texture(x, vec2(outTex.x, outTex.y));\n}\n'});Ce(rm);var om=ke(function(e,t){function a(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,a):{};r.get||r.set?Object.defineProperty(t,a,r):t[a]=e[a]}return t.default=e,t}function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var o=r(Zh),n=r(gg),i=a(Eg),s=r(Yg),u=a(cg),l=r(dg),p=r(tm),d=a(rm);class c extends o.default{constructor(e={}){super(e),this.layerClass='Conv2D';const{filters:t=1,kernel_size:a=[3,3],strides:r=[1,1],padding:o='valid',data_format:n='channels_last',dilation_rate:s=[1,1],activation:u='linear',use_bias:l=!0}=e;this.kernelShape=Array.isArray(a)?[t,...a]:[t,a,a],this.strides=Array.isArray(r)?r:[r,r],'valid'===o||'same'===o?this.padding=o:this.throwError('Invalid padding.'),'channels_last'===n||'channels_first'===n?this.dataFormat=n:this.throwError('Only channels_last and channels_first data formats are allowed.'),this.dilationRate=Array.isArray(s)?s:[s,s],(1!==this.dilationRate[0]||1!==this.dilationRate[1])&&(1!==this.strides[0]||1!==this.strides[1])&&this.throwError(`Incompatible combination of dilation_rate with strides.`),this.activation=u,this.activationFunc=i[u],this.useBias=l,this.params=this.useBias?['kernel','bias']:['kernel'],this.description=`${this.kernelShape[0]} ${this.kernelShape.slice(1).join('x')} filters`,this.description+=this.strides.some((e)=>11this._conv2d.outputShape[e]),this.output=new o.default([],this.outputShape),s.default.assign(this.output.tensor,(0,u.default)(a.tensor).transpose(1,0,2))}_callGPU(e){e.glTexture||e.createGLTexture({type:'2d',format:'float'});const t=e.tensor.shape,a=new o.default([],t);Object.assign(a,e),a.glTextureShape=t,a.is2DReshaped=!0,a.originalShape=[t[0],1,t[1]],a.indicesForReshaped=i.createIndicesFor2DReshaped(a.originalShape,!1,-1),this.output=this._conv2d.call(a),0===this.outbound.length&&this.output.transferFromGLTexture()}}t.default=p});Ce(im);var sm=ke(function(e,t){function a(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,a):{};r.get||r.set?Object.defineProperty(t,a,r):t[a]=e[a]}return t.default=e,t}function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var o=r(Zh),n=r(gg),i=a(Eg),s=a(cg),u=r(dg),l=r(tm),p=r(om),d=a(rm);class c extends p.default{constructor(e={}){super(e)}_calcOutputShape(e){super._calcOutputShape(e);const t=this.kernelShape[0],a=e[2];this.outputShape[2]=t*a}_im2col(e){const[t,a,r]=e.tensor.shape,o=this.kernelShape[1],s=this.kernelShape[2],i=this.outputShape[0],l=this.outputShape[1],p=o*s;this.imColsMat||(this.imColsMat=new n.default([],[i*l*r,p]));let d=new n.default([],[o,s,1]),h=0;for(let n=0;n1111t&&(t=i,u=s);return u};Cn=Cn||function(e){return e=+e,0===e||isNaN(e)?e:0Ln(a)?(r=a/e,t=Cn(e)*jn(1+r*r),n=1/t,i=r*n,s=e*t):(r=e/a,t=Cn(e)*jn(1+r*r),i=1/t,n=r*i,s=a*t),void 0!==o&&2=e.tensor.shape.length?this.output=e:(this.output=new o.default([],[e.tensor.shape.reduce((e,t)=>e*t,1)]),this.output.replaceTensorData(e.tensor.data))}_callGPU(e){e.glTexture||e.glTextureFragments||(2>=e.tensor.shape.length?e.createGLTexture({type:'2d',format:'float'}):2e*t,1)]),this.output.createGLTexture({type:'2d',format:'float'})),e.glTextureFragments?(e.convert2DRowFragmentedGLTextureToColStack(),Kh.webgl2.runProgram({program:this.flattenFragmentsProgram,output:this.output,inputs:[{input:e,name:'x'}],uniforms:[{value:this.output.glTextureShape[1],type:'int',name:'outputSize'},{value:e.glTextureShape[0],type:'int',name:'inputRows'},{value:e.glTextureShape[1],type:'int',name:'inputCols'}],supportsTextureFragments:!0}),e.removeGLTextureFragmentsAsColStack()):Kh.webgl2.runProgram({program:this.flattenProgram,output:this.output,inputs:[{input:e,name:'x'}],uniforms:[{value:this.output.glTextureShape[1],type:'int',name:'outputSize'},{value:e.glTextureShape[1],type:'int',name:'inputCols'}],supportsTextureFragments:!0}),0===this.outbound.length&&this.output.transferFromGLTexture()}}t.default=n});Ce(df);var cf=Po,hf=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(cf),o=a(Zh),n=a(gg),s=a(dg);class i extends o.default{constructor(e={}){super(e),this.layerClass='Reshape';const{target_shape:t=[]}=e;this.targetShape=t,this.description=`target shape: ${JSON.stringify(this.targetShape)}`,this.gpu&&(this.mapInputProgram=Kh.webgl2.compileProgram('#version 300 es\nprecision highp float;\nprecision highp isampler2D;\n\nin vec2 outTex;\nuniform sampler2D x;\nuniform isampler2D indexMap;\nuniform int inputCols;\nout vec4 outColor;\n\nvoid main() {\n ivec2 size = textureSize(indexMap, 0);\n int out_x = int(float(size[0]) * outTex.x);\n int out_y = int(float(size[1]) * outTex.y);\n\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\n\n if (index != -1) {\n int rowIndex = int(floor(float(index) / float(inputCols)));\n int colIndex = int(mod(float(index), float(inputCols)));\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\n outColor = vec4(val);\n } else {\n outColor = vec4(0.0);\n }\n}\n'))}call(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}_callCPU(e){this.targetShape.reduce((e,t)=>e*t,1)!==e.tensor.size&&this.throwError('The total size of new array must be unchanged in reshape layer.'),this.output=new n.default([],this.targetShape),this.output.replaceTensorData(e.tensor.data)}_createIndexMap(){if(!this.indexMap){const e=new n.default([],this.inputShape,{type:Int32Array}),t=new n.default([],this.inputShape,{type:Int32Array}),a=new n.default([],this.inputShape,{type:Int32Array});if(2===this.inputShape.length)for(let e=0;e=e.tensor.shape.length?e.createGLTexture({type:'2d',format:'float'}):2e-1),this.gpu&&(this.mapInputProgram=Kh.webgl2.compileProgram('#version 300 es\nprecision highp float;\nprecision highp isampler2D;\n\nin vec2 outTex;\nuniform sampler2D x;\nuniform isampler2D indexMap;\nuniform int inputCols;\nout vec4 outColor;\n\nvoid main() {\n ivec2 size = textureSize(indexMap, 0);\n int out_x = int(float(size[0]) * outTex.x);\n int out_y = int(float(size[1]) * outTex.y);\n\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\n\n if (index != -1) {\n int rowIndex = int(floor(float(index) / float(inputCols)));\n int colIndex = int(mod(float(index), float(inputCols)));\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\n outColor = vec4(val);\n } else {\n outColor = vec4(0.0);\n }\n}\n'))}call(e){return 1>=e.tensor.shape.length||(0,n.default)((0,o.default)(e.tensor.shape.length),this.dims)?(this.output=e,this.output):(this.gpu?this._callGPU(e):this._callCPU(e),this.output)}_callCPU(e){this.dims.length!==e.tensor.shape.length&&this.throwError('The specified dims permutation must match the number of dimensions.');const t=this.dims.map((t)=>e.tensor.shape[t]);this.output=new s.default([],t),u.default.assign(this.output.tensor,e.tensor.transpose(...this.dims))}_createIndexMap(){if(!this.indexMap){const e=new s.default([],this.inputShape,{type:Int32Array}),t=new s.default([],this.inputShape,{type:Int32Array}),a=new s.default([],this.inputShape,{type:Int32Array});if(2===this.inputShape.length)for(let e=0;ethis.inputShape[e]);this.indexMap=new s.default([],o,{type:Int32Array}),u.default.assign(this.indexMap.tensor,e.tensor.transpose(...this.dims)),2=e.tensor.shape.length?e.createGLTexture({type:'2d',format:'float'}):2this.inputShape[e]);this.output=new s.default([],e),2e)},vf=function(e){var t=e>>mf-1;return(e^t)-t},bf=function(e,t){return t^(e^t)&-(e>>=t,a=(255>>=a,t|=a,a=(15>>=a,t|=a,a=(3>>=a,t|=a,t|e>>1},Pf=function(e){return 1e9<=e?9:1e8<=e?8:1e7<=e?7:1e6<=e?6:1e5<=e?5:1e4<=e?4:1e3<=e?3:100<=e?2:10<=e?1:0},Cf=function(e){return e-=1431655765&e>>>1,e=(858993459&e)+(858993459&e>>>2),16843009*(252645135&e+(e>>>4))>>>24},kf=Co,Ff=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1},Mf=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)},Df=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,1&27030>>>e},If=Array(256);(function(e){for(var t=0;256>t;++t){var a=t,o=t,r=7;for(a>>>=1;a;a>>>=1)o<<=1,o|=1&a,--r;e[t]=255&o<>>8]<<16|If[255&e>>>16]<<8|If[255&e>>>24]},Rf=function(e,t){return e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e|t<<1},Af=function(e,t){return e=1431655765&e>>>t,e=858993459&(e|e>>>1),e=252645135&(e|e>>>2),e=16711935&(e|e>>>4),e=65535&(e|e>>>16),e<<16>>16},Lf=function(e,t,a){return e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e|=t<<1,a&=1023,a=4278190335&(a|a<<16),a=251719695&(a|a<<8),a=3272356035&(a|a<<4),a=1227133513&(a|a<<2),e|a<<2},jf=function(e,t){return e=1227133513&e>>>t,e=3272356035&(e|e>>>2),e=251719695&(e|e>>>4),e=4278190335&(e|e>>>8),e=1023&(e|e>>>16),e<<22>>22},zf=function(e){var a=e|e-1;return a+1|(~a&-~a)-1>>>Co(e)+1},Gf={INT_BITS:ff,INT_MAX:_f,INT_MIN:xf,sign:yf,abs:vf,min:bf,max:Sf,isPow2:Tf,log2:wf,log10:Pf,popCount:Cf,countTrailingZeros:kf,nextPow2:Ff,prevPow2:Mf,parity:Df,reverse:Ef,interleave2:Rf,deinterleave2:Af,interleave3:Lf,deinterleave3:jf,nextCombination:zf},Of=Mo,qf=ke(function(e,t){function a(e){if(e){var t=e.length||e.byteLength,a=Gf.log2(t);_[a].push(e)}}function r(e){var e=Gf.nextPow2(e),t=Gf.log2(e),a=_[t];return 0e;++e)n.UINT8[e].length=0,n.UINT16[e].length=0,n.UINT32[e].length=0,n.INT8[e].length=0,n.INT16[e].length=0,n.INT32[e].length=0,n.FLOAT[e].length=0,n.DOUBLE[e].length=0,n.UINT8C[e].length=0,_[e].length=0,x[e].length=0}}),Uf=Do,Bf=Io,Nf=Eo,Vf=Ro,Hf=Ao,Wf=Lo,Xf={clone:Uf,malloc:Bf,free:Nf,zeros:Vf,ones:Hf,eye:Wf},$f=jo,Kf=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(Zh),o=a(gg),n=a(nm),i=a($f);class s extends r.default{constructor(e={}){super(e),this.layerClass='RepeatVector';const{n:t=1}=e;this.n=t,this.description=`n = ${t}`,this.gpu&&(this.program=Kh.webgl2.compileProgram('#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D x;\nout vec4 outColor;\n\nvoid main() {\n outColor = texture(x, vec2(outTex.x, 0));\n}\n'))}call(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}_callCPU(e){1!==e.tensor.shape.length&&this.throwError('Only 1D tensor inputs allowed.'),this.output=new o.default([],[this.n,e.tensor.shape[1]]),this.output.tensor=(0,i.default)((0,n.default)(e.tensor,0),[this.n,1])}_callGPU(e){e.glTexture||e.createGLTexture({type:'2d',format:'float'}),this.output||(this.output=new o.default([],[this.n,e.glTextureShape[1]]),this.output.createGLTexture({type:'2d',format:'float'})),Kh.webgl2.runProgram({program:this.program,output:this.output,inputs:[{input:e,name:'x'}]}),0===this.outbound.length&&this.output.transferFromGLTexture()}}t.default=s});Ce(Kf);var Zf=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),Object.defineProperty(t,'Dense',{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,'Activation',{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,'Dropout',{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,'SpatialDropout1D',{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,'SpatialDropout2D',{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,'SpatialDropout3D',{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,'Flatten',{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,'Reshape',{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,'Permute',{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,'RepeatVector',{enumerable:!0,get:function(){return c.default}});var r=a(of),o=a(nf),n=a(sf),i=a(uf),s=a(lf),u=a(pf),l=a(df),p=a(hf),d=a(gf),c=a(Kf)});Ce(Zf);var Qf=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(Zh),o=a(gg),n=a(dg);class i extends r.default{constructor(e={}){super(e),this.layerClass='Embedding';const{input_dim:t=1,output_dim:a=1,input_length:r=0,mask_zero:o=!1}=e;this.description=`output dimensions: ${a}`,this.inputDim=t,this.outputDim=a,this.inputLength=r,this.maskZero=o,this.params=['embeddings'],this.gpu&&(this.program=Kh.webgl2.compileProgram('#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D x;\nuniform sampler2D embeddings;\nout vec4 outColor;\n\nvoid main() {\n ivec2 x_size = textureSize(x, 0);\n ivec2 embeddings_size = textureSize(embeddings, 0);\n int out_x = int(float(embeddings_size[0]) * outTex.x);\n int out_y = int(float(x_size[0]) * outTex.y);\n\n int index = int(texelFetch(x, ivec2(out_y, 0), 0).r);\n outColor = texelFetch(embeddings, ivec2(out_x, index), 0);\n}\n'))}call(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}_callCPU(e){this.output=new o.default([],[e.tensor.shape[0],this.weights.embeddings.tensor.shape[1]]);for(let t=0,a=e.tensor.shape[0];te.tensor.shape.slice());if(-1<['sum','diff','mul','ave','max','min'].indexOf(this.mode)&&!t.every((e)=>(0,o.default)(e,t[0]))&&this.throwError(`All input shapes must be the same for mode ${this.mode}.`),'dot'===this.mode)2!==e.length&&this.throwError(`Exactly 2 inputs required for mode ${this.mode}.`),0>this.dotAxes[0]&&(this.dotAxes[0]=t[0].length+this.dotAxes[0]),0>this.dotAxes[1]&&(this.dotAxes[1]=t[1].length+this.dotAxes[1]),t[0][this.dotAxes[0]]!==t[1][this.dotAxes[1]]&&this.throwError('Dimensions incompatibility using dot mode.');else if('concat'===this.mode){let e=t.slice(),a=0>this.concatAxis?e[0].length+this.concatAxis:this.concatAxis;0===this.concatAxis&&(a=0),(0,r.default)(e.length).forEach((t)=>{e[t].splice(a,1)}),e.every((t)=>(0,o.default)(t,e[0]))||this.throwError('In concat mode, all shapes must be the same except along the concat axis.')}return!0}_callCPU(){}_callGPU(e){e.forEach((e)=>{e.glTexture||e.glTextureFragments||e.createGLTexture({type:'2d',format:'float',supportsTextureFragments:!0})}),this.output||(this.output=new i.default([],e[0].glTextureShape),this.output.createGLTexture({type:'2d',format:'float',supportsTextureFragments:!0}),e[0].is1D?this.output.is1D=e[0].is1D:(e[0].is2DReshaped||e[0].is2DSquareReshaped)&&(e[0].is2DReshaped?this.output.is2DReshaped=e[0].is2DReshaped:e[0].is2DSquareReshaped&&(this.output.is2DSquareReshaped=e[0].is2DSquareReshaped),this.output.originalShape=e[0].originalShape.slice(),this.output.indicesForReshaped=e[0].indicesForReshaped)),Kh.webgl2.runProgram({program:this.mergeProgram,output:this.output,inputs:e.map((e,t)=>({input:e,name:`inputs[${t}]`})),supportsTextureFragments:!0}),0===this.outbound.length&&(this.output.transferFromGLTexture(),this.output.is2DReshaped?this.output.reshapeFrom2D():this.output.is2DSquareReshaped&&this.output.reshapeFrom2DSquare())}}t.default=s});Ce(Jf);var e_=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(Jf),o=a(gg),n=a(Yg),s=a(dg);class i extends r.default{constructor(e={}){super(e),this.layerClass='Add',this.mode='sum'}_callCPU(e){const t=e[0].tensor.shape.slice();this.output=new o.default([],t);for(let t=0;t=t?t:t-1}_callCPU(e){const t=e[0].tensor.shape.slice(),a=0>this.concatAxis?t.length+this.concatAxis:this.concatAxis;if(e.slice(1,e.length).forEach((e)=>{const r=e.tensor.shape.slice()[a];t[a]+=r}),this.output=new n.default([],t),0===a)(0,u.default)(this.output.tensor,e.map((e)=>e.tensor));else{let t=[a];for(let r=0;re.tensor.transpose(...t)))}}_callGPU(e){e.forEach((e)=>{e.glTexture||e.glTextureFragments||e.createGLTexture({type:'2d',format:'float',supportsTextureFragments:!0})});const t=e[0].glTextureShape.slice();let a=1;if(e[0].is2DReshaped?-1===this.concatAxis||this.concatAxis===e[0].originalShape.length-1?a=1:this.throwError('specified axis not supported for now.'):-1===this.concatAxis||1===this.concatAxis?a=1:-2===this.concatAxis||0===this.concatAxis?a=0:this.throwError('specified axis not supported for now.'),t[a]=(0,r.default)(e.map((e)=>e.glTextureShape[a])),!this.output)if(this.output=new n.default([],t),this.output.createGLTexture({type:'2d',format:'float',supportsTextureFragments:1==a}),e[0].is1D)this.output.is1D=e[0].is1D;else if(e[0].is2DReshaped){this.output.is2DReshaped=e[0].is2DReshaped,this.output.originalShape=e[0].originalShape.slice();const t=0>this.concatAxis?this.output.originalShape.length+this.concatAxis:this.concatAxis;this.output.originalShape[t]=(0,r.default)(e.map((e)=>e.originalShape[t])),this.output.indicesForReshaped=s.createIndicesFor2DReshaped(this.output.originalShape,!1,t)}if(!this.mergeProgram){const t=this.output.glTextureFragments?this.output.glTextureFragmentShape:this.output.glTextureShape,r=(0,i.default)('concatenate',e.length,e.map((e)=>e.glTextureShape),t,a);this.mergeProgram=Kh.webgl2.compileProgram(r)}Kh.webgl2.runProgram({program:this.mergeProgram,output:this.output,inputs:e.map((e,t)=>({input:e,name:`inputs[${t}]`})),supportsTextureFragments:!0}),0===this.outbound.length&&(this.output.transferFromGLTexture(),this.output.is2DReshaped?this.output.reshapeFrom2D():this.output.is2DSquareReshaped&&this.output.reshapeFrom2DSquare())}}t.default=l});Ce(l_);var p_=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(Jf),o=a(gg),n=a(tm),s=a(dg);class i extends r.default{constructor(e={}){super(e),this.layerClass='Dot',this.mode='dot';const{axes:t=-1,normalize:a=!1}=e;this.dotAxes=Array.isArray(t)?[0>=t[0]?t[0]:t[0]-1,0>=t[1]?t[1]:t[1]-1]:[0>=t?t:t-1,0>=t?t:t-1],this.normalize=a,this.gpu&&(this.mergeProgram=Kh.webgl2.compileProgram('#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D input1;\nuniform sampler2D input2;\nuniform int rows;\nuniform int cols;\nuniform int dotAxis1;\nuniform int dotAxis2;\nuniform int commonDim;\nuniform bool normalize;\nout vec4 outColor;\n\nvoid main() {\n int out_x = int(float(cols) * outTex.x);\n int out_y = int(float(rows) * outTex.y);\n\n float sum = 0.;\n float a = 0.;\n float b = 0.;\n float norm1 = 0.;\n float norm2 = 0.;\n\n for (int i = 0; i < commonDim; ++i) {\n if (dotAxis1 == 0 && dotAxis2 == 0) {\n a = texelFetch(input1, ivec2(out_y, i), 0).r;\n b = texelFetch(input2, ivec2(out_x, i), 0).r;\n } else if (dotAxis1 == 1 && dotAxis2 == 1) {\n a = texelFetch(input1, ivec2(i, out_y), 0).r;\n b = texelFetch(input2, ivec2(i, out_x), 0).r;\n }\n\n sum += a * b;\n\n if (normalize) {\n norm1 += a * a;\n norm2 += b * b;\n }\n }\n\n if (normalize) {\n sum /= sqrt(norm1) * sqrt(norm2);\n }\n\n outColor = vec4(sum);\n}\n'))}_calcOutputShape(e){let t=e[0].slice(),a=e[1].slice();t.splice(this.dotAxes[0],1),a.splice(this.dotAxes[1],1),this.outputShape=t.concat(a),1===this.outputShape.length&&this.outputShape.push(1)}_callCPU(e){if(this._calcOutputShape([e[0].tensor.shape,e[1].tensor.shape]),this.output=new o.default([],this.outputShape),2!==e[0].tensor.shape.length||2!==e[1].tensor.shape.length)this.throwError('dot mode for 3+ dim tensors not yet implemented.');else if(0===this.dotAxes[0]&&0===this.dotAxes[1]){if(this.normalize){for(let t=0;t{e.glTexture||e.glTextureFragments||e.createGLTexture({type:'2d',format:'float'})}),this._calcOutputShape([e[0].glTextureShape,e[1].glTextureShape]),this.output||(this.output=new o.default([],this.outputShape),this.output.createGLTexture({type:'2d',format:'float'}));const t=e[0].glTextureShape[this.dotAxes[0]];Kh.webgl2.runProgram({program:this.mergeProgram,output:this.output,inputs:[{input:e[0],name:'input1'},{input:e[1],name:'input2'}],uniforms:[{value:this.output.glTextureShape[0],type:'int',name:'rows'},{value:this.output.glTextureShape[1],type:'int',name:'cols'},{value:this.dotAxes[0],type:'int',name:'dotAxis1'},{value:this.dotAxes[1],type:'int',name:'dotAxis2'},{value:t,type:'int',name:'commonDim'},{value:+this.normalize,type:'bool',name:'normalize'}]}),0===this.outbound.length&&this.output.transferFromGLTexture()}}t.default=i});Ce(p_);var d_=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),Object.defineProperty(t,'Add',{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,'Subtract',{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,'Multiply',{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,'Average',{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,'Maximum',{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,'Minimum',{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,'Concatenate',{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,'Dot',{enumerable:!0,get:function(){return p.default}});var r=a(e_),o=a(t_),n=a(a_),i=a(r_),s=a(o_),u=a(n_),l=a(l_),p=a(p_)});Ce(d_);var c_=ke(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var a=function(e){return e&&e.__esModule?e:{default:e}}(Zh);class r extends a.default{constructor(e={}){super(e),this.layerClass='GaussianDropout';const{rate:t=0.5}=e;this.rate=Rn(An(0,t),1)}call(e){return this.output=e,this.output}}t.default=r});Ce(c_);var h_=ke(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var a=function(e){return e&&e.__esModule?e:{default:e}}(Zh);class r extends a.default{constructor(e={}){super(e),this.layerClass='GaussianNoise';const{stddev:t=0}=e;this.stddev=t}call(e){return this.output=e,this.output}}t.default=r});Ce(h_);var g_=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),Object.defineProperty(t,'GaussianDropout',{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,'GaussianNoise',{enumerable:!0,get:function(){return o.default}});var r=a(c_),o=a(h_)});Ce(g_);var m_=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(Zh),o=a(gg),n=a(dg);class i extends r.default{constructor(e={}){super(e),this.layerClass='BatchNormalization';const{epsilon:t=1e-3,axis:a=-1,center:r=!0,scale:o=!0}=e;this.epsilon=t,this.center=r,this.scale=o,this.axis=a,this.axisNormalized=!1,this.params=[],this.scale&&this.params.push('gamma'),this.center&&this.params.push('beta'),this.params=this.params.concat(['moving_mean','moving_variance']),this.gpu&&(this.program=Kh.webgl2.compileProgram('#version 300 es\nprecision highp float;\nprecision highp isampler2D;\n\nin vec2 outTex;\nuniform sampler2D X;\nuniform isampler2D normAxisIndexMap;\nuniform sampler2D gamma;\nuniform sampler2D beta;\nuniform sampler2D mean;\nuniform sampler2D std;\nuniform float epsilon;\nuniform bool scale;\nuniform bool center;\nout vec4 outColor;\n\nvoid main() {\n ivec2 size = textureSize(X, 0);\n int out_x = int(float(size[0]) * outTex.x);\n int out_y = int(float(size[1]) * outTex.y);\n\nint normAxisIndex = texelFetch(normAxisIndexMap, ivec2(out_x, out_y), 0).r;\n\n float _x = texelFetch(X, ivec2(out_x, out_y), 0).r;\n float _mean = texelFetch(mean, ivec2(normAxisIndex, 0), 0).r;\n float _std = texelFetch(std, ivec2(normAxisIndex, 0), 0).r;\n\n float _gamma = 1.0;\n if (scale) {\n _gamma = texelFetch(gamma, ivec2(normAxisIndex, 0), 0).r;\n }\n\n float _beta = 0.0;\n if (center) {\n _beta = texelFetch(beta, ivec2(normAxisIndex, 0), 0).r;\n }\n\n float sum = _beta + _gamma * (_x - _mean) / sqrt(_std + epsilon);\n\n outColor = vec4(sum);\n}\n'))}call(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}_callCPU(e){this.axisNormalized||(this.axis=0>this.axis?e.tensor.shape.length+this.axis:this.axis-1,this.axisNormalized=!0);let t=[];for(let a=0;athis.axis?this.inputShape.length+this.axis:this.axis-1,this.axisNormalized=!0),e.glTexture||e.glTextureFragments||(2>=e.tensor.shape.length?e.createGLTexture({type:'2d',format:'float',supportsTextureFragments:!0}):2 val) {\n val = val2;\n }\n } else {\n val += val2;\n }\n count += 1;\n }\n }\n\n if (!isMaxPooling) {\n val /= float(count);\n }\n\n outColor = vec4(val);\n}\n'),this.poolingFragmentsProgram=Kh.webgl2.compileProgram('#version 300 es\nprecision highp float;\nprecision highp isampler2D;\n\nin vec2 outTex;\nuniform sampler2D x;\nuniform isampler2D poolIndexMap;\nuniform int channels;\nuniform int poolSize;\nuniform bool isMaxPooling;\nout vec4 outColor;\n\nvoid main() {\n ivec2 inputSize = textureSize(x, 0);\n ivec2 outputSize = textureSize(poolIndexMap, 0);\n int out_x = int(float(channels) * outTex.x);\n int out_y = int(float(outputSize[1]) * outTex.y);\n\n float val = 0.;\n int count = 0;\n for (int i = 0; i < poolSize; ++i) {\n int poolIndex = texelFetch(poolIndexMap, ivec2(i, out_y), 0).r;\n int fragmentIndex = int(floor(float(poolIndex) / float(inputSize[1])));\n if (poolIndex != -1) {\n poolIndex = int(mod(float(poolIndex), float(inputSize[1])));\n float val2 = texelFetch(x, ivec2(fragmentIndex * channels + out_x, poolIndex), 0).r;\n if (isMaxPooling) {\n if (count == 0 || val2 > val) {\n val = val2;\n }\n } else {\n val += val2;\n }\n count += 1;\n }\n }\n\n if (!isMaxPooling) {\n val /= float(count);\n }\n\n outColor = vec4(val);\n}\n'))}call(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}_callCPU(e){const t='valid'===this.padding?kn((e.tensor.shape[0]-this.poolSize+this.strides)/this.strides):kn((e.tensor.shape[0]+this.strides-1)/this.strides);this.output=new o.default([],[t,e.tensor.shape[1]]);const a=new o.default([],[e.tensor.shape[1]]);let r='valid'===this.padding?0:Rn(0,In((e.tensor.shape[0]-(t-1)*this.strides-this.poolSize)/2));for(let o=0;oe.tensor.shape[0]-1);r++)'max'===this.poolingFunc?n.default.maxeq(a.tensor,e.tensor.pick(t+r,null)):'average'===this.poolingFunc&&n.default.addeq(a.tensor,e.tensor.pick(t+r,null)),s+=1;'average'===this.poolingFunc&&n.default.divseq(a.tensor,s),n.default.assign(this.output.tensor.pick(o,null),a.tensor),r+=this.strides}}_createIndexMap(){if(this.poolIndexMap)return;const e='valid'===this.padding?kn((this.inputShape[0]-this.poolSize+this.strides)/this.strides):kn((this.inputShape[0]+this.strides-1)/this.strides);this.outputShape=[e,this.inputShape[1]],this.poolIndexMap=new o.default([],[e,this.poolSize],{type:Int32Array}),n.default.assigns(this.poolIndexMap.tensor,-1);let t='valid'===this.padding?0:Rn(0,In((this.inputShape[0]-(e-1)*this.strides-this.poolSize)/2));for(let a=0;a1 val) {\n val = val2;\n }\n } else {\n val += val2;\n }\n count += 1;\n }\n }\n\n if (!isMaxPooling) {\n val /= float(count);\n }\n\n outColor = vec4(val);\n}\n'),this.poolingFragmentsProgram=Kh.webgl2.compileProgram('#version 300 es\nprecision highp float;\nprecision highp isampler2D;\n\nin vec2 outTex;\nuniform sampler2D x;\nuniform isampler2D poolIndexMap;\nuniform int channels;\nuniform int poolSize;\nuniform bool isMaxPooling;\nout vec4 outColor;\n\nvoid main() {\n ivec2 inputSize = textureSize(x, 0);\n ivec2 outputSize = textureSize(poolIndexMap, 0);\n int out_x = int(float(channels) * outTex.x);\n int out_y = int(float(outputSize[1]) * outTex.y);\n\n float val = 0.;\n int count = 0;\n for (int i = 0; i < poolSize; ++i) {\n int poolIndex = texelFetch(poolIndexMap, ivec2(i, out_y), 0).r;\n int fragmentIndex = int(floor(float(poolIndex) / float(inputSize[1])));\n if (poolIndex != -1) {\n poolIndex = int(mod(float(poolIndex), float(inputSize[1])));\n float val2 = texelFetch(x, ivec2(fragmentIndex * channels + out_x, poolIndex), 0).r;\n if (isMaxPooling) {\n if (count == 0 || val2 > val) {\n val = val2;\n }\n } else {\n val += val2;\n }\n count += 1;\n }\n }\n\n if (!isMaxPooling) {\n val /= float(count);\n }\n\n outColor = vec4(val);\n}\n'))}call(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}_calcOutputShape(e){if(!(this.outputShape&&this.inputPadding)){const[t,a,r]=e,[o,n]=this.poolSize,i='same'===this.padding?kn((t+this.strides[0]-1)/this.strides[0]):kn((t-o+this.strides[0])/this.strides[0]),s='same'===this.padding?kn((a+this.strides[1]-1)/this.strides[1]):kn((a-n+this.strides[1])/this.strides[1]),u='same'===this.padding?An(0,kn((i-1)*this.strides[0]+o-t)):0,l='same'===this.padding?An(0,kn((s-1)*this.strides[1]+n-a)):0,p=kn(u/2),d=kn(l/2);this.outputShape=[i,s,r],this.inputPadding=[p,u-p,d,l-d]}}_padInput(e){if('same'===this.padding){const[t,a,r]=e.tensor.shape,[n,i,u,l]=this.inputPadding,p=new o.default([],[t+n+i,a+u+l,r]);return'max'===this.poolingFunc&&s.default.assigns(p.tensor,Number.NEGATIVE_INFINITY),s.default.assign(p.tensor.hi(t+n,a+u,r).lo(n,u,0),e.tensor),p}return e}_callCPU(e){'channels_first'===this.dataFormat&&(e.tensor=e.tensor.transpose(1,2,0)),this._calcOutputShape(e.tensor.shape),e=this._padInput(e);const[t,a,r]=e.tensor.shape,[n,u]=this.poolSize;this.output=new o.default([],this.outputShape);const l=new o.default([],[n,u,r]),[p,d,c,h]=this.inputPadding;for(let o=0,i=0,g;o<=t-n;o+=this.strides[0],i++){g=0,ot-d&&(g=o+n-(t-d));for(let t=0,p=0,d;t<=a-u;t+=this.strides[1],p++){d=0,ta-h&&(d=t+u-(a-h));const m=(n-g)*(u-d);s.default.assign(l.tensor,e.tensor.hi(o+n,t+u,r).lo(o,t,0));for(let e=0;e1 val) {\n val = val2;\n }\n } else {\n val += val2;\n }\n count += 1;\n }\n }\n\n if (!isMaxPooling) {\n val /= float(count);\n }\n\n outColor = vec4(val);\n}\n'),this.poolingFragmentsProgram=Kh.webgl2.compileProgram('#version 300 es\nprecision highp float;\nprecision highp isampler2D;\n\nin vec2 outTex;\nuniform sampler2D x;\nuniform isampler2D poolIndexMap;\nuniform int channels;\nuniform int poolSize;\nuniform bool isMaxPooling;\nout vec4 outColor;\n\nvoid main() {\n ivec2 inputSize = textureSize(x, 0);\n ivec2 outputSize = textureSize(poolIndexMap, 0);\n int out_x = int(float(channels) * outTex.x);\n int out_y = int(float(outputSize[1]) * outTex.y);\n\n float val = 0.;\n int count = 0;\n for (int i = 0; i < poolSize; ++i) {\n int poolIndex = texelFetch(poolIndexMap, ivec2(i, out_y), 0).r;\n int fragmentIndex = int(floor(float(poolIndex) / float(inputSize[1])));\n if (poolIndex != -1) {\n poolIndex = int(mod(float(poolIndex), float(inputSize[1])));\n float val2 = texelFetch(x, ivec2(fragmentIndex * channels + out_x, poolIndex), 0).r;\n if (isMaxPooling) {\n if (count == 0 || val2 > val) {\n val = val2;\n }\n } else {\n val += val2;\n }\n count += 1;\n }\n }\n\n if (!isMaxPooling) {\n val /= float(count);\n }\n\n outColor = vec4(val);\n}\n'))}call(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}_calcOutputShape(e){if(!(this.outputShape&&this.inputPadding)){const[t,a,r,o]=e,[n,i,s]=this.poolSize,u='same'===this.padding?kn((t+this.strides[0]-1)/this.strides[0]):kn((t-n+this.strides[0])/this.strides[0]),l='same'===this.padding?kn((a+this.strides[1]-1)/this.strides[1]):kn((a-i+this.strides[1])/this.strides[1]),p='same'===this.padding?kn((r+this.strides[2]-1)/this.strides[2]):kn((r-s+this.strides[2])/this.strides[2]),d='same'===this.padding?An(0,kn((u-1)*this.strides[0]+n-t)):0,c='same'===this.padding?An(0,kn((l-1)*this.strides[1]+i-a)):0,h='same'===this.padding?An(0,kn((p-1)*this.strides[2]+s-r)):0,g=kn(d/2),m=kn(c/2),f=kn(h/2);this.outputShape=[u,l,p,o],this.inputPadding=[g,d-g,m,c-m,f,h-f]}}_padInput(e){if('same'===this.padding){const[t,a,r,n]=e.tensor.shape,[i,u,l,p,d,c]=this.inputPadding,h=new o.default([],[t+i+u,a+l+p,r+d+c,n]);return'max'===this.poolingFunc&&s.default.assigns(h.tensor,Number.NEGATIVE_INFINITY),s.default.assign(h.tensor.hi(t+i,a+l,r+d,n).lo(i,l,d,0),e.tensor),h}return e}_callCPU(e){'channels_first'===this.dataFormat&&(e.tensor=e.tensor.transpose(1,2,3,0)),this._calcOutputShape(e.tensor.shape),e=this._padInput(e);const[t,a,r,n]=e.tensor.shape,[u,l,p]=this.poolSize;this.output=new o.default([],this.outputShape);let d=new o.default([],[u,l,p,n]);const[c,h,g,m,f,_]=this.inputPadding;for(let o=0,i=0,x;o<=t-u;o+=this.strides[0],i++){x=0,ot-h&&(x=o+u-(t-h));for(let t=0,h=0,c;t<=a-l;t+=this.strides[1],h++){c=0,ta-m&&(c=t+l-(a-m));for(let a=0,g=0,m;a<=r-p;a+=this.strides[2],g++){m=0,ar-_&&(m=a+p-(r-_));const y=(u-x)*(l-c)*(p-m);s.default.assign(d.tensor,e.tensor.hi(o+u,t+l,a+p,n).lo(o,t,a,0));for(let e=0;e maxval) {\n maxval = val;\n }\n }\n outColor = vec4(maxval);\n } else {\n // GlobalAveragePooling\n float sum = 0.0;\n for (int j = 0; j < size[1]; ++j) {\n float val = texelFetch(x, ivec2(out_x, j), 0).r;\n sum += val;\n }\n outColor = vec4(sum / float(channelDataSize));\n }\n}\n'))}call(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}_callCPU(e){const[t,a]=e.tensor.shape;this.output=new o.default([],[a]);for(let r=0;r maxval) {\n maxval = val;\n }\n }\n outColor = vec4(maxval);\n } else {\n // GlobalAveragePooling\n float sum = 0.0;\n for (int j = 0; j < size[1]; ++j) {\n float val = texelFetch(x, ivec2(out_x, j), 0).r;\n sum += val;\n }\n outColor = vec4(sum / float(channelDataSize));\n }\n}\n'))}call(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}_callCPU(e){'channels_first'===this.dataFormat&&(e.tensor=e.tensor.transpose(1,2,0));const[t,a,r]=e.tensor.shape;this.output=new o.default([],[r]);for(let o=0;o maxval) {\n maxval = val;\n }\n }\n outColor = vec4(maxval);\n } else {\n // GlobalAveragePooling\n float sum = 0.0;\n for (int j = 0; j < size[1]; ++j) {\n float val = texelFetch(x, ivec2(out_x, j), 0).r;\n sum += val;\n }\n outColor = vec4(sum / float(channelDataSize));\n }\n}\n'))}call(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}_callCPU(e){'channels_first'===this.dataFormat&&(e.tensor=e.tensor.transpose(1,2,3,0));const[t,a,r,s]=e.tensor.shape;this.output=new o.default([],[s]);for(let o=0;o{s.default.assign(i.tensor,a.tensor),(0,rf.gemv)(1,this.weights.kernel.tensor.transpose(1,0),u.tensor,1,r.tensor),(0,rf.gemv)(1,this.weights.recurrent_kernel.tensor.transpose(1,0),i.tensor,1,o.tensor),this._combine(a.tensor,r.tensor,o.tensor,this.weights.bias.tensor),this.activationFunc(a)};for(let t=0,n=e.tensor.shape[0];ts.default.assigns(e.tensor,0)),l(),this.returnSequences&&s.default.assign(this.hiddenStateSequence.tensor.pick(t,null),a.tensor)}this.output=this.returnSequences?this.hiddenStateSequence:a,this.stateful&&(this.currentHiddenState=a)}_stepGPU(){Kh.webgl2.runProgram({program:this.copyTextureProgram,output:this.previousHiddenState,inputs:[{input:this.currentHiddenState,name:'source'}]}),Kh.webgl2.runProgram({program:this.matMulProgram,output:this.tempXH,inputs:[{input:this.currentX,name:'A'},{input:this.weights.kernel,name:'B'}],uniforms:[{value:0,type:'bool',name:'addC'}]}),Kh.webgl2.runProgram({program:this.matMulProgram,output:this.tempHH,inputs:[{input:this.previousHiddenState,name:'A'},{input:this.weights.recurrent_kernel,name:'B'}],uniforms:[{value:0,type:'bool',name:'addC'}]}),Kh.webgl2.runProgram({program:this.gateSummationProgram,output:this.currentHiddenStatePreactiv,inputs:[{input:this.tempXH,name:'t1'},{input:this.tempHH,name:'t2'},{input:this.weights.bias,name:'bias'}]}),'linear'===this.activation?this.currentHiddenState=this.currentHiddenStatePreactiv:Kh.webgl2.runProgram({program:this.activationProgram,output:this.currentHiddenState,inputs:[{input:this.currentHiddenStatePreactiv,name:'x'}]})}_callGPU(e){e.glTexture||e.createGLTexture({type:'2d',format:'float'});const t=this.units;this.currentHiddenState&&this.stateful||(this.currentHiddenState=new n.default([],[t]),this.currentHiddenState.createGLTexture({type:'2d',format:'float'})),this.currentHiddenStatePreactiv||(this.currentHiddenStatePreactiv=new n.default([],[t]),this.currentHiddenStatePreactiv.createGLTexture({type:'2d',format:'float'})),this.tempXH||(this.tempXH=new n.default([],[t]),this.tempXH.createGLTexture({type:'2d',format:'float'})),this.tempHH||(this.tempHH=new n.default([],[t]),this.tempHH.createGLTexture({type:'2d',format:'float'})),this.previousHiddenState||(this.previousHiddenState=new n.default([],[t]),this.previousHiddenState.createGLTexture({type:'2d',format:'float'})),this.hiddenStateSequence||(this.hiddenStateSequence=new n.default([],[e.glTextureShape[0],t]),this.hiddenStateSequence.createGLTexture({type:'2d',format:'float'})),this.hiddenStateSequenceCopy||(this.hiddenStateSequenceCopy=new n.default([],[e.glTextureShape[0],t]),this.hiddenStateSequenceCopy.createGLTexture({type:'2d',format:'float'})),this.currentX||(this.currentX=new n.default([],[e.glTextureShape[1]]),this.currentX.createGLTexture({type:'2d',format:'float'}));for(let t=0,a=e.glTextureShape[0];t{this.weights[e].createGLTexture({type:'2d',format:'float'})})}}call(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}_callCPU(e){const t=this.weights.b_i.tensor.shape[0],a=this.weights.b_c.tensor.shape[0],r=this.weights.b_f.tensor.shape[0],o=this.weights.b_o.tensor.shape[0],i=new n.default([],[t]),u=new n.default([],[t]),l=new n.default([],[t]),p=new n.default([],[r]),d=new n.default([],[r]),c=new n.default([],[r]),h=new n.default([],[o]),g=new n.default([],[o]),m=new n.default([],[o]),f=new n.default([],[a]),_=new n.default([],[a]),x=new n.default([],[a]),y=this.stateful&&this.previousCandidate?this.previousCandidate:new n.default([],[a]),v=this.stateful&&this.currentHiddenState?this.currentHiddenState:new n.default([],[a]),b=new n.default([],[a]);this.hiddenStateSequence=new n.default([],[e.tensor.shape[0],a]);const S=new n.default([],[e.tensor.shape[1]]),T=()=>{s.default.assign(b.tensor,v.tensor),(0,rf.gemv)(1,this.weights.W_i.tensor.transpose(1,0),S.tensor,1,u.tensor),(0,rf.gemv)(1,this.weights.U_i.tensor.transpose(1,0),b.tensor,1,l.tensor),this._combine(i.tensor,u.tensor,l.tensor,this.weights.b_i.tensor),this.recurrentActivationFunc(i),(0,rf.gemv)(1,this.weights.W_f.tensor.transpose(1,0),S.tensor,1,d.tensor),(0,rf.gemv)(1,this.weights.U_f.tensor.transpose(1,0),b.tensor,1,c.tensor),this._combine(p.tensor,d.tensor,c.tensor,this.weights.b_f.tensor),this.recurrentActivationFunc(p),(0,rf.gemv)(1,this.weights.W_o.tensor.transpose(1,0),S.tensor,1,g.tensor),(0,rf.gemv)(1,this.weights.U_o.tensor.transpose(1,0),b.tensor,1,m.tensor),this._combine(h.tensor,g.tensor,m.tensor,this.weights.b_o.tensor),this.recurrentActivationFunc(h),(0,rf.gemv)(1,this.weights.W_c.tensor.transpose(1,0),S.tensor,1,_.tensor),(0,rf.gemv)(1,this.weights.U_c.tensor.transpose(1,0),b.tensor,1,x.tensor),this._combine(f.tensor,_.tensor,x.tensor,this.weights.b_c.tensor),this.activationFunc(f),this._update(f.tensor,y.tensor,i.tensor,p.tensor),s.default.assign(y.tensor,f.tensor),this.activationFunc(f),s.default.mul(v.tensor,h.tensor,f.tensor)};for(let t=0,a=e.tensor.shape[0];ts.default.assigns(e.tensor,0)),T(),s.default.assign(this.hiddenStateSequence.tensor.pick(t,null),v.tensor)}this.output=this.returnSequences?this.hiddenStateSequence:v,this.stateful&&(this.previousCandidate=y,this.currentHiddenState=v)}_stepGPU(){Kh.webgl2.runProgram({program:this.copyTextureProgram,output:this.previousHiddenState,inputs:[{input:this.currentHiddenState,name:'source'}]}),Kh.webgl2.runProgram({program:this.matMulProgram,output:this.tempXI,inputs:[{input:this.currentX,name:'A'},{input:this.weights.W_i,name:'B'}],uniforms:[{value:0,type:'bool',name:'addC'}]}),Kh.webgl2.runProgram({program:this.matMulProgram,output:this.tempHI,inputs:[{input:this.previousHiddenState,name:'A'},{input:this.weights.U_i,name:'B'}],uniforms:[{value:0,type:'bool',name:'addC'}]}),Kh.webgl2.runProgram({program:this.gateSummationProgram,output:this.currentInputGateStatePreactiv,inputs:[{input:this.tempXI,name:'t1'},{input:this.tempHI,name:'t2'},{input:this.weights.b_i,name:'bias'}]}),'linear'===this.recurrentActivation?this.currentInputGateState=this.currentInputGateStatePreactiv:Kh.webgl2.runProgram({program:this.recurrentActivationProgram,output:this.currentInputGateState,inputs:[{input:this.currentInputGateStatePreactiv,name:'x'}]}),Kh.webgl2.runProgram({program:this.matMulProgram,output:this.tempXF,inputs:[{input:this.currentX,name:'A'},{input:this.weights.W_f,name:'B'}],uniforms:[{value:0,type:'bool',name:'addC'}]}),Kh.webgl2.runProgram({program:this.matMulProgram,output:this.tempHF,inputs:[{input:this.previousHiddenState,name:'A'},{input:this.weights.U_f,name:'B'}],uniforms:[{value:0,type:'bool',name:'addC'}]}),Kh.webgl2.runProgram({program:this.gateSummationProgram,output:this.currentForgetGateStatePreactiv,inputs:[{input:this.tempXF,name:'t1'},{input:this.tempHF,name:'t2'},{input:this.weights.b_f,name:'bias'}]}),'linear'===this.recurrentActivation?this.currentForgetGateState=this.currentForgetGateStatePreactiv:Kh.webgl2.runProgram({program:this.recurrentActivationProgram,output:this.currentForgetGateState,inputs:[{input:this.currentForgetGateStatePreactiv,name:'x'}]}),Kh.webgl2.runProgram({program:this.matMulProgram,output:this.tempXO,inputs:[{input:this.currentX,name:'A'},{input:this.weights.W_o,name:'B'}],uniforms:[{value:0,type:'bool',name:'addC'}]}),Kh.webgl2.runProgram({program:this.matMulProgram,output:this.tempHO,inputs:[{input:this.previousHiddenState,name:'A'},{input:this.weights.U_o,name:'B'}],uniforms:[{value:0,type:'bool',name:'addC'}]}),Kh.webgl2.runProgram({program:this.gateSummationProgram,output:this.currentOutputGateStatePreactiv,inputs:[{input:this.tempXO,name:'t1'},{input:this.tempHO,name:'t2'},{input:this.weights.b_o,name:'bias'}]}),'linear'===this.recurrentActivation?this.currentOutputGateState=this.currentOutputGateStatePreactiv:Kh.webgl2.runProgram({program:this.recurrentActivationProgram,output:this.currentOutputGateState,inputs:[{input:this.currentOutputGateStatePreactiv,name:'x'}]}),Kh.webgl2.runProgram({program:this.matMulProgram,output:this.tempXC,inputs:[{input:this.currentX,name:'A'},{input:this.weights.W_c,name:'B'}],uniforms:[{value:0,type:'bool',name:'addC'}]}),Kh.webgl2.runProgram({program:this.matMulProgram,output:this.tempHC,inputs:[{input:this.previousHiddenState,name:'A'},{input:this.weights.U_c,name:'B'}],uniforms:[{value:0,type:'bool',name:'addC'}]}),Kh.webgl2.runProgram({program:this.gateSummationProgram,output:this.currentCandidatePreactiv,inputs:[{input:this.tempXC,name:'t1'},{input:this.tempHC,name:'t2'},{input:this.weights.b_c,name:'bias'}]}),'linear'===this.activation?this.currentCandidate=this.currentCandidatePreactiv:Kh.webgl2.runProgram({program:this.activationProgram,output:this.currentCandidate,inputs:[{input:this.currentCandidatePreactiv,name:'x'}]}),Kh.webgl2.runProgram({program:this.copyTextureProgram,output:this.currentCandidateCopy,inputs:[{input:this.currentCandidate,name:'source'}]}),Kh.webgl2.runProgram({program:this.updateProgram,output:this.currentCandidate,inputs:[{input:this.currentCandidateCopy,name:'c'},{input:this.previousCandidate,name:'ctm1'},{input:this.currentInputGateState,name:'i'},{input:this.currentForgetGateState,name:'f'}]}),Kh.webgl2.runProgram({program:this.copyTextureProgram,output:this.previousCandidate,inputs:[{input:this.currentCandidate,name:'source'}]}),Kh.webgl2.runProgram({program:this.copyTextureProgram,output:this.currentCandidatePreactiv,inputs:[{input:this.currentCandidate,name:'source'}]}),'linear'===this.activation?this.currentCandidate=this.currentCandidatePreactiv:Kh.webgl2.runProgram({program:this.activationProgram,output:this.currentCandidate,inputs:[{input:this.currentCandidatePreactiv,name:'x'}]}),Kh.webgl2.runProgram({program:this.gateProductProgram,output:this.currentHiddenState,inputs:[{input:this.currentOutputGateState,name:'t1'},{input:this.currentCandidate,name:'t2'}]})}_callGPU(e){e.glTexture||e.createGLTexture({type:'2d',format:'float'});const t=this.weights.b_i.glTextureShape[1],a=this.weights.b_c.glTextureShape[1],r=this.weights.b_f.glTextureShape[1],o=this.weights.b_o.glTextureShape[1];this.currentInputGateState||(this.currentInputGateState=new n.default([],[t]),this.currentInputGateState.createGLTexture({type:'2d',format:'float'})),this.currentInputGateStatePreactiv||(this.currentInputGateStatePreactiv=new n.default([],[t]),this.currentInputGateStatePreactiv.createGLTexture({type:'2d',format:'float'})),this.tempXI||(this.tempXI=new n.default([],[t]),this.tempXI.createGLTexture({type:'2d',format:'float'})),this.tempHI||(this.tempHI=new n.default([],[t]),this.tempHI.createGLTexture({type:'2d',format:'float'})),this.currentForgetGateState||(this.currentForgetGateState=new n.default([],[r]),this.currentForgetGateState.createGLTexture({type:'2d',format:'float'})),this.currentForgetGateStatePreactiv||(this.currentForgetGateStatePreactiv=new n.default([],[r]),this.currentForgetGateStatePreactiv.createGLTexture({type:'2d',format:'float'})),this.tempXF||(this.tempXF=new n.default([],[r]),this.tempXF.createGLTexture({type:'2d',format:'float'})),this.tempHF||(this.tempHF=new n.default([],[r]),this.tempHF.createGLTexture({type:'2d',format:'float'})),this.currentOutputGateState||(this.currentOutputGateState=new n.default([],[o]),this.currentOutputGateState.createGLTexture({type:'2d',format:'float'})),this.currentOutputGateStatePreactiv||(this.currentOutputGateStatePreactiv=new n.default([],[o]),this.currentOutputGateStatePreactiv.createGLTexture({type:'2d',format:'float'})),this.tempXO||(this.tempXO=new n.default([],[o]),this.tempXO.createGLTexture({type:'2d',format:'float'})),this.tempHO||(this.tempHO=new n.default([],[o]),this.tempHO.createGLTexture({type:'2d',format:'float'})),this.currentCandidate||(this.currentCandidate=new n.default([],[a]),this.currentCandidate.createGLTexture({type:'2d',format:'float'})),this.currentCandidateCopy||(this.currentCandidateCopy=new n.default([],[a]),this.currentCandidateCopy.createGLTexture({type:'2d',format:'float'})),this.currentCandidatePreactiv||(this.currentCandidatePreactiv=new n.default([],[a]),this.currentCandidatePreactiv.createGLTexture({type:'2d',format:'float'})),this.tempXC||(this.tempXC=new n.default([],[a]),this.tempXC.createGLTexture({type:'2d',format:'float'})),this.tempHC||(this.tempHC=new n.default([],[a]),this.tempHC.createGLTexture({type:'2d',format:'float'})),this.previousCandidate&&this.stateful||(this.previousCandidate=new n.default([],[a]),this.previousCandidate.createGLTexture({type:'2d',format:'float'})),this.currentHiddenState&&this.stateful||(this.currentHiddenState=new n.default([],[a]),this.currentHiddenState.createGLTexture({type:'2d',format:'float'})),this.previousHiddenState||(this.previousHiddenState=new n.default([],[a]),this.previousHiddenState.createGLTexture({type:'2d',format:'float'})),this.hiddenStateSequence||(this.hiddenStateSequence=new n.default([],[e.glTextureShape[0],a]),this.hiddenStateSequence.createGLTexture({type:'2d',format:'float'})),this.hiddenStateSequenceCopy||(this.hiddenStateSequenceCopy=new n.default([],[e.glTextureShape[0],a]),this.hiddenStateSequenceCopy.createGLTexture({type:'2d',format:'float'})),this.currentX||(this.currentX=new n.default([],[e.glTextureShape[1]]),this.currentX.createGLTexture({type:'2d',format:'float'}));for(let t=0,a=e.glTextureShape[0];t{this.weights[e].createGLTexture({type:'2d',format:'float'})})}}call(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}_callCPU(e){const t=this.weights.b_z.tensor.shape[0],a=this.weights.b_r.tensor.shape[0],r=this.weights.b_h.tensor.shape[0],o=new n.default([],[t]),u=new n.default([],[t]),l=new n.default([],[t]),i=new n.default([],[a]),p=new n.default([],[a]),d=new n.default([],[a]),c=this.stateful&&this.currentHiddenState?this.currentHiddenState:new n.default([],[r]),h=new n.default([],[r]),g=new n.default([],[r]),m=new n.default([],[r]);this.hiddenStateSequence=new n.default([],[e.tensor.shape[0],r]);const f=new n.default([],[e.tensor.shape[1]]),_=()=>{s.default.assign(m.tensor,c.tensor),(0,rf.gemv)(1,this.weights.W_z.tensor.transpose(1,0),f.tensor,1,u.tensor),(0,rf.gemv)(1,this.weights.U_z.tensor.transpose(1,0),m.tensor,1,l.tensor),this._combine(o.tensor,u.tensor,l.tensor,this.weights.b_z.tensor),this.recurrentActivationFunc(o),(0,rf.gemv)(1,this.weights.W_r.tensor.transpose(1,0),f.tensor,1,p.tensor),(0,rf.gemv)(1,this.weights.U_r.tensor.transpose(1,0),m.tensor,1,d.tensor),this._combine(i.tensor,p.tensor,d.tensor,this.weights.b_r.tensor),this.recurrentActivationFunc(i),s.default.muleq(i.tensor,m.tensor),(0,rf.gemv)(1,this.weights.W_h.tensor.transpose(1,0),f.tensor,1,h.tensor),(0,rf.gemv)(1,this.weights.U_h.tensor.transpose(1,0),i.tensor,1,g.tensor),this._combine(c.tensor,h.tensor,g.tensor,this.weights.b_h.tensor),this.activationFunc(c),this._update(c.tensor,m.tensor,o.tensor)};for(let t=0,a=e.tensor.shape[0];ts.default.assigns(e.tensor,0)),_(),this.returnSequences&&s.default.assign(this.hiddenStateSequence.tensor.pick(t,null),c.tensor)}this.output=this.returnSequences?this.hiddenStateSequence:c,this.stateful&&(this.currentHiddenState=c)}_stepGPU(){Kh.webgl2.runProgram({program:this.copyTextureProgram,output:this.previousHiddenState,inputs:[{input:this.currentHiddenState,name:'source'}]}),Kh.webgl2.runProgram({program:this.matMulProgram,output:this.tempXZ,inputs:[{input:this.currentX,name:'A'},{input:this.weights.W_z,name:'B'}],uniforms:[{value:0,type:'bool',name:'addC'}]}),Kh.webgl2.runProgram({program:this.matMulProgram,output:this.tempHZ,inputs:[{input:this.previousHiddenState,name:'A'},{input:this.weights.U_z,name:'B'}],uniforms:[{value:0,type:'bool',name:'addC'}]}),Kh.webgl2.runProgram({program:this.gateSummationProgram,output:this.currentUpdateGateStatePreactiv,inputs:[{input:this.tempXZ,name:'t1'},{input:this.tempHZ,name:'t2'},{input:this.weights.b_z,name:'bias'}]}),'linear'===this.recurrentActivation?this.currentUpdateGateState=this.currentUpdateGateStatePreactiv:Kh.webgl2.runProgram({program:this.recurrentActivationProgram,output:this.currentUpdateGateState,inputs:[{input:this.currentUpdateGateStatePreactiv,name:'x'}]}),Kh.webgl2.runProgram({program:this.matMulProgram,output:this.tempXR,inputs:[{input:this.currentX,name:'A'},{input:this.weights.W_r,name:'B'}],uniforms:[{value:0,type:'bool',name:'addC'}]}),Kh.webgl2.runProgram({program:this.matMulProgram,output:this.tempHR,inputs:[{input:this.previousHiddenState,name:'A'},{input:this.weights.U_r,name:'B'}],uniforms:[{value:0,type:'bool',name:'addC'}]}),Kh.webgl2.runProgram({program:this.gateSummationProgram,output:this.currentResetGateStatePreactiv,inputs:[{input:this.tempXR,name:'t1'},{input:this.tempHR,name:'t2'},{input:this.weights.b_r,name:'bias'}]}),'linear'===this.recurrentActivation?this.currentResetGateState=this.currentResetGateStatePreactiv:Kh.webgl2.runProgram({program:this.recurrentActivationProgram,output:this.currentResetGateState,inputs:[{input:this.currentResetGateStatePreactiv,name:'x'}]}),Kh.webgl2.runProgram({program:this.copyTextureProgram,output:this.currentResetGateStateCopy,inputs:[{input:this.currentResetGateState,name:'source'}]}),Kh.webgl2.runProgram({program:this.gateProductProgram,output:this.currentResetGateState,inputs:[{input:this.currentResetGateStateCopy,name:'t1'},{input:this.previousHiddenState,name:'t2'}]}),Kh.webgl2.runProgram({program:this.matMulProgram,output:this.tempXH,inputs:[{input:this.currentX,name:'A'},{input:this.weights.W_h,name:'B'}],uniforms:[{value:0,type:'bool',name:'addC'}]}),Kh.webgl2.runProgram({program:this.matMulProgram,output:this.tempHH,inputs:[{input:this.currentResetGateState,name:'A'},{input:this.weights.U_h,name:'B'}],uniforms:[{value:0,type:'bool',name:'addC'}]}),Kh.webgl2.runProgram({program:this.gateSummationProgram,output:this.currentHiddenStatePreactiv,inputs:[{input:this.tempXH,name:'t1'},{input:this.tempHH,name:'t2'},{input:this.weights.b_h,name:'bias'}]}),'linear'===this.activation?this.currentHiddenState=this.currentHiddenStatePreactiv:Kh.webgl2.runProgram({program:this.activationProgram,output:this.currentHiddenState,inputs:[{input:this.currentHiddenStatePreactiv,name:'x'}]}),Kh.webgl2.runProgram({program:this.copyTextureProgram,output:this.currentHiddenStateCopy,inputs:[{input:this.currentHiddenState,name:'source'}]}),Kh.webgl2.runProgram({program:this.updateProgram,output:this.currentHiddenState,inputs:[{input:this.currentHiddenStateCopy,name:'h'},{input:this.previousHiddenState,name:'htm1'},{input:this.currentUpdateGateState,name:'z'}]})}_callGPU(e){e.glTexture||e.createGLTexture({type:'2d',format:'float'});const t=this.weights.b_z.glTextureShape[1],a=this.weights.b_r.glTextureShape[1],r=this.weights.b_h.glTextureShape[1];this.currentHiddenState&&this.stateful||(this.currentHiddenState=new n.default([],[r]),this.currentHiddenState.createGLTexture({type:'2d',format:'float'})),this.currentHiddenStateCopy||(this.currentHiddenStateCopy=new n.default([],[r]),this.currentHiddenStateCopy.createGLTexture({type:'2d',format:'float'})),this.currentHiddenStatePreactiv||(this.currentHiddenStatePreactiv=new n.default([],[r]),this.currentHiddenStatePreactiv.createGLTexture({type:'2d',format:'float'})),this.currentUpdateGateState||(this.currentUpdateGateState=new n.default([],[t]),this.currentUpdateGateState.createGLTexture({type:'2d',format:'float'})),this.currentUpdateGateStatePreactiv||(this.currentUpdateGateStatePreactiv=new n.default([],[t]),this.currentUpdateGateStatePreactiv.createGLTexture({type:'2d',format:'float'})),this.tempXZ||(this.tempXZ=new n.default([],[t]),this.tempXZ.createGLTexture({type:'2d',format:'float'})),this.tempHZ||(this.tempHZ=new n.default([],[t]),this.tempHZ.createGLTexture({type:'2d',format:'float'})),this.currentResetGateState||(this.currentResetGateState=new n.default([],[a]),this.currentResetGateState.createGLTexture({type:'2d',format:'float'})),this.currentResetGateStateCopy||(this.currentResetGateStateCopy=new n.default([],[a]),this.currentResetGateStateCopy.createGLTexture({type:'2d',format:'float'})),this.currentResetGateStatePreactiv||(this.currentResetGateStatePreactiv=new n.default([],[a]),this.currentResetGateStatePreactiv.createGLTexture({type:'2d',format:'float'})),this.tempXR||(this.tempXR=new n.default([],[a]),this.tempXR.createGLTexture({type:'2d',format:'float'})),this.tempHR||(this.tempHR=new n.default([],[a]),this.tempHR.createGLTexture({type:'2d',format:'float'})),this.tempXH||(this.tempXH=new n.default([],[r]),this.tempXH.createGLTexture({type:'2d',format:'float'})),this.tempHH||(this.tempHH=new n.default([],[r]),this.tempHH.createGLTexture({type:'2d',format:'float'})),this.previousHiddenState||(this.previousHiddenState=new n.default([],[r]),this.previousHiddenState.createGLTexture({type:'2d',format:'float'})),this.hiddenStateSequence||(this.hiddenStateSequence=new n.default([],[e.glTextureShape[0],r]),this.hiddenStateSequence.createGLTexture({type:'2d',format:'float'})),this.hiddenStateSequenceCopy||(this.hiddenStateSequenceCopy=new n.default([],[e.glTextureShape[0],r]),this.hiddenStateSequenceCopy.createGLTexture({type:'2d',format:'float'})),this.currentX||(this.currentX=new n.default([],[e.glTextureShape[1]]),this.currentX.createGLTexture({type:'2d',format:'float'}));for(let t=0,a=e.glTextureShape[0];t=e.tensor.shape.length?e.createGLTexture({type:'2d',format:'float'}):2=a.length?this.slice.createGLTexture({type:'2d',format:'float'}):(this.slice.reshapeTo2DSquare(),this.slice.createGLTexture({type:'2d',format:'float'}))),2>=this.inputShape.length?Kh.webgl2.runProgram({program:this.selectSliceProgram,output:this.slice,inputs:[{input:e,name:'x'}],uniforms:[{value:0,type:'int',name:'t'}]}):Kh.webgl2.runProgram({program:this.mapInputProgram,output:this.slice,inputs:[{input:e,name:'x'},{input:this.indexMaps[0],name:'indexMap'}],uniforms:[{value:e.glTextureShape[1],type:'int',name:'inputCols'}]}),this.wrappedLayer._callGPU(this.slice),this.sliceOutput=this.wrappedLayer.output,this.output||(2>=this.inputShape.length?(this.outputShape=[t,this.sliceOutput.glTextureShape[1]],this.output=new o.default([],this.outputShape),this.outputCopy=new o.default([],this.outputShape),this.output.createGLTexture({type:'2d',format:'float'}),this.outputCopy.createGLTexture({type:'2d',format:'float'})):(this.outputShape=[t,...this.sliceOutput.originalShape],this.output=new o.default([],this.outputShape),this.outputCopy=new o.default([],this.outputShape),this.output.reshapeTo2DSquare(),this.outputCopy.reshapeTo2DSquare(),this.output.createGLTexture({type:'2d',format:'float'}),this.outputCopy.createGLTexture({type:'2d',format:'float'}),this._createOutputIndexMap(this.sliceOutput.indicesForReshaped))),Kh.webgl2.runProgram({program:this.copyTextureProgram,output:this.outputCopy,inputs:[{input:this.output,name:'source'}]}),2>=this.inputShape.length?Kh.webgl2.runProgram({program:this.copySliceOutputProgram,output:this.output,inputs:[{input:this.outputCopy,name:'outputCopy'},{input:this.sliceOutput,name:'sliceOutput'}],uniforms:[{value:0,type:'int',name:'t'},{value:t,type:'int',name:'timesteps'}]}):Kh.webgl2.runProgram({program:this.mapSliceOutputProgram,output:this.output,inputs:[{input:this.outputCopy,name:'outputCopy'},{input:this.sliceOutput,name:'sliceOutput'},{input:this.outputIndexMaps[0],name:'indexMap'}]});for(let a=1;a=this.inputShape.length?Kh.webgl2.runProgram({program:this.selectSliceProgram,output:this.slice,inputs:[{input:e,name:'x'}],uniforms:[{value:a,type:'int',name:'t'}]}):Kh.webgl2.runProgram({program:this.mapInputProgram,output:this.slice,inputs:[{input:e,name:'x'},{input:this.indexMaps[a],name:'indexMap'}],uniforms:[{value:e.glTextureShape[1],type:'int',name:'inputCols'}]}),this.wrappedLayer._callGPU(this.slice),this.sliceOutput=this.wrappedLayer.output,Kh.webgl2.runProgram({program:this.copyTextureProgram,output:this.outputCopy,inputs:[{input:this.output,name:'source'}]}),2>=this.inputShape.length?Kh.webgl2.runProgram({program:this.copySliceOutputProgram,output:this.output,inputs:[{input:this.outputCopy,name:'outputCopy'},{input:this.sliceOutput,name:'sliceOutput'}],uniforms:[{value:a,type:'int',name:'t'},{value:t,type:'int',name:'timesteps'}]}):Kh.webgl2.runProgram({program:this.mapSliceOutputProgram,output:this.output,inputs:[{input:this.outputCopy,name:'outputCopy'},{input:this.sliceOutput,name:'sliceOutput'},{input:this.outputIndexMaps[a],name:'indexMap'}]});0===this.outbound.length&&(this.output.transferFromGLTexture(),this.output.is2DReshaped?this.output.reshapeFrom2D():this.output.is2DSquareReshaped&&this.output.reshapeFrom2DSquare())}}t.default=s});Ce(q_);var U_=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(Zh),o=a(gg),n=a(dg),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,a):{};r.get||r.set?Object.defineProperty(t,a,r):t[a]=e[a]}return t.default=e,t}(O_);class s extends r.default{constructor(e={}){super(e),this.layerClass='Bidirectional';const{layer:t,merge_mode:a='concat'}=e;t||this.throwError('wrapped layer is undefined.'),['SimpleRNN','GRU','LSTM'].includes(t.class_name)||this.throwError(`cannot wrap ${t.class_name} layer.`),['concat','sum','mul','ave'].includes(a)||this.throwError(`merge_mode ${a} not supported.`);const r=Object.assign({},t.config,{gpu:e.gpu}),o=Object.assign({},t.config,{gpu:e.gpu});o.go_backwards=!o.go_backwards,this.forwardLayer=new i[t.class_name](r),this.backwardLayer=new i[t.class_name](o),this.forwardLayer.outbound=[null],this.backwardLayer.outbound=[null],this.mergeMode=a,this.returnSequences=t.config.return_sequences,this.gpu&&(this.copyTextureProgram=Kh.webgl2.compileProgram('#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D source;\nout vec4 outColor;\n\nvoid main(void) {\n outColor = texture(source, vec2(outTex.x, outTex.y));\n}\n'),'concat'===this.mergeMode?this.mergeProgram=Kh.webgl2.compileProgram('#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D forward;\nuniform sampler2D backward;\nout vec4 outColor;\n\nvoid main() {\n ivec2 size = textureSize(forward, 0);\n int out_x = int(float(size[0] * 2) * outTex.x);\n int out_y = int(float(size[1]) * outTex.y);\n\n if (out_x >= 0 && out_x < size[0]) {\n outColor = vec4(texelFetch(forward, ivec2(out_x, out_y), 0).r);\n } else {\n outColor = vec4(texelFetch(backward, ivec2(out_x - size[0], size[1] - out_y - 1), 0).r);\n }\n}\n'):'sum'===this.mergeMode?this.mergeProgram=Kh.webgl2.compileProgram('#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D forward;\nuniform sampler2D backward;\nout vec4 outColor;\n\nvoid main() {\n ivec2 size = textureSize(forward, 0);\n int out_x = int(float(size[0]) * outTex.x);\n int out_y = int(float(size[1]) * outTex.y);\n\n float forward_val = texelFetch(forward, ivec2(out_x, out_y), 0).r;\n float backward_val = texelFetch(backward, ivec2(out_x, size[1] - out_y - 1), 0).r;\n\n outColor = vec4(forward_val + backward_val);\n}\n'):'mul'===this.mergeMode?this.mergeProgram=Kh.webgl2.compileProgram('#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D forward;\nuniform sampler2D backward;\nout vec4 outColor;\n\nvoid main() {\n ivec2 size = textureSize(forward, 0);\n int out_x = int(float(size[0]) * outTex.x);\n int out_y = int(float(size[1]) * outTex.y);\n\n float forward_val = texelFetch(forward, ivec2(out_x, out_y), 0).r;\n float backward_val = texelFetch(backward, ivec2(out_x, size[1] - out_y - 1), 0).r;\n\n outColor = vec4(forward_val * backward_val);\n}\n'):'ave'===this.mergeMode&&(this.mergeProgram=Kh.webgl2.compileProgram('#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D forward;\nuniform sampler2D backward;\nout vec4 outColor;\n\nvoid main() {\n ivec2 size = textureSize(forward, 0);\n int out_x = int(float(size[0]) * outTex.x);\n int out_y = int(float(size[1]) * outTex.y);\n\n float forward_val = texelFetch(forward, ivec2(out_x, out_y), 0).r;\n float backward_val = texelFetch(backward, ivec2(out_x, size[1] - out_y - 1), 0).r;\n\n outColor = vec4(0.5 * (forward_val + backward_val));\n}\n')))}setWeights(e){this.forwardLayer.setWeights(e.slice(0,e.length/2)),this.backwardLayer.setWeights(e.slice(e.length/2))}call(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}_callCPU(e){this.forwardLayer._callCPU(new o.default(e.tensor.data,e.tensor.shape)),this.backwardLayer._callCPU(new o.default(e.tensor.data,e.tensor.shape));const t=this.forwardLayer.output,a=this.backwardLayer.output;this.returnSequences&&(a.tensor=a.tensor.step(-1));const r=t.tensor.shape.slice();'concat'===this.mergeMode&&(r[r.length-1]+=a.tensor.shape[r.length-1]),this.output=new o.default([],r),'concat'===this.mergeMode?this.returnSequences?(n.default.assign(this.output.tensor.hi(r[0],t.tensor.shape[1]).lo(0,0),t.tensor),n.default.assign(this.output.tensor.hi(r[0],r[1]).lo(0,t.tensor.shape[1]),a.tensor)):(n.default.assign(this.output.tensor.hi(t.tensor.shape[0]).lo(0),t.tensor),n.default.assign(this.output.tensor.hi(r[0]).lo(t.tensor.shape[0]),a.tensor)):'sum'===this.mergeMode?(n.default.addeq(this.output.tensor,t.tensor),n.default.addeq(this.output.tensor,a.tensor)):'mul'===this.mergeMode?(n.default.assigns(this.output.tensor,1),n.default.muleq(this.output.tensor,t.tensor),n.default.muleq(this.output.tensor,a.tensor)):'ave'===this.mergeMode&&(n.default.addeq(this.output.tensor,t.tensor),n.default.addeq(this.output.tensor,a.tensor),n.default.divseq(this.output.tensor,2))}_callGPU(e){e.glTexture||e.createGLTexture({type:'2d',format:'float'}),this.inputCopy||(this.inputCopy=new o.default([],e.glTextureShape),this.inputCopy.createGLTexture({type:'2d',format:'float'})),Kh.webgl2.runProgram({program:this.copyTextureProgram,output:this.inputCopy,inputs:[{input:e,name:'source'}]}),this.forwardLayer._callGPU(e),this.backwardLayer._callGPU(this.inputCopy);const t=this.forwardLayer.output,a=this.backwardLayer.output,r=t.glTextureShape.slice();'concat'===this.mergeMode&&(r[1]+=a.glTextureShape[1]),this.output||(this.output=new o.default([],r),this.output.createGLTexture({type:'2d',format:'float'}),!this.returnSequences&&(this.output.is1D=!0)),Kh.webgl2.runProgram({program:this.mergeProgram,output:this.output,inputs:[{input:t,name:'forward'},{input:a,name:'backward'}]}),0===this.outbound.length&&this.output.transferFromGLTexture()}}t.default=s});Ce(U_);var B_=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),Object.defineProperty(t,'TimeDistributed',{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,'Bidirectional',{enumerable:!0,get:function(){return o.default}});var r=a(q_),o=a(U_)});Ce(B_);var N_=ke(function(e,t){Object.defineProperty(t,'__esModule',{value:!0});var a={InputLayer:!0};Object.defineProperty(t,'InputLayer',{enumerable:!0,get:function(){return r.default}});var r=function(e){return e&&e.__esModule?e:{default:e}}(mg);Object.keys(zg).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return zg[e]}})}),Object.keys(ym).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return ym[e]}})}),Object.keys(Zf).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return Zf[e]}})}),Object.keys(Yf).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return Yf[e]}})}),Object.keys(d_).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d_[e]}})}),Object.keys(g_).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g_[e]}})}),Object.keys(f_).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f_[e]}})}),Object.keys(L_).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return L_[e]}})}),Object.keys(O_).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return O_[e]}})}),Object.keys(B_).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return B_[e]}})})});Ce(N_);var V_=ke(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(gg),o=a(dg),n=a(tm),i=a(Yg);t.default=class{constructor(e={}){if(this.modelLayersMap=e.modelLayersMap,this.gpu=e.gpu,!this.modelLayersMap)throw new Error(`[CAM] modelLayersMap is required`)}initialize(){if(this.modelLayersMap.forEach((e)=>{'GlobalAveragePooling2D'===e.layerClass&&(this.enabled=!0,this.poolLayer=e)}),this.enabled&&!this.data){this.featureMaps=this.modelLayersMap.get(this.poolLayer.inbound[0]).output;let e=this.poolLayer;for(e.outbound.length||(this.weights=this.poolLayer.output);e.outbound.length;)e=this.modelLayersMap.get(e.outbound[0]),this.weights=e.weights.kernel?e.weights.kernel:this.poolLayer.output;if(this.inputShape=this.featureMaps.is2DReshaped?this.featureMaps.originalShape.slice(0,2):this.featureMaps.tensor.shape.slice(0,2),1===this.weights.tensor.shape.length)this.shape=this.inputShape;else{const e=this.weights.tensor.shape[1];this.shape=[...this.inputShape,e]}this.data=new Float32Array(this.shape.reduce((e,t)=>e*t,1))}}update(){if(this.enabled){this.featureMaps=this.modelLayersMap.get(this.poolLayer.inbound[0]).output,this.gpu?this._updateGPU():this._updateCPU();const e=o.default.inf(this.output.tensor),t=o.default.sup(this.output.tensor);o.default.divseq(o.default.subseq(this.output.tensor,e),t-e),this.data=this.output.tensor.data}}_updateCPU(){if(this.featureMaps.is2DReshaped||this.featureMaps.reshapeTo2D(),1===this.weights.tensor.shape.length){this.output||(this.output=new r.default([],this.shape));const e=new r.default([],[this.shape[0]*this.shape[1]]);(0,rf.gemv)(1,this.featureMaps.tensor,this.weights.tensor,1,e.tensor),this.output.replaceTensorData(e.tensor.data)}else this.output||(this.output=new r.default([],this.shape)),this.output.reshapeTo2D(),(0,n.default)(this.output.tensor,this.featureMaps.tensor,this.weights.tensor,1,1),this.output.reshapeFrom2D();o.default.maxseq(this.output.tensor,0),this.featureMaps.is2DReshaped&&this.featureMaps.reshapeFrom2D()}_updateGPU(){this.output||(this.output=new r.default([],this.shape));const e=this.weights.is1D;!this.output.glTexture&&e?this.output.createGLTexture({type:'2d',format:'float'}):(this.output.reshapeTo2D(),this.output.createGLTexture({type:'2d',format:'float'}));const t=e?this.weights.glTextureShape[1]:this.weights.glTextureShape[0];if(!this.program){const a=(0,i.default)('cam',this.output.glTextureShape,t,e);this.program=Kh.webgl2.compileProgram(a)}Kh.webgl2.runProgram({program:this.program,output:this.output,inputs:[{input:this.featureMaps,name:'featureMaps'},{input:this.weights,name:'weights'}]}),this.output.transferFromGLTexture(),this.output.is2DReshaped&&this.output.reshapeFrom2D()}}});Ce(V_);var H_=ke(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),Object.defineProperty(t,'CAM',{enumerable:!0,get:function(){return a.default}});var a=function(e){return e&&e.__esModule?e:{default:e}}(V_)});Ce(H_);var W_=Oo,X_=ke(function(e,t){var a=t;a.length=function(e){var t=e.length;if(!t)return 0;for(var a=0;1<--t%4&&'='===e.charAt(t);)++a;return In(3*e.length)/4-a};for(var r=Array(64),o=Array(123),n=0;64>n;)o[r[n]=26>n?n+65:52>n?n+71:62>n?n-4:43|n-59]=n++;a.encode=function(e,a,o){for(var n=null,s=[],u=0,i=0,l,t;a>2],l=(3&t)<<4,i=1):1==i?(s[u++]=r[l|t>>4],l=(15&t)<<2,i=2):2==i?(s[u++]=r[l|t>>6],s[u++]=r[63&t],i=0):void 0,8191>4,i=t,u=2):2==u?(a[r++]=(15&i)<<4|(60&t)>>2,i=t,u=3):3==u?(a[r++]=(3&i)<<6|t,u=0):void 0}if(1==u)throw Error(s);return r-n},a.test=function(e){return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}}),$_=qo;qo.prototype.on=function(e,t,a){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:a||this}),this},qo.prototype.off=function(e,t){if(e===void 0)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var a=this._listeners[e],r=0;ra?t+=1:2048>a?t+=2:55296==(64512&a)&&56320==(64512&e.charCodeAt(r+1))?(++r,t+=4):t+=3;return t},a.read=function(e,a,r){var o=r-a;if(1>o)return'';for(var n=null,s=[],u=0,i;ai?s[u++]=i:191i?s[u++]=(31&i)<<6|63&e[a++]:239i?(i=((7&i)<<18|(63&e[a++])<<12|(63&e[a++])<<6|63&e[a++])-65536,s[u++]=55296+(i>>10),s[u++]=56320+(1023&i)):s[u++]=(15&i)<<12|(63&e[a++])<<6|63&e[a++],8191n?t[a++]=n:2048>n?(t[a++]=192|n>>6,t[a++]=128|63&n):55296==(64512&n)&&56320==(64512&(i=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,t[a++]=240|n>>18,t[a++]=128|63&n>>12,t[a++]=128|63&n>>6,t[a++]=128|63&n):(t[a++]=224|n>>12,t[a++]=128|63&n>>6,t[a++]=128|63&n);return a-r}}),Y_=Xo,J_=$o,ex=$o.zero=new $o(0,0);ex.toNumber=function(){return 0},ex.zzEncode=ex.zzDecode=function(){return this},ex.length=function(){return 1};var tx=$o.zeroHash='\0\0\0\0\0\0\0\0';$o.fromNumber=function(e){if(0===e)return ex;var t=0>e;t&&(e=-e);var a=e>>>0,r=(e-a)/4294967296>>>0;return t&&(r=~r>>>0,a=~a>>>0,4294967295<++a&&(a=0,4294967295<++r&&(r=0))),new $o(a,r)},$o.from=function(e){if('number'==typeof e)return $o.fromNumber(e);if(rx.isString(e))if(rx.Long)e=rx.Long.fromString(e);else return $o.fromNumber(parseInt(e,10));return e.low||e.high?new $o(e.low>>>0,e.high>>>0):ex},$o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,a=~this.hi>>>0;return t||(a=a+1>>>0),-(t+4294967296*a)}return this.lo+4294967296*this.hi},$o.prototype.toLong=function(e){return rx.Long?new rx.Long(0|this.lo,0|this.hi,!!e):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var ax=String.prototype.charCodeAt;$o.fromHash=function(e){return e===tx?ex:new $o((ax.call(e,0)|ax.call(e,1)<<8|ax.call(e,2)<<16|ax.call(e,3)<<24)>>>0,(ax.call(e,4)|ax.call(e,5)<<8|ax.call(e,6)<<16|ax.call(e,7)<<24)>>>0)},$o.prototype.toHash=function(){return Dn(255&this.lo,255&this.lo>>>8,255&this.lo>>>16,this.lo>>>24,255&this.hi,255&this.hi>>>8,255&this.hi>>>16,this.hi>>>24)},$o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},$o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},$o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,a=this.hi>>>24;return 0==a?0==t?16384>e?128>e?1:2:2097152>e?3:4:16384>t?128>t?5:6:2097152>t?7:8:128>a?9:10};var rx=ke(function(e,t){function a(e,t,a){for(var r=Object.keys(t),o=0;o(e>>>=0)?1:16384>e?2:2097152>e?3:268435456>e?4:5,e)).len,this},Yo.prototype.int32=function(e){return 0>e?this._push(an,10,nx.fromNumber(e)):this.uint32(e)},Yo.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},Yo.prototype.uint64=function(e){var t=nx.from(e);return this._push(an,t.length(),t)},Yo.prototype.int64=Yo.prototype.uint64,Yo.prototype.sint64=function(e){var t=nx.from(e).zzEncode();return this._push(an,t.length(),t)},Yo.prototype.bool=function(e){return this._push(Jo,1,e?1:0)},Yo.prototype.fixed32=function(e){return this._push(rn,4,e>>>0)},Yo.prototype.sfixed32=Yo.prototype.fixed32,Yo.prototype.fixed64=function(e){var t=nx.from(e);return this._push(rn,4,t.lo)._push(rn,4,t.hi)},Yo.prototype.sfixed64=Yo.prototype.fixed64,Yo.prototype.float=function(e){return this._push(rx.float.writeFloatLE,4,e)},Yo.prototype.double=function(e){return this._push(rx.float.writeDoubleLE,8,e)};var lx=rx.Array.prototype.set?function(e,t,a){t.set(e,a)}:function(e,t,a){for(var r=0;r>>0;if(!t)return this._push(Jo,1,0);if(rx.isString(e)){var a=Yo.alloc(t=ix.length(e));ix.decode(e,a,0),e=a}return this.uint32(t)._push(lx,t,e)},Yo.prototype.string=function(e){var t=sx.length(e);return t?this.uint32(t)._push(sx.write,t,e):this._push(Jo,1,0)},Yo.prototype.fork=function(){return this.states=new Qo(this),this.head=this.tail=new Ko(Zo,0,0),this.len=0,this},Yo.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Ko(Zo,0,0),this.len=0),this},Yo.prototype.ldelim=function(){var e=this.head,t=this.tail,a=this.len;return this.reset().uint32(a),a&&(this.tail.next=e.next,this.tail=t,this.len+=a),this},Yo.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),a=0;e;)e.fn(e.val,t,a),a+=e.len,e=e.next;return t},Yo._configure=function(e){ux=e};var px=on;(on.prototype=Object.create(ox.prototype)).constructor=on;var dx=rx.Buffer;on.alloc=function(e){return(on.alloc=rx._Buffer_allocUnsafe)(e)};var cx=dx&&dx.prototype instanceof Uint8Array&&'set'===dx.prototype.set.name?function(e,t,a){t.set(e,a)}:function(e,t,a){if(e.copy)e.copy(t,a,0,e.length);else for(var r=0;r>>0;return this.uint32(t),t&&this._push(cx,t,e),this},on.prototype.string=function(e){var t=dx.byteLength(e);return this.uint32(t),t&&this._push(nn,t,e),this};var hx=un,gx=rx.LongBits,mx=rx.utf8,fx='undefined'==typeof Uint8Array?function(e){if(Array.isArray(e))return new un(e);throw Error('illegal buffer')}:function(e){if(e instanceof Uint8Array||Array.isArray(e))return new un(e);throw Error('illegal buffer')},_x;un.create=rx.Buffer?function(e){return(un.create=function(e){return rx.Buffer.isBuffer(e)?new _x(e):fx(e)})(e)}:fx,un.prototype._slice=rx.Array.prototype.subarray||rx.Array.prototype.slice,un.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,128>this.buf[this.pos++])return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,128>this.buf[this.pos++])return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,128>this.buf[this.pos++])return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,128>this.buf[this.pos++])return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,128>this.buf[this.pos++])return e;if((this.pos+=5)>this.len)throw this.pos=this.len,sn(this,10);return e}}(),un.prototype.int32=function(){return 0|this.uint32()},un.prototype.sint32=function(){var e=this.uint32();return 0|e>>>1^-(1&e)},un.prototype.bool=function(){return 0!==this.uint32()},un.prototype.fixed32=function(){if(this.pos+4>this.len)throw sn(this,4);return pn(this.buf,this.pos+=4)},un.prototype.sfixed32=function(){if(this.pos+4>this.len)throw sn(this,4);return 0|pn(this.buf,this.pos+=4)},un.prototype.float=function(){if(this.pos+4>this.len)throw sn(this,4);var e=rx.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},un.prototype.double=function(){if(this.pos+8>this.len)throw sn(this,4);var e=rx.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},un.prototype.bytes=function(){var e=this.uint32(),t=this.pos,a=this.pos+e;if(a>this.len)throw sn(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,a):t===a?new this.buf.constructor(0):this._slice.call(this.buf,t,a)},un.prototype.string=function(){var e=this.bytes();return mx.read(e,0,e.length)},un.prototype.skip=function(e){if('number'==typeof e){if(this.pos+e>this.len)throw sn(this,e);this.pos+=e}else do if(this.pos>=this.len)throw sn(this);while(128&this.buf[this.pos++]);return this},un.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:do{if(4==(e=7&this.uint32()))break;this.skipType(e)}while(!0);break;case 5:this.skip(4);break;default:throw Error('invalid wire type '+e+' at offset '+this.pos);}return this},un._configure=function(e){_x=e;var t=rx.Long?'toLong':'toNumber';rx.merge(un.prototype,{int64:function(){return ln.call(this)[t](!1)},uint64:function(){return ln.call(this)[t](!0)},sint64:function(){return ln.call(this).zzDecode()[t](!1)},fixed64:function(){return dn.call(this)[t](!0)},sfixed64:function(){return dn.call(this)[t](!1)}})};var xx=cn;(cn.prototype=Object.create(hx.prototype)).constructor=cn,rx.Buffer&&(cn.prototype._slice=rx.Buffer.prototype.slice),cn.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Rn(this.pos+e,this.len))};var yx=hn;(hn.prototype=Object.create(rx.EventEmitter.prototype)).constructor=hn,hn.prototype.rpcCall=function e(t,a,r,o,n){if(!o)throw TypeError('request must be specified');var i=this;if(!n)return rx.asPromise(e,i,t,a,r,o);if(!i.rpcImpl)return void setTimeout(function(){n(Error('already ended'))},0);try{return i.rpcImpl(t,a[i.requestDelimited?'encodeDelimited':'encode'](o).finish(),function(e,a){if(e)return i.emit('error',e,t),n(e);if(null===a)return void i.end(!0);if(!(a instanceof r))try{a=r[i.responseDelimited?'decodeDelimited':'decode'](a)}catch(e){return i.emit('error',e,t),n(e)}return i.emit('data',a,t),n(null,a)})}catch(e){return i.emit('error',e,t),void setTimeout(function(){n(e)},0)}},hn.prototype.end=function(e){return this.rpcImpl&&(!e&&this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit('end').off()),this};var vx=ke(function(e,t){t.Service=yx}),bx={},Sx=ke(function(e,t){function a(){r.Reader._configure(r.BufferReader),r.util._configure()}var r=t;r.build='minimal',r.Writer=ox,r.BufferWriter=px,r.Reader=hx,r.BufferReader=xx,r.util=rx,r.rpc=vx,r.roots=bx,r.configure=a,r.Writer._configure(r.BufferWriter),a()}),Tx=Sx,wx=ke(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=t.Model=t.Weights=void 0;var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,a):{};r.get||r.set?Object.defineProperty(t,a,r):t[a]=e[a]}return t.default=e,t}(Tx);const r=a.Reader,o=a.Writer,n=a.util,s=a.roots['default']||(a.roots['default']={});t.default=s;const i=s.Weights=(()=>{function e(e){if(this.shape=[],e)for(let t=Object.keys(e),a=0;a>>3){case 1:o.layerName=e.string();break;case 2:o.weightName=e.string();break;case 3:if(o.shape&&o.shape.length||(o.shape=[]),2==(7&t))for(let t=e.uint32()+e.pos;e.pos>>0}return null!=e.type&&(t.type=e.type+''),null!=e.data&&('string'==typeof e.data?n.base64.decode(e.data,t.data=n.newBuffer(n.base64.length(e.data)),0):e.data.length&&(t.data=e.data)),null!=e.quantizeMin&&(t.quantizeMin=+e.quantizeMin),null!=e.quantizeMax&&(t.quantizeMax=+e.quantizeMax),t},e.toObject=function(e,t){t||(t={});let a={};if((t.arrays||t.defaults)&&(a.shape=[]),t.defaults&&(a.layerName='',a.weightName='',a.type='',a.data=t.bytes===String?'':[],a.quantizeMin=0,a.quantizeMax=0),null!=e.layerName&&e.hasOwnProperty('layerName')&&(a.layerName=e.layerName),null!=e.weightName&&e.hasOwnProperty('weightName')&&(a.weightName=e.weightName),e.shape&&e.shape.length){a.shape=[];for(let t=0;t{function e(e){if(this.modelWeights=[],e)for(let t=Object.keys(e),a=0;a>>3){case 1:o.id=e.string();break;case 2:o.name=e.string();break;case 3:o.kerasVersion=e.string();break;case 4:o.backend=e.string();break;case 5:o.modelConfig=e.string();break;case 6:o.modelWeights&&o.modelWeights.length||(o.modelWeights=[]),o.modelWeights.push(s.Weights.decode(e,e.uint32()));break;default:e.skipType(7&t);}}return o},e.decodeDelimited=function(e){return e instanceof r||(e=new r(e)),this.decode(e,e.uint32())},e.verify=function(e){if('object'!=typeof e||null===e)return'object expected';if(null!=e.id&&e.hasOwnProperty('id')&&!n.isString(e.id))return'id: string expected';if(null!=e.name&&e.hasOwnProperty('name')&&!n.isString(e.name))return'name: string expected';if(null!=e.kerasVersion&&e.hasOwnProperty('kerasVersion')&&!n.isString(e.kerasVersion))return'kerasVersion: string expected';if(null!=e.backend&&e.hasOwnProperty('backend')&&!n.isString(e.backend))return'backend: string expected';if(null!=e.modelConfig&&e.hasOwnProperty('modelConfig')&&!n.isString(e.modelConfig))return'modelConfig: string expected';if(null!=e.modelWeights&&e.hasOwnProperty('modelWeights')){if(!Array.isArray(e.modelWeights))return'modelWeights: array expected';for(let t=0,a;t{if(e in g){const t=new g[e]({modelLayersMap:this.modelLayersMap,gpu:this.gpu});this.visMap.set(e,t)}}),this._ready=this._initialize()}checkGPUSupport(){return Kh.webgl2.isSupported}ready(){return this._ready}_interrupt(){_.cancel()}async _initialize(){this.events.emit('loadingProgress',0);try{const e=this.filesystem?this._dataRequestFS():this._dataRequestHTTP(this.headers);await e}catch(e){console.log(e),this._interrupt()}this.events.emit('loadingProgress',100),this._buildDAG(),this.inputLayerNames.forEach((e)=>{const t=this.modelLayersMap.get(e);t.call(this.inputTensorsMap.get(e)),t.hasOutput=!0,t.visited=!0});const e=this.pauseAfterLayerCalls;return this.pauseAfterLayerCalls=!0,this.runningProgress=0,this.events.emit('initProgress',0),await this._traverseDAG(this.inputLayerNames,'initProgress'),this.pauseAfterLayerCalls=e,this.finishedLayerNames=[],this.modelLayersMap.forEach((e)=>{e.hasOutput=!1,e.visited=!1}),this.visMap.forEach((e)=>{e.initialize()}),this.events.emit('initProgress',100),!0}async _dataRequestHTTP(e={}){try{const t=await d.default.get(this.filepath,{responseType:'arraybuffer',headers:e,onDownloadProgress:(t)=>{if(t.lengthComputable){const e=En(100*t.loaded/t.total);this.events.emit('loadingProgress',e)}},cancelToken:_.token});this._decodeProtobuf(new Uint8Array(t.data))}catch(e){if(d.default.isCancel(e))console.log('[Model] Data request canceled',e.message);else throw e}}async _dataRequestFS(){const e=p.default.promisify(kx.readFile);try{const t=await e(this.filepath);this._decodeProtobuf(t)}catch(e){throw e}}_decodeProtobuf(e){const t=f.default.Model.verify(e);if(t)throw new Error(`[Model] Invalid model - check protobuf serialization: {err}`);const a=f.default.Model.decode(e);this.id=a.id,this.name=a.name,this.kerasVersion=a.kerasVersion,this.backend=a.backend,this.modelConfig=JSON.parse(a.modelConfig),this.modelWeights=a.modelWeights}toggleGPU(e){this.gpu='undefined'==typeof e?!this.gpu:e,this.modelLayersMap.forEach((e)=>{e.toggleGPU(this.gpu)}),this.visMap.forEach((e)=>{e.gpu=this.gpu}),this.resetInputTensors()}resetInputTensors(){this.inputLayerNames.forEach((e)=>{const t=this.modelLayersMap.get(e);this.inputTensorsMap.set(e,new m.default([],t.shape))})}_buildDAG(){const e=this.modelConfig.class_name;let t=[];if('Sequential'===e?t=this.modelConfig.config:'Model'===e&&(t=this.modelConfig.config.layers),!(Array.isArray(t)&&t.length))throw new Error('[Model] Model configuration does not contain any layers.');t.forEach((a,r)=>{const o=a.class_name,n=a.config;if('Model'===e&&'Sequential'===o)n.forEach((e,t)=>{const r=e.class_name,o=e.config,i=0===t?a.inbound_nodes[0].map((e)=>e[0]):[n[t-1].config.name];this._createLayer(r,o,i)});else if(!(o in h))throw new Error(`[Model] Layer ${o} specified in model configuration is not implemented!`);else{if('Sequential'===e&&0===r){const e='input',t=n.batch_input_shape.slice(1),a=new h.InputLayer({name:e,shape:t,gpu:this.gpu});this.modelLayersMap.set(e,a),this.inputTensorsMap.set(e,new m.default([],t)),this.inputLayerNames.push(e)}else if('Model'===e&&'InputLayer'===o){const e=n.batch_input_shape.slice(1);this.inputTensorsMap.set(n.name,new m.default([],e)),this.inputLayerNames.push(n.name)}let i=[];if('Sequential'===e)i=0===r?['input']:[t[r-1].config.name];else if('Model'===e){const e=a.inbound_nodes;e&&e.length&&(i=e[0].map((e)=>e[0]))}this._createLayer(o,n,i)}}),this.modelLayersMap.forEach((e)=>{this.modelLayersInfo.push((0,l.default)(e,['name','description','layerClass','inbound','outbound'])),0===e.outbound.length&&this.outputLayerNames.push(e.name)}),this.inputLayerNames.sort(),this.outputLayerNames.sort()}_createLayer(e,t,a){const r=new h[e](Object.assign({},t,{gpu:this.gpu}));let o=[];if('Bidirectional'===e){const e=r.forwardLayer.params.map((e)=>`${t.name}/forward_${t.layer.config.name}/${e}`),a=r.backwardLayer.params.map((e)=>`${t.name}/backward_${t.layer.config.name}/${e}`);o=e.concat(a)}else o='TimeDistributed'===e?r.layer.params.map((e)=>`${t.name}/${e}`):r.params.map((e)=>`${t.name}/${e}`);if(o&&o.length){const e=o.map((e)=>{const t=(0,u.default)(this.modelWeights,(t)=>{const a=new RegExp(`^.*${e}`);return a.test(t.weightName)});if(!t)throw new Error(`[Model] error loading weights.`);const{data:a,shape:r,type:o}=t,n=new ArrayBuffer(a.byteLength),i=new Uint8Array(n);if(i.set(new Uint8Array(a.buffer,a.byteOffset,a.byteLength)),'uint8'===o){const{quantizeMin:e,quantizeMax:a}=t,o=new Float32Array(i);for(let t=0,r=o.length;t{this.modelLayersMap.get(t.name).inbound.push(e),this.modelLayersMap.get(e).outbound.push(t.name)})}async _traverseDAG(e,t){if(0===e.length)return this.runningProgress=100,this.events.emit(t,100),!0;if(1===e.length){const a=e[0],r=this.modelLayersMap.get(a);if('InputLayer'===r.layerClass)this.finishedLayerNames.push(this.modelLayersMap.get(a).name);else{const e=this.modelLayersMap.get(a);if(e.visited)return!1;const t=e.inbound.map((e)=>this.modelLayersMap.get(e));if(!(0,s.default)((0,i.default)(t,'hasOutput')))return!1;e.isMergeLayer?e.call((0,i.default)(t,'output')):e.call(t[0].output),e.hasOutput=!0,e.visited=!0,this.finishedLayerNames.push(e.name),this.pauseAfterLayerCalls&&(await p.default.delay(0))}this.runningProgress+=100/this.modelLayersMap.size,this.events.emit(t,this.runningProgress),await this._traverseDAG(r.outbound,t)}else await p.default.all(e.map((e)=>this._traverseDAG([e],t)))}_maybeTransferIntermediateOutputs(){this.gpu&&this.transferLayerOutputs&&this.modelLayersMap.forEach((e)=>{e.output&&e.output.glTexture&&(Kh.webgl2.bindOutputTexture(e.output.glTexture,e.output.glTextureShape),e.output.transferFromGLTexture(),e.output.is2DReshaped&&e.output.reshapeFrom2D())})}loadData(e){this.inputLayerNames.forEach((t)=>{const a=this.modelLayersMap.get(t);this.inputTensorsMap.get(t).replaceTensorData(e[t]),a.call(this.inputTensorsMap.get(t)),a.hasOutput=!0,a.visited=!0})}async predict(e){if(this.isRunning=!0,this.runningProgress=0,this.events.emit('predictProgress',0),!(0,n.default)((0,o.default)(e).sort(),this.inputLayerNames))throw this.isRunning=!1,new Error('[Model] predict() must take an object where the keys are the named inputs of the model: '+JSON.stringify(this.inputLayerNames));if(!(0,s.default)(this.inputLayerNames,(t)=>e[t]instanceof Float32Array))throw this.isRunning=!1,new Error('[Model] predict() must take an object where the values are the flattened data as Float32Array.');this.finishedLayerNames=[],this.modelLayersMap.forEach((e)=>{e.hasOutput=!1,e.visited=!1});let t=(0,c.default)();this.loadData(e),this.predictStats.loadData=(0,c.default)()-t,t=(0,c.default)(),await this._traverseDAG(this.inputLayerNames,'predictProgress'),this.predictStats.forwardPass=(0,c.default)()-t,this._maybeTransferIntermediateOutputs();const a=this.modelConfig.class_name,r={};if('Sequential'===a){const e=this.modelLayersMap.get(this.outputLayerNames[0]);r.output=e.output.tensor.data}else'Model'===a&&this.outputLayerNames.forEach((e)=>{const t=this.modelLayersMap.get(e);r[e]=t.output.tensor.data});return t=(0,c.default)(),this.visMap.forEach((e)=>{e.update()}),this.predictStats.visualizations=(0,c.default)()-t,this.isRunning=!1,this.events.emit('predictProgress',100),r}layerCall(e,t){if(!this.modelLayersMap.has(e))return;let a=t instanceof m.default?t:new m.default(t.data,t.shape);const r=this.modelLayersMap.get(e);return r.call(a)}cleanup(){Kh.webgl2.clearRefs(),this.modelLayersMap.clear(),this.inputTensorsMap.clear(),this.visMap.clear(),delete this.modelWeights}}});Ce(Fx);var Mx=Ss.isFinite,Dx=gn,Ix=1/0,Ex=mn,Rx=Sg({args:['array','scalar','index'],body:function(e,t,a){var r=t,o;for(o=0;oa[o]+s)return!1}return!0};var r=a(Dx),o=a(Ex),n=a(Ax)});Ce(Lx);var jx=ke(function(e,t){function a(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,a):{};r.get||r.set?Object.defineProperty(t,a,r):t[a]=e[a]}return t.default=e,t}function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),Object.defineProperty(t,'Model',{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,'Tensor',{enumerable:!0,get:function(){return n.default}}),t.testUtils=t.layers=t.activations=t.default=t.GPU_SUPPORT=void 0;var o=r(Fx),n=r(gg),i=a(Eg);t.activations=i;var s=a(N_);t.layers=s;var u=a(Lx);t.testUtils=u;const l=Kh.webgl2.isSupported;t.GPU_SUPPORT=l;const p={Model:o.default,Tensor:n.default,GPU_SUPPORT:l,activations:i,layers:s,testUtils:u};t.default=p}),zx=Ce(jx),Gx=function(e,t,a,r){return new(a||(a=Promise))(function(o,n){function i(e){try{u(r.next(e))}catch(t){n(t)}}function s(e){try{u(r['throw'](e))}catch(t){n(t)}}function u(e){e.done?o(e.value):new a(function(t){t(e.value)}).then(i,s)}u((r=r.apply(e,t||[])).next())})},Ox=!1;try{Ox='[object process]'===Object.prototype.toString.call(global.process)}catch(t){}var qx=r('MODEL_PATH')||'/dist/model.bin',Ux=new zx.Model({filepath:Ox?__dirname+'/model.bin':qx,gpu:!1,filesystem:Ox});(function(e){e[e.TD=0]='TD',e[e.IHS=1]='IHS',e[e.HS=2]='HS',e[e.TU=3]='TU',e[e.DT=4]='DT',e[e.DB=5]='DB'})(e.AvailablePatterns||(e.AvailablePatterns={}));class Bx extends Hn{}Bx.predictPattern=xn,Bx.hasDoubleBottom=yn,Bx.hasDoubleTop=vn,Bx.hasHeadAndShoulder=bn,Bx.hasInverseHeadAndShoulder=Sn,Bx.isTrendingUp=Tn,Bx.isTrendingDown=wn;let Nx=Pn();e.getAvailableIndicators=Pn,e.AvailableIndicators=Nx,e.FixedSizeLinkedList=qn,e.CandleData=Un,e.CandleList=Bn,e.sma=n,e.SMA=Wn,e.ema=i,e.EMA=Xn,e.wma=s,e.WMA=$n,e.wema=u,e.WEMA=Kn,e.macd=l,e.MACD=Zn,e.rsi=c,e.RSI=Jn,e.bollingerbands=g,e.BollingerBands=ti,e.adx=_,e.ADX=si,e.atr=x,e.ATR=ui,e.truerange=f,e.TrueRange=ni,e.roc=y,e.ROC=li,e.kst=v,e.KST=pi,e.psar=b,e.PSAR=di,e.stochastic=S,e.Stochastic=ci,e.williamsr=T,e.WilliamsR=hi,e.adl=w,e.ADL=gi,e.obv=P,e.OBV=mi,e.trix=C,e.TRIX=fi,e.forceindex=k,e.ForceIndex=_i,e.cci=F,e.CCI=xi,e.awesomeoscillator=M,e.AwesomeOscillator=yi,e.vwap=D,e.VWAP=vi,e.volumeprofile=R,e.VolumeProfile=bi,e.mfi=L,e.MFI=Ti,e.stochasticrsi=j,e.StochasticRSI=wi,e.averagegain=p,e.AverageGain=Qn,e.averageloss=d,e.AverageLoss=Yn,e.sd=h,e.SD=ei,e.highest=z,e.Highest=Pi,e.lowest=G,e.Lowest=Ci,e.sum=O,e.Sum=ki,e.renko=q,e.HeikinAshi=Mi,e.heikinashi=U,e.bullish=ne,e.bearish=xe,e.abandonedbaby=ye,e.doji=W,e.bearishengulfingpattern=ie,e.bullishengulfingpattern=N,e.darkcloudcover=ve,e.downsidetasukigap=$,e.dragonflydoji=be,e.gravestonedoji=Se,e.bullishharami=V,e.bearishharami=se,e.bullishharamicross=H,e.bearishharamicross=ue,e.eveningdojistar=le,e.eveningstar=pe,e.morningdojistar=X,e.morningstar=B,e.bullishmarubozu=K,e.bearishmarubozu=de,e.piercingline=Z,e.bullishspinningtop=Te,e.bearishspinningtop=we,e.threeblackcrows=ce,e.threewhitesoldiers=Q,e.bullishhammerstick=Y,e.bearishhammerstick=ee,e.bullishinvertedhammerstick=J,e.bearishinvertedhammerstick=te,e.hammerpattern=ae,e.hammerpatternunconfirmed=re,e.hangingman=he,e.hangingmanunconfirmed=ge,e.shootingstar=me,e.shootingstarunconfirmed=fe,e.tweezertop=_e,e.tweezerbottom=oe,e.fibonacciretracement=Pe,e.predictPattern=xn,e.PatternDetector=Bx,e.hasDoubleBottom=yn,e.hasDoubleTop=vn,e.hasHeadAndShoulder=bn,e.hasInverseHeadAndShoulder=Sn,e.isTrendingUp=Tn,e.isTrendingDown=wn,e.setConfig=a,e.getConfig=r})(this.window=this.window||{},window); -//# sourceMappingURL=browser.es6.js.map +var tf = window.tf || {};(function(e,r){'use strict';function t(e){return se[e]}function a(e){let r=t('precision');return r?parseFloat(e.toPrecision(r)):e}function o(e){ie.reverseInputs(e);var r=new he(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function l(e){ie.reverseInputs(e);var r=new pe(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function n(e){ie.reverseInputs(e);var r=new ge(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function s(e){ie.reverseInputs(e);var r=new de(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function u(e){ie.reverseInputs(e);var r=new ve(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function i(e){ie.reverseInputs(e);var r=new ce(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function h(e){ie.reverseInputs(e);var r=new me(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function p(e){ie.reverseInputs(e);var r=new xe(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function g(e){ie.reverseInputs(e);var r=new we(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function d(e){ie.reverseInputs(e);var r=new fe(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function v(e){ie.reverseInputs(e);var r=new be(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function c(e){ie.reverseInputs(e);var r=new Se(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function m(e){ie.reverseInputs(e);var r=new Ce(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function x(e){ie.reverseInputs(e);var r=new Ee(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function w(e){ie.reverseInputs(e);var r=new Ve(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function f(e){ie.reverseInputs(e);var r=new He(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function I(e){ie.reverseInputs(e);var r=new ke(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function _(e){ie.reverseInputs(e);var r=new Te(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function P(e){ie.reverseInputs(e);var r=new De(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function b(e){ie.reverseInputs(e);var r=new Ae(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function q(e){ie.reverseInputs(e);var r=new Be(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function S(e){ie.reverseInputs(e);var r=new ze(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function C(e){ie.reverseInputs(e);var r=new Le(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function E(e){ie.reverseInputs(e);var r=new Me(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function V(e){ie.reverseInputs(e);var r=new je(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function H(e,r,t,a){return e<=t&&r>=t||t<=e&&a>=e}function k(e){ie.reverseInputs(e);var r=new Re(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function T(e){ie.reverseInputs(e);var r=new Oe(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function D(e){ie.reverseInputs(e);var r=new Fe(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function A(e){ie.reverseInputs(e);var r=new Ue(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function B(e){ie.reverseInputs(e);var r=new We(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function z(e){ie.reverseInputs(e);var r=new Ge(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}function L(e){ie.reverseInputs(e);var r=new Ne(e).result;return e.reversedInput&&(r.open.reverse(),r.high.reverse(),r.low.reverse(),r.close.reverse(),r.volume.reverse(),r.timestamp.reverse()),ie.reverseInputs(e),r}function M(e){ie.reverseInputs(e);var r=new Xe(e).result;return e.reversedInput&&(r.open.reverse(),r.high.reverse(),r.low.reverse(),r.close.reverse(),r.volume.reverse(),r.timestamp.reverse()),ie.reverseInputs(e),r}function j(e){return new lr().hasPattern(e)}function R(e){return new nr().hasPattern(e)}function y(e){return new sr().hasPattern(e)}function O(e){return new ur().hasPattern(e)}function F(e,r){var t=function(e,r,t){return e+(r-e)*t},a=[],o=new Number((e.length-1)/(r-1));a[0]=e[0];for(var l=1;le+r*r,0),t=te(r);return e.map((e)=>e/t)}function W(){return zr(this,void 0,void 0,function*(){return Rr?Promise.resolve(!0):yr?jr:(jr=new Promise(function(e){return zr(this,void 0,void 0,function*(){if(Lr){console.log('Nodejs Environment detected ');var t=require('@tensorflow/tfjs-node'),a=require('path').resolve(__dirname,'../tf_model/model.json');Br=yield r.loadModel(t.io.fileSystem(a))}else{if(console.log('Browser Environment detected '),'undefined'==typeof r||'undefined'==typeof r.loadModel)return console.log('Tensorflow js not imported, pattern detection may not work'),Rr=!1,yr=!1,void e();Br=yield r.loadModel('/tf_model/model.json')}return Rr=!0,yr=!1,void e()})}),void(yr=!0))})}function G(e){return zr(this,void 0,void 0,function*(){yield W(),300>e.values.length&&console.warn('Pattern detector requires atleast 300 data points for a reliable prediction, received just ',e.values.length),ie.reverseInputs(e);var t=e.values,a=yield Br.predict(r.tensor2d([U(F(t,400))])),o=r.argMax(a,1).get(0);return ie.reverseInputs(e),{patternId:o,pattern:Mr[o],probability:100*a.get(0,4)}})}function N(r){return zr(this,void 0,void 0,function*(){var t=yield G(r);return t.patternId===e.AvailablePatterns.DB})}function X(r){return zr(this,void 0,void 0,function*(){var t=yield G(r);return t.patternId===e.AvailablePatterns.DT})}function K(r){return zr(this,void 0,void 0,function*(){var t=yield G(r);return t.patternId===e.AvailablePatterns.HS})}function Q(r){return zr(this,void 0,void 0,function*(){var t=yield G(r);return t.patternId===e.AvailablePatterns.IHS})}function Y(r){return zr(this,void 0,void 0,function*(){var t=yield G(r);return t.patternId===e.AvailablePatterns.TU})}function Z(r){return zr(this,void 0,void 0,function*(){var t=yield G(r);return t.patternId===e.AvailablePatterns.TD})}function $(){return['sma','ema','wma','wema','macd','rsi','bollingerbands','adx','atr','truerange','roc','kst','psar','stochastic','williamsr','adl','obv','trix','cci','awesomeoscillator','forceindex','vwap','volumeprofile','renko','heikinashi','stochasticrsi','mfi','averagegain','averageloss','highest','lowest','sum','FixedSizeLinkedList','sd','bullish','bearish','abandonedbaby','doji','bearishengulfingpattern','bullishengulfingpattern','darkcloudcover','downsidetasukigap','dragonflydoji','gravestonedoji','bullishharami','bearishharami','bullishharamicross','bearishharamicross','eveningdojistar','eveningstar','morningdojistar','morningstar','bullishmarubozu','bearishmarubozu','piercingline','bullishspinningtop','bearishspinningtop','threeblackcrows','threewhitesoldiers','bullishhammerstick','bearishhammerstick','bullishinvertedhammerstick','bearishinvertedhammerstick','hammerpattern','hammerpatternunconfirmed','hangingman','hangingmanunconfirmed','shootingstar','shootingstarunconfirmed','tweezertop','tweezerbottom','predictPattern','hasDoubleBottom','hasDoubleTop','hasHeadAndShoulder','hasInverseHeadAndShoulder','isTrendingUp','isTrendingDown']}var J=Math.min,ee=Math.max,re=Math.abs,te=Math.sqrt;class ae{constructor(e,r,t){this.next=t,t&&(t.prev=this),this.prev=r,r&&(r.next=this),this.data=e}}class oe{constructor(){this._length=0}get head(){return this._head&&this._head.data}get tail(){return this._tail&&this._tail.data}get current(){return this._current&&this._current.data}get length(){return this._length}push(e){this._tail=new ae(e,this._tail),0===this._length&&(this._head=this._tail,this._current=this._head,this._next=this._head),this._length++}pop(){var e=this._tail;if(0!==this._length)return(this._length--,0===this._length)?(this._head=this._tail=this._current=this._next=void 0,e.data):(this._tail=e.prev,this._tail.next=void 0,this._current===e&&(this._current=this._tail,this._next=void 0),e.data)}shift(){var e=this._head;if(0!==this._length)return(this._length--,0===this._length)?(this._head=this._tail=this._current=this._next=void 0,e.data):(this._head=this._head.next,this._current===e&&(this._current=this._head,this._next=this._current.next),e.data)}unshift(e){this._head=new ae(e,void 0,this._head),0===this._length&&(this._tail=this._head,this._next=this._head),this._length++}unshiftCurrent(){var e=this._current;return e===this._head||2>this._length?e&&e.data:(e===this._tail?(this._tail=e.prev,this._tail.next=void 0,this._current=this._tail):(e.next.prev=e.prev,e.prev.next=e.next,this._current=e.prev),this._next=this._current.next,e.next=this._head,e.prev=void 0,this._head.prev=e,this._head=e,e.data)}removeCurrent(){var e=this._current;if(0!==this._length)return(this._length--,0===this._length)?(this._head=this._tail=this._current=this._next=void 0,e.data):(e===this._tail?(this._tail=e.prev,this._tail.next=void 0,this._current=this._tail):e===this._head?(this._head=e.next,this._head.prev=void 0,this._current=this._head):(e.next.prev=e.prev,e.prev.next=e.next,this._current=e.prev),this._next=this._current.next,e.data)}resetCursor(){return this._current=this._next=this._head,this}next(){var e=this._next;if(void 0!==e)return this._next=e.next,this._current=e,e.data}}class le extends oe{constructor(e,r,t,a){if(super(),this.size=e,this.maintainHigh=r,this.maintainLow=t,this.maintainSum=a,this.totalPushed=0,this.periodHigh=0,this.periodLow=Infinity,this.periodSum=0,!e||'number'!=typeof e)throw'Size required and should be a number.';this._push=this.push,this.push=function(e){this.add(e),this.totalPushed++}}add(e){this.length===this.size?(this.lastShift=this.shift(),this._push(e),this.maintainHigh&&this.lastShift==this.periodHigh&&this.calculatePeriodHigh(),this.maintainLow&&this.lastShift==this.periodLow&&this.calculatePeriodLow(),this.maintainSum&&(this.periodSum-=this.lastShift)):this._push(e),this.maintainHigh&&this.periodHigh<=e&&(this.periodHigh=e),this.maintainLow&&this.periodLow>=e&&(this.periodLow=e),this.maintainSum&&(this.periodSum+=e)}*iterator(){for(this.resetCursor();this.next();)yield this.current}calculatePeriodHigh(){for(this.resetCursor(),this.next()&&(this.periodHigh=this.current);this.next();)this.periodHigh<=this.current&&(this.periodHigh=this.current)}calculatePeriodLow(){for(this.resetCursor(),this.next()&&(this.periodLow=this.current);this.next();)this.periodLow>=this.current&&(this.periodLow=this.current)}}class ne{constructor(){this.open=[],this.high=[],this.low=[],this.close=[],this.volume=[],this.timestamp=[]}}let se={};class ue{}class ie{constructor(e){this.format=e.format||a}static reverseInputs(e){e.reversedInput&&(e.values?e.values.reverse():void 0,e.open?e.open.reverse():void 0,e.high?e.high.reverse():void 0,e.low?e.low.reverse():void 0,e.close?e.close.reverse():void 0,e.volume?e.volume.reverse():void 0,e.timestamp?e.timestamp.reverse():void 0)}getResult(){return this.result}}class he extends ie{constructor(e){super(e),this.period=e.period,this.price=e.values;this.generator=function*(e){var r,t=new oe,a=0,o=1,l=yield;for(t.push(0);;)o{var r=this.generator.next(e);r.value!==void 0&&this.result.push(this.format(r.value))})}nextValue(e){var r=this.generator.next(e).value;if(r!=void 0)return this.format(r)}}he.calculate=o;class pe extends ie{constructor(e){super(e);var r,t=e.period,a=e.values;this.result=[],r=new he({period:t,values:[]});this.generator=function*(){for(var e,a=yield;;)void 0!=e&&void 0!==a?(e=(a-e)*(2/(t+1))+e,a=yield e):(a=yield,e=r.nextValue(a),e&&(a=yield e))}(),this.generator.next(),this.generator.next(),a.forEach((e)=>{var r=this.generator.next(e);r.value!=void 0&&this.result.push(this.format(r.value))})}nextValue(e){var r=this.generator.next(e).value;if(r!=void 0)return this.format(r)}}pe.calculate=l;class ge extends ie{constructor(e){super(e);var r=e.period,t=e.values;this.result=[],this.generator=function*(){for(let t=new oe;;)if(t.length{var r=this.generator.next(e);r.value!=void 0&&this.result.push(this.format(r.value))})}nextValue(e){var r=this.generator.next(e).value;if(r!=void 0)return this.format(r)}}ge.calculate=n;class de extends ie{constructor(e){super(e);var r,t=e.period,a=e.values;this.result=[],r=new he({period:t,values:[]});this.generator=function*(){for(var e,a=yield;;)void 0!=e&&void 0!==a?(e=(a-e)*(1/t)+e,a=yield e):(a=yield,e=r.nextValue(a),void 0!==e&&(a=yield e))}(),this.generator.next(),this.generator.next(),a.forEach((e)=>{var r=this.generator.next(e);r.value!=void 0&&this.result.push(this.format(r.value))})}nextValue(e){var r=this.generator.next(e).value;if(r!=void 0)return this.format(r)}}de.calculate=s;class ve extends ie{constructor(e){super(e);var r=e.SimpleMAOscillator?he:pe,t=e.SimpleMASignal?he:pe,a=new r({period:e.fastPeriod,values:[],format:(e)=>e}),o=new r({period:e.slowPeriod,values:[],format:(e)=>e}),l=new t({period:e.signalPeriod,values:[],format:(e)=>e}),n=this.format;this.result=[],this.generator=function*(){for(var r,t,s,u,i,h,p=0;;){if(p{var r=this.generator.next(e);r.value!=void 0&&this.result.push(r.value)})}nextValue(e){var r=this.generator.next(e).value;return r}}ve.calculate=u;class ce extends ie{constructor(e){super(e);let r=e.values,t=e.period,a=this.format;this.generator=function*(e){var r,t,o=yield,l=1,n=0,s=o;for(o=yield;;)t=o-s,t=0{var r=this.generator.next(e);r.value!==void 0&&this.result.push(r.value)})}nextValue(e){return this.generator.next(e).value}}ce.calculate=i;class me extends ie{constructor(e){super(e);let r=e.values,t=e.period,a=this.format;this.generator=function*(e){var r,t,o=yield,l=1,n=0,s=o;for(o=yield;;)t=s-o,t=0{var r=this.generator.next(e);r.value!==void 0&&this.result.push(r.value)})}nextValue(e){return this.generator.next(e).value}}me.calculate=h;class xe extends ie{constructor(e){super(e);var r=e.period,t=e.values,a=new ce({period:r,values:[]}),o=new me({period:r,values:[]});let l=1;this.generator=function*(){for(var e,r,t,n,s=yield;;)e=a.nextValue(s),r=o.nextValue(s),void 0!==e&&void 0!==r&&(0===r?n=100:0===e?n=0:(t=e/r,t=isNaN(t)?0:t,n=parseFloat((100-100/(1+t)).toFixed(2)))),l++,s=yield n}(r),this.generator.next(),this.result=[],t.forEach((e)=>{var r=this.generator.next(e);r.value!==void 0&&this.result.push(r.value)})}nextValue(e){return this.generator.next(e).value}}xe.calculate=p;class we extends ie{constructor(e){super(e);var r=e.period,t=e.values,a=new he({period:r,values:[],format:(e)=>e});this.result=[],this.generator=function*(){var e,t,o=new le(r);e=yield;for(var l;;){if(o.push(e),t=a.nextValue(e),t){let e=0;for(let r of o.iterator())e+=Math.pow(r-t,2);l=te(e/r)}e=yield l}}(),this.generator.next(),t.forEach((e)=>{var r=this.generator.next(e);r.value!=void 0&&this.result.push(this.format(r.value))})}nextValue(e){var r=this.generator.next(e);if(r.value!=void 0)return this.format(r.value)}}we.calculate=g;class fe extends ie{constructor(e){super(e);var r,t,a=e.period,o=e.values,l=e.stdDev,n=this.format;this.result=[],r=new he({period:a,values:[],format:(e)=>e}),t=new we({period:a,values:[],format:(e)=>e}),this.generator=function*(){var e,a,o,s;for(a=yield;;){if(o=r.nextValue(a),s=t.nextValue(a),o){let r=n(o),t=n(o+s*l),u=n(o-s*l),i=n((a-u)/(t-u));e={middle:r,upper:t,lower:u,pb:i}}a=yield e}}(),this.generator.next(),o.forEach((e)=>{var r=this.generator.next(e);r.value!=void 0&&this.result.push(r.value)})}nextValue(e){return this.generator.next(e).value}}fe.calculate=d;class Ie extends ie{constructor(e){super(e),this.period=e.period,this.price=e.values;this.generator=function*(e){for(var r=new oe,t=0,a=1,o=yield,l=0;;)a{var r=this.generator.next(e);r.value!=void 0&&this.result.push(this.format(r.value))})}nextValue(e){var r=this.generator.next(e).value;if(r!=void 0)return this.format(r)}}Ie.calculate=function(e){ie.reverseInputs(e);var r=new Ie(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r};class _e extends ie{constructor(e){super(e);var r=e.low,t=e.high,a=this.format;if(r.length!=t.length)throw'Inputs(low,high) not of equal size';this.result=[],this.generator=function*(){for(var e,r,t=yield;;){if(r){let o=t.high-r.high,l=r.low-t.low;e=a(l>o&&0{var o=this.generator.next({high:t[a],low:r[a]});o.value!==void 0&&this.result.push(o.value)})}static calculate(e){ie.reverseInputs(e);var r=new _e(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}nextValue(e){return this.generator.next(e).value}}class Pe extends ie{constructor(e){super(e);var r=e.low,t=e.high,a=this.format;if(r.length!=t.length)throw'Inputs(low,high) not of equal size';this.result=[],this.generator=function*(){for(var e,r,t=yield;;){if(r){let o=t.high-r.high,l=r.low-t.low;e=a(o>l&&0{var o=this.generator.next({high:t[a],low:r[a]});o.value!==void 0&&this.result.push(o.value)})}static calculate(e){ie.reverseInputs(e);var r=new Pe(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r}nextValue(e){return this.generator.next(e).value}}class be extends ie{constructor(e){super(e);var r=e.low,t=e.high,a=e.close,o=this.format;if(r.length!=t.length)throw'Inputs(low,high) not of equal size';this.result=[],this.generator=function*(){for(var e,r,t=yield;;)void 0==e&&(e=t.close,t=yield r),r=ee(t.high-t.low,isNaN(re(t.high-e))?0:re(t.high-e),isNaN(re(t.low-e))?0:re(t.low-e)),e=t.close,void 0!=r&&(r=o(r)),t=yield r}(),this.generator.next(),r.forEach((e,o)=>{var l=this.generator.next({high:t[o],low:r[o],close:a[o]});l.value!=void 0&&this.result.push(l.value)})}nextValue(e){return this.generator.next(e).value}}be.calculate=v;class qe extends ue{}class Se extends ie{constructor(e){super(e);var r=e.low,t=e.high,a=e.close,o=e.period,l=this.format,n=new Pe({high:[],low:[]}),s=new _e({high:[],low:[]}),u=new Ie({period:o,values:[],format:(e)=>e}),i=new Ie({period:o,values:[],format:(e)=>e}),h=new Ie({period:o,values:[],format:(e)=>e}),p=new de({period:o,values:[],format:(e)=>e}),g=new be({low:[],high:[],close:[]});if(r.length!==t.length||t.length!==a.length)throw'Inputs(low,high, close) not of equal size';this.result=[],qe,this.generator=function*(){var e,r,t,a,o,l,d,v=yield;for(e=0,r=0,t=0;;){let e=g.nextValue(v),r=n.nextValue(v),t=s.nextValue(v);if(e===void 0){v=yield;continue}let c=h.nextValue(e),m=u.nextValue(r),x=i.nextValue(t);if(c!=void 0&&m!=void 0&&x!=void 0){a=100*m/c,o=100*x/c;let e=re(a-o),r=a+o;l=100*(e/r),d=p.nextValue(l)}v=yield{adx:d,pdi:a,mdi:o}}}(),this.generator.next(),r.forEach((e,o)=>{var n=this.generator.next({high:t[o],low:r[o],close:a[o]});n.value!=void 0&&n.value.adx!=void 0&&this.result.push({adx:l(n.value.adx),pdi:l(n.value.pdi),mdi:l(n.value.mdi)})})}nextValue(e){let r=this.generator.next(e).value;if(r!=void 0&&r.adx!=void 0)return{adx:this.format(r.adx),pdi:this.format(r.pdi),mdi:this.format(r.mdi)}}}Se.calculate=c;class Ce extends ie{constructor(e){super(e);var r=e.low,t=e.high,a=e.close,o=e.period,l=this.format;if(r.length!==t.length||t.length!==a.length)throw'Inputs(low,high, close) not of equal size';var n=new be({low:[],high:[],close:[]}),s=new de({period:o,values:[],format:(e)=>e});this.result=[],this.generator=function*(){for(var e,r,t=yield;;)r=n.nextValue({low:t.low,high:t.high,close:t.close}),e=void 0===r?void 0:s.nextValue(r),t=yield e}(),this.generator.next(),r.forEach((e,o)=>{var n=this.generator.next({high:t[o],low:r[o],close:a[o]});n.value!==void 0&&this.result.push(l(n.value))})}nextValue(e){return this.generator.next(e).value}}Ce.calculate=m;class Ee extends ie{constructor(e){super(e);var r=e.period,t=e.values;this.result=[],this.generator=function*(){let e=1;for(var t,a=new le(r),o=yield;;)a.push(o),e{var r=this.generator.next(e);r.value==void 0||isNaN(r.value)||this.result.push(this.format(r.value))})}nextValue(e){var r=this.generator.next(e);if(r.value!=void 0&&!isNaN(r.value))return this.format(r.value)}}Ee.calculate=x;class Ve extends ie{constructor(e){super(e);let r=e.values,t=e.ROCPer1,a=e.ROCPer2,o=e.ROCPer3,l=e.ROCPer4,n=e.SMAROCPer1,s=e.SMAROCPer2,u=e.SMAROCPer3,i=e.SMAROCPer4,h=e.signalPeriod,p=new Ee({period:t,values:[]}),g=new Ee({period:a,values:[]}),d=new Ee({period:o,values:[]}),v=new Ee({period:l,values:[]}),c=new he({period:n,values:[],format:(e)=>e}),m=new he({period:s,values:[],format:(e)=>e}),x=new he({period:u,values:[],format:(e)=>e}),w=new he({period:i,values:[],format:(e)=>e}),f=new he({period:h,values:[],format:(e)=>e});var I=this.format;this.result=[];let _=ee(t+n,a+s,o+u,l+i);this.generator=function*(){for(let e,r,t,a,o,l,n,s=1,u=yield;;){let i=p.nextValue(u),h=g.nextValue(u),P=d.nextValue(u),b=v.nextValue(u);r=i===void 0?void 0:c.nextValue(i),t=h===void 0?void 0:m.nextValue(h),a=P===void 0?void 0:x.nextValue(P),o=b===void 0?void 0:w.nextValue(b),s<_?s++:e=1*r+2*t+3*a+4*o,l=e===void 0?void 0:f.nextValue(e),n=e===void 0?void 0:{kst:I(e),signal:l?I(l):void 0},u=yield n}}(),this.generator.next(),r.forEach((e)=>{let r=this.generator.next(e);r.value!=void 0&&this.result.push(r.value)})}nextValue(e){let r=this.generator.next(e);if(r.value!=void 0)return r.value}}Ve.calculate=w;class He extends ie{constructor(e){super(e);let r=e.high||[],t=e.low||[];this.result=[],this.generator=function*(e,r){for(let t,a,o,l,n=!0,s=e,u=yield;;)t?(o+=s*(a-o),n?(o=J(o,l.low,u.low),t.high>a&&(a=t.high,s=J(s+e,r))):(o=ee(o,l.high,u.high),t.lowo)&&(s=e,o=a,n=!n,a=n?t.high:t.low)):(o=u.low,a=u.high),l=u,t&&(u=t),t=yield o}(e.step,e.max),this.generator.next(),t.forEach((e,a)=>{var o=this.generator.next({high:r[a],low:t[a]});o.value!==void 0&&this.result.push(o.value)})}nextValue(e){let r=this.generator.next(e);if(r.value!==void 0)return r.value}}He.calculate=f;class ke extends ie{constructor(e){super(e);let r=e.low,t=e.high,a=e.close,o=e.period,l=e.signalPeriod,n=this.format;if(r.length!==t.length||t.length!==a.length)throw'Inputs(low,high, close) not of equal size';this.result=[],this.generator=function*(){let e,r,t=1,a=new le(o,!0,!1),s=new le(o,!1,!0),u=new he({period:l,values:[],format:(e)=>e});for(var i=yield;;){if(a.push(i.high),s.push(i.low),t{var l=this.generator.next({high:t[o],low:r[o],close:a[o]});l.value!==void 0&&this.result.push(l.value)})}nextValue(e){let r=this.generator.next(e);if(r.value!==void 0)return r.value}}ke.calculate=I;class Te extends ie{constructor(e){super(e);let r=e.low,t=e.high,a=e.close,o=e.period,l=this.format;if(r.length!==t.length||t.length!==a.length)throw'Inputs(low,high, close) not of equal size';this.result=[],this.generator=function*(){let e,r,t=1,a=new le(o,!0,!1),n=new le(o,!1,!0);var s=yield;for(let u;;){if(a.push(s.high),n.push(s.low),t{var l=this.generator.next({high:t[o],low:r[o],close:a[o]});l.value!==void 0&&this.result.push(l.value)})}nextValue(e){var r=this.generator.next(e);if(r.value!=void 0)return this.format(r.value)}}Te.calculate=_;class De extends ie{constructor(e){super(e);var r=e.high,t=e.low,a=e.close,o=e.volume;if(t.length!==r.length||r.length!==a.length||r.length!==o.length)throw'Inputs(low,high, close, volumes) not of equal size';this.result=[],this.generator=function*(){var e,r=0;for(e=yield;;){let t=(e.close-e.low-(e.high-e.close))/(e.high-e.low);t=isNaN(t)?1:t;let a=t*e.volume;r+=a,e=yield Math.round(r)}}(),this.generator.next(),r.forEach((e,r)=>{var l={high:e,low:t[r],close:a[r],volume:o[r]},n=this.generator.next(l);n.value!=void 0&&this.result.push(n.value)})}nextValue(e){return this.generator.next(e).value}}De.calculate=P;class Ae extends ie{constructor(e){super(e);var r=e.close,t=e.volume;this.result=[],this.generator=function*(){var e,r,t=0;for(e=yield,e.close&&'number'==typeof e.close&&(r=e.close,e=yield);;)r{let o={close:r[a],volume:t[a]},l=this.generator.next(o);l.value!=void 0&&this.result.push(l.value)})}nextValue(e){return this.generator.next(e).value}}Ae.calculate=b;class Be extends ie{constructor(e){super(e);let r=e.values,t=e.period,a=this.format,o=new pe({period:t,values:[],format:(e)=>e}),l=new pe({period:t,values:[],format:(e)=>e}),n=new pe({period:t,values:[],format:(e)=>e}),s=new Ee({period:1,values:[],format:(e)=>e});this.result=[],this.generator=function*(){for(let e=yield;;){let r=o.nextValue(e),t=r?l.nextValue(r):void 0,u=t?n.nextValue(t):void 0,i=u?s.nextValue(u):void 0;e=yield i?a(i):void 0}}(),this.generator.next(),r.forEach((e)=>{let r=this.generator.next(e);r.value!==void 0&&this.result.push(r.value)})}nextValue(e){let r=this.generator.next(e);if(r.value!==void 0)return r.value}}Be.calculate=q;class ze extends ie{constructor(e){super(e);var r=e.close,t=e.volume,a=e.period||1;if(t.length!==r.length)throw'Inputs(volume, close) not of equal size';let o=new pe({values:[],period:a});this.result=[],this.generator=function*(){var e=yield,r=yield;for(let t;;)t=(r.close-e.close)*r.volume,e=r,r=yield o.nextValue(t)}(),this.generator.next(),t.forEach((e,a)=>{var o=this.generator.next({close:r[a],volume:t[a]});o.value!=void 0&&this.result.push(o.value)})}nextValue(e){let r=this.generator.next(e).value;if(r!=void 0)return r}}ze.calculate=S;class Le extends ie{constructor(e){super(e);var r=e.low,t=e.high,a=e.close,o=e.period,l=this.format;var n=new le(o),s=new he({period:o,values:[],format:(e)=>e});if(r.length!==t.length||t.length!==a.length)throw'Inputs(low,high, close) not of equal size';this.result=[],this.generator=function*(){for(var e=yield;;){let r=(e.high+e.low+e.close)/3;n.push(r);let t,a=s.nextValue(r),o=null,l=0;if(a!=void 0){for(let e of n.iterator())l+=re(e-a);o=l/20,t=(r-a)/(.015*o)}e=yield t}}(),this.generator.next(),r.forEach((e,o)=>{var l=this.generator.next({high:t[o],low:r[o],close:a[o]});l.value!=void 0&&this.result.push(l.value)})}nextValue(e){let r=this.generator.next(e).value;if(r!=void 0)return r}}Le.calculate=C;class Me extends ie{constructor(e){super(e);var r=e.high,t=e.low,a=e.fastPeriod,o=e.slowPeriod,l=new he({values:[],period:o}),n=new he({values:[],period:a});this.result=[],this.generator=function*(){var e,r,t,a,o;for(r=yield;;)t=(r.high+r.low)/2,a=l.nextValue(t),o=n.nextValue(t),void 0!==a&&void 0!==o&&(e=o-a),r=yield e}(),this.generator.next(),r.forEach((e,r)=>{var a={high:e,low:t[r]},o=this.generator.next(a);o.value!=void 0&&this.result.push(this.format(o.value))})}nextValue(e){var r=this.generator.next(e);if(r.value!=void 0)return this.format(r.value)}}Me.calculate=E;class je extends ie{constructor(e){super(e);var r=e.low,t=e.high,a=e.close,o=e.volume,l=this.format;if(r.length!==t.length||t.length!==a.length)throw'Inputs(low,high, close) not of equal size';this.result=[],this.generator=function*(){var e=yield;for(let r=0,t=0;;){let a=(e.high+e.low+e.close)/3,o=e.volume*a;r+=o,t+=e.volume,e=yield r/t}}(),this.generator.next(),r.forEach((e,l)=>{var n=this.generator.next({high:t[l],low:r[l],close:a[l],volume:o[l]});n.value!=void 0&&this.result.push(n.value)})}nextValue(e){let r=this.generator.next(e).value;if(r!=void 0)return r}}je.calculate=V;class Re extends ie{constructor(e){super(e);var r=e.high,t=e.low,a=e.close,o=e.open,l=e.volume,n=e.noOfBars;if(t.length!==r.length||r.length!==a.length||r.length!==l.length)throw'Inputs(low,high, close, volumes) not of equal size';this.result=[];var s=ee(...r,...t,...a,...o),u=J(...r,...t,...a,...o),i=u;for(let h=0;hv?g+=c:p+=c)}this.result.push({rangeStart:e,rangeEnd:h,bullishVolume:p,bearishVolume:g,totalVolume:d})}}nextValue(){throw'Next value not supported for volume profile'}}Re.calculate=k;class ye extends ie{constructor(e){super(e),this.result=[],this.generator=function*(){for(let e=yield;;)e=yield(e.high+e.low+e.close)/3}(),this.generator.next(),e.low.forEach((r,t)=>{var a=this.generator.next({high:e.high[t],low:e.low[t],close:e.close[t]});this.result.push(a.value)})}nextValue(e){var r=this.generator.next(e).value;return r}}ye.calculate=function(e){ie.reverseInputs(e);var r=new ye(e).result;return e.reversedInput&&r.reverse(),ie.reverseInputs(e),r};class Oe extends ie{constructor(e){super(e);var r=e.high,t=e.low,a=e.close,o=e.volume,l=e.period,n=new ye({low:[],high:[],close:[]}),s=new le(l,!1,!1,!0),u=new le(l,!1,!1,!0);if(t.length!==r.length||r.length!==a.length||r.length!==o.length)throw'Inputs(low,high, close, volumes) not of equal size';this.result=[],this.generator=function*(){var e,r,t,a,o,i,h=0;let p=null,g=null;for(r=yield,t=r.close,r=yield;;){var{high:d,low:v,close:c,volume:m}=r,x=0,w=0;p=n.nextValue({high:d,low:v,close:c}),h=p*m,null!=p&&null!=g&&(p>g?x=h:w=h,s.push(x),u.push(w),a=s.periodSum,i=u.periodSum,s.totalPushed>=l&&s.totalPushed>=l&&(o=a/i,e=100-100/(1+o))),g=p,r=yield e}}(),this.generator.next(),r.forEach((e,r)=>{var l={high:e,low:t[r],close:a[r],volume:o[r]},n=this.generator.next(l);n.value!=void 0&&this.result.push(parseFloat(n.value.toFixed(2)))})}nextValue(e){var r=this.generator.next(e);if(r.value!=void 0)return parseFloat(r.value.toFixed(2))}}Oe.calculate=T;class Fe extends ie{constructor(e){super(e);let r=e.values,t=e.rsiPeriod,a=e.stochasticPeriod,o=e.kPeriod,l=e.dPeriod,n=this.format;this.result=[],this.generator=function*(){let e,r,n,s,u=new xe({period:t,values:[]}),i=new ke({period:a,high:[],low:[],close:[],signalPeriod:o}),h=new he({period:l,values:[],format:(e)=>e});for(var p=yield;;){if(e=u.nextValue(p),void 0!==e){var g={high:e,low:e,close:e};r=i.nextValue(g),void 0!==r&&void 0!==r.d&&(n=h.nextValue(r.d),void 0!==n&&(s={stochRSI:r.k,k:r.d,d:n}))}p=yield s}}(),this.generator.next(),r.forEach((e)=>{var r=this.generator.next(e);r.value!==void 0&&this.result.push(r.value)})}nextValue(e){let r=this.generator.next(e);if(r.value!==void 0)return r.value}}Fe.calculate=D;class Ue extends ie{constructor(e){super(e);var r=e.values,t=e.period;this.result=[];var a=new le(t,!0,!1,!1);this.generator=function*(){var e,r;for(e=yield;;)a.push(e),a.totalPushed>=t&&(r=a.periodHigh),e=yield r}(),this.generator.next(),r.forEach((e)=>{var r=this.generator.next(e);r.value!=void 0&&this.result.push(r.value)})}nextValue(e){var r=this.generator.next(e);if(r.value!=void 0)return r.value}}Ue.calculate=A;class We extends ie{constructor(e){super(e);var r=e.values,t=e.period;this.result=[];var a=new le(t,!1,!0,!1);this.generator=function*(){var e,r;for(e=yield;;)a.push(e),a.totalPushed>=t&&(r=a.periodLow),e=yield r}(),this.generator.next(),r.forEach((e)=>{var r=this.generator.next(e);r.value!=void 0&&this.result.push(r.value)})}nextValue(e){var r=this.generator.next(e);if(r.value!=void 0)return r.value}}We.calculate=B;class Ge extends ie{constructor(e){super(e);var r=e.values,t=e.period;this.result=[];var a=new le(t,!1,!1,!0);this.generator=function*(){var e,r;for(e=yield;;)a.push(e),a.totalPushed>=t&&(r=a.periodSum),e=yield r}(),this.generator.next(),r.forEach((e)=>{var r=this.generator.next(e);r.value!=void 0&&this.result.push(r.value)})}nextValue(e){var r=this.generator.next(e);if(r.value!=void 0)return r.value}}Ge.calculate=z;class Ne extends ie{constructor(e){super(e);this.format;let r=e.useATR,t=e.brickSize||0;if(r){let r=m(Object.assign({},e));t=r[r.length-1]}if(this.result=new ne,0===t)return void console.error('Not enough data to calculate brickSize for renko when using ATR');let a=0,o=0,l=Infinity,n=0,s=0,u=0;this.generator=function*(){for(let e=yield;;){if(0==a){a=e.close,o=e.high,l=e.low,n=e.close,s=e.volume,u=e.timestamp,e=yield;continue}let r=re(e.close-n),i=re(e.close-a);if(r>=t&&i>=t){let u=r>i?a:n,h={open:u,high:o>e.high?o:e.high,low:le.close?u-t:u+t,volume:s+e.volume,timestamp:e.timestamp};a=h.open,o=h.close,l=h.close,n=h.close,s=0,e=yield h}else o=o>e.high?o:e.high,l=l{var a=this.generator.next({open:e.open[t],high:e.high[t],low:e.low[t],close:e.close[t],volume:e.volume[t],timestamp:e.timestamp[t]});a.value&&(this.result.open.push(a.value.open),this.result.high.push(a.value.high),this.result.low.push(a.value.low),this.result.close.push(a.value.close),this.result.volume.push(a.value.volume),this.result.timestamp.push(a.value.timestamp))})}nextValue(){return console.error('Cannot calculate next value on Renko, Every value has to be recomputed for every change, use calcualte method'),null}}Ne.calculate=L;class Xe extends ie{constructor(e){super(e);this.format;this.result=new ne;let r=null,t=0,a=Infinity,o=0,l=0,n=0;this.generator=function*(){for(let e=yield,s=null;;){if(null==r)r=(e.close+e.open)/2,t=e.high,a=e.low,o=(e.close+e.open+e.high+e.low)/4,l=e.volume||0,n=e.timestamp||0,s={open:r,high:t,low:a,close:o,volume:e.volume||0,timestamp:e.timestamp||0};else{let l=(e.close+e.open+e.high+e.low)/4,n=(r+o)/2,u=ee(n,l,e.high),i=J(e.low,n,l);s={close:l,open:n,high:u,low:i,volume:e.volume||0,timestamp:e.timestamp||0},o=l,r=n,t=u,a=i}e=yield s}}(),this.generator.next(),e.low.forEach((r,t)=>{var a=this.generator.next({open:e.open[t],high:e.high[t],low:e.low[t],close:e.close[t],volume:e.volume?e.volume[t]:e.volume,timestamp:e.timestamp?e.timestamp[t]:e.timestamp});a.value&&(this.result.open.push(a.value.open),this.result.high.push(a.value.high),this.result.low.push(a.value.low),this.result.close.push(a.value.close),this.result.volume.push(a.value.volume),this.result.timestamp.push(a.value.timestamp))})}nextValue(e){var r=this.generator.next(e).value;return r}}Xe.calculate=M;class Ke{constructor(){}approximateEqual(e,r){let t=1*parseFloat(re(e-r).toPrecision(4)),a=1*parseFloat((1e-3*e).toPrecision(4));return t<=a}logic(){throw'this has to be implemented'}getAllPatternIndex(e){if(e.close.lengthr.call(this,e)?t:void 0).filter((e)=>e)}hasPattern(e){if(e.close.lengtha<=e.close.length-r);return t}}class Qe extends Ke{constructor(){super(),this.name='MorningStar',this.requiredCount=3}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=e.open[1],n=e.close[1],s=e.high[1],u=e.low[1],i=e.open[2],h=e.close[2],p=e.high[2],g=e.low[2];return tu&&o>s&&ss&&n(r+t)/2}}class Ye extends Ke{constructor(){super(),this.name='BullishEngulfingPattern',this.requiredCount=2}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=e.open[1],n=e.close[1],s=e.high[1],u=e.low[1];return tl&&t>l&&rl&&tu&&a>s}}class $e extends Ke{constructor(){super(),this.requiredCount=2,this.name='BullishHaramiCross'}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=e.open[1],n=e.close[1],s=e.high[1],u=e.low[1],i=this.approximateEqual(l,n);return r>l&&tu&&a>s&&i}}class Je extends Ke{constructor(){super(),this.name='Doji',this.requiredCount=1}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=this.approximateEqual(r,t),n=l&&this.approximateEqual(r,a),s=l&&this.approximateEqual(t,o);return l&&n==s}}class er extends Ke{constructor(){super(),this.name='MorningDojiStar',this.requiredCount=3}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=e.open[1],n=e.close[1],s=e.high[1],u=e.low[1],i=e.open[2],h=e.close[2],p=e.high[2],g=e.low[2],d=new Je().hasPattern({open:[l],close:[n],high:[s],low:[u]});return ts&&n(r+t)/2}}class rr extends Ke{constructor(){super(),this.requiredCount=3,this.name='DownsideTasukiGap'}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=e.open[1],n=e.close[1],s=e.high[1],u=e.low[1],i=e.open[2],h=e.close[2],p=e.high[2],g=e.low[2];return ti&&si&&nl&&hl&&n>(r+t)/2&&n>l}}class or extends Ke{constructor(){super(),this.name='ThreeWhiteSoldiers',this.requiredCount=3}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=e.open[1],n=e.close[1],s=e.high[1],u=e.low[1],i=e.open[2],h=e.close[2],p=e.high[2],g=e.low[2];return s>a&&p>s&&rl&&li&&ir;return l=l&&this.approximateEqual(t,a),l=l&&t-r<=2*(r-o),l}}class nr extends Ke{constructor(){super(),this.name='BullishInvertedHammerStick',this.requiredCount=1}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=t>r;return l=l&&this.approximateEqual(r,o),l=l&&t-r<=2*(a-t),l}}class sr extends Ke{constructor(){super(),this.name='BearishHammerStick',this.requiredCount=1}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=r>t;return l=l&&this.approximateEqual(r,a),l=l&&r-t<=2*(t-o),l}}class ur extends Ke{constructor(){super(),this.name='BearishInvertedHammerStick',this.requiredCount=1}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=r>t;return l=l&&this.approximateEqual(t,o),l=l&&r-t<=2*(a-r),l}}class ir extends Ke{constructor(){super(),this.name='HammerPattern',this.requiredCount=5}logic(e){let r=this.downwardTrend(e);return r=r&&this.includesHammer(e),r=r&&this.hasConfirmation(e),r}downwardTrend(e,r=!0){let t=r?3:4,a=i({values:e.close.slice(0,t),period:t-1}),o=h({values:e.close.slice(0,t),period:t-1});return o>a}includesHammer(e,r=!0){let t=r?3:4,a=r?4:void 0,o={open:e.open.slice(t,a),close:e.close.slice(t,a),low:e.low.slice(t,a),high:e.high.slice(t,a)},l=y(o);return l=l||O(o),l=l||j(o),l=l||R(o),l}hasConfirmation(e){let r={open:e.open[3],close:e.close[3],low:e.low[3],high:e.high[3]},t={open:e.open[4],close:e.close[4],low:e.low[4],high:e.high[4]},a=t.openr}}let gr=[new Ye,new rr,new Ze,new $e,new er,new Qe,new tr,new ar,new or,new lr,new nr,new ir,new hr,new pr];class dr extends Ke{constructor(){super(),this.name='Bullish Candlesticks'}hasPattern(e){return gr.reduce(function(r,t){let a=t.hasPattern(e);return r||a},!1)}}class vr extends Ke{constructor(){super(),this.name='BearishEngulfingPattern',this.requiredCount=2}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=e.open[1],n=e.close[1],s=e.high[1],u=e.low[1];return t>r&&rn}}class cr extends Ke{constructor(){super(),this.requiredCount=2,this.name='BearishHarami'}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=e.open[1],n=e.close[1],s=e.high[1],u=e.low[1];return rl&&t>n&&rs}}class mr extends Ke{constructor(){super(),this.requiredCount=2,this.name='BearishHaramiCross'}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=e.open[1],n=e.close[1],s=e.high[1],u=e.low[1],i=this.approximateEqual(l,n);return rl&&t>n&&rs&&i}}class xr extends Ke{constructor(){super(),this.name='EveningDojiStar',this.requiredCount=3}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=e.open[1],n=e.close[1],s=e.high[1],u=e.low[1],i=e.open[2],h=e.close[2],p=e.high[2],g=e.low[2],d=new Je().hasPattern({open:[l],close:[n],high:[s],low:[u]});return t>r&&d&&s>a&&u>a&&ii&&i>h&&h<(r+t)/2}}class wr extends Ke{constructor(){super(),this.name='EveningStar',this.requiredCount=3}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=e.open[1],n=e.close[1],s=e.high[1],u=e.low[1],i=e.open[2],h=e.close[2],p=e.high[2],g=e.low[2];return t>r&&aa&&u>a&&ii&&i>h&&h<(r+t)/2}}class fr extends Ke{constructor(){super(),this.name='BearishMarubozu',this.requiredCount=1}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=this.approximateEqual(r,a)&&this.approximateEqual(o,t)&&r>t&&r>o;return l}}class Ir extends Ke{constructor(){super(),this.name='ThreeBlackCrows',this.requiredCount=3}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=e.open[1],n=e.close[1],s=e.high[1],u=e.low[1],i=e.open[2],h=e.close[2],p=e.high[2],g=e.low[2];return o>u&&u>g&&r>t&&l>n&&i>h&&r>l&&l>t&&l>i&&i>n}}class _r extends Ke{constructor(){super(),this.name='HangingMan',this.requiredCount=5}logic(e){let r=this.upwardTrend(e);return r=r&&this.includesHammer(e),r=r&&this.hasConfirmation(e),r}upwardTrend(e,r=!0){let t=r?3:4,a=i({values:e.close.slice(0,t),period:t-1}),o=h({values:e.close.slice(0,t),period:t-1});return a>o}includesHammer(e,r=!0){let t=r?3:4,a=r?4:void 0,o={open:e.open.slice(t,a),close:e.close.slice(t,a),low:e.low.slice(t,a),high:e.high.slice(t,a)},l=y(o);return l=l||j(o),l}hasConfirmation(e){let r={open:e.open[3],close:e.close[3],low:e.low[3],high:e.high[3]},t={open:e.open[4],close:e.close[4],low:e.low[4],high:e.high[4]},a=t.open>t.close;return a&&r.close>t.close}}class Pr extends _r{constructor(){super(),this.name='HangingManUnconfirmed'}logic(e){let r=this.upwardTrend(e,!1);return r=r&&this.includesHammer(e,!1),r}}class br extends Ke{constructor(){super(),this.name='ShootingStar',this.requiredCount=5}logic(e){let r=this.upwardTrend(e);return r=r&&this.includesHammer(e),r=r&&this.hasConfirmation(e),r}upwardTrend(e,r=!0){let t=r?3:4,a=i({values:e.close.slice(0,t),period:t-1}),o=h({values:e.close.slice(0,t),period:t-1});return a>o}includesHammer(e,r=!0){let t=r?3:4,a=r?4:void 0,o={open:e.open.slice(t,a),close:e.close.slice(t,a),low:e.low.slice(t,a),high:e.high.slice(t,a)},l=O(o);return l=l||R(o),l}hasConfirmation(e){let r={open:e.open[3],close:e.close[3],low:e.low[3],high:e.high[3]},t={open:e.open[4],close:e.close[4],low:e.low[4],high:e.high[4]},a=t.open>t.close;return a&&r.close>t.close}}class qr extends br{constructor(){super(),this.name='ShootingStarUnconfirmed'}logic(e){let r=this.upwardTrend(e,!1);return r=r&&this.includesHammer(e,!1),r}}class Sr extends Ke{constructor(){super(),this.name='TweezerTop',this.requiredCount=5}logic(e){return this.upwardTrend(e)&&e.high[3]==e.high[4]}upwardTrend(e){let r=i({values:e.close.slice(0,3),period:2}),t=h({values:e.close.slice(0,3),period:2});return r>t}}let Cr=[new vr,new cr,new mr,new xr,new wr,new fr,new Ir,new sr,new ur,new _r,new Pr,new br,new qr,new Sr];class Er extends Ke{constructor(){super(),this.name='Bearish Candlesticks'}hasPattern(e){return Cr.reduce(function(r,t){return r||t.hasPattern(e)},!1)}}class Vr extends Ke{constructor(){super(),this.name='AbandonedBaby',this.requiredCount=3}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=e.open[1],n=e.close[1],s=e.high[1],u=e.low[1],i=e.open[2],h=e.close[2],p=e.high[2],g=e.low[2],d=new Je().hasPattern({open:[l],close:[n],high:[s],low:[u]});return ts&&h>i&&pr&&na&&n<(t+r)/2&&n>r}}class kr extends Ke{constructor(){super(),this.requiredCount=1,this.name='DragonFlyDoji'}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=this.approximateEqual(r,t),n=l&&this.approximateEqual(r,a),s=l&&this.approximateEqual(t,o);return l&&n&&!s}}class Tr extends Ke{constructor(){super(),this.requiredCount=1,this.name='GraveStoneDoji'}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=this.approximateEqual(r,t),n=l&&this.approximateEqual(r,a),s=l&&this.approximateEqual(t,o);return l&&s&&!n}}class Dr extends Ke{constructor(){super(),this.name='BullishSpinningTop',this.requiredCount=1}logic(e){let r=e.open[0],t=e.close[0],a=e.high[0],o=e.low[0],l=re(t-r),n=re(a-t),s=re(r-o);return l {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nSMA.calculate = sma;\nexport function sma(input) {\n Indicator.reverseInputs(input);\n var result = new SMA(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n//STEP 6. Run the tests\n","import { Indicator } from '../indicator/indicator';\nimport { SMA } from './SMA';\nexport class EMA extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n var exponent = (2 / (period + 1));\n var sma;\n this.result = [];\n sma = new SMA({ period: period, values: [] });\n var genFn = (function* () {\n var tick = yield;\n var prevEma;\n while (true) {\n if (prevEma !== undefined && tick !== undefined) {\n prevEma = ((tick - prevEma) * exponent) + prevEma;\n tick = yield prevEma;\n }\n else {\n tick = yield;\n prevEma = sma.nextValue(tick);\n if (prevEma)\n tick = yield prevEma;\n }\n }\n });\n this.generator = genFn();\n this.generator.next();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nEMA.calculate = ema;\nexport function ema(input) {\n Indicator.reverseInputs(input);\n var result = new EMA(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n","\"use strict\";\nimport { Indicator } from '../indicator/indicator';\nimport { LinkedList } from '../Utils/LinkedList';\nexport class WMA extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n this.result = [];\n this.generator = (function* () {\n let data = new LinkedList();\n let denominator = period * (period + 1) / 2;\n while (true) {\n if ((data.length) < period) {\n data.push(yield);\n }\n else {\n data.resetCursor();\n let result = 0;\n for (let i = 1; i <= period; i++) {\n result = result + (data.next() * i / (denominator));\n }\n var next = yield result;\n data.shift();\n data.push(next);\n }\n }\n })();\n this.generator.next();\n priceArray.forEach((tick, index) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n //STEP 5. REMOVE GET RESULT FUNCTION\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nWMA.calculate = wma;\n;\nexport function wma(input) {\n Indicator.reverseInputs(input);\n var result = new WMA(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n","import { Indicator } from '../indicator/indicator';\nimport { SMA } from './SMA';\nexport class WEMA extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n var exponent = 1 / period;\n var sma;\n this.result = [];\n sma = new SMA({ period: period, values: [] });\n var genFn = (function* () {\n var tick = yield;\n var prevEma;\n while (true) {\n if (prevEma !== undefined && tick !== undefined) {\n prevEma = ((tick - prevEma) * exponent) + prevEma;\n tick = yield prevEma;\n }\n else {\n tick = yield;\n prevEma = sma.nextValue(tick);\n if (prevEma !== undefined)\n tick = yield prevEma;\n }\n }\n });\n this.generator = genFn();\n this.generator.next();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nWEMA.calculate = wema;\nexport function wema(input) {\n Indicator.reverseInputs(input);\n var result = new WEMA(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n","/**\n * Created by AAravindan on 5/4/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from './SMA';\nimport { EMA } from './EMA';\nexport class MACDInput extends IndicatorInput {\n constructor(values) {\n super();\n this.values = values;\n this.SimpleMAOscillator = true;\n this.SimpleMASignal = true;\n }\n}\nexport class MACDOutput {\n}\nexport class MACD extends Indicator {\n constructor(input) {\n super(input);\n var oscillatorMAtype = input.SimpleMAOscillator ? SMA : EMA;\n var signalMAtype = input.SimpleMASignal ? SMA : EMA;\n var fastMAProducer = new oscillatorMAtype({ period: input.fastPeriod, values: [], format: (v) => { return v; } });\n var slowMAProducer = new oscillatorMAtype({ period: input.slowPeriod, values: [], format: (v) => { return v; } });\n var signalMAProducer = new signalMAtype({ period: input.signalPeriod, values: [], format: (v) => { return v; } });\n var format = this.format;\n this.result = [];\n this.generator = (function* () {\n var index = 0;\n var tick;\n var MACD, signal, histogram, fast, slow;\n while (true) {\n if (index < input.slowPeriod) {\n tick = yield;\n fast = fastMAProducer.nextValue(tick);\n slow = slowMAProducer.nextValue(tick);\n index++;\n continue;\n }\n if (fast && slow) {\n MACD = fast - slow;\n signal = signalMAProducer.nextValue(MACD);\n }\n histogram = MACD - signal;\n tick = yield ({\n //fast : fast,\n //slow : slow,\n MACD: format(MACD),\n signal: signal ? format(signal) : undefined,\n histogram: isNaN(histogram) ? undefined : format(histogram)\n });\n fast = fastMAProducer.nextValue(tick);\n slow = slowMAProducer.nextValue(tick);\n }\n })();\n this.generator.next();\n input.values.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n return result;\n }\n ;\n}\nMACD.calculate = macd;\nexport function macd(input) {\n Indicator.reverseInputs(input);\n var result = new MACD(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class AvgGainInput extends IndicatorInput {\n}\nexport class AverageGain extends Indicator {\n constructor(input) {\n super(input);\n let values = input.values;\n let period = input.period;\n let format = this.format;\n this.generator = (function* (period) {\n var currentValue = yield;\n var counter = 1;\n var gainSum = 0;\n var avgGain;\n var gain;\n var lastValue = currentValue;\n currentValue = yield;\n while (true) {\n gain = currentValue - lastValue;\n gain = gain > 0 ? gain : 0;\n if (gain > 0) {\n gainSum = gainSum + gain;\n }\n if (counter < period) {\n counter++;\n }\n else if (avgGain === undefined) {\n avgGain = gainSum / period;\n }\n else {\n avgGain = ((avgGain * (period - 1)) + gain) / period;\n }\n lastValue = currentValue;\n avgGain = (avgGain !== undefined) ? format(avgGain) : undefined;\n currentValue = yield avgGain;\n }\n })(period);\n this.generator.next();\n this.result = [];\n values.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nAverageGain.calculate = averagegain;\nexport function averagegain(input) {\n Indicator.reverseInputs(input);\n var result = new AverageGain(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class AvgLossInput extends IndicatorInput {\n}\nexport class AverageLoss extends Indicator {\n constructor(input) {\n super(input);\n let values = input.values;\n let period = input.period;\n let format = this.format;\n this.generator = (function* (period) {\n var currentValue = yield;\n var counter = 1;\n var lossSum = 0;\n var avgLoss;\n var loss;\n var lastValue = currentValue;\n currentValue = yield;\n while (true) {\n loss = lastValue - currentValue;\n loss = loss > 0 ? loss : 0;\n if (loss > 0) {\n lossSum = lossSum + loss;\n }\n if (counter < period) {\n counter++;\n }\n else if (avgLoss === undefined) {\n avgLoss = lossSum / period;\n }\n else {\n avgLoss = ((avgLoss * (period - 1)) + loss) / period;\n }\n lastValue = currentValue;\n avgLoss = (avgLoss !== undefined) ? format(avgLoss) : undefined;\n currentValue = yield avgLoss;\n }\n })(period);\n this.generator.next();\n this.result = [];\n values.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nAverageLoss.calculate = averageloss;\nexport function averageloss(input) {\n Indicator.reverseInputs(input);\n var result = new AverageLoss(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/5/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { AverageGain } from '../Utils/AverageGain';\nimport { AverageLoss } from '../Utils/AverageLoss';\nexport class RSIInput extends IndicatorInput {\n}\nexport class RSI extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var values = input.values;\n var GainProvider = new AverageGain({ period: period, values: [] });\n var LossProvider = new AverageLoss({ period: period, values: [] });\n let count = 1;\n this.generator = (function* (period) {\n var current = yield;\n var lastAvgGain, lastAvgLoss, RS, currentRSI;\n while (true) {\n lastAvgGain = GainProvider.nextValue(current);\n lastAvgLoss = LossProvider.nextValue(current);\n if ((lastAvgGain !== undefined) && (lastAvgLoss !== undefined)) {\n if (lastAvgLoss === 0) {\n currentRSI = 100;\n }\n else if (lastAvgGain === 0) {\n currentRSI = 0;\n }\n else {\n RS = lastAvgGain / lastAvgLoss;\n RS = isNaN(RS) ? 0 : RS;\n currentRSI = parseFloat((100 - (100 / (1 + RS))).toFixed(2));\n }\n }\n count++;\n current = yield currentRSI;\n }\n })(period);\n this.generator.next();\n this.result = [];\n values.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nRSI.calculate = rsi;\nexport function rsi(input) {\n Indicator.reverseInputs(input);\n var result = new RSI(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nimport LinkedList from '../Utils/FixedSizeLinkedList';\n/**\n * Created by AAravindan on 5/7/16.\n */\n\"use strict\";\nexport class SDInput extends IndicatorInput {\n}\n;\nexport class SD extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n var sma = new SMA({ period: period, values: [], format: (v) => { return v; } });\n this.result = [];\n this.generator = (function* () {\n var tick;\n var mean;\n var currentSet = new LinkedList(period);\n ;\n tick = yield;\n var sd;\n while (true) {\n currentSet.push(tick);\n mean = sma.nextValue(tick);\n if (mean) {\n let sum = 0;\n for (let x of currentSet.iterator()) {\n sum = sum + (Math.pow((x - mean), 2));\n }\n sd = Math.sqrt(sum / (period));\n }\n tick = yield sd;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var nextResult = this.generator.next(price);\n if (nextResult.value != undefined)\n return this.format(nextResult.value);\n }\n ;\n}\nSD.calculate = sd;\nexport function sd(input) {\n Indicator.reverseInputs(input);\n var result = new SD(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","\"use strict\";\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nimport { SD } from '../Utils/SD';\nexport class BollingerBandsInput extends IndicatorInput {\n}\n;\nexport class BollingerBandsOutput extends IndicatorInput {\n}\n;\nexport class BollingerBands extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n var stdDev = input.stdDev;\n var format = this.format;\n var sma, sd;\n this.result = [];\n sma = new SMA({ period: period, values: [], format: (v) => { return v; } });\n sd = new SD({ period: period, values: [], format: (v) => { return v; } });\n this.generator = (function* () {\n var result;\n var tick;\n var calcSMA;\n var calcsd;\n tick = yield;\n while (true) {\n calcSMA = sma.nextValue(tick);\n calcsd = sd.nextValue(tick);\n if (calcSMA) {\n let middle = format(calcSMA);\n let upper = format(calcSMA + (calcsd * stdDev));\n let lower = format(calcSMA - (calcsd * stdDev));\n let pb = format((tick - lower) / (upper - lower));\n result = {\n middle: middle,\n upper: upper,\n lower: lower,\n pb: pb\n };\n }\n tick = yield result;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nBollingerBands.calculate = bollingerbands;\nexport function bollingerbands(input) {\n Indicator.reverseInputs(input);\n var result = new BollingerBands(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator } from '../indicator/indicator';\nimport { LinkedList } from '../Utils/LinkedList';\n//STEP3. Add class based syntax with export\nexport class WilderSmoothing extends Indicator {\n constructor(input) {\n super(input);\n this.period = input.period;\n this.price = input.values;\n var genFn = (function* (period) {\n var list = new LinkedList();\n var sum = 0;\n var counter = 1;\n var current = yield;\n var result = 0;\n while (true) {\n if (counter < period) {\n counter++;\n sum = sum + current;\n result = undefined;\n }\n else if (counter == period) {\n counter++;\n sum = sum + current;\n result = sum;\n }\n else {\n result = result - (result / period) + current;\n }\n current = yield result;\n }\n });\n this.generator = genFn(this.period);\n this.generator.next();\n this.result = [];\n this.price.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nWilderSmoothing.calculate = wildersmoothing;\nexport function wildersmoothing(input) {\n Indicator.reverseInputs(input);\n var result = new WilderSmoothing(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n//STEP 6. Run the tests\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/8/16.\n */\n/**\n * Created by AAravindan on 5/8/16.\n */\n\"use strict\";\nexport class TrueRangeInput extends IndicatorInput {\n}\n;\nexport class TrueRange extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var format = this.format;\n if (lows.length != highs.length) {\n throw ('Inputs(low,high) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var current = yield;\n var previousClose, result;\n while (true) {\n if (previousClose === undefined) {\n previousClose = current.close;\n current = yield result;\n }\n result = Math.max(current.high - current.low, isNaN(Math.abs(current.high - previousClose)) ? 0 : Math.abs(current.high - previousClose), isNaN(Math.abs(current.low - previousClose)) ? 0 : Math.abs(current.low - previousClose));\n previousClose = current.close;\n if (result != undefined) {\n result = format(result);\n }\n current = yield result;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nTrueRange.calculate = truerange;\nexport function truerange(input) {\n Indicator.reverseInputs(input);\n var result = new TrueRange(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { WilderSmoothing } from '../moving_averages/WilderSmoothing';\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { MDM } from './MinusDM';\nimport { PDM } from './PlusDM';\nimport { TrueRange } from './TrueRange';\nimport { WEMA } from '../moving_averages/WEMA';\nexport class ADXInput extends IndicatorInput {\n}\n;\nexport class ADXOutput extends IndicatorInput {\n}\n;\nexport class ADX extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var period = input.period;\n var format = this.format;\n var plusDM = new PDM({\n high: [],\n low: []\n });\n var minusDM = new MDM({\n high: [],\n low: []\n });\n var emaPDM = new WilderSmoothing({ period: period, values: [], format: (v) => { return v; } });\n var emaMDM = new WilderSmoothing({ period: period, values: [], format: (v) => { return v; } });\n var emaTR = new WilderSmoothing({ period: period, values: [], format: (v) => { return v; } });\n var emaDX = new WEMA({ period: period, values: [], format: (v) => { return v; } });\n var tr = new TrueRange({\n low: [],\n high: [],\n close: [],\n });\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n ADXOutput;\n this.generator = (function* () {\n var tick = yield;\n var index = 0;\n var lastATR, lastAPDM, lastAMDM, lastPDI, lastMDI, lastDX, smoothedDX;\n lastATR = 0;\n lastAPDM = 0;\n lastAMDM = 0;\n while (true) {\n let calcTr = tr.nextValue(tick);\n let calcPDM = plusDM.nextValue(tick);\n let calcMDM = minusDM.nextValue(tick);\n if (calcTr === undefined) {\n tick = yield;\n continue;\n }\n let lastATR = emaTR.nextValue(calcTr);\n let lastAPDM = emaPDM.nextValue(calcPDM);\n let lastAMDM = emaMDM.nextValue(calcMDM);\n if ((lastATR != undefined) && (lastAPDM != undefined) && (lastAMDM != undefined)) {\n lastPDI = (lastAPDM) * 100 / lastATR;\n lastMDI = (lastAMDM) * 100 / lastATR;\n let diDiff = Math.abs(lastPDI - lastMDI);\n let diSum = (lastPDI + lastMDI);\n lastDX = (diDiff / diSum) * 100;\n smoothedDX = emaDX.nextValue(lastDX);\n // console.log(tick.high.toFixed(2), tick.low.toFixed(2), tick.close.toFixed(2) , calcTr.toFixed(2), calcPDM.toFixed(2), calcMDM.toFixed(2), lastATR.toFixed(2), lastAPDM.toFixed(2), lastAMDM.toFixed(2), lastPDI.toFixed(2), lastMDI.toFixed(2), diDiff.toFixed(2), diSum.toFixed(2), lastDX.toFixed(2));\n }\n tick = yield { adx: smoothedDX, pdi: lastPDI, mdi: lastMDI };\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value != undefined && result.value.adx != undefined) {\n this.result.push({ adx: format(result.value.adx), pdi: format(result.value.pdi), mdi: format(result.value.mdi) });\n }\n });\n }\n ;\n ;\n nextValue(price) {\n let result = this.generator.next(price).value;\n if (result != undefined && result.adx != undefined) {\n return { adx: this.format(result.adx), pdi: this.format(result.pdi), mdi: this.format(result.mdi) };\n }\n }\n ;\n}\nADX.calculate = adx;\nexport function adx(input) {\n Indicator.reverseInputs(input);\n var result = new ADX(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/8/16.\n */\n\"use strict\";\nimport { WEMA } from '../moving_averages/WEMA';\nimport { TrueRange } from './TrueRange';\nexport class ATRInput extends IndicatorInput {\n}\n;\nexport class ATR extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var period = input.period;\n var format = this.format;\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n var trueRange = new TrueRange({\n low: [],\n high: [],\n close: []\n });\n var wema = new WEMA({ period: period, values: [], format: (v) => { return v; } });\n this.result = [];\n this.generator = (function* () {\n var tick = yield;\n var avgTrueRange, trange;\n ;\n while (true) {\n trange = trueRange.nextValue({\n low: tick.low,\n high: tick.high,\n close: tick.close\n });\n if (trange === undefined) {\n avgTrueRange = undefined;\n }\n else {\n avgTrueRange = wema.nextValue(trange);\n }\n tick = yield avgTrueRange;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value !== undefined) {\n this.result.push(format(result.value));\n }\n });\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nATR.calculate = atr;\nexport function atr(input) {\n Indicator.reverseInputs(input);\n var result = new ATR(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport LinkedList from '../Utils/FixedSizeLinkedList';\nexport class ROCInput extends IndicatorInput {\n}\nexport class ROC extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n this.result = [];\n this.generator = (function* () {\n let index = 1;\n var pastPeriods = new LinkedList(period);\n ;\n var tick = yield;\n var roc;\n while (true) {\n pastPeriods.push(tick);\n if (index < period) {\n index++;\n }\n else {\n roc = ((tick - pastPeriods.lastShift) / (pastPeriods.lastShift)) * 100;\n }\n tick = yield roc;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined && (!isNaN(result.value))) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var nextResult = this.generator.next(price);\n if (nextResult.value != undefined && (!isNaN(nextResult.value))) {\n return this.format(nextResult.value);\n }\n }\n ;\n}\nROC.calculate = roc;\n;\nexport function roc(input) {\n Indicator.reverseInputs(input);\n var result = new ROC(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nimport { ROC } from './ROC';\nexport class KSTInput extends IndicatorInput {\n}\nexport class KSTOutput {\n}\nexport class KST extends Indicator {\n constructor(input) {\n super(input);\n let priceArray = input.values;\n let rocPer1 = input.ROCPer1;\n let rocPer2 = input.ROCPer2;\n let rocPer3 = input.ROCPer3;\n let rocPer4 = input.ROCPer4;\n let smaPer1 = input.SMAROCPer1;\n let smaPer2 = input.SMAROCPer2;\n let smaPer3 = input.SMAROCPer3;\n let smaPer4 = input.SMAROCPer4;\n let signalPeriod = input.signalPeriod;\n let roc1 = new ROC({ period: rocPer1, values: [] });\n let roc2 = new ROC({ period: rocPer2, values: [] });\n let roc3 = new ROC({ period: rocPer3, values: [] });\n let roc4 = new ROC({ period: rocPer4, values: [] });\n let sma1 = new SMA({ period: smaPer1, values: [], format: (v) => { return v; } });\n let sma2 = new SMA({ period: smaPer2, values: [], format: (v) => { return v; } });\n let sma3 = new SMA({ period: smaPer3, values: [], format: (v) => { return v; } });\n let sma4 = new SMA({ period: smaPer4, values: [], format: (v) => { return v; } });\n let signalSMA = new SMA({ period: signalPeriod, values: [], format: (v) => { return v; } });\n var format = this.format;\n this.result = [];\n let firstResult = Math.max(rocPer1 + smaPer1, rocPer2 + smaPer2, rocPer3 + smaPer3, rocPer4 + smaPer4);\n this.generator = (function* () {\n let index = 1;\n let tick = yield;\n let kst;\n let RCMA1, RCMA2, RCMA3, RCMA4, signal, result;\n while (true) {\n let roc1Result = roc1.nextValue(tick);\n let roc2Result = roc2.nextValue(tick);\n let roc3Result = roc3.nextValue(tick);\n let roc4Result = roc4.nextValue(tick);\n RCMA1 = (roc1Result !== undefined) ? sma1.nextValue(roc1Result) : undefined;\n RCMA2 = (roc2Result !== undefined) ? sma2.nextValue(roc2Result) : undefined;\n RCMA3 = (roc3Result !== undefined) ? sma3.nextValue(roc3Result) : undefined;\n RCMA4 = (roc4Result !== undefined) ? sma4.nextValue(roc4Result) : undefined;\n if (index < firstResult) {\n index++;\n }\n else {\n kst = (RCMA1 * 1) + (RCMA2 * 2) + (RCMA3 * 3) + (RCMA4 * 4);\n }\n signal = (kst !== undefined) ? signalSMA.nextValue(kst) : undefined;\n result = kst !== undefined ? {\n kst: format(kst),\n signal: signal ? format(signal) : undefined\n } : undefined;\n tick = yield result;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n let result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n let nextResult = this.generator.next(price);\n if (nextResult.value != undefined)\n return nextResult.value;\n }\n ;\n}\nKST.calculate = kst;\nexport function kst(input) {\n Indicator.reverseInputs(input);\n var result = new KST(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\n\"use strict\";\n/*\n There seems to be a few interpretations of the rules for this regarding which prices.\n I mean the english from which periods are included. The wording does seem to\n introduce some discrepancy so maybe that is why. I want to put the author's\n own description here to reassess this later.\n ----------------------------------------------------------------------------------------\n For the first day of entry the SAR is the previous Significant Point\n\n If long the SP is the lowest price reached while in the previous short trade\n If short the SP is the highest price reached while in the previous long trade\n\n If long:\n Find the difference between the highest price made while in the trade and the SAR for today.\n Multiple the difference by the AF and ADD the result to today's SAR to obtain the SAR for tomorrow.\n Use 0.02 for the first AF and increase it by 0.02 on every day that a new high for the trade is made.\n If a new high is not made continue to use the AF as last increased. Do not increase the AF above .20\n\n Never move the SAR for tomorrow ABOVE the previous day's LOW or today's LOW.\n If the SAR is calculated to be ABOVE the previous day's LOW or today's LOW then use the lower low between today and the previous day as the new SAR.\n Make the next day's calculations based on this SAR.\n\n If short:\n Find the difference between the lowest price made while in the trade and the SAR for today.\n Multiple the difference by the AF and SUBTRACT the result to today's SAR to obtain the SAR for tomorrow.\n Use 0.02 for the first AF and increase it by 0.02 on every day that a new high for the trade is made.\n If a new high is not made continue to use the AF as last increased. Do not increase the AF above .20\n\n Never move the SAR for tomorrow BELOW the previous day's HIGH or today's HIGH.\n If the SAR is calculated to be BELOW the previous day's HIGH or today's HIGH then use the higher high between today and the previous day as the new SAR. Make the next day's calculations based on this SAR.\n ----------------------------------------------------------------------------------------\n*/\nexport class PSARInput extends IndicatorInput {\n}\n;\nexport class PSAR extends Indicator {\n constructor(input) {\n super(input);\n let highs = input.high || [];\n let lows = input.low || [];\n var genFn = function* (step, max) {\n let curr, extreme, sar, furthest;\n let up = true;\n let accel = step;\n let prev = yield;\n while (true) {\n if (curr) {\n sar = sar + accel * (extreme - sar);\n if (up) {\n sar = Math.min(sar, furthest.low, prev.low);\n if (curr.high > extreme) {\n extreme = curr.high;\n accel = Math.min(accel + step, max);\n }\n ;\n }\n else {\n sar = Math.max(sar, furthest.high, prev.high);\n if (curr.low < extreme) {\n extreme = curr.low;\n accel = Math.min(accel + step, max);\n }\n }\n if ((up && curr.low < sar) || (!up && curr.high > sar)) {\n accel = step;\n sar = extreme;\n up = !up;\n extreme = !up ? curr.low : curr.high;\n }\n }\n else {\n // Randomly setup start values? What is the trend on first tick??\n sar = prev.low;\n extreme = prev.high;\n }\n furthest = prev;\n if (curr)\n prev = curr;\n curr = yield sar;\n }\n };\n this.result = [];\n this.generator = genFn(input.step, input.max);\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n });\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(input) {\n let nextResult = this.generator.next(input);\n if (nextResult.value !== undefined)\n return nextResult.value;\n }\n ;\n}\nPSAR.calculate = psar;\nexport function psar(input) {\n Indicator.reverseInputs(input);\n var result = new PSAR(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/10/16.\n */\n\"use strict\";\nimport LinkedList from '../Utils/FixedSizeLinkedList';\nimport { SMA } from '../moving_averages/SMA';\nexport class StochasticInput extends IndicatorInput {\n}\n;\nexport class StochasticOutput {\n}\n;\nexport class Stochastic extends Indicator {\n constructor(input) {\n super(input);\n let lows = input.low;\n let highs = input.high;\n let closes = input.close;\n let period = input.period;\n let signalPeriod = input.signalPeriod;\n let format = this.format;\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n //%K = (Current Close - Lowest Low)/(Highest High - Lowest Low) * 100\n //%D = 3-day SMA of %K\n //\n //Lowest Low = lowest low for the look-back period\n //Highest High = highest high for the look-back period\n //%K is multiplied by 100 to move the decimal point two places\n this.generator = (function* () {\n let index = 1;\n let pastHighPeriods = new LinkedList(period, true, false);\n let pastLowPeriods = new LinkedList(period, false, true);\n let dSma = new SMA({\n period: signalPeriod,\n values: [],\n format: (v) => { return v; }\n });\n let k, d;\n var tick = yield;\n while (true) {\n pastHighPeriods.push(tick.high);\n pastLowPeriods.push(tick.low);\n if (index < period) {\n index++;\n tick = yield;\n continue;\n }\n let periodLow = pastLowPeriods.periodLow;\n k = (tick.close - periodLow) / (pastHighPeriods.periodHigh - periodLow) * 100;\n k = isNaN(k) ? 0 : k; //This happens when the close, high and low are same for the entire period; Bug fix for \n d = dSma.nextValue(k);\n tick = yield {\n k: format(k),\n d: (d !== undefined) ? format(d) : undefined\n };\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(input) {\n let nextResult = this.generator.next(input);\n if (nextResult.value !== undefined)\n return nextResult.value;\n }\n ;\n}\nStochastic.calculate = stochastic;\nexport function stochastic(input) {\n Indicator.reverseInputs(input);\n var result = new Stochastic(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\nimport LinkedList from '../Utils/FixedSizeLinkedList';\nexport class WilliamsRInput extends IndicatorInput {\n}\n;\nexport class WilliamsR extends Indicator {\n constructor(input) {\n super(input);\n let lows = input.low;\n let highs = input.high;\n let closes = input.close;\n let period = input.period;\n let format = this.format;\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n //%R = (Highest High - Close)/(Highest High - Lowest Low) * -100\n //Lowest Low = lowest low for the look-back period\n //Highest High = highest high for the look-back period\n //%R is multiplied by -100 correct the inversion and move the decimal.\n this.generator = (function* () {\n let index = 1;\n let pastHighPeriods = new LinkedList(period, true, false);\n let pastLowPeriods = new LinkedList(period, false, true);\n let periodLow;\n let periodHigh;\n var tick = yield;\n let williamsR;\n while (true) {\n pastHighPeriods.push(tick.high);\n pastLowPeriods.push(tick.low);\n if (index < period) {\n index++;\n tick = yield;\n continue;\n }\n periodLow = pastLowPeriods.periodLow;\n periodHigh = pastHighPeriods.periodHigh;\n williamsR = format((periodHigh - tick.close) / (periodHigh - periodLow) * -100);\n tick = yield williamsR;\n }\n })();\n this.generator.next();\n lows.forEach((low, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n var nextResult = this.generator.next(price);\n if (nextResult.value != undefined)\n return this.format(nextResult.value);\n }\n ;\n}\nWilliamsR.calculate = williamsr;\nexport function williamsr(input) {\n Indicator.reverseInputs(input);\n var result = new WilliamsR(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/17/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class ADLInput extends IndicatorInput {\n}\nexport class ADL extends Indicator {\n constructor(input) {\n super(input);\n var highs = input.high;\n var lows = input.low;\n var closes = input.close;\n var volumes = input.volume;\n if (!((lows.length === highs.length) && (highs.length === closes.length) && (highs.length === volumes.length))) {\n throw ('Inputs(low,high, close, volumes) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var result = 0;\n var tick;\n tick = yield;\n while (true) {\n let moneyFlowMultiplier = ((tick.close - tick.low) - (tick.high - tick.close)) / (tick.high - tick.low);\n moneyFlowMultiplier = isNaN(moneyFlowMultiplier) ? 1 : moneyFlowMultiplier;\n let moneyFlowVolume = moneyFlowMultiplier * tick.volume;\n result = result + moneyFlowVolume;\n tick = yield Math.round(result);\n }\n })();\n this.generator.next();\n highs.forEach((tickHigh, index) => {\n var tickInput = {\n high: tickHigh,\n low: lows[index],\n close: closes[index],\n volume: volumes[index]\n };\n var result = this.generator.next(tickInput);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nADL.calculate = adl;\nexport function adl(input) {\n Indicator.reverseInputs(input);\n var result = new ADL(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/17/16.\n */\n\"use strict\";\nexport class OBVInput extends IndicatorInput {\n}\nexport class OBV extends Indicator {\n constructor(input) {\n super(input);\n var closes = input.close;\n var volumes = input.volume;\n this.result = [];\n this.generator = (function* () {\n var result = 0;\n var tick;\n var lastClose;\n tick = yield;\n if (tick.close && (typeof tick.close === 'number')) {\n lastClose = tick.close;\n tick = yield;\n }\n while (true) {\n if (lastClose < tick.close) {\n result = result + tick.volume;\n }\n else if (tick.close < lastClose) {\n result = result - tick.volume;\n }\n lastClose = tick.close;\n tick = yield result;\n }\n })();\n this.generator.next();\n closes.forEach((close, index) => {\n let tickInput = {\n close: closes[index],\n volume: volumes[index]\n };\n let result = this.generator.next(tickInput);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nOBV.calculate = obv;\nexport function obv(input) {\n Indicator.reverseInputs(input);\n var result = new OBV(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/9/16.\n */\n\"use strict\";\nimport { ROC } from './ROC.js';\nimport { EMA } from '../moving_averages/EMA.js';\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class TRIXInput extends IndicatorInput {\n}\n;\nexport class TRIX extends Indicator {\n constructor(input) {\n super(input);\n let priceArray = input.values;\n let period = input.period;\n let format = this.format;\n let ema = new EMA({ period: period, values: [], format: (v) => { return v; } });\n let emaOfema = new EMA({ period: period, values: [], format: (v) => { return v; } });\n let emaOfemaOfema = new EMA({ period: period, values: [], format: (v) => { return v; } });\n let trixROC = new ROC({ period: 1, values: [], format: (v) => { return v; } });\n this.result = [];\n this.generator = (function* () {\n let tick = yield;\n while (true) {\n let initialema = ema.nextValue(tick);\n let smoothedResult = initialema ? emaOfema.nextValue(initialema) : undefined;\n let doubleSmoothedResult = smoothedResult ? emaOfemaOfema.nextValue(smoothedResult) : undefined;\n let result = doubleSmoothedResult ? trixROC.nextValue(doubleSmoothedResult) : undefined;\n tick = yield result ? format(result) : undefined;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n let result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n let nextResult = this.generator.next(price);\n if (nextResult.value !== undefined)\n return nextResult.value;\n }\n ;\n}\nTRIX.calculate = trix;\nexport function trix(input) {\n Indicator.reverseInputs(input);\n var result = new TRIX(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { EMA } from '../moving_averages/EMA';\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class ForceIndexInput extends IndicatorInput {\n constructor() {\n super(...arguments);\n this.period = 1;\n }\n}\n;\nexport class ForceIndex extends Indicator {\n constructor(input) {\n super(input);\n var closes = input.close;\n var volumes = input.volume;\n var period = input.period || 1;\n if (!((volumes.length === closes.length))) {\n throw ('Inputs(volume, close) not of equal size');\n }\n let emaForceIndex = new EMA({ values: [], period: period });\n this.result = [];\n this.generator = (function* () {\n var previousTick = yield;\n var tick = yield;\n let forceIndex;\n while (true) {\n forceIndex = (tick.close - previousTick.close) * tick.volume;\n previousTick = tick;\n tick = yield emaForceIndex.nextValue(forceIndex);\n }\n })();\n this.generator.next();\n volumes.forEach((tick, index) => {\n var result = this.generator.next({\n close: closes[index],\n volume: volumes[index]\n });\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n ;\n nextValue(price) {\n let result = this.generator.next(price).value;\n if (result != undefined) {\n return result;\n }\n }\n ;\n}\nForceIndex.calculate = forceindex;\nexport function forceindex(input) {\n Indicator.reverseInputs(input);\n var result = new ForceIndex(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nimport LinkedList from '../Utils/FixedSizeLinkedList';\nexport class CCIInput extends IndicatorInput {\n}\n;\nexport class CCI extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var period = input.period;\n var format = this.format;\n let constant = .015;\n var currentTpSet = new LinkedList(period);\n ;\n var tpSMACalculator = new SMA({ period: period, values: [], format: (v) => { return v; } });\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var tick = yield;\n while (true) {\n let tp = (tick.high + tick.low + tick.close) / 3;\n currentTpSet.push(tp);\n let smaTp = tpSMACalculator.nextValue(tp);\n let meanDeviation = null;\n let cci;\n let sum = 0;\n if (smaTp != undefined) {\n //First, subtract the most recent 20-period average of the typical price from each period's typical price. \n //Second, take the absolute values of these numbers.\n //Third,sum the absolute values. \n for (let x of currentTpSet.iterator()) {\n sum = sum + (Math.abs(x - smaTp));\n }\n //Fourth, divide by the total number of periods (20). \n meanDeviation = sum / 20;\n cci = (tp - smaTp) / (constant * meanDeviation);\n }\n tick = yield cci;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n ;\n nextValue(price) {\n let result = this.generator.next(price).value;\n if (result != undefined) {\n return result;\n }\n }\n ;\n}\nCCI.calculate = cci;\nexport function cci(input) {\n Indicator.reverseInputs(input);\n var result = new CCI(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nexport class AwesomeOscillatorInput extends IndicatorInput {\n}\nexport class AwesomeOscillator extends Indicator {\n constructor(input) {\n super(input);\n var highs = input.high;\n var lows = input.low;\n var fastPeriod = input.fastPeriod;\n var slowPeriod = input.slowPeriod;\n var slowSMA = new SMA({ values: [], period: slowPeriod });\n var fastSMA = new SMA({ values: [], period: fastPeriod });\n this.result = [];\n this.generator = (function* () {\n var result;\n var tick;\n var medianPrice;\n var slowSmaValue;\n var fastSmaValue;\n tick = yield;\n while (true) {\n medianPrice = (tick.high + tick.low) / 2;\n slowSmaValue = slowSMA.nextValue(medianPrice);\n fastSmaValue = fastSMA.nextValue(medianPrice);\n if (slowSmaValue !== undefined && fastSmaValue !== undefined) {\n result = fastSmaValue - slowSmaValue;\n }\n tick = yield result;\n }\n })();\n this.generator.next();\n highs.forEach((tickHigh, index) => {\n var tickInput = {\n high: tickHigh,\n low: lows[index],\n };\n var result = this.generator.next(tickInput);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return this.format(result.value);\n }\n }\n ;\n}\nAwesomeOscillator.calculate = awesomeoscillator;\nexport function awesomeoscillator(input) {\n Indicator.reverseInputs(input);\n var result = new AwesomeOscillator(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class VWAPInput extends IndicatorInput {\n}\n;\nexport class VWAP extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var volumes = input.volume;\n var format = this.format;\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var tick = yield;\n let cumulativeTotal = 0;\n let cumulativeVolume = 0;\n while (true) {\n let typicalPrice = (tick.high + tick.low + tick.close) / 3;\n let total = tick.volume * typicalPrice;\n cumulativeTotal = cumulativeTotal + total;\n cumulativeVolume = cumulativeVolume + tick.volume;\n tick = yield cumulativeTotal / cumulativeVolume;\n ;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index],\n volume: volumes[index]\n });\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n ;\n nextValue(price) {\n let result = this.generator.next(price).value;\n if (result != undefined) {\n return result;\n }\n }\n ;\n}\nVWAP.calculate = vwap;\nexport function vwap(input) {\n Indicator.reverseInputs(input);\n var result = new VWAP(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class VolumeProfileInput extends IndicatorInput {\n}\nexport class VolumeProfileOutput {\n}\nexport function priceFallsBetweenBarRange(low, high, low1, high1) {\n return (low <= low1 && high >= low1) || (low1 <= low && high1 >= low);\n}\nexport class VolumeProfile extends Indicator {\n constructor(input) {\n super(input);\n var highs = input.high;\n var lows = input.low;\n var closes = input.close;\n var opens = input.open;\n var volumes = input.volume;\n var bars = input.noOfBars;\n if (!((lows.length === highs.length) && (highs.length === closes.length) && (highs.length === volumes.length))) {\n throw ('Inputs(low,high, close, volumes) not of equal size');\n }\n this.result = [];\n var max = Math.max(...highs, ...lows, ...closes, ...opens);\n var min = Math.min(...highs, ...lows, ...closes, ...opens);\n var barRange = (max - min) / bars;\n var lastEnd = min;\n for (let i = 0; i < bars; i++) {\n let rangeStart = lastEnd;\n let rangeEnd = rangeStart + barRange;\n lastEnd = rangeEnd;\n let bullishVolume = 0;\n let bearishVolume = 0;\n let totalVolume = 0;\n for (let priceBar = 0; priceBar < highs.length; priceBar++) {\n let priceBarStart = lows[priceBar];\n let priceBarEnd = highs[priceBar];\n let priceBarOpen = opens[priceBar];\n let priceBarClose = closes[priceBar];\n let priceBarVolume = volumes[priceBar];\n if (priceFallsBetweenBarRange(rangeStart, rangeEnd, priceBarStart, priceBarEnd)) {\n totalVolume = totalVolume + priceBarVolume;\n if (priceBarOpen > priceBarClose) {\n bearishVolume = bearishVolume + priceBarVolume;\n }\n else {\n bullishVolume = bullishVolume + priceBarVolume;\n }\n }\n }\n this.result.push({\n rangeStart, rangeEnd, bullishVolume, bearishVolume, totalVolume\n });\n }\n }\n ;\n nextValue(price) {\n throw ('Next value not supported for volume profile');\n }\n ;\n}\nVolumeProfile.calculate = volumeprofile;\nexport function volumeprofile(input) {\n Indicator.reverseInputs(input);\n var result = new VolumeProfile(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/4/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class TypicalPriceInput extends IndicatorInput {\n}\nexport class TypicalPrice extends Indicator {\n constructor(input) {\n super(input);\n this.result = [];\n this.generator = (function* () {\n let priceInput = yield;\n while (true) {\n priceInput = yield (priceInput.high + priceInput.low + priceInput.close) / 3;\n }\n })();\n this.generator.next();\n input.low.forEach((tick, index) => {\n var result = this.generator.next({\n high: input.high[index],\n low: input.low[index],\n close: input.close[index],\n });\n this.result.push(result.value);\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n return result;\n }\n ;\n}\nTypicalPrice.calculate = typicalprice;\nexport function typicalprice(input) {\n Indicator.reverseInputs(input);\n var result = new TypicalPrice(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/17/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { TypicalPrice } from '../chart_types/TypicalPrice';\nimport FixedSizeLinkedList from '../Utils/FixedSizeLinkedList';\nexport class MFIInput extends IndicatorInput {\n}\nexport class MFI extends Indicator {\n constructor(input) {\n super(input);\n var highs = input.high;\n var lows = input.low;\n var closes = input.close;\n var volumes = input.volume;\n var period = input.period;\n var typicalPrice = new TypicalPrice({ low: [], high: [], close: [] });\n var positiveFlow = new FixedSizeLinkedList(period, false, false, true);\n var negativeFlow = new FixedSizeLinkedList(period, false, false, true);\n if (!((lows.length === highs.length) && (highs.length === closes.length) && (highs.length === volumes.length))) {\n throw ('Inputs(low,high, close, volumes) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var result;\n var tick;\n var lastClose;\n var positiveFlowForPeriod;\n var rawMoneyFlow = 0;\n var moneyFlowRatio;\n var negativeFlowForPeriod;\n let typicalPriceValue = null;\n let prevousTypicalPrice = null;\n tick = yield;\n lastClose = tick.close; //Fist value \n tick = yield;\n while (true) {\n var { high, low, close, volume } = tick;\n var positionMoney = 0;\n var negativeMoney = 0;\n typicalPriceValue = typicalPrice.nextValue({ high, low, close });\n rawMoneyFlow = typicalPriceValue * volume;\n if ((typicalPriceValue != null) && (prevousTypicalPrice != null)) {\n typicalPriceValue > prevousTypicalPrice ? positionMoney = rawMoneyFlow : negativeMoney = rawMoneyFlow;\n positiveFlow.push(positionMoney);\n negativeFlow.push(negativeMoney);\n positiveFlowForPeriod = positiveFlow.periodSum;\n negativeFlowForPeriod = negativeFlow.periodSum;\n if ((positiveFlow.totalPushed >= period) && (positiveFlow.totalPushed >= period)) {\n moneyFlowRatio = positiveFlowForPeriod / negativeFlowForPeriod;\n result = 100 - 100 / (1 + moneyFlowRatio);\n }\n }\n prevousTypicalPrice = typicalPriceValue;\n tick = yield result;\n }\n })();\n this.generator.next();\n highs.forEach((tickHigh, index) => {\n var tickInput = {\n high: tickHigh,\n low: lows[index],\n close: closes[index],\n volume: volumes[index]\n };\n var result = this.generator.next(tickInput);\n if (result.value != undefined) {\n this.result.push(parseFloat(result.value.toFixed(2)));\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return (parseFloat(result.value.toFixed(2)));\n }\n }\n ;\n}\nMFI.calculate = mfi;\nexport function mfi(input) {\n Indicator.reverseInputs(input);\n var result = new MFI(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/10/16.\n */\n\"use strict\";\nimport { SMA } from '../moving_averages/SMA';\nimport { RSI } from '../oscillators/RSI';\nimport { Stochastic } from '../momentum/Stochastic';\nexport class StochasticRsiInput extends IndicatorInput {\n}\n;\nexport class StochasticRSIOutput {\n}\n;\nexport class StochasticRSI extends Indicator {\n constructor(input) {\n super(input);\n let closes = input.values;\n let rsiPeriod = input.rsiPeriod;\n let stochasticPeriod = input.stochasticPeriod;\n let kPeriod = input.kPeriod;\n let dPeriod = input.dPeriod;\n let format = this.format;\n this.result = [];\n this.generator = (function* () {\n let index = 1;\n let rsi = new RSI({ period: rsiPeriod, values: [] });\n let stochastic = new Stochastic({ period: stochasticPeriod, high: [], low: [], close: [], signalPeriod: kPeriod });\n let dSma = new SMA({\n period: dPeriod,\n values: [],\n format: (v) => { return v; }\n });\n let lastRSI, stochasticRSI, d, result;\n var tick = yield;\n while (true) {\n lastRSI = rsi.nextValue(tick);\n if (lastRSI !== undefined) {\n var stochasticInput = { high: lastRSI, low: lastRSI, close: lastRSI };\n stochasticRSI = stochastic.nextValue(stochasticInput);\n if (stochasticRSI !== undefined && stochasticRSI.d !== undefined) {\n d = dSma.nextValue(stochasticRSI.d);\n if (d !== undefined)\n result = {\n stochRSI: stochasticRSI.k,\n k: stochasticRSI.d,\n d: d\n };\n }\n }\n tick = yield result;\n }\n })();\n this.generator.next();\n closes.forEach((tick, index) => {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(input) {\n let nextResult = this.generator.next(input);\n if (nextResult.value !== undefined)\n return nextResult.value;\n }\n ;\n}\nStochasticRSI.calculate = stochasticrsi;\nexport function stochasticrsi(input) {\n Indicator.reverseInputs(input);\n var result = new StochasticRSI(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport FixedSizedLinkedList from './FixedSizeLinkedList';\nexport class HighestInput extends IndicatorInput {\n}\nexport class Highest extends Indicator {\n constructor(input) {\n super(input);\n var values = input.values;\n var period = input.period;\n this.result = [];\n var periodList = new FixedSizedLinkedList(period, true, false, false);\n this.generator = (function* () {\n var result;\n var tick;\n var high;\n tick = yield;\n while (true) {\n periodList.push(tick);\n if (periodList.totalPushed >= period) {\n high = periodList.periodHigh;\n }\n tick = yield high;\n }\n })();\n this.generator.next();\n values.forEach((value, index) => {\n var result = this.generator.next(value);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return result.value;\n }\n }\n ;\n}\nHighest.calculate = highest;\nexport function highest(input) {\n Indicator.reverseInputs(input);\n var result = new Highest(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport FixedSizedLinkedList from './FixedSizeLinkedList';\nexport class LowestInput extends IndicatorInput {\n}\nexport class Lowest extends Indicator {\n constructor(input) {\n super(input);\n var values = input.values;\n var period = input.period;\n this.result = [];\n var periodList = new FixedSizedLinkedList(period, false, true, false);\n this.generator = (function* () {\n var result;\n var tick;\n var high;\n tick = yield;\n while (true) {\n periodList.push(tick);\n if (periodList.totalPushed >= period) {\n high = periodList.periodLow;\n }\n tick = yield high;\n }\n })();\n this.generator.next();\n values.forEach((value, index) => {\n var result = this.generator.next(value);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return result.value;\n }\n }\n ;\n}\nLowest.calculate = lowest;\nexport function lowest(input) {\n Indicator.reverseInputs(input);\n var result = new Lowest(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport FixedSizedLinkedList from './FixedSizeLinkedList';\nexport class SumInput extends IndicatorInput {\n}\nexport class Sum extends Indicator {\n constructor(input) {\n super(input);\n var values = input.values;\n var period = input.period;\n this.result = [];\n var periodList = new FixedSizedLinkedList(period, false, false, true);\n this.generator = (function* () {\n var result;\n var tick;\n var high;\n tick = yield;\n while (true) {\n periodList.push(tick);\n if (periodList.totalPushed >= period) {\n high = periodList.periodSum;\n }\n tick = yield high;\n }\n })();\n this.generator.next();\n values.forEach((value, index) => {\n var result = this.generator.next(value);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return result.value;\n }\n }\n ;\n}\nSum.calculate = sum;\nexport function sum(input) {\n Indicator.reverseInputs(input);\n var result = new Sum(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { CandleList } from '../StockData';\nimport { atr } from '../directionalmovement/ATR';\n/**\n * Created by AAravindan on 5/4/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class RenkoInput extends IndicatorInput {\n}\nclass Renko extends Indicator {\n constructor(input) {\n super(input);\n var format = this.format;\n let useATR = input.useATR;\n let brickSize = input.brickSize || 0;\n if (useATR) {\n let atrResult = atr(Object.assign({}, input));\n brickSize = atrResult[atrResult.length - 1];\n }\n this.result = new CandleList();\n ;\n if (brickSize === 0) {\n console.error('Not enough data to calculate brickSize for renko when using ATR');\n return;\n }\n let lastOpen = 0;\n let lastHigh = 0;\n let lastLow = Infinity;\n let lastClose = 0;\n let lastVolume = 0;\n let lastTimestamp = 0;\n this.generator = (function* () {\n let candleData = yield;\n while (true) {\n //Calculating first bar\n if (lastOpen === 0) {\n lastOpen = candleData.close;\n lastHigh = candleData.high;\n lastLow = candleData.low;\n lastClose = candleData.close;\n lastVolume = candleData.volume;\n lastTimestamp = candleData.timestamp;\n candleData = yield;\n continue;\n }\n let absoluteMovementFromClose = Math.abs(candleData.close - lastClose);\n let absoluteMovementFromOpen = Math.abs(candleData.close - lastOpen);\n if ((absoluteMovementFromClose >= brickSize) && (absoluteMovementFromOpen >= brickSize)) {\n let reference = absoluteMovementFromClose > absoluteMovementFromOpen ? lastOpen : lastClose;\n let calculated = {\n open: reference,\n high: lastHigh > candleData.high ? lastHigh : candleData.high,\n low: lastLow < candleData.Low ? lastLow : candleData.low,\n close: reference > candleData.close ? (reference - brickSize) : (reference + brickSize),\n volume: lastVolume + candleData.volume,\n timestamp: candleData.timestamp\n };\n lastOpen = calculated.open;\n lastHigh = calculated.close;\n lastLow = calculated.close;\n lastClose = calculated.close;\n lastVolume = 0;\n candleData = yield calculated;\n }\n else {\n lastHigh = lastHigh > candleData.high ? lastHigh : candleData.high;\n lastLow = lastLow < candleData.Low ? lastLow : candleData.low;\n lastVolume = lastVolume + candleData.volume;\n lastTimestamp = candleData.timestamp;\n candleData = yield;\n }\n }\n })();\n this.generator.next();\n input.low.forEach((tick, index) => {\n var result = this.generator.next({\n open: input.open[index],\n high: input.high[index],\n low: input.low[index],\n close: input.close[index],\n volume: input.volume[index],\n timestamp: input.timestamp[index]\n });\n if (result.value) {\n this.result.open.push(result.value.open);\n this.result.high.push(result.value.high);\n this.result.low.push(result.value.low);\n this.result.close.push(result.value.close);\n this.result.volume.push(result.value.volume);\n this.result.timestamp.push(result.value.timestamp);\n }\n });\n }\n nextValue(price) {\n console.error('Cannot calculate next value on Renko, Every value has to be recomputed for every change, use calcualte method');\n return null;\n }\n ;\n}\nRenko.calculate = renko;\nexport function renko(input) {\n Indicator.reverseInputs(input);\n var result = new Renko(input).result;\n if (input.reversedInput) {\n result.open.reverse();\n result.high.reverse();\n result.low.reverse();\n result.close.reverse();\n result.volume.reverse();\n result.timestamp.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { CandleList } from '../StockData';\n/**\n * Created by AAravindan on 5/4/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class HeikinAshiInput extends IndicatorInput {\n}\nexport class HeikinAshi extends Indicator {\n constructor(input) {\n super(input);\n var format = this.format;\n this.result = new CandleList();\n let lastOpen = null;\n let lastHigh = 0;\n let lastLow = Infinity;\n let lastClose = 0;\n let lastVolume = 0;\n let lastTimestamp = 0;\n this.generator = (function* () {\n let candleData = yield;\n let calculated = null;\n while (true) {\n if (lastOpen === null) {\n lastOpen = (candleData.close + candleData.open) / 2;\n lastHigh = candleData.high;\n lastLow = candleData.low;\n lastClose = (candleData.close + candleData.open + candleData.high + candleData.low) / 4;\n lastVolume = (candleData.volume || 0);\n lastTimestamp = (candleData.timestamp || 0);\n calculated = {\n open: lastOpen,\n high: lastHigh,\n low: lastLow,\n close: lastClose,\n volume: candleData.volume || 0,\n timestamp: (candleData.timestamp || 0)\n };\n }\n else {\n let newClose = (candleData.close + candleData.open + candleData.high + candleData.low) / 4;\n let newOpen = (lastOpen + lastClose) / 2;\n let newHigh = Math.max(newOpen, newClose, candleData.high);\n let newLow = Math.min(candleData.low, newOpen, newClose);\n calculated = {\n close: newClose,\n open: newOpen,\n high: newHigh,\n low: newLow,\n volume: (candleData.volume || 0),\n timestamp: (candleData.timestamp || 0)\n };\n lastClose = newClose;\n lastOpen = newOpen;\n lastHigh = newHigh;\n lastLow = newLow;\n }\n candleData = yield calculated;\n }\n })();\n this.generator.next();\n input.low.forEach((tick, index) => {\n var result = this.generator.next({\n open: input.open[index],\n high: input.high[index],\n low: input.low[index],\n close: input.close[index],\n volume: input.volume ? input.volume[index] : input.volume,\n timestamp: input.timestamp ? input.timestamp[index] : input.timestamp\n });\n if (result.value) {\n this.result.open.push(result.value.open);\n this.result.high.push(result.value.high);\n this.result.low.push(result.value.low);\n this.result.close.push(result.value.close);\n this.result.volume.push(result.value.volume);\n this.result.timestamp.push(result.value.timestamp);\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n return result;\n }\n ;\n}\nHeikinAshi.calculate = heikinashi;\nexport function heikinashi(input) {\n Indicator.reverseInputs(input);\n var result = new HeikinAshi(input).result;\n if (input.reversedInput) {\n result.open.reverse();\n result.high.reverse();\n result.low.reverse();\n result.close.reverse();\n result.volume.reverse();\n result.timestamp.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import CandlestickFinder from './CandlestickFinder';\nexport default class MorningStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'MorningStar';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let isSmallBodyExists = ((firstdaysLow > seconddaysLow) &&\n (firstdaysLow > seconddaysHigh));\n let isThirdBullish = thirddaysOpen < thirddaysClose;\n let gapExists = ((seconddaysHigh < firstdaysLow) &&\n (seconddaysLow < firstdaysLow) &&\n (thirddaysOpen > seconddaysHigh) &&\n (seconddaysClose < thirddaysOpen));\n let doesCloseAboveFirstMidpoint = thirddaysClose > firstdaysMidpoint;\n return (isFirstBearish && isSmallBodyExists && gapExists && isThirdBullish && doesCloseAboveFirstMidpoint);\n }\n}\nexport function morningstar(data) {\n return new MorningStar().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishEngulfingPattern extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishEngulfingPattern';\n this.requiredCount = 2;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBullishEngulfing = ((firstdaysClose < firstdaysOpen) &&\n (firstdaysOpen > seconddaysOpen) &&\n (firstdaysClose > seconddaysOpen) &&\n (firstdaysOpen < seconddaysClose));\n return (isBullishEngulfing);\n }\n}\nexport function bullishengulfingpattern(data) {\n return new BullishEngulfingPattern().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishHarami extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = \"BullishHarami\";\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBullishHaramiPattern = ((firstdaysOpen > seconddaysOpen) &&\n (firstdaysClose < seconddaysOpen) &&\n (firstdaysClose < seconddaysClose) &&\n (firstdaysOpen > seconddaysLow) &&\n (firstdaysHigh > seconddaysHigh));\n return (isBullishHaramiPattern);\n }\n}\nexport function bullishharami(data) {\n return new BullishHarami().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishHaramiCross extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = 'BullishHaramiCross';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBullishHaramiCrossPattern = ((firstdaysOpen > seconddaysOpen) &&\n (firstdaysClose < seconddaysOpen) &&\n (firstdaysClose < seconddaysClose) &&\n (firstdaysOpen > seconddaysLow) &&\n (firstdaysHigh > seconddaysHigh));\n let isSecondDayDoji = this.approximateEqual(seconddaysOpen, seconddaysClose);\n return (isBullishHaramiCrossPattern && isSecondDayDoji);\n }\n}\nexport function bullishharamicross(data) {\n return new BullishHaramiCross().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class Doji extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'Doji';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isOpenEqualsClose = this.approximateEqual(daysOpen, daysClose);\n let isHighEqualsOpen = isOpenEqualsClose && this.approximateEqual(daysOpen, daysHigh);\n let isLowEqualsClose = isOpenEqualsClose && this.approximateEqual(daysClose, daysLow);\n return (isOpenEqualsClose && isHighEqualsOpen == isLowEqualsClose);\n }\n}\nexport function doji(data) {\n return new Doji().hasPattern(data);\n}\n","import Doji from './Doji';\nimport CandlestickFinder from './CandlestickFinder';\nexport default class MorningDojiStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'MorningDojiStar';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let dojiExists = new Doji().hasPattern({\n \"open\": [seconddaysOpen],\n \"close\": [seconddaysClose],\n \"high\": [seconddaysHigh],\n \"low\": [seconddaysLow]\n });\n let isThirdBullish = thirddaysOpen < thirddaysClose;\n let gapExists = ((seconddaysHigh < firstdaysLow) &&\n (seconddaysLow < firstdaysLow) &&\n (thirddaysOpen > seconddaysHigh) &&\n (seconddaysClose < thirddaysOpen));\n let doesCloseAboveFirstMidpoint = thirddaysClose > firstdaysMidpoint;\n return (isFirstBearish && dojiExists && isThirdBullish && gapExists &&\n doesCloseAboveFirstMidpoint);\n }\n}\nexport function morningdojistar(data) {\n return new MorningDojiStar().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class DownsideTasukiGap extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 3;\n this.name = 'DownsideTasukiGap';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let isSecondBearish = seconddaysClose < seconddaysOpen;\n let isThirdBullish = thirddaysClose > thirddaysOpen;\n let isFirstGapExists = seconddaysHigh < firstdaysLow;\n let isDownsideTasukiGap = ((seconddaysOpen > thirddaysOpen) &&\n (seconddaysClose < thirddaysOpen) &&\n (thirddaysClose > seconddaysOpen) &&\n (thirddaysClose < firstdaysClose));\n return (isFirstBearish && isSecondBearish && isThirdBullish && isFirstGapExists && isDownsideTasukiGap);\n }\n}\nexport function downsidetasukigap(data) {\n return new DownsideTasukiGap().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishMarubozu extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishMarubozu';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBullishMarbozu = this.approximateEqual(daysClose, daysHigh) &&\n this.approximateEqual(daysLow, daysOpen) &&\n daysOpen < daysClose &&\n daysOpen < daysHigh;\n return (isBullishMarbozu);\n }\n}\nexport function bullishmarubozu(data) {\n return new BullishMarubozu().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class PiercingLine extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = 'PiercingLine';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isDowntrend = seconddaysLow < firstdaysLow;\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let isSecondBullish = seconddaysClose > seconddaysOpen;\n let isPiercingLinePattern = ((firstdaysLow > seconddaysOpen) &&\n (seconddaysClose > firstdaysMidpoint));\n return (isDowntrend && isFirstBearish && isPiercingLinePattern && isSecondBullish);\n }\n}\nexport function piercingline(data) {\n return new PiercingLine().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class ThreeWhiteSoldiers extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'ThreeWhiteSoldiers';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let isUpTrend = seconddaysHigh > firstdaysHigh &&\n thirddaysHigh > seconddaysHigh;\n let isAllBullish = firstdaysOpen < firstdaysClose &&\n seconddaysOpen < seconddaysClose &&\n thirddaysOpen < thirddaysClose;\n let doesOpenWithinPreviousBody = firstdaysClose > seconddaysOpen &&\n seconddaysOpen < firstdaysHigh &&\n seconddaysHigh > thirddaysOpen &&\n thirddaysOpen < seconddaysClose;\n return (isUpTrend && isAllBullish && doesOpenWithinPreviousBody);\n }\n}\nexport function threewhitesoldiers(data) {\n return new ThreeWhiteSoldiers().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishHammerStick extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishHammerStick';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBullishHammer = daysClose > daysOpen;\n isBullishHammer = isBullishHammer && this.approximateEqual(daysClose, daysHigh);\n isBullishHammer = isBullishHammer && (daysClose - daysOpen) <= 2 * (daysOpen - daysLow);\n return isBullishHammer;\n }\n}\nexport function bullishhammerstick(data) {\n return new BullishHammerStick().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishInvertedHammerStick extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishInvertedHammerStick';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBullishInvertedHammer = daysClose > daysOpen;\n isBullishInvertedHammer = isBullishInvertedHammer && this.approximateEqual(daysOpen, daysLow);\n isBullishInvertedHammer = isBullishInvertedHammer && (daysClose - daysOpen) <= 2 * (daysHigh - daysClose);\n return isBullishInvertedHammer;\n }\n}\nexport function bullishinvertedhammerstick(data) {\n return new BullishInvertedHammerStick().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishHammerStick extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishHammerStick';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBearishHammer = daysOpen > daysClose;\n isBearishHammer = isBearishHammer && this.approximateEqual(daysOpen, daysHigh);\n isBearishHammer = isBearishHammer && (daysOpen - daysClose) <= 2 * (daysClose - daysLow);\n return isBearishHammer;\n }\n}\nexport function bearishhammerstick(data) {\n return new BearishHammerStick().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishInvertedHammerStick extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishInvertedHammerStick';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBearishInvertedHammer = daysOpen > daysClose;\n isBearishInvertedHammer = isBearishInvertedHammer && this.approximateEqual(daysClose, daysLow);\n isBearishInvertedHammer = isBearishInvertedHammer && (daysOpen - daysClose) <= 2 * (daysHigh - daysOpen);\n return isBearishInvertedHammer;\n }\n}\nexport function bearishinvertedhammerstick(data) {\n return new BearishInvertedHammerStick().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nimport { bearishhammerstick } from './BearishHammerStick';\nimport { bearishinvertedhammerstick } from './BearishInvertedHammerStick';\nimport { bullishhammerstick } from './BullishHammerStick';\nimport { bullishinvertedhammerstick } from './BullishInvertedHammerStick';\nexport default class HammerPattern extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'HammerPattern';\n this.requiredCount = 5;\n }\n logic(data) {\n let isPattern = this.downwardTrend(data);\n isPattern = isPattern && this.includesHammer(data);\n isPattern = isPattern && this.hasConfirmation(data);\n return isPattern;\n }\n downwardTrend(data, confirm = true) {\n let end = confirm ? 3 : 4;\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, end), period: end - 1 });\n let losses = averageloss({ values: data.close.slice(0, end), period: end - 1 });\n // Downward trend, so more losses than gains\n return losses > gains;\n }\n includesHammer(data, confirm = true) {\n let start = confirm ? 3 : 4;\n let end = confirm ? 4 : undefined;\n let possibleHammerData = {\n open: data.open.slice(start, end),\n close: data.close.slice(start, end),\n low: data.low.slice(start, end),\n high: data.high.slice(start, end),\n };\n let isPattern = bearishhammerstick(possibleHammerData);\n isPattern = isPattern || bearishinvertedhammerstick(possibleHammerData);\n isPattern = isPattern || bullishhammerstick(possibleHammerData);\n isPattern = isPattern || bullishinvertedhammerstick(possibleHammerData);\n return isPattern;\n }\n hasConfirmation(data) {\n let possibleHammer = {\n open: data.open[3],\n close: data.close[3],\n low: data.low[3],\n high: data.high[3],\n };\n let possibleConfirmation = {\n open: data.open[4],\n close: data.close[4],\n low: data.low[4],\n high: data.high[4],\n };\n // Confirmation candlestick is bullish\n let isPattern = possibleConfirmation.open < possibleConfirmation.close;\n return isPattern && possibleHammer.close < possibleConfirmation.close;\n }\n}\nexport function hammerpattern(data) {\n return new HammerPattern().hasPattern(data);\n}\n","import HammerPattern from './HammerPattern';\nexport default class HammerPatternUnconfirmed extends HammerPattern {\n constructor() {\n super();\n this.name = 'HammerPatternUnconfirmed';\n }\n logic(data) {\n let isPattern = this.downwardTrend(data, false);\n isPattern = isPattern && this.includesHammer(data, false);\n return isPattern;\n }\n}\nexport function hammerpatternunconfirmed(data) {\n return new HammerPatternUnconfirmed().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nexport default class TweezerBottom extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'TweezerBottom';\n this.requiredCount = 5;\n }\n logic(data) {\n return this.downwardTrend(data) && data.low[3] == data.low[4];\n }\n downwardTrend(data) {\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, 3), period: 2 });\n let losses = averageloss({ values: data.close.slice(0, 3), period: 2 });\n // Downward trend, so more losses than gains\n return losses > gains;\n }\n}\nexport function tweezerbottom(data) {\n return new TweezerBottom().hasPattern(data);\n}\n","import MorningStar from './MorningStar';\nimport BullishEngulfingPattern from './BullishEngulfingPattern';\nimport BullishHarami from './BullishHarami';\nimport BullishHaramiCross from './BullishHaramiCross';\nimport MorningDojiStar from './MorningDojiStar';\nimport DownsideTasukiGap from './DownsideTasukiGap';\nimport BullishMarubozu from './BullishMarubozu';\nimport PiercingLine from './PiercingLine';\nimport ThreeWhiteSoldiers from './ThreeWhiteSoldiers';\nimport BullishHammerStick from './BullishHammerStick';\nimport BullishInvertedHammerStick from './BullishInvertedHammerStick';\nimport HammerPattern from './HammerPattern';\nimport HammerPatternUnconfirmed from './HammerPatternUnconfirmed';\nimport CandlestickFinder from './CandlestickFinder';\nimport TweezerBottom from './TweezerBottom';\nlet bullishPatterns = [\n new BullishEngulfingPattern(),\n new DownsideTasukiGap(),\n new BullishHarami(),\n new BullishHaramiCross(),\n new MorningDojiStar(),\n new MorningStar(),\n new BullishMarubozu(),\n new PiercingLine(),\n new ThreeWhiteSoldiers(),\n new BullishHammerStick(),\n new BullishInvertedHammerStick(),\n new HammerPattern(),\n new HammerPatternUnconfirmed(),\n new TweezerBottom()\n];\nexport default class BullishPatterns extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'Bullish Candlesticks';\n }\n hasPattern(data) {\n return bullishPatterns.reduce(function (state, pattern) {\n let result = pattern.hasPattern(data);\n return state || result;\n }, false);\n }\n}\nexport function bullish(data) {\n return new BullishPatterns().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishEngulfingPattern extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishEngulfingPattern';\n this.requiredCount = 2;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBearishEngulfing = ((firstdaysClose > firstdaysOpen) &&\n (firstdaysOpen < seconddaysOpen) &&\n (firstdaysClose < seconddaysOpen) &&\n (firstdaysOpen > seconddaysClose));\n return (isBearishEngulfing);\n }\n}\nexport function bearishengulfingpattern(data) {\n return new BearishEngulfingPattern().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishHarami extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = 'BearishHarami';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBearishHaramiPattern = ((firstdaysOpen < seconddaysOpen) &&\n (firstdaysClose > seconddaysOpen) &&\n (firstdaysClose > seconddaysClose) &&\n (firstdaysOpen < seconddaysLow) &&\n (firstdaysHigh > seconddaysHigh));\n return (isBearishHaramiPattern);\n }\n}\nexport function bearishharami(data) {\n return new BearishHarami().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishHaramiCross extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = 'BearishHaramiCross';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBearishHaramiCrossPattern = ((firstdaysOpen < seconddaysOpen) &&\n (firstdaysClose > seconddaysOpen) &&\n (firstdaysClose > seconddaysClose) &&\n (firstdaysOpen < seconddaysLow) &&\n (firstdaysHigh > seconddaysHigh));\n let isSecondDayDoji = this.approximateEqual(seconddaysOpen, seconddaysClose);\n return (isBearishHaramiCrossPattern && isSecondDayDoji);\n }\n}\nexport function bearishharamicross(data) {\n return new BearishHaramiCross().hasPattern(data);\n}\n","import Doji from './Doji';\nimport CandlestickFinder from './CandlestickFinder';\nexport default class EveningDojiStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'EveningDojiStar';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isFirstBullish = firstdaysClose > firstdaysOpen;\n let dojiExists = new Doji().hasPattern({\n \"open\": [seconddaysOpen],\n \"close\": [seconddaysClose],\n \"high\": [seconddaysHigh],\n \"low\": [seconddaysLow]\n });\n let isThirdBearish = thirddaysOpen > thirddaysClose;\n let gapExists = ((seconddaysHigh > firstdaysHigh) &&\n (seconddaysLow > firstdaysHigh) &&\n (thirddaysOpen < seconddaysLow) &&\n (seconddaysClose > thirddaysOpen));\n let doesCloseBelowFirstMidpoint = thirddaysClose < firstdaysMidpoint;\n return (isFirstBullish && dojiExists && gapExists && isThirdBearish && doesCloseBelowFirstMidpoint);\n }\n}\nexport function eveningdojistar(data) {\n return new EveningDojiStar().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class EveningStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'EveningStar';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isFirstBullish = firstdaysClose > firstdaysOpen;\n let isSmallBodyExists = ((firstdaysHigh < seconddaysLow) &&\n (firstdaysHigh < seconddaysHigh));\n let isThirdBearish = thirddaysOpen > thirddaysClose;\n let gapExists = ((seconddaysHigh > firstdaysHigh) &&\n (seconddaysLow > firstdaysHigh) &&\n (thirddaysOpen < seconddaysLow) &&\n (seconddaysClose > thirddaysOpen));\n let doesCloseBelowFirstMidpoint = thirddaysClose < firstdaysMidpoint;\n return (isFirstBullish && isSmallBodyExists && gapExists && isThirdBearish && doesCloseBelowFirstMidpoint);\n }\n}\nexport function eveningstar(data) {\n return new EveningStar().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishMarubozu extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishMarubozu';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBearishMarbozu = this.approximateEqual(daysOpen, daysHigh) &&\n this.approximateEqual(daysLow, daysClose) &&\n daysOpen > daysClose &&\n daysOpen > daysLow;\n return (isBearishMarbozu);\n }\n}\nexport function bearishmarubozu(data) {\n return new BearishMarubozu().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class ThreeBlackCrows extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'ThreeBlackCrows';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let isDownTrend = firstdaysLow > seconddaysLow &&\n seconddaysLow > thirddaysLow;\n let isAllBearish = firstdaysOpen > firstdaysClose &&\n seconddaysOpen > seconddaysClose &&\n thirddaysOpen > thirddaysClose;\n let doesOpenWithinPreviousBody = firstdaysOpen > seconddaysOpen &&\n seconddaysOpen > firstdaysClose &&\n seconddaysOpen > thirddaysOpen &&\n thirddaysOpen > seconddaysClose;\n return (isDownTrend && isAllBearish && doesOpenWithinPreviousBody);\n }\n}\nexport function threeblackcrows(data) {\n return new ThreeBlackCrows().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nimport { bearishhammerstick } from './BearishHammerStick';\nimport { bullishhammerstick } from './BullishHammerStick';\nexport default class HangingMan extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'HangingMan';\n this.requiredCount = 5;\n }\n logic(data) {\n let isPattern = this.upwardTrend(data);\n isPattern = isPattern && this.includesHammer(data);\n isPattern = isPattern && this.hasConfirmation(data);\n return isPattern;\n }\n upwardTrend(data, confirm = true) {\n let end = confirm ? 3 : 4;\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, end), period: end - 1 });\n let losses = averageloss({ values: data.close.slice(0, end), period: end - 1 });\n // Upward trend, so more gains than losses\n return gains > losses;\n }\n includesHammer(data, confirm = true) {\n let start = confirm ? 3 : 4;\n let end = confirm ? 4 : undefined;\n let possibleHammerData = {\n open: data.open.slice(start, end),\n close: data.close.slice(start, end),\n low: data.low.slice(start, end),\n high: data.high.slice(start, end),\n };\n let isPattern = bearishhammerstick(possibleHammerData);\n isPattern = isPattern || bullishhammerstick(possibleHammerData);\n return isPattern;\n }\n hasConfirmation(data) {\n let possibleHammer = {\n open: data.open[3],\n close: data.close[3],\n low: data.low[3],\n high: data.high[3],\n };\n let possibleConfirmation = {\n open: data.open[4],\n close: data.close[4],\n low: data.low[4],\n high: data.high[4],\n };\n // Confirmation candlestick is bearish\n let isPattern = possibleConfirmation.open > possibleConfirmation.close;\n return isPattern && possibleHammer.close > possibleConfirmation.close;\n }\n}\nexport function hangingman(data) {\n return new HangingMan().hasPattern(data);\n}\n","import HangingMan from './HangingMan';\nexport default class HangingManUnconfirmed extends HangingMan {\n constructor() {\n super();\n this.name = 'HangingManUnconfirmed';\n }\n logic(data) {\n let isPattern = this.upwardTrend(data, false);\n isPattern = isPattern && this.includesHammer(data, false);\n return isPattern;\n }\n}\nexport function hangingmanunconfirmed(data) {\n return new HangingManUnconfirmed().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nimport { bearishinvertedhammerstick } from './BearishInvertedHammerStick';\nimport { bullishinvertedhammerstick } from './BullishInvertedHammerStick';\nexport default class ShootingStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'ShootingStar';\n this.requiredCount = 5;\n }\n logic(data) {\n let isPattern = this.upwardTrend(data);\n isPattern = isPattern && this.includesHammer(data);\n isPattern = isPattern && this.hasConfirmation(data);\n return isPattern;\n }\n upwardTrend(data, confirm = true) {\n let end = confirm ? 3 : 4;\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, end), period: end - 1 });\n let losses = averageloss({ values: data.close.slice(0, end), period: end - 1 });\n // Upward trend, so more gains than losses\n return gains > losses;\n }\n includesHammer(data, confirm = true) {\n let start = confirm ? 3 : 4;\n let end = confirm ? 4 : undefined;\n let possibleHammerData = {\n open: data.open.slice(start, end),\n close: data.close.slice(start, end),\n low: data.low.slice(start, end),\n high: data.high.slice(start, end),\n };\n let isPattern = bearishinvertedhammerstick(possibleHammerData);\n isPattern = isPattern || bullishinvertedhammerstick(possibleHammerData);\n return isPattern;\n }\n hasConfirmation(data) {\n let possibleHammer = {\n open: data.open[3],\n close: data.close[3],\n low: data.low[3],\n high: data.high[3],\n };\n let possibleConfirmation = {\n open: data.open[4],\n close: data.close[4],\n low: data.low[4],\n high: data.high[4],\n };\n // Confirmation candlestick is bearish\n let isPattern = possibleConfirmation.open > possibleConfirmation.close;\n return isPattern && possibleHammer.close > possibleConfirmation.close;\n }\n}\nexport function shootingstar(data) {\n return new ShootingStar().hasPattern(data);\n}\n","import ShootingStar from './ShootingStar';\nexport default class ShootingStarUnconfirmed extends ShootingStar {\n constructor() {\n super();\n this.name = 'ShootingStarUnconfirmed';\n }\n logic(data) {\n let isPattern = this.upwardTrend(data, false);\n isPattern = isPattern && this.includesHammer(data, false);\n return isPattern;\n }\n}\nexport function shootingstarunconfirmed(data) {\n return new ShootingStarUnconfirmed().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nexport default class TweezerTop extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'TweezerTop';\n this.requiredCount = 5;\n }\n logic(data) {\n return this.upwardTrend(data) && data.high[3] == data.high[4];\n }\n upwardTrend(data) {\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, 3), period: 2 });\n let losses = averageloss({ values: data.close.slice(0, 3), period: 2 });\n // Upward trend, so more gains than losses\n return gains > losses;\n }\n}\nexport function tweezertop(data) {\n return new TweezerTop().hasPattern(data);\n}\n","import BearishEngulfingPattern from './BearishEngulfingPattern';\nimport BearishHarami from './BearishHarami';\nimport BearishHaramiCross from './BearishHaramiCross';\nimport EveningDojiStar from './EveningDojiStar';\nimport EveningStar from './EveningStar';\nimport BearishMarubozu from './BearishMarubozu';\nimport ThreeBlackCrows from './ThreeBlackCrows';\nimport BearishHammerStick from './BearishHammerStick';\nimport BearishInvertedHammerStick from './BearishInvertedHammerStick';\nimport HangingMan from './HangingMan';\nimport HangingManUnconfirmed from './HangingManUnconfirmed';\nimport ShootingStar from './ShootingStar';\nimport ShootingStarUnconfirmed from './ShootingStarUnconfirmed';\nimport TweezerTop from './TweezerTop';\nimport CandlestickFinder from './CandlestickFinder';\nlet bearishPatterns = [\n new BearishEngulfingPattern(),\n new BearishHarami(),\n new BearishHaramiCross(),\n new EveningDojiStar(),\n new EveningStar(),\n new BearishMarubozu(),\n new ThreeBlackCrows(),\n new BearishHammerStick(),\n new BearishInvertedHammerStick(),\n new HangingMan(),\n new HangingManUnconfirmed(),\n new ShootingStar(),\n new ShootingStarUnconfirmed(),\n new TweezerTop()\n];\nexport default class BearishPatterns extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'Bearish Candlesticks';\n }\n hasPattern(data) {\n return bearishPatterns.reduce(function (state, pattern) {\n return state || pattern.hasPattern(data);\n }, false);\n }\n}\nexport function bearish(data) {\n return new BearishPatterns().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport Doji from './Doji';\nexport default class AbandonedBaby extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'AbandonedBaby';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let dojiExists = new Doji().hasPattern({\n \"open\": [seconddaysOpen],\n \"close\": [seconddaysClose],\n \"high\": [seconddaysHigh],\n \"low\": [seconddaysLow]\n });\n let gapExists = ((seconddaysHigh < firstdaysLow) &&\n (thirddaysLow > seconddaysHigh) &&\n (thirddaysClose > thirddaysOpen));\n let isThirdBullish = (thirddaysHigh < firstdaysOpen);\n return (isFirstBearish && dojiExists && gapExists && isThirdBullish);\n }\n}\nexport function abandonedbaby(data) {\n return new AbandonedBaby().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class DarkCloudCover extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'DarkCloudCover';\n this.requiredCount = 2;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let firstdayMidpoint = ((firstdaysClose + firstdaysOpen) / 2);\n let isFirstBullish = firstdaysClose > firstdaysOpen;\n let isSecondBearish = seconddaysClose < seconddaysOpen;\n let isDarkCloudPattern = ((seconddaysOpen > firstdaysHigh) &&\n (seconddaysClose < firstdayMidpoint) &&\n (seconddaysClose > firstdaysOpen));\n return (isFirstBullish && isSecondBearish && isDarkCloudPattern);\n }\n}\nexport function darkcloudcover(data) {\n return new DarkCloudCover().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class DragonFlyDoji extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 1;\n this.name = 'DragonFlyDoji';\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isOpenEqualsClose = this.approximateEqual(daysOpen, daysClose);\n let isHighEqualsOpen = isOpenEqualsClose && this.approximateEqual(daysOpen, daysHigh);\n let isLowEqualsClose = isOpenEqualsClose && this.approximateEqual(daysClose, daysLow);\n return (isOpenEqualsClose && isHighEqualsOpen && !isLowEqualsClose);\n }\n}\nexport function dragonflydoji(data) {\n return new DragonFlyDoji().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class GraveStoneDoji extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 1;\n this.name = 'GraveStoneDoji';\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isOpenEqualsClose = this.approximateEqual(daysOpen, daysClose);\n let isHighEqualsOpen = isOpenEqualsClose && this.approximateEqual(daysOpen, daysHigh);\n let isLowEqualsClose = isOpenEqualsClose && this.approximateEqual(daysClose, daysLow);\n return (isOpenEqualsClose && isLowEqualsClose && !isHighEqualsOpen);\n }\n}\nexport function gravestonedoji(data) {\n return new GraveStoneDoji().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishSpinningTop extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishSpinningTop';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let bodyLength = Math.abs(daysClose - daysOpen);\n let upperShadowLength = Math.abs(daysHigh - daysClose);\n let lowerShadowLength = Math.abs(daysOpen - daysLow);\n let isBullishSpinningTop = bodyLength < upperShadowLength &&\n bodyLength < lowerShadowLength;\n return isBullishSpinningTop;\n }\n}\nexport function bullishspinningtop(data) {\n return new BullishSpinningTop().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishSpinningTop extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishSpinningTop';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let bodyLength = Math.abs(daysClose - daysOpen);\n let upperShadowLength = Math.abs(daysHigh - daysOpen);\n let lowerShadowLength = Math.abs(daysHigh - daysLow);\n let isBearishSpinningTop = bodyLength < upperShadowLength &&\n bodyLength < lowerShadowLength;\n return isBearishSpinningTop;\n }\n}\nexport function bearishspinningtop(data) {\n return new BearishSpinningTop().hasPattern(data);\n}\n","/**\n * Calcaultes the fibonacci retracements for given start and end points\n *\n * If calculating for up trend start should be low and end should be high and vice versa\n *\n * returns an array of retracements level containing [0 , 23.6, 38.2, 50, 61.8, 78.6, 100, 127.2, 161.8, 261.8, 423.6]\n *\n * @export\n * @param {number} start\n * @param {number} end\n * @returns {number[]}\n */\nexport function fibonacciretracement(start, end) {\n let levels = [0, 23.6, 38.2, 50, 61.8, 78.6, 100, 127.2, 161.8, 261.8, 423.6];\n let retracements;\n if (start < end) {\n retracements = levels.map(function (level) {\n let calculated = end - Math.abs(start - end) * (level) / 100;\n return calculated > 0 ? calculated : 0;\n });\n }\n else {\n retracements = levels.map(function (level) {\n let calculated = end + Math.abs(start - end) * (level) / 100;\n return calculated > 0 ? calculated : 0;\n });\n }\n return retracements;\n}\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n","var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n","var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n","/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n","var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n","var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n","var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","var baseEach = require('./_baseEach'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nmodule.exports = baseMap;\n","var arrayMap = require('./_arrayMap'),\n baseIteratee = require('./_baseIteratee'),\n baseMap = require('./_baseMap'),\n isArray = require('./isArray');\n\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\nfunction map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, baseIteratee(iteratee, 3));\n}\n\nmodule.exports = map;\n","/**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\nfunction arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n}\n\nmodule.exports = arrayEvery;\n","var baseEach = require('./_baseEach');\n\n/**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\nfunction baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n}\n\nmodule.exports = baseEvery;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","var arrayEvery = require('./_arrayEvery'),\n baseEvery = require('./_baseEvery'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\nfunction every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, baseIteratee(predicate, 3));\n}\n\nmodule.exports = every;\n","var baseIteratee = require('./_baseIteratee'),\n isArrayLike = require('./isArrayLike'),\n keys = require('./keys');\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\n\nmodule.exports = createFind;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","var isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","var baseGet = require('./_baseGet'),\n baseSet = require('./_baseSet'),\n castPath = require('./_castPath');\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nmodule.exports = basePickBy;\n","var basePickBy = require('./_basePickBy'),\n hasIn = require('./hasIn');\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nmodule.exports = basePick;\n","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n","'use strict';\n\nvar bind = require('./helpers/bind');\nvar isBuffer = require('is-buffer');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n }\n\n if (!utils.isArray(val)) {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js\n\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction E() {\n this.message = 'String contains an invalid character';\n}\nE.prototype = new Error;\nE.prototype.code = 5;\nE.prototype.name = 'InvalidCharacterError';\n\nfunction btoa(input) {\n var str = String(input);\n var output = '';\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars;\n // if the next str index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n str.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n ) {\n charCode = str.charCodeAt(idx += 3 / 4);\n if (charCode > 0xFF) {\n throw new E();\n }\n block = block << 8 | charCode;\n }\n return output;\n}\n\nmodule.exports = btoa;\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar isAbsoluteURL = require('./../helpers/isAbsoluteURL');\nvar combineURLs = require('./../helpers/combineURLs');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers || {}\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\nvar defaults = require('./../defaults');\nvar utils = require('./../utils');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = utils.merge({\n url: arguments[0]\n }, arguments[1]);\n }\n\n config = utils.merge(defaults, this.defaults, { method: 'get' }, config);\n config.method = config.method.toLowerCase();\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nfunction baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n}\n\nmodule.exports = baseRange;\n","var baseRange = require('./_baseRange'),\n isIterateeCall = require('./_isIterateeCall'),\n toFinite = require('./toFinite');\n\n/**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\nfunction createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n}\n\nmodule.exports = createRange;\n","\"use strict\"\n\nfunction iota(n) {\n var result = new Array(n)\n for(var i=0; iMath.abs(this.stride[1]))?[1,0]:[0,1]}})\")\n } else if(dimension === 3) {\n code.push(\n\"var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);\\\nif(s0>s1){\\\nif(s1>s2){\\\nreturn [2,1,0];\\\n}else if(s0>s2){\\\nreturn [1,2,0];\\\n}else{\\\nreturn [1,0,2];\\\n}\\\n}else if(s0>s2){\\\nreturn [2,0,1];\\\n}else if(s2>s1){\\\nreturn [0,1,2];\\\n}else{\\\nreturn [0,2,1];\\\n}}})\")\n }\n } else {\n code.push(\"ORDER})\")\n }\n }\n\n //view.set(i0, ..., v):\n code.push(\n\"proto.set=function \"+className+\"_set(\"+args.join(\",\")+\",v){\")\n if(useGetters) {\n code.push(\"return this.data.set(\"+index_str+\",v)}\")\n } else {\n code.push(\"return this.data[\"+index_str+\"]=v}\")\n }\n\n //view.get(i0, ...):\n code.push(\"proto.get=function \"+className+\"_get(\"+args.join(\",\")+\"){\")\n if(useGetters) {\n code.push(\"return this.data.get(\"+index_str+\")}\")\n } else {\n code.push(\"return this.data[\"+index_str+\"]}\")\n }\n\n //view.index:\n code.push(\n \"proto.index=function \"+className+\"_index(\", args.join(), \"){return \"+index_str+\"}\")\n\n //view.hi():\n code.push(\"proto.hi=function \"+className+\"_hi(\"+args.join(\",\")+\"){return new \"+className+\"(this.data,\"+\n indices.map(function(i) {\n return [\"(typeof i\",i,\"!=='number'||i\",i,\"<0)?this.shape[\", i, \"]:i\", i,\"|0\"].join(\"\")\n }).join(\",\")+\",\"+\n indices.map(function(i) {\n return \"this.stride[\"+i + \"]\"\n }).join(\",\")+\",this.offset)}\")\n\n //view.lo():\n var a_vars = indices.map(function(i) { return \"a\"+i+\"=this.shape[\"+i+\"]\" })\n var c_vars = indices.map(function(i) { return \"c\"+i+\"=this.stride[\"+i+\"]\" })\n code.push(\"proto.lo=function \"+className+\"_lo(\"+args.join(\",\")+\"){var b=this.offset,d=0,\"+a_vars.join(\",\")+\",\"+c_vars.join(\",\"))\n for(var i=0; i=0){\\\nd=i\"+i+\"|0;\\\nb+=c\"+i+\"*d;\\\na\"+i+\"-=d}\")\n }\n code.push(\"return new \"+className+\"(this.data,\"+\n indices.map(function(i) {\n return \"a\"+i\n }).join(\",\")+\",\"+\n indices.map(function(i) {\n return \"c\"+i\n }).join(\",\")+\",b)}\")\n\n //view.step():\n code.push(\"proto.step=function \"+className+\"_step(\"+args.join(\",\")+\"){var \"+\n indices.map(function(i) {\n return \"a\"+i+\"=this.shape[\"+i+\"]\"\n }).join(\",\")+\",\"+\n indices.map(function(i) {\n return \"b\"+i+\"=this.stride[\"+i+\"]\"\n }).join(\",\")+\",c=this.offset,d=0,ceil=Math.ceil\")\n for(var i=0; i=0){c=(c+this.stride[\"+i+\"]*i\"+i+\")|0}else{a.push(this.shape[\"+i+\"]);b.push(this.stride[\"+i+\"])}\")\n }\n code.push(\"var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}\")\n\n //Add return statement\n code.push(\"return function construct_\"+className+\"(data,shape,stride,offset){return new \"+className+\"(data,\"+\n indices.map(function(i) {\n return \"shape[\"+i+\"]\"\n }).join(\",\")+\",\"+\n indices.map(function(i) {\n return \"stride[\"+i+\"]\"\n }).join(\",\")+\",offset)}\")\n\n //Compile procedure\n var procedure = new Function(\"CTOR_LIST\", \"ORDER\", code.join(\"\\n\"))\n return procedure(CACHED_CONSTRUCTORS[dtype], order)\n}\n\nfunction arrayDType(data) {\n if(isBuffer(data)) {\n return \"buffer\"\n }\n if(hasTypedArrays) {\n switch(Object.prototype.toString.call(data)) {\n case \"[object Float64Array]\":\n return \"float64\"\n case \"[object Float32Array]\":\n return \"float32\"\n case \"[object Int8Array]\":\n return \"int8\"\n case \"[object Int16Array]\":\n return \"int16\"\n case \"[object Int32Array]\":\n return \"int32\"\n case \"[object Uint8Array]\":\n return \"uint8\"\n case \"[object Uint16Array]\":\n return \"uint16\"\n case \"[object Uint32Array]\":\n return \"uint32\"\n case \"[object Uint8ClampedArray]\":\n return \"uint8_clamped\"\n }\n }\n if(Array.isArray(data)) {\n return \"array\"\n }\n return \"generic\"\n}\n\nvar CACHED_CONSTRUCTORS = {\n \"float32\":[],\n \"float64\":[],\n \"int8\":[],\n \"int16\":[],\n \"int32\":[],\n \"uint8\":[],\n \"uint16\":[],\n \"uint32\":[],\n \"array\":[],\n \"uint8_clamped\":[],\n \"buffer\":[],\n \"generic\":[]\n}\n\n;(function() {\n for(var id in CACHED_CONSTRUCTORS) {\n CACHED_CONSTRUCTORS[id].push(compileConstructor(id, -1))\n }\n});\n\nfunction wrappedNDArrayCtor(data, shape, stride, offset) {\n if(data === undefined) {\n var ctor = CACHED_CONSTRUCTORS.array[0]\n return ctor([])\n } else if(typeof data === \"number\") {\n data = [data]\n }\n if(shape === undefined) {\n shape = [ data.length ]\n }\n var d = shape.length\n if(stride === undefined) {\n stride = new Array(d)\n for(var i=d-1, sz=1; i>=0; --i) {\n stride[i] = sz\n sz *= shape[i]\n }\n }\n if(offset === undefined) {\n offset = 0\n for(var i=0; i0\n , code = []\n , vars = []\n , idx=0, pidx=0, i, j\n for(i=0; i 0) {\n code.push(\"var \" + vars.join(\",\"))\n } \n //Scan loop\n for(i=dimension-1; i>=0; --i) { // Start at largest stride and work your way inwards\n idx = order[i]\n code.push([\"for(i\",i,\"=0;i\",i,\" 0) {\n code.push([\"index[\",pidx,\"]-=s\",pidx].join(\"\"))\n }\n code.push([\"++index[\",idx,\"]\"].join(\"\"))\n }\n code.push(\"}\")\n }\n return code.join(\"\\n\")\n}\n\n// Generate \"outer\" loops that loop over blocks of data, applying \"inner\" loops to the blocks by manipulating the local variables in such a way that the inner loop only \"sees\" the current block.\n// TODO: If this is used, then the previous declaration (done by generateCwiseOp) of s* is essentially unnecessary.\n// I believe the s* are not used elsewhere (in particular, I don't think they're used in the pre/post parts and \"shape\" is defined independently), so it would be possible to make defining the s* dependent on what loop method is being used.\nfunction outerFill(matched, order, proc, body) {\n var dimension = order.length\n , nargs = proc.arrayArgs.length\n , blockSize = proc.blockSize\n , has_index = proc.indexArgs.length > 0\n , code = []\n for(var i=0; i0;){\"].join(\"\")) // Iterate back to front\n code.push([\"if(j\",i,\"<\",blockSize,\"){\"].join(\"\")) // Either decrease j by blockSize (s = blockSize), or set it to zero (after setting s = j).\n code.push([\"s\",order[i],\"=j\",i].join(\"\"))\n code.push([\"j\",i,\"=0\"].join(\"\"))\n code.push([\"}else{s\",order[i],\"=\",blockSize].join(\"\"))\n code.push([\"j\",i,\"-=\",blockSize,\"}\"].join(\"\"))\n if(has_index) {\n code.push([\"index[\",order[i],\"]=j\",i].join(\"\"))\n }\n }\n for(var i=0; i 0) {\n allEqual = allEqual && summary[i] === summary[i-1]\n }\n }\n if(allEqual) {\n return summary[0]\n }\n return summary.join(\"\")\n}\n\n//Generates a cwise operator\nfunction generateCWiseOp(proc, typesig) {\n\n //Compute dimension\n // Arrays get put first in typesig, and there are two entries per array (dtype and order), so this gets the number of dimensions in the first array arg.\n var dimension = (typesig[1].length - Math.abs(proc.arrayBlockIndices[0]))|0\n var orders = new Array(proc.arrayArgs.length)\n var dtypes = new Array(proc.arrayArgs.length)\n for(var i=0; i 0) {\n vars.push(\"shape=SS.slice(0)\") // Makes the shape over which we iterate available to the user defined functions (so you can use width/height for example)\n }\n if(proc.indexArgs.length > 0) {\n // Prepare an array to keep track of the (logical) indices, initialized to dimension zeroes.\n var zeros = new Array(dimension)\n for(var i=0; i 0) {\n code.push(\"var \" + vars.join(\",\"))\n }\n for(var i=0; i 3) {\n code.push(processBlock(proc.pre, proc, dtypes))\n }\n\n //Process body\n var body = processBlock(proc.body, proc, dtypes)\n var matched = countMatches(loopOrders)\n if(matched < dimension) {\n code.push(outerFill(matched, loopOrders[0], proc, body)) // TODO: Rather than passing loopOrders[0], it might be interesting to look at passing an order that represents the majority of the arguments for example.\n } else {\n code.push(innerFill(loopOrders[0], proc, body))\n }\n\n //Inline epilog\n if(proc.post.body.length > 3) {\n code.push(processBlock(proc.post, proc, dtypes))\n }\n \n if(proc.debug) {\n console.log(\"-----Generated cwise routine for \", typesig, \":\\n\" + code.join(\"\\n\") + \"\\n----------\")\n }\n \n var loopName = [(proc.funcName||\"unnamed\"), \"_cwise_loop_\", orders[0].join(\"s\"),\"m\",matched,typeSummary(dtypes)].join(\"\")\n var f = new Function([\"function \",loopName,\"(\", arglist.join(\",\"),\"){\", code.join(\"\\n\"),\"} return \", loopName].join(\"\"))\n return f()\n}\nmodule.exports = generateCWiseOp\n","\"use strict\"\n\n// The function below is called when constructing a cwise function object, and does the following:\n// A function object is constructed which accepts as argument a compilation function and returns another function.\n// It is this other function that is eventually returned by createThunk, and this function is the one that actually\n// checks whether a certain pattern of arguments has already been used before and compiles new loops as needed.\n// The compilation passed to the first function object is used for compiling new functions.\n// Once this function object is created, it is called with compile as argument, where the first argument of compile\n// is bound to \"proc\" (essentially containing a preprocessed version of the user arguments to cwise).\n// So createThunk roughly works like this:\n// function createThunk(proc) {\n// var thunk = function(compileBound) {\n// var CACHED = {}\n// return function(arrays and scalars) {\n// if (dtype and order of arrays in CACHED) {\n// var func = CACHED[dtype and order of arrays]\n// } else {\n// var func = CACHED[dtype and order of arrays] = compileBound(dtype and order of arrays)\n// }\n// return func(arrays and scalars)\n// }\n// }\n// return thunk(compile.bind1(proc))\n// }\n\nvar compile = require(\"./compile.js\")\n\nfunction createThunk(proc) {\n var code = [\"'use strict'\", \"var CACHED={}\"]\n var vars = []\n var thunkName = proc.funcName + \"_cwise_thunk\"\n \n //Build thunk\n code.push([\"return function \", thunkName, \"(\", proc.shimArgs.join(\",\"), \"){\"].join(\"\"))\n var typesig = []\n var string_typesig = []\n var proc_args = [[\"array\",proc.arrayArgs[0],\".shape.slice(\", // Slice shape so that we only retain the shape over which we iterate (which gets passed to the cwise operator as SS).\n Math.max(0,proc.arrayBlockIndices[0]),proc.arrayBlockIndices[0]<0?(\",\"+proc.arrayBlockIndices[0]+\")\"):\")\"].join(\"\")]\n var shapeLengthConditions = [], shapeConditions = []\n // Process array arguments\n for(var i=0; i0) { // Gather conditions to check for shape equality (ignoring block indices)\n shapeLengthConditions.push(\"array\" + proc.arrayArgs[0] + \".shape.length===array\" + j + \".shape.length+\" + (Math.abs(proc.arrayBlockIndices[0])-Math.abs(proc.arrayBlockIndices[i])))\n shapeConditions.push(\"array\" + proc.arrayArgs[0] + \".shape[shapeIndex+\" + Math.max(0,proc.arrayBlockIndices[0]) + \"]===array\" + j + \".shape[shapeIndex+\" + Math.max(0,proc.arrayBlockIndices[i]) + \"]\")\n }\n }\n // Check for shape equality\n if (proc.arrayArgs.length > 1) {\n code.push(\"if (!(\" + shapeLengthConditions.join(\" && \") + \")) throw new Error('cwise: Arrays do not all have the same dimensionality!')\")\n code.push(\"for(var shapeIndex=array\" + proc.arrayArgs[0] + \".shape.length-\" + Math.abs(proc.arrayBlockIndices[0]) + \"; shapeIndex-->0;) {\")\n code.push(\"if (!(\" + shapeConditions.join(\" && \") + \")) throw new Error('cwise: Arrays do not all have the same shape!')\")\n code.push(\"}\")\n }\n // Process scalar arguments\n for(var i=0; i0) {\n throw new Error(\"cwise: pre() block may not reference array args\")\n }\n if(i < proc.post.args.length && proc.post.args[i].count>0) {\n throw new Error(\"cwise: post() block may not reference array args\")\n }\n } else if(arg_type === \"scalar\") {\n proc.scalarArgs.push(i)\n proc.shimArgs.push(\"scalar\" + i)\n } else if(arg_type === \"index\") {\n proc.indexArgs.push(i)\n if(i < proc.pre.args.length && proc.pre.args[i].count > 0) {\n throw new Error(\"cwise: pre() block may not reference array index\")\n }\n if(i < proc.body.args.length && proc.body.args[i].lvalue) {\n throw new Error(\"cwise: body() block may not write to array index\")\n }\n if(i < proc.post.args.length && proc.post.args[i].count > 0) {\n throw new Error(\"cwise: post() block may not reference array index\")\n }\n } else if(arg_type === \"shape\") {\n proc.shapeArgs.push(i)\n if(i < proc.pre.args.length && proc.pre.args[i].lvalue) {\n throw new Error(\"cwise: pre() block may not write to array shape\")\n }\n if(i < proc.body.args.length && proc.body.args[i].lvalue) {\n throw new Error(\"cwise: body() block may not write to array shape\")\n }\n if(i < proc.post.args.length && proc.post.args[i].lvalue) {\n throw new Error(\"cwise: post() block may not write to array shape\")\n }\n } else if(typeof arg_type === \"object\" && arg_type.offset) {\n proc.argTypes[i] = \"offset\"\n proc.offsetArgs.push({ array: arg_type.array, offset:arg_type.offset })\n proc.offsetArgIndex.push(i)\n } else {\n throw new Error(\"cwise: Unknown argument type \" + proc_args[i])\n }\n }\n \n //Make sure at least one array argument was specified\n if(proc.arrayArgs.length <= 0) {\n throw new Error(\"cwise: No array arguments specified\")\n }\n \n //Make sure arguments are correct\n if(proc.pre.args.length > proc_args.length) {\n throw new Error(\"cwise: Too many arguments in pre() block\")\n }\n if(proc.body.args.length > proc_args.length) {\n throw new Error(\"cwise: Too many arguments in body() block\")\n }\n if(proc.post.args.length > proc_args.length) {\n throw new Error(\"cwise: Too many arguments in post() block\")\n }\n\n //Check debug flag\n proc.debug = !!user_args.printCode || !!user_args.debug\n \n //Retrieve name\n proc.funcName = user_args.funcName || \"cwise\"\n \n //Read in block size\n proc.blockSize = user_args.blockSize || 64\n\n return createThunk(proc)\n}\n\nmodule.exports = compileCwise\n","'use strict'\n\nvar ndarray = require('ndarray')\n\nmodule.exports = squeeze\n\nfunction squeeze (a, axes) {\n var i\n var shape = []\n var stride = []\n\n if (axes !== undefined && !Array.isArray(axes)) {\n throw new Error('axes must be an Array list of dimensions to squeeze')\n }\n\n for (i = 0; i < a.shape.length; i++) {\n if (a.shape[i] !== 1 || (axes !== undefined && axes.indexOf(i) === -1)) {\n shape.push(a.shape[i])\n stride.push(a.stride[i])\n }\n }\n\n return ndarray(a.data, shape, stride, a.offset)\n}\n","\"use strict\"\n\nvar esprima = require(\"esprima\")\nvar uniq = require(\"uniq\")\n\nvar PREFIX_COUNTER = 0\n\nfunction CompiledArgument(name, lvalue, rvalue) {\n this.name = name\n this.lvalue = lvalue\n this.rvalue = rvalue\n this.count = 0\n}\n\nfunction CompiledRoutine(body, args, thisVars, localVars) {\n this.body = body\n this.args = args\n this.thisVars = thisVars\n this.localVars = localVars\n}\n\nfunction isGlobal(identifier) {\n if(identifier === \"eval\") {\n throw new Error(\"cwise-parser: eval() not allowed\")\n }\n if(typeof window !== \"undefined\") {\n return identifier in window\n } else if(typeof global !== \"undefined\") {\n return identifier in global\n } else if(typeof self !== \"undefined\") {\n return identifier in self\n } else {\n return false\n }\n}\n\nfunction getArgNames(ast) {\n var params = ast.body[0].expression.callee.params\n var names = new Array(params.length)\n for(var i=0; i= 0) {\n var carg = compiledArgs[argNo]\n var usage = getUsage(node)\n if(usage & LVALUE) {\n carg.lvalue = true\n }\n if(usage & RVALUE) {\n carg.rvalue = true\n }\n ++carg.count\n rewrite(node, carg.name)\n } else if(isGlobal(name)) {\n //Don't rewrite globals\n } else {\n rewrite(node, createLocal(name))\n }\n } else if(node.type === \"Literal\") {\n if(typeof node.value === \"string\") {\n rewrite(node, escapeString(node.value))\n }\n } else if(node.type === \"WithStatement\") {\n throw new Error(\"cwise-parser: with() statements not allowed\")\n } else {\n //Visit all children\n var keys = Object.keys(node)\n for(var i=0, n=keys.length; i length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nmodule.exports = baseSlice;\n","var baseSlice = require('./_baseSlice'),\n toInteger = require('./toInteger');\n\n/**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\nfunction take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n}\n\nmodule.exports = take;\n","/**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\nfunction baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n}\n\nmodule.exports = baseSum;\n","var baseSum = require('./_baseSum'),\n identity = require('./identity');\n\n/**\n * Computes the sum of the values in `array`.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the sum.\n * @example\n *\n * _.sum([4, 2, 8, 6]);\n * // => 20\n */\nfunction sum(array) {\n return (array && array.length)\n ? baseSum(array, identity)\n : 0;\n}\n\nmodule.exports = sum;\n","\"use strict\"\n\nmodule.exports = generateMatrixProduct\n\nvar BLOCK_SIZE = 32\n\nfunction unpackOrder(order) {\n return order === \"r\" ? [1,0] : [0,1]\n}\n\nfunction unpackShape(name, type) {\n if(type[1] === \"native\") {\n return [\n name, \"d0=\", name, \".length,\",\n name, \"d1=\", name, \"[0].length,\"\n ].join(\"\")\n } else {\n return [\n name, \"d0=\", name, \".shape[0],\",\n name, \"d1=\", name, \".shape[1],\",\n name, \"s0=\", name, \".stride[0],\",\n name, \"s1=\", name, \".stride[1],\",\n name, \"o=\", name, \".offset,\",\n name, \"d=\", name, \".data,\"\n ].join(\"\")\n }\n}\n\nfunction start(order, name, type, i, j, w) {\n var code = []\n if(type[1] === \"native\") {\n if(order[0]) {\n if(i) {\n code.push(\"var \", name, \"p=\", name, \"[\", i, \"];\")\n } else {\n code.push(\"var \", name, \"p=\", name, \"[0];\")\n }\n }\n } else {\n if(i && j) {\n if(w) {\n code.push(\n \"var \", name, \"t0=\", name, \"s\", order[0], \",\",\n name, \"t1=\", name, \"s\", order[1], \"-\", name, \"s\", order[0], \"*\", w, \",\",\n name, \"p=\", name, \"o+\", i, \"*\", name, \"s0+\", j, \"*\", name, \"s1;\")\n } else {\n code.push(\n \"var \", name, \"t0=\", name, \"s\", order[0], \",\",\n name, \"p=\", name, \"o+\", i, \"*\", name, \"s0+\", j, \"*\", name, \"s1;\")\n }\n } else if(i) {\n code.push(\n \"var \", name, \"t0=\", name, \"s\", order[0], \",\",\n name, \"p=\", name, \"o+\", i, \"*\", name, \"s0;\")\n } else if(j) {\n code.push(\n \"var \", name, \"t0=\", name, \"s\", order[0], \",\",\n name, \"p=\", name, \"o+\", j, \"*\", name, \"s1;\")\n } else {\n code.push(\n \"var \", name, \"t0=\", name, \"s\", order[0], \",\",\n name, \"t1=\", name, \"s\", order[1], \"-\", name, \"s\", order[0], \"*\", name, \"d\", order[0], \",\",\n name, \"p=\", name, \"o;\")\n }\n }\n return code\n}\n\nfunction walk(order, name, type, d, i) {\n var code = []\n if(type[1] === \"native\") {\n if(order[0] && d === 1) {\n code.push(name, \"p=\", name, \"[\", i, \"+1]\")\n }\n } else {\n code.push(name, \"p+=\", name, \"t\", d, \";\")\n }\n return code\n}\n\nfunction write(order, name, type, i, j, w) {\n var code = []\n if(type[1] === \"native\") {\n if(order[0]) {\n code.push(name, \"p[\", j, \"]=\", w, \";\")\n } else {\n code.push(name, \"[\", i, \"][\", j, \"]=\", w, \";\")\n }\n } else if(type[1] === \"generic\") {\n code.push(name, \"d.set(\", name, \"p,\", w, \");\")\n } else {\n code.push(name, \"d[\", name, \"p]=\", w, \";\")\n }\n return code\n}\n\nfunction read(order, name, type, i, j) {\n var code = []\n if(type[1] === \"native\") {\n if(order[0]) {\n code.push(name, \"p[\", j, \"]\")\n } else {\n code.push(name, \"[\", i, \"][\", j, \"]\")\n }\n } else if(type[1] === \"generic\") {\n code.push(name, \"d.get(\", name, \"p)\")\n } else {\n code.push(name, \"d[\", name, \"p]\")\n }\n return code.join(\"\")\n}\n\nfunction generateRowColumnLoop(oType, aType, bType, useAlpha, useBeta) {\n var code = []\n var oOrd = oType[0] === \"r\" ? [1,0] : [0,1], aOrd = [1, 0], bOrd = [0, 1]\n var symbols = [\"i\", \"j\"]\n\n code.push.apply(code, start(oOrd, \"o\", oType))\n \n if(oOrd[1]) {\n code.push(\"for(j=0;j0;){\",\n \"var w\", i, \"=\", BLOCK_SIZE, \";\",\n \"if(i\", i, \"<\", BLOCK_SIZE, \"){\",\n \"w\", i, \"=i\", i, \";\",\n \"i\", i, \"=0;\",\n \"}else{\",\n \"i\", i, \"-=\", BLOCK_SIZE, \";\",\n \"}\")\n }\n\n code.push.apply(code, start(oOrd, \"o\", oType, \"i0\", \"i1\", \"w1\"))\n \n code.push(\"for(i=0;i= 0; i--) {\n y.set(i, y.get(i) * beta + alpha * dot(A.pick(i, null), x));\n }\n return true;\n}\n","'use strict';\n\nmodule.exports = gbmv;\n\nfunction gbmv (A, kl, ku, x, y, alpha, beta) {\n var r = 0;\n var i = 0;\n var c = 0;\n var sum = 0;\n var idx = 0;\n var m = A.shape[0];\n var n = A.shape[1];\n var Kl = Math.min(kl, m - 1);\n var Ku = Math.min(ku, n - 1);\n\n var alpha0 = alpha === undefined ? 1 : alpha;\n var beta0 = beta === undefined ? 0 : beta;\n\n while (r <= Kl) {\n sum = 0;\n var max = Math.min(r + Ku, n - 1);\n for (c = 0; c <= max; c++) {\n sum += A.get(r, c) * x.get(c);\n }\n y.set(r, sum * alpha0 + beta0 * y.get(r));\n r++;\n }\n if (r < m) {\n i = 0;\n while (r + Ku < n) {\n sum = 0;\n for (c = 0; c <= Kl + Ku; c++) {\n idx = i + c + 1;\n sum += A.get(r, idx) * x.get(idx);\n }\n y.set(r, sum * alpha0 + beta0 * y.get(r));\n r++;\n i++;\n if (r === m) {\n break;\n }\n }\n }\n if (r < m) {\n i++;\n while (r - Kl < n) {\n sum = 0;\n for (c = i; c < n; c++) {\n sum += A.get(r, c) * x.get(c);\n }\n y.set(r, sum * alpha0 + beta0 * y.get(r));\n r++;\n i++;\n if (r === m) {\n break;\n }\n }\n }\n return true;\n}\n","'use strict';\n\nvar blas1 = require('ndarray-blas-level1');\n\nmodule.exports = symv;\n\nfunction symv (A, x, y, fromLower, alpha, beta) {\n var n = A.shape[0];\n\n var lower = fromLower || true;\n var alpha0 = alpha === undefined ? 1 : alpha;\n var beta0 = beta === undefined ? 0 : beta;\n\n var i = 0;\n var j = 0;\n var t1 = 0;\n var t2 = 0;\n\n if (beta0 === 0) {\n for (i = 0; i < y.shape[0]; ++i) {\n y.set(i, 0);\n }\n } else if (beta0 !== 1) {\n blas1.scal(beta0, y);\n }\n if (alpha0 === 0) {\n return true;\n } else if (alpha0 === 1) {\n if (lower) {\n for (j = 0; j < n; ++j) {\n t1 = x.get(j);\n t2 = 0;\n y.set(j, y.get(j) + t1 * A.get(j, j));\n for (i = j + 1; i < n; ++i) {\n y.set(i, y.get(i) + t1 * A.get(i, j));\n t2 = t2 + A.get(i, j) * x.get(i);\n }\n y.set(j, y.get(j) + t2);\n }\n } else {\n for (j = 0; j < n; ++j) {\n t1 = x.get(j);\n t2 = 0;\n for (i = 0; i <= j - 1; ++i) {\n y.set(i, y.get(i) + t1 * A.get(i, j));\n t2 = t2 + A.get(i, j) * x.get(i);\n }\n y.set(j, y.get(j) + t1 * A.get(j, j) + t2);\n }\n }\n } else {\n if (lower) {\n for (j = 0; j < n; ++j) {\n t1 = alpha0 * x.get(j);\n t2 = 0;\n y.set(j, y.get(j) + t1 * A.get(j, j));\n for (i = j + 1; i < n; ++i) {\n y.set(i, y.get(i) + t1 * A.get(i, j));\n t2 = t2 + A.get(i, j) * x.get(i);\n }\n y.set(j, y.get(j) + alpha0 * t2);\n }\n } else {\n for (j = 0; j < n; ++j) {\n t1 = alpha0 * x.get(j);\n t2 = 0;\n for (i = 0; i <= j - 1; ++i) {\n y.set(i, y.get(i) + t1 * A.get(i, j));\n t2 = t2 + A.get(i, j) * x.get(i);\n }\n y.set(j, y.get(j) + t1 * A.get(j, j) + alpha0 * t2);\n }\n }\n }\n\n return true;\n}\n","'use strict';\n\nmodule.exports = sbmv;\n\nfunction sbmv () {\n console.error('SBMV (symmetric banded matrix vector multiply) not yet implemented');\n}\n","'use strict';\n\nvar blas1 = require('ndarray-blas-level1');\n\nmodule.exports = trmv;\n\n// Compute the product of an upper triangular matrix with a vector\nfunction trmv (A, x, isLower) {\n var dot = blas1.dot;\n var n = A.shape[1];\n var i = 0;\n if (isLower) {\n for (i = n - 1; i >= 0; i--) {\n x.set(i, dot(A.pick(i, null).hi(i + 1), x.hi(i + 1)));\n }\n } else {\n for (i = 0; i < n; i++) {\n x.set(i, dot(A.pick(i, null).lo(i), x.lo(i)));\n }\n }\n return true;\n}\n","'use strict';\n\nmodule.exports = tbmv;\n\nfunction tbmv () {\n console.error('TBMV (triangular banded matrix vector multiply) not yet implemented');\n}\n","'use strict';\n\nvar blas1 = require('ndarray-blas-level1');\n\nmodule.exports = trsv;\n\n// Solve Ax=b where A is upper triangular\nfunction trsv (A, x, isLower) {\n var dot = blas1.dot;\n var n = A.shape[1];\n var i = 0;\n if (isLower) {\n x.set(0, x.get(0) / A.get(0, 0));\n for (i = 1; i < n; i++) {\n x.set(i, (x.get(i) - dot(A.pick(i, null).hi(i), x.hi(i))) / A.get(i, i));\n }\n } else {\n x.set(n - 1, x.get(n - 1) / A.get(n - 1, n - 1));\n for (i = n - 2; i >= 0; i--) {\n x.set(i, (x.get(i) - dot(A.pick(i, null).lo(i + 1), x.lo(i + 1))) / A.get(i, i));\n }\n }\n return true;\n}\n","'use strict';\n\nmodule.exports = tpsv;\n\nfunction tpsv () {\n console.error('TPSV (triangular packed matrix solver) not yet implemented');\n}\n","'use strict';\n\nmodule.exports = ger;\n\nfunction ger () {\n console.error('GER (rank 1 operation A := alpha*x*y\\' + A) not yet implemented');\n}\n","'use strict';\n\nmodule.exports = syr;\n\nfunction syr () {\n console.error('SYR (symmetric rank 1 operation A := alpha*x*y\\' + A) not yet implemented');\n}\n","'use strict';\n\nmodule.exports = spr;\n\nfunction spr () {\n console.error('SPR (symmetric packed rank 1 operation A := alpha*x*y\\' + A) not yet implemented');\n}\n","'use strict';\n\nmodule.exports = syr2;\n\nfunction syr2 () {\n console.error('SYR (symmetric rank 2 operation A := alpha*x*y\\' + alpha*y*x\\' + A) not yet implemented');\n}\n","'use strict';\n\nmodule.exports = spr2;\n\nfunction spr2 () {\n console.error('SPR (symmetric packed rank 2 operation A := alpha*x*y\\' + alpha*y*x\\' + A) not yet implemented');\n}\n","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","/**\n * Bit twiddling hacks for JavaScript.\n *\n * Author: Mikola Lysenko\n *\n * Ported from Stanford bit twiddling hack library:\n * http://graphics.stanford.edu/~seander/bithacks.html\n */\n\n\"use strict\"; \"use restrict\";\n\n//Number of bits in an integer\nvar INT_BITS = 32;\n\n//Constants\nexports.INT_BITS = INT_BITS;\nexports.INT_MAX = 0x7fffffff;\nexports.INT_MIN = -1<<(INT_BITS-1);\n\n//Returns -1, 0, +1 depending on sign of x\nexports.sign = function(v) {\n return (v > 0) - (v < 0);\n}\n\n//Computes absolute value of integer\nexports.abs = function(v) {\n var mask = v >> (INT_BITS-1);\n return (v ^ mask) - mask;\n}\n\n//Computes minimum of integers x and y\nexports.min = function(x, y) {\n return y ^ ((x ^ y) & -(x < y));\n}\n\n//Computes maximum of integers x and y\nexports.max = function(x, y) {\n return x ^ ((x ^ y) & -(x < y));\n}\n\n//Checks if a number is a power of two\nexports.isPow2 = function(v) {\n return !(v & (v-1)) && (!!v);\n}\n\n//Computes log base 2 of v\nexports.log2 = function(v) {\n var r, shift;\n r = (v > 0xFFFF) << 4; v >>>= r;\n shift = (v > 0xFF ) << 3; v >>>= shift; r |= shift;\n shift = (v > 0xF ) << 2; v >>>= shift; r |= shift;\n shift = (v > 0x3 ) << 1; v >>>= shift; r |= shift;\n return r | (v >> 1);\n}\n\n//Computes log base 10 of v\nexports.log10 = function(v) {\n return (v >= 1000000000) ? 9 : (v >= 100000000) ? 8 : (v >= 10000000) ? 7 :\n (v >= 1000000) ? 6 : (v >= 100000) ? 5 : (v >= 10000) ? 4 :\n (v >= 1000) ? 3 : (v >= 100) ? 2 : (v >= 10) ? 1 : 0;\n}\n\n//Counts number of bits\nexports.popCount = function(v) {\n v = v - ((v >>> 1) & 0x55555555);\n v = (v & 0x33333333) + ((v >>> 2) & 0x33333333);\n return ((v + (v >>> 4) & 0xF0F0F0F) * 0x1010101) >>> 24;\n}\n\n//Counts number of trailing zeros\nfunction countTrailingZeros(v) {\n var c = 32;\n v &= -v;\n if (v) c--;\n if (v & 0x0000FFFF) c -= 16;\n if (v & 0x00FF00FF) c -= 8;\n if (v & 0x0F0F0F0F) c -= 4;\n if (v & 0x33333333) c -= 2;\n if (v & 0x55555555) c -= 1;\n return c;\n}\nexports.countTrailingZeros = countTrailingZeros;\n\n//Rounds to next power of 2\nexports.nextPow2 = function(v) {\n v += v === 0;\n --v;\n v |= v >>> 1;\n v |= v >>> 2;\n v |= v >>> 4;\n v |= v >>> 8;\n v |= v >>> 16;\n return v + 1;\n}\n\n//Rounds down to previous power of 2\nexports.prevPow2 = function(v) {\n v |= v >>> 1;\n v |= v >>> 2;\n v |= v >>> 4;\n v |= v >>> 8;\n v |= v >>> 16;\n return v - (v>>>1);\n}\n\n//Computes parity of word\nexports.parity = function(v) {\n v ^= v >>> 16;\n v ^= v >>> 8;\n v ^= v >>> 4;\n v &= 0xf;\n return (0x6996 >>> v) & 1;\n}\n\nvar REVERSE_TABLE = new Array(256);\n\n(function(tab) {\n for(var i=0; i<256; ++i) {\n var v = i, r = i, s = 7;\n for (v >>>= 1; v; v >>>= 1) {\n r <<= 1;\n r |= v & 1;\n --s;\n }\n tab[i] = (r << s) & 0xff;\n }\n})(REVERSE_TABLE);\n\n//Reverse bits in a 32 bit word\nexports.reverse = function(v) {\n return (REVERSE_TABLE[ v & 0xff] << 24) |\n (REVERSE_TABLE[(v >>> 8) & 0xff] << 16) |\n (REVERSE_TABLE[(v >>> 16) & 0xff] << 8) |\n REVERSE_TABLE[(v >>> 24) & 0xff];\n}\n\n//Interleave bits of 2 coordinates with 16 bits. Useful for fast quadtree codes\nexports.interleave2 = function(x, y) {\n x &= 0xFFFF;\n x = (x | (x << 8)) & 0x00FF00FF;\n x = (x | (x << 4)) & 0x0F0F0F0F;\n x = (x | (x << 2)) & 0x33333333;\n x = (x | (x << 1)) & 0x55555555;\n\n y &= 0xFFFF;\n y = (y | (y << 8)) & 0x00FF00FF;\n y = (y | (y << 4)) & 0x0F0F0F0F;\n y = (y | (y << 2)) & 0x33333333;\n y = (y | (y << 1)) & 0x55555555;\n\n return x | (y << 1);\n}\n\n//Extracts the nth interleaved component\nexports.deinterleave2 = function(v, n) {\n v = (v >>> n) & 0x55555555;\n v = (v | (v >>> 1)) & 0x33333333;\n v = (v | (v >>> 2)) & 0x0F0F0F0F;\n v = (v | (v >>> 4)) & 0x00FF00FF;\n v = (v | (v >>> 16)) & 0x000FFFF;\n return (v << 16) >> 16;\n}\n\n\n//Interleave bits of 3 coordinates, each with 10 bits. Useful for fast octree codes\nexports.interleave3 = function(x, y, z) {\n x &= 0x3FF;\n x = (x | (x<<16)) & 4278190335;\n x = (x | (x<<8)) & 251719695;\n x = (x | (x<<4)) & 3272356035;\n x = (x | (x<<2)) & 1227133513;\n\n y &= 0x3FF;\n y = (y | (y<<16)) & 4278190335;\n y = (y | (y<<8)) & 251719695;\n y = (y | (y<<4)) & 3272356035;\n y = (y | (y<<2)) & 1227133513;\n x |= (y << 1);\n \n z &= 0x3FF;\n z = (z | (z<<16)) & 4278190335;\n z = (z | (z<<8)) & 251719695;\n z = (z | (z<<4)) & 3272356035;\n z = (z | (z<<2)) & 1227133513;\n \n return x | (z << 2);\n}\n\n//Extracts nth interleaved component of a 3-tuple\nexports.deinterleave3 = function(v, n) {\n v = (v >>> n) & 1227133513;\n v = (v | (v>>>2)) & 3272356035;\n v = (v | (v>>>4)) & 251719695;\n v = (v | (v>>>8)) & 4278190335;\n v = (v | (v>>>16)) & 0x3FF;\n return (v<<22)>>22;\n}\n\n//Computes next combination in colexicographic order (this is mistakenly called nextPermutation on the bit twiddling hacks page)\nexports.nextCombination = function(v) {\n var t = v | (v - 1);\n return (t + 1) | (((~t & -~t) - 1) >>> (countTrailingZeros(v) + 1));\n}\n\n","\"use strict\"\n\nfunction dupe_array(count, value, i) {\n var c = count[i]|0\n if(c <= 0) {\n return []\n }\n var result = new Array(c), j\n if(i === count.length-1) {\n for(j=0; j 0) {\n return dupe_number(count|0, value)\n }\n break\n case \"object\":\n if(typeof (count.length) === \"number\") {\n return dupe_array(count, value, 0)\n }\n break\n }\n return []\n}\n\nmodule.exports = dupe","\"use strict\"\n\nvar ndarray = require(\"ndarray\")\nvar ops = require(\"ndarray-ops\")\nvar pool = require(\"typedarray-pool\")\n\nfunction clone(array) {\n var dtype = array.dtype\n if(dtype === \"generic\" || dtype === \"array\") {\n dtype = \"double\"\n }\n var data = pool.malloc(array.size, dtype)\n var result = ndarray(data, array.shape)\n ops.assign(result, array)\n return result\n}\nexports.clone = clone\n\nfunction malloc(shape, dtype) {\n if(!dtype) {\n dtype = \"double\"\n }\n var sz = 1\n var stride = new Array(shape.length)\n for(var i=shape.length-1; i>=0; --i) {\n stride[i] = sz\n sz *= shape[i]\n }\n return ndarray(pool.malloc(sz, dtype), shape, stride, 0)\n}\nexports.malloc = malloc\n\nfunction free(array) {\n if(array.dtype === \"generic\" || array.dtype === \"array\") {\n return\n }\n pool.free(array.data)\n}\nexports.free = free\n\nfunction zeros(shape, dtype) {\n if(!dtype) {\n dtype = \"double\"\n }\n\n var sz = 1\n var stride = new Array(shape.length)\n for(var i=shape.length-1; i>=0; --i) {\n stride[i] = sz\n sz *= shape[i]\n }\n var buf = pool.malloc(sz, dtype)\n for(var i=0; i=0; --i) {\n stride[i] = sz\n sz *= shape[i]\n }\n var buf = pool.malloc(sz, dtype)\n for(var i=0; i=0; --i) {\n stride[i] = sz\n sz *= shape[i]\n }\n var buf = pool.malloc(sz, dtype)\n for(i=0; i=0; i--) {\n offsum += stride[i]\n mindim = Math.min(mindim,shape[i])\n }\n for(i=0,offset=0; i= 0) {\n origin[d] += inputShape[d]\n if (origin[d] === newShape[d]) {\n origin[d] = 0\n d--\n } else break\n }\n }\n\n return output\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = extend;\nfunction extend(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || typeof add !== 'object') return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n}\n","'use strict'\n\nmodule.exports = concatRows\nvar extend = require('util-extend')\nvar ops = require('ndarray-ops')\nvar pool = require('ndarray-scratch')\n\nvar defaults = {\n dtype: 'double'\n}\n\nfunction concatRows () {\n var output, input, inputs, options, d, i, shape, idx, l, slice\n\n options = extend({}, defaults)\n\n if (arguments.length === 0) {\n throw new Error('Array of ndarrays to concatenate must not be empty')\n }\n\n if (Array.isArray(arguments[0])) {\n // If the first argument is an array, then assume it's the list\n // of arrays to concatenate:\n inputs = arguments[0]\n extend(options, arguments[1] || {})\n } else if (arguments.length === 2) {\n // Otherwise assume the first argument is the output array:\n inputs = arguments[1]\n output = arguments[0]\n extend(options, arguments[2] || {})\n }\n\n if (inputs.length === 0) {\n throw new Error('Array of ndarrays to concatenate must not be empty')\n }\n\n for (d = 0; d < inputs.length; d++) {\n // Verify the other dimensions:\n if (!shape) {\n // If no shape is set, set it:\n shape = inputs[d].shape.slice(0)\n } else {\n // At the very least, all arrays must share teh same dimensionality:\n if (inputs[d].dimension !== shape.length) {\n throw new Error('all arrays must have the same dimensionality')\n }\n // If shape is set, then this shape must match:\n for (i = 1; i < inputs[d].shape.length; i++) {\n if (inputs[d].shape[i] !== shape[i]) {\n throw new Error('last n-1 dimensions of concatenated rows must have the same size')\n }\n }\n\n // Add to the size of the concatenated dimension:\n shape[0] += inputs[d].shape[0]\n }\n }\n\n if (output) {\n if (shape[0] !== output.shape[0]) {\n throw new Error('first dimension of output array must match the total number of concatenated rows')\n }\n } else {\n // NB: Nothing after this can fail, otherwise we leak memory. So all\n // assertions MUST happen before this.\n output = pool.zeros(shape, options.dtype)\n }\n\n for (i = 0, idx = 0; i < inputs.length; i++) {\n input = inputs[i]\n l = input.shape[0]\n slice = output.lo(idx).hi(l)\n ops.assign(slice, input)\n idx += l\n }\n\n return output\n}\n","\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n","\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(\"../util/minimal\");\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low 32 bits, unsigned\r\n * @param {number} hi High 32 bits, unsigned\r\n */\r\nfunction LongBits(lo, hi) {\r\n\r\n // note that the casts below are theoretically unnecessary as of today, but older statically\r\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo >>> 0;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi >>> 0;\r\n}\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Zero hash.\r\n * @memberof util.LongBits\r\n * @type {string}\r\n */\r\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n if (sign)\r\n value = -value;\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0;\r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.from = function from(value) {\r\n if (typeof value === \"number\")\r\n return LongBits.fromNumber(value);\r\n if (util.isString(value)) {\r\n /* istanbul ignore else */\r\n if (util.Long)\r\n value = util.Long.fromString(value);\r\n else\r\n return LongBits.fromNumber(parseInt(value, 10));\r\n }\r\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBits.prototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n var lo = ~this.lo + 1 >>> 0,\r\n hi = ~this.hi >>> 0;\r\n if (!lo)\r\n hi = hi + 1 >>> 0;\r\n return -(lo + hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBits.prototype.toLong = function toLong(unsigned) {\r\n return util.Long\r\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\r\n /* istanbul ignore next */\r\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n if (hash === zeroHash)\r\n return zero;\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBits.prototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 ,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBits.prototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBits.prototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBits.prototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n return part2 === 0\r\n ? part1 === 0\r\n ? part0 < 16384\r\n ? part0 < 128 ? 1 : 2\r\n : part0 < 2097152 ? 3 : 4\r\n : part1 < 16384\r\n ? part1 < 128 ? 5 : 6\r\n : part1 < 2097152 ? 7 : 8\r\n : part2 < 128 ? 9 : 10;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Writer;\r\n\r\nvar util = require(\"./util/minimal\");\r\n\r\nvar BufferWriter; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n base64 = util.base64,\r\n utf8 = util.utf8;\r\n\r\n/**\r\n * Constructs a new writer operation instance.\r\n * @classdesc Scheduled writer operation.\r\n * @constructor\r\n * @param {function(*, Uint8Array, number)} fn Function to call\r\n * @param {number} len Value byte length\r\n * @param {*} val Value to write\r\n * @ignore\r\n */\r\nfunction Op(fn, len, val) {\r\n\r\n /**\r\n * Function to call.\r\n * @type {function(Uint8Array, number, *)}\r\n */\r\n this.fn = fn;\r\n\r\n /**\r\n * Value byte length.\r\n * @type {number}\r\n */\r\n this.len = len;\r\n\r\n /**\r\n * Next operation.\r\n * @type {Writer.Op|undefined}\r\n */\r\n this.next = undefined;\r\n\r\n /**\r\n * Value to write.\r\n * @type {*}\r\n */\r\n this.val = val; // type varies\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction noop() {} // eslint-disable-line no-empty-function\r\n\r\n/**\r\n * Constructs a new writer state instance.\r\n * @classdesc Copied writer state.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {Writer} writer Writer to copy state from\r\n * @ignore\r\n */\r\nfunction State(writer) {\r\n\r\n /**\r\n * Current head.\r\n * @type {Writer.Op}\r\n */\r\n this.head = writer.head;\r\n\r\n /**\r\n * Current tail.\r\n * @type {Writer.Op}\r\n */\r\n this.tail = writer.tail;\r\n\r\n /**\r\n * Current buffer length.\r\n * @type {number}\r\n */\r\n this.len = writer.len;\r\n\r\n /**\r\n * Next state.\r\n * @type {State|null}\r\n */\r\n this.next = writer.states;\r\n}\r\n\r\n/**\r\n * Constructs a new writer instance.\r\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n */\r\nfunction Writer() {\r\n\r\n /**\r\n * Current length.\r\n * @type {number}\r\n */\r\n this.len = 0;\r\n\r\n /**\r\n * Operations head.\r\n * @type {Object}\r\n */\r\n this.head = new Op(noop, 0, 0);\r\n\r\n /**\r\n * Operations tail\r\n * @type {Object}\r\n */\r\n this.tail = this.head;\r\n\r\n /**\r\n * Linked forked states.\r\n * @type {Object|null}\r\n */\r\n this.states = null;\r\n\r\n // When a value is written, the writer calculates its byte length and puts it into a linked\r\n // list of operations to perform when finish() is called. This both allows us to allocate\r\n // buffers of the exact required size and reduces the amount of work we have to do compared\r\n // to first calculating over objects and then encoding over objects. In our case, the encoding\r\n // part is just a linked list walk calling operations with already prepared values.\r\n}\r\n\r\n/**\r\n * Creates a new writer.\r\n * @function\r\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\r\n */\r\nWriter.create = util.Buffer\r\n ? function create_buffer_setup() {\r\n return (Writer.create = function create_buffer() {\r\n return new BufferWriter();\r\n })();\r\n }\r\n /* istanbul ignore next */\r\n : function create_array() {\r\n return new Writer();\r\n };\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nWriter.alloc = function alloc(size) {\r\n return new util.Array(size);\r\n};\r\n\r\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\r\n/* istanbul ignore else */\r\nif (util.Array !== Array)\r\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\r\n\r\n/**\r\n * Pushes a new operation to the queue.\r\n * @param {function(Uint8Array, number, *)} fn Function to call\r\n * @param {number} len Value byte length\r\n * @param {number} val Value to write\r\n * @returns {Writer} `this`\r\n * @private\r\n */\r\nWriter.prototype._push = function push(fn, len, val) {\r\n this.tail = this.tail.next = new Op(fn, len, val);\r\n this.len += len;\r\n return this;\r\n};\r\n\r\nfunction writeByte(val, buf, pos) {\r\n buf[pos] = val & 255;\r\n}\r\n\r\nfunction writeVarint32(val, buf, pos) {\r\n while (val > 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Constructs a new varint writer operation instance.\r\n * @classdesc Scheduled varint writer operation.\r\n * @extends Op\r\n * @constructor\r\n * @param {number} len Value byte length\r\n * @param {number} val Value to write\r\n * @ignore\r\n */\r\nfunction VarintOp(len, val) {\r\n this.len = len;\r\n this.next = undefined;\r\n this.val = val;\r\n}\r\n\r\nVarintOp.prototype = Object.create(Op.prototype);\r\nVarintOp.prototype.fn = writeVarint32;\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.uint32 = function write_uint32(value) {\r\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\r\n // uint32 is by far the most frequently used operation and benefits significantly from this.\r\n this.len += (this.tail = this.tail.next = new VarintOp(\r\n (value = value >>> 0)\r\n < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5,\r\n value)).len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.sint32 = function write_sint32(value) {\r\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\r\n};\r\n\r\nfunction writeVarint64(val, buf, pos) {\r\n while (val.hi) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriter.prototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this._push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriter.prototype.int64 = Writer.prototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriter.prototype.sint64 = function write_sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this._push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.bool = function write_bool(value) {\r\n return this._push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.fixed32 = function write_fixed32(value) {\r\n return this._push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as fixed 32 bits.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriter.prototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as fixed 64 bits.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.float = function write_float(value) {\r\n return this._push(util.float.writeFloatLE, 4, value);\r\n};\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.double = function write_double(value) {\r\n return this._push(util.float.writeDoubleLE, 8, value);\r\n};\r\n\r\nvar writeBytes = util.Array.prototype.set\r\n ? function writeBytes_set(val, buf, pos) {\r\n buf.set(val, pos); // also works for plain array values\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytes_for(val, buf, pos) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n };\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n if (!len)\r\n return this._push(writeByte, 1, 0);\r\n if (util.isString(value)) {\r\n var buf = Writer.alloc(len = base64.length(value));\r\n base64.decode(value, buf, 0);\r\n value = buf;\r\n }\r\n return this.uint32(len)._push(writeBytes, len, value);\r\n};\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.string = function write_string(value) {\r\n var len = utf8.length(value);\r\n return len\r\n ? this.uint32(len)._push(utf8.write, len, value)\r\n : this._push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.fork = function fork() {\r\n this.states = new State(this);\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.reset = function reset() {\r\n if (this.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.ldelim = function ldelim() {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset().uint32(len);\r\n if (len) {\r\n this.tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriter.prototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = this.constructor.alloc(this.len),\r\n pos = 0;\r\n while (head) {\r\n head.fn(head.val, buf, pos);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n // this.head = this.tail = null;\r\n return buf;\r\n};\r\n\r\nWriter._configure = function(BufferWriter_) {\r\n BufferWriter = BufferWriter_;\r\n};\r\n","\"use strict\";\r\nmodule.exports = BufferWriter;\r\n\r\n// extends Writer\r\nvar Writer = require(\"./writer\");\r\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\r\n\r\nvar util = require(\"./util/minimal\");\r\n\r\nvar Buffer = util.Buffer;\r\n\r\n/**\r\n * Constructs a new buffer writer instance.\r\n * @classdesc Wire format writer using node buffers.\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Buffer} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n return (BufferWriter.alloc = util._Buffer_allocUnsafe)(size);\r\n};\r\n\r\nvar writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name === \"set\"\r\n ? function writeBytesBuffer_set(val, buf, pos) {\r\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\r\n // also works for plain array values\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytesBuffer_copy(val, buf, pos) {\r\n if (val.copy) // Buffer values\r\n val.copy(buf, pos, 0, val.length);\r\n else for (var i = 0; i < val.length;) // plain array values\r\n buf[pos++] = val[i++];\r\n };\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\r\n if (util.isString(value))\r\n value = util._Buffer_from(value, \"base64\");\r\n var len = value.length >>> 0;\r\n this.uint32(len);\r\n if (len)\r\n this._push(writeBytesBuffer, len, value);\r\n return this;\r\n};\r\n\r\nfunction writeStringBuffer(val, buf, pos) {\r\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\r\n util.utf8.write(val, buf, pos);\r\n else\r\n buf.utf8Write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriter.prototype.string = function write_string_buffer(value) {\r\n var len = Buffer.byteLength(value);\r\n this.uint32(len);\r\n if (len)\r\n this._push(writeStringBuffer, len, value);\r\n return this;\r\n};\r\n\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @name BufferWriter#finish\r\n * @function\r\n * @returns {Buffer} Finished buffer\r\n */\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(\"./util/minimal\");\r\n\r\nvar BufferReader; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n utf8 = util.utf8;\r\n\r\n/* istanbul ignore next */\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Constructs a new reader instance using the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\nvar create_array = typeof Uint8Array !== \"undefined\"\r\n ? function create_typed_array(buffer) {\r\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\r\n return new Reader(buffer);\r\n throw Error(\"illegal buffer\");\r\n }\r\n /* istanbul ignore next */\r\n : function create_array(buffer) {\r\n if (Array.isArray(buffer))\r\n return new Reader(buffer);\r\n throw Error(\"illegal buffer\");\r\n };\r\n\r\n/**\r\n * Creates a new reader using the specified buffer.\r\n * @function\r\n * @param {Uint8Array|Buffer} buffer Buffer to read from\r\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n * @throws {Error} If `buffer` is not a valid buffer\r\n */\r\nReader.create = util.Buffer\r\n ? function create_buffer_setup(buffer) {\r\n return (Reader.create = function create_buffer(buffer) {\r\n return util.Buffer.isBuffer(buffer)\r\n ? new BufferReader(buffer)\r\n /* istanbul ignore next */\r\n : create_array(buffer);\r\n })(buffer);\r\n }\r\n /* istanbul ignore next */\r\n : create_array;\r\n\r\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.uint32 = (function read_uint32_setup() {\r\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\r\n return function read_uint32() {\r\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n\r\n /* istanbul ignore if */\r\n if ((this.pos += 5) > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this, 10);\r\n }\r\n return value;\r\n };\r\n})();\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.int32 = function read_int32() {\r\n return this.uint32() | 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.sint32 = function read_sint32() {\r\n var value = this.uint32();\r\n return value >>> 1 ^ -(value & 1) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n // tends to deopt with local vars for octet etc.\r\n var bits = new LongBits(0, 0);\r\n var i = 0;\r\n if (this.len - this.pos > 4) { // fast route (lo)\r\n for (; i < 4; ++i) {\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n i = 0;\r\n } else {\r\n for (; i < 3; ++i) {\r\n /* istanbul ignore if */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 1st..3th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n // 4th\r\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\r\n return bits;\r\n }\r\n if (this.len - this.pos > 4) { // fast route (hi)\r\n for (; i < 5; ++i) {\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n } else {\r\n for (; i < 5; ++i) {\r\n /* istanbul ignore if */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n }\r\n /* istanbul ignore next */\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReader.prototype.bool = function read_bool() {\r\n return this.uint32() !== 0;\r\n};\r\n\r\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\r\n return (buf[end - 4]\r\n | buf[end - 3] << 8\r\n | buf[end - 2] << 16\r\n | buf[end - 1] << 24) >>> 0;\r\n}\r\n\r\n/**\r\n * Reads fixed 32 bits as an unsigned 32 bit integer.\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.fixed32 = function read_fixed32() {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32_end(this.buf, this.pos += 4);\r\n};\r\n\r\n/**\r\n * Reads fixed 32 bits as a signed 32 bit integer.\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.sfixed32 = function read_sfixed32() {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32_end(this.buf, this.pos += 4) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readFixed64(/* this: Reader */) {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n\r\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long} Value read\r\n */\r\n\r\n/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.float = function read_float() {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = util.float.readFloatLE(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.double = function read_double() {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = util.float.readDoubleLE(this.buf, this.pos);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReader.prototype.bytes = function read_bytes() {\r\n var length = this.uint32(),\r\n start = this.pos,\r\n end = this.pos + length;\r\n\r\n /* istanbul ignore if */\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n\r\n this.pos += length;\r\n if (Array.isArray(this.buf)) // plain array\r\n return this.buf.slice(start, end);\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReader.prototype.string = function read_string() {\r\n var bytes = this.bytes();\r\n return utf8.read(bytes, 0, bytes.length);\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReader.prototype.skip = function skip(length) {\r\n if (typeof length === \"number\") {\r\n /* istanbul ignore if */\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n } else {\r\n do {\r\n /* istanbul ignore if */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReader.prototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n do { // eslint-disable-line no-constant-condition\r\n if ((wireType = this.uint32() & 7) === 4)\r\n break;\r\n this.skipType(wireType);\r\n } while (true);\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\r\n }\r\n return this;\r\n};\r\n\r\nReader._configure = function(BufferReader_) {\r\n BufferReader = BufferReader_;\r\n\r\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\r\n util.merge(Reader.prototype, {\r\n\r\n int64: function read_int64() {\r\n return readLongVarint.call(this)[fn](false);\r\n },\r\n\r\n uint64: function read_uint64() {\r\n return readLongVarint.call(this)[fn](true);\r\n },\r\n\r\n sint64: function read_sint64() {\r\n return readLongVarint.call(this).zzDecode()[fn](false);\r\n },\r\n\r\n fixed64: function read_fixed64() {\r\n return readFixed64.call(this)[fn](true);\r\n },\r\n\r\n sfixed64: function read_sfixed64() {\r\n return readFixed64.call(this)[fn](false);\r\n }\r\n\r\n });\r\n};\r\n","\"use strict\";\r\nmodule.exports = BufferReader;\r\n\r\n// extends Reader\r\nvar Reader = require(\"./reader\");\r\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\r\n\r\nvar util = require(\"./util/minimal\");\r\n\r\n/**\r\n * Constructs a new buffer reader instance.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n Reader.call(this, buffer);\r\n\r\n /**\r\n * Read buffer.\r\n * @name BufferReader#buf\r\n * @type {Buffer}\r\n */\r\n}\r\n\r\n/* istanbul ignore else */\r\nif (util.Buffer)\r\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReader.prototype.string = function read_string_buffer() {\r\n var len = this.uint32(); // modifies pos\r\n return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @name BufferReader#bytes\r\n * @function\r\n * @returns {Buffer} Value read\r\n */\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar util = require(\"../util/minimal\");\r\n\r\n// Extends EventEmitter\r\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\r\n\r\n/**\r\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\r\n *\r\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\r\n * @typedef rpc.ServiceMethodCallback\r\n * @template TRes extends Message\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {TRes} [response] Response message\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\r\n * @typedef rpc.ServiceMethod\r\n * @template TReq extends Message\r\n * @template TRes extends Message\r\n * @type {function}\r\n * @param {TReq|Properties} request Request message or plain object\r\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\r\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\r\n */\r\n\r\n/**\r\n * Constructs a new RPC service instance.\r\n * @classdesc An RPC service as returned by {@link Service#create}.\r\n * @exports rpc.Service\r\n * @extends util.EventEmitter\r\n * @constructor\r\n * @param {RPCImpl} rpcImpl RPC implementation\r\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\r\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\r\n */\r\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\r\n\r\n if (typeof rpcImpl !== \"function\")\r\n throw TypeError(\"rpcImpl must be a function\");\r\n\r\n util.EventEmitter.call(this);\r\n\r\n /**\r\n * RPC implementation. Becomes `null` once the service is ended.\r\n * @type {RPCImpl|null}\r\n */\r\n this.rpcImpl = rpcImpl;\r\n\r\n /**\r\n * Whether requests are length-delimited.\r\n * @type {boolean}\r\n */\r\n this.requestDelimited = Boolean(requestDelimited);\r\n\r\n /**\r\n * Whether responses are length-delimited.\r\n * @type {boolean}\r\n */\r\n this.responseDelimited = Boolean(responseDelimited);\r\n}\r\n\r\n/**\r\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\r\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\r\n * @param {Constructor} requestCtor Request constructor\r\n * @param {Constructor} responseCtor Response constructor\r\n * @param {TReq|Properties} request Request message or plain object\r\n * @param {rpc.ServiceMethodCallback} callback Service callback\r\n * @returns {undefined}\r\n * @template TReq extends Message\r\n * @template TRes extends Message\r\n */\r\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\r\n\r\n if (!request)\r\n throw TypeError(\"request must be specified\");\r\n\r\n var self = this;\r\n if (!callback)\r\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\r\n\r\n if (!self.rpcImpl) {\r\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\r\n return undefined;\r\n }\r\n\r\n try {\r\n return self.rpcImpl(\r\n method,\r\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\r\n function rpcCallback(err, response) {\r\n\r\n if (err) {\r\n self.emit(\"error\", err, method);\r\n return callback(err);\r\n }\r\n\r\n if (response === null) {\r\n self.end(/* endedByRPC */ true);\r\n return undefined;\r\n }\r\n\r\n if (!(response instanceof responseCtor)) {\r\n try {\r\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\r\n } catch (err) {\r\n self.emit(\"error\", err, method);\r\n return callback(err);\r\n }\r\n }\r\n\r\n self.emit(\"data\", response, method);\r\n return callback(null, response);\r\n }\r\n );\r\n } catch (err) {\r\n self.emit(\"error\", err, method);\r\n setTimeout(function() { callback(err); }, 0);\r\n return undefined;\r\n }\r\n};\r\n\r\n/**\r\n * Ends this service and emits the `end` event.\r\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\r\n * @returns {rpc.Service} `this`\r\n */\r\nService.prototype.end = function end(endedByRPC) {\r\n if (this.rpcImpl) {\r\n if (!endedByRPC) // signal end to rpcImpl\r\n this.rpcImpl(null, null, null);\r\n this.rpcImpl = null;\r\n this.emit(\"end\").off();\r\n }\r\n return this;\r\n};\r\n","var root = require('./_root');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsFinite = root.isFinite;\n\n/**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\nfunction isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n}\n\nmodule.exports = isFinite;\n","var baseFlatten = require('./_baseFlatten');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\nfunction flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n}\n\nmodule.exports = flattenDeep;\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { getConfig } from '../config';\nimport KerasJS from 'keras-js';\nvar isNodeEnvironment = false;\ntry {\n isNodeEnvironment = Object.prototype.toString.call(global.process) === '[object process]';\n}\ncatch (e) { }\nvar modelPath = getConfig('MODEL_PATH') || '/dist/model.bin';\nvar model = new KerasJS.Model({\n filepath: isNodeEnvironment ? __dirname + '/model.bin' : modelPath,\n gpu: false,\n filesystem: isNodeEnvironment\n});\nexport class PatternDetectorInput extends IndicatorInput {\n constructor(values) {\n super();\n this.values = values;\n }\n}\nexport var AvailablePatterns;\n(function (AvailablePatterns) {\n AvailablePatterns[AvailablePatterns[\"TD\"] = 0] = \"TD\";\n AvailablePatterns[AvailablePatterns[\"IHS\"] = 1] = \"IHS\";\n AvailablePatterns[AvailablePatterns[\"HS\"] = 2] = \"HS\";\n AvailablePatterns[AvailablePatterns[\"TU\"] = 3] = \"TU\";\n AvailablePatterns[AvailablePatterns[\"DT\"] = 4] = \"DT\";\n AvailablePatterns[AvailablePatterns[\"DB\"] = 5] = \"DB\";\n})(AvailablePatterns || (AvailablePatterns = {}));\nfunction interpolateArray(data, fitCount) {\n var linearInterpolate = function (before, after, atPoint) {\n return before + (after - before) * atPoint;\n };\n var newData = new Array();\n var springFactor = new Number((data.length - 1) / (fitCount - 1));\n newData[0] = data[0]; // for new allocation\n for (var i = 1; i < fitCount - 1; i++) {\n var tmp = i * springFactor;\n var before = new Number(Math.floor(tmp)).toFixed();\n var after = new Number(Math.ceil(tmp)).toFixed();\n var atPoint = tmp - before;\n newData[i] = linearInterpolate(data[before], data[after], atPoint);\n }\n newData[fitCount - 1] = data[data.length - 1]; // for new allocation\n return newData;\n}\n;\nfunction l2Normalize(arr) {\n var sum = arr.reduce((cum, value) => { return cum + (value * value); }, 0);\n var norm = Math.sqrt(sum);\n return arr.map((v) => v / norm);\n}\nexport class PatternDetectorOutput {\n}\nexport function predictPattern(input) {\n return __awaiter(this, void 0, void 0, function* () {\n if (input.values.length < 200) {\n console.warn('Pattern detector requires atleast 250 data for a reliable prediction, received just ', input.values.length);\n }\n yield model.ready();\n Indicator.reverseInputs(input);\n var data = input.values;\n var closes = l2Normalize(interpolateArray(data, 400));\n let result = yield model.predict({\n input: new Float32Array(closes)\n });\n var index = result.output.indexOf(Math.max(...result.output));\n Indicator.reverseInputs(input);\n return {\n pattern: AvailablePatterns[index],\n patternId: index,\n probability: result.output[index] * 100\n };\n });\n}\nexport function hasDoubleBottom(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.DB && result.probability > 75);\n });\n}\nexport function hasDoubleTop(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.DT && result.probability > 75);\n });\n}\nexport function hasHeadAndShoulder(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.HS && result.probability > 75);\n });\n}\nexport function hasInverseHeadAndShoulder(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.IHS && result.probability > 75);\n });\n}\nexport function isTrendingUp(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.TU && result.probability > 75);\n });\n}\nexport function isTrendingDown(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.TD && result.probability > 75);\n });\n}\nexport class PatternDetector extends Indicator {\n}\nPatternDetector.predictPattern = predictPattern;\nPatternDetector.hasDoubleBottom = hasDoubleBottom;\nPatternDetector.hasDoubleTop = hasDoubleTop;\nPatternDetector.hasHeadAndShoulder = hasHeadAndShoulder;\nPatternDetector.hasInverseHeadAndShoulder = hasInverseHeadAndShoulder;\nPatternDetector.isTrendingUp = isTrendingUp;\nPatternDetector.isTrendingDown = isTrendingDown;\n","export * from './lib/index.js';\nexport function getAvailableIndicators () {\n let AvailableIndicators = []\n AvailableIndicators.push('sma');\n AvailableIndicators.push('ema');\n AvailableIndicators.push('wma');\n AvailableIndicators.push('wema');\n AvailableIndicators.push('macd');\n AvailableIndicators.push('rsi');\n AvailableIndicators.push('bollingerbands');\n AvailableIndicators.push('adx');\n AvailableIndicators.push('atr');\n AvailableIndicators.push('truerange');\n AvailableIndicators.push('roc');\n AvailableIndicators.push('kst');\n AvailableIndicators.push('psar');\n AvailableIndicators.push('stochastic');\n AvailableIndicators.push('williamsr');\n AvailableIndicators.push('adl');\n AvailableIndicators.push('obv');\n AvailableIndicators.push('trix');\n\n AvailableIndicators.push('cci');\n AvailableIndicators.push('awesomeoscillator');\n AvailableIndicators.push('forceindex');\n AvailableIndicators.push('vwap');\n AvailableIndicators.push('volumeprofile');\n AvailableIndicators.push('renko');\n AvailableIndicators.push('heikinashi');\n\n AvailableIndicators.push('stochasticrsi');\n AvailableIndicators.push('mfi');\n\n AvailableIndicators.push('averagegain');\n AvailableIndicators.push('averageloss');\n AvailableIndicators.push('highest');\n AvailableIndicators.push('lowest');\n AvailableIndicators.push('sum');\n AvailableIndicators.push('FixedSizeLinkedList');\n AvailableIndicators.push('sd');\n AvailableIndicators.push('bullish');\n AvailableIndicators.push('bearish');\n AvailableIndicators.push('abandonedbaby');\n AvailableIndicators.push('doji');\n AvailableIndicators.push('bearishengulfingpattern');\n AvailableIndicators.push('bullishengulfingpattern');\n AvailableIndicators.push('darkcloudcover');\n AvailableIndicators.push('downsidetasukigap');\n AvailableIndicators.push('dragonflydoji');\n AvailableIndicators.push('gravestonedoji');\n AvailableIndicators.push('bullishharami');\n AvailableIndicators.push('bearishharami');\n AvailableIndicators.push('bullishharamicross');\n AvailableIndicators.push('bearishharamicross');\n AvailableIndicators.push('eveningdojistar');\n AvailableIndicators.push('eveningstar');\n AvailableIndicators.push('morningdojistar');\n AvailableIndicators.push('morningstar');\n AvailableIndicators.push('bullishmarubozu');\n AvailableIndicators.push('bearishmarubozu');\n AvailableIndicators.push('piercingline');\n AvailableIndicators.push('bullishspinningtop');\n AvailableIndicators.push('bearishspinningtop');\n AvailableIndicators.push('threeblackcrows');\n AvailableIndicators.push('threewhitesoldiers');\n AvailableIndicators.push('bullishhammerstick');\n AvailableIndicators.push('bearishhammerstick');\n AvailableIndicators.push('bullishinvertedhammerstick');\n AvailableIndicators.push('bearishinvertedhammerstick');\n AvailableIndicators.push('hammerpattern');\n AvailableIndicators.push('hammerpatternunconfirmed');\n AvailableIndicators.push('hangingman');\n AvailableIndicators.push('hangingmanunconfirmed');\n AvailableIndicators.push('shootingstar');\n AvailableIndicators.push('shootingstarunconfirmed');\n AvailableIndicators.push('tweezertop');\n AvailableIndicators.push('tweezerbottom');\n\n AvailableIndicators.push('predictPattern');\n AvailableIndicators.push('hasDoubleBottom');\n AvailableIndicators.push('hasDoubleTop');\n AvailableIndicators.push('hasHeadAndShoulder');\n AvailableIndicators.push('hasInverseHeadAndShoulder');\n AvailableIndicators.push('isTrendingUp');\n AvailableIndicators.push('isTrendingDown');\n return AvailableIndicators;\n};\n\nlet AvailableIndicators = getAvailableIndicators();\nexport { AvailableIndicators }\n","'use strict';\n\nMath.sign = Math.sign || function (x) {\n x = +x; // convert to a number\n if (x === 0 || isNaN(x)) {\n return x;\n }\n return x > 0 ? 1 : -1;\n};\n\nmodule.exports = function rotg (a, b, csr) {\n // Based on Algorithm 4 from \"Discontinuous Plane\n // Rotations and the Symmetric Eigenvalue Problem\"\n // by Anderson, 2000.\n var c = 0;\n var s = 0;\n var r = 0;\n var t = 0;\n var u = 0;\n\n if (b === 0) {\n c = Math.sign(a);\n s = 0;\n r = Math.abs(a);\n } else if (a === 0) {\n c = 0;\n s = Math.sign(b);\n r = Math.abs(b);\n } else if (Math.abs(a) > Math.abs(b)) {\n t = b / a;\n u = Math.sign(a) * Math.sqrt(1 + t * t);\n c = 1 / u;\n s = t * c;\n r = a * u;\n } else {\n t = a / b;\n u = Math.sign(a) * Math.sqrt(1 + t * t);\n s = 1 / u;\n c = t * s;\n r = b * u;\n }\n // try to save some unnecessary object creation\n if (csr !== undefined && csr.length > 2) {\n csr[0] = c;\n csr[1] = s;\n csr[2] = r;\n } else {\n return [c, s, r];\n }\n};\n\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar activations = _interopRequireWildcard(require(\"../../activations\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar tensorUtils = _interopRequireWildcard(require(\"../../utils/tensorUtils\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _ndarrayGemm = _interopRequireDefault(require(\"ndarray-gemm\"));\n\nvar activationProgramSources = _interopRequireWildcard(require(\"../../activations/programSources\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\nconst mapInputFragmentsProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 inputSize = textureSize(x, 0);\\n ivec2 outputSize = textureSize(indexMap, 0);\\n int out_x = int(float(outputSize[0]) * outTex.x);\\n int out_y = int(float(outputSize[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n int fragmentIndex = int(floor(float(rowIndex) / float(inputSize[1])));\\n rowIndex = int(mod(float(rowIndex), float(inputSize[1])));\\n colIndex = fragmentIndex * inputCols + colIndex;\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\nconst matMulProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D A;\\nuniform sampler2D B;\\nuniform sampler2D C;\\nuniform bool addC;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 A_size = textureSize(A, 0);\\n ivec2 B_size = textureSize(B, 0);\\n int out_x = int(float(B_size[0]) * outTex.x);\\n int out_y = int(float(A_size[1]) * outTex.y);\\n int commonDim = A_size[0];\\n\\n float sum = 0.;\\n for (int i = 0; i < commonDim; ++i) {\\n float a = texelFetch(A, ivec2(i, out_y), 0).r;\\n float b = texelFetch(B, ivec2(out_x, i), 0).r;\\n sum += a * b;\\n }\\n\\n if (addC) {\\n sum += texelFetch(C, ivec2(out_x, 0), 0).r;\\n }\\n\\n outColor = vec4(sum);\\n}\\n\";\n\nclass Conv2D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Conv2D';\n const {\n filters = 1,\n kernel_size = [3, 3],\n strides = [1, 1],\n padding = 'valid',\n data_format = 'channels_last',\n dilation_rate = [1, 1],\n activation = 'linear',\n use_bias = true\n } = attrs;\n\n if (Array.isArray(kernel_size)) {\n this.kernelShape = [filters, ...kernel_size];\n } else {\n this.kernelShape = [filters, kernel_size, kernel_size];\n }\n\n if (Array.isArray(strides)) {\n this.strides = strides;\n } else {\n this.strides = [strides, strides];\n }\n\n if (padding === 'valid' || padding === 'same') {\n this.padding = padding;\n } else {\n this.throwError('Invalid padding.');\n }\n\n if (data_format === 'channels_last' || data_format === 'channels_first') {\n this.dataFormat = data_format;\n } else {\n this.throwError('Only channels_last and channels_first data formats are allowed.');\n }\n\n if (Array.isArray(dilation_rate)) {\n this.dilationRate = dilation_rate;\n } else {\n this.dilationRate = [dilation_rate, dilation_rate];\n }\n\n if ((this.dilationRate[0] !== 1 || this.dilationRate[1] !== 1) && (this.strides[0] !== 1 || this.strides[1] !== 1)) {\n this.throwError(`Incompatible combination of dilation_rate with strides.`);\n }\n\n this.activation = activation;\n this.activationFunc = activations[activation];\n this.useBias = use_bias;\n this.params = this.useBias ? ['kernel', 'bias'] : ['kernel'];\n this.description = `${this.kernelShape[0]} ${this.kernelShape.slice(1).join('x')} filters`;\n this.description += this.strides.some(s => s > 1) ? `, ${this.strides.join('x')} striding` : '';\n this.description += this.padding === 'valid' ? `, no border padding` : ', pad to same borders';\n this.description += this.dilationRate.some(r => r > 1) ? `, ${this.dilationRate.join('x')} dilation` : '';\n this.description += this.activation !== 'linear' ? `, ${this.activation} activation` : '';\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n this.mapInputFragmentsProgram = _WebGL.webgl2.compileProgram(mapInputFragmentsProgramSource);\n this.matMulProgram = _WebGL.webgl2.compileProgram(matMulProgramSource);\n this.activationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.activation]);\n }\n }\n\n setWeights(weightsArr) {\n if (this.dataFormat === 'channels_first') {\n weightsArr[0].tensor = weightsArr[0].tensor.transpose(2, 3, 1, 0);\n }\n\n super.setWeights(weightsArr, false);\n\n this._w2row();\n\n if (this.gpu) {\n this.weights['kernel'] = this.wRowsMat;\n this.weights['kernel'].createGLTexture({\n type: '2d',\n format: 'float'\n });\n\n if (this.useBias) {\n this.weights['bias'].createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _calcOutputShape(inputShape) {\n if (this.outputShape && this.inputPadding) {\n return;\n }\n\n const inputRows = inputShape[0];\n const inputCols = inputShape[1];\n const [nbFilter, nbRow, nbCol] = this.kernelShape;\n const nbRowDilated = nbRow + (nbRow - 1) * (this.dilationRate[0] - 1);\n const nbColDilated = nbCol + (nbCol - 1) * (this.dilationRate[1] - 1);\n const outputRows = this.padding === 'same' ? Math.floor((inputRows + this.strides[0] - 1) / this.strides[0]) : Math.floor((inputRows - nbRowDilated + this.strides[0]) / this.strides[0]);\n const outputCols = this.padding === 'same' ? Math.floor((inputCols + this.strides[1] - 1) / this.strides[1]) : Math.floor((inputCols - nbColDilated + this.strides[1]) / this.strides[1]);\n const outputChannels = nbFilter;\n const paddingRow = this.padding === 'same' ? Math.max(0, Math.floor((outputRows - 1) * this.strides[0] + nbRowDilated - inputRows)) : 0;\n const paddingCol = this.padding === 'same' ? Math.max(0, Math.floor((outputCols - 1) * this.strides[1] + nbColDilated - inputCols)) : 0;\n const paddingRowBefore = Math.floor(paddingRow / 2);\n const paddingRowAfter = paddingRow - paddingRowBefore;\n const paddingColBefore = Math.floor(paddingCol / 2);\n const paddingColAfter = paddingCol - paddingColBefore;\n this.outputShape = [outputRows, outputCols, outputChannels];\n this.inputPadding = [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter];\n }\n\n _padInput(x, padValue = 0) {\n if (this.padding === 'same') {\n const [inputRows, inputCols, inputChannels] = x.tensor.shape;\n const [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter] = this.inputPadding;\n const newRows = inputRows + paddingRowBefore + paddingRowAfter;\n const newCols = inputCols + paddingColBefore + paddingColAfter;\n\n const _x = new _Tensor.default([], [newRows, newCols, inputChannels]);\n\n if (padValue !== 0) {\n _ndarrayOps.default.assigns(_x.tensor, padValue);\n }\n\n _ndarrayOps.default.assign(_x.tensor.hi(inputRows + paddingRowBefore, inputCols + paddingColBefore, inputChannels).lo(paddingRowBefore, paddingColBefore, 0), x.tensor);\n\n return _x;\n }\n\n return x;\n }\n\n _im2col(x) {\n const [inputRows, inputCols, inputChannels] = x.tensor.shape;\n const nbRow = this.kernelShape[1];\n const nbCol = this.kernelShape[2];\n const outputRows = this.outputShape[0];\n const outputCols = this.outputShape[1];\n const nbPatches = outputRows * outputCols;\n const patchLen = nbRow * nbCol * inputChannels;\n const nbRowDilated = nbRow + (nbRow - 1) * (this.dilationRate[0] - 1);\n const nbColDilated = nbCol + (nbCol - 1) * (this.dilationRate[1] - 1);\n\n if (!this.imColsMat) {\n this.imColsMat = new _Tensor.default([], [nbPatches, patchLen]);\n }\n\n if (nbRowDilated === 1 && nbColDilated === 1 && this.strides[0] === 1 && this.strides[1] === 1) {\n this.imColsMat.replaceTensorData(x.tensor.data);\n return this.imColsMat;\n }\n\n const patch = new _Tensor.default([], [nbRow, nbCol, inputChannels]);\n let offset = 0;\n\n for (let i = 0, limit = inputRows - nbRowDilated; i <= limit; i += this.strides[0]) {\n for (let j = 0, limit = inputCols - nbColDilated; j <= limit; j += this.strides[1]) {\n _ndarrayOps.default.assign(patch.tensor, x.tensor.hi(i + nbRowDilated, j + nbColDilated, inputChannels).lo(i, j, 0).step(this.dilationRate[0], this.dilationRate[1], 1));\n\n this.imColsMat.tensor.data.set(patch.tensor.data, offset);\n offset += patchLen;\n }\n }\n\n return this.imColsMat;\n }\n\n _w2row() {\n const inputChannels = this.weights['kernel'].tensor.shape[2];\n const [nbFilter, nbRow, nbCol] = this.kernelShape;\n const patchLen = nbRow * nbCol * inputChannels;\n this.wRowsMat = new _Tensor.default([], [patchLen, nbFilter]);\n const patch = new _Tensor.default([], [nbRow, nbCol, inputChannels]);\n const patchRaveled = new _Tensor.default([], [patchLen]);\n\n for (let n = 0; n < nbFilter; n++) {\n _ndarrayOps.default.assign(patch.tensor, this.weights['kernel'].tensor.pick(null, null, null, n));\n\n patchRaveled.replaceTensorData(patch.tensor.data);\n\n _ndarrayOps.default.assign(this.wRowsMat.tensor.pick(null, n), patchRaveled.tensor);\n }\n\n return this.wRowsMat;\n }\n\n _callCPU(x) {\n this.inputShape = x.tensor.shape;\n\n this._calcOutputShape(this.inputShape);\n\n x = this._padInput(x);\n\n this._im2col(x);\n\n const nbFilter = this.kernelShape[0];\n const outputRows = this.outputShape[0];\n const outputCols = this.outputShape[1];\n const nbPatches = outputRows * outputCols;\n const matMul = new _Tensor.default([], [nbPatches, nbFilter]);\n\n if (this.useBias) {\n for (let n = 0; n < nbFilter; n++) {\n _ndarrayOps.default.assigns(matMul.tensor.pick(null, n), this.weights['bias'].tensor.get(n));\n }\n }\n\n (0, _ndarrayGemm.default)(matMul.tensor, this.imColsMat.tensor, this.wRowsMat.tensor, 1, 1);\n this.output = new _Tensor.default([], this.outputShape);\n let outputChannelRaveled = new _Tensor.default([], [outputRows * outputCols]);\n let outputChannel = new _Tensor.default([], [outputRows, outputCols]);\n\n for (let n = 0; n < nbFilter; n++) {\n _ndarrayOps.default.assign(outputChannelRaveled.tensor, matMul.tensor.pick(null, n));\n\n outputChannel.replaceTensorData(outputChannelRaveled.tensor.data);\n\n _ndarrayOps.default.assign(this.output.tensor.pick(null, null, n), outputChannel.tensor);\n }\n\n this.activationFunc(this.output);\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n\n _createIndexMap(indicesForReshaped) {\n if (this.indexMap) {\n return;\n }\n\n let [inputRows, inputCols, inputChannels] = this.inputShape;\n let indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n\n if (this.padding === 'same') {\n const [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter] = this.inputPadding;\n inputRows = inputRows + paddingRowBefore + paddingRowAfter;\n inputCols = inputCols + paddingColBefore + paddingColAfter;\n const padValue = -1;\n indices = this._padInput(indices, padValue);\n }\n\n const nbRow = this.kernelShape[1];\n const nbCol = this.kernelShape[2];\n const outputRows = this.outputShape[0];\n const outputCols = this.outputShape[1];\n const nbPatches = outputRows * outputCols;\n const patchLen = nbRow * nbCol * inputChannels;\n const nbRowDilated = nbRow + (nbRow - 1) * (this.dilationRate[0] - 1);\n const nbColDilated = nbCol + (nbCol - 1) * (this.dilationRate[1] - 1);\n this.indexMap = new _Tensor.default([], [nbPatches, patchLen], {\n type: Int32Array\n });\n const indicesPatch = new _Tensor.default([], [nbRow, nbCol, inputChannels]);\n let offset = 0;\n\n for (let i = 0, limit = inputRows - nbRowDilated; i <= limit; i += this.strides[0]) {\n for (let j = 0, limit = inputCols - nbColDilated; j <= limit; j += this.strides[1]) {\n _ndarrayOps.default.assign(indicesPatch.tensor, indices.tensor.hi(i + nbRowDilated, j + nbColDilated, inputChannels).lo(i, j, 0).step(this.dilationRate[0], this.dilationRate[1], 1));\n\n this.indexMap.tensor.data.set(indicesPatch.tensor.data, offset);\n offset += patchLen;\n }\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int',\n supportsTextureFragments: true\n });\n }\n\n _callGPU(x) {\n let outputTextureShape;\n\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n\n this._calcOutputShape(this.inputShape);\n\n this._createIndexMap(x.indicesForReshaped);\n\n outputTextureShape = [this.indexMap.glTextureShape[0], this.weights['kernel'].glTextureShape[1]];\n } else {\n this.inputShape = x.tensor.shape;\n\n this._calcOutputShape(this.inputShape);\n\n x = this._padInput(x);\n\n this._im2col(x);\n\n this.imColsMat.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n outputTextureShape = [this.imColsMat.glTextureShape[0], this.weights['kernel'].glTextureShape[1]];\n }\n\n if (this.activation !== 'linear' && !this.outputPreactiv) {\n this.outputPreactiv = new _Tensor.default([], outputTextureShape);\n this.outputPreactiv.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.outputPreactiv.is2DReshaped = true;\n this.outputPreactiv.originalShape = this.outputShape;\n this.outputPreactiv.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.outputShape, false, -1);\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], outputTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.output.is2DReshaped = true;\n this.output.originalShape = this.outputShape;\n this.output.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.outputShape, false, -1);\n }\n\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n const hasFragments = Boolean(x.glTextureFragments);\n\n if (hasFragments) {\n x.convert2DRowFragmentedGLTextureToColStack();\n }\n\n if (!this.convProgram) {\n const convProgramSource = (0, _createGLSLProgram.default)('conv2d', this.output.glTextureFragmentShape ? this.output.glTextureFragmentShape : this.output.glTextureShape, x.glTextureFragmentShape ? x.glTextureFragmentShape : x.glTextureShape, this.indexMap.glTextureFragmentShape ? this.indexMap.glTextureFragmentShape : this.indexMap.glTextureShape, this.useBias, hasFragments);\n this.convProgram = _WebGL.webgl2.compileProgram(convProgramSource);\n }\n\n _WebGL.webgl2.runProgram({\n program: this.convProgram,\n output: this.activation === 'linear' ? this.output : this.outputPreactiv,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }, {\n input: this.weights['kernel'],\n name: 'kernel'\n }, ...(this.useBias ? [{\n input: this.weights['bias'],\n name: 'bias'\n }] : [])],\n supportsTextureFragments: true\n });\n\n if (hasFragments) {\n x.removeGLTextureFragmentsAsColStack();\n }\n } else {\n const matMulInputs = [{\n input: this.imColsMat,\n name: 'A'\n }, {\n input: this.weights['kernel'],\n name: 'B'\n }];\n\n if (this.useBias) {\n matMulInputs.push({\n input: this.weights['bias'],\n name: 'C'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.activation === 'linear' ? this.output : this.outputPreactiv,\n inputs: matMulInputs,\n uniforms: [{\n value: this.useBias ? 1 : 0,\n type: 'bool',\n name: 'addC'\n }],\n supportsTextureFragments: true\n });\n }\n\n if (this.activation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.activationProgram,\n output: this.output,\n inputs: [{\n input: this.outputPreactiv,\n name: 'x'\n }],\n supportsTextureFragments: true\n });\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n this.output.reshapeFrom2D();\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n }\n\n}\n\nexports.default = Conv2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = softplus;\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst _softplus = (0, _cwise.default)({\n args: ['array'],\n body: function (_x) {\n _x = Math.log(Math.exp(_x) + 1);\n }\n});\n\nfunction softplus(x) {\n _softplus(x.tensor);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = elu;\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst _elu = (0, _cwise.default)({\n args: ['array', 'scalar'],\n body: function (_x, alpha) {\n _x = Math.max(_x, 0) + alpha * (Math.exp(Math.min(_x, 0)) - 1);\n }\n});\n\nfunction elu(x, opts = {}) {\n const {\n alpha = 1.0\n } = opts;\n\n _elu(x.tensor, alpha);\n}","/*\n Copyright (C) 2013 Ariya Hidayat \n Copyright (C) 2013 Thaddee Tyl \n Copyright (C) 2013 Mathias Bynens \n Copyright (C) 2012 Ariya Hidayat \n Copyright (C) 2012 Mathias Bynens \n Copyright (C) 2012 Joost-Wim Boekesteijn \n Copyright (C) 2012 Kris Kowal \n Copyright (C) 2012 Yusuke Suzuki \n Copyright (C) 2012 Arpad Borsos \n Copyright (C) 2011 Ariya Hidayat \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n/*jslint bitwise:true plusplus:true */\n/*global esprima:true, define:true, exports:true, window: true,\nthrowErrorTolerant: true,\nthrowError: true, generateStatement: true, peek: true,\nparseAssignmentExpression: true, parseBlock: true, parseExpression: true,\nparseFunctionDeclaration: true, parseFunctionExpression: true,\nparseFunctionSourceElements: true, parseVariableIdentifier: true,\nparseLeftHandSideExpression: true,\nparseUnaryExpression: true,\nparseStatement: true, parseSourceElement: true */\n\n(function (root, factory) {\n 'use strict';\n\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js,\n // Rhino, and plain browser loading.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define(['exports'], factory);\n } else if (typeof exports !== 'undefined') {\n factory(exports);\n } else {\n factory((root.esprima = {}));\n }\n}(this, function (exports) {\n 'use strict';\n\n var Token,\n TokenName,\n FnExprTokens,\n Syntax,\n PropertyKind,\n Messages,\n Regex,\n SyntaxTreeDelegate,\n source,\n strict,\n index,\n lineNumber,\n lineStart,\n length,\n delegate,\n lookahead,\n state,\n extra;\n\n Token = {\n BooleanLiteral: 1,\n EOF: 2,\n Identifier: 3,\n Keyword: 4,\n NullLiteral: 5,\n NumericLiteral: 6,\n Punctuator: 7,\n StringLiteral: 8,\n RegularExpression: 9\n };\n\n TokenName = {};\n TokenName[Token.BooleanLiteral] = 'Boolean';\n TokenName[Token.EOF] = '';\n TokenName[Token.Identifier] = 'Identifier';\n TokenName[Token.Keyword] = 'Keyword';\n TokenName[Token.NullLiteral] = 'Null';\n TokenName[Token.NumericLiteral] = 'Numeric';\n TokenName[Token.Punctuator] = 'Punctuator';\n TokenName[Token.StringLiteral] = 'String';\n TokenName[Token.RegularExpression] = 'RegularExpression';\n\n // A function following one of those tokens is an expression.\n FnExprTokens = ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new',\n 'return', 'case', 'delete', 'throw', 'void',\n // assignment operators\n '=', '+=', '-=', '*=', '/=', '%=', '<<=', '>>=', '>>>=',\n '&=', '|=', '^=', ',',\n // binary/unary operators\n '+', '-', '*', '/', '%', '++', '--', '<<', '>>', '>>>', '&',\n '|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=',\n '<=', '<', '>', '!=', '!=='];\n\n Syntax = {\n AssignmentExpression: 'AssignmentExpression',\n ArrayExpression: 'ArrayExpression',\n BlockStatement: 'BlockStatement',\n BinaryExpression: 'BinaryExpression',\n BreakStatement: 'BreakStatement',\n CallExpression: 'CallExpression',\n CatchClause: 'CatchClause',\n ConditionalExpression: 'ConditionalExpression',\n ContinueStatement: 'ContinueStatement',\n DoWhileStatement: 'DoWhileStatement',\n DebuggerStatement: 'DebuggerStatement',\n EmptyStatement: 'EmptyStatement',\n ExpressionStatement: 'ExpressionStatement',\n ForStatement: 'ForStatement',\n ForInStatement: 'ForInStatement',\n FunctionDeclaration: 'FunctionDeclaration',\n FunctionExpression: 'FunctionExpression',\n Identifier: 'Identifier',\n IfStatement: 'IfStatement',\n Literal: 'Literal',\n LabeledStatement: 'LabeledStatement',\n LogicalExpression: 'LogicalExpression',\n MemberExpression: 'MemberExpression',\n NewExpression: 'NewExpression',\n ObjectExpression: 'ObjectExpression',\n Program: 'Program',\n Property: 'Property',\n ReturnStatement: 'ReturnStatement',\n SequenceExpression: 'SequenceExpression',\n SwitchStatement: 'SwitchStatement',\n SwitchCase: 'SwitchCase',\n ThisExpression: 'ThisExpression',\n ThrowStatement: 'ThrowStatement',\n TryStatement: 'TryStatement',\n UnaryExpression: 'UnaryExpression',\n UpdateExpression: 'UpdateExpression',\n VariableDeclaration: 'VariableDeclaration',\n VariableDeclarator: 'VariableDeclarator',\n WhileStatement: 'WhileStatement',\n WithStatement: 'WithStatement'\n };\n\n PropertyKind = {\n Data: 1,\n Get: 2,\n Set: 4\n };\n\n // Error messages should be identical to V8.\n Messages = {\n UnexpectedToken: 'Unexpected token %0',\n UnexpectedNumber: 'Unexpected number',\n UnexpectedString: 'Unexpected string',\n UnexpectedIdentifier: 'Unexpected identifier',\n UnexpectedReserved: 'Unexpected reserved word',\n UnexpectedEOS: 'Unexpected end of input',\n NewlineAfterThrow: 'Illegal newline after throw',\n InvalidRegExp: 'Invalid regular expression',\n UnterminatedRegExp: 'Invalid regular expression: missing /',\n InvalidLHSInAssignment: 'Invalid left-hand side in assignment',\n InvalidLHSInForIn: 'Invalid left-hand side in for-in',\n MultipleDefaultsInSwitch: 'More than one default clause in switch statement',\n NoCatchOrFinally: 'Missing catch or finally after try',\n UnknownLabel: 'Undefined label \\'%0\\'',\n Redeclaration: '%0 \\'%1\\' has already been declared',\n IllegalContinue: 'Illegal continue statement',\n IllegalBreak: 'Illegal break statement',\n IllegalReturn: 'Illegal return statement',\n StrictModeWith: 'Strict mode code may not include a with statement',\n StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode',\n StrictVarName: 'Variable name may not be eval or arguments in strict mode',\n StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode',\n StrictParamDupe: 'Strict mode function may not have duplicate parameter names',\n StrictFunctionName: 'Function name may not be eval or arguments in strict mode',\n StrictOctalLiteral: 'Octal literals are not allowed in strict mode.',\n StrictDelete: 'Delete of an unqualified identifier in strict mode.',\n StrictDuplicateProperty: 'Duplicate data property in object literal not allowed in strict mode',\n AccessorDataProperty: 'Object literal may not have data and accessor property with the same name',\n AccessorGetSet: 'Object literal may not have multiple get/set accessors with the same name',\n StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode',\n StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode',\n StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode',\n StrictReservedWord: 'Use of future reserved word in strict mode'\n };\n\n // See also tools/generate-unicode-regex.py.\n Regex = {\n NonAsciiIdentifierStart: new RegExp('[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\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\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F0\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]'),\n NonAsciiIdentifierPart: new RegExp('[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0\\u08A2-\\u08AC\\u08E4-\\u08FE\\u0900-\\u0963\\u0966-\\u096F\\u0971-\\u0977\\u0979-\\u097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u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F0\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1D00-\\u1DE6\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA697\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A\\uAA7B\\uAA80-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE26\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]')\n };\n\n // Ensure the condition is true, otherwise throw an error.\n // This is only to have a better contract semantic, i.e. another safety net\n // to catch a logic error. The condition shall be fulfilled in normal case.\n // Do NOT use this to enforce a certain condition on any user input.\n\n function assert(condition, message) {\n /* istanbul ignore if */\n if (!condition) {\n throw new Error('ASSERT: ' + message);\n }\n }\n\n function isDecimalDigit(ch) {\n return (ch >= 48 && ch <= 57); // 0..9\n }\n\n function isHexDigit(ch) {\n return '0123456789abcdefABCDEF'.indexOf(ch) >= 0;\n }\n\n function isOctalDigit(ch) {\n return '01234567'.indexOf(ch) >= 0;\n }\n\n\n // 7.2 White Space\n\n function isWhiteSpace(ch) {\n return (ch === 0x20) || (ch === 0x09) || (ch === 0x0B) || (ch === 0x0C) || (ch === 0xA0) ||\n (ch >= 0x1680 && [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(ch) >= 0);\n }\n\n // 7.3 Line Terminators\n\n function isLineTerminator(ch) {\n return (ch === 0x0A) || (ch === 0x0D) || (ch === 0x2028) || (ch === 0x2029);\n }\n\n // 7.6 Identifier Names and Identifiers\n\n function isIdentifierStart(ch) {\n return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore)\n (ch >= 0x41 && ch <= 0x5A) || // A..Z\n (ch >= 0x61 && ch <= 0x7A) || // a..z\n (ch === 0x5C) || // \\ (backslash)\n ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch)));\n }\n\n function isIdentifierPart(ch) {\n return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore)\n (ch >= 0x41 && ch <= 0x5A) || // A..Z\n (ch >= 0x61 && ch <= 0x7A) || // a..z\n (ch >= 0x30 && ch <= 0x39) || // 0..9\n (ch === 0x5C) || // \\ (backslash)\n ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch)));\n }\n\n // 7.6.1.2 Future Reserved Words\n\n function isFutureReservedWord(id) {\n switch (id) {\n case 'class':\n case 'enum':\n case 'export':\n case 'extends':\n case 'import':\n case 'super':\n return true;\n default:\n return false;\n }\n }\n\n function isStrictModeReservedWord(id) {\n switch (id) {\n case 'implements':\n case 'interface':\n case 'package':\n case 'private':\n case 'protected':\n case 'public':\n case 'static':\n case 'yield':\n case 'let':\n return true;\n default:\n return false;\n }\n }\n\n function isRestrictedWord(id) {\n return id === 'eval' || id === 'arguments';\n }\n\n // 7.6.1.1 Keywords\n\n function isKeyword(id) {\n if (strict && isStrictModeReservedWord(id)) {\n return true;\n }\n\n // 'const' is specialized as Keyword in V8.\n // 'yield' and 'let' are for compatiblity with SpiderMonkey and ES.next.\n // Some others are from future reserved words.\n\n switch (id.length) {\n case 2:\n return (id === 'if') || (id === 'in') || (id === 'do');\n case 3:\n return (id === 'var') || (id === 'for') || (id === 'new') ||\n (id === 'try') || (id === 'let');\n case 4:\n return (id === 'this') || (id === 'else') || (id === 'case') ||\n (id === 'void') || (id === 'with') || (id === 'enum');\n case 5:\n return (id === 'while') || (id === 'break') || (id === 'catch') ||\n (id === 'throw') || (id === 'const') || (id === 'yield') ||\n (id === 'class') || (id === 'super');\n case 6:\n return (id === 'return') || (id === 'typeof') || (id === 'delete') ||\n (id === 'switch') || (id === 'export') || (id === 'import');\n case 7:\n return (id === 'default') || (id === 'finally') || (id === 'extends');\n case 8:\n return (id === 'function') || (id === 'continue') || (id === 'debugger');\n case 10:\n return (id === 'instanceof');\n default:\n return false;\n }\n }\n\n // 7.4 Comments\n\n function addComment(type, value, start, end, loc) {\n var comment, attacher;\n\n assert(typeof start === 'number', 'Comment must have valid position');\n\n // Because the way the actual token is scanned, often the comments\n // (if any) are skipped twice during the lexical analysis.\n // Thus, we need to skip adding a comment if the comment array already\n // handled it.\n if (state.lastCommentStart >= start) {\n return;\n }\n state.lastCommentStart = start;\n\n comment = {\n type: type,\n value: value\n };\n if (extra.range) {\n comment.range = [start, end];\n }\n if (extra.loc) {\n comment.loc = loc;\n }\n extra.comments.push(comment);\n if (extra.attachComment) {\n extra.leadingComments.push(comment);\n extra.trailingComments.push(comment);\n }\n }\n\n function skipSingleLineComment(offset) {\n var start, loc, ch, comment;\n\n start = index - offset;\n loc = {\n start: {\n line: lineNumber,\n column: index - lineStart - offset\n }\n };\n\n while (index < length) {\n ch = source.charCodeAt(index);\n ++index;\n if (isLineTerminator(ch)) {\n if (extra.comments) {\n comment = source.slice(start + offset, index - 1);\n loc.end = {\n line: lineNumber,\n column: index - lineStart - 1\n };\n addComment('Line', comment, start, index - 1, loc);\n }\n if (ch === 13 && source.charCodeAt(index) === 10) {\n ++index;\n }\n ++lineNumber;\n lineStart = index;\n return;\n }\n }\n\n if (extra.comments) {\n comment = source.slice(start + offset, index);\n loc.end = {\n line: lineNumber,\n column: index - lineStart\n };\n addComment('Line', comment, start, index, loc);\n }\n }\n\n function skipMultiLineComment() {\n var start, loc, ch, comment;\n\n if (extra.comments) {\n start = index - 2;\n loc = {\n start: {\n line: lineNumber,\n column: index - lineStart - 2\n }\n };\n }\n\n while (index < length) {\n ch = source.charCodeAt(index);\n if (isLineTerminator(ch)) {\n if (ch === 0x0D && source.charCodeAt(index + 1) === 0x0A) {\n ++index;\n }\n ++lineNumber;\n ++index;\n lineStart = index;\n if (index >= length) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n } else if (ch === 0x2A) {\n // Block comment ends with '*/'.\n if (source.charCodeAt(index + 1) === 0x2F) {\n ++index;\n ++index;\n if (extra.comments) {\n comment = source.slice(start + 2, index - 2);\n loc.end = {\n line: lineNumber,\n column: index - lineStart\n };\n addComment('Block', comment, start, index, loc);\n }\n return;\n }\n ++index;\n } else {\n ++index;\n }\n }\n\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n function skipComment() {\n var ch, start;\n\n start = (index === 0);\n while (index < length) {\n ch = source.charCodeAt(index);\n\n if (isWhiteSpace(ch)) {\n ++index;\n } else if (isLineTerminator(ch)) {\n ++index;\n if (ch === 0x0D && source.charCodeAt(index) === 0x0A) {\n ++index;\n }\n ++lineNumber;\n lineStart = index;\n start = true;\n } else if (ch === 0x2F) { // U+002F is '/'\n ch = source.charCodeAt(index + 1);\n if (ch === 0x2F) {\n ++index;\n ++index;\n skipSingleLineComment(2);\n start = true;\n } else if (ch === 0x2A) { // U+002A is '*'\n ++index;\n ++index;\n skipMultiLineComment();\n } else {\n break;\n }\n } else if (start && ch === 0x2D) { // U+002D is '-'\n // U+003E is '>'\n if ((source.charCodeAt(index + 1) === 0x2D) && (source.charCodeAt(index + 2) === 0x3E)) {\n // '-->' is a single-line comment\n index += 3;\n skipSingleLineComment(3);\n } else {\n break;\n }\n } else if (ch === 0x3C) { // U+003C is '<'\n if (source.slice(index + 1, index + 4) === '!--') {\n ++index; // `<`\n ++index; // `!`\n ++index; // `-`\n ++index; // `-`\n skipSingleLineComment(4);\n } else {\n break;\n }\n } else {\n break;\n }\n }\n }\n\n function scanHexEscape(prefix) {\n var i, len, ch, code = 0;\n\n len = (prefix === 'u') ? 4 : 2;\n for (i = 0; i < len; ++i) {\n if (index < length && isHexDigit(source[index])) {\n ch = source[index++];\n code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase());\n } else {\n return '';\n }\n }\n return String.fromCharCode(code);\n }\n\n function getEscapedIdentifier() {\n var ch, id;\n\n ch = source.charCodeAt(index++);\n id = String.fromCharCode(ch);\n\n // '\\u' (U+005C, U+0075) denotes an escaped character.\n if (ch === 0x5C) {\n if (source.charCodeAt(index) !== 0x75) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n ++index;\n ch = scanHexEscape('u');\n if (!ch || ch === '\\\\' || !isIdentifierStart(ch.charCodeAt(0))) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n id = ch;\n }\n\n while (index < length) {\n ch = source.charCodeAt(index);\n if (!isIdentifierPart(ch)) {\n break;\n }\n ++index;\n id += String.fromCharCode(ch);\n\n // '\\u' (U+005C, U+0075) denotes an escaped character.\n if (ch === 0x5C) {\n id = id.substr(0, id.length - 1);\n if (source.charCodeAt(index) !== 0x75) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n ++index;\n ch = scanHexEscape('u');\n if (!ch || ch === '\\\\' || !isIdentifierPart(ch.charCodeAt(0))) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n id += ch;\n }\n }\n\n return id;\n }\n\n function getIdentifier() {\n var start, ch;\n\n start = index++;\n while (index < length) {\n ch = source.charCodeAt(index);\n if (ch === 0x5C) {\n // Blackslash (U+005C) marks Unicode escape sequence.\n index = start;\n return getEscapedIdentifier();\n }\n if (isIdentifierPart(ch)) {\n ++index;\n } else {\n break;\n }\n }\n\n return source.slice(start, index);\n }\n\n function scanIdentifier() {\n var start, id, type;\n\n start = index;\n\n // Backslash (U+005C) starts an escaped character.\n id = (source.charCodeAt(index) === 0x5C) ? getEscapedIdentifier() : getIdentifier();\n\n // There is no keyword or literal with only one character.\n // Thus, it must be an identifier.\n if (id.length === 1) {\n type = Token.Identifier;\n } else if (isKeyword(id)) {\n type = Token.Keyword;\n } else if (id === 'null') {\n type = Token.NullLiteral;\n } else if (id === 'true' || id === 'false') {\n type = Token.BooleanLiteral;\n } else {\n type = Token.Identifier;\n }\n\n return {\n type: type,\n value: id,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n\n // 7.7 Punctuators\n\n function scanPunctuator() {\n var start = index,\n code = source.charCodeAt(index),\n code2,\n ch1 = source[index],\n ch2,\n ch3,\n ch4;\n\n switch (code) {\n\n // Check for most common single-character punctuators.\n case 0x2E: // . dot\n case 0x28: // ( open bracket\n case 0x29: // ) close bracket\n case 0x3B: // ; semicolon\n case 0x2C: // , comma\n case 0x7B: // { open curly brace\n case 0x7D: // } close curly brace\n case 0x5B: // [\n case 0x5D: // ]\n case 0x3A: // :\n case 0x3F: // ?\n case 0x7E: // ~\n ++index;\n if (extra.tokenize) {\n if (code === 0x28) {\n extra.openParenToken = extra.tokens.length;\n } else if (code === 0x7B) {\n extra.openCurlyToken = extra.tokens.length;\n }\n }\n return {\n type: Token.Punctuator,\n value: String.fromCharCode(code),\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n\n default:\n code2 = source.charCodeAt(index + 1);\n\n // '=' (U+003D) marks an assignment or comparison operator.\n if (code2 === 0x3D) {\n switch (code) {\n case 0x2B: // +\n case 0x2D: // -\n case 0x2F: // /\n case 0x3C: // <\n case 0x3E: // >\n case 0x5E: // ^\n case 0x7C: // |\n case 0x25: // %\n case 0x26: // &\n case 0x2A: // *\n index += 2;\n return {\n type: Token.Punctuator,\n value: String.fromCharCode(code) + String.fromCharCode(code2),\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n\n case 0x21: // !\n case 0x3D: // =\n index += 2;\n\n // !== and ===\n if (source.charCodeAt(index) === 0x3D) {\n ++index;\n }\n return {\n type: Token.Punctuator,\n value: source.slice(start, index),\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n }\n }\n\n // 4-character punctuator: >>>=\n\n ch4 = source.substr(index, 4);\n\n if (ch4 === '>>>=') {\n index += 4;\n return {\n type: Token.Punctuator,\n value: ch4,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n // 3-character punctuators: === !== >>> <<= >>=\n\n ch3 = ch4.substr(0, 3);\n\n if (ch3 === '>>>' || ch3 === '<<=' || ch3 === '>>=') {\n index += 3;\n return {\n type: Token.Punctuator,\n value: ch3,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n // Other 2-character punctuators: ++ -- << >> && ||\n ch2 = ch3.substr(0, 2);\n\n if ((ch1 === ch2[1] && ('+-<>&|'.indexOf(ch1) >= 0)) || ch2 === '=>') {\n index += 2;\n return {\n type: Token.Punctuator,\n value: ch2,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n // 1-character punctuators: < > = ! + - * % & | ^ /\n if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) {\n ++index;\n return {\n type: Token.Punctuator,\n value: ch1,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n // 7.8.3 Numeric Literals\n\n function scanHexLiteral(start) {\n var number = '';\n\n while (index < length) {\n if (!isHexDigit(source[index])) {\n break;\n }\n number += source[index++];\n }\n\n if (number.length === 0) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n if (isIdentifierStart(source.charCodeAt(index))) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n return {\n type: Token.NumericLiteral,\n value: parseInt('0x' + number, 16),\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n function scanOctalLiteral(start) {\n var number = '0' + source[index++];\n while (index < length) {\n if (!isOctalDigit(source[index])) {\n break;\n }\n number += source[index++];\n }\n\n if (isIdentifierStart(source.charCodeAt(index)) || isDecimalDigit(source.charCodeAt(index))) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n return {\n type: Token.NumericLiteral,\n value: parseInt(number, 8),\n octal: true,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n function isImplicitOctalLiteral() {\n var i, ch;\n\n // Implicit octal, unless there is a non-octal digit.\n // (Annex B.1.1 on Numeric Literals)\n for (i = index + 1; i < length; ++i) {\n ch = source[i];\n if (ch === '8' || ch === '9') {\n return false;\n }\n if (!isOctalDigit(ch)) {\n return true;\n }\n }\n\n return true;\n }\n\n function scanNumericLiteral() {\n var number, start, ch;\n\n ch = source[index];\n assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'),\n 'Numeric literal must start with a decimal digit or a decimal point');\n\n start = index;\n number = '';\n if (ch !== '.') {\n number = source[index++];\n ch = source[index];\n\n // Hex number starts with '0x'.\n // Octal number starts with '0'.\n if (number === '0') {\n if (ch === 'x' || ch === 'X') {\n ++index;\n return scanHexLiteral(start);\n }\n if (isOctalDigit(ch)) {\n if (isImplicitOctalLiteral()) {\n return scanOctalLiteral(start);\n }\n }\n }\n\n while (isDecimalDigit(source.charCodeAt(index))) {\n number += source[index++];\n }\n ch = source[index];\n }\n\n if (ch === '.') {\n number += source[index++];\n while (isDecimalDigit(source.charCodeAt(index))) {\n number += source[index++];\n }\n ch = source[index];\n }\n\n if (ch === 'e' || ch === 'E') {\n number += source[index++];\n\n ch = source[index];\n if (ch === '+' || ch === '-') {\n number += source[index++];\n }\n if (isDecimalDigit(source.charCodeAt(index))) {\n while (isDecimalDigit(source.charCodeAt(index))) {\n number += source[index++];\n }\n } else {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n }\n\n if (isIdentifierStart(source.charCodeAt(index))) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n return {\n type: Token.NumericLiteral,\n value: parseFloat(number),\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n // 7.8.4 String Literals\n\n function scanStringLiteral() {\n var str = '', quote, start, ch, code, unescaped, restore, octal = false, startLineNumber, startLineStart;\n startLineNumber = lineNumber;\n startLineStart = lineStart;\n\n quote = source[index];\n assert((quote === '\\'' || quote === '\"'),\n 'String literal must starts with a quote');\n\n start = index;\n ++index;\n\n while (index < length) {\n ch = source[index++];\n\n if (ch === quote) {\n quote = '';\n break;\n } else if (ch === '\\\\') {\n ch = source[index++];\n if (!ch || !isLineTerminator(ch.charCodeAt(0))) {\n switch (ch) {\n case 'u':\n case 'x':\n restore = index;\n unescaped = scanHexEscape(ch);\n if (unescaped) {\n str += unescaped;\n } else {\n index = restore;\n str += ch;\n }\n break;\n case 'n':\n str += '\\n';\n break;\n case 'r':\n str += '\\r';\n break;\n case 't':\n str += '\\t';\n break;\n case 'b':\n str += '\\b';\n break;\n case 'f':\n str += '\\f';\n break;\n case 'v':\n str += '\\x0B';\n break;\n\n default:\n if (isOctalDigit(ch)) {\n code = '01234567'.indexOf(ch);\n\n // \\0 is not octal escape sequence\n if (code !== 0) {\n octal = true;\n }\n\n if (index < length && isOctalDigit(source[index])) {\n octal = true;\n code = code * 8 + '01234567'.indexOf(source[index++]);\n\n // 3 digits are only allowed when string starts\n // with 0, 1, 2, 3\n if ('0123'.indexOf(ch) >= 0 &&\n index < length &&\n isOctalDigit(source[index])) {\n code = code * 8 + '01234567'.indexOf(source[index++]);\n }\n }\n str += String.fromCharCode(code);\n } else {\n str += ch;\n }\n break;\n }\n } else {\n ++lineNumber;\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n lineStart = index;\n }\n } else if (isLineTerminator(ch.charCodeAt(0))) {\n break;\n } else {\n str += ch;\n }\n }\n\n if (quote !== '') {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n return {\n type: Token.StringLiteral,\n value: str,\n octal: octal,\n startLineNumber: startLineNumber,\n startLineStart: startLineStart,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n function testRegExp(pattern, flags) {\n var value;\n try {\n value = new RegExp(pattern, flags);\n } catch (e) {\n throwError({}, Messages.InvalidRegExp);\n }\n return value;\n }\n\n function scanRegExpBody() {\n var ch, str, classMarker, terminated, body;\n\n ch = source[index];\n assert(ch === '/', 'Regular expression literal must start with a slash');\n str = source[index++];\n\n classMarker = false;\n terminated = false;\n while (index < length) {\n ch = source[index++];\n str += ch;\n if (ch === '\\\\') {\n ch = source[index++];\n // ECMA-262 7.8.5\n if (isLineTerminator(ch.charCodeAt(0))) {\n throwError({}, Messages.UnterminatedRegExp);\n }\n str += ch;\n } else if (isLineTerminator(ch.charCodeAt(0))) {\n throwError({}, Messages.UnterminatedRegExp);\n } else if (classMarker) {\n if (ch === ']') {\n classMarker = false;\n }\n } else {\n if (ch === '/') {\n terminated = true;\n break;\n } else if (ch === '[') {\n classMarker = true;\n }\n }\n }\n\n if (!terminated) {\n throwError({}, Messages.UnterminatedRegExp);\n }\n\n // Exclude leading and trailing slash.\n body = str.substr(1, str.length - 2);\n return {\n value: body,\n literal: str\n };\n }\n\n function scanRegExpFlags() {\n var ch, str, flags, restore;\n\n str = '';\n flags = '';\n while (index < length) {\n ch = source[index];\n if (!isIdentifierPart(ch.charCodeAt(0))) {\n break;\n }\n\n ++index;\n if (ch === '\\\\' && index < length) {\n ch = source[index];\n if (ch === 'u') {\n ++index;\n restore = index;\n ch = scanHexEscape('u');\n if (ch) {\n flags += ch;\n for (str += '\\\\u'; restore < index; ++restore) {\n str += source[restore];\n }\n } else {\n index = restore;\n flags += 'u';\n str += '\\\\u';\n }\n throwErrorTolerant({}, Messages.UnexpectedToken, 'ILLEGAL');\n } else {\n str += '\\\\';\n throwErrorTolerant({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n } else {\n flags += ch;\n str += ch;\n }\n }\n\n return {\n value: flags,\n literal: str\n };\n }\n\n function scanRegExp() {\n var start, body, flags, pattern, value;\n\n lookahead = null;\n skipComment();\n start = index;\n\n body = scanRegExpBody();\n flags = scanRegExpFlags();\n value = testRegExp(body.value, flags.value);\n\n if (extra.tokenize) {\n return {\n type: Token.RegularExpression,\n value: value,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n return {\n literal: body.literal + flags.literal,\n value: value,\n start: start,\n end: index\n };\n }\n\n function collectRegex() {\n var pos, loc, regex, token;\n\n skipComment();\n\n pos = index;\n loc = {\n start: {\n line: lineNumber,\n column: index - lineStart\n }\n };\n\n regex = scanRegExp();\n loc.end = {\n line: lineNumber,\n column: index - lineStart\n };\n\n /* istanbul ignore next */\n if (!extra.tokenize) {\n // Pop the previous token, which is likely '/' or '/='\n if (extra.tokens.length > 0) {\n token = extra.tokens[extra.tokens.length - 1];\n if (token.range[0] === pos && token.type === 'Punctuator') {\n if (token.value === '/' || token.value === '/=') {\n extra.tokens.pop();\n }\n }\n }\n\n extra.tokens.push({\n type: 'RegularExpression',\n value: regex.literal,\n range: [pos, index],\n loc: loc\n });\n }\n\n return regex;\n }\n\n function isIdentifierName(token) {\n return token.type === Token.Identifier ||\n token.type === Token.Keyword ||\n token.type === Token.BooleanLiteral ||\n token.type === Token.NullLiteral;\n }\n\n function advanceSlash() {\n var prevToken,\n checkToken;\n // Using the following algorithm:\n // https://github.com/mozilla/sweet.js/wiki/design\n prevToken = extra.tokens[extra.tokens.length - 1];\n if (!prevToken) {\n // Nothing before that: it cannot be a division.\n return collectRegex();\n }\n if (prevToken.type === 'Punctuator') {\n if (prevToken.value === ']') {\n return scanPunctuator();\n }\n if (prevToken.value === ')') {\n checkToken = extra.tokens[extra.openParenToken - 1];\n if (checkToken &&\n checkToken.type === 'Keyword' &&\n (checkToken.value === 'if' ||\n checkToken.value === 'while' ||\n checkToken.value === 'for' ||\n checkToken.value === 'with')) {\n return collectRegex();\n }\n return scanPunctuator();\n }\n if (prevToken.value === '}') {\n // Dividing a function by anything makes little sense,\n // but we have to check for that.\n if (extra.tokens[extra.openCurlyToken - 3] &&\n extra.tokens[extra.openCurlyToken - 3].type === 'Keyword') {\n // Anonymous function.\n checkToken = extra.tokens[extra.openCurlyToken - 4];\n if (!checkToken) {\n return scanPunctuator();\n }\n } else if (extra.tokens[extra.openCurlyToken - 4] &&\n extra.tokens[extra.openCurlyToken - 4].type === 'Keyword') {\n // Named function.\n checkToken = extra.tokens[extra.openCurlyToken - 5];\n if (!checkToken) {\n return collectRegex();\n }\n } else {\n return scanPunctuator();\n }\n // checkToken determines whether the function is\n // a declaration or an expression.\n if (FnExprTokens.indexOf(checkToken.value) >= 0) {\n // It is an expression.\n return scanPunctuator();\n }\n // It is a declaration.\n return collectRegex();\n }\n return collectRegex();\n }\n if (prevToken.type === 'Keyword' && prevToken.value !== 'this') {\n return collectRegex();\n }\n return scanPunctuator();\n }\n\n function advance() {\n var ch;\n\n skipComment();\n\n if (index >= length) {\n return {\n type: Token.EOF,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: index,\n end: index\n };\n }\n\n ch = source.charCodeAt(index);\n\n if (isIdentifierStart(ch)) {\n return scanIdentifier();\n }\n\n // Very common: ( and ) and ;\n if (ch === 0x28 || ch === 0x29 || ch === 0x3B) {\n return scanPunctuator();\n }\n\n // String literal starts with single quote (U+0027) or double quote (U+0022).\n if (ch === 0x27 || ch === 0x22) {\n return scanStringLiteral();\n }\n\n\n // Dot (.) U+002E can also start a floating-point number, hence the need\n // to check the next character.\n if (ch === 0x2E) {\n if (isDecimalDigit(source.charCodeAt(index + 1))) {\n return scanNumericLiteral();\n }\n return scanPunctuator();\n }\n\n if (isDecimalDigit(ch)) {\n return scanNumericLiteral();\n }\n\n // Slash (/) U+002F can also start a regex.\n if (extra.tokenize && ch === 0x2F) {\n return advanceSlash();\n }\n\n return scanPunctuator();\n }\n\n function collectToken() {\n var loc, token, range, value;\n\n skipComment();\n loc = {\n start: {\n line: lineNumber,\n column: index - lineStart\n }\n };\n\n token = advance();\n loc.end = {\n line: lineNumber,\n column: index - lineStart\n };\n\n if (token.type !== Token.EOF) {\n value = source.slice(token.start, token.end);\n extra.tokens.push({\n type: TokenName[token.type],\n value: value,\n range: [token.start, token.end],\n loc: loc\n });\n }\n\n return token;\n }\n\n function lex() {\n var token;\n\n token = lookahead;\n index = token.end;\n lineNumber = token.lineNumber;\n lineStart = token.lineStart;\n\n lookahead = (typeof extra.tokens !== 'undefined') ? collectToken() : advance();\n\n index = token.end;\n lineNumber = token.lineNumber;\n lineStart = token.lineStart;\n\n return token;\n }\n\n function peek() {\n var pos, line, start;\n\n pos = index;\n line = lineNumber;\n start = lineStart;\n lookahead = (typeof extra.tokens !== 'undefined') ? collectToken() : advance();\n index = pos;\n lineNumber = line;\n lineStart = start;\n }\n\n function Position(line, column) {\n this.line = line;\n this.column = column;\n }\n\n function SourceLocation(startLine, startColumn, line, column) {\n this.start = new Position(startLine, startColumn);\n this.end = new Position(line, column);\n }\n\n SyntaxTreeDelegate = {\n\n name: 'SyntaxTree',\n\n processComment: function (node) {\n var lastChild, trailingComments;\n\n if (node.type === Syntax.Program) {\n if (node.body.length > 0) {\n return;\n }\n }\n\n if (extra.trailingComments.length > 0) {\n if (extra.trailingComments[0].range[0] >= node.range[1]) {\n trailingComments = extra.trailingComments;\n extra.trailingComments = [];\n } else {\n extra.trailingComments.length = 0;\n }\n } else {\n if (extra.bottomRightStack.length > 0 &&\n extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments &&\n extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments[0].range[0] >= node.range[1]) {\n trailingComments = extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments;\n delete extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments;\n }\n }\n\n // Eating the stack.\n while (extra.bottomRightStack.length > 0 && extra.bottomRightStack[extra.bottomRightStack.length - 1].range[0] >= node.range[0]) {\n lastChild = extra.bottomRightStack.pop();\n }\n\n if (lastChild) {\n if (lastChild.leadingComments && lastChild.leadingComments[lastChild.leadingComments.length - 1].range[1] <= node.range[0]) {\n node.leadingComments = lastChild.leadingComments;\n delete lastChild.leadingComments;\n }\n } else if (extra.leadingComments.length > 0 && extra.leadingComments[extra.leadingComments.length - 1].range[1] <= node.range[0]) {\n node.leadingComments = extra.leadingComments;\n extra.leadingComments = [];\n }\n\n\n if (trailingComments) {\n node.trailingComments = trailingComments;\n }\n\n extra.bottomRightStack.push(node);\n },\n\n markEnd: function (node, startToken) {\n if (extra.range) {\n node.range = [startToken.start, index];\n }\n if (extra.loc) {\n node.loc = new SourceLocation(\n startToken.startLineNumber === undefined ? startToken.lineNumber : startToken.startLineNumber,\n startToken.start - (startToken.startLineStart === undefined ? startToken.lineStart : startToken.startLineStart),\n lineNumber,\n index - lineStart\n );\n this.postProcess(node);\n }\n\n if (extra.attachComment) {\n this.processComment(node);\n }\n return node;\n },\n\n postProcess: function (node) {\n if (extra.source) {\n node.loc.source = extra.source;\n }\n return node;\n },\n\n createArrayExpression: function (elements) {\n return {\n type: Syntax.ArrayExpression,\n elements: elements\n };\n },\n\n createAssignmentExpression: function (operator, left, right) {\n return {\n type: Syntax.AssignmentExpression,\n operator: operator,\n left: left,\n right: right\n };\n },\n\n createBinaryExpression: function (operator, left, right) {\n var type = (operator === '||' || operator === '&&') ? Syntax.LogicalExpression :\n Syntax.BinaryExpression;\n return {\n type: type,\n operator: operator,\n left: left,\n right: right\n };\n },\n\n createBlockStatement: function (body) {\n return {\n type: Syntax.BlockStatement,\n body: body\n };\n },\n\n createBreakStatement: function (label) {\n return {\n type: Syntax.BreakStatement,\n label: label\n };\n },\n\n createCallExpression: function (callee, args) {\n return {\n type: Syntax.CallExpression,\n callee: callee,\n 'arguments': args\n };\n },\n\n createCatchClause: function (param, body) {\n return {\n type: Syntax.CatchClause,\n param: param,\n body: body\n };\n },\n\n createConditionalExpression: function (test, consequent, alternate) {\n return {\n type: Syntax.ConditionalExpression,\n test: test,\n consequent: consequent,\n alternate: alternate\n };\n },\n\n createContinueStatement: function (label) {\n return {\n type: Syntax.ContinueStatement,\n label: label\n };\n },\n\n createDebuggerStatement: function () {\n return {\n type: Syntax.DebuggerStatement\n };\n },\n\n createDoWhileStatement: function (body, test) {\n return {\n type: Syntax.DoWhileStatement,\n body: body,\n test: test\n };\n },\n\n createEmptyStatement: function () {\n return {\n type: Syntax.EmptyStatement\n };\n },\n\n createExpressionStatement: function (expression) {\n return {\n type: Syntax.ExpressionStatement,\n expression: expression\n };\n },\n\n createForStatement: function (init, test, update, body) {\n return {\n type: Syntax.ForStatement,\n init: init,\n test: test,\n update: update,\n body: body\n };\n },\n\n createForInStatement: function (left, right, body) {\n return {\n type: Syntax.ForInStatement,\n left: left,\n right: right,\n body: body,\n each: false\n };\n },\n\n createFunctionDeclaration: function (id, params, defaults, body) {\n return {\n type: Syntax.FunctionDeclaration,\n id: id,\n params: params,\n defaults: defaults,\n body: body,\n rest: null,\n generator: false,\n expression: false\n };\n },\n\n createFunctionExpression: function (id, params, defaults, body) {\n return {\n type: Syntax.FunctionExpression,\n id: id,\n params: params,\n defaults: defaults,\n body: body,\n rest: null,\n generator: false,\n expression: false\n };\n },\n\n createIdentifier: function (name) {\n return {\n type: Syntax.Identifier,\n name: name\n };\n },\n\n createIfStatement: function (test, consequent, alternate) {\n return {\n type: Syntax.IfStatement,\n test: test,\n consequent: consequent,\n alternate: alternate\n };\n },\n\n createLabeledStatement: function (label, body) {\n return {\n type: Syntax.LabeledStatement,\n label: label,\n body: body\n };\n },\n\n createLiteral: function (token) {\n return {\n type: Syntax.Literal,\n value: token.value,\n raw: source.slice(token.start, token.end)\n };\n },\n\n createMemberExpression: function (accessor, object, property) {\n return {\n type: Syntax.MemberExpression,\n computed: accessor === '[',\n object: object,\n property: property\n };\n },\n\n createNewExpression: function (callee, args) {\n return {\n type: Syntax.NewExpression,\n callee: callee,\n 'arguments': args\n };\n },\n\n createObjectExpression: function (properties) {\n return {\n type: Syntax.ObjectExpression,\n properties: properties\n };\n },\n\n createPostfixExpression: function (operator, argument) {\n return {\n type: Syntax.UpdateExpression,\n operator: operator,\n argument: argument,\n prefix: false\n };\n },\n\n createProgram: function (body) {\n return {\n type: Syntax.Program,\n body: body\n };\n },\n\n createProperty: function (kind, key, value) {\n return {\n type: Syntax.Property,\n key: key,\n value: value,\n kind: kind\n };\n },\n\n createReturnStatement: function (argument) {\n return {\n type: Syntax.ReturnStatement,\n argument: argument\n };\n },\n\n createSequenceExpression: function (expressions) {\n return {\n type: Syntax.SequenceExpression,\n expressions: expressions\n };\n },\n\n createSwitchCase: function (test, consequent) {\n return {\n type: Syntax.SwitchCase,\n test: test,\n consequent: consequent\n };\n },\n\n createSwitchStatement: function (discriminant, cases) {\n return {\n type: Syntax.SwitchStatement,\n discriminant: discriminant,\n cases: cases\n };\n },\n\n createThisExpression: function () {\n return {\n type: Syntax.ThisExpression\n };\n },\n\n createThrowStatement: function (argument) {\n return {\n type: Syntax.ThrowStatement,\n argument: argument\n };\n },\n\n createTryStatement: function (block, guardedHandlers, handlers, finalizer) {\n return {\n type: Syntax.TryStatement,\n block: block,\n guardedHandlers: guardedHandlers,\n handlers: handlers,\n finalizer: finalizer\n };\n },\n\n createUnaryExpression: function (operator, argument) {\n if (operator === '++' || operator === '--') {\n return {\n type: Syntax.UpdateExpression,\n operator: operator,\n argument: argument,\n prefix: true\n };\n }\n return {\n type: Syntax.UnaryExpression,\n operator: operator,\n argument: argument,\n prefix: true\n };\n },\n\n createVariableDeclaration: function (declarations, kind) {\n return {\n type: Syntax.VariableDeclaration,\n declarations: declarations,\n kind: kind\n };\n },\n\n createVariableDeclarator: function (id, init) {\n return {\n type: Syntax.VariableDeclarator,\n id: id,\n init: init\n };\n },\n\n createWhileStatement: function (test, body) {\n return {\n type: Syntax.WhileStatement,\n test: test,\n body: body\n };\n },\n\n createWithStatement: function (object, body) {\n return {\n type: Syntax.WithStatement,\n object: object,\n body: body\n };\n }\n };\n\n // Return true if there is a line terminator before the next token.\n\n function peekLineTerminator() {\n var pos, line, start, found;\n\n pos = index;\n line = lineNumber;\n start = lineStart;\n skipComment();\n found = lineNumber !== line;\n index = pos;\n lineNumber = line;\n lineStart = start;\n\n return found;\n }\n\n // Throw an exception\n\n function throwError(token, messageFormat) {\n var error,\n args = Array.prototype.slice.call(arguments, 2),\n msg = messageFormat.replace(\n /%(\\d)/g,\n function (whole, index) {\n assert(index < args.length, 'Message reference must be in range');\n return args[index];\n }\n );\n\n if (typeof token.lineNumber === 'number') {\n error = new Error('Line ' + token.lineNumber + ': ' + msg);\n error.index = token.start;\n error.lineNumber = token.lineNumber;\n error.column = token.start - lineStart + 1;\n } else {\n error = new Error('Line ' + lineNumber + ': ' + msg);\n error.index = index;\n error.lineNumber = lineNumber;\n error.column = index - lineStart + 1;\n }\n\n error.description = msg;\n throw error;\n }\n\n function throwErrorTolerant() {\n try {\n throwError.apply(null, arguments);\n } catch (e) {\n if (extra.errors) {\n extra.errors.push(e);\n } else {\n throw e;\n }\n }\n }\n\n\n // Throw an exception because of the token.\n\n function throwUnexpected(token) {\n if (token.type === Token.EOF) {\n throwError(token, Messages.UnexpectedEOS);\n }\n\n if (token.type === Token.NumericLiteral) {\n throwError(token, Messages.UnexpectedNumber);\n }\n\n if (token.type === Token.StringLiteral) {\n throwError(token, Messages.UnexpectedString);\n }\n\n if (token.type === Token.Identifier) {\n throwError(token, Messages.UnexpectedIdentifier);\n }\n\n if (token.type === Token.Keyword) {\n if (isFutureReservedWord(token.value)) {\n throwError(token, Messages.UnexpectedReserved);\n } else if (strict && isStrictModeReservedWord(token.value)) {\n throwErrorTolerant(token, Messages.StrictReservedWord);\n return;\n }\n throwError(token, Messages.UnexpectedToken, token.value);\n }\n\n // BooleanLiteral, NullLiteral, or Punctuator.\n throwError(token, Messages.UnexpectedToken, token.value);\n }\n\n // Expect the next token to match the specified punctuator.\n // If not, an exception will be thrown.\n\n function expect(value) {\n var token = lex();\n if (token.type !== Token.Punctuator || token.value !== value) {\n throwUnexpected(token);\n }\n }\n\n // Expect the next token to match the specified keyword.\n // If not, an exception will be thrown.\n\n function expectKeyword(keyword) {\n var token = lex();\n if (token.type !== Token.Keyword || token.value !== keyword) {\n throwUnexpected(token);\n }\n }\n\n // Return true if the next token matches the specified punctuator.\n\n function match(value) {\n return lookahead.type === Token.Punctuator && lookahead.value === value;\n }\n\n // Return true if the next token matches the specified keyword\n\n function matchKeyword(keyword) {\n return lookahead.type === Token.Keyword && lookahead.value === keyword;\n }\n\n // Return true if the next token is an assignment operator\n\n function matchAssign() {\n var op;\n\n if (lookahead.type !== Token.Punctuator) {\n return false;\n }\n op = lookahead.value;\n return op === '=' ||\n op === '*=' ||\n op === '/=' ||\n op === '%=' ||\n op === '+=' ||\n op === '-=' ||\n op === '<<=' ||\n op === '>>=' ||\n op === '>>>=' ||\n op === '&=' ||\n op === '^=' ||\n op === '|=';\n }\n\n function consumeSemicolon() {\n var line, oldIndex = index, oldLineNumber = lineNumber,\n oldLineStart = lineStart, oldLookahead = lookahead;\n\n // Catch the very common case first: immediately a semicolon (U+003B).\n if (source.charCodeAt(index) === 0x3B || match(';')) {\n lex();\n return;\n }\n\n line = lineNumber;\n skipComment();\n if (lineNumber !== line) {\n index = oldIndex;\n lineNumber = oldLineNumber;\n lineStart = oldLineStart;\n lookahead = oldLookahead;\n return;\n }\n\n if (lookahead.type !== Token.EOF && !match('}')) {\n throwUnexpected(lookahead);\n }\n }\n\n // Return true if provided expression is LeftHandSideExpression\n\n function isLeftHandSide(expr) {\n return expr.type === Syntax.Identifier || expr.type === Syntax.MemberExpression;\n }\n\n // 11.1.4 Array Initialiser\n\n function parseArrayInitialiser() {\n var elements = [], startToken;\n\n startToken = lookahead;\n expect('[');\n\n while (!match(']')) {\n if (match(',')) {\n lex();\n elements.push(null);\n } else {\n elements.push(parseAssignmentExpression());\n\n if (!match(']')) {\n expect(',');\n }\n }\n }\n\n lex();\n\n return delegate.markEnd(delegate.createArrayExpression(elements), startToken);\n }\n\n // 11.1.5 Object Initialiser\n\n function parsePropertyFunction(param, first) {\n var previousStrict, body, startToken;\n\n previousStrict = strict;\n startToken = lookahead;\n body = parseFunctionSourceElements();\n if (first && strict && isRestrictedWord(param[0].name)) {\n throwErrorTolerant(first, Messages.StrictParamName);\n }\n strict = previousStrict;\n return delegate.markEnd(delegate.createFunctionExpression(null, param, [], body), startToken);\n }\n\n function parseObjectPropertyKey() {\n var token, startToken;\n\n startToken = lookahead;\n token = lex();\n\n // Note: This function is called only from parseObjectProperty(), where\n // EOF and Punctuator tokens are already filtered out.\n\n if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) {\n if (strict && token.octal) {\n throwErrorTolerant(token, Messages.StrictOctalLiteral);\n }\n return delegate.markEnd(delegate.createLiteral(token), startToken);\n }\n\n return delegate.markEnd(delegate.createIdentifier(token.value), startToken);\n }\n\n function parseObjectProperty() {\n var token, key, id, value, param, startToken;\n\n token = lookahead;\n startToken = lookahead;\n\n if (token.type === Token.Identifier) {\n\n id = parseObjectPropertyKey();\n\n // Property Assignment: Getter and Setter.\n\n if (token.value === 'get' && !match(':')) {\n key = parseObjectPropertyKey();\n expect('(');\n expect(')');\n value = parsePropertyFunction([]);\n return delegate.markEnd(delegate.createProperty('get', key, value), startToken);\n }\n if (token.value === 'set' && !match(':')) {\n key = parseObjectPropertyKey();\n expect('(');\n token = lookahead;\n if (token.type !== Token.Identifier) {\n expect(')');\n throwErrorTolerant(token, Messages.UnexpectedToken, token.value);\n value = parsePropertyFunction([]);\n } else {\n param = [ parseVariableIdentifier() ];\n expect(')');\n value = parsePropertyFunction(param, token);\n }\n return delegate.markEnd(delegate.createProperty('set', key, value), startToken);\n }\n expect(':');\n value = parseAssignmentExpression();\n return delegate.markEnd(delegate.createProperty('init', id, value), startToken);\n }\n if (token.type === Token.EOF || token.type === Token.Punctuator) {\n throwUnexpected(token);\n } else {\n key = parseObjectPropertyKey();\n expect(':');\n value = parseAssignmentExpression();\n return delegate.markEnd(delegate.createProperty('init', key, value), startToken);\n }\n }\n\n function parseObjectInitialiser() {\n var properties = [], property, name, key, kind, map = {}, toString = String, startToken;\n\n startToken = lookahead;\n\n expect('{');\n\n while (!match('}')) {\n property = parseObjectProperty();\n\n if (property.key.type === Syntax.Identifier) {\n name = property.key.name;\n } else {\n name = toString(property.key.value);\n }\n kind = (property.kind === 'init') ? PropertyKind.Data : (property.kind === 'get') ? PropertyKind.Get : PropertyKind.Set;\n\n key = '$' + name;\n if (Object.prototype.hasOwnProperty.call(map, key)) {\n if (map[key] === PropertyKind.Data) {\n if (strict && kind === PropertyKind.Data) {\n throwErrorTolerant({}, Messages.StrictDuplicateProperty);\n } else if (kind !== PropertyKind.Data) {\n throwErrorTolerant({}, Messages.AccessorDataProperty);\n }\n } else {\n if (kind === PropertyKind.Data) {\n throwErrorTolerant({}, Messages.AccessorDataProperty);\n } else if (map[key] & kind) {\n throwErrorTolerant({}, Messages.AccessorGetSet);\n }\n }\n map[key] |= kind;\n } else {\n map[key] = kind;\n }\n\n properties.push(property);\n\n if (!match('}')) {\n expect(',');\n }\n }\n\n expect('}');\n\n return delegate.markEnd(delegate.createObjectExpression(properties), startToken);\n }\n\n // 11.1.6 The Grouping Operator\n\n function parseGroupExpression() {\n var expr;\n\n expect('(');\n\n expr = parseExpression();\n\n expect(')');\n\n return expr;\n }\n\n\n // 11.1 Primary Expressions\n\n function parsePrimaryExpression() {\n var type, token, expr, startToken;\n\n if (match('(')) {\n return parseGroupExpression();\n }\n\n if (match('[')) {\n return parseArrayInitialiser();\n }\n\n if (match('{')) {\n return parseObjectInitialiser();\n }\n\n type = lookahead.type;\n startToken = lookahead;\n\n if (type === Token.Identifier) {\n expr = delegate.createIdentifier(lex().value);\n } else if (type === Token.StringLiteral || type === Token.NumericLiteral) {\n if (strict && lookahead.octal) {\n throwErrorTolerant(lookahead, Messages.StrictOctalLiteral);\n }\n expr = delegate.createLiteral(lex());\n } else if (type === Token.Keyword) {\n if (matchKeyword('function')) {\n return parseFunctionExpression();\n }\n if (matchKeyword('this')) {\n lex();\n expr = delegate.createThisExpression();\n } else {\n throwUnexpected(lex());\n }\n } else if (type === Token.BooleanLiteral) {\n token = lex();\n token.value = (token.value === 'true');\n expr = delegate.createLiteral(token);\n } else if (type === Token.NullLiteral) {\n token = lex();\n token.value = null;\n expr = delegate.createLiteral(token);\n } else if (match('/') || match('/=')) {\n if (typeof extra.tokens !== 'undefined') {\n expr = delegate.createLiteral(collectRegex());\n } else {\n expr = delegate.createLiteral(scanRegExp());\n }\n peek();\n } else {\n throwUnexpected(lex());\n }\n\n return delegate.markEnd(expr, startToken);\n }\n\n // 11.2 Left-Hand-Side Expressions\n\n function parseArguments() {\n var args = [];\n\n expect('(');\n\n if (!match(')')) {\n while (index < length) {\n args.push(parseAssignmentExpression());\n if (match(')')) {\n break;\n }\n expect(',');\n }\n }\n\n expect(')');\n\n return args;\n }\n\n function parseNonComputedProperty() {\n var token, startToken;\n\n startToken = lookahead;\n token = lex();\n\n if (!isIdentifierName(token)) {\n throwUnexpected(token);\n }\n\n return delegate.markEnd(delegate.createIdentifier(token.value), startToken);\n }\n\n function parseNonComputedMember() {\n expect('.');\n\n return parseNonComputedProperty();\n }\n\n function parseComputedMember() {\n var expr;\n\n expect('[');\n\n expr = parseExpression();\n\n expect(']');\n\n return expr;\n }\n\n function parseNewExpression() {\n var callee, args, startToken;\n\n startToken = lookahead;\n expectKeyword('new');\n callee = parseLeftHandSideExpression();\n args = match('(') ? parseArguments() : [];\n\n return delegate.markEnd(delegate.createNewExpression(callee, args), startToken);\n }\n\n function parseLeftHandSideExpressionAllowCall() {\n var expr, args, property, startToken, previousAllowIn = state.allowIn;\n\n startToken = lookahead;\n state.allowIn = true;\n expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression();\n\n for (;;) {\n if (match('.')) {\n property = parseNonComputedMember();\n expr = delegate.createMemberExpression('.', expr, property);\n } else if (match('(')) {\n args = parseArguments();\n expr = delegate.createCallExpression(expr, args);\n } else if (match('[')) {\n property = parseComputedMember();\n expr = delegate.createMemberExpression('[', expr, property);\n } else {\n break;\n }\n delegate.markEnd(expr, startToken);\n }\n state.allowIn = previousAllowIn;\n\n return expr;\n }\n\n function parseLeftHandSideExpression() {\n var expr, property, startToken;\n assert(state.allowIn, 'callee of new expression always allow in keyword.');\n\n startToken = lookahead;\n\n expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression();\n\n while (match('.') || match('[')) {\n if (match('[')) {\n property = parseComputedMember();\n expr = delegate.createMemberExpression('[', expr, property);\n } else {\n property = parseNonComputedMember();\n expr = delegate.createMemberExpression('.', expr, property);\n }\n delegate.markEnd(expr, startToken);\n }\n return expr;\n }\n\n // 11.3 Postfix Expressions\n\n function parsePostfixExpression() {\n var expr, token, startToken = lookahead;\n\n expr = parseLeftHandSideExpressionAllowCall();\n\n if (lookahead.type === Token.Punctuator) {\n if ((match('++') || match('--')) && !peekLineTerminator()) {\n // 11.3.1, 11.3.2\n if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {\n throwErrorTolerant({}, Messages.StrictLHSPostfix);\n }\n\n if (!isLeftHandSide(expr)) {\n throwErrorTolerant({}, Messages.InvalidLHSInAssignment);\n }\n\n token = lex();\n expr = delegate.markEnd(delegate.createPostfixExpression(token.value, expr), startToken);\n }\n }\n\n return expr;\n }\n\n // 11.4 Unary Operators\n\n function parseUnaryExpression() {\n var token, expr, startToken;\n\n if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) {\n expr = parsePostfixExpression();\n } else if (match('++') || match('--')) {\n startToken = lookahead;\n token = lex();\n expr = parseUnaryExpression();\n // 11.4.4, 11.4.5\n if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {\n throwErrorTolerant({}, Messages.StrictLHSPrefix);\n }\n\n if (!isLeftHandSide(expr)) {\n throwErrorTolerant({}, Messages.InvalidLHSInAssignment);\n }\n\n expr = delegate.createUnaryExpression(token.value, expr);\n expr = delegate.markEnd(expr, startToken);\n } else if (match('+') || match('-') || match('~') || match('!')) {\n startToken = lookahead;\n token = lex();\n expr = parseUnaryExpression();\n expr = delegate.createUnaryExpression(token.value, expr);\n expr = delegate.markEnd(expr, startToken);\n } else if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) {\n startToken = lookahead;\n token = lex();\n expr = parseUnaryExpression();\n expr = delegate.createUnaryExpression(token.value, expr);\n expr = delegate.markEnd(expr, startToken);\n if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) {\n throwErrorTolerant({}, Messages.StrictDelete);\n }\n } else {\n expr = parsePostfixExpression();\n }\n\n return expr;\n }\n\n function binaryPrecedence(token, allowIn) {\n var prec = 0;\n\n if (token.type !== Token.Punctuator && token.type !== Token.Keyword) {\n return 0;\n }\n\n switch (token.value) {\n case '||':\n prec = 1;\n break;\n\n case '&&':\n prec = 2;\n break;\n\n case '|':\n prec = 3;\n break;\n\n case '^':\n prec = 4;\n break;\n\n case '&':\n prec = 5;\n break;\n\n case '==':\n case '!=':\n case '===':\n case '!==':\n prec = 6;\n break;\n\n case '<':\n case '>':\n case '<=':\n case '>=':\n case 'instanceof':\n prec = 7;\n break;\n\n case 'in':\n prec = allowIn ? 7 : 0;\n break;\n\n case '<<':\n case '>>':\n case '>>>':\n prec = 8;\n break;\n\n case '+':\n case '-':\n prec = 9;\n break;\n\n case '*':\n case '/':\n case '%':\n prec = 11;\n break;\n\n default:\n break;\n }\n\n return prec;\n }\n\n // 11.5 Multiplicative Operators\n // 11.6 Additive Operators\n // 11.7 Bitwise Shift Operators\n // 11.8 Relational Operators\n // 11.9 Equality Operators\n // 11.10 Binary Bitwise Operators\n // 11.11 Binary Logical Operators\n\n function parseBinaryExpression() {\n var marker, markers, expr, token, prec, stack, right, operator, left, i;\n\n marker = lookahead;\n left = parseUnaryExpression();\n\n token = lookahead;\n prec = binaryPrecedence(token, state.allowIn);\n if (prec === 0) {\n return left;\n }\n token.prec = prec;\n lex();\n\n markers = [marker, lookahead];\n right = parseUnaryExpression();\n\n stack = [left, token, right];\n\n while ((prec = binaryPrecedence(lookahead, state.allowIn)) > 0) {\n\n // Reduce: make a binary expression from the three topmost entries.\n while ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) {\n right = stack.pop();\n operator = stack.pop().value;\n left = stack.pop();\n expr = delegate.createBinaryExpression(operator, left, right);\n markers.pop();\n marker = markers[markers.length - 1];\n delegate.markEnd(expr, marker);\n stack.push(expr);\n }\n\n // Shift.\n token = lex();\n token.prec = prec;\n stack.push(token);\n markers.push(lookahead);\n expr = parseUnaryExpression();\n stack.push(expr);\n }\n\n // Final reduce to clean-up the stack.\n i = stack.length - 1;\n expr = stack[i];\n markers.pop();\n while (i > 1) {\n expr = delegate.createBinaryExpression(stack[i - 1].value, stack[i - 2], expr);\n i -= 2;\n marker = markers.pop();\n delegate.markEnd(expr, marker);\n }\n\n return expr;\n }\n\n\n // 11.12 Conditional Operator\n\n function parseConditionalExpression() {\n var expr, previousAllowIn, consequent, alternate, startToken;\n\n startToken = lookahead;\n\n expr = parseBinaryExpression();\n\n if (match('?')) {\n lex();\n previousAllowIn = state.allowIn;\n state.allowIn = true;\n consequent = parseAssignmentExpression();\n state.allowIn = previousAllowIn;\n expect(':');\n alternate = parseAssignmentExpression();\n\n expr = delegate.createConditionalExpression(expr, consequent, alternate);\n delegate.markEnd(expr, startToken);\n }\n\n return expr;\n }\n\n // 11.13 Assignment Operators\n\n function parseAssignmentExpression() {\n var token, left, right, node, startToken;\n\n token = lookahead;\n startToken = lookahead;\n\n node = left = parseConditionalExpression();\n\n if (matchAssign()) {\n // LeftHandSideExpression\n if (!isLeftHandSide(left)) {\n throwErrorTolerant({}, Messages.InvalidLHSInAssignment);\n }\n\n // 11.13.1\n if (strict && left.type === Syntax.Identifier && isRestrictedWord(left.name)) {\n throwErrorTolerant(token, Messages.StrictLHSAssignment);\n }\n\n token = lex();\n right = parseAssignmentExpression();\n node = delegate.markEnd(delegate.createAssignmentExpression(token.value, left, right), startToken);\n }\n\n return node;\n }\n\n // 11.14 Comma Operator\n\n function parseExpression() {\n var expr, startToken = lookahead;\n\n expr = parseAssignmentExpression();\n\n if (match(',')) {\n expr = delegate.createSequenceExpression([ expr ]);\n\n while (index < length) {\n if (!match(',')) {\n break;\n }\n lex();\n expr.expressions.push(parseAssignmentExpression());\n }\n\n delegate.markEnd(expr, startToken);\n }\n\n return expr;\n }\n\n // 12.1 Block\n\n function parseStatementList() {\n var list = [],\n statement;\n\n while (index < length) {\n if (match('}')) {\n break;\n }\n statement = parseSourceElement();\n if (typeof statement === 'undefined') {\n break;\n }\n list.push(statement);\n }\n\n return list;\n }\n\n function parseBlock() {\n var block, startToken;\n\n startToken = lookahead;\n expect('{');\n\n block = parseStatementList();\n\n expect('}');\n\n return delegate.markEnd(delegate.createBlockStatement(block), startToken);\n }\n\n // 12.2 Variable Statement\n\n function parseVariableIdentifier() {\n var token, startToken;\n\n startToken = lookahead;\n token = lex();\n\n if (token.type !== Token.Identifier) {\n throwUnexpected(token);\n }\n\n return delegate.markEnd(delegate.createIdentifier(token.value), startToken);\n }\n\n function parseVariableDeclaration(kind) {\n var init = null, id, startToken;\n\n startToken = lookahead;\n id = parseVariableIdentifier();\n\n // 12.2.1\n if (strict && isRestrictedWord(id.name)) {\n throwErrorTolerant({}, Messages.StrictVarName);\n }\n\n if (kind === 'const') {\n expect('=');\n init = parseAssignmentExpression();\n } else if (match('=')) {\n lex();\n init = parseAssignmentExpression();\n }\n\n return delegate.markEnd(delegate.createVariableDeclarator(id, init), startToken);\n }\n\n function parseVariableDeclarationList(kind) {\n var list = [];\n\n do {\n list.push(parseVariableDeclaration(kind));\n if (!match(',')) {\n break;\n }\n lex();\n } while (index < length);\n\n return list;\n }\n\n function parseVariableStatement() {\n var declarations;\n\n expectKeyword('var');\n\n declarations = parseVariableDeclarationList();\n\n consumeSemicolon();\n\n return delegate.createVariableDeclaration(declarations, 'var');\n }\n\n // kind may be `const` or `let`\n // Both are experimental and not in the specification yet.\n // see http://wiki.ecmascript.org/doku.php?id=harmony:const\n // and http://wiki.ecmascript.org/doku.php?id=harmony:let\n function parseConstLetDeclaration(kind) {\n var declarations, startToken;\n\n startToken = lookahead;\n\n expectKeyword(kind);\n\n declarations = parseVariableDeclarationList(kind);\n\n consumeSemicolon();\n\n return delegate.markEnd(delegate.createVariableDeclaration(declarations, kind), startToken);\n }\n\n // 12.3 Empty Statement\n\n function parseEmptyStatement() {\n expect(';');\n return delegate.createEmptyStatement();\n }\n\n // 12.4 Expression Statement\n\n function parseExpressionStatement() {\n var expr = parseExpression();\n consumeSemicolon();\n return delegate.createExpressionStatement(expr);\n }\n\n // 12.5 If statement\n\n function parseIfStatement() {\n var test, consequent, alternate;\n\n expectKeyword('if');\n\n expect('(');\n\n test = parseExpression();\n\n expect(')');\n\n consequent = parseStatement();\n\n if (matchKeyword('else')) {\n lex();\n alternate = parseStatement();\n } else {\n alternate = null;\n }\n\n return delegate.createIfStatement(test, consequent, alternate);\n }\n\n // 12.6 Iteration Statements\n\n function parseDoWhileStatement() {\n var body, test, oldInIteration;\n\n expectKeyword('do');\n\n oldInIteration = state.inIteration;\n state.inIteration = true;\n\n body = parseStatement();\n\n state.inIteration = oldInIteration;\n\n expectKeyword('while');\n\n expect('(');\n\n test = parseExpression();\n\n expect(')');\n\n if (match(';')) {\n lex();\n }\n\n return delegate.createDoWhileStatement(body, test);\n }\n\n function parseWhileStatement() {\n var test, body, oldInIteration;\n\n expectKeyword('while');\n\n expect('(');\n\n test = parseExpression();\n\n expect(')');\n\n oldInIteration = state.inIteration;\n state.inIteration = true;\n\n body = parseStatement();\n\n state.inIteration = oldInIteration;\n\n return delegate.createWhileStatement(test, body);\n }\n\n function parseForVariableDeclaration() {\n var token, declarations, startToken;\n\n startToken = lookahead;\n token = lex();\n declarations = parseVariableDeclarationList();\n\n return delegate.markEnd(delegate.createVariableDeclaration(declarations, token.value), startToken);\n }\n\n function parseForStatement() {\n var init, test, update, left, right, body, oldInIteration, previousAllowIn = state.allowIn;\n\n init = test = update = null;\n\n expectKeyword('for');\n\n expect('(');\n\n if (match(';')) {\n lex();\n } else {\n if (matchKeyword('var') || matchKeyword('let')) {\n state.allowIn = false;\n init = parseForVariableDeclaration();\n state.allowIn = previousAllowIn;\n\n if (init.declarations.length === 1 && matchKeyword('in')) {\n lex();\n left = init;\n right = parseExpression();\n init = null;\n }\n } else {\n state.allowIn = false;\n init = parseExpression();\n state.allowIn = previousAllowIn;\n\n if (matchKeyword('in')) {\n // LeftHandSideExpression\n if (!isLeftHandSide(init)) {\n throwErrorTolerant({}, Messages.InvalidLHSInForIn);\n }\n\n lex();\n left = init;\n right = parseExpression();\n init = null;\n }\n }\n\n if (typeof left === 'undefined') {\n expect(';');\n }\n }\n\n if (typeof left === 'undefined') {\n\n if (!match(';')) {\n test = parseExpression();\n }\n expect(';');\n\n if (!match(')')) {\n update = parseExpression();\n }\n }\n\n expect(')');\n\n oldInIteration = state.inIteration;\n state.inIteration = true;\n\n body = parseStatement();\n\n state.inIteration = oldInIteration;\n\n return (typeof left === 'undefined') ?\n delegate.createForStatement(init, test, update, body) :\n delegate.createForInStatement(left, right, body);\n }\n\n // 12.7 The continue statement\n\n function parseContinueStatement() {\n var label = null, key;\n\n expectKeyword('continue');\n\n // Optimize the most common form: 'continue;'.\n if (source.charCodeAt(index) === 0x3B) {\n lex();\n\n if (!state.inIteration) {\n throwError({}, Messages.IllegalContinue);\n }\n\n return delegate.createContinueStatement(null);\n }\n\n if (peekLineTerminator()) {\n if (!state.inIteration) {\n throwError({}, Messages.IllegalContinue);\n }\n\n return delegate.createContinueStatement(null);\n }\n\n if (lookahead.type === Token.Identifier) {\n label = parseVariableIdentifier();\n\n key = '$' + label.name;\n if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) {\n throwError({}, Messages.UnknownLabel, label.name);\n }\n }\n\n consumeSemicolon();\n\n if (label === null && !state.inIteration) {\n throwError({}, Messages.IllegalContinue);\n }\n\n return delegate.createContinueStatement(label);\n }\n\n // 12.8 The break statement\n\n function parseBreakStatement() {\n var label = null, key;\n\n expectKeyword('break');\n\n // Catch the very common case first: immediately a semicolon (U+003B).\n if (source.charCodeAt(index) === 0x3B) {\n lex();\n\n if (!(state.inIteration || state.inSwitch)) {\n throwError({}, Messages.IllegalBreak);\n }\n\n return delegate.createBreakStatement(null);\n }\n\n if (peekLineTerminator()) {\n if (!(state.inIteration || state.inSwitch)) {\n throwError({}, Messages.IllegalBreak);\n }\n\n return delegate.createBreakStatement(null);\n }\n\n if (lookahead.type === Token.Identifier) {\n label = parseVariableIdentifier();\n\n key = '$' + label.name;\n if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) {\n throwError({}, Messages.UnknownLabel, label.name);\n }\n }\n\n consumeSemicolon();\n\n if (label === null && !(state.inIteration || state.inSwitch)) {\n throwError({}, Messages.IllegalBreak);\n }\n\n return delegate.createBreakStatement(label);\n }\n\n // 12.9 The return statement\n\n function parseReturnStatement() {\n var argument = null;\n\n expectKeyword('return');\n\n if (!state.inFunctionBody) {\n throwErrorTolerant({}, Messages.IllegalReturn);\n }\n\n // 'return' followed by a space and an identifier is very common.\n if (source.charCodeAt(index) === 0x20) {\n if (isIdentifierStart(source.charCodeAt(index + 1))) {\n argument = parseExpression();\n consumeSemicolon();\n return delegate.createReturnStatement(argument);\n }\n }\n\n if (peekLineTerminator()) {\n return delegate.createReturnStatement(null);\n }\n\n if (!match(';')) {\n if (!match('}') && lookahead.type !== Token.EOF) {\n argument = parseExpression();\n }\n }\n\n consumeSemicolon();\n\n return delegate.createReturnStatement(argument);\n }\n\n // 12.10 The with statement\n\n function parseWithStatement() {\n var object, body;\n\n if (strict) {\n // TODO(ikarienator): Should we update the test cases instead?\n skipComment();\n throwErrorTolerant({}, Messages.StrictModeWith);\n }\n\n expectKeyword('with');\n\n expect('(');\n\n object = parseExpression();\n\n expect(')');\n\n body = parseStatement();\n\n return delegate.createWithStatement(object, body);\n }\n\n // 12.10 The swith statement\n\n function parseSwitchCase() {\n var test, consequent = [], statement, startToken;\n\n startToken = lookahead;\n if (matchKeyword('default')) {\n lex();\n test = null;\n } else {\n expectKeyword('case');\n test = parseExpression();\n }\n expect(':');\n\n while (index < length) {\n if (match('}') || matchKeyword('default') || matchKeyword('case')) {\n break;\n }\n statement = parseStatement();\n consequent.push(statement);\n }\n\n return delegate.markEnd(delegate.createSwitchCase(test, consequent), startToken);\n }\n\n function parseSwitchStatement() {\n var discriminant, cases, clause, oldInSwitch, defaultFound;\n\n expectKeyword('switch');\n\n expect('(');\n\n discriminant = parseExpression();\n\n expect(')');\n\n expect('{');\n\n cases = [];\n\n if (match('}')) {\n lex();\n return delegate.createSwitchStatement(discriminant, cases);\n }\n\n oldInSwitch = state.inSwitch;\n state.inSwitch = true;\n defaultFound = false;\n\n while (index < length) {\n if (match('}')) {\n break;\n }\n clause = parseSwitchCase();\n if (clause.test === null) {\n if (defaultFound) {\n throwError({}, Messages.MultipleDefaultsInSwitch);\n }\n defaultFound = true;\n }\n cases.push(clause);\n }\n\n state.inSwitch = oldInSwitch;\n\n expect('}');\n\n return delegate.createSwitchStatement(discriminant, cases);\n }\n\n // 12.13 The throw statement\n\n function parseThrowStatement() {\n var argument;\n\n expectKeyword('throw');\n\n if (peekLineTerminator()) {\n throwError({}, Messages.NewlineAfterThrow);\n }\n\n argument = parseExpression();\n\n consumeSemicolon();\n\n return delegate.createThrowStatement(argument);\n }\n\n // 12.14 The try statement\n\n function parseCatchClause() {\n var param, body, startToken;\n\n startToken = lookahead;\n expectKeyword('catch');\n\n expect('(');\n if (match(')')) {\n throwUnexpected(lookahead);\n }\n\n param = parseVariableIdentifier();\n // 12.14.1\n if (strict && isRestrictedWord(param.name)) {\n throwErrorTolerant({}, Messages.StrictCatchVariable);\n }\n\n expect(')');\n body = parseBlock();\n return delegate.markEnd(delegate.createCatchClause(param, body), startToken);\n }\n\n function parseTryStatement() {\n var block, handlers = [], finalizer = null;\n\n expectKeyword('try');\n\n block = parseBlock();\n\n if (matchKeyword('catch')) {\n handlers.push(parseCatchClause());\n }\n\n if (matchKeyword('finally')) {\n lex();\n finalizer = parseBlock();\n }\n\n if (handlers.length === 0 && !finalizer) {\n throwError({}, Messages.NoCatchOrFinally);\n }\n\n return delegate.createTryStatement(block, [], handlers, finalizer);\n }\n\n // 12.15 The debugger statement\n\n function parseDebuggerStatement() {\n expectKeyword('debugger');\n\n consumeSemicolon();\n\n return delegate.createDebuggerStatement();\n }\n\n // 12 Statements\n\n function parseStatement() {\n var type = lookahead.type,\n expr,\n labeledBody,\n key,\n startToken;\n\n if (type === Token.EOF) {\n throwUnexpected(lookahead);\n }\n\n if (type === Token.Punctuator && lookahead.value === '{') {\n return parseBlock();\n }\n\n startToken = lookahead;\n\n if (type === Token.Punctuator) {\n switch (lookahead.value) {\n case ';':\n return delegate.markEnd(parseEmptyStatement(), startToken);\n case '(':\n return delegate.markEnd(parseExpressionStatement(), startToken);\n default:\n break;\n }\n }\n\n if (type === Token.Keyword) {\n switch (lookahead.value) {\n case 'break':\n return delegate.markEnd(parseBreakStatement(), startToken);\n case 'continue':\n return delegate.markEnd(parseContinueStatement(), startToken);\n case 'debugger':\n return delegate.markEnd(parseDebuggerStatement(), startToken);\n case 'do':\n return delegate.markEnd(parseDoWhileStatement(), startToken);\n case 'for':\n return delegate.markEnd(parseForStatement(), startToken);\n case 'function':\n return delegate.markEnd(parseFunctionDeclaration(), startToken);\n case 'if':\n return delegate.markEnd(parseIfStatement(), startToken);\n case 'return':\n return delegate.markEnd(parseReturnStatement(), startToken);\n case 'switch':\n return delegate.markEnd(parseSwitchStatement(), startToken);\n case 'throw':\n return delegate.markEnd(parseThrowStatement(), startToken);\n case 'try':\n return delegate.markEnd(parseTryStatement(), startToken);\n case 'var':\n return delegate.markEnd(parseVariableStatement(), startToken);\n case 'while':\n return delegate.markEnd(parseWhileStatement(), startToken);\n case 'with':\n return delegate.markEnd(parseWithStatement(), startToken);\n default:\n break;\n }\n }\n\n expr = parseExpression();\n\n // 12.12 Labelled Statements\n if ((expr.type === Syntax.Identifier) && match(':')) {\n lex();\n\n key = '$' + expr.name;\n if (Object.prototype.hasOwnProperty.call(state.labelSet, key)) {\n throwError({}, Messages.Redeclaration, 'Label', expr.name);\n }\n\n state.labelSet[key] = true;\n labeledBody = parseStatement();\n delete state.labelSet[key];\n return delegate.markEnd(delegate.createLabeledStatement(expr, labeledBody), startToken);\n }\n\n consumeSemicolon();\n\n return delegate.markEnd(delegate.createExpressionStatement(expr), startToken);\n }\n\n // 13 Function Definition\n\n function parseFunctionSourceElements() {\n var sourceElement, sourceElements = [], token, directive, firstRestricted,\n oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody, startToken;\n\n startToken = lookahead;\n expect('{');\n\n while (index < length) {\n if (lookahead.type !== Token.StringLiteral) {\n break;\n }\n token = lookahead;\n\n sourceElement = parseSourceElement();\n sourceElements.push(sourceElement);\n if (sourceElement.expression.type !== Syntax.Literal) {\n // this is not directive\n break;\n }\n directive = source.slice(token.start + 1, token.end - 1);\n if (directive === 'use strict') {\n strict = true;\n if (firstRestricted) {\n throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral);\n }\n } else {\n if (!firstRestricted && token.octal) {\n firstRestricted = token;\n }\n }\n }\n\n oldLabelSet = state.labelSet;\n oldInIteration = state.inIteration;\n oldInSwitch = state.inSwitch;\n oldInFunctionBody = state.inFunctionBody;\n\n state.labelSet = {};\n state.inIteration = false;\n state.inSwitch = false;\n state.inFunctionBody = true;\n\n while (index < length) {\n if (match('}')) {\n break;\n }\n sourceElement = parseSourceElement();\n if (typeof sourceElement === 'undefined') {\n break;\n }\n sourceElements.push(sourceElement);\n }\n\n expect('}');\n\n state.labelSet = oldLabelSet;\n state.inIteration = oldInIteration;\n state.inSwitch = oldInSwitch;\n state.inFunctionBody = oldInFunctionBody;\n\n return delegate.markEnd(delegate.createBlockStatement(sourceElements), startToken);\n }\n\n function parseParams(firstRestricted) {\n var param, params = [], token, stricted, paramSet, key, message;\n expect('(');\n\n if (!match(')')) {\n paramSet = {};\n while (index < length) {\n token = lookahead;\n param = parseVariableIdentifier();\n key = '$' + token.value;\n if (strict) {\n if (isRestrictedWord(token.value)) {\n stricted = token;\n message = Messages.StrictParamName;\n }\n if (Object.prototype.hasOwnProperty.call(paramSet, key)) {\n stricted = token;\n message = Messages.StrictParamDupe;\n }\n } else if (!firstRestricted) {\n if (isRestrictedWord(token.value)) {\n firstRestricted = token;\n message = Messages.StrictParamName;\n } else if (isStrictModeReservedWord(token.value)) {\n firstRestricted = token;\n message = Messages.StrictReservedWord;\n } else if (Object.prototype.hasOwnProperty.call(paramSet, key)) {\n firstRestricted = token;\n message = Messages.StrictParamDupe;\n }\n }\n params.push(param);\n paramSet[key] = true;\n if (match(')')) {\n break;\n }\n expect(',');\n }\n }\n\n expect(')');\n\n return {\n params: params,\n stricted: stricted,\n firstRestricted: firstRestricted,\n message: message\n };\n }\n\n function parseFunctionDeclaration() {\n var id, params = [], body, token, stricted, tmp, firstRestricted, message, previousStrict, startToken;\n\n startToken = lookahead;\n\n expectKeyword('function');\n token = lookahead;\n id = parseVariableIdentifier();\n if (strict) {\n if (isRestrictedWord(token.value)) {\n throwErrorTolerant(token, Messages.StrictFunctionName);\n }\n } else {\n if (isRestrictedWord(token.value)) {\n firstRestricted = token;\n message = Messages.StrictFunctionName;\n } else if (isStrictModeReservedWord(token.value)) {\n firstRestricted = token;\n message = Messages.StrictReservedWord;\n }\n }\n\n tmp = parseParams(firstRestricted);\n params = tmp.params;\n stricted = tmp.stricted;\n firstRestricted = tmp.firstRestricted;\n if (tmp.message) {\n message = tmp.message;\n }\n\n previousStrict = strict;\n body = parseFunctionSourceElements();\n if (strict && firstRestricted) {\n throwError(firstRestricted, message);\n }\n if (strict && stricted) {\n throwErrorTolerant(stricted, message);\n }\n strict = previousStrict;\n\n return delegate.markEnd(delegate.createFunctionDeclaration(id, params, [], body), startToken);\n }\n\n function parseFunctionExpression() {\n var token, id = null, stricted, firstRestricted, message, tmp, params = [], body, previousStrict, startToken;\n\n startToken = lookahead;\n expectKeyword('function');\n\n if (!match('(')) {\n token = lookahead;\n id = parseVariableIdentifier();\n if (strict) {\n if (isRestrictedWord(token.value)) {\n throwErrorTolerant(token, Messages.StrictFunctionName);\n }\n } else {\n if (isRestrictedWord(token.value)) {\n firstRestricted = token;\n message = Messages.StrictFunctionName;\n } else if (isStrictModeReservedWord(token.value)) {\n firstRestricted = token;\n message = Messages.StrictReservedWord;\n }\n }\n }\n\n tmp = parseParams(firstRestricted);\n params = tmp.params;\n stricted = tmp.stricted;\n firstRestricted = tmp.firstRestricted;\n if (tmp.message) {\n message = tmp.message;\n }\n\n previousStrict = strict;\n body = parseFunctionSourceElements();\n if (strict && firstRestricted) {\n throwError(firstRestricted, message);\n }\n if (strict && stricted) {\n throwErrorTolerant(stricted, message);\n }\n strict = previousStrict;\n\n return delegate.markEnd(delegate.createFunctionExpression(id, params, [], body), startToken);\n }\n\n // 14 Program\n\n function parseSourceElement() {\n if (lookahead.type === Token.Keyword) {\n switch (lookahead.value) {\n case 'const':\n case 'let':\n return parseConstLetDeclaration(lookahead.value);\n case 'function':\n return parseFunctionDeclaration();\n default:\n return parseStatement();\n }\n }\n\n if (lookahead.type !== Token.EOF) {\n return parseStatement();\n }\n }\n\n function parseSourceElements() {\n var sourceElement, sourceElements = [], token, directive, firstRestricted;\n\n while (index < length) {\n token = lookahead;\n if (token.type !== Token.StringLiteral) {\n break;\n }\n\n sourceElement = parseSourceElement();\n sourceElements.push(sourceElement);\n if (sourceElement.expression.type !== Syntax.Literal) {\n // this is not directive\n break;\n }\n directive = source.slice(token.start + 1, token.end - 1);\n if (directive === 'use strict') {\n strict = true;\n if (firstRestricted) {\n throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral);\n }\n } else {\n if (!firstRestricted && token.octal) {\n firstRestricted = token;\n }\n }\n }\n\n while (index < length) {\n sourceElement = parseSourceElement();\n /* istanbul ignore if */\n if (typeof sourceElement === 'undefined') {\n break;\n }\n sourceElements.push(sourceElement);\n }\n return sourceElements;\n }\n\n function parseProgram() {\n var body, startToken;\n\n skipComment();\n peek();\n startToken = lookahead;\n strict = false;\n\n body = parseSourceElements();\n return delegate.markEnd(delegate.createProgram(body), startToken);\n }\n\n function filterTokenLocation() {\n var i, entry, token, tokens = [];\n\n for (i = 0; i < extra.tokens.length; ++i) {\n entry = extra.tokens[i];\n token = {\n type: entry.type,\n value: entry.value\n };\n if (extra.range) {\n token.range = entry.range;\n }\n if (extra.loc) {\n token.loc = entry.loc;\n }\n tokens.push(token);\n }\n\n extra.tokens = tokens;\n }\n\n function tokenize(code, options) {\n var toString,\n token,\n tokens;\n\n toString = String;\n if (typeof code !== 'string' && !(code instanceof String)) {\n code = toString(code);\n }\n\n delegate = SyntaxTreeDelegate;\n source = code;\n index = 0;\n lineNumber = (source.length > 0) ? 1 : 0;\n lineStart = 0;\n length = source.length;\n lookahead = null;\n state = {\n allowIn: true,\n labelSet: {},\n inFunctionBody: false,\n inIteration: false,\n inSwitch: false,\n lastCommentStart: -1\n };\n\n extra = {};\n\n // Options matching.\n options = options || {};\n\n // Of course we collect tokens here.\n options.tokens = true;\n extra.tokens = [];\n extra.tokenize = true;\n // The following two fields are necessary to compute the Regex tokens.\n extra.openParenToken = -1;\n extra.openCurlyToken = -1;\n\n extra.range = (typeof options.range === 'boolean') && options.range;\n extra.loc = (typeof options.loc === 'boolean') && options.loc;\n\n if (typeof options.comment === 'boolean' && options.comment) {\n extra.comments = [];\n }\n if (typeof options.tolerant === 'boolean' && options.tolerant) {\n extra.errors = [];\n }\n\n try {\n peek();\n if (lookahead.type === Token.EOF) {\n return extra.tokens;\n }\n\n token = lex();\n while (lookahead.type !== Token.EOF) {\n try {\n token = lex();\n } catch (lexError) {\n token = lookahead;\n if (extra.errors) {\n extra.errors.push(lexError);\n // We have to break on the first error\n // to avoid infinite loops.\n break;\n } else {\n throw lexError;\n }\n }\n }\n\n filterTokenLocation();\n tokens = extra.tokens;\n if (typeof extra.comments !== 'undefined') {\n tokens.comments = extra.comments;\n }\n if (typeof extra.errors !== 'undefined') {\n tokens.errors = extra.errors;\n }\n } catch (e) {\n throw e;\n } finally {\n extra = {};\n }\n return tokens;\n }\n\n function parse(code, options) {\n var program, toString;\n\n toString = String;\n if (typeof code !== 'string' && !(code instanceof String)) {\n code = toString(code);\n }\n\n delegate = SyntaxTreeDelegate;\n source = code;\n index = 0;\n lineNumber = (source.length > 0) ? 1 : 0;\n lineStart = 0;\n length = source.length;\n lookahead = null;\n state = {\n allowIn: true,\n labelSet: {},\n inFunctionBody: false,\n inIteration: false,\n inSwitch: false,\n lastCommentStart: -1\n };\n\n extra = {};\n if (typeof options !== 'undefined') {\n extra.range = (typeof options.range === 'boolean') && options.range;\n extra.loc = (typeof options.loc === 'boolean') && options.loc;\n extra.attachComment = (typeof options.attachComment === 'boolean') && options.attachComment;\n\n if (extra.loc && options.source !== null && options.source !== undefined) {\n extra.source = toString(options.source);\n }\n\n if (typeof options.tokens === 'boolean' && options.tokens) {\n extra.tokens = [];\n }\n if (typeof options.comment === 'boolean' && options.comment) {\n extra.comments = [];\n }\n if (typeof options.tolerant === 'boolean' && options.tolerant) {\n extra.errors = [];\n }\n if (extra.attachComment) {\n extra.range = true;\n extra.comments = [];\n extra.bottomRightStack = [];\n extra.trailingComments = [];\n extra.leadingComments = [];\n }\n }\n\n try {\n program = parseProgram();\n if (typeof extra.comments !== 'undefined') {\n program.comments = extra.comments;\n }\n if (typeof extra.tokens !== 'undefined') {\n filterTokenLocation();\n program.tokens = extra.tokens;\n }\n if (typeof extra.errors !== 'undefined') {\n program.errors = extra.errors;\n }\n } catch (e) {\n throw e;\n } finally {\n extra = {};\n }\n\n return program;\n }\n\n // Sync with *.json manifests.\n exports.version = '1.2.5';\n\n exports.tokenize = tokenize;\n\n exports.parse = parse;\n\n // Deep copy.\n /* istanbul ignore next */\n exports.Syntax = (function () {\n var name, types = {};\n\n if (typeof Object.create === 'function') {\n types = Object.create(null);\n }\n\n for (name in Syntax) {\n if (Syntax.hasOwnProperty(name)) {\n types[name] = Syntax[name];\n }\n }\n\n if (typeof Object.freeze === 'function') {\n Object.freeze(types);\n }\n\n return types;\n }());\n\n}));\n/* vim: set sw=4 ts=4 et tw=80 : */\n","class Item {\n constructor(data, prev, next) {\n this.next = next;\n if (next)\n next.prev = this;\n this.prev = prev;\n if (prev)\n prev.next = this;\n this.data = data;\n }\n}\nexport class LinkedList {\n constructor() {\n this._length = 0;\n }\n get head() {\n return this._head && this._head.data;\n }\n get tail() {\n return this._tail && this._tail.data;\n }\n get current() {\n return this._current && this._current.data;\n }\n get length() {\n return this._length;\n }\n push(data) {\n this._tail = new Item(data, this._tail);\n if (this._length === 0) {\n this._head = this._tail;\n this._current = this._head;\n this._next = this._head;\n }\n this._length++;\n }\n pop() {\n var tail = this._tail;\n if (this._length === 0) {\n return;\n }\n this._length--;\n if (this._length === 0) {\n this._head = this._tail = this._current = this._next = undefined;\n return tail.data;\n }\n this._tail = tail.prev;\n this._tail.next = undefined;\n if (this._current === tail) {\n this._current = this._tail;\n this._next = undefined;\n }\n return tail.data;\n }\n shift() {\n var head = this._head;\n if (this._length === 0) {\n return;\n }\n this._length--;\n if (this._length === 0) {\n this._head = this._tail = this._current = this._next = undefined;\n return head.data;\n }\n this._head = this._head.next;\n if (this._current === head) {\n this._current = this._head;\n this._next = this._current.next;\n }\n return head.data;\n }\n unshift(data) {\n this._head = new Item(data, undefined, this._head);\n if (this._length === 0) {\n this._tail = this._head;\n this._next = this._head;\n }\n this._length++;\n }\n unshiftCurrent() {\n var current = this._current;\n if (current === this._head || this._length < 2) {\n return current && current.data;\n }\n // remove\n if (current === this._tail) {\n this._tail = current.prev;\n this._tail.next = undefined;\n this._current = this._tail;\n }\n else {\n current.next.prev = current.prev;\n current.prev.next = current.next;\n this._current = current.prev;\n }\n this._next = this._current.next;\n // unshift\n current.next = this._head;\n current.prev = undefined;\n this._head.prev = current;\n this._head = current;\n return current.data;\n }\n removeCurrent() {\n var current = this._current;\n if (this._length === 0) {\n return;\n }\n this._length--;\n if (this._length === 0) {\n this._head = this._tail = this._current = this._next = undefined;\n return current.data;\n }\n if (current === this._tail) {\n this._tail = current.prev;\n this._tail.next = undefined;\n this._current = this._tail;\n }\n else if (current === this._head) {\n this._head = current.next;\n this._head.prev = undefined;\n this._current = this._head;\n }\n else {\n current.next.prev = current.prev;\n current.prev.next = current.next;\n this._current = current.prev;\n }\n this._next = this._current.next;\n return current.data;\n }\n resetCursor() {\n this._current = this._next = this._head;\n return this;\n }\n next() {\n var next = this._next;\n if (next !== undefined) {\n this._next = next.next;\n this._current = next;\n return next.data;\n }\n }\n}\n","/**\n * Created by AAravindan on 5/7/16.\n */\nimport { LinkedList } from './LinkedList';\nexport default class FixedSizeLinkedList extends LinkedList {\n constructor(size, maintainHigh, maintainLow, maintainSum) {\n super();\n this.size = size;\n this.maintainHigh = maintainHigh;\n this.maintainLow = maintainLow;\n this.maintainSum = maintainSum;\n this.totalPushed = 0;\n this.periodHigh = 0;\n this.periodLow = Infinity;\n this.periodSum = 0;\n if (!size || typeof size !== 'number') {\n throw ('Size required and should be a number.');\n }\n this._push = this.push;\n this.push = function (data) {\n this.add(data);\n this.totalPushed++;\n };\n }\n add(data) {\n if (this.length === this.size) {\n this.lastShift = this.shift();\n this._push(data);\n //TODO: FInd a better way\n if (this.maintainHigh)\n if (this.lastShift == this.periodHigh)\n this.calculatePeriodHigh();\n if (this.maintainLow)\n if (this.lastShift == this.periodLow)\n this.calculatePeriodLow();\n if (this.maintainSum) {\n this.periodSum = this.periodSum - this.lastShift;\n }\n }\n else {\n this._push(data);\n }\n //TODO: FInd a better way\n if (this.maintainHigh)\n if (this.periodHigh <= data)\n (this.periodHigh = data);\n if (this.maintainLow)\n if (this.periodLow >= data)\n (this.periodLow = data);\n if (this.maintainSum) {\n this.periodSum = this.periodSum + data;\n }\n }\n *iterator() {\n this.resetCursor();\n while (this.next()) {\n yield this.current;\n }\n }\n calculatePeriodHigh() {\n this.resetCursor();\n if (this.next())\n this.periodHigh = this.current;\n while (this.next()) {\n if (this.periodHigh <= this.current) {\n this.periodHigh = this.current;\n }\n ;\n }\n ;\n }\n calculatePeriodLow() {\n this.resetCursor();\n if (this.next())\n this.periodLow = this.current;\n while (this.next()) {\n if (this.periodLow >= this.current) {\n this.periodLow = this.current;\n }\n ;\n }\n ;\n }\n}\n","export default class StockData {\n constructor(open, high, low, close, reversedInput) {\n this.open = open;\n this.high = high;\n this.low = low;\n this.close = close;\n this.reversedInput = reversedInput;\n }\n}\nexport class CandleData {\n}\nexport class CandleList {\n constructor() {\n this.open = [];\n this.high = [];\n this.low = [];\n this.close = [];\n this.volume = [];\n this.timestamp = [];\n }\n}\n","import { format as nf } from '../Utils/NumberFormatter';\nexport class IndicatorInput {\n}\nexport class AllInputs {\n}\nexport class Indicator {\n constructor(input) {\n this.format = input.format || nf;\n }\n static reverseInputs(input) {\n if (input.reversedInput) {\n input.values ? input.values.reverse() : undefined;\n input.open ? input.open.reverse() : undefined;\n input.high ? input.high.reverse() : undefined;\n input.low ? input.low.reverse() : undefined;\n input.close ? input.close.reverse() : undefined;\n input.volume ? input.volume.reverse() : undefined;\n input.timestamp ? input.timestamp.reverse() : undefined;\n }\n }\n getResult() {\n return this.result;\n }\n}\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/8/16.\n */\n\"use strict\";\nexport class MDMInput extends IndicatorInput {\n}\n;\nexport class MDM extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var format = this.format;\n if (lows.length != highs.length) {\n throw ('Inputs(low,high) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var minusDm;\n var current = yield;\n var last;\n while (true) {\n if (last) {\n let upMove = (current.high - last.high);\n let downMove = (last.low - current.low);\n minusDm = format((downMove > upMove && downMove > 0) ? downMove : 0);\n }\n last = current;\n current = yield minusDm;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index]\n });\n if (result.value !== undefined)\n this.result.push(result.value);\n });\n }\n ;\n static calculate(input) {\n Indicator.reverseInputs(input);\n var result = new MDM(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/8/16.\n */\nexport class PDMInput extends IndicatorInput {\n}\n;\nexport class PDM extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var format = this.format;\n if (lows.length != highs.length) {\n throw ('Inputs(low,high) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var plusDm;\n var current = yield;\n var last;\n while (true) {\n if (last) {\n let upMove = (current.high - last.high);\n let downMove = (last.low - current.low);\n plusDm = format((upMove > downMove && upMove > 0) ? upMove : 0);\n }\n last = current;\n current = yield plusDm;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index]\n });\n if (result.value !== undefined)\n this.result.push(result.value);\n });\n }\n ;\n static calculate(input) {\n Indicator.reverseInputs(input);\n var result = new PDM(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\n","export default class CandlestickFinder {\n constructor() {\n // if (new.target === Abstract) {\n // throw new TypeError(\"Abstract class\");\n // }\n }\n approximateEqual(a, b) {\n let left = parseFloat(Math.abs(a - b).toPrecision(4)) * 1;\n let right = parseFloat((a * 0.001).toPrecision(4)) * 1;\n return left <= right;\n }\n logic(data) {\n throw \"this has to be implemented\";\n }\n getAllPatternIndex(data) {\n if (data.close.length < this.requiredCount) {\n console.warn('Data count less than data required for the strategy ', this.name);\n return [];\n }\n if (data.reversedInput) {\n data.open.reverse();\n data.high.reverse();\n data.low.reverse();\n data.close.reverse();\n }\n let strategyFn = this.logic;\n return this._generateDataForCandleStick(data)\n .map((current, index) => {\n return strategyFn.call(this, current) ? index : undefined;\n }).filter((hasIndex) => {\n return hasIndex;\n });\n }\n hasPattern(data) {\n if (data.close.length < this.requiredCount) {\n console.warn('Data count less than data required for the strategy ', this.name);\n return false;\n }\n if (data.reversedInput) {\n data.open.reverse();\n data.high.reverse();\n data.low.reverse();\n data.close.reverse();\n }\n let strategyFn = this.logic;\n return strategyFn.call(this, this._getLastDataForCandleStick(data));\n }\n _getLastDataForCandleStick(data) {\n let requiredCount = this.requiredCount;\n if (data.close.length === requiredCount) {\n return data;\n }\n else {\n let returnVal = {\n open: [],\n high: [],\n low: [],\n close: []\n };\n let i = 0;\n let index = data.close.length - requiredCount;\n while (i < requiredCount) {\n returnVal.open.push(data.open[index + i]);\n returnVal.high.push(data.high[index + i]);\n returnVal.low.push(data.low[index + i]);\n returnVal.close.push(data.close[index + i]);\n i++;\n }\n return returnVal;\n }\n }\n _generateDataForCandleStick(data) {\n let requiredCount = this.requiredCount;\n let generatedData = data.close.map(function (currentData, index) {\n let i = 0;\n let returnVal = {\n open: [],\n high: [],\n low: [],\n close: []\n };\n while (i < requiredCount) {\n returnVal.open.push(data.open[index + i]);\n returnVal.high.push(data.high[index + i]);\n returnVal.low.push(data.low[index + i]);\n returnVal.close.push(data.close[index + i]);\n i++;\n }\n return returnVal;\n }).filter((val, index) => { return (index <= (data.close.length - requiredCount)); });\n return generatedData;\n }\n}\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","var createFind = require('./_createFind'),\n findIndex = require('./findIndex');\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\n\nmodule.exports = find;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var basePick = require('./_basePick'),\n flatRest = require('./_flatRest');\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nmodule.exports = pick;\n","/* @preserve\n * The MIT License (MIT)\n * \n * Copyright (c) 2013-2017 Petka Antonov\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n * \n */\n/**\n * bluebird build version 3.5.1\n * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each\n*/\n!function(e){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=e();else if(\"function\"==typeof define&&define.amd)define([],e);else{var f;\"undefined\"!=typeof window?f=window:\"undefined\"!=typeof global?f=global:\"undefined\"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_==\"function\"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_==\"function\"&&_dereq_;for(var o=0;o 0) {\n var fn = queue.shift();\n if (typeof fn !== \"function\") {\n fn._settlePromises();\n continue;\n }\n var receiver = queue.shift();\n var arg = queue.shift();\n fn.call(receiver, arg);\n }\n};\n\nAsync.prototype._drainQueues = function () {\n this._drainQueue(this._normalQueue);\n this._reset();\n this._haveDrainedQueues = true;\n this._drainQueue(this._lateQueue);\n};\n\nAsync.prototype._queueTick = function () {\n if (!this._isTickUsed) {\n this._isTickUsed = true;\n this._schedule(this.drainQueues);\n }\n};\n\nAsync.prototype._reset = function () {\n this._isTickUsed = false;\n};\n\nmodule.exports = Async;\nmodule.exports.firstLineError = firstLineError;\n\n},{\"./queue\":26,\"./schedule\":29,\"./util\":36}],3:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) {\nvar calledBind = false;\nvar rejectThis = function(_, e) {\n this._reject(e);\n};\n\nvar targetRejected = function(e, context) {\n context.promiseRejectionQueued = true;\n context.bindingPromise._then(rejectThis, rejectThis, null, this, e);\n};\n\nvar bindingResolved = function(thisArg, context) {\n if (((this._bitField & 50397184) === 0)) {\n this._resolveCallback(context.target);\n }\n};\n\nvar bindingRejected = function(e, context) {\n if (!context.promiseRejectionQueued) this._reject(e);\n};\n\nPromise.prototype.bind = function (thisArg) {\n if (!calledBind) {\n calledBind = true;\n Promise.prototype._propagateFrom = debug.propagateFromFunction();\n Promise.prototype._boundValue = debug.boundValueFunction();\n }\n var maybePromise = tryConvertToPromise(thisArg);\n var ret = new Promise(INTERNAL);\n ret._propagateFrom(this, 1);\n var target = this._target();\n ret._setBoundTo(maybePromise);\n if (maybePromise instanceof Promise) {\n var context = {\n promiseRejectionQueued: false,\n promise: ret,\n target: target,\n bindingPromise: maybePromise\n };\n target._then(INTERNAL, targetRejected, undefined, ret, context);\n maybePromise._then(\n bindingResolved, bindingRejected, undefined, ret, context);\n ret._setOnCancel(maybePromise);\n } else {\n ret._resolveCallback(target);\n }\n return ret;\n};\n\nPromise.prototype._setBoundTo = function (obj) {\n if (obj !== undefined) {\n this._bitField = this._bitField | 2097152;\n this._boundTo = obj;\n } else {\n this._bitField = this._bitField & (~2097152);\n }\n};\n\nPromise.prototype._isBound = function () {\n return (this._bitField & 2097152) === 2097152;\n};\n\nPromise.bind = function (thisArg, value) {\n return Promise.resolve(value).bind(thisArg);\n};\n};\n\n},{}],4:[function(_dereq_,module,exports){\n\"use strict\";\nvar old;\nif (typeof Promise !== \"undefined\") old = Promise;\nfunction noConflict() {\n try { if (Promise === bluebird) Promise = old; }\n catch (e) {}\n return bluebird;\n}\nvar bluebird = _dereq_(\"./promise\")();\nbluebird.noConflict = noConflict;\nmodule.exports = bluebird;\n\n},{\"./promise\":22}],5:[function(_dereq_,module,exports){\n\"use strict\";\nvar cr = Object.create;\nif (cr) {\n var callerCache = cr(null);\n var getterCache = cr(null);\n callerCache[\" size\"] = getterCache[\" size\"] = 0;\n}\n\nmodule.exports = function(Promise) {\nvar util = _dereq_(\"./util\");\nvar canEvaluate = util.canEvaluate;\nvar isIdentifier = util.isIdentifier;\n\nvar getMethodCaller;\nvar getGetter;\nif (!true) {\nvar makeMethodCaller = function (methodName) {\n return new Function(\"ensureMethod\", \" \\n\\\n return function(obj) { \\n\\\n 'use strict' \\n\\\n var len = this.length; \\n\\\n ensureMethod(obj, 'methodName'); \\n\\\n switch(len) { \\n\\\n case 1: return obj.methodName(this[0]); \\n\\\n case 2: return obj.methodName(this[0], this[1]); \\n\\\n case 3: return obj.methodName(this[0], this[1], this[2]); \\n\\\n case 0: return obj.methodName(); \\n\\\n default: \\n\\\n return obj.methodName.apply(obj, this); \\n\\\n } \\n\\\n }; \\n\\\n \".replace(/methodName/g, methodName))(ensureMethod);\n};\n\nvar makeGetter = function (propertyName) {\n return new Function(\"obj\", \" \\n\\\n 'use strict'; \\n\\\n return obj.propertyName; \\n\\\n \".replace(\"propertyName\", propertyName));\n};\n\nvar getCompiled = function(name, compiler, cache) {\n var ret = cache[name];\n if (typeof ret !== \"function\") {\n if (!isIdentifier(name)) {\n return null;\n }\n ret = compiler(name);\n cache[name] = ret;\n cache[\" size\"]++;\n if (cache[\" size\"] > 512) {\n var keys = Object.keys(cache);\n for (var i = 0; i < 256; ++i) delete cache[keys[i]];\n cache[\" size\"] = keys.length - 256;\n }\n }\n return ret;\n};\n\ngetMethodCaller = function(name) {\n return getCompiled(name, makeMethodCaller, callerCache);\n};\n\ngetGetter = function(name) {\n return getCompiled(name, makeGetter, getterCache);\n};\n}\n\nfunction ensureMethod(obj, methodName) {\n var fn;\n if (obj != null) fn = obj[methodName];\n if (typeof fn !== \"function\") {\n var message = \"Object \" + util.classString(obj) + \" has no method '\" +\n util.toString(methodName) + \"'\";\n throw new Promise.TypeError(message);\n }\n return fn;\n}\n\nfunction caller(obj) {\n var methodName = this.pop();\n var fn = ensureMethod(obj, methodName);\n return fn.apply(obj, this);\n}\nPromise.prototype.call = function (methodName) {\n var args = [].slice.call(arguments, 1);;\n if (!true) {\n if (canEvaluate) {\n var maybeCaller = getMethodCaller(methodName);\n if (maybeCaller !== null) {\n return this._then(\n maybeCaller, undefined, undefined, args, undefined);\n }\n }\n }\n args.push(methodName);\n return this._then(caller, undefined, undefined, args, undefined);\n};\n\nfunction namedGetter(obj) {\n return obj[this];\n}\nfunction indexedGetter(obj) {\n var index = +this;\n if (index < 0) index = Math.max(0, index + obj.length);\n return obj[index];\n}\nPromise.prototype.get = function (propertyName) {\n var isIndex = (typeof propertyName === \"number\");\n var getter;\n if (!isIndex) {\n if (canEvaluate) {\n var maybeGetter = getGetter(propertyName);\n getter = maybeGetter !== null ? maybeGetter : namedGetter;\n } else {\n getter = namedGetter;\n }\n } else {\n getter = indexedGetter;\n }\n return this._then(getter, undefined, undefined, propertyName, undefined);\n};\n};\n\n},{\"./util\":36}],6:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, PromiseArray, apiRejection, debug) {\nvar util = _dereq_(\"./util\");\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\nvar async = Promise._async;\n\nPromise.prototype[\"break\"] = Promise.prototype.cancel = function() {\n if (!debug.cancellation()) return this._warn(\"cancellation is disabled\");\n\n var promise = this;\n var child = promise;\n while (promise._isCancellable()) {\n if (!promise._cancelBy(child)) {\n if (child._isFollowing()) {\n child._followee().cancel();\n } else {\n child._cancelBranched();\n }\n break;\n }\n\n var parent = promise._cancellationParent;\n if (parent == null || !parent._isCancellable()) {\n if (promise._isFollowing()) {\n promise._followee().cancel();\n } else {\n promise._cancelBranched();\n }\n break;\n } else {\n if (promise._isFollowing()) promise._followee().cancel();\n promise._setWillBeCancelled();\n child = promise;\n promise = parent;\n }\n }\n};\n\nPromise.prototype._branchHasCancelled = function() {\n this._branchesRemainingToCancel--;\n};\n\nPromise.prototype._enoughBranchesHaveCancelled = function() {\n return this._branchesRemainingToCancel === undefined ||\n this._branchesRemainingToCancel <= 0;\n};\n\nPromise.prototype._cancelBy = function(canceller) {\n if (canceller === this) {\n this._branchesRemainingToCancel = 0;\n this._invokeOnCancel();\n return true;\n } else {\n this._branchHasCancelled();\n if (this._enoughBranchesHaveCancelled()) {\n this._invokeOnCancel();\n return true;\n }\n }\n return false;\n};\n\nPromise.prototype._cancelBranched = function() {\n if (this._enoughBranchesHaveCancelled()) {\n this._cancel();\n }\n};\n\nPromise.prototype._cancel = function() {\n if (!this._isCancellable()) return;\n this._setCancelled();\n async.invoke(this._cancelPromises, this, undefined);\n};\n\nPromise.prototype._cancelPromises = function() {\n if (this._length() > 0) this._settlePromises();\n};\n\nPromise.prototype._unsetOnCancel = function() {\n this._onCancelField = undefined;\n};\n\nPromise.prototype._isCancellable = function() {\n return this.isPending() && !this._isCancelled();\n};\n\nPromise.prototype.isCancellable = function() {\n return this.isPending() && !this.isCancelled();\n};\n\nPromise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) {\n if (util.isArray(onCancelCallback)) {\n for (var i = 0; i < onCancelCallback.length; ++i) {\n this._doInvokeOnCancel(onCancelCallback[i], internalOnly);\n }\n } else if (onCancelCallback !== undefined) {\n if (typeof onCancelCallback === \"function\") {\n if (!internalOnly) {\n var e = tryCatch(onCancelCallback).call(this._boundValue());\n if (e === errorObj) {\n this._attachExtraTrace(e.e);\n async.throwLater(e.e);\n }\n }\n } else {\n onCancelCallback._resultCancelled(this);\n }\n }\n};\n\nPromise.prototype._invokeOnCancel = function() {\n var onCancelCallback = this._onCancel();\n this._unsetOnCancel();\n async.invoke(this._doInvokeOnCancel, this, onCancelCallback);\n};\n\nPromise.prototype._invokeInternalOnCancel = function() {\n if (this._isCancellable()) {\n this._doInvokeOnCancel(this._onCancel(), true);\n this._unsetOnCancel();\n }\n};\n\nPromise.prototype._resultCancelled = function() {\n this.cancel();\n};\n\n};\n\n},{\"./util\":36}],7:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(NEXT_FILTER) {\nvar util = _dereq_(\"./util\");\nvar getKeys = _dereq_(\"./es5\").keys;\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\n\nfunction catchFilter(instances, cb, promise) {\n return function(e) {\n var boundTo = promise._boundValue();\n predicateLoop: for (var i = 0; i < instances.length; ++i) {\n var item = instances[i];\n\n if (item === Error ||\n (item != null && item.prototype instanceof Error)) {\n if (e instanceof item) {\n return tryCatch(cb).call(boundTo, e);\n }\n } else if (typeof item === \"function\") {\n var matchesPredicate = tryCatch(item).call(boundTo, e);\n if (matchesPredicate === errorObj) {\n return matchesPredicate;\n } else if (matchesPredicate) {\n return tryCatch(cb).call(boundTo, e);\n }\n } else if (util.isObject(e)) {\n var keys = getKeys(item);\n for (var j = 0; j < keys.length; ++j) {\n var key = keys[j];\n if (item[key] != e[key]) {\n continue predicateLoop;\n }\n }\n return tryCatch(cb).call(boundTo, e);\n }\n }\n return NEXT_FILTER;\n };\n}\n\nreturn catchFilter;\n};\n\n},{\"./es5\":13,\"./util\":36}],8:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise) {\nvar longStackTraces = false;\nvar contextStack = [];\n\nPromise.prototype._promiseCreated = function() {};\nPromise.prototype._pushContext = function() {};\nPromise.prototype._popContext = function() {return null;};\nPromise._peekContext = Promise.prototype._peekContext = function() {};\n\nfunction Context() {\n this._trace = new Context.CapturedTrace(peekContext());\n}\nContext.prototype._pushContext = function () {\n if (this._trace !== undefined) {\n this._trace._promiseCreated = null;\n contextStack.push(this._trace);\n }\n};\n\nContext.prototype._popContext = function () {\n if (this._trace !== undefined) {\n var trace = contextStack.pop();\n var ret = trace._promiseCreated;\n trace._promiseCreated = null;\n return ret;\n }\n return null;\n};\n\nfunction createContext() {\n if (longStackTraces) return new Context();\n}\n\nfunction peekContext() {\n var lastIndex = contextStack.length - 1;\n if (lastIndex >= 0) {\n return contextStack[lastIndex];\n }\n return undefined;\n}\nContext.CapturedTrace = null;\nContext.create = createContext;\nContext.deactivateLongStackTraces = function() {};\nContext.activateLongStackTraces = function() {\n var Promise_pushContext = Promise.prototype._pushContext;\n var Promise_popContext = Promise.prototype._popContext;\n var Promise_PeekContext = Promise._peekContext;\n var Promise_peekContext = Promise.prototype._peekContext;\n var Promise_promiseCreated = Promise.prototype._promiseCreated;\n Context.deactivateLongStackTraces = function() {\n Promise.prototype._pushContext = Promise_pushContext;\n Promise.prototype._popContext = Promise_popContext;\n Promise._peekContext = Promise_PeekContext;\n Promise.prototype._peekContext = Promise_peekContext;\n Promise.prototype._promiseCreated = Promise_promiseCreated;\n longStackTraces = false;\n };\n longStackTraces = true;\n Promise.prototype._pushContext = Context.prototype._pushContext;\n Promise.prototype._popContext = Context.prototype._popContext;\n Promise._peekContext = Promise.prototype._peekContext = peekContext;\n Promise.prototype._promiseCreated = function() {\n var ctx = this._peekContext();\n if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this;\n };\n};\nreturn Context;\n};\n\n},{}],9:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, Context) {\nvar getDomain = Promise._getDomain;\nvar async = Promise._async;\nvar Warning = _dereq_(\"./errors\").Warning;\nvar util = _dereq_(\"./util\");\nvar canAttachTrace = util.canAttachTrace;\nvar unhandledRejectionHandled;\nvar possiblyUnhandledRejection;\nvar bluebirdFramePattern =\n /[\\\\\\/]bluebird[\\\\\\/]js[\\\\\\/](release|debug|instrumented)/;\nvar nodeFramePattern = /\\((?:timers\\.js):\\d+:\\d+\\)/;\nvar parseLinePattern = /[\\/<\\(](.+?):(\\d+):(\\d+)\\)?\\s*$/;\nvar stackFramePattern = null;\nvar formatStack = null;\nvar indentStackFrames = false;\nvar printWarning;\nvar debugging = !!(util.env(\"BLUEBIRD_DEBUG\") != 0 &&\n (true ||\n util.env(\"BLUEBIRD_DEBUG\") ||\n util.env(\"NODE_ENV\") === \"development\"));\n\nvar warnings = !!(util.env(\"BLUEBIRD_WARNINGS\") != 0 &&\n (debugging || util.env(\"BLUEBIRD_WARNINGS\")));\n\nvar longStackTraces = !!(util.env(\"BLUEBIRD_LONG_STACK_TRACES\") != 0 &&\n (debugging || util.env(\"BLUEBIRD_LONG_STACK_TRACES\")));\n\nvar wForgottenReturn = util.env(\"BLUEBIRD_W_FORGOTTEN_RETURN\") != 0 &&\n (warnings || !!util.env(\"BLUEBIRD_W_FORGOTTEN_RETURN\"));\n\nPromise.prototype.suppressUnhandledRejections = function() {\n var target = this._target();\n target._bitField = ((target._bitField & (~1048576)) |\n 524288);\n};\n\nPromise.prototype._ensurePossibleRejectionHandled = function () {\n if ((this._bitField & 524288) !== 0) return;\n this._setRejectionIsUnhandled();\n var self = this;\n setTimeout(function() {\n self._notifyUnhandledRejection();\n }, 1);\n};\n\nPromise.prototype._notifyUnhandledRejectionIsHandled = function () {\n fireRejectionEvent(\"rejectionHandled\",\n unhandledRejectionHandled, undefined, this);\n};\n\nPromise.prototype._setReturnedNonUndefined = function() {\n this._bitField = this._bitField | 268435456;\n};\n\nPromise.prototype._returnedNonUndefined = function() {\n return (this._bitField & 268435456) !== 0;\n};\n\nPromise.prototype._notifyUnhandledRejection = function () {\n if (this._isRejectionUnhandled()) {\n var reason = this._settledValue();\n this._setUnhandledRejectionIsNotified();\n fireRejectionEvent(\"unhandledRejection\",\n possiblyUnhandledRejection, reason, this);\n }\n};\n\nPromise.prototype._setUnhandledRejectionIsNotified = function () {\n this._bitField = this._bitField | 262144;\n};\n\nPromise.prototype._unsetUnhandledRejectionIsNotified = function () {\n this._bitField = this._bitField & (~262144);\n};\n\nPromise.prototype._isUnhandledRejectionNotified = function () {\n return (this._bitField & 262144) > 0;\n};\n\nPromise.prototype._setRejectionIsUnhandled = function () {\n this._bitField = this._bitField | 1048576;\n};\n\nPromise.prototype._unsetRejectionIsUnhandled = function () {\n this._bitField = this._bitField & (~1048576);\n if (this._isUnhandledRejectionNotified()) {\n this._unsetUnhandledRejectionIsNotified();\n this._notifyUnhandledRejectionIsHandled();\n }\n};\n\nPromise.prototype._isRejectionUnhandled = function () {\n return (this._bitField & 1048576) > 0;\n};\n\nPromise.prototype._warn = function(message, shouldUseOwnTrace, promise) {\n return warn(message, shouldUseOwnTrace, promise || this);\n};\n\nPromise.onPossiblyUnhandledRejection = function (fn) {\n var domain = getDomain();\n possiblyUnhandledRejection =\n typeof fn === \"function\" ? (domain === null ?\n fn : util.domainBind(domain, fn))\n : undefined;\n};\n\nPromise.onUnhandledRejectionHandled = function (fn) {\n var domain = getDomain();\n unhandledRejectionHandled =\n typeof fn === \"function\" ? (domain === null ?\n fn : util.domainBind(domain, fn))\n : undefined;\n};\n\nvar disableLongStackTraces = function() {};\nPromise.longStackTraces = function () {\n if (async.haveItemsQueued() && !config.longStackTraces) {\n throw new Error(\"cannot enable long stack traces after promises have been created\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n if (!config.longStackTraces && longStackTracesIsSupported()) {\n var Promise_captureStackTrace = Promise.prototype._captureStackTrace;\n var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace;\n config.longStackTraces = true;\n disableLongStackTraces = function() {\n if (async.haveItemsQueued() && !config.longStackTraces) {\n throw new Error(\"cannot enable long stack traces after promises have been created\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n Promise.prototype._captureStackTrace = Promise_captureStackTrace;\n Promise.prototype._attachExtraTrace = Promise_attachExtraTrace;\n Context.deactivateLongStackTraces();\n async.enableTrampoline();\n config.longStackTraces = false;\n };\n Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace;\n Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace;\n Context.activateLongStackTraces();\n async.disableTrampolineIfNecessary();\n }\n};\n\nPromise.hasLongStackTraces = function () {\n return config.longStackTraces && longStackTracesIsSupported();\n};\n\nvar fireDomEvent = (function() {\n try {\n if (typeof CustomEvent === \"function\") {\n var event = new CustomEvent(\"CustomEvent\");\n util.global.dispatchEvent(event);\n return function(name, event) {\n var domEvent = new CustomEvent(name.toLowerCase(), {\n detail: event,\n cancelable: true\n });\n return !util.global.dispatchEvent(domEvent);\n };\n } else if (typeof Event === \"function\") {\n var event = new Event(\"CustomEvent\");\n util.global.dispatchEvent(event);\n return function(name, event) {\n var domEvent = new Event(name.toLowerCase(), {\n cancelable: true\n });\n domEvent.detail = event;\n return !util.global.dispatchEvent(domEvent);\n };\n } else {\n var event = document.createEvent(\"CustomEvent\");\n event.initCustomEvent(\"testingtheevent\", false, true, {});\n util.global.dispatchEvent(event);\n return function(name, event) {\n var domEvent = document.createEvent(\"CustomEvent\");\n domEvent.initCustomEvent(name.toLowerCase(), false, true,\n event);\n return !util.global.dispatchEvent(domEvent);\n };\n }\n } catch (e) {}\n return function() {\n return false;\n };\n})();\n\nvar fireGlobalEvent = (function() {\n if (util.isNode) {\n return function() {\n return process.emit.apply(process, arguments);\n };\n } else {\n if (!util.global) {\n return function() {\n return false;\n };\n }\n return function(name) {\n var methodName = \"on\" + name.toLowerCase();\n var method = util.global[methodName];\n if (!method) return false;\n method.apply(util.global, [].slice.call(arguments, 1));\n return true;\n };\n }\n})();\n\nfunction generatePromiseLifecycleEventObject(name, promise) {\n return {promise: promise};\n}\n\nvar eventToObjectGenerator = {\n promiseCreated: generatePromiseLifecycleEventObject,\n promiseFulfilled: generatePromiseLifecycleEventObject,\n promiseRejected: generatePromiseLifecycleEventObject,\n promiseResolved: generatePromiseLifecycleEventObject,\n promiseCancelled: generatePromiseLifecycleEventObject,\n promiseChained: function(name, promise, child) {\n return {promise: promise, child: child};\n },\n warning: function(name, warning) {\n return {warning: warning};\n },\n unhandledRejection: function (name, reason, promise) {\n return {reason: reason, promise: promise};\n },\n rejectionHandled: generatePromiseLifecycleEventObject\n};\n\nvar activeFireEvent = function (name) {\n var globalEventFired = false;\n try {\n globalEventFired = fireGlobalEvent.apply(null, arguments);\n } catch (e) {\n async.throwLater(e);\n globalEventFired = true;\n }\n\n var domEventFired = false;\n try {\n domEventFired = fireDomEvent(name,\n eventToObjectGenerator[name].apply(null, arguments));\n } catch (e) {\n async.throwLater(e);\n domEventFired = true;\n }\n\n return domEventFired || globalEventFired;\n};\n\nPromise.config = function(opts) {\n opts = Object(opts);\n if (\"longStackTraces\" in opts) {\n if (opts.longStackTraces) {\n Promise.longStackTraces();\n } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) {\n disableLongStackTraces();\n }\n }\n if (\"warnings\" in opts) {\n var warningsOption = opts.warnings;\n config.warnings = !!warningsOption;\n wForgottenReturn = config.warnings;\n\n if (util.isObject(warningsOption)) {\n if (\"wForgottenReturn\" in warningsOption) {\n wForgottenReturn = !!warningsOption.wForgottenReturn;\n }\n }\n }\n if (\"cancellation\" in opts && opts.cancellation && !config.cancellation) {\n if (async.haveItemsQueued()) {\n throw new Error(\n \"cannot enable cancellation after promises are in use\");\n }\n Promise.prototype._clearCancellationData =\n cancellationClearCancellationData;\n Promise.prototype._propagateFrom = cancellationPropagateFrom;\n Promise.prototype._onCancel = cancellationOnCancel;\n Promise.prototype._setOnCancel = cancellationSetOnCancel;\n Promise.prototype._attachCancellationCallback =\n cancellationAttachCancellationCallback;\n Promise.prototype._execute = cancellationExecute;\n propagateFromFunction = cancellationPropagateFrom;\n config.cancellation = true;\n }\n if (\"monitoring\" in opts) {\n if (opts.monitoring && !config.monitoring) {\n config.monitoring = true;\n Promise.prototype._fireEvent = activeFireEvent;\n } else if (!opts.monitoring && config.monitoring) {\n config.monitoring = false;\n Promise.prototype._fireEvent = defaultFireEvent;\n }\n }\n return Promise;\n};\n\nfunction defaultFireEvent() { return false; }\n\nPromise.prototype._fireEvent = defaultFireEvent;\nPromise.prototype._execute = function(executor, resolve, reject) {\n try {\n executor(resolve, reject);\n } catch (e) {\n return e;\n }\n};\nPromise.prototype._onCancel = function () {};\nPromise.prototype._setOnCancel = function (handler) { ; };\nPromise.prototype._attachCancellationCallback = function(onCancel) {\n ;\n};\nPromise.prototype._captureStackTrace = function () {};\nPromise.prototype._attachExtraTrace = function () {};\nPromise.prototype._clearCancellationData = function() {};\nPromise.prototype._propagateFrom = function (parent, flags) {\n ;\n ;\n};\n\nfunction cancellationExecute(executor, resolve, reject) {\n var promise = this;\n try {\n executor(resolve, reject, function(onCancel) {\n if (typeof onCancel !== \"function\") {\n throw new TypeError(\"onCancel must be a function, got: \" +\n util.toString(onCancel));\n }\n promise._attachCancellationCallback(onCancel);\n });\n } catch (e) {\n return e;\n }\n}\n\nfunction cancellationAttachCancellationCallback(onCancel) {\n if (!this._isCancellable()) return this;\n\n var previousOnCancel = this._onCancel();\n if (previousOnCancel !== undefined) {\n if (util.isArray(previousOnCancel)) {\n previousOnCancel.push(onCancel);\n } else {\n this._setOnCancel([previousOnCancel, onCancel]);\n }\n } else {\n this._setOnCancel(onCancel);\n }\n}\n\nfunction cancellationOnCancel() {\n return this._onCancelField;\n}\n\nfunction cancellationSetOnCancel(onCancel) {\n this._onCancelField = onCancel;\n}\n\nfunction cancellationClearCancellationData() {\n this._cancellationParent = undefined;\n this._onCancelField = undefined;\n}\n\nfunction cancellationPropagateFrom(parent, flags) {\n if ((flags & 1) !== 0) {\n this._cancellationParent = parent;\n var branchesRemainingToCancel = parent._branchesRemainingToCancel;\n if (branchesRemainingToCancel === undefined) {\n branchesRemainingToCancel = 0;\n }\n parent._branchesRemainingToCancel = branchesRemainingToCancel + 1;\n }\n if ((flags & 2) !== 0 && parent._isBound()) {\n this._setBoundTo(parent._boundTo);\n }\n}\n\nfunction bindingPropagateFrom(parent, flags) {\n if ((flags & 2) !== 0 && parent._isBound()) {\n this._setBoundTo(parent._boundTo);\n }\n}\nvar propagateFromFunction = bindingPropagateFrom;\n\nfunction boundValueFunction() {\n var ret = this._boundTo;\n if (ret !== undefined) {\n if (ret instanceof Promise) {\n if (ret.isFulfilled()) {\n return ret.value();\n } else {\n return undefined;\n }\n }\n }\n return ret;\n}\n\nfunction longStackTracesCaptureStackTrace() {\n this._trace = new CapturedTrace(this._peekContext());\n}\n\nfunction longStackTracesAttachExtraTrace(error, ignoreSelf) {\n if (canAttachTrace(error)) {\n var trace = this._trace;\n if (trace !== undefined) {\n if (ignoreSelf) trace = trace._parent;\n }\n if (trace !== undefined) {\n trace.attachExtraTrace(error);\n } else if (!error.__stackCleaned__) {\n var parsed = parseStackAndMessage(error);\n util.notEnumerableProp(error, \"stack\",\n parsed.message + \"\\n\" + parsed.stack.join(\"\\n\"));\n util.notEnumerableProp(error, \"__stackCleaned__\", true);\n }\n }\n}\n\nfunction checkForgottenReturns(returnValue, promiseCreated, name, promise,\n parent) {\n if (returnValue === undefined && promiseCreated !== null &&\n wForgottenReturn) {\n if (parent !== undefined && parent._returnedNonUndefined()) return;\n if ((promise._bitField & 65535) === 0) return;\n\n if (name) name = name + \" \";\n var handlerLine = \"\";\n var creatorLine = \"\";\n if (promiseCreated._trace) {\n var traceLines = promiseCreated._trace.stack.split(\"\\n\");\n var stack = cleanStack(traceLines);\n for (var i = stack.length - 1; i >= 0; --i) {\n var line = stack[i];\n if (!nodeFramePattern.test(line)) {\n var lineMatches = line.match(parseLinePattern);\n if (lineMatches) {\n handlerLine = \"at \" + lineMatches[1] +\n \":\" + lineMatches[2] + \":\" + lineMatches[3] + \" \";\n }\n break;\n }\n }\n\n if (stack.length > 0) {\n var firstUserLine = stack[0];\n for (var i = 0; i < traceLines.length; ++i) {\n\n if (traceLines[i] === firstUserLine) {\n if (i > 0) {\n creatorLine = \"\\n\" + traceLines[i - 1];\n }\n break;\n }\n }\n\n }\n }\n var msg = \"a promise was created in a \" + name +\n \"handler \" + handlerLine + \"but was not returned from it, \" +\n \"see http://goo.gl/rRqMUw\" +\n creatorLine;\n promise._warn(msg, true, promiseCreated);\n }\n}\n\nfunction deprecated(name, replacement) {\n var message = name +\n \" is deprecated and will be removed in a future version.\";\n if (replacement) message += \" Use \" + replacement + \" instead.\";\n return warn(message);\n}\n\nfunction warn(message, shouldUseOwnTrace, promise) {\n if (!config.warnings) return;\n var warning = new Warning(message);\n var ctx;\n if (shouldUseOwnTrace) {\n promise._attachExtraTrace(warning);\n } else if (config.longStackTraces && (ctx = Promise._peekContext())) {\n ctx.attachExtraTrace(warning);\n } else {\n var parsed = parseStackAndMessage(warning);\n warning.stack = parsed.message + \"\\n\" + parsed.stack.join(\"\\n\");\n }\n\n if (!activeFireEvent(\"warning\", warning)) {\n formatAndLogError(warning, \"\", true);\n }\n}\n\nfunction reconstructStack(message, stacks) {\n for (var i = 0; i < stacks.length - 1; ++i) {\n stacks[i].push(\"From previous event:\");\n stacks[i] = stacks[i].join(\"\\n\");\n }\n if (i < stacks.length) {\n stacks[i] = stacks[i].join(\"\\n\");\n }\n return message + \"\\n\" + stacks.join(\"\\n\");\n}\n\nfunction removeDuplicateOrEmptyJumps(stacks) {\n for (var i = 0; i < stacks.length; ++i) {\n if (stacks[i].length === 0 ||\n ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {\n stacks.splice(i, 1);\n i--;\n }\n }\n}\n\nfunction removeCommonRoots(stacks) {\n var current = stacks[0];\n for (var i = 1; i < stacks.length; ++i) {\n var prev = stacks[i];\n var currentLastIndex = current.length - 1;\n var currentLastLine = current[currentLastIndex];\n var commonRootMeetPoint = -1;\n\n for (var j = prev.length - 1; j >= 0; --j) {\n if (prev[j] === currentLastLine) {\n commonRootMeetPoint = j;\n break;\n }\n }\n\n for (var j = commonRootMeetPoint; j >= 0; --j) {\n var line = prev[j];\n if (current[currentLastIndex] === line) {\n current.pop();\n currentLastIndex--;\n } else {\n break;\n }\n }\n current = prev;\n }\n}\n\nfunction cleanStack(stack) {\n var ret = [];\n for (var i = 0; i < stack.length; ++i) {\n var line = stack[i];\n var isTraceLine = \" (No stack trace)\" === line ||\n stackFramePattern.test(line);\n var isInternalFrame = isTraceLine && shouldIgnore(line);\n if (isTraceLine && !isInternalFrame) {\n if (indentStackFrames && line.charAt(0) !== \" \") {\n line = \" \" + line;\n }\n ret.push(line);\n }\n }\n return ret;\n}\n\nfunction stackFramesAsArray(error) {\n var stack = error.stack.replace(/\\s+$/g, \"\").split(\"\\n\");\n for (var i = 0; i < stack.length; ++i) {\n var line = stack[i];\n if (\" (No stack trace)\" === line || stackFramePattern.test(line)) {\n break;\n }\n }\n if (i > 0 && error.name != \"SyntaxError\") {\n stack = stack.slice(i);\n }\n return stack;\n}\n\nfunction parseStackAndMessage(error) {\n var stack = error.stack;\n var message = error.toString();\n stack = typeof stack === \"string\" && stack.length > 0\n ? stackFramesAsArray(error) : [\" (No stack trace)\"];\n return {\n message: message,\n stack: error.name == \"SyntaxError\" ? stack : cleanStack(stack)\n };\n}\n\nfunction formatAndLogError(error, title, isSoft) {\n if (typeof console !== \"undefined\") {\n var message;\n if (util.isObject(error)) {\n var stack = error.stack;\n message = title + formatStack(stack, error);\n } else {\n message = title + String(error);\n }\n if (typeof printWarning === \"function\") {\n printWarning(message, isSoft);\n } else if (typeof console.log === \"function\" ||\n typeof console.log === \"object\") {\n console.log(message);\n }\n }\n}\n\nfunction fireRejectionEvent(name, localHandler, reason, promise) {\n var localEventFired = false;\n try {\n if (typeof localHandler === \"function\") {\n localEventFired = true;\n if (name === \"rejectionHandled\") {\n localHandler(promise);\n } else {\n localHandler(reason, promise);\n }\n }\n } catch (e) {\n async.throwLater(e);\n }\n\n if (name === \"unhandledRejection\") {\n if (!activeFireEvent(name, reason, promise) && !localEventFired) {\n formatAndLogError(reason, \"Unhandled rejection \");\n }\n } else {\n activeFireEvent(name, promise);\n }\n}\n\nfunction formatNonError(obj) {\n var str;\n if (typeof obj === \"function\") {\n str = \"[function \" +\n (obj.name || \"anonymous\") +\n \"]\";\n } else {\n str = obj && typeof obj.toString === \"function\"\n ? obj.toString() : util.toString(obj);\n var ruselessToString = /\\[object [a-zA-Z0-9$_]+\\]/;\n if (ruselessToString.test(str)) {\n try {\n var newStr = JSON.stringify(obj);\n str = newStr;\n }\n catch(e) {\n\n }\n }\n if (str.length === 0) {\n str = \"(empty array)\";\n }\n }\n return (\"(<\" + snip(str) + \">, no stack trace)\");\n}\n\nfunction snip(str) {\n var maxChars = 41;\n if (str.length < maxChars) {\n return str;\n }\n return str.substr(0, maxChars - 3) + \"...\";\n}\n\nfunction longStackTracesIsSupported() {\n return typeof captureStackTrace === \"function\";\n}\n\nvar shouldIgnore = function() { return false; };\nvar parseLineInfoRegex = /[\\/<\\(]([^:\\/]+):(\\d+):(?:\\d+)\\)?\\s*$/;\nfunction parseLineInfo(line) {\n var matches = line.match(parseLineInfoRegex);\n if (matches) {\n return {\n fileName: matches[1],\n line: parseInt(matches[2], 10)\n };\n }\n}\n\nfunction setBounds(firstLineError, lastLineError) {\n if (!longStackTracesIsSupported()) return;\n var firstStackLines = firstLineError.stack.split(\"\\n\");\n var lastStackLines = lastLineError.stack.split(\"\\n\");\n var firstIndex = -1;\n var lastIndex = -1;\n var firstFileName;\n var lastFileName;\n for (var i = 0; i < firstStackLines.length; ++i) {\n var result = parseLineInfo(firstStackLines[i]);\n if (result) {\n firstFileName = result.fileName;\n firstIndex = result.line;\n break;\n }\n }\n for (var i = 0; i < lastStackLines.length; ++i) {\n var result = parseLineInfo(lastStackLines[i]);\n if (result) {\n lastFileName = result.fileName;\n lastIndex = result.line;\n break;\n }\n }\n if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||\n firstFileName !== lastFileName || firstIndex >= lastIndex) {\n return;\n }\n\n shouldIgnore = function(line) {\n if (bluebirdFramePattern.test(line)) return true;\n var info = parseLineInfo(line);\n if (info) {\n if (info.fileName === firstFileName &&\n (firstIndex <= info.line && info.line <= lastIndex)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction CapturedTrace(parent) {\n this._parent = parent;\n this._promisesCreated = 0;\n var length = this._length = 1 + (parent === undefined ? 0 : parent._length);\n captureStackTrace(this, CapturedTrace);\n if (length > 32) this.uncycle();\n}\nutil.inherits(CapturedTrace, Error);\nContext.CapturedTrace = CapturedTrace;\n\nCapturedTrace.prototype.uncycle = function() {\n var length = this._length;\n if (length < 2) return;\n var nodes = [];\n var stackToIndex = {};\n\n for (var i = 0, node = this; node !== undefined; ++i) {\n nodes.push(node);\n node = node._parent;\n }\n length = this._length = i;\n for (var i = length - 1; i >= 0; --i) {\n var stack = nodes[i].stack;\n if (stackToIndex[stack] === undefined) {\n stackToIndex[stack] = i;\n }\n }\n for (var i = 0; i < length; ++i) {\n var currentStack = nodes[i].stack;\n var index = stackToIndex[currentStack];\n if (index !== undefined && index !== i) {\n if (index > 0) {\n nodes[index - 1]._parent = undefined;\n nodes[index - 1]._length = 1;\n }\n nodes[i]._parent = undefined;\n nodes[i]._length = 1;\n var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;\n\n if (index < length - 1) {\n cycleEdgeNode._parent = nodes[index + 1];\n cycleEdgeNode._parent.uncycle();\n cycleEdgeNode._length =\n cycleEdgeNode._parent._length + 1;\n } else {\n cycleEdgeNode._parent = undefined;\n cycleEdgeNode._length = 1;\n }\n var currentChildLength = cycleEdgeNode._length + 1;\n for (var j = i - 2; j >= 0; --j) {\n nodes[j]._length = currentChildLength;\n currentChildLength++;\n }\n return;\n }\n }\n};\n\nCapturedTrace.prototype.attachExtraTrace = function(error) {\n if (error.__stackCleaned__) return;\n this.uncycle();\n var parsed = parseStackAndMessage(error);\n var message = parsed.message;\n var stacks = [parsed.stack];\n\n var trace = this;\n while (trace !== undefined) {\n stacks.push(cleanStack(trace.stack.split(\"\\n\")));\n trace = trace._parent;\n }\n removeCommonRoots(stacks);\n removeDuplicateOrEmptyJumps(stacks);\n util.notEnumerableProp(error, \"stack\", reconstructStack(message, stacks));\n util.notEnumerableProp(error, \"__stackCleaned__\", true);\n};\n\nvar captureStackTrace = (function stackDetection() {\n var v8stackFramePattern = /^\\s*at\\s*/;\n var v8stackFormatter = function(stack, error) {\n if (typeof stack === \"string\") return stack;\n\n if (error.name !== undefined &&\n error.message !== undefined) {\n return error.toString();\n }\n return formatNonError(error);\n };\n\n if (typeof Error.stackTraceLimit === \"number\" &&\n typeof Error.captureStackTrace === \"function\") {\n Error.stackTraceLimit += 6;\n stackFramePattern = v8stackFramePattern;\n formatStack = v8stackFormatter;\n var captureStackTrace = Error.captureStackTrace;\n\n shouldIgnore = function(line) {\n return bluebirdFramePattern.test(line);\n };\n return function(receiver, ignoreUntil) {\n Error.stackTraceLimit += 6;\n captureStackTrace(receiver, ignoreUntil);\n Error.stackTraceLimit -= 6;\n };\n }\n var err = new Error();\n\n if (typeof err.stack === \"string\" &&\n err.stack.split(\"\\n\")[0].indexOf(\"stackDetection@\") >= 0) {\n stackFramePattern = /@/;\n formatStack = v8stackFormatter;\n indentStackFrames = true;\n return function captureStackTrace(o) {\n o.stack = new Error().stack;\n };\n }\n\n var hasStackAfterThrow;\n try { throw new Error(); }\n catch(e) {\n hasStackAfterThrow = (\"stack\" in e);\n }\n if (!(\"stack\" in err) && hasStackAfterThrow &&\n typeof Error.stackTraceLimit === \"number\") {\n stackFramePattern = v8stackFramePattern;\n formatStack = v8stackFormatter;\n return function captureStackTrace(o) {\n Error.stackTraceLimit += 6;\n try { throw new Error(); }\n catch(e) { o.stack = e.stack; }\n Error.stackTraceLimit -= 6;\n };\n }\n\n formatStack = function(stack, error) {\n if (typeof stack === \"string\") return stack;\n\n if ((typeof error === \"object\" ||\n typeof error === \"function\") &&\n error.name !== undefined &&\n error.message !== undefined) {\n return error.toString();\n }\n return formatNonError(error);\n };\n\n return null;\n\n})([]);\n\nif (typeof console !== \"undefined\" && typeof console.warn !== \"undefined\") {\n printWarning = function (message) {\n console.warn(message);\n };\n if (util.isNode && process.stderr.isTTY) {\n printWarning = function(message, isSoft) {\n var color = isSoft ? \"\\u001b[33m\" : \"\\u001b[31m\";\n console.warn(color + message + \"\\u001b[0m\\n\");\n };\n } else if (!util.isNode && typeof (new Error().stack) === \"string\") {\n printWarning = function(message, isSoft) {\n console.warn(\"%c\" + message,\n isSoft ? \"color: darkorange\" : \"color: red\");\n };\n }\n}\n\nvar config = {\n warnings: warnings,\n longStackTraces: false,\n cancellation: false,\n monitoring: false\n};\n\nif (longStackTraces) Promise.longStackTraces();\n\nreturn {\n longStackTraces: function() {\n return config.longStackTraces;\n },\n warnings: function() {\n return config.warnings;\n },\n cancellation: function() {\n return config.cancellation;\n },\n monitoring: function() {\n return config.monitoring;\n },\n propagateFromFunction: function() {\n return propagateFromFunction;\n },\n boundValueFunction: function() {\n return boundValueFunction;\n },\n checkForgottenReturns: checkForgottenReturns,\n setBounds: setBounds,\n warn: warn,\n deprecated: deprecated,\n CapturedTrace: CapturedTrace,\n fireDomEvent: fireDomEvent,\n fireGlobalEvent: fireGlobalEvent\n};\n};\n\n},{\"./errors\":12,\"./util\":36}],10:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise) {\nfunction returner() {\n return this.value;\n}\nfunction thrower() {\n throw this.reason;\n}\n\nPromise.prototype[\"return\"] =\nPromise.prototype.thenReturn = function (value) {\n if (value instanceof Promise) value.suppressUnhandledRejections();\n return this._then(\n returner, undefined, undefined, {value: value}, undefined);\n};\n\nPromise.prototype[\"throw\"] =\nPromise.prototype.thenThrow = function (reason) {\n return this._then(\n thrower, undefined, undefined, {reason: reason}, undefined);\n};\n\nPromise.prototype.catchThrow = function (reason) {\n if (arguments.length <= 1) {\n return this._then(\n undefined, thrower, undefined, {reason: reason}, undefined);\n } else {\n var _reason = arguments[1];\n var handler = function() {throw _reason;};\n return this.caught(reason, handler);\n }\n};\n\nPromise.prototype.catchReturn = function (value) {\n if (arguments.length <= 1) {\n if (value instanceof Promise) value.suppressUnhandledRejections();\n return this._then(\n undefined, returner, undefined, {value: value}, undefined);\n } else {\n var _value = arguments[1];\n if (_value instanceof Promise) _value.suppressUnhandledRejections();\n var handler = function() {return _value;};\n return this.caught(value, handler);\n }\n};\n};\n\n},{}],11:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL) {\nvar PromiseReduce = Promise.reduce;\nvar PromiseAll = Promise.all;\n\nfunction promiseAllThis() {\n return PromiseAll(this);\n}\n\nfunction PromiseMapSeries(promises, fn) {\n return PromiseReduce(promises, fn, INTERNAL, INTERNAL);\n}\n\nPromise.prototype.each = function (fn) {\n return PromiseReduce(this, fn, INTERNAL, 0)\n ._then(promiseAllThis, undefined, undefined, this, undefined);\n};\n\nPromise.prototype.mapSeries = function (fn) {\n return PromiseReduce(this, fn, INTERNAL, INTERNAL);\n};\n\nPromise.each = function (promises, fn) {\n return PromiseReduce(promises, fn, INTERNAL, 0)\n ._then(promiseAllThis, undefined, undefined, promises, undefined);\n};\n\nPromise.mapSeries = PromiseMapSeries;\n};\n\n\n},{}],12:[function(_dereq_,module,exports){\n\"use strict\";\nvar es5 = _dereq_(\"./es5\");\nvar Objectfreeze = es5.freeze;\nvar util = _dereq_(\"./util\");\nvar inherits = util.inherits;\nvar notEnumerableProp = util.notEnumerableProp;\n\nfunction subError(nameProperty, defaultMessage) {\n function SubError(message) {\n if (!(this instanceof SubError)) return new SubError(message);\n notEnumerableProp(this, \"message\",\n typeof message === \"string\" ? message : defaultMessage);\n notEnumerableProp(this, \"name\", nameProperty);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n Error.call(this);\n }\n }\n inherits(SubError, Error);\n return SubError;\n}\n\nvar _TypeError, _RangeError;\nvar Warning = subError(\"Warning\", \"warning\");\nvar CancellationError = subError(\"CancellationError\", \"cancellation error\");\nvar TimeoutError = subError(\"TimeoutError\", \"timeout error\");\nvar AggregateError = subError(\"AggregateError\", \"aggregate error\");\ntry {\n _TypeError = TypeError;\n _RangeError = RangeError;\n} catch(e) {\n _TypeError = subError(\"TypeError\", \"type error\");\n _RangeError = subError(\"RangeError\", \"range error\");\n}\n\nvar methods = (\"join pop push shift unshift slice filter forEach some \" +\n \"every map indexOf lastIndexOf reduce reduceRight sort reverse\").split(\" \");\n\nfor (var i = 0; i < methods.length; ++i) {\n if (typeof Array.prototype[methods[i]] === \"function\") {\n AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];\n }\n}\n\nes5.defineProperty(AggregateError.prototype, \"length\", {\n value: 0,\n configurable: false,\n writable: true,\n enumerable: true\n});\nAggregateError.prototype[\"isOperational\"] = true;\nvar level = 0;\nAggregateError.prototype.toString = function() {\n var indent = Array(level * 4 + 1).join(\" \");\n var ret = \"\\n\" + indent + \"AggregateError of:\" + \"\\n\";\n level++;\n indent = Array(level * 4 + 1).join(\" \");\n for (var i = 0; i < this.length; ++i) {\n var str = this[i] === this ? \"[Circular AggregateError]\" : this[i] + \"\";\n var lines = str.split(\"\\n\");\n for (var j = 0; j < lines.length; ++j) {\n lines[j] = indent + lines[j];\n }\n str = lines.join(\"\\n\");\n ret += str + \"\\n\";\n }\n level--;\n return ret;\n};\n\nfunction OperationalError(message) {\n if (!(this instanceof OperationalError))\n return new OperationalError(message);\n notEnumerableProp(this, \"name\", \"OperationalError\");\n notEnumerableProp(this, \"message\", message);\n this.cause = message;\n this[\"isOperational\"] = true;\n\n if (message instanceof Error) {\n notEnumerableProp(this, \"message\", message.message);\n notEnumerableProp(this, \"stack\", message.stack);\n } else if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n}\ninherits(OperationalError, Error);\n\nvar errorTypes = Error[\"__BluebirdErrorTypes__\"];\nif (!errorTypes) {\n errorTypes = Objectfreeze({\n CancellationError: CancellationError,\n TimeoutError: TimeoutError,\n OperationalError: OperationalError,\n RejectionError: OperationalError,\n AggregateError: AggregateError\n });\n es5.defineProperty(Error, \"__BluebirdErrorTypes__\", {\n value: errorTypes,\n writable: false,\n enumerable: false,\n configurable: false\n });\n}\n\nmodule.exports = {\n Error: Error,\n TypeError: _TypeError,\n RangeError: _RangeError,\n CancellationError: errorTypes.CancellationError,\n OperationalError: errorTypes.OperationalError,\n TimeoutError: errorTypes.TimeoutError,\n AggregateError: errorTypes.AggregateError,\n Warning: Warning\n};\n\n},{\"./es5\":13,\"./util\":36}],13:[function(_dereq_,module,exports){\nvar isES5 = (function(){\n \"use strict\";\n return this === undefined;\n})();\n\nif (isES5) {\n module.exports = {\n freeze: Object.freeze,\n defineProperty: Object.defineProperty,\n getDescriptor: Object.getOwnPropertyDescriptor,\n keys: Object.keys,\n names: Object.getOwnPropertyNames,\n getPrototypeOf: Object.getPrototypeOf,\n isArray: Array.isArray,\n isES5: isES5,\n propertyIsWritable: function(obj, prop) {\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop);\n return !!(!descriptor || descriptor.writable || descriptor.set);\n }\n };\n} else {\n var has = {}.hasOwnProperty;\n var str = {}.toString;\n var proto = {}.constructor.prototype;\n\n var ObjectKeys = function (o) {\n var ret = [];\n for (var key in o) {\n if (has.call(o, key)) {\n ret.push(key);\n }\n }\n return ret;\n };\n\n var ObjectGetDescriptor = function(o, key) {\n return {value: o[key]};\n };\n\n var ObjectDefineProperty = function (o, key, desc) {\n o[key] = desc.value;\n return o;\n };\n\n var ObjectFreeze = function (obj) {\n return obj;\n };\n\n var ObjectGetPrototypeOf = function (obj) {\n try {\n return Object(obj).constructor.prototype;\n }\n catch (e) {\n return proto;\n }\n };\n\n var ArrayIsArray = function (obj) {\n try {\n return str.call(obj) === \"[object Array]\";\n }\n catch(e) {\n return false;\n }\n };\n\n module.exports = {\n isArray: ArrayIsArray,\n keys: ObjectKeys,\n names: ObjectKeys,\n defineProperty: ObjectDefineProperty,\n getDescriptor: ObjectGetDescriptor,\n freeze: ObjectFreeze,\n getPrototypeOf: ObjectGetPrototypeOf,\n isES5: isES5,\n propertyIsWritable: function() {\n return true;\n }\n };\n}\n\n},{}],14:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL) {\nvar PromiseMap = Promise.map;\n\nPromise.prototype.filter = function (fn, options) {\n return PromiseMap(this, fn, options, INTERNAL);\n};\n\nPromise.filter = function (promises, fn, options) {\n return PromiseMap(promises, fn, options, INTERNAL);\n};\n};\n\n},{}],15:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, tryConvertToPromise, NEXT_FILTER) {\nvar util = _dereq_(\"./util\");\nvar CancellationError = Promise.CancellationError;\nvar errorObj = util.errorObj;\nvar catchFilter = _dereq_(\"./catch_filter\")(NEXT_FILTER);\n\nfunction PassThroughHandlerContext(promise, type, handler) {\n this.promise = promise;\n this.type = type;\n this.handler = handler;\n this.called = false;\n this.cancelPromise = null;\n}\n\nPassThroughHandlerContext.prototype.isFinallyHandler = function() {\n return this.type === 0;\n};\n\nfunction FinallyHandlerCancelReaction(finallyHandler) {\n this.finallyHandler = finallyHandler;\n}\n\nFinallyHandlerCancelReaction.prototype._resultCancelled = function() {\n checkCancel(this.finallyHandler);\n};\n\nfunction checkCancel(ctx, reason) {\n if (ctx.cancelPromise != null) {\n if (arguments.length > 1) {\n ctx.cancelPromise._reject(reason);\n } else {\n ctx.cancelPromise._cancel();\n }\n ctx.cancelPromise = null;\n return true;\n }\n return false;\n}\n\nfunction succeed() {\n return finallyHandler.call(this, this.promise._target()._settledValue());\n}\nfunction fail(reason) {\n if (checkCancel(this, reason)) return;\n errorObj.e = reason;\n return errorObj;\n}\nfunction finallyHandler(reasonOrValue) {\n var promise = this.promise;\n var handler = this.handler;\n\n if (!this.called) {\n this.called = true;\n var ret = this.isFinallyHandler()\n ? handler.call(promise._boundValue())\n : handler.call(promise._boundValue(), reasonOrValue);\n if (ret === NEXT_FILTER) {\n return ret;\n } else if (ret !== undefined) {\n promise._setReturnedNonUndefined();\n var maybePromise = tryConvertToPromise(ret, promise);\n if (maybePromise instanceof Promise) {\n if (this.cancelPromise != null) {\n if (maybePromise._isCancelled()) {\n var reason =\n new CancellationError(\"late cancellation observer\");\n promise._attachExtraTrace(reason);\n errorObj.e = reason;\n return errorObj;\n } else if (maybePromise.isPending()) {\n maybePromise._attachCancellationCallback(\n new FinallyHandlerCancelReaction(this));\n }\n }\n return maybePromise._then(\n succeed, fail, undefined, this, undefined);\n }\n }\n }\n\n if (promise.isRejected()) {\n checkCancel(this);\n errorObj.e = reasonOrValue;\n return errorObj;\n } else {\n checkCancel(this);\n return reasonOrValue;\n }\n}\n\nPromise.prototype._passThrough = function(handler, type, success, fail) {\n if (typeof handler !== \"function\") return this.then();\n return this._then(success,\n fail,\n undefined,\n new PassThroughHandlerContext(this, type, handler),\n undefined);\n};\n\nPromise.prototype.lastly =\nPromise.prototype[\"finally\"] = function (handler) {\n return this._passThrough(handler,\n 0,\n finallyHandler,\n finallyHandler);\n};\n\n\nPromise.prototype.tap = function (handler) {\n return this._passThrough(handler, 1, finallyHandler);\n};\n\nPromise.prototype.tapCatch = function (handlerOrPredicate) {\n var len = arguments.length;\n if(len === 1) {\n return this._passThrough(handlerOrPredicate,\n 1,\n undefined,\n finallyHandler);\n } else {\n var catchInstances = new Array(len - 1),\n j = 0, i;\n for (i = 0; i < len - 1; ++i) {\n var item = arguments[i];\n if (util.isObject(item)) {\n catchInstances[j++] = item;\n } else {\n return Promise.reject(new TypeError(\n \"tapCatch statement predicate: \"\n + \"expecting an object but got \" + util.classString(item)\n ));\n }\n }\n catchInstances.length = j;\n var handler = arguments[i];\n return this._passThrough(catchFilter(catchInstances, handler, this),\n 1,\n undefined,\n finallyHandler);\n }\n\n};\n\nreturn PassThroughHandlerContext;\n};\n\n},{\"./catch_filter\":7,\"./util\":36}],16:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise,\n apiRejection,\n INTERNAL,\n tryConvertToPromise,\n Proxyable,\n debug) {\nvar errors = _dereq_(\"./errors\");\nvar TypeError = errors.TypeError;\nvar util = _dereq_(\"./util\");\nvar errorObj = util.errorObj;\nvar tryCatch = util.tryCatch;\nvar yieldHandlers = [];\n\nfunction promiseFromYieldHandler(value, yieldHandlers, traceParent) {\n for (var i = 0; i < yieldHandlers.length; ++i) {\n traceParent._pushContext();\n var result = tryCatch(yieldHandlers[i])(value);\n traceParent._popContext();\n if (result === errorObj) {\n traceParent._pushContext();\n var ret = Promise.reject(errorObj.e);\n traceParent._popContext();\n return ret;\n }\n var maybePromise = tryConvertToPromise(result, traceParent);\n if (maybePromise instanceof Promise) return maybePromise;\n }\n return null;\n}\n\nfunction PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {\n if (debug.cancellation()) {\n var internal = new Promise(INTERNAL);\n var _finallyPromise = this._finallyPromise = new Promise(INTERNAL);\n this._promise = internal.lastly(function() {\n return _finallyPromise;\n });\n internal._captureStackTrace();\n internal._setOnCancel(this);\n } else {\n var promise = this._promise = new Promise(INTERNAL);\n promise._captureStackTrace();\n }\n this._stack = stack;\n this._generatorFunction = generatorFunction;\n this._receiver = receiver;\n this._generator = undefined;\n this._yieldHandlers = typeof yieldHandler === \"function\"\n ? [yieldHandler].concat(yieldHandlers)\n : yieldHandlers;\n this._yieldedPromise = null;\n this._cancellationPhase = false;\n}\nutil.inherits(PromiseSpawn, Proxyable);\n\nPromiseSpawn.prototype._isResolved = function() {\n return this._promise === null;\n};\n\nPromiseSpawn.prototype._cleanup = function() {\n this._promise = this._generator = null;\n if (debug.cancellation() && this._finallyPromise !== null) {\n this._finallyPromise._fulfill();\n this._finallyPromise = null;\n }\n};\n\nPromiseSpawn.prototype._promiseCancelled = function() {\n if (this._isResolved()) return;\n var implementsReturn = typeof this._generator[\"return\"] !== \"undefined\";\n\n var result;\n if (!implementsReturn) {\n var reason = new Promise.CancellationError(\n \"generator .return() sentinel\");\n Promise.coroutine.returnSentinel = reason;\n this._promise._attachExtraTrace(reason);\n this._promise._pushContext();\n result = tryCatch(this._generator[\"throw\"]).call(this._generator,\n reason);\n this._promise._popContext();\n } else {\n this._promise._pushContext();\n result = tryCatch(this._generator[\"return\"]).call(this._generator,\n undefined);\n this._promise._popContext();\n }\n this._cancellationPhase = true;\n this._yieldedPromise = null;\n this._continue(result);\n};\n\nPromiseSpawn.prototype._promiseFulfilled = function(value) {\n this._yieldedPromise = null;\n this._promise._pushContext();\n var result = tryCatch(this._generator.next).call(this._generator, value);\n this._promise._popContext();\n this._continue(result);\n};\n\nPromiseSpawn.prototype._promiseRejected = function(reason) {\n this._yieldedPromise = null;\n this._promise._attachExtraTrace(reason);\n this._promise._pushContext();\n var result = tryCatch(this._generator[\"throw\"])\n .call(this._generator, reason);\n this._promise._popContext();\n this._continue(result);\n};\n\nPromiseSpawn.prototype._resultCancelled = function() {\n if (this._yieldedPromise instanceof Promise) {\n var promise = this._yieldedPromise;\n this._yieldedPromise = null;\n promise.cancel();\n }\n};\n\nPromiseSpawn.prototype.promise = function () {\n return this._promise;\n};\n\nPromiseSpawn.prototype._run = function () {\n this._generator = this._generatorFunction.call(this._receiver);\n this._receiver =\n this._generatorFunction = undefined;\n this._promiseFulfilled(undefined);\n};\n\nPromiseSpawn.prototype._continue = function (result) {\n var promise = this._promise;\n if (result === errorObj) {\n this._cleanup();\n if (this._cancellationPhase) {\n return promise.cancel();\n } else {\n return promise._rejectCallback(result.e, false);\n }\n }\n\n var value = result.value;\n if (result.done === true) {\n this._cleanup();\n if (this._cancellationPhase) {\n return promise.cancel();\n } else {\n return promise._resolveCallback(value);\n }\n } else {\n var maybePromise = tryConvertToPromise(value, this._promise);\n if (!(maybePromise instanceof Promise)) {\n maybePromise =\n promiseFromYieldHandler(maybePromise,\n this._yieldHandlers,\n this._promise);\n if (maybePromise === null) {\n this._promiseRejected(\n new TypeError(\n \"A value %s was yielded that could not be treated as a promise\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\\u000a\".replace(\"%s\", String(value)) +\n \"From coroutine:\\u000a\" +\n this._stack.split(\"\\n\").slice(1, -7).join(\"\\n\")\n )\n );\n return;\n }\n }\n maybePromise = maybePromise._target();\n var bitField = maybePromise._bitField;\n ;\n if (((bitField & 50397184) === 0)) {\n this._yieldedPromise = maybePromise;\n maybePromise._proxy(this, null);\n } else if (((bitField & 33554432) !== 0)) {\n Promise._async.invoke(\n this._promiseFulfilled, this, maybePromise._value()\n );\n } else if (((bitField & 16777216) !== 0)) {\n Promise._async.invoke(\n this._promiseRejected, this, maybePromise._reason()\n );\n } else {\n this._promiseCancelled();\n }\n }\n};\n\nPromise.coroutine = function (generatorFunction, options) {\n if (typeof generatorFunction !== \"function\") {\n throw new TypeError(\"generatorFunction must be a function\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n var yieldHandler = Object(options).yieldHandler;\n var PromiseSpawn$ = PromiseSpawn;\n var stack = new Error().stack;\n return function () {\n var generator = generatorFunction.apply(this, arguments);\n var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler,\n stack);\n var ret = spawn.promise();\n spawn._generator = generator;\n spawn._promiseFulfilled(undefined);\n return ret;\n };\n};\n\nPromise.coroutine.addYieldHandler = function(fn) {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"expecting a function but got \" + util.classString(fn));\n }\n yieldHandlers.push(fn);\n};\n\nPromise.spawn = function (generatorFunction) {\n debug.deprecated(\"Promise.spawn()\", \"Promise.coroutine()\");\n if (typeof generatorFunction !== \"function\") {\n return apiRejection(\"generatorFunction must be a function\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n var spawn = new PromiseSpawn(generatorFunction, this);\n var ret = spawn.promise();\n spawn._run(Promise.spawn);\n return ret;\n};\n};\n\n},{\"./errors\":12,\"./util\":36}],17:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports =\nfunction(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async,\n getDomain) {\nvar util = _dereq_(\"./util\");\nvar canEvaluate = util.canEvaluate;\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\nvar reject;\n\nif (!true) {\nif (canEvaluate) {\n var thenCallback = function(i) {\n return new Function(\"value\", \"holder\", \" \\n\\\n 'use strict'; \\n\\\n holder.pIndex = value; \\n\\\n holder.checkFulfillment(this); \\n\\\n \".replace(/Index/g, i));\n };\n\n var promiseSetter = function(i) {\n return new Function(\"promise\", \"holder\", \" \\n\\\n 'use strict'; \\n\\\n holder.pIndex = promise; \\n\\\n \".replace(/Index/g, i));\n };\n\n var generateHolderClass = function(total) {\n var props = new Array(total);\n for (var i = 0; i < props.length; ++i) {\n props[i] = \"this.p\" + (i+1);\n }\n var assignment = props.join(\" = \") + \" = null;\";\n var cancellationCode= \"var promise;\\n\" + props.map(function(prop) {\n return \" \\n\\\n promise = \" + prop + \"; \\n\\\n if (promise instanceof Promise) { \\n\\\n promise.cancel(); \\n\\\n } \\n\\\n \";\n }).join(\"\\n\");\n var passedArguments = props.join(\", \");\n var name = \"Holder$\" + total;\n\n\n var code = \"return function(tryCatch, errorObj, Promise, async) { \\n\\\n 'use strict'; \\n\\\n function [TheName](fn) { \\n\\\n [TheProperties] \\n\\\n this.fn = fn; \\n\\\n this.asyncNeeded = true; \\n\\\n this.now = 0; \\n\\\n } \\n\\\n \\n\\\n [TheName].prototype._callFunction = function(promise) { \\n\\\n promise._pushContext(); \\n\\\n var ret = tryCatch(this.fn)([ThePassedArguments]); \\n\\\n promise._popContext(); \\n\\\n if (ret === errorObj) { \\n\\\n promise._rejectCallback(ret.e, false); \\n\\\n } else { \\n\\\n promise._resolveCallback(ret); \\n\\\n } \\n\\\n }; \\n\\\n \\n\\\n [TheName].prototype.checkFulfillment = function(promise) { \\n\\\n var now = ++this.now; \\n\\\n if (now === [TheTotal]) { \\n\\\n if (this.asyncNeeded) { \\n\\\n async.invoke(this._callFunction, this, promise); \\n\\\n } else { \\n\\\n this._callFunction(promise); \\n\\\n } \\n\\\n \\n\\\n } \\n\\\n }; \\n\\\n \\n\\\n [TheName].prototype._resultCancelled = function() { \\n\\\n [CancellationCode] \\n\\\n }; \\n\\\n \\n\\\n return [TheName]; \\n\\\n }(tryCatch, errorObj, Promise, async); \\n\\\n \";\n\n code = code.replace(/\\[TheName\\]/g, name)\n .replace(/\\[TheTotal\\]/g, total)\n .replace(/\\[ThePassedArguments\\]/g, passedArguments)\n .replace(/\\[TheProperties\\]/g, assignment)\n .replace(/\\[CancellationCode\\]/g, cancellationCode);\n\n return new Function(\"tryCatch\", \"errorObj\", \"Promise\", \"async\", code)\n (tryCatch, errorObj, Promise, async);\n };\n\n var holderClasses = [];\n var thenCallbacks = [];\n var promiseSetters = [];\n\n for (var i = 0; i < 8; ++i) {\n holderClasses.push(generateHolderClass(i + 1));\n thenCallbacks.push(thenCallback(i + 1));\n promiseSetters.push(promiseSetter(i + 1));\n }\n\n reject = function (reason) {\n this._reject(reason);\n };\n}}\n\nPromise.join = function () {\n var last = arguments.length - 1;\n var fn;\n if (last > 0 && typeof arguments[last] === \"function\") {\n fn = arguments[last];\n if (!true) {\n if (last <= 8 && canEvaluate) {\n var ret = new Promise(INTERNAL);\n ret._captureStackTrace();\n var HolderClass = holderClasses[last - 1];\n var holder = new HolderClass(fn);\n var callbacks = thenCallbacks;\n\n for (var i = 0; i < last; ++i) {\n var maybePromise = tryConvertToPromise(arguments[i], ret);\n if (maybePromise instanceof Promise) {\n maybePromise = maybePromise._target();\n var bitField = maybePromise._bitField;\n ;\n if (((bitField & 50397184) === 0)) {\n maybePromise._then(callbacks[i], reject,\n undefined, ret, holder);\n promiseSetters[i](maybePromise, holder);\n holder.asyncNeeded = false;\n } else if (((bitField & 33554432) !== 0)) {\n callbacks[i].call(ret,\n maybePromise._value(), holder);\n } else if (((bitField & 16777216) !== 0)) {\n ret._reject(maybePromise._reason());\n } else {\n ret._cancel();\n }\n } else {\n callbacks[i].call(ret, maybePromise, holder);\n }\n }\n\n if (!ret._isFateSealed()) {\n if (holder.asyncNeeded) {\n var domain = getDomain();\n if (domain !== null) {\n holder.fn = util.domainBind(domain, holder.fn);\n }\n }\n ret._setAsyncGuaranteed();\n ret._setOnCancel(holder);\n }\n return ret;\n }\n }\n }\n var args = [].slice.call(arguments);;\n if (fn) args.pop();\n var ret = new PromiseArray(args).promise();\n return fn !== undefined ? ret.spread(fn) : ret;\n};\n\n};\n\n},{\"./util\":36}],18:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise,\n PromiseArray,\n apiRejection,\n tryConvertToPromise,\n INTERNAL,\n debug) {\nvar getDomain = Promise._getDomain;\nvar util = _dereq_(\"./util\");\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\nvar async = Promise._async;\n\nfunction MappingPromiseArray(promises, fn, limit, _filter) {\n this.constructor$(promises);\n this._promise._captureStackTrace();\n var domain = getDomain();\n this._callback = domain === null ? fn : util.domainBind(domain, fn);\n this._preservedValues = _filter === INTERNAL\n ? new Array(this.length())\n : null;\n this._limit = limit;\n this._inFlight = 0;\n this._queue = [];\n async.invoke(this._asyncInit, this, undefined);\n}\nutil.inherits(MappingPromiseArray, PromiseArray);\n\nMappingPromiseArray.prototype._asyncInit = function() {\n this._init$(undefined, -2);\n};\n\nMappingPromiseArray.prototype._init = function () {};\n\nMappingPromiseArray.prototype._promiseFulfilled = function (value, index) {\n var values = this._values;\n var length = this.length();\n var preservedValues = this._preservedValues;\n var limit = this._limit;\n\n if (index < 0) {\n index = (index * -1) - 1;\n values[index] = value;\n if (limit >= 1) {\n this._inFlight--;\n this._drainQueue();\n if (this._isResolved()) return true;\n }\n } else {\n if (limit >= 1 && this._inFlight >= limit) {\n values[index] = value;\n this._queue.push(index);\n return false;\n }\n if (preservedValues !== null) preservedValues[index] = value;\n\n var promise = this._promise;\n var callback = this._callback;\n var receiver = promise._boundValue();\n promise._pushContext();\n var ret = tryCatch(callback).call(receiver, value, index, length);\n var promiseCreated = promise._popContext();\n debug.checkForgottenReturns(\n ret,\n promiseCreated,\n preservedValues !== null ? \"Promise.filter\" : \"Promise.map\",\n promise\n );\n if (ret === errorObj) {\n this._reject(ret.e);\n return true;\n }\n\n var maybePromise = tryConvertToPromise(ret, this._promise);\n if (maybePromise instanceof Promise) {\n maybePromise = maybePromise._target();\n var bitField = maybePromise._bitField;\n ;\n if (((bitField & 50397184) === 0)) {\n if (limit >= 1) this._inFlight++;\n values[index] = maybePromise;\n maybePromise._proxy(this, (index + 1) * -1);\n return false;\n } else if (((bitField & 33554432) !== 0)) {\n ret = maybePromise._value();\n } else if (((bitField & 16777216) !== 0)) {\n this._reject(maybePromise._reason());\n return true;\n } else {\n this._cancel();\n return true;\n }\n }\n values[index] = ret;\n }\n var totalResolved = ++this._totalResolved;\n if (totalResolved >= length) {\n if (preservedValues !== null) {\n this._filter(values, preservedValues);\n } else {\n this._resolve(values);\n }\n return true;\n }\n return false;\n};\n\nMappingPromiseArray.prototype._drainQueue = function () {\n var queue = this._queue;\n var limit = this._limit;\n var values = this._values;\n while (queue.length > 0 && this._inFlight < limit) {\n if (this._isResolved()) return;\n var index = queue.pop();\n this._promiseFulfilled(values[index], index);\n }\n};\n\nMappingPromiseArray.prototype._filter = function (booleans, values) {\n var len = values.length;\n var ret = new Array(len);\n var j = 0;\n for (var i = 0; i < len; ++i) {\n if (booleans[i]) ret[j++] = values[i];\n }\n ret.length = j;\n this._resolve(ret);\n};\n\nMappingPromiseArray.prototype.preservedValues = function () {\n return this._preservedValues;\n};\n\nfunction map(promises, fn, options, _filter) {\n if (typeof fn !== \"function\") {\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\n }\n\n var limit = 0;\n if (options !== undefined) {\n if (typeof options === \"object\" && options !== null) {\n if (typeof options.concurrency !== \"number\") {\n return Promise.reject(\n new TypeError(\"'concurrency' must be a number but it is \" +\n util.classString(options.concurrency)));\n }\n limit = options.concurrency;\n } else {\n return Promise.reject(new TypeError(\n \"options argument must be an object but it is \" +\n util.classString(options)));\n }\n }\n limit = typeof limit === \"number\" &&\n isFinite(limit) && limit >= 1 ? limit : 0;\n return new MappingPromiseArray(promises, fn, limit, _filter).promise();\n}\n\nPromise.prototype.map = function (fn, options) {\n return map(this, fn, options, null);\n};\n\nPromise.map = function (promises, fn, options, _filter) {\n return map(promises, fn, options, _filter);\n};\n\n\n};\n\n},{\"./util\":36}],19:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports =\nfunction(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) {\nvar util = _dereq_(\"./util\");\nvar tryCatch = util.tryCatch;\n\nPromise.method = function (fn) {\n if (typeof fn !== \"function\") {\n throw new Promise.TypeError(\"expecting a function but got \" + util.classString(fn));\n }\n return function () {\n var ret = new Promise(INTERNAL);\n ret._captureStackTrace();\n ret._pushContext();\n var value = tryCatch(fn).apply(this, arguments);\n var promiseCreated = ret._popContext();\n debug.checkForgottenReturns(\n value, promiseCreated, \"Promise.method\", ret);\n ret._resolveFromSyncValue(value);\n return ret;\n };\n};\n\nPromise.attempt = Promise[\"try\"] = function (fn) {\n if (typeof fn !== \"function\") {\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\n }\n var ret = new Promise(INTERNAL);\n ret._captureStackTrace();\n ret._pushContext();\n var value;\n if (arguments.length > 1) {\n debug.deprecated(\"calling Promise.try with more than 1 argument\");\n var arg = arguments[1];\n var ctx = arguments[2];\n value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg)\n : tryCatch(fn).call(ctx, arg);\n } else {\n value = tryCatch(fn)();\n }\n var promiseCreated = ret._popContext();\n debug.checkForgottenReturns(\n value, promiseCreated, \"Promise.try\", ret);\n ret._resolveFromSyncValue(value);\n return ret;\n};\n\nPromise.prototype._resolveFromSyncValue = function (value) {\n if (value === util.errorObj) {\n this._rejectCallback(value.e, false);\n } else {\n this._resolveCallback(value, true);\n }\n};\n};\n\n},{\"./util\":36}],20:[function(_dereq_,module,exports){\n\"use strict\";\nvar util = _dereq_(\"./util\");\nvar maybeWrapAsError = util.maybeWrapAsError;\nvar errors = _dereq_(\"./errors\");\nvar OperationalError = errors.OperationalError;\nvar es5 = _dereq_(\"./es5\");\n\nfunction isUntypedError(obj) {\n return obj instanceof Error &&\n es5.getPrototypeOf(obj) === Error.prototype;\n}\n\nvar rErrorKey = /^(?:name|message|stack|cause)$/;\nfunction wrapAsOperationalError(obj) {\n var ret;\n if (isUntypedError(obj)) {\n ret = new OperationalError(obj);\n ret.name = obj.name;\n ret.message = obj.message;\n ret.stack = obj.stack;\n var keys = es5.keys(obj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!rErrorKey.test(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n }\n util.markAsOriginatingFromRejection(obj);\n return obj;\n}\n\nfunction nodebackForPromise(promise, multiArgs) {\n return function(err, value) {\n if (promise === null) return;\n if (err) {\n var wrapped = wrapAsOperationalError(maybeWrapAsError(err));\n promise._attachExtraTrace(wrapped);\n promise._reject(wrapped);\n } else if (!multiArgs) {\n promise._fulfill(value);\n } else {\n var args = [].slice.call(arguments, 1);;\n promise._fulfill(args);\n }\n promise = null;\n };\n}\n\nmodule.exports = nodebackForPromise;\n\n},{\"./errors\":12,\"./es5\":13,\"./util\":36}],21:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise) {\nvar util = _dereq_(\"./util\");\nvar async = Promise._async;\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\n\nfunction spreadAdapter(val, nodeback) {\n var promise = this;\n if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);\n var ret =\n tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val));\n if (ret === errorObj) {\n async.throwLater(ret.e);\n }\n}\n\nfunction successAdapter(val, nodeback) {\n var promise = this;\n var receiver = promise._boundValue();\n var ret = val === undefined\n ? tryCatch(nodeback).call(receiver, null)\n : tryCatch(nodeback).call(receiver, null, val);\n if (ret === errorObj) {\n async.throwLater(ret.e);\n }\n}\nfunction errorAdapter(reason, nodeback) {\n var promise = this;\n if (!reason) {\n var newReason = new Error(reason + \"\");\n newReason.cause = reason;\n reason = newReason;\n }\n var ret = tryCatch(nodeback).call(promise._boundValue(), reason);\n if (ret === errorObj) {\n async.throwLater(ret.e);\n }\n}\n\nPromise.prototype.asCallback = Promise.prototype.nodeify = function (nodeback,\n options) {\n if (typeof nodeback == \"function\") {\n var adapter = successAdapter;\n if (options !== undefined && Object(options).spread) {\n adapter = spreadAdapter;\n }\n this._then(\n adapter,\n errorAdapter,\n undefined,\n this,\n nodeback\n );\n }\n return this;\n};\n};\n\n},{\"./util\":36}],22:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function() {\nvar makeSelfResolutionError = function () {\n return new TypeError(\"circular promise resolution chain\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n};\nvar reflectHandler = function() {\n return new Promise.PromiseInspection(this._target());\n};\nvar apiRejection = function(msg) {\n return Promise.reject(new TypeError(msg));\n};\nfunction Proxyable() {}\nvar UNDEFINED_BINDING = {};\nvar util = _dereq_(\"./util\");\n\nvar getDomain;\nif (util.isNode) {\n getDomain = function() {\n var ret = process.domain;\n if (ret === undefined) ret = null;\n return ret;\n };\n} else {\n getDomain = function() {\n return null;\n };\n}\nutil.notEnumerableProp(Promise, \"_getDomain\", getDomain);\n\nvar es5 = _dereq_(\"./es5\");\nvar Async = _dereq_(\"./async\");\nvar async = new Async();\nes5.defineProperty(Promise, \"_async\", {value: async});\nvar errors = _dereq_(\"./errors\");\nvar TypeError = Promise.TypeError = errors.TypeError;\nPromise.RangeError = errors.RangeError;\nvar CancellationError = Promise.CancellationError = errors.CancellationError;\nPromise.TimeoutError = errors.TimeoutError;\nPromise.OperationalError = errors.OperationalError;\nPromise.RejectionError = errors.OperationalError;\nPromise.AggregateError = errors.AggregateError;\nvar INTERNAL = function(){};\nvar APPLY = {};\nvar NEXT_FILTER = {};\nvar tryConvertToPromise = _dereq_(\"./thenables\")(Promise, INTERNAL);\nvar PromiseArray =\n _dereq_(\"./promise_array\")(Promise, INTERNAL,\n tryConvertToPromise, apiRejection, Proxyable);\nvar Context = _dereq_(\"./context\")(Promise);\n /*jshint unused:false*/\nvar createContext = Context.create;\nvar debug = _dereq_(\"./debuggability\")(Promise, Context);\nvar CapturedTrace = debug.CapturedTrace;\nvar PassThroughHandlerContext =\n _dereq_(\"./finally\")(Promise, tryConvertToPromise, NEXT_FILTER);\nvar catchFilter = _dereq_(\"./catch_filter\")(NEXT_FILTER);\nvar nodebackForPromise = _dereq_(\"./nodeback\");\nvar errorObj = util.errorObj;\nvar tryCatch = util.tryCatch;\nfunction check(self, executor) {\n if (self == null || self.constructor !== Promise) {\n throw new TypeError(\"the promise constructor cannot be invoked directly\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n if (typeof executor !== \"function\") {\n throw new TypeError(\"expecting a function but got \" + util.classString(executor));\n }\n\n}\n\nfunction Promise(executor) {\n if (executor !== INTERNAL) {\n check(this, executor);\n }\n this._bitField = 0;\n this._fulfillmentHandler0 = undefined;\n this._rejectionHandler0 = undefined;\n this._promise0 = undefined;\n this._receiver0 = undefined;\n this._resolveFromExecutor(executor);\n this._promiseCreated();\n this._fireEvent(\"promiseCreated\", this);\n}\n\nPromise.prototype.toString = function () {\n return \"[object Promise]\";\n};\n\nPromise.prototype.caught = Promise.prototype[\"catch\"] = function (fn) {\n var len = arguments.length;\n if (len > 1) {\n var catchInstances = new Array(len - 1),\n j = 0, i;\n for (i = 0; i < len - 1; ++i) {\n var item = arguments[i];\n if (util.isObject(item)) {\n catchInstances[j++] = item;\n } else {\n return apiRejection(\"Catch statement predicate: \" +\n \"expecting an object but got \" + util.classString(item));\n }\n }\n catchInstances.length = j;\n fn = arguments[i];\n return this.then(undefined, catchFilter(catchInstances, fn, this));\n }\n return this.then(undefined, fn);\n};\n\nPromise.prototype.reflect = function () {\n return this._then(reflectHandler,\n reflectHandler, undefined, this, undefined);\n};\n\nPromise.prototype.then = function (didFulfill, didReject) {\n if (debug.warnings() && arguments.length > 0 &&\n typeof didFulfill !== \"function\" &&\n typeof didReject !== \"function\") {\n var msg = \".then() only accepts functions but was passed: \" +\n util.classString(didFulfill);\n if (arguments.length > 1) {\n msg += \", \" + util.classString(didReject);\n }\n this._warn(msg);\n }\n return this._then(didFulfill, didReject, undefined, undefined, undefined);\n};\n\nPromise.prototype.done = function (didFulfill, didReject) {\n var promise =\n this._then(didFulfill, didReject, undefined, undefined, undefined);\n promise._setIsFinal();\n};\n\nPromise.prototype.spread = function (fn) {\n if (typeof fn !== \"function\") {\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\n }\n return this.all()._then(fn, undefined, undefined, APPLY, undefined);\n};\n\nPromise.prototype.toJSON = function () {\n var ret = {\n isFulfilled: false,\n isRejected: false,\n fulfillmentValue: undefined,\n rejectionReason: undefined\n };\n if (this.isFulfilled()) {\n ret.fulfillmentValue = this.value();\n ret.isFulfilled = true;\n } else if (this.isRejected()) {\n ret.rejectionReason = this.reason();\n ret.isRejected = true;\n }\n return ret;\n};\n\nPromise.prototype.all = function () {\n if (arguments.length > 0) {\n this._warn(\".all() was passed arguments but it does not take any\");\n }\n return new PromiseArray(this).promise();\n};\n\nPromise.prototype.error = function (fn) {\n return this.caught(util.originatesFromRejection, fn);\n};\n\nPromise.getNewLibraryCopy = module.exports;\n\nPromise.is = function (val) {\n return val instanceof Promise;\n};\n\nPromise.fromNode = Promise.fromCallback = function(fn) {\n var ret = new Promise(INTERNAL);\n ret._captureStackTrace();\n var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs\n : false;\n var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs));\n if (result === errorObj) {\n ret._rejectCallback(result.e, true);\n }\n if (!ret._isFateSealed()) ret._setAsyncGuaranteed();\n return ret;\n};\n\nPromise.all = function (promises) {\n return new PromiseArray(promises).promise();\n};\n\nPromise.cast = function (obj) {\n var ret = tryConvertToPromise(obj);\n if (!(ret instanceof Promise)) {\n ret = new Promise(INTERNAL);\n ret._captureStackTrace();\n ret._setFulfilled();\n ret._rejectionHandler0 = obj;\n }\n return ret;\n};\n\nPromise.resolve = Promise.fulfilled = Promise.cast;\n\nPromise.reject = Promise.rejected = function (reason) {\n var ret = new Promise(INTERNAL);\n ret._captureStackTrace();\n ret._rejectCallback(reason, true);\n return ret;\n};\n\nPromise.setScheduler = function(fn) {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"expecting a function but got \" + util.classString(fn));\n }\n return async.setScheduler(fn);\n};\n\nPromise.prototype._then = function (\n didFulfill,\n didReject,\n _, receiver,\n internalData\n) {\n var haveInternalData = internalData !== undefined;\n var promise = haveInternalData ? internalData : new Promise(INTERNAL);\n var target = this._target();\n var bitField = target._bitField;\n\n if (!haveInternalData) {\n promise._propagateFrom(this, 3);\n promise._captureStackTrace();\n if (receiver === undefined &&\n ((this._bitField & 2097152) !== 0)) {\n if (!((bitField & 50397184) === 0)) {\n receiver = this._boundValue();\n } else {\n receiver = target === this ? undefined : this._boundTo;\n }\n }\n this._fireEvent(\"promiseChained\", this, promise);\n }\n\n var domain = getDomain();\n if (!((bitField & 50397184) === 0)) {\n var handler, value, settler = target._settlePromiseCtx;\n if (((bitField & 33554432) !== 0)) {\n value = target._rejectionHandler0;\n handler = didFulfill;\n } else if (((bitField & 16777216) !== 0)) {\n value = target._fulfillmentHandler0;\n handler = didReject;\n target._unsetRejectionIsUnhandled();\n } else {\n settler = target._settlePromiseLateCancellationObserver;\n value = new CancellationError(\"late cancellation observer\");\n target._attachExtraTrace(value);\n handler = didReject;\n }\n\n async.invoke(settler, target, {\n handler: domain === null ? handler\n : (typeof handler === \"function\" &&\n util.domainBind(domain, handler)),\n promise: promise,\n receiver: receiver,\n value: value\n });\n } else {\n target._addCallbacks(didFulfill, didReject, promise, receiver, domain);\n }\n\n return promise;\n};\n\nPromise.prototype._length = function () {\n return this._bitField & 65535;\n};\n\nPromise.prototype._isFateSealed = function () {\n return (this._bitField & 117506048) !== 0;\n};\n\nPromise.prototype._isFollowing = function () {\n return (this._bitField & 67108864) === 67108864;\n};\n\nPromise.prototype._setLength = function (len) {\n this._bitField = (this._bitField & -65536) |\n (len & 65535);\n};\n\nPromise.prototype._setFulfilled = function () {\n this._bitField = this._bitField | 33554432;\n this._fireEvent(\"promiseFulfilled\", this);\n};\n\nPromise.prototype._setRejected = function () {\n this._bitField = this._bitField | 16777216;\n this._fireEvent(\"promiseRejected\", this);\n};\n\nPromise.prototype._setFollowing = function () {\n this._bitField = this._bitField | 67108864;\n this._fireEvent(\"promiseResolved\", this);\n};\n\nPromise.prototype._setIsFinal = function () {\n this._bitField = this._bitField | 4194304;\n};\n\nPromise.prototype._isFinal = function () {\n return (this._bitField & 4194304) > 0;\n};\n\nPromise.prototype._unsetCancelled = function() {\n this._bitField = this._bitField & (~65536);\n};\n\nPromise.prototype._setCancelled = function() {\n this._bitField = this._bitField | 65536;\n this._fireEvent(\"promiseCancelled\", this);\n};\n\nPromise.prototype._setWillBeCancelled = function() {\n this._bitField = this._bitField | 8388608;\n};\n\nPromise.prototype._setAsyncGuaranteed = function() {\n if (async.hasCustomScheduler()) return;\n this._bitField = this._bitField | 134217728;\n};\n\nPromise.prototype._receiverAt = function (index) {\n var ret = index === 0 ? this._receiver0 : this[\n index * 4 - 4 + 3];\n if (ret === UNDEFINED_BINDING) {\n return undefined;\n } else if (ret === undefined && this._isBound()) {\n return this._boundValue();\n }\n return ret;\n};\n\nPromise.prototype._promiseAt = function (index) {\n return this[\n index * 4 - 4 + 2];\n};\n\nPromise.prototype._fulfillmentHandlerAt = function (index) {\n return this[\n index * 4 - 4 + 0];\n};\n\nPromise.prototype._rejectionHandlerAt = function (index) {\n return this[\n index * 4 - 4 + 1];\n};\n\nPromise.prototype._boundValue = function() {};\n\nPromise.prototype._migrateCallback0 = function (follower) {\n var bitField = follower._bitField;\n var fulfill = follower._fulfillmentHandler0;\n var reject = follower._rejectionHandler0;\n var promise = follower._promise0;\n var receiver = follower._receiverAt(0);\n if (receiver === undefined) receiver = UNDEFINED_BINDING;\n this._addCallbacks(fulfill, reject, promise, receiver, null);\n};\n\nPromise.prototype._migrateCallbackAt = function (follower, index) {\n var fulfill = follower._fulfillmentHandlerAt(index);\n var reject = follower._rejectionHandlerAt(index);\n var promise = follower._promiseAt(index);\n var receiver = follower._receiverAt(index);\n if (receiver === undefined) receiver = UNDEFINED_BINDING;\n this._addCallbacks(fulfill, reject, promise, receiver, null);\n};\n\nPromise.prototype._addCallbacks = function (\n fulfill,\n reject,\n promise,\n receiver,\n domain\n) {\n var index = this._length();\n\n if (index >= 65535 - 4) {\n index = 0;\n this._setLength(0);\n }\n\n if (index === 0) {\n this._promise0 = promise;\n this._receiver0 = receiver;\n if (typeof fulfill === \"function\") {\n this._fulfillmentHandler0 =\n domain === null ? fulfill : util.domainBind(domain, fulfill);\n }\n if (typeof reject === \"function\") {\n this._rejectionHandler0 =\n domain === null ? reject : util.domainBind(domain, reject);\n }\n } else {\n var base = index * 4 - 4;\n this[base + 2] = promise;\n this[base + 3] = receiver;\n if (typeof fulfill === \"function\") {\n this[base + 0] =\n domain === null ? fulfill : util.domainBind(domain, fulfill);\n }\n if (typeof reject === \"function\") {\n this[base + 1] =\n domain === null ? reject : util.domainBind(domain, reject);\n }\n }\n this._setLength(index + 1);\n return index;\n};\n\nPromise.prototype._proxy = function (proxyable, arg) {\n this._addCallbacks(undefined, undefined, arg, proxyable, null);\n};\n\nPromise.prototype._resolveCallback = function(value, shouldBind) {\n if (((this._bitField & 117506048) !== 0)) return;\n if (value === this)\n return this._rejectCallback(makeSelfResolutionError(), false);\n var maybePromise = tryConvertToPromise(value, this);\n if (!(maybePromise instanceof Promise)) return this._fulfill(value);\n\n if (shouldBind) this._propagateFrom(maybePromise, 2);\n\n var promise = maybePromise._target();\n\n if (promise === this) {\n this._reject(makeSelfResolutionError());\n return;\n }\n\n var bitField = promise._bitField;\n if (((bitField & 50397184) === 0)) {\n var len = this._length();\n if (len > 0) promise._migrateCallback0(this);\n for (var i = 1; i < len; ++i) {\n promise._migrateCallbackAt(this, i);\n }\n this._setFollowing();\n this._setLength(0);\n this._setFollowee(promise);\n } else if (((bitField & 33554432) !== 0)) {\n this._fulfill(promise._value());\n } else if (((bitField & 16777216) !== 0)) {\n this._reject(promise._reason());\n } else {\n var reason = new CancellationError(\"late cancellation observer\");\n promise._attachExtraTrace(reason);\n this._reject(reason);\n }\n};\n\nPromise.prototype._rejectCallback =\nfunction(reason, synchronous, ignoreNonErrorWarnings) {\n var trace = util.ensureErrorObject(reason);\n var hasStack = trace === reason;\n if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) {\n var message = \"a promise was rejected with a non-error: \" +\n util.classString(reason);\n this._warn(message, true);\n }\n this._attachExtraTrace(trace, synchronous ? hasStack : false);\n this._reject(reason);\n};\n\nPromise.prototype._resolveFromExecutor = function (executor) {\n if (executor === INTERNAL) return;\n var promise = this;\n this._captureStackTrace();\n this._pushContext();\n var synchronous = true;\n var r = this._execute(executor, function(value) {\n promise._resolveCallback(value);\n }, function (reason) {\n promise._rejectCallback(reason, synchronous);\n });\n synchronous = false;\n this._popContext();\n\n if (r !== undefined) {\n promise._rejectCallback(r, true);\n }\n};\n\nPromise.prototype._settlePromiseFromHandler = function (\n handler, receiver, value, promise\n) {\n var bitField = promise._bitField;\n if (((bitField & 65536) !== 0)) return;\n promise._pushContext();\n var x;\n if (receiver === APPLY) {\n if (!value || typeof value.length !== \"number\") {\n x = errorObj;\n x.e = new TypeError(\"cannot .spread() a non-array: \" +\n util.classString(value));\n } else {\n x = tryCatch(handler).apply(this._boundValue(), value);\n }\n } else {\n x = tryCatch(handler).call(receiver, value);\n }\n var promiseCreated = promise._popContext();\n bitField = promise._bitField;\n if (((bitField & 65536) !== 0)) return;\n\n if (x === NEXT_FILTER) {\n promise._reject(value);\n } else if (x === errorObj) {\n promise._rejectCallback(x.e, false);\n } else {\n debug.checkForgottenReturns(x, promiseCreated, \"\", promise, this);\n promise._resolveCallback(x);\n }\n};\n\nPromise.prototype._target = function() {\n var ret = this;\n while (ret._isFollowing()) ret = ret._followee();\n return ret;\n};\n\nPromise.prototype._followee = function() {\n return this._rejectionHandler0;\n};\n\nPromise.prototype._setFollowee = function(promise) {\n this._rejectionHandler0 = promise;\n};\n\nPromise.prototype._settlePromise = function(promise, handler, receiver, value) {\n var isPromise = promise instanceof Promise;\n var bitField = this._bitField;\n var asyncGuaranteed = ((bitField & 134217728) !== 0);\n if (((bitField & 65536) !== 0)) {\n if (isPromise) promise._invokeInternalOnCancel();\n\n if (receiver instanceof PassThroughHandlerContext &&\n receiver.isFinallyHandler()) {\n receiver.cancelPromise = promise;\n if (tryCatch(handler).call(receiver, value) === errorObj) {\n promise._reject(errorObj.e);\n }\n } else if (handler === reflectHandler) {\n promise._fulfill(reflectHandler.call(receiver));\n } else if (receiver instanceof Proxyable) {\n receiver._promiseCancelled(promise);\n } else if (isPromise || promise instanceof PromiseArray) {\n promise._cancel();\n } else {\n receiver.cancel();\n }\n } else if (typeof handler === \"function\") {\n if (!isPromise) {\n handler.call(receiver, value, promise);\n } else {\n if (asyncGuaranteed) promise._setAsyncGuaranteed();\n this._settlePromiseFromHandler(handler, receiver, value, promise);\n }\n } else if (receiver instanceof Proxyable) {\n if (!receiver._isResolved()) {\n if (((bitField & 33554432) !== 0)) {\n receiver._promiseFulfilled(value, promise);\n } else {\n receiver._promiseRejected(value, promise);\n }\n }\n } else if (isPromise) {\n if (asyncGuaranteed) promise._setAsyncGuaranteed();\n if (((bitField & 33554432) !== 0)) {\n promise._fulfill(value);\n } else {\n promise._reject(value);\n }\n }\n};\n\nPromise.prototype._settlePromiseLateCancellationObserver = function(ctx) {\n var handler = ctx.handler;\n var promise = ctx.promise;\n var receiver = ctx.receiver;\n var value = ctx.value;\n if (typeof handler === \"function\") {\n if (!(promise instanceof Promise)) {\n handler.call(receiver, value, promise);\n } else {\n this._settlePromiseFromHandler(handler, receiver, value, promise);\n }\n } else if (promise instanceof Promise) {\n promise._reject(value);\n }\n};\n\nPromise.prototype._settlePromiseCtx = function(ctx) {\n this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value);\n};\n\nPromise.prototype._settlePromise0 = function(handler, value, bitField) {\n var promise = this._promise0;\n var receiver = this._receiverAt(0);\n this._promise0 = undefined;\n this._receiver0 = undefined;\n this._settlePromise(promise, handler, receiver, value);\n};\n\nPromise.prototype._clearCallbackDataAtIndex = function(index) {\n var base = index * 4 - 4;\n this[base + 2] =\n this[base + 3] =\n this[base + 0] =\n this[base + 1] = undefined;\n};\n\nPromise.prototype._fulfill = function (value) {\n var bitField = this._bitField;\n if (((bitField & 117506048) >>> 16)) return;\n if (value === this) {\n var err = makeSelfResolutionError();\n this._attachExtraTrace(err);\n return this._reject(err);\n }\n this._setFulfilled();\n this._rejectionHandler0 = value;\n\n if ((bitField & 65535) > 0) {\n if (((bitField & 134217728) !== 0)) {\n this._settlePromises();\n } else {\n async.settlePromises(this);\n }\n }\n};\n\nPromise.prototype._reject = function (reason) {\n var bitField = this._bitField;\n if (((bitField & 117506048) >>> 16)) return;\n this._setRejected();\n this._fulfillmentHandler0 = reason;\n\n if (this._isFinal()) {\n return async.fatalError(reason, util.isNode);\n }\n\n if ((bitField & 65535) > 0) {\n async.settlePromises(this);\n } else {\n this._ensurePossibleRejectionHandled();\n }\n};\n\nPromise.prototype._fulfillPromises = function (len, value) {\n for (var i = 1; i < len; i++) {\n var handler = this._fulfillmentHandlerAt(i);\n var promise = this._promiseAt(i);\n var receiver = this._receiverAt(i);\n this._clearCallbackDataAtIndex(i);\n this._settlePromise(promise, handler, receiver, value);\n }\n};\n\nPromise.prototype._rejectPromises = function (len, reason) {\n for (var i = 1; i < len; i++) {\n var handler = this._rejectionHandlerAt(i);\n var promise = this._promiseAt(i);\n var receiver = this._receiverAt(i);\n this._clearCallbackDataAtIndex(i);\n this._settlePromise(promise, handler, receiver, reason);\n }\n};\n\nPromise.prototype._settlePromises = function () {\n var bitField = this._bitField;\n var len = (bitField & 65535);\n\n if (len > 0) {\n if (((bitField & 16842752) !== 0)) {\n var reason = this._fulfillmentHandler0;\n this._settlePromise0(this._rejectionHandler0, reason, bitField);\n this._rejectPromises(len, reason);\n } else {\n var value = this._rejectionHandler0;\n this._settlePromise0(this._fulfillmentHandler0, value, bitField);\n this._fulfillPromises(len, value);\n }\n this._setLength(0);\n }\n this._clearCancellationData();\n};\n\nPromise.prototype._settledValue = function() {\n var bitField = this._bitField;\n if (((bitField & 33554432) !== 0)) {\n return this._rejectionHandler0;\n } else if (((bitField & 16777216) !== 0)) {\n return this._fulfillmentHandler0;\n }\n};\n\nfunction deferResolve(v) {this.promise._resolveCallback(v);}\nfunction deferReject(v) {this.promise._rejectCallback(v, false);}\n\nPromise.defer = Promise.pending = function() {\n debug.deprecated(\"Promise.defer\", \"new Promise\");\n var promise = new Promise(INTERNAL);\n return {\n promise: promise,\n resolve: deferResolve,\n reject: deferReject\n };\n};\n\nutil.notEnumerableProp(Promise,\n \"_makeSelfResolutionError\",\n makeSelfResolutionError);\n\n_dereq_(\"./method\")(Promise, INTERNAL, tryConvertToPromise, apiRejection,\n debug);\n_dereq_(\"./bind\")(Promise, INTERNAL, tryConvertToPromise, debug);\n_dereq_(\"./cancel\")(Promise, PromiseArray, apiRejection, debug);\n_dereq_(\"./direct_resolve\")(Promise);\n_dereq_(\"./synchronous_inspection\")(Promise);\n_dereq_(\"./join\")(\n Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain);\nPromise.Promise = Promise;\nPromise.version = \"3.5.1\";\n_dereq_('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);\n_dereq_('./call_get.js')(Promise);\n_dereq_('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug);\n_dereq_('./timers.js')(Promise, INTERNAL, debug);\n_dereq_('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug);\n_dereq_('./nodeify.js')(Promise);\n_dereq_('./promisify.js')(Promise, INTERNAL);\n_dereq_('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection);\n_dereq_('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection);\n_dereq_('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);\n_dereq_('./settle.js')(Promise, PromiseArray, debug);\n_dereq_('./some.js')(Promise, PromiseArray, apiRejection);\n_dereq_('./filter.js')(Promise, INTERNAL);\n_dereq_('./each.js')(Promise, INTERNAL);\n_dereq_('./any.js')(Promise);\n \n util.toFastProperties(Promise); \n util.toFastProperties(Promise.prototype); \n function fillTypes(value) { \n var p = new Promise(INTERNAL); \n p._fulfillmentHandler0 = value; \n p._rejectionHandler0 = value; \n p._promise0 = value; \n p._receiver0 = value; \n } \n // Complete slack tracking, opt out of field-type tracking and \n // stabilize map \n fillTypes({a: 1}); \n fillTypes({b: 2}); \n fillTypes({c: 3}); \n fillTypes(1); \n fillTypes(function(){}); \n fillTypes(undefined); \n fillTypes(false); \n fillTypes(new Promise(INTERNAL)); \n debug.setBounds(Async.firstLineError, util.lastLineError); \n return Promise; \n\n};\n\n},{\"./any.js\":1,\"./async\":2,\"./bind\":3,\"./call_get.js\":5,\"./cancel\":6,\"./catch_filter\":7,\"./context\":8,\"./debuggability\":9,\"./direct_resolve\":10,\"./each.js\":11,\"./errors\":12,\"./es5\":13,\"./filter.js\":14,\"./finally\":15,\"./generators.js\":16,\"./join\":17,\"./map.js\":18,\"./method\":19,\"./nodeback\":20,\"./nodeify.js\":21,\"./promise_array\":23,\"./promisify.js\":24,\"./props.js\":25,\"./race.js\":27,\"./reduce.js\":28,\"./settle.js\":30,\"./some.js\":31,\"./synchronous_inspection\":32,\"./thenables\":33,\"./timers.js\":34,\"./using.js\":35,\"./util\":36}],23:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL, tryConvertToPromise,\n apiRejection, Proxyable) {\nvar util = _dereq_(\"./util\");\nvar isArray = util.isArray;\n\nfunction toResolutionValue(val) {\n switch(val) {\n case -2: return [];\n case -3: return {};\n case -6: return new Map();\n }\n}\n\nfunction PromiseArray(values) {\n var promise = this._promise = new Promise(INTERNAL);\n if (values instanceof Promise) {\n promise._propagateFrom(values, 3);\n }\n promise._setOnCancel(this);\n this._values = values;\n this._length = 0;\n this._totalResolved = 0;\n this._init(undefined, -2);\n}\nutil.inherits(PromiseArray, Proxyable);\n\nPromiseArray.prototype.length = function () {\n return this._length;\n};\n\nPromiseArray.prototype.promise = function () {\n return this._promise;\n};\n\nPromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {\n var values = tryConvertToPromise(this._values, this._promise);\n if (values instanceof Promise) {\n values = values._target();\n var bitField = values._bitField;\n ;\n this._values = values;\n\n if (((bitField & 50397184) === 0)) {\n this._promise._setAsyncGuaranteed();\n return values._then(\n init,\n this._reject,\n undefined,\n this,\n resolveValueIfEmpty\n );\n } else if (((bitField & 33554432) !== 0)) {\n values = values._value();\n } else if (((bitField & 16777216) !== 0)) {\n return this._reject(values._reason());\n } else {\n return this._cancel();\n }\n }\n values = util.asArray(values);\n if (values === null) {\n var err = apiRejection(\n \"expecting an array or an iterable object but got \" + util.classString(values)).reason();\n this._promise._rejectCallback(err, false);\n return;\n }\n\n if (values.length === 0) {\n if (resolveValueIfEmpty === -5) {\n this._resolveEmptyArray();\n }\n else {\n this._resolve(toResolutionValue(resolveValueIfEmpty));\n }\n return;\n }\n this._iterate(values);\n};\n\nPromiseArray.prototype._iterate = function(values) {\n var len = this.getActualLength(values.length);\n this._length = len;\n this._values = this.shouldCopyValues() ? new Array(len) : this._values;\n var result = this._promise;\n var isResolved = false;\n var bitField = null;\n for (var i = 0; i < len; ++i) {\n var maybePromise = tryConvertToPromise(values[i], result);\n\n if (maybePromise instanceof Promise) {\n maybePromise = maybePromise._target();\n bitField = maybePromise._bitField;\n } else {\n bitField = null;\n }\n\n if (isResolved) {\n if (bitField !== null) {\n maybePromise.suppressUnhandledRejections();\n }\n } else if (bitField !== null) {\n if (((bitField & 50397184) === 0)) {\n maybePromise._proxy(this, i);\n this._values[i] = maybePromise;\n } else if (((bitField & 33554432) !== 0)) {\n isResolved = this._promiseFulfilled(maybePromise._value(), i);\n } else if (((bitField & 16777216) !== 0)) {\n isResolved = this._promiseRejected(maybePromise._reason(), i);\n } else {\n isResolved = this._promiseCancelled(i);\n }\n } else {\n isResolved = this._promiseFulfilled(maybePromise, i);\n }\n }\n if (!isResolved) result._setAsyncGuaranteed();\n};\n\nPromiseArray.prototype._isResolved = function () {\n return this._values === null;\n};\n\nPromiseArray.prototype._resolve = function (value) {\n this._values = null;\n this._promise._fulfill(value);\n};\n\nPromiseArray.prototype._cancel = function() {\n if (this._isResolved() || !this._promise._isCancellable()) return;\n this._values = null;\n this._promise._cancel();\n};\n\nPromiseArray.prototype._reject = function (reason) {\n this._values = null;\n this._promise._rejectCallback(reason, false);\n};\n\nPromiseArray.prototype._promiseFulfilled = function (value, index) {\n this._values[index] = value;\n var totalResolved = ++this._totalResolved;\n if (totalResolved >= this._length) {\n this._resolve(this._values);\n return true;\n }\n return false;\n};\n\nPromiseArray.prototype._promiseCancelled = function() {\n this._cancel();\n return true;\n};\n\nPromiseArray.prototype._promiseRejected = function (reason) {\n this._totalResolved++;\n this._reject(reason);\n return true;\n};\n\nPromiseArray.prototype._resultCancelled = function() {\n if (this._isResolved()) return;\n var values = this._values;\n this._cancel();\n if (values instanceof Promise) {\n values.cancel();\n } else {\n for (var i = 0; i < values.length; ++i) {\n if (values[i] instanceof Promise) {\n values[i].cancel();\n }\n }\n }\n};\n\nPromiseArray.prototype.shouldCopyValues = function () {\n return true;\n};\n\nPromiseArray.prototype.getActualLength = function (len) {\n return len;\n};\n\nreturn PromiseArray;\n};\n\n},{\"./util\":36}],24:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL) {\nvar THIS = {};\nvar util = _dereq_(\"./util\");\nvar nodebackForPromise = _dereq_(\"./nodeback\");\nvar withAppended = util.withAppended;\nvar maybeWrapAsError = util.maybeWrapAsError;\nvar canEvaluate = util.canEvaluate;\nvar TypeError = _dereq_(\"./errors\").TypeError;\nvar defaultSuffix = \"Async\";\nvar defaultPromisified = {__isPromisified__: true};\nvar noCopyProps = [\n \"arity\", \"length\",\n \"name\",\n \"arguments\",\n \"caller\",\n \"callee\",\n \"prototype\",\n \"__isPromisified__\"\n];\nvar noCopyPropsPattern = new RegExp(\"^(?:\" + noCopyProps.join(\"|\") + \")$\");\n\nvar defaultFilter = function(name) {\n return util.isIdentifier(name) &&\n name.charAt(0) !== \"_\" &&\n name !== \"constructor\";\n};\n\nfunction propsFilter(key) {\n return !noCopyPropsPattern.test(key);\n}\n\nfunction isPromisified(fn) {\n try {\n return fn.__isPromisified__ === true;\n }\n catch (e) {\n return false;\n }\n}\n\nfunction hasPromisified(obj, key, suffix) {\n var val = util.getDataPropertyOrDefault(obj, key + suffix,\n defaultPromisified);\n return val ? isPromisified(val) : false;\n}\nfunction checkValid(ret, suffix, suffixRegexp) {\n for (var i = 0; i < ret.length; i += 2) {\n var key = ret[i];\n if (suffixRegexp.test(key)) {\n var keyWithoutAsyncSuffix = key.replace(suffixRegexp, \"\");\n for (var j = 0; j < ret.length; j += 2) {\n if (ret[j] === keyWithoutAsyncSuffix) {\n throw new TypeError(\"Cannot promisify an API that has normal methods with '%s'-suffix\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\"\n .replace(\"%s\", suffix));\n }\n }\n }\n }\n}\n\nfunction promisifiableMethods(obj, suffix, suffixRegexp, filter) {\n var keys = util.inheritedDataKeys(obj);\n var ret = [];\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var value = obj[key];\n var passesDefaultFilter = filter === defaultFilter\n ? true : defaultFilter(key, value, obj);\n if (typeof value === \"function\" &&\n !isPromisified(value) &&\n !hasPromisified(obj, key, suffix) &&\n filter(key, value, obj, passesDefaultFilter)) {\n ret.push(key, value);\n }\n }\n checkValid(ret, suffix, suffixRegexp);\n return ret;\n}\n\nvar escapeIdentRegex = function(str) {\n return str.replace(/([$])/, \"\\\\$\");\n};\n\nvar makeNodePromisifiedEval;\nif (!true) {\nvar switchCaseArgumentOrder = function(likelyArgumentCount) {\n var ret = [likelyArgumentCount];\n var min = Math.max(0, likelyArgumentCount - 1 - 3);\n for(var i = likelyArgumentCount - 1; i >= min; --i) {\n ret.push(i);\n }\n for(var i = likelyArgumentCount + 1; i <= 3; ++i) {\n ret.push(i);\n }\n return ret;\n};\n\nvar argumentSequence = function(argumentCount) {\n return util.filledRange(argumentCount, \"_arg\", \"\");\n};\n\nvar parameterDeclaration = function(parameterCount) {\n return util.filledRange(\n Math.max(parameterCount, 3), \"_arg\", \"\");\n};\n\nvar parameterCount = function(fn) {\n if (typeof fn.length === \"number\") {\n return Math.max(Math.min(fn.length, 1023 + 1), 0);\n }\n return 0;\n};\n\nmakeNodePromisifiedEval =\nfunction(callback, receiver, originalName, fn, _, multiArgs) {\n var newParameterCount = Math.max(0, parameterCount(fn) - 1);\n var argumentOrder = switchCaseArgumentOrder(newParameterCount);\n var shouldProxyThis = typeof callback === \"string\" || receiver === THIS;\n\n function generateCallForArgumentCount(count) {\n var args = argumentSequence(count).join(\", \");\n var comma = count > 0 ? \", \" : \"\";\n var ret;\n if (shouldProxyThis) {\n ret = \"ret = callback.call(this, {{args}}, nodeback); break;\\n\";\n } else {\n ret = receiver === undefined\n ? \"ret = callback({{args}}, nodeback); break;\\n\"\n : \"ret = callback.call(receiver, {{args}}, nodeback); break;\\n\";\n }\n return ret.replace(\"{{args}}\", args).replace(\", \", comma);\n }\n\n function generateArgumentSwitchCase() {\n var ret = \"\";\n for (var i = 0; i < argumentOrder.length; ++i) {\n ret += \"case \" + argumentOrder[i] +\":\" +\n generateCallForArgumentCount(argumentOrder[i]);\n }\n\n ret += \" \\n\\\n default: \\n\\\n var args = new Array(len + 1); \\n\\\n var i = 0; \\n\\\n for (var i = 0; i < len; ++i) { \\n\\\n args[i] = arguments[i]; \\n\\\n } \\n\\\n args[i] = nodeback; \\n\\\n [CodeForCall] \\n\\\n break; \\n\\\n \".replace(\"[CodeForCall]\", (shouldProxyThis\n ? \"ret = callback.apply(this, args);\\n\"\n : \"ret = callback.apply(receiver, args);\\n\"));\n return ret;\n }\n\n var getFunctionCode = typeof callback === \"string\"\n ? (\"this != null ? this['\"+callback+\"'] : fn\")\n : \"fn\";\n var body = \"'use strict'; \\n\\\n var ret = function (Parameters) { \\n\\\n 'use strict'; \\n\\\n var len = arguments.length; \\n\\\n var promise = new Promise(INTERNAL); \\n\\\n promise._captureStackTrace(); \\n\\\n var nodeback = nodebackForPromise(promise, \" + multiArgs + \"); \\n\\\n var ret; \\n\\\n var callback = tryCatch([GetFunctionCode]); \\n\\\n switch(len) { \\n\\\n [CodeForSwitchCase] \\n\\\n } \\n\\\n if (ret === errorObj) { \\n\\\n promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\\n\\\n } \\n\\\n if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \\n\\\n return promise; \\n\\\n }; \\n\\\n notEnumerableProp(ret, '__isPromisified__', true); \\n\\\n return ret; \\n\\\n \".replace(\"[CodeForSwitchCase]\", generateArgumentSwitchCase())\n .replace(\"[GetFunctionCode]\", getFunctionCode);\n body = body.replace(\"Parameters\", parameterDeclaration(newParameterCount));\n return new Function(\"Promise\",\n \"fn\",\n \"receiver\",\n \"withAppended\",\n \"maybeWrapAsError\",\n \"nodebackForPromise\",\n \"tryCatch\",\n \"errorObj\",\n \"notEnumerableProp\",\n \"INTERNAL\",\n body)(\n Promise,\n fn,\n receiver,\n withAppended,\n maybeWrapAsError,\n nodebackForPromise,\n util.tryCatch,\n util.errorObj,\n util.notEnumerableProp,\n INTERNAL);\n};\n}\n\nfunction makeNodePromisifiedClosure(callback, receiver, _, fn, __, multiArgs) {\n var defaultThis = (function() {return this;})();\n var method = callback;\n if (typeof method === \"string\") {\n callback = fn;\n }\n function promisified() {\n var _receiver = receiver;\n if (receiver === THIS) _receiver = this;\n var promise = new Promise(INTERNAL);\n promise._captureStackTrace();\n var cb = typeof method === \"string\" && this !== defaultThis\n ? this[method] : callback;\n var fn = nodebackForPromise(promise, multiArgs);\n try {\n cb.apply(_receiver, withAppended(arguments, fn));\n } catch(e) {\n promise._rejectCallback(maybeWrapAsError(e), true, true);\n }\n if (!promise._isFateSealed()) promise._setAsyncGuaranteed();\n return promise;\n }\n util.notEnumerableProp(promisified, \"__isPromisified__\", true);\n return promisified;\n}\n\nvar makeNodePromisified = canEvaluate\n ? makeNodePromisifiedEval\n : makeNodePromisifiedClosure;\n\nfunction promisifyAll(obj, suffix, filter, promisifier, multiArgs) {\n var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + \"$\");\n var methods =\n promisifiableMethods(obj, suffix, suffixRegexp, filter);\n\n for (var i = 0, len = methods.length; i < len; i+= 2) {\n var key = methods[i];\n var fn = methods[i+1];\n var promisifiedKey = key + suffix;\n if (promisifier === makeNodePromisified) {\n obj[promisifiedKey] =\n makeNodePromisified(key, THIS, key, fn, suffix, multiArgs);\n } else {\n var promisified = promisifier(fn, function() {\n return makeNodePromisified(key, THIS, key,\n fn, suffix, multiArgs);\n });\n util.notEnumerableProp(promisified, \"__isPromisified__\", true);\n obj[promisifiedKey] = promisified;\n }\n }\n util.toFastProperties(obj);\n return obj;\n}\n\nfunction promisify(callback, receiver, multiArgs) {\n return makeNodePromisified(callback, receiver, undefined,\n callback, null, multiArgs);\n}\n\nPromise.promisify = function (fn, options) {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"expecting a function but got \" + util.classString(fn));\n }\n if (isPromisified(fn)) {\n return fn;\n }\n options = Object(options);\n var receiver = options.context === undefined ? THIS : options.context;\n var multiArgs = !!options.multiArgs;\n var ret = promisify(fn, receiver, multiArgs);\n util.copyDescriptors(fn, ret, propsFilter);\n return ret;\n};\n\nPromise.promisifyAll = function (target, options) {\n if (typeof target !== \"function\" && typeof target !== \"object\") {\n throw new TypeError(\"the target of promisifyAll must be an object or a function\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n options = Object(options);\n var multiArgs = !!options.multiArgs;\n var suffix = options.suffix;\n if (typeof suffix !== \"string\") suffix = defaultSuffix;\n var filter = options.filter;\n if (typeof filter !== \"function\") filter = defaultFilter;\n var promisifier = options.promisifier;\n if (typeof promisifier !== \"function\") promisifier = makeNodePromisified;\n\n if (!util.isIdentifier(suffix)) {\n throw new RangeError(\"suffix must be a valid identifier\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n\n var keys = util.inheritedDataKeys(target);\n for (var i = 0; i < keys.length; ++i) {\n var value = target[keys[i]];\n if (keys[i] !== \"constructor\" &&\n util.isClass(value)) {\n promisifyAll(value.prototype, suffix, filter, promisifier,\n multiArgs);\n promisifyAll(value, suffix, filter, promisifier, multiArgs);\n }\n }\n\n return promisifyAll(target, suffix, filter, promisifier, multiArgs);\n};\n};\n\n\n},{\"./errors\":12,\"./nodeback\":20,\"./util\":36}],25:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(\n Promise, PromiseArray, tryConvertToPromise, apiRejection) {\nvar util = _dereq_(\"./util\");\nvar isObject = util.isObject;\nvar es5 = _dereq_(\"./es5\");\nvar Es6Map;\nif (typeof Map === \"function\") Es6Map = Map;\n\nvar mapToEntries = (function() {\n var index = 0;\n var size = 0;\n\n function extractEntry(value, key) {\n this[index] = value;\n this[index + size] = key;\n index++;\n }\n\n return function mapToEntries(map) {\n size = map.size;\n index = 0;\n var ret = new Array(map.size * 2);\n map.forEach(extractEntry, ret);\n return ret;\n };\n})();\n\nvar entriesToMap = function(entries) {\n var ret = new Es6Map();\n var length = entries.length / 2 | 0;\n for (var i = 0; i < length; ++i) {\n var key = entries[length + i];\n var value = entries[i];\n ret.set(key, value);\n }\n return ret;\n};\n\nfunction PropertiesPromiseArray(obj) {\n var isMap = false;\n var entries;\n if (Es6Map !== undefined && obj instanceof Es6Map) {\n entries = mapToEntries(obj);\n isMap = true;\n } else {\n var keys = es5.keys(obj);\n var len = keys.length;\n entries = new Array(len * 2);\n for (var i = 0; i < len; ++i) {\n var key = keys[i];\n entries[i] = obj[key];\n entries[i + len] = key;\n }\n }\n this.constructor$(entries);\n this._isMap = isMap;\n this._init$(undefined, isMap ? -6 : -3);\n}\nutil.inherits(PropertiesPromiseArray, PromiseArray);\n\nPropertiesPromiseArray.prototype._init = function () {};\n\nPropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) {\n this._values[index] = value;\n var totalResolved = ++this._totalResolved;\n if (totalResolved >= this._length) {\n var val;\n if (this._isMap) {\n val = entriesToMap(this._values);\n } else {\n val = {};\n var keyOffset = this.length();\n for (var i = 0, len = this.length(); i < len; ++i) {\n val[this._values[i + keyOffset]] = this._values[i];\n }\n }\n this._resolve(val);\n return true;\n }\n return false;\n};\n\nPropertiesPromiseArray.prototype.shouldCopyValues = function () {\n return false;\n};\n\nPropertiesPromiseArray.prototype.getActualLength = function (len) {\n return len >> 1;\n};\n\nfunction props(promises) {\n var ret;\n var castValue = tryConvertToPromise(promises);\n\n if (!isObject(castValue)) {\n return apiRejection(\"cannot await properties of a non-object\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n } else if (castValue instanceof Promise) {\n ret = castValue._then(\n Promise.props, undefined, undefined, undefined, undefined);\n } else {\n ret = new PropertiesPromiseArray(castValue).promise();\n }\n\n if (castValue instanceof Promise) {\n ret._propagateFrom(castValue, 2);\n }\n return ret;\n}\n\nPromise.prototype.props = function () {\n return props(this);\n};\n\nPromise.props = function (promises) {\n return props(promises);\n};\n};\n\n},{\"./es5\":13,\"./util\":36}],26:[function(_dereq_,module,exports){\n\"use strict\";\nfunction arrayMove(src, srcIndex, dst, dstIndex, len) {\n for (var j = 0; j < len; ++j) {\n dst[j + dstIndex] = src[j + srcIndex];\n src[j + srcIndex] = void 0;\n }\n}\n\nfunction Queue(capacity) {\n this._capacity = capacity;\n this._length = 0;\n this._front = 0;\n}\n\nQueue.prototype._willBeOverCapacity = function (size) {\n return this._capacity < size;\n};\n\nQueue.prototype._pushOne = function (arg) {\n var length = this.length();\n this._checkCapacity(length + 1);\n var i = (this._front + length) & (this._capacity - 1);\n this[i] = arg;\n this._length = length + 1;\n};\n\nQueue.prototype.push = function (fn, receiver, arg) {\n var length = this.length() + 3;\n if (this._willBeOverCapacity(length)) {\n this._pushOne(fn);\n this._pushOne(receiver);\n this._pushOne(arg);\n return;\n }\n var j = this._front + length - 3;\n this._checkCapacity(length);\n var wrapMask = this._capacity - 1;\n this[(j + 0) & wrapMask] = fn;\n this[(j + 1) & wrapMask] = receiver;\n this[(j + 2) & wrapMask] = arg;\n this._length = length;\n};\n\nQueue.prototype.shift = function () {\n var front = this._front,\n ret = this[front];\n\n this[front] = undefined;\n this._front = (front + 1) & (this._capacity - 1);\n this._length--;\n return ret;\n};\n\nQueue.prototype.length = function () {\n return this._length;\n};\n\nQueue.prototype._checkCapacity = function (size) {\n if (this._capacity < size) {\n this._resizeTo(this._capacity << 1);\n }\n};\n\nQueue.prototype._resizeTo = function (capacity) {\n var oldCapacity = this._capacity;\n this._capacity = capacity;\n var front = this._front;\n var length = this._length;\n var moveItemsCount = (front + length) & (oldCapacity - 1);\n arrayMove(this, 0, this, oldCapacity, moveItemsCount);\n};\n\nmodule.exports = Queue;\n\n},{}],27:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(\n Promise, INTERNAL, tryConvertToPromise, apiRejection) {\nvar util = _dereq_(\"./util\");\n\nvar raceLater = function (promise) {\n return promise.then(function(array) {\n return race(array, promise);\n });\n};\n\nfunction race(promises, parent) {\n var maybePromise = tryConvertToPromise(promises);\n\n if (maybePromise instanceof Promise) {\n return raceLater(maybePromise);\n } else {\n promises = util.asArray(promises);\n if (promises === null)\n return apiRejection(\"expecting an array or an iterable object but got \" + util.classString(promises));\n }\n\n var ret = new Promise(INTERNAL);\n if (parent !== undefined) {\n ret._propagateFrom(parent, 3);\n }\n var fulfill = ret._fulfill;\n var reject = ret._reject;\n for (var i = 0, len = promises.length; i < len; ++i) {\n var val = promises[i];\n\n if (val === undefined && !(i in promises)) {\n continue;\n }\n\n Promise.cast(val)._then(fulfill, reject, undefined, ret, null);\n }\n return ret;\n}\n\nPromise.race = function (promises) {\n return race(promises, undefined);\n};\n\nPromise.prototype.race = function () {\n return race(this, undefined);\n};\n\n};\n\n},{\"./util\":36}],28:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise,\n PromiseArray,\n apiRejection,\n tryConvertToPromise,\n INTERNAL,\n debug) {\nvar getDomain = Promise._getDomain;\nvar util = _dereq_(\"./util\");\nvar tryCatch = util.tryCatch;\n\nfunction ReductionPromiseArray(promises, fn, initialValue, _each) {\n this.constructor$(promises);\n var domain = getDomain();\n this._fn = domain === null ? fn : util.domainBind(domain, fn);\n if (initialValue !== undefined) {\n initialValue = Promise.resolve(initialValue);\n initialValue._attachCancellationCallback(this);\n }\n this._initialValue = initialValue;\n this._currentCancellable = null;\n if(_each === INTERNAL) {\n this._eachValues = Array(this._length);\n } else if (_each === 0) {\n this._eachValues = null;\n } else {\n this._eachValues = undefined;\n }\n this._promise._captureStackTrace();\n this._init$(undefined, -5);\n}\nutil.inherits(ReductionPromiseArray, PromiseArray);\n\nReductionPromiseArray.prototype._gotAccum = function(accum) {\n if (this._eachValues !== undefined && \n this._eachValues !== null && \n accum !== INTERNAL) {\n this._eachValues.push(accum);\n }\n};\n\nReductionPromiseArray.prototype._eachComplete = function(value) {\n if (this._eachValues !== null) {\n this._eachValues.push(value);\n }\n return this._eachValues;\n};\n\nReductionPromiseArray.prototype._init = function() {};\n\nReductionPromiseArray.prototype._resolveEmptyArray = function() {\n this._resolve(this._eachValues !== undefined ? this._eachValues\n : this._initialValue);\n};\n\nReductionPromiseArray.prototype.shouldCopyValues = function () {\n return false;\n};\n\nReductionPromiseArray.prototype._resolve = function(value) {\n this._promise._resolveCallback(value);\n this._values = null;\n};\n\nReductionPromiseArray.prototype._resultCancelled = function(sender) {\n if (sender === this._initialValue) return this._cancel();\n if (this._isResolved()) return;\n this._resultCancelled$();\n if (this._currentCancellable instanceof Promise) {\n this._currentCancellable.cancel();\n }\n if (this._initialValue instanceof Promise) {\n this._initialValue.cancel();\n }\n};\n\nReductionPromiseArray.prototype._iterate = function (values) {\n this._values = values;\n var value;\n var i;\n var length = values.length;\n if (this._initialValue !== undefined) {\n value = this._initialValue;\n i = 0;\n } else {\n value = Promise.resolve(values[0]);\n i = 1;\n }\n\n this._currentCancellable = value;\n\n if (!value.isRejected()) {\n for (; i < length; ++i) {\n var ctx = {\n accum: null,\n value: values[i],\n index: i,\n length: length,\n array: this\n };\n value = value._then(gotAccum, undefined, undefined, ctx, undefined);\n }\n }\n\n if (this._eachValues !== undefined) {\n value = value\n ._then(this._eachComplete, undefined, undefined, this, undefined);\n }\n value._then(completed, completed, undefined, value, this);\n};\n\nPromise.prototype.reduce = function (fn, initialValue) {\n return reduce(this, fn, initialValue, null);\n};\n\nPromise.reduce = function (promises, fn, initialValue, _each) {\n return reduce(promises, fn, initialValue, _each);\n};\n\nfunction completed(valueOrReason, array) {\n if (this.isFulfilled()) {\n array._resolve(valueOrReason);\n } else {\n array._reject(valueOrReason);\n }\n}\n\nfunction reduce(promises, fn, initialValue, _each) {\n if (typeof fn !== \"function\") {\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\n }\n var array = new ReductionPromiseArray(promises, fn, initialValue, _each);\n return array.promise();\n}\n\nfunction gotAccum(accum) {\n this.accum = accum;\n this.array._gotAccum(accum);\n var value = tryConvertToPromise(this.value, this.array._promise);\n if (value instanceof Promise) {\n this.array._currentCancellable = value;\n return value._then(gotValue, undefined, undefined, this, undefined);\n } else {\n return gotValue.call(this, value);\n }\n}\n\nfunction gotValue(value) {\n var array = this.array;\n var promise = array._promise;\n var fn = tryCatch(array._fn);\n promise._pushContext();\n var ret;\n if (array._eachValues !== undefined) {\n ret = fn.call(promise._boundValue(), value, this.index, this.length);\n } else {\n ret = fn.call(promise._boundValue(),\n this.accum, value, this.index, this.length);\n }\n if (ret instanceof Promise) {\n array._currentCancellable = ret;\n }\n var promiseCreated = promise._popContext();\n debug.checkForgottenReturns(\n ret,\n promiseCreated,\n array._eachValues !== undefined ? \"Promise.each\" : \"Promise.reduce\",\n promise\n );\n return ret;\n}\n};\n\n},{\"./util\":36}],29:[function(_dereq_,module,exports){\n\"use strict\";\nvar util = _dereq_(\"./util\");\nvar schedule;\nvar noAsyncScheduler = function() {\n throw new Error(\"No async scheduler available\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n};\nvar NativePromise = util.getNativePromise();\nif (util.isNode && typeof MutationObserver === \"undefined\") {\n var GlobalSetImmediate = global.setImmediate;\n var ProcessNextTick = process.nextTick;\n schedule = util.isRecentNode\n ? function(fn) { GlobalSetImmediate.call(global, fn); }\n : function(fn) { ProcessNextTick.call(process, fn); };\n} else if (typeof NativePromise === \"function\" &&\n typeof NativePromise.resolve === \"function\") {\n var nativePromise = NativePromise.resolve();\n schedule = function(fn) {\n nativePromise.then(fn);\n };\n} else if ((typeof MutationObserver !== \"undefined\") &&\n !(typeof window !== \"undefined\" &&\n window.navigator &&\n (window.navigator.standalone || window.cordova))) {\n schedule = (function() {\n var div = document.createElement(\"div\");\n var opts = {attributes: true};\n var toggleScheduled = false;\n var div2 = document.createElement(\"div\");\n var o2 = new MutationObserver(function() {\n div.classList.toggle(\"foo\");\n toggleScheduled = false;\n });\n o2.observe(div2, opts);\n\n var scheduleToggle = function() {\n if (toggleScheduled) return;\n toggleScheduled = true;\n div2.classList.toggle(\"foo\");\n };\n\n return function schedule(fn) {\n var o = new MutationObserver(function() {\n o.disconnect();\n fn();\n });\n o.observe(div, opts);\n scheduleToggle();\n };\n })();\n} else if (typeof setImmediate !== \"undefined\") {\n schedule = function (fn) {\n setImmediate(fn);\n };\n} else if (typeof setTimeout !== \"undefined\") {\n schedule = function (fn) {\n setTimeout(fn, 0);\n };\n} else {\n schedule = noAsyncScheduler;\n}\nmodule.exports = schedule;\n\n},{\"./util\":36}],30:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports =\n function(Promise, PromiseArray, debug) {\nvar PromiseInspection = Promise.PromiseInspection;\nvar util = _dereq_(\"./util\");\n\nfunction SettledPromiseArray(values) {\n this.constructor$(values);\n}\nutil.inherits(SettledPromiseArray, PromiseArray);\n\nSettledPromiseArray.prototype._promiseResolved = function (index, inspection) {\n this._values[index] = inspection;\n var totalResolved = ++this._totalResolved;\n if (totalResolved >= this._length) {\n this._resolve(this._values);\n return true;\n }\n return false;\n};\n\nSettledPromiseArray.prototype._promiseFulfilled = function (value, index) {\n var ret = new PromiseInspection();\n ret._bitField = 33554432;\n ret._settledValueField = value;\n return this._promiseResolved(index, ret);\n};\nSettledPromiseArray.prototype._promiseRejected = function (reason, index) {\n var ret = new PromiseInspection();\n ret._bitField = 16777216;\n ret._settledValueField = reason;\n return this._promiseResolved(index, ret);\n};\n\nPromise.settle = function (promises) {\n debug.deprecated(\".settle()\", \".reflect()\");\n return new SettledPromiseArray(promises).promise();\n};\n\nPromise.prototype.settle = function () {\n return Promise.settle(this);\n};\n};\n\n},{\"./util\":36}],31:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports =\nfunction(Promise, PromiseArray, apiRejection) {\nvar util = _dereq_(\"./util\");\nvar RangeError = _dereq_(\"./errors\").RangeError;\nvar AggregateError = _dereq_(\"./errors\").AggregateError;\nvar isArray = util.isArray;\nvar CANCELLATION = {};\n\n\nfunction SomePromiseArray(values) {\n this.constructor$(values);\n this._howMany = 0;\n this._unwrap = false;\n this._initialized = false;\n}\nutil.inherits(SomePromiseArray, PromiseArray);\n\nSomePromiseArray.prototype._init = function () {\n if (!this._initialized) {\n return;\n }\n if (this._howMany === 0) {\n this._resolve([]);\n return;\n }\n this._init$(undefined, -5);\n var isArrayResolved = isArray(this._values);\n if (!this._isResolved() &&\n isArrayResolved &&\n this._howMany > this._canPossiblyFulfill()) {\n this._reject(this._getRangeError(this.length()));\n }\n};\n\nSomePromiseArray.prototype.init = function () {\n this._initialized = true;\n this._init();\n};\n\nSomePromiseArray.prototype.setUnwrap = function () {\n this._unwrap = true;\n};\n\nSomePromiseArray.prototype.howMany = function () {\n return this._howMany;\n};\n\nSomePromiseArray.prototype.setHowMany = function (count) {\n this._howMany = count;\n};\n\nSomePromiseArray.prototype._promiseFulfilled = function (value) {\n this._addFulfilled(value);\n if (this._fulfilled() === this.howMany()) {\n this._values.length = this.howMany();\n if (this.howMany() === 1 && this._unwrap) {\n this._resolve(this._values[0]);\n } else {\n this._resolve(this._values);\n }\n return true;\n }\n return false;\n\n};\nSomePromiseArray.prototype._promiseRejected = function (reason) {\n this._addRejected(reason);\n return this._checkOutcome();\n};\n\nSomePromiseArray.prototype._promiseCancelled = function () {\n if (this._values instanceof Promise || this._values == null) {\n return this._cancel();\n }\n this._addRejected(CANCELLATION);\n return this._checkOutcome();\n};\n\nSomePromiseArray.prototype._checkOutcome = function() {\n if (this.howMany() > this._canPossiblyFulfill()) {\n var e = new AggregateError();\n for (var i = this.length(); i < this._values.length; ++i) {\n if (this._values[i] !== CANCELLATION) {\n e.push(this._values[i]);\n }\n }\n if (e.length > 0) {\n this._reject(e);\n } else {\n this._cancel();\n }\n return true;\n }\n return false;\n};\n\nSomePromiseArray.prototype._fulfilled = function () {\n return this._totalResolved;\n};\n\nSomePromiseArray.prototype._rejected = function () {\n return this._values.length - this.length();\n};\n\nSomePromiseArray.prototype._addRejected = function (reason) {\n this._values.push(reason);\n};\n\nSomePromiseArray.prototype._addFulfilled = function (value) {\n this._values[this._totalResolved++] = value;\n};\n\nSomePromiseArray.prototype._canPossiblyFulfill = function () {\n return this.length() - this._rejected();\n};\n\nSomePromiseArray.prototype._getRangeError = function (count) {\n var message = \"Input array must contain at least \" +\n this._howMany + \" items but contains only \" + count + \" items\";\n return new RangeError(message);\n};\n\nSomePromiseArray.prototype._resolveEmptyArray = function () {\n this._reject(this._getRangeError(0));\n};\n\nfunction some(promises, howMany) {\n if ((howMany | 0) !== howMany || howMany < 0) {\n return apiRejection(\"expecting a positive integer\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n var ret = new SomePromiseArray(promises);\n var promise = ret.promise();\n ret.setHowMany(howMany);\n ret.init();\n return promise;\n}\n\nPromise.some = function (promises, howMany) {\n return some(promises, howMany);\n};\n\nPromise.prototype.some = function (howMany) {\n return some(this, howMany);\n};\n\nPromise._SomePromiseArray = SomePromiseArray;\n};\n\n},{\"./errors\":12,\"./util\":36}],32:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise) {\nfunction PromiseInspection(promise) {\n if (promise !== undefined) {\n promise = promise._target();\n this._bitField = promise._bitField;\n this._settledValueField = promise._isFateSealed()\n ? promise._settledValue() : undefined;\n }\n else {\n this._bitField = 0;\n this._settledValueField = undefined;\n }\n}\n\nPromiseInspection.prototype._settledValue = function() {\n return this._settledValueField;\n};\n\nvar value = PromiseInspection.prototype.value = function () {\n if (!this.isFulfilled()) {\n throw new TypeError(\"cannot get fulfillment value of a non-fulfilled promise\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n return this._settledValue();\n};\n\nvar reason = PromiseInspection.prototype.error =\nPromiseInspection.prototype.reason = function () {\n if (!this.isRejected()) {\n throw new TypeError(\"cannot get rejection reason of a non-rejected promise\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n return this._settledValue();\n};\n\nvar isFulfilled = PromiseInspection.prototype.isFulfilled = function() {\n return (this._bitField & 33554432) !== 0;\n};\n\nvar isRejected = PromiseInspection.prototype.isRejected = function () {\n return (this._bitField & 16777216) !== 0;\n};\n\nvar isPending = PromiseInspection.prototype.isPending = function () {\n return (this._bitField & 50397184) === 0;\n};\n\nvar isResolved = PromiseInspection.prototype.isResolved = function () {\n return (this._bitField & 50331648) !== 0;\n};\n\nPromiseInspection.prototype.isCancelled = function() {\n return (this._bitField & 8454144) !== 0;\n};\n\nPromise.prototype.__isCancelled = function() {\n return (this._bitField & 65536) === 65536;\n};\n\nPromise.prototype._isCancelled = function() {\n return this._target().__isCancelled();\n};\n\nPromise.prototype.isCancelled = function() {\n return (this._target()._bitField & 8454144) !== 0;\n};\n\nPromise.prototype.isPending = function() {\n return isPending.call(this._target());\n};\n\nPromise.prototype.isRejected = function() {\n return isRejected.call(this._target());\n};\n\nPromise.prototype.isFulfilled = function() {\n return isFulfilled.call(this._target());\n};\n\nPromise.prototype.isResolved = function() {\n return isResolved.call(this._target());\n};\n\nPromise.prototype.value = function() {\n return value.call(this._target());\n};\n\nPromise.prototype.reason = function() {\n var target = this._target();\n target._unsetRejectionIsUnhandled();\n return reason.call(target);\n};\n\nPromise.prototype._value = function() {\n return this._settledValue();\n};\n\nPromise.prototype._reason = function() {\n this._unsetRejectionIsUnhandled();\n return this._settledValue();\n};\n\nPromise.PromiseInspection = PromiseInspection;\n};\n\n},{}],33:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL) {\nvar util = _dereq_(\"./util\");\nvar errorObj = util.errorObj;\nvar isObject = util.isObject;\n\nfunction tryConvertToPromise(obj, context) {\n if (isObject(obj)) {\n if (obj instanceof Promise) return obj;\n var then = getThen(obj);\n if (then === errorObj) {\n if (context) context._pushContext();\n var ret = Promise.reject(then.e);\n if (context) context._popContext();\n return ret;\n } else if (typeof then === \"function\") {\n if (isAnyBluebirdPromise(obj)) {\n var ret = new Promise(INTERNAL);\n obj._then(\n ret._fulfill,\n ret._reject,\n undefined,\n ret,\n null\n );\n return ret;\n }\n return doThenable(obj, then, context);\n }\n }\n return obj;\n}\n\nfunction doGetThen(obj) {\n return obj.then;\n}\n\nfunction getThen(obj) {\n try {\n return doGetThen(obj);\n } catch (e) {\n errorObj.e = e;\n return errorObj;\n }\n}\n\nvar hasProp = {}.hasOwnProperty;\nfunction isAnyBluebirdPromise(obj) {\n try {\n return hasProp.call(obj, \"_promise0\");\n } catch (e) {\n return false;\n }\n}\n\nfunction doThenable(x, then, context) {\n var promise = new Promise(INTERNAL);\n var ret = promise;\n if (context) context._pushContext();\n promise._captureStackTrace();\n if (context) context._popContext();\n var synchronous = true;\n var result = util.tryCatch(then).call(x, resolve, reject);\n synchronous = false;\n\n if (promise && result === errorObj) {\n promise._rejectCallback(result.e, true, true);\n promise = null;\n }\n\n function resolve(value) {\n if (!promise) return;\n promise._resolveCallback(value);\n promise = null;\n }\n\n function reject(reason) {\n if (!promise) return;\n promise._rejectCallback(reason, synchronous, true);\n promise = null;\n }\n return ret;\n}\n\nreturn tryConvertToPromise;\n};\n\n},{\"./util\":36}],34:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL, debug) {\nvar util = _dereq_(\"./util\");\nvar TimeoutError = Promise.TimeoutError;\n\nfunction HandleWrapper(handle) {\n this.handle = handle;\n}\n\nHandleWrapper.prototype._resultCancelled = function() {\n clearTimeout(this.handle);\n};\n\nvar afterValue = function(value) { return delay(+this).thenReturn(value); };\nvar delay = Promise.delay = function (ms, value) {\n var ret;\n var handle;\n if (value !== undefined) {\n ret = Promise.resolve(value)\n ._then(afterValue, null, null, ms, undefined);\n if (debug.cancellation() && value instanceof Promise) {\n ret._setOnCancel(value);\n }\n } else {\n ret = new Promise(INTERNAL);\n handle = setTimeout(function() { ret._fulfill(); }, +ms);\n if (debug.cancellation()) {\n ret._setOnCancel(new HandleWrapper(handle));\n }\n ret._captureStackTrace();\n }\n ret._setAsyncGuaranteed();\n return ret;\n};\n\nPromise.prototype.delay = function (ms) {\n return delay(ms, this);\n};\n\nvar afterTimeout = function (promise, message, parent) {\n var err;\n if (typeof message !== \"string\") {\n if (message instanceof Error) {\n err = message;\n } else {\n err = new TimeoutError(\"operation timed out\");\n }\n } else {\n err = new TimeoutError(message);\n }\n util.markAsOriginatingFromRejection(err);\n promise._attachExtraTrace(err);\n promise._reject(err);\n\n if (parent != null) {\n parent.cancel();\n }\n};\n\nfunction successClear(value) {\n clearTimeout(this.handle);\n return value;\n}\n\nfunction failureClear(reason) {\n clearTimeout(this.handle);\n throw reason;\n}\n\nPromise.prototype.timeout = function (ms, message) {\n ms = +ms;\n var ret, parent;\n\n var handleWrapper = new HandleWrapper(setTimeout(function timeoutTimeout() {\n if (ret.isPending()) {\n afterTimeout(ret, message, parent);\n }\n }, ms));\n\n if (debug.cancellation()) {\n parent = this.then();\n ret = parent._then(successClear, failureClear,\n undefined, handleWrapper, undefined);\n ret._setOnCancel(handleWrapper);\n } else {\n ret = this._then(successClear, failureClear,\n undefined, handleWrapper, undefined);\n }\n\n return ret;\n};\n\n};\n\n},{\"./util\":36}],35:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function (Promise, apiRejection, tryConvertToPromise,\n createContext, INTERNAL, debug) {\n var util = _dereq_(\"./util\");\n var TypeError = _dereq_(\"./errors\").TypeError;\n var inherits = _dereq_(\"./util\").inherits;\n var errorObj = util.errorObj;\n var tryCatch = util.tryCatch;\n var NULL = {};\n\n function thrower(e) {\n setTimeout(function(){throw e;}, 0);\n }\n\n function castPreservingDisposable(thenable) {\n var maybePromise = tryConvertToPromise(thenable);\n if (maybePromise !== thenable &&\n typeof thenable._isDisposable === \"function\" &&\n typeof thenable._getDisposer === \"function\" &&\n thenable._isDisposable()) {\n maybePromise._setDisposable(thenable._getDisposer());\n }\n return maybePromise;\n }\n function dispose(resources, inspection) {\n var i = 0;\n var len = resources.length;\n var ret = new Promise(INTERNAL);\n function iterator() {\n if (i >= len) return ret._fulfill();\n var maybePromise = castPreservingDisposable(resources[i++]);\n if (maybePromise instanceof Promise &&\n maybePromise._isDisposable()) {\n try {\n maybePromise = tryConvertToPromise(\n maybePromise._getDisposer().tryDispose(inspection),\n resources.promise);\n } catch (e) {\n return thrower(e);\n }\n if (maybePromise instanceof Promise) {\n return maybePromise._then(iterator, thrower,\n null, null, null);\n }\n }\n iterator();\n }\n iterator();\n return ret;\n }\n\n function Disposer(data, promise, context) {\n this._data = data;\n this._promise = promise;\n this._context = context;\n }\n\n Disposer.prototype.data = function () {\n return this._data;\n };\n\n Disposer.prototype.promise = function () {\n return this._promise;\n };\n\n Disposer.prototype.resource = function () {\n if (this.promise().isFulfilled()) {\n return this.promise().value();\n }\n return NULL;\n };\n\n Disposer.prototype.tryDispose = function(inspection) {\n var resource = this.resource();\n var context = this._context;\n if (context !== undefined) context._pushContext();\n var ret = resource !== NULL\n ? this.doDispose(resource, inspection) : null;\n if (context !== undefined) context._popContext();\n this._promise._unsetDisposable();\n this._data = null;\n return ret;\n };\n\n Disposer.isDisposer = function (d) {\n return (d != null &&\n typeof d.resource === \"function\" &&\n typeof d.tryDispose === \"function\");\n };\n\n function FunctionDisposer(fn, promise, context) {\n this.constructor$(fn, promise, context);\n }\n inherits(FunctionDisposer, Disposer);\n\n FunctionDisposer.prototype.doDispose = function (resource, inspection) {\n var fn = this.data();\n return fn.call(resource, resource, inspection);\n };\n\n function maybeUnwrapDisposer(value) {\n if (Disposer.isDisposer(value)) {\n this.resources[this.index]._setDisposable(value);\n return value.promise();\n }\n return value;\n }\n\n function ResourceList(length) {\n this.length = length;\n this.promise = null;\n this[length-1] = null;\n }\n\n ResourceList.prototype._resultCancelled = function() {\n var len = this.length;\n for (var i = 0; i < len; ++i) {\n var item = this[i];\n if (item instanceof Promise) {\n item.cancel();\n }\n }\n };\n\n Promise.using = function () {\n var len = arguments.length;\n if (len < 2) return apiRejection(\n \"you must pass at least 2 arguments to Promise.using\");\n var fn = arguments[len - 1];\n if (typeof fn !== \"function\") {\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\n }\n var input;\n var spreadArgs = true;\n if (len === 2 && Array.isArray(arguments[0])) {\n input = arguments[0];\n len = input.length;\n spreadArgs = false;\n } else {\n input = arguments;\n len--;\n }\n var resources = new ResourceList(len);\n for (var i = 0; i < len; ++i) {\n var resource = input[i];\n if (Disposer.isDisposer(resource)) {\n var disposer = resource;\n resource = resource.promise();\n resource._setDisposable(disposer);\n } else {\n var maybePromise = tryConvertToPromise(resource);\n if (maybePromise instanceof Promise) {\n resource =\n maybePromise._then(maybeUnwrapDisposer, null, null, {\n resources: resources,\n index: i\n }, undefined);\n }\n }\n resources[i] = resource;\n }\n\n var reflectedResources = new Array(resources.length);\n for (var i = 0; i < reflectedResources.length; ++i) {\n reflectedResources[i] = Promise.resolve(resources[i]).reflect();\n }\n\n var resultPromise = Promise.all(reflectedResources)\n .then(function(inspections) {\n for (var i = 0; i < inspections.length; ++i) {\n var inspection = inspections[i];\n if (inspection.isRejected()) {\n errorObj.e = inspection.error();\n return errorObj;\n } else if (!inspection.isFulfilled()) {\n resultPromise.cancel();\n return;\n }\n inspections[i] = inspection.value();\n }\n promise._pushContext();\n\n fn = tryCatch(fn);\n var ret = spreadArgs\n ? fn.apply(undefined, inspections) : fn(inspections);\n var promiseCreated = promise._popContext();\n debug.checkForgottenReturns(\n ret, promiseCreated, \"Promise.using\", promise);\n return ret;\n });\n\n var promise = resultPromise.lastly(function() {\n var inspection = new Promise.PromiseInspection(resultPromise);\n return dispose(resources, inspection);\n });\n resources.promise = promise;\n promise._setOnCancel(resources);\n return promise;\n };\n\n Promise.prototype._setDisposable = function (disposer) {\n this._bitField = this._bitField | 131072;\n this._disposer = disposer;\n };\n\n Promise.prototype._isDisposable = function () {\n return (this._bitField & 131072) > 0;\n };\n\n Promise.prototype._getDisposer = function () {\n return this._disposer;\n };\n\n Promise.prototype._unsetDisposable = function () {\n this._bitField = this._bitField & (~131072);\n this._disposer = undefined;\n };\n\n Promise.prototype.disposer = function (fn) {\n if (typeof fn === \"function\") {\n return new FunctionDisposer(fn, this, createContext());\n }\n throw new TypeError();\n };\n\n};\n\n},{\"./errors\":12,\"./util\":36}],36:[function(_dereq_,module,exports){\n\"use strict\";\nvar es5 = _dereq_(\"./es5\");\nvar canEvaluate = typeof navigator == \"undefined\";\n\nvar errorObj = {e: {}};\nvar tryCatchTarget;\nvar globalObject = typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window :\n typeof global !== \"undefined\" ? global :\n this !== undefined ? this : null;\n\nfunction tryCatcher() {\n try {\n var target = tryCatchTarget;\n tryCatchTarget = null;\n return target.apply(this, arguments);\n } catch (e) {\n errorObj.e = e;\n return errorObj;\n }\n}\nfunction tryCatch(fn) {\n tryCatchTarget = fn;\n return tryCatcher;\n}\n\nvar inherits = function(Child, Parent) {\n var hasProp = {}.hasOwnProperty;\n\n function T() {\n this.constructor = Child;\n this.constructor$ = Parent;\n for (var propertyName in Parent.prototype) {\n if (hasProp.call(Parent.prototype, propertyName) &&\n propertyName.charAt(propertyName.length-1) !== \"$\"\n ) {\n this[propertyName + \"$\"] = Parent.prototype[propertyName];\n }\n }\n }\n T.prototype = Parent.prototype;\n Child.prototype = new T();\n return Child.prototype;\n};\n\n\nfunction isPrimitive(val) {\n return val == null || val === true || val === false ||\n typeof val === \"string\" || typeof val === \"number\";\n\n}\n\nfunction isObject(value) {\n return typeof value === \"function\" ||\n typeof value === \"object\" && value !== null;\n}\n\nfunction maybeWrapAsError(maybeError) {\n if (!isPrimitive(maybeError)) return maybeError;\n\n return new Error(safeToString(maybeError));\n}\n\nfunction withAppended(target, appendee) {\n var len = target.length;\n var ret = new Array(len + 1);\n var i;\n for (i = 0; i < len; ++i) {\n ret[i] = target[i];\n }\n ret[i] = appendee;\n return ret;\n}\n\nfunction getDataPropertyOrDefault(obj, key, defaultValue) {\n if (es5.isES5) {\n var desc = Object.getOwnPropertyDescriptor(obj, key);\n\n if (desc != null) {\n return desc.get == null && desc.set == null\n ? desc.value\n : defaultValue;\n }\n } else {\n return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;\n }\n}\n\nfunction notEnumerableProp(obj, name, value) {\n if (isPrimitive(obj)) return obj;\n var descriptor = {\n value: value,\n configurable: true,\n enumerable: false,\n writable: true\n };\n es5.defineProperty(obj, name, descriptor);\n return obj;\n}\n\nfunction thrower(r) {\n throw r;\n}\n\nvar inheritedDataKeys = (function() {\n var excludedPrototypes = [\n Array.prototype,\n Object.prototype,\n Function.prototype\n ];\n\n var isExcludedProto = function(val) {\n for (var i = 0; i < excludedPrototypes.length; ++i) {\n if (excludedPrototypes[i] === val) {\n return true;\n }\n }\n return false;\n };\n\n if (es5.isES5) {\n var getKeys = Object.getOwnPropertyNames;\n return function(obj) {\n var ret = [];\n var visitedKeys = Object.create(null);\n while (obj != null && !isExcludedProto(obj)) {\n var keys;\n try {\n keys = getKeys(obj);\n } catch (e) {\n return ret;\n }\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (visitedKeys[key]) continue;\n visitedKeys[key] = true;\n var desc = Object.getOwnPropertyDescriptor(obj, key);\n if (desc != null && desc.get == null && desc.set == null) {\n ret.push(key);\n }\n }\n obj = es5.getPrototypeOf(obj);\n }\n return ret;\n };\n } else {\n var hasProp = {}.hasOwnProperty;\n return function(obj) {\n if (isExcludedProto(obj)) return [];\n var ret = [];\n\n /*jshint forin:false */\n enumeration: for (var key in obj) {\n if (hasProp.call(obj, key)) {\n ret.push(key);\n } else {\n for (var i = 0; i < excludedPrototypes.length; ++i) {\n if (hasProp.call(excludedPrototypes[i], key)) {\n continue enumeration;\n }\n }\n ret.push(key);\n }\n }\n return ret;\n };\n }\n\n})();\n\nvar thisAssignmentPattern = /this\\s*\\.\\s*\\S+\\s*=/;\nfunction isClass(fn) {\n try {\n if (typeof fn === \"function\") {\n var keys = es5.names(fn.prototype);\n\n var hasMethods = es5.isES5 && keys.length > 1;\n var hasMethodsOtherThanConstructor = keys.length > 0 &&\n !(keys.length === 1 && keys[0] === \"constructor\");\n var hasThisAssignmentAndStaticMethods =\n thisAssignmentPattern.test(fn + \"\") && es5.names(fn).length > 0;\n\n if (hasMethods || hasMethodsOtherThanConstructor ||\n hasThisAssignmentAndStaticMethods) {\n return true;\n }\n }\n return false;\n } catch (e) {\n return false;\n }\n}\n\nfunction toFastProperties(obj) {\n /*jshint -W027,-W055,-W031*/\n function FakeConstructor() {}\n FakeConstructor.prototype = obj;\n var l = 8;\n while (l--) new FakeConstructor();\n return obj;\n eval(obj);\n}\n\nvar rident = /^[a-z$_][a-z$_0-9]*$/i;\nfunction isIdentifier(str) {\n return rident.test(str);\n}\n\nfunction filledRange(count, prefix, suffix) {\n var ret = new Array(count);\n for(var i = 0; i < count; ++i) {\n ret[i] = prefix + i + suffix;\n }\n return ret;\n}\n\nfunction safeToString(obj) {\n try {\n return obj + \"\";\n } catch (e) {\n return \"[no string representation]\";\n }\n}\n\nfunction isError(obj) {\n return obj instanceof Error ||\n (obj !== null &&\n typeof obj === \"object\" &&\n typeof obj.message === \"string\" &&\n typeof obj.name === \"string\");\n}\n\nfunction markAsOriginatingFromRejection(e) {\n try {\n notEnumerableProp(e, \"isOperational\", true);\n }\n catch(ignore) {}\n}\n\nfunction originatesFromRejection(e) {\n if (e == null) return false;\n return ((e instanceof Error[\"__BluebirdErrorTypes__\"].OperationalError) ||\n e[\"isOperational\"] === true);\n}\n\nfunction canAttachTrace(obj) {\n return isError(obj) && es5.propertyIsWritable(obj, \"stack\");\n}\n\nvar ensureErrorObject = (function() {\n if (!(\"stack\" in new Error())) {\n return function(value) {\n if (canAttachTrace(value)) return value;\n try {throw new Error(safeToString(value));}\n catch(err) {return err;}\n };\n } else {\n return function(value) {\n if (canAttachTrace(value)) return value;\n return new Error(safeToString(value));\n };\n }\n})();\n\nfunction classString(obj) {\n return {}.toString.call(obj);\n}\n\nfunction copyDescriptors(from, to, filter) {\n var keys = es5.names(from);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (filter(key)) {\n try {\n es5.defineProperty(to, key, es5.getDescriptor(from, key));\n } catch (ignore) {}\n }\n }\n}\n\nvar asArray = function(v) {\n if (es5.isArray(v)) {\n return v;\n }\n return null;\n};\n\nif (typeof Symbol !== \"undefined\" && Symbol.iterator) {\n var ArrayFrom = typeof Array.from === \"function\" ? function(v) {\n return Array.from(v);\n } : function(v) {\n var ret = [];\n var it = v[Symbol.iterator]();\n var itResult;\n while (!((itResult = it.next()).done)) {\n ret.push(itResult.value);\n }\n return ret;\n };\n\n asArray = function(v) {\n if (es5.isArray(v)) {\n return v;\n } else if (v != null && typeof v[Symbol.iterator] === \"function\") {\n return ArrayFrom(v);\n }\n return null;\n };\n}\n\nvar isNode = typeof process !== \"undefined\" &&\n classString(process).toLowerCase() === \"[object process]\";\n\nvar hasEnvVariables = typeof process !== \"undefined\" &&\n typeof process.env !== \"undefined\";\n\nfunction env(key) {\n return hasEnvVariables ? process.env[key] : undefined;\n}\n\nfunction getNativePromise() {\n if (typeof Promise === \"function\") {\n try {\n var promise = new Promise(function(){});\n if ({}.toString.call(promise) === \"[object Promise]\") {\n return Promise;\n }\n } catch (e) {}\n }\n}\n\nfunction domainBind(self, cb) {\n return self.bind(cb);\n}\n\nvar ret = {\n isClass: isClass,\n isIdentifier: isIdentifier,\n inheritedDataKeys: inheritedDataKeys,\n getDataPropertyOrDefault: getDataPropertyOrDefault,\n thrower: thrower,\n isArray: es5.isArray,\n asArray: asArray,\n notEnumerableProp: notEnumerableProp,\n isPrimitive: isPrimitive,\n isObject: isObject,\n isError: isError,\n canEvaluate: canEvaluate,\n errorObj: errorObj,\n tryCatch: tryCatch,\n inherits: inherits,\n withAppended: withAppended,\n maybeWrapAsError: maybeWrapAsError,\n toFastProperties: toFastProperties,\n filledRange: filledRange,\n toString: safeToString,\n canAttachTrace: canAttachTrace,\n ensureErrorObject: ensureErrorObject,\n originatesFromRejection: originatesFromRejection,\n markAsOriginatingFromRejection: markAsOriginatingFromRejection,\n classString: classString,\n copyDescriptors: copyDescriptors,\n hasDevTools: typeof chrome !== \"undefined\" && chrome &&\n typeof chrome.loadTimes === \"function\",\n isNode: isNode,\n hasEnvVariables: hasEnvVariables,\n env: env,\n global: globalObject,\n getNativePromise: getNativePromise,\n domainBind: domainBind\n};\nret.isRecentNode = ret.isNode && (function() {\n var version = process.versions.node.split(\".\").map(Number);\n return (version[0] === 0 && version[1] > 10) || (version[0] > 0);\n})();\n\nif (ret.isNode) ret.toFastProperties(process);\n\ntry {throw new Error(); } catch (e) {ret.lastLineError = e;}\nmodule.exports = ret;\n\n},{\"./es5\":13}]},{},[4])(4)\n}); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; }","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n error.request = request;\n error.response = response;\n return error;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n // Note: status is not exposed by XDomainRequest\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || require('./../helpers/btoa');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n var loadEvent = 'onreadystatechange';\n var xDomain = false;\n\n // For IE 8/9 CORS support\n // Only supports POST and GET calls and doesn't returns the response headers.\n // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.\n if (process.env.NODE_ENV !== 'test' &&\n typeof window !== 'undefined' &&\n window.XDomainRequest && !('withCredentials' in request) &&\n !isURLSameOrigin(config.url)) {\n request = new window.XDomainRequest();\n loadEvent = 'onload';\n xDomain = true;\n request.onprogress = function handleProgress() {};\n request.ontimeout = function handleTimeout() {};\n }\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request[loadEvent] = function handleLoad() {\n if (!request || (request.readyState !== 4 && !xDomain)) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n // IE sends 1223 instead of 204 (https://github.com/axios/axios/issues/201)\n status: request.status === 1223 ? 204 : request.status,\n statusText: request.status === 1223 ? 'No Content' : request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = require('./../helpers/cookies');\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","module.exports = require('./lib/axios');","// Generated by CoffeeScript 1.12.2\n(function() {\n var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - nodeLoadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n moduleLoadTime = getNanoSeconds();\n upTime = process.uptime() * 1e9;\n nodeLoadTime = moduleLoadTime - upTime;\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n//# sourceMappingURL=performance-now.js.map\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.MAX_TEXTURE_IMAGE_UNITS = exports.MAX_TEXTURE_SIZE = exports.webgl2 = void 0;\nconst vertexShaderSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec3 position;\\nin vec2 texcoord;\\nout vec2 outTex;\\n\\nvoid main () {\\n gl_Position = vec4(position, 1.0);\\n\\toutTex = texcoord;\\n}\\n\";\n\nclass WebGL2 {\n constructor() {\n this.isSupported = false;\n this.vertexShader = null;\n\n if (typeof window !== 'undefined') {\n this.canvas = document.createElement('canvas');\n this.context = this.canvas.getContext('webgl2');\n const gl = this.context;\n\n if (gl) {\n this.isSupported = true;\n gl.getExtension('EXT_color_buffer_float');\n this.MAX_TEXTURE_SIZE = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n this.MAX_TEXTURE_IMAGE_UNITS = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);\n this.init();\n } else {\n console.log('Unable to initialize WebGL2 -- your browser may not support it.');\n }\n }\n\n this._refs = {\n textures: [],\n buffers: []\n };\n }\n\n init() {\n this.createCommonVertexShader();\n }\n\n createCommonVertexShader() {\n const gl = this.context;\n const vertexShader = gl.createShader(gl.VERTEX_SHADER);\n gl.shaderSource(vertexShader, vertexShaderSource);\n gl.compileShader(vertexShader);\n const success = gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS);\n\n if (!success) {\n console.error(gl.getShaderInfoLog(vertexShader));\n gl.deleteShader(vertexShader);\n this.isSupported = false;\n }\n\n this.vertexShader = vertexShader;\n }\n\n compileProgram(source) {\n const gl = this.context;\n const fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);\n gl.shaderSource(fragmentShader, source);\n gl.compileShader(fragmentShader);\n let success = gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS);\n\n if (!success) {\n console.error(gl.getShaderInfoLog(fragmentShader));\n gl.deleteShader(fragmentShader);\n this.isSupported = false;\n }\n\n const program = gl.createProgram();\n gl.attachShader(program, this.vertexShader);\n gl.attachShader(program, fragmentShader);\n gl.linkProgram(program);\n success = gl.getProgramParameter(program, gl.LINK_STATUS);\n\n if (!success) {\n console.error(gl.getProgramInfoLog(program));\n this.isSupported = false;\n }\n\n this.setupVertices(program);\n return program;\n }\n\n setupVertices(program) {\n const gl = this.context;\n const position = gl.getAttribLocation(program, 'position');\n const positionVertexObj = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, positionVertexObj);\n this.storeRef('buffer', positionVertexObj);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1.0, -1.0, 0.0, 1.0, -1.0, 0.0, 1.0, 1.0, 0.0, -1.0, 1.0, 0.0]), gl.STATIC_DRAW);\n gl.vertexAttribPointer(position, 3, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(position);\n const texcoord = gl.getAttribLocation(program, 'texcoord');\n const texcoordVertexObj = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texcoordVertexObj);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0]), gl.STATIC_DRAW);\n gl.vertexAttribPointer(texcoord, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(texcoord);\n this.storeRef('buffer', texcoordVertexObj);\n const indicesVertexObj = gl.createBuffer();\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indicesVertexObj);\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array([0, 1, 2, 0, 2, 3]), gl.STATIC_DRAW);\n this.storeRef('buffer', indicesVertexObj);\n }\n\n selectProgram(program) {\n const gl = this.context;\n gl.useProgram(program);\n }\n\n bindUniforms(program, uniforms) {\n const gl = this.context;\n uniforms.forEach(({\n value,\n type,\n name\n }) => {\n const loc = gl.getUniformLocation(program, name);\n\n if (type === 'float') {\n gl.uniform1f(loc, value);\n } else if (type === 'int' || type === 'bool') {\n gl.uniform1i(loc, value);\n }\n });\n }\n\n bindInputTextures(program, inputs, k) {\n const gl = this.context;\n inputs.forEach(({\n input,\n name\n }, i) => {\n gl.activeTexture(gl.TEXTURE0 + i);\n\n if (input.glTextureFragments) {\n if (input.glTextureFragmentsAsColStack) {\n const {\n textureTarget\n } = this.getWebGLTextureOptions(input.glTextureType, input.glTextureFormat);\n gl.bindTexture(textureTarget, input.glTextureFragmentsAsColStack);\n } else {\n const {\n textureTarget\n } = this.getWebGLTextureOptions(input.glTextureType, input.glTextureFormat);\n gl.bindTexture(textureTarget, input.glTextureFragments[k]);\n }\n } else {\n const {\n textureTarget\n } = this.getWebGLTextureOptions(input.glTextureType, input.glTextureFormat);\n gl.bindTexture(textureTarget, input.glTexture);\n }\n\n gl.uniform1i(gl.getUniformLocation(program, name), i);\n });\n }\n\n bindOutputTexture(outputTexture, shape) {\n const gl = this.context;\n gl.viewport(0, 0, shape[1], shape[0]);\n this.framebuffer = this.framebuffer || gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, outputTexture, 0);\n }\n\n runProgram({\n program,\n output,\n inputs,\n uniforms,\n supportsTextureFragments = false\n }) {\n if (!program) throw new Error('[WebGL2] missing program');\n if (!output) throw new Error('[WebGL2] missing output');\n if (!inputs) throw new Error('[WebGL2] missing inputs');\n const gl = this.context;\n this.selectProgram(program);\n\n if (uniforms && Array.isArray(uniforms)) {\n this.bindUniforms(program, uniforms);\n }\n\n if (output.glTextureFragments) {\n if (!supportsTextureFragments) {\n throw new Error('[WebGL2] program does not support texture fragments');\n }\n\n const inputsWithFragments = inputs.filter(obj => obj.input.glTextureFragments && !obj.input.glTextureFragmentsAsColStack);\n const numFragments = output.glTextureFragments.length;\n\n if (inputsWithFragments.some(obj => obj.input.glTextureFragments.length !== numFragments)) {\n throw new Error('[WebGL2] number of texture fragments in inputs and output do not match');\n }\n\n for (let k = 0; k < numFragments; k++) {\n this.bindOutputTexture(output.glTextureFragments[k], output.glTextureFragmentShape);\n this.bindInputTextures(program, inputs, k);\n gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0);\n }\n } else {\n this.bindOutputTexture(output.glTexture, output.glTextureShape);\n this.bindInputTextures(program, inputs);\n gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0);\n }\n }\n\n readData(shape) {\n const gl = this.context;\n const buf = new ArrayBuffer(shape[0] * shape[1] * 4 * 4);\n const view = new Float32Array(buf);\n gl.readPixels(0, 0, shape[1], shape[0], gl.RGBA, gl.FLOAT, view);\n const out = [];\n\n for (let i = 0; i < view.length; i += 4) {\n out.push(view[i]);\n }\n\n return new Float32Array(out);\n }\n\n getWebGLTextureOptions(type, format) {\n const gl = this.context;\n const targetMap = {\n '2d': gl.TEXTURE_2D,\n '2d_array': gl.TEXTURE_2D_ARRAY,\n '3d': gl.TEXTURE_3D\n };\n const internalFormatMap = {\n float: gl.R32F,\n int: gl.R32I\n };\n const formatMap = {\n float: gl.RED,\n int: gl.RED_INTEGER\n };\n const typeMap = {\n float: gl.FLOAT,\n int: gl.INT\n };\n const textureTarget = targetMap[type];\n const textureInternalFormat = internalFormatMap[format];\n const textureFormat = formatMap[format];\n const textureType = typeMap[format];\n return {\n textureTarget,\n textureInternalFormat,\n textureFormat,\n textureType\n };\n }\n\n storeRef(type, obj) {\n if (type === 'texture') {\n this._refs.textures.push(obj);\n } else if (type === 'buffer') {\n this._refs.buffers.push(obj);\n }\n }\n\n clearRefs() {\n const gl = this.context;\n\n this._refs.textures.forEach(texture => gl.deleteTexture(texture));\n\n this._refs.buffers.forEach(buffer => gl.deleteBuffer(buffer));\n\n this._refs = {\n textures: [],\n buffers: []\n };\n }\n\n}\n\nconst webgl2 = new WebGL2();\nexports.webgl2 = webgl2;\nconst MAX_TEXTURE_SIZE = webgl2.MAX_TEXTURE_SIZE;\nexports.MAX_TEXTURE_SIZE = MAX_TEXTURE_SIZE;\nconst MAX_TEXTURE_IMAGE_UNITS = webgl2.MAX_TEXTURE_IMAGE_UNITS;\nexports.MAX_TEXTURE_IMAGE_UNITS = MAX_TEXTURE_IMAGE_UNITS;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _WebGL = require(\"./WebGL2\");\n\nclass Layer {\n constructor(attrs = {}) {\n this.layerClass = 'Layer';\n this.name = attrs.name;\n this.description = '';\n this.gpu = _WebGL.webgl2.isSupported && attrs.gpu;\n this.params = [];\n this.weights = {};\n this.inbound = [];\n this.outbound = [];\n }\n\n throwError(message) {\n throw new Error(`[${this.layerClass} layer: ${this.name || ''}] ${message}`);\n }\n\n toggleGPU(mode) {\n const newMode = typeof mode === 'undefined' ? !this.gpu : mode;\n\n if (_WebGL.webgl2.isSupported && newMode) {\n this.gpu = true;\n } else {\n this.gpu = false;\n }\n }\n\n setWeights(weightsArr, createGLTexture = true) {\n this.params.forEach((p, i) => {\n this.weights[p] = weightsArr[i];\n\n if (this.gpu && createGLTexture) {\n this.weights[p].createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n });\n }\n\n call(x) {\n this.output = x;\n return this.output;\n }\n\n}\n\nexports.default = Layer;","var createRange = require('./_createRange');\n\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\nvar range = createRange();\n\nmodule.exports = range;\n","\"use strict\"\n\nvar compile = require(\"cwise-compiler\")\n\nvar EmptyProc = {\n body: \"\",\n args: [],\n thisVars: [],\n localVars: []\n}\n\nfunction fixup(x) {\n if(!x) {\n return EmptyProc\n }\n for(var i=0; i>\",\n rrshift: \">>>\"\n}\n;(function(){\n for(var id in assign_ops) {\n var op = assign_ops[id]\n exports[id] = makeOp({\n args: [\"array\",\"array\",\"array\"],\n body: {args:[\"a\",\"b\",\"c\"],\n body: \"a=b\"+op+\"c\"},\n funcName: id\n })\n exports[id+\"eq\"] = makeOp({\n args: [\"array\",\"array\"],\n body: {args:[\"a\",\"b\"],\n body:\"a\"+op+\"=b\"},\n rvalue: true,\n funcName: id+\"eq\"\n })\n exports[id+\"s\"] = makeOp({\n args: [\"array\", \"array\", \"scalar\"],\n body: {args:[\"a\",\"b\",\"s\"],\n body:\"a=b\"+op+\"s\"},\n funcName: id+\"s\"\n })\n exports[id+\"seq\"] = makeOp({\n args: [\"array\",\"scalar\"],\n body: {args:[\"a\",\"s\"],\n body:\"a\"+op+\"=s\"},\n rvalue: true,\n funcName: id+\"seq\"\n })\n }\n})();\n\nvar unary_ops = {\n not: \"!\",\n bnot: \"~\",\n neg: \"-\",\n recip: \"1.0/\"\n}\n;(function(){\n for(var id in unary_ops) {\n var op = unary_ops[id]\n exports[id] = makeOp({\n args: [\"array\", \"array\"],\n body: {args:[\"a\",\"b\"],\n body:\"a=\"+op+\"b\"},\n funcName: id\n })\n exports[id+\"eq\"] = makeOp({\n args: [\"array\"],\n body: {args:[\"a\"],\n body:\"a=\"+op+\"a\"},\n rvalue: true,\n count: 2,\n funcName: id+\"eq\"\n })\n }\n})();\n\nvar binary_ops = {\n and: \"&&\",\n or: \"||\",\n eq: \"===\",\n neq: \"!==\",\n lt: \"<\",\n gt: \">\",\n leq: \"<=\",\n geq: \">=\"\n}\n;(function() {\n for(var id in binary_ops) {\n var op = binary_ops[id]\n exports[id] = makeOp({\n args: [\"array\",\"array\",\"array\"],\n body: {args:[\"a\", \"b\", \"c\"],\n body:\"a=b\"+op+\"c\"},\n funcName: id\n })\n exports[id+\"s\"] = makeOp({\n args: [\"array\",\"array\",\"scalar\"],\n body: {args:[\"a\", \"b\", \"s\"],\n body:\"a=b\"+op+\"s\"},\n funcName: id+\"s\"\n })\n exports[id+\"eq\"] = makeOp({\n args: [\"array\", \"array\"],\n body: {args:[\"a\", \"b\"],\n body:\"a=a\"+op+\"b\"},\n rvalue:true,\n count:2,\n funcName: id+\"eq\"\n })\n exports[id+\"seq\"] = makeOp({\n args: [\"array\", \"scalar\"],\n body: {args:[\"a\",\"s\"],\n body:\"a=a\"+op+\"s\"},\n rvalue:true,\n count:2,\n funcName: id+\"seq\"\n })\n }\n})();\n\nvar math_unary = [\n \"abs\",\n \"acos\",\n \"asin\",\n \"atan\",\n \"ceil\",\n \"cos\",\n \"exp\",\n \"floor\",\n \"log\",\n \"round\",\n \"sin\",\n \"sqrt\",\n \"tan\"\n]\n;(function() {\n for(var i=0; ithis_s){this_s=-a}else if(a>this_s){this_s=a}\", localVars: [], thisVars: [\"this_s\"]},\n post: {args:[], localVars:[], thisVars:[\"this_s\"], body:\"return this_s\"},\n funcName: \"norminf\"\n})\n\nexports.norm1 = compile({\n args:[\"array\"],\n pre: {args:[], localVars:[], thisVars:[\"this_s\"], body:\"this_s=0\"},\n body: {args:[{name:\"a\", lvalue:false, rvalue:true, count:3}], body: \"this_s+=a<0?-a:a\", localVars: [], thisVars: [\"this_s\"]},\n post: {args:[], localVars:[], thisVars:[\"this_s\"], body:\"return this_s\"},\n funcName: \"norm1\"\n})\n\nexports.sup = compile({\n args: [ \"array\" ],\n pre:\n { body: \"this_h=-Infinity\",\n args: [],\n thisVars: [ \"this_h\" ],\n localVars: [] },\n body:\n { body: \"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_\",\n args: [{\"name\":\"_inline_1_arg0_\",\"lvalue\":false,\"rvalue\":true,\"count\":2} ],\n thisVars: [ \"this_h\" ],\n localVars: [] },\n post:\n { body: \"return this_h\",\n args: [],\n thisVars: [ \"this_h\" ],\n localVars: [] }\n })\n\nexports.inf = compile({\n args: [ \"array\" ],\n pre:\n { body: \"this_h=Infinity\",\n args: [],\n thisVars: [ \"this_h\" ],\n localVars: [] },\n body:\n { body: \"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}\",\n args:[\n {name:\"_inline_1_arg0_\",lvalue:false,rvalue:true,count:2},\n {name:\"_inline_1_arg1_\",lvalue:false,rvalue:true,count:2}],\n thisVars:[\"this_i\",\"this_v\"],\n localVars:[\"_inline_1_k\"]},\n post:{\n body:\"{return this_i}\",\n args:[],\n thisVars:[\"this_i\"],\n localVars:[]}\n}) \n\nexports.random = makeOp({\n args: [\"array\"],\n pre: {args:[], body:\"this_f=Math.random\", thisVars:[\"this_f\"]},\n body: {args: [\"a\"], body:\"a=this_f()\", thisVars:[\"this_f\"]},\n funcName: \"random\"\n})\n\nexports.assign = makeOp({\n args:[\"array\", \"array\"],\n body: {args:[\"a\", \"b\"], body:\"a=b\"},\n funcName: \"assign\" })\n\nexports.assigns = makeOp({\n args:[\"array\", \"scalar\"],\n body: {args:[\"a\", \"b\"], body:\"a=b\"},\n funcName: \"assigns\" })\n\n\nexports.equals = compile({\n args:[\"array\", \"array\"],\n pre: EmptyProc,\n body: {args:[{name:\"x\", lvalue:false, rvalue:true, count:1},\n {name:\"y\", lvalue:false, rvalue:true, count:1}], \n body: \"if(x!==y){return false}\", \n localVars: [], \n thisVars: []},\n post: {args:[], localVars:[], thisVars:[], body:\"return true\"},\n funcName: \"equals\"\n})\n\n\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.checkShape = checkShape;\nexports.data3DLayoutForGL = data3DLayoutForGL;\nexports.createIndicesFor2DReshaped = createIndicesFor2DReshaped;\n\nvar _range2 = _interopRequireDefault(require(\"lodash/range\"));\n\nvar _ndarray = _interopRequireDefault(require(\"ndarray\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction checkShape(data, shape) {\n if (data.length && shape.length && data.length !== shape.reduce((a, b) => a * b, 1)) {\n throw new Error('[Tensor] specified shape incompatible with data.');\n }\n}\n\nfunction data3DLayoutForGL(typedarrayConstructor, arr, shape) {\n const data = new typedarrayConstructor(arr.data.length);\n const slice = (0, _ndarray.default)(new typedarrayConstructor(shape[0] * shape[1]), [shape[0], shape[1]]);\n let offset = 0;\n\n for (let i = 0; i < shape[2]; i++) {\n _ndarrayOps.default.assign(slice, arr.pick(null, null, i));\n\n data.set(slice.data, offset);\n offset += shape[0] * shape[1];\n }\n\n return data;\n}\n\nfunction createIndicesFor2DReshaped(shape, square = false, axis = -1) {\n const size = shape.reduce((a, b) => a * b, 1);\n const indicesArr = (0, _ndarray.default)(new Int32Array(size), shape);\n\n if (square) {\n const squareDim = Math.ceil(Math.sqrt(size));\n const indicesRowArrReshaped = (0, _ndarray.default)(new Int32Array(squareDim ** 2), [squareDim, squareDim]);\n const indicesColArrReshaped = (0, _ndarray.default)(new Int32Array(squareDim ** 2), [squareDim, squareDim]);\n const indicesArrReshaped = (0, _ndarray.default)(new Int32Array(squareDim ** 2), [squareDim, squareDim]);\n\n for (let i = 0; i < squareDim; i++) {\n _ndarrayOps.default.assigns(indicesRowArrReshaped.pick(i, null), i);\n }\n\n for (let j = 0; j < squareDim; j++) {\n _ndarrayOps.default.assigns(indicesColArrReshaped.pick(null, j), j);\n }\n\n _ndarrayOps.default.muls(indicesArrReshaped, indicesRowArrReshaped, squareDim);\n\n _ndarrayOps.default.addeq(indicesArrReshaped, indicesColArrReshaped);\n\n indicesArr.data.set(indicesArrReshaped.data.subarray(0, indicesArr.size));\n } else {\n if (axis < 0) {\n axis = shape.length + axis;\n }\n\n const axisSize = shape[axis];\n const indicesRowArr = (0, _ndarray.default)(new Int32Array(size), shape);\n const indicesColArr = (0, _ndarray.default)(new Int32Array(size), shape);\n const otherAxes = [...shape.slice(0, axis), ...shape.slice(axis + 1)];\n const otherAxesSize = otherAxes.reduce((a, b) => a * b, 1);\n const indicesRowArrSlice = (0, _ndarray.default)(new Int32Array((0, _range2.default)(otherAxesSize)), otherAxes);\n const axisSlices = Array(shape.length).fill(null);\n\n for (let n = 0; n < axisSize; n++) {\n axisSlices[axis] = n;\n\n _ndarrayOps.default.assign(indicesRowArr.pick(...axisSlices), indicesRowArrSlice);\n\n _ndarrayOps.default.assigns(indicesColArr.pick(...axisSlices), n);\n }\n\n _ndarrayOps.default.muls(indicesArr, indicesRowArr, axisSize);\n\n _ndarrayOps.default.addeq(indicesArr, indicesColArr);\n }\n\n return indicesArr;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _WebGL = require(\"./WebGL2\");\n\nvar tensorUtils = _interopRequireWildcard(require(\"./utils/tensorUtils\"));\n\nvar _ndarray = _interopRequireDefault(require(\"ndarray\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _ndarraySqueeze = _interopRequireDefault(require(\"ndarray-squeeze\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nclass Tensor {\n constructor(data, shape, options = {}) {\n this.arrayType = options.type || Float32Array;\n\n if (data && data.length && (data instanceof this.arrayType || data instanceof Array)) {\n tensorUtils.checkShape(data, shape);\n\n if (data instanceof this.arrayType) {\n this.tensor = (0, _ndarray.default)(data, shape);\n } else if (data instanceof Array) {\n this.tensor = (0, _ndarray.default)(new this.arrayType(data), shape);\n }\n } else if (!data.length && shape.length) {\n this.tensor = (0, _ndarray.default)(new this.arrayType(shape.reduce((a, b) => a * b, 1)), shape);\n } else {\n this.tensor = (0, _ndarray.default)(new this.arrayType([]), []);\n }\n }\n\n createGLTexture({\n type = '2d',\n format = 'float',\n supportsTextureFragments = false\n }) {\n let shape = [];\n\n if (this.tensor.shape.length === 1) {\n shape = [1, this.tensor.shape[0]];\n this.is1D = true;\n } else if (this.tensor.shape.length === 2) {\n shape = this.tensor.shape;\n } else if (this.tensor.shape.length === 3 && (type === '2d_array' || type === '3d')) {\n shape = this.tensor.shape;\n } else {\n throw new Error('[Tensor] cannot create WebGL2 texture.');\n }\n\n this.glTextureShape = shape;\n this.glTextureType = type;\n this.glTextureFormat = format;\n\n if (type === '2d') {\n if (this.glTextureShape[0] > _WebGL.MAX_TEXTURE_SIZE && supportsTextureFragments) {\n this._create2DRowFragmentedGLTexture();\n } else {\n this._create2DGLTexture();\n }\n } else if (type === '2d_array' || type === '3d') {\n this._create3DGLTexture();\n } else {\n throw new Error(`[Tensor] invalid type ${type}.`);\n }\n }\n\n _create2DGLTexture() {\n const gl = _WebGL.webgl2.context;\n\n const textureOptions = _WebGL.webgl2.getWebGLTextureOptions(this.glTextureType, this.glTextureFormat);\n\n const {\n textureTarget,\n textureInternalFormat,\n textureFormat,\n textureType\n } = textureOptions;\n this.glTexture = gl.createTexture();\n\n _WebGL.webgl2.storeRef('texture', this.glTexture);\n\n gl.bindTexture(textureTarget, this.glTexture);\n const shape = this.glTextureShape;\n const data = this.tensor.data;\n gl.texImage2D(textureTarget, 0, textureInternalFormat, shape[1], shape[0], 0, textureFormat, textureType, data);\n gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(textureTarget, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texParameteri(textureTarget, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n }\n\n _create2DRowFragmentedGLTexture() {\n const gl = _WebGL.webgl2.context;\n\n const textureOptions = _WebGL.webgl2.getWebGLTextureOptions(this.glTextureType, this.glTextureFormat);\n\n const {\n textureTarget,\n textureInternalFormat,\n textureFormat,\n textureType\n } = textureOptions;\n this.glTextureFragments = [];\n this.glTextureFragmentShape = [_WebGL.MAX_TEXTURE_SIZE, this.glTextureShape[1]];\n const shape = this.glTextureFragmentShape;\n const numFragments = Math.ceil(this.glTextureShape[0] / _WebGL.MAX_TEXTURE_SIZE);\n let offset = 0;\n\n for (let k = 0; k < numFragments; k++) {\n const glTexture = gl.createTexture();\n\n _WebGL.webgl2.storeRef('texture', glTexture);\n\n gl.bindTexture(textureTarget, glTexture);\n let data;\n\n if (k === numFragments - 1) {\n data = new this.arrayType(shape[0] * shape[1]);\n data.set(this.tensor.data.slice(offset, offset + shape[0] * shape[1]), 0);\n } else {\n data = this.tensor.data.slice(offset, offset + shape[0] * shape[1]);\n }\n\n gl.texImage2D(textureTarget, 0, textureInternalFormat, shape[1], shape[0], 0, textureFormat, textureType, data);\n gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(textureTarget, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texParameteri(textureTarget, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n this.glTextureFragments.push(glTexture);\n offset += shape[0] * shape[1];\n }\n }\n\n _create3DGLTexture() {\n const gl = _WebGL.webgl2.context;\n\n const textureOptions = _WebGL.webgl2.getWebGLTextureOptions(this.glTextureType, this.glTextureFormat);\n\n const {\n textureTarget,\n textureInternalFormat,\n textureFormat,\n textureType\n } = textureOptions;\n this.glTexture = gl.createTexture();\n\n _WebGL.webgl2.storeRef('texture', this.glTexture);\n\n gl.bindTexture(textureTarget, this.glTexture);\n const shape = this.glTextureShape;\n const data = tensorUtils.data3DLayoutForGL(this.arrayType, this.tensor, this.glTextureShape);\n gl.texImage3D(textureTarget, 0, textureInternalFormat, shape[1], shape[0], shape[2], 0, textureFormat, textureType, data);\n gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(textureTarget, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texParameteri(textureTarget, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n }\n\n convert2DRowFragmentedGLTextureToColStack() {\n if (!this.glTextureFragments || !this.glTextureFragmentShape) {\n throw new Error('[Tensor] no glTextureFragments available.');\n }\n\n const gl = _WebGL.webgl2.context;\n\n const textureOptions = _WebGL.webgl2.getWebGLTextureOptions(this.glTextureType, this.glTextureFormat);\n\n const {\n textureTarget,\n textureInternalFormat,\n textureFormat,\n textureType\n } = textureOptions;\n\n if (!this.glTextureFragmentsAsColStack) {\n this.glTextureFragmentsAsColStack = gl.createTexture();\n\n _WebGL.webgl2.storeRef('texture', this.glTextureFragmentsAsColStack);\n\n gl.bindTexture(textureTarget, this.glTextureFragmentsAsColStack);\n const numFragments = this.glTextureFragments.length;\n this.glTextureFragmentsAsColStackShape = [this.glTextureFragmentShape[0], this.glTextureFragmentShape[1] * numFragments];\n const shape = this.glTextureFragmentsAsColStackShape;\n const data = new this.arrayType(shape.reduce((a, b) => a * b, 1));\n gl.texImage2D(textureTarget, 0, textureInternalFormat, shape[1], shape[0], 0, textureFormat, textureType, data);\n gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(textureTarget, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texParameteri(textureTarget, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n } else {\n gl.bindTexture(textureTarget, this.glTextureFragmentsAsColStack);\n }\n\n const fbo = gl.createFramebuffer();\n gl.bindFramebuffer(gl.READ_FRAMEBUFFER, fbo);\n this.glTextureFragments.forEach((texture, k) => {\n gl.framebufferTexture2D(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n gl.copyTexSubImage2D(textureTarget, 0, k * this.glTextureFragmentShape[1], 0, 0, 0, this.glTextureFragmentShape[1], this.glTextureFragmentShape[0]);\n });\n gl.deleteFramebuffer(fbo);\n }\n\n removeGLTextureFragmentsAsColStack() {\n if (this.glTextureFragmentsAsColStack) {\n const gl = _WebGL.webgl2.context;\n gl.deleteTexture(this.glTextureFragmentsAsColStack);\n delete this.glTextureFragmentsAsColStack;\n delete this.glTextureFragmentsAsColStackShape;\n }\n }\n\n deleteGLTexture() {\n const gl = _WebGL.webgl2.context;\n\n if (this.glTexture) {\n gl.deleteTexture(this.glTexture);\n delete this.glTexture;\n }\n\n if (this.glTextureFragments) {\n this.glTextureFragments.forEach(texture => {\n gl.deleteTexture(texture);\n });\n delete this.glTextureFragments;\n }\n }\n\n replaceTensorData(data) {\n if (data && data.length && data instanceof this.arrayType) {\n this.tensor.data.set(data);\n } else if (data && data.length && data instanceof Array) {\n this.tensor.data.set(new this.arrayType(data));\n } else {\n throw new Error('[Tensor] invalid input for replaceTensorData method.');\n }\n\n if (this.glTexture) {\n const gl = _WebGL.webgl2.context;\n\n const textureOptions = _WebGL.webgl2.getWebGLTextureOptions(this.glTextureType, this.glTextureFormat);\n\n const {\n textureTarget,\n textureFormat,\n textureType\n } = textureOptions;\n gl.bindTexture(textureTarget, this.glTexture);\n const shape = this.glTextureShape;\n\n if (this.glTextureType === '2d') {\n const data = this.tensor.data;\n gl.texSubImage2D(textureTarget, 0, 0, 0, shape[1], shape[0], textureFormat, textureType, data, 0);\n } else if (this.glTextureType === '2d_array' || this.glTextureType === '3d') {\n const data = tensorUtils.data3DLayoutForGL(this.arrayType, this.tensor, shape);\n gl.texSubImage3D(textureTarget, 0, 0, 0, 0, shape[1], shape[0], shape[2], textureFormat, textureType, data, 0);\n }\n }\n }\n\n transferFromGLTexture() {\n if (this.glTextureFragments) {\n this.tensor = (0, _ndarray.default)(new this.arrayType(this.glTextureShape[0] * this.glTextureShape[1]), this.glTextureShape);\n let offset = 0;\n\n for (let k = 0; k < this.glTextureFragments.length; k++) {\n _WebGL.webgl2.bindOutputTexture(this.glTextureFragments[k], this.glTextureFragmentShape);\n\n const fragmentData = _WebGL.webgl2.readData(this.glTextureFragmentShape);\n\n if (k === this.glTextureFragments.length - 1) {\n const truncate = this.tensor.data.length - offset;\n this.tensor.data.set(fragmentData.subarray(0, truncate), offset);\n } else {\n this.tensor.data.set(fragmentData, offset);\n }\n\n offset += fragmentData.length;\n }\n } else {\n _WebGL.webgl2.bindOutputTexture(this.glTexture, this.glTextureShape);\n\n this.tensor = (0, _ndarray.default)(new this.arrayType([]), this.glTextureShape);\n this.tensor.data = _WebGL.webgl2.readData(this.glTextureShape);\n }\n\n if (this.is1D && this.glTextureShape[0] === 1) {\n this.tensor = (0, _ndarraySqueeze.default)(this.tensor, [0]);\n }\n }\n\n reshapeTo2D() {\n const axis = this.tensor.shape.length - 1;\n const axisSize = this.tensor.shape[axis];\n const otherAxes = this.tensor.shape.slice(0, axis);\n const otherAxesSize = otherAxes.reduce((a, b) => a * b, 1);\n const reshaped = (0, _ndarray.default)(new this.arrayType(otherAxesSize * axisSize), [otherAxesSize, axisSize]);\n const otherAxesData = (0, _ndarray.default)(new this.arrayType(otherAxesSize), otherAxes);\n const otherAxesDataRaveled = (0, _ndarray.default)(new this.arrayType(otherAxesSize), [otherAxesSize]);\n const axisSlices = Array(this.tensor.shape.length).fill(null);\n\n for (let n = 0; n < axisSize; n++) {\n axisSlices[axis] = n;\n\n _ndarrayOps.default.assign(otherAxesData, this.tensor.pick(...axisSlices));\n\n otherAxesDataRaveled.data = otherAxesData.data;\n\n _ndarrayOps.default.assign(reshaped.pick(null, n), otherAxesDataRaveled);\n }\n\n this.originalShape = this.tensor.shape;\n this.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.tensor.shape, false, axis);\n this.tensor = reshaped;\n this.is2DReshaped = true;\n }\n\n reshapeFrom2D(axis = -1) {\n if (!this.is2DReshaped) {\n throw new Error('[Tensor] not in reshaped 2D representation.');\n }\n\n if (!this.originalShape) {\n throw new Error('[Tensor] does not contain originalShape.');\n }\n\n if (axis < 0) {\n axis = this.originalShape.length + axis;\n }\n\n const channelDataSize = this.tensor.shape[0];\n const channels = this.tensor.shape[1];\n const reshaped = (0, _ndarray.default)(new this.arrayType(this.originalShape.reduce((a, b) => a * b, 1)), this.originalShape);\n const channelDataRaveled = (0, _ndarray.default)(new this.arrayType(channelDataSize), [channelDataSize]);\n const unraveledChannelShape = [...this.originalShape.slice(0, axis), ...this.originalShape.slice(axis + 1)];\n const unraveledChannel = (0, _ndarray.default)(new this.arrayType(unraveledChannelShape.reduce((a, b) => a * b, 1)), unraveledChannelShape);\n const axisSlices = Array(this.originalShape.length).fill(null);\n\n for (let n = 0; n < channels; n++) {\n _ndarrayOps.default.assign(channelDataRaveled, this.tensor.pick(null, n));\n\n unraveledChannel.data = channelDataRaveled.data;\n axisSlices[axis] = n;\n\n _ndarrayOps.default.assign(reshaped.pick(...axisSlices), unraveledChannel);\n }\n\n this.tensor = reshaped;\n }\n\n reshapeTo2DSquare() {\n const squareDim = Math.ceil(Math.sqrt(this.tensor.size));\n const reshaped = (0, _ndarray.default)(new this.arrayType(squareDim ** 2), [squareDim, squareDim]);\n reshaped.data.set(this.tensor.data);\n this.originalShape = this.tensor.shape;\n this.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.tensor.shape, true);\n this.tensor = reshaped;\n this.is2DSquareReshaped = true;\n }\n\n reshapeFrom2DSquare() {\n if (!this.is2DSquareReshaped) {\n throw new Error('[Tensor] not in reshaped 2D square representation.');\n }\n\n if (!this.originalShape) {\n throw new Error('[Tensor] does not contain originalShape.');\n }\n\n const size = this.originalShape.reduce((a, b) => a * b, 1);\n const reshaped = (0, _ndarray.default)(new this.arrayType(size), this.originalShape);\n reshaped.data.set(this.tensor.data.subarray(0, size));\n this.tensor = reshaped;\n }\n\n}\n\nexports.default = Tensor;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _isEqual2 = _interopRequireDefault(require(\"lodash/isEqual\"));\n\nvar _Layer = _interopRequireDefault(require(\"../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../Tensor\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass InputLayer extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'InputLayer';\n const {\n shape = []\n } = attrs;\n this.shape = attrs.batch_input_shape && attrs.batch_input_shape.length ? attrs.batch_input_shape.slice(1) : shape;\n this.description = `shape: ${JSON.stringify(this.shape)}`;\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.inputShape = x.tensor.shape;\n\n if (!(0, _isEqual2.default)(this.inputShape, this.shape)) {\n this.throwError(`input tensor shape ${x.tensor.shape} does not match specified shape ${this.shape}.`);\n }\n\n this.output = new _Tensor.default(x.tensor.data, x.tensor.shape);\n }\n\n _callGPU(x) {\n if (!x.glTexture && !x.glTextureFragments) {\n this.inputShape = x.tensor.shape;\n } else {\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n } else {\n this.inputShape = x.tensor.shape;\n }\n }\n\n if (!(0, _isEqual2.default)(this.inputShape, this.shape)) {\n this.throwError(`input tensor shape ${x.tensor.shape} does not match specified shape ${this.shape}.`);\n }\n\n if (!x.glTexture) {\n if (x.tensor.shape.length <= 2) {\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n } else if (x.tensor.shape.length > 2) {\n x.reshapeTo2D();\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n }\n\n this.output = x;\n }\n\n}\n\nexports.default = InputLayer;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = softmax;\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction softmax(x) {\n if (x.tensor.shape.length === 1) {\n const maxval = _ndarrayOps.default.sup(x.tensor);\n\n _ndarrayOps.default.subseq(x.tensor, maxval);\n\n _ndarrayOps.default.expeq(x.tensor);\n\n const sum = _ndarrayOps.default.sum(x.tensor);\n\n _ndarrayOps.default.divseq(x.tensor, sum);\n } else if (x.tensor.shape.length === 2) {\n for (let i = 0; i < x.tensor.shape[0]; i++) {\n const maxval = _ndarrayOps.default.sup(x.tensor.pick(i, null));\n\n _ndarrayOps.default.subseq(x.tensor.pick(i, null), maxval);\n\n _ndarrayOps.default.expeq(x.tensor.pick(i, null));\n\n const sum = _ndarrayOps.default.sum(x.tensor.pick(i, null));\n\n _ndarrayOps.default.divseq(x.tensor.pick(i, null), sum);\n }\n } else {\n throw new Error(`[activations.softmax] tensor shape ${x.tensor.shape} not supported.`);\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = selu;\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst _selu = (0, _cwise.default)({\n args: ['array', 'scalar'],\n body: function (_x) {\n const alpha = 1.6732632423543772848170429916717;\n const scale = 1.0507009873554804934193349852946;\n _x = scale * (Math.max(_x, 0) + alpha * (Math.exp(Math.min(_x, 0)) - 1));\n }\n});\n\nfunction selu(x) {\n _selu(x.tensor);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = softsign;\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst _softsign = (0, _cwise.default)({\n args: ['array'],\n body: function (_x) {\n _x /= 1 + Math.abs(_x);\n }\n});\n\nfunction softsign(x) {\n _softsign(x.tensor);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = relu;\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../Tensor\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction relu(x, opts = {}) {\n const {\n alpha = 0,\n maxValue = null\n } = opts;\n let neg;\n\n if (alpha !== 0) {\n neg = new _Tensor.default([], x.tensor.shape);\n\n _ndarrayOps.default.mins(neg.tensor, x.tensor, 0);\n\n _ndarrayOps.default.mulseq(neg.tensor, alpha);\n }\n\n _ndarrayOps.default.maxseq(x.tensor, 0);\n\n if (maxValue) {\n _ndarrayOps.default.minseq(x.tensor, maxValue);\n }\n\n if (neg) {\n _ndarrayOps.default.addeq(x.tensor, neg.tensor);\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = tanh;\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst _tanh = (0, _cwise.default)({\n args: ['array'],\n body: function (_x) {\n _x = Math.tanh(_x);\n }\n});\n\nfunction tanh(x) {\n _tanh(x.tensor);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = sigmoid;\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst _sigmoid = (0, _cwise.default)({\n args: ['array'],\n body: function (_x) {\n _x = 1 / (1 + Math.exp(-_x));\n }\n});\n\nfunction sigmoid(x) {\n _sigmoid(x.tensor);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = hard_sigmoid;\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst _hard_sigmoid = (0, _cwise.default)({\n args: ['array'],\n body: function (_x) {\n _x = _x * 0.2 + 0.5;\n\n if (_x <= 0) {\n _x = 0;\n } else if (_x >= 1) {\n _x = 1;\n }\n }\n});\n\nfunction hard_sigmoid(x) {\n _hard_sigmoid(x.tensor);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = linear;\n\nfunction linear(x) {\n return x;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"softmax\", {\n enumerable: true,\n get: function () {\n return _softmax.default;\n }\n});\nObject.defineProperty(exports, \"elu\", {\n enumerable: true,\n get: function () {\n return _elu.default;\n }\n});\nObject.defineProperty(exports, \"selu\", {\n enumerable: true,\n get: function () {\n return _selu.default;\n }\n});\nObject.defineProperty(exports, \"softplus\", {\n enumerable: true,\n get: function () {\n return _softplus.default;\n }\n});\nObject.defineProperty(exports, \"softsign\", {\n enumerable: true,\n get: function () {\n return _softsign.default;\n }\n});\nObject.defineProperty(exports, \"relu\", {\n enumerable: true,\n get: function () {\n return _relu.default;\n }\n});\nObject.defineProperty(exports, \"tanh\", {\n enumerable: true,\n get: function () {\n return _tanh.default;\n }\n});\nObject.defineProperty(exports, \"sigmoid\", {\n enumerable: true,\n get: function () {\n return _sigmoid.default;\n }\n});\nObject.defineProperty(exports, \"hard_sigmoid\", {\n enumerable: true,\n get: function () {\n return _hard_sigmoid.default;\n }\n});\nObject.defineProperty(exports, \"linear\", {\n enumerable: true,\n get: function () {\n return _linear.default;\n }\n});\n\nvar _softmax = _interopRequireDefault(require(\"./softmax\"));\n\nvar _elu = _interopRequireDefault(require(\"./elu\"));\n\nvar _selu = _interopRequireDefault(require(\"./selu\"));\n\nvar _softplus = _interopRequireDefault(require(\"./softplus\"));\n\nvar _softsign = _interopRequireDefault(require(\"./softsign\"));\n\nvar _relu = _interopRequireDefault(require(\"./relu\"));\n\nvar _tanh = _interopRequireDefault(require(\"./tanh\"));\n\nvar _sigmoid = _interopRequireDefault(require(\"./sigmoid\"));\n\nvar _hard_sigmoid = _interopRequireDefault(require(\"./hard_sigmoid\"));\n\nvar _linear = _interopRequireDefault(require(\"./linear\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _activations = require(\"../../activations\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst programSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform float alpha;\\nout vec4 outColor;\\n\\nvoid main() {\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n outColor = max(v, 0.0) + alpha * min(v, 0.0);\\n}\\n\";\n\nclass LeakyReLU extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'LeakyReLU';\n const {\n alpha = 0.3\n } = attrs;\n this.description = `alpha: ${alpha}`;\n this.alpha = alpha;\n\n if (this.gpu) {\n this.program = _WebGL.webgl2.compileProgram(programSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.output = x;\n (0, _activations.relu)(this.output, {\n alpha: this.alpha\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture && !x.glTextureFragments) {\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], x.glTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n\n if (x.is1D) {\n this.output.is1D = x.is1D;\n } else if (x.is2DReshaped || x.is2DSquareReshaped) {\n if (x.is2DReshaped) {\n this.output.is2DReshaped = x.is2DReshaped;\n } else if (x.is2DSquareReshaped) {\n this.output.is2DSquareReshaped = x.is2DSquareReshaped;\n }\n\n this.output.originalShape = x.originalShape;\n this.output.indicesForReshaped = x.indicesForReshaped;\n }\n }\n\n _WebGL.webgl2.runProgram({\n program: this.program,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: this.alpha,\n type: 'float',\n name: 'alpha'\n }],\n supportsTextureFragments: true\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = LeakyReLU;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst programSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform sampler2D alpha;\\nout vec4 outColor;\\n\\nvoid main() {\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n vec4 a = texture(alpha, vec2(outTex.x, outTex.y));\\n outColor = max(v, 0.0) + a * min(v, 0.0);\\n}\\n\";\n\nclass PReLU extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n Object.defineProperty(this, \"_compute\", {\n configurable: true,\n enumerable: true,\n writable: true,\n value: (0, _cwise.default)({\n args: ['array', 'array'],\n body: function (_x, alpha) {\n _x = Math.max(_x, 0) + alpha * Math.min(_x, 0);\n }\n })\n });\n this.layerClass = 'PReLU';\n this.params = ['alpha'];\n\n if (this.gpu) {\n this.program = _WebGL.webgl2.compileProgram(programSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.output = x;\n\n this._compute(this.output.tensor, this.weights['alpha'].tensor);\n }\n\n _callGPU(x) {\n if (!x.glTexture && !x.glTextureFragments) {\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], x.glTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n\n if (x.is1D) {\n this.output.is1D = x.is1D;\n } else if (x.is2DReshaped || x.is2DSquareReshaped) {\n if (x.is2DReshaped) {\n this.output.is2DReshaped = x.is2DReshaped;\n } else if (x.is2DSquareReshaped) {\n this.output.is2DSquareReshaped = x.is2DSquareReshaped;\n }\n\n this.output.originalShape = x.originalShape;\n this.output.indicesForReshaped = x.indicesForReshaped;\n }\n }\n\n _WebGL.webgl2.runProgram({\n program: this.program,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.weights['alpha'],\n name: 'alpha'\n }],\n supportsTextureFragments: true\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = PReLU;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst programSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform float alpha;\\nout vec4 outColor;\\n\\nvoid main() {\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n outColor = max(v, 0.0) + alpha * (exp(min(v, 0.0)) - 1.0);\\n}\\n\";\n\nclass ELU extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n\n _initialiseProps.call(this);\n\n this.layerClass = 'ELU';\n const {\n alpha = 1.0\n } = attrs;\n this.description = `alpha: ${alpha}`;\n this.alpha = alpha;\n\n if (this.gpu) {\n this.program = _WebGL.webgl2.compileProgram(programSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.output = x;\n\n this._compute(this.output.tensor, this.alpha);\n }\n\n _callGPU(x) {\n if (!x.glTexture && !x.glTextureFragments) {\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], x.glTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n\n if (x.is1D) {\n this.output.is1D = x.is1D;\n } else if (x.is2DReshaped || x.is2DSquareReshaped) {\n if (x.is2DReshaped) {\n this.output.is2DReshaped = x.is2DReshaped;\n } else if (x.is2DSquareReshaped) {\n this.output.is2DSquareReshaped = x.is2DSquareReshaped;\n }\n\n this.output.originalShape = x.originalShape;\n this.output.indicesForReshaped = x.indicesForReshaped;\n }\n }\n\n _WebGL.webgl2.runProgram({\n program: this.program,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: this.alpha,\n type: 'float',\n name: 'alpha'\n }],\n supportsTextureFragments: true\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = ELU;\n\nvar _initialiseProps = function () {\n Object.defineProperty(this, \"_compute\", {\n configurable: true,\n enumerable: true,\n writable: true,\n value: (0, _cwise.default)({\n args: ['array', 'scalar'],\n body: function (_x, alpha) {\n _x = Math.max(_x, 0) + alpha * (Math.exp(Math.min(_x, 0)) - 1);\n }\n })\n });\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst programSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform float theta;\\nout vec4 outColor;\\n\\nvoid main() {\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n outColor = v * float(greaterThan(v, vec4(theta)));\\n}\\n\";\n\nclass ThresholdedReLU extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n\n _initialiseProps.call(this);\n\n this.layerClass = 'ThresholdedReLU';\n const {\n theta = 1\n } = attrs;\n this.description = `theta: ${theta}`;\n this.theta = theta;\n\n if (this.gpu) {\n this.program = _WebGL.webgl2.compileProgram(programSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.output = x;\n\n this._compute(this.output.tensor, this.theta);\n }\n\n _callGPU(x) {\n if (!x.glTexture && !x.glTextureFragments) {\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], x.glTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n\n if (x.is1D) {\n this.output.is1D = x.is1D;\n } else if (x.is2DReshaped || x.is2DSquareReshaped) {\n if (x.is2DReshaped) {\n this.output.is2DReshaped = x.is2DReshaped;\n } else if (x.is2DSquareReshaped) {\n this.output.is2DSquareReshaped = x.is2DSquareReshaped;\n }\n\n this.output.originalShape = x.originalShape;\n this.output.indicesForReshaped = x.indicesForReshaped;\n }\n }\n\n _WebGL.webgl2.runProgram({\n program: this.program,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: this.theta,\n type: 'float',\n name: 'theta'\n }],\n supportsTextureFragments: true\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = ThresholdedReLU;\n\nvar _initialiseProps = function () {\n Object.defineProperty(this, \"_compute\", {\n configurable: true,\n enumerable: true,\n writable: true,\n value: (0, _cwise.default)({\n args: ['array', 'scalar'],\n body: function (_x, theta) {\n _x = _x * Number(_x > theta);\n }\n })\n });\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"LeakyReLU\", {\n enumerable: true,\n get: function () {\n return _LeakyReLU.default;\n }\n});\nObject.defineProperty(exports, \"PReLU\", {\n enumerable: true,\n get: function () {\n return _PReLU.default;\n }\n});\nObject.defineProperty(exports, \"ELU\", {\n enumerable: true,\n get: function () {\n return _ELU.default;\n }\n});\nObject.defineProperty(exports, \"ThresholdedReLU\", {\n enumerable: true,\n get: function () {\n return _ThresholdedReLU.default;\n }\n});\n\nvar _LeakyReLU = _interopRequireDefault(require(\"./LeakyReLU\"));\n\nvar _PReLU = _interopRequireDefault(require(\"./PReLU\"));\n\nvar _ELU = _interopRequireDefault(require(\"./ELU\"));\n\nvar _ThresholdedReLU = _interopRequireDefault(require(\"./ThresholdedReLU\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = add;\n\nvar _range2 = _interopRequireDefault(require(\"lodash/range\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction add(numInputs, shape) {\n const source = `#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs[${numInputs}];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${shape[0]}) * outTex.y);\n int out_x = int(float(${shape[1]}) * outTex.x);\n \n outColor = vec4(${(0, _range2.default)(numInputs).map(i => `texelFetch(inputs[${i}], ivec2(out_x, out_y), 0).r`).join(' + ')});\n}\n`;\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = average;\n\nvar _range2 = _interopRequireDefault(require(\"lodash/range\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction average(numInputs, shape) {\n const source = `#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs[${numInputs}];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${shape[0]}) * outTex.y);\n int out_x = int(float(${shape[1]}) * outTex.x);\n \n outColor = vec4((${(0, _range2.default)(numInputs).map(i => `texelFetch(inputs[${i}], ivec2(out_x, out_y), 0).r`).join(' + ')}) / float(${numInputs}));\n}\n`;\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = concatenate;\n\nvar _take2 = _interopRequireDefault(require(\"lodash/take\"));\n\nvar _sum2 = _interopRequireDefault(require(\"lodash/sum\"));\n\nvar _range2 = _interopRequireDefault(require(\"lodash/range\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction concatenate(numInputs, inputShapes, outputShape, concatAxis) {\n const dims = inputShapes.map(shape => shape[concatAxis]);\n const offsets = (0, _range2.default)(numInputs + 1).map(i => (0, _sum2.default)((0, _take2.default)(dims, i)));\n const outVar = concatAxis === 0 ? 'out_y' : 'out_x';\n let getOffset = `\n int n = 0;\n int offset = 0;\n if (${outVar} >= ${offsets[1]} && ${outVar} < ${offsets[2]}) {\n n = 1;\n offset = ${offsets[1]};\n }`;\n\n if (numInputs > 2) {\n getOffset += `${(0, _range2.default)(2, numInputs).map(i => ` else if (${outVar} >= ${offsets[i]} && ${outVar} < ${offsets[i + 1]}) {\n n = ${i};\n offset = ${offsets[i]};\n }`).join('')}\n`;\n }\n\n let outBlock = 'outColor = vec4(0.0);';\n\n if (concatAxis === 0 || concatAxis === 1) {\n const xCoord = i => `out_x${concatAxis === 1 ? ` - ${offsets[i]}` : ''}`;\n\n const yCoord = i => `out_y${concatAxis === 0 ? ` - ${offsets[i]}` : ''}`;\n\n outBlock = `\n if (n == 0) {\n outColor = vec4(texelFetch(inputs[0], ivec2(out_x, out_y), 0).r);\n }${(0, _range2.default)(1, numInputs).map(i => ` else if (n == ${i}) {\n outColor = vec4(texelFetch(inputs[${i}], ivec2(${xCoord(i)}, ${yCoord(i)}), 0).r);\n }`).join('')}\n`;\n }\n\n const source = `#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs[${numInputs}];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${outputShape[0]}) * outTex.y);\n int out_x = int(float(${outputShape[1]}) * outTex.x);\n${getOffset}\n${outBlock}\n}\n`;\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = maximum;\n\nfunction maximum(numInputs, shape) {\n const source = `#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs[${numInputs}];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${shape[0]}) * outTex.y);\n int out_x = int(float(${shape[1]}) * outTex.x);\n\n float val = texelFetch(inputs[0], ivec2(out_x, out_y), 0).r;\n for (int i = 1; i < ${numInputs}; i++) {\n val = max(val, texelFetch(inputs[i], ivec2(out_x, out_y), 0).r);\n }\n\n outColor = vec4(val);\n}\n`;\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = minimum;\n\nfunction minimum(numInputs, shape) {\n const source = `#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs[${numInputs}];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${shape[0]}) * outTex.y);\n int out_x = int(float(${shape[1]}) * outTex.x);\n\n float val = texelFetch(inputs[0], ivec2(out_x, out_y), 0).r;\n for (int i = 1; i < ${numInputs}; i++) {\n val = min(val, texelFetch(inputs[i], ivec2(out_x, out_y), 0).r);\n }\n\n outColor = vec4(val);\n}\n`;\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = multiply;\n\nvar _range2 = _interopRequireDefault(require(\"lodash/range\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction multiply(numInputs, shape) {\n const source = `#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs[${numInputs}];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${shape[0]}) * outTex.y);\n int out_x = int(float(${shape[1]}) * outTex.x);\n\n outColor = vec4(${(0, _range2.default)(numInputs).map(i => `texelFetch(inputs[${i}], ivec2(out_x, out_y), 0).r`).join(' * ')});\n}\n`;\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = subtract;\n\nfunction subtract(numInputs, shape) {\n const source = `#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs[2];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${shape[0]}) * outTex.y);\n int out_x = int(float(${shape[1]}) * outTex.x);\n \n outColor = vec4(texelFetch(inputs[0], ivec2(out_x, out_y), 0).r - texelFetch(inputs[1], ivec2(out_x, out_y), 0).r);\n}\n`;\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = conv2d;\n\nfunction conv2d(outputShape, inputShape, indexMapShape, useBias, hasFragments) {\n const addBias = useBias ? `sum += texelFetch(bias, ivec2(out_x, 0), 0).r;` : '';\n const adjustIndicesForFragments = hasFragments ? `int fragmentIndex = int(floor(float(rowIndex) / float(${inputShape[0]})));\n rowIndex = int(mod(float(rowIndex), float(${inputShape[0]})));\n colIndex += fragmentIndex * ${inputShape[1]};` : '';\n const source = `#version 300 es\nprecision highp float;\nprecision highp isampler2D;\n\nin vec2 outTex;\nuniform sampler2D x;\nuniform isampler2D indexMap;\nuniform sampler2D kernel;\nuniform sampler2D bias;\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${outputShape[0]}) * outTex.y);\n int out_x = int(float(${outputShape[1]}) * outTex.x);\n\n float sum = 0.;\n for (int i = 0; i < ${indexMapShape[1]}; ++i) {\n int index = texelFetch(indexMap, ivec2(i, out_y), 0).r; \n if (index != -1) {\n int rowIndex = int(floor(float(index) / float(${inputShape[1]})));\n int colIndex = int(mod(float(index), float(${inputShape[1]})));\n ${adjustIndicesForFragments}\n sum += texelFetch(x, ivec2(colIndex, rowIndex), 0).r * texelFetch(kernel, ivec2(out_x, i), 0).r;\n }\n }\n\n ${addBias}\n outColor = vec4(sum);\n} \n`;\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = conv2dTranspose;\n\nfunction conv2dTranspose(outputShape, inputShape, indexMapShape, useBias, hasFragments) {\n const addBias = useBias ? `sum += texelFetch(bias, ivec2(out_x, 0), 0).r;` : '';\n const adjustIndicesForFragments = hasFragments ? `int fragmentIndex = int(floor(float(rowIndex) / float(${inputShape[0]})));\n rowIndex = int(mod(float(rowIndex), float(${inputShape[0]})));\n colIndex += fragmentIndex * ${inputShape[1]};` : '';\n const source = `#version 300 es\nprecision highp float;\nprecision highp isampler2D;\n\nin vec2 outTex;\nuniform sampler2D matMulResult;\nuniform isampler2D indexMap;\nuniform sampler2D bias;\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${outputShape[0]}) * outTex.y);\n int out_x = int(float(${outputShape[1]}) * outTex.x);\n\n float sum = 0.;\n for (int n = 0; n < ${indexMapShape[1]}; ++n) {\n int index = texelFetch(indexMap, ivec2(n, out_y), 0).r;\n if (index != -1) {\n int rowIndex = int(floor(float(index) / float(${inputShape[1]})));\n int colIndex = int(mod(float(index), float(${inputShape[1]})));\n ${adjustIndicesForFragments}\n sum += texelFetch(matMulResult, ivec2(colIndex + out_x, rowIndex), 0).r;\n }\n }\n\n ${addBias}\n outColor = vec4(sum);\n} \n`;\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = cam;\n\nfunction cam(outputShape, numFeatures, weightsIs1D) {\n let source;\n\n if (weightsIs1D) {\n source = `#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D featureMaps;\nuniform sampler2D weights;\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${outputShape[0]}) * outTex.y);\n int out_x = int(float(${outputShape[1]}) * outTex.x);\n\n int featureMapsRow = out_x + ${outputShape[0]} * out_y;\n\n float sum = 0.;\n for (int k = 0; k < ${numFeatures}; ++k) {\n float f = texelFetch(featureMaps, ivec2(k, featureMapsRow), 0).r;\n float w = texelFetch(weights, ivec2(k, 0), 0).r;\n sum += f * w;\n }\n\n outColor = vec4(max(sum, 0.0));\n} \n`;\n } else {\n source = `#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D featureMaps;\nuniform sampler2D weights;\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${outputShape[0]}) * outTex.y);\n int out_x = int(float(${outputShape[1]}) * outTex.x);\n\n float sum = 0.;\n for (int k = 0; k < ${numFeatures}; ++k) {\n float f = texelFetch(featureMaps, ivec2(k, out_y), 0).r;\n float w = texelFetch(weights, ivec2(out_x, k), 0).r;\n sum += f * w;\n }\n\n outColor = vec4(max(sum, 0.0));\n} \n`;\n }\n\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createGLSLProgram;\n\nvar _add = _interopRequireDefault(require(\"./merge/add\"));\n\nvar _average = _interopRequireDefault(require(\"./merge/average\"));\n\nvar _concatenate = _interopRequireDefault(require(\"./merge/concatenate\"));\n\nvar _maximum = _interopRequireDefault(require(\"./merge/maximum\"));\n\nvar _minimum = _interopRequireDefault(require(\"./merge/minimum\"));\n\nvar _multiply = _interopRequireDefault(require(\"./merge/multiply\"));\n\nvar _subtract = _interopRequireDefault(require(\"./merge/subtract\"));\n\nvar _conv2d = _interopRequireDefault(require(\"./convolutional/conv2d\"));\n\nvar _conv2dTranspose = _interopRequireDefault(require(\"./convolutional/conv2dTranspose\"));\n\nvar _cam = _interopRequireDefault(require(\"./visualizations/cam\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction createGLSLProgram(program, ...args) {\n switch (program) {\n case 'add':\n return (0, _add.default)(...args);\n\n case 'average':\n return (0, _average.default)(...args);\n\n case 'concatenate':\n return (0, _concatenate.default)(...args);\n\n case 'maximum':\n return (0, _maximum.default)(...args);\n\n case 'minimum':\n return (0, _minimum.default)(...args);\n\n case 'multiply':\n return (0, _multiply.default)(...args);\n\n case 'subtract':\n return (0, _subtract.default)(...args);\n\n case 'conv2d':\n return (0, _conv2d.default)(...args);\n\n case 'conv2dTranspose':\n return (0, _conv2dTranspose.default)(...args);\n\n case 'cam':\n return (0, _cam.default)(...args);\n\n default:\n throw new Error('GLSL program not found');\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.linear = exports.hard_sigmoid = exports.sigmoid = exports.tanh = exports.relu = exports.softsign = exports.softplus = exports.selu = exports.elu = exports.softmax = void 0;\nconst softmaxProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(x, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float maxval = 0.0;\\n for (int i = 0; i < int(size[0]); ++i) {\\n float val = texelFetch(x, ivec2(i, out_y), 0).r;\\n if (i == 0 || val > maxval) {\\n maxval = val;\\n }\\n }\\n\\n float sum = 0.0;\\n for (int i = 0; i < int(size[0]); ++i) {\\n float val = texelFetch(x, ivec2(i, out_y), 0).r;\\n sum += exp(val - maxval);\\n }\\n\\n outColor = exp(texture(x, vec2(outTex.x, outTex.y)) - maxval) / sum;\\n}\\n\";\nexports.softmax = softmaxProgramSource;\nconst eluProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n float alpha = 1.0;\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n outColor = max(v, 0.0) + alpha * (exp(min(v, 0.0)) - 1.0);\\n}\\n\";\nexports.elu = eluProgramSource;\nconst seluProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n float alpha = 1.6732632423543772848170429916717;\\n float scale = 1.0507009873554804934193349852946;\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n outColor = scale * (max(v, 0.0) + alpha * (exp(min(v, 0.0)) - 1.0));\\n}\\n\";\nexports.selu = seluProgramSource;\nconst softplusProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n outColor = log(1.0 + exp(texture(x, vec2(outTex.x, outTex.y))));\\n}\\n\";\nexports.softplus = softplusProgramSource;\nconst softsignProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n v /= 1.0 + abs(v);\\n outColor = v;\\n}\\n\";\nexports.softsign = softsignProgramSource;\nconst reluProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n outColor = max(v, 0.0);\\n}\\n\";\nexports.relu = reluProgramSource;\nconst tanhProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n outColor = tanh(v);\\n}\\n\";\nexports.tanh = tanhProgramSource;\nconst sigmoidProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n outColor = 1.0 / (1.0 + exp(-1.0 * texture(x, vec2(outTex.x, outTex.y))));\\n}\\n\";\nexports.sigmoid = sigmoidProgramSource;\nconst hardSigmoidProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n v = v * 0.2 + 0.5;\\n v = max(v, 0.0);\\n v = min(v, 1.0);\\n outColor = v;\\n}\\n\";\nexports.hard_sigmoid = hardSigmoidProgramSource;\nconst linearProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n outColor = texture(x, vec2(outTex.x, outTex.y));\\n}\\n\";\nexports.linear = linearProgramSource;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _Conv2D = _interopRequireDefault(require(\"./Conv2D\"));\n\nvar tensorUtils = _interopRequireWildcard(require(\"../../utils/tensorUtils\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _ndarraySqueeze = _interopRequireDefault(require(\"ndarray-squeeze\"));\n\nvar _ndarrayUnsqueeze = _interopRequireDefault(require(\"ndarray-unsqueeze\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Conv1D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Conv1D';\n const {\n filters = 1,\n kernel_size = 1,\n strides = 1,\n padding = 'valid',\n dilation_rate = 1,\n activation = 'linear',\n use_bias = true\n } = attrs;\n this.description = `${filters} filters of size ${kernel_size}, striding ${strides}`;\n this.description += padding === 'valid' ? `, no border padding` : ', pad to same borders';\n this.description += dilation_rate > 1 ? `, dilation rate ${dilation_rate}` : '';\n this.description += activation !== 'linear' ? `, ${activation} activation` : '';\n\n if (padding !== 'valid' && padding !== 'same') {\n this.throwError('Invalid padding.');\n }\n\n if (dilation_rate !== 1 && strides !== 1) {\n this.throwError('Incompatible combination of dilation_rate with strides.');\n }\n\n this.use_bias = use_bias;\n this.params = this.use_bias ? ['kernel', 'bias'] : ['kernel'];\n const conv2dAttrs = {\n filters,\n kernel_size: [kernel_size, 1],\n strides: [strides, 1],\n padding,\n data_format: 'channels_first',\n dilation_rate,\n activation,\n use_bias\n };\n this._conv2dAttrs = conv2dAttrs;\n this._conv2d = new _Conv2D.default(Object.assign(conv2dAttrs, {\n gpu: attrs.gpu\n }));\n }\n\n setWeights(weightsArr) {\n weightsArr[0].tensor = (0, _ndarrayUnsqueeze.default)(weightsArr[0].tensor).transpose(2, 1, 0, 3);\n\n this._conv2d.setWeights(weightsArr);\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n const input = new _Tensor.default(x.tensor.data, x.tensor.shape);\n input.tensor = (0, _ndarrayUnsqueeze.default)(input.tensor).transpose(0, 2, 1);\n\n const conv2dOutput = this._conv2d.call(input);\n\n this.outputShape = [0, 2].map(i => this._conv2d.outputShape[i]);\n this.output = new _Tensor.default([], this.outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor, (0, _ndarraySqueeze.default)(conv2dOutput.tensor).transpose(1, 0, 2));\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const inputShape = x.tensor.shape;\n const input = new _Tensor.default([], inputShape);\n Object.assign(input, x);\n input.glTextureShape = inputShape;\n input.is2DReshaped = true;\n input.originalShape = [inputShape[0], 1, inputShape[1]];\n input.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(input.originalShape, false, -1);\n this.output = this._conv2d.call(input);\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = Conv1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar activations = _interopRequireWildcard(require(\"../../activations\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar tensorUtils = _interopRequireWildcard(require(\"../../utils/tensorUtils\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _ndarrayGemm = _interopRequireDefault(require(\"ndarray-gemm\"));\n\nvar _Conv2D = _interopRequireDefault(require(\"./Conv2D\"));\n\nvar activationProgramSources = _interopRequireWildcard(require(\"../../activations/programSources\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass _DepthwiseConv2D extends _Conv2D.default {\n constructor(attrs = {}) {\n super(attrs);\n }\n\n _calcOutputShape(inputShape) {\n super._calcOutputShape(inputShape);\n\n const nbFilter = this.kernelShape[0];\n const inputChannels = inputShape[2];\n this.outputShape[2] = nbFilter * inputChannels;\n }\n\n _im2col(x) {\n const [inputRows, inputCols, inputChannels] = x.tensor.shape;\n const nbRow = this.kernelShape[1];\n const nbCol = this.kernelShape[2];\n const outputRows = this.outputShape[0];\n const outputCols = this.outputShape[1];\n const nbPatches = outputRows * outputCols;\n const patchLen = nbRow * nbCol;\n\n if (!this.imColsMat) {\n this.imColsMat = new _Tensor.default([], [nbPatches * inputChannels, patchLen]);\n }\n\n let patch = new _Tensor.default([], [nbRow, nbCol, 1]);\n let offset = 0;\n\n for (let c = 0; c < inputChannels; c++) {\n for (let i = 0, limit = inputRows - nbRow; i <= limit; i += this.strides[0]) {\n for (let j = 0, limit = inputCols - nbCol; j <= limit; j += this.strides[1]) {\n _ndarrayOps.default.assign(patch.tensor, x.tensor.hi(i + nbRow, j + nbCol, c + 1).lo(i, j, c));\n\n this.imColsMat.tensor.data.set(patch.tensor.data, offset);\n offset += patchLen;\n }\n }\n }\n\n return this.imColsMat;\n }\n\n _w2row() {\n const inputChannels = this.weights['kernel'].tensor.shape[2];\n const [nbFilter, nbRow, nbCol] = this.kernelShape;\n const patchLen = nbRow * nbCol;\n this.wRowsMat = new _Tensor.default([], [patchLen, nbFilter * inputChannels]);\n let patch = new _Tensor.default([], [nbRow, nbCol]);\n let patchRaveled = new _Tensor.default([], [patchLen]);\n let p = 0;\n\n for (let c = 0; c < inputChannels; c++) {\n for (let n = 0; n < nbFilter; n++) {\n _ndarrayOps.default.assign(patch.tensor, this.weights['kernel'].tensor.pick(null, null, c, n));\n\n patchRaveled.replaceTensorData(patch.tensor.data);\n\n _ndarrayOps.default.assign(this.wRowsMat.tensor.pick(null, p), patchRaveled.tensor);\n\n p += 1;\n }\n }\n\n return this.wRowsMat;\n }\n\n _callCPU(x) {\n this.inputShape = x.tensor.shape;\n\n this._calcOutputShape(this.inputShape);\n\n x = this._padInput(x);\n\n this._im2col(x);\n\n const nbFilter = this.kernelShape[0];\n const outputRows = this.outputShape[0];\n const outputCols = this.outputShape[1];\n const nbPatches = outputRows * outputCols;\n const inputChannels = this.inputShape[2];\n const matMul = new _Tensor.default([], [nbPatches * inputChannels, nbFilter * inputChannels]);\n (0, _ndarrayGemm.default)(matMul.tensor, this.imColsMat.tensor, this.wRowsMat.tensor, 1, 1);\n this.output = new _Tensor.default([], this.outputShape);\n const outputDataLength = outputRows * outputCols * nbFilter * inputChannels;\n let dataFiltered = new Float32Array(outputDataLength);\n\n for (let c = 0; c < inputChannels; c++) {\n for (let n = c * outputDataLength + c * nbFilter; n < (c + 1) * outputDataLength; n += nbFilter * inputChannels) {\n for (let m = 0; m < nbFilter; m++) {\n dataFiltered[n + m - c * outputDataLength] = matMul.tensor.data[n + m];\n }\n }\n }\n\n this.output.replaceTensorData(dataFiltered);\n }\n\n _createIndexMap(indicesForReshaped) {\n if (this.indexMap) {\n return;\n }\n\n let [inputRows, inputCols, inputChannels] = this.inputShape;\n let indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n\n if (this.padding === 'same') {\n const [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter] = this.inputPadding;\n inputRows = inputRows + paddingRowBefore + paddingRowAfter;\n inputCols = inputCols + paddingColBefore + paddingColAfter;\n const padValue = -1;\n indices = this._padInput(indices, padValue);\n }\n\n const nbRow = this.kernelShape[1];\n const nbCol = this.kernelShape[2];\n const outputRows = this.outputShape[0];\n const outputCols = this.outputShape[1];\n const nbPatches = outputRows * outputCols;\n const patchLen = nbRow * nbCol;\n this.indexMap = new _Tensor.default([], [nbPatches * inputChannels, patchLen], {\n type: Int32Array\n });\n const indicesPatch = new _Tensor.default([], [nbRow, nbCol, 1]);\n let offset = 0;\n\n for (let c = 0; c < inputChannels; c++) {\n for (let i = 0, limit = inputRows - nbRow; i <= limit; i += this.strides[0]) {\n for (let j = 0, limit = inputCols - nbCol; j <= limit; j += this.strides[1]) {\n _ndarrayOps.default.assign(indicesPatch.tensor, indices.tensor.hi(i + nbRow, j + nbCol, c + 1).lo(i, j, c));\n\n this.indexMap.tensor.data.set(indicesPatch.tensor.data, offset);\n offset += patchLen;\n }\n }\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int',\n supportsTextureFragments: true\n });\n }\n\n _createOutputReshapeIndexMap() {\n if (this.reshapeIndexMap) {\n return;\n }\n\n const nbFilter = this.kernelShape[0];\n const reshape = [this.outputShape[0] * this.outputShape[1], this.outputShape[2]];\n const reshapeRowIndices = new _Tensor.default([], reshape, {\n type: Int32Array\n });\n const reshapeColIndices = new _Tensor.default([], reshape, {\n type: Int32Array\n });\n this.reshapeIndexMap = new _Tensor.default([], reshape, {\n type: Int32Array\n });\n\n for (let j = 0; j < reshape[1]; j++) {\n for (let i = 0; i < reshape[0]; i++) {\n _ndarrayOps.default.assigns(reshapeRowIndices.tensor.pick(i, j), i + Math.floor(j / nbFilter) * reshape[0]);\n }\n }\n\n for (let j = 0; j < reshape[1]; j++) {\n _ndarrayOps.default.assigns(reshapeColIndices.tensor.pick(null, j), j);\n }\n\n _ndarrayOps.default.muls(this.reshapeIndexMap.tensor, reshapeRowIndices.tensor, reshape[1]);\n\n _ndarrayOps.default.addeq(this.reshapeIndexMap.tensor, reshapeColIndices.tensor);\n\n this.reshapeIndexMap.createGLTexture({\n type: '2d',\n format: 'int',\n supportsTextureFragments: true\n });\n }\n\n _callGPU(x) {\n super._callGPU(x);\n\n this._createOutputReshapeIndexMap();\n\n if (!this.outputReshaped) {\n const reshape = [this.outputShape[0] * this.outputShape[1], this.outputShape[2]];\n this.outputReshaped = new _Tensor.default([], reshape);\n this.outputReshaped.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.outputReshaped.is2DReshaped = true;\n this.outputReshaped.originalShape = this.outputShape;\n this.outputReshaped.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.outputShape, false, -1);\n }\n\n if (this.output.glTextureFragments) {\n this.output.convert2DRowFragmentedGLTextureToColStack();\n }\n\n _WebGL.webgl2.runProgram({\n program: this.output.glTextureFragments ? this.mapInputFragmentsProgram : this.mapInputProgram,\n output: this.outputReshaped,\n inputs: [{\n input: this.output,\n name: 'x'\n }, {\n input: this.reshapeIndexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: this.output.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }],\n supportsTextureFragments: true\n });\n\n if (this.output.glTextureFragments) {\n this.output.removeGLTextureFragmentsAsColStack();\n }\n }\n\n}\n\nclass SeparableConv2D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'SeparableConv2D';\n const {\n filters = 1,\n kernel_size = [1, 1],\n strides = [1, 1],\n padding = 'valid',\n data_format = 'channels_last',\n depth_multiplier = 1,\n activation = 'linear',\n use_bias = true\n } = attrs;\n\n if (Array.isArray(kernel_size)) {\n this.kernelShape = [filters, ...kernel_size];\n } else {\n this.kernelShape = [filters, kernel_size, kernel_size];\n }\n\n if (Array.isArray(strides)) {\n this.strides = strides;\n } else {\n this.strides = [strides, strides];\n }\n\n if (padding === 'valid' || padding === 'same') {\n this.padding = padding;\n } else {\n this.throwError('Invalid padding.');\n }\n\n if (data_format === 'channels_last' || data_format === 'channels_first') {\n this.dataFormat = data_format;\n } else {\n this.throwError('Only channels_last and channels_first data formats are allowed.');\n }\n\n this.activation = activation;\n this.activationFunc = activations[activation];\n\n if (padding === 'valid' || padding === 'same') {\n this.padding = padding;\n } else {\n this.throwError('Invalid padding.');\n }\n\n this.useBias = use_bias;\n this.params = this.useBias ? ['depthwise_kernel', 'pointwise_kernel', 'bias'] : ['depthwise_kernel', 'pointwise_kernel'];\n this.depthwiseConvAttrs = {\n filters: depth_multiplier,\n kernel_size: [this.kernelShape[1], this.kernelShape[2]],\n strides: this.strides,\n padding,\n data_format,\n activation: 'linear',\n use_bias: false,\n gpu: attrs.gpu\n };\n this.pointwiseConvAttrs = {\n filters,\n kernel_size: [1, 1],\n strides: [1, 1],\n padding,\n data_format,\n activation: 'linear',\n use_bias,\n gpu: attrs.gpu\n };\n this.description = `${this.kernelShape[0]} ${this.kernelShape.slice(1).join('x')} filters`;\n this.description += this.strides.some(s => s > 1) ? `, ${this.strides.join('x')} striding` : '';\n this.description += this.padding === 'valid' ? `, no border padding` : ', pad to same borders';\n this.description += depth_multiplier > 1 ? `, depth multiplier: ${depth_multiplier}` : '';\n this.description += this.activation !== 'linear' ? `, ${this.activation} activation` : '';\n\n if (this.gpu) {\n this.activationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.activation]);\n }\n }\n\n setWeights(weightsArr) {\n this._depthwiseConv = new _DepthwiseConv2D(this.depthwiseConvAttrs);\n\n this._depthwiseConv.setWeights(weightsArr.slice(0, 1));\n\n this._pointwiseConv = new _Conv2D.default(this.pointwiseConvAttrs);\n\n this._pointwiseConv.setWeights(weightsArr.slice(1, 3));\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this._depthwiseConv._callCPU(x);\n\n this._pointwiseConv._callCPU(this._depthwiseConv.output);\n\n this.output = this._pointwiseConv.output;\n this.activationFunc(this.output);\n }\n\n _callGPU(x) {\n this._depthwiseConv.outbound = [null];\n this._pointwiseConv.outbound = [null];\n\n this._depthwiseConv._callGPU(x);\n\n this._pointwiseConv._callGPU(this._depthwiseConv.outputReshaped);\n\n if (this.activation === 'linear') {\n this.output = this._pointwiseConv.output;\n } else {\n if (!this.output) {\n this.output = new _Tensor.default([], this._pointwiseConv.output.glTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.output.is2DReshaped = true;\n this.output.originalShape = this._pointwiseConv.output.originalShape;\n this.output.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this._pointwiseConv.output.originalShape, false, -1);\n }\n\n this.outputPreactiv = this._pointwiseConv.output;\n\n _WebGL.webgl2.runProgram({\n program: this.activationProgram,\n output: this.output,\n inputs: [{\n input: this.outputPreactiv,\n name: 'x'\n }],\n supportsTextureFragments: true\n });\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n this.output.reshapeFrom2D();\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n }\n\n}\n\nexports.default = SeparableConv2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar activations = _interopRequireWildcard(require(\"../../activations\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar tensorUtils = _interopRequireWildcard(require(\"../../utils/tensorUtils\"));\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _ndarrayGemm = _interopRequireDefault(require(\"ndarray-gemm\"));\n\nvar activationProgramSources = _interopRequireWildcard(require(\"../../activations/programSources\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst matMulProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D A;\\nuniform sampler2D B;\\nuniform sampler2D C;\\nuniform bool addC;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 A_size = textureSize(A, 0);\\n ivec2 B_size = textureSize(B, 0);\\n int out_x = int(float(B_size[0]) * outTex.x);\\n int out_y = int(float(A_size[1]) * outTex.y);\\n int commonDim = A_size[0];\\n\\n float sum = 0.;\\n for (int i = 0; i < commonDim; ++i) {\\n float a = texelFetch(A, ivec2(i, out_y), 0).r;\\n float b = texelFetch(B, ivec2(out_x, i), 0).r;\\n sum += a * b;\\n }\\n\\n if (addC) {\\n sum += texelFetch(C, ivec2(out_x, 0), 0).r;\\n }\\n\\n outColor = vec4(sum);\\n}\\n\";\nconst assignToRowIndicesMap = (0, _cwise.default)({\n args: [{\n blockIndices: -1\n }, 'scalar', 'scalar'],\n body: function (x, rowIndex, size) {\n for (let i = 0; i < size; i++) {\n if (x[i] === -1) {\n x[i] = rowIndex;\n break;\n }\n }\n }\n});\nconst assignToColIndicesMap = (0, _cwise.default)({\n args: [{\n blockIndices: -1\n }, 'array', 'scalar'],\n body: function (x, colIndex, size) {\n for (let i = 0; i < size; i++) {\n if (x[i] === -1) {\n x[i] = colIndex;\n break;\n }\n }\n }\n});\n\nclass Conv2DTranspose extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Conv2DTranspose';\n const {\n filters = 1,\n kernel_size = [3, 3],\n strides = [1, 1],\n padding = 'valid',\n data_format = 'channels_last',\n activation = 'linear',\n use_bias = true\n } = attrs;\n\n if (Array.isArray(kernel_size)) {\n this.kernelShape = [filters, ...kernel_size];\n } else {\n this.kernelShape = [filters, kernel_size, kernel_size];\n }\n\n if (Array.isArray(strides)) {\n this.strides = strides;\n } else {\n this.strides = [strides, strides];\n }\n\n if (padding === 'valid' || padding === 'same') {\n this.padding = padding;\n } else {\n this.throwError('Invalid padding.');\n }\n\n if (data_format === 'channels_last' || data_format === 'channels_first') {\n this.dataFormat = data_format;\n } else {\n this.throwError('Only channels_last and channels_first data formats are allowed.');\n }\n\n this.activation = activation;\n this.activationFunc = activations[activation];\n this.useBias = use_bias;\n this.params = this.useBias ? ['kernel', 'bias'] : ['kernel'];\n this.description = `${this.kernelShape[0]} ${this.kernelShape.slice(1).join('x')} filters`;\n this.description += this.strides.some(s => s > 1) ? `, ${this.strides.join('x')} striding` : '';\n this.description += this.padding === 'valid' ? `, no border padding` : ', pad to same borders';\n this.description += this.activation !== 'linear' ? `, ${this.activation} activation` : '';\n\n if (this.gpu) {\n this.matMulProgram = _WebGL.webgl2.compileProgram(matMulProgramSource);\n this.activationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.activation]);\n }\n }\n\n setWeights(weightsArr) {\n if (this.dataFormat === 'channels_first') {\n weightsArr[0].tensor = weightsArr[0].tensor.transpose(2, 3, 1, 0);\n }\n\n super.setWeights(weightsArr, false);\n\n this._w2row();\n\n if (this.gpu) {\n this.weights['kernel'] = this.wRowsMat;\n this.weights['kernel'].createGLTexture({\n type: '2d',\n format: 'float'\n });\n\n if (this.useBias) {\n this.weights['bias'].createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _calcOutputShape(inputShape) {\n if (this.outputShape && this.outputPadding) {\n return;\n }\n\n const inputRows = inputShape[0];\n const inputCols = inputShape[1];\n const [nbFilter, nbRow, nbCol] = this.kernelShape;\n const outputRows = this.padding === 'same' ? inputRows * this.strides[0] : inputRows * this.strides[0] + Math.max(nbRow - this.strides[0], 0);\n const outputCols = this.padding === 'same' ? inputCols * this.strides[1] : inputCols * this.strides[1] + Math.max(nbCol - this.strides[1], 0);\n const outputChannels = nbFilter;\n const paddingRow = this.padding === 'same' ? Math.max(0, Math.floor((inputRows - 1) * this.strides[0] + nbRow - outputRows)) : 0;\n const paddingCol = this.padding === 'same' ? Math.max(0, Math.floor((inputCols - 1) * this.strides[1] + nbCol - outputCols)) : 0;\n const paddingRowBefore = Math.floor(paddingRow / 2);\n const paddingRowAfter = paddingRow - paddingRowBefore;\n const paddingColBefore = Math.floor(paddingCol / 2);\n const paddingColAfter = paddingCol - paddingColBefore;\n this.outputShape = [outputRows, outputCols, outputChannels];\n this.outputPadding = [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter];\n }\n\n _im2col(x) {\n const [inputRows, inputCols, inputChannels] = x.tensor.shape;\n\n if (!this.imColsMat) {\n this.imColsMat = new _Tensor.default([], [inputRows * inputCols, inputChannels]);\n }\n\n const channelRaveled = new _Tensor.default([], [inputRows * inputCols]);\n const channel = new _Tensor.default([], [inputRows, inputCols]);\n\n for (let c = 0; c < inputChannels; c++) {\n _ndarrayOps.default.assign(channel.tensor, x.tensor.pick(null, null, c));\n\n channelRaveled.replaceTensorData(channel.tensor.data);\n\n _ndarrayOps.default.assign(this.imColsMat.tensor.pick(null, c), channelRaveled.tensor);\n }\n\n return this.imColsMat;\n }\n\n _w2row() {\n const [nbRow, nbCol, nbFilter, inputChannels] = this.weights['kernel'].tensor.shape;\n this.wRowsMat = new _Tensor.default([], [inputChannels, nbRow * nbCol * nbFilter]);\n const channelRaveled = new _Tensor.default([], [nbRow * nbCol * nbFilter]);\n const channel = new _Tensor.default([], [nbRow, nbCol, nbFilter]);\n\n for (let c = 0; c < inputChannels; c++) {\n _ndarrayOps.default.assign(channel.tensor, this.weights['kernel'].tensor.pick(null, null, null, c));\n\n channelRaveled.replaceTensorData(channel.tensor.data);\n\n _ndarrayOps.default.assign(this.wRowsMat.tensor.pick(c, null), channelRaveled.tensor);\n }\n\n return this.wRowsMat;\n }\n\n _callCPU(x) {\n this.inputShape = x.tensor.shape;\n\n this._calcOutputShape(this.inputShape);\n\n this._im2col(x);\n\n const inputRows = x.tensor.shape[0];\n const inputCols = x.tensor.shape[1];\n const [nbFilter, nbRow, nbCol] = this.kernelShape;\n const matMul = new _Tensor.default([], [inputRows * inputCols, nbRow * nbCol * nbFilter]);\n (0, _ndarrayGemm.default)(matMul.tensor, this.imColsMat.tensor, this.wRowsMat.tensor, 1, 1);\n const [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter] = this.outputPadding;\n this.output = new _Tensor.default([], this.outputShape);\n let outputPadded = new _Tensor.default([], [this.outputShape[0] + paddingRowBefore + paddingRowAfter, this.outputShape[1] + paddingColBefore + paddingColAfter, this.outputShape[2]]);\n const patchShape = [nbRow, nbCol, nbFilter];\n let patch = new _Tensor.default([], patchShape);\n let patchRaveled = new _Tensor.default([], [nbRow * nbCol * nbFilter]);\n let index = 0;\n\n for (let i = 0; i < inputRows; i++) {\n for (let j = 0; j < inputCols; j++) {\n _ndarrayOps.default.assign(patchRaveled.tensor, matMul.tensor.pick(index, null));\n\n patch.replaceTensorData(patchRaveled.tensor.data);\n const iOutPos = i * this.strides[0];\n const jOutPos = j * this.strides[1];\n\n _ndarrayOps.default.addeq(outputPadded.tensor.hi(iOutPos + nbRow, jOutPos + nbCol, this.outputShape[2]).lo(iOutPos, jOutPos, 0), patch.tensor);\n\n index += 1;\n }\n }\n\n _ndarrayOps.default.assign(this.output.tensor, outputPadded.tensor.hi(this.outputShape[0] + paddingRowBefore, this.outputShape[1] + paddingColBefore, this.outputShape[2]).lo(paddingRowBefore, paddingColBefore, 0));\n\n if (this.useBias) {\n for (let n = 0; n < nbFilter; n++) {\n _ndarrayOps.default.addseq(this.output.tensor.pick(null, null, n), this.weights['bias'].tensor.get(n));\n }\n }\n\n this.activationFunc(this.output);\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n\n _createIndexMap() {\n if (this.indexMap) {\n return;\n }\n\n const inputRows = this.inputShape[0];\n const inputCols = this.inputShape[1];\n const [nbFilter, nbRow, nbCol] = this.kernelShape;\n const [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter] = this.outputPadding;\n const effectiveKernelSize = (nbRow - this.strides[0] + 1) * (nbCol - this.strides[1] + 1);\n const indicesMapShape = [this.outputShape[0], this.outputShape[1], effectiveKernelSize];\n const indicesMapShapePadded = [this.outputShape[0] + paddingRowBefore + paddingRowAfter, this.outputShape[1] + paddingColBefore + paddingColAfter, effectiveKernelSize];\n const outputRowIndicesMap = new _Tensor.default([], indicesMapShape, {\n type: Int32Array\n });\n const outputColIndicesMap = new _Tensor.default([], indicesMapShape, {\n type: Int32Array\n });\n const outputRowIndicesMapPadded = new _Tensor.default([], indicesMapShapePadded, {\n type: Int32Array\n });\n const outputColIndicesMapPadded = new _Tensor.default([], indicesMapShapePadded, {\n type: Int32Array\n });\n\n _ndarrayOps.default.assigns(outputRowIndicesMap.tensor, -1);\n\n _ndarrayOps.default.assigns(outputColIndicesMap.tensor, -1);\n\n _ndarrayOps.default.assigns(outputRowIndicesMapPadded.tensor, -1);\n\n _ndarrayOps.default.assigns(outputColIndicesMapPadded.tensor, -1);\n\n const matMulColIndicesPatch = new _Tensor.default([], [nbRow, nbCol, nbFilter], {\n type: Int32Array\n });\n\n for (let i = 0; i < nbRow * nbCol * nbFilter; i++) {\n matMulColIndicesPatch.tensor.data[i] = i;\n }\n\n for (let i = 0; i < inputRows; i++) {\n for (let j = 0; j < inputCols; j++) {\n const matMulRowIndex = i * inputCols + j;\n const iOutPos = i * this.strides[0];\n const jOutPos = j * this.strides[1];\n assignToRowIndicesMap(outputRowIndicesMapPadded.tensor.hi(iOutPos + nbRow, jOutPos + nbCol, effectiveKernelSize).lo(iOutPos, jOutPos, 0), matMulRowIndex, effectiveKernelSize);\n assignToColIndicesMap(outputColIndicesMapPadded.tensor.hi(iOutPos + nbRow, jOutPos + nbCol, effectiveKernelSize).lo(iOutPos, jOutPos, 0), matMulColIndicesPatch.tensor.pick(null, null, 0), effectiveKernelSize);\n }\n }\n\n _ndarrayOps.default.assign(outputRowIndicesMap.tensor, outputRowIndicesMapPadded.tensor.hi(this.outputShape[0] + paddingRowBefore, this.outputShape[1] + paddingColBefore, effectiveKernelSize).lo(paddingRowBefore, paddingColBefore, 0));\n\n _ndarrayOps.default.assign(outputColIndicesMap.tensor, outputColIndicesMapPadded.tensor.hi(this.outputShape[0] + paddingRowBefore, this.outputShape[1] + paddingColBefore, effectiveKernelSize).lo(paddingRowBefore, paddingColBefore, 0));\n\n const tiledIndicesMapShape = [this.outputShape[0] * this.outputShape[1], effectiveKernelSize];\n this.indexMap = new _Tensor.default([], tiledIndicesMapShape, {\n type: Int32Array\n });\n const channelData = new _Tensor.default([], [effectiveKernelSize], {\n type: Int32Array\n });\n\n for (let i = 0; i < this.outputShape[0]; i++) {\n for (let j = 0; j < this.outputShape[1]; j++) {\n for (let k = 0; k < effectiveKernelSize; k++) {\n const rowIndex = outputRowIndicesMap.tensor.get(i, j, k);\n const colIndex = outputColIndicesMap.tensor.get(i, j, k);\n\n if (rowIndex !== -1 && colIndex !== -1) {\n channelData.tensor.set(k, rowIndex * this.weights['kernel'].glTextureShape[1] + colIndex);\n } else {\n channelData.tensor.set(k, -1);\n }\n }\n\n _ndarrayOps.default.assign(this.indexMap.tensor.pick(i * this.outputShape[1] + j, null), channelData.tensor);\n }\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int',\n supportsTextureFragments: true\n });\n }\n\n _callGPU(x) {\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n\n this._calcOutputShape(this.inputShape);\n } else {\n this.inputShape = x.tensor.shape;\n\n this._calcOutputShape(this.inputShape);\n\n this._im2col(x);\n\n this.imColsMat.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n const input = x.is2DReshaped || x.is2DSquareReshaped ? x : this.imColsMat;\n\n if (!this.matMulResult) {\n const outputTextureShape = [input.glTextureShape[0], this.weights['kernel'].glTextureShape[1]];\n this.matMulResult = new _Tensor.default([], outputTextureShape);\n this.matMulResult.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n if (this.activation !== 'linear' && !this.outputPreactiv) {\n const outputTextureShape = [this.outputShape[0] * this.outputShape[1], this.outputShape[2]];\n this.outputPreactiv = new _Tensor.default([], outputTextureShape);\n this.outputPreactiv.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.outputPreactiv.is2DReshaped = true;\n this.outputPreactiv.originalShape = this.outputShape;\n this.outputPreactiv.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.outputShape, false, -1);\n }\n\n if (!this.output) {\n const outputTextureShape = [this.outputShape[0] * this.outputShape[1], this.outputShape[2]];\n this.output = new _Tensor.default([], outputTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.output.is2DReshaped = true;\n this.output.originalShape = this.outputShape;\n this.output.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.outputShape, false, -1);\n }\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.matMulResult,\n inputs: [{\n input: input,\n name: 'A'\n }, {\n input: this.weights['kernel'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }],\n supportsTextureFragments: true\n });\n\n this._createIndexMap();\n\n const hasFragments = Boolean(this.matMulResult.glTextureFragments);\n\n if (hasFragments) {\n this.matMulResult.convert2DRowFragmentedGLTextureToColStack();\n }\n\n if (!this.convTransposeProgram) {\n const convTransposeProgramSource = (0, _createGLSLProgram.default)('conv2dTranspose', this.output.glTextureFragmentShape ? this.output.glTextureFragmentShape : this.output.glTextureShape, this.matMulResult.glTextureFragmentShape ? this.matMulResult.glTextureFragmentShape : this.matMulResult.glTextureShape, this.indexMap.glTextureFragmentShape ? this.indexMap.glTextureFragmentShape : this.indexMap.glTextureShape, this.useBias, hasFragments);\n this.convTransposeProgram = _WebGL.webgl2.compileProgram(convTransposeProgramSource);\n }\n\n _WebGL.webgl2.runProgram({\n program: this.convTransposeProgram,\n output: this.activation === 'linear' ? this.output : this.outputPreactiv,\n inputs: [{\n input: this.matMulResult,\n name: 'matMulResult'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }, ...(this.useBias ? [{\n input: this.weights['bias'],\n name: 'bias'\n }] : [])],\n supportsTextureFragments: true\n });\n\n if (hasFragments) {\n this.matMulResult.removeGLTextureFragmentsAsColStack();\n }\n\n if (this.activation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.activationProgram,\n output: this.output,\n inputs: [{\n input: this.outputPreactiv,\n name: 'x'\n }],\n supportsTextureFragments: true\n });\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n this.output.reshapeFrom2D();\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n }\n\n}\n\nexports.default = Conv2DTranspose;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar activations = _interopRequireWildcard(require(\"../../activations\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar tensorUtils = _interopRequireWildcard(require(\"../../utils/tensorUtils\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _ndarrayGemm = _interopRequireDefault(require(\"ndarray-gemm\"));\n\nvar activationProgramSources = _interopRequireWildcard(require(\"../../activations/programSources\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\nconst mapInputFragmentsProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 inputSize = textureSize(x, 0);\\n ivec2 outputSize = textureSize(indexMap, 0);\\n int out_x = int(float(outputSize[0]) * outTex.x);\\n int out_y = int(float(outputSize[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n int fragmentIndex = int(floor(float(rowIndex) / float(inputSize[1])));\\n rowIndex = int(mod(float(rowIndex), float(inputSize[1])));\\n colIndex = fragmentIndex * inputCols + colIndex;\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\nconst matMulProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D A;\\nuniform sampler2D B;\\nuniform sampler2D C;\\nuniform bool addC;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 A_size = textureSize(A, 0);\\n ivec2 B_size = textureSize(B, 0);\\n int out_x = int(float(B_size[0]) * outTex.x);\\n int out_y = int(float(A_size[1]) * outTex.y);\\n int commonDim = A_size[0];\\n\\n float sum = 0.;\\n for (int i = 0; i < commonDim; ++i) {\\n float a = texelFetch(A, ivec2(i, out_y), 0).r;\\n float b = texelFetch(B, ivec2(out_x, i), 0).r;\\n sum += a * b;\\n }\\n\\n if (addC) {\\n sum += texelFetch(C, ivec2(out_x, 0), 0).r;\\n }\\n\\n outColor = vec4(sum);\\n}\\n\";\n\nclass Conv3D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Conv3D';\n const {\n filters = 1,\n kernel_size = [1, 1, 1],\n strides = [1, 1, 1],\n padding = 'valid',\n data_format = 'channels_last',\n dilation_rate = [1, 1, 1],\n activation = 'linear',\n use_bias = true\n } = attrs;\n\n if (Array.isArray(kernel_size)) {\n this.kernelShape = [filters, ...kernel_size];\n } else {\n this.kernelShape = [filters, kernel_size, kernel_size, kernel_size];\n }\n\n if (Array.isArray(strides)) {\n this.strides = strides;\n } else {\n this.strides = [strides, strides, strides];\n }\n\n if (padding === 'valid' || padding === 'same') {\n this.padding = padding;\n } else {\n this.throwError('Invalid padding.');\n }\n\n if (data_format === 'channels_last' || data_format === 'channels_first') {\n this.dataFormat = data_format;\n } else {\n this.throwError('Only channels_last and channels_first data formats are allowed.');\n }\n\n if (Array.isArray(dilation_rate)) {\n this.dilationRate = dilation_rate;\n } else {\n this.dilationRate = [dilation_rate, dilation_rate, dilation_rate];\n }\n\n if ((this.dilationRate[0] !== 1 || this.dilationRate[1] !== 1 || this.dilationRate[2] !== 1) && (this.strides[0] !== 1 || this.strides[1] !== 1 || this.strides[2] !== 1)) {\n this.throwError('Incompatible combination of dilation_rate with strides.');\n }\n\n this.activation = activation;\n this.activationFunc = activations[activation];\n this.useBias = use_bias;\n this.params = this.useBias ? ['kernel', 'bias'] : ['kernel'];\n this.description = `${this.kernelShape[0]} ${this.kernelShape.slice(1).join('x')} filters`;\n this.description += this.strides.some(s => s > 1) ? `, ${this.strides.join('x')} striding` : '';\n this.description += this.padding === 'valid' ? `, no border padding` : ', pad to same borders';\n this.description += this.dilationRate.some(r => r > 1) ? `, ${this.dilationRate.join('x')} dilation` : '';\n this.description += this.activation !== 'linear' ? `, ${this.activation} activation` : '';\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n this.mapInputFragmentsProgram = _WebGL.webgl2.compileProgram(mapInputFragmentsProgramSource);\n this.matMulProgram = _WebGL.webgl2.compileProgram(matMulProgramSource);\n this.activationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.activation]);\n }\n }\n\n setWeights(weightsArr) {\n if (this.dataFormat === 'channels_first') {\n weightsArr[0].tensor = weightsArr[0].tensor.transpose(2, 3, 4, 1, 0);\n }\n\n super.setWeights(weightsArr, false);\n\n this._w2row();\n\n if (this.gpu) {\n this.weights['kernel'] = this.wRowsMat;\n this.weights['kernel'].createGLTexture({\n type: '2d',\n format: 'float'\n });\n\n if (this.useBias) {\n this.weights['bias'].createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _calcOutputShape(inputShape) {\n if (this.outputShape && this.inputPadding) {\n return;\n }\n\n const inputDim1 = inputShape[0];\n const inputDim2 = inputShape[1];\n const inputDim3 = inputShape[2];\n const [nbFilter, kernelDim1, kernelDim2, kernelDim3] = this.kernelShape;\n const kernelDim1Dilated = kernelDim1 + (kernelDim1 - 1) * (this.dilationRate[0] - 1);\n const kernelDim2Dilated = kernelDim2 + (kernelDim2 - 1) * (this.dilationRate[1] - 1);\n const kernelDim3Dilated = kernelDim3 + (kernelDim3 - 1) * (this.dilationRate[2] - 1);\n const outputDim1 = this.padding === 'same' ? Math.floor((inputDim1 + this.strides[0] - 1) / this.strides[0]) : Math.floor((inputDim1 - kernelDim1Dilated + this.strides[0]) / this.strides[0]);\n const outputDim2 = this.padding === 'same' ? Math.floor((inputDim2 + this.strides[1] - 1) / this.strides[1]) : Math.floor((inputDim2 - kernelDim2Dilated + this.strides[1]) / this.strides[1]);\n const outputDim3 = this.padding === 'same' ? Math.floor((inputDim3 + this.strides[2] - 1) / this.strides[2]) : Math.floor((inputDim3 - kernelDim3Dilated + this.strides[2]) / this.strides[2]);\n const outputChannels = nbFilter;\n const paddingDim1 = this.padding === 'same' ? Math.max(0, Math.floor((outputDim1 - 1) * this.strides[0] + kernelDim1Dilated - inputDim1)) : 0;\n const paddingDim2 = this.padding === 'same' ? Math.max(0, Math.floor((outputDim2 - 1) * this.strides[1] + kernelDim2Dilated - inputDim2)) : 0;\n const paddingDim3 = this.padding === 'same' ? Math.max(0, Math.floor((outputDim3 - 1) * this.strides[2] + kernelDim3Dilated - inputDim3)) : 0;\n const paddingDim1Before = Math.floor(paddingDim1 / 2);\n const paddingDim1After = paddingDim1 - paddingDim1Before;\n const paddingDim2Before = Math.floor(paddingDim2 / 2);\n const paddingDim2After = paddingDim2 - paddingDim2Before;\n const paddingDim3Before = Math.floor(paddingDim3 / 2);\n const paddingDim3After = paddingDim3 - paddingDim3Before;\n this.outputShape = [outputDim1, outputDim2, outputDim3, outputChannels];\n this.inputPadding = [paddingDim1Before, paddingDim1After, paddingDim2Before, paddingDim2After, paddingDim3Before, paddingDim3After];\n }\n\n _padInput(x, padValue = 0) {\n if (this.padding === 'same') {\n const [inputDim1, inputDim2, inputDim3, inputChannels] = x.tensor.shape;\n const [paddingDim1Before, paddingDim1After, paddingDim2Before, paddingDim2After, paddingDim3Before, paddingDim3After] = this.inputPadding;\n const newDim1 = inputDim1 + paddingDim1Before + paddingDim1After;\n const newDim2 = inputDim2 + paddingDim2Before + paddingDim2After;\n const newDim3 = inputDim3 + paddingDim3Before + paddingDim3After;\n\n const _x = new _Tensor.default([], [newDim1, newDim2, newDim3, inputChannels]);\n\n if (padValue !== 0) {\n _ndarrayOps.default.assigns(_x.tensor, padValue);\n }\n\n _ndarrayOps.default.assign(_x.tensor.hi(inputDim1 + paddingDim1Before, inputDim2 + paddingDim2Before, inputDim3 + paddingDim3Before, inputChannels).lo(paddingDim1Before, paddingDim2Before, paddingDim3Before, 0), x.tensor);\n\n return _x;\n }\n\n return x;\n }\n\n _vol2col(x) {\n const [inputDim1, inputDim2, inputDim3, inputChannels] = x.tensor.shape;\n const kernelDim1 = this.kernelShape[1];\n const kernelDim2 = this.kernelShape[2];\n const kernelDim3 = this.kernelShape[3];\n const outputDim1 = this.outputShape[0];\n const outputDim2 = this.outputShape[1];\n const outputDim3 = this.outputShape[2];\n const nbPatches = outputDim1 * outputDim2 * outputDim3;\n const patchLen = kernelDim1 * kernelDim2 * kernelDim3 * inputChannels;\n const kernelDim1Dilated = kernelDim1 + (kernelDim1 - 1) * (this.dilationRate[0] - 1);\n const kernelDim2Dilated = kernelDim2 + (kernelDim2 - 1) * (this.dilationRate[1] - 1);\n const kernelDim3Dilated = kernelDim3 + (kernelDim3 - 1) * (this.dilationRate[2] - 1);\n\n if (!this.volColsMat) {\n this.volColsMat = new _Tensor.default([], [nbPatches, patchLen]);\n }\n\n if (kernelDim1Dilated === 1 && kernelDim2Dilated === 1 && kernelDim3Dilated === 1 && this.strides[0] === 1 && this.strides[1] === 1 && this.strides[2] === 1) {\n this.volColsMat.replaceTensorData(x.tensor.data);\n return this.volColsMat;\n }\n\n const patch = new _Tensor.default([], [kernelDim1, kernelDim2, kernelDim3, inputChannels]);\n let offset = 0;\n\n for (let i = 0, limit = inputDim1 - kernelDim1Dilated; i <= limit; i += this.strides[0]) {\n for (let j = 0, limit = inputDim2 - kernelDim2Dilated; j <= limit; j += this.strides[1]) {\n for (let k = 0, limit = inputDim3 - kernelDim3Dilated; k <= limit; k += this.strides[2]) {\n _ndarrayOps.default.assign(patch.tensor, x.tensor.hi(i + kernelDim1Dilated, j + kernelDim2Dilated, k + kernelDim3Dilated, inputChannels).lo(i, j, k, 0).step(this.dilationRate[0], this.dilationRate[1], this.dilationRate[2], 1));\n\n this.volColsMat.tensor.data.set(patch.tensor.data, offset);\n offset += patchLen;\n }\n }\n }\n\n return this.volColsMat;\n }\n\n _w2row() {\n const inputChannels = this.weights['kernel'].tensor.shape[3];\n const [nbFilter, kernelDim1, kernelDim2, kernelDim3] = this.kernelShape;\n const patchLen = kernelDim1 * kernelDim2 * kernelDim3 * inputChannels;\n this.wRowsMat = new _Tensor.default([], [patchLen, nbFilter]);\n const patch = new _Tensor.default([], [kernelDim1, kernelDim2, kernelDim3, inputChannels]);\n const patchRaveled = new _Tensor.default([], [patchLen]);\n\n for (let n = 0; n < nbFilter; n++) {\n _ndarrayOps.default.assign(patch.tensor, this.weights['kernel'].tensor.pick(null, null, null, null, n));\n\n patchRaveled.replaceTensorData(patch.tensor.data);\n\n _ndarrayOps.default.assign(this.wRowsMat.tensor.pick(null, n), patchRaveled.tensor);\n }\n\n return this.wRowsMat;\n }\n\n _callCPU(x) {\n this.inputShape = x.tensor.shape;\n\n this._calcOutputShape(this.inputShape);\n\n x = this._padInput(x);\n\n this._vol2col(x);\n\n const nbFilter = this.kernelShape[0];\n const outputDim1 = this.outputShape[0];\n const outputDim2 = this.outputShape[1];\n const outputDim3 = this.outputShape[2];\n const nbPatches = outputDim1 * outputDim2 * outputDim3;\n const matMul = new _Tensor.default([], [nbPatches, nbFilter]);\n\n if (this.useBias) {\n for (let n = 0; n < nbFilter; n++) {\n _ndarrayOps.default.assigns(matMul.tensor.pick(null, n), this.weights['bias'].tensor.get(n));\n }\n }\n\n (0, _ndarrayGemm.default)(matMul.tensor, this.volColsMat.tensor, this.wRowsMat.tensor, 1, 1);\n this.output = new _Tensor.default([], this.outputShape);\n let outputChannelRaveled = new _Tensor.default([], [outputDim1 * outputDim2 * outputDim3]);\n let outputChannel = new _Tensor.default([], [outputDim1, outputDim2, outputDim3]);\n\n for (let n = 0; n < nbFilter; n++) {\n _ndarrayOps.default.assign(outputChannelRaveled.tensor, matMul.tensor.pick(null, n));\n\n outputChannel.replaceTensorData(outputChannelRaveled.tensor.data);\n\n _ndarrayOps.default.assign(this.output.tensor.pick(null, null, null, n), outputChannel.tensor);\n }\n\n this.activationFunc(this.output);\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(3, 0, 1, 2);\n }\n }\n\n _createIndexMap(indicesForReshaped) {\n if (this.indexMap) {\n return;\n }\n\n let [inputDim1, inputDim2, inputDim3, inputChannels] = this.inputShape;\n let indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n\n if (this.padding === 'same') {\n const [paddingDim1Before, paddingDim1After, paddingDim2Before, paddingDim2After, paddingDim3Before, paddingDim3After] = this.inputPadding;\n inputDim1 = inputDim1 + paddingDim1Before + paddingDim1After;\n inputDim2 = inputDim2 + paddingDim2Before + paddingDim2After;\n inputDim3 = inputDim3 + paddingDim3Before + paddingDim3After;\n const padValue = -1;\n indices = this._padInput(indices, padValue);\n }\n\n const kernelDim1 = this.kernelShape[1];\n const kernelDim2 = this.kernelShape[2];\n const kernelDim3 = this.kernelShape[3];\n const outputDim1 = this.outputShape[0];\n const outputDim2 = this.outputShape[1];\n const outputDim3 = this.outputShape[2];\n const nbPatches = outputDim1 * outputDim2 * outputDim3;\n const patchLen = kernelDim1 * kernelDim2 * kernelDim3 * inputChannels;\n const kernelDim1Dilated = kernelDim1 + (kernelDim1 - 1) * (this.dilationRate[0] - 1);\n const kernelDim2Dilated = kernelDim2 + (kernelDim2 - 1) * (this.dilationRate[1] - 1);\n const kernelDim3Dilated = kernelDim3 + (kernelDim3 - 1) * (this.dilationRate[2] - 1);\n this.indexMap = new _Tensor.default([], [nbPatches, patchLen], {\n type: Int32Array\n });\n const indicesPatch = new _Tensor.default([], [kernelDim1, kernelDim2, kernelDim3, inputChannels]);\n let offset = 0;\n\n for (let i = 0, limit = inputDim1 - kernelDim1Dilated; i <= limit; i += this.strides[0]) {\n for (let j = 0, limit = inputDim2 - kernelDim2Dilated; j <= limit; j += this.strides[1]) {\n for (let k = 0, limit = inputDim3 - kernelDim3Dilated; k <= limit; k += this.strides[2]) {\n _ndarrayOps.default.assign(indicesPatch.tensor, indices.tensor.hi(i + kernelDim1Dilated, j + kernelDim2Dilated, k + kernelDim3Dilated, inputChannels).lo(i, j, k, 0).step(this.dilationRate[0], this.dilationRate[1], this.dilationRate[2], 1));\n\n this.indexMap.tensor.data.set(indicesPatch.tensor.data, offset);\n offset += patchLen;\n }\n }\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int',\n supportsTextureFragments: true\n });\n }\n\n _callGPU(x) {\n let outputTextureShape;\n\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n\n this._calcOutputShape(this.inputShape);\n\n this._createIndexMap(x.indicesForReshaped);\n\n outputTextureShape = [this.indexMap.glTextureShape[0], this.weights['kernel'].glTextureShape[1]];\n } else {\n this.inputShape = x.tensor.shape;\n\n this._calcOutputShape(this.inputShape);\n\n x = this._padInput(x);\n\n this._vol2col(x);\n\n this.volColsMat.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n outputTextureShape = [this.volColsMat.glTextureShape[0], this.weights['kernel'].glTextureShape[1]];\n }\n\n if (this.activation !== 'linear' && !this.outputPreactiv) {\n this.outputPreactiv = new _Tensor.default([], outputTextureShape);\n this.outputPreactiv.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.outputPreactiv.is2DReshaped = true;\n this.outputPreactiv.originalShape = this.outputShape;\n this.outputPreactiv.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.outputShape, false, -1);\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], outputTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.output.is2DReshaped = true;\n this.output.originalShape = this.outputShape;\n this.output.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.outputShape, false, -1);\n }\n\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n const hasFragments = Boolean(x.glTextureFragments);\n\n if (hasFragments) {\n x.convert2DRowFragmentedGLTextureToColStack();\n }\n\n if (!this.convProgram) {\n const convProgramSource = (0, _createGLSLProgram.default)('conv2d', this.output.glTextureFragmentShape ? this.output.glTextureFragmentShape : this.output.glTextureShape, x.glTextureFragmentShape ? x.glTextureFragmentShape : x.glTextureShape, this.indexMap.glTextureFragmentShape ? this.indexMap.glTextureFragmentShape : this.indexMap.glTextureShape, this.useBias, hasFragments);\n this.convProgram = _WebGL.webgl2.compileProgram(convProgramSource);\n }\n\n _WebGL.webgl2.runProgram({\n program: this.convProgram,\n output: this.activation === 'linear' ? this.output : this.outputPreactiv,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }, {\n input: this.weights['kernel'],\n name: 'kernel'\n }, ...(this.useBias ? [{\n input: this.weights['bias'],\n name: 'bias'\n }] : [])],\n supportsTextureFragments: true\n });\n\n if (hasFragments) {\n x.removeGLTextureFragmentsAsColStack();\n }\n } else {\n const matMulInputs = [{\n input: this.volColsMat,\n name: 'A'\n }, {\n input: this.weights['kernel'],\n name: 'B'\n }];\n\n if (this.useBias) {\n matMulInputs.push({\n input: this.weights['bias'],\n name: 'C'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.activation === 'linear' ? this.output : this.outputPreactiv,\n inputs: matMulInputs,\n uniforms: [{\n value: this.useBias ? 1 : 0,\n type: 'bool',\n name: 'addC'\n }],\n supportsTextureFragments: true\n });\n }\n\n if (this.activation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.activationProgram,\n output: this.output,\n inputs: [{\n input: this.outputPreactiv,\n name: 'x'\n }],\n supportsTextureFragments: true\n });\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n this.output.reshapeFrom2D();\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(3, 0, 1, 2);\n }\n }\n }\n\n}\n\nexports.default = Conv3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass Cropping1D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Cropping1D';\n const {\n cropping = [0, 0]\n } = attrs;\n\n if (Array.isArray(cropping)) {\n this.cropping = cropping;\n } else {\n this.cropping = [cropping, cropping];\n }\n\n this.description = `${JSON.stringify(this.cropping)}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] - this.cropping[0] - this.cropping[1], this.inputShape[1]];\n this.output = new _Tensor.default([], this.outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor, x.tensor.hi(this.inputShape[0] - this.cropping[1], this.inputShape[2]).lo(this.cropping[0], 0));\n }\n\n _createIndexMap() {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesRow = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesCol = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n\n for (let i = 0; i < this.inputShape[0]; i++) {\n _ndarrayOps.default.assigns(indicesRow.tensor.pick(i, null), i);\n }\n\n for (let j = 0; j < this.inputShape[1]; j++) {\n _ndarrayOps.default.assigns(indicesCol.tensor.pick(null, j), j);\n }\n\n _ndarrayOps.default.muls(indices.tensor, indicesRow.tensor, this.inputShape[1]);\n\n _ndarrayOps.default.addeq(indices.tensor, indicesCol.tensor);\n\n this.indexMap = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n const sliceStart = [this.cropping[0], 0];\n const sliceEnd = [this.inputShape[0] - this.cropping[1], this.inputShape[2]];\n\n _ndarrayOps.default.assign(this.indexMap.tensor, indices.tensor.hi(...sliceEnd).lo(...sliceStart));\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] - this.cropping[0] - this.cropping[1], this.inputShape[1]];\n\n this._createIndexMap();\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = Cropping1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass Cropping2D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Cropping2D';\n const {\n cropping = [[0, 0], [0, 0]],\n data_format = 'channels_last'\n } = attrs;\n\n if (Array.isArray(cropping)) {\n if (Array.isArray(cropping[0])) {\n this.cropping = cropping;\n } else {\n this.cropping = [[cropping[0], cropping[0]], [cropping[1], cropping[1]]];\n }\n } else {\n this.cropping = [[cropping, cropping], [cropping, cropping]];\n }\n\n this.dataFormat = data_format;\n this.description = `${JSON.stringify(this.cropping)}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 0);\n }\n\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] - this.cropping[0][0] - this.cropping[0][1], this.inputShape[1] - this.cropping[1][0] - this.cropping[1][1], this.inputShape[2]];\n this.output = new _Tensor.default([], this.outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor, x.tensor.hi(this.inputShape[0] - this.cropping[0][1], this.inputShape[1] - this.cropping[1][1], this.inputShape[2]).lo(this.cropping[0][0], this.cropping[1][0], 0));\n\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(2, 0, 1);\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n\n _createIndexMap(indicesForReshaped, is2DReshaped) {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n this.indexMap = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n const sliceStart = this.dataFormat === 'channels_first' ? [0, this.cropping[0][0], this.cropping[1][0]] : [this.cropping[0][0], this.cropping[1][0], 0];\n const sliceEnd = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] - this.cropping[0][1], this.inputShape[2] - this.cropping[1][1]] : [this.inputShape[0] - this.cropping[0][1], this.inputShape[1] - this.cropping[1][1], this.inputShape[2]];\n\n _ndarrayOps.default.assign(this.indexMap.tensor, indices.tensor.hi(...sliceEnd).lo(...sliceStart));\n\n if (is2DReshaped) {\n this.indexMap.reshapeTo2D();\n } else {\n this.indexMap.reshapeTo2DSquare();\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.reshapeTo2DSquare();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.originalShape;\n this.outputShape = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] - this.cropping[0][0] - this.cropping[0][1], this.inputShape[2] - this.cropping[1][0] - this.cropping[1][1]] : [this.inputShape[0] - this.cropping[0][0] - this.cropping[0][1], this.inputShape[1] - this.cropping[1][0] - this.cropping[1][1], this.inputShape[2]];\n\n this._createIndexMap(x.indicesForReshaped, x.is2DReshaped);\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n\n if (x.is2DReshaped) {\n this.output.reshapeTo2D();\n } else {\n this.output.reshapeTo2DSquare();\n }\n\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = Cropping2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass Cropping3D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Cropping3D';\n const {\n cropping = [[0, 0], [0, 0], [0, 0]],\n data_format = 'channels_last'\n } = attrs;\n\n if (Array.isArray(cropping)) {\n if (Array.isArray(cropping[0])) {\n this.cropping = cropping;\n } else {\n this.cropping = [[cropping[0], cropping[0]], [cropping[1], cropping[1]], [cropping[2], cropping[2]]];\n }\n } else {\n this.cropping = [[cropping, cropping], [cropping, cropping], [cropping, cropping]];\n }\n\n this.dataFormat = data_format;\n this.description = `${JSON.stringify(this.cropping)}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 3, 0);\n }\n\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] - this.cropping[0][0] - this.cropping[0][1], this.inputShape[1] - this.cropping[1][0] - this.cropping[1][1], this.inputShape[2] - this.cropping[2][0] - this.cropping[2][1], this.inputShape[3]];\n this.output = new _Tensor.default([], this.outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor, x.tensor.hi(this.inputShape[0] - this.cropping[0][1], this.inputShape[1] - this.cropping[1][1], this.inputShape[2] - this.cropping[2][1], this.inputShape[3]).lo(this.cropping[0][0], this.cropping[1][0], this.cropping[2][0], 0));\n\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(3, 0, 1, 2);\n this.output.tensor = this.output.tensor.transpose(3, 0, 1, 2);\n }\n }\n\n _createIndexMap(indicesForReshaped, is2DReshaped) {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n this.indexMap = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n const sliceStart = this.dataFormat === 'channels_first' ? [0, this.cropping[0][0], this.cropping[1][0], this.cropping[2][0]] : [this.cropping[0][0], this.cropping[1][0], this.cropping[2][0], 0];\n const sliceEnd = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] - this.cropping[0][1], this.inputShape[2] - this.cropping[1][1], this.inputShape[3] - this.cropping[2][1]] : [this.inputShape[0] - this.cropping[0][1], this.inputShape[1] - this.cropping[1][1], this.inputShape[2] - this.cropping[2][1], this.inputShape[3]];\n\n _ndarrayOps.default.assign(this.indexMap.tensor, indices.tensor.hi(...sliceEnd).lo(...sliceStart));\n\n if (is2DReshaped) {\n this.indexMap.reshapeTo2D();\n } else {\n this.indexMap.reshapeTo2DSquare();\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.reshapeTo2DSquare();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.originalShape;\n this.outputShape = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] - this.cropping[0][0] - this.cropping[0][1], this.inputShape[2] - this.cropping[1][0] - this.cropping[1][1], this.inputShape[3] - this.cropping[2][0] - this.cropping[2][1]] : [this.inputShape[0] - this.cropping[0][0] - this.cropping[0][1], this.inputShape[1] - this.cropping[1][0] - this.cropping[1][1], this.inputShape[2] - this.cropping[2][0] - this.cropping[2][1], this.inputShape[3]];\n\n this._createIndexMap(x.indicesForReshaped, x.is2DReshaped);\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n\n if (x.is2DReshaped) {\n this.output.reshapeTo2D();\n } else {\n this.output.reshapeTo2DSquare();\n }\n\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = Cropping3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass UpSampling1D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'UpSampling1D';\n const {\n size = 2\n } = attrs;\n this.size = size;\n this.description = `size ${size}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] * this.size, this.inputShape[1]];\n this.output = new _Tensor.default([], this.outputShape);\n\n for (let i = 0; i < this.size; i++) {\n _ndarrayOps.default.assign(this.output.tensor.lo(i, 0).step(this.size, 1), x.tensor);\n }\n }\n\n _createIndexMap() {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesRow = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesCol = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n\n for (let i = 0; i < this.inputShape[0]; i++) {\n _ndarrayOps.default.assigns(indicesRow.tensor.pick(i, null), i);\n }\n\n for (let j = 0; j < this.inputShape[1]; j++) {\n _ndarrayOps.default.assigns(indicesCol.tensor.pick(null, j), j);\n }\n\n _ndarrayOps.default.muls(indices.tensor, indicesRow.tensor, this.inputShape[1]);\n\n _ndarrayOps.default.addeq(indices.tensor, indicesCol.tensor);\n\n this.indexMap = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n\n for (let i = 0; i < this.size; i++) {\n _ndarrayOps.default.assign(this.indexMap.tensor.lo(i, 0).step(this.size, 1), indices.tensor);\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] * this.size, this.inputShape[1]];\n\n this._createIndexMap();\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = UpSampling1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass UpSampling2D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'UpSampling2D';\n const {\n size = [2, 2],\n data_format = 'channels_last'\n } = attrs;\n\n if (Array.isArray(size)) {\n this.size = size;\n } else {\n this.size = [size, size];\n }\n\n this.dataFormat = data_format;\n this.description = `size ${this.size.join('x')}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 0);\n }\n\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] * this.size[0], this.inputShape[1] * this.size[1], this.inputShape[2]];\n this.output = new _Tensor.default([], this.outputShape);\n\n for (let i = 0; i < this.size[0]; i++) {\n for (let j = 0; j < this.size[1]; j++) {\n _ndarrayOps.default.assign(this.output.tensor.lo(i, j, 0).step(this.size[0], this.size[1], 1), x.tensor);\n }\n }\n\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(2, 0, 1);\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n\n _createIndexMap(indicesForReshaped, is2DReshaped) {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n this.indexMap = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n\n for (let i = 0; i < this.size[0]; i++) {\n for (let j = 0; j < this.size[1]; j++) {\n const sliceStart = this.dataFormat === 'channels_first' ? [0, i, j] : [i, j, 0];\n const step = this.dataFormat === 'channels_first' ? [1, this.size[0], this.size[1]] : [this.size[0], this.size[1], 1];\n\n _ndarrayOps.default.assign(this.indexMap.tensor.lo(...sliceStart).step(...step), indices.tensor);\n }\n }\n\n if (is2DReshaped) {\n this.indexMap.reshapeTo2D();\n } else {\n this.indexMap.reshapeTo2DSquare();\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.reshapeTo2DSquare();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.originalShape;\n this.outputShape = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] * this.size[0], this.inputShape[2] * this.size[1]] : [this.inputShape[0] * this.size[0], this.inputShape[1] * this.size[1], this.inputShape[2]];\n\n this._createIndexMap(x.indicesForReshaped, x.is2DReshaped);\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n\n if (x.is2DReshaped) {\n this.output.reshapeTo2D();\n } else {\n this.output.reshapeTo2DSquare();\n }\n\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = UpSampling2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass UpSampling3D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'UpSampling3D';\n const {\n size = [2, 2, 2],\n data_format = 'channels_last'\n } = attrs;\n\n if (Array.isArray(size)) {\n this.size = size;\n } else {\n this.size = [size, size, size];\n }\n\n this.dataFormat = data_format;\n this.description = `size ${this.size.join('x')}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 3, 0);\n }\n\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] * this.size[0], this.inputShape[1] * this.size[1], this.inputShape[2] * this.size[2], this.inputShape[3]];\n this.output = new _Tensor.default([], this.outputShape);\n\n for (let i = 0; i < this.size[0]; i++) {\n for (let j = 0; j < this.size[1]; j++) {\n for (let k = 0; k < this.size[2]; k++) {\n _ndarrayOps.default.assign(this.output.tensor.lo(i, j, k, 0).step(this.size[0], this.size[1], this.size[2], 1), x.tensor);\n }\n }\n }\n\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(3, 0, 1, 2);\n this.output.tensor = this.output.tensor.transpose(3, 0, 1, 2);\n }\n }\n\n _createIndexMap(indicesForReshaped, is2DReshaped) {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n this.indexMap = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n\n for (let i = 0; i < this.size[0]; i++) {\n for (let j = 0; j < this.size[1]; j++) {\n for (let k = 0; k < this.size[2]; k++) {\n const sliceStart = this.dataFormat === 'channels_first' ? [0, i, j, k] : [i, j, k, 0];\n const step = this.dataFormat === 'channels_first' ? [1, this.size[0], this.size[1], this.size[2]] : [this.size[0], this.size[1], this.size[2], 1];\n\n _ndarrayOps.default.assign(this.indexMap.tensor.lo(...sliceStart).step(...step), indices.tensor);\n }\n }\n }\n\n if (is2DReshaped) {\n this.indexMap.reshapeTo2D();\n } else {\n this.indexMap.reshapeTo2DSquare();\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.reshapeTo2DSquare();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.originalShape;\n this.outputShape = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] * this.size[0], this.inputShape[2] * this.size[1], this.inputShape[3] * this.size[2]] : [this.inputShape[0] * this.size[0], this.inputShape[1] * this.size[1], this.inputShape[2] * this.size[2], this.inputShape[3]];\n\n this._createIndexMap(x.indicesForReshaped, x.is2DReshaped);\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n\n if (x.is2DReshaped) {\n this.output.reshapeTo2D();\n } else {\n this.output.reshapeTo2DSquare();\n }\n\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = UpSampling3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass ZeroPadding1D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'ZeroPadding1D';\n const {\n padding = [1, 1]\n } = attrs;\n\n if (Array.isArray(padding)) {\n this.padding = padding;\n } else {\n this.padding = [padding, padding];\n }\n\n this.description = `${JSON.stringify(this.padding)}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] + this.padding[0] + this.padding[1], this.inputShape[1]];\n this.output = new _Tensor.default([], this.outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor.hi(this.inputShape[0] + this.padding[0], this.inputShape[1]).lo(this.padding[0], 0), x.tensor);\n }\n\n _createIndexMap() {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesRow = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesCol = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n\n for (let i = 0; i < this.inputShape[0]; i++) {\n _ndarrayOps.default.assigns(indicesRow.tensor.pick(i, null), i);\n }\n\n for (let j = 0; j < this.inputShape[1]; j++) {\n _ndarrayOps.default.assigns(indicesCol.tensor.pick(null, j), j);\n }\n\n _ndarrayOps.default.muls(indices.tensor, indicesRow.tensor, this.inputShape[1]);\n\n _ndarrayOps.default.addeq(indices.tensor, indicesCol.tensor);\n\n this.indexMap = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n const sliceStart = [this.padding[0], 0];\n const sliceEnd = [this.inputShape[0] + this.padding[0], this.inputShape[1]];\n\n _ndarrayOps.default.assigns(this.indexMap.tensor, -1);\n\n _ndarrayOps.default.assign(this.indexMap.tensor.hi(...sliceEnd).lo(...sliceStart), indices.tensor);\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] + this.padding[0] + this.padding[1], this.inputShape[1]];\n\n this._createIndexMap();\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = ZeroPadding1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass ZeroPadding2D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'ZeroPadding2D';\n const {\n padding = [[1, 1], [1, 1]],\n data_format = 'channels_last'\n } = attrs;\n\n if (Array.isArray(padding)) {\n if (Array.isArray(padding[0])) {\n this.padding = padding;\n } else {\n this.padding = [[padding[0], padding[0]], [padding[1], padding[1]]];\n }\n } else {\n this.padding = [[padding, padding], [padding, padding]];\n }\n\n this.dataFormat = data_format;\n this.description = `${JSON.stringify(this.padding)}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 0);\n }\n\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] + this.padding[0][0] + this.padding[0][1], this.inputShape[1] + this.padding[1][0] + this.padding[1][1], this.inputShape[2]];\n this.output = new _Tensor.default([], this.outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor.hi(this.inputShape[0] + this.padding[0][0], this.inputShape[1] + this.padding[1][0], this.inputShape[2]).lo(this.padding[0][0], this.padding[1][0], 0), x.tensor);\n\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(2, 0, 1);\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n\n _createIndexMap(indicesForReshaped, is2DReshaped) {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n this.indexMap = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n const sliceStart = this.dataFormat === 'channels_first' ? [0, this.padding[0][0], this.padding[1][0]] : [this.padding[0][0], this.padding[1][0], 0];\n const sliceEnd = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] + this.padding[0][0], this.inputShape[2] + this.padding[1][0]] : [this.inputShape[0] + this.padding[0][0], this.inputShape[1] + this.padding[1][0], this.inputShape[2]];\n\n _ndarrayOps.default.assigns(this.indexMap.tensor, -1);\n\n _ndarrayOps.default.assign(this.indexMap.tensor.hi(...sliceEnd).lo(...sliceStart), indices.tensor);\n\n if (is2DReshaped) {\n this.indexMap.reshapeTo2D();\n } else {\n this.indexMap.reshapeTo2DSquare();\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.reshapeTo2DSquare();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.originalShape;\n this.outputShape = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] + this.padding[0][0] + this.padding[0][1], this.inputShape[2] + this.padding[1][0] + this.padding[1][1]] : [this.inputShape[0] + this.padding[0][0] + this.padding[0][1], this.inputShape[1] + this.padding[1][0] + this.padding[1][1], this.inputShape[2]];\n\n this._createIndexMap(x.indicesForReshaped, x.is2DReshaped);\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n\n if (x.is2DReshaped) {\n this.output.reshapeTo2D();\n } else {\n this.output.reshapeTo2DSquare();\n }\n\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = ZeroPadding2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass ZeroPadding3D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'ZeroPadding3D';\n const {\n padding = [[1, 1], [1, 1], [1, 1]],\n data_format = 'channels_last'\n } = attrs;\n\n if (Array.isArray(padding)) {\n if (Array.isArray(padding[0])) {\n this.padding = padding;\n } else {\n this.padding = [[padding[0], padding[0]], [padding[1], padding[1]], [padding[2], padding[2]]];\n }\n } else {\n this.padding = [[padding, padding], [padding, padding], [padding, padding]];\n }\n\n this.dataFormat = data_format;\n this.description = `${JSON.stringify(this.padding)}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 3, 0);\n }\n\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] + this.padding[0][0] + this.padding[0][1], this.inputShape[1] + this.padding[1][0] + this.padding[1][1], this.inputShape[2] + this.padding[2][0] + this.padding[2][1], this.inputShape[3]];\n this.output = new _Tensor.default([], this.outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor.hi(this.inputShape[0] + this.padding[0][0], this.inputShape[1] + this.padding[1][0], this.inputShape[2] + this.padding[2][0], this.inputShape[3]).lo(this.padding[0][0], this.padding[1][0], this.padding[2][0], 0), x.tensor);\n\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(3, 0, 1, 2);\n this.output.tensor = this.output.tensor.transpose(3, 0, 1, 2);\n }\n }\n\n _createIndexMap(indicesForReshaped, is2DReshaped) {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n this.indexMap = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n const sliceStart = this.dataFormat === 'channels_first' ? [0, this.padding[0][0], this.padding[1][0], this.padding[2][0]] : [this.padding[0][0], this.padding[1][0], this.padding[2][0], 0];\n const sliceEnd = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] + this.padding[0][0], this.inputShape[2] + this.padding[1][0], this.inputShape[3] + this.padding[2][0]] : [this.inputShape[0] + this.padding[0][0], this.inputShape[1] + this.padding[1][0], this.inputShape[2] + this.padding[2][0], this.inputShape[3]];\n\n _ndarrayOps.default.assigns(this.indexMap.tensor, -1);\n\n _ndarrayOps.default.assign(this.indexMap.tensor.hi(...sliceEnd).lo(...sliceStart), indices.tensor);\n\n if (is2DReshaped) {\n this.indexMap.reshapeTo2D();\n } else {\n this.indexMap.reshapeTo2DSquare();\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.reshapeTo2DSquare();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.originalShape;\n this.outputShape = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] + this.padding[0][0] + this.padding[0][1], this.inputShape[2] + this.padding[1][0] + this.padding[1][1], this.inputShape[3] + this.padding[2][0] + this.padding[2][1]] : [this.inputShape[0] + this.padding[0][0] + this.padding[0][1], this.inputShape[1] + this.padding[1][0] + this.padding[1][1], this.inputShape[2] + this.padding[2][0] + this.padding[2][1], this.inputShape[3]];\n\n this._createIndexMap(x.indicesForReshaped, x.is2DReshaped);\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n\n if (x.is2DReshaped) {\n this.output.reshapeTo2D();\n } else {\n this.output.reshapeTo2DSquare();\n }\n\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = ZeroPadding3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Conv1D\", {\n enumerable: true,\n get: function () {\n return _Conv1D.default;\n }\n});\nObject.defineProperty(exports, \"Conv2D\", {\n enumerable: true,\n get: function () {\n return _Conv2D.default;\n }\n});\nObject.defineProperty(exports, \"SeparableConv2D\", {\n enumerable: true,\n get: function () {\n return _SeparableConv2D.default;\n }\n});\nObject.defineProperty(exports, \"Conv2DTranspose\", {\n enumerable: true,\n get: function () {\n return _Conv2DTranspose.default;\n }\n});\nObject.defineProperty(exports, \"Conv3D\", {\n enumerable: true,\n get: function () {\n return _Conv3D.default;\n }\n});\nObject.defineProperty(exports, \"Cropping1D\", {\n enumerable: true,\n get: function () {\n return _Cropping1D.default;\n }\n});\nObject.defineProperty(exports, \"Cropping2D\", {\n enumerable: true,\n get: function () {\n return _Cropping2D.default;\n }\n});\nObject.defineProperty(exports, \"Cropping3D\", {\n enumerable: true,\n get: function () {\n return _Cropping3D.default;\n }\n});\nObject.defineProperty(exports, \"UpSampling1D\", {\n enumerable: true,\n get: function () {\n return _UpSampling1D.default;\n }\n});\nObject.defineProperty(exports, \"UpSampling2D\", {\n enumerable: true,\n get: function () {\n return _UpSampling2D.default;\n }\n});\nObject.defineProperty(exports, \"UpSampling3D\", {\n enumerable: true,\n get: function () {\n return _UpSampling3D.default;\n }\n});\nObject.defineProperty(exports, \"ZeroPadding1D\", {\n enumerable: true,\n get: function () {\n return _ZeroPadding1D.default;\n }\n});\nObject.defineProperty(exports, \"ZeroPadding2D\", {\n enumerable: true,\n get: function () {\n return _ZeroPadding2D.default;\n }\n});\nObject.defineProperty(exports, \"ZeroPadding3D\", {\n enumerable: true,\n get: function () {\n return _ZeroPadding3D.default;\n }\n});\n\nvar _Conv1D = _interopRequireDefault(require(\"./Conv1D\"));\n\nvar _Conv2D = _interopRequireDefault(require(\"./Conv2D\"));\n\nvar _SeparableConv2D = _interopRequireDefault(require(\"./SeparableConv2D\"));\n\nvar _Conv2DTranspose = _interopRequireDefault(require(\"./Conv2DTranspose\"));\n\nvar _Conv3D = _interopRequireDefault(require(\"./Conv3D\"));\n\nvar _Cropping1D = _interopRequireDefault(require(\"./Cropping1D\"));\n\nvar _Cropping2D = _interopRequireDefault(require(\"./Cropping2D\"));\n\nvar _Cropping3D = _interopRequireDefault(require(\"./Cropping3D\"));\n\nvar _UpSampling1D = _interopRequireDefault(require(\"./UpSampling1D\"));\n\nvar _UpSampling2D = _interopRequireDefault(require(\"./UpSampling2D\"));\n\nvar _UpSampling3D = _interopRequireDefault(require(\"./UpSampling3D\"));\n\nvar _ZeroPadding1D = _interopRequireDefault(require(\"./ZeroPadding1D\"));\n\nvar _ZeroPadding2D = _interopRequireDefault(require(\"./ZeroPadding2D\"));\n\nvar _ZeroPadding3D = _interopRequireDefault(require(\"./ZeroPadding3D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","'use strict';\n\nmodule.exports = function swap (x, y) {\n var i, tmp;\n var dx = x.data;\n var dy = y.data;\n\n var ox = x.stride[0];\n var oy = y.stride[0];\n var px = x.offset;\n var py = y.offset;\n\n for (i = x.shape[0] - 1; i >= 0; i--, px += ox, py += oy) {\n tmp = dx[px];\n dx[px] = dy[py];\n dy[py] = tmp;\n }\n};\n","'use strict';\n\nmodule.exports = function scal (alpha, x) {\n var i;\n var dx = x.data;\n var ox = x.stride[0];\n var px = x.offset;\n for (i = x.shape[0] - 1; i >= 0; i--, px += ox) {\n dx[px] *= alpha;\n }\n};\n","'use strict';\n\nmodule.exports = function copy (x, y) {\n var i;\n var dx = x.data;\n var dy = y.data;\n var ox = x.stride[0];\n var oy = y.stride[0];\n var px = x.offset;\n var py = y.offset;\n for (i = x.shape[0] - 1; i >= 0; i--, px += ox, py += oy) {\n dy[py] = dx[px];\n }\n};\n","'use strict';\n\nmodule.exports = function axpy (alpha, x, y) {\n var i;\n var dx = x.data;\n var dy = y.data;\n var ox = x.stride[0];\n var oy = y.stride[0];\n var px = x.offset;\n var py = y.offset;\n for (i = x.shape[0] - 1; i >= 0; i--, px += ox, py += oy) {\n dy[py] += alpha * dx[px];\n }\n};\n","'use strict';\n\nmodule.exports = function dot (x, y) {\n var i, tmp;\n var dx = x.data;\n var ox = x.stride[0];\n var px = x.offset;\n\n var sum = 0;\n if (x === y) {\n for (i = x.shape[0] - 1; i >= 0; i--, px += ox) {\n tmp = dx[px];\n sum += tmp * tmp;\n }\n } else {\n var dy = y.data;\n var oy = y.stride[0];\n var py = y.offset;\n for (i = x.shape[0] - 1; i >= 0; i--, px += ox, py += oy) {\n sum += dy[py] * dx[px];\n }\n }\n return sum;\n};\n","'use strict';\n\nmodule.exports = function cpsc (alpha, x, y) {\n var i;\n var dx = x.data;\n var dy = y.data;\n var ox = x.stride[0];\n var oy = y.stride[0];\n var px = x.offset;\n var py = y.offset;\n for (i = x.shape[0] - 1; i >= 0; i--, px += ox, py += oy) {\n dy[py] = alpha * dx[px];\n }\n};\n","'use strict';\n\nvar hypot = function hypot (a, b) {\n if (a === 0 && b === 0) {\n return 0;\n }\n var x = Math.abs(a);\n var y = Math.abs(b);\n var t = Math.min(x, y);\n var u = Math.max(x, y);\n t = t / u;\n return u * Math.sqrt(1 + t * t);\n};\n\nmodule.exports = function nrm2 (x) {\n var i, tmp;\n var dx = x.data;\n var ox = x.stride[0];\n var px = x.offset;\n var sum = 0;\n for (i = x.shape[0] - 1; i >= 0; i--, px += ox) {\n tmp = dx[px];\n sum = hypot(sum, tmp);\n }\n return sum;\n};\n","'use strict';\n\nmodule.exports = function asum (x) {\n var i;\n var dx = x.data;\n var ox = x.stride[0];\n var px = x.offset;\n var sum = 0;\n for (i = x.shape[0] - 1; i >= 0; i--, px += ox) {\n sum += Math.abs(dx[px]);\n }\n return sum;\n};\n","'use strict';\n\nmodule.exports = function iamax (x) {\n var i, tmp, imax;\n var xmax = -Infinity;\n var dx = x.data;\n var ox = x.stride[0];\n var px = x.offset;\n var l = x.shape[0];\n for (i = 0; i < l; i++, px += ox) {\n tmp = Math.abs(dx[px]);\n if (tmp > xmax) {\n xmax = tmp;\n imax = i;\n }\n }\n return imax;\n};\n","'use strict';\n\nmodule.exporst = spmv;\n\nfunction spmv () {\n console.error('SPMV (symmetric packed matrix vector multiply) not yet implemented');\n}\n","'use strict';\n\nmodule.exporst = tbsv;\n\nfunction tbsv () {\n console.error('TBSV (triangular banded matrix solver) not yet implemented');\n}\n","'use strict';\n\nmodule.exports.gemv = require('./gemv');\nmodule.exports.gbmv = require('./gbmv');\nmodule.exports.symv = require('./symv');\nmodule.exports.sbmv = require('./sbmv');\nmodule.exports.spmv = require('./spmv');\nmodule.exports.trmv = require('./trmv');\nmodule.exports.tbmv = require('./tbmv');\nmodule.exports.trsv = require('./trsv');\nmodule.exports.tbsv = require('./tbsv');\nmodule.exports.tpsv = require('./tpsv');\nmodule.exports.ger = require('./ger');\nmodule.exports.syr = require('./syr');\nmodule.exports.spr = require('./spr');\nmodule.exports.syr2 = require('./syr2');\nmodule.exports.spr2 = require('./spr2');\n\nmodule.exports.trmv_lower = function (A, x) {\n console.warn('trmv_lower is deprecated. Please use the \\'isLower\\' flag with trmv.');\n return module.exports.trmv(A, x, true);\n};\n\nmodule.exports.trsv_lower = function (A, x) {\n console.warn('trsv_lower is deprecated. Please use the \\'isLower\\' flag with trsv.');\n return module.exports.trsv(A, x, true);\n};\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar activations = _interopRequireWildcard(require(\"../../activations\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayBlasLevel = require(\"ndarray-blas-level2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar activationProgramSources = _interopRequireWildcard(require(\"../../activations/programSources\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst matMulProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D A;\\nuniform sampler2D B;\\nuniform sampler2D C;\\nuniform bool addC;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 A_size = textureSize(A, 0);\\n ivec2 B_size = textureSize(B, 0);\\n int out_x = int(float(B_size[0]) * outTex.x);\\n int out_y = int(float(A_size[1]) * outTex.y);\\n int commonDim = A_size[0];\\n\\n float sum = 0.;\\n for (int i = 0; i < commonDim; ++i) {\\n float a = texelFetch(A, ivec2(i, out_y), 0).r;\\n float b = texelFetch(B, ivec2(out_x, i), 0).r;\\n sum += a * b;\\n }\\n\\n if (addC) {\\n sum += texelFetch(C, ivec2(out_x, 0), 0).r;\\n }\\n\\n outColor = vec4(sum);\\n}\\n\";\n\nclass Dense extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Dense';\n const {\n units = 1,\n activation = 'linear',\n input_dim = null,\n use_bias = true\n } = attrs;\n this.description = `${activation} activation, output dimensions: ${units}`;\n this.activation = activation;\n this.activationFunc = activations[this.activation];\n this.units = units;\n this.input_dim = input_dim;\n this.use_bias = use_bias;\n this.params = this.use_bias ? ['kernel', 'bias'] : ['kernel'];\n\n if (this.input_dim) {\n this.inputShape = [this.input_dim];\n }\n\n if (this.gpu) {\n this.matMulProgram = _WebGL.webgl2.compileProgram(matMulProgramSource);\n this.activationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.activation]);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.output = new _Tensor.default([], [this.units]);\n\n if (this.use_bias) {\n _ndarrayOps.default.assign(this.output.tensor, this.weights['bias'].tensor);\n }\n\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['kernel'].tensor.transpose(1, 0), x.tensor, 1, this.output.tensor);\n this.activationFunc(this.output);\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (this.activation !== 'linear' && !this.outputPreactiv) {\n this.outputPreactiv = new _Tensor.default([], [this.units]);\n this.outputPreactiv.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], [this.units]);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const matMulInputs = [{\n input: x,\n name: 'A'\n }, {\n input: this.weights['kernel'],\n name: 'B'\n }];\n\n if (this.use_bias) {\n matMulInputs.push({\n input: this.weights['bias'],\n name: 'C'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.activation === 'linear' ? this.output : this.outputPreactiv,\n inputs: matMulInputs,\n uniforms: [{\n value: this.use_bias ? 1 : 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n if (this.activation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.activationProgram,\n output: this.output,\n inputs: [{\n input: this.outputPreactiv,\n name: 'x'\n }]\n });\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = Dense;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar activations = _interopRequireWildcard(require(\"../../activations\"));\n\nvar activationProgramSources = _interopRequireWildcard(require(\"../../activations/programSources\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Activation extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Activation';\n const {\n activation = 'linear'\n } = attrs;\n this.activation = activation;\n this.activationFunc = activations[activation];\n this.description = `${this.activation}`;\n\n if (this.gpu) {\n this.program = _WebGL.webgl2.compileProgram(activationProgramSources[this.activation]);\n }\n }\n\n call(x) {\n if (this.activation === 'linear') {\n this.output = x;\n return this.output;\n }\n\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.output = new _Tensor.default(new x.arrayType(x.tensor.data), x.tensor.shape);\n this.activationFunc(this.output);\n }\n\n _callGPU(x) {\n if (!x.glTexture && !x.glTextureFragments) {\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], x.glTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n\n if (x.is1D) {\n this.output.is1D = x.is1D;\n } else if (x.is2DReshaped || x.is2DSquareReshaped) {\n if (x.is2DReshaped) {\n this.output.is2DReshaped = x.is2DReshaped;\n } else if (x.is2DSquareReshaped) {\n this.output.is2DSquareReshaped = x.is2DSquareReshaped;\n }\n\n this.output.originalShape = x.originalShape;\n this.output.indicesForReshaped = x.indicesForReshaped;\n }\n }\n\n _WebGL.webgl2.runProgram({\n program: this.program,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }],\n supportsTextureFragments: true\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = Activation;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Dropout extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Dropout';\n const {\n rate = 0.5\n } = attrs;\n this.description = `${rate}`;\n this.rate = Math.min(Math.max(0, rate), 1);\n }\n\n call(x) {\n this.output = x;\n return this.output;\n }\n\n}\n\nexports.default = Dropout;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass SpatialDropout1D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'SpatialDropout1D';\n const {\n p = 0.5\n } = attrs;\n this.description = `${p}`;\n this.p = Math.min(Math.max(0, p), 1);\n }\n\n call(x) {\n this.output = x;\n return this.output;\n }\n\n}\n\nexports.default = SpatialDropout1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass SpatialDropout2D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'SpatialDropout2D';\n const {\n rate = 0.5,\n data_format = 'channels_last'\n } = attrs;\n this.description = `${rate}`;\n this.rate = Math.min(Math.max(0, rate), 1);\n this.dataFormat = data_format;\n }\n\n call(x) {\n this.output = x;\n return this.output;\n }\n\n}\n\nexports.default = SpatialDropout2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass SpatialDropout3D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'SpatialDropout3D';\n const {\n rate = 0.5,\n data_format = 'channels_last'\n } = attrs;\n this.description = `${rate}`;\n this.rate = Math.min(Math.max(0, rate), 1);\n this.dataFormat = data_format;\n }\n\n call(x) {\n this.output = x;\n return this.output;\n }\n\n}\n\nexports.default = SpatialDropout3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst flattenProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform int outputSize;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n int out_x = int(float(outputSize) * outTex.x);\\n int out_y = 0;\\n\\n int i = int(floor(float(out_x) / float(inputCols)));\\n int j = int(mod(float(out_x), float(inputCols)));\\n outColor = vec4(texelFetch(x, ivec2(j, i), 0).r);\\n}\\n\";\nconst flattenFragmentsProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform int outputSize;\\nuniform int inputRows;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n int out_x = int(float(outputSize) * outTex.x);\\n int out_y = 0;\\n\\n int rowIndex = int(mod(floor(float(out_x) / float(inputCols)), float(inputRows)));\\n int colIndex = int(mod(float(out_x), float(inputCols)));\\n int fragmentIndex = int(floor(float(out_x) / (float(inputRows) * float(inputCols))));\\n colIndex += fragmentIndex * inputCols;\\n outColor = vec4(texelFetch(x, ivec2(colIndex, rowIndex), 0).r);\\n}\\n\";\n\nclass Flatten extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Flatten';\n\n if (this.gpu) {\n this.flattenProgram = _WebGL.webgl2.compileProgram(flattenProgramSource);\n this.flattenFragmentsProgram = _WebGL.webgl2.compileProgram(flattenFragmentsProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (x.tensor.shape.length <= 1) {\n this.output = x;\n } else {\n this.output = new _Tensor.default([], [x.tensor.shape.reduce((a, b) => a * b, 1)]);\n this.output.replaceTensorData(x.tensor.data);\n }\n }\n\n _callGPU(x) {\n if (!x.glTexture && !x.glTextureFragments) {\n if (x.tensor.shape.length <= 2) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n } else if (x.tensor.shape.length > 2 && !x.is2DReshaped) {\n x.reshapeTo2D();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], [x.glTextureShape.reduce((a, b) => a * b, 1)]);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (x.glTextureFragments) {\n x.convert2DRowFragmentedGLTextureToColStack();\n\n _WebGL.webgl2.runProgram({\n program: this.flattenFragmentsProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: this.output.glTextureShape[1],\n type: 'int',\n name: 'outputSize'\n }, {\n value: x.glTextureShape[0],\n type: 'int',\n name: 'inputRows'\n }, {\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }],\n supportsTextureFragments: true\n });\n\n x.removeGLTextureFragmentsAsColStack();\n } else {\n _WebGL.webgl2.runProgram({\n program: this.flattenProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: this.output.glTextureShape[1],\n type: 'int',\n name: 'outputSize'\n }, {\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }],\n supportsTextureFragments: true\n });\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = Flatten;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _last2 = _interopRequireDefault(require(\"lodash/last\"));\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass Reshape extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Reshape';\n const {\n target_shape = []\n } = attrs;\n this.targetShape = target_shape;\n this.description = `target shape: ${JSON.stringify(this.targetShape)}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.targetShape.reduce((a, b) => a * b, 1) !== x.tensor.size) {\n this.throwError('The total size of new array must be unchanged in reshape layer.');\n }\n\n this.output = new _Tensor.default([], this.targetShape);\n this.output.replaceTensorData(x.tensor.data);\n }\n\n _createIndexMap() {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesRow = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesCol = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n\n if (this.inputShape.length === 2) {\n for (let i = 0; i < this.inputShape[0]; i++) {\n _ndarrayOps.default.assigns(indicesRow.tensor.pick(i, null), i);\n }\n } else if (this.inputShape.length === 3) {\n for (let i = 0; i < this.inputShape[0]; i++) {\n for (let j = 0; j < this.inputShape[1]; j++) {\n _ndarrayOps.default.assigns(indicesRow.tensor.pick(i, j, null), i * this.inputShape[1] + j);\n }\n }\n } else if (this.inputShape.length === 4) {\n for (let i = 0; i < this.inputShape[0]; i++) {\n for (let j = 0; j < this.inputShape[1]; j++) {\n for (let k = 0; k < this.inputShape[2]; k++) {\n _ndarrayOps.default.assigns(indicesRow.tensor.pick(i, j, k, null), i * this.inputShape[1] * this.inputShape[2] + j * this.inputShape[2] + k);\n }\n }\n }\n }\n\n for (let c = 0; c < (0, _last2.default)(this.inputShape); c++) {\n _ndarrayOps.default.assigns(indicesCol.tensor.pick(...Array(this.inputShape.length - 1).fill(null), c), c);\n }\n\n _ndarrayOps.default.muls(indices.tensor, indicesRow.tensor, (0, _last2.default)(this.inputShape));\n\n _ndarrayOps.default.addeq(indices.tensor, indicesCol.tensor);\n\n this.indexMap = new _Tensor.default([], this.targetShape, {\n type: Int32Array\n });\n this.indexMap.replaceTensorData(new Int32Array(indices.tensor.data));\n\n if (this.targetShape.length > 2) {\n this.indexMap.reshapeTo2D();\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n this.inputShape = x.tensor.shape;\n\n if (x.tensor.shape.length <= 2) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n } else if (x.tensor.shape.length > 2 && !x.is2DReshaped) {\n x.reshapeTo2D();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n } else if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n } else {\n this.inputShape = x.tensor.shape;\n }\n\n this._createIndexMap();\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.targetShape);\n\n if (this.targetShape.length > 2) {\n this.output.reshapeTo2D();\n }\n\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = Reshape;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _last2 = _interopRequireDefault(require(\"lodash/last\"));\n\nvar _range2 = _interopRequireDefault(require(\"lodash/range\"));\n\nvar _isEqual2 = _interopRequireDefault(require(\"lodash/isEqual\"));\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass Permute extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Permute';\n const {\n dims = []\n } = attrs;\n this.description = `${JSON.stringify(dims)}`;\n this.dims = dims.map(dim => dim - 1);\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (x.tensor.shape.length <= 1 || (0, _isEqual2.default)((0, _range2.default)(x.tensor.shape.length), this.dims)) {\n this.output = x;\n return this.output;\n }\n\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.dims.length !== x.tensor.shape.length) {\n this.throwError('The specified dims permutation must match the number of dimensions.');\n }\n\n const outputShape = this.dims.map(i => x.tensor.shape[i]);\n this.output = new _Tensor.default([], outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor, x.tensor.transpose(...this.dims));\n }\n\n _createIndexMap() {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesRow = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesCol = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n\n if (this.inputShape.length === 2) {\n for (let i = 0; i < this.inputShape[0]; i++) {\n _ndarrayOps.default.assigns(indicesRow.tensor.pick(i, null), i);\n }\n } else if (this.inputShape.length === 3) {\n for (let i = 0; i < this.inputShape[0]; i++) {\n for (let j = 0; j < this.inputShape[1]; j++) {\n _ndarrayOps.default.assigns(indicesRow.tensor.pick(i, j, null), i * this.inputShape[1] + j);\n }\n }\n } else if (this.inputShape.length === 4) {\n for (let i = 0; i < this.inputShape[0]; i++) {\n for (let j = 0; j < this.inputShape[1]; j++) {\n for (let k = 0; k < this.inputShape[2]; k++) {\n _ndarrayOps.default.assigns(indicesRow.tensor.pick(i, j, k, null), i * this.inputShape[1] * this.inputShape[2] + j * this.inputShape[2] + k);\n }\n }\n }\n }\n\n for (let c = 0; c < (0, _last2.default)(this.inputShape); c++) {\n _ndarrayOps.default.assigns(indicesCol.tensor.pick(...Array(this.inputShape.length - 1).fill(null), c), c);\n }\n\n _ndarrayOps.default.muls(indices.tensor, indicesRow.tensor, (0, _last2.default)(this.inputShape));\n\n _ndarrayOps.default.addeq(indices.tensor, indicesCol.tensor);\n\n const outputShape = this.dims.map(i => this.inputShape[i]);\n this.indexMap = new _Tensor.default([], outputShape, {\n type: Int32Array\n });\n\n _ndarrayOps.default.assign(this.indexMap.tensor, indices.tensor.transpose(...this.dims));\n\n if (outputShape.length > 2) {\n this.indexMap.reshapeTo2D();\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n this.inputShape = x.tensor.shape;\n\n if (x.tensor.shape.length <= 2) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n } else if (x.tensor.shape.length > 2 && !x.is2DReshaped) {\n x.reshapeTo2D();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n } else if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n } else {\n this.inputShape = x.tensor.shape;\n }\n\n this._createIndexMap();\n\n if (!this.output) {\n const outputShape = this.dims.map(i => this.inputShape[i]);\n this.output = new _Tensor.default([], outputShape);\n\n if (outputShape.length > 2) {\n this.output.reshapeTo2D();\n }\n\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = Permute;","'use strict'\n\nvar bits = require('bit-twiddle')\nvar dup = require('dup')\n\n//Legacy pool support\nif(!global.__TYPEDARRAY_POOL) {\n global.__TYPEDARRAY_POOL = {\n UINT8 : dup([32, 0])\n , UINT16 : dup([32, 0])\n , UINT32 : dup([32, 0])\n , INT8 : dup([32, 0])\n , INT16 : dup([32, 0])\n , INT32 : dup([32, 0])\n , FLOAT : dup([32, 0])\n , DOUBLE : dup([32, 0])\n , DATA : dup([32, 0])\n , UINT8C : dup([32, 0])\n , BUFFER : dup([32, 0])\n }\n}\n\nvar hasUint8C = (typeof Uint8ClampedArray) !== 'undefined'\nvar POOL = global.__TYPEDARRAY_POOL\n\n//Upgrade pool\nif(!POOL.UINT8C) {\n POOL.UINT8C = dup([32, 0])\n}\nif(!POOL.BUFFER) {\n POOL.BUFFER = dup([32, 0])\n}\n\n//New technique: Only allocate from ArrayBufferView and Buffer\nvar DATA = POOL.DATA\n , BUFFER = POOL.BUFFER\n\nexports.free = function free(array) {\n if(Buffer.isBuffer(array)) {\n BUFFER[bits.log2(array.length)].push(array)\n } else {\n if(Object.prototype.toString.call(array) !== '[object ArrayBuffer]') {\n array = array.buffer\n }\n if(!array) {\n return\n }\n var n = array.length || array.byteLength\n var log_n = bits.log2(n)|0\n DATA[log_n].push(array)\n }\n}\n\nfunction freeArrayBuffer(buffer) {\n if(!buffer) {\n return\n }\n var n = buffer.length || buffer.byteLength\n var log_n = bits.log2(n)\n DATA[log_n].push(buffer)\n}\n\nfunction freeTypedArray(array) {\n freeArrayBuffer(array.buffer)\n}\n\nexports.freeUint8 =\nexports.freeUint16 =\nexports.freeUint32 =\nexports.freeInt8 =\nexports.freeInt16 =\nexports.freeInt32 =\nexports.freeFloat32 = \nexports.freeFloat =\nexports.freeFloat64 = \nexports.freeDouble = \nexports.freeUint8Clamped = \nexports.freeDataView = freeTypedArray\n\nexports.freeArrayBuffer = freeArrayBuffer\n\nexports.freeBuffer = function freeBuffer(array) {\n BUFFER[bits.log2(array.length)].push(array)\n}\n\nexports.malloc = function malloc(n, dtype) {\n if(dtype === undefined || dtype === 'arraybuffer') {\n return mallocArrayBuffer(n)\n } else {\n switch(dtype) {\n case 'uint8':\n return mallocUint8(n)\n case 'uint16':\n return mallocUint16(n)\n case 'uint32':\n return mallocUint32(n)\n case 'int8':\n return mallocInt8(n)\n case 'int16':\n return mallocInt16(n)\n case 'int32':\n return mallocInt32(n)\n case 'float':\n case 'float32':\n return mallocFloat(n)\n case 'double':\n case 'float64':\n return mallocDouble(n)\n case 'uint8_clamped':\n return mallocUint8Clamped(n)\n case 'buffer':\n return mallocBuffer(n)\n case 'data':\n case 'dataview':\n return mallocDataView(n)\n\n default:\n return null\n }\n }\n return null\n}\n\nfunction mallocArrayBuffer(n) {\n var n = bits.nextPow2(n)\n var log_n = bits.log2(n)\n var d = DATA[log_n]\n if(d.length > 0) {\n return d.pop()\n }\n return new ArrayBuffer(n)\n}\nexports.mallocArrayBuffer = mallocArrayBuffer\n\nfunction mallocUint8(n) {\n return new Uint8Array(mallocArrayBuffer(n), 0, n)\n}\nexports.mallocUint8 = mallocUint8\n\nfunction mallocUint16(n) {\n return new Uint16Array(mallocArrayBuffer(2*n), 0, n)\n}\nexports.mallocUint16 = mallocUint16\n\nfunction mallocUint32(n) {\n return new Uint32Array(mallocArrayBuffer(4*n), 0, n)\n}\nexports.mallocUint32 = mallocUint32\n\nfunction mallocInt8(n) {\n return new Int8Array(mallocArrayBuffer(n), 0, n)\n}\nexports.mallocInt8 = mallocInt8\n\nfunction mallocInt16(n) {\n return new Int16Array(mallocArrayBuffer(2*n), 0, n)\n}\nexports.mallocInt16 = mallocInt16\n\nfunction mallocInt32(n) {\n return new Int32Array(mallocArrayBuffer(4*n), 0, n)\n}\nexports.mallocInt32 = mallocInt32\n\nfunction mallocFloat(n) {\n return new Float32Array(mallocArrayBuffer(4*n), 0, n)\n}\nexports.mallocFloat32 = exports.mallocFloat = mallocFloat\n\nfunction mallocDouble(n) {\n return new Float64Array(mallocArrayBuffer(8*n), 0, n)\n}\nexports.mallocFloat64 = exports.mallocDouble = mallocDouble\n\nfunction mallocUint8Clamped(n) {\n if(hasUint8C) {\n return new Uint8ClampedArray(mallocArrayBuffer(n), 0, n)\n } else {\n return mallocUint8(n)\n }\n}\nexports.mallocUint8Clamped = mallocUint8Clamped\n\nfunction mallocDataView(n) {\n return new DataView(mallocArrayBuffer(n), 0, n)\n}\nexports.mallocDataView = mallocDataView\n\nfunction mallocBuffer(n) {\n n = bits.nextPow2(n)\n var log_n = bits.log2(n)\n var cache = BUFFER[log_n]\n if(cache.length > 0) {\n return cache.pop()\n }\n return new Buffer(n)\n}\nexports.mallocBuffer = mallocBuffer\n\nexports.clearCache = function clearCache() {\n for(var i=0; i<32; ++i) {\n POOL.UINT8[i].length = 0\n POOL.UINT16[i].length = 0\n POOL.UINT32[i].length = 0\n POOL.INT8[i].length = 0\n POOL.INT16[i].length = 0\n POOL.INT32[i].length = 0\n POOL.FLOAT[i].length = 0\n POOL.DOUBLE[i].length = 0\n POOL.UINT8C[i].length = 0\n DATA[i].length = 0\n BUFFER[i].length = 0\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayUnsqueeze = _interopRequireDefault(require(\"ndarray-unsqueeze\"));\n\nvar _ndarrayTile = _interopRequireDefault(require(\"ndarray-tile\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst programSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n outColor = texture(x, vec2(outTex.x, 0));\\n}\\n\";\n\nclass RepeatVector extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'RepeatVector';\n const {\n n = 1\n } = attrs;\n this.n = n;\n this.description = `n = ${n}`;\n\n if (this.gpu) {\n this.program = _WebGL.webgl2.compileProgram(programSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (x.tensor.shape.length !== 1) {\n this.throwError('Only 1D tensor inputs allowed.');\n }\n\n this.output = new _Tensor.default([], [this.n, x.tensor.shape[1]]);\n this.output.tensor = (0, _ndarrayTile.default)((0, _ndarrayUnsqueeze.default)(x.tensor, 0), [this.n, 1]);\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], [this.n, x.glTextureShape[1]]);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.program,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = RepeatVector;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Dense\", {\n enumerable: true,\n get: function () {\n return _Dense.default;\n }\n});\nObject.defineProperty(exports, \"Activation\", {\n enumerable: true,\n get: function () {\n return _Activation.default;\n }\n});\nObject.defineProperty(exports, \"Dropout\", {\n enumerable: true,\n get: function () {\n return _Dropout.default;\n }\n});\nObject.defineProperty(exports, \"SpatialDropout1D\", {\n enumerable: true,\n get: function () {\n return _SpatialDropout1D.default;\n }\n});\nObject.defineProperty(exports, \"SpatialDropout2D\", {\n enumerable: true,\n get: function () {\n return _SpatialDropout2D.default;\n }\n});\nObject.defineProperty(exports, \"SpatialDropout3D\", {\n enumerable: true,\n get: function () {\n return _SpatialDropout3D.default;\n }\n});\nObject.defineProperty(exports, \"Flatten\", {\n enumerable: true,\n get: function () {\n return _Flatten.default;\n }\n});\nObject.defineProperty(exports, \"Reshape\", {\n enumerable: true,\n get: function () {\n return _Reshape.default;\n }\n});\nObject.defineProperty(exports, \"Permute\", {\n enumerable: true,\n get: function () {\n return _Permute.default;\n }\n});\nObject.defineProperty(exports, \"RepeatVector\", {\n enumerable: true,\n get: function () {\n return _RepeatVector.default;\n }\n});\n\nvar _Dense = _interopRequireDefault(require(\"./Dense\"));\n\nvar _Activation = _interopRequireDefault(require(\"./Activation\"));\n\nvar _Dropout = _interopRequireDefault(require(\"./Dropout\"));\n\nvar _SpatialDropout1D = _interopRequireDefault(require(\"./SpatialDropout1D\"));\n\nvar _SpatialDropout2D = _interopRequireDefault(require(\"./SpatialDropout2D\"));\n\nvar _SpatialDropout3D = _interopRequireDefault(require(\"./SpatialDropout3D\"));\n\nvar _Flatten = _interopRequireDefault(require(\"./Flatten\"));\n\nvar _Reshape = _interopRequireDefault(require(\"./Reshape\"));\n\nvar _Permute = _interopRequireDefault(require(\"./Permute\"));\n\nvar _RepeatVector = _interopRequireDefault(require(\"./RepeatVector\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst programSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform sampler2D embeddings;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 x_size = textureSize(x, 0);\\n ivec2 embeddings_size = textureSize(embeddings, 0);\\n int out_x = int(float(embeddings_size[0]) * outTex.x);\\n int out_y = int(float(x_size[0]) * outTex.y);\\n\\n int index = int(texelFetch(x, ivec2(out_y, 0), 0).r);\\n outColor = texelFetch(embeddings, ivec2(out_x, index), 0);\\n}\\n\";\n\nclass Embedding extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Embedding';\n const {\n input_dim = 1,\n output_dim = 1,\n input_length = 0,\n mask_zero = false\n } = attrs;\n this.description = `output dimensions: ${output_dim}`;\n this.inputDim = input_dim;\n this.outputDim = output_dim;\n this.inputLength = input_length;\n this.maskZero = mask_zero;\n this.params = ['embeddings'];\n\n if (this.gpu) {\n this.program = _WebGL.webgl2.compileProgram(programSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.output = new _Tensor.default([], [x.tensor.shape[0], this.weights['embeddings'].tensor.shape[1]]);\n\n for (let i = 0, len = x.tensor.shape[0]; i < len; i++) {\n _ndarrayOps.default.assign(this.output.tensor.pick(i, null), this.weights['embeddings'].tensor.pick(x.tensor.get(i), null));\n }\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], [x.glTextureShape[1], this.weights['embeddings'].glTextureShape[1]]);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.program,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.weights['embeddings'],\n name: 'embeddings'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = Embedding;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Embedding\", {\n enumerable: true,\n get: function () {\n return _Embedding.default;\n }\n});\n\nvar _Embedding = _interopRequireDefault(require(\"./Embedding\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _range2 = _interopRequireDefault(require(\"lodash/range\"));\n\nvar _isEqual2 = _interopRequireDefault(require(\"lodash/isEqual\"));\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass _Merge extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = '_Merge';\n this.isMergeLayer = true;\n }\n\n call(inputs) {\n if (this.gpu) {\n this._callGPU(inputs);\n } else {\n const valid = this._validateInputs(inputs);\n\n if (!valid) {\n this.throwError('Invalid inputs to call method.');\n }\n\n this._callCPU(inputs);\n }\n\n return this.output;\n }\n\n _validateInputs(inputs) {\n const shapes = inputs.map(x => x.tensor.shape.slice());\n\n if (['sum', 'diff', 'mul', 'ave', 'max', 'min'].indexOf(this.mode) > -1) {\n if (!shapes.every(shape => (0, _isEqual2.default)(shape, shapes[0]))) {\n this.throwError(`All input shapes must be the same for mode ${this.mode}.`);\n }\n }\n\n if (this.mode === 'dot') {\n if (inputs.length !== 2) {\n this.throwError(`Exactly 2 inputs required for mode ${this.mode}.`);\n }\n\n if (this.dotAxes[0] < 0) {\n this.dotAxes[0] = shapes[0].length + this.dotAxes[0];\n }\n\n if (this.dotAxes[1] < 0) {\n this.dotAxes[1] = shapes[1].length + this.dotAxes[1];\n }\n\n if (shapes[0][this.dotAxes[0]] !== shapes[1][this.dotAxes[1]]) {\n this.throwError('Dimensions incompatibility using dot mode.');\n }\n } else if (this.mode === 'concat') {\n let nonConcatShapes = shapes.slice();\n\n let _concatAxis = this.concatAxis < 0 ? nonConcatShapes[0].length + this.concatAxis : this.concatAxis;\n\n if (this.concatAxis === 0) _concatAxis = 0;\n (0, _range2.default)(nonConcatShapes.length).forEach(i => {\n nonConcatShapes[i].splice(_concatAxis, 1);\n });\n\n if (!nonConcatShapes.every(shape => (0, _isEqual2.default)(shape, nonConcatShapes[0]))) {\n this.throwError('In concat mode, all shapes must be the same except along the concat axis.');\n }\n }\n\n return true;\n }\n\n _callCPU() {}\n\n _callGPU(inputs) {\n inputs.forEach(input => {\n if (!input.glTexture && !input.glTextureFragments) {\n input.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n });\n\n if (!this.output) {\n this.output = new _Tensor.default([], inputs[0].glTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n\n if (inputs[0].is1D) {\n this.output.is1D = inputs[0].is1D;\n } else if (inputs[0].is2DReshaped || inputs[0].is2DSquareReshaped) {\n if (inputs[0].is2DReshaped) {\n this.output.is2DReshaped = inputs[0].is2DReshaped;\n } else if (inputs[0].is2DSquareReshaped) {\n this.output.is2DSquareReshaped = inputs[0].is2DSquareReshaped;\n }\n\n this.output.originalShape = inputs[0].originalShape.slice();\n this.output.indicesForReshaped = inputs[0].indicesForReshaped;\n }\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mergeProgram,\n output: this.output,\n inputs: inputs.map((input, i) => ({\n input,\n name: `inputs[${i}]`\n })),\n supportsTextureFragments: true\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = _Merge;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Merge2 = _interopRequireDefault(require(\"./_Merge\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Add extends _Merge2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Add';\n this.mode = 'sum';\n }\n\n _callCPU(inputs) {\n const outputShape = inputs[0].tensor.shape.slice();\n this.output = new _Tensor.default([], outputShape);\n\n for (let i = 0; i < inputs.length; i++) {\n _ndarrayOps.default.addeq(this.output.tensor, inputs[i].tensor);\n }\n }\n\n _callGPU(inputs) {\n if (!this.mergeProgram) {\n const shape = inputs[0].glTextureFragments ? inputs[0].glTextureFragmentShape : inputs[0].glTextureShape;\n const mergeProgramSource = (0, _createGLSLProgram.default)('add', inputs.length, shape);\n this.mergeProgram = _WebGL.webgl2.compileProgram(mergeProgramSource);\n }\n\n super._callGPU(inputs);\n }\n\n}\n\nexports.default = Add;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Merge2 = _interopRequireDefault(require(\"./_Merge\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Subtract extends _Merge2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Subtract';\n this.mode = 'diff';\n }\n\n _callCPU(inputs) {\n if (inputs.length !== 2) {\n this.throwError('Inputs should be an array of 2 Tensors.');\n }\n\n const outputShape = inputs[0].tensor.shape.slice();\n this.output = new _Tensor.default([], outputShape);\n\n _ndarrayOps.default.sub(this.output.tensor, inputs[0].tensor, inputs[1].tensor);\n }\n\n _callGPU(inputs) {\n if (!this.mergeProgram) {\n const shape = inputs[0].glTextureFragments ? inputs[0].glTextureFragmentShape : inputs[0].glTextureShape;\n const mergeProgramSource = (0, _createGLSLProgram.default)('subtract', inputs.length, shape);\n this.mergeProgram = _WebGL.webgl2.compileProgram(mergeProgramSource);\n }\n\n super._callGPU(inputs);\n }\n\n}\n\nexports.default = Subtract;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Merge2 = _interopRequireDefault(require(\"./_Merge\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Multiply extends _Merge2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Multiply';\n this.mode = 'mul';\n }\n\n _callCPU(inputs) {\n const outputShape = inputs[0].tensor.shape.slice();\n this.output = new _Tensor.default([], outputShape);\n\n _ndarrayOps.default.assigns(this.output.tensor, 1);\n\n for (let i = 0; i < inputs.length; i++) {\n _ndarrayOps.default.muleq(this.output.tensor, inputs[i].tensor);\n }\n }\n\n _callGPU(inputs) {\n if (!this.mergeProgram) {\n const shape = inputs[0].glTextureFragments ? inputs[0].glTextureFragmentShape : inputs[0].glTextureShape;\n const mergeProgramSource = (0, _createGLSLProgram.default)('multiply', inputs.length, shape);\n this.mergeProgram = _WebGL.webgl2.compileProgram(mergeProgramSource);\n }\n\n super._callGPU(inputs);\n }\n\n}\n\nexports.default = Multiply;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Merge2 = _interopRequireDefault(require(\"./_Merge\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Average extends _Merge2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Average';\n this.mode = 'ave';\n }\n\n _callCPU(inputs) {\n const outputShape = inputs[0].tensor.shape.slice();\n this.output = new _Tensor.default([], outputShape);\n\n for (let i = 0; i < inputs.length; i++) {\n _ndarrayOps.default.addeq(this.output.tensor, inputs[i].tensor);\n }\n\n _ndarrayOps.default.divseq(this.output.tensor, inputs.length);\n }\n\n _callGPU(inputs) {\n if (!this.mergeProgram) {\n const shape = inputs[0].glTextureFragments ? inputs[0].glTextureFragmentShape : inputs[0].glTextureShape;\n const mergeProgramSource = (0, _createGLSLProgram.default)('average', inputs.length, shape);\n this.mergeProgram = _WebGL.webgl2.compileProgram(mergeProgramSource);\n }\n\n super._callGPU(inputs);\n }\n\n}\n\nexports.default = Average;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Merge2 = _interopRequireDefault(require(\"./_Merge\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Maximum extends _Merge2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Maximum';\n this.mode = 'max';\n }\n\n _callCPU(inputs) {\n const outputShape = inputs[0].tensor.shape.slice();\n this.output = new _Tensor.default([], outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor, inputs[0].tensor);\n\n for (let i = 1; i < inputs.length; i++) {\n _ndarrayOps.default.maxeq(this.output.tensor, inputs[i].tensor);\n }\n }\n\n _callGPU(inputs) {\n if (!this.mergeProgram) {\n const shape = inputs[0].glTextureFragments ? inputs[0].glTextureFragmentShape : inputs[0].glTextureShape;\n const mergeProgramSource = (0, _createGLSLProgram.default)('maximum', inputs.length, shape);\n this.mergeProgram = _WebGL.webgl2.compileProgram(mergeProgramSource);\n }\n\n super._callGPU(inputs);\n }\n\n}\n\nexports.default = Maximum;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Merge2 = _interopRequireDefault(require(\"./_Merge\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Minimum extends _Merge2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Minimum';\n this.mode = 'min';\n }\n\n _callCPU(inputs) {\n const outputShape = inputs[0].tensor.shape.slice();\n this.output = new _Tensor.default([], outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor, inputs[0].tensor);\n\n for (let i = 1; i < inputs.length; i++) {\n _ndarrayOps.default.mineq(this.output.tensor, inputs[i].tensor);\n }\n }\n\n _callGPU(inputs) {\n if (!this.mergeProgram) {\n const shape = inputs[0].glTextureFragments ? inputs[0].glTextureFragmentShape : inputs[0].glTextureShape;\n const mergeProgramSource = (0, _createGLSLProgram.default)('minimum', inputs.length, shape);\n this.mergeProgram = _WebGL.webgl2.compileProgram(mergeProgramSource);\n }\n\n super._callGPU(inputs);\n }\n\n}\n\nexports.default = Minimum;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _sum2 = _interopRequireDefault(require(\"lodash/sum\"));\n\nvar _Merge2 = _interopRequireDefault(require(\"./_Merge\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar tensorUtils = _interopRequireWildcard(require(\"../../utils/tensorUtils\"));\n\nvar _ndarrayConcatRows = _interopRequireDefault(require(\"ndarray-concat-rows\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Concatenate extends _Merge2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Concatenate';\n this.mode = 'concat';\n const {\n axis = -1\n } = attrs;\n this.concatAxis = axis <= 0 ? axis : axis - 1;\n }\n\n _callCPU(inputs) {\n const outputShape = inputs[0].tensor.shape.slice();\n\n const _concatAxis = this.concatAxis < 0 ? outputShape.length + this.concatAxis : this.concatAxis;\n\n inputs.slice(1, inputs.length).forEach(x => {\n const d = x.tensor.shape.slice()[_concatAxis];\n\n outputShape[_concatAxis] += d;\n });\n this.output = new _Tensor.default([], outputShape);\n\n if (_concatAxis === 0) {\n (0, _ndarrayConcatRows.default)(this.output.tensor, inputs.map(x => x.tensor));\n } else {\n let dimsAxisSwap = [_concatAxis];\n\n for (let i = 0; i < inputs[0].tensor.shape.length; i++) {\n if (i !== _concatAxis) dimsAxisSwap.push(i);\n }\n\n (0, _ndarrayConcatRows.default)(this.output.tensor.transpose(...dimsAxisSwap), inputs.map(x => x.tensor.transpose(...dimsAxisSwap)));\n }\n }\n\n _callGPU(inputs) {\n inputs.forEach(input => {\n if (!input.glTexture && !input.glTextureFragments) {\n input.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n });\n const outputShape = inputs[0].glTextureShape.slice();\n let _concatAxis = 1;\n\n if (inputs[0].is2DReshaped) {\n if (this.concatAxis === -1 || this.concatAxis === inputs[0].originalShape.length - 1) {\n _concatAxis = 1;\n } else {\n this.throwError('specified axis not supported for now.');\n }\n } else {\n if (this.concatAxis === -1 || this.concatAxis === 1) {\n _concatAxis = 1;\n } else if (this.concatAxis === -2 || this.concatAxis === 0) {\n _concatAxis = 0;\n } else {\n this.throwError('specified axis not supported for now.');\n }\n }\n\n outputShape[_concatAxis] = (0, _sum2.default)(inputs.map(input => input.glTextureShape[_concatAxis]));\n\n if (!this.output) {\n this.output = new _Tensor.default([], outputShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: _concatAxis === 1\n });\n\n if (inputs[0].is1D) {\n this.output.is1D = inputs[0].is1D;\n } else if (inputs[0].is2DReshaped) {\n this.output.is2DReshaped = inputs[0].is2DReshaped;\n this.output.originalShape = inputs[0].originalShape.slice();\n\n const _concatAxis = this.concatAxis < 0 ? this.output.originalShape.length + this.concatAxis : this.concatAxis;\n\n this.output.originalShape[_concatAxis] = (0, _sum2.default)(inputs.map(input => input.originalShape[_concatAxis]));\n this.output.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.output.originalShape, false, _concatAxis);\n }\n }\n\n if (!this.mergeProgram) {\n const outputShape = this.output.glTextureFragments ? this.output.glTextureFragmentShape : this.output.glTextureShape;\n const mergeProgramSource = (0, _createGLSLProgram.default)('concatenate', inputs.length, inputs.map(input => input.glTextureShape), outputShape, _concatAxis);\n this.mergeProgram = _WebGL.webgl2.compileProgram(mergeProgramSource);\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mergeProgram,\n output: this.output,\n inputs: inputs.map((input, i) => ({\n input,\n name: `inputs[${i}]`\n })),\n supportsTextureFragments: true\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = Concatenate;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Merge2 = _interopRequireDefault(require(\"./_Merge\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayGemm = _interopRequireDefault(require(\"ndarray-gemm\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mergeProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D input1;\\nuniform sampler2D input2;\\nuniform int rows;\\nuniform int cols;\\nuniform int dotAxis1;\\nuniform int dotAxis2;\\nuniform int commonDim;\\nuniform bool normalize;\\nout vec4 outColor;\\n\\nvoid main() {\\n int out_x = int(float(cols) * outTex.x);\\n int out_y = int(float(rows) * outTex.y);\\n\\n float sum = 0.;\\n float a = 0.;\\n float b = 0.;\\n float norm1 = 0.;\\n float norm2 = 0.;\\n\\n for (int i = 0; i < commonDim; ++i) {\\n if (dotAxis1 == 0 && dotAxis2 == 0) {\\n a = texelFetch(input1, ivec2(out_y, i), 0).r;\\n b = texelFetch(input2, ivec2(out_x, i), 0).r;\\n } else if (dotAxis1 == 1 && dotAxis2 == 1) {\\n a = texelFetch(input1, ivec2(i, out_y), 0).r;\\n b = texelFetch(input2, ivec2(i, out_x), 0).r;\\n }\\n\\n sum += a * b;\\n\\n if (normalize) {\\n norm1 += a * a;\\n norm2 += b * b;\\n }\\n }\\n\\n if (normalize) {\\n sum /= sqrt(norm1) * sqrt(norm2);\\n }\\n\\n outColor = vec4(sum);\\n}\\n\";\n\nclass Dot extends _Merge2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Dot';\n this.mode = 'dot';\n const {\n axes = -1,\n normalize = false\n } = attrs;\n\n if (Array.isArray(axes)) {\n this.dotAxes = [axes[0] <= 0 ? axes[0] : axes[0] - 1, axes[1] <= 0 ? axes[1] : axes[1] - 1];\n } else {\n this.dotAxes = [axes <= 0 ? axes : axes - 1, axes <= 0 ? axes : axes - 1];\n }\n\n this.normalize = normalize;\n\n if (this.gpu) {\n this.mergeProgram = _WebGL.webgl2.compileProgram(mergeProgramSource);\n }\n }\n\n _calcOutputShape(inputShapes) {\n let shape1 = inputShapes[0].slice();\n let shape2 = inputShapes[1].slice();\n shape1.splice(this.dotAxes[0], 1);\n shape2.splice(this.dotAxes[1], 1);\n this.outputShape = shape1.concat(shape2);\n\n if (this.outputShape.length === 1) {\n this.outputShape.push(1);\n }\n }\n\n _callCPU(inputs) {\n this._calcOutputShape([inputs[0].tensor.shape, inputs[1].tensor.shape]);\n\n this.output = new _Tensor.default([], this.outputShape);\n\n if (inputs[0].tensor.shape.length === 2 && inputs[1].tensor.shape.length === 2) {\n if (this.dotAxes[0] === 0 && this.dotAxes[1] === 0) {\n if (this.normalize) {\n for (let i = 0; i < inputs[0].tensor.shape[1]; i++) {\n _ndarrayOps.default.divseq(inputs[0].tensor.pick(null, i), _ndarrayOps.default.norm2(inputs[0].tensor.pick(null, i)));\n }\n\n for (let i = 0; i < inputs[1].tensor.shape[1]; i++) {\n _ndarrayOps.default.divseq(inputs[1].tensor.pick(null, i), _ndarrayOps.default.norm2(inputs[1].tensor.pick(null, i)));\n }\n }\n\n (0, _ndarrayGemm.default)(this.output.tensor, inputs[0].tensor.transpose(1, 0), inputs[1].tensor);\n } else if (this.dotAxes[0] === 1 && this.dotAxes[1] === 1) {\n if (this.normalize) {\n for (let i = 0; i < inputs[0].tensor.shape[0]; i++) {\n _ndarrayOps.default.divseq(inputs[0].tensor.pick(i, null), _ndarrayOps.default.norm2(inputs[0].tensor.pick(i, null)));\n }\n\n for (let i = 0; i < inputs[1].tensor.shape[0]; i++) {\n _ndarrayOps.default.divseq(inputs[1].tensor.pick(i, null), _ndarrayOps.default.norm2(inputs[1].tensor.pick(i, null)));\n }\n }\n\n (0, _ndarrayGemm.default)(this.output.tensor, inputs[0].tensor, inputs[1].tensor.transpose(1, 0));\n }\n } else {\n this.throwError('dot mode for 3+ dim tensors not yet implemented.');\n }\n }\n\n _callGPU(inputs) {\n inputs.forEach(input => {\n if (!input.glTexture && !input.glTextureFragments) {\n input.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n });\n\n this._calcOutputShape([inputs[0].glTextureShape, inputs[1].glTextureShape]);\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const commonDim = inputs[0].glTextureShape[this.dotAxes[0]];\n\n _WebGL.webgl2.runProgram({\n program: this.mergeProgram,\n output: this.output,\n inputs: [{\n input: inputs[0],\n name: 'input1'\n }, {\n input: inputs[1],\n name: 'input2'\n }],\n uniforms: [{\n value: this.output.glTextureShape[0],\n type: 'int',\n name: 'rows'\n }, {\n value: this.output.glTextureShape[1],\n type: 'int',\n name: 'cols'\n }, {\n value: this.dotAxes[0],\n type: 'int',\n name: 'dotAxis1'\n }, {\n value: this.dotAxes[1],\n type: 'int',\n name: 'dotAxis2'\n }, {\n value: commonDim,\n type: 'int',\n name: 'commonDim'\n }, {\n value: +this.normalize,\n type: 'bool',\n name: 'normalize'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = Dot;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Add\", {\n enumerable: true,\n get: function () {\n return _Add.default;\n }\n});\nObject.defineProperty(exports, \"Subtract\", {\n enumerable: true,\n get: function () {\n return _Subtract.default;\n }\n});\nObject.defineProperty(exports, \"Multiply\", {\n enumerable: true,\n get: function () {\n return _Multiply.default;\n }\n});\nObject.defineProperty(exports, \"Average\", {\n enumerable: true,\n get: function () {\n return _Average.default;\n }\n});\nObject.defineProperty(exports, \"Maximum\", {\n enumerable: true,\n get: function () {\n return _Maximum.default;\n }\n});\nObject.defineProperty(exports, \"Minimum\", {\n enumerable: true,\n get: function () {\n return _Minimum.default;\n }\n});\nObject.defineProperty(exports, \"Concatenate\", {\n enumerable: true,\n get: function () {\n return _Concatenate.default;\n }\n});\nObject.defineProperty(exports, \"Dot\", {\n enumerable: true,\n get: function () {\n return _Dot.default;\n }\n});\n\nvar _Add = _interopRequireDefault(require(\"./Add\"));\n\nvar _Subtract = _interopRequireDefault(require(\"./Subtract\"));\n\nvar _Multiply = _interopRequireDefault(require(\"./Multiply\"));\n\nvar _Average = _interopRequireDefault(require(\"./Average\"));\n\nvar _Maximum = _interopRequireDefault(require(\"./Maximum\"));\n\nvar _Minimum = _interopRequireDefault(require(\"./Minimum\"));\n\nvar _Concatenate = _interopRequireDefault(require(\"./Concatenate\"));\n\nvar _Dot = _interopRequireDefault(require(\"./Dot\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass GaussianDropout extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'GaussianDropout';\n const {\n rate = 0.5\n } = attrs;\n this.rate = Math.min(Math.max(0, rate), 1);\n }\n\n call(x) {\n this.output = x;\n return this.output;\n }\n\n}\n\nexports.default = GaussianDropout;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass GaussianNoise extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'GaussianNoise';\n const {\n stddev = 0\n } = attrs;\n this.stddev = stddev;\n }\n\n call(x) {\n this.output = x;\n return this.output;\n }\n\n}\n\nexports.default = GaussianNoise;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"GaussianDropout\", {\n enumerable: true,\n get: function () {\n return _GaussianDropout.default;\n }\n});\nObject.defineProperty(exports, \"GaussianNoise\", {\n enumerable: true,\n get: function () {\n return _GaussianNoise.default;\n }\n});\n\nvar _GaussianDropout = _interopRequireDefault(require(\"./GaussianDropout\"));\n\nvar _GaussianNoise = _interopRequireDefault(require(\"./GaussianNoise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst programSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D X;\\nuniform isampler2D normAxisIndexMap;\\nuniform sampler2D gamma;\\nuniform sampler2D beta;\\nuniform sampler2D mean;\\nuniform sampler2D std;\\nuniform float epsilon;\\nuniform bool scale;\\nuniform bool center;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(X, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\nint normAxisIndex = texelFetch(normAxisIndexMap, ivec2(out_x, out_y), 0).r;\\n\\n float _x = texelFetch(X, ivec2(out_x, out_y), 0).r;\\n float _mean = texelFetch(mean, ivec2(normAxisIndex, 0), 0).r;\\n float _std = texelFetch(std, ivec2(normAxisIndex, 0), 0).r;\\n\\n float _gamma = 1.0;\\n if (scale) {\\n _gamma = texelFetch(gamma, ivec2(normAxisIndex, 0), 0).r;\\n }\\n\\n float _beta = 0.0;\\n if (center) {\\n _beta = texelFetch(beta, ivec2(normAxisIndex, 0), 0).r;\\n }\\n\\n float sum = _beta + _gamma * (_x - _mean) / sqrt(_std + epsilon);\\n\\n outColor = vec4(sum);\\n}\\n\";\n\nclass BatchNormalization extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'BatchNormalization';\n const {\n epsilon = 0.001,\n axis = -1,\n center = true,\n scale = true\n } = attrs;\n this.epsilon = epsilon;\n this.center = center;\n this.scale = scale;\n this.axis = axis;\n this.axisNormalized = false;\n this.params = [];\n\n if (this.scale) {\n this.params.push('gamma');\n }\n\n if (this.center) {\n this.params.push('beta');\n }\n\n this.params = this.params.concat(['moving_mean', 'moving_variance']);\n\n if (this.gpu) {\n this.program = _WebGL.webgl2.compileProgram(programSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (!this.axisNormalized) {\n this.axis = this.axis < 0 ? x.tensor.shape.length + this.axis : this.axis - 1;\n this.axisNormalized = true;\n }\n\n let broadcast = [];\n\n for (let d = 0; d < x.tensor.shape.length; d++) {\n if (d === this.axis) broadcast.push(1);else broadcast.push(null);\n }\n\n let _gamma = new _Tensor.default([], x.tensor.shape);\n\n let _beta = new _Tensor.default([], x.tensor.shape);\n\n for (let i = 0; i < x.tensor.shape[this.axis]; i++) {\n broadcast[this.axis] = i;\n\n if (this.scale) {\n _ndarrayOps.default.assigns(_gamma.tensor.pick(...broadcast), this.weights['gamma'].tensor.get(i));\n }\n\n if (this.center) {\n _ndarrayOps.default.assigns(_beta.tensor.pick(...broadcast), this.weights['beta'].tensor.get(i));\n }\n }\n\n let _mean = new _Tensor.default([], x.tensor.shape);\n\n let _std = new _Tensor.default([], x.tensor.shape);\n\n for (let i = 0; i < x.tensor.shape[this.axis]; i++) {\n broadcast[this.axis] = i;\n\n _ndarrayOps.default.assigns(_mean.tensor.pick(...broadcast), this.weights['moving_mean'].tensor.get(i));\n\n _ndarrayOps.default.assigns(_std.tensor.pick(...broadcast), this.weights['moving_variance'].tensor.get(i) + this.epsilon);\n }\n\n _ndarrayOps.default.sqrteq(_std.tensor);\n\n this.output = new _Tensor.default(x.tensor.data, x.tensor.shape);\n\n _ndarrayOps.default.subeq(this.output.tensor, _mean.tensor);\n\n _ndarrayOps.default.diveq(this.output.tensor, _std.tensor);\n\n if (this.scale) {\n _ndarrayOps.default.muleq(this.output.tensor, _gamma.tensor);\n }\n\n if (this.center) {\n _ndarrayOps.default.addeq(this.output.tensor, _beta.tensor);\n }\n }\n\n _createIndexMap(glTextureShape, indicesForReshaped) {\n if (this.normAxisIndexMap) {\n return;\n }\n\n const _normAxisIndexMap = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n\n this.normAxisIndexMap = new _Tensor.default([], glTextureShape, {\n type: Int32Array\n });\n const slice = Array(this.inputShape.length).fill(null);\n\n for (let i = 0; i < this.inputShape[this.axis]; i++) {\n slice[this.axis] = i;\n\n _ndarrayOps.default.assigns(_normAxisIndexMap.tensor.pick(...slice), i);\n }\n\n if (indicesForReshaped) {\n for (let i = 0; i < indicesForReshaped.data.length; i++) {\n this.normAxisIndexMap.tensor.data[indicesForReshaped.data[i]] = _normAxisIndexMap.tensor.data[i];\n }\n } else {\n this.normAxisIndexMap = _normAxisIndexMap;\n }\n\n this.normAxisIndexMap.createGLTexture({\n type: '2d',\n format: 'int',\n supportsTextureFragments: true\n });\n }\n\n _callGPU(x) {\n if (!this.axisNormalized) {\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n } else {\n this.inputShape = x.tensor.shape;\n }\n\n this.axis = this.axis < 0 ? this.inputShape.length + this.axis : this.axis - 1;\n this.axisNormalized = true;\n }\n\n if (!x.glTexture && !x.glTextureFragments) {\n if (x.tensor.shape.length <= 2) {\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n } else if (x.tensor.shape.length > 2 && !x.is2DReshaped) {\n x.reshapeTo2DSquare();\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n }\n\n this._createIndexMap(x.glTextureShape, x.indicesForReshaped);\n\n if (!this.output) {\n this.output = new _Tensor.default([], x.glTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n\n if (x.is1D) {\n this.output.is1D = x.is1D;\n } else if (x.is2DReshaped || x.is2DSquareReshaped) {\n if (x.is2DReshaped) {\n this.output.is2DReshaped = x.is2DReshaped;\n } else if (x.is2DSquareReshaped) {\n this.output.is2DSquareReshaped = x.is2DSquareReshaped;\n }\n\n this.output.originalShape = x.originalShape;\n this.output.indicesForReshaped = x.indicesForReshaped;\n }\n }\n\n const programInputs = [{\n input: x,\n name: 'X'\n }, {\n input: this.normAxisIndexMap,\n name: 'normAxisIndexMap'\n }];\n\n if (this.scale) {\n programInputs.push({\n input: this.weights['gamma'],\n name: 'gamma'\n });\n }\n\n if (this.center) {\n programInputs.push({\n input: this.weights['beta'],\n name: 'beta'\n });\n }\n\n programInputs.push({\n input: this.weights['moving_mean'],\n name: 'mean'\n });\n programInputs.push({\n input: this.weights['moving_variance'],\n name: 'std'\n });\n const programUniforms = [{\n value: this.epsilon,\n type: 'float',\n name: 'epsilon'\n }, {\n value: +this.scale,\n type: 'bool',\n name: 'scale'\n }, {\n value: +this.center,\n type: 'bool',\n name: 'center'\n }];\n\n _WebGL.webgl2.runProgram({\n program: this.program,\n output: this.output,\n inputs: programInputs,\n uniforms: programUniforms,\n supportsTextureFragments: true\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = BatchNormalization;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"BatchNormalization\", {\n enumerable: true,\n get: function () {\n return _BatchNormalization.default;\n }\n});\n\nvar _BatchNormalization = _interopRequireDefault(require(\"./BatchNormalization\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst poolingProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D poolIndexMap;\\nuniform int channels;\\nuniform int poolSize;\\nuniform bool isMaxPooling;\\nout vec4 outColor;\\n\\nvoid main() {\\n int out_x = int(float(channels) * outTex.x);\\n int out_y = int(float(textureSize(poolIndexMap, 0)[1]) * outTex.y);\\n\\n float val = 0.;\\n int count = 0;\\n for (int i = 0; i < poolSize; ++i) {\\n int poolIndex = texelFetch(poolIndexMap, ivec2(i, out_y), 0).r;\\n if (poolIndex != -1) {\\n float val2 = texelFetch(x, ivec2(out_x, poolIndex), 0).r;\\n if (isMaxPooling) {\\n if (count == 0 || val2 > val) {\\n val = val2;\\n }\\n } else {\\n val += val2;\\n }\\n count += 1;\\n }\\n }\\n\\n if (!isMaxPooling) {\\n val /= float(count);\\n }\\n\\n outColor = vec4(val);\\n}\\n\";\nconst poolingFragmentsProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D poolIndexMap;\\nuniform int channels;\\nuniform int poolSize;\\nuniform bool isMaxPooling;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 inputSize = textureSize(x, 0);\\n ivec2 outputSize = textureSize(poolIndexMap, 0);\\n int out_x = int(float(channels) * outTex.x);\\n int out_y = int(float(outputSize[1]) * outTex.y);\\n\\n float val = 0.;\\n int count = 0;\\n for (int i = 0; i < poolSize; ++i) {\\n int poolIndex = texelFetch(poolIndexMap, ivec2(i, out_y), 0).r;\\n int fragmentIndex = int(floor(float(poolIndex) / float(inputSize[1])));\\n if (poolIndex != -1) {\\n poolIndex = int(mod(float(poolIndex), float(inputSize[1])));\\n float val2 = texelFetch(x, ivec2(fragmentIndex * channels + out_x, poolIndex), 0).r;\\n if (isMaxPooling) {\\n if (count == 0 || val2 > val) {\\n val = val2;\\n }\\n } else {\\n val += val2;\\n }\\n count += 1;\\n }\\n }\\n\\n if (!isMaxPooling) {\\n val /= float(count);\\n }\\n\\n outColor = vec4(val);\\n}\\n\";\n\nclass _Pooling1D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = '_Pooling1D';\n const {\n pool_size = 2,\n strides = null,\n padding = 'valid'\n } = attrs;\n this.poolSize = pool_size;\n this.strides = strides === null ? this.poolSize : strides;\n this.padding = padding;\n this.poolingFunc = 'max';\n this.description = `pool size ${this.poolSize}`;\n this.description += this.strides > 1 ? `, striding ${this.strides} striding` : '';\n this.description += this.padding === 'valid' ? `, no border padding` : ', pad to same borders';\n\n if (this.gpu) {\n this.poolingProgram = _WebGL.webgl2.compileProgram(poolingProgramSource);\n this.poolingFragmentsProgram = _WebGL.webgl2.compileProgram(poolingFragmentsProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n const stepsNew = this.padding === 'valid' ? Math.floor((x.tensor.shape[0] - this.poolSize + this.strides) / this.strides) : Math.floor((x.tensor.shape[0] + this.strides - 1) / this.strides);\n this.output = new _Tensor.default([], [stepsNew, x.tensor.shape[1]]);\n const outputStep = new _Tensor.default([], [x.tensor.shape[1]]);\n let step = this.padding === 'valid' ? 0 : Math.min(0, Math.ceil((x.tensor.shape[0] - (stepsNew - 1) * this.strides - this.poolSize) / 2));\n\n for (let i = 0; i < stepsNew; i++) {\n let _step = Math.max(0, step);\n\n let limit = this.poolSize + Math.min(0, step);\n\n _ndarrayOps.default.assign(outputStep.tensor, x.tensor.pick(_step, null));\n\n let count = 1;\n\n for (let j = 1; j < limit; j++) {\n if (_step + j > x.tensor.shape[0] - 1) {\n break;\n }\n\n if (this.poolingFunc === 'max') {\n _ndarrayOps.default.maxeq(outputStep.tensor, x.tensor.pick(_step + j, null));\n } else if (this.poolingFunc === 'average') {\n _ndarrayOps.default.addeq(outputStep.tensor, x.tensor.pick(_step + j, null));\n }\n\n count += 1;\n }\n\n if (this.poolingFunc === 'average') {\n _ndarrayOps.default.divseq(outputStep.tensor, count);\n }\n\n _ndarrayOps.default.assign(this.output.tensor.pick(i, null), outputStep.tensor);\n\n step += this.strides;\n }\n }\n\n _createIndexMap() {\n if (this.poolIndexMap) {\n return;\n }\n\n const stepsNew = this.padding === 'valid' ? Math.floor((this.inputShape[0] - this.poolSize + this.strides) / this.strides) : Math.floor((this.inputShape[0] + this.strides - 1) / this.strides);\n this.outputShape = [stepsNew, this.inputShape[1]];\n this.poolIndexMap = new _Tensor.default([], [stepsNew, this.poolSize], {\n type: Int32Array\n });\n\n _ndarrayOps.default.assigns(this.poolIndexMap.tensor, -1);\n\n let step = this.padding === 'valid' ? 0 : Math.min(0, Math.ceil((this.inputShape[0] - (stepsNew - 1) * this.strides - this.poolSize) / 2));\n\n for (let i = 0; i < stepsNew; i++) {\n let _step = Math.max(0, step);\n\n let limit = this.poolSize + Math.min(0, step);\n let inputIndex = _step;\n this.poolIndexMap.tensor.set(i, 0, inputIndex);\n\n for (let j = 1; j < limit; j++) {\n inputIndex = _step + j;\n\n if (inputIndex <= this.inputShape[0] - 1) {\n this.poolIndexMap.tensor.set(i, j, inputIndex);\n } else {\n break;\n }\n }\n\n step += this.strides;\n }\n\n this.poolIndexMap.createGLTexture({\n type: '2d',\n format: 'int',\n supportsTextureFragments: true\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture && !x.glTextureFragments) {\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n this.inputShape = x.tensor.shape;\n\n this._createIndexMap();\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n const isMaxPooling = this.poolingFunc === 'max';\n const programUniforms = [{\n value: this.output.glTextureShape[1],\n type: 'int',\n name: 'channels'\n }, {\n value: this.poolSize,\n type: 'int',\n name: 'poolSize'\n }, {\n value: +isMaxPooling,\n type: 'bool',\n name: 'isMaxPooling'\n }];\n\n if (x.glTextureFragments) {\n x.convert2DRowFragmentedGLTextureToColStack();\n\n _WebGL.webgl2.runProgram({\n program: this.poolingFragmentsProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.poolIndexMap,\n name: 'poolIndexMap'\n }],\n uniforms: programUniforms,\n supportsTextureFragments: true\n });\n\n x.removeGLTextureFragmentsAsColStack();\n } else {\n _WebGL.webgl2.runProgram({\n program: this.poolingProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.poolIndexMap,\n name: 'poolIndexMap'\n }],\n uniforms: programUniforms,\n supportsTextureFragments: true\n });\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = _Pooling1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Pooling1D2 = _interopRequireDefault(require(\"./_Pooling1D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass MaxPooling1D extends _Pooling1D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'MaxPooling1D';\n this.poolingFunc = 'max';\n }\n\n}\n\nexports.default = MaxPooling1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar tensorUtils = _interopRequireWildcard(require(\"../../utils/tensorUtils\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst poolingProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D poolIndexMap;\\nuniform int channels;\\nuniform int poolSize;\\nuniform bool isMaxPooling;\\nout vec4 outColor;\\n\\nvoid main() {\\n int out_x = int(float(channels) * outTex.x);\\n int out_y = int(float(textureSize(poolIndexMap, 0)[1]) * outTex.y);\\n\\n float val = 0.;\\n int count = 0;\\n for (int i = 0; i < poolSize; ++i) {\\n int poolIndex = texelFetch(poolIndexMap, ivec2(i, out_y), 0).r;\\n if (poolIndex != -1) {\\n float val2 = texelFetch(x, ivec2(out_x, poolIndex), 0).r;\\n if (isMaxPooling) {\\n if (count == 0 || val2 > val) {\\n val = val2;\\n }\\n } else {\\n val += val2;\\n }\\n count += 1;\\n }\\n }\\n\\n if (!isMaxPooling) {\\n val /= float(count);\\n }\\n\\n outColor = vec4(val);\\n}\\n\";\nconst poolingFragmentsProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D poolIndexMap;\\nuniform int channels;\\nuniform int poolSize;\\nuniform bool isMaxPooling;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 inputSize = textureSize(x, 0);\\n ivec2 outputSize = textureSize(poolIndexMap, 0);\\n int out_x = int(float(channels) * outTex.x);\\n int out_y = int(float(outputSize[1]) * outTex.y);\\n\\n float val = 0.;\\n int count = 0;\\n for (int i = 0; i < poolSize; ++i) {\\n int poolIndex = texelFetch(poolIndexMap, ivec2(i, out_y), 0).r;\\n int fragmentIndex = int(floor(float(poolIndex) / float(inputSize[1])));\\n if (poolIndex != -1) {\\n poolIndex = int(mod(float(poolIndex), float(inputSize[1])));\\n float val2 = texelFetch(x, ivec2(fragmentIndex * channels + out_x, poolIndex), 0).r;\\n if (isMaxPooling) {\\n if (count == 0 || val2 > val) {\\n val = val2;\\n }\\n } else {\\n val += val2;\\n }\\n count += 1;\\n }\\n }\\n\\n if (!isMaxPooling) {\\n val /= float(count);\\n }\\n\\n outColor = vec4(val);\\n}\\n\";\n\nclass _Pooling2D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = '_Pooling2D';\n const {\n pool_size = [2, 2],\n strides = null,\n padding = 'valid',\n data_format = 'channels_last'\n } = attrs;\n\n if (Array.isArray(pool_size)) {\n this.poolSize = pool_size;\n } else {\n this.poolSize = [pool_size, pool_size];\n }\n\n if (Array.isArray(strides)) {\n this.strides = strides;\n } else if (strides !== null) {\n this.strides = [strides, strides];\n } else {\n this.strides = this.poolSize;\n }\n\n this.padding = padding;\n this.dataFormat = data_format;\n this.poolingFunc = 'max';\n this.description = `pool size ${this.poolSize.join('x')}`;\n this.description += this.strides.some(s => s > 1) ? `, ${this.strides.join('x')} striding` : '';\n this.description += this.padding === 'valid' ? `, no border padding` : ', pad to same borders';\n\n if (this.gpu) {\n this.poolingProgram = _WebGL.webgl2.compileProgram(poolingProgramSource);\n this.poolingFragmentsProgram = _WebGL.webgl2.compileProgram(poolingFragmentsProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _calcOutputShape(inputShape) {\n if (this.outputShape && this.inputPadding) {\n return;\n }\n\n const [inputRows, inputCols, inputChannels] = inputShape;\n const [nbRow, nbCol] = this.poolSize;\n const outputRows = this.padding === 'same' ? Math.floor((inputRows + this.strides[0] - 1) / this.strides[0]) : Math.floor((inputRows - nbRow + this.strides[0]) / this.strides[0]);\n const outputCols = this.padding === 'same' ? Math.floor((inputCols + this.strides[1] - 1) / this.strides[1]) : Math.floor((inputCols - nbCol + this.strides[1]) / this.strides[1]);\n const paddingRow = this.padding === 'same' ? Math.max(0, Math.floor((outputRows - 1) * this.strides[0] + nbRow - inputRows)) : 0;\n const paddingCol = this.padding === 'same' ? Math.max(0, Math.floor((outputCols - 1) * this.strides[1] + nbCol - inputCols)) : 0;\n const paddingRowBefore = Math.floor(paddingRow / 2);\n const paddingRowAfter = paddingRow - paddingRowBefore;\n const paddingColBefore = Math.floor(paddingCol / 2);\n const paddingColAfter = paddingCol - paddingColBefore;\n this.outputShape = [outputRows, outputCols, inputChannels];\n this.inputPadding = [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter];\n }\n\n _padInput(x) {\n if (this.padding === 'same') {\n const [inputRows, inputCols, inputChannels] = x.tensor.shape;\n const [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter] = this.inputPadding;\n const newRows = inputRows + paddingRowBefore + paddingRowAfter;\n const newCols = inputCols + paddingColBefore + paddingColAfter;\n\n const _x = new _Tensor.default([], [newRows, newCols, inputChannels]);\n\n if (this.poolingFunc === 'max') {\n _ndarrayOps.default.assigns(_x.tensor, Number.NEGATIVE_INFINITY);\n }\n\n _ndarrayOps.default.assign(_x.tensor.hi(inputRows + paddingRowBefore, inputCols + paddingColBefore, inputChannels).lo(paddingRowBefore, paddingColBefore, 0), x.tensor);\n\n return _x;\n }\n\n return x;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 0);\n }\n\n this._calcOutputShape(x.tensor.shape);\n\n x = this._padInput(x);\n const [inputRows, inputCols, inputChannels] = x.tensor.shape;\n const [nbRow, nbCol] = this.poolSize;\n this.output = new _Tensor.default([], this.outputShape);\n const patch = new _Tensor.default([], [nbRow, nbCol, inputChannels]);\n const [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter] = this.inputPadding;\n\n for (let i = 0, _i = 0; i <= inputRows - nbRow; i += this.strides[0], _i++) {\n let nbRowInPadding = 0;\n\n if (i < paddingRowBefore) {\n nbRowInPadding = paddingRowBefore - i;\n } else if (i + nbRow > inputRows - paddingRowAfter) {\n nbRowInPadding = i + nbRow - (inputRows - paddingRowAfter);\n }\n\n for (let j = 0, _j = 0; j <= inputCols - nbCol; j += this.strides[1], _j++) {\n let nbColInPadding = 0;\n\n if (j < paddingColBefore) {\n nbColInPadding = paddingColBefore - j;\n } else if (j + nbCol > inputCols - paddingColAfter) {\n nbColInPadding = j + nbCol - (inputCols - paddingColAfter);\n }\n\n const nbCellsEffective = (nbRow - nbRowInPadding) * (nbCol - nbColInPadding);\n\n _ndarrayOps.default.assign(patch.tensor, x.tensor.hi(i + nbRow, j + nbCol, inputChannels).lo(i, j, 0));\n\n for (let c = 0; c < inputChannels; c++) {\n if (this.poolingFunc === 'max') {\n this.output.tensor.set(_i, _j, c, _ndarrayOps.default.sup(patch.tensor.pick(null, null, c)));\n } else if (this.poolingFunc === 'average') {\n this.output.tensor.set(_i, _j, c, _ndarrayOps.default.sum(patch.tensor.pick(null, null, c)) / nbCellsEffective);\n }\n }\n }\n }\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n\n _im2col(x) {\n const [inputRows, inputCols, inputChannels] = x.tensor.shape;\n\n if (!this.tiledInput) {\n this.tiledInput = new _Tensor.default([], [inputRows * inputCols, inputChannels]);\n }\n\n const patch = new _Tensor.default([], [inputRows, inputCols]);\n const patchRaveled = new _Tensor.default([], [inputRows * inputCols]);\n\n for (let c = 0; c < inputChannels; c++) {\n _ndarrayOps.default.assign(patch.tensor, x.tensor.pick(null, null, c));\n\n patchRaveled.replaceTensorData(patch.tensor.data);\n\n _ndarrayOps.default.assign(this.tiledInput.tensor.pick(null, c), patchRaveled.tensor);\n }\n\n return this.tiledInput;\n }\n\n _createIndexMap() {\n if (this.poolIndexMap) {\n return;\n }\n\n let inputRows = this.inputShape[0];\n let inputCols = this.inputShape[1];\n const rowIndices = new _Tensor.default([], [inputRows, inputCols]);\n let index = 0;\n\n for (let i = 0; i < inputRows; i++) {\n for (let j = 0; j < inputCols; j++) {\n rowIndices.tensor.set(i, j, index);\n index += 1;\n }\n }\n\n if (this.padding === 'same') {\n const [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter] = this.inputPadding;\n inputRows = inputRows + paddingRowBefore + paddingRowAfter;\n inputCols = inputCols + paddingColBefore + paddingColAfter;\n\n const _rowIndices = new _Tensor.default([], [inputRows, inputCols]);\n\n _ndarrayOps.default.assigns(_rowIndices.tensor, -1);\n\n _ndarrayOps.default.assign(_rowIndices.tensor.hi(this.inputShape[0] + paddingRowBefore, this.inputShape[1] + paddingColBefore).lo(paddingRowBefore, paddingColBefore), rowIndices.tensor);\n\n rowIndices.tensor = _rowIndices.tensor;\n }\n\n const [nbRow, nbCol] = this.poolSize;\n const outputRows = this.outputShape[0];\n const outputCols = this.outputShape[1];\n this.poolIndexMap = new _Tensor.default([], [outputRows * outputCols, nbRow * nbCol], {\n type: Int32Array\n });\n const patchRow = new _Tensor.default([], [nbRow, nbCol]);\n let offset = 0;\n\n for (let i = 0, limit = inputRows - nbRow; i <= limit; i += this.strides[0]) {\n for (let j = 0, limit = inputCols - nbCol; j <= limit; j += this.strides[1]) {\n _ndarrayOps.default.assign(patchRow.tensor, rowIndices.tensor.hi(i + nbRow, j + nbCol).lo(i, j));\n\n this.poolIndexMap.tensor.data.set(patchRow.tensor.data, offset);\n offset += nbRow * nbCol;\n }\n }\n\n this.poolIndexMap.createGLTexture({\n type: '2d',\n format: 'int',\n supportsTextureFragments: true\n });\n }\n\n _callGPU(x) {\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n } else {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 0);\n }\n\n this.inputShape = x.tensor.shape;\n\n this._im2col(x);\n\n this.tiledInput.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n this._calcOutputShape(this.inputShape);\n\n this._createIndexMap();\n\n if (!this.output) {\n const [outputRows, outputCols, inputChannels] = this.outputShape;\n const outputTextureShape = [outputRows * outputCols, inputChannels];\n this.output = new _Tensor.default([], outputTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.output.is2DReshaped = true;\n this.output.originalShape = this.outputShape;\n this.output.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.outputShape, false, -1);\n }\n\n const input = x.is2DReshaped || x.is2DSquareReshaped ? x : this.tiledInput;\n const poolSize = this.poolSize[0] * this.poolSize[1];\n const isMaxPooling = this.poolingFunc === 'max';\n const programUniforms = [{\n value: this.output.glTextureShape[1],\n type: 'int',\n name: 'channels'\n }, {\n value: poolSize,\n type: 'int',\n name: 'poolSize'\n }, {\n value: +isMaxPooling,\n type: 'bool',\n name: 'isMaxPooling'\n }];\n\n if (input.glTextureFragments) {\n input.convert2DRowFragmentedGLTextureToColStack();\n\n _WebGL.webgl2.runProgram({\n program: this.poolingFragmentsProgram,\n output: this.output,\n inputs: [{\n input: input,\n name: 'x'\n }, {\n input: this.poolIndexMap,\n name: 'poolIndexMap'\n }],\n uniforms: programUniforms,\n supportsTextureFragments: true\n });\n\n input.removeGLTextureFragmentsAsColStack();\n } else {\n _WebGL.webgl2.runProgram({\n program: this.poolingProgram,\n output: this.output,\n inputs: [{\n input: input,\n name: 'x'\n }, {\n input: this.poolIndexMap,\n name: 'poolIndexMap'\n }],\n uniforms: programUniforms,\n supportsTextureFragments: true\n });\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n this.output.reshapeFrom2D();\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n }\n\n}\n\nexports.default = _Pooling2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Pooling2D2 = _interopRequireDefault(require(\"./_Pooling2D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass MaxPooling2D extends _Pooling2D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'MaxPooling2D';\n this.poolingFunc = 'max';\n }\n\n}\n\nexports.default = MaxPooling2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar tensorUtils = _interopRequireWildcard(require(\"../../utils/tensorUtils\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst poolingProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D poolIndexMap;\\nuniform int channels;\\nuniform int poolSize;\\nuniform bool isMaxPooling;\\nout vec4 outColor;\\n\\nvoid main() {\\n int out_x = int(float(channels) * outTex.x);\\n int out_y = int(float(textureSize(poolIndexMap, 0)[1]) * outTex.y);\\n\\n float val = 0.;\\n int count = 0;\\n for (int i = 0; i < poolSize; ++i) {\\n int poolIndex = texelFetch(poolIndexMap, ivec2(i, out_y), 0).r;\\n if (poolIndex != -1) {\\n float val2 = texelFetch(x, ivec2(out_x, poolIndex), 0).r;\\n if (isMaxPooling) {\\n if (count == 0 || val2 > val) {\\n val = val2;\\n }\\n } else {\\n val += val2;\\n }\\n count += 1;\\n }\\n }\\n\\n if (!isMaxPooling) {\\n val /= float(count);\\n }\\n\\n outColor = vec4(val);\\n}\\n\";\nconst poolingFragmentsProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D poolIndexMap;\\nuniform int channels;\\nuniform int poolSize;\\nuniform bool isMaxPooling;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 inputSize = textureSize(x, 0);\\n ivec2 outputSize = textureSize(poolIndexMap, 0);\\n int out_x = int(float(channels) * outTex.x);\\n int out_y = int(float(outputSize[1]) * outTex.y);\\n\\n float val = 0.;\\n int count = 0;\\n for (int i = 0; i < poolSize; ++i) {\\n int poolIndex = texelFetch(poolIndexMap, ivec2(i, out_y), 0).r;\\n int fragmentIndex = int(floor(float(poolIndex) / float(inputSize[1])));\\n if (poolIndex != -1) {\\n poolIndex = int(mod(float(poolIndex), float(inputSize[1])));\\n float val2 = texelFetch(x, ivec2(fragmentIndex * channels + out_x, poolIndex), 0).r;\\n if (isMaxPooling) {\\n if (count == 0 || val2 > val) {\\n val = val2;\\n }\\n } else {\\n val += val2;\\n }\\n count += 1;\\n }\\n }\\n\\n if (!isMaxPooling) {\\n val /= float(count);\\n }\\n\\n outColor = vec4(val);\\n}\\n\";\n\nclass _Pooling3D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = '_Pooling3D';\n const {\n pool_size = [2, 2, 2],\n strides = null,\n padding = 'valid',\n data_format = 'channels_last'\n } = attrs;\n\n if (Array.isArray(pool_size)) {\n this.poolSize = pool_size;\n } else {\n this.poolSize = [pool_size, pool_size, pool_size];\n }\n\n if (Array.isArray(strides)) {\n this.strides = strides;\n } else if (strides !== null) {\n this.strides = [strides, strides, strides];\n } else {\n this.strides = this.poolSize;\n }\n\n this.padding = padding;\n this.dataFormat = data_format;\n this.poolingFunc = 'max';\n this.description = `pool size ${this.poolSize.join('x')}`;\n this.description += this.strides.some(s => s > 1) ? `, ${this.strides.join('x')} striding` : '';\n this.description += this.padding === 'valid' ? `, no border padding` : ', pad to same borders';\n\n if (this.gpu) {\n this.poolingProgram = _WebGL.webgl2.compileProgram(poolingProgramSource);\n this.poolingFragmentsProgram = _WebGL.webgl2.compileProgram(poolingFragmentsProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _calcOutputShape(inputShape) {\n if (this.outputShape && this.inputPadding) {\n return;\n }\n\n const [inputDim1, inputDim2, inputDim3, inputChannels] = inputShape;\n const [poolDim1, poolDim2, poolDim3] = this.poolSize;\n const outputDim1 = this.padding === 'same' ? Math.floor((inputDim1 + this.strides[0] - 1) / this.strides[0]) : Math.floor((inputDim1 - poolDim1 + this.strides[0]) / this.strides[0]);\n const outputDim2 = this.padding === 'same' ? Math.floor((inputDim2 + this.strides[1] - 1) / this.strides[1]) : Math.floor((inputDim2 - poolDim2 + this.strides[1]) / this.strides[1]);\n const outputDim3 = this.padding === 'same' ? Math.floor((inputDim3 + this.strides[2] - 1) / this.strides[2]) : Math.floor((inputDim3 - poolDim3 + this.strides[2]) / this.strides[2]);\n const paddingDim1 = this.padding === 'same' ? Math.max(0, Math.floor((outputDim1 - 1) * this.strides[0] + poolDim1 - inputDim1)) : 0;\n const paddingDim2 = this.padding === 'same' ? Math.max(0, Math.floor((outputDim2 - 1) * this.strides[1] + poolDim2 - inputDim2)) : 0;\n const paddingDim3 = this.padding === 'same' ? Math.max(0, Math.floor((outputDim3 - 1) * this.strides[2] + poolDim3 - inputDim3)) : 0;\n const paddingDim1Before = Math.floor(paddingDim1 / 2);\n const paddingDim1After = paddingDim1 - paddingDim1Before;\n const paddingDim2Before = Math.floor(paddingDim2 / 2);\n const paddingDim2After = paddingDim2 - paddingDim2Before;\n const paddingDim3Before = Math.floor(paddingDim3 / 2);\n const paddingDim3After = paddingDim3 - paddingDim3Before;\n this.outputShape = [outputDim1, outputDim2, outputDim3, inputChannels];\n this.inputPadding = [paddingDim1Before, paddingDim1After, paddingDim2Before, paddingDim2After, paddingDim3Before, paddingDim3After];\n }\n\n _padInput(x) {\n if (this.padding === 'same') {\n const [inputDim1, inputDim2, inputDim3, inputChannels] = x.tensor.shape;\n const [paddingDim1Before, paddingDim1After, paddingDim2Before, paddingDim2After, paddingDim3Before, paddingDim3After] = this.inputPadding;\n const newDim1 = inputDim1 + paddingDim1Before + paddingDim1After;\n const newDim2 = inputDim2 + paddingDim2Before + paddingDim2After;\n const newDim3 = inputDim3 + paddingDim3Before + paddingDim3After;\n\n const _x = new _Tensor.default([], [newDim1, newDim2, newDim3, inputChannels]);\n\n if (this.poolingFunc === 'max') {\n _ndarrayOps.default.assigns(_x.tensor, Number.NEGATIVE_INFINITY);\n }\n\n _ndarrayOps.default.assign(_x.tensor.hi(inputDim1 + paddingDim1Before, inputDim2 + paddingDim2Before, inputDim3 + paddingDim3Before, inputChannels).lo(paddingDim1Before, paddingDim2Before, paddingDim3Before, 0), x.tensor);\n\n return _x;\n }\n\n return x;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 3, 0);\n }\n\n this._calcOutputShape(x.tensor.shape);\n\n x = this._padInput(x);\n const [inputDim1, inputDim2, inputDim3, inputChannels] = x.tensor.shape;\n const [poolDim1, poolDim2, poolDim3] = this.poolSize;\n this.output = new _Tensor.default([], this.outputShape);\n let patch = new _Tensor.default([], [poolDim1, poolDim2, poolDim3, inputChannels]);\n const [paddingDim1Before, paddingDim1After, paddingDim2Before, paddingDim2After, paddingDim3Before, paddingDim3After] = this.inputPadding;\n\n for (let i = 0, _i = 0; i <= inputDim1 - poolDim1; i += this.strides[0], _i++) {\n let dim1InPadding = 0;\n\n if (i < paddingDim1Before) {\n dim1InPadding = paddingDim1Before - i;\n } else if (i + poolDim1 > inputDim1 - paddingDim1After) {\n dim1InPadding = i + poolDim1 - (inputDim1 - paddingDim1After);\n }\n\n for (let j = 0, _j = 0; j <= inputDim2 - poolDim2; j += this.strides[1], _j++) {\n let dim2InPadding = 0;\n\n if (j < paddingDim2Before) {\n dim2InPadding = paddingDim2Before - j;\n } else if (j + poolDim2 > inputDim2 - paddingDim2After) {\n dim2InPadding = j + poolDim2 - (inputDim2 - paddingDim2After);\n }\n\n for (let k = 0, _k = 0; k <= inputDim3 - poolDim3; k += this.strides[2], _k++) {\n let dim3InPadding = 0;\n\n if (k < paddingDim3Before) {\n dim3InPadding = paddingDim3Before - k;\n } else if (k + poolDim3 > inputDim3 - paddingDim3After) {\n dim3InPadding = k + poolDim3 - (inputDim3 - paddingDim3After);\n }\n\n const nbCellsEffective = (poolDim1 - dim1InPadding) * (poolDim2 - dim2InPadding) * (poolDim3 - dim3InPadding);\n\n _ndarrayOps.default.assign(patch.tensor, x.tensor.hi(i + poolDim1, j + poolDim2, k + poolDim3, inputChannels).lo(i, j, k, 0));\n\n for (let c = 0; c < inputChannels; c++) {\n if (this.poolingFunc === 'max') {\n this.output.tensor.set(_i, _j, _k, c, _ndarrayOps.default.sup(patch.tensor.pick(null, null, null, c)));\n } else if (this.poolingFunc === 'average') {\n this.output.tensor.set(_i, _j, _k, c, _ndarrayOps.default.sum(patch.tensor.pick(null, null, null, c)) / nbCellsEffective);\n }\n }\n }\n }\n }\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(3, 0, 1, 2);\n }\n }\n\n _vol2col(x) {\n const [inputDim1, inputDim2, inputDim3, inputChannels] = x.tensor.shape;\n\n if (!this.tiledInput) {\n this.tiledInput = new _Tensor.default([], [inputDim1 * inputDim2 * inputDim3, inputChannels]);\n }\n\n const patch = new _Tensor.default([], [inputDim1, inputDim2, inputDim3]);\n const patchRaveled = new _Tensor.default([], [inputDim1 * inputDim2 * inputDim3]);\n\n for (let c = 0; c < inputChannels; c++) {\n _ndarrayOps.default.assign(patch.tensor, x.tensor.pick(null, null, null, c));\n\n patchRaveled.replaceTensorData(patch.tensor.data);\n\n _ndarrayOps.default.assign(this.tiledInput.tensor.pick(null, c), patchRaveled.tensor);\n }\n\n return this.tiledInput;\n }\n\n _createIndexMap() {\n if (this.poolIndexMap) {\n return;\n }\n\n let inputDim1 = this.inputShape[0];\n let inputDim2 = this.inputShape[1];\n let inputDim3 = this.inputShape[2];\n const rowIndices = new _Tensor.default([], [inputDim1, inputDim2, inputDim3]);\n let index = 0;\n\n for (let i = 0; i < inputDim1; i++) {\n for (let j = 0; j < inputDim2; j++) {\n for (let k = 0; k < inputDim3; k++) {\n rowIndices.tensor.set(i, j, k, index);\n index += 1;\n }\n }\n }\n\n if (this.padding === 'same') {\n const [paddingDim1Before, paddingDim1After, paddingDim2Before, paddingDim2After, paddingDim3Before, paddingDim3After] = this.inputPadding;\n inputDim1 = inputDim1 + paddingDim1Before + paddingDim1After;\n inputDim2 = inputDim2 + paddingDim2Before + paddingDim2After;\n inputDim3 = inputDim3 + paddingDim3Before + paddingDim3After;\n\n const _rowIndices = new _Tensor.default([], [inputDim1, inputDim2, inputDim3]);\n\n _ndarrayOps.default.assigns(_rowIndices.tensor, -1);\n\n _ndarrayOps.default.assign(_rowIndices.tensor.hi(this.inputShape[0] + paddingDim1Before, this.inputShape[1] + paddingDim2Before, this.inputShape[2] + paddingDim3Before).lo(paddingDim1Before, paddingDim2Before, paddingDim3Before), rowIndices.tensor);\n\n rowIndices.tensor = _rowIndices.tensor;\n }\n\n const [poolDim1, poolDim2, poolDim3] = this.poolSize;\n const outputDim1 = this.outputShape[0];\n const outputDim2 = this.outputShape[1];\n const outputDim3 = this.outputShape[2];\n this.poolIndexMap = new _Tensor.default([], [outputDim1 * outputDim2 * outputDim3, poolDim1 * poolDim2 * poolDim3], {\n type: Int32Array\n });\n const patchRow = new _Tensor.default([], [poolDim1, poolDim2, poolDim3]);\n let offset = 0;\n\n for (let i = 0, limit = inputDim1 - poolDim1; i <= limit; i += this.strides[0]) {\n for (let j = 0, limit = inputDim2 - poolDim2; j <= limit; j += this.strides[1]) {\n for (let k = 0, limit = inputDim3 - poolDim3; k <= limit; k += this.strides[2]) {\n _ndarrayOps.default.assign(patchRow.tensor, rowIndices.tensor.hi(i + poolDim1, j + poolDim2, k + poolDim3).lo(i, j, k));\n\n this.poolIndexMap.tensor.data.set(patchRow.tensor.data, offset);\n offset += poolDim1 * poolDim2 * poolDim3;\n }\n }\n }\n\n this.poolIndexMap.createGLTexture({\n type: '2d',\n format: 'int',\n supportsTextureFragments: true\n });\n }\n\n _callGPU(x) {\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n } else {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 3, 0);\n }\n\n this.inputShape = x.tensor.shape;\n\n this._vol2col(x);\n\n this.tiledInput.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n this._calcOutputShape(this.inputShape);\n\n this._createIndexMap();\n\n if (!this.output) {\n const [outputDim1, outputDim2, outputDim3, inputChannels] = this.outputShape;\n const outputTextureShape = [outputDim1 * outputDim2 * outputDim3, inputChannels];\n this.output = new _Tensor.default([], outputTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.output.is2DReshaped = true;\n this.output.originalShape = this.outputShape;\n this.output.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.outputShape, false, -1);\n }\n\n const input = x.is2DReshaped || x.is2DSquareReshaped ? x : this.tiledInput;\n const poolSize = this.poolSize[0] * this.poolSize[1] * this.poolSize[2];\n const isMaxPooling = this.poolingFunc === 'max';\n const programUniforms = [{\n value: this.output.glTextureShape[1],\n type: 'int',\n name: 'channels'\n }, {\n value: poolSize,\n type: 'int',\n name: 'poolSize'\n }, {\n value: +isMaxPooling,\n type: 'bool',\n name: 'isMaxPooling'\n }];\n\n if (input.glTextureFragments) {\n input.convert2DRowFragmentedGLTextureToColStack();\n\n _WebGL.webgl2.runProgram({\n program: this.poolingFragmentsProgram,\n output: this.output,\n inputs: [{\n input: input,\n name: 'x'\n }, {\n input: this.poolIndexMap,\n name: 'poolIndexMap'\n }],\n uniforms: programUniforms,\n supportsTextureFragments: true\n });\n\n input.removeGLTextureFragmentsAsColStack();\n } else {\n _WebGL.webgl2.runProgram({\n program: this.poolingProgram,\n output: this.output,\n inputs: [{\n input: input,\n name: 'x'\n }, {\n input: this.poolIndexMap,\n name: 'poolIndexMap'\n }],\n uniforms: programUniforms\n });\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n this.output.reshapeFrom2D();\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(3, 0, 1, 2);\n }\n }\n }\n\n}\n\nexports.default = _Pooling3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Pooling3D2 = _interopRequireDefault(require(\"./_Pooling3D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass MaxPooling3D extends _Pooling3D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'MaxPooling3D';\n this.poolingFunc = 'max';\n }\n\n}\n\nexports.default = MaxPooling3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Pooling1D2 = _interopRequireDefault(require(\"./_Pooling1D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass AveragePooling1D extends _Pooling1D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'AveragePooling1D';\n this.poolingFunc = 'average';\n }\n\n}\n\nexports.default = AveragePooling1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Pooling2D2 = _interopRequireDefault(require(\"./_Pooling2D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass AveragePooling2D extends _Pooling2D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'AveragePooling2D';\n this.poolingFunc = 'average';\n }\n\n}\n\nexports.default = AveragePooling2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Pooling3D2 = _interopRequireDefault(require(\"./_Pooling3D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass AveragePooling3D extends _Pooling3D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'AveragePooling3D';\n this.poolingFunc = 'average';\n }\n\n}\n\nexports.default = AveragePooling3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst poolingProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform int channelDataSize;\\nuniform bool isMaxPooling;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(x, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n if (isMaxPooling) {\\n // GlobalMaxPooling\\n float maxval = 0.0;\\n for (int j = 0; j < size[1]; ++j) {\\n float val = texelFetch(x, ivec2(out_x, j), 0).r;\\n if (j == 0 || val > maxval) {\\n maxval = val;\\n }\\n }\\n outColor = vec4(maxval);\\n } else {\\n // GlobalAveragePooling\\n float sum = 0.0;\\n for (int j = 0; j < size[1]; ++j) {\\n float val = texelFetch(x, ivec2(out_x, j), 0).r;\\n sum += val;\\n }\\n outColor = vec4(sum / float(channelDataSize));\\n }\\n}\\n\";\n\nclass _GlobalPooling1D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = '_GlobalPooling1D';\n const {\n data_format = 'channels_last'\n } = attrs;\n this.dataFormat = data_format;\n this.poolingFunc = 'max';\n\n if (this.gpu) {\n this.poolingProgram = _WebGL.webgl2.compileProgram(poolingProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n const [steps, features] = x.tensor.shape;\n this.output = new _Tensor.default([], [features]);\n\n for (let i = 0, len = features; i < len; i++) {\n if (this.poolingFunc === 'max') {\n this.output.tensor.set(i, _ndarrayOps.default.sup(x.tensor.pick(null, i)));\n } else if (this.poolingFunc === 'average') {\n this.output.tensor.set(i, _ndarrayOps.default.sum(x.tensor.pick(null, i)) / steps);\n }\n }\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.tensor.shape;\n\n if (!this.output) {\n this.output = new _Tensor.default([], [this.inputShape[1]]);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const isMaxPooling = this.poolingFunc === 'max';\n\n _WebGL.webgl2.runProgram({\n program: this.poolingProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: this.inputShape[0],\n type: 'int',\n name: 'channelDataSize'\n }, {\n value: +isMaxPooling,\n type: 'bool',\n name: 'isMaxPooling'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = _GlobalPooling1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _GlobalPooling1D2 = _interopRequireDefault(require(\"./_GlobalPooling1D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass GlobalMaxPooling1D extends _GlobalPooling1D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'GlobalMaxPooling1D';\n this.poolingFunc = 'max';\n }\n\n}\n\nexports.default = GlobalMaxPooling1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst poolingProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform int channelDataSize;\\nuniform bool isMaxPooling;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(x, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n if (isMaxPooling) {\\n // GlobalMaxPooling\\n float maxval = 0.0;\\n for (int j = 0; j < size[1]; ++j) {\\n float val = texelFetch(x, ivec2(out_x, j), 0).r;\\n if (j == 0 || val > maxval) {\\n maxval = val;\\n }\\n }\\n outColor = vec4(maxval);\\n } else {\\n // GlobalAveragePooling\\n float sum = 0.0;\\n for (int j = 0; j < size[1]; ++j) {\\n float val = texelFetch(x, ivec2(out_x, j), 0).r;\\n sum += val;\\n }\\n outColor = vec4(sum / float(channelDataSize));\\n }\\n}\\n\";\n\nclass _GlobalPooling2D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = '_GlobalPooling2D';\n const {\n data_format = 'channels_last'\n } = attrs;\n this.dataFormat = data_format;\n this.poolingFunc = 'max';\n\n if (this.gpu) {\n this.poolingProgram = _WebGL.webgl2.compileProgram(poolingProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 0);\n }\n\n const [rows, cols, channels] = x.tensor.shape;\n this.output = new _Tensor.default([], [channels]);\n\n for (let i = 0, len = channels; i < len; i++) {\n if (this.poolingFunc === 'max') {\n this.output.tensor.set(i, _ndarrayOps.default.sup(x.tensor.pick(null, null, i)));\n } else if (this.poolingFunc === 'average') {\n this.output.tensor.set(i, _ndarrayOps.default.sum(x.tensor.pick(null, null, i)) / (rows * cols));\n }\n }\n }\n\n _callGPU(x) {\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n } else {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 0);\n }\n\n this.inputShape = x.tensor.shape;\n x.reshapeTo2D();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], [this.inputShape[2]]);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const isMaxPooling = this.poolingFunc === 'max';\n\n _WebGL.webgl2.runProgram({\n program: this.poolingProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: this.inputShape[0] * this.inputShape[1],\n type: 'int',\n name: 'channelDataSize'\n }, {\n value: +isMaxPooling,\n type: 'bool',\n name: 'isMaxPooling'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = _GlobalPooling2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _GlobalPooling2D2 = _interopRequireDefault(require(\"./_GlobalPooling2D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass GlobalMaxPooling2D extends _GlobalPooling2D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'GlobalMaxPooling2D';\n this.poolingFunc = 'max';\n }\n\n}\n\nexports.default = GlobalMaxPooling2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst poolingProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform int channelDataSize;\\nuniform bool isMaxPooling;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(x, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n if (isMaxPooling) {\\n // GlobalMaxPooling\\n float maxval = 0.0;\\n for (int j = 0; j < size[1]; ++j) {\\n float val = texelFetch(x, ivec2(out_x, j), 0).r;\\n if (j == 0 || val > maxval) {\\n maxval = val;\\n }\\n }\\n outColor = vec4(maxval);\\n } else {\\n // GlobalAveragePooling\\n float sum = 0.0;\\n for (int j = 0; j < size[1]; ++j) {\\n float val = texelFetch(x, ivec2(out_x, j), 0).r;\\n sum += val;\\n }\\n outColor = vec4(sum / float(channelDataSize));\\n }\\n}\\n\";\n\nclass _GlobalPooling3D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = '_GlobalPooling3D';\n const {\n data_format = 'channels_last'\n } = attrs;\n this.dataFormat = data_format;\n this.poolingFunc = 'max';\n\n if (this.gpu) {\n this.poolingProgram = _WebGL.webgl2.compileProgram(poolingProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 3, 0);\n }\n\n const [dim1, dim2, dim3, channels] = x.tensor.shape;\n this.output = new _Tensor.default([], [channels]);\n\n for (let i = 0, len = channels; i < len; i++) {\n if (this.poolingFunc === 'max') {\n this.output.tensor.set(i, _ndarrayOps.default.sup(x.tensor.pick(null, null, null, i)));\n } else if (this.poolingFunc === 'average') {\n this.output.tensor.set(i, _ndarrayOps.default.sum(x.tensor.pick(null, null, null, i)) / (dim1 * dim2 * dim3));\n }\n }\n }\n\n _callGPU(x) {\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n } else {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 3, 0);\n }\n\n this.inputShape = x.tensor.shape;\n x.reshapeTo2D();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], [this.inputShape[3]]);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const isMaxPooling = this.poolingFunc === 'max';\n\n _WebGL.webgl2.runProgram({\n program: this.poolingProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: this.inputShape[0] * this.inputShape[1] * this.inputShape[2],\n type: 'int',\n name: 'channelDataSize'\n }, {\n value: +isMaxPooling,\n type: 'bool',\n name: 'isMaxPooling'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = _GlobalPooling3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _GlobalPooling3D2 = _interopRequireDefault(require(\"./_GlobalPooling3D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass GlobalMaxPooling3D extends _GlobalPooling3D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'GlobalMaxPooling3D';\n this.poolingFunc = 'max';\n }\n\n}\n\nexports.default = GlobalMaxPooling3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _GlobalPooling1D2 = _interopRequireDefault(require(\"./_GlobalPooling1D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass GlobalAveragePooling1D extends _GlobalPooling1D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'GlobalAveragePooling1D';\n this.poolingFunc = 'average';\n }\n\n}\n\nexports.default = GlobalAveragePooling1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _GlobalPooling2D2 = _interopRequireDefault(require(\"./_GlobalPooling2D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass GlobalAveragePooling2D extends _GlobalPooling2D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'GlobalAveragePooling2D';\n this.poolingFunc = 'average';\n }\n\n}\n\nexports.default = GlobalAveragePooling2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _GlobalPooling3D2 = _interopRequireDefault(require(\"./_GlobalPooling3D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass GlobalAveragePooling3D extends _GlobalPooling3D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'GlobalAveragePooling3D';\n this.poolingFunc = 'average';\n }\n\n}\n\nexports.default = GlobalAveragePooling3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"MaxPooling1D\", {\n enumerable: true,\n get: function () {\n return _MaxPooling1D.default;\n }\n});\nObject.defineProperty(exports, \"MaxPooling2D\", {\n enumerable: true,\n get: function () {\n return _MaxPooling2D.default;\n }\n});\nObject.defineProperty(exports, \"MaxPooling3D\", {\n enumerable: true,\n get: function () {\n return _MaxPooling3D.default;\n }\n});\nObject.defineProperty(exports, \"AveragePooling1D\", {\n enumerable: true,\n get: function () {\n return _AveragePooling1D.default;\n }\n});\nObject.defineProperty(exports, \"AveragePooling2D\", {\n enumerable: true,\n get: function () {\n return _AveragePooling2D.default;\n }\n});\nObject.defineProperty(exports, \"AveragePooling3D\", {\n enumerable: true,\n get: function () {\n return _AveragePooling3D.default;\n }\n});\nObject.defineProperty(exports, \"GlobalMaxPooling1D\", {\n enumerable: true,\n get: function () {\n return _GlobalMaxPooling1D.default;\n }\n});\nObject.defineProperty(exports, \"GlobalMaxPooling2D\", {\n enumerable: true,\n get: function () {\n return _GlobalMaxPooling2D.default;\n }\n});\nObject.defineProperty(exports, \"GlobalMaxPooling3D\", {\n enumerable: true,\n get: function () {\n return _GlobalMaxPooling3D.default;\n }\n});\nObject.defineProperty(exports, \"GlobalAveragePooling1D\", {\n enumerable: true,\n get: function () {\n return _GlobalAveragePooling1D.default;\n }\n});\nObject.defineProperty(exports, \"GlobalAveragePooling2D\", {\n enumerable: true,\n get: function () {\n return _GlobalAveragePooling2D.default;\n }\n});\nObject.defineProperty(exports, \"GlobalAveragePooling3D\", {\n enumerable: true,\n get: function () {\n return _GlobalAveragePooling3D.default;\n }\n});\n\nvar _MaxPooling1D = _interopRequireDefault(require(\"./MaxPooling1D\"));\n\nvar _MaxPooling2D = _interopRequireDefault(require(\"./MaxPooling2D\"));\n\nvar _MaxPooling3D = _interopRequireDefault(require(\"./MaxPooling3D\"));\n\nvar _AveragePooling1D = _interopRequireDefault(require(\"./AveragePooling1D\"));\n\nvar _AveragePooling2D = _interopRequireDefault(require(\"./AveragePooling2D\"));\n\nvar _AveragePooling3D = _interopRequireDefault(require(\"./AveragePooling3D\"));\n\nvar _GlobalMaxPooling1D = _interopRequireDefault(require(\"./GlobalMaxPooling1D\"));\n\nvar _GlobalMaxPooling2D = _interopRequireDefault(require(\"./GlobalMaxPooling2D\"));\n\nvar _GlobalMaxPooling3D = _interopRequireDefault(require(\"./GlobalMaxPooling3D\"));\n\nvar _GlobalAveragePooling1D = _interopRequireDefault(require(\"./GlobalAveragePooling1D\"));\n\nvar _GlobalAveragePooling2D = _interopRequireDefault(require(\"./GlobalAveragePooling2D\"));\n\nvar _GlobalAveragePooling3D = _interopRequireDefault(require(\"./GlobalAveragePooling3D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar activations = _interopRequireWildcard(require(\"../../activations\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayBlasLevel = require(\"ndarray-blas-level2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nvar activationProgramSources = _interopRequireWildcard(require(\"../../activations/programSources\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nconst copyTextureProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D source;\\nout vec4 outColor;\\n\\nvoid main(void) {\\n outColor = texture(source, vec2(outTex.x, outTex.y));\\n}\\n\";\nconst matMulProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D A;\\nuniform sampler2D B;\\nuniform sampler2D C;\\nuniform bool addC;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 A_size = textureSize(A, 0);\\n ivec2 B_size = textureSize(B, 0);\\n int out_x = int(float(B_size[0]) * outTex.x);\\n int out_y = int(float(A_size[1]) * outTex.y);\\n int commonDim = A_size[0];\\n\\n float sum = 0.;\\n for (int i = 0; i < commonDim; ++i) {\\n float a = texelFetch(A, ivec2(i, out_y), 0).r;\\n float b = texelFetch(B, ivec2(out_x, i), 0).r;\\n sum += a * b;\\n }\\n\\n if (addC) {\\n sum += texelFetch(C, ivec2(out_x, 0), 0).r;\\n }\\n\\n outColor = vec4(sum);\\n}\\n\";\nconst gateSummationProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D t1;\\nuniform sampler2D t2;\\nuniform sampler2D bias;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(bias, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float t1_val = texelFetch(t1, ivec2(out_x, out_y), 0).r;\\n float t2_val = texelFetch(t2, ivec2(out_x, out_y), 0).r;\\n float bias_val = texelFetch(bias, ivec2(out_x, out_y), 0).r;\\n\\n outColor = vec4(t1_val + t2_val + bias_val);\\n}\\n\";\nconst timestepReadProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform int index;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(x, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n\\n outColor = vec4(texelFetch(x, ivec2(out_x, index), 0).r);\\n}\\n\";\nconst timestepWriteProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform sampler2D y;\\nuniform int index;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(y, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n if (out_y == index) {\\n outColor = vec4(texelFetch(x, ivec2(out_x, 0), 0).r);\\n } else {\\n outColor = vec4(texelFetch(y, ivec2(out_x, out_y), 0).r);\\n }\\n}\\n\";\n\nclass SimpleRNN extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n Object.defineProperty(this, \"_combine\", {\n configurable: true,\n enumerable: true,\n writable: true,\n value: (0, _cwise.default)({\n args: ['array', 'array', 'array', 'array'],\n body: function (_y, _x1, _x2, _b) {\n _y = _x1 + _x2 + _b;\n }\n })\n });\n this.layerClass = 'SimpleRNN';\n const {\n units = 1,\n activation = 'tanh',\n use_bias = true,\n return_sequences = false,\n go_backwards = false,\n stateful = false\n } = attrs;\n this.units = units;\n this.activation = activation;\n this.activationFunc = activations[activation];\n this.use_bias = use_bias;\n this.returnSequences = return_sequences;\n this.goBackwards = go_backwards;\n this.stateful = stateful;\n this.params = this.use_bias ? ['kernel', 'recurrent_kernel', 'bias'] : ['kernel', 'recurrent_kernel'];\n this.description = `output dimensions: ${this.units}`;\n this.description += this.activation !== 'linear' ? `, ${this.activation} activation` : '';\n this.description += this.returnSequences ? `, return sequences` : '';\n this.description += this.goBackwards ? `, backward direction` : '';\n this.description += this.stateful ? `, stateful` : '';\n\n if (this.gpu) {\n this.copyTextureProgram = _WebGL.webgl2.compileProgram(copyTextureProgramSource);\n this.matMulProgram = _WebGL.webgl2.compileProgram(matMulProgramSource);\n this.activationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.activation]);\n this.gateSummationProgram = _WebGL.webgl2.compileProgram(gateSummationProgramSource);\n this.timestepReadProgram = _WebGL.webgl2.compileProgram(timestepReadProgramSource);\n this.timestepWriteProgram = _WebGL.webgl2.compileProgram(timestepWriteProgramSource);\n }\n }\n\n setWeights(weightsArr) {\n super.setWeights(weightsArr);\n\n if (!this.use_bias) {\n this.weights['bias'] = new _Tensor.default([], [this.units]);\n\n if (this.gpu) {\n this.weights['bias'].createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n const dimHiddenState = this.units;\n const currentHiddenState = this.stateful && this.currentHiddenState ? this.currentHiddenState : new _Tensor.default([], [dimHiddenState]);\n const tempXH = new _Tensor.default([], [dimHiddenState]);\n const tempHH = new _Tensor.default([], [dimHiddenState]);\n const previousHiddenState = new _Tensor.default([], [dimHiddenState]);\n this.hiddenStateSequence = new _Tensor.default([], [x.tensor.shape[0], dimHiddenState]);\n const currentX = new _Tensor.default([], [x.tensor.shape[1]]);\n\n const _step = () => {\n _ndarrayOps.default.assign(previousHiddenState.tensor, currentHiddenState.tensor);\n\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['kernel'].tensor.transpose(1, 0), currentX.tensor, 1, tempXH.tensor);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['recurrent_kernel'].tensor.transpose(1, 0), previousHiddenState.tensor, 1, tempHH.tensor);\n\n this._combine(currentHiddenState.tensor, tempXH.tensor, tempHH.tensor, this.weights['bias'].tensor);\n\n this.activationFunc(currentHiddenState);\n };\n\n for (let i = 0, len = x.tensor.shape[0]; i < len; i++) {\n const inputIndex = this.goBackwards ? len - i - 1 : i;\n\n _ndarrayOps.default.assign(currentX.tensor, x.tensor.pick(inputIndex, null));\n\n const tempTensors = [tempXH, tempHH];\n tempTensors.forEach(temp => _ndarrayOps.default.assigns(temp.tensor, 0));\n\n _step();\n\n if (this.returnSequences) {\n _ndarrayOps.default.assign(this.hiddenStateSequence.tensor.pick(i, null), currentHiddenState.tensor);\n }\n }\n\n if (this.returnSequences) {\n this.output = this.hiddenStateSequence;\n } else {\n this.output = currentHiddenState;\n }\n\n if (this.stateful) {\n this.currentHiddenState = currentHiddenState;\n }\n }\n\n _stepGPU() {\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.previousHiddenState,\n inputs: [{\n input: this.currentHiddenState,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempXH,\n inputs: [{\n input: this.currentX,\n name: 'A'\n }, {\n input: this.weights['kernel'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempHH,\n inputs: [{\n input: this.previousHiddenState,\n name: 'A'\n }, {\n input: this.weights['recurrent_kernel'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.gateSummationProgram,\n output: this.currentHiddenStatePreactiv,\n inputs: [{\n input: this.tempXH,\n name: 't1'\n }, {\n input: this.tempHH,\n name: 't2'\n }, {\n input: this.weights['bias'],\n name: 'bias'\n }]\n });\n\n if (this.activation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.activationProgram,\n output: this.currentHiddenState,\n inputs: [{\n input: this.currentHiddenStatePreactiv,\n name: 'x'\n }]\n });\n } else {\n this.currentHiddenState = this.currentHiddenStatePreactiv;\n }\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const dimHiddenState = this.units;\n\n if (!this.currentHiddenState || !this.stateful) {\n this.currentHiddenState = new _Tensor.default([], [dimHiddenState]);\n this.currentHiddenState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentHiddenStatePreactiv) {\n this.currentHiddenStatePreactiv = new _Tensor.default([], [dimHiddenState]);\n this.currentHiddenStatePreactiv.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempXH) {\n this.tempXH = new _Tensor.default([], [dimHiddenState]);\n this.tempXH.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempHH) {\n this.tempHH = new _Tensor.default([], [dimHiddenState]);\n this.tempHH.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.previousHiddenState) {\n this.previousHiddenState = new _Tensor.default([], [dimHiddenState]);\n this.previousHiddenState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.hiddenStateSequence) {\n this.hiddenStateSequence = new _Tensor.default([], [x.glTextureShape[0], dimHiddenState]);\n this.hiddenStateSequence.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.hiddenStateSequenceCopy) {\n this.hiddenStateSequenceCopy = new _Tensor.default([], [x.glTextureShape[0], dimHiddenState]);\n this.hiddenStateSequenceCopy.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentX) {\n this.currentX = new _Tensor.default([], [x.glTextureShape[1]]);\n this.currentX.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n for (let i = 0, len = x.glTextureShape[0]; i < len; i++) {\n const inputIndex = this.goBackwards ? len - i - 1 : i;\n\n _WebGL.webgl2.runProgram({\n program: this.timestepReadProgram,\n output: this.currentX,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: inputIndex,\n type: 'int',\n name: 'index'\n }]\n });\n\n this._stepGPU();\n\n if (this.returnSequences) {\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.hiddenStateSequenceCopy,\n inputs: [{\n input: this.hiddenStateSequence,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.timestepWriteProgram,\n output: this.hiddenStateSequence,\n inputs: [{\n input: this.currentHiddenState,\n name: 'x'\n }, {\n input: this.hiddenStateSequenceCopy,\n name: 'y'\n }],\n uniforms: [{\n value: i,\n type: 'int',\n name: 'index'\n }]\n });\n }\n }\n\n if (this.returnSequences) {\n this.output = this.hiddenStateSequence;\n } else {\n this.output = this.currentHiddenState;\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = SimpleRNN;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar activations = _interopRequireWildcard(require(\"../../activations\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayBlasLevel = require(\"ndarray-blas-level2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nvar activationProgramSources = _interopRequireWildcard(require(\"../../activations/programSources\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nconst copyTextureProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D source;\\nout vec4 outColor;\\n\\nvoid main(void) {\\n outColor = texture(source, vec2(outTex.x, outTex.y));\\n}\\n\";\nconst matMulProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D A;\\nuniform sampler2D B;\\nuniform sampler2D C;\\nuniform bool addC;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 A_size = textureSize(A, 0);\\n ivec2 B_size = textureSize(B, 0);\\n int out_x = int(float(B_size[0]) * outTex.x);\\n int out_y = int(float(A_size[1]) * outTex.y);\\n int commonDim = A_size[0];\\n\\n float sum = 0.;\\n for (int i = 0; i < commonDim; ++i) {\\n float a = texelFetch(A, ivec2(i, out_y), 0).r;\\n float b = texelFetch(B, ivec2(out_x, i), 0).r;\\n sum += a * b;\\n }\\n\\n if (addC) {\\n sum += texelFetch(C, ivec2(out_x, 0), 0).r;\\n }\\n\\n outColor = vec4(sum);\\n}\\n\";\nconst gateSummationProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D t1;\\nuniform sampler2D t2;\\nuniform sampler2D bias;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(bias, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float t1_val = texelFetch(t1, ivec2(out_x, out_y), 0).r;\\n float t2_val = texelFetch(t2, ivec2(out_x, out_y), 0).r;\\n float bias_val = texelFetch(bias, ivec2(out_x, out_y), 0).r;\\n\\n outColor = vec4(t1_val + t2_val + bias_val);\\n}\\n\";\nconst gateProductProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D t1;\\nuniform sampler2D t2;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(t1, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float t1_val = texelFetch(t1, ivec2(out_x, out_y), 0).r;\\n float t2_val = texelFetch(t2, ivec2(out_x, out_y), 0).r;\\n\\n outColor = vec4(t1_val * t2_val);\\n}\\n\";\nconst timestepReadProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform int index;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(x, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n\\n outColor = vec4(texelFetch(x, ivec2(out_x, index), 0).r);\\n}\\n\";\nconst timestepWriteProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform sampler2D y;\\nuniform int index;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(y, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n if (out_y == index) {\\n outColor = vec4(texelFetch(x, ivec2(out_x, 0), 0).r);\\n } else {\\n outColor = vec4(texelFetch(y, ivec2(out_x, out_y), 0).r);\\n }\\n}\\n\";\nconst updateProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D c;\\nuniform sampler2D ctm1;\\nuniform sampler2D i;\\nuniform sampler2D f;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(c, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float c_val = texelFetch(c, ivec2(out_x, out_y), 0).r;\\n float ctm1_val = texelFetch(ctm1, ivec2(out_x, out_y), 0).r;\\n float i_val = texelFetch(i, ivec2(out_x, out_y), 0).r;\\n float f_val = texelFetch(f, ivec2(out_x, out_y), 0).r;\\n\\n outColor = vec4(c_val * i_val + ctm1_val * f_val);\\n}\\n\";\n\nclass LSTM extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n Object.defineProperty(this, \"_combine\", {\n configurable: true,\n enumerable: true,\n writable: true,\n value: (0, _cwise.default)({\n args: ['array', 'array', 'array', 'array'],\n body: function (_y, _x1, _x2, _b) {\n _y = _x1 + _x2 + _b;\n }\n })\n });\n Object.defineProperty(this, \"_update\", {\n configurable: true,\n enumerable: true,\n writable: true,\n value: (0, _cwise.default)({\n args: ['array', 'array', 'array', 'array'],\n body: function (_c, _ctm1, _i, _f) {\n _c = _c * _i + _ctm1 * _f;\n }\n })\n });\n this.layerClass = 'LSTM';\n const {\n units = 1,\n activation = 'tanh',\n use_bias = true,\n recurrent_activation = 'hard_sigmoid',\n return_sequences = false,\n go_backwards = false,\n stateful = false\n } = attrs;\n this.units = units;\n this.activation = activation;\n this.recurrentActivation = recurrent_activation;\n this.activationFunc = activations[activation];\n this.recurrentActivationFunc = activations[recurrent_activation];\n this.use_bias = use_bias;\n this.returnSequences = return_sequences;\n this.goBackwards = go_backwards;\n this.stateful = stateful;\n this.params = this.use_bias ? ['kernel', 'recurrent_kernel', 'bias'] : ['kernel', 'recurrent_kernel'];\n this.description = `output dimensions: ${this.units}`;\n this.description += this.activation !== 'linear' ? `, ${this.activation} activation` : '';\n this.description += this.recurrentActivation !== 'linear' ? `, ${this.recurrentActivation} recurrent activation` : '';\n this.description += this.returnSequences ? `, return sequences` : '';\n this.description += this.goBackwards ? `, backward direction` : '';\n this.description += this.stateful ? `, stateful` : '';\n\n if (this.gpu) {\n this.copyTextureProgram = _WebGL.webgl2.compileProgram(copyTextureProgramSource);\n this.matMulProgram = _WebGL.webgl2.compileProgram(matMulProgramSource);\n this.activationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.activation]);\n this.recurrentActivationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.recurrentActivation]);\n this.gateSummationProgram = _WebGL.webgl2.compileProgram(gateSummationProgramSource);\n this.gateProductProgram = _WebGL.webgl2.compileProgram(gateProductProgramSource);\n this.timestepReadProgram = _WebGL.webgl2.compileProgram(timestepReadProgramSource);\n this.timestepWriteProgram = _WebGL.webgl2.compileProgram(timestepWriteProgramSource);\n this.updateProgram = _WebGL.webgl2.compileProgram(updateProgramSource);\n }\n }\n\n setWeights(weightsArr) {\n super.setWeights(weightsArr);\n const shape_W = this.weights['kernel'].tensor.shape;\n this.weights['W_i'] = new _Tensor.default([], [shape_W[0], this.units]);\n this.weights['W_f'] = new _Tensor.default([], [shape_W[0], this.units]);\n this.weights['W_c'] = new _Tensor.default([], [shape_W[0], this.units]);\n this.weights['W_o'] = new _Tensor.default([], [shape_W[0], this.units]);\n\n _ndarrayOps.default.assign(this.weights['W_i'].tensor, this.weights['kernel'].tensor.hi(shape_W[0], this.units).lo(0, 0));\n\n _ndarrayOps.default.assign(this.weights['W_f'].tensor, this.weights['kernel'].tensor.hi(shape_W[0], 2 * this.units).lo(0, this.units));\n\n _ndarrayOps.default.assign(this.weights['W_c'].tensor, this.weights['kernel'].tensor.hi(shape_W[0], 3 * this.units).lo(0, 2 * this.units));\n\n _ndarrayOps.default.assign(this.weights['W_o'].tensor, this.weights['kernel'].tensor.hi(shape_W[0], 4 * this.units).lo(0, 3 * this.units));\n\n const shape_U = this.weights['recurrent_kernel'].tensor.shape;\n this.weights['U_i'] = new _Tensor.default([], [shape_U[0], this.units]);\n this.weights['U_f'] = new _Tensor.default([], [shape_U[0], this.units]);\n this.weights['U_c'] = new _Tensor.default([], [shape_U[0], this.units]);\n this.weights['U_o'] = new _Tensor.default([], [shape_U[0], this.units]);\n\n _ndarrayOps.default.assign(this.weights['U_i'].tensor, this.weights['recurrent_kernel'].tensor.hi(shape_U[0], this.units).lo(0, 0));\n\n _ndarrayOps.default.assign(this.weights['U_f'].tensor, this.weights['recurrent_kernel'].tensor.hi(shape_U[0], 2 * this.units).lo(0, this.units));\n\n _ndarrayOps.default.assign(this.weights['U_c'].tensor, this.weights['recurrent_kernel'].tensor.hi(shape_U[0], 3 * this.units).lo(0, 2 * this.units));\n\n _ndarrayOps.default.assign(this.weights['U_o'].tensor, this.weights['recurrent_kernel'].tensor.hi(shape_U[0], 4 * this.units).lo(0, 3 * this.units));\n\n this.weights['b_i'] = new _Tensor.default([], [this.units]);\n this.weights['b_f'] = new _Tensor.default([], [this.units]);\n this.weights['b_c'] = new _Tensor.default([], [this.units]);\n this.weights['b_o'] = new _Tensor.default([], [this.units]);\n\n if (this.use_bias) {\n _ndarrayOps.default.assign(this.weights['b_i'].tensor, this.weights['bias'].tensor.hi(this.units).lo(0));\n\n _ndarrayOps.default.assign(this.weights['b_f'].tensor, this.weights['bias'].tensor.hi(2 * this.units).lo(this.units));\n\n _ndarrayOps.default.assign(this.weights['b_c'].tensor, this.weights['bias'].tensor.hi(3 * this.units).lo(2 * this.units));\n\n _ndarrayOps.default.assign(this.weights['b_o'].tensor, this.weights['bias'].tensor.hi(4 * this.units).lo(3 * this.units));\n }\n\n if (this.gpu) {\n const names = ['W_i', 'W_f', 'W_c', 'W_o', 'U_i', 'U_f', 'U_c', 'U_o', 'b_i', 'b_f', 'b_c', 'b_o'];\n names.forEach(name => {\n this.weights[name].createGLTexture({\n type: '2d',\n format: 'float'\n });\n });\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n const dimInputGate = this.weights['b_i'].tensor.shape[0];\n const dimCandidate = this.weights['b_c'].tensor.shape[0];\n const dimForgetGate = this.weights['b_f'].tensor.shape[0];\n const dimOutputGate = this.weights['b_o'].tensor.shape[0];\n const currentInputGateState = new _Tensor.default([], [dimInputGate]);\n const tempXI = new _Tensor.default([], [dimInputGate]);\n const tempHI = new _Tensor.default([], [dimInputGate]);\n const currentForgetGateState = new _Tensor.default([], [dimForgetGate]);\n const tempXF = new _Tensor.default([], [dimForgetGate]);\n const tempHF = new _Tensor.default([], [dimForgetGate]);\n const currentOutputGateState = new _Tensor.default([], [dimOutputGate]);\n const tempXO = new _Tensor.default([], [dimOutputGate]);\n const tempHO = new _Tensor.default([], [dimOutputGate]);\n const currentCandidate = new _Tensor.default([], [dimCandidate]);\n const tempXC = new _Tensor.default([], [dimCandidate]);\n const tempHC = new _Tensor.default([], [dimCandidate]);\n const previousCandidate = this.stateful && this.previousCandidate ? this.previousCandidate : new _Tensor.default([], [dimCandidate]);\n const currentHiddenState = this.stateful && this.currentHiddenState ? this.currentHiddenState : new _Tensor.default([], [dimCandidate]);\n const previousHiddenState = new _Tensor.default([], [dimCandidate]);\n this.hiddenStateSequence = new _Tensor.default([], [x.tensor.shape[0], dimCandidate]);\n const currentX = new _Tensor.default([], [x.tensor.shape[1]]);\n\n const _step = () => {\n _ndarrayOps.default.assign(previousHiddenState.tensor, currentHiddenState.tensor);\n\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['W_i'].tensor.transpose(1, 0), currentX.tensor, 1, tempXI.tensor);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['U_i'].tensor.transpose(1, 0), previousHiddenState.tensor, 1, tempHI.tensor);\n\n this._combine(currentInputGateState.tensor, tempXI.tensor, tempHI.tensor, this.weights['b_i'].tensor);\n\n this.recurrentActivationFunc(currentInputGateState);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['W_f'].tensor.transpose(1, 0), currentX.tensor, 1, tempXF.tensor);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['U_f'].tensor.transpose(1, 0), previousHiddenState.tensor, 1, tempHF.tensor);\n\n this._combine(currentForgetGateState.tensor, tempXF.tensor, tempHF.tensor, this.weights['b_f'].tensor);\n\n this.recurrentActivationFunc(currentForgetGateState);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['W_o'].tensor.transpose(1, 0), currentX.tensor, 1, tempXO.tensor);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['U_o'].tensor.transpose(1, 0), previousHiddenState.tensor, 1, tempHO.tensor);\n\n this._combine(currentOutputGateState.tensor, tempXO.tensor, tempHO.tensor, this.weights['b_o'].tensor);\n\n this.recurrentActivationFunc(currentOutputGateState);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['W_c'].tensor.transpose(1, 0), currentX.tensor, 1, tempXC.tensor);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['U_c'].tensor.transpose(1, 0), previousHiddenState.tensor, 1, tempHC.tensor);\n\n this._combine(currentCandidate.tensor, tempXC.tensor, tempHC.tensor, this.weights['b_c'].tensor);\n\n this.activationFunc(currentCandidate);\n\n this._update(currentCandidate.tensor, previousCandidate.tensor, currentInputGateState.tensor, currentForgetGateState.tensor);\n\n _ndarrayOps.default.assign(previousCandidate.tensor, currentCandidate.tensor);\n\n this.activationFunc(currentCandidate);\n\n _ndarrayOps.default.mul(currentHiddenState.tensor, currentOutputGateState.tensor, currentCandidate.tensor);\n };\n\n for (let i = 0, len = x.tensor.shape[0]; i < len; i++) {\n const inputIndex = this.goBackwards ? len - i - 1 : i;\n\n _ndarrayOps.default.assign(currentX.tensor, x.tensor.pick(inputIndex, null));\n\n const tempTensors = [tempXI, tempHI, tempXF, tempHF, tempXO, tempHO, tempXC, tempHC];\n tempTensors.forEach(temp => _ndarrayOps.default.assigns(temp.tensor, 0));\n\n _step();\n\n _ndarrayOps.default.assign(this.hiddenStateSequence.tensor.pick(i, null), currentHiddenState.tensor);\n }\n\n if (this.returnSequences) {\n this.output = this.hiddenStateSequence;\n } else {\n this.output = currentHiddenState;\n }\n\n if (this.stateful) {\n this.previousCandidate = previousCandidate;\n this.currentHiddenState = currentHiddenState;\n }\n }\n\n _stepGPU() {\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.previousHiddenState,\n inputs: [{\n input: this.currentHiddenState,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempXI,\n inputs: [{\n input: this.currentX,\n name: 'A'\n }, {\n input: this.weights['W_i'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempHI,\n inputs: [{\n input: this.previousHiddenState,\n name: 'A'\n }, {\n input: this.weights['U_i'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.gateSummationProgram,\n output: this.currentInputGateStatePreactiv,\n inputs: [{\n input: this.tempXI,\n name: 't1'\n }, {\n input: this.tempHI,\n name: 't2'\n }, {\n input: this.weights['b_i'],\n name: 'bias'\n }]\n });\n\n if (this.recurrentActivation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.recurrentActivationProgram,\n output: this.currentInputGateState,\n inputs: [{\n input: this.currentInputGateStatePreactiv,\n name: 'x'\n }]\n });\n } else {\n this.currentInputGateState = this.currentInputGateStatePreactiv;\n }\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempXF,\n inputs: [{\n input: this.currentX,\n name: 'A'\n }, {\n input: this.weights['W_f'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempHF,\n inputs: [{\n input: this.previousHiddenState,\n name: 'A'\n }, {\n input: this.weights['U_f'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.gateSummationProgram,\n output: this.currentForgetGateStatePreactiv,\n inputs: [{\n input: this.tempXF,\n name: 't1'\n }, {\n input: this.tempHF,\n name: 't2'\n }, {\n input: this.weights['b_f'],\n name: 'bias'\n }]\n });\n\n if (this.recurrentActivation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.recurrentActivationProgram,\n output: this.currentForgetGateState,\n inputs: [{\n input: this.currentForgetGateStatePreactiv,\n name: 'x'\n }]\n });\n } else {\n this.currentForgetGateState = this.currentForgetGateStatePreactiv;\n }\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempXO,\n inputs: [{\n input: this.currentX,\n name: 'A'\n }, {\n input: this.weights['W_o'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempHO,\n inputs: [{\n input: this.previousHiddenState,\n name: 'A'\n }, {\n input: this.weights['U_o'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.gateSummationProgram,\n output: this.currentOutputGateStatePreactiv,\n inputs: [{\n input: this.tempXO,\n name: 't1'\n }, {\n input: this.tempHO,\n name: 't2'\n }, {\n input: this.weights['b_o'],\n name: 'bias'\n }]\n });\n\n if (this.recurrentActivation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.recurrentActivationProgram,\n output: this.currentOutputGateState,\n inputs: [{\n input: this.currentOutputGateStatePreactiv,\n name: 'x'\n }]\n });\n } else {\n this.currentOutputGateState = this.currentOutputGateStatePreactiv;\n }\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempXC,\n inputs: [{\n input: this.currentX,\n name: 'A'\n }, {\n input: this.weights['W_c'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempHC,\n inputs: [{\n input: this.previousHiddenState,\n name: 'A'\n }, {\n input: this.weights['U_c'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.gateSummationProgram,\n output: this.currentCandidatePreactiv,\n inputs: [{\n input: this.tempXC,\n name: 't1'\n }, {\n input: this.tempHC,\n name: 't2'\n }, {\n input: this.weights['b_c'],\n name: 'bias'\n }]\n });\n\n if (this.activation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.activationProgram,\n output: this.currentCandidate,\n inputs: [{\n input: this.currentCandidatePreactiv,\n name: 'x'\n }]\n });\n } else {\n this.currentCandidate = this.currentCandidatePreactiv;\n }\n\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.currentCandidateCopy,\n inputs: [{\n input: this.currentCandidate,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.updateProgram,\n output: this.currentCandidate,\n inputs: [{\n input: this.currentCandidateCopy,\n name: 'c'\n }, {\n input: this.previousCandidate,\n name: 'ctm1'\n }, {\n input: this.currentInputGateState,\n name: 'i'\n }, {\n input: this.currentForgetGateState,\n name: 'f'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.previousCandidate,\n inputs: [{\n input: this.currentCandidate,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.currentCandidatePreactiv,\n inputs: [{\n input: this.currentCandidate,\n name: 'source'\n }]\n });\n\n if (this.activation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.activationProgram,\n output: this.currentCandidate,\n inputs: [{\n input: this.currentCandidatePreactiv,\n name: 'x'\n }]\n });\n } else {\n this.currentCandidate = this.currentCandidatePreactiv;\n }\n\n _WebGL.webgl2.runProgram({\n program: this.gateProductProgram,\n output: this.currentHiddenState,\n inputs: [{\n input: this.currentOutputGateState,\n name: 't1'\n }, {\n input: this.currentCandidate,\n name: 't2'\n }]\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const dimInputGate = this.weights['b_i'].glTextureShape[1];\n const dimCandidate = this.weights['b_c'].glTextureShape[1];\n const dimForgetGate = this.weights['b_f'].glTextureShape[1];\n const dimOutputGate = this.weights['b_o'].glTextureShape[1];\n\n if (!this.currentInputGateState) {\n this.currentInputGateState = new _Tensor.default([], [dimInputGate]);\n this.currentInputGateState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentInputGateStatePreactiv) {\n this.currentInputGateStatePreactiv = new _Tensor.default([], [dimInputGate]);\n this.currentInputGateStatePreactiv.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempXI) {\n this.tempXI = new _Tensor.default([], [dimInputGate]);\n this.tempXI.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempHI) {\n this.tempHI = new _Tensor.default([], [dimInputGate]);\n this.tempHI.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentForgetGateState) {\n this.currentForgetGateState = new _Tensor.default([], [dimForgetGate]);\n this.currentForgetGateState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentForgetGateStatePreactiv) {\n this.currentForgetGateStatePreactiv = new _Tensor.default([], [dimForgetGate]);\n this.currentForgetGateStatePreactiv.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempXF) {\n this.tempXF = new _Tensor.default([], [dimForgetGate]);\n this.tempXF.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempHF) {\n this.tempHF = new _Tensor.default([], [dimForgetGate]);\n this.tempHF.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentOutputGateState) {\n this.currentOutputGateState = new _Tensor.default([], [dimOutputGate]);\n this.currentOutputGateState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentOutputGateStatePreactiv) {\n this.currentOutputGateStatePreactiv = new _Tensor.default([], [dimOutputGate]);\n this.currentOutputGateStatePreactiv.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempXO) {\n this.tempXO = new _Tensor.default([], [dimOutputGate]);\n this.tempXO.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempHO) {\n this.tempHO = new _Tensor.default([], [dimOutputGate]);\n this.tempHO.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentCandidate) {\n this.currentCandidate = new _Tensor.default([], [dimCandidate]);\n this.currentCandidate.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentCandidateCopy) {\n this.currentCandidateCopy = new _Tensor.default([], [dimCandidate]);\n this.currentCandidateCopy.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentCandidatePreactiv) {\n this.currentCandidatePreactiv = new _Tensor.default([], [dimCandidate]);\n this.currentCandidatePreactiv.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempXC) {\n this.tempXC = new _Tensor.default([], [dimCandidate]);\n this.tempXC.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempHC) {\n this.tempHC = new _Tensor.default([], [dimCandidate]);\n this.tempHC.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.previousCandidate || !this.stateful) {\n this.previousCandidate = new _Tensor.default([], [dimCandidate]);\n this.previousCandidate.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentHiddenState || !this.stateful) {\n this.currentHiddenState = new _Tensor.default([], [dimCandidate]);\n this.currentHiddenState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.previousHiddenState) {\n this.previousHiddenState = new _Tensor.default([], [dimCandidate]);\n this.previousHiddenState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.hiddenStateSequence) {\n this.hiddenStateSequence = new _Tensor.default([], [x.glTextureShape[0], dimCandidate]);\n this.hiddenStateSequence.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.hiddenStateSequenceCopy) {\n this.hiddenStateSequenceCopy = new _Tensor.default([], [x.glTextureShape[0], dimCandidate]);\n this.hiddenStateSequenceCopy.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentX) {\n this.currentX = new _Tensor.default([], [x.glTextureShape[1]]);\n this.currentX.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n for (let i = 0, len = x.glTextureShape[0]; i < len; i++) {\n const inputIndex = this.goBackwards ? len - i - 1 : i;\n\n _WebGL.webgl2.runProgram({\n program: this.timestepReadProgram,\n output: this.currentX,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: inputIndex,\n type: 'int',\n name: 'index'\n }]\n });\n\n this._stepGPU();\n\n if (this.returnSequences) {\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.hiddenStateSequenceCopy,\n inputs: [{\n input: this.hiddenStateSequence,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.timestepWriteProgram,\n output: this.hiddenStateSequence,\n inputs: [{\n input: this.currentHiddenState,\n name: 'x'\n }, {\n input: this.hiddenStateSequenceCopy,\n name: 'y'\n }],\n uniforms: [{\n value: i,\n type: 'int',\n name: 'index'\n }]\n });\n }\n }\n\n if (this.returnSequences) {\n this.output = this.hiddenStateSequence;\n } else {\n this.output = this.currentHiddenState;\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = LSTM;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar activations = _interopRequireWildcard(require(\"../../activations\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayBlasLevel = require(\"ndarray-blas-level2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nvar activationProgramSources = _interopRequireWildcard(require(\"../../activations/programSources\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nconst copyTextureProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D source;\\nout vec4 outColor;\\n\\nvoid main(void) {\\n outColor = texture(source, vec2(outTex.x, outTex.y));\\n}\\n\";\nconst matMulProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D A;\\nuniform sampler2D B;\\nuniform sampler2D C;\\nuniform bool addC;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 A_size = textureSize(A, 0);\\n ivec2 B_size = textureSize(B, 0);\\n int out_x = int(float(B_size[0]) * outTex.x);\\n int out_y = int(float(A_size[1]) * outTex.y);\\n int commonDim = A_size[0];\\n\\n float sum = 0.;\\n for (int i = 0; i < commonDim; ++i) {\\n float a = texelFetch(A, ivec2(i, out_y), 0).r;\\n float b = texelFetch(B, ivec2(out_x, i), 0).r;\\n sum += a * b;\\n }\\n\\n if (addC) {\\n sum += texelFetch(C, ivec2(out_x, 0), 0).r;\\n }\\n\\n outColor = vec4(sum);\\n}\\n\";\nconst gateSummationProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D t1;\\nuniform sampler2D t2;\\nuniform sampler2D bias;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(bias, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float t1_val = texelFetch(t1, ivec2(out_x, out_y), 0).r;\\n float t2_val = texelFetch(t2, ivec2(out_x, out_y), 0).r;\\n float bias_val = texelFetch(bias, ivec2(out_x, out_y), 0).r;\\n\\n outColor = vec4(t1_val + t2_val + bias_val);\\n}\\n\";\nconst gateProductProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D t1;\\nuniform sampler2D t2;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(t1, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float t1_val = texelFetch(t1, ivec2(out_x, out_y), 0).r;\\n float t2_val = texelFetch(t2, ivec2(out_x, out_y), 0).r;\\n\\n outColor = vec4(t1_val * t2_val);\\n}\\n\";\nconst timestepReadProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform int index;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(x, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n\\n outColor = vec4(texelFetch(x, ivec2(out_x, index), 0).r);\\n}\\n\";\nconst timestepWriteProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform sampler2D y;\\nuniform int index;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(y, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n if (out_y == index) {\\n outColor = vec4(texelFetch(x, ivec2(out_x, 0), 0).r);\\n } else {\\n outColor = vec4(texelFetch(y, ivec2(out_x, out_y), 0).r);\\n }\\n}\\n\";\nconst updateProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D h;\\nuniform sampler2D htm1;\\nuniform sampler2D z;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(h, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float h_val = texelFetch(h, ivec2(out_x, out_y), 0).r;\\n float htm1_val = texelFetch(htm1, ivec2(out_x, out_y), 0).r;\\n float z_val = texelFetch(z, ivec2(out_x, out_y), 0).r;\\n\\n outColor = vec4(h_val * (float(1.0) - z_val) + htm1_val * z_val);\\n}\\n\";\n\nclass GRU extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n Object.defineProperty(this, \"_combine\", {\n configurable: true,\n enumerable: true,\n writable: true,\n value: (0, _cwise.default)({\n args: ['array', 'array', 'array', 'array'],\n body: function (_y, _x1, _x2, _b) {\n _y = _x1 + _x2 + _b;\n }\n })\n });\n Object.defineProperty(this, \"_update\", {\n configurable: true,\n enumerable: true,\n writable: true,\n value: (0, _cwise.default)({\n args: ['array', 'array', 'array'],\n body: function (_h, _htm1, _z) {\n _h = _h * (1 - _z) + _htm1 * _z;\n }\n })\n });\n this.layerClass = 'GRU';\n const {\n units = 1,\n activation = 'tanh',\n use_bias = true,\n recurrent_activation = 'hard_sigmoid',\n return_sequences = false,\n go_backwards = false,\n stateful = false\n } = attrs;\n this.units = units;\n this.activation = activation;\n this.recurrentActivation = recurrent_activation;\n this.activationFunc = activations[activation];\n this.recurrentActivationFunc = activations[recurrent_activation];\n this.use_bias = use_bias;\n this.returnSequences = return_sequences;\n this.goBackwards = go_backwards;\n this.stateful = stateful;\n this.params = this.use_bias ? ['kernel', 'recurrent_kernel', 'bias'] : ['kernel', 'recurrent_kernel'];\n this.description = `output dimensions: ${this.units}`;\n this.description += this.activation !== 'linear' ? `, ${this.activation} activation` : '';\n this.description += this.recurrentActivation !== 'linear' ? `, ${this.recurrentActivation} recurrent activation` : '';\n this.description += this.returnSequences ? `, return sequences` : '';\n this.description += this.goBackwards ? `, backward direction` : '';\n this.description += this.stateful ? `, stateful` : '';\n\n if (this.gpu) {\n this.copyTextureProgram = _WebGL.webgl2.compileProgram(copyTextureProgramSource);\n this.matMulProgram = _WebGL.webgl2.compileProgram(matMulProgramSource);\n this.activationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.activation]);\n this.recurrentActivationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.recurrentActivation]);\n this.gateSummationProgram = _WebGL.webgl2.compileProgram(gateSummationProgramSource);\n this.gateProductProgram = _WebGL.webgl2.compileProgram(gateProductProgramSource);\n this.timestepReadProgram = _WebGL.webgl2.compileProgram(timestepReadProgramSource);\n this.timestepWriteProgram = _WebGL.webgl2.compileProgram(timestepWriteProgramSource);\n this.updateProgram = _WebGL.webgl2.compileProgram(updateProgramSource);\n }\n }\n\n setWeights(weightsArr) {\n super.setWeights(weightsArr);\n const shape_W = this.weights['kernel'].tensor.shape;\n this.weights['W_z'] = new _Tensor.default([], [shape_W[0], this.units]);\n this.weights['W_r'] = new _Tensor.default([], [shape_W[0], this.units]);\n this.weights['W_h'] = new _Tensor.default([], [shape_W[0], this.units]);\n\n _ndarrayOps.default.assign(this.weights['W_z'].tensor, this.weights['kernel'].tensor.hi(shape_W[0], this.units).lo(0, 0));\n\n _ndarrayOps.default.assign(this.weights['W_r'].tensor, this.weights['kernel'].tensor.hi(shape_W[0], 2 * this.units).lo(0, this.units));\n\n _ndarrayOps.default.assign(this.weights['W_h'].tensor, this.weights['kernel'].tensor.hi(shape_W[0], 3 * this.units).lo(0, 2 * this.units));\n\n const shape_U = this.weights['recurrent_kernel'].tensor.shape;\n this.weights['U_z'] = new _Tensor.default([], [shape_U[0], this.units]);\n this.weights['U_r'] = new _Tensor.default([], [shape_U[0], this.units]);\n this.weights['U_h'] = new _Tensor.default([], [shape_U[0], this.units]);\n\n _ndarrayOps.default.assign(this.weights['U_z'].tensor, this.weights['recurrent_kernel'].tensor.hi(shape_U[0], this.units).lo(0, 0));\n\n _ndarrayOps.default.assign(this.weights['U_r'].tensor, this.weights['recurrent_kernel'].tensor.hi(shape_U[0], 2 * this.units).lo(0, this.units));\n\n _ndarrayOps.default.assign(this.weights['U_h'].tensor, this.weights['recurrent_kernel'].tensor.hi(shape_U[0], 3 * this.units).lo(0, 2 * this.units));\n\n this.weights['b_z'] = new _Tensor.default([], [this.units]);\n this.weights['b_r'] = new _Tensor.default([], [this.units]);\n this.weights['b_h'] = new _Tensor.default([], [this.units]);\n\n if (this.use_bias) {\n _ndarrayOps.default.assign(this.weights['b_z'].tensor, this.weights['bias'].tensor.hi(this.units).lo(0));\n\n _ndarrayOps.default.assign(this.weights['b_r'].tensor, this.weights['bias'].tensor.hi(2 * this.units).lo(this.units));\n\n _ndarrayOps.default.assign(this.weights['b_h'].tensor, this.weights['bias'].tensor.hi(3 * this.units).lo(2 * this.units));\n }\n\n if (this.gpu) {\n const names = ['W_z', 'W_r', 'W_h', 'U_z', 'U_r', 'U_h', 'b_z', 'b_r', 'b_h'];\n names.forEach(name => {\n this.weights[name].createGLTexture({\n type: '2d',\n format: 'float'\n });\n });\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n const dimUpdateGate = this.weights['b_z'].tensor.shape[0];\n const dimResetGate = this.weights['b_r'].tensor.shape[0];\n const dimHiddenState = this.weights['b_h'].tensor.shape[0];\n const currentUpdateGateState = new _Tensor.default([], [dimUpdateGate]);\n const tempXZ = new _Tensor.default([], [dimUpdateGate]);\n const tempHZ = new _Tensor.default([], [dimUpdateGate]);\n const currentResetGateState = new _Tensor.default([], [dimResetGate]);\n const tempXR = new _Tensor.default([], [dimResetGate]);\n const tempHR = new _Tensor.default([], [dimResetGate]);\n const currentHiddenState = this.stateful && this.currentHiddenState ? this.currentHiddenState : new _Tensor.default([], [dimHiddenState]);\n const tempXH = new _Tensor.default([], [dimHiddenState]);\n const tempHH = new _Tensor.default([], [dimHiddenState]);\n const previousHiddenState = new _Tensor.default([], [dimHiddenState]);\n this.hiddenStateSequence = new _Tensor.default([], [x.tensor.shape[0], dimHiddenState]);\n const currentX = new _Tensor.default([], [x.tensor.shape[1]]);\n\n const _step = () => {\n _ndarrayOps.default.assign(previousHiddenState.tensor, currentHiddenState.tensor);\n\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['W_z'].tensor.transpose(1, 0), currentX.tensor, 1, tempXZ.tensor);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['U_z'].tensor.transpose(1, 0), previousHiddenState.tensor, 1, tempHZ.tensor);\n\n this._combine(currentUpdateGateState.tensor, tempXZ.tensor, tempHZ.tensor, this.weights['b_z'].tensor);\n\n this.recurrentActivationFunc(currentUpdateGateState);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['W_r'].tensor.transpose(1, 0), currentX.tensor, 1, tempXR.tensor);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['U_r'].tensor.transpose(1, 0), previousHiddenState.tensor, 1, tempHR.tensor);\n\n this._combine(currentResetGateState.tensor, tempXR.tensor, tempHR.tensor, this.weights['b_r'].tensor);\n\n this.recurrentActivationFunc(currentResetGateState);\n\n _ndarrayOps.default.muleq(currentResetGateState.tensor, previousHiddenState.tensor);\n\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['W_h'].tensor.transpose(1, 0), currentX.tensor, 1, tempXH.tensor);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['U_h'].tensor.transpose(1, 0), currentResetGateState.tensor, 1, tempHH.tensor);\n\n this._combine(currentHiddenState.tensor, tempXH.tensor, tempHH.tensor, this.weights['b_h'].tensor);\n\n this.activationFunc(currentHiddenState);\n\n this._update(currentHiddenState.tensor, previousHiddenState.tensor, currentUpdateGateState.tensor);\n };\n\n for (let i = 0, len = x.tensor.shape[0]; i < len; i++) {\n const inputIndex = this.goBackwards ? len - i - 1 : i;\n\n _ndarrayOps.default.assign(currentX.tensor, x.tensor.pick(inputIndex, null));\n\n const tempTensors = [tempXZ, tempHZ, tempXR, tempHR, tempXH, tempHH];\n tempTensors.forEach(temp => _ndarrayOps.default.assigns(temp.tensor, 0));\n\n _step();\n\n if (this.returnSequences) {\n _ndarrayOps.default.assign(this.hiddenStateSequence.tensor.pick(i, null), currentHiddenState.tensor);\n }\n }\n\n if (this.returnSequences) {\n this.output = this.hiddenStateSequence;\n } else {\n this.output = currentHiddenState;\n }\n\n if (this.stateful) {\n this.currentHiddenState = currentHiddenState;\n }\n }\n\n _stepGPU() {\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.previousHiddenState,\n inputs: [{\n input: this.currentHiddenState,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempXZ,\n inputs: [{\n input: this.currentX,\n name: 'A'\n }, {\n input: this.weights['W_z'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempHZ,\n inputs: [{\n input: this.previousHiddenState,\n name: 'A'\n }, {\n input: this.weights['U_z'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.gateSummationProgram,\n output: this.currentUpdateGateStatePreactiv,\n inputs: [{\n input: this.tempXZ,\n name: 't1'\n }, {\n input: this.tempHZ,\n name: 't2'\n }, {\n input: this.weights['b_z'],\n name: 'bias'\n }]\n });\n\n if (this.recurrentActivation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.recurrentActivationProgram,\n output: this.currentUpdateGateState,\n inputs: [{\n input: this.currentUpdateGateStatePreactiv,\n name: 'x'\n }]\n });\n } else {\n this.currentUpdateGateState = this.currentUpdateGateStatePreactiv;\n }\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempXR,\n inputs: [{\n input: this.currentX,\n name: 'A'\n }, {\n input: this.weights['W_r'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempHR,\n inputs: [{\n input: this.previousHiddenState,\n name: 'A'\n }, {\n input: this.weights['U_r'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.gateSummationProgram,\n output: this.currentResetGateStatePreactiv,\n inputs: [{\n input: this.tempXR,\n name: 't1'\n }, {\n input: this.tempHR,\n name: 't2'\n }, {\n input: this.weights['b_r'],\n name: 'bias'\n }]\n });\n\n if (this.recurrentActivation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.recurrentActivationProgram,\n output: this.currentResetGateState,\n inputs: [{\n input: this.currentResetGateStatePreactiv,\n name: 'x'\n }]\n });\n } else {\n this.currentResetGateState = this.currentResetGateStatePreactiv;\n }\n\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.currentResetGateStateCopy,\n inputs: [{\n input: this.currentResetGateState,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.gateProductProgram,\n output: this.currentResetGateState,\n inputs: [{\n input: this.currentResetGateStateCopy,\n name: 't1'\n }, {\n input: this.previousHiddenState,\n name: 't2'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempXH,\n inputs: [{\n input: this.currentX,\n name: 'A'\n }, {\n input: this.weights['W_h'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempHH,\n inputs: [{\n input: this.currentResetGateState,\n name: 'A'\n }, {\n input: this.weights['U_h'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.gateSummationProgram,\n output: this.currentHiddenStatePreactiv,\n inputs: [{\n input: this.tempXH,\n name: 't1'\n }, {\n input: this.tempHH,\n name: 't2'\n }, {\n input: this.weights['b_h'],\n name: 'bias'\n }]\n });\n\n if (this.activation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.activationProgram,\n output: this.currentHiddenState,\n inputs: [{\n input: this.currentHiddenStatePreactiv,\n name: 'x'\n }]\n });\n } else {\n this.currentHiddenState = this.currentHiddenStatePreactiv;\n }\n\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.currentHiddenStateCopy,\n inputs: [{\n input: this.currentHiddenState,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.updateProgram,\n output: this.currentHiddenState,\n inputs: [{\n input: this.currentHiddenStateCopy,\n name: 'h'\n }, {\n input: this.previousHiddenState,\n name: 'htm1'\n }, {\n input: this.currentUpdateGateState,\n name: 'z'\n }]\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const dimUpdateGate = this.weights['b_z'].glTextureShape[1];\n const dimResetGate = this.weights['b_r'].glTextureShape[1];\n const dimHiddenState = this.weights['b_h'].glTextureShape[1];\n\n if (!this.currentHiddenState || !this.stateful) {\n this.currentHiddenState = new _Tensor.default([], [dimHiddenState]);\n this.currentHiddenState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentHiddenStateCopy) {\n this.currentHiddenStateCopy = new _Tensor.default([], [dimHiddenState]);\n this.currentHiddenStateCopy.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentHiddenStatePreactiv) {\n this.currentHiddenStatePreactiv = new _Tensor.default([], [dimHiddenState]);\n this.currentHiddenStatePreactiv.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentUpdateGateState) {\n this.currentUpdateGateState = new _Tensor.default([], [dimUpdateGate]);\n this.currentUpdateGateState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentUpdateGateStatePreactiv) {\n this.currentUpdateGateStatePreactiv = new _Tensor.default([], [dimUpdateGate]);\n this.currentUpdateGateStatePreactiv.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempXZ) {\n this.tempXZ = new _Tensor.default([], [dimUpdateGate]);\n this.tempXZ.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempHZ) {\n this.tempHZ = new _Tensor.default([], [dimUpdateGate]);\n this.tempHZ.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentResetGateState) {\n this.currentResetGateState = new _Tensor.default([], [dimResetGate]);\n this.currentResetGateState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentResetGateStateCopy) {\n this.currentResetGateStateCopy = new _Tensor.default([], [dimResetGate]);\n this.currentResetGateStateCopy.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentResetGateStatePreactiv) {\n this.currentResetGateStatePreactiv = new _Tensor.default([], [dimResetGate]);\n this.currentResetGateStatePreactiv.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempXR) {\n this.tempXR = new _Tensor.default([], [dimResetGate]);\n this.tempXR.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempHR) {\n this.tempHR = new _Tensor.default([], [dimResetGate]);\n this.tempHR.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempXH) {\n this.tempXH = new _Tensor.default([], [dimHiddenState]);\n this.tempXH.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempHH) {\n this.tempHH = new _Tensor.default([], [dimHiddenState]);\n this.tempHH.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.previousHiddenState) {\n this.previousHiddenState = new _Tensor.default([], [dimHiddenState]);\n this.previousHiddenState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.hiddenStateSequence) {\n this.hiddenStateSequence = new _Tensor.default([], [x.glTextureShape[0], dimHiddenState]);\n this.hiddenStateSequence.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.hiddenStateSequenceCopy) {\n this.hiddenStateSequenceCopy = new _Tensor.default([], [x.glTextureShape[0], dimHiddenState]);\n this.hiddenStateSequenceCopy.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentX) {\n this.currentX = new _Tensor.default([], [x.glTextureShape[1]]);\n this.currentX.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n for (let i = 0, len = x.glTextureShape[0]; i < len; i++) {\n const inputIndex = this.goBackwards ? len - i - 1 : i;\n\n _WebGL.webgl2.runProgram({\n program: this.timestepReadProgram,\n output: this.currentX,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: inputIndex,\n type: 'int',\n name: 'index'\n }]\n });\n\n this._stepGPU();\n\n if (this.returnSequences) {\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.hiddenStateSequenceCopy,\n inputs: [{\n input: this.hiddenStateSequence,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.timestepWriteProgram,\n output: this.hiddenStateSequence,\n inputs: [{\n input: this.currentHiddenState,\n name: 'x'\n }, {\n input: this.hiddenStateSequenceCopy,\n name: 'y'\n }],\n uniforms: [{\n value: i,\n type: 'int',\n name: 'index'\n }]\n });\n }\n }\n\n if (this.returnSequences) {\n this.output = this.hiddenStateSequence;\n } else {\n this.output = this.currentHiddenState;\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = GRU;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"SimpleRNN\", {\n enumerable: true,\n get: function () {\n return _SimpleRNN.default;\n }\n});\nObject.defineProperty(exports, \"LSTM\", {\n enumerable: true,\n get: function () {\n return _LSTM.default;\n }\n});\nObject.defineProperty(exports, \"GRU\", {\n enumerable: true,\n get: function () {\n return _GRU.default;\n }\n});\n\nvar _SimpleRNN = _interopRequireDefault(require(\"./SimpleRNN\"));\n\nvar _LSTM = _interopRequireDefault(require(\"./LSTM\"));\n\nvar _GRU = _interopRequireDefault(require(\"./GRU\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar layers = _interopRequireWildcard(require(\"../\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst copyTextureProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D source;\\nout vec4 outColor;\\n\\nvoid main(void) {\\n outColor = texture(source, vec2(outTex.x, outTex.y));\\n}\\n\";\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\nconst selectSliceProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform int t;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(x, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n\\n outColor = vec4(texelFetch(x, ivec2(out_x, t), 0).r);\\n}\\n\";\nconst copySliceOutputProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D outputCopy;\\nuniform sampler2D sliceOutput;\\nuniform int t;\\nuniform int timesteps;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(sliceOutput, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(timesteps) * outTex.y);\\n\\n if (t == out_y) {\\n outColor = vec4(texelFetch(sliceOutput, ivec2(out_x, 0), 0).r);\\n } else {\\n outColor = texelFetch(outputCopy, ivec2(out_x, out_y), 0);\\n }\\n}\\n\";\nconst mapSliceOutputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D outputCopy;\\nuniform sampler2D sliceOutput;\\nuniform isampler2D indexMap;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(outputCopy, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(textureSize(sliceOutput, 0)[0])));\\n int colIndex = int(mod(float(index), float(textureSize(sliceOutput, 0)[0])));\\n float val = texelFetch(sliceOutput, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = texelFetch(outputCopy, ivec2(out_x, out_y), 0);\\n }\\n}\\n\";\n\nclass TimeDistributed extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'TimeDistributed';\n const {\n layer\n } = attrs;\n\n if (!layer) {\n this.throwError('wrapped layer is undefined.');\n }\n\n const wrappedLayerAttrs = Object.assign({}, layer.config, {\n gpu: attrs.gpu\n });\n this.wrappedLayer = new layers[layer.class_name](wrappedLayerAttrs);\n this.wrappedLayer.outbound = [null];\n\n if (this.gpu) {\n this.copyTextureProgram = _WebGL.webgl2.compileProgram(copyTextureProgramSource);\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n this.selectSliceProgram = _WebGL.webgl2.compileProgram(selectSliceProgramSource);\n this.copySliceOutputProgram = _WebGL.webgl2.compileProgram(copySliceOutputProgramSource);\n this.mapSliceOutputProgram = _WebGL.webgl2.compileProgram(mapSliceOutputProgramSource);\n }\n }\n\n setWeights(weightsArr) {\n this.wrappedLayer.setWeights(weightsArr);\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n const stepShape = [...x.tensor.shape.slice(1)];\n const step = new _Tensor.default([], stepShape);\n\n _ndarrayOps.default.assign(step.tensor, x.tensor.pick(0, ...Array(stepShape.length).fill(null)));\n\n let stepOutput = this.wrappedLayer.call(step);\n const stepOutputShape = stepOutput.tensor.shape.slice();\n this.output = new _Tensor.default([], [x.tensor.shape[0], ...stepOutputShape]);\n\n _ndarrayOps.default.assign(this.output.tensor.pick(0, ...Array(stepOutputShape.length).fill(null)), stepOutput.tensor);\n\n for (let i = 1, timesteps = x.tensor.shape[0]; i < timesteps; i++) {\n _ndarrayOps.default.assign(step.tensor, x.tensor.pick(i, ...Array(stepShape.length).fill(null)));\n\n stepOutput = this.wrappedLayer.call(step);\n\n _ndarrayOps.default.assign(this.output.tensor.pick(i, ...Array(stepOutputShape.length).fill(null)), stepOutput.tensor);\n }\n }\n\n _createIndexMap(indicesForReshaped) {\n if (this.indexMaps) {\n return;\n }\n\n const indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n this.indexMaps = [];\n const timesteps = this.inputShape[0];\n const sliceShape = this.inputShape.slice(1);\n\n for (let t = 0; t < timesteps; t++) {\n const sliceIndices = new _Tensor.default([], sliceShape, {\n type: Int32Array\n });\n\n _ndarrayOps.default.assign(sliceIndices.tensor, indices.tensor.pick(t, ...Array(sliceShape.length).fill(null)));\n\n sliceIndices.reshapeTo2DSquare();\n sliceIndices.createGLTexture({\n type: '2d',\n format: 'int'\n });\n this.indexMaps.push(sliceIndices);\n }\n }\n\n _createOutputIndexMap(indicesForReshaped) {\n if (this.outputIndexMaps) {\n return;\n }\n\n const outputSliceIndices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n this.outputIndexMaps = [];\n const timesteps = this.outputShape[0];\n const sliceShape = this.outputShape.slice(1);\n\n for (let t = 0; t < timesteps; t++) {\n const outputIndices = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n\n _ndarrayOps.default.assigns(outputIndices.tensor, -1);\n\n _ndarrayOps.default.assign(outputIndices.tensor.pick(t, ...Array(sliceShape.length).fill(null)), outputSliceIndices.tensor);\n\n outputIndices.reshapeTo2DSquare();\n outputIndices.createGLTexture({\n type: '2d',\n format: 'int'\n });\n this.outputIndexMaps.push(outputIndices);\n }\n }\n\n _callGPU(x) {\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n } else {\n this.inputShape = x.tensor.shape;\n }\n\n if (!x.glTexture) {\n if (x.tensor.shape.length <= 2) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n } else if (x.tensor.shape.length > 2 && !x.is2DReshaped) {\n x.reshapeTo2DSquare();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n }\n\n if (this.inputShape.length > 2) {\n this._createIndexMap(x.indicesForReshaped);\n }\n\n const timesteps = this.inputShape[0];\n const sliceShape = this.inputShape.slice(1);\n\n if (!this.slice) {\n this.slice = new _Tensor.default([], sliceShape);\n\n if (sliceShape.length <= 2) {\n this.slice.createGLTexture({\n type: '2d',\n format: 'float'\n });\n } else {\n this.slice.reshapeTo2DSquare();\n this.slice.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n }\n\n if (this.inputShape.length <= 2) {\n _WebGL.webgl2.runProgram({\n program: this.selectSliceProgram,\n output: this.slice,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: 0,\n type: 'int',\n name: 't'\n }]\n });\n } else {\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.slice,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMaps[0],\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n }\n\n this.wrappedLayer._callGPU(this.slice);\n\n this.sliceOutput = this.wrappedLayer.output;\n\n if (!this.output) {\n if (this.inputShape.length <= 2) {\n this.outputShape = [timesteps, this.sliceOutput.glTextureShape[1]];\n this.output = new _Tensor.default([], this.outputShape);\n this.outputCopy = new _Tensor.default([], this.outputShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n this.outputCopy.createGLTexture({\n type: '2d',\n format: 'float'\n });\n } else {\n this.outputShape = [timesteps, ...this.sliceOutput.originalShape];\n this.output = new _Tensor.default([], this.outputShape);\n this.outputCopy = new _Tensor.default([], this.outputShape);\n this.output.reshapeTo2DSquare();\n this.outputCopy.reshapeTo2DSquare();\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n this.outputCopy.createGLTexture({\n type: '2d',\n format: 'float'\n });\n\n this._createOutputIndexMap(this.sliceOutput.indicesForReshaped);\n }\n }\n\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.outputCopy,\n inputs: [{\n input: this.output,\n name: 'source'\n }]\n });\n\n if (this.inputShape.length <= 2) {\n _WebGL.webgl2.runProgram({\n program: this.copySliceOutputProgram,\n output: this.output,\n inputs: [{\n input: this.outputCopy,\n name: 'outputCopy'\n }, {\n input: this.sliceOutput,\n name: 'sliceOutput'\n }],\n uniforms: [{\n value: 0,\n type: 'int',\n name: 't'\n }, {\n value: timesteps,\n type: 'int',\n name: 'timesteps'\n }]\n });\n } else {\n _WebGL.webgl2.runProgram({\n program: this.mapSliceOutputProgram,\n output: this.output,\n inputs: [{\n input: this.outputCopy,\n name: 'outputCopy'\n }, {\n input: this.sliceOutput,\n name: 'sliceOutput'\n }, {\n input: this.outputIndexMaps[0],\n name: 'indexMap'\n }]\n });\n }\n\n for (let i = 1; i < timesteps; i++) {\n if (this.inputShape.length <= 2) {\n _WebGL.webgl2.runProgram({\n program: this.selectSliceProgram,\n output: this.slice,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: i,\n type: 'int',\n name: 't'\n }]\n });\n } else {\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.slice,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMaps[i],\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n }\n\n this.wrappedLayer._callGPU(this.slice);\n\n this.sliceOutput = this.wrappedLayer.output;\n\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.outputCopy,\n inputs: [{\n input: this.output,\n name: 'source'\n }]\n });\n\n if (this.inputShape.length <= 2) {\n _WebGL.webgl2.runProgram({\n program: this.copySliceOutputProgram,\n output: this.output,\n inputs: [{\n input: this.outputCopy,\n name: 'outputCopy'\n }, {\n input: this.sliceOutput,\n name: 'sliceOutput'\n }],\n uniforms: [{\n value: i,\n type: 'int',\n name: 't'\n }, {\n value: timesteps,\n type: 'int',\n name: 'timesteps'\n }]\n });\n } else {\n _WebGL.webgl2.runProgram({\n program: this.mapSliceOutputProgram,\n output: this.output,\n inputs: [{\n input: this.outputCopy,\n name: 'outputCopy'\n }, {\n input: this.sliceOutput,\n name: 'sliceOutput'\n }, {\n input: this.outputIndexMaps[i],\n name: 'indexMap'\n }]\n });\n }\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = TimeDistributed;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar recurrentLayers = _interopRequireWildcard(require(\"../recurrent\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst copyTextureProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D source;\\nout vec4 outColor;\\n\\nvoid main(void) {\\n outColor = texture(source, vec2(outTex.x, outTex.y));\\n}\\n\";\nconst concatMergeProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D forward;\\nuniform sampler2D backward;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(forward, 0);\\n int out_x = int(float(size[0] * 2) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n if (out_x >= 0 && out_x < size[0]) {\\n outColor = vec4(texelFetch(forward, ivec2(out_x, out_y), 0).r);\\n } else {\\n outColor = vec4(texelFetch(backward, ivec2(out_x - size[0], size[1] - out_y - 1), 0).r);\\n }\\n}\\n\";\nconst sumMergeProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D forward;\\nuniform sampler2D backward;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(forward, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float forward_val = texelFetch(forward, ivec2(out_x, out_y), 0).r;\\n float backward_val = texelFetch(backward, ivec2(out_x, size[1] - out_y - 1), 0).r;\\n\\n outColor = vec4(forward_val + backward_val);\\n}\\n\";\nconst mulMergeProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D forward;\\nuniform sampler2D backward;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(forward, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float forward_val = texelFetch(forward, ivec2(out_x, out_y), 0).r;\\n float backward_val = texelFetch(backward, ivec2(out_x, size[1] - out_y - 1), 0).r;\\n\\n outColor = vec4(forward_val * backward_val);\\n}\\n\";\nconst aveMergeProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D forward;\\nuniform sampler2D backward;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(forward, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float forward_val = texelFetch(forward, ivec2(out_x, out_y), 0).r;\\n float backward_val = texelFetch(backward, ivec2(out_x, size[1] - out_y - 1), 0).r;\\n\\n outColor = vec4(0.5 * (forward_val + backward_val));\\n}\\n\";\n\nclass Bidirectional extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Bidirectional';\n const {\n layer,\n merge_mode = 'concat'\n } = attrs;\n\n if (!layer) {\n this.throwError('wrapped layer is undefined.');\n }\n\n if (!['SimpleRNN', 'GRU', 'LSTM'].includes(layer.class_name)) {\n this.throwError(`cannot wrap ${layer.class_name} layer.`);\n }\n\n if (!['concat', 'sum', 'mul', 'ave'].includes(merge_mode)) {\n this.throwError(`merge_mode ${merge_mode} not supported.`);\n }\n\n const forwardLayerAttrs = Object.assign({}, layer.config, {\n gpu: attrs.gpu\n });\n const backwardLayerAttrs = Object.assign({}, layer.config, {\n gpu: attrs.gpu\n });\n backwardLayerAttrs.go_backwards = !backwardLayerAttrs.go_backwards;\n this.forwardLayer = new recurrentLayers[layer.class_name](forwardLayerAttrs);\n this.backwardLayer = new recurrentLayers[layer.class_name](backwardLayerAttrs);\n this.forwardLayer.outbound = [null];\n this.backwardLayer.outbound = [null];\n this.mergeMode = merge_mode;\n this.returnSequences = layer.config.return_sequences;\n\n if (this.gpu) {\n this.copyTextureProgram = _WebGL.webgl2.compileProgram(copyTextureProgramSource);\n\n if (this.mergeMode === 'concat') {\n this.mergeProgram = _WebGL.webgl2.compileProgram(concatMergeProgramSource);\n } else if (this.mergeMode === 'sum') {\n this.mergeProgram = _WebGL.webgl2.compileProgram(sumMergeProgramSource);\n } else if (this.mergeMode === 'mul') {\n this.mergeProgram = _WebGL.webgl2.compileProgram(mulMergeProgramSource);\n } else if (this.mergeMode === 'ave') {\n this.mergeProgram = _WebGL.webgl2.compileProgram(aveMergeProgramSource);\n }\n }\n }\n\n setWeights(weightsArr) {\n this.forwardLayer.setWeights(weightsArr.slice(0, weightsArr.length / 2));\n this.backwardLayer.setWeights(weightsArr.slice(weightsArr.length / 2));\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.forwardLayer._callCPU(new _Tensor.default(x.tensor.data, x.tensor.shape));\n\n this.backwardLayer._callCPU(new _Tensor.default(x.tensor.data, x.tensor.shape));\n\n const forwardOutput = this.forwardLayer.output;\n const backwardOutput = this.backwardLayer.output;\n\n if (this.returnSequences) {\n backwardOutput.tensor = backwardOutput.tensor.step(-1);\n }\n\n const outShape = forwardOutput.tensor.shape.slice();\n\n if (this.mergeMode === 'concat') {\n outShape[outShape.length - 1] += backwardOutput.tensor.shape[outShape.length - 1];\n }\n\n this.output = new _Tensor.default([], outShape);\n\n if (this.mergeMode === 'concat') {\n if (this.returnSequences) {\n _ndarrayOps.default.assign(this.output.tensor.hi(outShape[0], forwardOutput.tensor.shape[1]).lo(0, 0), forwardOutput.tensor);\n\n _ndarrayOps.default.assign(this.output.tensor.hi(outShape[0], outShape[1]).lo(0, forwardOutput.tensor.shape[1]), backwardOutput.tensor);\n } else {\n _ndarrayOps.default.assign(this.output.tensor.hi(forwardOutput.tensor.shape[0]).lo(0), forwardOutput.tensor);\n\n _ndarrayOps.default.assign(this.output.tensor.hi(outShape[0]).lo(forwardOutput.tensor.shape[0]), backwardOutput.tensor);\n }\n } else if (this.mergeMode === 'sum') {\n _ndarrayOps.default.addeq(this.output.tensor, forwardOutput.tensor);\n\n _ndarrayOps.default.addeq(this.output.tensor, backwardOutput.tensor);\n } else if (this.mergeMode === 'mul') {\n _ndarrayOps.default.assigns(this.output.tensor, 1);\n\n _ndarrayOps.default.muleq(this.output.tensor, forwardOutput.tensor);\n\n _ndarrayOps.default.muleq(this.output.tensor, backwardOutput.tensor);\n } else if (this.mergeMode === 'ave') {\n _ndarrayOps.default.addeq(this.output.tensor, forwardOutput.tensor);\n\n _ndarrayOps.default.addeq(this.output.tensor, backwardOutput.tensor);\n\n _ndarrayOps.default.divseq(this.output.tensor, 2);\n }\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.inputCopy) {\n this.inputCopy = new _Tensor.default([], x.glTextureShape);\n this.inputCopy.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.inputCopy,\n inputs: [{\n input: x,\n name: 'source'\n }]\n });\n\n this.forwardLayer._callGPU(x);\n\n this.backwardLayer._callGPU(this.inputCopy);\n\n const forwardOutput = this.forwardLayer.output;\n const backwardOutput = this.backwardLayer.output;\n const outShape = forwardOutput.glTextureShape.slice();\n\n if (this.mergeMode === 'concat') {\n outShape[1] += backwardOutput.glTextureShape[1];\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], outShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n\n if (!this.returnSequences) {\n this.output.is1D = true;\n }\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mergeProgram,\n output: this.output,\n inputs: [{\n input: forwardOutput,\n name: 'forward'\n }, {\n input: backwardOutput,\n name: 'backward'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = Bidirectional;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"TimeDistributed\", {\n enumerable: true,\n get: function () {\n return _TimeDistributed.default;\n }\n});\nObject.defineProperty(exports, \"Bidirectional\", {\n enumerable: true,\n get: function () {\n return _Bidirectional.default;\n }\n});\n\nvar _TimeDistributed = _interopRequireDefault(require(\"./TimeDistributed\"));\n\nvar _Bidirectional = _interopRequireDefault(require(\"./Bidirectional\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _exportNames = {\n InputLayer: true\n};\nObject.defineProperty(exports, \"InputLayer\", {\n enumerable: true,\n get: function () {\n return _InputLayer.default;\n }\n});\n\nvar _InputLayer = _interopRequireDefault(require(\"./InputLayer\"));\n\nvar _advanced_activations = require(\"./advanced_activations\");\n\nObject.keys(_advanced_activations).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _advanced_activations[key];\n }\n });\n});\n\nvar _convolutional = require(\"./convolutional\");\n\nObject.keys(_convolutional).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _convolutional[key];\n }\n });\n});\n\nvar _core = require(\"./core\");\n\nObject.keys(_core).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _core[key];\n }\n });\n});\n\nvar _embeddings = require(\"./embeddings\");\n\nObject.keys(_embeddings).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _embeddings[key];\n }\n });\n});\n\nvar _merge = require(\"./merge\");\n\nObject.keys(_merge).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _merge[key];\n }\n });\n});\n\nvar _noise = require(\"./noise\");\n\nObject.keys(_noise).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _noise[key];\n }\n });\n});\n\nvar _normalization = require(\"./normalization\");\n\nObject.keys(_normalization).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _normalization[key];\n }\n });\n});\n\nvar _pooling = require(\"./pooling\");\n\nObject.keys(_pooling).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _pooling[key];\n }\n });\n});\n\nvar _recurrent = require(\"./recurrent\");\n\nObject.keys(_recurrent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _recurrent[key];\n }\n });\n});\n\nvar _wrappers = require(\"./wrappers\");\n\nObject.keys(_wrappers).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _wrappers[key];\n }\n });\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Tensor = _interopRequireDefault(require(\"../Tensor\"));\n\nvar _WebGL = require(\"../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _ndarrayBlasLevel = require(\"ndarray-blas-level2\");\n\nvar _ndarrayGemm = _interopRequireDefault(require(\"ndarray-gemm\"));\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../webgl/dynamic/createGLSLProgram\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass CAM {\n constructor(attrs = {}) {\n this.modelLayersMap = attrs.modelLayersMap;\n this.gpu = attrs.gpu;\n\n if (!this.modelLayersMap) {\n throw new Error(`[CAM] modelLayersMap is required`);\n }\n }\n\n initialize() {\n this.modelLayersMap.forEach(layer => {\n if (layer.layerClass === 'GlobalAveragePooling2D') {\n this.enabled = true;\n this.poolLayer = layer;\n }\n });\n\n if (this.enabled && !this.data) {\n this.featureMaps = this.modelLayersMap.get(this.poolLayer.inbound[0]).output;\n let traversingLayer = this.poolLayer;\n\n if (!traversingLayer.outbound.length) {\n this.weights = this.poolLayer.output;\n }\n\n while (traversingLayer.outbound.length) {\n traversingLayer = this.modelLayersMap.get(traversingLayer.outbound[0]);\n\n if (traversingLayer.weights['kernel']) {\n this.weights = traversingLayer.weights['kernel'];\n } else {\n this.weights = this.poolLayer.output;\n }\n }\n\n if (this.featureMaps.is2DReshaped) {\n this.inputShape = this.featureMaps.originalShape.slice(0, 2);\n } else {\n this.inputShape = this.featureMaps.tensor.shape.slice(0, 2);\n }\n\n if (this.weights.tensor.shape.length === 1) {\n this.shape = this.inputShape;\n } else {\n const numOutputClasses = this.weights.tensor.shape[1];\n this.shape = [...this.inputShape, numOutputClasses];\n }\n\n this.data = new Float32Array(this.shape.reduce((a, b) => a * b, 1));\n }\n }\n\n update() {\n if (!this.enabled) return;\n this.featureMaps = this.modelLayersMap.get(this.poolLayer.inbound[0]).output;\n\n if (this.gpu) {\n this._updateGPU();\n } else {\n this._updateCPU();\n }\n\n const outputMin = _ndarrayOps.default.inf(this.output.tensor);\n\n const outputMax = _ndarrayOps.default.sup(this.output.tensor);\n\n _ndarrayOps.default.divseq(_ndarrayOps.default.subseq(this.output.tensor, outputMin), outputMax - outputMin);\n\n this.data = this.output.tensor.data;\n }\n\n _updateCPU() {\n if (!this.featureMaps.is2DReshaped) {\n this.featureMaps.reshapeTo2D();\n }\n\n if (this.weights.tensor.shape.length === 1) {\n if (!this.output) {\n this.output = new _Tensor.default([], this.shape);\n }\n\n const matVec = new _Tensor.default([], [this.shape[0] * this.shape[1]]);\n (0, _ndarrayBlasLevel.gemv)(1, this.featureMaps.tensor, this.weights.tensor, 1, matVec.tensor);\n this.output.replaceTensorData(matVec.tensor.data);\n } else {\n if (!this.output) {\n this.output = new _Tensor.default([], this.shape);\n }\n\n this.output.reshapeTo2D();\n (0, _ndarrayGemm.default)(this.output.tensor, this.featureMaps.tensor, this.weights.tensor, 1, 1);\n this.output.reshapeFrom2D();\n }\n\n _ndarrayOps.default.maxseq(this.output.tensor, 0);\n\n if (this.featureMaps.is2DReshaped) {\n this.featureMaps.reshapeFrom2D();\n }\n }\n\n _updateGPU() {\n if (!this.output) {\n this.output = new _Tensor.default([], this.shape);\n }\n\n const isWeights1D = this.weights.is1D;\n\n if (!this.output.glTexture && isWeights1D) {\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n } else {\n this.output.reshapeTo2D();\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const numFeatures = isWeights1D ? this.weights.glTextureShape[1] : this.weights.glTextureShape[0];\n\n if (!this.program) {\n const programSource = (0, _createGLSLProgram.default)('cam', this.output.glTextureShape, numFeatures, isWeights1D);\n this.program = _WebGL.webgl2.compileProgram(programSource);\n }\n\n _WebGL.webgl2.runProgram({\n program: this.program,\n output: this.output,\n inputs: [{\n input: this.featureMaps,\n name: 'featureMaps'\n }, {\n input: this.weights,\n name: 'weights'\n }]\n });\n\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n }\n }\n\n}\n\nexports.default = CAM;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"CAM\", {\n enumerable: true,\n get: function () {\n return _CAM.default;\n }\n});\n\nvar _CAM = _interopRequireDefault(require(\"./CAM\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n","\"use strict\";\r\nvar util = exports;\r\n\r\n// used to return a Promise where callback is omitted\r\nutil.asPromise = require(\"@protobufjs/aspromise\");\r\n\r\n// converts to / from base64 encoded strings\r\nutil.base64 = require(\"@protobufjs/base64\");\r\n\r\n// base class of rpc.Service\r\nutil.EventEmitter = require(\"@protobufjs/eventemitter\");\r\n\r\n// float handling accross browsers\r\nutil.float = require(\"@protobufjs/float\");\r\n\r\n// requires modules optionally and hides the call from bundlers\r\nutil.inquire = require(\"@protobufjs/inquire\");\r\n\r\n// converts to / from utf8 encoded strings\r\nutil.utf8 = require(\"@protobufjs/utf8\");\r\n\r\n// provides a node-like buffer pool in the browser\r\nutil.pool = require(\"@protobufjs/pool\");\r\n\r\n// utility to work with the low and high bits of a 64 bit value\r\nutil.LongBits = require(\"./longbits\");\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n * @const\r\n */\r\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n * @const\r\n */\r\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n * @const\r\n */\r\nutil.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\r\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nutil.isString = function isString(value) {\r\n return typeof value === \"string\" || value instanceof String;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return value && typeof value === \"object\";\r\n};\r\n\r\n/**\r\n * Checks if a property on a message is considered to be present.\r\n * This is an alias of {@link util.isSet}.\r\n * @function\r\n * @param {Object} obj Plain object or message instance\r\n * @param {string} prop Property name\r\n * @returns {boolean} `true` if considered to be present, otherwise `false`\r\n */\r\nutil.isset =\r\n\r\n/**\r\n * Checks if a property on a message is considered to be present.\r\n * @param {Object} obj Plain object or message instance\r\n * @param {string} prop Property name\r\n * @returns {boolean} `true` if considered to be present, otherwise `false`\r\n */\r\nutil.isSet = function isSet(obj, prop) {\r\n var value = obj[prop];\r\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\r\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\r\n return false;\r\n};\r\n\r\n/**\r\n * Any compatible Buffer instance.\r\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\r\n * @interface Buffer\r\n * @extends Uint8Array\r\n */\r\n\r\n/**\r\n * Node's Buffer class if available.\r\n * @type {Constructor}\r\n */\r\nutil.Buffer = (function() {\r\n try {\r\n var Buffer = util.inquire(\"buffer\").Buffer;\r\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\r\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\r\n } catch (e) {\r\n /* istanbul ignore next */\r\n return null;\r\n }\r\n})();\r\n\r\n// Internal alias of or polyfull for Buffer.from.\r\nutil._Buffer_from = null;\r\n\r\n// Internal alias of or polyfill for Buffer.allocUnsafe.\r\nutil._Buffer_allocUnsafe = null;\r\n\r\n/**\r\n * Creates a new buffer of whatever type supported by the environment.\r\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\r\n * @returns {Uint8Array|Buffer} Buffer\r\n */\r\nutil.newBuffer = function newBuffer(sizeOrArray) {\r\n /* istanbul ignore next */\r\n return typeof sizeOrArray === \"number\"\r\n ? util.Buffer\r\n ? util._Buffer_allocUnsafe(sizeOrArray)\r\n : new util.Array(sizeOrArray)\r\n : util.Buffer\r\n ? util._Buffer_from(sizeOrArray)\r\n : typeof Uint8Array === \"undefined\"\r\n ? sizeOrArray\r\n : new Uint8Array(sizeOrArray);\r\n};\r\n\r\n/**\r\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\r\n * @type {Constructor}\r\n */\r\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\r\n * @interface Long\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\r\n\r\n/**\r\n * Long.js's Long class if available.\r\n * @type {Constructor}\r\n */\r\nutil.Long = /* istanbul ignore next */ global.dcodeIO && /* istanbul ignore next */ global.dcodeIO.Long || util.inquire(\"long\");\r\n\r\n/**\r\n * Regular expression used to verify 2 bit (`bool`) map keys.\r\n * @type {RegExp}\r\n * @const\r\n */\r\nutil.key2Re = /^true|false|0|1$/;\r\n\r\n/**\r\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\r\n * @type {RegExp}\r\n * @const\r\n */\r\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\r\n\r\n/**\r\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\r\n * @type {RegExp}\r\n * @const\r\n */\r\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? util.LongBits.from(value).toHash()\r\n : util.LongBits.zeroHash;\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = util.LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Merges the properties of the source object into the destination object.\r\n * @memberof util\r\n * @param {Object.} dst Destination object\r\n * @param {Object.} src Source object\r\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\r\n * @returns {Object.} Destination object\r\n */\r\nfunction merge(dst, src, ifNotSet) { // used by converters\r\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\r\n if (dst[keys[i]] === undefined || !ifNotSet)\r\n dst[keys[i]] = src[keys[i]];\r\n return dst;\r\n}\r\n\r\nutil.merge = merge;\r\n\r\n/**\r\n * Converts the first character of a string to lower case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.lcFirst = function lcFirst(str) {\r\n return str.charAt(0).toLowerCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Creates a custom error constructor.\r\n * @memberof util\r\n * @param {string} name Error name\r\n * @returns {Constructor} Custom error constructor\r\n */\r\nfunction newError(name) {\r\n\r\n function CustomError(message, properties) {\r\n\r\n if (!(this instanceof CustomError))\r\n return new CustomError(message, properties);\r\n\r\n // Error.call(this, message);\r\n // ^ just returns a new error instance because the ctor can be called as a function\r\n\r\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\r\n\r\n /* istanbul ignore next */\r\n if (Error.captureStackTrace) // node\r\n Error.captureStackTrace(this, CustomError);\r\n else\r\n Object.defineProperty(this, \"stack\", { value: (new Error()).stack || \"\" });\r\n\r\n if (properties)\r\n merge(this, properties);\r\n }\r\n\r\n (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;\r\n\r\n Object.defineProperty(CustomError.prototype, \"name\", { get: function() { return name; } });\r\n\r\n CustomError.prototype.toString = function toString() {\r\n return this.name + \": \" + this.message;\r\n };\r\n\r\n return CustomError;\r\n}\r\n\r\nutil.newError = newError;\r\n\r\n/**\r\n * Constructs a new protocol error.\r\n * @classdesc Error subclass indicating a protocol specifc error.\r\n * @memberof util\r\n * @extends Error\r\n * @template T extends Message\r\n * @constructor\r\n * @param {string} message Error message\r\n * @param {Object.} [properties] Additional properties\r\n * @example\r\n * try {\r\n * MyMessage.decode(someBuffer); // throws if required fields are missing\r\n * } catch (e) {\r\n * if (e instanceof ProtocolError && e.instance)\r\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\r\n * }\r\n */\r\nutil.ProtocolError = newError(\"ProtocolError\");\r\n\r\n/**\r\n * So far decoded message instance.\r\n * @name util.ProtocolError#instance\r\n * @type {Message}\r\n */\r\n\r\n/**\r\n * A OneOf getter as returned by {@link util.oneOfGetter}.\r\n * @typedef OneOfGetter\r\n * @type {function}\r\n * @returns {string|undefined} Set field name, if any\r\n */\r\n\r\n/**\r\n * Builds a getter for a oneof's present field name.\r\n * @param {string[]} fieldNames Field names\r\n * @returns {OneOfGetter} Unbound getter\r\n */\r\nutil.oneOfGetter = function getOneOf(fieldNames) {\r\n var fieldMap = {};\r\n for (var i = 0; i < fieldNames.length; ++i)\r\n fieldMap[fieldNames[i]] = 1;\r\n\r\n /**\r\n * @returns {string|undefined} Set field name, if any\r\n * @this Object\r\n * @ignore\r\n */\r\n return function() { // eslint-disable-line consistent-return\r\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\r\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\r\n return keys[i];\r\n };\r\n};\r\n\r\n/**\r\n * A OneOf setter as returned by {@link util.oneOfSetter}.\r\n * @typedef OneOfSetter\r\n * @type {function}\r\n * @param {string|undefined} value Field name\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Builds a setter for a oneof's present field name.\r\n * @param {string[]} fieldNames Field names\r\n * @returns {OneOfSetter} Unbound setter\r\n */\r\nutil.oneOfSetter = function setOneOf(fieldNames) {\r\n\r\n /**\r\n * @param {string} name Field name\r\n * @returns {undefined}\r\n * @this Object\r\n * @ignore\r\n */\r\n return function(name) {\r\n for (var i = 0; i < fieldNames.length; ++i)\r\n if (fieldNames[i] !== name)\r\n delete this[fieldNames[i]];\r\n };\r\n};\r\n\r\n/**\r\n * Default conversion options used for {@link Message#toJSON} implementations.\r\n *\r\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\r\n *\r\n * - Longs become strings\r\n * - Enums become string keys\r\n * - Bytes become base64 encoded strings\r\n * - (Sub-)Messages become plain objects\r\n * - Maps become plain objects with all string keys\r\n * - Repeated fields become arrays\r\n * - NaN and Infinity for float and double fields become strings\r\n *\r\n * @type {IConversionOptions}\r\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\r\n */\r\nutil.toJSONOptions = {\r\n longs: String,\r\n enums: String,\r\n bytes: String,\r\n json: true\r\n};\r\n\r\nutil._configure = function() {\r\n var Buffer = util.Buffer;\r\n /* istanbul ignore if */\r\n if (!Buffer) {\r\n util._Buffer_from = util._Buffer_allocUnsafe = null;\r\n return;\r\n }\r\n // because node 4.x buffers are incompatible & immutable\r\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\r\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\r\n /* istanbul ignore next */\r\n function Buffer_from(value, encoding) {\r\n return new Buffer(value, encoding);\r\n };\r\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\r\n /* istanbul ignore next */\r\n function Buffer_allocUnsafe(size) {\r\n return new Buffer(size);\r\n };\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Streaming RPC helpers.\r\n * @namespace\r\n */\r\nvar rpc = exports;\r\n\r\n/**\r\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\r\n * @typedef RPCImpl\r\n * @type {function}\r\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\r\n * @param {Uint8Array} requestData Request data\r\n * @param {RPCImplCallback} callback Callback function\r\n * @returns {undefined}\r\n * @example\r\n * function rpcImpl(method, requestData, callback) {\r\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\r\n * throw Error(\"no such method\");\r\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\r\n * callback(err, responseData);\r\n * });\r\n * }\r\n */\r\n\r\n/**\r\n * Node-style callback as used by {@link RPCImpl}.\r\n * @typedef RPCImplCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any, otherwise `null`\r\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\nrpc.Service = require(\"./rpc/service\");\r\n","\"use strict\";\r\nvar protobuf = exports;\r\n\r\n/**\r\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\r\n * @name build\r\n * @type {string}\r\n * @const\r\n */\r\nprotobuf.build = \"minimal\";\r\n\r\n// Serialization\r\nprotobuf.Writer = require(\"./writer\");\r\nprotobuf.BufferWriter = require(\"./writer_buffer\");\r\nprotobuf.Reader = require(\"./reader\");\r\nprotobuf.BufferReader = require(\"./reader_buffer\");\r\n\r\n// Utility\r\nprotobuf.util = require(\"./util/minimal\");\r\nprotobuf.rpc = require(\"./rpc\");\r\nprotobuf.roots = require(\"./roots\");\r\nprotobuf.configure = configure;\r\n\r\n/* istanbul ignore next */\r\n/**\r\n * Reconfigures the library according to the environment.\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n protobuf.Reader._configure(protobuf.BufferReader);\r\n protobuf.util._configure();\r\n}\r\n\r\n// Configure serialization\r\nprotobuf.Writer._configure(protobuf.BufferWriter);\r\nconfigure();\r\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.Model = exports.Weights = void 0;\n\nvar $protobuf = _interopRequireWildcard(require(\"protobufjs/minimal\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nconst $Reader = $protobuf.Reader,\n $Writer = $protobuf.Writer,\n $util = $protobuf.util;\nconst $root = $protobuf.roots[\"default\"] || ($protobuf.roots[\"default\"] = {});\nexports.default = $root;\n\nconst Weights = $root.Weights = (() => {\n function Weights(properties) {\n this.shape = [];\n if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];\n }\n\n Weights.prototype.layerName = \"\";\n Weights.prototype.weightName = \"\";\n Weights.prototype.shape = $util.emptyArray;\n Weights.prototype.type = \"\";\n Weights.prototype.data = $util.newBuffer([]);\n Weights.prototype.quantizeMin = 0;\n Weights.prototype.quantizeMax = 0;\n\n Weights.create = function create(properties) {\n return new Weights(properties);\n };\n\n Weights.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create();\n if (message.layerName != null && message.hasOwnProperty(\"layerName\")) writer.uint32(10).string(message.layerName);\n if (message.weightName != null && message.hasOwnProperty(\"weightName\")) writer.uint32(18).string(message.weightName);\n\n if (message.shape != null && message.shape.length) {\n writer.uint32(26).fork();\n\n for (let i = 0; i < message.shape.length; ++i) writer.uint32(message.shape[i]);\n\n writer.ldelim();\n }\n\n if (message.type != null && message.hasOwnProperty(\"type\")) writer.uint32(34).string(message.type);\n if (message.data != null && message.hasOwnProperty(\"data\")) writer.uint32(42).bytes(message.data);\n if (message.quantizeMin != null && message.hasOwnProperty(\"quantizeMin\")) writer.uint32(53).float(message.quantizeMin);\n if (message.quantizeMax != null && message.hasOwnProperty(\"quantizeMax\")) writer.uint32(61).float(message.quantizeMax);\n return writer;\n };\n\n Weights.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n Weights.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.Weights();\n\n while (reader.pos < end) {\n let tag = reader.uint32();\n\n switch (tag >>> 3) {\n case 1:\n message.layerName = reader.string();\n break;\n\n case 2:\n message.weightName = reader.string();\n break;\n\n case 3:\n if (!(message.shape && message.shape.length)) message.shape = [];\n\n if ((tag & 7) === 2) {\n let end2 = reader.uint32() + reader.pos;\n\n while (reader.pos < end2) message.shape.push(reader.uint32());\n } else message.shape.push(reader.uint32());\n\n break;\n\n case 4:\n message.type = reader.string();\n break;\n\n case 5:\n message.data = reader.bytes();\n break;\n\n case 6:\n message.quantizeMin = reader.float();\n break;\n\n case 7:\n message.quantizeMax = reader.float();\n break;\n\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n\n return message;\n };\n\n Weights.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n Weights.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null) return \"object expected\";\n if (message.layerName != null && message.hasOwnProperty(\"layerName\")) if (!$util.isString(message.layerName)) return \"layerName: string expected\";\n if (message.weightName != null && message.hasOwnProperty(\"weightName\")) if (!$util.isString(message.weightName)) return \"weightName: string expected\";\n\n if (message.shape != null && message.hasOwnProperty(\"shape\")) {\n if (!Array.isArray(message.shape)) return \"shape: array expected\";\n\n for (let i = 0; i < message.shape.length; ++i) if (!$util.isInteger(message.shape[i])) return \"shape: integer[] expected\";\n }\n\n if (message.type != null && message.hasOwnProperty(\"type\")) if (!$util.isString(message.type)) return \"type: string expected\";\n if (message.data != null && message.hasOwnProperty(\"data\")) if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data))) return \"data: buffer expected\";\n if (message.quantizeMin != null && message.hasOwnProperty(\"quantizeMin\")) if (typeof message.quantizeMin !== \"number\") return \"quantizeMin: number expected\";\n if (message.quantizeMax != null && message.hasOwnProperty(\"quantizeMax\")) if (typeof message.quantizeMax !== \"number\") return \"quantizeMax: number expected\";\n return null;\n };\n\n Weights.fromObject = function fromObject(object) {\n if (object instanceof $root.Weights) return object;\n let message = new $root.Weights();\n if (object.layerName != null) message.layerName = String(object.layerName);\n if (object.weightName != null) message.weightName = String(object.weightName);\n\n if (object.shape) {\n if (!Array.isArray(object.shape)) throw TypeError(\".Weights.shape: array expected\");\n message.shape = [];\n\n for (let i = 0; i < object.shape.length; ++i) message.shape[i] = object.shape[i] >>> 0;\n }\n\n if (object.type != null) message.type = String(object.type);\n if (object.data != null) if (typeof object.data === \"string\") $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0);else if (object.data.length) message.data = object.data;\n if (object.quantizeMin != null) message.quantizeMin = Number(object.quantizeMin);\n if (object.quantizeMax != null) message.quantizeMax = Number(object.quantizeMax);\n return message;\n };\n\n Weights.toObject = function toObject(message, options) {\n if (!options) options = {};\n let object = {};\n if (options.arrays || options.defaults) object.shape = [];\n\n if (options.defaults) {\n object.layerName = \"\";\n object.weightName = \"\";\n object.type = \"\";\n object.data = options.bytes === String ? \"\" : [];\n object.quantizeMin = 0;\n object.quantizeMax = 0;\n }\n\n if (message.layerName != null && message.hasOwnProperty(\"layerName\")) object.layerName = message.layerName;\n if (message.weightName != null && message.hasOwnProperty(\"weightName\")) object.weightName = message.weightName;\n\n if (message.shape && message.shape.length) {\n object.shape = [];\n\n for (let j = 0; j < message.shape.length; ++j) object.shape[j] = message.shape[j];\n }\n\n if (message.type != null && message.hasOwnProperty(\"type\")) object.type = message.type;\n if (message.data != null && message.hasOwnProperty(\"data\")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data;\n if (message.quantizeMin != null && message.hasOwnProperty(\"quantizeMin\")) object.quantizeMin = options.json && !isFinite(message.quantizeMin) ? String(message.quantizeMin) : message.quantizeMin;\n if (message.quantizeMax != null && message.hasOwnProperty(\"quantizeMax\")) object.quantizeMax = options.json && !isFinite(message.quantizeMax) ? String(message.quantizeMax) : message.quantizeMax;\n return object;\n };\n\n Weights.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return Weights;\n})();\n\nexports.Weights = Weights;\n\nconst Model = $root.Model = (() => {\n function Model(properties) {\n this.modelWeights = [];\n if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];\n }\n\n Model.prototype.id = \"\";\n Model.prototype.name = \"\";\n Model.prototype.kerasVersion = \"\";\n Model.prototype.backend = \"\";\n Model.prototype.modelConfig = \"\";\n Model.prototype.modelWeights = $util.emptyArray;\n\n Model.create = function create(properties) {\n return new Model(properties);\n };\n\n Model.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create();\n if (message.id != null && message.hasOwnProperty(\"id\")) writer.uint32(10).string(message.id);\n if (message.name != null && message.hasOwnProperty(\"name\")) writer.uint32(18).string(message.name);\n if (message.kerasVersion != null && message.hasOwnProperty(\"kerasVersion\")) writer.uint32(26).string(message.kerasVersion);\n if (message.backend != null && message.hasOwnProperty(\"backend\")) writer.uint32(34).string(message.backend);\n if (message.modelConfig != null && message.hasOwnProperty(\"modelConfig\")) writer.uint32(42).string(message.modelConfig);\n if (message.modelWeights != null && message.modelWeights.length) for (let i = 0; i < message.modelWeights.length; ++i) $root.Weights.encode(message.modelWeights[i], writer.uint32(50).fork()).ldelim();\n return writer;\n };\n\n Model.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n Model.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.Model();\n\n while (reader.pos < end) {\n let tag = reader.uint32();\n\n switch (tag >>> 3) {\n case 1:\n message.id = reader.string();\n break;\n\n case 2:\n message.name = reader.string();\n break;\n\n case 3:\n message.kerasVersion = reader.string();\n break;\n\n case 4:\n message.backend = reader.string();\n break;\n\n case 5:\n message.modelConfig = reader.string();\n break;\n\n case 6:\n if (!(message.modelWeights && message.modelWeights.length)) message.modelWeights = [];\n message.modelWeights.push($root.Weights.decode(reader, reader.uint32()));\n break;\n\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n\n return message;\n };\n\n Model.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n Model.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null) return \"object expected\";\n if (message.id != null && message.hasOwnProperty(\"id\")) if (!$util.isString(message.id)) return \"id: string expected\";\n if (message.name != null && message.hasOwnProperty(\"name\")) if (!$util.isString(message.name)) return \"name: string expected\";\n if (message.kerasVersion != null && message.hasOwnProperty(\"kerasVersion\")) if (!$util.isString(message.kerasVersion)) return \"kerasVersion: string expected\";\n if (message.backend != null && message.hasOwnProperty(\"backend\")) if (!$util.isString(message.backend)) return \"backend: string expected\";\n if (message.modelConfig != null && message.hasOwnProperty(\"modelConfig\")) if (!$util.isString(message.modelConfig)) return \"modelConfig: string expected\";\n\n if (message.modelWeights != null && message.hasOwnProperty(\"modelWeights\")) {\n if (!Array.isArray(message.modelWeights)) return \"modelWeights: array expected\";\n\n for (let i = 0; i < message.modelWeights.length; ++i) {\n let error = $root.Weights.verify(message.modelWeights[i]);\n if (error) return \"modelWeights.\" + error;\n }\n }\n\n return null;\n };\n\n Model.fromObject = function fromObject(object) {\n if (object instanceof $root.Model) return object;\n let message = new $root.Model();\n if (object.id != null) message.id = String(object.id);\n if (object.name != null) message.name = String(object.name);\n if (object.kerasVersion != null) message.kerasVersion = String(object.kerasVersion);\n if (object.backend != null) message.backend = String(object.backend);\n if (object.modelConfig != null) message.modelConfig = String(object.modelConfig);\n\n if (object.modelWeights) {\n if (!Array.isArray(object.modelWeights)) throw TypeError(\".Model.modelWeights: array expected\");\n message.modelWeights = [];\n\n for (let i = 0; i < object.modelWeights.length; ++i) {\n if (typeof object.modelWeights[i] !== \"object\") throw TypeError(\".Model.modelWeights: object expected\");\n message.modelWeights[i] = $root.Weights.fromObject(object.modelWeights[i]);\n }\n }\n\n return message;\n };\n\n Model.toObject = function toObject(message, options) {\n if (!options) options = {};\n let object = {};\n if (options.arrays || options.defaults) object.modelWeights = [];\n\n if (options.defaults) {\n object.id = \"\";\n object.name = \"\";\n object.kerasVersion = \"\";\n object.backend = \"\";\n object.modelConfig = \"\";\n }\n\n if (message.id != null && message.hasOwnProperty(\"id\")) object.id = message.id;\n if (message.name != null && message.hasOwnProperty(\"name\")) object.name = message.name;\n if (message.kerasVersion != null && message.hasOwnProperty(\"kerasVersion\")) object.kerasVersion = message.kerasVersion;\n if (message.backend != null && message.hasOwnProperty(\"backend\")) object.backend = message.backend;\n if (message.modelConfig != null && message.hasOwnProperty(\"modelConfig\")) object.modelConfig = message.modelConfig;\n\n if (message.modelWeights && message.modelWeights.length) {\n object.modelWeights = [];\n\n for (let j = 0; j < message.modelWeights.length; ++j) object.modelWeights[j] = $root.Weights.toObject(message.modelWeights[j], options);\n }\n\n return object;\n };\n\n Model.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return Model;\n})();\n\nexports.Model = Model;","export default {};\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _keys2 = _interopRequireDefault(require(\"lodash/keys\"));\n\nvar _isEqual2 = _interopRequireDefault(require(\"lodash/isEqual\"));\n\nvar _map2 = _interopRequireDefault(require(\"lodash/map\"));\n\nvar _every2 = _interopRequireDefault(require(\"lodash/every\"));\n\nvar _find2 = _interopRequireDefault(require(\"lodash/find\"));\n\nvar _pick2 = _interopRequireDefault(require(\"lodash/pick\"));\n\nvar _bluebird = _interopRequireDefault(require(\"bluebird\"));\n\nvar _axios = _interopRequireDefault(require(\"axios\"));\n\nvar _performanceNow = _interopRequireDefault(require(\"performance-now\"));\n\nvar _eventemitter = require(\"eventemitter3\");\n\nvar layers = _interopRequireWildcard(require(\"./layers\"));\n\nvar visMethods = _interopRequireWildcard(require(\"./visualizations\"));\n\nvar _Tensor = _interopRequireDefault(require(\"./Tensor\"));\n\nvar _WebGL = require(\"./WebGL2\");\n\nvar _proto = _interopRequireDefault(require(\"./proto\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst axiosSource = _axios.default.CancelToken.source();\n\nclass Model {\n constructor(config = {}) {\n const {\n filepath = null,\n headers = {},\n filesystem = false,\n gpu = false,\n transferLayerOutputs = false,\n pauseAfterLayerCalls = false,\n visualizations = []\n } = config;\n\n if (!filepath) {\n throw new Error('[Model] path to protobuf-serialized model definition file is missing.');\n }\n\n this.filepath = filepath;\n this.headers = headers;\n this.filesystem = typeof window !== 'undefined' ? false : filesystem;\n this.events = new _eventemitter.EventEmitter();\n this.id = null;\n this.name = null;\n this.kerasVersion = null;\n this.backend = null;\n this.modelConfig = {};\n this.modelWeights = [];\n this.gpu = typeof window !== 'undefined' && _WebGL.webgl2.isSupported ? gpu : false;\n this.transferLayerOutputs = transferLayerOutputs;\n this.pauseAfterLayerCalls = pauseAfterLayerCalls;\n this.modelLayersInfo = [];\n this.modelLayersMap = new Map();\n this.inputTensorsMap = new Map();\n this.inputLayerNames = [];\n this.outputLayerNames = [];\n this.finishedLayerNames = [];\n this.isRunning = false;\n this.runningProgress = 0;\n this.predictStats = {};\n this.visMap = new Map();\n visualizations.forEach(v => {\n if (v in visMethods) {\n const visInstance = new visMethods[v]({\n modelLayersMap: this.modelLayersMap,\n gpu: this.gpu\n });\n this.visMap.set(v, visInstance);\n }\n });\n this._ready = this._initialize();\n }\n\n checkGPUSupport() {\n return _WebGL.webgl2.isSupported;\n }\n\n ready() {\n return this._ready;\n }\n\n _interrupt() {\n axiosSource.cancel();\n }\n\n async _initialize() {\n this.events.emit('loadingProgress', 0);\n\n try {\n const req = this.filesystem ? this._dataRequestFS() : this._dataRequestHTTP(this.headers);\n await req;\n } catch (err) {\n console.log(err);\n\n this._interrupt();\n }\n\n this.events.emit('loadingProgress', 100);\n\n this._buildDAG();\n\n this.inputLayerNames.forEach(name => {\n const inputLayer = this.modelLayersMap.get(name);\n inputLayer.call(this.inputTensorsMap.get(name));\n inputLayer.hasOutput = true;\n inputLayer.visited = true;\n });\n const _pauseAfterLayerCalls = this.pauseAfterLayerCalls;\n this.pauseAfterLayerCalls = true;\n this.runningProgress = 0;\n this.events.emit('initProgress', 0);\n await this._traverseDAG(this.inputLayerNames, 'initProgress');\n this.pauseAfterLayerCalls = _pauseAfterLayerCalls;\n this.finishedLayerNames = [];\n this.modelLayersMap.forEach(layer => {\n layer.hasOutput = false;\n layer.visited = false;\n });\n this.visMap.forEach(visInstance => {\n visInstance.initialize();\n });\n this.events.emit('initProgress', 100);\n return true;\n }\n\n async _dataRequestHTTP(headers = {}) {\n try {\n const res = await _axios.default.get(this.filepath, {\n responseType: 'arraybuffer',\n headers,\n onDownloadProgress: e => {\n if (e.lengthComputable) {\n const percentComplete = Math.round(100 * e.loaded / e.total);\n this.events.emit('loadingProgress', percentComplete);\n }\n },\n cancelToken: axiosSource.token\n });\n\n this._decodeProtobuf(new Uint8Array(res.data));\n } catch (err) {\n if (_axios.default.isCancel(err)) {\n console.log('[Model] Data request canceled', err.message);\n } else {\n throw err;\n }\n }\n }\n\n async _dataRequestFS() {\n const readFile = _bluebird.default.promisify(require('fs').readFile);\n\n try {\n const file = await readFile(this.filepath);\n\n this._decodeProtobuf(file);\n } catch (err) {\n throw err;\n }\n }\n\n _decodeProtobuf(buffer) {\n const err = _proto.default.Model.verify(buffer);\n\n if (err) {\n throw new Error(`[Model] Invalid model - check protobuf serialization: {err}`);\n }\n\n const model = _proto.default.Model.decode(buffer);\n\n this.id = model.id;\n this.name = model.name;\n this.kerasVersion = model.kerasVersion;\n this.backend = model.backend;\n this.modelConfig = JSON.parse(model.modelConfig);\n this.modelWeights = model.modelWeights;\n }\n\n toggleGPU(mode) {\n if (typeof mode === 'undefined') {\n this.gpu = !this.gpu;\n } else {\n this.gpu = mode;\n }\n\n this.modelLayersMap.forEach(layer => {\n layer.toggleGPU(this.gpu);\n });\n this.visMap.forEach(visInstance => {\n visInstance.gpu = this.gpu;\n });\n this.resetInputTensors();\n }\n\n resetInputTensors() {\n this.inputLayerNames.forEach(name => {\n const inputLayer = this.modelLayersMap.get(name);\n this.inputTensorsMap.set(name, new _Tensor.default([], inputLayer.shape));\n });\n }\n\n _buildDAG() {\n const modelClass = this.modelConfig.class_name;\n let modelConfig = [];\n\n if (modelClass === 'Sequential') {\n modelConfig = this.modelConfig.config;\n } else if (modelClass === 'Model') {\n modelConfig = this.modelConfig.config.layers;\n }\n\n if (!(Array.isArray(modelConfig) && modelConfig.length)) {\n throw new Error('[Model] Model configuration does not contain any layers.');\n }\n\n modelConfig.forEach((layerDef, index) => {\n const layerClass = layerDef.class_name;\n const layerConfig = layerDef.config;\n\n if (modelClass === 'Model' && layerClass === 'Sequential') {\n layerConfig.forEach((branchLayerDef, branchIndex) => {\n const branchLayerClass = branchLayerDef.class_name;\n const branchLayerConfig = branchLayerDef.config;\n const branchInboundLayerNames = branchIndex === 0 ? layerDef.inbound_nodes[0].map(node => node[0]) : [layerConfig[branchIndex - 1].config.name];\n\n this._createLayer(branchLayerClass, branchLayerConfig, branchInboundLayerNames);\n });\n } else if (!(layerClass in layers)) {\n throw new Error(`[Model] Layer ${layerClass} specified in model configuration is not implemented!`);\n } else {\n if (modelClass === 'Sequential' && index === 0) {\n const inputName = 'input';\n const inputShape = layerConfig.batch_input_shape.slice(1);\n const layer = new layers.InputLayer({\n name: inputName,\n shape: inputShape,\n gpu: this.gpu\n });\n this.modelLayersMap.set(inputName, layer);\n this.inputTensorsMap.set(inputName, new _Tensor.default([], inputShape));\n this.inputLayerNames.push(inputName);\n } else if (modelClass === 'Model' && layerClass === 'InputLayer') {\n const inputShape = layerConfig.batch_input_shape.slice(1);\n this.inputTensorsMap.set(layerConfig.name, new _Tensor.default([], inputShape));\n this.inputLayerNames.push(layerConfig.name);\n }\n\n let inboundLayerNames = [];\n\n if (modelClass === 'Sequential') {\n if (index === 0) {\n inboundLayerNames = ['input'];\n } else {\n inboundLayerNames = [modelConfig[index - 1].config.name];\n }\n } else if (modelClass === 'Model') {\n const inboundNodes = layerDef.inbound_nodes;\n\n if (inboundNodes && inboundNodes.length) {\n inboundLayerNames = inboundNodes[0].map(node => node[0]);\n }\n }\n\n this._createLayer(layerClass, layerConfig, inboundLayerNames);\n }\n });\n this.modelLayersMap.forEach(layer => {\n this.modelLayersInfo.push((0, _pick2.default)(layer, ['name', 'description', 'layerClass', 'inbound', 'outbound']));\n\n if (layer.outbound.length === 0) {\n this.outputLayerNames.push(layer.name);\n }\n });\n this.inputLayerNames.sort();\n this.outputLayerNames.sort();\n }\n\n _createLayer(layerClass, layerConfig, inboundLayerNames) {\n const layer = new layers[layerClass](Object.assign({}, layerConfig, {\n gpu: this.gpu\n }));\n let weightNames = [];\n\n if (layerClass === 'Bidirectional') {\n const forwardWeightNames = layer.forwardLayer.params.map(param => `${layerConfig.name}/forward_${layerConfig.layer.config.name}/${param}`);\n const backwardWeightNames = layer.backwardLayer.params.map(param => `${layerConfig.name}/backward_${layerConfig.layer.config.name}/${param}`);\n weightNames = forwardWeightNames.concat(backwardWeightNames);\n } else if (layerClass === 'TimeDistributed') {\n weightNames = layer.layer.params.map(param => `${layerConfig.name}/${param}`);\n } else {\n weightNames = layer.params.map(param => `${layerConfig.name}/${param}`);\n }\n\n if (weightNames && weightNames.length) {\n const weights = weightNames.map(weightName => {\n const weightDef = (0, _find2.default)(this.modelWeights, w => {\n const weightRE = new RegExp(`^.*${weightName}`);\n return weightRE.test(w.weightName);\n });\n\n if (!weightDef) {\n throw new Error(`[Model] error loading weights.`);\n }\n\n const {\n data,\n shape,\n type\n } = weightDef;\n const buf = new ArrayBuffer(data.byteLength);\n const arr = new Uint8Array(buf);\n arr.set(new Uint8Array(data.buffer, data.byteOffset, data.byteLength));\n\n if (type === 'uint8') {\n const {\n quantizeMin,\n quantizeMax\n } = weightDef;\n const unquantized = new Float32Array(arr);\n\n for (let i = 0, len = unquantized.length; i < len; i++) {\n unquantized[i] *= (quantizeMax - quantizeMin) / 255;\n unquantized[i] += quantizeMin;\n }\n\n return new _Tensor.default(unquantized, shape);\n } else {\n return new _Tensor.default(new Float32Array(buf), shape);\n }\n });\n layer.setWeights(weights);\n }\n\n this.modelLayersMap.set(layerConfig.name, layer);\n inboundLayerNames.forEach(layerName => {\n this.modelLayersMap.get(layerConfig.name).inbound.push(layerName);\n this.modelLayersMap.get(layerName).outbound.push(layerConfig.name);\n });\n }\n\n async _traverseDAG(nodes, eventName) {\n if (nodes.length === 0) {\n this.runningProgress = 100;\n this.events.emit(eventName, 100);\n return true;\n } else if (nodes.length === 1) {\n const node = nodes[0];\n const currentLayer = this.modelLayersMap.get(node);\n\n if (currentLayer.layerClass === 'InputLayer') {\n this.finishedLayerNames.push(this.modelLayersMap.get(node).name);\n } else {\n const currentLayer = this.modelLayersMap.get(node);\n\n if (currentLayer.visited) {\n return false;\n }\n\n const inboundLayers = currentLayer.inbound.map(n => this.modelLayersMap.get(n));\n\n if (!(0, _every2.default)((0, _map2.default)(inboundLayers, 'hasOutput'))) {\n return false;\n }\n\n if (currentLayer.isMergeLayer) {\n currentLayer.call((0, _map2.default)(inboundLayers, 'output'));\n } else {\n currentLayer.call(inboundLayers[0].output);\n }\n\n currentLayer.hasOutput = true;\n currentLayer.visited = true;\n this.finishedLayerNames.push(currentLayer.name);\n\n if (this.pauseAfterLayerCalls) {\n await _bluebird.default.delay(0);\n }\n }\n\n this.runningProgress += 100 / this.modelLayersMap.size;\n this.events.emit(eventName, this.runningProgress);\n await this._traverseDAG(currentLayer.outbound, eventName);\n } else {\n await _bluebird.default.all(nodes.map(node => this._traverseDAG([node], eventName)));\n }\n }\n\n _maybeTransferIntermediateOutputs() {\n if (this.gpu && this.transferLayerOutputs) {\n this.modelLayersMap.forEach(layer => {\n if (layer.output && layer.output.glTexture) {\n _WebGL.webgl2.bindOutputTexture(layer.output.glTexture, layer.output.glTextureShape);\n\n layer.output.transferFromGLTexture();\n\n if (layer.output.is2DReshaped) {\n layer.output.reshapeFrom2D();\n }\n }\n });\n }\n }\n\n loadData(inputData) {\n this.inputLayerNames.forEach(name => {\n const inputLayer = this.modelLayersMap.get(name);\n this.inputTensorsMap.get(name).replaceTensorData(inputData[name]);\n inputLayer.call(this.inputTensorsMap.get(name));\n inputLayer.hasOutput = true;\n inputLayer.visited = true;\n });\n }\n\n async predict(inputData) {\n this.isRunning = true;\n this.runningProgress = 0;\n this.events.emit('predictProgress', 0);\n\n if (!(0, _isEqual2.default)((0, _keys2.default)(inputData).sort(), this.inputLayerNames)) {\n this.isRunning = false;\n throw new Error('[Model] predict() must take an object where the keys are the named inputs of the model: ' + JSON.stringify(this.inputLayerNames));\n }\n\n if (!(0, _every2.default)(this.inputLayerNames, name => inputData[name] instanceof Float32Array)) {\n this.isRunning = false;\n throw new Error('[Model] predict() must take an object where the values are the flattened data as Float32Array.');\n }\n\n this.finishedLayerNames = [];\n this.modelLayersMap.forEach(layer => {\n layer.hasOutput = false;\n layer.visited = false;\n });\n let start = (0, _performanceNow.default)();\n this.loadData(inputData);\n this.predictStats.loadData = (0, _performanceNow.default)() - start;\n start = (0, _performanceNow.default)();\n await this._traverseDAG(this.inputLayerNames, 'predictProgress');\n this.predictStats.forwardPass = (0, _performanceNow.default)() - start;\n\n this._maybeTransferIntermediateOutputs();\n\n const modelClass = this.modelConfig.class_name;\n const outputData = {};\n\n if (modelClass === 'Sequential') {\n const outputLayer = this.modelLayersMap.get(this.outputLayerNames[0]);\n outputData['output'] = outputLayer.output.tensor.data;\n } else if (modelClass === 'Model') {\n this.outputLayerNames.forEach(layerName => {\n const outputLayer = this.modelLayersMap.get(layerName);\n outputData[layerName] = outputLayer.output.tensor.data;\n });\n }\n\n start = (0, _performanceNow.default)();\n this.visMap.forEach(visInstance => {\n visInstance.update();\n });\n this.predictStats.visualizations = (0, _performanceNow.default)() - start;\n this.isRunning = false;\n this.events.emit('predictProgress', 100);\n return outputData;\n }\n\n layerCall(layerName, input) {\n if (!this.modelLayersMap.has(layerName)) return;\n let x;\n\n if (input instanceof _Tensor.default) {\n x = input;\n } else {\n x = new _Tensor.default(input.data, input.shape);\n }\n\n const layer = this.modelLayersMap.get(layerName);\n return layer.call(x);\n }\n\n cleanup() {\n _WebGL.webgl2.clearRefs();\n\n this.modelLayersMap.clear();\n this.inputTensorsMap.clear();\n this.visMap.clear();\n delete this.modelWeights;\n }\n\n}\n\nexports.default = Model;","\"use strict\"\n\nvar dup = require(\"dup\")\nvar cwise = require(\"cwise\")\n\nvar do_unpack = cwise({ \n args: [\"array\", \"scalar\", \"index\"],\n body: function unpackCwise(arr, a, idx) {\n var v = a, i\n for(i=0;i b[i] + tol) {\n return false;\n }\n }\n\n return true;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Model\", {\n enumerable: true,\n get: function () {\n return _Model.default;\n }\n});\nObject.defineProperty(exports, \"Tensor\", {\n enumerable: true,\n get: function () {\n return _Tensor.default;\n }\n});\nexports.testUtils = exports.layers = exports.activations = exports.default = exports.GPU_SUPPORT = void 0;\n\nrequire(\"@babel/polyfill\");\n\nvar _Model = _interopRequireDefault(require(\"./Model\"));\n\nvar _Tensor = _interopRequireDefault(require(\"./Tensor\"));\n\nvar _WebGL = require(\"./WebGL2\");\n\nvar activations = _interopRequireWildcard(require(\"./activations\"));\n\nexports.activations = activations;\n\nvar layers = _interopRequireWildcard(require(\"./layers\"));\n\nexports.layers = layers;\n\nvar testUtils = _interopRequireWildcard(require(\"./utils/testUtils\"));\n\nexports.testUtils = testUtils;\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst GPU_SUPPORT = _WebGL.webgl2.isSupported;\nexports.GPU_SUPPORT = GPU_SUPPORT;\nconst KerasJS = {\n Model: _Model.default,\n Tensor: _Tensor.default,\n GPU_SUPPORT,\n activations,\n layers,\n testUtils\n};\nexports.default = KerasJS;"],"names":["parseFloat","toPrecision","reverseInputs","result","reversedInput","reverse","open","high","low","close","volume","timestamp","hasPattern","map","Array","hasOwnProperty","call","nativeObjectToString","Object","getRawTag","objectToString","isObjectLike","baseGetTag","test","isLength","length","isArray","isArguments","isBuffer","isTypedArray","baseTimes","String","isIndex","push","constructor","prototype","isPrototype","nativeKeys","isObject","isFunction","isArrayLike","arrayLikeKeys","baseKeys","__data__","size","eq","assocIndexOf","pop","clear","set","get","has","funcToString","isMasked","toSource","getValue","baseIsNative","nativeCreate","Map","isKeyable","getMapData","add","arraySome","cacheHas","forEach","byteLength","byteOffset","buffer","name","message","equalArrays","arrayPush","baseGetAllKeys","getAllKeys","getTag","equalByTag","value","equalObjects","baseIsEqualDeep","baseIsEqual","COMPARE_PARTIAL_FLAG","keys","isStrictComparable","getMatchData","matchesStrictComparable","baseIsMatch","isSymbol","TypeError","arguments","apply","cache","Cache","memoize","arrayMap","baseToString","isKey","stringToPath","toString","castPath","toKey","baseGet","hasPath","hasIn","baseProperty","basePropertyDeep","baseMatchesProperty","baseMatches","property","baseFor","baseEach","baseIteratee","isIterateeCall","valueOf","replace","slice","toNumber","toFinite","toInteger","baseFindIndex","defineProperty","baseAssignValue","assignValue","baseSet","basePickBy","baseFlatten","nativeMax","setToString","overRest","readFloatLE","FormData","ArrayBuffer","isView","pipe","URLSearchParams","navigator","product","window","document","encodeURIComponent","charAt","charCodeAt","isUndefined","XMLHttpRequest","process","handlers","cancelToken","throwIfRequested","defaults","interceptors","request","response","promise","Promise","reason","Axios","extend","baseRange","stride","sort","join","Function","iota","array","arrayArgs","indexArgs","blockSize","body","args","count","RegExp","indexOf","argTypes","offsetArgIndex","offsetArgs","arrayBlockIndices","lvalue","Error","scalarArgs","trim","match","shapeArgs","offset","concat","pre","thisVars","post","debug","console","log","funcName","shimArgs","bind","blockIndices","printCode","createThunk","shape","data","rvalue","localVars","self","expression","callee","params","range","parent","type","left","operator","parse","computed","object","warn","compile","baseSlice","baseSum","order","dtype","generatePlan","Number","isFinite","splice","blas1","dot","pick","scal","error","hi","lo","malloc","ops","assign","free","Infinity","pool","zeros","dimension","_listeners","Math","LN2","Float32Array","isNaN","NaN","writeFloatLE","writeFloatBE","readFloatBE","Uint8Array","Float64Array","writeDoubleLE","writeDoubleBE","readDoubleLE","readDoubleBE","eval","fn","len","next","val","head","tail","states","Writer","util","utf8","write","utf8Write","RangeError","pos","buf","Reader","EventEmitter","rpcImpl","requestDelimited","responseDelimited","toFixed","reduce","values","ready","predict","input","output","pattern","AvailablePatterns","patternId","probability","DB","DT","HS","IHS","TU","TD","sign","floor","exp","fromCharCode","ceil","round","min","max","abs","sqrt","pow","prev","_length","_head","_tail","current","_current","_next","shift","unshift","unshiftCurrent","removeCurrent","resetCursor","maintainHigh","maintainLow","maintainSum","totalPushed","periodHigh","periodLow","periodSum","_push","lastShift","calculatePeriodHigh","calculatePeriodLow","iterator","format","getResult","period","price","generator","nextValue","calculate","sma","SimpleMAOscillator","SimpleMASignal","fastPeriod","slowPeriod","signalPeriod","MACD","signal","histogram","stdDev","sd","middle","upper","lower","pb","adx","pdi","mdi","wema","ROCPer1","ROCPer2","ROCPer3","ROCPer4","SMAROCPer1","SMAROCPer2","SMAROCPer3","SMAROCPer4","kst","step","k","d","ema","noOfBars","rangeStart","rangeEnd","bullishVolume","bearishVolume","totalVolume","rsiPeriod","stochasticPeriod","kPeriod","dPeriod","rsi","stochastic","stochRSI","useATR","brickSize","Low","approximateEqual","logic","getAllPatternIndex","requiredCount","_generateDataForCandleStick","filter","_getLastDataForCandleStick","downwardTrend","includesHammer","hasConfirmation","upwardTrend","global","freeGlobal","Symbol","root","objectProto","symToStringTag","toStringTag","propertyIsEnumerable","baseIsArguments","nodeType","exports","Buffer","MAX_SAFE_INTEGER","argsTag","binding","nodeUtil","baseUnary","overArg","funcTag","exec","coreJsData","IE_PROTO","funcProto","getNative","HASH_UNDEFINED","COMPARE_UNORDERED_FLAG","boolTag","dateTag","errorTag","mapTag","numberTag","regexpTag","setTag","stringTag","arrayBufferTag","dataViewTag","getOwnPropertySymbols","arrayFilter","DataView","objectTag","weakMapTag","resolve","Set","WeakMap","arrayTag","symbolTag","memoizeCapped","symbolProto","INFINITY","createBaseFor","createBaseEach","parseInt","createFind","isConcatSpreadable","constant","Date","now","shortOut","flatRest","basePick","_dereq_","code","setHowMany","setUnwrap","init","_SomePromiseArray","any","_customScheduler","_isTickUsed","_lateQueue","_normalQueue","_haveDrainedQueues","_trampolineEnabled","drainQueues","_drainQueues","_schedule","_queueTick","_pushOne","setScheduler","hasCustomScheduler","enableTrampoline","disableTrampolineIfNecessary","hasDevTools","haveItemsQueued","fatalError","stderr","stack","exit","throwLater","setTimeout","invokeLater","invoke","settlePromises","_settlePromises","_drainQueue","_reset","firstLineError","_reject","promiseRejectionQueued","bindingPromise","_then","_bitField","_resolveCallback","target","_propagateFrom","propagateFromFunction","_boundValue","boundValueFunction","_target","_setBoundTo","_setOnCancel","_boundTo","_isBound","noConflict","create","classString","canEvaluate","isIdentifier","tryCatch","errorObj","_async","cancel","cancellation","_warn","_isCancellable","_cancelBy","_isFollowing","_followee","_cancelBranched","_cancellationParent","_setWillBeCancelled","_branchHasCancelled","_branchesRemainingToCancel","_enoughBranchesHaveCancelled","_invokeOnCancel","_cancel","_setCancelled","_cancelPromises","_unsetOnCancel","_onCancelField","isPending","_isCancelled","isCancellable","isCancelled","_doInvokeOnCancel","_resultCancelled","_attachExtraTrace","e","_onCancel","_invokeInternalOnCancel","predicateLoop","_trace","CapturedTrace","_promiseCreated","_pushContext","_popContext","_peekContext","deactivateLongStackTraces","activateLongStackTraces","_attachCancellationCallback","isFulfilled","_parent","attachExtraTrace","__stackCleaned__","notEnumerableProp","warnings","longStackTraces","split","JSON","stringify","substr","fileName","line","_promisesCreated","uncycle","_getDomain","Warning","canAttachTrace","env","suppressUnhandledRejections","_ensurePossibleRejectionHandled","_setRejectionIsUnhandled","_notifyUnhandledRejection","_notifyUnhandledRejectionIsHandled","_setReturnedNonUndefined","_returnedNonUndefined","_isRejectionUnhandled","_settledValue","_setUnhandledRejectionIsNotified","_unsetUnhandledRejectionIsNotified","_isUnhandledRejectionNotified","_unsetRejectionIsUnhandled","onPossiblyUnhandledRejection","domainBind","onUnhandledRejectionHandled","_captureStackTrace","hasLongStackTraces","CustomEvent","dispatchEvent","toLowerCase","detail","cancelable","Event","createEvent","initCustomEvent","isNode","emit","promiseCreated","promiseFulfilled","promiseRejected","promiseResolved","promiseCancelled","promiseChained","child","warning","unhandledRejection","rejectionHandled","config","wForgottenReturn","_clearCancellationData","_execute","monitoring","_fireEvent","inherits","stackTraceLimit","captureStackTrace","isTTY","checkForgottenReturns","setBounds","deprecated","fireDomEvent","fireGlobalEvent","thenReturn","thenThrow","catchThrow","caught","catchReturn","all","each","mapSeries","cause","freeze","configurable","writable","enumerable","CancellationError","TimeoutError","OperationalError","RejectionError","AggregateError","getDescriptor","getOwnPropertyDescriptor","names","getOwnPropertyNames","getPrototypeOf","isES5","propertyIsWritable","handler","called","cancelPromise","finallyHandler","isFinallyHandler","isRejected","_passThrough","then","lastly","tap","tapCatch","reject","_finallyPromise","_promise","_stack","_generatorFunction","_receiver","_generator","_yieldHandlers","_yieldedPromise","_cancellationPhase","_isResolved","_cleanup","_fulfill","_promiseCancelled","coroutine","returnSentinel","_continue","_promiseFulfilled","_promiseRejected","_run","_rejectCallback","done","_proxy","_reason","_value","yieldHandler","addYieldHandler","spawn","spread","constructor$","_callback","_preservedValues","_limit","_inFlight","_queue","_asyncInit","concurrency","_init$","_init","_values","_totalResolved","_resolve","_filter","preservedValues","method","_resolveFromSyncValue","attempt","markAsOriginatingFromRejection","maybeWrapAsError","asCallback","nodeify","_fulfillmentHandler0","_rejectionHandler0","_promise0","_receiver0","_resolveFromExecutor","PromiseInspection","domain","reflect","_setIsFinal","toJSON","fulfillmentValue","rejectionReason","originatesFromRejection","getNewLibraryCopy","is","fromNode","fromCallback","multiArgs","_isFateSealed","_setAsyncGuaranteed","cast","_setFulfilled","fulfilled","rejected","_settlePromiseCtx","_settlePromiseLateCancellationObserver","receiver","_addCallbacks","_setLength","_setRejected","_setFollowing","_isFinal","_unsetCancelled","_receiverAt","_promiseAt","_fulfillmentHandlerAt","_rejectionHandlerAt","_migrateCallback0","_migrateCallbackAt","_setFollowee","ensureErrorObject","_settlePromiseFromHandler","_settlePromise","_settlePromise0","_clearCallbackDataAtIndex","_fulfillPromises","_rejectPromises","defer","pending","version","toFastProperties","a","b","c","lastLineError","asArray","_resolveEmptyArray","_iterate","getActualLength","shouldCopyValues","__isPromisified__","getDataPropertyOrDefault","inheritedDataKeys","withAppended","promisify","context","copyDescriptors","promisifyAll","suffix","promisifier","isClass","_isMap","props","_capacity","_front","_willBeOverCapacity","_checkCapacity","_resizeTo","race","_fn","_initialValue","_currentCancellable","_eachValues","accum","_gotAccum","index","_eachComplete","_resultCancelled$","getNativePromise","MutationObserver","setImmediate","nextTick","isRecentNode","standalone","cordova","createElement","attributes","classList","toggle","observe","disconnect","_promiseResolved","_settledValueField","settle","_howMany","_unwrap","_initialized","_canPossiblyFulfill","_getRangeError","howMany","_addFulfilled","_fulfilled","_addRejected","_checkOutcome","_rejected","some","isResolved","__isCancelled","handle","clearTimeout","delay","timeout","_isDisposable","_getDisposer","_setDisposable","tryDispose","_data","_context","isDisposer","resources","resource","doDispose","_unsetDisposable","using","_disposer","disposer","enumeration","from","thrower","isPrimitive","isError","filledRange","chrome","loadTimes","hasEnvVariables","versions","node","P","_isBuffer","isArrayBuffer","isFormData","isArrayBufferView","isString","isNumber","isDate","isFile","isBlob","isStream","isURLSearchParams","isStandardBrowserEnv","merge","toUpperCase","validateStatus","status","toISOString","setAttribute","href","protocol","host","search","hash","hostname","port","pathname","userAgent","location","toGMTString","cookie","read","decodeURIComponent","remove","btoa","headers","XDomainRequest","url","onprogress","ontimeout","auth","username","password","Authorization","paramsSerializer","readyState","responseURL","getAllResponseHeaders","responseType","responseText","statusText","onerror","withCredentials","xsrfCookieName","cookies","xsrfHeaderName","setRequestHeader","onDownloadProgress","addEventListener","onUploadProgress","upload","abort","send","adapter","transformRequest","transformResponse","maxContentLength","common","use","eject","__CANCEL__","baseURL","source","token","axios","Cancel","CancelToken","isCancel","performance","hrtime","uptime","getTime","once","_events","_eventsCount","__proto__","eventNames","listeners","listenerCount","removeListener","on","removeAllListeners","off","addListener","prefixed","isSupported","vertexShader","canvas","getContext","getExtension","MAX_TEXTURE_SIZE","getParameter","MAX_TEXTURE_IMAGE_UNITS","_refs","textures","buffers","createCommonVertexShader","createShader","VERTEX_SHADER","shaderSource","compileShader","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","deleteShader","compileProgram","FRAGMENT_SHADER","createProgram","attachShader","linkProgram","getProgramParameter","LINK_STATUS","getProgramInfoLog","setupVertices","getAttribLocation","createBuffer","bindBuffer","ARRAY_BUFFER","storeRef","bufferData","STATIC_DRAW","vertexAttribPointer","FLOAT","enableVertexAttribArray","ELEMENT_ARRAY_BUFFER","Uint16Array","selectProgram","useProgram","bindUniforms","getUniformLocation","uniform1f","uniform1i","bindInputTextures","activeTexture","TEXTURE0","glTextureFragments","textureTarget","getWebGLTextureOptions","glTextureType","glTextureFormat","bindTexture","glTexture","glTextureFragmentsAsColStack","bindOutputTexture","viewport","framebuffer","createFramebuffer","bindFramebuffer","FRAMEBUFFER","framebufferTexture2D","COLOR_ATTACHMENT0","TEXTURE_2D","runProgram","program","inputs","uniforms","supportsTextureFragments","glTextureFragmentShape","drawElements","TRIANGLES","UNSIGNED_SHORT","glTextureShape","readData","readPixels","RGBA","TEXTURE_2D_ARRAY","TEXTURE_3D","float","R32F","int","R32I","RED","RED_INTEGER","INT","textureInternalFormat","textureFormat","textureType","clearRefs","deleteTexture","deleteBuffer","layerClass","description","gpu","_WebGL","webgl2","weights","inbound","outbound","throwError","toggleGPU","setWeights","createGLTexture","createRange","proc","sub","mul","div","mod","band","bor","bxor","lshift","rshift","rrshift","not","bnot","neg","recip","and","or","neq","lt","gt","leq","geq","__esModule","default","Int32Array","assigns","muls","addeq","subarray","fill","tensorUtils","arrayType","checkShape","tensor","is1D","_create2DRowFragmentedGLTexture","_create2DGLTexture","_create3DGLTexture","createTexture","texImage2D","texParameteri","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","TEXTURE_MAG_FILTER","NEAREST","TEXTURE_MIN_FILTER","data3DLayoutForGL","texImage3D","convert2DRowFragmentedGLTextureToColStack","glTextureFragmentsAsColStackShape","READ_FRAMEBUFFER","copyTexSubImage2D","deleteFramebuffer","removeGLTextureFragmentsAsColStack","deleteGLTexture","replaceTensorData","texSubImage2D","texSubImage3D","transferFromGLTexture","reshapeTo2D","originalShape","indicesForReshaped","createIndicesFor2DReshaped","is2DReshaped","reshapeFrom2D","reshapeTo2DSquare","is2DSquareReshaped","reshapeFrom2DSquare","batch_input_shape","_callGPU","_callCPU","inputShape","sup","subseq","expeq","sum","divseq","NonAsciiIdentifierStart","NonAsciiIdentifierPart","lastCommentStart","loc","comments","attachComment","leadingComments","trailingComments","start","column","end","UnexpectedToken","Identifier","Keyword","NullLiteral","BooleanLiteral","lineNumber","lineStart","tokenize","openParenToken","tokens","openCurlyToken","Punctuator","NumericLiteral","octal","StringLiteral","startLineNumber","startLineStart","InvalidRegExp","UnterminatedRegExp","literal","RegularExpression","EOF","errors","UnexpectedEOS","UnexpectedNumber","UnexpectedString","UnexpectedIdentifier","UnexpectedReserved","StrictReservedWord","MemberExpression","markEnd","createArrayExpression","StrictParamName","createFunctionExpression","StrictOctalLiteral","createLiteral","createIdentifier","createProperty","key","kind","Data","Get","StrictDuplicateProperty","AccessorDataProperty","AccessorGetSet","createObjectExpression","createThisExpression","createNewExpression","allowIn","createMemberExpression","createCallExpression","StrictLHSPostfix","InvalidLHSInAssignment","createPostfixExpression","StrictLHSPrefix","createUnaryExpression","argument","StrictDelete","prec","createBinaryExpression","createConditionalExpression","StrictLHSAssignment","createAssignmentExpression","createSequenceExpression","expressions","createBlockStatement","StrictVarName","createVariableDeclarator","createVariableDeclaration","createEmptyStatement","createExpressionStatement","createIfStatement","inIteration","createDoWhileStatement","createWhileStatement","declarations","InvalidLHSInForIn","createForStatement","createForInStatement","IllegalContinue","createContinueStatement","labelSet","UnknownLabel","inSwitch","IllegalBreak","createBreakStatement","inFunctionBody","IllegalReturn","createReturnStatement","StrictModeWith","createWithStatement","createSwitchCase","createSwitchStatement","MultipleDefaultsInSwitch","NewlineAfterThrow","createThrowStatement","StrictCatchVariable","createCatchClause","NoCatchOrFinally","createTryStatement","createDebuggerStatement","Redeclaration","createLabeledStatement","Literal","StrictParamDupe","stricted","firstRestricted","StrictFunctionName","createFunctionDeclaration","AssignmentExpression","ArrayExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ConditionalExpression","ContinueStatement","DoWhileStatement","DebuggerStatement","EmptyStatement","ExpressionStatement","ForStatement","ForInStatement","FunctionDeclaration","FunctionExpression","IfStatement","LabeledStatement","LogicalExpression","NewExpression","ObjectExpression","Program","Property","ReturnStatement","SequenceExpression","SwitchStatement","SwitchCase","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","processComment","bottomRightStack","postProcess","elements","right","label","param","consequent","alternate","update","id","rest","raw","properties","prefix","discriminant","cases","block","guardedHandlers","finalizer","comment","tolerant","Syntax","alpha","maxValue","mins","mulseq","maxseq","minseq","tanh","_activations","relu","_compute","theta","activations","filters","kernel_size","strides","padding","data_format","dilation_rate","activation","use_bias","kernelShape","dataFormat","dilationRate","activationFunc","useBias","mapInputProgram","mapInputFragmentsProgram","matMulProgram","activationProgram","transpose","_w2row","wRowsMat","_calcOutputShape","outputShape","inputPadding","_padInput","_im2col","imColsMat","_createIndexMap","indexMap","outputPreactiv","convProgram","_conv2dAttrs","_conv2d","_createOutputReshapeIndexMap","reshapeIndexMap","outputReshaped","depth_multiplier","depthwiseConvAttrs","pointwiseConvAttrs","_depthwiseConv","_pointwiseConv","outputPadding","addseq","matMulResult","convTransposeProgram","_vol2col","volColsMat","cropping","exporst","trmv","trsv","units","input_dim","_ndarrayBlasLevel","gemv","rate","p","flattenProgram","flattenFragmentsProgram","target_shape","targetShape","dims","bits","log2","nextPow2","Uint32Array","Int8Array","Int16Array","Uint8ClampedArray","__TYPEDARRAY_POOL","UINT8","UINT16","UINT32","INT8","INT16","INT32","DOUBLE","DATA","UINT8C","BUFFER","n","output_dim","input_length","mask_zero","inputDim","outputDim","inputLength","maskZero","isMergeLayer","_validateInputs","mode","every","dotAxes","concatAxis","mergeProgram","muleq","maxeq","mineq","axis","axes","normalize","norm2","stddev","epsilon","center","scale","axisNormalized","sqrteq","subeq","diveq","normAxisIndexMap","pool_size","poolSize","poolingFunc","poolingProgram","poolingFragmentsProgram","poolIndexMap","NEGATIVE_INFINITY","tiledInput","return_sequences","go_backwards","stateful","returnSequences","goBackwards","copyTextureProgram","gateSummationProgram","timestepReadProgram","timestepWriteProgram","currentHiddenState","hiddenStateSequence","_combine","_stepGPU","previousHiddenState","tempXH","currentX","tempHH","currentHiddenStatePreactiv","hiddenStateSequenceCopy","recurrent_activation","recurrentActivation","recurrentActivationFunc","recurrentActivationProgram","gateProductProgram","updateProgram","previousCandidate","_update","tempXI","tempHI","currentInputGateStatePreactiv","currentInputGateState","tempXF","tempHF","currentForgetGateStatePreactiv","currentForgetGateState","tempXO","tempHO","currentOutputGateStatePreactiv","currentOutputGateState","tempXC","tempHC","currentCandidatePreactiv","currentCandidate","currentCandidateCopy","tempXZ","tempHZ","currentUpdateGateStatePreactiv","currentUpdateGateState","tempXR","tempHR","currentResetGateStatePreactiv","currentResetGateState","currentResetGateStateCopy","currentHiddenStateCopy","layers","layer","wrappedLayer","class_name","selectSliceProgram","copySliceOutputProgram","mapSliceOutputProgram","indexMaps","_createOutputIndexMap","outputIndexMaps","sliceOutput","outputCopy","merge_mode","includes","forwardLayer","backwardLayer","mergeMode","inputCopy","InputLayer","_advanced_activations","_convolutional","_core","_embeddings","_merge","_noise","_normalization","_pooling","_recurrent","_wrappers","modelLayersMap","initialize","enabled","poolLayer","featureMaps","_updateGPU","_updateCPU","inf","encode","decode","ctx","LongBits","zero","zzEncode","zzDecode","zeroHash","fromNumber","Long","fromString","toLong","unsigned","fromHash","toHash","asPromise","base64","inquire","emptyArray","emptyObject","isInteger","isset","isSet","_Buffer_from","_Buffer_allocUnsafe","newBuffer","dcodeIO","key2Re","key32Re","key64Re","longToHash","longFromHash","fromBits","lcFirst","substring","newError","ProtocolError","oneOfGetter","oneOfSetter","toJSONOptions","longs","enums","bytes","json","_configure","allocUnsafe","alloc","uint32","int32","sint32","uint64","int64","sint64","bool","fixed32","sfixed32","fixed64","sfixed64","double","string","fork","reset","ldelim","finish","BufferWriter","copy","_slice","skip","skipType","BufferReader","utf8Slice","rpcCall","Service","build","rpc","roots","configure","Weights","layerName","weightName","quantizeMin","quantizeMax","encodeDelimited","decodeDelimited","verify","fromObject","toObject","arrays","Model","modelWeights","kerasVersion","backend","modelConfig","filepath","filesystem","transferLayerOutputs","pauseAfterLayerCalls","visualizations","events","_eventemitter","modelLayersInfo","inputTensorsMap","inputLayerNames","outputLayerNames","finishedLayerNames","isRunning","runningProgress","predictStats","visMap","_ready","_initialize","checkGPUSupport","_interrupt","_dataRequestFS","_dataRequestHTTP","_buildDAG","hasOutput","visited","_traverseDAG","lengthComputable","loaded","total","_decodeProtobuf","require$$13","readFile","resetInputTensors","inbound_nodes","_createLayer","_maybeTransferIntermediateOutputs","loadData","forwardPass","layerCall","cleanup","cwise","testUtils","Tensor","GPU_SUPPORT","__dirname","predictPattern","hasDoubleBottom","hasDoubleTop","hasHeadAndShoulder","hasInverseHeadAndShoulder","isTrendingUp","isTrendingDown"],"mappings":"4BACA,eAAsC,CAClC,OACH,CACD,aAA+B,CAC3B,MAAO,MACV,CCLM,aAAmB,CACtB,GAAI,GAAY,EAAU,WAAV,CAAhB,CADsB,SAGXA,WAAW,EAAEC,WAAF,GAAX,CAHW,EAMzB,CCiDD,aAA2B,CACvB,GAAUC,aAAV,GADuB,CAEvB,GAAI,GAAS,UAAeC,MAA5B,CAKA,MAJI,GAAMC,aAIV,EAHI,EAAOC,OAAP,EAGJ,C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,CAA+BsX,OAAOvP,OAAtC,CACvB,CACD,QAAU,CAAG,CACb,GAAI,IAAY,EAAU,YAAV,GAA2B,iBAA3C,CACI,GAAQ,GAAI,IAAQ28C,KAAZ,CAAkB,CAC1BK,SAAU,GAAoB4C,UAAY,YAAhC,GADgB,CAE1BnnB,MAF0B,CAG1BwkB,aAH0B,CAAlB,CADZ,CAaA,CAAC,WAA6B,CAC1B,EAAkB,KAA0B,CAA5C,EAAiD,IADvB,CAE1B,EAAkB,MAA2B,CAA7C,EAAkD,KAFxB,CAG1B,EAAkB,KAA0B,CAA5C,EAAiD,IAHvB,CAI1B,EAAkB,KAA0B,CAA5C,EAAiD,IAJvB,CAK1B,EAAkB,KAA0B,CAA5C,EAAiD,IALvB,CAM1B,EAAkB,KAA0B,CAA5C,EAAiD,IACpD,CAPD,EAOGx0C,mBAAAA,GAAsBA,mBAAAA,GAAtBA,CAPH,EA0FA,mBAA+C,EAE/C,GAAgBo3C,cAAhB,IACA,GAAgBC,eAAhB,IACA,GAAgBC,YAAhB,IACA,GAAgBC,kBAAhB,IACA,GAAgBC,yBAAhB,IACA,GAAgBC,YAAhB,IACA,GAAgBC,cAAhB,ICvCA,GAAI,IAAsB,IAA1B"} \ No newline at end of file diff --git a/dist/browser.js b/dist/browser.js index 046c95e..fd10214 100644 --- a/dist/browser.js +++ b/dist/browser.js @@ -1,2 +1 @@ -(function(e,t){'use strict';function a(e,t){Qn[e]=t}function r(e){return Qn[e]}function o(e){var t=r('precision');return t?parseFloat(e.toPrecision(t)):e}function n(e){Jn.reverseInputs(e);var t=new ti(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function i(e){Jn.reverseInputs(e);var t=new ai(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function u(e){Jn.reverseInputs(e);var t=new ri(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function l(e){Jn.reverseInputs(e);var t=new oi(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function s(e){Jn.reverseInputs(e);var t=new ii(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function p(e){Jn.reverseInputs(e);var t=new li(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function d(e){Jn.reverseInputs(e);var t=new pi(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function c(e){Jn.reverseInputs(e);var t=new ci(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function g(e){Jn.reverseInputs(e);var t=new hi(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function h(e){Jn.reverseInputs(e);var t=new _i(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function f(e){Jn.reverseInputs(e);var t=new yi(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function m(e){Jn.reverseInputs(e);var t=new Ti(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function _(e){Jn.reverseInputs(e);var t=new Ci(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function y(e){Jn.reverseInputs(e);var t=new Mi(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function x(e){Jn.reverseInputs(e);var t=new Ii(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function v(e){Jn.reverseInputs(e);var t=new Ri(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function b(e){Jn.reverseInputs(e);var t=new Li(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function S(e){Jn.reverseInputs(e);var t=new zi(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function P(e){Jn.reverseInputs(e);var t=new Gi(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function T(e){Jn.reverseInputs(e);var t=new qi(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function w(e){Jn.reverseInputs(e);var t=new Ni(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function k(e){Jn.reverseInputs(e);var t=new Hi(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function C(e){Jn.reverseInputs(e);var t=new Xi(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function F(e){Jn.reverseInputs(e);var t=new Ki(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function M(e){Jn.reverseInputs(e);var t=new Qi(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function D(e){Jn.reverseInputs(e);var t=new Ji(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function I(e,t,a,r){return e<=a&&t>=a||a<=e&&r>=e}function R(e){Jn.reverseInputs(e);var t=new tu(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function A(e){Jn.reverseInputs(e);var t=new ru(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function L(e){Jn.reverseInputs(e);var t=new nu(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function O(e){Jn.reverseInputs(e);var t=new uu(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function z(e){Jn.reverseInputs(e);var t=new su(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function j(e){Jn.reverseInputs(e);var t=new du(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function G(e){Jn.reverseInputs(e);var t=new gu(e).result;return e.reversedInput&&t.reverse(),Jn.reverseInputs(e),t}function U(e){Jn.reverseInputs(e);var t=new fu(e).result;return e.reversedInput&&(t.open.reverse(),t.high.reverse(),t.low.reverse(),t.close.reverse(),t.volume.reverse(),t.timestamp.reverse()),Jn.reverseInputs(e),t}function q(e){Jn.reverseInputs(e);var t=new _u(e).result;return e.reversedInput&&(t.open.reverse(),t.high.reverse(),t.low.reverse(),t.close.reverse(),t.volume.reverse(),t.timestamp.reverse()),Jn.reverseInputs(e),t}function B(e){return new xu().hasPattern(e)}function N(e){return new vu().hasPattern(e)}function V(e){return new bu().hasPattern(e)}function H(e){return new Su().hasPattern(e)}function W(e){return new Pu().hasPattern(e)}function X(e){return new Tu().hasPattern(e)}function $(e){return new wu().hasPattern(e)}function K(e){return new ku().hasPattern(e)}function Z(e){return new Cu().hasPattern(e)}function Q(e){return new Fu().hasPattern(e)}function Y(e){return new Mu().hasPattern(e)}function J(e){return new Du().hasPattern(e)}function ee(e){return new Iu().hasPattern(e)}function te(e){return new Eu().hasPattern(e)}function ae(e){return new Ru().hasPattern(e)}function re(e){return new Au().hasPattern(e)}function oe(e){return new Lu().hasPattern(e)}function ne(e){return new zu().hasPattern(e)}function ie(e){return new ju().hasPattern(e)}function ue(e){return new Gu().hasPattern(e)}function le(e){return new Uu().hasPattern(e)}function se(e){return new qu().hasPattern(e)}function pe(e){return new Bu().hasPattern(e)}function de(e){return new Nu().hasPattern(e)}function ce(e){return new Vu().hasPattern(e)}function ge(e){return new Hu().hasPattern(e)}function he(e){return new Wu().hasPattern(e)}function fe(e){return new Xu().hasPattern(e)}function me(e){return new $u().hasPattern(e)}function _e(e){return new Ku().hasPattern(e)}function ye(e){return new Qu().hasPattern(e)}function xe(e){return new Yu().hasPattern(e)}function ve(e){return new Ju().hasPattern(e)}function be(e){return new el().hasPattern(e)}function Se(e){return new tl().hasPattern(e)}function Pe(e){return new al().hasPattern(e)}function Te(e){return new rl().hasPattern(e)}function we(e,t){var a=[0,23.6,38.2,50,61.8,78.6,100,127.2,161.8,261.8,423.6],r;return r=ea)return!1;var r=t.length-1;return a==r?t.pop():Bs.call(t,a,1),--this.size,!0}function Qe(e){var t=this.__data__,a=Us(t,e);return 0>a?void 0:t[a][1]}function Ye(e){return-1r?(++this.size,a.push([e,t])):a[r][1]=t,this}function et(e){var t=-1,a=null==e?0:e.length;for(this.clear();++tu))return!1;var s=n.get(e);if(s&&n.get(t))return s==t;var p=-1,d=!0,c=a&Kp?new Hp:void 0;for(n.set(e,t),n.set(t,e);++pe?-1:1;return t*xg}return e===e?e:0}function Fa(e){var t=vg(e),a=t%1;return t===t?a?t-a:t:0}function Ma(e,t,a){var r=null==e?0:e.length;if(!r)return-1;var o=null==a?0:bg(a);return 0>o&&(o=Sg(r+o,0)),pg(e,Kc(t,3),o)}function Da(e,t,a){'__proto__'==t&&Cg?Cg(e,t,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[t]=a}function Ia(e,t,a){var r=e[t];Dg.call(e,t)&&Gs(r,a)&&(a!==void 0||t in e)||Fg(e,t,a)}function Ea(e,t,a,r){if(!Ds(e))return e;t=Ac(t,e);for(var o=-1,n=t.length,i=e;null!=i&&++o=Hg)return arguments[0];return e.apply(void 0,arguments)}}function Ba(e){return Zg(qg(e,void 0,jg),e+'')}function Na(e){return!!e.constructor&&'function'==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function Va(e){return'function'==typeof e.readFloatLE&&'function'==typeof e.slice&&Na(e.slice(0,0))}function Ha(e){return'[object Array]'===rh.call(e)}function Wa(e){return'[object ArrayBuffer]'===rh.call(e)}function Xa(e){return'undefined'!=typeof FormData&&e instanceof FormData}function $a(e){var t;return t='undefined'!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer,t}function Ka(e){return'string'==typeof e}function Za(e){return'number'==typeof e}function Qa(e){return'undefined'==typeof e}function Ya(e){return null!==e&&'object'===('undefined'==typeof e?'undefined':jn(e))}function Ja(e){return'[object Date]'===rh.call(e)}function er(e){return'[object File]'===rh.call(e)}function tr(e){return'[object Blob]'===rh.call(e)}function ar(e){return'[object Function]'===rh.call(e)}function rr(e){return Ya(e)&&ar(e.pipe)}function or(e){return'undefined'!=typeof URLSearchParams&&e instanceof URLSearchParams}function nr(e){return e.replace(/^\s*/,'').replace(/\s*$/,'')}function ir(){return'undefined'!=typeof navigator&&'ReactNative'===navigator.product?!1:'undefined'!=typeof window&&'undefined'!=typeof document}function ur(e,t){if(null!==e&&'undefined'!=typeof e)if('object'!==('undefined'==typeof e?'undefined':jn(e))&&(e=[e]),Ha(e))for(var a=0,r=e.length;a>8-8*(r%1))){if(i=t.charCodeAt(r+=3/4),255t&&(a='View_Nil'+e);var r='generic'===e;if(-1===t){var o='function '+a+'(a){this.data=a;};var proto='+a+'.prototype;proto.dtype=\''+e+'\';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new '+a+'(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_'+a+'(a){return new '+a+'(a);}',n=new Function(o);return n()}if(0===t){var o='function '+a+'(a,d) {this.data = a;this.offset = d};var proto='+a+'.prototype;proto.dtype=\''+e+'\';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function '+a+'_copy() {return new '+a+'(this.data,this.offset)};proto.pick=function '+a+'_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function '+a+'_get(){return '+(r?'this.data.get(this.offset)':'this.data[this.offset]')+'};proto.set=function '+a+'_set(v){return '+(r?'this.data.set(this.offset,v)':'this.data[this.offset]=v')+'};return function construct_'+a+'(a,b,c,d){return new '+a+'(a,d)}',n=new Function('TrivialArray',o);return n(Xh[e][0])}var o=['\'use strict\''],u=Hh(t),l=u.map(function(e){return'i'+e}),s='this.offset+'+u.map(function(e){return'this.stride['+e+']*i'+e}).join('+'),p=u.map(function(e){return'b'+e}).join(','),d=u.map(function(e){return'c'+e}).join(',');o.push('function '+a+'(a,'+p+','+d+',d){this.data=a','this.shape=['+p+']','this.stride=['+d+']','this.offset=d|0}','var proto='+a+'.prototype','proto.dtype=\''+e+'\'','proto.dimension='+t),o.push('Object.defineProperty(proto,\'size\',{get:function '+a+'_size(){return '+u.map(function(e){return'this.shape['+e+']'}).join('*'),'}})'),1===t?o.push('proto.order=[0]'):(o.push('Object.defineProperty(proto,\'order\',{get:'),4>t?(o.push('function '+a+'_order(){'),2===t?o.push('return (Math.abs(this.stride[0])>Math.abs(this.stride[1]))?[1,0]:[0,1]}})'):3===t&&o.push('var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})')):o.push('ORDER})')),o.push('proto.set=function '+a+'_set('+l.join(',')+',v){'),r?o.push('return this.data.set('+s+',v)}'):o.push('return this.data['+s+']=v}'),o.push('proto.get=function '+a+'_get('+l.join(',')+'){'),r?o.push('return this.data.get('+s+')}'):o.push('return this.data['+s+']}'),o.push('proto.index=function '+a+'_index(',l.join(),'){return '+s+'}'),o.push('proto.hi=function '+a+'_hi('+l.join(',')+'){return new '+a+'(this.data,'+u.map(function(e){return['(typeof i',e,'!==\'number\'||i',e,'<0)?this.shape[',e,']:i',e,'|0'].join('')}).join(',')+','+u.map(function(e){return'this.stride['+e+']'}).join(',')+',this.offset)}');var c=u.map(function(e){return'a'+e+'=this.shape['+e+']'}),g=u.map(function(e){return'c'+e+'=this.stride['+e+']'});o.push('proto.lo=function '+a+'_lo('+l.join(',')+'){var b=this.offset,d=0,'+c.join(',')+','+g.join(','));for(var h=0;h=0){d=i'+h+'|0;b+=c'+h+'*d;a'+h+'-=d}');o.push('return new '+a+'(this.data,'+u.map(function(e){return'a'+e}).join(',')+','+u.map(function(e){return'c'+e}).join(',')+',b)}'),o.push('proto.step=function '+a+'_step('+l.join(',')+'){var '+u.map(function(e){return'a'+e+'=this.shape['+e+']'}).join(',')+','+u.map(function(e){return'b'+e+'=this.stride['+e+']'}).join(',')+',c=this.offset,d=0,ceil=Math.ceil');for(var h=0;h=0){c=(c+this.stride['+h+']*i'+h+')|0}else{a.push(this.shape['+h+']);b.push(this.stride['+h+'])}');o.push('var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}'),o.push('return function construct_'+a+'(data,shape,stride,offset){return new '+a+'(data,'+u.map(function(e){return'shape['+e+']'}).join(',')+','+u.map(function(e){return'stride['+e+']'}).join(',')+',offset)}');var n=new Function('CTOR_LIST','ORDER',o.join('\n'));return n(Xh[e],Tr)}function kr(e){if(ah(e))return'buffer';if(Wh)switch(Object.prototype.toString.call(e)){case'[object Float64Array]':return'float64';case'[object Float32Array]':return'float32';case'[object Int8Array]':return'int8';case'[object Int16Array]':return'int16';case'[object Int32Array]':return'int32';case'[object Uint8Array]':return'uint8';case'[object Uint16Array]':return'uint16';case'[object Uint32Array]':return'uint32';case'[object Uint8ClampedArray]':return'uint8_clamped';}return Array.isArray(e)?'array':'generic'}function Cr(e,t,a,r){if(e===void 0){var o=Xh.array[0];return o([])}'number'==typeof e&&(e=[e]);t===void 0&&(t=[e.length]);var n=t.length;if(a===void 0){a=Array(n);for(var u=n-1,i=1;0<=u;--u)a[u]=i,i*=t[u]}if(void 0===r){r=0;for(var u=0;ua[u]&&(r-=(t[u]-1)*a[u])}for(var l=kr(e),s=Xh[l];s.length<=n+1;)s.push(wr(l,s.length-1));var o=s[n+1];return o(e,t,a,r)}function Fr(e,t){for(var r=1,o=e.length,n=e[0],a=e[0],u=1;u0;){'].join('')),s.push(['if(j',p,'<',u,'){'].join('')),s.push(['s',t[p],'=j',p].join('')),s.push(['j',p,'=0'].join('')),s.push(['}else{s',t[p],'=',u].join('')),s.push(['j',p,'-=',u,'}'].join('')),l&&s.push(['index[',t[p],']=j',p].join(''));for(var p=0,i;p=i.count)){var l=new RegExp(i.name,'g'),s='',p=t.arrayArgs.indexOf(u);switch(t.argTypes[u]){case'offset':var d=t.offsetArgIndex.indexOf(u),c=t.offsetArgs[d];p=c.array,s='+q'+d;case'array':s='p'+p+s;var g='l'+u,h='a'+p;if(0===t.arrayBlockIndices[p])1===i.count?'generic'===a[p]?i.lvalue?(o.push(['var ',g,'=',h,'.get(',s,')'].join('')),r=r.replace(l,g),n.push([h,'.set(',s,',',g,')'].join(''))):r=r.replace(l,[h,'.get(',s,')'].join('')):r=r.replace(l,[h,'[',s,']'].join('')):'generic'===a[p]?(o.push(['var ',g,'=',h,'.get(',s,')'].join('')),r=r.replace(l,g),i.lvalue&&n.push([h,'.set(',s,',',g,')'].join(''))):(o.push(['var ',g,'=',h,'[',s,']'].join('')),r=r.replace(l,g),i.lvalue&&n.push([h,'[',s,']=',g].join('')));else{for(var f=[i.name],m=[s],_=0;_e.arrayBlockIndices[n]?(l.push(0),s.push(a),i.push(a),u.push(a+e.arrayBlockIndices[n])):(l.push(e.arrayBlockIndices[n]),s.push(e.arrayBlockIndices[n]+a),i.push(0),u.push(e.arrayBlockIndices[n]));for(var d=[],c=0;ce.arrayBlockIndices[0]?','+e.arrayBlockIndices[0]+')':')'].join('')],l=[],s=[],p=0,i;p0;) {'),t.push('if (!('+s.join(' && ')+')) throw new Error(\'cwise: Arrays do not all have the same shape!\')'),t.push('}'));for(var p=0;p=t.arrayArgs.length)throw new Error('cwise: No array arguments specified');if(t.pre.args.length>a.length)throw new Error('cwise: Too many arguments in pre() block');if(t.body.args.length>a.length)throw new Error('cwise: Too many arguments in body() block');if(t.post.args.length>a.length)throw new Error('cwise: Too many arguments in post() block');return t.debug=!!e.printCode||!!e.debug,t.funcName=e.funcName||'cwise',t.blockSize=e.blockSize||64,Qh(t)}function Ur(e,t){var a=[],r=[],o;if(t!==void 0&&!Array.isArray(t))throw new Error('axes must be an Array list of dimensions to squeeze');for(o=0;osf.indexOf(t)&&0>pf.indexOf(t)&&console.warn('cwise: Unknown argument \''+t+'\' passed to expression compiler');for(var a=0;at&&(t=-t>o?0:o+t),a=a>o?o:a,0>a&&(a+=o),o=t>a?0:a-t>>>0,t>>>=0;for(var n=Array(o);++rt?0:t)):[]}function Kr(e,t){for(var a=-1,r=e.length,o;++ad;++d)n.push('for(var i',d,'=',u[d],';i',d,'>0;){','var w',d,'=',Nf,';','if(i',d,'<',Nf,'){','w',d,'=i',d,';','i',d,'=0;','}else{','i',d,'-=',Nf,';','}');n.push.apply(n,Yr(l,'o',e,'i0','i1','w1')),n.push('for(i=0;i=r)return[];var o=Array(r),n;if(a===e.length-1)for(n=0;na?1:0;if(n&&(a=-a),0===a)e(0<1/a?0:2147483648,r,o);else if(isNaN(a))e(2143289344,r,o);else if(3.4028234663852886e38>>0,r,o);else if(1.1754943508222875e-38>a)e((n<<31|En(a/1.401298464324817e-45))>>>0,r,o);else{var i=Cn(Fn(a)/t),u=8388607&En(8388608*(a*zn(2,-i)));e((n<<31|i+127<<23|u)>>>0,r,o)}}function r(e,t,a){var r=e(t,a),o=2*(r>>31)+1,n=255&r>>>23,i=8388607&r;return 255==n?i?NaN:o*Infinity:0==n?1.401298464324817e-45*o*i:o*zn(2,n-150)*(i+8388608)}e.writeFloatLE=a.bind(null,Bo),e.writeFloatBE=a.bind(null,No),e.readFloatLE=r.bind(null,Vo),e.readFloatBE=r.bind(null,Ho)}():function(){function t(e,t,a){n[0]=e,t[a]=i[0],t[a+1]=i[1],t[a+2]=i[2],t[a+3]=i[3]}function a(e,t,a){n[0]=e,t[a]=i[3],t[a+1]=i[2],t[a+2]=i[1],t[a+3]=i[0]}function r(e,t){return i[0]=e[t],i[1]=e[t+1],i[2]=e[t+2],i[3]=e[t+3],n[0]}function o(e,t){return i[3]=e[t],i[2]=e[t+1],i[1]=e[t+2],i[0]=e[t+3],n[0]}var n=new Float32Array([0]),i=new Uint8Array(n.buffer),u=128===i[3];e.writeFloatLE=u?t:a,e.writeFloatBE=u?a:t,e.readFloatLE=u?r:o,e.readFloatBE=u?o:r}(),'undefined'==typeof Float64Array?function(){function a(e,a,r,o,n,i){var u=0>o?1:0;if(u&&(o=-o),0===o)e(0,n,i+a),e(0<1/o?0:2147483648,n,i+r);else if(isNaN(o))e(0,n,i+a),e(2146959360,n,i+r);else if(1.7976931348623157e308>>0,n,i+r);else{var l;if(2.2250738585072014e-308>o)l=o/5e-324,e(l>>>0,n,i+a),e((u<<31|l/4294967296)>>>0,n,i+r);else{var s=Cn(Fn(o)/t);1024===s&&(s=1023),l=o*zn(2,-s),e(4503599627370496*l>>>0,n,i+a),e((u<<31|s+1023<<20|1048575&1048576*l)>>>0,n,i+r)}}}function r(e,t,a,r,o){var n=e(r,o+t),i=e(r,o+a),u=2*(i>>31)+1,l=2047&i>>>20,s=4294967296*(1048575&i)+n;return 2047==l?s?NaN:u*Infinity:0==l?5e-324*u*s:u*zn(2,l-1075)*(s+4503599627370496)}e.writeDoubleLE=a.bind(null,Bo,0,4),e.writeDoubleBE=a.bind(null,No,4,0),e.readDoubleLE=r.bind(null,Vo,0,4),e.readDoubleBE=r.bind(null,Ho,4,0)}():function(){function t(e,t,a){n[0]=e,t[a]=i[0],t[a+1]=i[1],t[a+2]=i[2],t[a+3]=i[3],t[a+4]=i[4],t[a+5]=i[5],t[a+6]=i[6],t[a+7]=i[7]}function a(e,t,a){n[0]=e,t[a]=i[7],t[a+1]=i[6],t[a+2]=i[5],t[a+3]=i[4],t[a+4]=i[3],t[a+5]=i[2],t[a+6]=i[1],t[a+7]=i[0]}function r(e,t){return i[0]=e[t],i[1]=e[t+1],i[2]=e[t+2],i[3]=e[t+3],i[4]=e[t+4],i[5]=e[t+5],i[6]=e[t+6],i[7]=e[t+7],n[0]}function o(e,t){return i[7]=e[t],i[6]=e[t+1],i[5]=e[t+2],i[4]=e[t+3],i[3]=e[t+4],i[2]=e[t+5],i[1]=e[t+6],i[0]=e[t+7],n[0]}var n=new Float64Array([0]),i=new Uint8Array(n.buffer),u=128===i[7];e.writeDoubleLE=u?t:a,e.writeDoubleBE=u?a:t,e.readDoubleLE=u?r:o,e.readDoubleBE=u?o:r}(),e}function Bo(e,t,a){t[a]=255&e,t[a+1]=255&e>>>8,t[a+2]=255&e>>>16,t[a+3]=e>>>24}function No(e,t,a){t[a]=e>>>24,t[a+1]=255&e>>>16,t[a+2]=255&e>>>8,t[a+3]=255&e}function Vo(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function Ho(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function Wo(e){try{var t=eval('quire'.replace(/^/,'re'))(e);if(t&&(t.length||Object.keys(t).length))return t}catch(t){}return null}function Xo(e,t,a){var r=a||8192,o=null,n=r;return function(a){if(1>a||a>r>>>1)return e(a);n+a>r&&(o=e(r),n=0);var i=t.call(o,n,n+=a);return 7&n&&(n=(7|n)+1),i}}function $o(e,t){this.lo=e>>>0,this.hi=t>>>0}function Ko(e,t,a){this.fn=e,this.len=t,this.next=void 0,this.val=a}function Zo(){}function Qo(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function Yo(){this.len=0,this.head=new Ko(Zo,0,0),this.tail=this.head,this.states=null}function Jo(e,t,a){t[a]=255&e}function en(e,t,a){for(;127>>=7;t[a]=e}function tn(e,t){this.len=e,this.next=void 0,this.val=t}function an(e,t,a){for(;e.hi;)t[a++]=128|127&e.lo,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;127>>=7;t[a++]=e.lo}function rn(e,t,a){t[a]=255&e,t[a+1]=255&e>>>8,t[a+2]=255&e>>>16,t[a+3]=e>>>24}function on(){Wy.call(this)}function nn(e,t,a){40>e.length?Hy.utf8.write(e,t,a):t.utf8Write(e,a)}function un(e,t){return RangeError('index out of range: '+e.pos+' + '+(t||1)+' > '+e.len)}function ln(e){this.buf=e,this.pos=0,this.len=e.length}function sn(){var e=new ax(0,0),t=0;if(4t;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,128>this.buf[this.pos++])return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,128>this.buf[this.pos++])return e;t=0}else{for(;3>t;++t){if(this.pos>=this.len)throw un(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,128>this.buf[this.pos++])return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}if(4t;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,128>this.buf[this.pos++])return e;}else for(;5>t;++t){if(this.pos>=this.len)throw un(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,128>this.buf[this.pos++])return e}throw Error('invalid varint encoding')}function pn(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function dn(){if(this.pos+8>this.len)throw un(this,8);return new ax(pn(this.buf,this.pos+=4),pn(this.buf,this.pos+=4))}function cn(e){tx.call(this,e)}function gn(e,t,a){if('function'!=typeof e)throw TypeError('rpcImpl must be a function');Hy.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!a}function hn(e){return'number'==typeof e&&_x(e)}function fn(e){var t=null==e?0:e.length;return t?zg(e,xx):[]}function mn(e,t){var a=function(e,t,a){return e+(t-e)*a},r=[],o=new Number((e.length-1)/(t-1));r[0]=e[0];for(var n=1;nt.values.length&&console.warn('Pattern detector requires atleast 250 data for a reliable prediction, received just ',t.values.length),a.next=3,Mx.ready();case 3:return Jn.reverseInputs(t),r=t.values,o=_n(mn(r,400)),a.next=8,Mx.predict({input:new Float32Array(o)});case 8:return n=a.sent,i=n.output.indexOf(An.apply(Math,Hn(n.output))),Jn.reverseInputs(t),a.abrupt('return',{pattern:e.AvailablePatterns[i],patternId:i,probability:100*n.output[i]});case 12:case'end':return a.stop();}},a,this)}))}function xn(t){return kx(this,void 0,void 0,regeneratorRuntime.mark(function a(){var r;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,yn(t);case 2:return r=a.sent,a.abrupt('return',r.patternId===e.AvailablePatterns.DB&&75this._length?e&&e.data:(e===this._tail?(this._tail=e.prev,this._tail.next=void 0,this._current=this._tail):(e.next.prev=e.prev,e.prev.next=e.next,this._current=e.prev),this._next=this._current.next,e.next=this._head,e.prev=void 0,this._head.prev=e,this._head=e,e.data)}},{key:'removeCurrent',value:function(){var e=this._current;if(0!==this._length)return(this._length--,0===this._length)?(this._head=this._tail=this._current=this._next=void 0,e.data):(e===this._tail?(this._tail=e.prev,this._tail.next=void 0,this._current=this._tail):e===this._head?(this._head=e.next,this._head.prev=void 0,this._current=this._head):(e.next.prev=e.prev,e.prev.next=e.next,this._current=e.prev),this._next=this._current.next,e.data)}},{key:'resetCursor',value:function(){return this._current=this._next=this._head,this}},{key:'next',value:function(){var e=this._next;if(void 0!==e)return this._next=e.next,this._current=e,e.data}},{key:'head',get:function(){return this._head&&this._head.data}},{key:'tail',get:function(){return this._tail&&this._tail.data}},{key:'current',get:function(){return this._current&&this._current.data}},{key:'length',get:function(){return this._length}}]),e}(),$n=function(e){function t(e,a,r,o){Gn(this,t);var n=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(n.size=e,n.maintainHigh=a,n.maintainLow=r,n.maintainSum=o,n.totalPushed=0,n.periodHigh=0,n.periodLow=Infinity,n.periodSum=0,!e||'number'!=typeof e)throw'Size required and should be a number.';return n._push=n.push,n.push=function(e){this.add(e),this.totalPushed++},n}return Bn(t,e),Un(t,[{key:'add',value:function(e){this.length===this.size?(this.lastShift=this.shift(),this._push(e),this.maintainHigh&&this.lastShift==this.periodHigh&&this.calculatePeriodHigh(),this.maintainLow&&this.lastShift==this.periodLow&&this.calculatePeriodLow(),this.maintainSum&&(this.periodSum-=this.lastShift)):this._push(e),this.maintainHigh&&this.periodHigh<=e&&(this.periodHigh=e),this.maintainLow&&this.periodLow>=e&&(this.periodLow=e),this.maintainSum&&(this.periodSum+=e)}},{key:'iterator',value:regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.resetCursor();case 1:if(!this.next()){e.next=6;break}return e.next=4,this.current;case 4:e.next=1;break;case 6:case'end':return e.stop();}},e,this)})},{key:'calculatePeriodHigh',value:function(){for(this.resetCursor(),this.next()&&(this.periodHigh=this.current);this.next();)this.periodHigh<=this.current&&(this.periodHigh=this.current)}},{key:'calculatePeriodLow',value:function(){for(this.resetCursor(),this.next()&&(this.periodLow=this.current);this.next();)this.periodLow>=this.current&&(this.periodLow=this.current)}}]),t}(Xn),Kn=function e(){Gn(this,e)},Zn=function e(){Gn(this,e),this.open=[],this.high=[],this.low=[],this.close=[],this.volume=[],this.timestamp=[]},Qn={},Yn=function e(){Gn(this,e)},Jn=function(){function e(t){Gn(this,e),this.format=t.format||o}return Un(e,[{key:'getResult',value:function(){return this.result}}],[{key:'reverseInputs',value:function(e){e.reversedInput&&(e.values?e.values.reverse():void 0,e.open?e.open.reverse():void 0,e.high?e.high.reverse():void 0,e.low?e.low.reverse():void 0,e.close?e.close.reverse():void 0,e.volume?e.volume.reverse():void 0,e.timestamp?e.timestamp.reverse():void 0)}}]),e}(),ei=function(e){function t(e,a){Gn(this,t);var r=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.period=e,r.values=a,r}return Bn(t,e),t}(Yn),ti=function(e){function t(e){Gn(this,t);var a=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));a.period=e.period,a.price=e.values;var r=regeneratorRuntime.mark(function e(t){var a,r,o,n,i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=new Xn,r=0,o=1,void(e.next=5);case 5:n=e.sent,a.push(0);case 7:return oo&&0i&&0o&&(o=r.high,l=Rn(l+t,a))):(n=An(n,i.high,s.high),r.lown)&&(l=t,n=o,u=!u,o=u?r.high:r.low)):(n=s.low,o=s.high),i=s,r&&(s=r),e.next=12,n;case 12:r=e.sent,e.next=6;break;case 15:case'end':return e.stop();}},e,this)});return a.result=[],a.generator=n(e.step,e.max),a.generator.next(),o.forEach(function(e,t){var n=a.generator.next({high:r[t],low:o[t]});void 0!==n.value&&a.result.push(n.value)}),a}return Bn(t,e),Un(t,[{key:'nextValue',value:function(e){var t=this.generator.next(e);if(void 0!==t.value)return t.value}}]),t}(Jn);Li.calculate=b;var Oi=function(e){function t(){return Gn(this,t),Nn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Bn(t,e),t}(Yn),zi=function(e){function t(e){Gn(this,t);var a=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=e.low,o=e.high,n=e.close,i=e.period,u=e.signalPeriod,l=a.format;if(r.length!==o.length||o.length!==n.length)throw'Inputs(low,high, close) not of equal size';return a.result=[],a.generator=regeneratorRuntime.mark(function e(){var t,a,r,o,n,s,p,d;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=1,a=new $n(i,!0,!1),r=new $n(i,!1,!0),o=new ti({period:u,values:[],format:function(e){return e}}),n=void 0,s=void 0,void(e.next=7);case 7:p=e.sent;case 8:if(a.push(p.high),r.push(p.low),!(tS?m+=P:f+=P)}a.result.push({rangeStart:i,rangeEnd:h,bullishVolume:f,bearishVolume:m,totalVolume:_})}return a}return Bn(t,e),Un(t,[{key:'nextValue',value:function(){throw'Next value not supported for volume profile'}}]),t}(Jn);tu.calculate=R;var au=function(e){function t(){return Gn(this,t),Nn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Bn(t,e),t}(Yn),ru=function(e){function t(e){Gn(this,t);var a=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.result=[],a.generator=regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:return e.next=6,(t.high+t.low+t.close)/3;case 6:t=e.sent,e.next=3;break;case 9:case'end':return e.stop();}},e,this)})(),a.generator.next(),e.low.forEach(function(t,r){var o=a.generator.next({high:e.high[r],low:e.low[r],close:e.close[r]});a.result.push(o.value)}),a}return Bn(t,e),Un(t,[{key:'nextValue',value:function(e){var t=this.generator.next(e).value;return t}}]),t}(Jn);ru.calculate=A;var ou=function(e){function t(){return Gn(this,t),Nn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Bn(t,e),t}(Yn),nu=function(e){function t(e){Gn(this,t);var a=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=e.high,o=e.low,n=e.close,i=e.volume,u=e.period,l=new ru({low:[],high:[],close:[]}),s=new $n(u,!1,!1,!0),p=new $n(u,!1,!1,!0);if(o.length!==r.length||r.length!==n.length||r.length!==i.length)throw'Inputs(low,high, close, volumes) not of equal size';return a.result=[],a.generator=regeneratorRuntime.mark(function e(){var t,a,r,o,n,i,d,c,g,h,f,m,_,y,x,v;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=0,c=null,g=null,void(e.next=5);case 5:return a=e.sent,r=a.close,void(e.next=9);case 9:a=e.sent;case 10:return h=a,f=h.high,m=h.low,_=h.close,y=h.volume,x=0,v=0,c=l.nextValue({high:f,low:m,close:_}),n=c*y,null!=c&&null!=g&&(c>g?x=n:v=n,s.push(x),p.push(v),o=s.periodSum,d=p.periodSum,s.totalPushed>=u&&s.totalPushed>=u&&(i=o/d,t=100-100/(1+i))),g=c,e.next=20,t;case 20:a=e.sent,e.next=10;break;case 23:case'end':return e.stop();}},e,this)})(),a.generator.next(),r.forEach(function(e,t){var r={high:e,low:o[t],close:n[t],volume:i[t]},u=a.generator.next(r);void 0!=u.value&&a.result.push(parseFloat(u.value.toFixed(2)))}),a}return Bn(t,e),Un(t,[{key:'nextValue',value:function(e){var t=this.generator.next(e);if(void 0!=t.value)return parseFloat(t.value.toFixed(2))}}]),t}(Jn);nu.calculate=L;var iu=function(e){function t(){return Gn(this,t),Nn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Bn(t,e),t}(Yn),uu=function(e){function t(e){Gn(this,t);var a=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=e.values,o=e.rsiPeriod,n=e.stochasticPeriod,i=e.kPeriod,u=e.dPeriod,l=a.format;return a.result=[],a.generator=regeneratorRuntime.mark(function e(){var t,a,r,l,s,p,c,g,h,f;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=1,a=new ci({period:o,values:[]}),r=new zi({period:n,high:[],low:[],close:[],signalPeriod:i}),l=new ti({period:u,values:[],format:function(e){return e}}),s=void 0,p=void 0,c=void 0,g=void 0,void(e.next=7);case 7:h=e.sent;case 8:return s=a.nextValue(h),void 0!==s&&(f={high:s,low:s,close:s},p=r.nextValue(f),void 0!==p&&void 0!==p.d&&(c=l.nextValue(p.d),void 0!==c&&(g={stochRSI:p.k,k:p.d,d:c}))),e.next=13,g;case 13:h=e.sent,e.next=8;break;case 16:case'end':return e.stop();}},e,this)})(),a.generator.next(),r.forEach(function(e){var t=a.generator.next(e);void 0!==t.value&&a.result.push(t.value)}),a}return Bn(t,e),Un(t,[{key:'nextValue',value:function(e){var t=this.generator.next(e);if(void 0!==t.value)return t.value}}]),t}(Jn);uu.calculate=O;var lu=function(e){function t(){return Gn(this,t),Nn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Bn(t,e),t}(Yn),su=function(e){function t(e){Gn(this,t);var a=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=e.values,o=e.period;a.result=[];var n=new $n(o,!0,!1,!1);return a.generator=regeneratorRuntime.mark(function e(){var t,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:return n.push(t),n.totalPushed>=o&&(a=n.periodHigh),e.next=8,a;case 8:t=e.sent,e.next=3;break;case 11:case'end':return e.stop();}},e,this)})(),a.generator.next(),r.forEach(function(e){var t=a.generator.next(e);void 0!=t.value&&a.result.push(t.value)}),a}return Bn(t,e),Un(t,[{key:'nextValue',value:function(e){var t=this.generator.next(e);if(void 0!=t.value)return t.value}}]),t}(Jn);su.calculate=z;var pu=function(e){function t(){return Gn(this,t),Nn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Bn(t,e),t}(Yn),du=function(e){function t(e){Gn(this,t);var a=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=e.values,o=e.period;a.result=[];var n=new $n(o,!1,!0,!1);return a.generator=regeneratorRuntime.mark(function e(){var t,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:return n.push(t),n.totalPushed>=o&&(a=n.periodLow),e.next=8,a;case 8:t=e.sent,e.next=3;break;case 11:case'end':return e.stop();}},e,this)})(),a.generator.next(),r.forEach(function(e){var t=a.generator.next(e);void 0!=t.value&&a.result.push(t.value)}),a}return Bn(t,e),Un(t,[{key:'nextValue',value:function(e){var t=this.generator.next(e);if(void 0!=t.value)return t.value}}]),t}(Jn);du.calculate=j;var cu=function(e){function t(){return Gn(this,t),Nn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Bn(t,e),t}(Yn),gu=function(e){function t(e){Gn(this,t);var a=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=e.values,o=e.period;a.result=[];var n=new $n(o,!1,!1,!0);return a.generator=regeneratorRuntime.mark(function e(){var t,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:return n.push(t),n.totalPushed>=o&&(a=n.periodSum),e.next=8,a;case 8:t=e.sent,e.next=3;break;case 11:case'end':return e.stop();}},e,this)})(),a.generator.next(),r.forEach(function(e){var t=a.generator.next(e);void 0!=t.value&&a.result.push(t.value)}),a}return Bn(t,e),Un(t,[{key:'nextValue',value:function(e){var t=this.generator.next(e);if(void 0!=t.value)return t.value}}]),t}(Jn);gu.calculate=G;var hu=function(e){function t(){return Gn(this,t),Nn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Bn(t,e),t}(Yn),fu=function(e){function t(e){Gn(this,t);var a=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=a.format,o=e.useATR,n=e.brickSize||0;if(o){var i=y(Object.assign({},e));n=i[i.length-1]}if(a.result=new Zn,0===n)return console.error('Not enough data to calculate brickSize for renko when using ATR'),Nn(a);var u=0,l=0,s=Infinity,p=0,d=0,c=0;return a.generator=regeneratorRuntime.mark(function e(){var t,a,r,o,i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:if(0!=u){e.next=15;break}return u=t.close,l=t.high,s=t.low,p=t.close,d=t.volume,c=t.timestamp,void(e.next=13);case 13:return t=e.sent,e.abrupt('continue',3);case 15:if(a=Ln(t.close-p),r=Ln(t.close-u),!(a>=n&&r>=n)){e.next=30;break}return o=a>r?u:p,i={open:o,high:l>t.high?l:t.high,low:st.close?o-n:o+n,volume:d+t.volume,timestamp:t.timestamp},u=i.open,l=i.close,s=i.close,p=i.close,d=0,e.next=27,i;case 27:t=e.sent,e.next=37;break;case 30:return l=l>t.high?l:t.high,s=sl&&o>u&&uu&&i(t+a)/2}}]),t}(yu),vu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='BullishEngulfingPattern',e.requiredCount=2,e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],u=e.high[1],l=e.low[1];return an&&a>n&&tn&&al&&r>u}}]),t}(yu),Su=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.requiredCount=2,e.name='BullishHaramiCross',e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],u=e.high[1],l=e.low[1],s=this.approximateEqual(n,i);return t>n&&al&&r>u&&s}}]),t}(yu),Pu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='Doji',e.requiredCount=1,e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=this.approximateEqual(t,a),i=n&&this.approximateEqual(t,r),u=n&&this.approximateEqual(a,o);return n&&i==u}}]),t}(yu),Tu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='MorningDojiStar',e.requiredCount=3,e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],u=e.high[1],l=e.low[1],s=e.open[2],p=e.close[2],d=e.high[2],c=e.low[2],g=new Pu().hasPattern({open:[n],close:[i],high:[u],low:[l]});return au&&i(t+a)/2}}]),t}(yu),wu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.requiredCount=3,e.name='DownsideTasukiGap',e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],u=e.high[1],l=e.low[1],s=e.open[2],p=e.close[2],d=e.high[2],c=e.low[2];return as&&us&&in&&pn&&i>(t+a)/2&&i>n}}]),t}(yu),Fu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='ThreeWhiteSoldiers',e.requiredCount=3,e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],u=e.high[1],l=e.low[1],s=e.open[2],p=e.close[2],d=e.high[2],c=e.low[2];return u>r&&d>u&&tn&&ns&&st;return n=n&&this.approximateEqual(a,r),n=n&&a-t<=2*(t-o),n}}]),t}(yu),Du=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='BullishInvertedHammerStick',e.requiredCount=1,e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=a>t;return n=n&&this.approximateEqual(t,o),n=n&&a-t<=2*(r-a),n}}]),t}(yu),Iu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='BearishHammerStick',e.requiredCount=1,e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=t>a;return n=n&&this.approximateEqual(t,r),n=n&&t-a<=2*(a-o),n}}]),t}(yu),Eu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='BearishInvertedHammerStick',e.requiredCount=1,e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=t>a;return n=n&&this.approximateEqual(a,o),n=n&&t-a<=2*(r-t),n}}]),t}(yu),Ru=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='HammerPattern',e.requiredCount=5,e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=this.downwardTrend(e);return t=t&&this.includesHammer(e),t=t&&this.hasConfirmation(e),t}},{key:'downwardTrend',value:function(e){var t=1r}},{key:'includesHammer',value:function(e){var t=1t}}]),t}(yu),Ou=[new vu,new wu,new bu,new Su,new Tu,new xu,new ku,new Cu,new Fu,new Mu,new Du,new Ru,new Au,new Lu],zu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='Bullish Candlesticks',e}return Bn(t,e),Un(t,[{key:'hasPattern',value:function(e){return Ou.reduce(function(t,a){var r=a.hasPattern(e);return t||r},!1)}}]),t}(yu),ju=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='BearishEngulfingPattern',e.requiredCount=2,e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],u=e.high[1],l=e.low[1];return a>t&&ti}}]),t}(yu),Gu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.requiredCount=2,e.name='BearishHarami',e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],u=e.high[1],l=e.low[1];return tn&&a>i&&tu}}]),t}(yu),Uu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.requiredCount=2,e.name='BearishHaramiCross',e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],u=e.high[1],l=e.low[1],s=this.approximateEqual(n,i);return tn&&a>i&&tu&&s}}]),t}(yu),qu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='EveningDojiStar',e.requiredCount=3,e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],u=e.high[1],l=e.low[1],s=e.open[2],p=e.close[2],d=e.high[2],c=e.low[2],g=new Pu().hasPattern({open:[n],close:[i],high:[u],low:[l]});return a>t&&g&&u>r&&l>r&&ss&&s>p&&p<(t+a)/2}}]),t}(yu),Bu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='EveningStar',e.requiredCount=3,e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],u=e.high[1],l=e.low[1],s=e.open[2],p=e.close[2],d=e.high[2],c=e.low[2];return a>t&&rr&&l>r&&ss&&s>p&&p<(t+a)/2}}]),t}(yu),Nu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='BearishMarubozu',e.requiredCount=1,e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=this.approximateEqual(t,r)&&this.approximateEqual(o,a)&&t>a&&t>o;return n}}]),t}(yu),Vu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='ThreeBlackCrows',e.requiredCount=3,e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],u=e.high[1],l=e.low[1],s=e.open[2],p=e.close[2],d=e.high[2],c=e.low[2];return o>l&&l>c&&t>a&&n>i&&s>p&&t>n&&n>a&&n>s&&s>i}}]),t}(yu),Hu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='HangingMan',e.requiredCount=5,e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=this.upwardTrend(e);return t=t&&this.includesHammer(e),t=t&&this.hasConfirmation(e),t}},{key:'upwardTrend',value:function(e){var t=1o}},{key:'includesHammer',value:function(e){var t=1a.close;return r&&t.close>a.close}}]),t}(yu),Wu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='HangingManUnconfirmed',e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=this.upwardTrend(e,!1);return t=t&&this.includesHammer(e,!1),t}}]),t}(Hu),Xu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='ShootingStar',e.requiredCount=5,e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=this.upwardTrend(e);return t=t&&this.includesHammer(e),t=t&&this.hasConfirmation(e),t}},{key:'upwardTrend',value:function(e){var t=1o}},{key:'includesHammer',value:function(e){var t=1a.close;return r&&t.close>a.close}}]),t}(yu),$u=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='ShootingStarUnconfirmed',e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=this.upwardTrend(e,!1);return t=t&&this.includesHammer(e,!1),t}}]),t}(Xu),Ku=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='TweezerTop',e.requiredCount=5,e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){return this.upwardTrend(e)&&e.high[3]==e.high[4]}},{key:'upwardTrend',value:function(e){var t=p({values:e.close.slice(0,3),period:2}),a=d({values:e.close.slice(0,3),period:2});return t>a}}]),t}(yu),Zu=[new ju,new Gu,new Uu,new qu,new Bu,new Nu,new Vu,new Iu,new Eu,new Hu,new Wu,new Xu,new $u,new Ku],Qu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='Bearish Candlesticks',e}return Bn(t,e),Un(t,[{key:'hasPattern',value:function(e){return Zu.reduce(function(t,a){return t||a.hasPattern(e)},!1)}}]),t}(yu),Yu=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='AbandonedBaby',e.requiredCount=3,e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=e.open[1],i=e.close[1],u=e.high[1],l=e.low[1],s=e.open[2],p=e.close[2],d=e.high[2],c=e.low[2],g=new Pu().hasPattern({open:[n],close:[i],high:[u],low:[l]});return au&&p>s&&dt&&ir&&i<(a+t)/2&&i>t}}]),t}(yu),el=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.requiredCount=1,e.name='DragonFlyDoji',e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=this.approximateEqual(t,a),i=n&&this.approximateEqual(t,r),u=n&&this.approximateEqual(a,o);return n&&i&&!u}}]),t}(yu),tl=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.requiredCount=1,e.name='GraveStoneDoji',e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=this.approximateEqual(t,a),i=n&&this.approximateEqual(t,r),u=n&&this.approximateEqual(a,o);return n&&u&&!i}}]),t}(yu),al=function(e){function t(){Gn(this,t);var e=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name='BullishSpinningTop',e.requiredCount=1,e}return Bn(t,e),Un(t,[{key:'logic',value:function(e){var t=e.open[0],a=e.close[0],r=e.high[0],o=e.low[0],n=Ln(a-t),i=Ln(r-a),u=Ln(t-o);return nt&&(t=An(0,t+e.length)),e[t]}var i=e('./util'),u=i.canEvaluate,l=i.isIdentifier,s;t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(r,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t;if(!!('number'==typeof e))t=n;else if(u){var a=s(e);t=null===a?o:a}else t=o;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t){t.exports=function(t,a,r,o){var n=e('./util'),i=n.tryCatch,u=n.errorObj,l=t._async;t.prototype['break']=t.prototype.cancel=function(){if(!o.cancellation())return this._warn('cancellation is disabled');for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var a=e._cancellationParent;if(null==a||!a._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}else e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=a}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===void 0||0>=this._branchesRemainingToCancel},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):!(this._branchHasCancelled(),!this._enoughBranchesHaveCancelled())&&(this._invokeOnCancel(),!0)},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),l.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){0, no stack trace)'}function T(e){var t=41;return e.lengthe)){for(var t=[],a={},r=0,o=this;void 0!==o;++r)t.push(o),o=o._parent;e=this._length=r;for(var r=e-1,n;0<=r;--r)n=t[r].stack,void 0===a[n]&&(a[n]=r);for(var r=0;ro||0>n||!i||!l||i!==l||o>=n||(Y=function(e){if(R.test(e))return!0;var t=k(e);return t&&t.fileName===i&&o<=t.line&&t.line<=n})}},warn:h,deprecated:function(e,t){var a=e+' is deprecated and will be removed in a future version.';return t&&(a+=' Use '+t+' instead.'),h(a)},CapturedTrace:C,fireDomEvent:X,fireGlobalEvent:$}}},{"./errors":12,"./util":36}],10:[function(e,t){t.exports=function(e){function t(){return this.value}function a(){throw this.reason}e.prototype['return']=e.prototype.thenReturn=function(a){return a instanceof e&&a.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:a},void 0)},e.prototype['throw']=e.prototype.thenThrow=function(e){return this._then(a,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(1>=arguments.length)return this._then(void 0,a,void 0,{reason:e},void 0);var t=arguments[1];return this.caught(e,function(){throw t})},e.prototype.catchReturn=function(a){if(1>=arguments.length)return a instanceof e&&a.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:a},void 0);var r=arguments[1];r instanceof e&&r.suppressUnhandledRejections();return this.caught(a,function(){return r})}}},{}],11:[function(e,t){t.exports=function(e,t){function a(){return o(this)}var r=e.reduce,o=e.all;e.prototype.each=function(e){return r(this,e,t,0)._then(a,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return r(this,e,t,t)},e.each=function(e,o){return r(e,o,t,0)._then(a,void 0,void 0,e,void 0)},e.mapSeries=function(e,a){return r(e,a,t,t)}}},{}],12:[function(e,t){function a(e,t){function a(r){return this instanceof a?void(s(this,'message','string'==typeof r?r:t),s(this,'name',e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)):new a(r)}return l(a,Error),a}function r(e){return this instanceof r?void(s(this,'name','OperationalError'),s(this,'message',e),this.cause=e,this.isOperational=!0,e instanceof Error?(s(this,'message',e.message),s(this,'stack',e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)):new r(e)}var o=e('./es5'),n=o.freeze,u=e('./util'),l=u.inherits,s=u.notEnumerableProp,p=a('Warning','warning'),d=a('CancellationError','cancellation error'),c=a('TimeoutError','timeout error'),g=a('AggregateError','aggregate error'),h,f;try{h=TypeError,f=RangeError}catch(t){h=a('TypeError','type error'),f=a('RangeError','range error')}for(var m='join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse'.split(' '),_=0;_a)){if(1<=l&&this._inFlight>=l)return r[a]=e,this._queue.push(a),!1;null!==u&&(u[a]=e);var s=this._promise,p=this._callback,g=s._boundValue();s._pushContext();var h=d(p).call(g,e,a,n),f=s._popContext();if(i.checkForgottenReturns(h,f,null===u?'Promise.map':'Promise.filter',s),h===c)return this._reject(h.e),!0;var m=o(h,this._promise);if(m instanceof t){m=m._target();var _=m._bitField;if(0==(50397184&_))return 1<=l&&this._inFlight++,r[a]=m,m._proxy(this,-1*(a+1)),!1;if(0!=(33554432&_))h=m._value();else return 0==(16777216&_)?(this._cancel(),!0):(this._reject(m._reason()),!0)}r[a]=h}else if(a=-1*a-1,r[a]=e,1<=l&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0;var y=++this._totalResolved;return!!(y>=n)&&(null===u?this._resolve(r):this._filter(r,u),!0)},u.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,a=this._values;0>>16)){if(e===this){var a=l();return this._attachExtraTrace(a),this._reject(a)}this._setFulfilled(),this._rejectionHandler0=e,0<(65535&t)&&(0==(134217728&t)?m.settlePromises(this):this._settlePromises())}},o.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16))return this._setRejected(),this._fulfillmentHandler0=e,this._isFinal()?m.fatalError(e,c.isNode):void(0<(65535&t)?m.settlePromises(this):this._ensurePossibleRejectionHandled())},o.prototype._fulfillPromises=function(e,t){for(var a=1;a=this._length)&&(this._resolve(this._values),!0)},u.prototype._promiseCancelled=function(){return this._cancel(),!0},u.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},u.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var a=0;a=this._length){var r;if(this._isMap)r=c(this._values);else{r={};for(var o=this.length(),n=0,i=this.length();n>1},t.prototype.props=function(){return i(this)},t.props=function(e){return i(e)}}},{"./es5":13,"./util":36}],26:[function(e,t){function a(e,t,a,r,o){for(var n=0;n=this._length)&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(e,t){var a=new n;return a._bitField=33554432,a._settledValueField=e,this._promiseResolved(t,a)},o.prototype._promiseRejected=function(e,t){var a=new n;return a._bitField=16777216,a._settledValueField=e,this._promiseResolved(t,a)},t.settle=function(e){return r.deprecated('.settle()','.reflect()'),new o(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t){t.exports=function(t,a,r){function o(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function n(e,t){if((0|t)!==t||0>t)return r('expecting a positive integer\n\n See http://goo.gl/MqrFmX\n');var a=new o(e),n=a.promise();return a.setHowMany(t),a.init(),n}var i=e('./util'),u=e('./errors').RangeError,l=e('./errors').AggregateError,s=i.isArray,p={};i.inherits(o,a),o.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var e=s(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},o.prototype.init=function(){this._initialized=!0,this._init()},o.prototype.setUnwrap=function(){this._unwrap=!0},o.prototype.howMany=function(){return this._howMany},o.prototype.setHowMany=function(e){this._howMany=e},o.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},o.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},o.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(p),this._checkOutcome())},o.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new l,e=this.length();e=s)return p._fulfill();var n=l(e[u++]);if(n instanceof t&&n._isDisposable()){try{n=r(n._getDisposer().tryDispose(a),e.promise)}catch(t){return i(t)}if(n instanceof t)return n._then(o,i,null,null,null)}o()}var u=0,s=e.length,p=new t(n);return o(),p}function p(e,t,a){this._data=e,this._promise=t,this._context=a}function d(e,t,a){this.constructor$(e,t,a)}function c(e){return p.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function g(e){this.length=e,this.promise=null,this[e-1]=null}var h=e('./util'),f=e('./errors').TypeError,m=e('./util').inherits,_=h.errorObj,y=h.tryCatch,x={};p.prototype.data=function(){return this._data},p.prototype.promise=function(){return this._promise},p.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():x},p.prototype.tryDispose=function(e){var t=this.resource(),a=this._context;void 0!==a&&a._pushContext();var r=t===x?null:this.doDispose(t,e);return void 0!==a&&a._popContext(),this._promise._unsetDisposable(),this._data=null,r},p.isDisposer=function(e){return null!=e&&'function'==typeof e.resource&&'function'==typeof e.tryDispose},m(d,p),d.prototype.doDispose=function(e,t){var a=this.data();return a.call(e,e,t)},g.prototype._resultCancelled=function(){for(var e=this.length,a=0,r;ae)return a('you must pass at least 2 arguments to Promise.using');var o=arguments[e-1];if('function'!=typeof o)return a('expecting a function but got '+h.classString(o));var n=!0,l;2===e&&Array.isArray(arguments[0])?(l=arguments[0],e=l.length,n=!1):(l=arguments,e--);for(var d=new g(e),f=0,m;fe}};xh.headers={common:{Accept:'application/json, text/plain, */*'}},oh.forEach(['delete','get','head'],function(e){xh.headers[e]={}}),oh.forEach(['post','put','patch'],function(e){xh.headers[e]=oh.merge(yh)});var vh=xh;hr.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},hr.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},hr.prototype.forEach=function(e){oh.forEach(this.handlers,function(t){null!==t&&e(t)})};var bh=hr,Sh=function(e,t,a){return oh.forEach(a,function(a){e=a(e,t)}),e},Ph=function(e){return!!(e&&e.__CANCEL__)},Th=function(e){return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)},wh=function(e,t){return t?e.replace(/\/+$/,'')+'/'+t.replace(/^\/+/,''):e},kh=function(e){fr(e),e.baseURL&&!Th(e.url)&&(e.url=wh(e.baseURL,e.url)),e.headers=e.headers||{},e.data=Sh(e.data,e.headers,e.transformRequest),e.headers=oh.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),oh.forEach(['delete','get','head','post','put','patch','common'],function(t){delete e.headers[t]});var t=e.adapter||vh.adapter;return t(e).then(function(t){return fr(e),t.data=Sh(t.data,t.headers,e.transformResponse),t},function(t){return Ph(t)||(fr(e),t&&t.response&&(t.response.data=Sh(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})};mr.prototype.request=function(e){'string'==typeof e&&(e=oh.merge({url:arguments[0]},arguments[1])),e=oh.merge(vh,this.defaults,{method:'get'},e),e.method=e.method.toLowerCase();var t=[kh,void 0],a=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)a=a.then(t.shift(),t.shift());return a},oh.forEach(['delete','get','head','options'],function(e){mr.prototype[e]=function(t,a){return this.request(oh.merge(a||{},{method:e,url:t}))}}),oh.forEach(['post','put','patch'],function(e){mr.prototype[e]=function(t,a,r){return this.request(oh.merge(r||{},{method:e,url:t,data:a}))}});var Ch=mr;_r.prototype.toString=function(){return'Cancel'+(this.message?': '+this.message:'')},_r.prototype.__CANCEL__=!0;var Fh=_r;yr.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},yr.source=function(){var e=new yr(function(e){t=e}),t;return{token:e,cancel:t}};var Mh=yr,Dh=function(e){return function(t){return e.apply(null,t)}},Ih=xr(vh);Ih.Axios=Ch,Ih.create=function(e){return xr(oh.merge(vh,e))},Ih.Cancel=Fh,Ih.CancelToken=Mh,Ih.isCancel=Ph,Ih.all=function(e){return Promise.all(e)},Ih.spread=Dh;var Eh=Ih,Rh=Ih;Eh.default=Rh;var Ah=Eh,Lh=Ce(function(e){(function(){var t,a,r,o,n,i;'undefined'!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:'undefined'!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-n)/1e6},a=process.hrtime,t=function(){var e;return e=a(),1e9*e[0]+e[1]},o=t(),i=1e9*process.uptime(),n=o-i):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(ol)}),Oh=Ce(function(e){function t(){}function a(e,t,a){this.fn=e,this.context=t,this.once=a||!1}function r(e,t,r,o,n){if('function'!=typeof r)throw new TypeError('The listener must be a function');var i=new a(r,o||e,n),l=u?u+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],i]:e._events[l].push(i):(e._events[l]=i,e._eventsCount++),e}function o(e,a){0==--e._eventsCount?e._events=new t:delete e._events[a]}function n(){this._events=new t,this._eventsCount=0}var i=Object.prototype.hasOwnProperty,u='~';Object.create&&(t.prototype=Object.create(null),!new t().__proto__&&(u=!1)),n.prototype.eventNames=function(){var e=[],t,a;if(0===this._eventsCount)return e;for(a in t=this._events)i.call(t,a)&&e.push(u?a.slice(1):a);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},n.prototype.listeners=function(e){var t=u?u+e:e,a=this._events[t];if(!a)return[];if(a.fn)return[a.fn];for(var r=0,o=a.length,n=Array(o);r>',rrshift:'>>>'};(function(){for(var e in i){var a=i[e];t[e]=o({args:['array','array','array'],body:{args:['a','b','c'],body:'a=b'+a+'c'},funcName:e}),t[e+'eq']=o({args:['array','array'],body:{args:['a','b'],body:'a'+a+'=b'},rvalue:!0,funcName:e+'eq'}),t[e+'s']=o({args:['array','array','scalar'],body:{args:['a','b','s'],body:'a=b'+a+'s'},funcName:e+'s'}),t[e+'seq']=o({args:['array','scalar'],body:{args:['a','s'],body:'a'+a+'=s'},rvalue:!0,funcName:e+'seq'})}})();var u={not:'!',bnot:'~',neg:'-',recip:'1.0/'};(function(){for(var e in u){var a=u[e];t[e]=o({args:['array','array'],body:{args:['a','b'],body:'a='+a+'b'},funcName:e}),t[e+'eq']=o({args:['array'],body:{args:['a'],body:'a='+a+'a'},rvalue:!0,count:2,funcName:e+'eq'})}})();var l={and:'&&',or:'||',eq:'===',neq:'!==',lt:'<',gt:'>',leq:'<=',geq:'>='};(function(){for(var e in l){var a=l[e];t[e]=o({args:['array','array','array'],body:{args:['a','b','c'],body:'a=b'+a+'c'},funcName:e}),t[e+'s']=o({args:['array','array','scalar'],body:{args:['a','b','s'],body:'a=b'+a+'s'},funcName:e+'s'}),t[e+'eq']=o({args:['array','array'],body:{args:['a','b'],body:'a=a'+a+'b'},rvalue:!0,count:2,funcName:e+'eq'}),t[e+'seq']=o({args:['array','scalar'],body:{args:['a','s'],body:'a=a'+a+'s'},rvalue:!0,count:2,funcName:e+'seq'})}})();var s=['abs','acos','asin','atan','ceil','cos','exp','floor','log','round','sin','sqrt','tan'];(function(){for(var e=0,a;ethis_s){this_s=-a}else if(a>this_s){this_s=a}',localVars:[],thisVars:['this_s']},post:{args:[],localVars:[],thisVars:['this_s'],body:'return this_s'},funcName:'norminf'}),t.norm1=Yh({args:['array'],pre:{args:[],localVars:[],thisVars:['this_s'],body:'this_s=0'},body:{args:[{name:'a',lvalue:!1,rvalue:!0,count:3}],body:'this_s+=a<0?-a:a',localVars:[],thisVars:['this_s']},post:{args:[],localVars:[],thisVars:['this_s'],body:'return this_s'},funcName:'norm1'}),t.sup=Yh({args:['array'],pre:{body:'this_h=-Infinity',args:[],thisVars:['this_h'],localVars:[]},body:{body:'if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_',args:[{name:'_inline_1_arg0_',lvalue:!1,rvalue:!0,count:2}],thisVars:['this_h'],localVars:[]},post:{body:'return this_h',args:[],thisVars:['this_h'],localVars:[]}}),t.inf=Yh({args:['array'],pre:{body:'this_h=Infinity',args:[],thisVars:['this_h'],localVars:[]},body:{body:'if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}',args:[{name:'_inline_1_arg0_',lvalue:!1,rvalue:!0,count:2},{name:'_inline_1_arg1_',lvalue:!1,rvalue:!0,count:2}],thisVars:['this_i','this_v'],localVars:['_inline_1_k']},post:{body:'{return this_i}',args:[],thisVars:['this_i'],localVars:[]}}),t.random=o({args:['array'],pre:{args:[],body:'this_f=Math.random',thisVars:['this_f']},body:{args:['a'],body:'a=this_f()',thisVars:['this_f']},funcName:'random'}),t.assign=o({args:['array','array'],body:{args:['a','b'],body:'a=b'},funcName:'assign'}),t.assigns=o({args:['array','scalar'],body:{args:['a','b'],body:'a=b'},funcName:'assigns'}),t.equals=Yh({args:['array','array'],pre:n,body:{args:[{name:'x',lvalue:!1,rvalue:!0,count:1},{name:'y',lvalue:!1,rvalue:!0,count:1}],body:'if(x!==y){return false}',localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:'return true'},funcName:'equals'})}),ef=Ce(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.checkShape=function(e,t){if(e.length&&t.length&&e.length!==t.reduce(function(e,t){return e*t},1))throw new Error('[Tensor] specified shape incompatible with data.')},t.data3DLayoutForGL=function(e,t,a){for(var r=new e(t.data.length),n=(0,o.default)(new e(a[0]*a[1]),[a[0],a[1]]),l=0,s=0;sa&&(a=e.length+a);for(var f=e[a],m=(0,o.default)(new Int32Array(l),e),_=(0,o.default)(new Int32Array(l),e),y=[].concat(Hn(e.slice(0,a)),Hn(e.slice(a+1))),x=y.reduce(function(e,t){return e*t},1),v=(0,o.default)(new Int32Array((0,r.default)(x)),y),b=Array(e.length).fill(null),S=0;Szh.MAX_TEXTURE_SIZE&&void 0!==n&&n?this._create2DRowFragmentedGLTexture():this._create2DGLTexture();else if('2d_array'===a||'3d'===a)this._create3DGLTexture();else throw new Error('[Tensor] invalid type '+a+'.')}},{key:'_create2DGLTexture',value:function(){var e=zh.webgl2.context,t=zh.webgl2.getWebGLTextureOptions(this.glTextureType,this.glTextureFormat),a=t.textureTarget,r=t.textureInternalFormat,o=t.textureFormat,n=t.textureType;this.glTexture=e.createTexture(),zh.webgl2.storeRef('texture',this.glTexture),e.bindTexture(a,this.glTexture);var i=this.glTextureShape,u=this.tensor.data;e.texImage2D(a,0,r,i[1],i[0],0,o,n,u),e.texParameteri(a,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(a,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(a,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(a,e.TEXTURE_MIN_FILTER,e.NEAREST)}},{key:'_create2DRowFragmentedGLTexture',value:function(){var e=zh.webgl2.context,t=zh.webgl2.getWebGLTextureOptions(this.glTextureType,this.glTextureFormat),a=t.textureTarget,r=t.textureInternalFormat,o=t.textureFormat,n=t.textureType;this.glTextureFragments=[],this.glTextureFragmentShape=[zh.MAX_TEXTURE_SIZE,this.glTextureShape[1]];for(var i=this.glTextureFragmentShape,u=In(this.glTextureShape[0]/zh.MAX_TEXTURE_SIZE),l=0,s=0,p;se&&(e=this.originalShape.length+e);for(var t=this.tensor.shape[0],a=this.tensor.shape[1],r=(0,o.default)(new this.arrayType(this.originalShape.reduce(function(e,t){return e*t},1)),this.originalShape),u=(0,o.default)(new this.arrayType(t),[t]),l=[].concat(Hn(this.originalShape.slice(0,e)),Hn(this.originalShape.slice(e+1))),s=(0,o.default)(new this.arrayType(l.reduce(function(e,t){return e*t},1)),l),p=Array(this.originalShape.length).fill(null),d=0;d=e.tensor.shape.length?e.createGLTexture({type:'2d',format:'float',supportsTextureFragments:!0}):2=e}function r(e){return 0<='0123456789abcdefABCDEF'.indexOf(e)}function o(e){return 0<='01234567'.indexOf(e)}function n(e){return 32===e||9===e||11===e||12===e||160===e||5760<=e&&0<=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)}function i(e){return 10===e||13===e||8232===e||8233===e}function u(e){return 36===e||95===e||65<=e&&90>=e||97<=e&&122>=e||92===e||128<=e&&rt.NonAsciiIdentifierStart.test(Dn(e))}function l(e){return 36===e||95===e||65<=e&&90>=e||97<=e&&122>=e||48<=e&&57>=e||92===e||128<=e&&rt.NonAsciiIdentifierPart.test(Dn(e))}function s(e){return'class'===e||'enum'===e||'export'===e||'extends'===e||'import'===e||'super'===e}function p(e){return'implements'===e||'interface'===e||'package'===e||'private'===e||'protected'===e||'public'===e||'static'===e||'yield'===e||'let'===e}function d(e){return'eval'===e||'arguments'===e}function c(e){if(it&&p(e))return!0;switch(e.length){case 2:return'if'===e||'in'===e||'do'===e;case 3:return'var'===e||'for'===e||'new'===e||'try'===e||'let'===e;case 4:return'this'===e||'else'===e||'case'===e||'void'===e||'with'===e||'enum'===e;case 5:return'while'===e||'break'===e||'catch'===e||'throw'===e||'const'===e||'yield'===e||'class'===e||'super'===e;case 6:return'return'===e||'typeof'===e||'delete'===e||'switch'===e||'export'===e||'import'===e;case 7:return'default'===e||'finally'===e||'extends'===e;case 8:return'function'===e||'continue'===e||'debugger'===e;case 10:return'instanceof'===e;default:return!1;}}function g(e,a,r,o,n){var i;t('number'==typeof r,'Comment must have valid position');gt.lastCommentStart>=r||(gt.lastCommentStart=r,i={type:e,value:a},ht.range&&(i.range=[r,o]),ht.loc&&(i.loc=n),ht.comments.push(i),ht.attachComment&&(ht.leadingComments.push(i),ht.trailingComments.push(i)))}function h(e){var t,a,r,o;for(t=ut-e,a={start:{line:lt,column:ut-st-e}};ut=pt&&q({},at.UnexpectedToken,'ILLEGAL');else if(42===a){if(47===nt.charCodeAt(ut+1))return++ut,++ut,void(ht.comments&&(r=nt.slice(e+2,ut-2),t.end={line:lt,column:ut-st},g('Block',r,e,ut,t)));++ut}else++ut;q({},at.UnexpectedToken,'ILLEGAL')}function m(){var e,t;for(t=0===ut;ut>>='===i)?(ut+=4,{type:Qe.Punctuator,value:i,lineNumber:lt,lineStart:st,start:e,end:ut}):(n=i.substr(0,3),'>>>'===n||'<<='===n||'>>='===n)?(ut+=3,{type:Qe.Punctuator,value:n,lineNumber:lt,lineStart:st,start:e,end:ut}):(o=n.substr(0,2),a===o[1]&&0<='+-<>&|'.indexOf(a)||'=>'===o?(ut+=2,{type:Qe.Punctuator,value:o,lineNumber:lt,lineStart:st,start:e,end:ut}):0<='<>=!+-*%&|^/'.indexOf(a)?(++ut,{type:Qe.Punctuator,value:a,lineNumber:lt,lineStart:st,start:e,end:ut}):void q({},at.UnexpectedToken,'ILLEGAL'))}function S(e){for(var t='';ut=pt)?{type:Qe.EOF,lineNumber:lt,lineStart:st,start:ut,end:ut}:(e=nt.charCodeAt(ut),u(e)?v():40===e||41===e||59===e?b():39===e||34===e?k():46===e?a(nt.charCodeAt(ut+1))?w():b():a(e)?w():ht.tokenize&&47===e?R():b())}function L(){var e,t,a;return m(),e={start:{line:lt,column:ut-st}},t=A(),e.end={line:lt,column:ut-st},t.type!==Qe.EOF&&(a=nt.slice(t.start,t.end),ht.tokens.push({type:Ye[t.type],value:a,range:[t.start,t.end],loc:e})),t}function O(){var e;return e=ct,ut=e.end,lt=e.lineNumber,st=e.lineStart,ct='undefined'==typeof ht.tokens?A():L(),ut=e.end,lt=e.lineNumber,st=e.lineStart,e}function z(){var e,t,a;e=ut,t=lt,a=st,ct='undefined'==typeof ht.tokens?A():L(),ut=e,lt=t,st=a}function j(e,t){this.line=e,this.column=t}function G(e,t,a,r){this.start=new j(e,t),this.end=new j(a,r)}function U(){var e,t,a,r;return e=ut,t=lt,a=st,m(),r=lt!==t,ut=e,lt=t,st=a,r}function q(e,a){var r=Array.prototype.slice.call(arguments,2),o=a.replace(/%(\d)/g,function(e,a){return t(a>='===e||'>>>='===e||'&='===e||'^='===e||'|='===e)}function K(){var e=ut,t=lt,a=st,r=ct,o;return 59===nt.charCodeAt(ut)||W(';')?void O():(o=lt,m(),lt===o?void(ct.type!==Qe.EOF&&!W('}')&&N(ct)):(ut=e,lt=t,st=a,void(ct=r)))}function Z(e){return e.type===et.Identifier||e.type===et.MemberExpression}function Q(){var e=[],t;for(t=ct,V('[');!W(']');)W(',')?(O(),e.push(null)):(e.push(me()),W(']')||V(','));return O(),dt.markEnd(dt.createArrayExpression(e),t)}function Y(e,t){var a,r,o;return a=it,o=ct,r=Ne(),t&&it&&d(e[0].name)&&B(t,at.StrictParamName),it=a,dt.markEnd(dt.createFunctionExpression(null,e,[],r),o)}function J(){var e,t;return t=ct,e=O(),e.type===Qe.StringLiteral||e.type===Qe.NumericLiteral?(it&&e.octal&&B(e,at.StrictOctalLiteral),dt.markEnd(dt.createLiteral(e),t)):dt.markEnd(dt.createIdentifier(e.value),t)}function ee(){var e,t,a,r,o,n;return(e=ct,n=ct,e.type===Qe.Identifier)?(a=J(),'get'===e.value&&!W(':'))?(t=J(),V('('),V(')'),r=Y([]),dt.markEnd(dt.createProperty('get',t,r),n)):'set'!==e.value||W(':')?(V(':'),r=me(),dt.markEnd(dt.createProperty('init',a,r),n)):(t=J(),V('('),e=ct,e.type===Qe.Identifier?(o=[ve()],V(')'),r=Y(o,e)):(V(')'),B(e,at.UnexpectedToken,e.value),r=Y([])),dt.markEnd(dt.createProperty('set',t,r),n)):e.type===Qe.EOF||e.type===Qe.Punctuator?void N(e):(t=J(),V(':'),r=me(),dt.markEnd(dt.createProperty('init',t,r),n))}function te(){var e=[],t={},a=String,r,o,n,i,u;for(u=ct,V('{');!W('}');)r=ee(),o=r.key.type===et.Identifier?r.key.name:a(r.key.value),i='init'===r.kind?tt.Data:'get'===r.kind?tt.Get:tt.Set,n='$'+o,Object.prototype.hasOwnProperty.call(t,n)?(t[n]===tt.Data?it&&i===tt.Data?B({},at.StrictDuplicateProperty):i!==tt.Data&&B({},at.AccessorDataProperty):i===tt.Data?B({},at.AccessorDataProperty):t[n]&i&&B({},at.AccessorGetSet),t[n]|=i):t[n]=i,e.push(r),W('}')||V(',');return V('}'),dt.markEnd(dt.createObjectExpression(e),u)}function ae(){var e;return V('('),e=_e(),V(')'),e}function re(){var e,t,a,r;if(W('('))return ae();if(W('['))return Q();if(W('{'))return te();if(e=ct.type,r=ct,e===Qe.Identifier)a=dt.createIdentifier(O().value);else if(e===Qe.StringLiteral||e===Qe.NumericLiteral)it&&ct.octal&&B(ct,at.StrictOctalLiteral),a=dt.createLiteral(O());else if(e===Qe.Keyword){if(X('function'))return We();X('this')?(O(),a=dt.createThisExpression()):N(O())}else e===Qe.BooleanLiteral?(t=O(),t.value='true'===t.value,a=dt.createLiteral(t)):e===Qe.NullLiteral?(t=O(),t.value=null,a=dt.createLiteral(t)):W('/')||W('/=')?(a='undefined'==typeof ht.tokens?dt.createLiteral(D()):dt.createLiteral(I()),z()):N(O());return dt.markEnd(a,r)}function oe(){var e=[];if(V('('),!W(')'))for(;ut':case'<=':case'>=':case'instanceof':a=7;break;case'in':a=t?7:0;break;case'<<':case'>>':case'>>>':a=8;break;case'+':case'-':a=9;break;case'*':case'/':case'%':a=11;break;default:}return a}function he(){var e,t,a,r,o,n,u,l,s,p;if(e=ct,s=ce(),r=ct,o=ge(r,gt.allowIn),0===o)return s;for(r.prec=o,O(),t=[e,ct],u=ce(),n=[s,r,u];0<(o=ge(ct,gt.allowIn));){for(;2',Ye[Qe.Identifier]='Identifier',Ye[Qe.Keyword]='Keyword',Ye[Qe.NullLiteral]='Null',Ye[Qe.NumericLiteral]='Numeric',Ye[Qe.Punctuator]='Punctuator',Ye[Qe.StringLiteral]='String',Ye[Qe.RegularExpression]='RegularExpression',Je=['(','{','[','in','typeof','instanceof','new','return','case','delete','throw','void','=','+=','-=','*=','/=','%=','<<=','>>=','>>>=','&=','|=','^=',',','+','-','*','/','%','++','--','<<','>>','>>>','&','|','^','!','~','&&','||','?',':','===','==','>=','<=','<','>','!=','!=='],et={AssignmentExpression:'AssignmentExpression',ArrayExpression:'ArrayExpression',BlockStatement:'BlockStatement',BinaryExpression:'BinaryExpression',BreakStatement:'BreakStatement',CallExpression:'CallExpression',CatchClause:'CatchClause',ConditionalExpression:'ConditionalExpression',ContinueStatement:'ContinueStatement',DoWhileStatement:'DoWhileStatement',DebuggerStatement:'DebuggerStatement',EmptyStatement:'EmptyStatement',ExpressionStatement:'ExpressionStatement',ForStatement:'ForStatement',ForInStatement:'ForInStatement',FunctionDeclaration:'FunctionDeclaration',FunctionExpression:'FunctionExpression',Identifier:'Identifier',IfStatement:'IfStatement',Literal:'Literal',LabeledStatement:'LabeledStatement',LogicalExpression:'LogicalExpression',MemberExpression:'MemberExpression',NewExpression:'NewExpression',ObjectExpression:'ObjectExpression',Program:'Program',Property:'Property',ReturnStatement:'ReturnStatement',SequenceExpression:'SequenceExpression',SwitchStatement:'SwitchStatement',SwitchCase:'SwitchCase',ThisExpression:'ThisExpression',ThrowStatement:'ThrowStatement',TryStatement:'TryStatement',UnaryExpression:'UnaryExpression',UpdateExpression:'UpdateExpression',VariableDeclaration:'VariableDeclaration',VariableDeclarator:'VariableDeclarator',WhileStatement:'WhileStatement',WithStatement:'WithStatement'},tt={Data:1,Get:2,Set:4},at={UnexpectedToken:'Unexpected token %0',UnexpectedNumber:'Unexpected number',UnexpectedString:'Unexpected string',UnexpectedIdentifier:'Unexpected identifier',UnexpectedReserved:'Unexpected reserved word',UnexpectedEOS:'Unexpected end of input',NewlineAfterThrow:'Illegal newline after throw',InvalidRegExp:'Invalid regular expression',UnterminatedRegExp:'Invalid regular expression: missing /',InvalidLHSInAssignment:'Invalid left-hand side in assignment',InvalidLHSInForIn:'Invalid left-hand side in for-in',MultipleDefaultsInSwitch:'More than one default clause in switch statement',NoCatchOrFinally:'Missing catch or finally after try',UnknownLabel:'Undefined label \'%0\'',Redeclaration:'%0 \'%1\' has already been declared',IllegalContinue:'Illegal continue statement',IllegalBreak:'Illegal break statement',IllegalReturn:'Illegal return statement',StrictModeWith:'Strict mode code may not include a with statement',StrictCatchVariable:'Catch variable may not be eval or arguments in strict mode',StrictVarName:'Variable name may not be eval or arguments in strict mode',StrictParamName:'Parameter name eval or arguments is not allowed in strict mode',StrictParamDupe:'Strict mode function may not have duplicate parameter names',StrictFunctionName:'Function name may not be eval or arguments in strict mode',StrictOctalLiteral:'Octal literals are not allowed in strict mode.',StrictDelete:'Delete of an unqualified identifier in strict mode.',StrictDuplicateProperty:'Duplicate data property in object literal not allowed in strict mode',AccessorDataProperty:'Object literal may not have data and accessor property with the same name',AccessorGetSet:'Object literal may not have multiple get/set accessors with the same name',StrictLHSAssignment:'Assignment to eval or arguments is not allowed in strict mode',StrictLHSPostfix:'Postfix increment/decrement may not have eval or arguments operand in strict mode',StrictLHSPrefix:'Prefix increment/decrement may not have eval or arguments operand in strict mode',StrictReservedWord:'Use of future reserved word in strict mode'},rt={NonAsciiIdentifierStart:/[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]/,NonAsciiIdentifierPart:/[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]/},ot={name:'SyntaxTree',processComment:function(e){var t,a;if(!(e.type===et.Program&&0=e.range[1]?(a=ht.trailingComments,ht.trailingComments=[]):ht.trailingComments.length=0:0=e.range[1]&&(a=ht.bottomRightStack[ht.bottomRightStack.length-1].trailingComments,delete ht.bottomRightStack[ht.bottomRightStack.length-1].trailingComments);0=e.range[0];)t=ht.bottomRightStack.pop();t?t.leadingComments&&t.leadingComments[t.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=t.leadingComments,delete t.leadingComments):0=e?e=0:1<=e&&(e=1)}})});ke(xf);var vf=Ce(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e){return e}});ke(vf);var bf=Ce(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),Object.defineProperty(t,'softmax',{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,'elu',{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,'selu',{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,'softplus',{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,'softsign',{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,'relu',{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,'tanh',{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,'sigmoid',{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,'hard_sigmoid',{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,'linear',{enumerable:!0,get:function(){return c.default}});var r=a(of),o=a(cf),n=a(gf),i=a(hf),u=a(ff),l=a(mf),s=a(_f),p=a(yf),d=a(xf),c=a(vf)});ke(bf);var Sf=Ce(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(jh),o=a(af),n=function(e){function t(){var e=0t)}})})}});ke(wf);var kf=Ce(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),Object.defineProperty(t,'LeakyReLU',{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,'PReLU',{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,'ELU',{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,'ThresholdedReLU',{enumerable:!0,get:function(){return i.default}});var r=a(Sf),o=a(Pf),n=a(Tf),i=a(wf)});ke(kf);var Cf=Ce(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t){var r='#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs['+e+'];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float('+t[0]+') * outTex.y);\n int out_x = int(float('+t[1]+') * outTex.x);\n \n outColor = vec4('+(0,a.default)(e).map(function(e){return'texelFetch(inputs['+e+'], ivec2(out_x, out_y), 0).r'}).join(' + ')+');\n}\n';return r};var a=function(e){return e&&e.__esModule?e:{default:e}}(Vh)});ke(Cf);var Ff=Ce(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t){var r='#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs['+e+'];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float('+t[0]+') * outTex.y);\n int out_x = int(float('+t[1]+') * outTex.x);\n \n outColor = vec4(('+(0,a.default)(e).map(function(e){return'texelFetch(inputs['+e+'], ivec2(out_x, out_y), 0).r'}).join(' + ')+') / float('+e+'));\n}\n';return r};var a=function(e){return e&&e.__esModule?e:{default:e}}(Vh)});ke(Ff);var Mf=Xr,Df=$r,If=Kr,Ef=Zr,Rf=Ce(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t,a,u){var l=t.map(function(e){return e[u]}),s=(0,n.default)(e+1).map(function(e){return(0,o.default)((0,r.default)(l,e))}),p=0===u?'out_y':'out_x',i='\n int n = 0;\n int offset = 0;\n if ('+p+' >= '+s[1]+' && '+p+' < '+s[2]+') {\n n = 1;\n offset = '+s[1]+';\n }';2= '+s[e]+' && '+p+' < '+s[e+1]+') {\n n = '+e+';\n offset = '+s[e]+';\n }'}).join('')+'\n');var d='outColor = vec4(0.0);';if(0===u||1===u){var c=function(e){return'out_x'+(1===u?' - '+s[e]:'')},g=function(e){return'out_y'+(0===u?' - '+s[e]:'')};d='\n if (n == 0) {\n outColor = vec4(texelFetch(inputs[0], ivec2(out_x, out_y), 0).r);\n }'+(0,n.default)(1,e).map(function(e){return' else if (n == '+e+') {\n outColor = vec4(texelFetch(inputs['+e+'], ivec2('+c(e)+', '+g(e)+'), 0).r);\n }'}).join('')+'\n'}var h='#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs['+e+'];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float('+a[0]+') * outTex.y);\n int out_x = int(float('+a[1]+') * outTex.x);\n'+i+'\n'+d+'\n}\n';return h};var r=a(Df),o=a(Ef),n=a(Vh)});ke(Rf);var Af=Ce(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t){var a='#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs['+e+'];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float('+t[0]+') * outTex.y);\n int out_x = int(float('+t[1]+') * outTex.x);\n\n float val = texelFetch(inputs[0], ivec2(out_x, out_y), 0).r;\n for (int i = 1; i < '+e+'; i++) {\n val = max(val, texelFetch(inputs[i], ivec2(out_x, out_y), 0).r);\n }\n\n outColor = vec4(val);\n}\n';return a}});ke(Af);var Lf=Ce(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t){var a='#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs['+e+'];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float('+t[0]+') * outTex.y);\n int out_x = int(float('+t[1]+') * outTex.x);\n\n float val = texelFetch(inputs[0], ivec2(out_x, out_y), 0).r;\n for (int i = 1; i < '+e+'; i++) {\n val = min(val, texelFetch(inputs[i], ivec2(out_x, out_y), 0).r);\n }\n\n outColor = vec4(val);\n}\n';return a}});ke(Lf);var Of=Ce(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t){var r='#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs['+e+'];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float('+t[0]+') * outTex.y);\n int out_x = int(float('+t[1]+') * outTex.x);\n\n outColor = vec4('+(0,a.default)(e).map(function(e){return'texelFetch(inputs['+e+'], ivec2(out_x, out_y), 0).r'}).join(' * ')+');\n}\n';return r};var a=function(e){return e&&e.__esModule?e:{default:e}}(Vh)});ke(Of);var zf=Ce(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t){var a='#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs[2];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float('+t[0]+') * outTex.y);\n int out_x = int(float('+t[1]+') * outTex.x);\n \n outColor = vec4(texelFetch(inputs[0], ivec2(out_x, out_y), 0).r - texelFetch(inputs[1], ivec2(out_x, out_y), 0).r);\n}\n';return a}});ke(zf);var jf=Ce(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t,a,r,o){var n=r?'sum += texelFetch(bias, ivec2(out_x, 0), 0).r;':'',i=o?'int fragmentIndex = int(floor(float(rowIndex) / float('+t[0]+')));\n rowIndex = int(mod(float(rowIndex), float('+t[0]+')));\n colIndex += fragmentIndex * '+t[1]+';':'',u='#version 300 es\nprecision highp float;\nprecision highp isampler2D;\n\nin vec2 outTex;\nuniform sampler2D x;\nuniform isampler2D indexMap;\nuniform sampler2D kernel;\nuniform sampler2D bias;\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float('+e[0]+') * outTex.y);\n int out_x = int(float('+e[1]+') * outTex.x);\n\n float sum = 0.;\n for (int i = 0; i < '+a[1]+'; ++i) {\n int index = texelFetch(indexMap, ivec2(i, out_y), 0).r; \n if (index != -1) {\n int rowIndex = int(floor(float(index) / float('+t[1]+')));\n int colIndex = int(mod(float(index), float('+t[1]+')));\n '+i+'\n sum += texelFetch(x, ivec2(colIndex, rowIndex), 0).r * texelFetch(kernel, ivec2(out_x, i), 0).r;\n }\n }\n\n '+n+'\n outColor = vec4(sum);\n} \n';return u}});ke(jf);var Gf=Ce(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t,a,r,o){var n=r?'sum += texelFetch(bias, ivec2(out_x, 0), 0).r;':'',i=o?'int fragmentIndex = int(floor(float(rowIndex) / float('+t[0]+')));\n rowIndex = int(mod(float(rowIndex), float('+t[0]+')));\n colIndex += fragmentIndex * '+t[1]+';':'',u='#version 300 es\nprecision highp float;\nprecision highp isampler2D;\n\nin vec2 outTex;\nuniform sampler2D matMulResult;\nuniform isampler2D indexMap;\nuniform sampler2D bias;\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float('+e[0]+') * outTex.y);\n int out_x = int(float('+e[1]+') * outTex.x);\n\n float sum = 0.;\n for (int n = 0; n < '+a[1]+'; ++n) {\n int index = texelFetch(indexMap, ivec2(n, out_y), 0).r;\n if (index != -1) {\n int rowIndex = int(floor(float(index) / float('+t[1]+')));\n int colIndex = int(mod(float(index), float('+t[1]+')));\n '+i+'\n sum += texelFetch(matMulResult, ivec2(colIndex + out_x, rowIndex), 0).r;\n }\n }\n\n '+n+'\n outColor = vec4(sum);\n} \n';return u}});ke(Gf);var Uf=Ce(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e,t,a){var r;return r=a?'#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D featureMaps;\nuniform sampler2D weights;\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float('+e[0]+') * outTex.y);\n int out_x = int(float('+e[1]+') * outTex.x);\n\n int featureMapsRow = out_x + '+e[0]+' * out_y;\n\n float sum = 0.;\n for (int k = 0; k < '+t+'; ++k) {\n float f = texelFetch(featureMaps, ivec2(k, featureMapsRow), 0).r;\n float w = texelFetch(weights, ivec2(k, 0), 0).r;\n sum += f * w;\n }\n\n outColor = vec4(max(sum, 0.0));\n} \n':'#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D featureMaps;\nuniform sampler2D weights;\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float('+e[0]+') * outTex.y);\n int out_x = int(float('+e[1]+') * outTex.x);\n\n float sum = 0.;\n for (int k = 0; k < '+t+'; ++k) {\n float f = texelFetch(featureMaps, ivec2(k, out_y), 0).r;\n float w = texelFetch(weights, ivec2(out_x, k), 0).r;\n sum += f * w;\n }\n\n outColor = vec4(max(sum, 0.0));\n} \n',r}});ke(Uf);var qf=Ce(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=function(e){for(var t=arguments.length,a=Array(1t&&(t=i,l=u);return l};kn=kn||function(e){return e=+e,0===e||isNaN(e)?e:0Ln(a)?(r=a/e,t=kn(e)*On(1+r*r),n=1/t,i=r*n,l=e*t):(r=e/a,t=kn(e)*On(1+r*r),i=1/t,n=r*i,l=a*t),void 0!==o&&2=e.tensor.shape.length?this.output=e:(this.output=new o.default([],[e.tensor.shape.reduce(function(e,t){return e*t},1)]),this.output.replaceTensorData(e.tensor.data))}},{key:'_callGPU',value:function(e){e.glTexture||e.glTextureFragments||(2>=e.tensor.shape.length?e.createGLTexture({type:'2d',format:'float'}):2=e.tensor.shape.length?e.createGLTexture({type:'2d',format:'float'}):2=e.tensor.shape.length||(0,n.default)((0,o.default)(e.tensor.shape.length),this.dims)?(this.output=e,this.output):(this.gpu?this._callGPU(e):this._callCPU(e),this.output)}},{key:'_callCPU',value:function(e){var t;this.dims.length!==e.tensor.shape.length&&this.throwError('The specified dims permutation must match the number of dimensions.');var a=this.dims.map(function(t){return e.tensor.shape[t]});this.output=new u.default([],a),l.default.assign(this.output.tensor,(t=e.tensor).transpose.apply(t,Hn(this.dims)))}},{key:'_createIndexMap',value:function(){var e=this,t;if(!this.indexMap){var a=new u.default([],this.inputShape,{type:Int32Array}),o=new u.default([],this.inputShape,{type:Int32Array}),n=new u.default([],this.inputShape,{type:Int32Array});if(2===this.inputShape.length)for(var s=0;s=e.tensor.shape.length?e.createGLTexture({type:'2d',format:'float'}):2e)},l_=function(e){var t=e>>r_-1;return(e^t)-t},s_=function(e,t){return t^(e^t)&-(e>>=t,a=(255>>=a,t|=a,a=(15>>=a,t|=a,a=(3>>=a,t|=a,t|e>>1},g_=function(e){return 1e9<=e?9:1e8<=e?8:1e7<=e?7:1e6<=e?6:1e5<=e?5:1e4<=e?4:1e3<=e?3:100<=e?2:10<=e?1:0},h_=function(e){return e-=1431655765&e>>>1,e=(858993459&e)+(858993459&e>>>2),16843009*(252645135&e+(e>>>4))>>>24},f_=ko,m_=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1},__=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)},y_=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,1&27030>>>e},x_=Array(256);(function(e){for(var t=0;256>t;++t){var a=t,o=t,r=7;for(a>>>=1;a;a>>>=1)o<<=1,o|=1&a,--r;e[t]=255&o<>>8]<<16|x_[255&e>>>16]<<8|x_[255&e>>>24]},b_=function(e,t){return e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e|t<<1},S_=function(e,t){return e=1431655765&e>>>t,e=858993459&(e|e>>>1),e=252645135&(e|e>>>2),e=16711935&(e|e>>>4),e=65535&(e|e>>>16),e<<16>>16},P_=function(e,t,a){return e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e|=t<<1,a&=1023,a=4278190335&(a|a<<16),a=251719695&(a|a<<8),a=3272356035&(a|a<<4),a=1227133513&(a|a<<2),e|a<<2},T_=function(e,t){return e=1227133513&e>>>t,e=3272356035&(e|e>>>2),e=251719695&(e|e>>>4),e=4278190335&(e|e>>>8),e=1023&(e|e>>>16),e<<22>>22},w_=function(e){var a=e|e-1;return a+1|(~a&-~a)-1>>>ko(e)+1},k_={INT_BITS:o_,INT_MAX:n_,INT_MIN:i_,sign:u_,abs:l_,min:s_,max:p_,isPow2:d_,log2:c_,log10:g_,popCount:h_,countTrailingZeros:f_,nextPow2:m_,prevPow2:__,parity:y_,reverse:v_,interleave2:b_,deinterleave2:S_,interleave3:P_,deinterleave3:T_,nextCombination:w_},C_=Mo,F_=Ce(function(e,t){function a(e){if(e){var t=e.length||e.byteLength,a=k_.log2(t);_[a].push(e)}}function r(e){var e=k_.nextPow2(e),t=k_.log2(e),a=_[t];return 0e;++e)n.UINT8[e].length=0,n.UINT16[e].length=0,n.UINT32[e].length=0,n.INT8[e].length=0,n.INT16[e].length=0,n.INT32[e].length=0,n.FLOAT[e].length=0,n.DOUBLE[e].length=0,n.UINT8C[e].length=0,_[e].length=0,y[e].length=0}}),M_=Do,D_=Io,I_=Eo,E_=Ro,R_=Ao,A_=Lo,L_={clone:M_,malloc:D_,free:I_,zeros:E_,ones:R_,eye:A_},O_=Oo,z_=Ce(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(jh),o=a(af),n=a($f),i=a(O_),u=function(e){function t(){var e=0this.dotAxes[0]&&(this.dotAxes[0]=t[0].length+this.dotAxes[0]),0>this.dotAxes[1]&&(this.dotAxes[1]=t[1].length+this.dotAxes[1]),t[0][this.dotAxes[0]]!==t[1][this.dotAxes[1]]&&this.throwError('Dimensions incompatibility using dot mode.');else if('concat'===this.mode){var a=t.slice(),n=0>this.concatAxis?a[0].length+this.concatAxis:this.concatAxis;0===this.concatAxis&&(n=0),(0,r.default)(a.length).forEach(function(e){a[e].splice(n,1)}),a.every(function(e){return(0,o.default)(e,a[0])})||this.throwError('In concat mode, all shapes must be the same except along the concat axis.')}return!0}},{key:'_callCPU',value:function(){}},{key:'_callGPU',value:function(e){e.forEach(function(e){e.glTexture||e.glTextureFragments||e.createGLTexture({type:'2d',format:'float',supportsTextureFragments:!0})}),this.output||(this.output=new i.default([],e[0].glTextureShape),this.output.createGLTexture({type:'2d',format:'float',supportsTextureFragments:!0}),e[0].is1D?this.output.is1D=e[0].is1D:(e[0].is2DReshaped||e[0].is2DSquareReshaped)&&(e[0].is2DReshaped?this.output.is2DReshaped=e[0].is2DReshaped:e[0].is2DSquareReshaped&&(this.output.is2DSquareReshaped=e[0].is2DSquareReshaped),this.output.originalShape=e[0].originalShape.slice(),this.output.indicesForReshaped=e[0].indicesForReshaped)),zh.webgl2.runProgram({program:this.mergeProgram,output:this.output,inputs:e.map(function(e,t){return{input:e,name:'inputs['+t+']'}}),supportsTextureFragments:!0}),0===this.outbound.length&&(this.output.transferFromGLTexture(),this.output.is2DReshaped?this.output.reshapeFrom2D():this.output.is2DSquareReshaped&&this.output.reshapeFrom2DSquare())}}]),t}(n.default);t.default=u});ke(q_);var B_=Ce(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(q_),o=a(af),n=a(qf),u=a(Jh),i=function(e){function t(){var e=0=o?o:o-1,a}return Bn(t,e),Un(t,[{key:'_callCPU',value:function(e){var t=e[0].tensor.shape.slice(),a=0>this.concatAxis?t.length+this.concatAxis:this.concatAxis;if(e.slice(1,e.length).forEach(function(e){var r=e.tensor.shape.slice()[a];t[a]+=r}),this.output=new n.default([],t),0===a)(0,l.default)(this.output.tensor,e.map(function(e){return e.tensor}));else{for(var r=[a],o=0,i;othis.concatAxis?this.output.originalShape.length+this.concatAxis:this.concatAxis;this.output.originalShape[o]=(0,r.default)(e.map(function(e){return e.originalShape[o]})),this.output.indicesForReshaped=u.createIndicesFor2DReshaped(this.output.originalShape,!1,o)}if(!this.mergeProgram){var l=this.output.glTextureFragments?this.output.glTextureFragmentShape:this.output.glTextureShape,s=(0,i.default)('concatenate',e.length,e.map(function(e){return e.glTextureShape}),l,a);this.mergeProgram=zh.webgl2.compileProgram(s)}zh.webgl2.runProgram({program:this.mergeProgram,output:this.output,inputs:e.map(function(e,t){return{input:e,name:'inputs['+t+']'}}),supportsTextureFragments:!0}),0===this.outbound.length&&(this.output.transferFromGLTexture(),this.output.is2DReshaped?this.output.reshapeFrom2D():this.output.is2DSquareReshaped&&this.output.reshapeFrom2DSquare())}}]),t}(o.default);t.default=s});ke(Q_);var Y_=Ce(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(q_),o=a(af),n=a(Vf),u=a(Jh),i=function(e){function t(){var e=0=o[0]?o[0]:o[0]-1,0>=o[1]?o[1]:o[1]-1]:[0>=o?o:o-1,0>=o?o:o-1],a.normalize=void 0!==n&&n,a.gpu&&(a.mergeProgram=zh.webgl2.compileProgram('#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D input1;\nuniform sampler2D input2;\nuniform int rows;\nuniform int cols;\nuniform int dotAxis1;\nuniform int dotAxis2;\nuniform int commonDim;\nuniform bool normalize;\nout vec4 outColor;\n\nvoid main() {\n int out_x = int(float(cols) * outTex.x);\n int out_y = int(float(rows) * outTex.y);\n\n float sum = 0.;\n float a = 0.;\n float b = 0.;\n float norm1 = 0.;\n float norm2 = 0.;\n\n for (int i = 0; i < commonDim; ++i) {\n if (dotAxis1 == 0 && dotAxis2 == 0) {\n a = texelFetch(input1, ivec2(out_y, i), 0).r;\n b = texelFetch(input2, ivec2(out_x, i), 0).r;\n } else if (dotAxis1 == 1 && dotAxis2 == 1) {\n a = texelFetch(input1, ivec2(i, out_y), 0).r;\n b = texelFetch(input2, ivec2(i, out_x), 0).r;\n }\n\n sum += a * b;\n\n if (normalize) {\n norm1 += a * a;\n norm2 += b * b;\n }\n }\n\n if (normalize) {\n sum /= sqrt(norm1) * sqrt(norm2);\n }\n\n outColor = vec4(sum);\n}\n')),a}return Bn(t,e),Un(t,[{key:'_calcOutputShape',value:function(e){var t=e[0].slice(),a=e[1].slice();t.splice(this.dotAxes[0],1),a.splice(this.dotAxes[1],1),this.outputShape=t.concat(a),1===this.outputShape.length&&this.outputShape.push(1)}},{key:'_callCPU',value:function(e){if(this._calcOutputShape([e[0].tensor.shape,e[1].tensor.shape]),this.output=new o.default([],this.outputShape),2!==e[0].tensor.shape.length||2!==e[1].tensor.shape.length)this.throwError('dot mode for 3+ dim tensors not yet implemented.');else if(0===this.dotAxes[0]&&0===this.dotAxes[1]){if(this.normalize){for(var t=0;tthis.axis?e.tensor.shape.length+this.axis:this.axis-1,this.axisNormalized=!0);for(var t=[],a=0;athis.axis?this.inputShape.length+this.axis:this.axis-1,this.axisNormalized=!0),e.glTexture||e.glTextureFragments||(2>=e.tensor.shape.length?e.createGLTexture({type:'2d',format:'float',supportsTextureFragments:!0}):2 val) {\n val = val2;\n }\n } else {\n val += val2;\n }\n count += 1;\n }\n }\n\n if (!isMaxPooling) {\n val /= float(count);\n }\n\n outColor = vec4(val);\n}\n'),a.poolingFragmentsProgram=zh.webgl2.compileProgram('#version 300 es\nprecision highp float;\nprecision highp isampler2D;\n\nin vec2 outTex;\nuniform sampler2D x;\nuniform isampler2D poolIndexMap;\nuniform int channels;\nuniform int poolSize;\nuniform bool isMaxPooling;\nout vec4 outColor;\n\nvoid main() {\n ivec2 inputSize = textureSize(x, 0);\n ivec2 outputSize = textureSize(poolIndexMap, 0);\n int out_x = int(float(channels) * outTex.x);\n int out_y = int(float(outputSize[1]) * outTex.y);\n\n float val = 0.;\n int count = 0;\n for (int i = 0; i < poolSize; ++i) {\n int poolIndex = texelFetch(poolIndexMap, ivec2(i, out_y), 0).r;\n int fragmentIndex = int(floor(float(poolIndex) / float(inputSize[1])));\n if (poolIndex != -1) {\n poolIndex = int(mod(float(poolIndex), float(inputSize[1])));\n float val2 = texelFetch(x, ivec2(fragmentIndex * channels + out_x, poolIndex), 0).r;\n if (isMaxPooling) {\n if (count == 0 || val2 > val) {\n val = val2;\n }\n } else {\n val += val2;\n }\n count += 1;\n }\n }\n\n if (!isMaxPooling) {\n val /= float(count);\n }\n\n outColor = vec4(val);\n}\n')),a}return Bn(t,e),Un(t,[{key:'call',value:function(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}},{key:'_callCPU',value:function(e){var t='valid'===this.padding?Cn((e.tensor.shape[0]-this.poolSize+this.strides)/this.strides):Cn((e.tensor.shape[0]+this.strides-1)/this.strides);this.output=new o.default([],[t,e.tensor.shape[1]]);for(var a=new o.default([],[e.tensor.shape[1]]),r='valid'===this.padding?0:Rn(0,In((e.tensor.shape[0]-(t-1)*this.strides-this.poolSize)/2)),u=0;ue.tensor.shape[0]-1);p++)'max'===this.poolingFunc?n.default.maxeq(a.tensor,e.tensor.pick(i+p,null)):'average'===this.poolingFunc&&n.default.addeq(a.tensor,e.tensor.pick(i+p,null)),s+=1;'average'===this.poolingFunc&&n.default.divseq(a.tensor,s),n.default.assign(this.output.tensor.pick(u,null),a.tensor),r+=this.strides}}},{key:'_createIndexMap',value:function(){if(!this.poolIndexMap){var e='valid'===this.padding?Cn((this.inputShape[0]-this.poolSize+this.strides)/this.strides):Cn((this.inputShape[0]+this.strides-1)/this.strides);this.outputShape=[e,this.inputShape[1]],this.poolIndexMap=new o.default([],[e,this.poolSize],{type:Int32Array}),n.default.assigns(this.poolIndexMap.tensor,-1);for(var t='valid'===this.padding?0:Rn(0,In((this.inputShape[0]-(e-1)*this.strides-this.poolSize)/2)),a=0;a val) {\n val = val2;\n }\n } else {\n val += val2;\n }\n count += 1;\n }\n }\n\n if (!isMaxPooling) {\n val /= float(count);\n }\n\n outColor = vec4(val);\n}\n'),a.poolingFragmentsProgram=zh.webgl2.compileProgram('#version 300 es\nprecision highp float;\nprecision highp isampler2D;\n\nin vec2 outTex;\nuniform sampler2D x;\nuniform isampler2D poolIndexMap;\nuniform int channels;\nuniform int poolSize;\nuniform bool isMaxPooling;\nout vec4 outColor;\n\nvoid main() {\n ivec2 inputSize = textureSize(x, 0);\n ivec2 outputSize = textureSize(poolIndexMap, 0);\n int out_x = int(float(channels) * outTex.x);\n int out_y = int(float(outputSize[1]) * outTex.y);\n\n float val = 0.;\n int count = 0;\n for (int i = 0; i < poolSize; ++i) {\n int poolIndex = texelFetch(poolIndexMap, ivec2(i, out_y), 0).r;\n int fragmentIndex = int(floor(float(poolIndex) / float(inputSize[1])));\n if (poolIndex != -1) {\n poolIndex = int(mod(float(poolIndex), float(inputSize[1])));\n float val2 = texelFetch(x, ivec2(fragmentIndex * channels + out_x, poolIndex), 0).r;\n if (isMaxPooling) {\n if (count == 0 || val2 > val) {\n val = val2;\n }\n } else {\n val += val2;\n }\n count += 1;\n }\n }\n\n if (!isMaxPooling) {\n val /= float(count);\n }\n\n outColor = vec4(val);\n}\n')),a}return Bn(t,e),Un(t,[{key:'call',value:function(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}},{key:'_calcOutputShape',value:function(e){if(!(this.outputShape&&this.inputPadding)){var t=Vn(e,3),a=t[0],r=t[1],o=t[2],n=Vn(this.poolSize,2),i=n[0],u=n[1],l='same'===this.padding?Cn((a+this.strides[0]-1)/this.strides[0]):Cn((a-i+this.strides[0])/this.strides[0]),s='same'===this.padding?Cn((r+this.strides[1]-1)/this.strides[1]):Cn((r-u+this.strides[1])/this.strides[1]),p='same'===this.padding?An(0,Cn((l-1)*this.strides[0]+i-a)):0,d='same'===this.padding?An(0,Cn((s-1)*this.strides[1]+u-r)):0,c=Cn(p/2),g=Cn(d/2);this.outputShape=[l,s,o],this.inputPadding=[c,p-c,g,d-g]}}},{key:'_padInput',value:function(e){if('same'===this.padding){var t=Vn(e.tensor.shape,3),a=t[0],r=t[1],n=t[2],i=Vn(this.inputPadding,4),l=i[0],s=i[1],p=i[2],d=i[3],c=new o.default([],[a+l+s,r+p+d,n]);return'max'===this.poolingFunc&&u.default.assigns(c.tensor,Number.NEGATIVE_INFINITY),u.default.assign(c.tensor.hi(a+l,r+p,n).lo(l,p,0),e.tensor),c}return e}},{key:'_callCPU',value:function(e){'channels_first'===this.dataFormat&&(e.tensor=e.tensor.transpose(1,2,0)),this._calcOutputShape(e.tensor.shape),e=this._padInput(e);var t=Vn(e.tensor.shape,3),a=t[0],r=t[1],n=t[2],l=Vn(this.poolSize,2),s=l[0],p=l[1];this.output=new o.default([],this.outputShape);for(var d=new o.default([],[s,p,n]),g=Vn(this.inputPadding,4),h=g[0],f=g[1],m=g[2],_=g[3],y=0,i=0,x;y<=a-s;y+=this.strides[0],i++){x=0,ya-f&&(x=y+s-(a-f));for(var v=0,b=0,S;v<=r-p;v+=this.strides[1],b++){S=0,vr-_&&(S=v+p-(r-_));var P=(s-x)*(p-S);u.default.assign(d.tensor,e.tensor.hi(y+s,v+p,n).lo(y,v,0));for(var T=0;T val) {\n val = val2;\n }\n } else {\n val += val2;\n }\n count += 1;\n }\n }\n\n if (!isMaxPooling) {\n val /= float(count);\n }\n\n outColor = vec4(val);\n}\n'),a.poolingFragmentsProgram=zh.webgl2.compileProgram('#version 300 es\nprecision highp float;\nprecision highp isampler2D;\n\nin vec2 outTex;\nuniform sampler2D x;\nuniform isampler2D poolIndexMap;\nuniform int channels;\nuniform int poolSize;\nuniform bool isMaxPooling;\nout vec4 outColor;\n\nvoid main() {\n ivec2 inputSize = textureSize(x, 0);\n ivec2 outputSize = textureSize(poolIndexMap, 0);\n int out_x = int(float(channels) * outTex.x);\n int out_y = int(float(outputSize[1]) * outTex.y);\n\n float val = 0.;\n int count = 0;\n for (int i = 0; i < poolSize; ++i) {\n int poolIndex = texelFetch(poolIndexMap, ivec2(i, out_y), 0).r;\n int fragmentIndex = int(floor(float(poolIndex) / float(inputSize[1])));\n if (poolIndex != -1) {\n poolIndex = int(mod(float(poolIndex), float(inputSize[1])));\n float val2 = texelFetch(x, ivec2(fragmentIndex * channels + out_x, poolIndex), 0).r;\n if (isMaxPooling) {\n if (count == 0 || val2 > val) {\n val = val2;\n }\n } else {\n val += val2;\n }\n count += 1;\n }\n }\n\n if (!isMaxPooling) {\n val /= float(count);\n }\n\n outColor = vec4(val);\n}\n')),a}return Bn(t,e),Un(t,[{key:'call',value:function(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}},{key:'_calcOutputShape',value:function(e){if(!(this.outputShape&&this.inputPadding)){var t=Vn(e,4),a=t[0],r=t[1],o=t[2],n=t[3],i=Vn(this.poolSize,3),u=i[0],l=i[1],s=i[2],p='same'===this.padding?Cn((a+this.strides[0]-1)/this.strides[0]):Cn((a-u+this.strides[0])/this.strides[0]),d='same'===this.padding?Cn((r+this.strides[1]-1)/this.strides[1]):Cn((r-l+this.strides[1])/this.strides[1]),c='same'===this.padding?Cn((o+this.strides[2]-1)/this.strides[2]):Cn((o-s+this.strides[2])/this.strides[2]),g='same'===this.padding?An(0,Cn((p-1)*this.strides[0]+u-a)):0,h='same'===this.padding?An(0,Cn((d-1)*this.strides[1]+l-r)):0,f='same'===this.padding?An(0,Cn((c-1)*this.strides[2]+s-o)):0,m=Cn(g/2),_=Cn(h/2),y=Cn(f/2);this.outputShape=[p,d,c,n],this.inputPadding=[m,g-m,_,h-_,y,f-y]}}},{key:'_padInput',value:function(e){if('same'===this.padding){var t=Vn(e.tensor.shape,4),a=t[0],r=t[1],n=t[2],i=t[3],l=Vn(this.inputPadding,6),s=l[0],p=l[1],d=l[2],c=l[3],g=l[4],h=l[5],f=new o.default([],[a+s+p,r+d+c,n+g+h,i]);return'max'===this.poolingFunc&&u.default.assigns(f.tensor,Number.NEGATIVE_INFINITY),u.default.assign(f.tensor.hi(a+s,r+d,n+g,i).lo(s,d,g,0),e.tensor),f}return e}},{key:'_callCPU',value:function(e){'channels_first'===this.dataFormat&&(e.tensor=e.tensor.transpose(1,2,3,0)),this._calcOutputShape(e.tensor.shape),e=this._padInput(e);var t=Vn(e.tensor.shape,4),a=t[0],r=t[1],n=t[2],l=t[3],s=Vn(this.poolSize,3),p=s[0],d=s[1],g=s[2];this.output=new o.default([],this.outputShape);for(var h=new o.default([],[p,d,g,l]),f=Vn(this.inputPadding,6),m=f[0],_=f[1],y=f[2],x=f[3],v=f[4],b=f[5],S=0,i=0,P;S<=a-p;S+=this.strides[0],i++){P=0,Sa-_&&(P=S+p-(a-_));for(var T=0,w=0,C;T<=r-d;T+=this.strides[1],w++){C=0,Tr-x&&(C=T+d-(r-x));for(var F=0,k=0,M;F<=n-g;F+=this.strides[2],k++){M=0,Fn-b&&(M=F+g-(n-b));var D=(p-P)*(d-C)*(g-M);u.default.assign(h.tensor,e.tensor.hi(S+p,T+d,F+g,l).lo(S,T,F,0));for(var I=0;I maxval) {\n maxval = val;\n }\n }\n outColor = vec4(maxval);\n } else {\n // GlobalAveragePooling\n float sum = 0.0;\n for (int j = 0; j < size[1]; ++j) {\n float val = texelFetch(x, ivec2(out_x, j), 0).r;\n sum += val;\n }\n outColor = vec4(sum / float(channelDataSize));\n }\n}\n')),a}return Bn(t,e),Un(t,[{key:'call',value:function(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}},{key:'_callCPU',value:function(e){var t=Vn(e.tensor.shape,2),a=t[0],r=t[1];this.output=new o.default([],[r]);for(var u=0;u maxval) {\n maxval = val;\n }\n }\n outColor = vec4(maxval);\n } else {\n // GlobalAveragePooling\n float sum = 0.0;\n for (int j = 0; j < size[1]; ++j) {\n float val = texelFetch(x, ivec2(out_x, j), 0).r;\n sum += val;\n }\n outColor = vec4(sum / float(channelDataSize));\n }\n}\n')),a}return Bn(t,e),Un(t,[{key:'call',value:function(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}},{key:'_callCPU',value:function(e){'channels_first'===this.dataFormat&&(e.tensor=e.tensor.transpose(1,2,0));var t=Vn(e.tensor.shape,3),a=t[0],r=t[1],u=t[2];this.output=new o.default([],[u]);for(var l=0;l maxval) {\n maxval = val;\n }\n }\n outColor = vec4(maxval);\n } else {\n // GlobalAveragePooling\n float sum = 0.0;\n for (int j = 0; j < size[1]; ++j) {\n float val = texelFetch(x, ivec2(out_x, j), 0).r;\n sum += val;\n }\n outColor = vec4(sum / float(channelDataSize));\n }\n}\n')),a}return Bn(t,e),Un(t,[{key:'call',value:function(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}},{key:'_callCPU',value:function(e){'channels_first'===this.dataFormat&&(e.tensor=e.tensor.transpose(1,2,3,0));var t=Vn(e.tensor.shape,4),a=t[0],r=t[1],u=t[2],l=t[3];this.output=new o.default([],[l]);for(var s=0;s=e.tensor.shape.length?e.createGLTexture({type:'2d',format:'float'}):2=a.length?this.slice.createGLTexture({type:'2d',format:'float'}):(this.slice.reshapeTo2DSquare(),this.slice.createGLTexture({type:'2d',format:'float'}))),2>=this.inputShape.length?zh.webgl2.runProgram({program:this.selectSliceProgram,output:this.slice,inputs:[{input:e,name:'x'}],uniforms:[{value:0,type:'int',name:'t'}]}):zh.webgl2.runProgram({program:this.mapInputProgram,output:this.slice,inputs:[{input:e,name:'x'},{input:this.indexMaps[0],name:'indexMap'}],uniforms:[{value:e.glTextureShape[1],type:'int',name:'inputCols'}]}),this.wrappedLayer._callGPU(this.slice),this.sliceOutput=this.wrappedLayer.output,this.output||(2>=this.inputShape.length?(this.outputShape=[t,this.sliceOutput.glTextureShape[1]],this.output=new o.default([],this.outputShape),this.outputCopy=new o.default([],this.outputShape),this.output.createGLTexture({type:'2d',format:'float'}),this.outputCopy.createGLTexture({type:'2d',format:'float'})):(this.outputShape=[t].concat(Hn(this.sliceOutput.originalShape)),this.output=new o.default([],this.outputShape),this.outputCopy=new o.default([],this.outputShape),this.output.reshapeTo2DSquare(),this.outputCopy.reshapeTo2DSquare(),this.output.createGLTexture({type:'2d',format:'float'}),this.outputCopy.createGLTexture({type:'2d',format:'float'}),this._createOutputIndexMap(this.sliceOutput.indicesForReshaped))),zh.webgl2.runProgram({program:this.copyTextureProgram,output:this.outputCopy,inputs:[{input:this.output,name:'source'}]}),2>=this.inputShape.length?zh.webgl2.runProgram({program:this.copySliceOutputProgram,output:this.output,inputs:[{input:this.outputCopy,name:'outputCopy'},{input:this.sliceOutput,name:'sliceOutput'}],uniforms:[{value:0,type:'int',name:'t'},{value:t,type:'int',name:'timesteps'}]}):zh.webgl2.runProgram({program:this.mapSliceOutputProgram,output:this.output,inputs:[{input:this.outputCopy,name:'outputCopy'},{input:this.sliceOutput,name:'sliceOutput'},{input:this.outputIndexMaps[0],name:'indexMap'}]});for(var r=1;r=this.inputShape.length?zh.webgl2.runProgram({program:this.selectSliceProgram,output:this.slice,inputs:[{input:e,name:'x'}],uniforms:[{value:r,type:'int',name:'t'}]}):zh.webgl2.runProgram({program:this.mapInputProgram,output:this.slice,inputs:[{input:e,name:'x'},{input:this.indexMaps[r],name:'indexMap'}],uniforms:[{value:e.glTextureShape[1],type:'int',name:'inputCols'}]}),this.wrappedLayer._callGPU(this.slice),this.sliceOutput=this.wrappedLayer.output,zh.webgl2.runProgram({program:this.copyTextureProgram,output:this.outputCopy,inputs:[{input:this.output,name:'source'}]}),2>=this.inputShape.length?zh.webgl2.runProgram({program:this.copySliceOutputProgram,output:this.output,inputs:[{input:this.outputCopy,name:'outputCopy'},{input:this.sliceOutput,name:'sliceOutput'}],uniforms:[{value:r,type:'int',name:'t'},{value:t,type:'int',name:'timesteps'}]}):zh.webgl2.runProgram({program:this.mapSliceOutputProgram,output:this.output,inputs:[{input:this.outputCopy,name:'outputCopy'},{input:this.sliceOutput,name:'sliceOutput'},{input:this.outputIndexMaps[r],name:'indexMap'}]});0===this.outbound.length&&(this.output.transferFromGLTexture(),this.output.is2DReshaped?this.output.reshapeFrom2D():this.output.is2DSquareReshaped&&this.output.reshapeFrom2DSquare())}}]),t}(r.default);t.default=u});ke(Fy);var My=Ce(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(jh),o=a(af),n=a(Jh),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,a):{};r.get||r.set?Object.defineProperty(t,a,r):t[a]=e[a]}return t.default=e,t}(Cy),u=function(e){function t(){var e=0= 0 && out_x < size[0]) {\n outColor = vec4(texelFetch(forward, ivec2(out_x, out_y), 0).r);\n } else {\n outColor = vec4(texelFetch(backward, ivec2(out_x - size[0], size[1] - out_y - 1), 0).r);\n }\n}\n'):'sum'===a.mergeMode?a.mergeProgram=zh.webgl2.compileProgram('#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D forward;\nuniform sampler2D backward;\nout vec4 outColor;\n\nvoid main() {\n ivec2 size = textureSize(forward, 0);\n int out_x = int(float(size[0]) * outTex.x);\n int out_y = int(float(size[1]) * outTex.y);\n\n float forward_val = texelFetch(forward, ivec2(out_x, out_y), 0).r;\n float backward_val = texelFetch(backward, ivec2(out_x, size[1] - out_y - 1), 0).r;\n\n outColor = vec4(forward_val + backward_val);\n}\n'):'mul'===a.mergeMode?a.mergeProgram=zh.webgl2.compileProgram('#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D forward;\nuniform sampler2D backward;\nout vec4 outColor;\n\nvoid main() {\n ivec2 size = textureSize(forward, 0);\n int out_x = int(float(size[0]) * outTex.x);\n int out_y = int(float(size[1]) * outTex.y);\n\n float forward_val = texelFetch(forward, ivec2(out_x, out_y), 0).r;\n float backward_val = texelFetch(backward, ivec2(out_x, size[1] - out_y - 1), 0).r;\n\n outColor = vec4(forward_val * backward_val);\n}\n'):'ave'===a.mergeMode&&(a.mergeProgram=zh.webgl2.compileProgram('#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D forward;\nuniform sampler2D backward;\nout vec4 outColor;\n\nvoid main() {\n ivec2 size = textureSize(forward, 0);\n int out_x = int(float(size[0]) * outTex.x);\n int out_y = int(float(size[1]) * outTex.y);\n\n float forward_val = texelFetch(forward, ivec2(out_x, out_y), 0).r;\n float backward_val = texelFetch(backward, ivec2(out_x, size[1] - out_y - 1), 0).r;\n\n outColor = vec4(0.5 * (forward_val + backward_val));\n}\n'))),a}return Bn(t,e),Un(t,[{key:'setWeights',value:function(e){this.forwardLayer.setWeights(e.slice(0,e.length/2)),this.backwardLayer.setWeights(e.slice(e.length/2))}},{key:'call',value:function(e){return this.gpu?this._callGPU(e):this._callCPU(e),this.output}},{key:'_callCPU',value:function(e){this.forwardLayer._callCPU(new o.default(e.tensor.data,e.tensor.shape)),this.backwardLayer._callCPU(new o.default(e.tensor.data,e.tensor.shape));var t=this.forwardLayer.output,a=this.backwardLayer.output;this.returnSequences&&(a.tensor=a.tensor.step(-1));var r=t.tensor.shape.slice();'concat'===this.mergeMode&&(r[r.length-1]+=a.tensor.shape[r.length-1]),this.output=new o.default([],r),'concat'===this.mergeMode?this.returnSequences?(n.default.assign(this.output.tensor.hi(r[0],t.tensor.shape[1]).lo(0,0),t.tensor),n.default.assign(this.output.tensor.hi(r[0],r[1]).lo(0,t.tensor.shape[1]),a.tensor)):(n.default.assign(this.output.tensor.hi(t.tensor.shape[0]).lo(0),t.tensor),n.default.assign(this.output.tensor.hi(r[0]).lo(t.tensor.shape[0]),a.tensor)):'sum'===this.mergeMode?(n.default.addeq(this.output.tensor,t.tensor),n.default.addeq(this.output.tensor,a.tensor)):'mul'===this.mergeMode?(n.default.assigns(this.output.tensor,1),n.default.muleq(this.output.tensor,t.tensor),n.default.muleq(this.output.tensor,a.tensor)):'ave'===this.mergeMode&&(n.default.addeq(this.output.tensor,t.tensor),n.default.addeq(this.output.tensor,a.tensor),n.default.divseq(this.output.tensor,2))}},{key:'_callGPU',value:function(e){e.glTexture||e.createGLTexture({type:'2d',format:'float'}),this.inputCopy||(this.inputCopy=new o.default([],e.glTextureShape),this.inputCopy.createGLTexture({type:'2d',format:'float'})),zh.webgl2.runProgram({program:this.copyTextureProgram,output:this.inputCopy,inputs:[{input:e,name:'source'}]}),this.forwardLayer._callGPU(e),this.backwardLayer._callGPU(this.inputCopy);var t=this.forwardLayer.output,a=this.backwardLayer.output,r=t.glTextureShape.slice();'concat'===this.mergeMode&&(r[1]+=a.glTextureShape[1]),this.output||(this.output=new o.default([],r),this.output.createGLTexture({type:'2d',format:'float'}),!this.returnSequences&&(this.output.is1D=!0)),zh.webgl2.runProgram({program:this.mergeProgram,output:this.output,inputs:[{input:t,name:'forward'},{input:a,name:'backward'}]}),0===this.outbound.length&&this.output.transferFromGLTexture()}}]),t}(r.default);t.default=u});ke(My);var Dy=Ce(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),Object.defineProperty(t,'TimeDistributed',{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,'Bidirectional',{enumerable:!0,get:function(){return o.default}});var r=a(Fy),o=a(My)});ke(Dy);var Iy=Ce(function(e,t){Object.defineProperty(t,'__esModule',{value:!0});var a={InputLayer:!0};Object.defineProperty(t,'InputLayer',{enumerable:!0,get:function(){return r.default}});var r=function(e){return e&&e.__esModule?e:{default:e}}(rf);Object.keys(kf).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return kf[e]}})}),Object.keys(lm).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return lm[e]}})}),Object.keys(j_).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return j_[e]}})}),Object.keys(U_).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return U_[e]}})}),Object.keys(J_).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return J_[e]}})}),Object.keys(ay).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return ay[e]}})}),Object.keys(oy).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return oy[e]}})}),Object.keys(Py).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return Py[e]}})}),Object.keys(Cy).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return Cy[e]}})}),Object.keys(Dy).forEach(function(e){'default'===e||'__esModule'===e||Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return Dy[e]}})})});ke(Iy);var Ey=Ce(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),t.default=void 0;var r=a(af),o=a(Jh),n=a(Vf),i=a(qf),u=function(){function e(){var t=0n;)o[r[n]=26>n?n+65:52>n?n+71:62>n?n-4:43|n-59]=n++;a.encode=function(e,a,o){for(var n=null,u=[],l=0,i=0,s,t;a>2],s=(3&t)<<4,i=1):1==i?(u[l++]=r[s|t>>4],s=(15&t)<<2,i=2):2==i?(u[l++]=r[s|t>>6],u[l++]=r[63&t],i=0):void 0,8191>4,i=t,l=2):2==l?(a[r++]=(15&i)<<4|(60&t)>>2,i=t,l=3):3==l?(a[r++]=(3&i)<<6|t,l=0):void 0}if(1==l)throw Error(u);return r-n},a.test=function(e){return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}}),Oy=Uo;Uo.prototype.on=function(e,t,a){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:a||this}),this},Uo.prototype.off=function(e,t){if(e===void 0)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var a=this._listeners[e],r=0;ra?t+=1:2048>a?t+=2:55296==(64512&a)&&56320==(64512&e.charCodeAt(r+1))?(++r,t+=4):t+=3;return t},a.read=function(e,a,r){var o=r-a;if(1>o)return'';for(var n=null,u=[],l=0,i;ai?u[l++]=i:191i?u[l++]=(31&i)<<6|63&e[a++]:239i?(i=((7&i)<<18|(63&e[a++])<<12|(63&e[a++])<<6|63&e[a++])-65536,u[l++]=55296+(i>>10),u[l++]=56320+(1023&i)):u[l++]=(15&i)<<12|(63&e[a++])<<6|63&e[a++],8191n?t[a++]=n:2048>n?(t[a++]=192|n>>6,t[a++]=128|63&n):55296==(64512&n)&&56320==(64512&(i=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,t[a++]=240|n>>18,t[a++]=128|63&n>>12,t[a++]=128|63&n>>6,t[a++]=128|63&n):(t[a++]=224|n>>12,t[a++]=128|63&n>>6,t[a++]=128|63&n);return a-r}}),Uy=Xo,qy=$o,By=$o.zero=new $o(0,0);By.toNumber=function(){return 0},By.zzEncode=By.zzDecode=function(){return this},By.length=function(){return 1};var Ny=$o.zeroHash='\0\0\0\0\0\0\0\0';$o.fromNumber=function(e){if(0===e)return By;var t=0>e;t&&(e=-e);var a=e>>>0,r=(e-a)/4294967296>>>0;return t&&(r=~r>>>0,a=~a>>>0,4294967295<++a&&(a=0,4294967295<++r&&(r=0))),new $o(a,r)},$o.from=function(e){if('number'==typeof e)return $o.fromNumber(e);if(Hy.isString(e))if(Hy.Long)e=Hy.Long.fromString(e);else return $o.fromNumber(parseInt(e,10));return e.low||e.high?new $o(e.low>>>0,e.high>>>0):By},$o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,a=~this.hi>>>0;return t||(a=a+1>>>0),-(t+4294967296*a)}return this.lo+4294967296*this.hi},$o.prototype.toLong=function(e){return Hy.Long?new Hy.Long(0|this.lo,0|this.hi,!!e):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var Vy=String.prototype.charCodeAt;$o.fromHash=function(e){return e===Ny?By:new $o((Vy.call(e,0)|Vy.call(e,1)<<8|Vy.call(e,2)<<16|Vy.call(e,3)<<24)>>>0,(Vy.call(e,4)|Vy.call(e,5)<<8|Vy.call(e,6)<<16|Vy.call(e,7)<<24)>>>0)},$o.prototype.toHash=function(){return Dn(255&this.lo,255&this.lo>>>8,255&this.lo>>>16,this.lo>>>24,255&this.hi,255&this.hi>>>8,255&this.hi>>>16,this.hi>>>24)},$o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},$o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},$o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,a=this.hi>>>24;return 0==a?0==t?16384>e?128>e?1:2:2097152>e?3:4:16384>t?128>t?5:6:2097152>t?7:8:128>a?9:10};var Hy=Ce(function(e,t){function a(e,t,a){for(var r=Object.keys(t),o=0;o(e>>>=0)?1:16384>e?2:2097152>e?3:268435456>e?4:5,e)).len,this},Yo.prototype.int32=function(e){return 0>e?this._push(an,10,Xy.fromNumber(e)):this.uint32(e)},Yo.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},Yo.prototype.uint64=function(e){var t=Xy.from(e);return this._push(an,t.length(),t)},Yo.prototype.int64=Yo.prototype.uint64,Yo.prototype.sint64=function(e){var t=Xy.from(e).zzEncode();return this._push(an,t.length(),t)},Yo.prototype.bool=function(e){return this._push(Jo,1,e?1:0)},Yo.prototype.fixed32=function(e){return this._push(rn,4,e>>>0)},Yo.prototype.sfixed32=Yo.prototype.fixed32,Yo.prototype.fixed64=function(e){var t=Xy.from(e);return this._push(rn,4,t.lo)._push(rn,4,t.hi)},Yo.prototype.sfixed64=Yo.prototype.fixed64,Yo.prototype.float=function(e){return this._push(Hy.float.writeFloatLE,4,e)},Yo.prototype.double=function(e){return this._push(Hy.float.writeDoubleLE,8,e)};var Qy=Hy.Array.prototype.set?function(e,t,a){t.set(e,a)}:function(e,t,a){for(var r=0;r>>0;if(!t)return this._push(Jo,1,0);if(Hy.isString(e)){var a=Yo.alloc(t=$y.length(e));$y.decode(e,a,0),e=a}return this.uint32(t)._push(Qy,t,e)},Yo.prototype.string=function(e){var t=Ky.length(e);return t?this.uint32(t)._push(Ky.write,t,e):this._push(Jo,1,0)},Yo.prototype.fork=function(){return this.states=new Qo(this),this.head=this.tail=new Ko(Zo,0,0),this.len=0,this},Yo.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Ko(Zo,0,0),this.len=0),this},Yo.prototype.ldelim=function(){var e=this.head,t=this.tail,a=this.len;return this.reset().uint32(a),a&&(this.tail.next=e.next,this.tail=t,this.len+=a),this},Yo.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),a=0;e;)e.fn(e.val,t,a),a+=e.len,e=e.next;return t},Yo._configure=function(e){Zy=e};var Yy=on;(on.prototype=Object.create(Wy.prototype)).constructor=on;var Jy=Hy.Buffer;on.alloc=function(e){return(on.alloc=Hy._Buffer_allocUnsafe)(e)};var ex=Jy&&Jy.prototype instanceof Uint8Array&&'set'===Jy.prototype.set.name?function(e,t,a){t.set(e,a)}:function(e,t,a){if(e.copy)e.copy(t,a,0,e.length);else for(var r=0;r>>0;return this.uint32(t),t&&this._push(ex,t,e),this},on.prototype.string=function(e){var t=Jy.byteLength(e);return this.uint32(t),t&&this._push(nn,t,e),this};var tx=ln,ax=Hy.LongBits,rx=Hy.utf8,ox='undefined'==typeof Uint8Array?function(e){if(Array.isArray(e))return new ln(e);throw Error('illegal buffer')}:function(e){if(e instanceof Uint8Array||Array.isArray(e))return new ln(e);throw Error('illegal buffer')},nx;ln.create=Hy.Buffer?function(e){return(ln.create=function(e){return Hy.Buffer.isBuffer(e)?new nx(e):ox(e)})(e)}:ox,ln.prototype._slice=Hy.Array.prototype.subarray||Hy.Array.prototype.slice,ln.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,128>this.buf[this.pos++])return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,128>this.buf[this.pos++])return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,128>this.buf[this.pos++])return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,128>this.buf[this.pos++])return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,128>this.buf[this.pos++])return e;if((this.pos+=5)>this.len)throw this.pos=this.len,un(this,10);return e}}(),ln.prototype.int32=function(){return 0|this.uint32()},ln.prototype.sint32=function(){var e=this.uint32();return 0|e>>>1^-(1&e)},ln.prototype.bool=function(){return 0!==this.uint32()},ln.prototype.fixed32=function(){if(this.pos+4>this.len)throw un(this,4);return pn(this.buf,this.pos+=4)},ln.prototype.sfixed32=function(){if(this.pos+4>this.len)throw un(this,4);return 0|pn(this.buf,this.pos+=4)},ln.prototype.float=function(){if(this.pos+4>this.len)throw un(this,4);var e=Hy.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},ln.prototype.double=function(){if(this.pos+8>this.len)throw un(this,4);var e=Hy.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},ln.prototype.bytes=function(){var e=this.uint32(),t=this.pos,a=this.pos+e;if(a>this.len)throw un(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,a):t===a?new this.buf.constructor(0):this._slice.call(this.buf,t,a)},ln.prototype.string=function(){var e=this.bytes();return rx.read(e,0,e.length)},ln.prototype.skip=function(e){if('number'==typeof e){if(this.pos+e>this.len)throw un(this,e);this.pos+=e}else do if(this.pos>=this.len)throw un(this);while(128&this.buf[this.pos++]);return this},ln.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:do{if(4==(e=7&this.uint32()))break;this.skipType(e)}while(!0);break;case 5:this.skip(4);break;default:throw Error('invalid wire type '+e+' at offset '+this.pos);}return this},ln._configure=function(e){nx=e;var t=Hy.Long?'toLong':'toNumber';Hy.merge(ln.prototype,{int64:function(){return sn.call(this)[t](!1)},uint64:function(){return sn.call(this)[t](!0)},sint64:function(){return sn.call(this).zzDecode()[t](!1)},fixed64:function(){return dn.call(this)[t](!0)},sfixed64:function(){return dn.call(this)[t](!1)}})};var ix=cn;(cn.prototype=Object.create(tx.prototype)).constructor=cn,Hy.Buffer&&(cn.prototype._slice=Hy.Buffer.prototype.slice),cn.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Rn(this.pos+e,this.len))};var ux=gn;(gn.prototype=Object.create(Hy.EventEmitter.prototype)).constructor=gn,gn.prototype.rpcCall=function e(t,a,r,o,n){if(!o)throw TypeError('request must be specified');var i=this;if(!n)return Hy.asPromise(e,i,t,a,r,o);if(!i.rpcImpl)return void setTimeout(function(){n(Error('already ended'))},0);try{return i.rpcImpl(t,a[i.requestDelimited?'encodeDelimited':'encode'](o).finish(),function(e,a){if(e)return i.emit('error',e,t),n(e);if(null===a)return void i.end(!0);if(!(a instanceof r))try{a=r[i.responseDelimited?'decodeDelimited':'decode'](a)}catch(e){return i.emit('error',e,t),n(e)}return i.emit('data',a,t),n(null,a)})}catch(e){return i.emit('error',e,t),void setTimeout(function(){n(e)},0)}},gn.prototype.end=function(e){return this.rpcImpl&&(!e&&this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit('end').off()),this};var lx=Ce(function(e,t){t.Service=ux}),sx={},px=Ce(function(e,t){function a(){r.Reader._configure(r.BufferReader),r.util._configure()}var r=t;r.build='minimal',r.Writer=Wy,r.BufferWriter=Yy,r.Reader=tx,r.BufferReader=ix,r.util=Hy,r.rpc=lx,r.roots=sx,r.configure=a,r.Writer._configure(r.BufferWriter),a()}),dx=px,cx=Ce(function(e,t){Object.defineProperty(t,'__esModule',{value:!0}),t.default=t.Model=t.Weights=void 0;var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,a):{};r.get||r.set?Object.defineProperty(t,a,r):t[a]=e[a]}return t.default=e,t}(dx),r=a.Reader,o=a.Writer,n=a.util,u=a.roots['default']||(a.roots['default']={});t.default=u;var i=u.Weights=function(){function e(e){if(this.shape=[],e)for(var t=Object.keys(e),a=0;a>>3){case 1:o.layerName=e.string();break;case 2:o.weightName=e.string();break;case 3:if(o.shape&&o.shape.length||(o.shape=[]),2==(7&n))for(var i=e.uint32()+e.pos;e.pos>>0}return null!=e.type&&(t.type=e.type+''),null!=e.data&&('string'==typeof e.data?n.base64.decode(e.data,t.data=n.newBuffer(n.base64.length(e.data)),0):e.data.length&&(t.data=e.data)),null!=e.quantizeMin&&(t.quantizeMin=+e.quantizeMin),null!=e.quantizeMax&&(t.quantizeMax=+e.quantizeMax),t},e.toObject=function(e,t){t||(t={});var a={};if((t.arrays||t.defaults)&&(a.shape=[]),t.defaults&&(a.layerName='',a.weightName='',a.type='',a.data=t.bytes===String?'':[],a.quantizeMin=0,a.quantizeMax=0),null!=e.layerName&&e.hasOwnProperty('layerName')&&(a.layerName=e.layerName),null!=e.weightName&&e.hasOwnProperty('weightName')&&(a.weightName=e.weightName),e.shape&&e.shape.length){a.shape=[];for(var r=0;r>>3){case 1:o.id=e.string();break;case 2:o.name=e.string();break;case 3:o.kerasVersion=e.string();break;case 4:o.backend=e.string();break;case 5:o.modelConfig=e.string();break;case 6:o.modelWeights&&o.modelWeights.length||(o.modelWeights=[]),o.modelWeights.push(u.Weights.decode(e,e.uint32()));break;default:e.skipType(7&n);}return o},e.decodeDelimited=function(e){return e instanceof r||(e=new r(e)),this.decode(e,e.uint32())},e.verify=function(e){if('object'!==('undefined'==typeof e?'undefined':jn(e))||null===e)return'object expected';if(null!=e.id&&e.hasOwnProperty('id')&&!n.isString(e.id))return'id: string expected';if(null!=e.name&&e.hasOwnProperty('name')&&!n.isString(e.name))return'name: string expected';if(null!=e.kerasVersion&&e.hasOwnProperty('kerasVersion')&&!n.isString(e.kerasVersion))return'kerasVersion: string expected';if(null!=e.backend&&e.hasOwnProperty('backend')&&!n.isString(e.backend))return'backend: string expected';if(null!=e.modelConfig&&e.hasOwnProperty('modelConfig')&&!n.isString(e.modelConfig))return'modelConfig: string expected';if(null!=e.modelWeights&&e.hasOwnProperty('modelWeights')){if(!Array.isArray(e.modelWeights))return'modelWeights: array expected';for(var t=0,a;ta[s]+u)return!1}return!0};var r=a(yx),o=a(vx),n=a(Sx)});ke(Px);var Tx=Ce(function(e,t){function a(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,a):{};r.get||r.set?Object.defineProperty(t,a,r):t[a]=e[a]}return t.default=e,t}function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,'__esModule',{value:!0}),Object.defineProperty(t,'Model',{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,'Tensor',{enumerable:!0,get:function(){return n.default}}),t.testUtils=t.layers=t.activations=t.default=t.GPU_SUPPORT=void 0;var o=r(mx),n=r(af),i=a(bf);t.activations=i;var u=a(Iy);t.layers=u;var l=a(Px);t.testUtils=l;var s=zh.webgl2.isSupported;t.GPU_SUPPORT=s;var p={Model:o.default,Tensor:n.default,GPU_SUPPORT:s,activations:i,layers:u,testUtils:l};t.default=p}),wx=ke(Tx),kx=function(e,t,a,r){return new(a||(a=Promise))(function(o,n){function i(e){try{l(r.next(e))}catch(t){n(t)}}function u(e){try{l(r['throw'](e))}catch(t){n(t)}}function l(e){e.done?o(e.value):new a(function(t){t(e.value)}).then(i,u)}l((r=r.apply(e,t||[])).next())})},Cx=!1;try{Cx='[object process]'===Object.prototype.toString.call(global.process)}catch(t){}var Fx=r('MODEL_PATH')||'/dist/model.bin',Mx=new wx.Model({filepath:Cx?__dirname+'/model.bin':Fx,gpu:!1,filesystem:Cx}),Dx=function(e){function t(e){Gn(this,t);var a=Nn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return a.values=e,a}return Bn(t,e),t}(Yn);(function(e){e[e.TD=0]='TD',e[e.IHS=1]='IHS',e[e.HS=2]='HS',e[e.TU=3]='TU',e[e.DT=4]='DT',e[e.DB=5]='DB'})(e.AvailablePatterns||(e.AvailablePatterns={}));var Ix=function(e){function t(){return Gn(this,t),Nn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Bn(t,e),t}(Jn);Ix.predictPattern=yn,Ix.hasDoubleBottom=xn,Ix.hasDoubleTop=vn,Ix.hasHeadAndShoulder=bn,Ix.hasInverseHeadAndShoulder=Sn,Ix.isTrendingUp=Pn,Ix.isTrendingDown=Tn;var Ex=wn();e.getAvailableIndicators=wn,e.AvailableIndicators=Ex,e.FixedSizeLinkedList=$n,e.CandleData=Kn,e.CandleList=Zn,e.sma=n,e.SMA=ti,e.ema=i,e.EMA=ai,e.wma=u,e.WMA=ri,e.wema=l,e.WEMA=oi,e.macd=s,e.MACD=ii,e.rsi=c,e.RSI=ci,e.bollingerbands=h,e.BollingerBands=_i,e.adx=_,e.ADX=Ci,e.atr=y,e.ATR=Mi,e.truerange=m,e.TrueRange=Ti,e.roc=x,e.ROC=Ii,e.kst=v,e.KST=Ri,e.psar=b,e.PSAR=Li,e.stochastic=S,e.Stochastic=zi,e.williamsr=P,e.WilliamsR=Gi,e.adl=T,e.ADL=qi,e.obv=w,e.OBV=Ni,e.trix=k,e.TRIX=Hi,e.forceindex=C,e.ForceIndex=Xi,e.cci=F,e.CCI=Ki,e.awesomeoscillator=M,e.AwesomeOscillator=Qi,e.vwap=D,e.VWAP=Ji,e.volumeprofile=R,e.VolumeProfile=tu,e.mfi=L,e.MFI=nu,e.stochasticrsi=O,e.StochasticRSI=uu,e.averagegain=p,e.AverageGain=li,e.averageloss=d,e.AverageLoss=pi,e.sd=g,e.SD=hi,e.highest=z,e.Highest=su,e.lowest=j,e.Lowest=du,e.sum=G,e.Sum=gu,e.renko=U,e.HeikinAshi=_u,e.heikinashi=q,e.bullish=ne,e.bearish=ye,e.abandonedbaby=xe,e.doji=W,e.bearishengulfingpattern=ie,e.bullishengulfingpattern=N,e.darkcloudcover=ve,e.downsidetasukigap=$,e.dragonflydoji=be,e.gravestonedoji=Se,e.bullishharami=V,e.bearishharami=ue,e.bullishharamicross=H,e.bearishharamicross=le,e.eveningdojistar=se,e.eveningstar=pe,e.morningdojistar=X,e.morningstar=B,e.bullishmarubozu=K,e.bearishmarubozu=de,e.piercingline=Z,e.bullishspinningtop=Pe,e.bearishspinningtop=Te,e.threeblackcrows=ce,e.threewhitesoldiers=Q,e.bullishhammerstick=Y,e.bearishhammerstick=ee,e.bullishinvertedhammerstick=J,e.bearishinvertedhammerstick=te,e.hammerpattern=ae,e.hammerpatternunconfirmed=re,e.hangingman=ge,e.hangingmanunconfirmed=he,e.shootingstar=fe,e.shootingstarunconfirmed=me,e.tweezertop=_e,e.tweezerbottom=oe,e.fibonacciretracement=we,e.predictPattern=yn,e.PatternDetector=Ix,e.hasDoubleBottom=xn,e.hasDoubleTop=vn,e.hasHeadAndShoulder=bn,e.hasInverseHeadAndShoulder=Sn,e.isTrendingUp=Pn,e.isTrendingDown=Tn,e.setConfig=a,e.getConfig=r})(this.window=this.window||{},window); -//# sourceMappingURL=browser.js.map +var tf = window.tf || {};(function(e,t){"use strict";function r(e){return ge[e]}function o(e){var t=r("precision");return t?parseFloat(e.toPrecision(t)):e}function a(e){ce.reverseInputs(e);var t=new _e(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function n(e){ce.reverseInputs(e);var t=new xe(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function l(e){ce.reverseInputs(e);var t=new me(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function s(e){ce.reverseInputs(e);var t=new fe(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function u(e){ce.reverseInputs(e);var t=new ye(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function p(e){ce.reverseInputs(e);var t=new ke(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function i(e){ce.reverseInputs(e);var t=new Oe(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function h(e){ce.reverseInputs(e);var t=new Ve(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function g(e){ce.reverseInputs(e);var t=new Se(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function v(e){ce.reverseInputs(e);var t=new He(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function c(e){ce.reverseInputs(e);var t=new Me(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function d(e){ce.reverseInputs(e);var t=new Fe(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function _(e){ce.reverseInputs(e);var t=new We(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function x(e){ce.reverseInputs(e);var t=new Ne(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function m(e){ce.reverseInputs(e);var t=new Ke(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function f(e){ce.reverseInputs(e);var t=new Ye(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function w(e){ce.reverseInputs(e);var t=new $e(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function y(e){ce.reverseInputs(e);var t=new et(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function P(e){ce.reverseInputs(e);var t=new rt(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function k(e){ce.reverseInputs(e);var t=new at(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function I(e){ce.reverseInputs(e);var t=new lt(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function O(e){ce.reverseInputs(e);var t=new ut(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function b(e){ce.reverseInputs(e);var t=new it(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function V(e){ce.reverseInputs(e);var t=new gt(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function C(e){ce.reverseInputs(e);var t=new ct(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function S(e,t,r,o){return e<=r&&t>=r||r<=e&&o>=e}function q(e){ce.reverseInputs(e);var t=new _t(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function E(e){ce.reverseInputs(e);var t=new wt(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function H(e){ce.reverseInputs(e);var t=new Pt(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function T(e){ce.reverseInputs(e);var t=new It(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function A(e){ce.reverseInputs(e);var t=new bt(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function D(e){ce.reverseInputs(e);var t=new Ct(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t}function B(e){ce.reverseInputs(e);var t=new qt(e).result;return e.reversedInput&&(t.open.reverse(),t.high.reverse(),t.low.reverse(),t.close.reverse(),t.volume.reverse(),t.timestamp.reverse()),ce.reverseInputs(e),t}function z(e){ce.reverseInputs(e);var t=new Ht(e).result;return e.reversedInput&&(t.open.reverse(),t.high.reverse(),t.low.reverse(),t.close.reverse(),t.volume.reverse(),t.timestamp.reverse()),ce.reverseInputs(e),t}function L(e){return new Gt().hasPattern(e)}function M(e){return new Nt().hasPattern(e)}function j(e){return new Xt().hasPattern(e)}function R(e){return new Kt().hasPattern(e)}function F(e,t){var r=function(e,t,r){return e+(t-e)*r},o=[],a=new Number((e.length-1)/(t-1));o[0]=e[0];for(var n=1;ne.values.length&&console.warn("Pattern detector requires atleast 300 data points for a reliable prediction, received just ",e.values.length),ce.reverseInputs(e),o=e.values,r.next=7,Tt.predict(t.tensor2d([U(F(o,400))]));case 7:return a=r.sent,n=t.argMax(a,1).get(0),ce.reverseInputs(e),r.abrupt("return",{patternId:n,pattern:Pr[n],probability:100*a.get(0,4)});case 11:case"end":return r.stop();}},r,this)}))}function N(t){return wr(this,void 0,void 0,regeneratorRuntime.mark(function r(){var o;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,G(t);case 2:return o=r.sent,r.abrupt("return",o.patternId===e.AvailablePatterns.DB);case 4:case"end":return r.stop();}},r,this)}))}function X(t){return wr(this,void 0,void 0,regeneratorRuntime.mark(function r(){var o;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,G(t);case 2:return o=r.sent,r.abrupt("return",o.patternId===e.AvailablePatterns.DT);case 4:case"end":return r.stop();}},r,this)}))}function K(t){return wr(this,void 0,void 0,regeneratorRuntime.mark(function r(){var o;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,G(t);case 2:return o=r.sent,r.abrupt("return",o.patternId===e.AvailablePatterns.HS);case 4:case"end":return r.stop();}},r,this)}))}function Q(t){return wr(this,void 0,void 0,regeneratorRuntime.mark(function r(){var o;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,G(t);case 2:return o=r.sent,r.abrupt("return",o.patternId===e.AvailablePatterns.IHS);case 4:case"end":return r.stop();}},r,this)}))}function Y(t){return wr(this,void 0,void 0,regeneratorRuntime.mark(function r(){var o;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,G(t);case 2:return o=r.sent,r.abrupt("return",o.patternId===e.AvailablePatterns.TU);case 4:case"end":return r.stop();}},r,this)}))}function Z(t){return wr(this,void 0,void 0,regeneratorRuntime.mark(function r(){var o;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,G(t);case 2:return o=r.sent,r.abrupt("return",o.patternId===e.AvailablePatterns.TD);case 4:case"end":return r.stop();}},r,this)}))}function $(){return["sma","ema","wma","wema","macd","rsi","bollingerbands","adx","atr","truerange","roc","kst","psar","stochastic","williamsr","adl","obv","trix","cci","awesomeoscillator","forceindex","vwap","volumeprofile","renko","heikinashi","stochasticrsi","mfi","averagegain","averageloss","highest","lowest","sum","FixedSizeLinkedList","sd","bullish","bearish","abandonedbaby","doji","bearishengulfingpattern","bullishengulfingpattern","darkcloudcover","downsidetasukigap","dragonflydoji","gravestonedoji","bullishharami","bearishharami","bullishharamicross","bearishharamicross","eveningdojistar","eveningstar","morningdojistar","morningstar","bullishmarubozu","bearishmarubozu","piercingline","bullishspinningtop","bearishspinningtop","threeblackcrows","threewhitesoldiers","bullishhammerstick","bearishhammerstick","bullishinvertedhammerstick","bearishinvertedhammerstick","hammerpattern","hammerpatternunconfirmed","hangingman","hangingmanunconfirmed","shootingstar","shootingstarunconfirmed","tweezertop","tweezerbottom","predictPattern","hasDoubleBottom","hasDoubleTop","hasHeadAndShoulder","hasInverseHeadAndShoulder","isTrendingUp","isTrendingDown"]}var J=Math.min,ee=Math.max,te=Math.abs,re=Math.sqrt,oe=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},ae=function(){function e(e,t){for(var r,o=0;othis._length?e&&e.data:(e===this._tail?(this._tail=e.prev,this._tail.next=void 0,this._current=this._tail):(e.next.prev=e.prev,e.prev.next=e.next,this._current=e.prev),this._next=this._current.next,e.next=this._head,e.prev=void 0,this._head.prev=e,this._head=e,e.data)}},{key:"removeCurrent",value:function(){var e=this._current;if(0!==this._length)return(this._length--,0===this._length)?(this._head=this._tail=this._current=this._next=void 0,e.data):(e===this._tail?(this._tail=e.prev,this._tail.next=void 0,this._current=this._tail):e===this._head?(this._head=e.next,this._head.prev=void 0,this._current=this._head):(e.next.prev=e.prev,e.prev.next=e.next,this._current=e.prev),this._next=this._current.next,e.data)}},{key:"resetCursor",value:function(){return this._current=this._next=this._head,this}},{key:"next",value:function(){var e=this._next;if(void 0!==e)return this._next=e.next,this._current=e,e.data}},{key:"head",get:function(){return this._head&&this._head.data}},{key:"tail",get:function(){return this._tail&&this._tail.data}},{key:"current",get:function(){return this._current&&this._current.data}},{key:"length",get:function(){return this._length}}]),e}(),ie=function(e){function t(e,r,o,a){oe(this,t);var n=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(n.size=e,n.maintainHigh=r,n.maintainLow=o,n.maintainSum=a,n.totalPushed=0,n.periodHigh=0,n.periodLow=Infinity,n.periodSum=0,!e||"number"!=typeof e)throw"Size required and should be a number.";return n._push=n.push,n.push=function(e){this.add(e),this.totalPushed++},n}return ne(t,e),ae(t,[{key:"add",value:function(e){this.length===this.size?(this.lastShift=this.shift(),this._push(e),this.maintainHigh&&this.lastShift==this.periodHigh&&this.calculatePeriodHigh(),this.maintainLow&&this.lastShift==this.periodLow&&this.calculatePeriodLow(),this.maintainSum&&(this.periodSum-=this.lastShift)):this._push(e),this.maintainHigh&&this.periodHigh<=e&&(this.periodHigh=e),this.maintainLow&&this.periodLow>=e&&(this.periodLow=e),this.maintainSum&&(this.periodSum+=e)}},{key:"iterator",value:regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.resetCursor();case 1:if(!this.next()){e.next=6;break}return e.next=4,this.current;case 4:e.next=1;break;case 6:case"end":return e.stop();}},e,this)})},{key:"calculatePeriodHigh",value:function(){for(this.resetCursor(),this.next()&&(this.periodHigh=this.current);this.next();)this.periodHigh<=this.current&&(this.periodHigh=this.current)}},{key:"calculatePeriodLow",value:function(){for(this.resetCursor(),this.next()&&(this.periodLow=this.current);this.next();)this.periodLow>=this.current&&(this.periodLow=this.current)}}]),t}(pe),he=function e(){oe(this,e),this.open=[],this.high=[],this.low=[],this.close=[],this.volume=[],this.timestamp=[]},ge={},ve=function e(){oe(this,e)},ce=function(){function e(t){oe(this,e),this.format=t.format||o}return ae(e,[{key:"getResult",value:function(){return this.result}}],[{key:"reverseInputs",value:function(e){e.reversedInput&&(e.values?e.values.reverse():void 0,e.open?e.open.reverse():void 0,e.high?e.high.reverse():void 0,e.low?e.low.reverse():void 0,e.close?e.close.reverse():void 0,e.volume?e.volume.reverse():void 0,e.timestamp?e.timestamp.reverse():void 0)}}]),e}(),de=function(e){function t(e,r){oe(this,t);var o=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.period=e,o.values=r,o}return ne(t,e),t}(ve),_e=function(e){function t(e){oe(this,t);var r=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));r.period=e.period,r.price=e.values;var o=regeneratorRuntime.mark(function e(t){var r,o,a,n,l;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=new pe,o=0,a=1,void(e.next=5);case 5:n=e.sent,r.push(0);case 7:return aa&&0l&&0a&&(a=o.high,u=J(u+t,r))):(n=ee(n,l.high,p.high),o.lown)&&(u=t,n=a,s=!s,a=s?o.high:o.low)):(n=p.low,a=p.high),l=p,o&&(p=o),e.next=12,n;case 12:o=e.sent,e.next=6;break;case 15:case"end":return e.stop();}},e,this)});return r.result=[],r.generator=n(e.step,e.max),r.generator.next(),a.forEach(function(e,t){var n=r.generator.next({high:o[t],low:a[t]});void 0!==n.value&&r.result.push(n.value)}),r}return ne(t,e),ae(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e);if(void 0!==t.value)return t.value}}]),t}(ce);Ye.calculate=f;var Ze=function(e){function t(){return oe(this,t),le(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ne(t,e),t}(ve),$e=function(e){function t(e){oe(this,t);var r=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.low,a=e.high,n=e.close,l=e.period,s=e.signalPeriod,u=r.format;if(o.length!==a.length||a.length!==n.length)throw"Inputs(low,high, close) not of equal size";return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,o,a,n,p,i,h;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=1,r=new ie(l,!0,!1),o=new ie(l,!1,!0),a=new _e({period:s,values:[],format:function(e){return e}}),n=void 0,p=void 0,void(e.next=7);case 7:i=e.sent;case 8:if(r.push(i.high),o.push(i.low),!(tP?_+=k:d+=k)}r.result.push({rangeStart:i,rangeEnd:c,bullishVolume:d,bearishVolume:_,totalVolume:x})}return r}return ne(t,e),ae(t,[{key:"nextValue",value:function(){throw"Next value not supported for volume profile"}}]),t}(ce);_t.calculate=q;var xt=function(e){function t(){return oe(this,t),le(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ne(t,e),t}(ve),mt=function(e){function t(e){oe(this,t);var r=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:return e.next=6,(t.high+t.low+t.close)/3;case 6:t=e.sent,e.next=3;break;case 9:case"end":return e.stop();}},e,this)})(),r.generator.next(),e.low.forEach(function(t,o){var a=r.generator.next({high:e.high[o],low:e.low[o],close:e.close[o]});r.result.push(a.value)}),r}return ne(t,e),ae(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e).value;return t}}]),t}(ce);mt.calculate=function(e){ce.reverseInputs(e);var t=new mt(e).result;return e.reversedInput&&t.reverse(),ce.reverseInputs(e),t};var ft=function(e){function t(){return oe(this,t),le(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ne(t,e),t}(ve),wt=function(e){function t(e){oe(this,t);var r=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.high,a=e.low,n=e.close,l=e.volume,s=e.period,u=new mt({low:[],high:[],close:[]}),p=new ie(s,!1,!1,!0),i=new ie(s,!1,!1,!0);if(a.length!==o.length||o.length!==n.length||o.length!==l.length)throw"Inputs(low,high, close, volumes) not of equal size";return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,o,a,n,l,h,g,v,c,d,_,x,m,f,w;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=0,g=null,v=null,void(e.next=5);case 5:return r=e.sent,o=r.close,void(e.next=9);case 9:r=e.sent;case 10:return c=r,d=c.high,_=c.low,x=c.close,m=c.volume,f=0,w=0,g=u.nextValue({high:d,low:_,close:x}),n=g*m,null!=g&&null!=v&&(g>v?f=n:w=n,p.push(f),i.push(w),a=p.periodSum,h=i.periodSum,p.totalPushed>=s&&p.totalPushed>=s&&(l=a/h,t=100-100/(1+l))),v=g,e.next=20,t;case 20:r=e.sent,e.next=10;break;case 23:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e,t){var o={high:e,low:a[t],close:n[t],volume:l[t]},s=r.generator.next(o);void 0!=s.value&&r.result.push(parseFloat(s.value.toFixed(2)))}),r}return ne(t,e),ae(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e);if(void 0!=t.value)return parseFloat(t.value.toFixed(2))}}]),t}(ce);wt.calculate=E;var yt=function(e){function t(){return oe(this,t),le(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ne(t,e),t}(ve),Pt=function(e){function t(e){oe(this,t);var r=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.values,a=e.rsiPeriod,n=e.stochasticPeriod,l=e.kPeriod,s=e.dPeriod,u=r.format;return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,o,u,p,i,h,g,v,c;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=1,r=new Ve({period:a,values:[]}),o=new $e({period:n,high:[],low:[],close:[],signalPeriod:l}),u=new _e({period:s,values:[],format:function(e){return e}}),p=void 0,i=void 0,h=void 0,g=void 0,void(e.next=7);case 7:v=e.sent;case 8:return p=r.nextValue(v),void 0!==p&&(c={high:p,low:p,close:p},i=o.nextValue(c),void 0!==i&&void 0!==i.d&&(h=u.nextValue(i.d),void 0!==h&&(g={stochRSI:i.k,k:i.d,d:h}))),e.next=13,g;case 13:v=e.sent,e.next=8;break;case 16:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e){var t=r.generator.next(e);void 0!==t.value&&r.result.push(t.value)}),r}return ne(t,e),ae(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e);if(void 0!==t.value)return t.value}}]),t}(ce);Pt.calculate=H;var kt=function(e){function t(){return oe(this,t),le(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ne(t,e),t}(ve),It=function(e){function t(e){oe(this,t);var r=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.values,a=e.period;r.result=[];var n=new ie(a,!0,!1,!1);return r.generator=regeneratorRuntime.mark(function e(){var t,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:return n.push(t),n.totalPushed>=a&&(r=n.periodHigh),e.next=8,r;case 8:t=e.sent,e.next=3;break;case 11:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e){var t=r.generator.next(e);void 0!=t.value&&r.result.push(t.value)}),r}return ne(t,e),ae(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e);if(void 0!=t.value)return t.value}}]),t}(ce);It.calculate=T;var Ot=function(e){function t(){return oe(this,t),le(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ne(t,e),t}(ve),bt=function(e){function t(e){oe(this,t);var r=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.values,a=e.period;r.result=[];var n=new ie(a,!1,!0,!1);return r.generator=regeneratorRuntime.mark(function e(){var t,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:return n.push(t),n.totalPushed>=a&&(r=n.periodLow),e.next=8,r;case 8:t=e.sent,e.next=3;break;case 11:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e){var t=r.generator.next(e);void 0!=t.value&&r.result.push(t.value)}),r}return ne(t,e),ae(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e);if(void 0!=t.value)return t.value}}]),t}(ce);bt.calculate=A;var Vt=function(e){function t(){return oe(this,t),le(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ne(t,e),t}(ve),Ct=function(e){function t(e){oe(this,t);var r=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.values,a=e.period;r.result=[];var n=new ie(a,!1,!1,!0);return r.generator=regeneratorRuntime.mark(function e(){var t,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:return n.push(t),n.totalPushed>=a&&(r=n.periodSum),e.next=8,r;case 8:t=e.sent,e.next=3;break;case 11:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e){var t=r.generator.next(e);void 0!=t.value&&r.result.push(t.value)}),r}return ne(t,e),ae(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e);if(void 0!=t.value)return t.value}}]),t}(ce);Ct.calculate=D;var St=function(e){function t(){return oe(this,t),le(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ne(t,e),t}(ve),qt=function(e){function t(e){oe(this,t);var r=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=r.format,a=e.useATR,n=e.brickSize||0;if(a){var l=_(Object.assign({},e));n=l[l.length-1]}if(r.result=new he,0===n)return console.error("Not enough data to calculate brickSize for renko when using ATR"),le(r);var s=0,u=0,p=Infinity,i=0,h=0,g=0;return r.generator=regeneratorRuntime.mark(function e(){var t,r,o,a,l;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:if(0!=s){e.next=15;break}return s=t.close,u=t.high,p=t.low,i=t.close,h=t.volume,g=t.timestamp,void(e.next=13);case 13:return t=e.sent,e.abrupt("continue",3);case 15:if(r=te(t.close-i),o=te(t.close-s),!(r>=n&&o>=n)){e.next=30;break}return a=r>o?s:i,l={open:a,high:u>t.high?u:t.high,low:pt.close?a-n:a+n,volume:h+t.volume,timestamp:t.timestamp},s=l.open,u=l.close,p=l.close,i=l.close,h=0,e.next=27,l;case 27:t=e.sent,e.next=37;break;case 30:return u=u>t.high?u:t.high,p=pu&&a>s&&ss&&l(t+r)/2}}]),t}(At),Bt=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="BullishEngulfingPattern",e.requiredCount=2,e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=e.open[1],l=e.close[1],s=e.high[1],u=e.low[1];return rn&&r>n&&tn&&ru&&o>s}}]),t}(At),Lt=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.requiredCount=2,e.name="BullishHaramiCross",e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=e.open[1],l=e.close[1],s=e.high[1],u=e.low[1],p=this.approximateEqual(n,l);return t>n&&ru&&o>s&&p}}]),t}(At),Mt=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="Doji",e.requiredCount=1,e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=this.approximateEqual(t,r),l=n&&this.approximateEqual(t,o),s=n&&this.approximateEqual(r,a);return n&&l==s}}]),t}(At),jt=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="MorningDojiStar",e.requiredCount=3,e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=e.open[1],l=e.close[1],s=e.high[1],u=e.low[1],p=e.open[2],i=e.close[2],h=e.high[2],g=e.low[2],v=new Mt().hasPattern({open:[n],close:[l],high:[s],low:[u]});return rs&&l(t+r)/2}}]),t}(At),Rt=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.requiredCount=3,e.name="DownsideTasukiGap",e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=e.open[1],l=e.close[1],s=e.high[1],u=e.low[1],p=e.open[2],i=e.close[2],h=e.high[2],g=e.low[2];return rp&&sp&&ln&&in&&l>(t+r)/2&&l>n}}]),t}(At),Wt=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="ThreeWhiteSoldiers",e.requiredCount=3,e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=e.open[1],l=e.close[1],s=e.high[1],u=e.low[1],p=e.open[2],i=e.close[2],h=e.high[2],g=e.low[2];return s>o&&h>s&&tn&&np&&pt;return n=n&&this.approximateEqual(r,o),n=n&&r-t<=2*(t-a),n}}]),t}(At),Nt=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="BullishInvertedHammerStick",e.requiredCount=1,e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=r>t;return n=n&&this.approximateEqual(t,a),n=n&&r-t<=2*(o-r),n}}]),t}(At),Xt=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="BearishHammerStick",e.requiredCount=1,e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=t>r;return n=n&&this.approximateEqual(t,o),n=n&&t-r<=2*(r-a),n}}]),t}(At),Kt=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="BearishInvertedHammerStick",e.requiredCount=1,e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=t>r;return n=n&&this.approximateEqual(r,a),n=n&&t-r<=2*(o-t),n}}]),t}(At),Qt=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="HammerPattern",e.requiredCount=5,e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=this.downwardTrend(e);return t=t&&this.includesHammer(e),t=t&&this.hasConfirmation(e),t}},{key:"downwardTrend",value:function(e){var t=1o}},{key:"includesHammer",value:function(e){var t=1t}}]),t}(At),$t=[new Bt,new Rt,new zt,new Lt,new jt,new Dt,new Ft,new Ut,new Wt,new Gt,new Nt,new Qt,new Yt,new Zt],Jt=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="Bullish Candlesticks",e}return ne(t,e),ae(t,[{key:"hasPattern",value:function(e){return $t.reduce(function(t,r){var o=r.hasPattern(e);return t||o},!1)}}]),t}(At),er=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="BearishEngulfingPattern",e.requiredCount=2,e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=e.open[1],l=e.close[1],s=e.high[1],u=e.low[1];return r>t&&tl}}]),t}(At),tr=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.requiredCount=2,e.name="BearishHarami",e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=e.open[1],l=e.close[1],s=e.high[1],u=e.low[1];return tn&&r>l&&ts}}]),t}(At),rr=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.requiredCount=2,e.name="BearishHaramiCross",e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=e.open[1],l=e.close[1],s=e.high[1],u=e.low[1],p=this.approximateEqual(n,l);return tn&&r>l&&ts&&p}}]),t}(At),or=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="EveningDojiStar",e.requiredCount=3,e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=e.open[1],l=e.close[1],s=e.high[1],u=e.low[1],p=e.open[2],i=e.close[2],h=e.high[2],g=e.low[2],v=new Mt().hasPattern({open:[n],close:[l],high:[s],low:[u]});return r>t&&v&&s>o&&u>o&&pp&&p>i&&i<(t+r)/2}}]),t}(At),ar=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="EveningStar",e.requiredCount=3,e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=e.open[1],l=e.close[1],s=e.high[1],u=e.low[1],p=e.open[2],i=e.close[2],h=e.high[2],g=e.low[2];return r>t&&oo&&u>o&&pp&&p>i&&i<(t+r)/2}}]),t}(At),nr=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="BearishMarubozu",e.requiredCount=1,e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=this.approximateEqual(t,o)&&this.approximateEqual(a,r)&&t>r&&t>a;return n}}]),t}(At),lr=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="ThreeBlackCrows",e.requiredCount=3,e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=e.open[1],l=e.close[1],s=e.high[1],u=e.low[1],p=e.open[2],i=e.close[2],h=e.high[2],g=e.low[2];return a>u&&u>g&&t>r&&n>l&&p>i&&t>n&&n>r&&n>p&&p>l}}]),t}(At),sr=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="HangingMan",e.requiredCount=5,e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=this.upwardTrend(e);return t=t&&this.includesHammer(e),t=t&&this.hasConfirmation(e),t}},{key:"upwardTrend",value:function(e){var t=1a}},{key:"includesHammer",value:function(e){var t=1r.close;return o&&t.close>r.close}}]),t}(At),ur=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="HangingManUnconfirmed",e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=this.upwardTrend(e,!1);return t=t&&this.includesHammer(e,!1),t}}]),t}(sr),pr=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="ShootingStar",e.requiredCount=5,e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=this.upwardTrend(e);return t=t&&this.includesHammer(e),t=t&&this.hasConfirmation(e),t}},{key:"upwardTrend",value:function(e){var t=1a}},{key:"includesHammer",value:function(e){var t=1r.close;return o&&t.close>r.close}}]),t}(At),ir=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="ShootingStarUnconfirmed",e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=this.upwardTrend(e,!1);return t=t&&this.includesHammer(e,!1),t}}]),t}(pr),hr=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="TweezerTop",e.requiredCount=5,e}return ne(t,e),ae(t,[{key:"logic",value:function(e){return this.upwardTrend(e)&&e.high[3]==e.high[4]}},{key:"upwardTrend",value:function(e){var t=p({values:e.close.slice(0,3),period:2}),r=i({values:e.close.slice(0,3),period:2});return t>r}}]),t}(At),gr=[new er,new tr,new rr,new or,new ar,new nr,new lr,new Xt,new Kt,new sr,new ur,new pr,new ir,new hr],vr=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="Bearish Candlesticks",e}return ne(t,e),ae(t,[{key:"hasPattern",value:function(e){return gr.reduce(function(t,r){return t||r.hasPattern(e)},!1)}}]),t}(At),cr=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="AbandonedBaby",e.requiredCount=3,e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=e.open[1],l=e.close[1],s=e.high[1],u=e.low[1],p=e.open[2],i=e.close[2],h=e.high[2],g=e.low[2],v=new Mt().hasPattern({open:[n],close:[l],high:[s],low:[u]});return rs&&i>p&&ht&&lo&&l<(r+t)/2&&l>t}}]),t}(At),_r=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.requiredCount=1,e.name="DragonFlyDoji",e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=this.approximateEqual(t,r),l=n&&this.approximateEqual(t,o),s=n&&this.approximateEqual(r,a);return n&&l&&!s}}]),t}(At),xr=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.requiredCount=1,e.name="GraveStoneDoji",e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=this.approximateEqual(t,r),l=n&&this.approximateEqual(t,o),s=n&&this.approximateEqual(r,a);return n&&s&&!l}}]),t}(At),mr=function(e){function t(){oe(this,t);var e=le(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="BullishSpinningTop",e.requiredCount=1,e}return ne(t,e),ae(t,[{key:"logic",value:function(e){var t=e.open[0],r=e.close[0],o=e.high[0],a=e.low[0],n=te(r-t),l=te(o-r),s=te(t-a);return n {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nSMA.calculate = sma;\nexport function sma(input) {\n Indicator.reverseInputs(input);\n var result = new SMA(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n//STEP 6. Run the tests\n","import { Indicator } from '../indicator/indicator';\nimport { SMA } from './SMA';\nexport class EMA extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n var exponent = (2 / (period + 1));\n var sma;\n this.result = [];\n sma = new SMA({ period: period, values: [] });\n var genFn = (function* () {\n var tick = yield;\n var prevEma;\n while (true) {\n if (prevEma !== undefined && tick !== undefined) {\n prevEma = ((tick - prevEma) * exponent) + prevEma;\n tick = yield prevEma;\n }\n else {\n tick = yield;\n prevEma = sma.nextValue(tick);\n if (prevEma)\n tick = yield prevEma;\n }\n }\n });\n this.generator = genFn();\n this.generator.next();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nEMA.calculate = ema;\nexport function ema(input) {\n Indicator.reverseInputs(input);\n var result = new EMA(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n","\"use strict\";\nimport { Indicator } from '../indicator/indicator';\nimport { LinkedList } from '../Utils/LinkedList';\nexport class WMA extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n this.result = [];\n this.generator = (function* () {\n let data = new LinkedList();\n let denominator = period * (period + 1) / 2;\n while (true) {\n if ((data.length) < period) {\n data.push(yield);\n }\n else {\n data.resetCursor();\n let result = 0;\n for (let i = 1; i <= period; i++) {\n result = result + (data.next() * i / (denominator));\n }\n var next = yield result;\n data.shift();\n data.push(next);\n }\n }\n })();\n this.generator.next();\n priceArray.forEach((tick, index) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n //STEP 5. REMOVE GET RESULT FUNCTION\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nWMA.calculate = wma;\n;\nexport function wma(input) {\n Indicator.reverseInputs(input);\n var result = new WMA(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n","import { Indicator } from '../indicator/indicator';\nimport { SMA } from './SMA';\nexport class WEMA extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n var exponent = 1 / period;\n var sma;\n this.result = [];\n sma = new SMA({ period: period, values: [] });\n var genFn = (function* () {\n var tick = yield;\n var prevEma;\n while (true) {\n if (prevEma !== undefined && tick !== undefined) {\n prevEma = ((tick - prevEma) * exponent) + prevEma;\n tick = yield prevEma;\n }\n else {\n tick = yield;\n prevEma = sma.nextValue(tick);\n if (prevEma !== undefined)\n tick = yield prevEma;\n }\n }\n });\n this.generator = genFn();\n this.generator.next();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nWEMA.calculate = wema;\nexport function wema(input) {\n Indicator.reverseInputs(input);\n var result = new WEMA(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n","/**\n * Created by AAravindan on 5/4/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from './SMA';\nimport { EMA } from './EMA';\nexport class MACDInput extends IndicatorInput {\n constructor(values) {\n super();\n this.values = values;\n this.SimpleMAOscillator = true;\n this.SimpleMASignal = true;\n }\n}\nexport class MACDOutput {\n}\nexport class MACD extends Indicator {\n constructor(input) {\n super(input);\n var oscillatorMAtype = input.SimpleMAOscillator ? SMA : EMA;\n var signalMAtype = input.SimpleMASignal ? SMA : EMA;\n var fastMAProducer = new oscillatorMAtype({ period: input.fastPeriod, values: [], format: (v) => { return v; } });\n var slowMAProducer = new oscillatorMAtype({ period: input.slowPeriod, values: [], format: (v) => { return v; } });\n var signalMAProducer = new signalMAtype({ period: input.signalPeriod, values: [], format: (v) => { return v; } });\n var format = this.format;\n this.result = [];\n this.generator = (function* () {\n var index = 0;\n var tick;\n var MACD, signal, histogram, fast, slow;\n while (true) {\n if (index < input.slowPeriod) {\n tick = yield;\n fast = fastMAProducer.nextValue(tick);\n slow = slowMAProducer.nextValue(tick);\n index++;\n continue;\n }\n if (fast && slow) {\n MACD = fast - slow;\n signal = signalMAProducer.nextValue(MACD);\n }\n histogram = MACD - signal;\n tick = yield ({\n //fast : fast,\n //slow : slow,\n MACD: format(MACD),\n signal: signal ? format(signal) : undefined,\n histogram: isNaN(histogram) ? undefined : format(histogram)\n });\n fast = fastMAProducer.nextValue(tick);\n slow = slowMAProducer.nextValue(tick);\n }\n })();\n this.generator.next();\n input.values.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n return result;\n }\n ;\n}\nMACD.calculate = macd;\nexport function macd(input) {\n Indicator.reverseInputs(input);\n var result = new MACD(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class AvgGainInput extends IndicatorInput {\n}\nexport class AverageGain extends Indicator {\n constructor(input) {\n super(input);\n let values = input.values;\n let period = input.period;\n let format = this.format;\n this.generator = (function* (period) {\n var currentValue = yield;\n var counter = 1;\n var gainSum = 0;\n var avgGain;\n var gain;\n var lastValue = currentValue;\n currentValue = yield;\n while (true) {\n gain = currentValue - lastValue;\n gain = gain > 0 ? gain : 0;\n if (gain > 0) {\n gainSum = gainSum + gain;\n }\n if (counter < period) {\n counter++;\n }\n else if (avgGain === undefined) {\n avgGain = gainSum / period;\n }\n else {\n avgGain = ((avgGain * (period - 1)) + gain) / period;\n }\n lastValue = currentValue;\n avgGain = (avgGain !== undefined) ? format(avgGain) : undefined;\n currentValue = yield avgGain;\n }\n })(period);\n this.generator.next();\n this.result = [];\n values.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nAverageGain.calculate = averagegain;\nexport function averagegain(input) {\n Indicator.reverseInputs(input);\n var result = new AverageGain(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class AvgLossInput extends IndicatorInput {\n}\nexport class AverageLoss extends Indicator {\n constructor(input) {\n super(input);\n let values = input.values;\n let period = input.period;\n let format = this.format;\n this.generator = (function* (period) {\n var currentValue = yield;\n var counter = 1;\n var lossSum = 0;\n var avgLoss;\n var loss;\n var lastValue = currentValue;\n currentValue = yield;\n while (true) {\n loss = lastValue - currentValue;\n loss = loss > 0 ? loss : 0;\n if (loss > 0) {\n lossSum = lossSum + loss;\n }\n if (counter < period) {\n counter++;\n }\n else if (avgLoss === undefined) {\n avgLoss = lossSum / period;\n }\n else {\n avgLoss = ((avgLoss * (period - 1)) + loss) / period;\n }\n lastValue = currentValue;\n avgLoss = (avgLoss !== undefined) ? format(avgLoss) : undefined;\n currentValue = yield avgLoss;\n }\n })(period);\n this.generator.next();\n this.result = [];\n values.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nAverageLoss.calculate = averageloss;\nexport function averageloss(input) {\n Indicator.reverseInputs(input);\n var result = new AverageLoss(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/5/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { AverageGain } from '../Utils/AverageGain';\nimport { AverageLoss } from '../Utils/AverageLoss';\nexport class RSIInput extends IndicatorInput {\n}\nexport class RSI extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var values = input.values;\n var GainProvider = new AverageGain({ period: period, values: [] });\n var LossProvider = new AverageLoss({ period: period, values: [] });\n let count = 1;\n this.generator = (function* (period) {\n var current = yield;\n var lastAvgGain, lastAvgLoss, RS, currentRSI;\n while (true) {\n lastAvgGain = GainProvider.nextValue(current);\n lastAvgLoss = LossProvider.nextValue(current);\n if ((lastAvgGain !== undefined) && (lastAvgLoss !== undefined)) {\n if (lastAvgLoss === 0) {\n currentRSI = 100;\n }\n else if (lastAvgGain === 0) {\n currentRSI = 0;\n }\n else {\n RS = lastAvgGain / lastAvgLoss;\n RS = isNaN(RS) ? 0 : RS;\n currentRSI = parseFloat((100 - (100 / (1 + RS))).toFixed(2));\n }\n }\n count++;\n current = yield currentRSI;\n }\n })(period);\n this.generator.next();\n this.result = [];\n values.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nRSI.calculate = rsi;\nexport function rsi(input) {\n Indicator.reverseInputs(input);\n var result = new RSI(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nimport LinkedList from '../Utils/FixedSizeLinkedList';\n/**\n * Created by AAravindan on 5/7/16.\n */\n\"use strict\";\nexport class SDInput extends IndicatorInput {\n}\n;\nexport class SD extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n var sma = new SMA({ period: period, values: [], format: (v) => { return v; } });\n this.result = [];\n this.generator = (function* () {\n var tick;\n var mean;\n var currentSet = new LinkedList(period);\n ;\n tick = yield;\n var sd;\n while (true) {\n currentSet.push(tick);\n mean = sma.nextValue(tick);\n if (mean) {\n let sum = 0;\n for (let x of currentSet.iterator()) {\n sum = sum + (Math.pow((x - mean), 2));\n }\n sd = Math.sqrt(sum / (period));\n }\n tick = yield sd;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var nextResult = this.generator.next(price);\n if (nextResult.value != undefined)\n return this.format(nextResult.value);\n }\n ;\n}\nSD.calculate = sd;\nexport function sd(input) {\n Indicator.reverseInputs(input);\n var result = new SD(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","\"use strict\";\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nimport { SD } from '../Utils/SD';\nexport class BollingerBandsInput extends IndicatorInput {\n}\n;\nexport class BollingerBandsOutput extends IndicatorInput {\n}\n;\nexport class BollingerBands extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n var stdDev = input.stdDev;\n var format = this.format;\n var sma, sd;\n this.result = [];\n sma = new SMA({ period: period, values: [], format: (v) => { return v; } });\n sd = new SD({ period: period, values: [], format: (v) => { return v; } });\n this.generator = (function* () {\n var result;\n var tick;\n var calcSMA;\n var calcsd;\n tick = yield;\n while (true) {\n calcSMA = sma.nextValue(tick);\n calcsd = sd.nextValue(tick);\n if (calcSMA) {\n let middle = format(calcSMA);\n let upper = format(calcSMA + (calcsd * stdDev));\n let lower = format(calcSMA - (calcsd * stdDev));\n let pb = format((tick - lower) / (upper - lower));\n result = {\n middle: middle,\n upper: upper,\n lower: lower,\n pb: pb\n };\n }\n tick = yield result;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nBollingerBands.calculate = bollingerbands;\nexport function bollingerbands(input) {\n Indicator.reverseInputs(input);\n var result = new BollingerBands(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator } from '../indicator/indicator';\nimport { LinkedList } from '../Utils/LinkedList';\n//STEP3. Add class based syntax with export\nexport class WilderSmoothing extends Indicator {\n constructor(input) {\n super(input);\n this.period = input.period;\n this.price = input.values;\n var genFn = (function* (period) {\n var list = new LinkedList();\n var sum = 0;\n var counter = 1;\n var current = yield;\n var result = 0;\n while (true) {\n if (counter < period) {\n counter++;\n sum = sum + current;\n result = undefined;\n }\n else if (counter == period) {\n counter++;\n sum = sum + current;\n result = sum;\n }\n else {\n result = result - (result / period) + current;\n }\n current = yield result;\n }\n });\n this.generator = genFn(this.period);\n this.generator.next();\n this.result = [];\n this.price.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nWilderSmoothing.calculate = wildersmoothing;\nexport function wildersmoothing(input) {\n Indicator.reverseInputs(input);\n var result = new WilderSmoothing(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n//STEP 6. Run the tests\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/8/16.\n */\n/**\n * Created by AAravindan on 5/8/16.\n */\n\"use strict\";\nexport class TrueRangeInput extends IndicatorInput {\n}\n;\nexport class TrueRange extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var format = this.format;\n if (lows.length != highs.length) {\n throw ('Inputs(low,high) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var current = yield;\n var previousClose, result;\n while (true) {\n if (previousClose === undefined) {\n previousClose = current.close;\n current = yield result;\n }\n result = Math.max(current.high - current.low, isNaN(Math.abs(current.high - previousClose)) ? 0 : Math.abs(current.high - previousClose), isNaN(Math.abs(current.low - previousClose)) ? 0 : Math.abs(current.low - previousClose));\n previousClose = current.close;\n if (result != undefined) {\n result = format(result);\n }\n current = yield result;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nTrueRange.calculate = truerange;\nexport function truerange(input) {\n Indicator.reverseInputs(input);\n var result = new TrueRange(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { WilderSmoothing } from '../moving_averages/WilderSmoothing';\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { MDM } from './MinusDM';\nimport { PDM } from './PlusDM';\nimport { TrueRange } from './TrueRange';\nimport { WEMA } from '../moving_averages/WEMA';\nexport class ADXInput extends IndicatorInput {\n}\n;\nexport class ADXOutput extends IndicatorInput {\n}\n;\nexport class ADX extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var period = input.period;\n var format = this.format;\n var plusDM = new PDM({\n high: [],\n low: []\n });\n var minusDM = new MDM({\n high: [],\n low: []\n });\n var emaPDM = new WilderSmoothing({ period: period, values: [], format: (v) => { return v; } });\n var emaMDM = new WilderSmoothing({ period: period, values: [], format: (v) => { return v; } });\n var emaTR = new WilderSmoothing({ period: period, values: [], format: (v) => { return v; } });\n var emaDX = new WEMA({ period: period, values: [], format: (v) => { return v; } });\n var tr = new TrueRange({\n low: [],\n high: [],\n close: [],\n });\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n ADXOutput;\n this.generator = (function* () {\n var tick = yield;\n var index = 0;\n var lastATR, lastAPDM, lastAMDM, lastPDI, lastMDI, lastDX, smoothedDX;\n lastATR = 0;\n lastAPDM = 0;\n lastAMDM = 0;\n while (true) {\n let calcTr = tr.nextValue(tick);\n let calcPDM = plusDM.nextValue(tick);\n let calcMDM = minusDM.nextValue(tick);\n if (calcTr === undefined) {\n tick = yield;\n continue;\n }\n let lastATR = emaTR.nextValue(calcTr);\n let lastAPDM = emaPDM.nextValue(calcPDM);\n let lastAMDM = emaMDM.nextValue(calcMDM);\n if ((lastATR != undefined) && (lastAPDM != undefined) && (lastAMDM != undefined)) {\n lastPDI = (lastAPDM) * 100 / lastATR;\n lastMDI = (lastAMDM) * 100 / lastATR;\n let diDiff = Math.abs(lastPDI - lastMDI);\n let diSum = (lastPDI + lastMDI);\n lastDX = (diDiff / diSum) * 100;\n smoothedDX = emaDX.nextValue(lastDX);\n // console.log(tick.high.toFixed(2), tick.low.toFixed(2), tick.close.toFixed(2) , calcTr.toFixed(2), calcPDM.toFixed(2), calcMDM.toFixed(2), lastATR.toFixed(2), lastAPDM.toFixed(2), lastAMDM.toFixed(2), lastPDI.toFixed(2), lastMDI.toFixed(2), diDiff.toFixed(2), diSum.toFixed(2), lastDX.toFixed(2));\n }\n tick = yield { adx: smoothedDX, pdi: lastPDI, mdi: lastMDI };\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value != undefined && result.value.adx != undefined) {\n this.result.push({ adx: format(result.value.adx), pdi: format(result.value.pdi), mdi: format(result.value.mdi) });\n }\n });\n }\n ;\n ;\n nextValue(price) {\n let result = this.generator.next(price).value;\n if (result != undefined && result.adx != undefined) {\n return { adx: this.format(result.adx), pdi: this.format(result.pdi), mdi: this.format(result.mdi) };\n }\n }\n ;\n}\nADX.calculate = adx;\nexport function adx(input) {\n Indicator.reverseInputs(input);\n var result = new ADX(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/8/16.\n */\n\"use strict\";\nimport { WEMA } from '../moving_averages/WEMA';\nimport { TrueRange } from './TrueRange';\nexport class ATRInput extends IndicatorInput {\n}\n;\nexport class ATR extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var period = input.period;\n var format = this.format;\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n var trueRange = new TrueRange({\n low: [],\n high: [],\n close: []\n });\n var wema = new WEMA({ period: period, values: [], format: (v) => { return v; } });\n this.result = [];\n this.generator = (function* () {\n var tick = yield;\n var avgTrueRange, trange;\n ;\n while (true) {\n trange = trueRange.nextValue({\n low: tick.low,\n high: tick.high,\n close: tick.close\n });\n if (trange === undefined) {\n avgTrueRange = undefined;\n }\n else {\n avgTrueRange = wema.nextValue(trange);\n }\n tick = yield avgTrueRange;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value !== undefined) {\n this.result.push(format(result.value));\n }\n });\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nATR.calculate = atr;\nexport function atr(input) {\n Indicator.reverseInputs(input);\n var result = new ATR(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport LinkedList from '../Utils/FixedSizeLinkedList';\nexport class ROCInput extends IndicatorInput {\n}\nexport class ROC extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n this.result = [];\n this.generator = (function* () {\n let index = 1;\n var pastPeriods = new LinkedList(period);\n ;\n var tick = yield;\n var roc;\n while (true) {\n pastPeriods.push(tick);\n if (index < period) {\n index++;\n }\n else {\n roc = ((tick - pastPeriods.lastShift) / (pastPeriods.lastShift)) * 100;\n }\n tick = yield roc;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined && (!isNaN(result.value))) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var nextResult = this.generator.next(price);\n if (nextResult.value != undefined && (!isNaN(nextResult.value))) {\n return this.format(nextResult.value);\n }\n }\n ;\n}\nROC.calculate = roc;\n;\nexport function roc(input) {\n Indicator.reverseInputs(input);\n var result = new ROC(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nimport { ROC } from './ROC';\nexport class KSTInput extends IndicatorInput {\n}\nexport class KSTOutput {\n}\nexport class KST extends Indicator {\n constructor(input) {\n super(input);\n let priceArray = input.values;\n let rocPer1 = input.ROCPer1;\n let rocPer2 = input.ROCPer2;\n let rocPer3 = input.ROCPer3;\n let rocPer4 = input.ROCPer4;\n let smaPer1 = input.SMAROCPer1;\n let smaPer2 = input.SMAROCPer2;\n let smaPer3 = input.SMAROCPer3;\n let smaPer4 = input.SMAROCPer4;\n let signalPeriod = input.signalPeriod;\n let roc1 = new ROC({ period: rocPer1, values: [] });\n let roc2 = new ROC({ period: rocPer2, values: [] });\n let roc3 = new ROC({ period: rocPer3, values: [] });\n let roc4 = new ROC({ period: rocPer4, values: [] });\n let sma1 = new SMA({ period: smaPer1, values: [], format: (v) => { return v; } });\n let sma2 = new SMA({ period: smaPer2, values: [], format: (v) => { return v; } });\n let sma3 = new SMA({ period: smaPer3, values: [], format: (v) => { return v; } });\n let sma4 = new SMA({ period: smaPer4, values: [], format: (v) => { return v; } });\n let signalSMA = new SMA({ period: signalPeriod, values: [], format: (v) => { return v; } });\n var format = this.format;\n this.result = [];\n let firstResult = Math.max(rocPer1 + smaPer1, rocPer2 + smaPer2, rocPer3 + smaPer3, rocPer4 + smaPer4);\n this.generator = (function* () {\n let index = 1;\n let tick = yield;\n let kst;\n let RCMA1, RCMA2, RCMA3, RCMA4, signal, result;\n while (true) {\n let roc1Result = roc1.nextValue(tick);\n let roc2Result = roc2.nextValue(tick);\n let roc3Result = roc3.nextValue(tick);\n let roc4Result = roc4.nextValue(tick);\n RCMA1 = (roc1Result !== undefined) ? sma1.nextValue(roc1Result) : undefined;\n RCMA2 = (roc2Result !== undefined) ? sma2.nextValue(roc2Result) : undefined;\n RCMA3 = (roc3Result !== undefined) ? sma3.nextValue(roc3Result) : undefined;\n RCMA4 = (roc4Result !== undefined) ? sma4.nextValue(roc4Result) : undefined;\n if (index < firstResult) {\n index++;\n }\n else {\n kst = (RCMA1 * 1) + (RCMA2 * 2) + (RCMA3 * 3) + (RCMA4 * 4);\n }\n signal = (kst !== undefined) ? signalSMA.nextValue(kst) : undefined;\n result = kst !== undefined ? {\n kst: format(kst),\n signal: signal ? format(signal) : undefined\n } : undefined;\n tick = yield result;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n let result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n let nextResult = this.generator.next(price);\n if (nextResult.value != undefined)\n return nextResult.value;\n }\n ;\n}\nKST.calculate = kst;\nexport function kst(input) {\n Indicator.reverseInputs(input);\n var result = new KST(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\n\"use strict\";\n/*\n There seems to be a few interpretations of the rules for this regarding which prices.\n I mean the english from which periods are included. The wording does seem to\n introduce some discrepancy so maybe that is why. I want to put the author's\n own description here to reassess this later.\n ----------------------------------------------------------------------------------------\n For the first day of entry the SAR is the previous Significant Point\n\n If long the SP is the lowest price reached while in the previous short trade\n If short the SP is the highest price reached while in the previous long trade\n\n If long:\n Find the difference between the highest price made while in the trade and the SAR for today.\n Multiple the difference by the AF and ADD the result to today's SAR to obtain the SAR for tomorrow.\n Use 0.02 for the first AF and increase it by 0.02 on every day that a new high for the trade is made.\n If a new high is not made continue to use the AF as last increased. Do not increase the AF above .20\n\n Never move the SAR for tomorrow ABOVE the previous day's LOW or today's LOW.\n If the SAR is calculated to be ABOVE the previous day's LOW or today's LOW then use the lower low between today and the previous day as the new SAR.\n Make the next day's calculations based on this SAR.\n\n If short:\n Find the difference between the lowest price made while in the trade and the SAR for today.\n Multiple the difference by the AF and SUBTRACT the result to today's SAR to obtain the SAR for tomorrow.\n Use 0.02 for the first AF and increase it by 0.02 on every day that a new high for the trade is made.\n If a new high is not made continue to use the AF as last increased. Do not increase the AF above .20\n\n Never move the SAR for tomorrow BELOW the previous day's HIGH or today's HIGH.\n If the SAR is calculated to be BELOW the previous day's HIGH or today's HIGH then use the higher high between today and the previous day as the new SAR. Make the next day's calculations based on this SAR.\n ----------------------------------------------------------------------------------------\n*/\nexport class PSARInput extends IndicatorInput {\n}\n;\nexport class PSAR extends Indicator {\n constructor(input) {\n super(input);\n let highs = input.high || [];\n let lows = input.low || [];\n var genFn = function* (step, max) {\n let curr, extreme, sar, furthest;\n let up = true;\n let accel = step;\n let prev = yield;\n while (true) {\n if (curr) {\n sar = sar + accel * (extreme - sar);\n if (up) {\n sar = Math.min(sar, furthest.low, prev.low);\n if (curr.high > extreme) {\n extreme = curr.high;\n accel = Math.min(accel + step, max);\n }\n ;\n }\n else {\n sar = Math.max(sar, furthest.high, prev.high);\n if (curr.low < extreme) {\n extreme = curr.low;\n accel = Math.min(accel + step, max);\n }\n }\n if ((up && curr.low < sar) || (!up && curr.high > sar)) {\n accel = step;\n sar = extreme;\n up = !up;\n extreme = !up ? curr.low : curr.high;\n }\n }\n else {\n // Randomly setup start values? What is the trend on first tick??\n sar = prev.low;\n extreme = prev.high;\n }\n furthest = prev;\n if (curr)\n prev = curr;\n curr = yield sar;\n }\n };\n this.result = [];\n this.generator = genFn(input.step, input.max);\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n });\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(input) {\n let nextResult = this.generator.next(input);\n if (nextResult.value !== undefined)\n return nextResult.value;\n }\n ;\n}\nPSAR.calculate = psar;\nexport function psar(input) {\n Indicator.reverseInputs(input);\n var result = new PSAR(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/10/16.\n */\n\"use strict\";\nimport LinkedList from '../Utils/FixedSizeLinkedList';\nimport { SMA } from '../moving_averages/SMA';\nexport class StochasticInput extends IndicatorInput {\n}\n;\nexport class StochasticOutput {\n}\n;\nexport class Stochastic extends Indicator {\n constructor(input) {\n super(input);\n let lows = input.low;\n let highs = input.high;\n let closes = input.close;\n let period = input.period;\n let signalPeriod = input.signalPeriod;\n let format = this.format;\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n //%K = (Current Close - Lowest Low)/(Highest High - Lowest Low) * 100\n //%D = 3-day SMA of %K\n //\n //Lowest Low = lowest low for the look-back period\n //Highest High = highest high for the look-back period\n //%K is multiplied by 100 to move the decimal point two places\n this.generator = (function* () {\n let index = 1;\n let pastHighPeriods = new LinkedList(period, true, false);\n let pastLowPeriods = new LinkedList(period, false, true);\n let dSma = new SMA({\n period: signalPeriod,\n values: [],\n format: (v) => { return v; }\n });\n let k, d;\n var tick = yield;\n while (true) {\n pastHighPeriods.push(tick.high);\n pastLowPeriods.push(tick.low);\n if (index < period) {\n index++;\n tick = yield;\n continue;\n }\n let periodLow = pastLowPeriods.periodLow;\n k = (tick.close - periodLow) / (pastHighPeriods.periodHigh - periodLow) * 100;\n k = isNaN(k) ? 0 : k; //This happens when the close, high and low are same for the entire period; Bug fix for \n d = dSma.nextValue(k);\n tick = yield {\n k: format(k),\n d: (d !== undefined) ? format(d) : undefined\n };\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(input) {\n let nextResult = this.generator.next(input);\n if (nextResult.value !== undefined)\n return nextResult.value;\n }\n ;\n}\nStochastic.calculate = stochastic;\nexport function stochastic(input) {\n Indicator.reverseInputs(input);\n var result = new Stochastic(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\nimport LinkedList from '../Utils/FixedSizeLinkedList';\nexport class WilliamsRInput extends IndicatorInput {\n}\n;\nexport class WilliamsR extends Indicator {\n constructor(input) {\n super(input);\n let lows = input.low;\n let highs = input.high;\n let closes = input.close;\n let period = input.period;\n let format = this.format;\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n //%R = (Highest High - Close)/(Highest High - Lowest Low) * -100\n //Lowest Low = lowest low for the look-back period\n //Highest High = highest high for the look-back period\n //%R is multiplied by -100 correct the inversion and move the decimal.\n this.generator = (function* () {\n let index = 1;\n let pastHighPeriods = new LinkedList(period, true, false);\n let pastLowPeriods = new LinkedList(period, false, true);\n let periodLow;\n let periodHigh;\n var tick = yield;\n let williamsR;\n while (true) {\n pastHighPeriods.push(tick.high);\n pastLowPeriods.push(tick.low);\n if (index < period) {\n index++;\n tick = yield;\n continue;\n }\n periodLow = pastLowPeriods.periodLow;\n periodHigh = pastHighPeriods.periodHigh;\n williamsR = format((periodHigh - tick.close) / (periodHigh - periodLow) * -100);\n tick = yield williamsR;\n }\n })();\n this.generator.next();\n lows.forEach((low, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n var nextResult = this.generator.next(price);\n if (nextResult.value != undefined)\n return this.format(nextResult.value);\n }\n ;\n}\nWilliamsR.calculate = williamsr;\nexport function williamsr(input) {\n Indicator.reverseInputs(input);\n var result = new WilliamsR(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/17/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class ADLInput extends IndicatorInput {\n}\nexport class ADL extends Indicator {\n constructor(input) {\n super(input);\n var highs = input.high;\n var lows = input.low;\n var closes = input.close;\n var volumes = input.volume;\n if (!((lows.length === highs.length) && (highs.length === closes.length) && (highs.length === volumes.length))) {\n throw ('Inputs(low,high, close, volumes) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var result = 0;\n var tick;\n tick = yield;\n while (true) {\n let moneyFlowMultiplier = ((tick.close - tick.low) - (tick.high - tick.close)) / (tick.high - tick.low);\n moneyFlowMultiplier = isNaN(moneyFlowMultiplier) ? 1 : moneyFlowMultiplier;\n let moneyFlowVolume = moneyFlowMultiplier * tick.volume;\n result = result + moneyFlowVolume;\n tick = yield Math.round(result);\n }\n })();\n this.generator.next();\n highs.forEach((tickHigh, index) => {\n var tickInput = {\n high: tickHigh,\n low: lows[index],\n close: closes[index],\n volume: volumes[index]\n };\n var result = this.generator.next(tickInput);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nADL.calculate = adl;\nexport function adl(input) {\n Indicator.reverseInputs(input);\n var result = new ADL(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/17/16.\n */\n\"use strict\";\nexport class OBVInput extends IndicatorInput {\n}\nexport class OBV extends Indicator {\n constructor(input) {\n super(input);\n var closes = input.close;\n var volumes = input.volume;\n this.result = [];\n this.generator = (function* () {\n var result = 0;\n var tick;\n var lastClose;\n tick = yield;\n if (tick.close && (typeof tick.close === 'number')) {\n lastClose = tick.close;\n tick = yield;\n }\n while (true) {\n if (lastClose < tick.close) {\n result = result + tick.volume;\n }\n else if (tick.close < lastClose) {\n result = result - tick.volume;\n }\n lastClose = tick.close;\n tick = yield result;\n }\n })();\n this.generator.next();\n closes.forEach((close, index) => {\n let tickInput = {\n close: closes[index],\n volume: volumes[index]\n };\n let result = this.generator.next(tickInput);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nOBV.calculate = obv;\nexport function obv(input) {\n Indicator.reverseInputs(input);\n var result = new OBV(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/9/16.\n */\n\"use strict\";\nimport { ROC } from './ROC.js';\nimport { EMA } from '../moving_averages/EMA.js';\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class TRIXInput extends IndicatorInput {\n}\n;\nexport class TRIX extends Indicator {\n constructor(input) {\n super(input);\n let priceArray = input.values;\n let period = input.period;\n let format = this.format;\n let ema = new EMA({ period: period, values: [], format: (v) => { return v; } });\n let emaOfema = new EMA({ period: period, values: [], format: (v) => { return v; } });\n let emaOfemaOfema = new EMA({ period: period, values: [], format: (v) => { return v; } });\n let trixROC = new ROC({ period: 1, values: [], format: (v) => { return v; } });\n this.result = [];\n this.generator = (function* () {\n let tick = yield;\n while (true) {\n let initialema = ema.nextValue(tick);\n let smoothedResult = initialema ? emaOfema.nextValue(initialema) : undefined;\n let doubleSmoothedResult = smoothedResult ? emaOfemaOfema.nextValue(smoothedResult) : undefined;\n let result = doubleSmoothedResult ? trixROC.nextValue(doubleSmoothedResult) : undefined;\n tick = yield result ? format(result) : undefined;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n let result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n let nextResult = this.generator.next(price);\n if (nextResult.value !== undefined)\n return nextResult.value;\n }\n ;\n}\nTRIX.calculate = trix;\nexport function trix(input) {\n Indicator.reverseInputs(input);\n var result = new TRIX(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { EMA } from '../moving_averages/EMA';\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class ForceIndexInput extends IndicatorInput {\n constructor() {\n super(...arguments);\n this.period = 1;\n }\n}\n;\nexport class ForceIndex extends Indicator {\n constructor(input) {\n super(input);\n var closes = input.close;\n var volumes = input.volume;\n var period = input.period || 1;\n if (!((volumes.length === closes.length))) {\n throw ('Inputs(volume, close) not of equal size');\n }\n let emaForceIndex = new EMA({ values: [], period: period });\n this.result = [];\n this.generator = (function* () {\n var previousTick = yield;\n var tick = yield;\n let forceIndex;\n while (true) {\n forceIndex = (tick.close - previousTick.close) * tick.volume;\n previousTick = tick;\n tick = yield emaForceIndex.nextValue(forceIndex);\n }\n })();\n this.generator.next();\n volumes.forEach((tick, index) => {\n var result = this.generator.next({\n close: closes[index],\n volume: volumes[index]\n });\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n ;\n nextValue(price) {\n let result = this.generator.next(price).value;\n if (result != undefined) {\n return result;\n }\n }\n ;\n}\nForceIndex.calculate = forceindex;\nexport function forceindex(input) {\n Indicator.reverseInputs(input);\n var result = new ForceIndex(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nimport LinkedList from '../Utils/FixedSizeLinkedList';\nexport class CCIInput extends IndicatorInput {\n}\n;\nexport class CCI extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var period = input.period;\n var format = this.format;\n let constant = .015;\n var currentTpSet = new LinkedList(period);\n ;\n var tpSMACalculator = new SMA({ period: period, values: [], format: (v) => { return v; } });\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var tick = yield;\n while (true) {\n let tp = (tick.high + tick.low + tick.close) / 3;\n currentTpSet.push(tp);\n let smaTp = tpSMACalculator.nextValue(tp);\n let meanDeviation = null;\n let cci;\n let sum = 0;\n if (smaTp != undefined) {\n //First, subtract the most recent 20-period average of the typical price from each period's typical price. \n //Second, take the absolute values of these numbers.\n //Third,sum the absolute values. \n for (let x of currentTpSet.iterator()) {\n sum = sum + (Math.abs(x - smaTp));\n }\n //Fourth, divide by the total number of periods (20). \n meanDeviation = sum / 20;\n cci = (tp - smaTp) / (constant * meanDeviation);\n }\n tick = yield cci;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n ;\n nextValue(price) {\n let result = this.generator.next(price).value;\n if (result != undefined) {\n return result;\n }\n }\n ;\n}\nCCI.calculate = cci;\nexport function cci(input) {\n Indicator.reverseInputs(input);\n var result = new CCI(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nexport class AwesomeOscillatorInput extends IndicatorInput {\n}\nexport class AwesomeOscillator extends Indicator {\n constructor(input) {\n super(input);\n var highs = input.high;\n var lows = input.low;\n var fastPeriod = input.fastPeriod;\n var slowPeriod = input.slowPeriod;\n var slowSMA = new SMA({ values: [], period: slowPeriod });\n var fastSMA = new SMA({ values: [], period: fastPeriod });\n this.result = [];\n this.generator = (function* () {\n var result;\n var tick;\n var medianPrice;\n var slowSmaValue;\n var fastSmaValue;\n tick = yield;\n while (true) {\n medianPrice = (tick.high + tick.low) / 2;\n slowSmaValue = slowSMA.nextValue(medianPrice);\n fastSmaValue = fastSMA.nextValue(medianPrice);\n if (slowSmaValue !== undefined && fastSmaValue !== undefined) {\n result = fastSmaValue - slowSmaValue;\n }\n tick = yield result;\n }\n })();\n this.generator.next();\n highs.forEach((tickHigh, index) => {\n var tickInput = {\n high: tickHigh,\n low: lows[index],\n };\n var result = this.generator.next(tickInput);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return this.format(result.value);\n }\n }\n ;\n}\nAwesomeOscillator.calculate = awesomeoscillator;\nexport function awesomeoscillator(input) {\n Indicator.reverseInputs(input);\n var result = new AwesomeOscillator(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class VWAPInput extends IndicatorInput {\n}\n;\nexport class VWAP extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var volumes = input.volume;\n var format = this.format;\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var tick = yield;\n let cumulativeTotal = 0;\n let cumulativeVolume = 0;\n while (true) {\n let typicalPrice = (tick.high + tick.low + tick.close) / 3;\n let total = tick.volume * typicalPrice;\n cumulativeTotal = cumulativeTotal + total;\n cumulativeVolume = cumulativeVolume + tick.volume;\n tick = yield cumulativeTotal / cumulativeVolume;\n ;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index],\n volume: volumes[index]\n });\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n ;\n nextValue(price) {\n let result = this.generator.next(price).value;\n if (result != undefined) {\n return result;\n }\n }\n ;\n}\nVWAP.calculate = vwap;\nexport function vwap(input) {\n Indicator.reverseInputs(input);\n var result = new VWAP(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class VolumeProfileInput extends IndicatorInput {\n}\nexport class VolumeProfileOutput {\n}\nexport function priceFallsBetweenBarRange(low, high, low1, high1) {\n return (low <= low1 && high >= low1) || (low1 <= low && high1 >= low);\n}\nexport class VolumeProfile extends Indicator {\n constructor(input) {\n super(input);\n var highs = input.high;\n var lows = input.low;\n var closes = input.close;\n var opens = input.open;\n var volumes = input.volume;\n var bars = input.noOfBars;\n if (!((lows.length === highs.length) && (highs.length === closes.length) && (highs.length === volumes.length))) {\n throw ('Inputs(low,high, close, volumes) not of equal size');\n }\n this.result = [];\n var max = Math.max(...highs, ...lows, ...closes, ...opens);\n var min = Math.min(...highs, ...lows, ...closes, ...opens);\n var barRange = (max - min) / bars;\n var lastEnd = min;\n for (let i = 0; i < bars; i++) {\n let rangeStart = lastEnd;\n let rangeEnd = rangeStart + barRange;\n lastEnd = rangeEnd;\n let bullishVolume = 0;\n let bearishVolume = 0;\n let totalVolume = 0;\n for (let priceBar = 0; priceBar < highs.length; priceBar++) {\n let priceBarStart = lows[priceBar];\n let priceBarEnd = highs[priceBar];\n let priceBarOpen = opens[priceBar];\n let priceBarClose = closes[priceBar];\n let priceBarVolume = volumes[priceBar];\n if (priceFallsBetweenBarRange(rangeStart, rangeEnd, priceBarStart, priceBarEnd)) {\n totalVolume = totalVolume + priceBarVolume;\n if (priceBarOpen > priceBarClose) {\n bearishVolume = bearishVolume + priceBarVolume;\n }\n else {\n bullishVolume = bullishVolume + priceBarVolume;\n }\n }\n }\n this.result.push({\n rangeStart, rangeEnd, bullishVolume, bearishVolume, totalVolume\n });\n }\n }\n ;\n nextValue(price) {\n throw ('Next value not supported for volume profile');\n }\n ;\n}\nVolumeProfile.calculate = volumeprofile;\nexport function volumeprofile(input) {\n Indicator.reverseInputs(input);\n var result = new VolumeProfile(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/4/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class TypicalPriceInput extends IndicatorInput {\n}\nexport class TypicalPrice extends Indicator {\n constructor(input) {\n super(input);\n this.result = [];\n this.generator = (function* () {\n let priceInput = yield;\n while (true) {\n priceInput = yield (priceInput.high + priceInput.low + priceInput.close) / 3;\n }\n })();\n this.generator.next();\n input.low.forEach((tick, index) => {\n var result = this.generator.next({\n high: input.high[index],\n low: input.low[index],\n close: input.close[index],\n });\n this.result.push(result.value);\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n return result;\n }\n ;\n}\nTypicalPrice.calculate = typicalprice;\nexport function typicalprice(input) {\n Indicator.reverseInputs(input);\n var result = new TypicalPrice(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/17/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { TypicalPrice } from '../chart_types/TypicalPrice';\nimport FixedSizeLinkedList from '../Utils/FixedSizeLinkedList';\nexport class MFIInput extends IndicatorInput {\n}\nexport class MFI extends Indicator {\n constructor(input) {\n super(input);\n var highs = input.high;\n var lows = input.low;\n var closes = input.close;\n var volumes = input.volume;\n var period = input.period;\n var typicalPrice = new TypicalPrice({ low: [], high: [], close: [] });\n var positiveFlow = new FixedSizeLinkedList(period, false, false, true);\n var negativeFlow = new FixedSizeLinkedList(period, false, false, true);\n if (!((lows.length === highs.length) && (highs.length === closes.length) && (highs.length === volumes.length))) {\n throw ('Inputs(low,high, close, volumes) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var result;\n var tick;\n var lastClose;\n var positiveFlowForPeriod;\n var rawMoneyFlow = 0;\n var moneyFlowRatio;\n var negativeFlowForPeriod;\n let typicalPriceValue = null;\n let prevousTypicalPrice = null;\n tick = yield;\n lastClose = tick.close; //Fist value \n tick = yield;\n while (true) {\n var { high, low, close, volume } = tick;\n var positionMoney = 0;\n var negativeMoney = 0;\n typicalPriceValue = typicalPrice.nextValue({ high, low, close });\n rawMoneyFlow = typicalPriceValue * volume;\n if ((typicalPriceValue != null) && (prevousTypicalPrice != null)) {\n typicalPriceValue > prevousTypicalPrice ? positionMoney = rawMoneyFlow : negativeMoney = rawMoneyFlow;\n positiveFlow.push(positionMoney);\n negativeFlow.push(negativeMoney);\n positiveFlowForPeriod = positiveFlow.periodSum;\n negativeFlowForPeriod = negativeFlow.periodSum;\n if ((positiveFlow.totalPushed >= period) && (positiveFlow.totalPushed >= period)) {\n moneyFlowRatio = positiveFlowForPeriod / negativeFlowForPeriod;\n result = 100 - 100 / (1 + moneyFlowRatio);\n }\n }\n prevousTypicalPrice = typicalPriceValue;\n tick = yield result;\n }\n })();\n this.generator.next();\n highs.forEach((tickHigh, index) => {\n var tickInput = {\n high: tickHigh,\n low: lows[index],\n close: closes[index],\n volume: volumes[index]\n };\n var result = this.generator.next(tickInput);\n if (result.value != undefined) {\n this.result.push(parseFloat(result.value.toFixed(2)));\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return (parseFloat(result.value.toFixed(2)));\n }\n }\n ;\n}\nMFI.calculate = mfi;\nexport function mfi(input) {\n Indicator.reverseInputs(input);\n var result = new MFI(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/10/16.\n */\n\"use strict\";\nimport { SMA } from '../moving_averages/SMA';\nimport { RSI } from '../oscillators/RSI';\nimport { Stochastic } from '../momentum/Stochastic';\nexport class StochasticRsiInput extends IndicatorInput {\n}\n;\nexport class StochasticRSIOutput {\n}\n;\nexport class StochasticRSI extends Indicator {\n constructor(input) {\n super(input);\n let closes = input.values;\n let rsiPeriod = input.rsiPeriod;\n let stochasticPeriod = input.stochasticPeriod;\n let kPeriod = input.kPeriod;\n let dPeriod = input.dPeriod;\n let format = this.format;\n this.result = [];\n this.generator = (function* () {\n let index = 1;\n let rsi = new RSI({ period: rsiPeriod, values: [] });\n let stochastic = new Stochastic({ period: stochasticPeriod, high: [], low: [], close: [], signalPeriod: kPeriod });\n let dSma = new SMA({\n period: dPeriod,\n values: [],\n format: (v) => { return v; }\n });\n let lastRSI, stochasticRSI, d, result;\n var tick = yield;\n while (true) {\n lastRSI = rsi.nextValue(tick);\n if (lastRSI !== undefined) {\n var stochasticInput = { high: lastRSI, low: lastRSI, close: lastRSI };\n stochasticRSI = stochastic.nextValue(stochasticInput);\n if (stochasticRSI !== undefined && stochasticRSI.d !== undefined) {\n d = dSma.nextValue(stochasticRSI.d);\n if (d !== undefined)\n result = {\n stochRSI: stochasticRSI.k,\n k: stochasticRSI.d,\n d: d\n };\n }\n }\n tick = yield result;\n }\n })();\n this.generator.next();\n closes.forEach((tick, index) => {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(input) {\n let nextResult = this.generator.next(input);\n if (nextResult.value !== undefined)\n return nextResult.value;\n }\n ;\n}\nStochasticRSI.calculate = stochasticrsi;\nexport function stochasticrsi(input) {\n Indicator.reverseInputs(input);\n var result = new StochasticRSI(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport FixedSizedLinkedList from './FixedSizeLinkedList';\nexport class HighestInput extends IndicatorInput {\n}\nexport class Highest extends Indicator {\n constructor(input) {\n super(input);\n var values = input.values;\n var period = input.period;\n this.result = [];\n var periodList = new FixedSizedLinkedList(period, true, false, false);\n this.generator = (function* () {\n var result;\n var tick;\n var high;\n tick = yield;\n while (true) {\n periodList.push(tick);\n if (periodList.totalPushed >= period) {\n high = periodList.periodHigh;\n }\n tick = yield high;\n }\n })();\n this.generator.next();\n values.forEach((value, index) => {\n var result = this.generator.next(value);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return result.value;\n }\n }\n ;\n}\nHighest.calculate = highest;\nexport function highest(input) {\n Indicator.reverseInputs(input);\n var result = new Highest(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport FixedSizedLinkedList from './FixedSizeLinkedList';\nexport class LowestInput extends IndicatorInput {\n}\nexport class Lowest extends Indicator {\n constructor(input) {\n super(input);\n var values = input.values;\n var period = input.period;\n this.result = [];\n var periodList = new FixedSizedLinkedList(period, false, true, false);\n this.generator = (function* () {\n var result;\n var tick;\n var high;\n tick = yield;\n while (true) {\n periodList.push(tick);\n if (periodList.totalPushed >= period) {\n high = periodList.periodLow;\n }\n tick = yield high;\n }\n })();\n this.generator.next();\n values.forEach((value, index) => {\n var result = this.generator.next(value);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return result.value;\n }\n }\n ;\n}\nLowest.calculate = lowest;\nexport function lowest(input) {\n Indicator.reverseInputs(input);\n var result = new Lowest(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport FixedSizedLinkedList from './FixedSizeLinkedList';\nexport class SumInput extends IndicatorInput {\n}\nexport class Sum extends Indicator {\n constructor(input) {\n super(input);\n var values = input.values;\n var period = input.period;\n this.result = [];\n var periodList = new FixedSizedLinkedList(period, false, false, true);\n this.generator = (function* () {\n var result;\n var tick;\n var high;\n tick = yield;\n while (true) {\n periodList.push(tick);\n if (periodList.totalPushed >= period) {\n high = periodList.periodSum;\n }\n tick = yield high;\n }\n })();\n this.generator.next();\n values.forEach((value, index) => {\n var result = this.generator.next(value);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return result.value;\n }\n }\n ;\n}\nSum.calculate = sum;\nexport function sum(input) {\n Indicator.reverseInputs(input);\n var result = new Sum(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { CandleList } from '../StockData';\nimport { atr } from '../directionalmovement/ATR';\n/**\n * Created by AAravindan on 5/4/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class RenkoInput extends IndicatorInput {\n}\nclass Renko extends Indicator {\n constructor(input) {\n super(input);\n var format = this.format;\n let useATR = input.useATR;\n let brickSize = input.brickSize || 0;\n if (useATR) {\n let atrResult = atr(Object.assign({}, input));\n brickSize = atrResult[atrResult.length - 1];\n }\n this.result = new CandleList();\n ;\n if (brickSize === 0) {\n console.error('Not enough data to calculate brickSize for renko when using ATR');\n return;\n }\n let lastOpen = 0;\n let lastHigh = 0;\n let lastLow = Infinity;\n let lastClose = 0;\n let lastVolume = 0;\n let lastTimestamp = 0;\n this.generator = (function* () {\n let candleData = yield;\n while (true) {\n //Calculating first bar\n if (lastOpen === 0) {\n lastOpen = candleData.close;\n lastHigh = candleData.high;\n lastLow = candleData.low;\n lastClose = candleData.close;\n lastVolume = candleData.volume;\n lastTimestamp = candleData.timestamp;\n candleData = yield;\n continue;\n }\n let absoluteMovementFromClose = Math.abs(candleData.close - lastClose);\n let absoluteMovementFromOpen = Math.abs(candleData.close - lastOpen);\n if ((absoluteMovementFromClose >= brickSize) && (absoluteMovementFromOpen >= brickSize)) {\n let reference = absoluteMovementFromClose > absoluteMovementFromOpen ? lastOpen : lastClose;\n let calculated = {\n open: reference,\n high: lastHigh > candleData.high ? lastHigh : candleData.high,\n low: lastLow < candleData.Low ? lastLow : candleData.low,\n close: reference > candleData.close ? (reference - brickSize) : (reference + brickSize),\n volume: lastVolume + candleData.volume,\n timestamp: candleData.timestamp\n };\n lastOpen = calculated.open;\n lastHigh = calculated.close;\n lastLow = calculated.close;\n lastClose = calculated.close;\n lastVolume = 0;\n candleData = yield calculated;\n }\n else {\n lastHigh = lastHigh > candleData.high ? lastHigh : candleData.high;\n lastLow = lastLow < candleData.Low ? lastLow : candleData.low;\n lastVolume = lastVolume + candleData.volume;\n lastTimestamp = candleData.timestamp;\n candleData = yield;\n }\n }\n })();\n this.generator.next();\n input.low.forEach((tick, index) => {\n var result = this.generator.next({\n open: input.open[index],\n high: input.high[index],\n low: input.low[index],\n close: input.close[index],\n volume: input.volume[index],\n timestamp: input.timestamp[index]\n });\n if (result.value) {\n this.result.open.push(result.value.open);\n this.result.high.push(result.value.high);\n this.result.low.push(result.value.low);\n this.result.close.push(result.value.close);\n this.result.volume.push(result.value.volume);\n this.result.timestamp.push(result.value.timestamp);\n }\n });\n }\n nextValue(price) {\n console.error('Cannot calculate next value on Renko, Every value has to be recomputed for every change, use calcualte method');\n return null;\n }\n ;\n}\nRenko.calculate = renko;\nexport function renko(input) {\n Indicator.reverseInputs(input);\n var result = new Renko(input).result;\n if (input.reversedInput) {\n result.open.reverse();\n result.high.reverse();\n result.low.reverse();\n result.close.reverse();\n result.volume.reverse();\n result.timestamp.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { CandleList } from '../StockData';\n/**\n * Created by AAravindan on 5/4/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class HeikinAshiInput extends IndicatorInput {\n}\nexport class HeikinAshi extends Indicator {\n constructor(input) {\n super(input);\n var format = this.format;\n this.result = new CandleList();\n let lastOpen = null;\n let lastHigh = 0;\n let lastLow = Infinity;\n let lastClose = 0;\n let lastVolume = 0;\n let lastTimestamp = 0;\n this.generator = (function* () {\n let candleData = yield;\n let calculated = null;\n while (true) {\n if (lastOpen === null) {\n lastOpen = (candleData.close + candleData.open) / 2;\n lastHigh = candleData.high;\n lastLow = candleData.low;\n lastClose = (candleData.close + candleData.open + candleData.high + candleData.low) / 4;\n lastVolume = (candleData.volume || 0);\n lastTimestamp = (candleData.timestamp || 0);\n calculated = {\n open: lastOpen,\n high: lastHigh,\n low: lastLow,\n close: lastClose,\n volume: candleData.volume || 0,\n timestamp: (candleData.timestamp || 0)\n };\n }\n else {\n let newClose = (candleData.close + candleData.open + candleData.high + candleData.low) / 4;\n let newOpen = (lastOpen + lastClose) / 2;\n let newHigh = Math.max(newOpen, newClose, candleData.high);\n let newLow = Math.min(candleData.low, newOpen, newClose);\n calculated = {\n close: newClose,\n open: newOpen,\n high: newHigh,\n low: newLow,\n volume: (candleData.volume || 0),\n timestamp: (candleData.timestamp || 0)\n };\n lastClose = newClose;\n lastOpen = newOpen;\n lastHigh = newHigh;\n lastLow = newLow;\n }\n candleData = yield calculated;\n }\n })();\n this.generator.next();\n input.low.forEach((tick, index) => {\n var result = this.generator.next({\n open: input.open[index],\n high: input.high[index],\n low: input.low[index],\n close: input.close[index],\n volume: input.volume ? input.volume[index] : input.volume,\n timestamp: input.timestamp ? input.timestamp[index] : input.timestamp\n });\n if (result.value) {\n this.result.open.push(result.value.open);\n this.result.high.push(result.value.high);\n this.result.low.push(result.value.low);\n this.result.close.push(result.value.close);\n this.result.volume.push(result.value.volume);\n this.result.timestamp.push(result.value.timestamp);\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n return result;\n }\n ;\n}\nHeikinAshi.calculate = heikinashi;\nexport function heikinashi(input) {\n Indicator.reverseInputs(input);\n var result = new HeikinAshi(input).result;\n if (input.reversedInput) {\n result.open.reverse();\n result.high.reverse();\n result.low.reverse();\n result.close.reverse();\n result.volume.reverse();\n result.timestamp.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import CandlestickFinder from './CandlestickFinder';\nexport default class MorningStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'MorningStar';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let isSmallBodyExists = ((firstdaysLow > seconddaysLow) &&\n (firstdaysLow > seconddaysHigh));\n let isThirdBullish = thirddaysOpen < thirddaysClose;\n let gapExists = ((seconddaysHigh < firstdaysLow) &&\n (seconddaysLow < firstdaysLow) &&\n (thirddaysOpen > seconddaysHigh) &&\n (seconddaysClose < thirddaysOpen));\n let doesCloseAboveFirstMidpoint = thirddaysClose > firstdaysMidpoint;\n return (isFirstBearish && isSmallBodyExists && gapExists && isThirdBullish && doesCloseAboveFirstMidpoint);\n }\n}\nexport function morningstar(data) {\n return new MorningStar().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishEngulfingPattern extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishEngulfingPattern';\n this.requiredCount = 2;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBullishEngulfing = ((firstdaysClose < firstdaysOpen) &&\n (firstdaysOpen > seconddaysOpen) &&\n (firstdaysClose > seconddaysOpen) &&\n (firstdaysOpen < seconddaysClose));\n return (isBullishEngulfing);\n }\n}\nexport function bullishengulfingpattern(data) {\n return new BullishEngulfingPattern().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishHarami extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = \"BullishHarami\";\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBullishHaramiPattern = ((firstdaysOpen > seconddaysOpen) &&\n (firstdaysClose < seconddaysOpen) &&\n (firstdaysClose < seconddaysClose) &&\n (firstdaysOpen > seconddaysLow) &&\n (firstdaysHigh > seconddaysHigh));\n return (isBullishHaramiPattern);\n }\n}\nexport function bullishharami(data) {\n return new BullishHarami().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishHaramiCross extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = 'BullishHaramiCross';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBullishHaramiCrossPattern = ((firstdaysOpen > seconddaysOpen) &&\n (firstdaysClose < seconddaysOpen) &&\n (firstdaysClose < seconddaysClose) &&\n (firstdaysOpen > seconddaysLow) &&\n (firstdaysHigh > seconddaysHigh));\n let isSecondDayDoji = this.approximateEqual(seconddaysOpen, seconddaysClose);\n return (isBullishHaramiCrossPattern && isSecondDayDoji);\n }\n}\nexport function bullishharamicross(data) {\n return new BullishHaramiCross().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class Doji extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'Doji';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isOpenEqualsClose = this.approximateEqual(daysOpen, daysClose);\n let isHighEqualsOpen = isOpenEqualsClose && this.approximateEqual(daysOpen, daysHigh);\n let isLowEqualsClose = isOpenEqualsClose && this.approximateEqual(daysClose, daysLow);\n return (isOpenEqualsClose && isHighEqualsOpen == isLowEqualsClose);\n }\n}\nexport function doji(data) {\n return new Doji().hasPattern(data);\n}\n","import Doji from './Doji';\nimport CandlestickFinder from './CandlestickFinder';\nexport default class MorningDojiStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'MorningDojiStar';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let dojiExists = new Doji().hasPattern({\n \"open\": [seconddaysOpen],\n \"close\": [seconddaysClose],\n \"high\": [seconddaysHigh],\n \"low\": [seconddaysLow]\n });\n let isThirdBullish = thirddaysOpen < thirddaysClose;\n let gapExists = ((seconddaysHigh < firstdaysLow) &&\n (seconddaysLow < firstdaysLow) &&\n (thirddaysOpen > seconddaysHigh) &&\n (seconddaysClose < thirddaysOpen));\n let doesCloseAboveFirstMidpoint = thirddaysClose > firstdaysMidpoint;\n return (isFirstBearish && dojiExists && isThirdBullish && gapExists &&\n doesCloseAboveFirstMidpoint);\n }\n}\nexport function morningdojistar(data) {\n return new MorningDojiStar().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class DownsideTasukiGap extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 3;\n this.name = 'DownsideTasukiGap';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let isSecondBearish = seconddaysClose < seconddaysOpen;\n let isThirdBullish = thirddaysClose > thirddaysOpen;\n let isFirstGapExists = seconddaysHigh < firstdaysLow;\n let isDownsideTasukiGap = ((seconddaysOpen > thirddaysOpen) &&\n (seconddaysClose < thirddaysOpen) &&\n (thirddaysClose > seconddaysOpen) &&\n (thirddaysClose < firstdaysClose));\n return (isFirstBearish && isSecondBearish && isThirdBullish && isFirstGapExists && isDownsideTasukiGap);\n }\n}\nexport function downsidetasukigap(data) {\n return new DownsideTasukiGap().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishMarubozu extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishMarubozu';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBullishMarbozu = this.approximateEqual(daysClose, daysHigh) &&\n this.approximateEqual(daysLow, daysOpen) &&\n daysOpen < daysClose &&\n daysOpen < daysHigh;\n return (isBullishMarbozu);\n }\n}\nexport function bullishmarubozu(data) {\n return new BullishMarubozu().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class PiercingLine extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = 'PiercingLine';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isDowntrend = seconddaysLow < firstdaysLow;\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let isSecondBullish = seconddaysClose > seconddaysOpen;\n let isPiercingLinePattern = ((firstdaysLow > seconddaysOpen) &&\n (seconddaysClose > firstdaysMidpoint));\n return (isDowntrend && isFirstBearish && isPiercingLinePattern && isSecondBullish);\n }\n}\nexport function piercingline(data) {\n return new PiercingLine().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class ThreeWhiteSoldiers extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'ThreeWhiteSoldiers';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let isUpTrend = seconddaysHigh > firstdaysHigh &&\n thirddaysHigh > seconddaysHigh;\n let isAllBullish = firstdaysOpen < firstdaysClose &&\n seconddaysOpen < seconddaysClose &&\n thirddaysOpen < thirddaysClose;\n let doesOpenWithinPreviousBody = firstdaysClose > seconddaysOpen &&\n seconddaysOpen < firstdaysHigh &&\n seconddaysHigh > thirddaysOpen &&\n thirddaysOpen < seconddaysClose;\n return (isUpTrend && isAllBullish && doesOpenWithinPreviousBody);\n }\n}\nexport function threewhitesoldiers(data) {\n return new ThreeWhiteSoldiers().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishHammerStick extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishHammerStick';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBullishHammer = daysClose > daysOpen;\n isBullishHammer = isBullishHammer && this.approximateEqual(daysClose, daysHigh);\n isBullishHammer = isBullishHammer && (daysClose - daysOpen) <= 2 * (daysOpen - daysLow);\n return isBullishHammer;\n }\n}\nexport function bullishhammerstick(data) {\n return new BullishHammerStick().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishInvertedHammerStick extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishInvertedHammerStick';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBullishInvertedHammer = daysClose > daysOpen;\n isBullishInvertedHammer = isBullishInvertedHammer && this.approximateEqual(daysOpen, daysLow);\n isBullishInvertedHammer = isBullishInvertedHammer && (daysClose - daysOpen) <= 2 * (daysHigh - daysClose);\n return isBullishInvertedHammer;\n }\n}\nexport function bullishinvertedhammerstick(data) {\n return new BullishInvertedHammerStick().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishHammerStick extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishHammerStick';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBearishHammer = daysOpen > daysClose;\n isBearishHammer = isBearishHammer && this.approximateEqual(daysOpen, daysHigh);\n isBearishHammer = isBearishHammer && (daysOpen - daysClose) <= 2 * (daysClose - daysLow);\n return isBearishHammer;\n }\n}\nexport function bearishhammerstick(data) {\n return new BearishHammerStick().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishInvertedHammerStick extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishInvertedHammerStick';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBearishInvertedHammer = daysOpen > daysClose;\n isBearishInvertedHammer = isBearishInvertedHammer && this.approximateEqual(daysClose, daysLow);\n isBearishInvertedHammer = isBearishInvertedHammer && (daysOpen - daysClose) <= 2 * (daysHigh - daysOpen);\n return isBearishInvertedHammer;\n }\n}\nexport function bearishinvertedhammerstick(data) {\n return new BearishInvertedHammerStick().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nimport { bearishhammerstick } from './BearishHammerStick';\nimport { bearishinvertedhammerstick } from './BearishInvertedHammerStick';\nimport { bullishhammerstick } from './BullishHammerStick';\nimport { bullishinvertedhammerstick } from './BullishInvertedHammerStick';\nexport default class HammerPattern extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'HammerPattern';\n this.requiredCount = 5;\n }\n logic(data) {\n let isPattern = this.downwardTrend(data);\n isPattern = isPattern && this.includesHammer(data);\n isPattern = isPattern && this.hasConfirmation(data);\n return isPattern;\n }\n downwardTrend(data, confirm = true) {\n let end = confirm ? 3 : 4;\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, end), period: end - 1 });\n let losses = averageloss({ values: data.close.slice(0, end), period: end - 1 });\n // Downward trend, so more losses than gains\n return losses > gains;\n }\n includesHammer(data, confirm = true) {\n let start = confirm ? 3 : 4;\n let end = confirm ? 4 : undefined;\n let possibleHammerData = {\n open: data.open.slice(start, end),\n close: data.close.slice(start, end),\n low: data.low.slice(start, end),\n high: data.high.slice(start, end),\n };\n let isPattern = bearishhammerstick(possibleHammerData);\n isPattern = isPattern || bearishinvertedhammerstick(possibleHammerData);\n isPattern = isPattern || bullishhammerstick(possibleHammerData);\n isPattern = isPattern || bullishinvertedhammerstick(possibleHammerData);\n return isPattern;\n }\n hasConfirmation(data) {\n let possibleHammer = {\n open: data.open[3],\n close: data.close[3],\n low: data.low[3],\n high: data.high[3],\n };\n let possibleConfirmation = {\n open: data.open[4],\n close: data.close[4],\n low: data.low[4],\n high: data.high[4],\n };\n // Confirmation candlestick is bullish\n let isPattern = possibleConfirmation.open < possibleConfirmation.close;\n return isPattern && possibleHammer.close < possibleConfirmation.close;\n }\n}\nexport function hammerpattern(data) {\n return new HammerPattern().hasPattern(data);\n}\n","import HammerPattern from './HammerPattern';\nexport default class HammerPatternUnconfirmed extends HammerPattern {\n constructor() {\n super();\n this.name = 'HammerPatternUnconfirmed';\n }\n logic(data) {\n let isPattern = this.downwardTrend(data, false);\n isPattern = isPattern && this.includesHammer(data, false);\n return isPattern;\n }\n}\nexport function hammerpatternunconfirmed(data) {\n return new HammerPatternUnconfirmed().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nexport default class TweezerBottom extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'TweezerBottom';\n this.requiredCount = 5;\n }\n logic(data) {\n return this.downwardTrend(data) && data.low[3] == data.low[4];\n }\n downwardTrend(data) {\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, 3), period: 2 });\n let losses = averageloss({ values: data.close.slice(0, 3), period: 2 });\n // Downward trend, so more losses than gains\n return losses > gains;\n }\n}\nexport function tweezerbottom(data) {\n return new TweezerBottom().hasPattern(data);\n}\n","import MorningStar from './MorningStar';\nimport BullishEngulfingPattern from './BullishEngulfingPattern';\nimport BullishHarami from './BullishHarami';\nimport BullishHaramiCross from './BullishHaramiCross';\nimport MorningDojiStar from './MorningDojiStar';\nimport DownsideTasukiGap from './DownsideTasukiGap';\nimport BullishMarubozu from './BullishMarubozu';\nimport PiercingLine from './PiercingLine';\nimport ThreeWhiteSoldiers from './ThreeWhiteSoldiers';\nimport BullishHammerStick from './BullishHammerStick';\nimport BullishInvertedHammerStick from './BullishInvertedHammerStick';\nimport HammerPattern from './HammerPattern';\nimport HammerPatternUnconfirmed from './HammerPatternUnconfirmed';\nimport CandlestickFinder from './CandlestickFinder';\nimport TweezerBottom from './TweezerBottom';\nlet bullishPatterns = [\n new BullishEngulfingPattern(),\n new DownsideTasukiGap(),\n new BullishHarami(),\n new BullishHaramiCross(),\n new MorningDojiStar(),\n new MorningStar(),\n new BullishMarubozu(),\n new PiercingLine(),\n new ThreeWhiteSoldiers(),\n new BullishHammerStick(),\n new BullishInvertedHammerStick(),\n new HammerPattern(),\n new HammerPatternUnconfirmed(),\n new TweezerBottom()\n];\nexport default class BullishPatterns extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'Bullish Candlesticks';\n }\n hasPattern(data) {\n return bullishPatterns.reduce(function (state, pattern) {\n let result = pattern.hasPattern(data);\n return state || result;\n }, false);\n }\n}\nexport function bullish(data) {\n return new BullishPatterns().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishEngulfingPattern extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishEngulfingPattern';\n this.requiredCount = 2;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBearishEngulfing = ((firstdaysClose > firstdaysOpen) &&\n (firstdaysOpen < seconddaysOpen) &&\n (firstdaysClose < seconddaysOpen) &&\n (firstdaysOpen > seconddaysClose));\n return (isBearishEngulfing);\n }\n}\nexport function bearishengulfingpattern(data) {\n return new BearishEngulfingPattern().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishHarami extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = 'BearishHarami';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBearishHaramiPattern = ((firstdaysOpen < seconddaysOpen) &&\n (firstdaysClose > seconddaysOpen) &&\n (firstdaysClose > seconddaysClose) &&\n (firstdaysOpen < seconddaysLow) &&\n (firstdaysHigh > seconddaysHigh));\n return (isBearishHaramiPattern);\n }\n}\nexport function bearishharami(data) {\n return new BearishHarami().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishHaramiCross extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = 'BearishHaramiCross';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBearishHaramiCrossPattern = ((firstdaysOpen < seconddaysOpen) &&\n (firstdaysClose > seconddaysOpen) &&\n (firstdaysClose > seconddaysClose) &&\n (firstdaysOpen < seconddaysLow) &&\n (firstdaysHigh > seconddaysHigh));\n let isSecondDayDoji = this.approximateEqual(seconddaysOpen, seconddaysClose);\n return (isBearishHaramiCrossPattern && isSecondDayDoji);\n }\n}\nexport function bearishharamicross(data) {\n return new BearishHaramiCross().hasPattern(data);\n}\n","import Doji from './Doji';\nimport CandlestickFinder from './CandlestickFinder';\nexport default class EveningDojiStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'EveningDojiStar';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isFirstBullish = firstdaysClose > firstdaysOpen;\n let dojiExists = new Doji().hasPattern({\n \"open\": [seconddaysOpen],\n \"close\": [seconddaysClose],\n \"high\": [seconddaysHigh],\n \"low\": [seconddaysLow]\n });\n let isThirdBearish = thirddaysOpen > thirddaysClose;\n let gapExists = ((seconddaysHigh > firstdaysHigh) &&\n (seconddaysLow > firstdaysHigh) &&\n (thirddaysOpen < seconddaysLow) &&\n (seconddaysClose > thirddaysOpen));\n let doesCloseBelowFirstMidpoint = thirddaysClose < firstdaysMidpoint;\n return (isFirstBullish && dojiExists && gapExists && isThirdBearish && doesCloseBelowFirstMidpoint);\n }\n}\nexport function eveningdojistar(data) {\n return new EveningDojiStar().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class EveningStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'EveningStar';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isFirstBullish = firstdaysClose > firstdaysOpen;\n let isSmallBodyExists = ((firstdaysHigh < seconddaysLow) &&\n (firstdaysHigh < seconddaysHigh));\n let isThirdBearish = thirddaysOpen > thirddaysClose;\n let gapExists = ((seconddaysHigh > firstdaysHigh) &&\n (seconddaysLow > firstdaysHigh) &&\n (thirddaysOpen < seconddaysLow) &&\n (seconddaysClose > thirddaysOpen));\n let doesCloseBelowFirstMidpoint = thirddaysClose < firstdaysMidpoint;\n return (isFirstBullish && isSmallBodyExists && gapExists && isThirdBearish && doesCloseBelowFirstMidpoint);\n }\n}\nexport function eveningstar(data) {\n return new EveningStar().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishMarubozu extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishMarubozu';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBearishMarbozu = this.approximateEqual(daysOpen, daysHigh) &&\n this.approximateEqual(daysLow, daysClose) &&\n daysOpen > daysClose &&\n daysOpen > daysLow;\n return (isBearishMarbozu);\n }\n}\nexport function bearishmarubozu(data) {\n return new BearishMarubozu().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class ThreeBlackCrows extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'ThreeBlackCrows';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let isDownTrend = firstdaysLow > seconddaysLow &&\n seconddaysLow > thirddaysLow;\n let isAllBearish = firstdaysOpen > firstdaysClose &&\n seconddaysOpen > seconddaysClose &&\n thirddaysOpen > thirddaysClose;\n let doesOpenWithinPreviousBody = firstdaysOpen > seconddaysOpen &&\n seconddaysOpen > firstdaysClose &&\n seconddaysOpen > thirddaysOpen &&\n thirddaysOpen > seconddaysClose;\n return (isDownTrend && isAllBearish && doesOpenWithinPreviousBody);\n }\n}\nexport function threeblackcrows(data) {\n return new ThreeBlackCrows().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nimport { bearishhammerstick } from './BearishHammerStick';\nimport { bullishhammerstick } from './BullishHammerStick';\nexport default class HangingMan extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'HangingMan';\n this.requiredCount = 5;\n }\n logic(data) {\n let isPattern = this.upwardTrend(data);\n isPattern = isPattern && this.includesHammer(data);\n isPattern = isPattern && this.hasConfirmation(data);\n return isPattern;\n }\n upwardTrend(data, confirm = true) {\n let end = confirm ? 3 : 4;\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, end), period: end - 1 });\n let losses = averageloss({ values: data.close.slice(0, end), period: end - 1 });\n // Upward trend, so more gains than losses\n return gains > losses;\n }\n includesHammer(data, confirm = true) {\n let start = confirm ? 3 : 4;\n let end = confirm ? 4 : undefined;\n let possibleHammerData = {\n open: data.open.slice(start, end),\n close: data.close.slice(start, end),\n low: data.low.slice(start, end),\n high: data.high.slice(start, end),\n };\n let isPattern = bearishhammerstick(possibleHammerData);\n isPattern = isPattern || bullishhammerstick(possibleHammerData);\n return isPattern;\n }\n hasConfirmation(data) {\n let possibleHammer = {\n open: data.open[3],\n close: data.close[3],\n low: data.low[3],\n high: data.high[3],\n };\n let possibleConfirmation = {\n open: data.open[4],\n close: data.close[4],\n low: data.low[4],\n high: data.high[4],\n };\n // Confirmation candlestick is bearish\n let isPattern = possibleConfirmation.open > possibleConfirmation.close;\n return isPattern && possibleHammer.close > possibleConfirmation.close;\n }\n}\nexport function hangingman(data) {\n return new HangingMan().hasPattern(data);\n}\n","import HangingMan from './HangingMan';\nexport default class HangingManUnconfirmed extends HangingMan {\n constructor() {\n super();\n this.name = 'HangingManUnconfirmed';\n }\n logic(data) {\n let isPattern = this.upwardTrend(data, false);\n isPattern = isPattern && this.includesHammer(data, false);\n return isPattern;\n }\n}\nexport function hangingmanunconfirmed(data) {\n return new HangingManUnconfirmed().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nimport { bearishinvertedhammerstick } from './BearishInvertedHammerStick';\nimport { bullishinvertedhammerstick } from './BullishInvertedHammerStick';\nexport default class ShootingStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'ShootingStar';\n this.requiredCount = 5;\n }\n logic(data) {\n let isPattern = this.upwardTrend(data);\n isPattern = isPattern && this.includesHammer(data);\n isPattern = isPattern && this.hasConfirmation(data);\n return isPattern;\n }\n upwardTrend(data, confirm = true) {\n let end = confirm ? 3 : 4;\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, end), period: end - 1 });\n let losses = averageloss({ values: data.close.slice(0, end), period: end - 1 });\n // Upward trend, so more gains than losses\n return gains > losses;\n }\n includesHammer(data, confirm = true) {\n let start = confirm ? 3 : 4;\n let end = confirm ? 4 : undefined;\n let possibleHammerData = {\n open: data.open.slice(start, end),\n close: data.close.slice(start, end),\n low: data.low.slice(start, end),\n high: data.high.slice(start, end),\n };\n let isPattern = bearishinvertedhammerstick(possibleHammerData);\n isPattern = isPattern || bullishinvertedhammerstick(possibleHammerData);\n return isPattern;\n }\n hasConfirmation(data) {\n let possibleHammer = {\n open: data.open[3],\n close: data.close[3],\n low: data.low[3],\n high: data.high[3],\n };\n let possibleConfirmation = {\n open: data.open[4],\n close: data.close[4],\n low: data.low[4],\n high: data.high[4],\n };\n // Confirmation candlestick is bearish\n let isPattern = possibleConfirmation.open > possibleConfirmation.close;\n return isPattern && possibleHammer.close > possibleConfirmation.close;\n }\n}\nexport function shootingstar(data) {\n return new ShootingStar().hasPattern(data);\n}\n","import ShootingStar from './ShootingStar';\nexport default class ShootingStarUnconfirmed extends ShootingStar {\n constructor() {\n super();\n this.name = 'ShootingStarUnconfirmed';\n }\n logic(data) {\n let isPattern = this.upwardTrend(data, false);\n isPattern = isPattern && this.includesHammer(data, false);\n return isPattern;\n }\n}\nexport function shootingstarunconfirmed(data) {\n return new ShootingStarUnconfirmed().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nexport default class TweezerTop extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'TweezerTop';\n this.requiredCount = 5;\n }\n logic(data) {\n return this.upwardTrend(data) && data.high[3] == data.high[4];\n }\n upwardTrend(data) {\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, 3), period: 2 });\n let losses = averageloss({ values: data.close.slice(0, 3), period: 2 });\n // Upward trend, so more gains than losses\n return gains > losses;\n }\n}\nexport function tweezertop(data) {\n return new TweezerTop().hasPattern(data);\n}\n","import BearishEngulfingPattern from './BearishEngulfingPattern';\nimport BearishHarami from './BearishHarami';\nimport BearishHaramiCross from './BearishHaramiCross';\nimport EveningDojiStar from './EveningDojiStar';\nimport EveningStar from './EveningStar';\nimport BearishMarubozu from './BearishMarubozu';\nimport ThreeBlackCrows from './ThreeBlackCrows';\nimport BearishHammerStick from './BearishHammerStick';\nimport BearishInvertedHammerStick from './BearishInvertedHammerStick';\nimport HangingMan from './HangingMan';\nimport HangingManUnconfirmed from './HangingManUnconfirmed';\nimport ShootingStar from './ShootingStar';\nimport ShootingStarUnconfirmed from './ShootingStarUnconfirmed';\nimport TweezerTop from './TweezerTop';\nimport CandlestickFinder from './CandlestickFinder';\nlet bearishPatterns = [\n new BearishEngulfingPattern(),\n new BearishHarami(),\n new BearishHaramiCross(),\n new EveningDojiStar(),\n new EveningStar(),\n new BearishMarubozu(),\n new ThreeBlackCrows(),\n new BearishHammerStick(),\n new BearishInvertedHammerStick(),\n new HangingMan(),\n new HangingManUnconfirmed(),\n new ShootingStar(),\n new ShootingStarUnconfirmed(),\n new TweezerTop()\n];\nexport default class BearishPatterns extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'Bearish Candlesticks';\n }\n hasPattern(data) {\n return bearishPatterns.reduce(function (state, pattern) {\n return state || pattern.hasPattern(data);\n }, false);\n }\n}\nexport function bearish(data) {\n return new BearishPatterns().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport Doji from './Doji';\nexport default class AbandonedBaby extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'AbandonedBaby';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let dojiExists = new Doji().hasPattern({\n \"open\": [seconddaysOpen],\n \"close\": [seconddaysClose],\n \"high\": [seconddaysHigh],\n \"low\": [seconddaysLow]\n });\n let gapExists = ((seconddaysHigh < firstdaysLow) &&\n (thirddaysLow > seconddaysHigh) &&\n (thirddaysClose > thirddaysOpen));\n let isThirdBullish = (thirddaysHigh < firstdaysOpen);\n return (isFirstBearish && dojiExists && gapExists && isThirdBullish);\n }\n}\nexport function abandonedbaby(data) {\n return new AbandonedBaby().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class DarkCloudCover extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'DarkCloudCover';\n this.requiredCount = 2;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let firstdayMidpoint = ((firstdaysClose + firstdaysOpen) / 2);\n let isFirstBullish = firstdaysClose > firstdaysOpen;\n let isSecondBearish = seconddaysClose < seconddaysOpen;\n let isDarkCloudPattern = ((seconddaysOpen > firstdaysHigh) &&\n (seconddaysClose < firstdayMidpoint) &&\n (seconddaysClose > firstdaysOpen));\n return (isFirstBullish && isSecondBearish && isDarkCloudPattern);\n }\n}\nexport function darkcloudcover(data) {\n return new DarkCloudCover().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class DragonFlyDoji extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 1;\n this.name = 'DragonFlyDoji';\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isOpenEqualsClose = this.approximateEqual(daysOpen, daysClose);\n let isHighEqualsOpen = isOpenEqualsClose && this.approximateEqual(daysOpen, daysHigh);\n let isLowEqualsClose = isOpenEqualsClose && this.approximateEqual(daysClose, daysLow);\n return (isOpenEqualsClose && isHighEqualsOpen && !isLowEqualsClose);\n }\n}\nexport function dragonflydoji(data) {\n return new DragonFlyDoji().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class GraveStoneDoji extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 1;\n this.name = 'GraveStoneDoji';\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isOpenEqualsClose = this.approximateEqual(daysOpen, daysClose);\n let isHighEqualsOpen = isOpenEqualsClose && this.approximateEqual(daysOpen, daysHigh);\n let isLowEqualsClose = isOpenEqualsClose && this.approximateEqual(daysClose, daysLow);\n return (isOpenEqualsClose && isLowEqualsClose && !isHighEqualsOpen);\n }\n}\nexport function gravestonedoji(data) {\n return new GraveStoneDoji().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishSpinningTop extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishSpinningTop';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let bodyLength = Math.abs(daysClose - daysOpen);\n let upperShadowLength = Math.abs(daysHigh - daysClose);\n let lowerShadowLength = Math.abs(daysOpen - daysLow);\n let isBullishSpinningTop = bodyLength < upperShadowLength &&\n bodyLength < lowerShadowLength;\n return isBullishSpinningTop;\n }\n}\nexport function bullishspinningtop(data) {\n return new BullishSpinningTop().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishSpinningTop extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishSpinningTop';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let bodyLength = Math.abs(daysClose - daysOpen);\n let upperShadowLength = Math.abs(daysHigh - daysOpen);\n let lowerShadowLength = Math.abs(daysHigh - daysLow);\n let isBearishSpinningTop = bodyLength < upperShadowLength &&\n bodyLength < lowerShadowLength;\n return isBearishSpinningTop;\n }\n}\nexport function bearishspinningtop(data) {\n return new BearishSpinningTop().hasPattern(data);\n}\n","/**\n * Calcaultes the fibonacci retracements for given start and end points\n *\n * If calculating for up trend start should be low and end should be high and vice versa\n *\n * returns an array of retracements level containing [0 , 23.6, 38.2, 50, 61.8, 78.6, 100, 127.2, 161.8, 261.8, 423.6]\n *\n * @export\n * @param {number} start\n * @param {number} end\n * @returns {number[]}\n */\nexport function fibonacciretracement(start, end) {\n let levels = [0, 23.6, 38.2, 50, 61.8, 78.6, 100, 127.2, 161.8, 261.8, 423.6];\n let retracements;\n if (start < end) {\n retracements = levels.map(function (level) {\n let calculated = end - Math.abs(start - end) * (level) / 100;\n return calculated > 0 ? calculated : 0;\n });\n }\n else {\n retracements = levels.map(function (level) {\n let calculated = end + Math.abs(start - end) * (level) / 100;\n return calculated > 0 ? calculated : 0;\n });\n }\n return retracements;\n}\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n","var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n","var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n","/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n","var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n","var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n","var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","var baseEach = require('./_baseEach'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nmodule.exports = baseMap;\n","var arrayMap = require('./_arrayMap'),\n baseIteratee = require('./_baseIteratee'),\n baseMap = require('./_baseMap'),\n isArray = require('./isArray');\n\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\nfunction map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, baseIteratee(iteratee, 3));\n}\n\nmodule.exports = map;\n","/**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\nfunction arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n}\n\nmodule.exports = arrayEvery;\n","var baseEach = require('./_baseEach');\n\n/**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\nfunction baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n}\n\nmodule.exports = baseEvery;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","var arrayEvery = require('./_arrayEvery'),\n baseEvery = require('./_baseEvery'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\nfunction every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, baseIteratee(predicate, 3));\n}\n\nmodule.exports = every;\n","var baseIteratee = require('./_baseIteratee'),\n isArrayLike = require('./isArrayLike'),\n keys = require('./keys');\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\n\nmodule.exports = createFind;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","var isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","var baseGet = require('./_baseGet'),\n baseSet = require('./_baseSet'),\n castPath = require('./_castPath');\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nmodule.exports = basePickBy;\n","var basePickBy = require('./_basePickBy'),\n hasIn = require('./hasIn');\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nmodule.exports = basePick;\n","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n","'use strict';\n\nvar bind = require('./helpers/bind');\nvar isBuffer = require('is-buffer');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n }\n\n if (!utils.isArray(val)) {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js\n\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction E() {\n this.message = 'String contains an invalid character';\n}\nE.prototype = new Error;\nE.prototype.code = 5;\nE.prototype.name = 'InvalidCharacterError';\n\nfunction btoa(input) {\n var str = String(input);\n var output = '';\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars;\n // if the next str index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n str.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n ) {\n charCode = str.charCodeAt(idx += 3 / 4);\n if (charCode > 0xFF) {\n throw new E();\n }\n block = block << 8 | charCode;\n }\n return output;\n}\n\nmodule.exports = btoa;\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar isAbsoluteURL = require('./../helpers/isAbsoluteURL');\nvar combineURLs = require('./../helpers/combineURLs');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers || {}\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\nvar defaults = require('./../defaults');\nvar utils = require('./../utils');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = utils.merge({\n url: arguments[0]\n }, arguments[1]);\n }\n\n config = utils.merge(defaults, this.defaults, { method: 'get' }, config);\n config.method = config.method.toLowerCase();\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nfunction baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n}\n\nmodule.exports = baseRange;\n","var baseRange = require('./_baseRange'),\n isIterateeCall = require('./_isIterateeCall'),\n toFinite = require('./toFinite');\n\n/**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\nfunction createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n}\n\nmodule.exports = createRange;\n","\"use strict\"\n\nfunction iota(n) {\n var result = new Array(n)\n for(var i=0; iMath.abs(this.stride[1]))?[1,0]:[0,1]}})\")\n } else if(dimension === 3) {\n code.push(\n\"var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);\\\nif(s0>s1){\\\nif(s1>s2){\\\nreturn [2,1,0];\\\n}else if(s0>s2){\\\nreturn [1,2,0];\\\n}else{\\\nreturn [1,0,2];\\\n}\\\n}else if(s0>s2){\\\nreturn [2,0,1];\\\n}else if(s2>s1){\\\nreturn [0,1,2];\\\n}else{\\\nreturn [0,2,1];\\\n}}})\")\n }\n } else {\n code.push(\"ORDER})\")\n }\n }\n\n //view.set(i0, ..., v):\n code.push(\n\"proto.set=function \"+className+\"_set(\"+args.join(\",\")+\",v){\")\n if(useGetters) {\n code.push(\"return this.data.set(\"+index_str+\",v)}\")\n } else {\n code.push(\"return this.data[\"+index_str+\"]=v}\")\n }\n\n //view.get(i0, ...):\n code.push(\"proto.get=function \"+className+\"_get(\"+args.join(\",\")+\"){\")\n if(useGetters) {\n code.push(\"return this.data.get(\"+index_str+\")}\")\n } else {\n code.push(\"return this.data[\"+index_str+\"]}\")\n }\n\n //view.index:\n code.push(\n \"proto.index=function \"+className+\"_index(\", args.join(), \"){return \"+index_str+\"}\")\n\n //view.hi():\n code.push(\"proto.hi=function \"+className+\"_hi(\"+args.join(\",\")+\"){return new \"+className+\"(this.data,\"+\n indices.map(function(i) {\n return [\"(typeof i\",i,\"!=='number'||i\",i,\"<0)?this.shape[\", i, \"]:i\", i,\"|0\"].join(\"\")\n }).join(\",\")+\",\"+\n indices.map(function(i) {\n return \"this.stride[\"+i + \"]\"\n }).join(\",\")+\",this.offset)}\")\n\n //view.lo():\n var a_vars = indices.map(function(i) { return \"a\"+i+\"=this.shape[\"+i+\"]\" })\n var c_vars = indices.map(function(i) { return \"c\"+i+\"=this.stride[\"+i+\"]\" })\n code.push(\"proto.lo=function \"+className+\"_lo(\"+args.join(\",\")+\"){var b=this.offset,d=0,\"+a_vars.join(\",\")+\",\"+c_vars.join(\",\"))\n for(var i=0; i=0){\\\nd=i\"+i+\"|0;\\\nb+=c\"+i+\"*d;\\\na\"+i+\"-=d}\")\n }\n code.push(\"return new \"+className+\"(this.data,\"+\n indices.map(function(i) {\n return \"a\"+i\n }).join(\",\")+\",\"+\n indices.map(function(i) {\n return \"c\"+i\n }).join(\",\")+\",b)}\")\n\n //view.step():\n code.push(\"proto.step=function \"+className+\"_step(\"+args.join(\",\")+\"){var \"+\n indices.map(function(i) {\n return \"a\"+i+\"=this.shape[\"+i+\"]\"\n }).join(\",\")+\",\"+\n indices.map(function(i) {\n return \"b\"+i+\"=this.stride[\"+i+\"]\"\n }).join(\",\")+\",c=this.offset,d=0,ceil=Math.ceil\")\n for(var i=0; i=0){c=(c+this.stride[\"+i+\"]*i\"+i+\")|0}else{a.push(this.shape[\"+i+\"]);b.push(this.stride[\"+i+\"])}\")\n }\n code.push(\"var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}\")\n\n //Add return statement\n code.push(\"return function construct_\"+className+\"(data,shape,stride,offset){return new \"+className+\"(data,\"+\n indices.map(function(i) {\n return \"shape[\"+i+\"]\"\n }).join(\",\")+\",\"+\n indices.map(function(i) {\n return \"stride[\"+i+\"]\"\n }).join(\",\")+\",offset)}\")\n\n //Compile procedure\n var procedure = new Function(\"CTOR_LIST\", \"ORDER\", code.join(\"\\n\"))\n return procedure(CACHED_CONSTRUCTORS[dtype], order)\n}\n\nfunction arrayDType(data) {\n if(isBuffer(data)) {\n return \"buffer\"\n }\n if(hasTypedArrays) {\n switch(Object.prototype.toString.call(data)) {\n case \"[object Float64Array]\":\n return \"float64\"\n case \"[object Float32Array]\":\n return \"float32\"\n case \"[object Int8Array]\":\n return \"int8\"\n case \"[object Int16Array]\":\n return \"int16\"\n case \"[object Int32Array]\":\n return \"int32\"\n case \"[object Uint8Array]\":\n return \"uint8\"\n case \"[object Uint16Array]\":\n return \"uint16\"\n case \"[object Uint32Array]\":\n return \"uint32\"\n case \"[object Uint8ClampedArray]\":\n return \"uint8_clamped\"\n }\n }\n if(Array.isArray(data)) {\n return \"array\"\n }\n return \"generic\"\n}\n\nvar CACHED_CONSTRUCTORS = {\n \"float32\":[],\n \"float64\":[],\n \"int8\":[],\n \"int16\":[],\n \"int32\":[],\n \"uint8\":[],\n \"uint16\":[],\n \"uint32\":[],\n \"array\":[],\n \"uint8_clamped\":[],\n \"buffer\":[],\n \"generic\":[]\n}\n\n;(function() {\n for(var id in CACHED_CONSTRUCTORS) {\n CACHED_CONSTRUCTORS[id].push(compileConstructor(id, -1))\n }\n});\n\nfunction wrappedNDArrayCtor(data, shape, stride, offset) {\n if(data === undefined) {\n var ctor = CACHED_CONSTRUCTORS.array[0]\n return ctor([])\n } else if(typeof data === \"number\") {\n data = [data]\n }\n if(shape === undefined) {\n shape = [ data.length ]\n }\n var d = shape.length\n if(stride === undefined) {\n stride = new Array(d)\n for(var i=d-1, sz=1; i>=0; --i) {\n stride[i] = sz\n sz *= shape[i]\n }\n }\n if(offset === undefined) {\n offset = 0\n for(var i=0; i0\n , code = []\n , vars = []\n , idx=0, pidx=0, i, j\n for(i=0; i 0) {\n code.push(\"var \" + vars.join(\",\"))\n } \n //Scan loop\n for(i=dimension-1; i>=0; --i) { // Start at largest stride and work your way inwards\n idx = order[i]\n code.push([\"for(i\",i,\"=0;i\",i,\" 0) {\n code.push([\"index[\",pidx,\"]-=s\",pidx].join(\"\"))\n }\n code.push([\"++index[\",idx,\"]\"].join(\"\"))\n }\n code.push(\"}\")\n }\n return code.join(\"\\n\")\n}\n\n// Generate \"outer\" loops that loop over blocks of data, applying \"inner\" loops to the blocks by manipulating the local variables in such a way that the inner loop only \"sees\" the current block.\n// TODO: If this is used, then the previous declaration (done by generateCwiseOp) of s* is essentially unnecessary.\n// I believe the s* are not used elsewhere (in particular, I don't think they're used in the pre/post parts and \"shape\" is defined independently), so it would be possible to make defining the s* dependent on what loop method is being used.\nfunction outerFill(matched, order, proc, body) {\n var dimension = order.length\n , nargs = proc.arrayArgs.length\n , blockSize = proc.blockSize\n , has_index = proc.indexArgs.length > 0\n , code = []\n for(var i=0; i0;){\"].join(\"\")) // Iterate back to front\n code.push([\"if(j\",i,\"<\",blockSize,\"){\"].join(\"\")) // Either decrease j by blockSize (s = blockSize), or set it to zero (after setting s = j).\n code.push([\"s\",order[i],\"=j\",i].join(\"\"))\n code.push([\"j\",i,\"=0\"].join(\"\"))\n code.push([\"}else{s\",order[i],\"=\",blockSize].join(\"\"))\n code.push([\"j\",i,\"-=\",blockSize,\"}\"].join(\"\"))\n if(has_index) {\n code.push([\"index[\",order[i],\"]=j\",i].join(\"\"))\n }\n }\n for(var i=0; i 0) {\n allEqual = allEqual && summary[i] === summary[i-1]\n }\n }\n if(allEqual) {\n return summary[0]\n }\n return summary.join(\"\")\n}\n\n//Generates a cwise operator\nfunction generateCWiseOp(proc, typesig) {\n\n //Compute dimension\n // Arrays get put first in typesig, and there are two entries per array (dtype and order), so this gets the number of dimensions in the first array arg.\n var dimension = (typesig[1].length - Math.abs(proc.arrayBlockIndices[0]))|0\n var orders = new Array(proc.arrayArgs.length)\n var dtypes = new Array(proc.arrayArgs.length)\n for(var i=0; i 0) {\n vars.push(\"shape=SS.slice(0)\") // Makes the shape over which we iterate available to the user defined functions (so you can use width/height for example)\n }\n if(proc.indexArgs.length > 0) {\n // Prepare an array to keep track of the (logical) indices, initialized to dimension zeroes.\n var zeros = new Array(dimension)\n for(var i=0; i 0) {\n code.push(\"var \" + vars.join(\",\"))\n }\n for(var i=0; i 3) {\n code.push(processBlock(proc.pre, proc, dtypes))\n }\n\n //Process body\n var body = processBlock(proc.body, proc, dtypes)\n var matched = countMatches(loopOrders)\n if(matched < dimension) {\n code.push(outerFill(matched, loopOrders[0], proc, body)) // TODO: Rather than passing loopOrders[0], it might be interesting to look at passing an order that represents the majority of the arguments for example.\n } else {\n code.push(innerFill(loopOrders[0], proc, body))\n }\n\n //Inline epilog\n if(proc.post.body.length > 3) {\n code.push(processBlock(proc.post, proc, dtypes))\n }\n \n if(proc.debug) {\n console.log(\"-----Generated cwise routine for \", typesig, \":\\n\" + code.join(\"\\n\") + \"\\n----------\")\n }\n \n var loopName = [(proc.funcName||\"unnamed\"), \"_cwise_loop_\", orders[0].join(\"s\"),\"m\",matched,typeSummary(dtypes)].join(\"\")\n var f = new Function([\"function \",loopName,\"(\", arglist.join(\",\"),\"){\", code.join(\"\\n\"),\"} return \", loopName].join(\"\"))\n return f()\n}\nmodule.exports = generateCWiseOp\n","\"use strict\"\n\n// The function below is called when constructing a cwise function object, and does the following:\n// A function object is constructed which accepts as argument a compilation function and returns another function.\n// It is this other function that is eventually returned by createThunk, and this function is the one that actually\n// checks whether a certain pattern of arguments has already been used before and compiles new loops as needed.\n// The compilation passed to the first function object is used for compiling new functions.\n// Once this function object is created, it is called with compile as argument, where the first argument of compile\n// is bound to \"proc\" (essentially containing a preprocessed version of the user arguments to cwise).\n// So createThunk roughly works like this:\n// function createThunk(proc) {\n// var thunk = function(compileBound) {\n// var CACHED = {}\n// return function(arrays and scalars) {\n// if (dtype and order of arrays in CACHED) {\n// var func = CACHED[dtype and order of arrays]\n// } else {\n// var func = CACHED[dtype and order of arrays] = compileBound(dtype and order of arrays)\n// }\n// return func(arrays and scalars)\n// }\n// }\n// return thunk(compile.bind1(proc))\n// }\n\nvar compile = require(\"./compile.js\")\n\nfunction createThunk(proc) {\n var code = [\"'use strict'\", \"var CACHED={}\"]\n var vars = []\n var thunkName = proc.funcName + \"_cwise_thunk\"\n \n //Build thunk\n code.push([\"return function \", thunkName, \"(\", proc.shimArgs.join(\",\"), \"){\"].join(\"\"))\n var typesig = []\n var string_typesig = []\n var proc_args = [[\"array\",proc.arrayArgs[0],\".shape.slice(\", // Slice shape so that we only retain the shape over which we iterate (which gets passed to the cwise operator as SS).\n Math.max(0,proc.arrayBlockIndices[0]),proc.arrayBlockIndices[0]<0?(\",\"+proc.arrayBlockIndices[0]+\")\"):\")\"].join(\"\")]\n var shapeLengthConditions = [], shapeConditions = []\n // Process array arguments\n for(var i=0; i0) { // Gather conditions to check for shape equality (ignoring block indices)\n shapeLengthConditions.push(\"array\" + proc.arrayArgs[0] + \".shape.length===array\" + j + \".shape.length+\" + (Math.abs(proc.arrayBlockIndices[0])-Math.abs(proc.arrayBlockIndices[i])))\n shapeConditions.push(\"array\" + proc.arrayArgs[0] + \".shape[shapeIndex+\" + Math.max(0,proc.arrayBlockIndices[0]) + \"]===array\" + j + \".shape[shapeIndex+\" + Math.max(0,proc.arrayBlockIndices[i]) + \"]\")\n }\n }\n // Check for shape equality\n if (proc.arrayArgs.length > 1) {\n code.push(\"if (!(\" + shapeLengthConditions.join(\" && \") + \")) throw new Error('cwise: Arrays do not all have the same dimensionality!')\")\n code.push(\"for(var shapeIndex=array\" + proc.arrayArgs[0] + \".shape.length-\" + Math.abs(proc.arrayBlockIndices[0]) + \"; shapeIndex-->0;) {\")\n code.push(\"if (!(\" + shapeConditions.join(\" && \") + \")) throw new Error('cwise: Arrays do not all have the same shape!')\")\n code.push(\"}\")\n }\n // Process scalar arguments\n for(var i=0; i0) {\n throw new Error(\"cwise: pre() block may not reference array args\")\n }\n if(i < proc.post.args.length && proc.post.args[i].count>0) {\n throw new Error(\"cwise: post() block may not reference array args\")\n }\n } else if(arg_type === \"scalar\") {\n proc.scalarArgs.push(i)\n proc.shimArgs.push(\"scalar\" + i)\n } else if(arg_type === \"index\") {\n proc.indexArgs.push(i)\n if(i < proc.pre.args.length && proc.pre.args[i].count > 0) {\n throw new Error(\"cwise: pre() block may not reference array index\")\n }\n if(i < proc.body.args.length && proc.body.args[i].lvalue) {\n throw new Error(\"cwise: body() block may not write to array index\")\n }\n if(i < proc.post.args.length && proc.post.args[i].count > 0) {\n throw new Error(\"cwise: post() block may not reference array index\")\n }\n } else if(arg_type === \"shape\") {\n proc.shapeArgs.push(i)\n if(i < proc.pre.args.length && proc.pre.args[i].lvalue) {\n throw new Error(\"cwise: pre() block may not write to array shape\")\n }\n if(i < proc.body.args.length && proc.body.args[i].lvalue) {\n throw new Error(\"cwise: body() block may not write to array shape\")\n }\n if(i < proc.post.args.length && proc.post.args[i].lvalue) {\n throw new Error(\"cwise: post() block may not write to array shape\")\n }\n } else if(typeof arg_type === \"object\" && arg_type.offset) {\n proc.argTypes[i] = \"offset\"\n proc.offsetArgs.push({ array: arg_type.array, offset:arg_type.offset })\n proc.offsetArgIndex.push(i)\n } else {\n throw new Error(\"cwise: Unknown argument type \" + proc_args[i])\n }\n }\n \n //Make sure at least one array argument was specified\n if(proc.arrayArgs.length <= 0) {\n throw new Error(\"cwise: No array arguments specified\")\n }\n \n //Make sure arguments are correct\n if(proc.pre.args.length > proc_args.length) {\n throw new Error(\"cwise: Too many arguments in pre() block\")\n }\n if(proc.body.args.length > proc_args.length) {\n throw new Error(\"cwise: Too many arguments in body() block\")\n }\n if(proc.post.args.length > proc_args.length) {\n throw new Error(\"cwise: Too many arguments in post() block\")\n }\n\n //Check debug flag\n proc.debug = !!user_args.printCode || !!user_args.debug\n \n //Retrieve name\n proc.funcName = user_args.funcName || \"cwise\"\n \n //Read in block size\n proc.blockSize = user_args.blockSize || 64\n\n return createThunk(proc)\n}\n\nmodule.exports = compileCwise\n","'use strict'\n\nvar ndarray = require('ndarray')\n\nmodule.exports = squeeze\n\nfunction squeeze (a, axes) {\n var i\n var shape = []\n var stride = []\n\n if (axes !== undefined && !Array.isArray(axes)) {\n throw new Error('axes must be an Array list of dimensions to squeeze')\n }\n\n for (i = 0; i < a.shape.length; i++) {\n if (a.shape[i] !== 1 || (axes !== undefined && axes.indexOf(i) === -1)) {\n shape.push(a.shape[i])\n stride.push(a.stride[i])\n }\n }\n\n return ndarray(a.data, shape, stride, a.offset)\n}\n","\"use strict\"\n\nvar esprima = require(\"esprima\")\nvar uniq = require(\"uniq\")\n\nvar PREFIX_COUNTER = 0\n\nfunction CompiledArgument(name, lvalue, rvalue) {\n this.name = name\n this.lvalue = lvalue\n this.rvalue = rvalue\n this.count = 0\n}\n\nfunction CompiledRoutine(body, args, thisVars, localVars) {\n this.body = body\n this.args = args\n this.thisVars = thisVars\n this.localVars = localVars\n}\n\nfunction isGlobal(identifier) {\n if(identifier === \"eval\") {\n throw new Error(\"cwise-parser: eval() not allowed\")\n }\n if(typeof window !== \"undefined\") {\n return identifier in window\n } else if(typeof global !== \"undefined\") {\n return identifier in global\n } else if(typeof self !== \"undefined\") {\n return identifier in self\n } else {\n return false\n }\n}\n\nfunction getArgNames(ast) {\n var params = ast.body[0].expression.callee.params\n var names = new Array(params.length)\n for(var i=0; i= 0) {\n var carg = compiledArgs[argNo]\n var usage = getUsage(node)\n if(usage & LVALUE) {\n carg.lvalue = true\n }\n if(usage & RVALUE) {\n carg.rvalue = true\n }\n ++carg.count\n rewrite(node, carg.name)\n } else if(isGlobal(name)) {\n //Don't rewrite globals\n } else {\n rewrite(node, createLocal(name))\n }\n } else if(node.type === \"Literal\") {\n if(typeof node.value === \"string\") {\n rewrite(node, escapeString(node.value))\n }\n } else if(node.type === \"WithStatement\") {\n throw new Error(\"cwise-parser: with() statements not allowed\")\n } else {\n //Visit all children\n var keys = Object.keys(node)\n for(var i=0, n=keys.length; i length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nmodule.exports = baseSlice;\n","var baseSlice = require('./_baseSlice'),\n toInteger = require('./toInteger');\n\n/**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\nfunction take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n}\n\nmodule.exports = take;\n","/**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\nfunction baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n}\n\nmodule.exports = baseSum;\n","var baseSum = require('./_baseSum'),\n identity = require('./identity');\n\n/**\n * Computes the sum of the values in `array`.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the sum.\n * @example\n *\n * _.sum([4, 2, 8, 6]);\n * // => 20\n */\nfunction sum(array) {\n return (array && array.length)\n ? baseSum(array, identity)\n : 0;\n}\n\nmodule.exports = sum;\n","\"use strict\"\n\nmodule.exports = generateMatrixProduct\n\nvar BLOCK_SIZE = 32\n\nfunction unpackOrder(order) {\n return order === \"r\" ? [1,0] : [0,1]\n}\n\nfunction unpackShape(name, type) {\n if(type[1] === \"native\") {\n return [\n name, \"d0=\", name, \".length,\",\n name, \"d1=\", name, \"[0].length,\"\n ].join(\"\")\n } else {\n return [\n name, \"d0=\", name, \".shape[0],\",\n name, \"d1=\", name, \".shape[1],\",\n name, \"s0=\", name, \".stride[0],\",\n name, \"s1=\", name, \".stride[1],\",\n name, \"o=\", name, \".offset,\",\n name, \"d=\", name, \".data,\"\n ].join(\"\")\n }\n}\n\nfunction start(order, name, type, i, j, w) {\n var code = []\n if(type[1] === \"native\") {\n if(order[0]) {\n if(i) {\n code.push(\"var \", name, \"p=\", name, \"[\", i, \"];\")\n } else {\n code.push(\"var \", name, \"p=\", name, \"[0];\")\n }\n }\n } else {\n if(i && j) {\n if(w) {\n code.push(\n \"var \", name, \"t0=\", name, \"s\", order[0], \",\",\n name, \"t1=\", name, \"s\", order[1], \"-\", name, \"s\", order[0], \"*\", w, \",\",\n name, \"p=\", name, \"o+\", i, \"*\", name, \"s0+\", j, \"*\", name, \"s1;\")\n } else {\n code.push(\n \"var \", name, \"t0=\", name, \"s\", order[0], \",\",\n name, \"p=\", name, \"o+\", i, \"*\", name, \"s0+\", j, \"*\", name, \"s1;\")\n }\n } else if(i) {\n code.push(\n \"var \", name, \"t0=\", name, \"s\", order[0], \",\",\n name, \"p=\", name, \"o+\", i, \"*\", name, \"s0;\")\n } else if(j) {\n code.push(\n \"var \", name, \"t0=\", name, \"s\", order[0], \",\",\n name, \"p=\", name, \"o+\", j, \"*\", name, \"s1;\")\n } else {\n code.push(\n \"var \", name, \"t0=\", name, \"s\", order[0], \",\",\n name, \"t1=\", name, \"s\", order[1], \"-\", name, \"s\", order[0], \"*\", name, \"d\", order[0], \",\",\n name, \"p=\", name, \"o;\")\n }\n }\n return code\n}\n\nfunction walk(order, name, type, d, i) {\n var code = []\n if(type[1] === \"native\") {\n if(order[0] && d === 1) {\n code.push(name, \"p=\", name, \"[\", i, \"+1]\")\n }\n } else {\n code.push(name, \"p+=\", name, \"t\", d, \";\")\n }\n return code\n}\n\nfunction write(order, name, type, i, j, w) {\n var code = []\n if(type[1] === \"native\") {\n if(order[0]) {\n code.push(name, \"p[\", j, \"]=\", w, \";\")\n } else {\n code.push(name, \"[\", i, \"][\", j, \"]=\", w, \";\")\n }\n } else if(type[1] === \"generic\") {\n code.push(name, \"d.set(\", name, \"p,\", w, \");\")\n } else {\n code.push(name, \"d[\", name, \"p]=\", w, \";\")\n }\n return code\n}\n\nfunction read(order, name, type, i, j) {\n var code = []\n if(type[1] === \"native\") {\n if(order[0]) {\n code.push(name, \"p[\", j, \"]\")\n } else {\n code.push(name, \"[\", i, \"][\", j, \"]\")\n }\n } else if(type[1] === \"generic\") {\n code.push(name, \"d.get(\", name, \"p)\")\n } else {\n code.push(name, \"d[\", name, \"p]\")\n }\n return code.join(\"\")\n}\n\nfunction generateRowColumnLoop(oType, aType, bType, useAlpha, useBeta) {\n var code = []\n var oOrd = oType[0] === \"r\" ? [1,0] : [0,1], aOrd = [1, 0], bOrd = [0, 1]\n var symbols = [\"i\", \"j\"]\n\n code.push.apply(code, start(oOrd, \"o\", oType))\n \n if(oOrd[1]) {\n code.push(\"for(j=0;j0;){\",\n \"var w\", i, \"=\", BLOCK_SIZE, \";\",\n \"if(i\", i, \"<\", BLOCK_SIZE, \"){\",\n \"w\", i, \"=i\", i, \";\",\n \"i\", i, \"=0;\",\n \"}else{\",\n \"i\", i, \"-=\", BLOCK_SIZE, \";\",\n \"}\")\n }\n\n code.push.apply(code, start(oOrd, \"o\", oType, \"i0\", \"i1\", \"w1\"))\n \n code.push(\"for(i=0;i= 0; i--) {\n y.set(i, y.get(i) * beta + alpha * dot(A.pick(i, null), x));\n }\n return true;\n}\n","'use strict';\n\nmodule.exports = gbmv;\n\nfunction gbmv (A, kl, ku, x, y, alpha, beta) {\n var r = 0;\n var i = 0;\n var c = 0;\n var sum = 0;\n var idx = 0;\n var m = A.shape[0];\n var n = A.shape[1];\n var Kl = Math.min(kl, m - 1);\n var Ku = Math.min(ku, n - 1);\n\n var alpha0 = alpha === undefined ? 1 : alpha;\n var beta0 = beta === undefined ? 0 : beta;\n\n while (r <= Kl) {\n sum = 0;\n var max = Math.min(r + Ku, n - 1);\n for (c = 0; c <= max; c++) {\n sum += A.get(r, c) * x.get(c);\n }\n y.set(r, sum * alpha0 + beta0 * y.get(r));\n r++;\n }\n if (r < m) {\n i = 0;\n while (r + Ku < n) {\n sum = 0;\n for (c = 0; c <= Kl + Ku; c++) {\n idx = i + c + 1;\n sum += A.get(r, idx) * x.get(idx);\n }\n y.set(r, sum * alpha0 + beta0 * y.get(r));\n r++;\n i++;\n if (r === m) {\n break;\n }\n }\n }\n if (r < m) {\n i++;\n while (r - Kl < n) {\n sum = 0;\n for (c = i; c < n; c++) {\n sum += A.get(r, c) * x.get(c);\n }\n y.set(r, sum * alpha0 + beta0 * y.get(r));\n r++;\n i++;\n if (r === m) {\n break;\n }\n }\n }\n return true;\n}\n","'use strict';\n\nvar blas1 = require('ndarray-blas-level1');\n\nmodule.exports = symv;\n\nfunction symv (A, x, y, fromLower, alpha, beta) {\n var n = A.shape[0];\n\n var lower = fromLower || true;\n var alpha0 = alpha === undefined ? 1 : alpha;\n var beta0 = beta === undefined ? 0 : beta;\n\n var i = 0;\n var j = 0;\n var t1 = 0;\n var t2 = 0;\n\n if (beta0 === 0) {\n for (i = 0; i < y.shape[0]; ++i) {\n y.set(i, 0);\n }\n } else if (beta0 !== 1) {\n blas1.scal(beta0, y);\n }\n if (alpha0 === 0) {\n return true;\n } else if (alpha0 === 1) {\n if (lower) {\n for (j = 0; j < n; ++j) {\n t1 = x.get(j);\n t2 = 0;\n y.set(j, y.get(j) + t1 * A.get(j, j));\n for (i = j + 1; i < n; ++i) {\n y.set(i, y.get(i) + t1 * A.get(i, j));\n t2 = t2 + A.get(i, j) * x.get(i);\n }\n y.set(j, y.get(j) + t2);\n }\n } else {\n for (j = 0; j < n; ++j) {\n t1 = x.get(j);\n t2 = 0;\n for (i = 0; i <= j - 1; ++i) {\n y.set(i, y.get(i) + t1 * A.get(i, j));\n t2 = t2 + A.get(i, j) * x.get(i);\n }\n y.set(j, y.get(j) + t1 * A.get(j, j) + t2);\n }\n }\n } else {\n if (lower) {\n for (j = 0; j < n; ++j) {\n t1 = alpha0 * x.get(j);\n t2 = 0;\n y.set(j, y.get(j) + t1 * A.get(j, j));\n for (i = j + 1; i < n; ++i) {\n y.set(i, y.get(i) + t1 * A.get(i, j));\n t2 = t2 + A.get(i, j) * x.get(i);\n }\n y.set(j, y.get(j) + alpha0 * t2);\n }\n } else {\n for (j = 0; j < n; ++j) {\n t1 = alpha0 * x.get(j);\n t2 = 0;\n for (i = 0; i <= j - 1; ++i) {\n y.set(i, y.get(i) + t1 * A.get(i, j));\n t2 = t2 + A.get(i, j) * x.get(i);\n }\n y.set(j, y.get(j) + t1 * A.get(j, j) + alpha0 * t2);\n }\n }\n }\n\n return true;\n}\n","'use strict';\n\nmodule.exports = sbmv;\n\nfunction sbmv () {\n console.error('SBMV (symmetric banded matrix vector multiply) not yet implemented');\n}\n","'use strict';\n\nvar blas1 = require('ndarray-blas-level1');\n\nmodule.exports = trmv;\n\n// Compute the product of an upper triangular matrix with a vector\nfunction trmv (A, x, isLower) {\n var dot = blas1.dot;\n var n = A.shape[1];\n var i = 0;\n if (isLower) {\n for (i = n - 1; i >= 0; i--) {\n x.set(i, dot(A.pick(i, null).hi(i + 1), x.hi(i + 1)));\n }\n } else {\n for (i = 0; i < n; i++) {\n x.set(i, dot(A.pick(i, null).lo(i), x.lo(i)));\n }\n }\n return true;\n}\n","'use strict';\n\nmodule.exports = tbmv;\n\nfunction tbmv () {\n console.error('TBMV (triangular banded matrix vector multiply) not yet implemented');\n}\n","'use strict';\n\nvar blas1 = require('ndarray-blas-level1');\n\nmodule.exports = trsv;\n\n// Solve Ax=b where A is upper triangular\nfunction trsv (A, x, isLower) {\n var dot = blas1.dot;\n var n = A.shape[1];\n var i = 0;\n if (isLower) {\n x.set(0, x.get(0) / A.get(0, 0));\n for (i = 1; i < n; i++) {\n x.set(i, (x.get(i) - dot(A.pick(i, null).hi(i), x.hi(i))) / A.get(i, i));\n }\n } else {\n x.set(n - 1, x.get(n - 1) / A.get(n - 1, n - 1));\n for (i = n - 2; i >= 0; i--) {\n x.set(i, (x.get(i) - dot(A.pick(i, null).lo(i + 1), x.lo(i + 1))) / A.get(i, i));\n }\n }\n return true;\n}\n","'use strict';\n\nmodule.exports = tpsv;\n\nfunction tpsv () {\n console.error('TPSV (triangular packed matrix solver) not yet implemented');\n}\n","'use strict';\n\nmodule.exports = ger;\n\nfunction ger () {\n console.error('GER (rank 1 operation A := alpha*x*y\\' + A) not yet implemented');\n}\n","'use strict';\n\nmodule.exports = syr;\n\nfunction syr () {\n console.error('SYR (symmetric rank 1 operation A := alpha*x*y\\' + A) not yet implemented');\n}\n","'use strict';\n\nmodule.exports = spr;\n\nfunction spr () {\n console.error('SPR (symmetric packed rank 1 operation A := alpha*x*y\\' + A) not yet implemented');\n}\n","'use strict';\n\nmodule.exports = syr2;\n\nfunction syr2 () {\n console.error('SYR (symmetric rank 2 operation A := alpha*x*y\\' + alpha*y*x\\' + A) not yet implemented');\n}\n","'use strict';\n\nmodule.exports = spr2;\n\nfunction spr2 () {\n console.error('SPR (symmetric packed rank 2 operation A := alpha*x*y\\' + alpha*y*x\\' + A) not yet implemented');\n}\n","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","/**\n * Bit twiddling hacks for JavaScript.\n *\n * Author: Mikola Lysenko\n *\n * Ported from Stanford bit twiddling hack library:\n * http://graphics.stanford.edu/~seander/bithacks.html\n */\n\n\"use strict\"; \"use restrict\";\n\n//Number of bits in an integer\nvar INT_BITS = 32;\n\n//Constants\nexports.INT_BITS = INT_BITS;\nexports.INT_MAX = 0x7fffffff;\nexports.INT_MIN = -1<<(INT_BITS-1);\n\n//Returns -1, 0, +1 depending on sign of x\nexports.sign = function(v) {\n return (v > 0) - (v < 0);\n}\n\n//Computes absolute value of integer\nexports.abs = function(v) {\n var mask = v >> (INT_BITS-1);\n return (v ^ mask) - mask;\n}\n\n//Computes minimum of integers x and y\nexports.min = function(x, y) {\n return y ^ ((x ^ y) & -(x < y));\n}\n\n//Computes maximum of integers x and y\nexports.max = function(x, y) {\n return x ^ ((x ^ y) & -(x < y));\n}\n\n//Checks if a number is a power of two\nexports.isPow2 = function(v) {\n return !(v & (v-1)) && (!!v);\n}\n\n//Computes log base 2 of v\nexports.log2 = function(v) {\n var r, shift;\n r = (v > 0xFFFF) << 4; v >>>= r;\n shift = (v > 0xFF ) << 3; v >>>= shift; r |= shift;\n shift = (v > 0xF ) << 2; v >>>= shift; r |= shift;\n shift = (v > 0x3 ) << 1; v >>>= shift; r |= shift;\n return r | (v >> 1);\n}\n\n//Computes log base 10 of v\nexports.log10 = function(v) {\n return (v >= 1000000000) ? 9 : (v >= 100000000) ? 8 : (v >= 10000000) ? 7 :\n (v >= 1000000) ? 6 : (v >= 100000) ? 5 : (v >= 10000) ? 4 :\n (v >= 1000) ? 3 : (v >= 100) ? 2 : (v >= 10) ? 1 : 0;\n}\n\n//Counts number of bits\nexports.popCount = function(v) {\n v = v - ((v >>> 1) & 0x55555555);\n v = (v & 0x33333333) + ((v >>> 2) & 0x33333333);\n return ((v + (v >>> 4) & 0xF0F0F0F) * 0x1010101) >>> 24;\n}\n\n//Counts number of trailing zeros\nfunction countTrailingZeros(v) {\n var c = 32;\n v &= -v;\n if (v) c--;\n if (v & 0x0000FFFF) c -= 16;\n if (v & 0x00FF00FF) c -= 8;\n if (v & 0x0F0F0F0F) c -= 4;\n if (v & 0x33333333) c -= 2;\n if (v & 0x55555555) c -= 1;\n return c;\n}\nexports.countTrailingZeros = countTrailingZeros;\n\n//Rounds to next power of 2\nexports.nextPow2 = function(v) {\n v += v === 0;\n --v;\n v |= v >>> 1;\n v |= v >>> 2;\n v |= v >>> 4;\n v |= v >>> 8;\n v |= v >>> 16;\n return v + 1;\n}\n\n//Rounds down to previous power of 2\nexports.prevPow2 = function(v) {\n v |= v >>> 1;\n v |= v >>> 2;\n v |= v >>> 4;\n v |= v >>> 8;\n v |= v >>> 16;\n return v - (v>>>1);\n}\n\n//Computes parity of word\nexports.parity = function(v) {\n v ^= v >>> 16;\n v ^= v >>> 8;\n v ^= v >>> 4;\n v &= 0xf;\n return (0x6996 >>> v) & 1;\n}\n\nvar REVERSE_TABLE = new Array(256);\n\n(function(tab) {\n for(var i=0; i<256; ++i) {\n var v = i, r = i, s = 7;\n for (v >>>= 1; v; v >>>= 1) {\n r <<= 1;\n r |= v & 1;\n --s;\n }\n tab[i] = (r << s) & 0xff;\n }\n})(REVERSE_TABLE);\n\n//Reverse bits in a 32 bit word\nexports.reverse = function(v) {\n return (REVERSE_TABLE[ v & 0xff] << 24) |\n (REVERSE_TABLE[(v >>> 8) & 0xff] << 16) |\n (REVERSE_TABLE[(v >>> 16) & 0xff] << 8) |\n REVERSE_TABLE[(v >>> 24) & 0xff];\n}\n\n//Interleave bits of 2 coordinates with 16 bits. Useful for fast quadtree codes\nexports.interleave2 = function(x, y) {\n x &= 0xFFFF;\n x = (x | (x << 8)) & 0x00FF00FF;\n x = (x | (x << 4)) & 0x0F0F0F0F;\n x = (x | (x << 2)) & 0x33333333;\n x = (x | (x << 1)) & 0x55555555;\n\n y &= 0xFFFF;\n y = (y | (y << 8)) & 0x00FF00FF;\n y = (y | (y << 4)) & 0x0F0F0F0F;\n y = (y | (y << 2)) & 0x33333333;\n y = (y | (y << 1)) & 0x55555555;\n\n return x | (y << 1);\n}\n\n//Extracts the nth interleaved component\nexports.deinterleave2 = function(v, n) {\n v = (v >>> n) & 0x55555555;\n v = (v | (v >>> 1)) & 0x33333333;\n v = (v | (v >>> 2)) & 0x0F0F0F0F;\n v = (v | (v >>> 4)) & 0x00FF00FF;\n v = (v | (v >>> 16)) & 0x000FFFF;\n return (v << 16) >> 16;\n}\n\n\n//Interleave bits of 3 coordinates, each with 10 bits. Useful for fast octree codes\nexports.interleave3 = function(x, y, z) {\n x &= 0x3FF;\n x = (x | (x<<16)) & 4278190335;\n x = (x | (x<<8)) & 251719695;\n x = (x | (x<<4)) & 3272356035;\n x = (x | (x<<2)) & 1227133513;\n\n y &= 0x3FF;\n y = (y | (y<<16)) & 4278190335;\n y = (y | (y<<8)) & 251719695;\n y = (y | (y<<4)) & 3272356035;\n y = (y | (y<<2)) & 1227133513;\n x |= (y << 1);\n \n z &= 0x3FF;\n z = (z | (z<<16)) & 4278190335;\n z = (z | (z<<8)) & 251719695;\n z = (z | (z<<4)) & 3272356035;\n z = (z | (z<<2)) & 1227133513;\n \n return x | (z << 2);\n}\n\n//Extracts nth interleaved component of a 3-tuple\nexports.deinterleave3 = function(v, n) {\n v = (v >>> n) & 1227133513;\n v = (v | (v>>>2)) & 3272356035;\n v = (v | (v>>>4)) & 251719695;\n v = (v | (v>>>8)) & 4278190335;\n v = (v | (v>>>16)) & 0x3FF;\n return (v<<22)>>22;\n}\n\n//Computes next combination in colexicographic order (this is mistakenly called nextPermutation on the bit twiddling hacks page)\nexports.nextCombination = function(v) {\n var t = v | (v - 1);\n return (t + 1) | (((~t & -~t) - 1) >>> (countTrailingZeros(v) + 1));\n}\n\n","\"use strict\"\n\nfunction dupe_array(count, value, i) {\n var c = count[i]|0\n if(c <= 0) {\n return []\n }\n var result = new Array(c), j\n if(i === count.length-1) {\n for(j=0; j 0) {\n return dupe_number(count|0, value)\n }\n break\n case \"object\":\n if(typeof (count.length) === \"number\") {\n return dupe_array(count, value, 0)\n }\n break\n }\n return []\n}\n\nmodule.exports = dupe","\"use strict\"\n\nvar ndarray = require(\"ndarray\")\nvar ops = require(\"ndarray-ops\")\nvar pool = require(\"typedarray-pool\")\n\nfunction clone(array) {\n var dtype = array.dtype\n if(dtype === \"generic\" || dtype === \"array\") {\n dtype = \"double\"\n }\n var data = pool.malloc(array.size, dtype)\n var result = ndarray(data, array.shape)\n ops.assign(result, array)\n return result\n}\nexports.clone = clone\n\nfunction malloc(shape, dtype) {\n if(!dtype) {\n dtype = \"double\"\n }\n var sz = 1\n var stride = new Array(shape.length)\n for(var i=shape.length-1; i>=0; --i) {\n stride[i] = sz\n sz *= shape[i]\n }\n return ndarray(pool.malloc(sz, dtype), shape, stride, 0)\n}\nexports.malloc = malloc\n\nfunction free(array) {\n if(array.dtype === \"generic\" || array.dtype === \"array\") {\n return\n }\n pool.free(array.data)\n}\nexports.free = free\n\nfunction zeros(shape, dtype) {\n if(!dtype) {\n dtype = \"double\"\n }\n\n var sz = 1\n var stride = new Array(shape.length)\n for(var i=shape.length-1; i>=0; --i) {\n stride[i] = sz\n sz *= shape[i]\n }\n var buf = pool.malloc(sz, dtype)\n for(var i=0; i=0; --i) {\n stride[i] = sz\n sz *= shape[i]\n }\n var buf = pool.malloc(sz, dtype)\n for(var i=0; i=0; --i) {\n stride[i] = sz\n sz *= shape[i]\n }\n var buf = pool.malloc(sz, dtype)\n for(i=0; i=0; i--) {\n offsum += stride[i]\n mindim = Math.min(mindim,shape[i])\n }\n for(i=0,offset=0; i= 0) {\n origin[d] += inputShape[d]\n if (origin[d] === newShape[d]) {\n origin[d] = 0\n d--\n } else break\n }\n }\n\n return output\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = extend;\nfunction extend(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || typeof add !== 'object') return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n}\n","'use strict'\n\nmodule.exports = concatRows\nvar extend = require('util-extend')\nvar ops = require('ndarray-ops')\nvar pool = require('ndarray-scratch')\n\nvar defaults = {\n dtype: 'double'\n}\n\nfunction concatRows () {\n var output, input, inputs, options, d, i, shape, idx, l, slice\n\n options = extend({}, defaults)\n\n if (arguments.length === 0) {\n throw new Error('Array of ndarrays to concatenate must not be empty')\n }\n\n if (Array.isArray(arguments[0])) {\n // If the first argument is an array, then assume it's the list\n // of arrays to concatenate:\n inputs = arguments[0]\n extend(options, arguments[1] || {})\n } else if (arguments.length === 2) {\n // Otherwise assume the first argument is the output array:\n inputs = arguments[1]\n output = arguments[0]\n extend(options, arguments[2] || {})\n }\n\n if (inputs.length === 0) {\n throw new Error('Array of ndarrays to concatenate must not be empty')\n }\n\n for (d = 0; d < inputs.length; d++) {\n // Verify the other dimensions:\n if (!shape) {\n // If no shape is set, set it:\n shape = inputs[d].shape.slice(0)\n } else {\n // At the very least, all arrays must share teh same dimensionality:\n if (inputs[d].dimension !== shape.length) {\n throw new Error('all arrays must have the same dimensionality')\n }\n // If shape is set, then this shape must match:\n for (i = 1; i < inputs[d].shape.length; i++) {\n if (inputs[d].shape[i] !== shape[i]) {\n throw new Error('last n-1 dimensions of concatenated rows must have the same size')\n }\n }\n\n // Add to the size of the concatenated dimension:\n shape[0] += inputs[d].shape[0]\n }\n }\n\n if (output) {\n if (shape[0] !== output.shape[0]) {\n throw new Error('first dimension of output array must match the total number of concatenated rows')\n }\n } else {\n // NB: Nothing after this can fail, otherwise we leak memory. So all\n // assertions MUST happen before this.\n output = pool.zeros(shape, options.dtype)\n }\n\n for (i = 0, idx = 0; i < inputs.length; i++) {\n input = inputs[i]\n l = input.shape[0]\n slice = output.lo(idx).hi(l)\n ops.assign(slice, input)\n idx += l\n }\n\n return output\n}\n","\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n","\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(\"../util/minimal\");\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low 32 bits, unsigned\r\n * @param {number} hi High 32 bits, unsigned\r\n */\r\nfunction LongBits(lo, hi) {\r\n\r\n // note that the casts below are theoretically unnecessary as of today, but older statically\r\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo >>> 0;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi >>> 0;\r\n}\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Zero hash.\r\n * @memberof util.LongBits\r\n * @type {string}\r\n */\r\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n if (sign)\r\n value = -value;\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0;\r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.from = function from(value) {\r\n if (typeof value === \"number\")\r\n return LongBits.fromNumber(value);\r\n if (util.isString(value)) {\r\n /* istanbul ignore else */\r\n if (util.Long)\r\n value = util.Long.fromString(value);\r\n else\r\n return LongBits.fromNumber(parseInt(value, 10));\r\n }\r\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBits.prototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n var lo = ~this.lo + 1 >>> 0,\r\n hi = ~this.hi >>> 0;\r\n if (!lo)\r\n hi = hi + 1 >>> 0;\r\n return -(lo + hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBits.prototype.toLong = function toLong(unsigned) {\r\n return util.Long\r\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\r\n /* istanbul ignore next */\r\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n if (hash === zeroHash)\r\n return zero;\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBits.prototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 ,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBits.prototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBits.prototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBits.prototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n return part2 === 0\r\n ? part1 === 0\r\n ? part0 < 16384\r\n ? part0 < 128 ? 1 : 2\r\n : part0 < 2097152 ? 3 : 4\r\n : part1 < 16384\r\n ? part1 < 128 ? 5 : 6\r\n : part1 < 2097152 ? 7 : 8\r\n : part2 < 128 ? 9 : 10;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Writer;\r\n\r\nvar util = require(\"./util/minimal\");\r\n\r\nvar BufferWriter; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n base64 = util.base64,\r\n utf8 = util.utf8;\r\n\r\n/**\r\n * Constructs a new writer operation instance.\r\n * @classdesc Scheduled writer operation.\r\n * @constructor\r\n * @param {function(*, Uint8Array, number)} fn Function to call\r\n * @param {number} len Value byte length\r\n * @param {*} val Value to write\r\n * @ignore\r\n */\r\nfunction Op(fn, len, val) {\r\n\r\n /**\r\n * Function to call.\r\n * @type {function(Uint8Array, number, *)}\r\n */\r\n this.fn = fn;\r\n\r\n /**\r\n * Value byte length.\r\n * @type {number}\r\n */\r\n this.len = len;\r\n\r\n /**\r\n * Next operation.\r\n * @type {Writer.Op|undefined}\r\n */\r\n this.next = undefined;\r\n\r\n /**\r\n * Value to write.\r\n * @type {*}\r\n */\r\n this.val = val; // type varies\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction noop() {} // eslint-disable-line no-empty-function\r\n\r\n/**\r\n * Constructs a new writer state instance.\r\n * @classdesc Copied writer state.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {Writer} writer Writer to copy state from\r\n * @ignore\r\n */\r\nfunction State(writer) {\r\n\r\n /**\r\n * Current head.\r\n * @type {Writer.Op}\r\n */\r\n this.head = writer.head;\r\n\r\n /**\r\n * Current tail.\r\n * @type {Writer.Op}\r\n */\r\n this.tail = writer.tail;\r\n\r\n /**\r\n * Current buffer length.\r\n * @type {number}\r\n */\r\n this.len = writer.len;\r\n\r\n /**\r\n * Next state.\r\n * @type {State|null}\r\n */\r\n this.next = writer.states;\r\n}\r\n\r\n/**\r\n * Constructs a new writer instance.\r\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n */\r\nfunction Writer() {\r\n\r\n /**\r\n * Current length.\r\n * @type {number}\r\n */\r\n this.len = 0;\r\n\r\n /**\r\n * Operations head.\r\n * @type {Object}\r\n */\r\n this.head = new Op(noop, 0, 0);\r\n\r\n /**\r\n * Operations tail\r\n * @type {Object}\r\n */\r\n this.tail = this.head;\r\n\r\n /**\r\n * Linked forked states.\r\n * @type {Object|null}\r\n */\r\n this.states = null;\r\n\r\n // When a value is written, the writer calculates its byte length and puts it into a linked\r\n // list of operations to perform when finish() is called. This both allows us to allocate\r\n // buffers of the exact required size and reduces the amount of work we have to do compared\r\n // to first calculating over objects and then encoding over objects. In our case, the encoding\r\n // part is just a linked list walk calling operations with already prepared values.\r\n}\r\n\r\n/**\r\n * Creates a new writer.\r\n * @function\r\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\r\n */\r\nWriter.create = util.Buffer\r\n ? function create_buffer_setup() {\r\n return (Writer.create = function create_buffer() {\r\n return new BufferWriter();\r\n })();\r\n }\r\n /* istanbul ignore next */\r\n : function create_array() {\r\n return new Writer();\r\n };\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nWriter.alloc = function alloc(size) {\r\n return new util.Array(size);\r\n};\r\n\r\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\r\n/* istanbul ignore else */\r\nif (util.Array !== Array)\r\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\r\n\r\n/**\r\n * Pushes a new operation to the queue.\r\n * @param {function(Uint8Array, number, *)} fn Function to call\r\n * @param {number} len Value byte length\r\n * @param {number} val Value to write\r\n * @returns {Writer} `this`\r\n * @private\r\n */\r\nWriter.prototype._push = function push(fn, len, val) {\r\n this.tail = this.tail.next = new Op(fn, len, val);\r\n this.len += len;\r\n return this;\r\n};\r\n\r\nfunction writeByte(val, buf, pos) {\r\n buf[pos] = val & 255;\r\n}\r\n\r\nfunction writeVarint32(val, buf, pos) {\r\n while (val > 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Constructs a new varint writer operation instance.\r\n * @classdesc Scheduled varint writer operation.\r\n * @extends Op\r\n * @constructor\r\n * @param {number} len Value byte length\r\n * @param {number} val Value to write\r\n * @ignore\r\n */\r\nfunction VarintOp(len, val) {\r\n this.len = len;\r\n this.next = undefined;\r\n this.val = val;\r\n}\r\n\r\nVarintOp.prototype = Object.create(Op.prototype);\r\nVarintOp.prototype.fn = writeVarint32;\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.uint32 = function write_uint32(value) {\r\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\r\n // uint32 is by far the most frequently used operation and benefits significantly from this.\r\n this.len += (this.tail = this.tail.next = new VarintOp(\r\n (value = value >>> 0)\r\n < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5,\r\n value)).len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.sint32 = function write_sint32(value) {\r\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\r\n};\r\n\r\nfunction writeVarint64(val, buf, pos) {\r\n while (val.hi) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriter.prototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this._push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriter.prototype.int64 = Writer.prototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriter.prototype.sint64 = function write_sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this._push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.bool = function write_bool(value) {\r\n return this._push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.fixed32 = function write_fixed32(value) {\r\n return this._push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as fixed 32 bits.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriter.prototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as fixed 64 bits.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.float = function write_float(value) {\r\n return this._push(util.float.writeFloatLE, 4, value);\r\n};\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.double = function write_double(value) {\r\n return this._push(util.float.writeDoubleLE, 8, value);\r\n};\r\n\r\nvar writeBytes = util.Array.prototype.set\r\n ? function writeBytes_set(val, buf, pos) {\r\n buf.set(val, pos); // also works for plain array values\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytes_for(val, buf, pos) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n };\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n if (!len)\r\n return this._push(writeByte, 1, 0);\r\n if (util.isString(value)) {\r\n var buf = Writer.alloc(len = base64.length(value));\r\n base64.decode(value, buf, 0);\r\n value = buf;\r\n }\r\n return this.uint32(len)._push(writeBytes, len, value);\r\n};\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.string = function write_string(value) {\r\n var len = utf8.length(value);\r\n return len\r\n ? this.uint32(len)._push(utf8.write, len, value)\r\n : this._push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.fork = function fork() {\r\n this.states = new State(this);\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.reset = function reset() {\r\n if (this.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.ldelim = function ldelim() {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset().uint32(len);\r\n if (len) {\r\n this.tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriter.prototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = this.constructor.alloc(this.len),\r\n pos = 0;\r\n while (head) {\r\n head.fn(head.val, buf, pos);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n // this.head = this.tail = null;\r\n return buf;\r\n};\r\n\r\nWriter._configure = function(BufferWriter_) {\r\n BufferWriter = BufferWriter_;\r\n};\r\n","\"use strict\";\r\nmodule.exports = BufferWriter;\r\n\r\n// extends Writer\r\nvar Writer = require(\"./writer\");\r\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\r\n\r\nvar util = require(\"./util/minimal\");\r\n\r\nvar Buffer = util.Buffer;\r\n\r\n/**\r\n * Constructs a new buffer writer instance.\r\n * @classdesc Wire format writer using node buffers.\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Buffer} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n return (BufferWriter.alloc = util._Buffer_allocUnsafe)(size);\r\n};\r\n\r\nvar writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name === \"set\"\r\n ? function writeBytesBuffer_set(val, buf, pos) {\r\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\r\n // also works for plain array values\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytesBuffer_copy(val, buf, pos) {\r\n if (val.copy) // Buffer values\r\n val.copy(buf, pos, 0, val.length);\r\n else for (var i = 0; i < val.length;) // plain array values\r\n buf[pos++] = val[i++];\r\n };\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\r\n if (util.isString(value))\r\n value = util._Buffer_from(value, \"base64\");\r\n var len = value.length >>> 0;\r\n this.uint32(len);\r\n if (len)\r\n this._push(writeBytesBuffer, len, value);\r\n return this;\r\n};\r\n\r\nfunction writeStringBuffer(val, buf, pos) {\r\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\r\n util.utf8.write(val, buf, pos);\r\n else\r\n buf.utf8Write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriter.prototype.string = function write_string_buffer(value) {\r\n var len = Buffer.byteLength(value);\r\n this.uint32(len);\r\n if (len)\r\n this._push(writeStringBuffer, len, value);\r\n return this;\r\n};\r\n\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @name BufferWriter#finish\r\n * @function\r\n * @returns {Buffer} Finished buffer\r\n */\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(\"./util/minimal\");\r\n\r\nvar BufferReader; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n utf8 = util.utf8;\r\n\r\n/* istanbul ignore next */\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Constructs a new reader instance using the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\nvar create_array = typeof Uint8Array !== \"undefined\"\r\n ? function create_typed_array(buffer) {\r\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\r\n return new Reader(buffer);\r\n throw Error(\"illegal buffer\");\r\n }\r\n /* istanbul ignore next */\r\n : function create_array(buffer) {\r\n if (Array.isArray(buffer))\r\n return new Reader(buffer);\r\n throw Error(\"illegal buffer\");\r\n };\r\n\r\n/**\r\n * Creates a new reader using the specified buffer.\r\n * @function\r\n * @param {Uint8Array|Buffer} buffer Buffer to read from\r\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n * @throws {Error} If `buffer` is not a valid buffer\r\n */\r\nReader.create = util.Buffer\r\n ? function create_buffer_setup(buffer) {\r\n return (Reader.create = function create_buffer(buffer) {\r\n return util.Buffer.isBuffer(buffer)\r\n ? new BufferReader(buffer)\r\n /* istanbul ignore next */\r\n : create_array(buffer);\r\n })(buffer);\r\n }\r\n /* istanbul ignore next */\r\n : create_array;\r\n\r\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.uint32 = (function read_uint32_setup() {\r\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\r\n return function read_uint32() {\r\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n\r\n /* istanbul ignore if */\r\n if ((this.pos += 5) > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this, 10);\r\n }\r\n return value;\r\n };\r\n})();\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.int32 = function read_int32() {\r\n return this.uint32() | 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.sint32 = function read_sint32() {\r\n var value = this.uint32();\r\n return value >>> 1 ^ -(value & 1) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n // tends to deopt with local vars for octet etc.\r\n var bits = new LongBits(0, 0);\r\n var i = 0;\r\n if (this.len - this.pos > 4) { // fast route (lo)\r\n for (; i < 4; ++i) {\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n i = 0;\r\n } else {\r\n for (; i < 3; ++i) {\r\n /* istanbul ignore if */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 1st..3th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n // 4th\r\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\r\n return bits;\r\n }\r\n if (this.len - this.pos > 4) { // fast route (hi)\r\n for (; i < 5; ++i) {\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n } else {\r\n for (; i < 5; ++i) {\r\n /* istanbul ignore if */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n }\r\n /* istanbul ignore next */\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReader.prototype.bool = function read_bool() {\r\n return this.uint32() !== 0;\r\n};\r\n\r\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\r\n return (buf[end - 4]\r\n | buf[end - 3] << 8\r\n | buf[end - 2] << 16\r\n | buf[end - 1] << 24) >>> 0;\r\n}\r\n\r\n/**\r\n * Reads fixed 32 bits as an unsigned 32 bit integer.\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.fixed32 = function read_fixed32() {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32_end(this.buf, this.pos += 4);\r\n};\r\n\r\n/**\r\n * Reads fixed 32 bits as a signed 32 bit integer.\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.sfixed32 = function read_sfixed32() {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32_end(this.buf, this.pos += 4) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readFixed64(/* this: Reader */) {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n\r\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long} Value read\r\n */\r\n\r\n/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.float = function read_float() {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = util.float.readFloatLE(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.double = function read_double() {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = util.float.readDoubleLE(this.buf, this.pos);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReader.prototype.bytes = function read_bytes() {\r\n var length = this.uint32(),\r\n start = this.pos,\r\n end = this.pos + length;\r\n\r\n /* istanbul ignore if */\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n\r\n this.pos += length;\r\n if (Array.isArray(this.buf)) // plain array\r\n return this.buf.slice(start, end);\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReader.prototype.string = function read_string() {\r\n var bytes = this.bytes();\r\n return utf8.read(bytes, 0, bytes.length);\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReader.prototype.skip = function skip(length) {\r\n if (typeof length === \"number\") {\r\n /* istanbul ignore if */\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n } else {\r\n do {\r\n /* istanbul ignore if */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReader.prototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n do { // eslint-disable-line no-constant-condition\r\n if ((wireType = this.uint32() & 7) === 4)\r\n break;\r\n this.skipType(wireType);\r\n } while (true);\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\r\n }\r\n return this;\r\n};\r\n\r\nReader._configure = function(BufferReader_) {\r\n BufferReader = BufferReader_;\r\n\r\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\r\n util.merge(Reader.prototype, {\r\n\r\n int64: function read_int64() {\r\n return readLongVarint.call(this)[fn](false);\r\n },\r\n\r\n uint64: function read_uint64() {\r\n return readLongVarint.call(this)[fn](true);\r\n },\r\n\r\n sint64: function read_sint64() {\r\n return readLongVarint.call(this).zzDecode()[fn](false);\r\n },\r\n\r\n fixed64: function read_fixed64() {\r\n return readFixed64.call(this)[fn](true);\r\n },\r\n\r\n sfixed64: function read_sfixed64() {\r\n return readFixed64.call(this)[fn](false);\r\n }\r\n\r\n });\r\n};\r\n","\"use strict\";\r\nmodule.exports = BufferReader;\r\n\r\n// extends Reader\r\nvar Reader = require(\"./reader\");\r\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\r\n\r\nvar util = require(\"./util/minimal\");\r\n\r\n/**\r\n * Constructs a new buffer reader instance.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n Reader.call(this, buffer);\r\n\r\n /**\r\n * Read buffer.\r\n * @name BufferReader#buf\r\n * @type {Buffer}\r\n */\r\n}\r\n\r\n/* istanbul ignore else */\r\nif (util.Buffer)\r\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReader.prototype.string = function read_string_buffer() {\r\n var len = this.uint32(); // modifies pos\r\n return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @name BufferReader#bytes\r\n * @function\r\n * @returns {Buffer} Value read\r\n */\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar util = require(\"../util/minimal\");\r\n\r\n// Extends EventEmitter\r\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\r\n\r\n/**\r\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\r\n *\r\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\r\n * @typedef rpc.ServiceMethodCallback\r\n * @template TRes extends Message\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {TRes} [response] Response message\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\r\n * @typedef rpc.ServiceMethod\r\n * @template TReq extends Message\r\n * @template TRes extends Message\r\n * @type {function}\r\n * @param {TReq|Properties} request Request message or plain object\r\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\r\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\r\n */\r\n\r\n/**\r\n * Constructs a new RPC service instance.\r\n * @classdesc An RPC service as returned by {@link Service#create}.\r\n * @exports rpc.Service\r\n * @extends util.EventEmitter\r\n * @constructor\r\n * @param {RPCImpl} rpcImpl RPC implementation\r\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\r\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\r\n */\r\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\r\n\r\n if (typeof rpcImpl !== \"function\")\r\n throw TypeError(\"rpcImpl must be a function\");\r\n\r\n util.EventEmitter.call(this);\r\n\r\n /**\r\n * RPC implementation. Becomes `null` once the service is ended.\r\n * @type {RPCImpl|null}\r\n */\r\n this.rpcImpl = rpcImpl;\r\n\r\n /**\r\n * Whether requests are length-delimited.\r\n * @type {boolean}\r\n */\r\n this.requestDelimited = Boolean(requestDelimited);\r\n\r\n /**\r\n * Whether responses are length-delimited.\r\n * @type {boolean}\r\n */\r\n this.responseDelimited = Boolean(responseDelimited);\r\n}\r\n\r\n/**\r\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\r\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\r\n * @param {Constructor} requestCtor Request constructor\r\n * @param {Constructor} responseCtor Response constructor\r\n * @param {TReq|Properties} request Request message or plain object\r\n * @param {rpc.ServiceMethodCallback} callback Service callback\r\n * @returns {undefined}\r\n * @template TReq extends Message\r\n * @template TRes extends Message\r\n */\r\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\r\n\r\n if (!request)\r\n throw TypeError(\"request must be specified\");\r\n\r\n var self = this;\r\n if (!callback)\r\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\r\n\r\n if (!self.rpcImpl) {\r\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\r\n return undefined;\r\n }\r\n\r\n try {\r\n return self.rpcImpl(\r\n method,\r\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\r\n function rpcCallback(err, response) {\r\n\r\n if (err) {\r\n self.emit(\"error\", err, method);\r\n return callback(err);\r\n }\r\n\r\n if (response === null) {\r\n self.end(/* endedByRPC */ true);\r\n return undefined;\r\n }\r\n\r\n if (!(response instanceof responseCtor)) {\r\n try {\r\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\r\n } catch (err) {\r\n self.emit(\"error\", err, method);\r\n return callback(err);\r\n }\r\n }\r\n\r\n self.emit(\"data\", response, method);\r\n return callback(null, response);\r\n }\r\n );\r\n } catch (err) {\r\n self.emit(\"error\", err, method);\r\n setTimeout(function() { callback(err); }, 0);\r\n return undefined;\r\n }\r\n};\r\n\r\n/**\r\n * Ends this service and emits the `end` event.\r\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\r\n * @returns {rpc.Service} `this`\r\n */\r\nService.prototype.end = function end(endedByRPC) {\r\n if (this.rpcImpl) {\r\n if (!endedByRPC) // signal end to rpcImpl\r\n this.rpcImpl(null, null, null);\r\n this.rpcImpl = null;\r\n this.emit(\"end\").off();\r\n }\r\n return this;\r\n};\r\n","var root = require('./_root');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsFinite = root.isFinite;\n\n/**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\nfunction isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n}\n\nmodule.exports = isFinite;\n","var baseFlatten = require('./_baseFlatten');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\nfunction flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n}\n\nmodule.exports = flattenDeep;\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { getConfig } from '../config';\nimport KerasJS from 'keras-js';\nvar isNodeEnvironment = false;\ntry {\n isNodeEnvironment = Object.prototype.toString.call(global.process) === '[object process]';\n}\ncatch (e) { }\nvar modelPath = getConfig('MODEL_PATH') || '/dist/model.bin';\nvar model = new KerasJS.Model({\n filepath: isNodeEnvironment ? __dirname + '/model.bin' : modelPath,\n gpu: false,\n filesystem: isNodeEnvironment\n});\nexport class PatternDetectorInput extends IndicatorInput {\n constructor(values) {\n super();\n this.values = values;\n }\n}\nexport var AvailablePatterns;\n(function (AvailablePatterns) {\n AvailablePatterns[AvailablePatterns[\"TD\"] = 0] = \"TD\";\n AvailablePatterns[AvailablePatterns[\"IHS\"] = 1] = \"IHS\";\n AvailablePatterns[AvailablePatterns[\"HS\"] = 2] = \"HS\";\n AvailablePatterns[AvailablePatterns[\"TU\"] = 3] = \"TU\";\n AvailablePatterns[AvailablePatterns[\"DT\"] = 4] = \"DT\";\n AvailablePatterns[AvailablePatterns[\"DB\"] = 5] = \"DB\";\n})(AvailablePatterns || (AvailablePatterns = {}));\nfunction interpolateArray(data, fitCount) {\n var linearInterpolate = function (before, after, atPoint) {\n return before + (after - before) * atPoint;\n };\n var newData = new Array();\n var springFactor = new Number((data.length - 1) / (fitCount - 1));\n newData[0] = data[0]; // for new allocation\n for (var i = 1; i < fitCount - 1; i++) {\n var tmp = i * springFactor;\n var before = new Number(Math.floor(tmp)).toFixed();\n var after = new Number(Math.ceil(tmp)).toFixed();\n var atPoint = tmp - before;\n newData[i] = linearInterpolate(data[before], data[after], atPoint);\n }\n newData[fitCount - 1] = data[data.length - 1]; // for new allocation\n return newData;\n}\n;\nfunction l2Normalize(arr) {\n var sum = arr.reduce((cum, value) => { return cum + (value * value); }, 0);\n var norm = Math.sqrt(sum);\n return arr.map((v) => v / norm);\n}\nexport class PatternDetectorOutput {\n}\nexport function predictPattern(input) {\n return __awaiter(this, void 0, void 0, function* () {\n if (input.values.length < 200) {\n console.warn('Pattern detector requires atleast 250 data for a reliable prediction, received just ', input.values.length);\n }\n yield model.ready();\n Indicator.reverseInputs(input);\n var data = input.values;\n var closes = l2Normalize(interpolateArray(data, 400));\n let result = yield model.predict({\n input: new Float32Array(closes)\n });\n var index = result.output.indexOf(Math.max(...result.output));\n Indicator.reverseInputs(input);\n return {\n pattern: AvailablePatterns[index],\n patternId: index,\n probability: result.output[index] * 100\n };\n });\n}\nexport function hasDoubleBottom(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.DB && result.probability > 75);\n });\n}\nexport function hasDoubleTop(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.DT && result.probability > 75);\n });\n}\nexport function hasHeadAndShoulder(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.HS && result.probability > 75);\n });\n}\nexport function hasInverseHeadAndShoulder(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.IHS && result.probability > 75);\n });\n}\nexport function isTrendingUp(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.TU && result.probability > 75);\n });\n}\nexport function isTrendingDown(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.TD && result.probability > 75);\n });\n}\nexport class PatternDetector extends Indicator {\n}\nPatternDetector.predictPattern = predictPattern;\nPatternDetector.hasDoubleBottom = hasDoubleBottom;\nPatternDetector.hasDoubleTop = hasDoubleTop;\nPatternDetector.hasHeadAndShoulder = hasHeadAndShoulder;\nPatternDetector.hasInverseHeadAndShoulder = hasInverseHeadAndShoulder;\nPatternDetector.isTrendingUp = isTrendingUp;\nPatternDetector.isTrendingDown = isTrendingDown;\n","export * from './lib/index.js';\nexport function getAvailableIndicators () {\n let AvailableIndicators = []\n AvailableIndicators.push('sma');\n AvailableIndicators.push('ema');\n AvailableIndicators.push('wma');\n AvailableIndicators.push('wema');\n AvailableIndicators.push('macd');\n AvailableIndicators.push('rsi');\n AvailableIndicators.push('bollingerbands');\n AvailableIndicators.push('adx');\n AvailableIndicators.push('atr');\n AvailableIndicators.push('truerange');\n AvailableIndicators.push('roc');\n AvailableIndicators.push('kst');\n AvailableIndicators.push('psar');\n AvailableIndicators.push('stochastic');\n AvailableIndicators.push('williamsr');\n AvailableIndicators.push('adl');\n AvailableIndicators.push('obv');\n AvailableIndicators.push('trix');\n\n AvailableIndicators.push('cci');\n AvailableIndicators.push('awesomeoscillator');\n AvailableIndicators.push('forceindex');\n AvailableIndicators.push('vwap');\n AvailableIndicators.push('volumeprofile');\n AvailableIndicators.push('renko');\n AvailableIndicators.push('heikinashi');\n\n AvailableIndicators.push('stochasticrsi');\n AvailableIndicators.push('mfi');\n\n AvailableIndicators.push('averagegain');\n AvailableIndicators.push('averageloss');\n AvailableIndicators.push('highest');\n AvailableIndicators.push('lowest');\n AvailableIndicators.push('sum');\n AvailableIndicators.push('FixedSizeLinkedList');\n AvailableIndicators.push('sd');\n AvailableIndicators.push('bullish');\n AvailableIndicators.push('bearish');\n AvailableIndicators.push('abandonedbaby');\n AvailableIndicators.push('doji');\n AvailableIndicators.push('bearishengulfingpattern');\n AvailableIndicators.push('bullishengulfingpattern');\n AvailableIndicators.push('darkcloudcover');\n AvailableIndicators.push('downsidetasukigap');\n AvailableIndicators.push('dragonflydoji');\n AvailableIndicators.push('gravestonedoji');\n AvailableIndicators.push('bullishharami');\n AvailableIndicators.push('bearishharami');\n AvailableIndicators.push('bullishharamicross');\n AvailableIndicators.push('bearishharamicross');\n AvailableIndicators.push('eveningdojistar');\n AvailableIndicators.push('eveningstar');\n AvailableIndicators.push('morningdojistar');\n AvailableIndicators.push('morningstar');\n AvailableIndicators.push('bullishmarubozu');\n AvailableIndicators.push('bearishmarubozu');\n AvailableIndicators.push('piercingline');\n AvailableIndicators.push('bullishspinningtop');\n AvailableIndicators.push('bearishspinningtop');\n AvailableIndicators.push('threeblackcrows');\n AvailableIndicators.push('threewhitesoldiers');\n AvailableIndicators.push('bullishhammerstick');\n AvailableIndicators.push('bearishhammerstick');\n AvailableIndicators.push('bullishinvertedhammerstick');\n AvailableIndicators.push('bearishinvertedhammerstick');\n AvailableIndicators.push('hammerpattern');\n AvailableIndicators.push('hammerpatternunconfirmed');\n AvailableIndicators.push('hangingman');\n AvailableIndicators.push('hangingmanunconfirmed');\n AvailableIndicators.push('shootingstar');\n AvailableIndicators.push('shootingstarunconfirmed');\n AvailableIndicators.push('tweezertop');\n AvailableIndicators.push('tweezerbottom');\n\n AvailableIndicators.push('predictPattern');\n AvailableIndicators.push('hasDoubleBottom');\n AvailableIndicators.push('hasDoubleTop');\n AvailableIndicators.push('hasHeadAndShoulder');\n AvailableIndicators.push('hasInverseHeadAndShoulder');\n AvailableIndicators.push('isTrendingUp');\n AvailableIndicators.push('isTrendingDown');\n return AvailableIndicators;\n};\n\nlet AvailableIndicators = getAvailableIndicators();\nexport { AvailableIndicators }\n","'use strict';\n\nMath.sign = Math.sign || function (x) {\n x = +x; // convert to a number\n if (x === 0 || isNaN(x)) {\n return x;\n }\n return x > 0 ? 1 : -1;\n};\n\nmodule.exports = function rotg (a, b, csr) {\n // Based on Algorithm 4 from \"Discontinuous Plane\n // Rotations and the Symmetric Eigenvalue Problem\"\n // by Anderson, 2000.\n var c = 0;\n var s = 0;\n var r = 0;\n var t = 0;\n var u = 0;\n\n if (b === 0) {\n c = Math.sign(a);\n s = 0;\n r = Math.abs(a);\n } else if (a === 0) {\n c = 0;\n s = Math.sign(b);\n r = Math.abs(b);\n } else if (Math.abs(a) > Math.abs(b)) {\n t = b / a;\n u = Math.sign(a) * Math.sqrt(1 + t * t);\n c = 1 / u;\n s = t * c;\n r = a * u;\n } else {\n t = a / b;\n u = Math.sign(a) * Math.sqrt(1 + t * t);\n s = 1 / u;\n c = t * s;\n r = b * u;\n }\n // try to save some unnecessary object creation\n if (csr !== undefined && csr.length > 2) {\n csr[0] = c;\n csr[1] = s;\n csr[2] = r;\n } else {\n return [c, s, r];\n }\n};\n\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar activations = _interopRequireWildcard(require(\"../../activations\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar tensorUtils = _interopRequireWildcard(require(\"../../utils/tensorUtils\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _ndarrayGemm = _interopRequireDefault(require(\"ndarray-gemm\"));\n\nvar activationProgramSources = _interopRequireWildcard(require(\"../../activations/programSources\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\nconst mapInputFragmentsProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 inputSize = textureSize(x, 0);\\n ivec2 outputSize = textureSize(indexMap, 0);\\n int out_x = int(float(outputSize[0]) * outTex.x);\\n int out_y = int(float(outputSize[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n int fragmentIndex = int(floor(float(rowIndex) / float(inputSize[1])));\\n rowIndex = int(mod(float(rowIndex), float(inputSize[1])));\\n colIndex = fragmentIndex * inputCols + colIndex;\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\nconst matMulProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D A;\\nuniform sampler2D B;\\nuniform sampler2D C;\\nuniform bool addC;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 A_size = textureSize(A, 0);\\n ivec2 B_size = textureSize(B, 0);\\n int out_x = int(float(B_size[0]) * outTex.x);\\n int out_y = int(float(A_size[1]) * outTex.y);\\n int commonDim = A_size[0];\\n\\n float sum = 0.;\\n for (int i = 0; i < commonDim; ++i) {\\n float a = texelFetch(A, ivec2(i, out_y), 0).r;\\n float b = texelFetch(B, ivec2(out_x, i), 0).r;\\n sum += a * b;\\n }\\n\\n if (addC) {\\n sum += texelFetch(C, ivec2(out_x, 0), 0).r;\\n }\\n\\n outColor = vec4(sum);\\n}\\n\";\n\nclass Conv2D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Conv2D';\n const {\n filters = 1,\n kernel_size = [3, 3],\n strides = [1, 1],\n padding = 'valid',\n data_format = 'channels_last',\n dilation_rate = [1, 1],\n activation = 'linear',\n use_bias = true\n } = attrs;\n\n if (Array.isArray(kernel_size)) {\n this.kernelShape = [filters, ...kernel_size];\n } else {\n this.kernelShape = [filters, kernel_size, kernel_size];\n }\n\n if (Array.isArray(strides)) {\n this.strides = strides;\n } else {\n this.strides = [strides, strides];\n }\n\n if (padding === 'valid' || padding === 'same') {\n this.padding = padding;\n } else {\n this.throwError('Invalid padding.');\n }\n\n if (data_format === 'channels_last' || data_format === 'channels_first') {\n this.dataFormat = data_format;\n } else {\n this.throwError('Only channels_last and channels_first data formats are allowed.');\n }\n\n if (Array.isArray(dilation_rate)) {\n this.dilationRate = dilation_rate;\n } else {\n this.dilationRate = [dilation_rate, dilation_rate];\n }\n\n if ((this.dilationRate[0] !== 1 || this.dilationRate[1] !== 1) && (this.strides[0] !== 1 || this.strides[1] !== 1)) {\n this.throwError(`Incompatible combination of dilation_rate with strides.`);\n }\n\n this.activation = activation;\n this.activationFunc = activations[activation];\n this.useBias = use_bias;\n this.params = this.useBias ? ['kernel', 'bias'] : ['kernel'];\n this.description = `${this.kernelShape[0]} ${this.kernelShape.slice(1).join('x')} filters`;\n this.description += this.strides.some(s => s > 1) ? `, ${this.strides.join('x')} striding` : '';\n this.description += this.padding === 'valid' ? `, no border padding` : ', pad to same borders';\n this.description += this.dilationRate.some(r => r > 1) ? `, ${this.dilationRate.join('x')} dilation` : '';\n this.description += this.activation !== 'linear' ? `, ${this.activation} activation` : '';\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n this.mapInputFragmentsProgram = _WebGL.webgl2.compileProgram(mapInputFragmentsProgramSource);\n this.matMulProgram = _WebGL.webgl2.compileProgram(matMulProgramSource);\n this.activationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.activation]);\n }\n }\n\n setWeights(weightsArr) {\n if (this.dataFormat === 'channels_first') {\n weightsArr[0].tensor = weightsArr[0].tensor.transpose(2, 3, 1, 0);\n }\n\n super.setWeights(weightsArr, false);\n\n this._w2row();\n\n if (this.gpu) {\n this.weights['kernel'] = this.wRowsMat;\n this.weights['kernel'].createGLTexture({\n type: '2d',\n format: 'float'\n });\n\n if (this.useBias) {\n this.weights['bias'].createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _calcOutputShape(inputShape) {\n if (this.outputShape && this.inputPadding) {\n return;\n }\n\n const inputRows = inputShape[0];\n const inputCols = inputShape[1];\n const [nbFilter, nbRow, nbCol] = this.kernelShape;\n const nbRowDilated = nbRow + (nbRow - 1) * (this.dilationRate[0] - 1);\n const nbColDilated = nbCol + (nbCol - 1) * (this.dilationRate[1] - 1);\n const outputRows = this.padding === 'same' ? Math.floor((inputRows + this.strides[0] - 1) / this.strides[0]) : Math.floor((inputRows - nbRowDilated + this.strides[0]) / this.strides[0]);\n const outputCols = this.padding === 'same' ? Math.floor((inputCols + this.strides[1] - 1) / this.strides[1]) : Math.floor((inputCols - nbColDilated + this.strides[1]) / this.strides[1]);\n const outputChannels = nbFilter;\n const paddingRow = this.padding === 'same' ? Math.max(0, Math.floor((outputRows - 1) * this.strides[0] + nbRowDilated - inputRows)) : 0;\n const paddingCol = this.padding === 'same' ? Math.max(0, Math.floor((outputCols - 1) * this.strides[1] + nbColDilated - inputCols)) : 0;\n const paddingRowBefore = Math.floor(paddingRow / 2);\n const paddingRowAfter = paddingRow - paddingRowBefore;\n const paddingColBefore = Math.floor(paddingCol / 2);\n const paddingColAfter = paddingCol - paddingColBefore;\n this.outputShape = [outputRows, outputCols, outputChannels];\n this.inputPadding = [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter];\n }\n\n _padInput(x, padValue = 0) {\n if (this.padding === 'same') {\n const [inputRows, inputCols, inputChannels] = x.tensor.shape;\n const [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter] = this.inputPadding;\n const newRows = inputRows + paddingRowBefore + paddingRowAfter;\n const newCols = inputCols + paddingColBefore + paddingColAfter;\n\n const _x = new _Tensor.default([], [newRows, newCols, inputChannels]);\n\n if (padValue !== 0) {\n _ndarrayOps.default.assigns(_x.tensor, padValue);\n }\n\n _ndarrayOps.default.assign(_x.tensor.hi(inputRows + paddingRowBefore, inputCols + paddingColBefore, inputChannels).lo(paddingRowBefore, paddingColBefore, 0), x.tensor);\n\n return _x;\n }\n\n return x;\n }\n\n _im2col(x) {\n const [inputRows, inputCols, inputChannels] = x.tensor.shape;\n const nbRow = this.kernelShape[1];\n const nbCol = this.kernelShape[2];\n const outputRows = this.outputShape[0];\n const outputCols = this.outputShape[1];\n const nbPatches = outputRows * outputCols;\n const patchLen = nbRow * nbCol * inputChannels;\n const nbRowDilated = nbRow + (nbRow - 1) * (this.dilationRate[0] - 1);\n const nbColDilated = nbCol + (nbCol - 1) * (this.dilationRate[1] - 1);\n\n if (!this.imColsMat) {\n this.imColsMat = new _Tensor.default([], [nbPatches, patchLen]);\n }\n\n if (nbRowDilated === 1 && nbColDilated === 1 && this.strides[0] === 1 && this.strides[1] === 1) {\n this.imColsMat.replaceTensorData(x.tensor.data);\n return this.imColsMat;\n }\n\n const patch = new _Tensor.default([], [nbRow, nbCol, inputChannels]);\n let offset = 0;\n\n for (let i = 0, limit = inputRows - nbRowDilated; i <= limit; i += this.strides[0]) {\n for (let j = 0, limit = inputCols - nbColDilated; j <= limit; j += this.strides[1]) {\n _ndarrayOps.default.assign(patch.tensor, x.tensor.hi(i + nbRowDilated, j + nbColDilated, inputChannels).lo(i, j, 0).step(this.dilationRate[0], this.dilationRate[1], 1));\n\n this.imColsMat.tensor.data.set(patch.tensor.data, offset);\n offset += patchLen;\n }\n }\n\n return this.imColsMat;\n }\n\n _w2row() {\n const inputChannels = this.weights['kernel'].tensor.shape[2];\n const [nbFilter, nbRow, nbCol] = this.kernelShape;\n const patchLen = nbRow * nbCol * inputChannels;\n this.wRowsMat = new _Tensor.default([], [patchLen, nbFilter]);\n const patch = new _Tensor.default([], [nbRow, nbCol, inputChannels]);\n const patchRaveled = new _Tensor.default([], [patchLen]);\n\n for (let n = 0; n < nbFilter; n++) {\n _ndarrayOps.default.assign(patch.tensor, this.weights['kernel'].tensor.pick(null, null, null, n));\n\n patchRaveled.replaceTensorData(patch.tensor.data);\n\n _ndarrayOps.default.assign(this.wRowsMat.tensor.pick(null, n), patchRaveled.tensor);\n }\n\n return this.wRowsMat;\n }\n\n _callCPU(x) {\n this.inputShape = x.tensor.shape;\n\n this._calcOutputShape(this.inputShape);\n\n x = this._padInput(x);\n\n this._im2col(x);\n\n const nbFilter = this.kernelShape[0];\n const outputRows = this.outputShape[0];\n const outputCols = this.outputShape[1];\n const nbPatches = outputRows * outputCols;\n const matMul = new _Tensor.default([], [nbPatches, nbFilter]);\n\n if (this.useBias) {\n for (let n = 0; n < nbFilter; n++) {\n _ndarrayOps.default.assigns(matMul.tensor.pick(null, n), this.weights['bias'].tensor.get(n));\n }\n }\n\n (0, _ndarrayGemm.default)(matMul.tensor, this.imColsMat.tensor, this.wRowsMat.tensor, 1, 1);\n this.output = new _Tensor.default([], this.outputShape);\n let outputChannelRaveled = new _Tensor.default([], [outputRows * outputCols]);\n let outputChannel = new _Tensor.default([], [outputRows, outputCols]);\n\n for (let n = 0; n < nbFilter; n++) {\n _ndarrayOps.default.assign(outputChannelRaveled.tensor, matMul.tensor.pick(null, n));\n\n outputChannel.replaceTensorData(outputChannelRaveled.tensor.data);\n\n _ndarrayOps.default.assign(this.output.tensor.pick(null, null, n), outputChannel.tensor);\n }\n\n this.activationFunc(this.output);\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n\n _createIndexMap(indicesForReshaped) {\n if (this.indexMap) {\n return;\n }\n\n let [inputRows, inputCols, inputChannels] = this.inputShape;\n let indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n\n if (this.padding === 'same') {\n const [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter] = this.inputPadding;\n inputRows = inputRows + paddingRowBefore + paddingRowAfter;\n inputCols = inputCols + paddingColBefore + paddingColAfter;\n const padValue = -1;\n indices = this._padInput(indices, padValue);\n }\n\n const nbRow = this.kernelShape[1];\n const nbCol = this.kernelShape[2];\n const outputRows = this.outputShape[0];\n const outputCols = this.outputShape[1];\n const nbPatches = outputRows * outputCols;\n const patchLen = nbRow * nbCol * inputChannels;\n const nbRowDilated = nbRow + (nbRow - 1) * (this.dilationRate[0] - 1);\n const nbColDilated = nbCol + (nbCol - 1) * (this.dilationRate[1] - 1);\n this.indexMap = new _Tensor.default([], [nbPatches, patchLen], {\n type: Int32Array\n });\n const indicesPatch = new _Tensor.default([], [nbRow, nbCol, inputChannels]);\n let offset = 0;\n\n for (let i = 0, limit = inputRows - nbRowDilated; i <= limit; i += this.strides[0]) {\n for (let j = 0, limit = inputCols - nbColDilated; j <= limit; j += this.strides[1]) {\n _ndarrayOps.default.assign(indicesPatch.tensor, indices.tensor.hi(i + nbRowDilated, j + nbColDilated, inputChannels).lo(i, j, 0).step(this.dilationRate[0], this.dilationRate[1], 1));\n\n this.indexMap.tensor.data.set(indicesPatch.tensor.data, offset);\n offset += patchLen;\n }\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int',\n supportsTextureFragments: true\n });\n }\n\n _callGPU(x) {\n let outputTextureShape;\n\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n\n this._calcOutputShape(this.inputShape);\n\n this._createIndexMap(x.indicesForReshaped);\n\n outputTextureShape = [this.indexMap.glTextureShape[0], this.weights['kernel'].glTextureShape[1]];\n } else {\n this.inputShape = x.tensor.shape;\n\n this._calcOutputShape(this.inputShape);\n\n x = this._padInput(x);\n\n this._im2col(x);\n\n this.imColsMat.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n outputTextureShape = [this.imColsMat.glTextureShape[0], this.weights['kernel'].glTextureShape[1]];\n }\n\n if (this.activation !== 'linear' && !this.outputPreactiv) {\n this.outputPreactiv = new _Tensor.default([], outputTextureShape);\n this.outputPreactiv.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.outputPreactiv.is2DReshaped = true;\n this.outputPreactiv.originalShape = this.outputShape;\n this.outputPreactiv.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.outputShape, false, -1);\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], outputTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.output.is2DReshaped = true;\n this.output.originalShape = this.outputShape;\n this.output.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.outputShape, false, -1);\n }\n\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n const hasFragments = Boolean(x.glTextureFragments);\n\n if (hasFragments) {\n x.convert2DRowFragmentedGLTextureToColStack();\n }\n\n if (!this.convProgram) {\n const convProgramSource = (0, _createGLSLProgram.default)('conv2d', this.output.glTextureFragmentShape ? this.output.glTextureFragmentShape : this.output.glTextureShape, x.glTextureFragmentShape ? x.glTextureFragmentShape : x.glTextureShape, this.indexMap.glTextureFragmentShape ? this.indexMap.glTextureFragmentShape : this.indexMap.glTextureShape, this.useBias, hasFragments);\n this.convProgram = _WebGL.webgl2.compileProgram(convProgramSource);\n }\n\n _WebGL.webgl2.runProgram({\n program: this.convProgram,\n output: this.activation === 'linear' ? this.output : this.outputPreactiv,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }, {\n input: this.weights['kernel'],\n name: 'kernel'\n }, ...(this.useBias ? [{\n input: this.weights['bias'],\n name: 'bias'\n }] : [])],\n supportsTextureFragments: true\n });\n\n if (hasFragments) {\n x.removeGLTextureFragmentsAsColStack();\n }\n } else {\n const matMulInputs = [{\n input: this.imColsMat,\n name: 'A'\n }, {\n input: this.weights['kernel'],\n name: 'B'\n }];\n\n if (this.useBias) {\n matMulInputs.push({\n input: this.weights['bias'],\n name: 'C'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.activation === 'linear' ? this.output : this.outputPreactiv,\n inputs: matMulInputs,\n uniforms: [{\n value: this.useBias ? 1 : 0,\n type: 'bool',\n name: 'addC'\n }],\n supportsTextureFragments: true\n });\n }\n\n if (this.activation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.activationProgram,\n output: this.output,\n inputs: [{\n input: this.outputPreactiv,\n name: 'x'\n }],\n supportsTextureFragments: true\n });\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n this.output.reshapeFrom2D();\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n }\n\n}\n\nexports.default = Conv2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = softplus;\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst _softplus = (0, _cwise.default)({\n args: ['array'],\n body: function (_x) {\n _x = Math.log(Math.exp(_x) + 1);\n }\n});\n\nfunction softplus(x) {\n _softplus(x.tensor);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = elu;\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst _elu = (0, _cwise.default)({\n args: ['array', 'scalar'],\n body: function (_x, alpha) {\n _x = Math.max(_x, 0) + alpha * (Math.exp(Math.min(_x, 0)) - 1);\n }\n});\n\nfunction elu(x, opts = {}) {\n const {\n alpha = 1.0\n } = opts;\n\n _elu(x.tensor, alpha);\n}","/*\n Copyright (C) 2013 Ariya Hidayat \n Copyright (C) 2013 Thaddee Tyl \n Copyright (C) 2013 Mathias Bynens \n Copyright (C) 2012 Ariya Hidayat \n Copyright (C) 2012 Mathias Bynens \n Copyright (C) 2012 Joost-Wim Boekesteijn \n Copyright (C) 2012 Kris Kowal \n Copyright (C) 2012 Yusuke Suzuki \n Copyright (C) 2012 Arpad Borsos \n Copyright (C) 2011 Ariya Hidayat \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n/*jslint bitwise:true plusplus:true */\n/*global esprima:true, define:true, exports:true, window: true,\nthrowErrorTolerant: true,\nthrowError: true, generateStatement: true, peek: true,\nparseAssignmentExpression: true, parseBlock: true, parseExpression: true,\nparseFunctionDeclaration: true, parseFunctionExpression: true,\nparseFunctionSourceElements: true, parseVariableIdentifier: true,\nparseLeftHandSideExpression: true,\nparseUnaryExpression: true,\nparseStatement: true, parseSourceElement: true */\n\n(function (root, factory) {\n 'use strict';\n\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js,\n // Rhino, and plain browser loading.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define(['exports'], factory);\n } else if (typeof exports !== 'undefined') {\n factory(exports);\n } else {\n factory((root.esprima = {}));\n }\n}(this, function (exports) {\n 'use strict';\n\n var Token,\n TokenName,\n FnExprTokens,\n Syntax,\n PropertyKind,\n Messages,\n Regex,\n SyntaxTreeDelegate,\n source,\n strict,\n index,\n lineNumber,\n lineStart,\n length,\n delegate,\n lookahead,\n state,\n extra;\n\n Token = {\n BooleanLiteral: 1,\n EOF: 2,\n Identifier: 3,\n Keyword: 4,\n NullLiteral: 5,\n NumericLiteral: 6,\n Punctuator: 7,\n StringLiteral: 8,\n RegularExpression: 9\n };\n\n TokenName = {};\n TokenName[Token.BooleanLiteral] = 'Boolean';\n TokenName[Token.EOF] = '';\n TokenName[Token.Identifier] = 'Identifier';\n TokenName[Token.Keyword] = 'Keyword';\n TokenName[Token.NullLiteral] = 'Null';\n TokenName[Token.NumericLiteral] = 'Numeric';\n TokenName[Token.Punctuator] = 'Punctuator';\n TokenName[Token.StringLiteral] = 'String';\n TokenName[Token.RegularExpression] = 'RegularExpression';\n\n // A function following one of those tokens is an expression.\n FnExprTokens = ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new',\n 'return', 'case', 'delete', 'throw', 'void',\n // assignment operators\n '=', '+=', '-=', '*=', '/=', '%=', '<<=', '>>=', '>>>=',\n '&=', '|=', '^=', ',',\n // binary/unary operators\n '+', '-', '*', '/', '%', '++', '--', '<<', '>>', '>>>', '&',\n '|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=',\n '<=', '<', '>', '!=', '!=='];\n\n Syntax = {\n AssignmentExpression: 'AssignmentExpression',\n ArrayExpression: 'ArrayExpression',\n BlockStatement: 'BlockStatement',\n BinaryExpression: 'BinaryExpression',\n BreakStatement: 'BreakStatement',\n CallExpression: 'CallExpression',\n CatchClause: 'CatchClause',\n ConditionalExpression: 'ConditionalExpression',\n ContinueStatement: 'ContinueStatement',\n DoWhileStatement: 'DoWhileStatement',\n DebuggerStatement: 'DebuggerStatement',\n EmptyStatement: 'EmptyStatement',\n ExpressionStatement: 'ExpressionStatement',\n ForStatement: 'ForStatement',\n ForInStatement: 'ForInStatement',\n FunctionDeclaration: 'FunctionDeclaration',\n FunctionExpression: 'FunctionExpression',\n Identifier: 'Identifier',\n IfStatement: 'IfStatement',\n Literal: 'Literal',\n LabeledStatement: 'LabeledStatement',\n LogicalExpression: 'LogicalExpression',\n MemberExpression: 'MemberExpression',\n NewExpression: 'NewExpression',\n ObjectExpression: 'ObjectExpression',\n Program: 'Program',\n Property: 'Property',\n ReturnStatement: 'ReturnStatement',\n SequenceExpression: 'SequenceExpression',\n SwitchStatement: 'SwitchStatement',\n SwitchCase: 'SwitchCase',\n ThisExpression: 'ThisExpression',\n ThrowStatement: 'ThrowStatement',\n TryStatement: 'TryStatement',\n UnaryExpression: 'UnaryExpression',\n UpdateExpression: 'UpdateExpression',\n VariableDeclaration: 'VariableDeclaration',\n VariableDeclarator: 'VariableDeclarator',\n WhileStatement: 'WhileStatement',\n WithStatement: 'WithStatement'\n };\n\n PropertyKind = {\n Data: 1,\n Get: 2,\n Set: 4\n };\n\n // Error messages should be identical to V8.\n Messages = {\n UnexpectedToken: 'Unexpected token %0',\n UnexpectedNumber: 'Unexpected number',\n UnexpectedString: 'Unexpected string',\n UnexpectedIdentifier: 'Unexpected identifier',\n UnexpectedReserved: 'Unexpected reserved word',\n UnexpectedEOS: 'Unexpected end of input',\n NewlineAfterThrow: 'Illegal newline after throw',\n InvalidRegExp: 'Invalid regular expression',\n UnterminatedRegExp: 'Invalid regular expression: missing /',\n InvalidLHSInAssignment: 'Invalid left-hand side in assignment',\n InvalidLHSInForIn: 'Invalid left-hand side in for-in',\n MultipleDefaultsInSwitch: 'More than one default clause in switch statement',\n NoCatchOrFinally: 'Missing catch or finally after try',\n UnknownLabel: 'Undefined label \\'%0\\'',\n Redeclaration: '%0 \\'%1\\' has already been declared',\n IllegalContinue: 'Illegal continue statement',\n IllegalBreak: 'Illegal break statement',\n IllegalReturn: 'Illegal return statement',\n StrictModeWith: 'Strict mode code may not include a with statement',\n StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode',\n StrictVarName: 'Variable name may not be eval or arguments in strict mode',\n StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode',\n StrictParamDupe: 'Strict mode function may not have duplicate parameter names',\n StrictFunctionName: 'Function name may not be eval or arguments in strict mode',\n StrictOctalLiteral: 'Octal literals are not allowed in strict mode.',\n StrictDelete: 'Delete of an unqualified identifier in strict mode.',\n StrictDuplicateProperty: 'Duplicate data property in object literal not allowed in strict mode',\n AccessorDataProperty: 'Object literal may not have data and accessor property with the same name',\n AccessorGetSet: 'Object literal may not have multiple get/set accessors with the same name',\n StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode',\n StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode',\n StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode',\n StrictReservedWord: 'Use of future reserved word in strict mode'\n };\n\n // See also tools/generate-unicode-regex.py.\n Regex = {\n NonAsciiIdentifierStart: new RegExp('[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097F\\u0985-\\u098C\\u098F\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\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F0\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]'),\n NonAsciiIdentifierPart: new RegExp('[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0\\u08A2-\\u08AC\\u08E4-\\u08FE\\u0900-\\u0963\\u0966-\\u096F\\u0971-\\u0977\\u0979-\\u097F\\u0981-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-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\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F0\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1D00-\\u1DE6\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA697\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A\\uAA7B\\uAA80-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE26\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]')\n };\n\n // Ensure the condition is true, otherwise throw an error.\n // This is only to have a better contract semantic, i.e. another safety net\n // to catch a logic error. The condition shall be fulfilled in normal case.\n // Do NOT use this to enforce a certain condition on any user input.\n\n function assert(condition, message) {\n /* istanbul ignore if */\n if (!condition) {\n throw new Error('ASSERT: ' + message);\n }\n }\n\n function isDecimalDigit(ch) {\n return (ch >= 48 && ch <= 57); // 0..9\n }\n\n function isHexDigit(ch) {\n return '0123456789abcdefABCDEF'.indexOf(ch) >= 0;\n }\n\n function isOctalDigit(ch) {\n return '01234567'.indexOf(ch) >= 0;\n }\n\n\n // 7.2 White Space\n\n function isWhiteSpace(ch) {\n return (ch === 0x20) || (ch === 0x09) || (ch === 0x0B) || (ch === 0x0C) || (ch === 0xA0) ||\n (ch >= 0x1680 && [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(ch) >= 0);\n }\n\n // 7.3 Line Terminators\n\n function isLineTerminator(ch) {\n return (ch === 0x0A) || (ch === 0x0D) || (ch === 0x2028) || (ch === 0x2029);\n }\n\n // 7.6 Identifier Names and Identifiers\n\n function isIdentifierStart(ch) {\n return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore)\n (ch >= 0x41 && ch <= 0x5A) || // A..Z\n (ch >= 0x61 && ch <= 0x7A) || // a..z\n (ch === 0x5C) || // \\ (backslash)\n ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch)));\n }\n\n function isIdentifierPart(ch) {\n return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore)\n (ch >= 0x41 && ch <= 0x5A) || // A..Z\n (ch >= 0x61 && ch <= 0x7A) || // a..z\n (ch >= 0x30 && ch <= 0x39) || // 0..9\n (ch === 0x5C) || // \\ (backslash)\n ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch)));\n }\n\n // 7.6.1.2 Future Reserved Words\n\n function isFutureReservedWord(id) {\n switch (id) {\n case 'class':\n case 'enum':\n case 'export':\n case 'extends':\n case 'import':\n case 'super':\n return true;\n default:\n return false;\n }\n }\n\n function isStrictModeReservedWord(id) {\n switch (id) {\n case 'implements':\n case 'interface':\n case 'package':\n case 'private':\n case 'protected':\n case 'public':\n case 'static':\n case 'yield':\n case 'let':\n return true;\n default:\n return false;\n }\n }\n\n function isRestrictedWord(id) {\n return id === 'eval' || id === 'arguments';\n }\n\n // 7.6.1.1 Keywords\n\n function isKeyword(id) {\n if (strict && isStrictModeReservedWord(id)) {\n return true;\n }\n\n // 'const' is specialized as Keyword in V8.\n // 'yield' and 'let' are for compatiblity with SpiderMonkey and ES.next.\n // Some others are from future reserved words.\n\n switch (id.length) {\n case 2:\n return (id === 'if') || (id === 'in') || (id === 'do');\n case 3:\n return (id === 'var') || (id === 'for') || (id === 'new') ||\n (id === 'try') || (id === 'let');\n case 4:\n return (id === 'this') || (id === 'else') || (id === 'case') ||\n (id === 'void') || (id === 'with') || (id === 'enum');\n case 5:\n return (id === 'while') || (id === 'break') || (id === 'catch') ||\n (id === 'throw') || (id === 'const') || (id === 'yield') ||\n (id === 'class') || (id === 'super');\n case 6:\n return (id === 'return') || (id === 'typeof') || (id === 'delete') ||\n (id === 'switch') || (id === 'export') || (id === 'import');\n case 7:\n return (id === 'default') || (id === 'finally') || (id === 'extends');\n case 8:\n return (id === 'function') || (id === 'continue') || (id === 'debugger');\n case 10:\n return (id === 'instanceof');\n default:\n return false;\n }\n }\n\n // 7.4 Comments\n\n function addComment(type, value, start, end, loc) {\n var comment, attacher;\n\n assert(typeof start === 'number', 'Comment must have valid position');\n\n // Because the way the actual token is scanned, often the comments\n // (if any) are skipped twice during the lexical analysis.\n // Thus, we need to skip adding a comment if the comment array already\n // handled it.\n if (state.lastCommentStart >= start) {\n return;\n }\n state.lastCommentStart = start;\n\n comment = {\n type: type,\n value: value\n };\n if (extra.range) {\n comment.range = [start, end];\n }\n if (extra.loc) {\n comment.loc = loc;\n }\n extra.comments.push(comment);\n if (extra.attachComment) {\n extra.leadingComments.push(comment);\n extra.trailingComments.push(comment);\n }\n }\n\n function skipSingleLineComment(offset) {\n var start, loc, ch, comment;\n\n start = index - offset;\n loc = {\n start: {\n line: lineNumber,\n column: index - lineStart - offset\n }\n };\n\n while (index < length) {\n ch = source.charCodeAt(index);\n ++index;\n if (isLineTerminator(ch)) {\n if (extra.comments) {\n comment = source.slice(start + offset, index - 1);\n loc.end = {\n line: lineNumber,\n column: index - lineStart - 1\n };\n addComment('Line', comment, start, index - 1, loc);\n }\n if (ch === 13 && source.charCodeAt(index) === 10) {\n ++index;\n }\n ++lineNumber;\n lineStart = index;\n return;\n }\n }\n\n if (extra.comments) {\n comment = source.slice(start + offset, index);\n loc.end = {\n line: lineNumber,\n column: index - lineStart\n };\n addComment('Line', comment, start, index, loc);\n }\n }\n\n function skipMultiLineComment() {\n var start, loc, ch, comment;\n\n if (extra.comments) {\n start = index - 2;\n loc = {\n start: {\n line: lineNumber,\n column: index - lineStart - 2\n }\n };\n }\n\n while (index < length) {\n ch = source.charCodeAt(index);\n if (isLineTerminator(ch)) {\n if (ch === 0x0D && source.charCodeAt(index + 1) === 0x0A) {\n ++index;\n }\n ++lineNumber;\n ++index;\n lineStart = index;\n if (index >= length) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n } else if (ch === 0x2A) {\n // Block comment ends with '*/'.\n if (source.charCodeAt(index + 1) === 0x2F) {\n ++index;\n ++index;\n if (extra.comments) {\n comment = source.slice(start + 2, index - 2);\n loc.end = {\n line: lineNumber,\n column: index - lineStart\n };\n addComment('Block', comment, start, index, loc);\n }\n return;\n }\n ++index;\n } else {\n ++index;\n }\n }\n\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n function skipComment() {\n var ch, start;\n\n start = (index === 0);\n while (index < length) {\n ch = source.charCodeAt(index);\n\n if (isWhiteSpace(ch)) {\n ++index;\n } else if (isLineTerminator(ch)) {\n ++index;\n if (ch === 0x0D && source.charCodeAt(index) === 0x0A) {\n ++index;\n }\n ++lineNumber;\n lineStart = index;\n start = true;\n } else if (ch === 0x2F) { // U+002F is '/'\n ch = source.charCodeAt(index + 1);\n if (ch === 0x2F) {\n ++index;\n ++index;\n skipSingleLineComment(2);\n start = true;\n } else if (ch === 0x2A) { // U+002A is '*'\n ++index;\n ++index;\n skipMultiLineComment();\n } else {\n break;\n }\n } else if (start && ch === 0x2D) { // U+002D is '-'\n // U+003E is '>'\n if ((source.charCodeAt(index + 1) === 0x2D) && (source.charCodeAt(index + 2) === 0x3E)) {\n // '-->' is a single-line comment\n index += 3;\n skipSingleLineComment(3);\n } else {\n break;\n }\n } else if (ch === 0x3C) { // U+003C is '<'\n if (source.slice(index + 1, index + 4) === '!--') {\n ++index; // `<`\n ++index; // `!`\n ++index; // `-`\n ++index; // `-`\n skipSingleLineComment(4);\n } else {\n break;\n }\n } else {\n break;\n }\n }\n }\n\n function scanHexEscape(prefix) {\n var i, len, ch, code = 0;\n\n len = (prefix === 'u') ? 4 : 2;\n for (i = 0; i < len; ++i) {\n if (index < length && isHexDigit(source[index])) {\n ch = source[index++];\n code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase());\n } else {\n return '';\n }\n }\n return String.fromCharCode(code);\n }\n\n function getEscapedIdentifier() {\n var ch, id;\n\n ch = source.charCodeAt(index++);\n id = String.fromCharCode(ch);\n\n // '\\u' (U+005C, U+0075) denotes an escaped character.\n if (ch === 0x5C) {\n if (source.charCodeAt(index) !== 0x75) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n ++index;\n ch = scanHexEscape('u');\n if (!ch || ch === '\\\\' || !isIdentifierStart(ch.charCodeAt(0))) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n id = ch;\n }\n\n while (index < length) {\n ch = source.charCodeAt(index);\n if (!isIdentifierPart(ch)) {\n break;\n }\n ++index;\n id += String.fromCharCode(ch);\n\n // '\\u' (U+005C, U+0075) denotes an escaped character.\n if (ch === 0x5C) {\n id = id.substr(0, id.length - 1);\n if (source.charCodeAt(index) !== 0x75) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n ++index;\n ch = scanHexEscape('u');\n if (!ch || ch === '\\\\' || !isIdentifierPart(ch.charCodeAt(0))) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n id += ch;\n }\n }\n\n return id;\n }\n\n function getIdentifier() {\n var start, ch;\n\n start = index++;\n while (index < length) {\n ch = source.charCodeAt(index);\n if (ch === 0x5C) {\n // Blackslash (U+005C) marks Unicode escape sequence.\n index = start;\n return getEscapedIdentifier();\n }\n if (isIdentifierPart(ch)) {\n ++index;\n } else {\n break;\n }\n }\n\n return source.slice(start, index);\n }\n\n function scanIdentifier() {\n var start, id, type;\n\n start = index;\n\n // Backslash (U+005C) starts an escaped character.\n id = (source.charCodeAt(index) === 0x5C) ? getEscapedIdentifier() : getIdentifier();\n\n // There is no keyword or literal with only one character.\n // Thus, it must be an identifier.\n if (id.length === 1) {\n type = Token.Identifier;\n } else if (isKeyword(id)) {\n type = Token.Keyword;\n } else if (id === 'null') {\n type = Token.NullLiteral;\n } else if (id === 'true' || id === 'false') {\n type = Token.BooleanLiteral;\n } else {\n type = Token.Identifier;\n }\n\n return {\n type: type,\n value: id,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n\n // 7.7 Punctuators\n\n function scanPunctuator() {\n var start = index,\n code = source.charCodeAt(index),\n code2,\n ch1 = source[index],\n ch2,\n ch3,\n ch4;\n\n switch (code) {\n\n // Check for most common single-character punctuators.\n case 0x2E: // . dot\n case 0x28: // ( open bracket\n case 0x29: // ) close bracket\n case 0x3B: // ; semicolon\n case 0x2C: // , comma\n case 0x7B: // { open curly brace\n case 0x7D: // } close curly brace\n case 0x5B: // [\n case 0x5D: // ]\n case 0x3A: // :\n case 0x3F: // ?\n case 0x7E: // ~\n ++index;\n if (extra.tokenize) {\n if (code === 0x28) {\n extra.openParenToken = extra.tokens.length;\n } else if (code === 0x7B) {\n extra.openCurlyToken = extra.tokens.length;\n }\n }\n return {\n type: Token.Punctuator,\n value: String.fromCharCode(code),\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n\n default:\n code2 = source.charCodeAt(index + 1);\n\n // '=' (U+003D) marks an assignment or comparison operator.\n if (code2 === 0x3D) {\n switch (code) {\n case 0x2B: // +\n case 0x2D: // -\n case 0x2F: // /\n case 0x3C: // <\n case 0x3E: // >\n case 0x5E: // ^\n case 0x7C: // |\n case 0x25: // %\n case 0x26: // &\n case 0x2A: // *\n index += 2;\n return {\n type: Token.Punctuator,\n value: String.fromCharCode(code) + String.fromCharCode(code2),\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n\n case 0x21: // !\n case 0x3D: // =\n index += 2;\n\n // !== and ===\n if (source.charCodeAt(index) === 0x3D) {\n ++index;\n }\n return {\n type: Token.Punctuator,\n value: source.slice(start, index),\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n }\n }\n\n // 4-character punctuator: >>>=\n\n ch4 = source.substr(index, 4);\n\n if (ch4 === '>>>=') {\n index += 4;\n return {\n type: Token.Punctuator,\n value: ch4,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n // 3-character punctuators: === !== >>> <<= >>=\n\n ch3 = ch4.substr(0, 3);\n\n if (ch3 === '>>>' || ch3 === '<<=' || ch3 === '>>=') {\n index += 3;\n return {\n type: Token.Punctuator,\n value: ch3,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n // Other 2-character punctuators: ++ -- << >> && ||\n ch2 = ch3.substr(0, 2);\n\n if ((ch1 === ch2[1] && ('+-<>&|'.indexOf(ch1) >= 0)) || ch2 === '=>') {\n index += 2;\n return {\n type: Token.Punctuator,\n value: ch2,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n // 1-character punctuators: < > = ! + - * % & | ^ /\n if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) {\n ++index;\n return {\n type: Token.Punctuator,\n value: ch1,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n // 7.8.3 Numeric Literals\n\n function scanHexLiteral(start) {\n var number = '';\n\n while (index < length) {\n if (!isHexDigit(source[index])) {\n break;\n }\n number += source[index++];\n }\n\n if (number.length === 0) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n if (isIdentifierStart(source.charCodeAt(index))) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n return {\n type: Token.NumericLiteral,\n value: parseInt('0x' + number, 16),\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n function scanOctalLiteral(start) {\n var number = '0' + source[index++];\n while (index < length) {\n if (!isOctalDigit(source[index])) {\n break;\n }\n number += source[index++];\n }\n\n if (isIdentifierStart(source.charCodeAt(index)) || isDecimalDigit(source.charCodeAt(index))) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n return {\n type: Token.NumericLiteral,\n value: parseInt(number, 8),\n octal: true,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n function isImplicitOctalLiteral() {\n var i, ch;\n\n // Implicit octal, unless there is a non-octal digit.\n // (Annex B.1.1 on Numeric Literals)\n for (i = index + 1; i < length; ++i) {\n ch = source[i];\n if (ch === '8' || ch === '9') {\n return false;\n }\n if (!isOctalDigit(ch)) {\n return true;\n }\n }\n\n return true;\n }\n\n function scanNumericLiteral() {\n var number, start, ch;\n\n ch = source[index];\n assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'),\n 'Numeric literal must start with a decimal digit or a decimal point');\n\n start = index;\n number = '';\n if (ch !== '.') {\n number = source[index++];\n ch = source[index];\n\n // Hex number starts with '0x'.\n // Octal number starts with '0'.\n if (number === '0') {\n if (ch === 'x' || ch === 'X') {\n ++index;\n return scanHexLiteral(start);\n }\n if (isOctalDigit(ch)) {\n if (isImplicitOctalLiteral()) {\n return scanOctalLiteral(start);\n }\n }\n }\n\n while (isDecimalDigit(source.charCodeAt(index))) {\n number += source[index++];\n }\n ch = source[index];\n }\n\n if (ch === '.') {\n number += source[index++];\n while (isDecimalDigit(source.charCodeAt(index))) {\n number += source[index++];\n }\n ch = source[index];\n }\n\n if (ch === 'e' || ch === 'E') {\n number += source[index++];\n\n ch = source[index];\n if (ch === '+' || ch === '-') {\n number += source[index++];\n }\n if (isDecimalDigit(source.charCodeAt(index))) {\n while (isDecimalDigit(source.charCodeAt(index))) {\n number += source[index++];\n }\n } else {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n }\n\n if (isIdentifierStart(source.charCodeAt(index))) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n return {\n type: Token.NumericLiteral,\n value: parseFloat(number),\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n // 7.8.4 String Literals\n\n function scanStringLiteral() {\n var str = '', quote, start, ch, code, unescaped, restore, octal = false, startLineNumber, startLineStart;\n startLineNumber = lineNumber;\n startLineStart = lineStart;\n\n quote = source[index];\n assert((quote === '\\'' || quote === '\"'),\n 'String literal must starts with a quote');\n\n start = index;\n ++index;\n\n while (index < length) {\n ch = source[index++];\n\n if (ch === quote) {\n quote = '';\n break;\n } else if (ch === '\\\\') {\n ch = source[index++];\n if (!ch || !isLineTerminator(ch.charCodeAt(0))) {\n switch (ch) {\n case 'u':\n case 'x':\n restore = index;\n unescaped = scanHexEscape(ch);\n if (unescaped) {\n str += unescaped;\n } else {\n index = restore;\n str += ch;\n }\n break;\n case 'n':\n str += '\\n';\n break;\n case 'r':\n str += '\\r';\n break;\n case 't':\n str += '\\t';\n break;\n case 'b':\n str += '\\b';\n break;\n case 'f':\n str += '\\f';\n break;\n case 'v':\n str += '\\x0B';\n break;\n\n default:\n if (isOctalDigit(ch)) {\n code = '01234567'.indexOf(ch);\n\n // \\0 is not octal escape sequence\n if (code !== 0) {\n octal = true;\n }\n\n if (index < length && isOctalDigit(source[index])) {\n octal = true;\n code = code * 8 + '01234567'.indexOf(source[index++]);\n\n // 3 digits are only allowed when string starts\n // with 0, 1, 2, 3\n if ('0123'.indexOf(ch) >= 0 &&\n index < length &&\n isOctalDigit(source[index])) {\n code = code * 8 + '01234567'.indexOf(source[index++]);\n }\n }\n str += String.fromCharCode(code);\n } else {\n str += ch;\n }\n break;\n }\n } else {\n ++lineNumber;\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n lineStart = index;\n }\n } else if (isLineTerminator(ch.charCodeAt(0))) {\n break;\n } else {\n str += ch;\n }\n }\n\n if (quote !== '') {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n return {\n type: Token.StringLiteral,\n value: str,\n octal: octal,\n startLineNumber: startLineNumber,\n startLineStart: startLineStart,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n function testRegExp(pattern, flags) {\n var value;\n try {\n value = new RegExp(pattern, flags);\n } catch (e) {\n throwError({}, Messages.InvalidRegExp);\n }\n return value;\n }\n\n function scanRegExpBody() {\n var ch, str, classMarker, terminated, body;\n\n ch = source[index];\n assert(ch === '/', 'Regular expression literal must start with a slash');\n str = source[index++];\n\n classMarker = false;\n terminated = false;\n while (index < length) {\n ch = source[index++];\n str += ch;\n if (ch === '\\\\') {\n ch = source[index++];\n // ECMA-262 7.8.5\n if (isLineTerminator(ch.charCodeAt(0))) {\n throwError({}, Messages.UnterminatedRegExp);\n }\n str += ch;\n } else if (isLineTerminator(ch.charCodeAt(0))) {\n throwError({}, Messages.UnterminatedRegExp);\n } else if (classMarker) {\n if (ch === ']') {\n classMarker = false;\n }\n } else {\n if (ch === '/') {\n terminated = true;\n break;\n } else if (ch === '[') {\n classMarker = true;\n }\n }\n }\n\n if (!terminated) {\n throwError({}, Messages.UnterminatedRegExp);\n }\n\n // Exclude leading and trailing slash.\n body = str.substr(1, str.length - 2);\n return {\n value: body,\n literal: str\n };\n }\n\n function scanRegExpFlags() {\n var ch, str, flags, restore;\n\n str = '';\n flags = '';\n while (index < length) {\n ch = source[index];\n if (!isIdentifierPart(ch.charCodeAt(0))) {\n break;\n }\n\n ++index;\n if (ch === '\\\\' && index < length) {\n ch = source[index];\n if (ch === 'u') {\n ++index;\n restore = index;\n ch = scanHexEscape('u');\n if (ch) {\n flags += ch;\n for (str += '\\\\u'; restore < index; ++restore) {\n str += source[restore];\n }\n } else {\n index = restore;\n flags += 'u';\n str += '\\\\u';\n }\n throwErrorTolerant({}, Messages.UnexpectedToken, 'ILLEGAL');\n } else {\n str += '\\\\';\n throwErrorTolerant({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n } else {\n flags += ch;\n str += ch;\n }\n }\n\n return {\n value: flags,\n literal: str\n };\n }\n\n function scanRegExp() {\n var start, body, flags, pattern, value;\n\n lookahead = null;\n skipComment();\n start = index;\n\n body = scanRegExpBody();\n flags = scanRegExpFlags();\n value = testRegExp(body.value, flags.value);\n\n if (extra.tokenize) {\n return {\n type: Token.RegularExpression,\n value: value,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }\n\n return {\n literal: body.literal + flags.literal,\n value: value,\n start: start,\n end: index\n };\n }\n\n function collectRegex() {\n var pos, loc, regex, token;\n\n skipComment();\n\n pos = index;\n loc = {\n start: {\n line: lineNumber,\n column: index - lineStart\n }\n };\n\n regex = scanRegExp();\n loc.end = {\n line: lineNumber,\n column: index - lineStart\n };\n\n /* istanbul ignore next */\n if (!extra.tokenize) {\n // Pop the previous token, which is likely '/' or '/='\n if (extra.tokens.length > 0) {\n token = extra.tokens[extra.tokens.length - 1];\n if (token.range[0] === pos && token.type === 'Punctuator') {\n if (token.value === '/' || token.value === '/=') {\n extra.tokens.pop();\n }\n }\n }\n\n extra.tokens.push({\n type: 'RegularExpression',\n value: regex.literal,\n range: [pos, index],\n loc: loc\n });\n }\n\n return regex;\n }\n\n function isIdentifierName(token) {\n return token.type === Token.Identifier ||\n token.type === Token.Keyword ||\n token.type === Token.BooleanLiteral ||\n token.type === Token.NullLiteral;\n }\n\n function advanceSlash() {\n var prevToken,\n checkToken;\n // Using the following algorithm:\n // https://github.com/mozilla/sweet.js/wiki/design\n prevToken = extra.tokens[extra.tokens.length - 1];\n if (!prevToken) {\n // Nothing before that: it cannot be a division.\n return collectRegex();\n }\n if (prevToken.type === 'Punctuator') {\n if (prevToken.value === ']') {\n return scanPunctuator();\n }\n if (prevToken.value === ')') {\n checkToken = extra.tokens[extra.openParenToken - 1];\n if (checkToken &&\n checkToken.type === 'Keyword' &&\n (checkToken.value === 'if' ||\n checkToken.value === 'while' ||\n checkToken.value === 'for' ||\n checkToken.value === 'with')) {\n return collectRegex();\n }\n return scanPunctuator();\n }\n if (prevToken.value === '}') {\n // Dividing a function by anything makes little sense,\n // but we have to check for that.\n if (extra.tokens[extra.openCurlyToken - 3] &&\n extra.tokens[extra.openCurlyToken - 3].type === 'Keyword') {\n // Anonymous function.\n checkToken = extra.tokens[extra.openCurlyToken - 4];\n if (!checkToken) {\n return scanPunctuator();\n }\n } else if (extra.tokens[extra.openCurlyToken - 4] &&\n extra.tokens[extra.openCurlyToken - 4].type === 'Keyword') {\n // Named function.\n checkToken = extra.tokens[extra.openCurlyToken - 5];\n if (!checkToken) {\n return collectRegex();\n }\n } else {\n return scanPunctuator();\n }\n // checkToken determines whether the function is\n // a declaration or an expression.\n if (FnExprTokens.indexOf(checkToken.value) >= 0) {\n // It is an expression.\n return scanPunctuator();\n }\n // It is a declaration.\n return collectRegex();\n }\n return collectRegex();\n }\n if (prevToken.type === 'Keyword' && prevToken.value !== 'this') {\n return collectRegex();\n }\n return scanPunctuator();\n }\n\n function advance() {\n var ch;\n\n skipComment();\n\n if (index >= length) {\n return {\n type: Token.EOF,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: index,\n end: index\n };\n }\n\n ch = source.charCodeAt(index);\n\n if (isIdentifierStart(ch)) {\n return scanIdentifier();\n }\n\n // Very common: ( and ) and ;\n if (ch === 0x28 || ch === 0x29 || ch === 0x3B) {\n return scanPunctuator();\n }\n\n // String literal starts with single quote (U+0027) or double quote (U+0022).\n if (ch === 0x27 || ch === 0x22) {\n return scanStringLiteral();\n }\n\n\n // Dot (.) U+002E can also start a floating-point number, hence the need\n // to check the next character.\n if (ch === 0x2E) {\n if (isDecimalDigit(source.charCodeAt(index + 1))) {\n return scanNumericLiteral();\n }\n return scanPunctuator();\n }\n\n if (isDecimalDigit(ch)) {\n return scanNumericLiteral();\n }\n\n // Slash (/) U+002F can also start a regex.\n if (extra.tokenize && ch === 0x2F) {\n return advanceSlash();\n }\n\n return scanPunctuator();\n }\n\n function collectToken() {\n var loc, token, range, value;\n\n skipComment();\n loc = {\n start: {\n line: lineNumber,\n column: index - lineStart\n }\n };\n\n token = advance();\n loc.end = {\n line: lineNumber,\n column: index - lineStart\n };\n\n if (token.type !== Token.EOF) {\n value = source.slice(token.start, token.end);\n extra.tokens.push({\n type: TokenName[token.type],\n value: value,\n range: [token.start, token.end],\n loc: loc\n });\n }\n\n return token;\n }\n\n function lex() {\n var token;\n\n token = lookahead;\n index = token.end;\n lineNumber = token.lineNumber;\n lineStart = token.lineStart;\n\n lookahead = (typeof extra.tokens !== 'undefined') ? collectToken() : advance();\n\n index = token.end;\n lineNumber = token.lineNumber;\n lineStart = token.lineStart;\n\n return token;\n }\n\n function peek() {\n var pos, line, start;\n\n pos = index;\n line = lineNumber;\n start = lineStart;\n lookahead = (typeof extra.tokens !== 'undefined') ? collectToken() : advance();\n index = pos;\n lineNumber = line;\n lineStart = start;\n }\n\n function Position(line, column) {\n this.line = line;\n this.column = column;\n }\n\n function SourceLocation(startLine, startColumn, line, column) {\n this.start = new Position(startLine, startColumn);\n this.end = new Position(line, column);\n }\n\n SyntaxTreeDelegate = {\n\n name: 'SyntaxTree',\n\n processComment: function (node) {\n var lastChild, trailingComments;\n\n if (node.type === Syntax.Program) {\n if (node.body.length > 0) {\n return;\n }\n }\n\n if (extra.trailingComments.length > 0) {\n if (extra.trailingComments[0].range[0] >= node.range[1]) {\n trailingComments = extra.trailingComments;\n extra.trailingComments = [];\n } else {\n extra.trailingComments.length = 0;\n }\n } else {\n if (extra.bottomRightStack.length > 0 &&\n extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments &&\n extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments[0].range[0] >= node.range[1]) {\n trailingComments = extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments;\n delete extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments;\n }\n }\n\n // Eating the stack.\n while (extra.bottomRightStack.length > 0 && extra.bottomRightStack[extra.bottomRightStack.length - 1].range[0] >= node.range[0]) {\n lastChild = extra.bottomRightStack.pop();\n }\n\n if (lastChild) {\n if (lastChild.leadingComments && lastChild.leadingComments[lastChild.leadingComments.length - 1].range[1] <= node.range[0]) {\n node.leadingComments = lastChild.leadingComments;\n delete lastChild.leadingComments;\n }\n } else if (extra.leadingComments.length > 0 && extra.leadingComments[extra.leadingComments.length - 1].range[1] <= node.range[0]) {\n node.leadingComments = extra.leadingComments;\n extra.leadingComments = [];\n }\n\n\n if (trailingComments) {\n node.trailingComments = trailingComments;\n }\n\n extra.bottomRightStack.push(node);\n },\n\n markEnd: function (node, startToken) {\n if (extra.range) {\n node.range = [startToken.start, index];\n }\n if (extra.loc) {\n node.loc = new SourceLocation(\n startToken.startLineNumber === undefined ? startToken.lineNumber : startToken.startLineNumber,\n startToken.start - (startToken.startLineStart === undefined ? startToken.lineStart : startToken.startLineStart),\n lineNumber,\n index - lineStart\n );\n this.postProcess(node);\n }\n\n if (extra.attachComment) {\n this.processComment(node);\n }\n return node;\n },\n\n postProcess: function (node) {\n if (extra.source) {\n node.loc.source = extra.source;\n }\n return node;\n },\n\n createArrayExpression: function (elements) {\n return {\n type: Syntax.ArrayExpression,\n elements: elements\n };\n },\n\n createAssignmentExpression: function (operator, left, right) {\n return {\n type: Syntax.AssignmentExpression,\n operator: operator,\n left: left,\n right: right\n };\n },\n\n createBinaryExpression: function (operator, left, right) {\n var type = (operator === '||' || operator === '&&') ? Syntax.LogicalExpression :\n Syntax.BinaryExpression;\n return {\n type: type,\n operator: operator,\n left: left,\n right: right\n };\n },\n\n createBlockStatement: function (body) {\n return {\n type: Syntax.BlockStatement,\n body: body\n };\n },\n\n createBreakStatement: function (label) {\n return {\n type: Syntax.BreakStatement,\n label: label\n };\n },\n\n createCallExpression: function (callee, args) {\n return {\n type: Syntax.CallExpression,\n callee: callee,\n 'arguments': args\n };\n },\n\n createCatchClause: function (param, body) {\n return {\n type: Syntax.CatchClause,\n param: param,\n body: body\n };\n },\n\n createConditionalExpression: function (test, consequent, alternate) {\n return {\n type: Syntax.ConditionalExpression,\n test: test,\n consequent: consequent,\n alternate: alternate\n };\n },\n\n createContinueStatement: function (label) {\n return {\n type: Syntax.ContinueStatement,\n label: label\n };\n },\n\n createDebuggerStatement: function () {\n return {\n type: Syntax.DebuggerStatement\n };\n },\n\n createDoWhileStatement: function (body, test) {\n return {\n type: Syntax.DoWhileStatement,\n body: body,\n test: test\n };\n },\n\n createEmptyStatement: function () {\n return {\n type: Syntax.EmptyStatement\n };\n },\n\n createExpressionStatement: function (expression) {\n return {\n type: Syntax.ExpressionStatement,\n expression: expression\n };\n },\n\n createForStatement: function (init, test, update, body) {\n return {\n type: Syntax.ForStatement,\n init: init,\n test: test,\n update: update,\n body: body\n };\n },\n\n createForInStatement: function (left, right, body) {\n return {\n type: Syntax.ForInStatement,\n left: left,\n right: right,\n body: body,\n each: false\n };\n },\n\n createFunctionDeclaration: function (id, params, defaults, body) {\n return {\n type: Syntax.FunctionDeclaration,\n id: id,\n params: params,\n defaults: defaults,\n body: body,\n rest: null,\n generator: false,\n expression: false\n };\n },\n\n createFunctionExpression: function (id, params, defaults, body) {\n return {\n type: Syntax.FunctionExpression,\n id: id,\n params: params,\n defaults: defaults,\n body: body,\n rest: null,\n generator: false,\n expression: false\n };\n },\n\n createIdentifier: function (name) {\n return {\n type: Syntax.Identifier,\n name: name\n };\n },\n\n createIfStatement: function (test, consequent, alternate) {\n return {\n type: Syntax.IfStatement,\n test: test,\n consequent: consequent,\n alternate: alternate\n };\n },\n\n createLabeledStatement: function (label, body) {\n return {\n type: Syntax.LabeledStatement,\n label: label,\n body: body\n };\n },\n\n createLiteral: function (token) {\n return {\n type: Syntax.Literal,\n value: token.value,\n raw: source.slice(token.start, token.end)\n };\n },\n\n createMemberExpression: function (accessor, object, property) {\n return {\n type: Syntax.MemberExpression,\n computed: accessor === '[',\n object: object,\n property: property\n };\n },\n\n createNewExpression: function (callee, args) {\n return {\n type: Syntax.NewExpression,\n callee: callee,\n 'arguments': args\n };\n },\n\n createObjectExpression: function (properties) {\n return {\n type: Syntax.ObjectExpression,\n properties: properties\n };\n },\n\n createPostfixExpression: function (operator, argument) {\n return {\n type: Syntax.UpdateExpression,\n operator: operator,\n argument: argument,\n prefix: false\n };\n },\n\n createProgram: function (body) {\n return {\n type: Syntax.Program,\n body: body\n };\n },\n\n createProperty: function (kind, key, value) {\n return {\n type: Syntax.Property,\n key: key,\n value: value,\n kind: kind\n };\n },\n\n createReturnStatement: function (argument) {\n return {\n type: Syntax.ReturnStatement,\n argument: argument\n };\n },\n\n createSequenceExpression: function (expressions) {\n return {\n type: Syntax.SequenceExpression,\n expressions: expressions\n };\n },\n\n createSwitchCase: function (test, consequent) {\n return {\n type: Syntax.SwitchCase,\n test: test,\n consequent: consequent\n };\n },\n\n createSwitchStatement: function (discriminant, cases) {\n return {\n type: Syntax.SwitchStatement,\n discriminant: discriminant,\n cases: cases\n };\n },\n\n createThisExpression: function () {\n return {\n type: Syntax.ThisExpression\n };\n },\n\n createThrowStatement: function (argument) {\n return {\n type: Syntax.ThrowStatement,\n argument: argument\n };\n },\n\n createTryStatement: function (block, guardedHandlers, handlers, finalizer) {\n return {\n type: Syntax.TryStatement,\n block: block,\n guardedHandlers: guardedHandlers,\n handlers: handlers,\n finalizer: finalizer\n };\n },\n\n createUnaryExpression: function (operator, argument) {\n if (operator === '++' || operator === '--') {\n return {\n type: Syntax.UpdateExpression,\n operator: operator,\n argument: argument,\n prefix: true\n };\n }\n return {\n type: Syntax.UnaryExpression,\n operator: operator,\n argument: argument,\n prefix: true\n };\n },\n\n createVariableDeclaration: function (declarations, kind) {\n return {\n type: Syntax.VariableDeclaration,\n declarations: declarations,\n kind: kind\n };\n },\n\n createVariableDeclarator: function (id, init) {\n return {\n type: Syntax.VariableDeclarator,\n id: id,\n init: init\n };\n },\n\n createWhileStatement: function (test, body) {\n return {\n type: Syntax.WhileStatement,\n test: test,\n body: body\n };\n },\n\n createWithStatement: function (object, body) {\n return {\n type: Syntax.WithStatement,\n object: object,\n body: body\n };\n }\n };\n\n // Return true if there is a line terminator before the next token.\n\n function peekLineTerminator() {\n var pos, line, start, found;\n\n pos = index;\n line = lineNumber;\n start = lineStart;\n skipComment();\n found = lineNumber !== line;\n index = pos;\n lineNumber = line;\n lineStart = start;\n\n return found;\n }\n\n // Throw an exception\n\n function throwError(token, messageFormat) {\n var error,\n args = Array.prototype.slice.call(arguments, 2),\n msg = messageFormat.replace(\n /%(\\d)/g,\n function (whole, index) {\n assert(index < args.length, 'Message reference must be in range');\n return args[index];\n }\n );\n\n if (typeof token.lineNumber === 'number') {\n error = new Error('Line ' + token.lineNumber + ': ' + msg);\n error.index = token.start;\n error.lineNumber = token.lineNumber;\n error.column = token.start - lineStart + 1;\n } else {\n error = new Error('Line ' + lineNumber + ': ' + msg);\n error.index = index;\n error.lineNumber = lineNumber;\n error.column = index - lineStart + 1;\n }\n\n error.description = msg;\n throw error;\n }\n\n function throwErrorTolerant() {\n try {\n throwError.apply(null, arguments);\n } catch (e) {\n if (extra.errors) {\n extra.errors.push(e);\n } else {\n throw e;\n }\n }\n }\n\n\n // Throw an exception because of the token.\n\n function throwUnexpected(token) {\n if (token.type === Token.EOF) {\n throwError(token, Messages.UnexpectedEOS);\n }\n\n if (token.type === Token.NumericLiteral) {\n throwError(token, Messages.UnexpectedNumber);\n }\n\n if (token.type === Token.StringLiteral) {\n throwError(token, Messages.UnexpectedString);\n }\n\n if (token.type === Token.Identifier) {\n throwError(token, Messages.UnexpectedIdentifier);\n }\n\n if (token.type === Token.Keyword) {\n if (isFutureReservedWord(token.value)) {\n throwError(token, Messages.UnexpectedReserved);\n } else if (strict && isStrictModeReservedWord(token.value)) {\n throwErrorTolerant(token, Messages.StrictReservedWord);\n return;\n }\n throwError(token, Messages.UnexpectedToken, token.value);\n }\n\n // BooleanLiteral, NullLiteral, or Punctuator.\n throwError(token, Messages.UnexpectedToken, token.value);\n }\n\n // Expect the next token to match the specified punctuator.\n // If not, an exception will be thrown.\n\n function expect(value) {\n var token = lex();\n if (token.type !== Token.Punctuator || token.value !== value) {\n throwUnexpected(token);\n }\n }\n\n // Expect the next token to match the specified keyword.\n // If not, an exception will be thrown.\n\n function expectKeyword(keyword) {\n var token = lex();\n if (token.type !== Token.Keyword || token.value !== keyword) {\n throwUnexpected(token);\n }\n }\n\n // Return true if the next token matches the specified punctuator.\n\n function match(value) {\n return lookahead.type === Token.Punctuator && lookahead.value === value;\n }\n\n // Return true if the next token matches the specified keyword\n\n function matchKeyword(keyword) {\n return lookahead.type === Token.Keyword && lookahead.value === keyword;\n }\n\n // Return true if the next token is an assignment operator\n\n function matchAssign() {\n var op;\n\n if (lookahead.type !== Token.Punctuator) {\n return false;\n }\n op = lookahead.value;\n return op === '=' ||\n op === '*=' ||\n op === '/=' ||\n op === '%=' ||\n op === '+=' ||\n op === '-=' ||\n op === '<<=' ||\n op === '>>=' ||\n op === '>>>=' ||\n op === '&=' ||\n op === '^=' ||\n op === '|=';\n }\n\n function consumeSemicolon() {\n var line, oldIndex = index, oldLineNumber = lineNumber,\n oldLineStart = lineStart, oldLookahead = lookahead;\n\n // Catch the very common case first: immediately a semicolon (U+003B).\n if (source.charCodeAt(index) === 0x3B || match(';')) {\n lex();\n return;\n }\n\n line = lineNumber;\n skipComment();\n if (lineNumber !== line) {\n index = oldIndex;\n lineNumber = oldLineNumber;\n lineStart = oldLineStart;\n lookahead = oldLookahead;\n return;\n }\n\n if (lookahead.type !== Token.EOF && !match('}')) {\n throwUnexpected(lookahead);\n }\n }\n\n // Return true if provided expression is LeftHandSideExpression\n\n function isLeftHandSide(expr) {\n return expr.type === Syntax.Identifier || expr.type === Syntax.MemberExpression;\n }\n\n // 11.1.4 Array Initialiser\n\n function parseArrayInitialiser() {\n var elements = [], startToken;\n\n startToken = lookahead;\n expect('[');\n\n while (!match(']')) {\n if (match(',')) {\n lex();\n elements.push(null);\n } else {\n elements.push(parseAssignmentExpression());\n\n if (!match(']')) {\n expect(',');\n }\n }\n }\n\n lex();\n\n return delegate.markEnd(delegate.createArrayExpression(elements), startToken);\n }\n\n // 11.1.5 Object Initialiser\n\n function parsePropertyFunction(param, first) {\n var previousStrict, body, startToken;\n\n previousStrict = strict;\n startToken = lookahead;\n body = parseFunctionSourceElements();\n if (first && strict && isRestrictedWord(param[0].name)) {\n throwErrorTolerant(first, Messages.StrictParamName);\n }\n strict = previousStrict;\n return delegate.markEnd(delegate.createFunctionExpression(null, param, [], body), startToken);\n }\n\n function parseObjectPropertyKey() {\n var token, startToken;\n\n startToken = lookahead;\n token = lex();\n\n // Note: This function is called only from parseObjectProperty(), where\n // EOF and Punctuator tokens are already filtered out.\n\n if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) {\n if (strict && token.octal) {\n throwErrorTolerant(token, Messages.StrictOctalLiteral);\n }\n return delegate.markEnd(delegate.createLiteral(token), startToken);\n }\n\n return delegate.markEnd(delegate.createIdentifier(token.value), startToken);\n }\n\n function parseObjectProperty() {\n var token, key, id, value, param, startToken;\n\n token = lookahead;\n startToken = lookahead;\n\n if (token.type === Token.Identifier) {\n\n id = parseObjectPropertyKey();\n\n // Property Assignment: Getter and Setter.\n\n if (token.value === 'get' && !match(':')) {\n key = parseObjectPropertyKey();\n expect('(');\n expect(')');\n value = parsePropertyFunction([]);\n return delegate.markEnd(delegate.createProperty('get', key, value), startToken);\n }\n if (token.value === 'set' && !match(':')) {\n key = parseObjectPropertyKey();\n expect('(');\n token = lookahead;\n if (token.type !== Token.Identifier) {\n expect(')');\n throwErrorTolerant(token, Messages.UnexpectedToken, token.value);\n value = parsePropertyFunction([]);\n } else {\n param = [ parseVariableIdentifier() ];\n expect(')');\n value = parsePropertyFunction(param, token);\n }\n return delegate.markEnd(delegate.createProperty('set', key, value), startToken);\n }\n expect(':');\n value = parseAssignmentExpression();\n return delegate.markEnd(delegate.createProperty('init', id, value), startToken);\n }\n if (token.type === Token.EOF || token.type === Token.Punctuator) {\n throwUnexpected(token);\n } else {\n key = parseObjectPropertyKey();\n expect(':');\n value = parseAssignmentExpression();\n return delegate.markEnd(delegate.createProperty('init', key, value), startToken);\n }\n }\n\n function parseObjectInitialiser() {\n var properties = [], property, name, key, kind, map = {}, toString = String, startToken;\n\n startToken = lookahead;\n\n expect('{');\n\n while (!match('}')) {\n property = parseObjectProperty();\n\n if (property.key.type === Syntax.Identifier) {\n name = property.key.name;\n } else {\n name = toString(property.key.value);\n }\n kind = (property.kind === 'init') ? PropertyKind.Data : (property.kind === 'get') ? PropertyKind.Get : PropertyKind.Set;\n\n key = '$' + name;\n if (Object.prototype.hasOwnProperty.call(map, key)) {\n if (map[key] === PropertyKind.Data) {\n if (strict && kind === PropertyKind.Data) {\n throwErrorTolerant({}, Messages.StrictDuplicateProperty);\n } else if (kind !== PropertyKind.Data) {\n throwErrorTolerant({}, Messages.AccessorDataProperty);\n }\n } else {\n if (kind === PropertyKind.Data) {\n throwErrorTolerant({}, Messages.AccessorDataProperty);\n } else if (map[key] & kind) {\n throwErrorTolerant({}, Messages.AccessorGetSet);\n }\n }\n map[key] |= kind;\n } else {\n map[key] = kind;\n }\n\n properties.push(property);\n\n if (!match('}')) {\n expect(',');\n }\n }\n\n expect('}');\n\n return delegate.markEnd(delegate.createObjectExpression(properties), startToken);\n }\n\n // 11.1.6 The Grouping Operator\n\n function parseGroupExpression() {\n var expr;\n\n expect('(');\n\n expr = parseExpression();\n\n expect(')');\n\n return expr;\n }\n\n\n // 11.1 Primary Expressions\n\n function parsePrimaryExpression() {\n var type, token, expr, startToken;\n\n if (match('(')) {\n return parseGroupExpression();\n }\n\n if (match('[')) {\n return parseArrayInitialiser();\n }\n\n if (match('{')) {\n return parseObjectInitialiser();\n }\n\n type = lookahead.type;\n startToken = lookahead;\n\n if (type === Token.Identifier) {\n expr = delegate.createIdentifier(lex().value);\n } else if (type === Token.StringLiteral || type === Token.NumericLiteral) {\n if (strict && lookahead.octal) {\n throwErrorTolerant(lookahead, Messages.StrictOctalLiteral);\n }\n expr = delegate.createLiteral(lex());\n } else if (type === Token.Keyword) {\n if (matchKeyword('function')) {\n return parseFunctionExpression();\n }\n if (matchKeyword('this')) {\n lex();\n expr = delegate.createThisExpression();\n } else {\n throwUnexpected(lex());\n }\n } else if (type === Token.BooleanLiteral) {\n token = lex();\n token.value = (token.value === 'true');\n expr = delegate.createLiteral(token);\n } else if (type === Token.NullLiteral) {\n token = lex();\n token.value = null;\n expr = delegate.createLiteral(token);\n } else if (match('/') || match('/=')) {\n if (typeof extra.tokens !== 'undefined') {\n expr = delegate.createLiteral(collectRegex());\n } else {\n expr = delegate.createLiteral(scanRegExp());\n }\n peek();\n } else {\n throwUnexpected(lex());\n }\n\n return delegate.markEnd(expr, startToken);\n }\n\n // 11.2 Left-Hand-Side Expressions\n\n function parseArguments() {\n var args = [];\n\n expect('(');\n\n if (!match(')')) {\n while (index < length) {\n args.push(parseAssignmentExpression());\n if (match(')')) {\n break;\n }\n expect(',');\n }\n }\n\n expect(')');\n\n return args;\n }\n\n function parseNonComputedProperty() {\n var token, startToken;\n\n startToken = lookahead;\n token = lex();\n\n if (!isIdentifierName(token)) {\n throwUnexpected(token);\n }\n\n return delegate.markEnd(delegate.createIdentifier(token.value), startToken);\n }\n\n function parseNonComputedMember() {\n expect('.');\n\n return parseNonComputedProperty();\n }\n\n function parseComputedMember() {\n var expr;\n\n expect('[');\n\n expr = parseExpression();\n\n expect(']');\n\n return expr;\n }\n\n function parseNewExpression() {\n var callee, args, startToken;\n\n startToken = lookahead;\n expectKeyword('new');\n callee = parseLeftHandSideExpression();\n args = match('(') ? parseArguments() : [];\n\n return delegate.markEnd(delegate.createNewExpression(callee, args), startToken);\n }\n\n function parseLeftHandSideExpressionAllowCall() {\n var expr, args, property, startToken, previousAllowIn = state.allowIn;\n\n startToken = lookahead;\n state.allowIn = true;\n expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression();\n\n for (;;) {\n if (match('.')) {\n property = parseNonComputedMember();\n expr = delegate.createMemberExpression('.', expr, property);\n } else if (match('(')) {\n args = parseArguments();\n expr = delegate.createCallExpression(expr, args);\n } else if (match('[')) {\n property = parseComputedMember();\n expr = delegate.createMemberExpression('[', expr, property);\n } else {\n break;\n }\n delegate.markEnd(expr, startToken);\n }\n state.allowIn = previousAllowIn;\n\n return expr;\n }\n\n function parseLeftHandSideExpression() {\n var expr, property, startToken;\n assert(state.allowIn, 'callee of new expression always allow in keyword.');\n\n startToken = lookahead;\n\n expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression();\n\n while (match('.') || match('[')) {\n if (match('[')) {\n property = parseComputedMember();\n expr = delegate.createMemberExpression('[', expr, property);\n } else {\n property = parseNonComputedMember();\n expr = delegate.createMemberExpression('.', expr, property);\n }\n delegate.markEnd(expr, startToken);\n }\n return expr;\n }\n\n // 11.3 Postfix Expressions\n\n function parsePostfixExpression() {\n var expr, token, startToken = lookahead;\n\n expr = parseLeftHandSideExpressionAllowCall();\n\n if (lookahead.type === Token.Punctuator) {\n if ((match('++') || match('--')) && !peekLineTerminator()) {\n // 11.3.1, 11.3.2\n if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {\n throwErrorTolerant({}, Messages.StrictLHSPostfix);\n }\n\n if (!isLeftHandSide(expr)) {\n throwErrorTolerant({}, Messages.InvalidLHSInAssignment);\n }\n\n token = lex();\n expr = delegate.markEnd(delegate.createPostfixExpression(token.value, expr), startToken);\n }\n }\n\n return expr;\n }\n\n // 11.4 Unary Operators\n\n function parseUnaryExpression() {\n var token, expr, startToken;\n\n if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) {\n expr = parsePostfixExpression();\n } else if (match('++') || match('--')) {\n startToken = lookahead;\n token = lex();\n expr = parseUnaryExpression();\n // 11.4.4, 11.4.5\n if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {\n throwErrorTolerant({}, Messages.StrictLHSPrefix);\n }\n\n if (!isLeftHandSide(expr)) {\n throwErrorTolerant({}, Messages.InvalidLHSInAssignment);\n }\n\n expr = delegate.createUnaryExpression(token.value, expr);\n expr = delegate.markEnd(expr, startToken);\n } else if (match('+') || match('-') || match('~') || match('!')) {\n startToken = lookahead;\n token = lex();\n expr = parseUnaryExpression();\n expr = delegate.createUnaryExpression(token.value, expr);\n expr = delegate.markEnd(expr, startToken);\n } else if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) {\n startToken = lookahead;\n token = lex();\n expr = parseUnaryExpression();\n expr = delegate.createUnaryExpression(token.value, expr);\n expr = delegate.markEnd(expr, startToken);\n if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) {\n throwErrorTolerant({}, Messages.StrictDelete);\n }\n } else {\n expr = parsePostfixExpression();\n }\n\n return expr;\n }\n\n function binaryPrecedence(token, allowIn) {\n var prec = 0;\n\n if (token.type !== Token.Punctuator && token.type !== Token.Keyword) {\n return 0;\n }\n\n switch (token.value) {\n case '||':\n prec = 1;\n break;\n\n case '&&':\n prec = 2;\n break;\n\n case '|':\n prec = 3;\n break;\n\n case '^':\n prec = 4;\n break;\n\n case '&':\n prec = 5;\n break;\n\n case '==':\n case '!=':\n case '===':\n case '!==':\n prec = 6;\n break;\n\n case '<':\n case '>':\n case '<=':\n case '>=':\n case 'instanceof':\n prec = 7;\n break;\n\n case 'in':\n prec = allowIn ? 7 : 0;\n break;\n\n case '<<':\n case '>>':\n case '>>>':\n prec = 8;\n break;\n\n case '+':\n case '-':\n prec = 9;\n break;\n\n case '*':\n case '/':\n case '%':\n prec = 11;\n break;\n\n default:\n break;\n }\n\n return prec;\n }\n\n // 11.5 Multiplicative Operators\n // 11.6 Additive Operators\n // 11.7 Bitwise Shift Operators\n // 11.8 Relational Operators\n // 11.9 Equality Operators\n // 11.10 Binary Bitwise Operators\n // 11.11 Binary Logical Operators\n\n function parseBinaryExpression() {\n var marker, markers, expr, token, prec, stack, right, operator, left, i;\n\n marker = lookahead;\n left = parseUnaryExpression();\n\n token = lookahead;\n prec = binaryPrecedence(token, state.allowIn);\n if (prec === 0) {\n return left;\n }\n token.prec = prec;\n lex();\n\n markers = [marker, lookahead];\n right = parseUnaryExpression();\n\n stack = [left, token, right];\n\n while ((prec = binaryPrecedence(lookahead, state.allowIn)) > 0) {\n\n // Reduce: make a binary expression from the three topmost entries.\n while ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) {\n right = stack.pop();\n operator = stack.pop().value;\n left = stack.pop();\n expr = delegate.createBinaryExpression(operator, left, right);\n markers.pop();\n marker = markers[markers.length - 1];\n delegate.markEnd(expr, marker);\n stack.push(expr);\n }\n\n // Shift.\n token = lex();\n token.prec = prec;\n stack.push(token);\n markers.push(lookahead);\n expr = parseUnaryExpression();\n stack.push(expr);\n }\n\n // Final reduce to clean-up the stack.\n i = stack.length - 1;\n expr = stack[i];\n markers.pop();\n while (i > 1) {\n expr = delegate.createBinaryExpression(stack[i - 1].value, stack[i - 2], expr);\n i -= 2;\n marker = markers.pop();\n delegate.markEnd(expr, marker);\n }\n\n return expr;\n }\n\n\n // 11.12 Conditional Operator\n\n function parseConditionalExpression() {\n var expr, previousAllowIn, consequent, alternate, startToken;\n\n startToken = lookahead;\n\n expr = parseBinaryExpression();\n\n if (match('?')) {\n lex();\n previousAllowIn = state.allowIn;\n state.allowIn = true;\n consequent = parseAssignmentExpression();\n state.allowIn = previousAllowIn;\n expect(':');\n alternate = parseAssignmentExpression();\n\n expr = delegate.createConditionalExpression(expr, consequent, alternate);\n delegate.markEnd(expr, startToken);\n }\n\n return expr;\n }\n\n // 11.13 Assignment Operators\n\n function parseAssignmentExpression() {\n var token, left, right, node, startToken;\n\n token = lookahead;\n startToken = lookahead;\n\n node = left = parseConditionalExpression();\n\n if (matchAssign()) {\n // LeftHandSideExpression\n if (!isLeftHandSide(left)) {\n throwErrorTolerant({}, Messages.InvalidLHSInAssignment);\n }\n\n // 11.13.1\n if (strict && left.type === Syntax.Identifier && isRestrictedWord(left.name)) {\n throwErrorTolerant(token, Messages.StrictLHSAssignment);\n }\n\n token = lex();\n right = parseAssignmentExpression();\n node = delegate.markEnd(delegate.createAssignmentExpression(token.value, left, right), startToken);\n }\n\n return node;\n }\n\n // 11.14 Comma Operator\n\n function parseExpression() {\n var expr, startToken = lookahead;\n\n expr = parseAssignmentExpression();\n\n if (match(',')) {\n expr = delegate.createSequenceExpression([ expr ]);\n\n while (index < length) {\n if (!match(',')) {\n break;\n }\n lex();\n expr.expressions.push(parseAssignmentExpression());\n }\n\n delegate.markEnd(expr, startToken);\n }\n\n return expr;\n }\n\n // 12.1 Block\n\n function parseStatementList() {\n var list = [],\n statement;\n\n while (index < length) {\n if (match('}')) {\n break;\n }\n statement = parseSourceElement();\n if (typeof statement === 'undefined') {\n break;\n }\n list.push(statement);\n }\n\n return list;\n }\n\n function parseBlock() {\n var block, startToken;\n\n startToken = lookahead;\n expect('{');\n\n block = parseStatementList();\n\n expect('}');\n\n return delegate.markEnd(delegate.createBlockStatement(block), startToken);\n }\n\n // 12.2 Variable Statement\n\n function parseVariableIdentifier() {\n var token, startToken;\n\n startToken = lookahead;\n token = lex();\n\n if (token.type !== Token.Identifier) {\n throwUnexpected(token);\n }\n\n return delegate.markEnd(delegate.createIdentifier(token.value), startToken);\n }\n\n function parseVariableDeclaration(kind) {\n var init = null, id, startToken;\n\n startToken = lookahead;\n id = parseVariableIdentifier();\n\n // 12.2.1\n if (strict && isRestrictedWord(id.name)) {\n throwErrorTolerant({}, Messages.StrictVarName);\n }\n\n if (kind === 'const') {\n expect('=');\n init = parseAssignmentExpression();\n } else if (match('=')) {\n lex();\n init = parseAssignmentExpression();\n }\n\n return delegate.markEnd(delegate.createVariableDeclarator(id, init), startToken);\n }\n\n function parseVariableDeclarationList(kind) {\n var list = [];\n\n do {\n list.push(parseVariableDeclaration(kind));\n if (!match(',')) {\n break;\n }\n lex();\n } while (index < length);\n\n return list;\n }\n\n function parseVariableStatement() {\n var declarations;\n\n expectKeyword('var');\n\n declarations = parseVariableDeclarationList();\n\n consumeSemicolon();\n\n return delegate.createVariableDeclaration(declarations, 'var');\n }\n\n // kind may be `const` or `let`\n // Both are experimental and not in the specification yet.\n // see http://wiki.ecmascript.org/doku.php?id=harmony:const\n // and http://wiki.ecmascript.org/doku.php?id=harmony:let\n function parseConstLetDeclaration(kind) {\n var declarations, startToken;\n\n startToken = lookahead;\n\n expectKeyword(kind);\n\n declarations = parseVariableDeclarationList(kind);\n\n consumeSemicolon();\n\n return delegate.markEnd(delegate.createVariableDeclaration(declarations, kind), startToken);\n }\n\n // 12.3 Empty Statement\n\n function parseEmptyStatement() {\n expect(';');\n return delegate.createEmptyStatement();\n }\n\n // 12.4 Expression Statement\n\n function parseExpressionStatement() {\n var expr = parseExpression();\n consumeSemicolon();\n return delegate.createExpressionStatement(expr);\n }\n\n // 12.5 If statement\n\n function parseIfStatement() {\n var test, consequent, alternate;\n\n expectKeyword('if');\n\n expect('(');\n\n test = parseExpression();\n\n expect(')');\n\n consequent = parseStatement();\n\n if (matchKeyword('else')) {\n lex();\n alternate = parseStatement();\n } else {\n alternate = null;\n }\n\n return delegate.createIfStatement(test, consequent, alternate);\n }\n\n // 12.6 Iteration Statements\n\n function parseDoWhileStatement() {\n var body, test, oldInIteration;\n\n expectKeyword('do');\n\n oldInIteration = state.inIteration;\n state.inIteration = true;\n\n body = parseStatement();\n\n state.inIteration = oldInIteration;\n\n expectKeyword('while');\n\n expect('(');\n\n test = parseExpression();\n\n expect(')');\n\n if (match(';')) {\n lex();\n }\n\n return delegate.createDoWhileStatement(body, test);\n }\n\n function parseWhileStatement() {\n var test, body, oldInIteration;\n\n expectKeyword('while');\n\n expect('(');\n\n test = parseExpression();\n\n expect(')');\n\n oldInIteration = state.inIteration;\n state.inIteration = true;\n\n body = parseStatement();\n\n state.inIteration = oldInIteration;\n\n return delegate.createWhileStatement(test, body);\n }\n\n function parseForVariableDeclaration() {\n var token, declarations, startToken;\n\n startToken = lookahead;\n token = lex();\n declarations = parseVariableDeclarationList();\n\n return delegate.markEnd(delegate.createVariableDeclaration(declarations, token.value), startToken);\n }\n\n function parseForStatement() {\n var init, test, update, left, right, body, oldInIteration, previousAllowIn = state.allowIn;\n\n init = test = update = null;\n\n expectKeyword('for');\n\n expect('(');\n\n if (match(';')) {\n lex();\n } else {\n if (matchKeyword('var') || matchKeyword('let')) {\n state.allowIn = false;\n init = parseForVariableDeclaration();\n state.allowIn = previousAllowIn;\n\n if (init.declarations.length === 1 && matchKeyword('in')) {\n lex();\n left = init;\n right = parseExpression();\n init = null;\n }\n } else {\n state.allowIn = false;\n init = parseExpression();\n state.allowIn = previousAllowIn;\n\n if (matchKeyword('in')) {\n // LeftHandSideExpression\n if (!isLeftHandSide(init)) {\n throwErrorTolerant({}, Messages.InvalidLHSInForIn);\n }\n\n lex();\n left = init;\n right = parseExpression();\n init = null;\n }\n }\n\n if (typeof left === 'undefined') {\n expect(';');\n }\n }\n\n if (typeof left === 'undefined') {\n\n if (!match(';')) {\n test = parseExpression();\n }\n expect(';');\n\n if (!match(')')) {\n update = parseExpression();\n }\n }\n\n expect(')');\n\n oldInIteration = state.inIteration;\n state.inIteration = true;\n\n body = parseStatement();\n\n state.inIteration = oldInIteration;\n\n return (typeof left === 'undefined') ?\n delegate.createForStatement(init, test, update, body) :\n delegate.createForInStatement(left, right, body);\n }\n\n // 12.7 The continue statement\n\n function parseContinueStatement() {\n var label = null, key;\n\n expectKeyword('continue');\n\n // Optimize the most common form: 'continue;'.\n if (source.charCodeAt(index) === 0x3B) {\n lex();\n\n if (!state.inIteration) {\n throwError({}, Messages.IllegalContinue);\n }\n\n return delegate.createContinueStatement(null);\n }\n\n if (peekLineTerminator()) {\n if (!state.inIteration) {\n throwError({}, Messages.IllegalContinue);\n }\n\n return delegate.createContinueStatement(null);\n }\n\n if (lookahead.type === Token.Identifier) {\n label = parseVariableIdentifier();\n\n key = '$' + label.name;\n if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) {\n throwError({}, Messages.UnknownLabel, label.name);\n }\n }\n\n consumeSemicolon();\n\n if (label === null && !state.inIteration) {\n throwError({}, Messages.IllegalContinue);\n }\n\n return delegate.createContinueStatement(label);\n }\n\n // 12.8 The break statement\n\n function parseBreakStatement() {\n var label = null, key;\n\n expectKeyword('break');\n\n // Catch the very common case first: immediately a semicolon (U+003B).\n if (source.charCodeAt(index) === 0x3B) {\n lex();\n\n if (!(state.inIteration || state.inSwitch)) {\n throwError({}, Messages.IllegalBreak);\n }\n\n return delegate.createBreakStatement(null);\n }\n\n if (peekLineTerminator()) {\n if (!(state.inIteration || state.inSwitch)) {\n throwError({}, Messages.IllegalBreak);\n }\n\n return delegate.createBreakStatement(null);\n }\n\n if (lookahead.type === Token.Identifier) {\n label = parseVariableIdentifier();\n\n key = '$' + label.name;\n if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) {\n throwError({}, Messages.UnknownLabel, label.name);\n }\n }\n\n consumeSemicolon();\n\n if (label === null && !(state.inIteration || state.inSwitch)) {\n throwError({}, Messages.IllegalBreak);\n }\n\n return delegate.createBreakStatement(label);\n }\n\n // 12.9 The return statement\n\n function parseReturnStatement() {\n var argument = null;\n\n expectKeyword('return');\n\n if (!state.inFunctionBody) {\n throwErrorTolerant({}, Messages.IllegalReturn);\n }\n\n // 'return' followed by a space and an identifier is very common.\n if (source.charCodeAt(index) === 0x20) {\n if (isIdentifierStart(source.charCodeAt(index + 1))) {\n argument = parseExpression();\n consumeSemicolon();\n return delegate.createReturnStatement(argument);\n }\n }\n\n if (peekLineTerminator()) {\n return delegate.createReturnStatement(null);\n }\n\n if (!match(';')) {\n if (!match('}') && lookahead.type !== Token.EOF) {\n argument = parseExpression();\n }\n }\n\n consumeSemicolon();\n\n return delegate.createReturnStatement(argument);\n }\n\n // 12.10 The with statement\n\n function parseWithStatement() {\n var object, body;\n\n if (strict) {\n // TODO(ikarienator): Should we update the test cases instead?\n skipComment();\n throwErrorTolerant({}, Messages.StrictModeWith);\n }\n\n expectKeyword('with');\n\n expect('(');\n\n object = parseExpression();\n\n expect(')');\n\n body = parseStatement();\n\n return delegate.createWithStatement(object, body);\n }\n\n // 12.10 The swith statement\n\n function parseSwitchCase() {\n var test, consequent = [], statement, startToken;\n\n startToken = lookahead;\n if (matchKeyword('default')) {\n lex();\n test = null;\n } else {\n expectKeyword('case');\n test = parseExpression();\n }\n expect(':');\n\n while (index < length) {\n if (match('}') || matchKeyword('default') || matchKeyword('case')) {\n break;\n }\n statement = parseStatement();\n consequent.push(statement);\n }\n\n return delegate.markEnd(delegate.createSwitchCase(test, consequent), startToken);\n }\n\n function parseSwitchStatement() {\n var discriminant, cases, clause, oldInSwitch, defaultFound;\n\n expectKeyword('switch');\n\n expect('(');\n\n discriminant = parseExpression();\n\n expect(')');\n\n expect('{');\n\n cases = [];\n\n if (match('}')) {\n lex();\n return delegate.createSwitchStatement(discriminant, cases);\n }\n\n oldInSwitch = state.inSwitch;\n state.inSwitch = true;\n defaultFound = false;\n\n while (index < length) {\n if (match('}')) {\n break;\n }\n clause = parseSwitchCase();\n if (clause.test === null) {\n if (defaultFound) {\n throwError({}, Messages.MultipleDefaultsInSwitch);\n }\n defaultFound = true;\n }\n cases.push(clause);\n }\n\n state.inSwitch = oldInSwitch;\n\n expect('}');\n\n return delegate.createSwitchStatement(discriminant, cases);\n }\n\n // 12.13 The throw statement\n\n function parseThrowStatement() {\n var argument;\n\n expectKeyword('throw');\n\n if (peekLineTerminator()) {\n throwError({}, Messages.NewlineAfterThrow);\n }\n\n argument = parseExpression();\n\n consumeSemicolon();\n\n return delegate.createThrowStatement(argument);\n }\n\n // 12.14 The try statement\n\n function parseCatchClause() {\n var param, body, startToken;\n\n startToken = lookahead;\n expectKeyword('catch');\n\n expect('(');\n if (match(')')) {\n throwUnexpected(lookahead);\n }\n\n param = parseVariableIdentifier();\n // 12.14.1\n if (strict && isRestrictedWord(param.name)) {\n throwErrorTolerant({}, Messages.StrictCatchVariable);\n }\n\n expect(')');\n body = parseBlock();\n return delegate.markEnd(delegate.createCatchClause(param, body), startToken);\n }\n\n function parseTryStatement() {\n var block, handlers = [], finalizer = null;\n\n expectKeyword('try');\n\n block = parseBlock();\n\n if (matchKeyword('catch')) {\n handlers.push(parseCatchClause());\n }\n\n if (matchKeyword('finally')) {\n lex();\n finalizer = parseBlock();\n }\n\n if (handlers.length === 0 && !finalizer) {\n throwError({}, Messages.NoCatchOrFinally);\n }\n\n return delegate.createTryStatement(block, [], handlers, finalizer);\n }\n\n // 12.15 The debugger statement\n\n function parseDebuggerStatement() {\n expectKeyword('debugger');\n\n consumeSemicolon();\n\n return delegate.createDebuggerStatement();\n }\n\n // 12 Statements\n\n function parseStatement() {\n var type = lookahead.type,\n expr,\n labeledBody,\n key,\n startToken;\n\n if (type === Token.EOF) {\n throwUnexpected(lookahead);\n }\n\n if (type === Token.Punctuator && lookahead.value === '{') {\n return parseBlock();\n }\n\n startToken = lookahead;\n\n if (type === Token.Punctuator) {\n switch (lookahead.value) {\n case ';':\n return delegate.markEnd(parseEmptyStatement(), startToken);\n case '(':\n return delegate.markEnd(parseExpressionStatement(), startToken);\n default:\n break;\n }\n }\n\n if (type === Token.Keyword) {\n switch (lookahead.value) {\n case 'break':\n return delegate.markEnd(parseBreakStatement(), startToken);\n case 'continue':\n return delegate.markEnd(parseContinueStatement(), startToken);\n case 'debugger':\n return delegate.markEnd(parseDebuggerStatement(), startToken);\n case 'do':\n return delegate.markEnd(parseDoWhileStatement(), startToken);\n case 'for':\n return delegate.markEnd(parseForStatement(), startToken);\n case 'function':\n return delegate.markEnd(parseFunctionDeclaration(), startToken);\n case 'if':\n return delegate.markEnd(parseIfStatement(), startToken);\n case 'return':\n return delegate.markEnd(parseReturnStatement(), startToken);\n case 'switch':\n return delegate.markEnd(parseSwitchStatement(), startToken);\n case 'throw':\n return delegate.markEnd(parseThrowStatement(), startToken);\n case 'try':\n return delegate.markEnd(parseTryStatement(), startToken);\n case 'var':\n return delegate.markEnd(parseVariableStatement(), startToken);\n case 'while':\n return delegate.markEnd(parseWhileStatement(), startToken);\n case 'with':\n return delegate.markEnd(parseWithStatement(), startToken);\n default:\n break;\n }\n }\n\n expr = parseExpression();\n\n // 12.12 Labelled Statements\n if ((expr.type === Syntax.Identifier) && match(':')) {\n lex();\n\n key = '$' + expr.name;\n if (Object.prototype.hasOwnProperty.call(state.labelSet, key)) {\n throwError({}, Messages.Redeclaration, 'Label', expr.name);\n }\n\n state.labelSet[key] = true;\n labeledBody = parseStatement();\n delete state.labelSet[key];\n return delegate.markEnd(delegate.createLabeledStatement(expr, labeledBody), startToken);\n }\n\n consumeSemicolon();\n\n return delegate.markEnd(delegate.createExpressionStatement(expr), startToken);\n }\n\n // 13 Function Definition\n\n function parseFunctionSourceElements() {\n var sourceElement, sourceElements = [], token, directive, firstRestricted,\n oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody, startToken;\n\n startToken = lookahead;\n expect('{');\n\n while (index < length) {\n if (lookahead.type !== Token.StringLiteral) {\n break;\n }\n token = lookahead;\n\n sourceElement = parseSourceElement();\n sourceElements.push(sourceElement);\n if (sourceElement.expression.type !== Syntax.Literal) {\n // this is not directive\n break;\n }\n directive = source.slice(token.start + 1, token.end - 1);\n if (directive === 'use strict') {\n strict = true;\n if (firstRestricted) {\n throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral);\n }\n } else {\n if (!firstRestricted && token.octal) {\n firstRestricted = token;\n }\n }\n }\n\n oldLabelSet = state.labelSet;\n oldInIteration = state.inIteration;\n oldInSwitch = state.inSwitch;\n oldInFunctionBody = state.inFunctionBody;\n\n state.labelSet = {};\n state.inIteration = false;\n state.inSwitch = false;\n state.inFunctionBody = true;\n\n while (index < length) {\n if (match('}')) {\n break;\n }\n sourceElement = parseSourceElement();\n if (typeof sourceElement === 'undefined') {\n break;\n }\n sourceElements.push(sourceElement);\n }\n\n expect('}');\n\n state.labelSet = oldLabelSet;\n state.inIteration = oldInIteration;\n state.inSwitch = oldInSwitch;\n state.inFunctionBody = oldInFunctionBody;\n\n return delegate.markEnd(delegate.createBlockStatement(sourceElements), startToken);\n }\n\n function parseParams(firstRestricted) {\n var param, params = [], token, stricted, paramSet, key, message;\n expect('(');\n\n if (!match(')')) {\n paramSet = {};\n while (index < length) {\n token = lookahead;\n param = parseVariableIdentifier();\n key = '$' + token.value;\n if (strict) {\n if (isRestrictedWord(token.value)) {\n stricted = token;\n message = Messages.StrictParamName;\n }\n if (Object.prototype.hasOwnProperty.call(paramSet, key)) {\n stricted = token;\n message = Messages.StrictParamDupe;\n }\n } else if (!firstRestricted) {\n if (isRestrictedWord(token.value)) {\n firstRestricted = token;\n message = Messages.StrictParamName;\n } else if (isStrictModeReservedWord(token.value)) {\n firstRestricted = token;\n message = Messages.StrictReservedWord;\n } else if (Object.prototype.hasOwnProperty.call(paramSet, key)) {\n firstRestricted = token;\n message = Messages.StrictParamDupe;\n }\n }\n params.push(param);\n paramSet[key] = true;\n if (match(')')) {\n break;\n }\n expect(',');\n }\n }\n\n expect(')');\n\n return {\n params: params,\n stricted: stricted,\n firstRestricted: firstRestricted,\n message: message\n };\n }\n\n function parseFunctionDeclaration() {\n var id, params = [], body, token, stricted, tmp, firstRestricted, message, previousStrict, startToken;\n\n startToken = lookahead;\n\n expectKeyword('function');\n token = lookahead;\n id = parseVariableIdentifier();\n if (strict) {\n if (isRestrictedWord(token.value)) {\n throwErrorTolerant(token, Messages.StrictFunctionName);\n }\n } else {\n if (isRestrictedWord(token.value)) {\n firstRestricted = token;\n message = Messages.StrictFunctionName;\n } else if (isStrictModeReservedWord(token.value)) {\n firstRestricted = token;\n message = Messages.StrictReservedWord;\n }\n }\n\n tmp = parseParams(firstRestricted);\n params = tmp.params;\n stricted = tmp.stricted;\n firstRestricted = tmp.firstRestricted;\n if (tmp.message) {\n message = tmp.message;\n }\n\n previousStrict = strict;\n body = parseFunctionSourceElements();\n if (strict && firstRestricted) {\n throwError(firstRestricted, message);\n }\n if (strict && stricted) {\n throwErrorTolerant(stricted, message);\n }\n strict = previousStrict;\n\n return delegate.markEnd(delegate.createFunctionDeclaration(id, params, [], body), startToken);\n }\n\n function parseFunctionExpression() {\n var token, id = null, stricted, firstRestricted, message, tmp, params = [], body, previousStrict, startToken;\n\n startToken = lookahead;\n expectKeyword('function');\n\n if (!match('(')) {\n token = lookahead;\n id = parseVariableIdentifier();\n if (strict) {\n if (isRestrictedWord(token.value)) {\n throwErrorTolerant(token, Messages.StrictFunctionName);\n }\n } else {\n if (isRestrictedWord(token.value)) {\n firstRestricted = token;\n message = Messages.StrictFunctionName;\n } else if (isStrictModeReservedWord(token.value)) {\n firstRestricted = token;\n message = Messages.StrictReservedWord;\n }\n }\n }\n\n tmp = parseParams(firstRestricted);\n params = tmp.params;\n stricted = tmp.stricted;\n firstRestricted = tmp.firstRestricted;\n if (tmp.message) {\n message = tmp.message;\n }\n\n previousStrict = strict;\n body = parseFunctionSourceElements();\n if (strict && firstRestricted) {\n throwError(firstRestricted, message);\n }\n if (strict && stricted) {\n throwErrorTolerant(stricted, message);\n }\n strict = previousStrict;\n\n return delegate.markEnd(delegate.createFunctionExpression(id, params, [], body), startToken);\n }\n\n // 14 Program\n\n function parseSourceElement() {\n if (lookahead.type === Token.Keyword) {\n switch (lookahead.value) {\n case 'const':\n case 'let':\n return parseConstLetDeclaration(lookahead.value);\n case 'function':\n return parseFunctionDeclaration();\n default:\n return parseStatement();\n }\n }\n\n if (lookahead.type !== Token.EOF) {\n return parseStatement();\n }\n }\n\n function parseSourceElements() {\n var sourceElement, sourceElements = [], token, directive, firstRestricted;\n\n while (index < length) {\n token = lookahead;\n if (token.type !== Token.StringLiteral) {\n break;\n }\n\n sourceElement = parseSourceElement();\n sourceElements.push(sourceElement);\n if (sourceElement.expression.type !== Syntax.Literal) {\n // this is not directive\n break;\n }\n directive = source.slice(token.start + 1, token.end - 1);\n if (directive === 'use strict') {\n strict = true;\n if (firstRestricted) {\n throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral);\n }\n } else {\n if (!firstRestricted && token.octal) {\n firstRestricted = token;\n }\n }\n }\n\n while (index < length) {\n sourceElement = parseSourceElement();\n /* istanbul ignore if */\n if (typeof sourceElement === 'undefined') {\n break;\n }\n sourceElements.push(sourceElement);\n }\n return sourceElements;\n }\n\n function parseProgram() {\n var body, startToken;\n\n skipComment();\n peek();\n startToken = lookahead;\n strict = false;\n\n body = parseSourceElements();\n return delegate.markEnd(delegate.createProgram(body), startToken);\n }\n\n function filterTokenLocation() {\n var i, entry, token, tokens = [];\n\n for (i = 0; i < extra.tokens.length; ++i) {\n entry = extra.tokens[i];\n token = {\n type: entry.type,\n value: entry.value\n };\n if (extra.range) {\n token.range = entry.range;\n }\n if (extra.loc) {\n token.loc = entry.loc;\n }\n tokens.push(token);\n }\n\n extra.tokens = tokens;\n }\n\n function tokenize(code, options) {\n var toString,\n token,\n tokens;\n\n toString = String;\n if (typeof code !== 'string' && !(code instanceof String)) {\n code = toString(code);\n }\n\n delegate = SyntaxTreeDelegate;\n source = code;\n index = 0;\n lineNumber = (source.length > 0) ? 1 : 0;\n lineStart = 0;\n length = source.length;\n lookahead = null;\n state = {\n allowIn: true,\n labelSet: {},\n inFunctionBody: false,\n inIteration: false,\n inSwitch: false,\n lastCommentStart: -1\n };\n\n extra = {};\n\n // Options matching.\n options = options || {};\n\n // Of course we collect tokens here.\n options.tokens = true;\n extra.tokens = [];\n extra.tokenize = true;\n // The following two fields are necessary to compute the Regex tokens.\n extra.openParenToken = -1;\n extra.openCurlyToken = -1;\n\n extra.range = (typeof options.range === 'boolean') && options.range;\n extra.loc = (typeof options.loc === 'boolean') && options.loc;\n\n if (typeof options.comment === 'boolean' && options.comment) {\n extra.comments = [];\n }\n if (typeof options.tolerant === 'boolean' && options.tolerant) {\n extra.errors = [];\n }\n\n try {\n peek();\n if (lookahead.type === Token.EOF) {\n return extra.tokens;\n }\n\n token = lex();\n while (lookahead.type !== Token.EOF) {\n try {\n token = lex();\n } catch (lexError) {\n token = lookahead;\n if (extra.errors) {\n extra.errors.push(lexError);\n // We have to break on the first error\n // to avoid infinite loops.\n break;\n } else {\n throw lexError;\n }\n }\n }\n\n filterTokenLocation();\n tokens = extra.tokens;\n if (typeof extra.comments !== 'undefined') {\n tokens.comments = extra.comments;\n }\n if (typeof extra.errors !== 'undefined') {\n tokens.errors = extra.errors;\n }\n } catch (e) {\n throw e;\n } finally {\n extra = {};\n }\n return tokens;\n }\n\n function parse(code, options) {\n var program, toString;\n\n toString = String;\n if (typeof code !== 'string' && !(code instanceof String)) {\n code = toString(code);\n }\n\n delegate = SyntaxTreeDelegate;\n source = code;\n index = 0;\n lineNumber = (source.length > 0) ? 1 : 0;\n lineStart = 0;\n length = source.length;\n lookahead = null;\n state = {\n allowIn: true,\n labelSet: {},\n inFunctionBody: false,\n inIteration: false,\n inSwitch: false,\n lastCommentStart: -1\n };\n\n extra = {};\n if (typeof options !== 'undefined') {\n extra.range = (typeof options.range === 'boolean') && options.range;\n extra.loc = (typeof options.loc === 'boolean') && options.loc;\n extra.attachComment = (typeof options.attachComment === 'boolean') && options.attachComment;\n\n if (extra.loc && options.source !== null && options.source !== undefined) {\n extra.source = toString(options.source);\n }\n\n if (typeof options.tokens === 'boolean' && options.tokens) {\n extra.tokens = [];\n }\n if (typeof options.comment === 'boolean' && options.comment) {\n extra.comments = [];\n }\n if (typeof options.tolerant === 'boolean' && options.tolerant) {\n extra.errors = [];\n }\n if (extra.attachComment) {\n extra.range = true;\n extra.comments = [];\n extra.bottomRightStack = [];\n extra.trailingComments = [];\n extra.leadingComments = [];\n }\n }\n\n try {\n program = parseProgram();\n if (typeof extra.comments !== 'undefined') {\n program.comments = extra.comments;\n }\n if (typeof extra.tokens !== 'undefined') {\n filterTokenLocation();\n program.tokens = extra.tokens;\n }\n if (typeof extra.errors !== 'undefined') {\n program.errors = extra.errors;\n }\n } catch (e) {\n throw e;\n } finally {\n extra = {};\n }\n\n return program;\n }\n\n // Sync with *.json manifests.\n exports.version = '1.2.5';\n\n exports.tokenize = tokenize;\n\n exports.parse = parse;\n\n // Deep copy.\n /* istanbul ignore next */\n exports.Syntax = (function () {\n var name, types = {};\n\n if (typeof Object.create === 'function') {\n types = Object.create(null);\n }\n\n for (name in Syntax) {\n if (Syntax.hasOwnProperty(name)) {\n types[name] = Syntax[name];\n }\n }\n\n if (typeof Object.freeze === 'function') {\n Object.freeze(types);\n }\n\n return types;\n }());\n\n}));\n/* vim: set sw=4 ts=4 et tw=80 : */\n","class Item {\n constructor(data, prev, next) {\n this.next = next;\n if (next)\n next.prev = this;\n this.prev = prev;\n if (prev)\n prev.next = this;\n this.data = data;\n }\n}\nexport class LinkedList {\n constructor() {\n this._length = 0;\n }\n get head() {\n return this._head && this._head.data;\n }\n get tail() {\n return this._tail && this._tail.data;\n }\n get current() {\n return this._current && this._current.data;\n }\n get length() {\n return this._length;\n }\n push(data) {\n this._tail = new Item(data, this._tail);\n if (this._length === 0) {\n this._head = this._tail;\n this._current = this._head;\n this._next = this._head;\n }\n this._length++;\n }\n pop() {\n var tail = this._tail;\n if (this._length === 0) {\n return;\n }\n this._length--;\n if (this._length === 0) {\n this._head = this._tail = this._current = this._next = undefined;\n return tail.data;\n }\n this._tail = tail.prev;\n this._tail.next = undefined;\n if (this._current === tail) {\n this._current = this._tail;\n this._next = undefined;\n }\n return tail.data;\n }\n shift() {\n var head = this._head;\n if (this._length === 0) {\n return;\n }\n this._length--;\n if (this._length === 0) {\n this._head = this._tail = this._current = this._next = undefined;\n return head.data;\n }\n this._head = this._head.next;\n if (this._current === head) {\n this._current = this._head;\n this._next = this._current.next;\n }\n return head.data;\n }\n unshift(data) {\n this._head = new Item(data, undefined, this._head);\n if (this._length === 0) {\n this._tail = this._head;\n this._next = this._head;\n }\n this._length++;\n }\n unshiftCurrent() {\n var current = this._current;\n if (current === this._head || this._length < 2) {\n return current && current.data;\n }\n // remove\n if (current === this._tail) {\n this._tail = current.prev;\n this._tail.next = undefined;\n this._current = this._tail;\n }\n else {\n current.next.prev = current.prev;\n current.prev.next = current.next;\n this._current = current.prev;\n }\n this._next = this._current.next;\n // unshift\n current.next = this._head;\n current.prev = undefined;\n this._head.prev = current;\n this._head = current;\n return current.data;\n }\n removeCurrent() {\n var current = this._current;\n if (this._length === 0) {\n return;\n }\n this._length--;\n if (this._length === 0) {\n this._head = this._tail = this._current = this._next = undefined;\n return current.data;\n }\n if (current === this._tail) {\n this._tail = current.prev;\n this._tail.next = undefined;\n this._current = this._tail;\n }\n else if (current === this._head) {\n this._head = current.next;\n this._head.prev = undefined;\n this._current = this._head;\n }\n else {\n current.next.prev = current.prev;\n current.prev.next = current.next;\n this._current = current.prev;\n }\n this._next = this._current.next;\n return current.data;\n }\n resetCursor() {\n this._current = this._next = this._head;\n return this;\n }\n next() {\n var next = this._next;\n if (next !== undefined) {\n this._next = next.next;\n this._current = next;\n return next.data;\n }\n }\n}\n","/**\n * Created by AAravindan on 5/7/16.\n */\nimport { LinkedList } from './LinkedList';\nexport default class FixedSizeLinkedList extends LinkedList {\n constructor(size, maintainHigh, maintainLow, maintainSum) {\n super();\n this.size = size;\n this.maintainHigh = maintainHigh;\n this.maintainLow = maintainLow;\n this.maintainSum = maintainSum;\n this.totalPushed = 0;\n this.periodHigh = 0;\n this.periodLow = Infinity;\n this.periodSum = 0;\n if (!size || typeof size !== 'number') {\n throw ('Size required and should be a number.');\n }\n this._push = this.push;\n this.push = function (data) {\n this.add(data);\n this.totalPushed++;\n };\n }\n add(data) {\n if (this.length === this.size) {\n this.lastShift = this.shift();\n this._push(data);\n //TODO: FInd a better way\n if (this.maintainHigh)\n if (this.lastShift == this.periodHigh)\n this.calculatePeriodHigh();\n if (this.maintainLow)\n if (this.lastShift == this.periodLow)\n this.calculatePeriodLow();\n if (this.maintainSum) {\n this.periodSum = this.periodSum - this.lastShift;\n }\n }\n else {\n this._push(data);\n }\n //TODO: FInd a better way\n if (this.maintainHigh)\n if (this.periodHigh <= data)\n (this.periodHigh = data);\n if (this.maintainLow)\n if (this.periodLow >= data)\n (this.periodLow = data);\n if (this.maintainSum) {\n this.periodSum = this.periodSum + data;\n }\n }\n *iterator() {\n this.resetCursor();\n while (this.next()) {\n yield this.current;\n }\n }\n calculatePeriodHigh() {\n this.resetCursor();\n if (this.next())\n this.periodHigh = this.current;\n while (this.next()) {\n if (this.periodHigh <= this.current) {\n this.periodHigh = this.current;\n }\n ;\n }\n ;\n }\n calculatePeriodLow() {\n this.resetCursor();\n if (this.next())\n this.periodLow = this.current;\n while (this.next()) {\n if (this.periodLow >= this.current) {\n this.periodLow = this.current;\n }\n ;\n }\n ;\n }\n}\n","export default class StockData {\n constructor(open, high, low, close, reversedInput) {\n this.open = open;\n this.high = high;\n this.low = low;\n this.close = close;\n this.reversedInput = reversedInput;\n }\n}\nexport class CandleData {\n}\nexport class CandleList {\n constructor() {\n this.open = [];\n this.high = [];\n this.low = [];\n this.close = [];\n this.volume = [];\n this.timestamp = [];\n }\n}\n","import { format as nf } from '../Utils/NumberFormatter';\nexport class IndicatorInput {\n}\nexport class AllInputs {\n}\nexport class Indicator {\n constructor(input) {\n this.format = input.format || nf;\n }\n static reverseInputs(input) {\n if (input.reversedInput) {\n input.values ? input.values.reverse() : undefined;\n input.open ? input.open.reverse() : undefined;\n input.high ? input.high.reverse() : undefined;\n input.low ? input.low.reverse() : undefined;\n input.close ? input.close.reverse() : undefined;\n input.volume ? input.volume.reverse() : undefined;\n input.timestamp ? input.timestamp.reverse() : undefined;\n }\n }\n getResult() {\n return this.result;\n }\n}\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/8/16.\n */\n\"use strict\";\nexport class MDMInput extends IndicatorInput {\n}\n;\nexport class MDM extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var format = this.format;\n if (lows.length != highs.length) {\n throw ('Inputs(low,high) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var minusDm;\n var current = yield;\n var last;\n while (true) {\n if (last) {\n let upMove = (current.high - last.high);\n let downMove = (last.low - current.low);\n minusDm = format((downMove > upMove && downMove > 0) ? downMove : 0);\n }\n last = current;\n current = yield minusDm;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index]\n });\n if (result.value !== undefined)\n this.result.push(result.value);\n });\n }\n ;\n static calculate(input) {\n Indicator.reverseInputs(input);\n var result = new MDM(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/8/16.\n */\nexport class PDMInput extends IndicatorInput {\n}\n;\nexport class PDM extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var format = this.format;\n if (lows.length != highs.length) {\n throw ('Inputs(low,high) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var plusDm;\n var current = yield;\n var last;\n while (true) {\n if (last) {\n let upMove = (current.high - last.high);\n let downMove = (last.low - current.low);\n plusDm = format((upMove > downMove && upMove > 0) ? upMove : 0);\n }\n last = current;\n current = yield plusDm;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index]\n });\n if (result.value !== undefined)\n this.result.push(result.value);\n });\n }\n ;\n static calculate(input) {\n Indicator.reverseInputs(input);\n var result = new PDM(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\n","export default class CandlestickFinder {\n constructor() {\n // if (new.target === Abstract) {\n // throw new TypeError(\"Abstract class\");\n // }\n }\n approximateEqual(a, b) {\n let left = parseFloat(Math.abs(a - b).toPrecision(4)) * 1;\n let right = parseFloat((a * 0.001).toPrecision(4)) * 1;\n return left <= right;\n }\n logic(data) {\n throw \"this has to be implemented\";\n }\n getAllPatternIndex(data) {\n if (data.close.length < this.requiredCount) {\n console.warn('Data count less than data required for the strategy ', this.name);\n return [];\n }\n if (data.reversedInput) {\n data.open.reverse();\n data.high.reverse();\n data.low.reverse();\n data.close.reverse();\n }\n let strategyFn = this.logic;\n return this._generateDataForCandleStick(data)\n .map((current, index) => {\n return strategyFn.call(this, current) ? index : undefined;\n }).filter((hasIndex) => {\n return hasIndex;\n });\n }\n hasPattern(data) {\n if (data.close.length < this.requiredCount) {\n console.warn('Data count less than data required for the strategy ', this.name);\n return false;\n }\n if (data.reversedInput) {\n data.open.reverse();\n data.high.reverse();\n data.low.reverse();\n data.close.reverse();\n }\n let strategyFn = this.logic;\n return strategyFn.call(this, this._getLastDataForCandleStick(data));\n }\n _getLastDataForCandleStick(data) {\n let requiredCount = this.requiredCount;\n if (data.close.length === requiredCount) {\n return data;\n }\n else {\n let returnVal = {\n open: [],\n high: [],\n low: [],\n close: []\n };\n let i = 0;\n let index = data.close.length - requiredCount;\n while (i < requiredCount) {\n returnVal.open.push(data.open[index + i]);\n returnVal.high.push(data.high[index + i]);\n returnVal.low.push(data.low[index + i]);\n returnVal.close.push(data.close[index + i]);\n i++;\n }\n return returnVal;\n }\n }\n _generateDataForCandleStick(data) {\n let requiredCount = this.requiredCount;\n let generatedData = data.close.map(function (currentData, index) {\n let i = 0;\n let returnVal = {\n open: [],\n high: [],\n low: [],\n close: []\n };\n while (i < requiredCount) {\n returnVal.open.push(data.open[index + i]);\n returnVal.high.push(data.high[index + i]);\n returnVal.low.push(data.low[index + i]);\n returnVal.close.push(data.close[index + i]);\n i++;\n }\n return returnVal;\n }).filter((val, index) => { return (index <= (data.close.length - requiredCount)); });\n return generatedData;\n }\n}\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","var createFind = require('./_createFind'),\n findIndex = require('./findIndex');\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\n\nmodule.exports = find;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var basePick = require('./_basePick'),\n flatRest = require('./_flatRest');\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nmodule.exports = pick;\n","/* @preserve\n * The MIT License (MIT)\n * \n * Copyright (c) 2013-2017 Petka Antonov\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n * \n */\n/**\n * bluebird build version 3.5.1\n * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each\n*/\n!function(e){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=e();else if(\"function\"==typeof define&&define.amd)define([],e);else{var f;\"undefined\"!=typeof window?f=window:\"undefined\"!=typeof global?f=global:\"undefined\"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_==\"function\"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_==\"function\"&&_dereq_;for(var o=0;o 0) {\n var fn = queue.shift();\n if (typeof fn !== \"function\") {\n fn._settlePromises();\n continue;\n }\n var receiver = queue.shift();\n var arg = queue.shift();\n fn.call(receiver, arg);\n }\n};\n\nAsync.prototype._drainQueues = function () {\n this._drainQueue(this._normalQueue);\n this._reset();\n this._haveDrainedQueues = true;\n this._drainQueue(this._lateQueue);\n};\n\nAsync.prototype._queueTick = function () {\n if (!this._isTickUsed) {\n this._isTickUsed = true;\n this._schedule(this.drainQueues);\n }\n};\n\nAsync.prototype._reset = function () {\n this._isTickUsed = false;\n};\n\nmodule.exports = Async;\nmodule.exports.firstLineError = firstLineError;\n\n},{\"./queue\":26,\"./schedule\":29,\"./util\":36}],3:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) {\nvar calledBind = false;\nvar rejectThis = function(_, e) {\n this._reject(e);\n};\n\nvar targetRejected = function(e, context) {\n context.promiseRejectionQueued = true;\n context.bindingPromise._then(rejectThis, rejectThis, null, this, e);\n};\n\nvar bindingResolved = function(thisArg, context) {\n if (((this._bitField & 50397184) === 0)) {\n this._resolveCallback(context.target);\n }\n};\n\nvar bindingRejected = function(e, context) {\n if (!context.promiseRejectionQueued) this._reject(e);\n};\n\nPromise.prototype.bind = function (thisArg) {\n if (!calledBind) {\n calledBind = true;\n Promise.prototype._propagateFrom = debug.propagateFromFunction();\n Promise.prototype._boundValue = debug.boundValueFunction();\n }\n var maybePromise = tryConvertToPromise(thisArg);\n var ret = new Promise(INTERNAL);\n ret._propagateFrom(this, 1);\n var target = this._target();\n ret._setBoundTo(maybePromise);\n if (maybePromise instanceof Promise) {\n var context = {\n promiseRejectionQueued: false,\n promise: ret,\n target: target,\n bindingPromise: maybePromise\n };\n target._then(INTERNAL, targetRejected, undefined, ret, context);\n maybePromise._then(\n bindingResolved, bindingRejected, undefined, ret, context);\n ret._setOnCancel(maybePromise);\n } else {\n ret._resolveCallback(target);\n }\n return ret;\n};\n\nPromise.prototype._setBoundTo = function (obj) {\n if (obj !== undefined) {\n this._bitField = this._bitField | 2097152;\n this._boundTo = obj;\n } else {\n this._bitField = this._bitField & (~2097152);\n }\n};\n\nPromise.prototype._isBound = function () {\n return (this._bitField & 2097152) === 2097152;\n};\n\nPromise.bind = function (thisArg, value) {\n return Promise.resolve(value).bind(thisArg);\n};\n};\n\n},{}],4:[function(_dereq_,module,exports){\n\"use strict\";\nvar old;\nif (typeof Promise !== \"undefined\") old = Promise;\nfunction noConflict() {\n try { if (Promise === bluebird) Promise = old; }\n catch (e) {}\n return bluebird;\n}\nvar bluebird = _dereq_(\"./promise\")();\nbluebird.noConflict = noConflict;\nmodule.exports = bluebird;\n\n},{\"./promise\":22}],5:[function(_dereq_,module,exports){\n\"use strict\";\nvar cr = Object.create;\nif (cr) {\n var callerCache = cr(null);\n var getterCache = cr(null);\n callerCache[\" size\"] = getterCache[\" size\"] = 0;\n}\n\nmodule.exports = function(Promise) {\nvar util = _dereq_(\"./util\");\nvar canEvaluate = util.canEvaluate;\nvar isIdentifier = util.isIdentifier;\n\nvar getMethodCaller;\nvar getGetter;\nif (!true) {\nvar makeMethodCaller = function (methodName) {\n return new Function(\"ensureMethod\", \" \\n\\\n return function(obj) { \\n\\\n 'use strict' \\n\\\n var len = this.length; \\n\\\n ensureMethod(obj, 'methodName'); \\n\\\n switch(len) { \\n\\\n case 1: return obj.methodName(this[0]); \\n\\\n case 2: return obj.methodName(this[0], this[1]); \\n\\\n case 3: return obj.methodName(this[0], this[1], this[2]); \\n\\\n case 0: return obj.methodName(); \\n\\\n default: \\n\\\n return obj.methodName.apply(obj, this); \\n\\\n } \\n\\\n }; \\n\\\n \".replace(/methodName/g, methodName))(ensureMethod);\n};\n\nvar makeGetter = function (propertyName) {\n return new Function(\"obj\", \" \\n\\\n 'use strict'; \\n\\\n return obj.propertyName; \\n\\\n \".replace(\"propertyName\", propertyName));\n};\n\nvar getCompiled = function(name, compiler, cache) {\n var ret = cache[name];\n if (typeof ret !== \"function\") {\n if (!isIdentifier(name)) {\n return null;\n }\n ret = compiler(name);\n cache[name] = ret;\n cache[\" size\"]++;\n if (cache[\" size\"] > 512) {\n var keys = Object.keys(cache);\n for (var i = 0; i < 256; ++i) delete cache[keys[i]];\n cache[\" size\"] = keys.length - 256;\n }\n }\n return ret;\n};\n\ngetMethodCaller = function(name) {\n return getCompiled(name, makeMethodCaller, callerCache);\n};\n\ngetGetter = function(name) {\n return getCompiled(name, makeGetter, getterCache);\n};\n}\n\nfunction ensureMethod(obj, methodName) {\n var fn;\n if (obj != null) fn = obj[methodName];\n if (typeof fn !== \"function\") {\n var message = \"Object \" + util.classString(obj) + \" has no method '\" +\n util.toString(methodName) + \"'\";\n throw new Promise.TypeError(message);\n }\n return fn;\n}\n\nfunction caller(obj) {\n var methodName = this.pop();\n var fn = ensureMethod(obj, methodName);\n return fn.apply(obj, this);\n}\nPromise.prototype.call = function (methodName) {\n var args = [].slice.call(arguments, 1);;\n if (!true) {\n if (canEvaluate) {\n var maybeCaller = getMethodCaller(methodName);\n if (maybeCaller !== null) {\n return this._then(\n maybeCaller, undefined, undefined, args, undefined);\n }\n }\n }\n args.push(methodName);\n return this._then(caller, undefined, undefined, args, undefined);\n};\n\nfunction namedGetter(obj) {\n return obj[this];\n}\nfunction indexedGetter(obj) {\n var index = +this;\n if (index < 0) index = Math.max(0, index + obj.length);\n return obj[index];\n}\nPromise.prototype.get = function (propertyName) {\n var isIndex = (typeof propertyName === \"number\");\n var getter;\n if (!isIndex) {\n if (canEvaluate) {\n var maybeGetter = getGetter(propertyName);\n getter = maybeGetter !== null ? maybeGetter : namedGetter;\n } else {\n getter = namedGetter;\n }\n } else {\n getter = indexedGetter;\n }\n return this._then(getter, undefined, undefined, propertyName, undefined);\n};\n};\n\n},{\"./util\":36}],6:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, PromiseArray, apiRejection, debug) {\nvar util = _dereq_(\"./util\");\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\nvar async = Promise._async;\n\nPromise.prototype[\"break\"] = Promise.prototype.cancel = function() {\n if (!debug.cancellation()) return this._warn(\"cancellation is disabled\");\n\n var promise = this;\n var child = promise;\n while (promise._isCancellable()) {\n if (!promise._cancelBy(child)) {\n if (child._isFollowing()) {\n child._followee().cancel();\n } else {\n child._cancelBranched();\n }\n break;\n }\n\n var parent = promise._cancellationParent;\n if (parent == null || !parent._isCancellable()) {\n if (promise._isFollowing()) {\n promise._followee().cancel();\n } else {\n promise._cancelBranched();\n }\n break;\n } else {\n if (promise._isFollowing()) promise._followee().cancel();\n promise._setWillBeCancelled();\n child = promise;\n promise = parent;\n }\n }\n};\n\nPromise.prototype._branchHasCancelled = function() {\n this._branchesRemainingToCancel--;\n};\n\nPromise.prototype._enoughBranchesHaveCancelled = function() {\n return this._branchesRemainingToCancel === undefined ||\n this._branchesRemainingToCancel <= 0;\n};\n\nPromise.prototype._cancelBy = function(canceller) {\n if (canceller === this) {\n this._branchesRemainingToCancel = 0;\n this._invokeOnCancel();\n return true;\n } else {\n this._branchHasCancelled();\n if (this._enoughBranchesHaveCancelled()) {\n this._invokeOnCancel();\n return true;\n }\n }\n return false;\n};\n\nPromise.prototype._cancelBranched = function() {\n if (this._enoughBranchesHaveCancelled()) {\n this._cancel();\n }\n};\n\nPromise.prototype._cancel = function() {\n if (!this._isCancellable()) return;\n this._setCancelled();\n async.invoke(this._cancelPromises, this, undefined);\n};\n\nPromise.prototype._cancelPromises = function() {\n if (this._length() > 0) this._settlePromises();\n};\n\nPromise.prototype._unsetOnCancel = function() {\n this._onCancelField = undefined;\n};\n\nPromise.prototype._isCancellable = function() {\n return this.isPending() && !this._isCancelled();\n};\n\nPromise.prototype.isCancellable = function() {\n return this.isPending() && !this.isCancelled();\n};\n\nPromise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) {\n if (util.isArray(onCancelCallback)) {\n for (var i = 0; i < onCancelCallback.length; ++i) {\n this._doInvokeOnCancel(onCancelCallback[i], internalOnly);\n }\n } else if (onCancelCallback !== undefined) {\n if (typeof onCancelCallback === \"function\") {\n if (!internalOnly) {\n var e = tryCatch(onCancelCallback).call(this._boundValue());\n if (e === errorObj) {\n this._attachExtraTrace(e.e);\n async.throwLater(e.e);\n }\n }\n } else {\n onCancelCallback._resultCancelled(this);\n }\n }\n};\n\nPromise.prototype._invokeOnCancel = function() {\n var onCancelCallback = this._onCancel();\n this._unsetOnCancel();\n async.invoke(this._doInvokeOnCancel, this, onCancelCallback);\n};\n\nPromise.prototype._invokeInternalOnCancel = function() {\n if (this._isCancellable()) {\n this._doInvokeOnCancel(this._onCancel(), true);\n this._unsetOnCancel();\n }\n};\n\nPromise.prototype._resultCancelled = function() {\n this.cancel();\n};\n\n};\n\n},{\"./util\":36}],7:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(NEXT_FILTER) {\nvar util = _dereq_(\"./util\");\nvar getKeys = _dereq_(\"./es5\").keys;\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\n\nfunction catchFilter(instances, cb, promise) {\n return function(e) {\n var boundTo = promise._boundValue();\n predicateLoop: for (var i = 0; i < instances.length; ++i) {\n var item = instances[i];\n\n if (item === Error ||\n (item != null && item.prototype instanceof Error)) {\n if (e instanceof item) {\n return tryCatch(cb).call(boundTo, e);\n }\n } else if (typeof item === \"function\") {\n var matchesPredicate = tryCatch(item).call(boundTo, e);\n if (matchesPredicate === errorObj) {\n return matchesPredicate;\n } else if (matchesPredicate) {\n return tryCatch(cb).call(boundTo, e);\n }\n } else if (util.isObject(e)) {\n var keys = getKeys(item);\n for (var j = 0; j < keys.length; ++j) {\n var key = keys[j];\n if (item[key] != e[key]) {\n continue predicateLoop;\n }\n }\n return tryCatch(cb).call(boundTo, e);\n }\n }\n return NEXT_FILTER;\n };\n}\n\nreturn catchFilter;\n};\n\n},{\"./es5\":13,\"./util\":36}],8:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise) {\nvar longStackTraces = false;\nvar contextStack = [];\n\nPromise.prototype._promiseCreated = function() {};\nPromise.prototype._pushContext = function() {};\nPromise.prototype._popContext = function() {return null;};\nPromise._peekContext = Promise.prototype._peekContext = function() {};\n\nfunction Context() {\n this._trace = new Context.CapturedTrace(peekContext());\n}\nContext.prototype._pushContext = function () {\n if (this._trace !== undefined) {\n this._trace._promiseCreated = null;\n contextStack.push(this._trace);\n }\n};\n\nContext.prototype._popContext = function () {\n if (this._trace !== undefined) {\n var trace = contextStack.pop();\n var ret = trace._promiseCreated;\n trace._promiseCreated = null;\n return ret;\n }\n return null;\n};\n\nfunction createContext() {\n if (longStackTraces) return new Context();\n}\n\nfunction peekContext() {\n var lastIndex = contextStack.length - 1;\n if (lastIndex >= 0) {\n return contextStack[lastIndex];\n }\n return undefined;\n}\nContext.CapturedTrace = null;\nContext.create = createContext;\nContext.deactivateLongStackTraces = function() {};\nContext.activateLongStackTraces = function() {\n var Promise_pushContext = Promise.prototype._pushContext;\n var Promise_popContext = Promise.prototype._popContext;\n var Promise_PeekContext = Promise._peekContext;\n var Promise_peekContext = Promise.prototype._peekContext;\n var Promise_promiseCreated = Promise.prototype._promiseCreated;\n Context.deactivateLongStackTraces = function() {\n Promise.prototype._pushContext = Promise_pushContext;\n Promise.prototype._popContext = Promise_popContext;\n Promise._peekContext = Promise_PeekContext;\n Promise.prototype._peekContext = Promise_peekContext;\n Promise.prototype._promiseCreated = Promise_promiseCreated;\n longStackTraces = false;\n };\n longStackTraces = true;\n Promise.prototype._pushContext = Context.prototype._pushContext;\n Promise.prototype._popContext = Context.prototype._popContext;\n Promise._peekContext = Promise.prototype._peekContext = peekContext;\n Promise.prototype._promiseCreated = function() {\n var ctx = this._peekContext();\n if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this;\n };\n};\nreturn Context;\n};\n\n},{}],9:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, Context) {\nvar getDomain = Promise._getDomain;\nvar async = Promise._async;\nvar Warning = _dereq_(\"./errors\").Warning;\nvar util = _dereq_(\"./util\");\nvar canAttachTrace = util.canAttachTrace;\nvar unhandledRejectionHandled;\nvar possiblyUnhandledRejection;\nvar bluebirdFramePattern =\n /[\\\\\\/]bluebird[\\\\\\/]js[\\\\\\/](release|debug|instrumented)/;\nvar nodeFramePattern = /\\((?:timers\\.js):\\d+:\\d+\\)/;\nvar parseLinePattern = /[\\/<\\(](.+?):(\\d+):(\\d+)\\)?\\s*$/;\nvar stackFramePattern = null;\nvar formatStack = null;\nvar indentStackFrames = false;\nvar printWarning;\nvar debugging = !!(util.env(\"BLUEBIRD_DEBUG\") != 0 &&\n (true ||\n util.env(\"BLUEBIRD_DEBUG\") ||\n util.env(\"NODE_ENV\") === \"development\"));\n\nvar warnings = !!(util.env(\"BLUEBIRD_WARNINGS\") != 0 &&\n (debugging || util.env(\"BLUEBIRD_WARNINGS\")));\n\nvar longStackTraces = !!(util.env(\"BLUEBIRD_LONG_STACK_TRACES\") != 0 &&\n (debugging || util.env(\"BLUEBIRD_LONG_STACK_TRACES\")));\n\nvar wForgottenReturn = util.env(\"BLUEBIRD_W_FORGOTTEN_RETURN\") != 0 &&\n (warnings || !!util.env(\"BLUEBIRD_W_FORGOTTEN_RETURN\"));\n\nPromise.prototype.suppressUnhandledRejections = function() {\n var target = this._target();\n target._bitField = ((target._bitField & (~1048576)) |\n 524288);\n};\n\nPromise.prototype._ensurePossibleRejectionHandled = function () {\n if ((this._bitField & 524288) !== 0) return;\n this._setRejectionIsUnhandled();\n var self = this;\n setTimeout(function() {\n self._notifyUnhandledRejection();\n }, 1);\n};\n\nPromise.prototype._notifyUnhandledRejectionIsHandled = function () {\n fireRejectionEvent(\"rejectionHandled\",\n unhandledRejectionHandled, undefined, this);\n};\n\nPromise.prototype._setReturnedNonUndefined = function() {\n this._bitField = this._bitField | 268435456;\n};\n\nPromise.prototype._returnedNonUndefined = function() {\n return (this._bitField & 268435456) !== 0;\n};\n\nPromise.prototype._notifyUnhandledRejection = function () {\n if (this._isRejectionUnhandled()) {\n var reason = this._settledValue();\n this._setUnhandledRejectionIsNotified();\n fireRejectionEvent(\"unhandledRejection\",\n possiblyUnhandledRejection, reason, this);\n }\n};\n\nPromise.prototype._setUnhandledRejectionIsNotified = function () {\n this._bitField = this._bitField | 262144;\n};\n\nPromise.prototype._unsetUnhandledRejectionIsNotified = function () {\n this._bitField = this._bitField & (~262144);\n};\n\nPromise.prototype._isUnhandledRejectionNotified = function () {\n return (this._bitField & 262144) > 0;\n};\n\nPromise.prototype._setRejectionIsUnhandled = function () {\n this._bitField = this._bitField | 1048576;\n};\n\nPromise.prototype._unsetRejectionIsUnhandled = function () {\n this._bitField = this._bitField & (~1048576);\n if (this._isUnhandledRejectionNotified()) {\n this._unsetUnhandledRejectionIsNotified();\n this._notifyUnhandledRejectionIsHandled();\n }\n};\n\nPromise.prototype._isRejectionUnhandled = function () {\n return (this._bitField & 1048576) > 0;\n};\n\nPromise.prototype._warn = function(message, shouldUseOwnTrace, promise) {\n return warn(message, shouldUseOwnTrace, promise || this);\n};\n\nPromise.onPossiblyUnhandledRejection = function (fn) {\n var domain = getDomain();\n possiblyUnhandledRejection =\n typeof fn === \"function\" ? (domain === null ?\n fn : util.domainBind(domain, fn))\n : undefined;\n};\n\nPromise.onUnhandledRejectionHandled = function (fn) {\n var domain = getDomain();\n unhandledRejectionHandled =\n typeof fn === \"function\" ? (domain === null ?\n fn : util.domainBind(domain, fn))\n : undefined;\n};\n\nvar disableLongStackTraces = function() {};\nPromise.longStackTraces = function () {\n if (async.haveItemsQueued() && !config.longStackTraces) {\n throw new Error(\"cannot enable long stack traces after promises have been created\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n if (!config.longStackTraces && longStackTracesIsSupported()) {\n var Promise_captureStackTrace = Promise.prototype._captureStackTrace;\n var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace;\n config.longStackTraces = true;\n disableLongStackTraces = function() {\n if (async.haveItemsQueued() && !config.longStackTraces) {\n throw new Error(\"cannot enable long stack traces after promises have been created\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n Promise.prototype._captureStackTrace = Promise_captureStackTrace;\n Promise.prototype._attachExtraTrace = Promise_attachExtraTrace;\n Context.deactivateLongStackTraces();\n async.enableTrampoline();\n config.longStackTraces = false;\n };\n Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace;\n Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace;\n Context.activateLongStackTraces();\n async.disableTrampolineIfNecessary();\n }\n};\n\nPromise.hasLongStackTraces = function () {\n return config.longStackTraces && longStackTracesIsSupported();\n};\n\nvar fireDomEvent = (function() {\n try {\n if (typeof CustomEvent === \"function\") {\n var event = new CustomEvent(\"CustomEvent\");\n util.global.dispatchEvent(event);\n return function(name, event) {\n var domEvent = new CustomEvent(name.toLowerCase(), {\n detail: event,\n cancelable: true\n });\n return !util.global.dispatchEvent(domEvent);\n };\n } else if (typeof Event === \"function\") {\n var event = new Event(\"CustomEvent\");\n util.global.dispatchEvent(event);\n return function(name, event) {\n var domEvent = new Event(name.toLowerCase(), {\n cancelable: true\n });\n domEvent.detail = event;\n return !util.global.dispatchEvent(domEvent);\n };\n } else {\n var event = document.createEvent(\"CustomEvent\");\n event.initCustomEvent(\"testingtheevent\", false, true, {});\n util.global.dispatchEvent(event);\n return function(name, event) {\n var domEvent = document.createEvent(\"CustomEvent\");\n domEvent.initCustomEvent(name.toLowerCase(), false, true,\n event);\n return !util.global.dispatchEvent(domEvent);\n };\n }\n } catch (e) {}\n return function() {\n return false;\n };\n})();\n\nvar fireGlobalEvent = (function() {\n if (util.isNode) {\n return function() {\n return process.emit.apply(process, arguments);\n };\n } else {\n if (!util.global) {\n return function() {\n return false;\n };\n }\n return function(name) {\n var methodName = \"on\" + name.toLowerCase();\n var method = util.global[methodName];\n if (!method) return false;\n method.apply(util.global, [].slice.call(arguments, 1));\n return true;\n };\n }\n})();\n\nfunction generatePromiseLifecycleEventObject(name, promise) {\n return {promise: promise};\n}\n\nvar eventToObjectGenerator = {\n promiseCreated: generatePromiseLifecycleEventObject,\n promiseFulfilled: generatePromiseLifecycleEventObject,\n promiseRejected: generatePromiseLifecycleEventObject,\n promiseResolved: generatePromiseLifecycleEventObject,\n promiseCancelled: generatePromiseLifecycleEventObject,\n promiseChained: function(name, promise, child) {\n return {promise: promise, child: child};\n },\n warning: function(name, warning) {\n return {warning: warning};\n },\n unhandledRejection: function (name, reason, promise) {\n return {reason: reason, promise: promise};\n },\n rejectionHandled: generatePromiseLifecycleEventObject\n};\n\nvar activeFireEvent = function (name) {\n var globalEventFired = false;\n try {\n globalEventFired = fireGlobalEvent.apply(null, arguments);\n } catch (e) {\n async.throwLater(e);\n globalEventFired = true;\n }\n\n var domEventFired = false;\n try {\n domEventFired = fireDomEvent(name,\n eventToObjectGenerator[name].apply(null, arguments));\n } catch (e) {\n async.throwLater(e);\n domEventFired = true;\n }\n\n return domEventFired || globalEventFired;\n};\n\nPromise.config = function(opts) {\n opts = Object(opts);\n if (\"longStackTraces\" in opts) {\n if (opts.longStackTraces) {\n Promise.longStackTraces();\n } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) {\n disableLongStackTraces();\n }\n }\n if (\"warnings\" in opts) {\n var warningsOption = opts.warnings;\n config.warnings = !!warningsOption;\n wForgottenReturn = config.warnings;\n\n if (util.isObject(warningsOption)) {\n if (\"wForgottenReturn\" in warningsOption) {\n wForgottenReturn = !!warningsOption.wForgottenReturn;\n }\n }\n }\n if (\"cancellation\" in opts && opts.cancellation && !config.cancellation) {\n if (async.haveItemsQueued()) {\n throw new Error(\n \"cannot enable cancellation after promises are in use\");\n }\n Promise.prototype._clearCancellationData =\n cancellationClearCancellationData;\n Promise.prototype._propagateFrom = cancellationPropagateFrom;\n Promise.prototype._onCancel = cancellationOnCancel;\n Promise.prototype._setOnCancel = cancellationSetOnCancel;\n Promise.prototype._attachCancellationCallback =\n cancellationAttachCancellationCallback;\n Promise.prototype._execute = cancellationExecute;\n propagateFromFunction = cancellationPropagateFrom;\n config.cancellation = true;\n }\n if (\"monitoring\" in opts) {\n if (opts.monitoring && !config.monitoring) {\n config.monitoring = true;\n Promise.prototype._fireEvent = activeFireEvent;\n } else if (!opts.monitoring && config.monitoring) {\n config.monitoring = false;\n Promise.prototype._fireEvent = defaultFireEvent;\n }\n }\n return Promise;\n};\n\nfunction defaultFireEvent() { return false; }\n\nPromise.prototype._fireEvent = defaultFireEvent;\nPromise.prototype._execute = function(executor, resolve, reject) {\n try {\n executor(resolve, reject);\n } catch (e) {\n return e;\n }\n};\nPromise.prototype._onCancel = function () {};\nPromise.prototype._setOnCancel = function (handler) { ; };\nPromise.prototype._attachCancellationCallback = function(onCancel) {\n ;\n};\nPromise.prototype._captureStackTrace = function () {};\nPromise.prototype._attachExtraTrace = function () {};\nPromise.prototype._clearCancellationData = function() {};\nPromise.prototype._propagateFrom = function (parent, flags) {\n ;\n ;\n};\n\nfunction cancellationExecute(executor, resolve, reject) {\n var promise = this;\n try {\n executor(resolve, reject, function(onCancel) {\n if (typeof onCancel !== \"function\") {\n throw new TypeError(\"onCancel must be a function, got: \" +\n util.toString(onCancel));\n }\n promise._attachCancellationCallback(onCancel);\n });\n } catch (e) {\n return e;\n }\n}\n\nfunction cancellationAttachCancellationCallback(onCancel) {\n if (!this._isCancellable()) return this;\n\n var previousOnCancel = this._onCancel();\n if (previousOnCancel !== undefined) {\n if (util.isArray(previousOnCancel)) {\n previousOnCancel.push(onCancel);\n } else {\n this._setOnCancel([previousOnCancel, onCancel]);\n }\n } else {\n this._setOnCancel(onCancel);\n }\n}\n\nfunction cancellationOnCancel() {\n return this._onCancelField;\n}\n\nfunction cancellationSetOnCancel(onCancel) {\n this._onCancelField = onCancel;\n}\n\nfunction cancellationClearCancellationData() {\n this._cancellationParent = undefined;\n this._onCancelField = undefined;\n}\n\nfunction cancellationPropagateFrom(parent, flags) {\n if ((flags & 1) !== 0) {\n this._cancellationParent = parent;\n var branchesRemainingToCancel = parent._branchesRemainingToCancel;\n if (branchesRemainingToCancel === undefined) {\n branchesRemainingToCancel = 0;\n }\n parent._branchesRemainingToCancel = branchesRemainingToCancel + 1;\n }\n if ((flags & 2) !== 0 && parent._isBound()) {\n this._setBoundTo(parent._boundTo);\n }\n}\n\nfunction bindingPropagateFrom(parent, flags) {\n if ((flags & 2) !== 0 && parent._isBound()) {\n this._setBoundTo(parent._boundTo);\n }\n}\nvar propagateFromFunction = bindingPropagateFrom;\n\nfunction boundValueFunction() {\n var ret = this._boundTo;\n if (ret !== undefined) {\n if (ret instanceof Promise) {\n if (ret.isFulfilled()) {\n return ret.value();\n } else {\n return undefined;\n }\n }\n }\n return ret;\n}\n\nfunction longStackTracesCaptureStackTrace() {\n this._trace = new CapturedTrace(this._peekContext());\n}\n\nfunction longStackTracesAttachExtraTrace(error, ignoreSelf) {\n if (canAttachTrace(error)) {\n var trace = this._trace;\n if (trace !== undefined) {\n if (ignoreSelf) trace = trace._parent;\n }\n if (trace !== undefined) {\n trace.attachExtraTrace(error);\n } else if (!error.__stackCleaned__) {\n var parsed = parseStackAndMessage(error);\n util.notEnumerableProp(error, \"stack\",\n parsed.message + \"\\n\" + parsed.stack.join(\"\\n\"));\n util.notEnumerableProp(error, \"__stackCleaned__\", true);\n }\n }\n}\n\nfunction checkForgottenReturns(returnValue, promiseCreated, name, promise,\n parent) {\n if (returnValue === undefined && promiseCreated !== null &&\n wForgottenReturn) {\n if (parent !== undefined && parent._returnedNonUndefined()) return;\n if ((promise._bitField & 65535) === 0) return;\n\n if (name) name = name + \" \";\n var handlerLine = \"\";\n var creatorLine = \"\";\n if (promiseCreated._trace) {\n var traceLines = promiseCreated._trace.stack.split(\"\\n\");\n var stack = cleanStack(traceLines);\n for (var i = stack.length - 1; i >= 0; --i) {\n var line = stack[i];\n if (!nodeFramePattern.test(line)) {\n var lineMatches = line.match(parseLinePattern);\n if (lineMatches) {\n handlerLine = \"at \" + lineMatches[1] +\n \":\" + lineMatches[2] + \":\" + lineMatches[3] + \" \";\n }\n break;\n }\n }\n\n if (stack.length > 0) {\n var firstUserLine = stack[0];\n for (var i = 0; i < traceLines.length; ++i) {\n\n if (traceLines[i] === firstUserLine) {\n if (i > 0) {\n creatorLine = \"\\n\" + traceLines[i - 1];\n }\n break;\n }\n }\n\n }\n }\n var msg = \"a promise was created in a \" + name +\n \"handler \" + handlerLine + \"but was not returned from it, \" +\n \"see http://goo.gl/rRqMUw\" +\n creatorLine;\n promise._warn(msg, true, promiseCreated);\n }\n}\n\nfunction deprecated(name, replacement) {\n var message = name +\n \" is deprecated and will be removed in a future version.\";\n if (replacement) message += \" Use \" + replacement + \" instead.\";\n return warn(message);\n}\n\nfunction warn(message, shouldUseOwnTrace, promise) {\n if (!config.warnings) return;\n var warning = new Warning(message);\n var ctx;\n if (shouldUseOwnTrace) {\n promise._attachExtraTrace(warning);\n } else if (config.longStackTraces && (ctx = Promise._peekContext())) {\n ctx.attachExtraTrace(warning);\n } else {\n var parsed = parseStackAndMessage(warning);\n warning.stack = parsed.message + \"\\n\" + parsed.stack.join(\"\\n\");\n }\n\n if (!activeFireEvent(\"warning\", warning)) {\n formatAndLogError(warning, \"\", true);\n }\n}\n\nfunction reconstructStack(message, stacks) {\n for (var i = 0; i < stacks.length - 1; ++i) {\n stacks[i].push(\"From previous event:\");\n stacks[i] = stacks[i].join(\"\\n\");\n }\n if (i < stacks.length) {\n stacks[i] = stacks[i].join(\"\\n\");\n }\n return message + \"\\n\" + stacks.join(\"\\n\");\n}\n\nfunction removeDuplicateOrEmptyJumps(stacks) {\n for (var i = 0; i < stacks.length; ++i) {\n if (stacks[i].length === 0 ||\n ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {\n stacks.splice(i, 1);\n i--;\n }\n }\n}\n\nfunction removeCommonRoots(stacks) {\n var current = stacks[0];\n for (var i = 1; i < stacks.length; ++i) {\n var prev = stacks[i];\n var currentLastIndex = current.length - 1;\n var currentLastLine = current[currentLastIndex];\n var commonRootMeetPoint = -1;\n\n for (var j = prev.length - 1; j >= 0; --j) {\n if (prev[j] === currentLastLine) {\n commonRootMeetPoint = j;\n break;\n }\n }\n\n for (var j = commonRootMeetPoint; j >= 0; --j) {\n var line = prev[j];\n if (current[currentLastIndex] === line) {\n current.pop();\n currentLastIndex--;\n } else {\n break;\n }\n }\n current = prev;\n }\n}\n\nfunction cleanStack(stack) {\n var ret = [];\n for (var i = 0; i < stack.length; ++i) {\n var line = stack[i];\n var isTraceLine = \" (No stack trace)\" === line ||\n stackFramePattern.test(line);\n var isInternalFrame = isTraceLine && shouldIgnore(line);\n if (isTraceLine && !isInternalFrame) {\n if (indentStackFrames && line.charAt(0) !== \" \") {\n line = \" \" + line;\n }\n ret.push(line);\n }\n }\n return ret;\n}\n\nfunction stackFramesAsArray(error) {\n var stack = error.stack.replace(/\\s+$/g, \"\").split(\"\\n\");\n for (var i = 0; i < stack.length; ++i) {\n var line = stack[i];\n if (\" (No stack trace)\" === line || stackFramePattern.test(line)) {\n break;\n }\n }\n if (i > 0 && error.name != \"SyntaxError\") {\n stack = stack.slice(i);\n }\n return stack;\n}\n\nfunction parseStackAndMessage(error) {\n var stack = error.stack;\n var message = error.toString();\n stack = typeof stack === \"string\" && stack.length > 0\n ? stackFramesAsArray(error) : [\" (No stack trace)\"];\n return {\n message: message,\n stack: error.name == \"SyntaxError\" ? stack : cleanStack(stack)\n };\n}\n\nfunction formatAndLogError(error, title, isSoft) {\n if (typeof console !== \"undefined\") {\n var message;\n if (util.isObject(error)) {\n var stack = error.stack;\n message = title + formatStack(stack, error);\n } else {\n message = title + String(error);\n }\n if (typeof printWarning === \"function\") {\n printWarning(message, isSoft);\n } else if (typeof console.log === \"function\" ||\n typeof console.log === \"object\") {\n console.log(message);\n }\n }\n}\n\nfunction fireRejectionEvent(name, localHandler, reason, promise) {\n var localEventFired = false;\n try {\n if (typeof localHandler === \"function\") {\n localEventFired = true;\n if (name === \"rejectionHandled\") {\n localHandler(promise);\n } else {\n localHandler(reason, promise);\n }\n }\n } catch (e) {\n async.throwLater(e);\n }\n\n if (name === \"unhandledRejection\") {\n if (!activeFireEvent(name, reason, promise) && !localEventFired) {\n formatAndLogError(reason, \"Unhandled rejection \");\n }\n } else {\n activeFireEvent(name, promise);\n }\n}\n\nfunction formatNonError(obj) {\n var str;\n if (typeof obj === \"function\") {\n str = \"[function \" +\n (obj.name || \"anonymous\") +\n \"]\";\n } else {\n str = obj && typeof obj.toString === \"function\"\n ? obj.toString() : util.toString(obj);\n var ruselessToString = /\\[object [a-zA-Z0-9$_]+\\]/;\n if (ruselessToString.test(str)) {\n try {\n var newStr = JSON.stringify(obj);\n str = newStr;\n }\n catch(e) {\n\n }\n }\n if (str.length === 0) {\n str = \"(empty array)\";\n }\n }\n return (\"(<\" + snip(str) + \">, no stack trace)\");\n}\n\nfunction snip(str) {\n var maxChars = 41;\n if (str.length < maxChars) {\n return str;\n }\n return str.substr(0, maxChars - 3) + \"...\";\n}\n\nfunction longStackTracesIsSupported() {\n return typeof captureStackTrace === \"function\";\n}\n\nvar shouldIgnore = function() { return false; };\nvar parseLineInfoRegex = /[\\/<\\(]([^:\\/]+):(\\d+):(?:\\d+)\\)?\\s*$/;\nfunction parseLineInfo(line) {\n var matches = line.match(parseLineInfoRegex);\n if (matches) {\n return {\n fileName: matches[1],\n line: parseInt(matches[2], 10)\n };\n }\n}\n\nfunction setBounds(firstLineError, lastLineError) {\n if (!longStackTracesIsSupported()) return;\n var firstStackLines = firstLineError.stack.split(\"\\n\");\n var lastStackLines = lastLineError.stack.split(\"\\n\");\n var firstIndex = -1;\n var lastIndex = -1;\n var firstFileName;\n var lastFileName;\n for (var i = 0; i < firstStackLines.length; ++i) {\n var result = parseLineInfo(firstStackLines[i]);\n if (result) {\n firstFileName = result.fileName;\n firstIndex = result.line;\n break;\n }\n }\n for (var i = 0; i < lastStackLines.length; ++i) {\n var result = parseLineInfo(lastStackLines[i]);\n if (result) {\n lastFileName = result.fileName;\n lastIndex = result.line;\n break;\n }\n }\n if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||\n firstFileName !== lastFileName || firstIndex >= lastIndex) {\n return;\n }\n\n shouldIgnore = function(line) {\n if (bluebirdFramePattern.test(line)) return true;\n var info = parseLineInfo(line);\n if (info) {\n if (info.fileName === firstFileName &&\n (firstIndex <= info.line && info.line <= lastIndex)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction CapturedTrace(parent) {\n this._parent = parent;\n this._promisesCreated = 0;\n var length = this._length = 1 + (parent === undefined ? 0 : parent._length);\n captureStackTrace(this, CapturedTrace);\n if (length > 32) this.uncycle();\n}\nutil.inherits(CapturedTrace, Error);\nContext.CapturedTrace = CapturedTrace;\n\nCapturedTrace.prototype.uncycle = function() {\n var length = this._length;\n if (length < 2) return;\n var nodes = [];\n var stackToIndex = {};\n\n for (var i = 0, node = this; node !== undefined; ++i) {\n nodes.push(node);\n node = node._parent;\n }\n length = this._length = i;\n for (var i = length - 1; i >= 0; --i) {\n var stack = nodes[i].stack;\n if (stackToIndex[stack] === undefined) {\n stackToIndex[stack] = i;\n }\n }\n for (var i = 0; i < length; ++i) {\n var currentStack = nodes[i].stack;\n var index = stackToIndex[currentStack];\n if (index !== undefined && index !== i) {\n if (index > 0) {\n nodes[index - 1]._parent = undefined;\n nodes[index - 1]._length = 1;\n }\n nodes[i]._parent = undefined;\n nodes[i]._length = 1;\n var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;\n\n if (index < length - 1) {\n cycleEdgeNode._parent = nodes[index + 1];\n cycleEdgeNode._parent.uncycle();\n cycleEdgeNode._length =\n cycleEdgeNode._parent._length + 1;\n } else {\n cycleEdgeNode._parent = undefined;\n cycleEdgeNode._length = 1;\n }\n var currentChildLength = cycleEdgeNode._length + 1;\n for (var j = i - 2; j >= 0; --j) {\n nodes[j]._length = currentChildLength;\n currentChildLength++;\n }\n return;\n }\n }\n};\n\nCapturedTrace.prototype.attachExtraTrace = function(error) {\n if (error.__stackCleaned__) return;\n this.uncycle();\n var parsed = parseStackAndMessage(error);\n var message = parsed.message;\n var stacks = [parsed.stack];\n\n var trace = this;\n while (trace !== undefined) {\n stacks.push(cleanStack(trace.stack.split(\"\\n\")));\n trace = trace._parent;\n }\n removeCommonRoots(stacks);\n removeDuplicateOrEmptyJumps(stacks);\n util.notEnumerableProp(error, \"stack\", reconstructStack(message, stacks));\n util.notEnumerableProp(error, \"__stackCleaned__\", true);\n};\n\nvar captureStackTrace = (function stackDetection() {\n var v8stackFramePattern = /^\\s*at\\s*/;\n var v8stackFormatter = function(stack, error) {\n if (typeof stack === \"string\") return stack;\n\n if (error.name !== undefined &&\n error.message !== undefined) {\n return error.toString();\n }\n return formatNonError(error);\n };\n\n if (typeof Error.stackTraceLimit === \"number\" &&\n typeof Error.captureStackTrace === \"function\") {\n Error.stackTraceLimit += 6;\n stackFramePattern = v8stackFramePattern;\n formatStack = v8stackFormatter;\n var captureStackTrace = Error.captureStackTrace;\n\n shouldIgnore = function(line) {\n return bluebirdFramePattern.test(line);\n };\n return function(receiver, ignoreUntil) {\n Error.stackTraceLimit += 6;\n captureStackTrace(receiver, ignoreUntil);\n Error.stackTraceLimit -= 6;\n };\n }\n var err = new Error();\n\n if (typeof err.stack === \"string\" &&\n err.stack.split(\"\\n\")[0].indexOf(\"stackDetection@\") >= 0) {\n stackFramePattern = /@/;\n formatStack = v8stackFormatter;\n indentStackFrames = true;\n return function captureStackTrace(o) {\n o.stack = new Error().stack;\n };\n }\n\n var hasStackAfterThrow;\n try { throw new Error(); }\n catch(e) {\n hasStackAfterThrow = (\"stack\" in e);\n }\n if (!(\"stack\" in err) && hasStackAfterThrow &&\n typeof Error.stackTraceLimit === \"number\") {\n stackFramePattern = v8stackFramePattern;\n formatStack = v8stackFormatter;\n return function captureStackTrace(o) {\n Error.stackTraceLimit += 6;\n try { throw new Error(); }\n catch(e) { o.stack = e.stack; }\n Error.stackTraceLimit -= 6;\n };\n }\n\n formatStack = function(stack, error) {\n if (typeof stack === \"string\") return stack;\n\n if ((typeof error === \"object\" ||\n typeof error === \"function\") &&\n error.name !== undefined &&\n error.message !== undefined) {\n return error.toString();\n }\n return formatNonError(error);\n };\n\n return null;\n\n})([]);\n\nif (typeof console !== \"undefined\" && typeof console.warn !== \"undefined\") {\n printWarning = function (message) {\n console.warn(message);\n };\n if (util.isNode && process.stderr.isTTY) {\n printWarning = function(message, isSoft) {\n var color = isSoft ? \"\\u001b[33m\" : \"\\u001b[31m\";\n console.warn(color + message + \"\\u001b[0m\\n\");\n };\n } else if (!util.isNode && typeof (new Error().stack) === \"string\") {\n printWarning = function(message, isSoft) {\n console.warn(\"%c\" + message,\n isSoft ? \"color: darkorange\" : \"color: red\");\n };\n }\n}\n\nvar config = {\n warnings: warnings,\n longStackTraces: false,\n cancellation: false,\n monitoring: false\n};\n\nif (longStackTraces) Promise.longStackTraces();\n\nreturn {\n longStackTraces: function() {\n return config.longStackTraces;\n },\n warnings: function() {\n return config.warnings;\n },\n cancellation: function() {\n return config.cancellation;\n },\n monitoring: function() {\n return config.monitoring;\n },\n propagateFromFunction: function() {\n return propagateFromFunction;\n },\n boundValueFunction: function() {\n return boundValueFunction;\n },\n checkForgottenReturns: checkForgottenReturns,\n setBounds: setBounds,\n warn: warn,\n deprecated: deprecated,\n CapturedTrace: CapturedTrace,\n fireDomEvent: fireDomEvent,\n fireGlobalEvent: fireGlobalEvent\n};\n};\n\n},{\"./errors\":12,\"./util\":36}],10:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise) {\nfunction returner() {\n return this.value;\n}\nfunction thrower() {\n throw this.reason;\n}\n\nPromise.prototype[\"return\"] =\nPromise.prototype.thenReturn = function (value) {\n if (value instanceof Promise) value.suppressUnhandledRejections();\n return this._then(\n returner, undefined, undefined, {value: value}, undefined);\n};\n\nPromise.prototype[\"throw\"] =\nPromise.prototype.thenThrow = function (reason) {\n return this._then(\n thrower, undefined, undefined, {reason: reason}, undefined);\n};\n\nPromise.prototype.catchThrow = function (reason) {\n if (arguments.length <= 1) {\n return this._then(\n undefined, thrower, undefined, {reason: reason}, undefined);\n } else {\n var _reason = arguments[1];\n var handler = function() {throw _reason;};\n return this.caught(reason, handler);\n }\n};\n\nPromise.prototype.catchReturn = function (value) {\n if (arguments.length <= 1) {\n if (value instanceof Promise) value.suppressUnhandledRejections();\n return this._then(\n undefined, returner, undefined, {value: value}, undefined);\n } else {\n var _value = arguments[1];\n if (_value instanceof Promise) _value.suppressUnhandledRejections();\n var handler = function() {return _value;};\n return this.caught(value, handler);\n }\n};\n};\n\n},{}],11:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL) {\nvar PromiseReduce = Promise.reduce;\nvar PromiseAll = Promise.all;\n\nfunction promiseAllThis() {\n return PromiseAll(this);\n}\n\nfunction PromiseMapSeries(promises, fn) {\n return PromiseReduce(promises, fn, INTERNAL, INTERNAL);\n}\n\nPromise.prototype.each = function (fn) {\n return PromiseReduce(this, fn, INTERNAL, 0)\n ._then(promiseAllThis, undefined, undefined, this, undefined);\n};\n\nPromise.prototype.mapSeries = function (fn) {\n return PromiseReduce(this, fn, INTERNAL, INTERNAL);\n};\n\nPromise.each = function (promises, fn) {\n return PromiseReduce(promises, fn, INTERNAL, 0)\n ._then(promiseAllThis, undefined, undefined, promises, undefined);\n};\n\nPromise.mapSeries = PromiseMapSeries;\n};\n\n\n},{}],12:[function(_dereq_,module,exports){\n\"use strict\";\nvar es5 = _dereq_(\"./es5\");\nvar Objectfreeze = es5.freeze;\nvar util = _dereq_(\"./util\");\nvar inherits = util.inherits;\nvar notEnumerableProp = util.notEnumerableProp;\n\nfunction subError(nameProperty, defaultMessage) {\n function SubError(message) {\n if (!(this instanceof SubError)) return new SubError(message);\n notEnumerableProp(this, \"message\",\n typeof message === \"string\" ? message : defaultMessage);\n notEnumerableProp(this, \"name\", nameProperty);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n Error.call(this);\n }\n }\n inherits(SubError, Error);\n return SubError;\n}\n\nvar _TypeError, _RangeError;\nvar Warning = subError(\"Warning\", \"warning\");\nvar CancellationError = subError(\"CancellationError\", \"cancellation error\");\nvar TimeoutError = subError(\"TimeoutError\", \"timeout error\");\nvar AggregateError = subError(\"AggregateError\", \"aggregate error\");\ntry {\n _TypeError = TypeError;\n _RangeError = RangeError;\n} catch(e) {\n _TypeError = subError(\"TypeError\", \"type error\");\n _RangeError = subError(\"RangeError\", \"range error\");\n}\n\nvar methods = (\"join pop push shift unshift slice filter forEach some \" +\n \"every map indexOf lastIndexOf reduce reduceRight sort reverse\").split(\" \");\n\nfor (var i = 0; i < methods.length; ++i) {\n if (typeof Array.prototype[methods[i]] === \"function\") {\n AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];\n }\n}\n\nes5.defineProperty(AggregateError.prototype, \"length\", {\n value: 0,\n configurable: false,\n writable: true,\n enumerable: true\n});\nAggregateError.prototype[\"isOperational\"] = true;\nvar level = 0;\nAggregateError.prototype.toString = function() {\n var indent = Array(level * 4 + 1).join(\" \");\n var ret = \"\\n\" + indent + \"AggregateError of:\" + \"\\n\";\n level++;\n indent = Array(level * 4 + 1).join(\" \");\n for (var i = 0; i < this.length; ++i) {\n var str = this[i] === this ? \"[Circular AggregateError]\" : this[i] + \"\";\n var lines = str.split(\"\\n\");\n for (var j = 0; j < lines.length; ++j) {\n lines[j] = indent + lines[j];\n }\n str = lines.join(\"\\n\");\n ret += str + \"\\n\";\n }\n level--;\n return ret;\n};\n\nfunction OperationalError(message) {\n if (!(this instanceof OperationalError))\n return new OperationalError(message);\n notEnumerableProp(this, \"name\", \"OperationalError\");\n notEnumerableProp(this, \"message\", message);\n this.cause = message;\n this[\"isOperational\"] = true;\n\n if (message instanceof Error) {\n notEnumerableProp(this, \"message\", message.message);\n notEnumerableProp(this, \"stack\", message.stack);\n } else if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n}\ninherits(OperationalError, Error);\n\nvar errorTypes = Error[\"__BluebirdErrorTypes__\"];\nif (!errorTypes) {\n errorTypes = Objectfreeze({\n CancellationError: CancellationError,\n TimeoutError: TimeoutError,\n OperationalError: OperationalError,\n RejectionError: OperationalError,\n AggregateError: AggregateError\n });\n es5.defineProperty(Error, \"__BluebirdErrorTypes__\", {\n value: errorTypes,\n writable: false,\n enumerable: false,\n configurable: false\n });\n}\n\nmodule.exports = {\n Error: Error,\n TypeError: _TypeError,\n RangeError: _RangeError,\n CancellationError: errorTypes.CancellationError,\n OperationalError: errorTypes.OperationalError,\n TimeoutError: errorTypes.TimeoutError,\n AggregateError: errorTypes.AggregateError,\n Warning: Warning\n};\n\n},{\"./es5\":13,\"./util\":36}],13:[function(_dereq_,module,exports){\nvar isES5 = (function(){\n \"use strict\";\n return this === undefined;\n})();\n\nif (isES5) {\n module.exports = {\n freeze: Object.freeze,\n defineProperty: Object.defineProperty,\n getDescriptor: Object.getOwnPropertyDescriptor,\n keys: Object.keys,\n names: Object.getOwnPropertyNames,\n getPrototypeOf: Object.getPrototypeOf,\n isArray: Array.isArray,\n isES5: isES5,\n propertyIsWritable: function(obj, prop) {\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop);\n return !!(!descriptor || descriptor.writable || descriptor.set);\n }\n };\n} else {\n var has = {}.hasOwnProperty;\n var str = {}.toString;\n var proto = {}.constructor.prototype;\n\n var ObjectKeys = function (o) {\n var ret = [];\n for (var key in o) {\n if (has.call(o, key)) {\n ret.push(key);\n }\n }\n return ret;\n };\n\n var ObjectGetDescriptor = function(o, key) {\n return {value: o[key]};\n };\n\n var ObjectDefineProperty = function (o, key, desc) {\n o[key] = desc.value;\n return o;\n };\n\n var ObjectFreeze = function (obj) {\n return obj;\n };\n\n var ObjectGetPrototypeOf = function (obj) {\n try {\n return Object(obj).constructor.prototype;\n }\n catch (e) {\n return proto;\n }\n };\n\n var ArrayIsArray = function (obj) {\n try {\n return str.call(obj) === \"[object Array]\";\n }\n catch(e) {\n return false;\n }\n };\n\n module.exports = {\n isArray: ArrayIsArray,\n keys: ObjectKeys,\n names: ObjectKeys,\n defineProperty: ObjectDefineProperty,\n getDescriptor: ObjectGetDescriptor,\n freeze: ObjectFreeze,\n getPrototypeOf: ObjectGetPrototypeOf,\n isES5: isES5,\n propertyIsWritable: function() {\n return true;\n }\n };\n}\n\n},{}],14:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL) {\nvar PromiseMap = Promise.map;\n\nPromise.prototype.filter = function (fn, options) {\n return PromiseMap(this, fn, options, INTERNAL);\n};\n\nPromise.filter = function (promises, fn, options) {\n return PromiseMap(promises, fn, options, INTERNAL);\n};\n};\n\n},{}],15:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, tryConvertToPromise, NEXT_FILTER) {\nvar util = _dereq_(\"./util\");\nvar CancellationError = Promise.CancellationError;\nvar errorObj = util.errorObj;\nvar catchFilter = _dereq_(\"./catch_filter\")(NEXT_FILTER);\n\nfunction PassThroughHandlerContext(promise, type, handler) {\n this.promise = promise;\n this.type = type;\n this.handler = handler;\n this.called = false;\n this.cancelPromise = null;\n}\n\nPassThroughHandlerContext.prototype.isFinallyHandler = function() {\n return this.type === 0;\n};\n\nfunction FinallyHandlerCancelReaction(finallyHandler) {\n this.finallyHandler = finallyHandler;\n}\n\nFinallyHandlerCancelReaction.prototype._resultCancelled = function() {\n checkCancel(this.finallyHandler);\n};\n\nfunction checkCancel(ctx, reason) {\n if (ctx.cancelPromise != null) {\n if (arguments.length > 1) {\n ctx.cancelPromise._reject(reason);\n } else {\n ctx.cancelPromise._cancel();\n }\n ctx.cancelPromise = null;\n return true;\n }\n return false;\n}\n\nfunction succeed() {\n return finallyHandler.call(this, this.promise._target()._settledValue());\n}\nfunction fail(reason) {\n if (checkCancel(this, reason)) return;\n errorObj.e = reason;\n return errorObj;\n}\nfunction finallyHandler(reasonOrValue) {\n var promise = this.promise;\n var handler = this.handler;\n\n if (!this.called) {\n this.called = true;\n var ret = this.isFinallyHandler()\n ? handler.call(promise._boundValue())\n : handler.call(promise._boundValue(), reasonOrValue);\n if (ret === NEXT_FILTER) {\n return ret;\n } else if (ret !== undefined) {\n promise._setReturnedNonUndefined();\n var maybePromise = tryConvertToPromise(ret, promise);\n if (maybePromise instanceof Promise) {\n if (this.cancelPromise != null) {\n if (maybePromise._isCancelled()) {\n var reason =\n new CancellationError(\"late cancellation observer\");\n promise._attachExtraTrace(reason);\n errorObj.e = reason;\n return errorObj;\n } else if (maybePromise.isPending()) {\n maybePromise._attachCancellationCallback(\n new FinallyHandlerCancelReaction(this));\n }\n }\n return maybePromise._then(\n succeed, fail, undefined, this, undefined);\n }\n }\n }\n\n if (promise.isRejected()) {\n checkCancel(this);\n errorObj.e = reasonOrValue;\n return errorObj;\n } else {\n checkCancel(this);\n return reasonOrValue;\n }\n}\n\nPromise.prototype._passThrough = function(handler, type, success, fail) {\n if (typeof handler !== \"function\") return this.then();\n return this._then(success,\n fail,\n undefined,\n new PassThroughHandlerContext(this, type, handler),\n undefined);\n};\n\nPromise.prototype.lastly =\nPromise.prototype[\"finally\"] = function (handler) {\n return this._passThrough(handler,\n 0,\n finallyHandler,\n finallyHandler);\n};\n\n\nPromise.prototype.tap = function (handler) {\n return this._passThrough(handler, 1, finallyHandler);\n};\n\nPromise.prototype.tapCatch = function (handlerOrPredicate) {\n var len = arguments.length;\n if(len === 1) {\n return this._passThrough(handlerOrPredicate,\n 1,\n undefined,\n finallyHandler);\n } else {\n var catchInstances = new Array(len - 1),\n j = 0, i;\n for (i = 0; i < len - 1; ++i) {\n var item = arguments[i];\n if (util.isObject(item)) {\n catchInstances[j++] = item;\n } else {\n return Promise.reject(new TypeError(\n \"tapCatch statement predicate: \"\n + \"expecting an object but got \" + util.classString(item)\n ));\n }\n }\n catchInstances.length = j;\n var handler = arguments[i];\n return this._passThrough(catchFilter(catchInstances, handler, this),\n 1,\n undefined,\n finallyHandler);\n }\n\n};\n\nreturn PassThroughHandlerContext;\n};\n\n},{\"./catch_filter\":7,\"./util\":36}],16:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise,\n apiRejection,\n INTERNAL,\n tryConvertToPromise,\n Proxyable,\n debug) {\nvar errors = _dereq_(\"./errors\");\nvar TypeError = errors.TypeError;\nvar util = _dereq_(\"./util\");\nvar errorObj = util.errorObj;\nvar tryCatch = util.tryCatch;\nvar yieldHandlers = [];\n\nfunction promiseFromYieldHandler(value, yieldHandlers, traceParent) {\n for (var i = 0; i < yieldHandlers.length; ++i) {\n traceParent._pushContext();\n var result = tryCatch(yieldHandlers[i])(value);\n traceParent._popContext();\n if (result === errorObj) {\n traceParent._pushContext();\n var ret = Promise.reject(errorObj.e);\n traceParent._popContext();\n return ret;\n }\n var maybePromise = tryConvertToPromise(result, traceParent);\n if (maybePromise instanceof Promise) return maybePromise;\n }\n return null;\n}\n\nfunction PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {\n if (debug.cancellation()) {\n var internal = new Promise(INTERNAL);\n var _finallyPromise = this._finallyPromise = new Promise(INTERNAL);\n this._promise = internal.lastly(function() {\n return _finallyPromise;\n });\n internal._captureStackTrace();\n internal._setOnCancel(this);\n } else {\n var promise = this._promise = new Promise(INTERNAL);\n promise._captureStackTrace();\n }\n this._stack = stack;\n this._generatorFunction = generatorFunction;\n this._receiver = receiver;\n this._generator = undefined;\n this._yieldHandlers = typeof yieldHandler === \"function\"\n ? [yieldHandler].concat(yieldHandlers)\n : yieldHandlers;\n this._yieldedPromise = null;\n this._cancellationPhase = false;\n}\nutil.inherits(PromiseSpawn, Proxyable);\n\nPromiseSpawn.prototype._isResolved = function() {\n return this._promise === null;\n};\n\nPromiseSpawn.prototype._cleanup = function() {\n this._promise = this._generator = null;\n if (debug.cancellation() && this._finallyPromise !== null) {\n this._finallyPromise._fulfill();\n this._finallyPromise = null;\n }\n};\n\nPromiseSpawn.prototype._promiseCancelled = function() {\n if (this._isResolved()) return;\n var implementsReturn = typeof this._generator[\"return\"] !== \"undefined\";\n\n var result;\n if (!implementsReturn) {\n var reason = new Promise.CancellationError(\n \"generator .return() sentinel\");\n Promise.coroutine.returnSentinel = reason;\n this._promise._attachExtraTrace(reason);\n this._promise._pushContext();\n result = tryCatch(this._generator[\"throw\"]).call(this._generator,\n reason);\n this._promise._popContext();\n } else {\n this._promise._pushContext();\n result = tryCatch(this._generator[\"return\"]).call(this._generator,\n undefined);\n this._promise._popContext();\n }\n this._cancellationPhase = true;\n this._yieldedPromise = null;\n this._continue(result);\n};\n\nPromiseSpawn.prototype._promiseFulfilled = function(value) {\n this._yieldedPromise = null;\n this._promise._pushContext();\n var result = tryCatch(this._generator.next).call(this._generator, value);\n this._promise._popContext();\n this._continue(result);\n};\n\nPromiseSpawn.prototype._promiseRejected = function(reason) {\n this._yieldedPromise = null;\n this._promise._attachExtraTrace(reason);\n this._promise._pushContext();\n var result = tryCatch(this._generator[\"throw\"])\n .call(this._generator, reason);\n this._promise._popContext();\n this._continue(result);\n};\n\nPromiseSpawn.prototype._resultCancelled = function() {\n if (this._yieldedPromise instanceof Promise) {\n var promise = this._yieldedPromise;\n this._yieldedPromise = null;\n promise.cancel();\n }\n};\n\nPromiseSpawn.prototype.promise = function () {\n return this._promise;\n};\n\nPromiseSpawn.prototype._run = function () {\n this._generator = this._generatorFunction.call(this._receiver);\n this._receiver =\n this._generatorFunction = undefined;\n this._promiseFulfilled(undefined);\n};\n\nPromiseSpawn.prototype._continue = function (result) {\n var promise = this._promise;\n if (result === errorObj) {\n this._cleanup();\n if (this._cancellationPhase) {\n return promise.cancel();\n } else {\n return promise._rejectCallback(result.e, false);\n }\n }\n\n var value = result.value;\n if (result.done === true) {\n this._cleanup();\n if (this._cancellationPhase) {\n return promise.cancel();\n } else {\n return promise._resolveCallback(value);\n }\n } else {\n var maybePromise = tryConvertToPromise(value, this._promise);\n if (!(maybePromise instanceof Promise)) {\n maybePromise =\n promiseFromYieldHandler(maybePromise,\n this._yieldHandlers,\n this._promise);\n if (maybePromise === null) {\n this._promiseRejected(\n new TypeError(\n \"A value %s was yielded that could not be treated as a promise\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\\u000a\".replace(\"%s\", String(value)) +\n \"From coroutine:\\u000a\" +\n this._stack.split(\"\\n\").slice(1, -7).join(\"\\n\")\n )\n );\n return;\n }\n }\n maybePromise = maybePromise._target();\n var bitField = maybePromise._bitField;\n ;\n if (((bitField & 50397184) === 0)) {\n this._yieldedPromise = maybePromise;\n maybePromise._proxy(this, null);\n } else if (((bitField & 33554432) !== 0)) {\n Promise._async.invoke(\n this._promiseFulfilled, this, maybePromise._value()\n );\n } else if (((bitField & 16777216) !== 0)) {\n Promise._async.invoke(\n this._promiseRejected, this, maybePromise._reason()\n );\n } else {\n this._promiseCancelled();\n }\n }\n};\n\nPromise.coroutine = function (generatorFunction, options) {\n if (typeof generatorFunction !== \"function\") {\n throw new TypeError(\"generatorFunction must be a function\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n var yieldHandler = Object(options).yieldHandler;\n var PromiseSpawn$ = PromiseSpawn;\n var stack = new Error().stack;\n return function () {\n var generator = generatorFunction.apply(this, arguments);\n var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler,\n stack);\n var ret = spawn.promise();\n spawn._generator = generator;\n spawn._promiseFulfilled(undefined);\n return ret;\n };\n};\n\nPromise.coroutine.addYieldHandler = function(fn) {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"expecting a function but got \" + util.classString(fn));\n }\n yieldHandlers.push(fn);\n};\n\nPromise.spawn = function (generatorFunction) {\n debug.deprecated(\"Promise.spawn()\", \"Promise.coroutine()\");\n if (typeof generatorFunction !== \"function\") {\n return apiRejection(\"generatorFunction must be a function\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n var spawn = new PromiseSpawn(generatorFunction, this);\n var ret = spawn.promise();\n spawn._run(Promise.spawn);\n return ret;\n};\n};\n\n},{\"./errors\":12,\"./util\":36}],17:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports =\nfunction(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async,\n getDomain) {\nvar util = _dereq_(\"./util\");\nvar canEvaluate = util.canEvaluate;\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\nvar reject;\n\nif (!true) {\nif (canEvaluate) {\n var thenCallback = function(i) {\n return new Function(\"value\", \"holder\", \" \\n\\\n 'use strict'; \\n\\\n holder.pIndex = value; \\n\\\n holder.checkFulfillment(this); \\n\\\n \".replace(/Index/g, i));\n };\n\n var promiseSetter = function(i) {\n return new Function(\"promise\", \"holder\", \" \\n\\\n 'use strict'; \\n\\\n holder.pIndex = promise; \\n\\\n \".replace(/Index/g, i));\n };\n\n var generateHolderClass = function(total) {\n var props = new Array(total);\n for (var i = 0; i < props.length; ++i) {\n props[i] = \"this.p\" + (i+1);\n }\n var assignment = props.join(\" = \") + \" = null;\";\n var cancellationCode= \"var promise;\\n\" + props.map(function(prop) {\n return \" \\n\\\n promise = \" + prop + \"; \\n\\\n if (promise instanceof Promise) { \\n\\\n promise.cancel(); \\n\\\n } \\n\\\n \";\n }).join(\"\\n\");\n var passedArguments = props.join(\", \");\n var name = \"Holder$\" + total;\n\n\n var code = \"return function(tryCatch, errorObj, Promise, async) { \\n\\\n 'use strict'; \\n\\\n function [TheName](fn) { \\n\\\n [TheProperties] \\n\\\n this.fn = fn; \\n\\\n this.asyncNeeded = true; \\n\\\n this.now = 0; \\n\\\n } \\n\\\n \\n\\\n [TheName].prototype._callFunction = function(promise) { \\n\\\n promise._pushContext(); \\n\\\n var ret = tryCatch(this.fn)([ThePassedArguments]); \\n\\\n promise._popContext(); \\n\\\n if (ret === errorObj) { \\n\\\n promise._rejectCallback(ret.e, false); \\n\\\n } else { \\n\\\n promise._resolveCallback(ret); \\n\\\n } \\n\\\n }; \\n\\\n \\n\\\n [TheName].prototype.checkFulfillment = function(promise) { \\n\\\n var now = ++this.now; \\n\\\n if (now === [TheTotal]) { \\n\\\n if (this.asyncNeeded) { \\n\\\n async.invoke(this._callFunction, this, promise); \\n\\\n } else { \\n\\\n this._callFunction(promise); \\n\\\n } \\n\\\n \\n\\\n } \\n\\\n }; \\n\\\n \\n\\\n [TheName].prototype._resultCancelled = function() { \\n\\\n [CancellationCode] \\n\\\n }; \\n\\\n \\n\\\n return [TheName]; \\n\\\n }(tryCatch, errorObj, Promise, async); \\n\\\n \";\n\n code = code.replace(/\\[TheName\\]/g, name)\n .replace(/\\[TheTotal\\]/g, total)\n .replace(/\\[ThePassedArguments\\]/g, passedArguments)\n .replace(/\\[TheProperties\\]/g, assignment)\n .replace(/\\[CancellationCode\\]/g, cancellationCode);\n\n return new Function(\"tryCatch\", \"errorObj\", \"Promise\", \"async\", code)\n (tryCatch, errorObj, Promise, async);\n };\n\n var holderClasses = [];\n var thenCallbacks = [];\n var promiseSetters = [];\n\n for (var i = 0; i < 8; ++i) {\n holderClasses.push(generateHolderClass(i + 1));\n thenCallbacks.push(thenCallback(i + 1));\n promiseSetters.push(promiseSetter(i + 1));\n }\n\n reject = function (reason) {\n this._reject(reason);\n };\n}}\n\nPromise.join = function () {\n var last = arguments.length - 1;\n var fn;\n if (last > 0 && typeof arguments[last] === \"function\") {\n fn = arguments[last];\n if (!true) {\n if (last <= 8 && canEvaluate) {\n var ret = new Promise(INTERNAL);\n ret._captureStackTrace();\n var HolderClass = holderClasses[last - 1];\n var holder = new HolderClass(fn);\n var callbacks = thenCallbacks;\n\n for (var i = 0; i < last; ++i) {\n var maybePromise = tryConvertToPromise(arguments[i], ret);\n if (maybePromise instanceof Promise) {\n maybePromise = maybePromise._target();\n var bitField = maybePromise._bitField;\n ;\n if (((bitField & 50397184) === 0)) {\n maybePromise._then(callbacks[i], reject,\n undefined, ret, holder);\n promiseSetters[i](maybePromise, holder);\n holder.asyncNeeded = false;\n } else if (((bitField & 33554432) !== 0)) {\n callbacks[i].call(ret,\n maybePromise._value(), holder);\n } else if (((bitField & 16777216) !== 0)) {\n ret._reject(maybePromise._reason());\n } else {\n ret._cancel();\n }\n } else {\n callbacks[i].call(ret, maybePromise, holder);\n }\n }\n\n if (!ret._isFateSealed()) {\n if (holder.asyncNeeded) {\n var domain = getDomain();\n if (domain !== null) {\n holder.fn = util.domainBind(domain, holder.fn);\n }\n }\n ret._setAsyncGuaranteed();\n ret._setOnCancel(holder);\n }\n return ret;\n }\n }\n }\n var args = [].slice.call(arguments);;\n if (fn) args.pop();\n var ret = new PromiseArray(args).promise();\n return fn !== undefined ? ret.spread(fn) : ret;\n};\n\n};\n\n},{\"./util\":36}],18:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise,\n PromiseArray,\n apiRejection,\n tryConvertToPromise,\n INTERNAL,\n debug) {\nvar getDomain = Promise._getDomain;\nvar util = _dereq_(\"./util\");\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\nvar async = Promise._async;\n\nfunction MappingPromiseArray(promises, fn, limit, _filter) {\n this.constructor$(promises);\n this._promise._captureStackTrace();\n var domain = getDomain();\n this._callback = domain === null ? fn : util.domainBind(domain, fn);\n this._preservedValues = _filter === INTERNAL\n ? new Array(this.length())\n : null;\n this._limit = limit;\n this._inFlight = 0;\n this._queue = [];\n async.invoke(this._asyncInit, this, undefined);\n}\nutil.inherits(MappingPromiseArray, PromiseArray);\n\nMappingPromiseArray.prototype._asyncInit = function() {\n this._init$(undefined, -2);\n};\n\nMappingPromiseArray.prototype._init = function () {};\n\nMappingPromiseArray.prototype._promiseFulfilled = function (value, index) {\n var values = this._values;\n var length = this.length();\n var preservedValues = this._preservedValues;\n var limit = this._limit;\n\n if (index < 0) {\n index = (index * -1) - 1;\n values[index] = value;\n if (limit >= 1) {\n this._inFlight--;\n this._drainQueue();\n if (this._isResolved()) return true;\n }\n } else {\n if (limit >= 1 && this._inFlight >= limit) {\n values[index] = value;\n this._queue.push(index);\n return false;\n }\n if (preservedValues !== null) preservedValues[index] = value;\n\n var promise = this._promise;\n var callback = this._callback;\n var receiver = promise._boundValue();\n promise._pushContext();\n var ret = tryCatch(callback).call(receiver, value, index, length);\n var promiseCreated = promise._popContext();\n debug.checkForgottenReturns(\n ret,\n promiseCreated,\n preservedValues !== null ? \"Promise.filter\" : \"Promise.map\",\n promise\n );\n if (ret === errorObj) {\n this._reject(ret.e);\n return true;\n }\n\n var maybePromise = tryConvertToPromise(ret, this._promise);\n if (maybePromise instanceof Promise) {\n maybePromise = maybePromise._target();\n var bitField = maybePromise._bitField;\n ;\n if (((bitField & 50397184) === 0)) {\n if (limit >= 1) this._inFlight++;\n values[index] = maybePromise;\n maybePromise._proxy(this, (index + 1) * -1);\n return false;\n } else if (((bitField & 33554432) !== 0)) {\n ret = maybePromise._value();\n } else if (((bitField & 16777216) !== 0)) {\n this._reject(maybePromise._reason());\n return true;\n } else {\n this._cancel();\n return true;\n }\n }\n values[index] = ret;\n }\n var totalResolved = ++this._totalResolved;\n if (totalResolved >= length) {\n if (preservedValues !== null) {\n this._filter(values, preservedValues);\n } else {\n this._resolve(values);\n }\n return true;\n }\n return false;\n};\n\nMappingPromiseArray.prototype._drainQueue = function () {\n var queue = this._queue;\n var limit = this._limit;\n var values = this._values;\n while (queue.length > 0 && this._inFlight < limit) {\n if (this._isResolved()) return;\n var index = queue.pop();\n this._promiseFulfilled(values[index], index);\n }\n};\n\nMappingPromiseArray.prototype._filter = function (booleans, values) {\n var len = values.length;\n var ret = new Array(len);\n var j = 0;\n for (var i = 0; i < len; ++i) {\n if (booleans[i]) ret[j++] = values[i];\n }\n ret.length = j;\n this._resolve(ret);\n};\n\nMappingPromiseArray.prototype.preservedValues = function () {\n return this._preservedValues;\n};\n\nfunction map(promises, fn, options, _filter) {\n if (typeof fn !== \"function\") {\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\n }\n\n var limit = 0;\n if (options !== undefined) {\n if (typeof options === \"object\" && options !== null) {\n if (typeof options.concurrency !== \"number\") {\n return Promise.reject(\n new TypeError(\"'concurrency' must be a number but it is \" +\n util.classString(options.concurrency)));\n }\n limit = options.concurrency;\n } else {\n return Promise.reject(new TypeError(\n \"options argument must be an object but it is \" +\n util.classString(options)));\n }\n }\n limit = typeof limit === \"number\" &&\n isFinite(limit) && limit >= 1 ? limit : 0;\n return new MappingPromiseArray(promises, fn, limit, _filter).promise();\n}\n\nPromise.prototype.map = function (fn, options) {\n return map(this, fn, options, null);\n};\n\nPromise.map = function (promises, fn, options, _filter) {\n return map(promises, fn, options, _filter);\n};\n\n\n};\n\n},{\"./util\":36}],19:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports =\nfunction(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) {\nvar util = _dereq_(\"./util\");\nvar tryCatch = util.tryCatch;\n\nPromise.method = function (fn) {\n if (typeof fn !== \"function\") {\n throw new Promise.TypeError(\"expecting a function but got \" + util.classString(fn));\n }\n return function () {\n var ret = new Promise(INTERNAL);\n ret._captureStackTrace();\n ret._pushContext();\n var value = tryCatch(fn).apply(this, arguments);\n var promiseCreated = ret._popContext();\n debug.checkForgottenReturns(\n value, promiseCreated, \"Promise.method\", ret);\n ret._resolveFromSyncValue(value);\n return ret;\n };\n};\n\nPromise.attempt = Promise[\"try\"] = function (fn) {\n if (typeof fn !== \"function\") {\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\n }\n var ret = new Promise(INTERNAL);\n ret._captureStackTrace();\n ret._pushContext();\n var value;\n if (arguments.length > 1) {\n debug.deprecated(\"calling Promise.try with more than 1 argument\");\n var arg = arguments[1];\n var ctx = arguments[2];\n value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg)\n : tryCatch(fn).call(ctx, arg);\n } else {\n value = tryCatch(fn)();\n }\n var promiseCreated = ret._popContext();\n debug.checkForgottenReturns(\n value, promiseCreated, \"Promise.try\", ret);\n ret._resolveFromSyncValue(value);\n return ret;\n};\n\nPromise.prototype._resolveFromSyncValue = function (value) {\n if (value === util.errorObj) {\n this._rejectCallback(value.e, false);\n } else {\n this._resolveCallback(value, true);\n }\n};\n};\n\n},{\"./util\":36}],20:[function(_dereq_,module,exports){\n\"use strict\";\nvar util = _dereq_(\"./util\");\nvar maybeWrapAsError = util.maybeWrapAsError;\nvar errors = _dereq_(\"./errors\");\nvar OperationalError = errors.OperationalError;\nvar es5 = _dereq_(\"./es5\");\n\nfunction isUntypedError(obj) {\n return obj instanceof Error &&\n es5.getPrototypeOf(obj) === Error.prototype;\n}\n\nvar rErrorKey = /^(?:name|message|stack|cause)$/;\nfunction wrapAsOperationalError(obj) {\n var ret;\n if (isUntypedError(obj)) {\n ret = new OperationalError(obj);\n ret.name = obj.name;\n ret.message = obj.message;\n ret.stack = obj.stack;\n var keys = es5.keys(obj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!rErrorKey.test(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n }\n util.markAsOriginatingFromRejection(obj);\n return obj;\n}\n\nfunction nodebackForPromise(promise, multiArgs) {\n return function(err, value) {\n if (promise === null) return;\n if (err) {\n var wrapped = wrapAsOperationalError(maybeWrapAsError(err));\n promise._attachExtraTrace(wrapped);\n promise._reject(wrapped);\n } else if (!multiArgs) {\n promise._fulfill(value);\n } else {\n var args = [].slice.call(arguments, 1);;\n promise._fulfill(args);\n }\n promise = null;\n };\n}\n\nmodule.exports = nodebackForPromise;\n\n},{\"./errors\":12,\"./es5\":13,\"./util\":36}],21:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise) {\nvar util = _dereq_(\"./util\");\nvar async = Promise._async;\nvar tryCatch = util.tryCatch;\nvar errorObj = util.errorObj;\n\nfunction spreadAdapter(val, nodeback) {\n var promise = this;\n if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);\n var ret =\n tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val));\n if (ret === errorObj) {\n async.throwLater(ret.e);\n }\n}\n\nfunction successAdapter(val, nodeback) {\n var promise = this;\n var receiver = promise._boundValue();\n var ret = val === undefined\n ? tryCatch(nodeback).call(receiver, null)\n : tryCatch(nodeback).call(receiver, null, val);\n if (ret === errorObj) {\n async.throwLater(ret.e);\n }\n}\nfunction errorAdapter(reason, nodeback) {\n var promise = this;\n if (!reason) {\n var newReason = new Error(reason + \"\");\n newReason.cause = reason;\n reason = newReason;\n }\n var ret = tryCatch(nodeback).call(promise._boundValue(), reason);\n if (ret === errorObj) {\n async.throwLater(ret.e);\n }\n}\n\nPromise.prototype.asCallback = Promise.prototype.nodeify = function (nodeback,\n options) {\n if (typeof nodeback == \"function\") {\n var adapter = successAdapter;\n if (options !== undefined && Object(options).spread) {\n adapter = spreadAdapter;\n }\n this._then(\n adapter,\n errorAdapter,\n undefined,\n this,\n nodeback\n );\n }\n return this;\n};\n};\n\n},{\"./util\":36}],22:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function() {\nvar makeSelfResolutionError = function () {\n return new TypeError(\"circular promise resolution chain\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n};\nvar reflectHandler = function() {\n return new Promise.PromiseInspection(this._target());\n};\nvar apiRejection = function(msg) {\n return Promise.reject(new TypeError(msg));\n};\nfunction Proxyable() {}\nvar UNDEFINED_BINDING = {};\nvar util = _dereq_(\"./util\");\n\nvar getDomain;\nif (util.isNode) {\n getDomain = function() {\n var ret = process.domain;\n if (ret === undefined) ret = null;\n return ret;\n };\n} else {\n getDomain = function() {\n return null;\n };\n}\nutil.notEnumerableProp(Promise, \"_getDomain\", getDomain);\n\nvar es5 = _dereq_(\"./es5\");\nvar Async = _dereq_(\"./async\");\nvar async = new Async();\nes5.defineProperty(Promise, \"_async\", {value: async});\nvar errors = _dereq_(\"./errors\");\nvar TypeError = Promise.TypeError = errors.TypeError;\nPromise.RangeError = errors.RangeError;\nvar CancellationError = Promise.CancellationError = errors.CancellationError;\nPromise.TimeoutError = errors.TimeoutError;\nPromise.OperationalError = errors.OperationalError;\nPromise.RejectionError = errors.OperationalError;\nPromise.AggregateError = errors.AggregateError;\nvar INTERNAL = function(){};\nvar APPLY = {};\nvar NEXT_FILTER = {};\nvar tryConvertToPromise = _dereq_(\"./thenables\")(Promise, INTERNAL);\nvar PromiseArray =\n _dereq_(\"./promise_array\")(Promise, INTERNAL,\n tryConvertToPromise, apiRejection, Proxyable);\nvar Context = _dereq_(\"./context\")(Promise);\n /*jshint unused:false*/\nvar createContext = Context.create;\nvar debug = _dereq_(\"./debuggability\")(Promise, Context);\nvar CapturedTrace = debug.CapturedTrace;\nvar PassThroughHandlerContext =\n _dereq_(\"./finally\")(Promise, tryConvertToPromise, NEXT_FILTER);\nvar catchFilter = _dereq_(\"./catch_filter\")(NEXT_FILTER);\nvar nodebackForPromise = _dereq_(\"./nodeback\");\nvar errorObj = util.errorObj;\nvar tryCatch = util.tryCatch;\nfunction check(self, executor) {\n if (self == null || self.constructor !== Promise) {\n throw new TypeError(\"the promise constructor cannot be invoked directly\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n if (typeof executor !== \"function\") {\n throw new TypeError(\"expecting a function but got \" + util.classString(executor));\n }\n\n}\n\nfunction Promise(executor) {\n if (executor !== INTERNAL) {\n check(this, executor);\n }\n this._bitField = 0;\n this._fulfillmentHandler0 = undefined;\n this._rejectionHandler0 = undefined;\n this._promise0 = undefined;\n this._receiver0 = undefined;\n this._resolveFromExecutor(executor);\n this._promiseCreated();\n this._fireEvent(\"promiseCreated\", this);\n}\n\nPromise.prototype.toString = function () {\n return \"[object Promise]\";\n};\n\nPromise.prototype.caught = Promise.prototype[\"catch\"] = function (fn) {\n var len = arguments.length;\n if (len > 1) {\n var catchInstances = new Array(len - 1),\n j = 0, i;\n for (i = 0; i < len - 1; ++i) {\n var item = arguments[i];\n if (util.isObject(item)) {\n catchInstances[j++] = item;\n } else {\n return apiRejection(\"Catch statement predicate: \" +\n \"expecting an object but got \" + util.classString(item));\n }\n }\n catchInstances.length = j;\n fn = arguments[i];\n return this.then(undefined, catchFilter(catchInstances, fn, this));\n }\n return this.then(undefined, fn);\n};\n\nPromise.prototype.reflect = function () {\n return this._then(reflectHandler,\n reflectHandler, undefined, this, undefined);\n};\n\nPromise.prototype.then = function (didFulfill, didReject) {\n if (debug.warnings() && arguments.length > 0 &&\n typeof didFulfill !== \"function\" &&\n typeof didReject !== \"function\") {\n var msg = \".then() only accepts functions but was passed: \" +\n util.classString(didFulfill);\n if (arguments.length > 1) {\n msg += \", \" + util.classString(didReject);\n }\n this._warn(msg);\n }\n return this._then(didFulfill, didReject, undefined, undefined, undefined);\n};\n\nPromise.prototype.done = function (didFulfill, didReject) {\n var promise =\n this._then(didFulfill, didReject, undefined, undefined, undefined);\n promise._setIsFinal();\n};\n\nPromise.prototype.spread = function (fn) {\n if (typeof fn !== \"function\") {\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\n }\n return this.all()._then(fn, undefined, undefined, APPLY, undefined);\n};\n\nPromise.prototype.toJSON = function () {\n var ret = {\n isFulfilled: false,\n isRejected: false,\n fulfillmentValue: undefined,\n rejectionReason: undefined\n };\n if (this.isFulfilled()) {\n ret.fulfillmentValue = this.value();\n ret.isFulfilled = true;\n } else if (this.isRejected()) {\n ret.rejectionReason = this.reason();\n ret.isRejected = true;\n }\n return ret;\n};\n\nPromise.prototype.all = function () {\n if (arguments.length > 0) {\n this._warn(\".all() was passed arguments but it does not take any\");\n }\n return new PromiseArray(this).promise();\n};\n\nPromise.prototype.error = function (fn) {\n return this.caught(util.originatesFromRejection, fn);\n};\n\nPromise.getNewLibraryCopy = module.exports;\n\nPromise.is = function (val) {\n return val instanceof Promise;\n};\n\nPromise.fromNode = Promise.fromCallback = function(fn) {\n var ret = new Promise(INTERNAL);\n ret._captureStackTrace();\n var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs\n : false;\n var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs));\n if (result === errorObj) {\n ret._rejectCallback(result.e, true);\n }\n if (!ret._isFateSealed()) ret._setAsyncGuaranteed();\n return ret;\n};\n\nPromise.all = function (promises) {\n return new PromiseArray(promises).promise();\n};\n\nPromise.cast = function (obj) {\n var ret = tryConvertToPromise(obj);\n if (!(ret instanceof Promise)) {\n ret = new Promise(INTERNAL);\n ret._captureStackTrace();\n ret._setFulfilled();\n ret._rejectionHandler0 = obj;\n }\n return ret;\n};\n\nPromise.resolve = Promise.fulfilled = Promise.cast;\n\nPromise.reject = Promise.rejected = function (reason) {\n var ret = new Promise(INTERNAL);\n ret._captureStackTrace();\n ret._rejectCallback(reason, true);\n return ret;\n};\n\nPromise.setScheduler = function(fn) {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"expecting a function but got \" + util.classString(fn));\n }\n return async.setScheduler(fn);\n};\n\nPromise.prototype._then = function (\n didFulfill,\n didReject,\n _, receiver,\n internalData\n) {\n var haveInternalData = internalData !== undefined;\n var promise = haveInternalData ? internalData : new Promise(INTERNAL);\n var target = this._target();\n var bitField = target._bitField;\n\n if (!haveInternalData) {\n promise._propagateFrom(this, 3);\n promise._captureStackTrace();\n if (receiver === undefined &&\n ((this._bitField & 2097152) !== 0)) {\n if (!((bitField & 50397184) === 0)) {\n receiver = this._boundValue();\n } else {\n receiver = target === this ? undefined : this._boundTo;\n }\n }\n this._fireEvent(\"promiseChained\", this, promise);\n }\n\n var domain = getDomain();\n if (!((bitField & 50397184) === 0)) {\n var handler, value, settler = target._settlePromiseCtx;\n if (((bitField & 33554432) !== 0)) {\n value = target._rejectionHandler0;\n handler = didFulfill;\n } else if (((bitField & 16777216) !== 0)) {\n value = target._fulfillmentHandler0;\n handler = didReject;\n target._unsetRejectionIsUnhandled();\n } else {\n settler = target._settlePromiseLateCancellationObserver;\n value = new CancellationError(\"late cancellation observer\");\n target._attachExtraTrace(value);\n handler = didReject;\n }\n\n async.invoke(settler, target, {\n handler: domain === null ? handler\n : (typeof handler === \"function\" &&\n util.domainBind(domain, handler)),\n promise: promise,\n receiver: receiver,\n value: value\n });\n } else {\n target._addCallbacks(didFulfill, didReject, promise, receiver, domain);\n }\n\n return promise;\n};\n\nPromise.prototype._length = function () {\n return this._bitField & 65535;\n};\n\nPromise.prototype._isFateSealed = function () {\n return (this._bitField & 117506048) !== 0;\n};\n\nPromise.prototype._isFollowing = function () {\n return (this._bitField & 67108864) === 67108864;\n};\n\nPromise.prototype._setLength = function (len) {\n this._bitField = (this._bitField & -65536) |\n (len & 65535);\n};\n\nPromise.prototype._setFulfilled = function () {\n this._bitField = this._bitField | 33554432;\n this._fireEvent(\"promiseFulfilled\", this);\n};\n\nPromise.prototype._setRejected = function () {\n this._bitField = this._bitField | 16777216;\n this._fireEvent(\"promiseRejected\", this);\n};\n\nPromise.prototype._setFollowing = function () {\n this._bitField = this._bitField | 67108864;\n this._fireEvent(\"promiseResolved\", this);\n};\n\nPromise.prototype._setIsFinal = function () {\n this._bitField = this._bitField | 4194304;\n};\n\nPromise.prototype._isFinal = function () {\n return (this._bitField & 4194304) > 0;\n};\n\nPromise.prototype._unsetCancelled = function() {\n this._bitField = this._bitField & (~65536);\n};\n\nPromise.prototype._setCancelled = function() {\n this._bitField = this._bitField | 65536;\n this._fireEvent(\"promiseCancelled\", this);\n};\n\nPromise.prototype._setWillBeCancelled = function() {\n this._bitField = this._bitField | 8388608;\n};\n\nPromise.prototype._setAsyncGuaranteed = function() {\n if (async.hasCustomScheduler()) return;\n this._bitField = this._bitField | 134217728;\n};\n\nPromise.prototype._receiverAt = function (index) {\n var ret = index === 0 ? this._receiver0 : this[\n index * 4 - 4 + 3];\n if (ret === UNDEFINED_BINDING) {\n return undefined;\n } else if (ret === undefined && this._isBound()) {\n return this._boundValue();\n }\n return ret;\n};\n\nPromise.prototype._promiseAt = function (index) {\n return this[\n index * 4 - 4 + 2];\n};\n\nPromise.prototype._fulfillmentHandlerAt = function (index) {\n return this[\n index * 4 - 4 + 0];\n};\n\nPromise.prototype._rejectionHandlerAt = function (index) {\n return this[\n index * 4 - 4 + 1];\n};\n\nPromise.prototype._boundValue = function() {};\n\nPromise.prototype._migrateCallback0 = function (follower) {\n var bitField = follower._bitField;\n var fulfill = follower._fulfillmentHandler0;\n var reject = follower._rejectionHandler0;\n var promise = follower._promise0;\n var receiver = follower._receiverAt(0);\n if (receiver === undefined) receiver = UNDEFINED_BINDING;\n this._addCallbacks(fulfill, reject, promise, receiver, null);\n};\n\nPromise.prototype._migrateCallbackAt = function (follower, index) {\n var fulfill = follower._fulfillmentHandlerAt(index);\n var reject = follower._rejectionHandlerAt(index);\n var promise = follower._promiseAt(index);\n var receiver = follower._receiverAt(index);\n if (receiver === undefined) receiver = UNDEFINED_BINDING;\n this._addCallbacks(fulfill, reject, promise, receiver, null);\n};\n\nPromise.prototype._addCallbacks = function (\n fulfill,\n reject,\n promise,\n receiver,\n domain\n) {\n var index = this._length();\n\n if (index >= 65535 - 4) {\n index = 0;\n this._setLength(0);\n }\n\n if (index === 0) {\n this._promise0 = promise;\n this._receiver0 = receiver;\n if (typeof fulfill === \"function\") {\n this._fulfillmentHandler0 =\n domain === null ? fulfill : util.domainBind(domain, fulfill);\n }\n if (typeof reject === \"function\") {\n this._rejectionHandler0 =\n domain === null ? reject : util.domainBind(domain, reject);\n }\n } else {\n var base = index * 4 - 4;\n this[base + 2] = promise;\n this[base + 3] = receiver;\n if (typeof fulfill === \"function\") {\n this[base + 0] =\n domain === null ? fulfill : util.domainBind(domain, fulfill);\n }\n if (typeof reject === \"function\") {\n this[base + 1] =\n domain === null ? reject : util.domainBind(domain, reject);\n }\n }\n this._setLength(index + 1);\n return index;\n};\n\nPromise.prototype._proxy = function (proxyable, arg) {\n this._addCallbacks(undefined, undefined, arg, proxyable, null);\n};\n\nPromise.prototype._resolveCallback = function(value, shouldBind) {\n if (((this._bitField & 117506048) !== 0)) return;\n if (value === this)\n return this._rejectCallback(makeSelfResolutionError(), false);\n var maybePromise = tryConvertToPromise(value, this);\n if (!(maybePromise instanceof Promise)) return this._fulfill(value);\n\n if (shouldBind) this._propagateFrom(maybePromise, 2);\n\n var promise = maybePromise._target();\n\n if (promise === this) {\n this._reject(makeSelfResolutionError());\n return;\n }\n\n var bitField = promise._bitField;\n if (((bitField & 50397184) === 0)) {\n var len = this._length();\n if (len > 0) promise._migrateCallback0(this);\n for (var i = 1; i < len; ++i) {\n promise._migrateCallbackAt(this, i);\n }\n this._setFollowing();\n this._setLength(0);\n this._setFollowee(promise);\n } else if (((bitField & 33554432) !== 0)) {\n this._fulfill(promise._value());\n } else if (((bitField & 16777216) !== 0)) {\n this._reject(promise._reason());\n } else {\n var reason = new CancellationError(\"late cancellation observer\");\n promise._attachExtraTrace(reason);\n this._reject(reason);\n }\n};\n\nPromise.prototype._rejectCallback =\nfunction(reason, synchronous, ignoreNonErrorWarnings) {\n var trace = util.ensureErrorObject(reason);\n var hasStack = trace === reason;\n if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) {\n var message = \"a promise was rejected with a non-error: \" +\n util.classString(reason);\n this._warn(message, true);\n }\n this._attachExtraTrace(trace, synchronous ? hasStack : false);\n this._reject(reason);\n};\n\nPromise.prototype._resolveFromExecutor = function (executor) {\n if (executor === INTERNAL) return;\n var promise = this;\n this._captureStackTrace();\n this._pushContext();\n var synchronous = true;\n var r = this._execute(executor, function(value) {\n promise._resolveCallback(value);\n }, function (reason) {\n promise._rejectCallback(reason, synchronous);\n });\n synchronous = false;\n this._popContext();\n\n if (r !== undefined) {\n promise._rejectCallback(r, true);\n }\n};\n\nPromise.prototype._settlePromiseFromHandler = function (\n handler, receiver, value, promise\n) {\n var bitField = promise._bitField;\n if (((bitField & 65536) !== 0)) return;\n promise._pushContext();\n var x;\n if (receiver === APPLY) {\n if (!value || typeof value.length !== \"number\") {\n x = errorObj;\n x.e = new TypeError(\"cannot .spread() a non-array: \" +\n util.classString(value));\n } else {\n x = tryCatch(handler).apply(this._boundValue(), value);\n }\n } else {\n x = tryCatch(handler).call(receiver, value);\n }\n var promiseCreated = promise._popContext();\n bitField = promise._bitField;\n if (((bitField & 65536) !== 0)) return;\n\n if (x === NEXT_FILTER) {\n promise._reject(value);\n } else if (x === errorObj) {\n promise._rejectCallback(x.e, false);\n } else {\n debug.checkForgottenReturns(x, promiseCreated, \"\", promise, this);\n promise._resolveCallback(x);\n }\n};\n\nPromise.prototype._target = function() {\n var ret = this;\n while (ret._isFollowing()) ret = ret._followee();\n return ret;\n};\n\nPromise.prototype._followee = function() {\n return this._rejectionHandler0;\n};\n\nPromise.prototype._setFollowee = function(promise) {\n this._rejectionHandler0 = promise;\n};\n\nPromise.prototype._settlePromise = function(promise, handler, receiver, value) {\n var isPromise = promise instanceof Promise;\n var bitField = this._bitField;\n var asyncGuaranteed = ((bitField & 134217728) !== 0);\n if (((bitField & 65536) !== 0)) {\n if (isPromise) promise._invokeInternalOnCancel();\n\n if (receiver instanceof PassThroughHandlerContext &&\n receiver.isFinallyHandler()) {\n receiver.cancelPromise = promise;\n if (tryCatch(handler).call(receiver, value) === errorObj) {\n promise._reject(errorObj.e);\n }\n } else if (handler === reflectHandler) {\n promise._fulfill(reflectHandler.call(receiver));\n } else if (receiver instanceof Proxyable) {\n receiver._promiseCancelled(promise);\n } else if (isPromise || promise instanceof PromiseArray) {\n promise._cancel();\n } else {\n receiver.cancel();\n }\n } else if (typeof handler === \"function\") {\n if (!isPromise) {\n handler.call(receiver, value, promise);\n } else {\n if (asyncGuaranteed) promise._setAsyncGuaranteed();\n this._settlePromiseFromHandler(handler, receiver, value, promise);\n }\n } else if (receiver instanceof Proxyable) {\n if (!receiver._isResolved()) {\n if (((bitField & 33554432) !== 0)) {\n receiver._promiseFulfilled(value, promise);\n } else {\n receiver._promiseRejected(value, promise);\n }\n }\n } else if (isPromise) {\n if (asyncGuaranteed) promise._setAsyncGuaranteed();\n if (((bitField & 33554432) !== 0)) {\n promise._fulfill(value);\n } else {\n promise._reject(value);\n }\n }\n};\n\nPromise.prototype._settlePromiseLateCancellationObserver = function(ctx) {\n var handler = ctx.handler;\n var promise = ctx.promise;\n var receiver = ctx.receiver;\n var value = ctx.value;\n if (typeof handler === \"function\") {\n if (!(promise instanceof Promise)) {\n handler.call(receiver, value, promise);\n } else {\n this._settlePromiseFromHandler(handler, receiver, value, promise);\n }\n } else if (promise instanceof Promise) {\n promise._reject(value);\n }\n};\n\nPromise.prototype._settlePromiseCtx = function(ctx) {\n this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value);\n};\n\nPromise.prototype._settlePromise0 = function(handler, value, bitField) {\n var promise = this._promise0;\n var receiver = this._receiverAt(0);\n this._promise0 = undefined;\n this._receiver0 = undefined;\n this._settlePromise(promise, handler, receiver, value);\n};\n\nPromise.prototype._clearCallbackDataAtIndex = function(index) {\n var base = index * 4 - 4;\n this[base + 2] =\n this[base + 3] =\n this[base + 0] =\n this[base + 1] = undefined;\n};\n\nPromise.prototype._fulfill = function (value) {\n var bitField = this._bitField;\n if (((bitField & 117506048) >>> 16)) return;\n if (value === this) {\n var err = makeSelfResolutionError();\n this._attachExtraTrace(err);\n return this._reject(err);\n }\n this._setFulfilled();\n this._rejectionHandler0 = value;\n\n if ((bitField & 65535) > 0) {\n if (((bitField & 134217728) !== 0)) {\n this._settlePromises();\n } else {\n async.settlePromises(this);\n }\n }\n};\n\nPromise.prototype._reject = function (reason) {\n var bitField = this._bitField;\n if (((bitField & 117506048) >>> 16)) return;\n this._setRejected();\n this._fulfillmentHandler0 = reason;\n\n if (this._isFinal()) {\n return async.fatalError(reason, util.isNode);\n }\n\n if ((bitField & 65535) > 0) {\n async.settlePromises(this);\n } else {\n this._ensurePossibleRejectionHandled();\n }\n};\n\nPromise.prototype._fulfillPromises = function (len, value) {\n for (var i = 1; i < len; i++) {\n var handler = this._fulfillmentHandlerAt(i);\n var promise = this._promiseAt(i);\n var receiver = this._receiverAt(i);\n this._clearCallbackDataAtIndex(i);\n this._settlePromise(promise, handler, receiver, value);\n }\n};\n\nPromise.prototype._rejectPromises = function (len, reason) {\n for (var i = 1; i < len; i++) {\n var handler = this._rejectionHandlerAt(i);\n var promise = this._promiseAt(i);\n var receiver = this._receiverAt(i);\n this._clearCallbackDataAtIndex(i);\n this._settlePromise(promise, handler, receiver, reason);\n }\n};\n\nPromise.prototype._settlePromises = function () {\n var bitField = this._bitField;\n var len = (bitField & 65535);\n\n if (len > 0) {\n if (((bitField & 16842752) !== 0)) {\n var reason = this._fulfillmentHandler0;\n this._settlePromise0(this._rejectionHandler0, reason, bitField);\n this._rejectPromises(len, reason);\n } else {\n var value = this._rejectionHandler0;\n this._settlePromise0(this._fulfillmentHandler0, value, bitField);\n this._fulfillPromises(len, value);\n }\n this._setLength(0);\n }\n this._clearCancellationData();\n};\n\nPromise.prototype._settledValue = function() {\n var bitField = this._bitField;\n if (((bitField & 33554432) !== 0)) {\n return this._rejectionHandler0;\n } else if (((bitField & 16777216) !== 0)) {\n return this._fulfillmentHandler0;\n }\n};\n\nfunction deferResolve(v) {this.promise._resolveCallback(v);}\nfunction deferReject(v) {this.promise._rejectCallback(v, false);}\n\nPromise.defer = Promise.pending = function() {\n debug.deprecated(\"Promise.defer\", \"new Promise\");\n var promise = new Promise(INTERNAL);\n return {\n promise: promise,\n resolve: deferResolve,\n reject: deferReject\n };\n};\n\nutil.notEnumerableProp(Promise,\n \"_makeSelfResolutionError\",\n makeSelfResolutionError);\n\n_dereq_(\"./method\")(Promise, INTERNAL, tryConvertToPromise, apiRejection,\n debug);\n_dereq_(\"./bind\")(Promise, INTERNAL, tryConvertToPromise, debug);\n_dereq_(\"./cancel\")(Promise, PromiseArray, apiRejection, debug);\n_dereq_(\"./direct_resolve\")(Promise);\n_dereq_(\"./synchronous_inspection\")(Promise);\n_dereq_(\"./join\")(\n Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain);\nPromise.Promise = Promise;\nPromise.version = \"3.5.1\";\n_dereq_('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);\n_dereq_('./call_get.js')(Promise);\n_dereq_('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug);\n_dereq_('./timers.js')(Promise, INTERNAL, debug);\n_dereq_('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug);\n_dereq_('./nodeify.js')(Promise);\n_dereq_('./promisify.js')(Promise, INTERNAL);\n_dereq_('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection);\n_dereq_('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection);\n_dereq_('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);\n_dereq_('./settle.js')(Promise, PromiseArray, debug);\n_dereq_('./some.js')(Promise, PromiseArray, apiRejection);\n_dereq_('./filter.js')(Promise, INTERNAL);\n_dereq_('./each.js')(Promise, INTERNAL);\n_dereq_('./any.js')(Promise);\n \n util.toFastProperties(Promise); \n util.toFastProperties(Promise.prototype); \n function fillTypes(value) { \n var p = new Promise(INTERNAL); \n p._fulfillmentHandler0 = value; \n p._rejectionHandler0 = value; \n p._promise0 = value; \n p._receiver0 = value; \n } \n // Complete slack tracking, opt out of field-type tracking and \n // stabilize map \n fillTypes({a: 1}); \n fillTypes({b: 2}); \n fillTypes({c: 3}); \n fillTypes(1); \n fillTypes(function(){}); \n fillTypes(undefined); \n fillTypes(false); \n fillTypes(new Promise(INTERNAL)); \n debug.setBounds(Async.firstLineError, util.lastLineError); \n return Promise; \n\n};\n\n},{\"./any.js\":1,\"./async\":2,\"./bind\":3,\"./call_get.js\":5,\"./cancel\":6,\"./catch_filter\":7,\"./context\":8,\"./debuggability\":9,\"./direct_resolve\":10,\"./each.js\":11,\"./errors\":12,\"./es5\":13,\"./filter.js\":14,\"./finally\":15,\"./generators.js\":16,\"./join\":17,\"./map.js\":18,\"./method\":19,\"./nodeback\":20,\"./nodeify.js\":21,\"./promise_array\":23,\"./promisify.js\":24,\"./props.js\":25,\"./race.js\":27,\"./reduce.js\":28,\"./settle.js\":30,\"./some.js\":31,\"./synchronous_inspection\":32,\"./thenables\":33,\"./timers.js\":34,\"./using.js\":35,\"./util\":36}],23:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL, tryConvertToPromise,\n apiRejection, Proxyable) {\nvar util = _dereq_(\"./util\");\nvar isArray = util.isArray;\n\nfunction toResolutionValue(val) {\n switch(val) {\n case -2: return [];\n case -3: return {};\n case -6: return new Map();\n }\n}\n\nfunction PromiseArray(values) {\n var promise = this._promise = new Promise(INTERNAL);\n if (values instanceof Promise) {\n promise._propagateFrom(values, 3);\n }\n promise._setOnCancel(this);\n this._values = values;\n this._length = 0;\n this._totalResolved = 0;\n this._init(undefined, -2);\n}\nutil.inherits(PromiseArray, Proxyable);\n\nPromiseArray.prototype.length = function () {\n return this._length;\n};\n\nPromiseArray.prototype.promise = function () {\n return this._promise;\n};\n\nPromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {\n var values = tryConvertToPromise(this._values, this._promise);\n if (values instanceof Promise) {\n values = values._target();\n var bitField = values._bitField;\n ;\n this._values = values;\n\n if (((bitField & 50397184) === 0)) {\n this._promise._setAsyncGuaranteed();\n return values._then(\n init,\n this._reject,\n undefined,\n this,\n resolveValueIfEmpty\n );\n } else if (((bitField & 33554432) !== 0)) {\n values = values._value();\n } else if (((bitField & 16777216) !== 0)) {\n return this._reject(values._reason());\n } else {\n return this._cancel();\n }\n }\n values = util.asArray(values);\n if (values === null) {\n var err = apiRejection(\n \"expecting an array or an iterable object but got \" + util.classString(values)).reason();\n this._promise._rejectCallback(err, false);\n return;\n }\n\n if (values.length === 0) {\n if (resolveValueIfEmpty === -5) {\n this._resolveEmptyArray();\n }\n else {\n this._resolve(toResolutionValue(resolveValueIfEmpty));\n }\n return;\n }\n this._iterate(values);\n};\n\nPromiseArray.prototype._iterate = function(values) {\n var len = this.getActualLength(values.length);\n this._length = len;\n this._values = this.shouldCopyValues() ? new Array(len) : this._values;\n var result = this._promise;\n var isResolved = false;\n var bitField = null;\n for (var i = 0; i < len; ++i) {\n var maybePromise = tryConvertToPromise(values[i], result);\n\n if (maybePromise instanceof Promise) {\n maybePromise = maybePromise._target();\n bitField = maybePromise._bitField;\n } else {\n bitField = null;\n }\n\n if (isResolved) {\n if (bitField !== null) {\n maybePromise.suppressUnhandledRejections();\n }\n } else if (bitField !== null) {\n if (((bitField & 50397184) === 0)) {\n maybePromise._proxy(this, i);\n this._values[i] = maybePromise;\n } else if (((bitField & 33554432) !== 0)) {\n isResolved = this._promiseFulfilled(maybePromise._value(), i);\n } else if (((bitField & 16777216) !== 0)) {\n isResolved = this._promiseRejected(maybePromise._reason(), i);\n } else {\n isResolved = this._promiseCancelled(i);\n }\n } else {\n isResolved = this._promiseFulfilled(maybePromise, i);\n }\n }\n if (!isResolved) result._setAsyncGuaranteed();\n};\n\nPromiseArray.prototype._isResolved = function () {\n return this._values === null;\n};\n\nPromiseArray.prototype._resolve = function (value) {\n this._values = null;\n this._promise._fulfill(value);\n};\n\nPromiseArray.prototype._cancel = function() {\n if (this._isResolved() || !this._promise._isCancellable()) return;\n this._values = null;\n this._promise._cancel();\n};\n\nPromiseArray.prototype._reject = function (reason) {\n this._values = null;\n this._promise._rejectCallback(reason, false);\n};\n\nPromiseArray.prototype._promiseFulfilled = function (value, index) {\n this._values[index] = value;\n var totalResolved = ++this._totalResolved;\n if (totalResolved >= this._length) {\n this._resolve(this._values);\n return true;\n }\n return false;\n};\n\nPromiseArray.prototype._promiseCancelled = function() {\n this._cancel();\n return true;\n};\n\nPromiseArray.prototype._promiseRejected = function (reason) {\n this._totalResolved++;\n this._reject(reason);\n return true;\n};\n\nPromiseArray.prototype._resultCancelled = function() {\n if (this._isResolved()) return;\n var values = this._values;\n this._cancel();\n if (values instanceof Promise) {\n values.cancel();\n } else {\n for (var i = 0; i < values.length; ++i) {\n if (values[i] instanceof Promise) {\n values[i].cancel();\n }\n }\n }\n};\n\nPromiseArray.prototype.shouldCopyValues = function () {\n return true;\n};\n\nPromiseArray.prototype.getActualLength = function (len) {\n return len;\n};\n\nreturn PromiseArray;\n};\n\n},{\"./util\":36}],24:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL) {\nvar THIS = {};\nvar util = _dereq_(\"./util\");\nvar nodebackForPromise = _dereq_(\"./nodeback\");\nvar withAppended = util.withAppended;\nvar maybeWrapAsError = util.maybeWrapAsError;\nvar canEvaluate = util.canEvaluate;\nvar TypeError = _dereq_(\"./errors\").TypeError;\nvar defaultSuffix = \"Async\";\nvar defaultPromisified = {__isPromisified__: true};\nvar noCopyProps = [\n \"arity\", \"length\",\n \"name\",\n \"arguments\",\n \"caller\",\n \"callee\",\n \"prototype\",\n \"__isPromisified__\"\n];\nvar noCopyPropsPattern = new RegExp(\"^(?:\" + noCopyProps.join(\"|\") + \")$\");\n\nvar defaultFilter = function(name) {\n return util.isIdentifier(name) &&\n name.charAt(0) !== \"_\" &&\n name !== \"constructor\";\n};\n\nfunction propsFilter(key) {\n return !noCopyPropsPattern.test(key);\n}\n\nfunction isPromisified(fn) {\n try {\n return fn.__isPromisified__ === true;\n }\n catch (e) {\n return false;\n }\n}\n\nfunction hasPromisified(obj, key, suffix) {\n var val = util.getDataPropertyOrDefault(obj, key + suffix,\n defaultPromisified);\n return val ? isPromisified(val) : false;\n}\nfunction checkValid(ret, suffix, suffixRegexp) {\n for (var i = 0; i < ret.length; i += 2) {\n var key = ret[i];\n if (suffixRegexp.test(key)) {\n var keyWithoutAsyncSuffix = key.replace(suffixRegexp, \"\");\n for (var j = 0; j < ret.length; j += 2) {\n if (ret[j] === keyWithoutAsyncSuffix) {\n throw new TypeError(\"Cannot promisify an API that has normal methods with '%s'-suffix\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\"\n .replace(\"%s\", suffix));\n }\n }\n }\n }\n}\n\nfunction promisifiableMethods(obj, suffix, suffixRegexp, filter) {\n var keys = util.inheritedDataKeys(obj);\n var ret = [];\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var value = obj[key];\n var passesDefaultFilter = filter === defaultFilter\n ? true : defaultFilter(key, value, obj);\n if (typeof value === \"function\" &&\n !isPromisified(value) &&\n !hasPromisified(obj, key, suffix) &&\n filter(key, value, obj, passesDefaultFilter)) {\n ret.push(key, value);\n }\n }\n checkValid(ret, suffix, suffixRegexp);\n return ret;\n}\n\nvar escapeIdentRegex = function(str) {\n return str.replace(/([$])/, \"\\\\$\");\n};\n\nvar makeNodePromisifiedEval;\nif (!true) {\nvar switchCaseArgumentOrder = function(likelyArgumentCount) {\n var ret = [likelyArgumentCount];\n var min = Math.max(0, likelyArgumentCount - 1 - 3);\n for(var i = likelyArgumentCount - 1; i >= min; --i) {\n ret.push(i);\n }\n for(var i = likelyArgumentCount + 1; i <= 3; ++i) {\n ret.push(i);\n }\n return ret;\n};\n\nvar argumentSequence = function(argumentCount) {\n return util.filledRange(argumentCount, \"_arg\", \"\");\n};\n\nvar parameterDeclaration = function(parameterCount) {\n return util.filledRange(\n Math.max(parameterCount, 3), \"_arg\", \"\");\n};\n\nvar parameterCount = function(fn) {\n if (typeof fn.length === \"number\") {\n return Math.max(Math.min(fn.length, 1023 + 1), 0);\n }\n return 0;\n};\n\nmakeNodePromisifiedEval =\nfunction(callback, receiver, originalName, fn, _, multiArgs) {\n var newParameterCount = Math.max(0, parameterCount(fn) - 1);\n var argumentOrder = switchCaseArgumentOrder(newParameterCount);\n var shouldProxyThis = typeof callback === \"string\" || receiver === THIS;\n\n function generateCallForArgumentCount(count) {\n var args = argumentSequence(count).join(\", \");\n var comma = count > 0 ? \", \" : \"\";\n var ret;\n if (shouldProxyThis) {\n ret = \"ret = callback.call(this, {{args}}, nodeback); break;\\n\";\n } else {\n ret = receiver === undefined\n ? \"ret = callback({{args}}, nodeback); break;\\n\"\n : \"ret = callback.call(receiver, {{args}}, nodeback); break;\\n\";\n }\n return ret.replace(\"{{args}}\", args).replace(\", \", comma);\n }\n\n function generateArgumentSwitchCase() {\n var ret = \"\";\n for (var i = 0; i < argumentOrder.length; ++i) {\n ret += \"case \" + argumentOrder[i] +\":\" +\n generateCallForArgumentCount(argumentOrder[i]);\n }\n\n ret += \" \\n\\\n default: \\n\\\n var args = new Array(len + 1); \\n\\\n var i = 0; \\n\\\n for (var i = 0; i < len; ++i) { \\n\\\n args[i] = arguments[i]; \\n\\\n } \\n\\\n args[i] = nodeback; \\n\\\n [CodeForCall] \\n\\\n break; \\n\\\n \".replace(\"[CodeForCall]\", (shouldProxyThis\n ? \"ret = callback.apply(this, args);\\n\"\n : \"ret = callback.apply(receiver, args);\\n\"));\n return ret;\n }\n\n var getFunctionCode = typeof callback === \"string\"\n ? (\"this != null ? this['\"+callback+\"'] : fn\")\n : \"fn\";\n var body = \"'use strict'; \\n\\\n var ret = function (Parameters) { \\n\\\n 'use strict'; \\n\\\n var len = arguments.length; \\n\\\n var promise = new Promise(INTERNAL); \\n\\\n promise._captureStackTrace(); \\n\\\n var nodeback = nodebackForPromise(promise, \" + multiArgs + \"); \\n\\\n var ret; \\n\\\n var callback = tryCatch([GetFunctionCode]); \\n\\\n switch(len) { \\n\\\n [CodeForSwitchCase] \\n\\\n } \\n\\\n if (ret === errorObj) { \\n\\\n promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\\n\\\n } \\n\\\n if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \\n\\\n return promise; \\n\\\n }; \\n\\\n notEnumerableProp(ret, '__isPromisified__', true); \\n\\\n return ret; \\n\\\n \".replace(\"[CodeForSwitchCase]\", generateArgumentSwitchCase())\n .replace(\"[GetFunctionCode]\", getFunctionCode);\n body = body.replace(\"Parameters\", parameterDeclaration(newParameterCount));\n return new Function(\"Promise\",\n \"fn\",\n \"receiver\",\n \"withAppended\",\n \"maybeWrapAsError\",\n \"nodebackForPromise\",\n \"tryCatch\",\n \"errorObj\",\n \"notEnumerableProp\",\n \"INTERNAL\",\n body)(\n Promise,\n fn,\n receiver,\n withAppended,\n maybeWrapAsError,\n nodebackForPromise,\n util.tryCatch,\n util.errorObj,\n util.notEnumerableProp,\n INTERNAL);\n};\n}\n\nfunction makeNodePromisifiedClosure(callback, receiver, _, fn, __, multiArgs) {\n var defaultThis = (function() {return this;})();\n var method = callback;\n if (typeof method === \"string\") {\n callback = fn;\n }\n function promisified() {\n var _receiver = receiver;\n if (receiver === THIS) _receiver = this;\n var promise = new Promise(INTERNAL);\n promise._captureStackTrace();\n var cb = typeof method === \"string\" && this !== defaultThis\n ? this[method] : callback;\n var fn = nodebackForPromise(promise, multiArgs);\n try {\n cb.apply(_receiver, withAppended(arguments, fn));\n } catch(e) {\n promise._rejectCallback(maybeWrapAsError(e), true, true);\n }\n if (!promise._isFateSealed()) promise._setAsyncGuaranteed();\n return promise;\n }\n util.notEnumerableProp(promisified, \"__isPromisified__\", true);\n return promisified;\n}\n\nvar makeNodePromisified = canEvaluate\n ? makeNodePromisifiedEval\n : makeNodePromisifiedClosure;\n\nfunction promisifyAll(obj, suffix, filter, promisifier, multiArgs) {\n var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + \"$\");\n var methods =\n promisifiableMethods(obj, suffix, suffixRegexp, filter);\n\n for (var i = 0, len = methods.length; i < len; i+= 2) {\n var key = methods[i];\n var fn = methods[i+1];\n var promisifiedKey = key + suffix;\n if (promisifier === makeNodePromisified) {\n obj[promisifiedKey] =\n makeNodePromisified(key, THIS, key, fn, suffix, multiArgs);\n } else {\n var promisified = promisifier(fn, function() {\n return makeNodePromisified(key, THIS, key,\n fn, suffix, multiArgs);\n });\n util.notEnumerableProp(promisified, \"__isPromisified__\", true);\n obj[promisifiedKey] = promisified;\n }\n }\n util.toFastProperties(obj);\n return obj;\n}\n\nfunction promisify(callback, receiver, multiArgs) {\n return makeNodePromisified(callback, receiver, undefined,\n callback, null, multiArgs);\n}\n\nPromise.promisify = function (fn, options) {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"expecting a function but got \" + util.classString(fn));\n }\n if (isPromisified(fn)) {\n return fn;\n }\n options = Object(options);\n var receiver = options.context === undefined ? THIS : options.context;\n var multiArgs = !!options.multiArgs;\n var ret = promisify(fn, receiver, multiArgs);\n util.copyDescriptors(fn, ret, propsFilter);\n return ret;\n};\n\nPromise.promisifyAll = function (target, options) {\n if (typeof target !== \"function\" && typeof target !== \"object\") {\n throw new TypeError(\"the target of promisifyAll must be an object or a function\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n options = Object(options);\n var multiArgs = !!options.multiArgs;\n var suffix = options.suffix;\n if (typeof suffix !== \"string\") suffix = defaultSuffix;\n var filter = options.filter;\n if (typeof filter !== \"function\") filter = defaultFilter;\n var promisifier = options.promisifier;\n if (typeof promisifier !== \"function\") promisifier = makeNodePromisified;\n\n if (!util.isIdentifier(suffix)) {\n throw new RangeError(\"suffix must be a valid identifier\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n\n var keys = util.inheritedDataKeys(target);\n for (var i = 0; i < keys.length; ++i) {\n var value = target[keys[i]];\n if (keys[i] !== \"constructor\" &&\n util.isClass(value)) {\n promisifyAll(value.prototype, suffix, filter, promisifier,\n multiArgs);\n promisifyAll(value, suffix, filter, promisifier, multiArgs);\n }\n }\n\n return promisifyAll(target, suffix, filter, promisifier, multiArgs);\n};\n};\n\n\n},{\"./errors\":12,\"./nodeback\":20,\"./util\":36}],25:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(\n Promise, PromiseArray, tryConvertToPromise, apiRejection) {\nvar util = _dereq_(\"./util\");\nvar isObject = util.isObject;\nvar es5 = _dereq_(\"./es5\");\nvar Es6Map;\nif (typeof Map === \"function\") Es6Map = Map;\n\nvar mapToEntries = (function() {\n var index = 0;\n var size = 0;\n\n function extractEntry(value, key) {\n this[index] = value;\n this[index + size] = key;\n index++;\n }\n\n return function mapToEntries(map) {\n size = map.size;\n index = 0;\n var ret = new Array(map.size * 2);\n map.forEach(extractEntry, ret);\n return ret;\n };\n})();\n\nvar entriesToMap = function(entries) {\n var ret = new Es6Map();\n var length = entries.length / 2 | 0;\n for (var i = 0; i < length; ++i) {\n var key = entries[length + i];\n var value = entries[i];\n ret.set(key, value);\n }\n return ret;\n};\n\nfunction PropertiesPromiseArray(obj) {\n var isMap = false;\n var entries;\n if (Es6Map !== undefined && obj instanceof Es6Map) {\n entries = mapToEntries(obj);\n isMap = true;\n } else {\n var keys = es5.keys(obj);\n var len = keys.length;\n entries = new Array(len * 2);\n for (var i = 0; i < len; ++i) {\n var key = keys[i];\n entries[i] = obj[key];\n entries[i + len] = key;\n }\n }\n this.constructor$(entries);\n this._isMap = isMap;\n this._init$(undefined, isMap ? -6 : -3);\n}\nutil.inherits(PropertiesPromiseArray, PromiseArray);\n\nPropertiesPromiseArray.prototype._init = function () {};\n\nPropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) {\n this._values[index] = value;\n var totalResolved = ++this._totalResolved;\n if (totalResolved >= this._length) {\n var val;\n if (this._isMap) {\n val = entriesToMap(this._values);\n } else {\n val = {};\n var keyOffset = this.length();\n for (var i = 0, len = this.length(); i < len; ++i) {\n val[this._values[i + keyOffset]] = this._values[i];\n }\n }\n this._resolve(val);\n return true;\n }\n return false;\n};\n\nPropertiesPromiseArray.prototype.shouldCopyValues = function () {\n return false;\n};\n\nPropertiesPromiseArray.prototype.getActualLength = function (len) {\n return len >> 1;\n};\n\nfunction props(promises) {\n var ret;\n var castValue = tryConvertToPromise(promises);\n\n if (!isObject(castValue)) {\n return apiRejection(\"cannot await properties of a non-object\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n } else if (castValue instanceof Promise) {\n ret = castValue._then(\n Promise.props, undefined, undefined, undefined, undefined);\n } else {\n ret = new PropertiesPromiseArray(castValue).promise();\n }\n\n if (castValue instanceof Promise) {\n ret._propagateFrom(castValue, 2);\n }\n return ret;\n}\n\nPromise.prototype.props = function () {\n return props(this);\n};\n\nPromise.props = function (promises) {\n return props(promises);\n};\n};\n\n},{\"./es5\":13,\"./util\":36}],26:[function(_dereq_,module,exports){\n\"use strict\";\nfunction arrayMove(src, srcIndex, dst, dstIndex, len) {\n for (var j = 0; j < len; ++j) {\n dst[j + dstIndex] = src[j + srcIndex];\n src[j + srcIndex] = void 0;\n }\n}\n\nfunction Queue(capacity) {\n this._capacity = capacity;\n this._length = 0;\n this._front = 0;\n}\n\nQueue.prototype._willBeOverCapacity = function (size) {\n return this._capacity < size;\n};\n\nQueue.prototype._pushOne = function (arg) {\n var length = this.length();\n this._checkCapacity(length + 1);\n var i = (this._front + length) & (this._capacity - 1);\n this[i] = arg;\n this._length = length + 1;\n};\n\nQueue.prototype.push = function (fn, receiver, arg) {\n var length = this.length() + 3;\n if (this._willBeOverCapacity(length)) {\n this._pushOne(fn);\n this._pushOne(receiver);\n this._pushOne(arg);\n return;\n }\n var j = this._front + length - 3;\n this._checkCapacity(length);\n var wrapMask = this._capacity - 1;\n this[(j + 0) & wrapMask] = fn;\n this[(j + 1) & wrapMask] = receiver;\n this[(j + 2) & wrapMask] = arg;\n this._length = length;\n};\n\nQueue.prototype.shift = function () {\n var front = this._front,\n ret = this[front];\n\n this[front] = undefined;\n this._front = (front + 1) & (this._capacity - 1);\n this._length--;\n return ret;\n};\n\nQueue.prototype.length = function () {\n return this._length;\n};\n\nQueue.prototype._checkCapacity = function (size) {\n if (this._capacity < size) {\n this._resizeTo(this._capacity << 1);\n }\n};\n\nQueue.prototype._resizeTo = function (capacity) {\n var oldCapacity = this._capacity;\n this._capacity = capacity;\n var front = this._front;\n var length = this._length;\n var moveItemsCount = (front + length) & (oldCapacity - 1);\n arrayMove(this, 0, this, oldCapacity, moveItemsCount);\n};\n\nmodule.exports = Queue;\n\n},{}],27:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(\n Promise, INTERNAL, tryConvertToPromise, apiRejection) {\nvar util = _dereq_(\"./util\");\n\nvar raceLater = function (promise) {\n return promise.then(function(array) {\n return race(array, promise);\n });\n};\n\nfunction race(promises, parent) {\n var maybePromise = tryConvertToPromise(promises);\n\n if (maybePromise instanceof Promise) {\n return raceLater(maybePromise);\n } else {\n promises = util.asArray(promises);\n if (promises === null)\n return apiRejection(\"expecting an array or an iterable object but got \" + util.classString(promises));\n }\n\n var ret = new Promise(INTERNAL);\n if (parent !== undefined) {\n ret._propagateFrom(parent, 3);\n }\n var fulfill = ret._fulfill;\n var reject = ret._reject;\n for (var i = 0, len = promises.length; i < len; ++i) {\n var val = promises[i];\n\n if (val === undefined && !(i in promises)) {\n continue;\n }\n\n Promise.cast(val)._then(fulfill, reject, undefined, ret, null);\n }\n return ret;\n}\n\nPromise.race = function (promises) {\n return race(promises, undefined);\n};\n\nPromise.prototype.race = function () {\n return race(this, undefined);\n};\n\n};\n\n},{\"./util\":36}],28:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise,\n PromiseArray,\n apiRejection,\n tryConvertToPromise,\n INTERNAL,\n debug) {\nvar getDomain = Promise._getDomain;\nvar util = _dereq_(\"./util\");\nvar tryCatch = util.tryCatch;\n\nfunction ReductionPromiseArray(promises, fn, initialValue, _each) {\n this.constructor$(promises);\n var domain = getDomain();\n this._fn = domain === null ? fn : util.domainBind(domain, fn);\n if (initialValue !== undefined) {\n initialValue = Promise.resolve(initialValue);\n initialValue._attachCancellationCallback(this);\n }\n this._initialValue = initialValue;\n this._currentCancellable = null;\n if(_each === INTERNAL) {\n this._eachValues = Array(this._length);\n } else if (_each === 0) {\n this._eachValues = null;\n } else {\n this._eachValues = undefined;\n }\n this._promise._captureStackTrace();\n this._init$(undefined, -5);\n}\nutil.inherits(ReductionPromiseArray, PromiseArray);\n\nReductionPromiseArray.prototype._gotAccum = function(accum) {\n if (this._eachValues !== undefined && \n this._eachValues !== null && \n accum !== INTERNAL) {\n this._eachValues.push(accum);\n }\n};\n\nReductionPromiseArray.prototype._eachComplete = function(value) {\n if (this._eachValues !== null) {\n this._eachValues.push(value);\n }\n return this._eachValues;\n};\n\nReductionPromiseArray.prototype._init = function() {};\n\nReductionPromiseArray.prototype._resolveEmptyArray = function() {\n this._resolve(this._eachValues !== undefined ? this._eachValues\n : this._initialValue);\n};\n\nReductionPromiseArray.prototype.shouldCopyValues = function () {\n return false;\n};\n\nReductionPromiseArray.prototype._resolve = function(value) {\n this._promise._resolveCallback(value);\n this._values = null;\n};\n\nReductionPromiseArray.prototype._resultCancelled = function(sender) {\n if (sender === this._initialValue) return this._cancel();\n if (this._isResolved()) return;\n this._resultCancelled$();\n if (this._currentCancellable instanceof Promise) {\n this._currentCancellable.cancel();\n }\n if (this._initialValue instanceof Promise) {\n this._initialValue.cancel();\n }\n};\n\nReductionPromiseArray.prototype._iterate = function (values) {\n this._values = values;\n var value;\n var i;\n var length = values.length;\n if (this._initialValue !== undefined) {\n value = this._initialValue;\n i = 0;\n } else {\n value = Promise.resolve(values[0]);\n i = 1;\n }\n\n this._currentCancellable = value;\n\n if (!value.isRejected()) {\n for (; i < length; ++i) {\n var ctx = {\n accum: null,\n value: values[i],\n index: i,\n length: length,\n array: this\n };\n value = value._then(gotAccum, undefined, undefined, ctx, undefined);\n }\n }\n\n if (this._eachValues !== undefined) {\n value = value\n ._then(this._eachComplete, undefined, undefined, this, undefined);\n }\n value._then(completed, completed, undefined, value, this);\n};\n\nPromise.prototype.reduce = function (fn, initialValue) {\n return reduce(this, fn, initialValue, null);\n};\n\nPromise.reduce = function (promises, fn, initialValue, _each) {\n return reduce(promises, fn, initialValue, _each);\n};\n\nfunction completed(valueOrReason, array) {\n if (this.isFulfilled()) {\n array._resolve(valueOrReason);\n } else {\n array._reject(valueOrReason);\n }\n}\n\nfunction reduce(promises, fn, initialValue, _each) {\n if (typeof fn !== \"function\") {\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\n }\n var array = new ReductionPromiseArray(promises, fn, initialValue, _each);\n return array.promise();\n}\n\nfunction gotAccum(accum) {\n this.accum = accum;\n this.array._gotAccum(accum);\n var value = tryConvertToPromise(this.value, this.array._promise);\n if (value instanceof Promise) {\n this.array._currentCancellable = value;\n return value._then(gotValue, undefined, undefined, this, undefined);\n } else {\n return gotValue.call(this, value);\n }\n}\n\nfunction gotValue(value) {\n var array = this.array;\n var promise = array._promise;\n var fn = tryCatch(array._fn);\n promise._pushContext();\n var ret;\n if (array._eachValues !== undefined) {\n ret = fn.call(promise._boundValue(), value, this.index, this.length);\n } else {\n ret = fn.call(promise._boundValue(),\n this.accum, value, this.index, this.length);\n }\n if (ret instanceof Promise) {\n array._currentCancellable = ret;\n }\n var promiseCreated = promise._popContext();\n debug.checkForgottenReturns(\n ret,\n promiseCreated,\n array._eachValues !== undefined ? \"Promise.each\" : \"Promise.reduce\",\n promise\n );\n return ret;\n}\n};\n\n},{\"./util\":36}],29:[function(_dereq_,module,exports){\n\"use strict\";\nvar util = _dereq_(\"./util\");\nvar schedule;\nvar noAsyncScheduler = function() {\n throw new Error(\"No async scheduler available\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n};\nvar NativePromise = util.getNativePromise();\nif (util.isNode && typeof MutationObserver === \"undefined\") {\n var GlobalSetImmediate = global.setImmediate;\n var ProcessNextTick = process.nextTick;\n schedule = util.isRecentNode\n ? function(fn) { GlobalSetImmediate.call(global, fn); }\n : function(fn) { ProcessNextTick.call(process, fn); };\n} else if (typeof NativePromise === \"function\" &&\n typeof NativePromise.resolve === \"function\") {\n var nativePromise = NativePromise.resolve();\n schedule = function(fn) {\n nativePromise.then(fn);\n };\n} else if ((typeof MutationObserver !== \"undefined\") &&\n !(typeof window !== \"undefined\" &&\n window.navigator &&\n (window.navigator.standalone || window.cordova))) {\n schedule = (function() {\n var div = document.createElement(\"div\");\n var opts = {attributes: true};\n var toggleScheduled = false;\n var div2 = document.createElement(\"div\");\n var o2 = new MutationObserver(function() {\n div.classList.toggle(\"foo\");\n toggleScheduled = false;\n });\n o2.observe(div2, opts);\n\n var scheduleToggle = function() {\n if (toggleScheduled) return;\n toggleScheduled = true;\n div2.classList.toggle(\"foo\");\n };\n\n return function schedule(fn) {\n var o = new MutationObserver(function() {\n o.disconnect();\n fn();\n });\n o.observe(div, opts);\n scheduleToggle();\n };\n })();\n} else if (typeof setImmediate !== \"undefined\") {\n schedule = function (fn) {\n setImmediate(fn);\n };\n} else if (typeof setTimeout !== \"undefined\") {\n schedule = function (fn) {\n setTimeout(fn, 0);\n };\n} else {\n schedule = noAsyncScheduler;\n}\nmodule.exports = schedule;\n\n},{\"./util\":36}],30:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports =\n function(Promise, PromiseArray, debug) {\nvar PromiseInspection = Promise.PromiseInspection;\nvar util = _dereq_(\"./util\");\n\nfunction SettledPromiseArray(values) {\n this.constructor$(values);\n}\nutil.inherits(SettledPromiseArray, PromiseArray);\n\nSettledPromiseArray.prototype._promiseResolved = function (index, inspection) {\n this._values[index] = inspection;\n var totalResolved = ++this._totalResolved;\n if (totalResolved >= this._length) {\n this._resolve(this._values);\n return true;\n }\n return false;\n};\n\nSettledPromiseArray.prototype._promiseFulfilled = function (value, index) {\n var ret = new PromiseInspection();\n ret._bitField = 33554432;\n ret._settledValueField = value;\n return this._promiseResolved(index, ret);\n};\nSettledPromiseArray.prototype._promiseRejected = function (reason, index) {\n var ret = new PromiseInspection();\n ret._bitField = 16777216;\n ret._settledValueField = reason;\n return this._promiseResolved(index, ret);\n};\n\nPromise.settle = function (promises) {\n debug.deprecated(\".settle()\", \".reflect()\");\n return new SettledPromiseArray(promises).promise();\n};\n\nPromise.prototype.settle = function () {\n return Promise.settle(this);\n};\n};\n\n},{\"./util\":36}],31:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports =\nfunction(Promise, PromiseArray, apiRejection) {\nvar util = _dereq_(\"./util\");\nvar RangeError = _dereq_(\"./errors\").RangeError;\nvar AggregateError = _dereq_(\"./errors\").AggregateError;\nvar isArray = util.isArray;\nvar CANCELLATION = {};\n\n\nfunction SomePromiseArray(values) {\n this.constructor$(values);\n this._howMany = 0;\n this._unwrap = false;\n this._initialized = false;\n}\nutil.inherits(SomePromiseArray, PromiseArray);\n\nSomePromiseArray.prototype._init = function () {\n if (!this._initialized) {\n return;\n }\n if (this._howMany === 0) {\n this._resolve([]);\n return;\n }\n this._init$(undefined, -5);\n var isArrayResolved = isArray(this._values);\n if (!this._isResolved() &&\n isArrayResolved &&\n this._howMany > this._canPossiblyFulfill()) {\n this._reject(this._getRangeError(this.length()));\n }\n};\n\nSomePromiseArray.prototype.init = function () {\n this._initialized = true;\n this._init();\n};\n\nSomePromiseArray.prototype.setUnwrap = function () {\n this._unwrap = true;\n};\n\nSomePromiseArray.prototype.howMany = function () {\n return this._howMany;\n};\n\nSomePromiseArray.prototype.setHowMany = function (count) {\n this._howMany = count;\n};\n\nSomePromiseArray.prototype._promiseFulfilled = function (value) {\n this._addFulfilled(value);\n if (this._fulfilled() === this.howMany()) {\n this._values.length = this.howMany();\n if (this.howMany() === 1 && this._unwrap) {\n this._resolve(this._values[0]);\n } else {\n this._resolve(this._values);\n }\n return true;\n }\n return false;\n\n};\nSomePromiseArray.prototype._promiseRejected = function (reason) {\n this._addRejected(reason);\n return this._checkOutcome();\n};\n\nSomePromiseArray.prototype._promiseCancelled = function () {\n if (this._values instanceof Promise || this._values == null) {\n return this._cancel();\n }\n this._addRejected(CANCELLATION);\n return this._checkOutcome();\n};\n\nSomePromiseArray.prototype._checkOutcome = function() {\n if (this.howMany() > this._canPossiblyFulfill()) {\n var e = new AggregateError();\n for (var i = this.length(); i < this._values.length; ++i) {\n if (this._values[i] !== CANCELLATION) {\n e.push(this._values[i]);\n }\n }\n if (e.length > 0) {\n this._reject(e);\n } else {\n this._cancel();\n }\n return true;\n }\n return false;\n};\n\nSomePromiseArray.prototype._fulfilled = function () {\n return this._totalResolved;\n};\n\nSomePromiseArray.prototype._rejected = function () {\n return this._values.length - this.length();\n};\n\nSomePromiseArray.prototype._addRejected = function (reason) {\n this._values.push(reason);\n};\n\nSomePromiseArray.prototype._addFulfilled = function (value) {\n this._values[this._totalResolved++] = value;\n};\n\nSomePromiseArray.prototype._canPossiblyFulfill = function () {\n return this.length() - this._rejected();\n};\n\nSomePromiseArray.prototype._getRangeError = function (count) {\n var message = \"Input array must contain at least \" +\n this._howMany + \" items but contains only \" + count + \" items\";\n return new RangeError(message);\n};\n\nSomePromiseArray.prototype._resolveEmptyArray = function () {\n this._reject(this._getRangeError(0));\n};\n\nfunction some(promises, howMany) {\n if ((howMany | 0) !== howMany || howMany < 0) {\n return apiRejection(\"expecting a positive integer\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n var ret = new SomePromiseArray(promises);\n var promise = ret.promise();\n ret.setHowMany(howMany);\n ret.init();\n return promise;\n}\n\nPromise.some = function (promises, howMany) {\n return some(promises, howMany);\n};\n\nPromise.prototype.some = function (howMany) {\n return some(this, howMany);\n};\n\nPromise._SomePromiseArray = SomePromiseArray;\n};\n\n},{\"./errors\":12,\"./util\":36}],32:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise) {\nfunction PromiseInspection(promise) {\n if (promise !== undefined) {\n promise = promise._target();\n this._bitField = promise._bitField;\n this._settledValueField = promise._isFateSealed()\n ? promise._settledValue() : undefined;\n }\n else {\n this._bitField = 0;\n this._settledValueField = undefined;\n }\n}\n\nPromiseInspection.prototype._settledValue = function() {\n return this._settledValueField;\n};\n\nvar value = PromiseInspection.prototype.value = function () {\n if (!this.isFulfilled()) {\n throw new TypeError(\"cannot get fulfillment value of a non-fulfilled promise\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n return this._settledValue();\n};\n\nvar reason = PromiseInspection.prototype.error =\nPromiseInspection.prototype.reason = function () {\n if (!this.isRejected()) {\n throw new TypeError(\"cannot get rejection reason of a non-rejected promise\\u000a\\u000a See http://goo.gl/MqrFmX\\u000a\");\n }\n return this._settledValue();\n};\n\nvar isFulfilled = PromiseInspection.prototype.isFulfilled = function() {\n return (this._bitField & 33554432) !== 0;\n};\n\nvar isRejected = PromiseInspection.prototype.isRejected = function () {\n return (this._bitField & 16777216) !== 0;\n};\n\nvar isPending = PromiseInspection.prototype.isPending = function () {\n return (this._bitField & 50397184) === 0;\n};\n\nvar isResolved = PromiseInspection.prototype.isResolved = function () {\n return (this._bitField & 50331648) !== 0;\n};\n\nPromiseInspection.prototype.isCancelled = function() {\n return (this._bitField & 8454144) !== 0;\n};\n\nPromise.prototype.__isCancelled = function() {\n return (this._bitField & 65536) === 65536;\n};\n\nPromise.prototype._isCancelled = function() {\n return this._target().__isCancelled();\n};\n\nPromise.prototype.isCancelled = function() {\n return (this._target()._bitField & 8454144) !== 0;\n};\n\nPromise.prototype.isPending = function() {\n return isPending.call(this._target());\n};\n\nPromise.prototype.isRejected = function() {\n return isRejected.call(this._target());\n};\n\nPromise.prototype.isFulfilled = function() {\n return isFulfilled.call(this._target());\n};\n\nPromise.prototype.isResolved = function() {\n return isResolved.call(this._target());\n};\n\nPromise.prototype.value = function() {\n return value.call(this._target());\n};\n\nPromise.prototype.reason = function() {\n var target = this._target();\n target._unsetRejectionIsUnhandled();\n return reason.call(target);\n};\n\nPromise.prototype._value = function() {\n return this._settledValue();\n};\n\nPromise.prototype._reason = function() {\n this._unsetRejectionIsUnhandled();\n return this._settledValue();\n};\n\nPromise.PromiseInspection = PromiseInspection;\n};\n\n},{}],33:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL) {\nvar util = _dereq_(\"./util\");\nvar errorObj = util.errorObj;\nvar isObject = util.isObject;\n\nfunction tryConvertToPromise(obj, context) {\n if (isObject(obj)) {\n if (obj instanceof Promise) return obj;\n var then = getThen(obj);\n if (then === errorObj) {\n if (context) context._pushContext();\n var ret = Promise.reject(then.e);\n if (context) context._popContext();\n return ret;\n } else if (typeof then === \"function\") {\n if (isAnyBluebirdPromise(obj)) {\n var ret = new Promise(INTERNAL);\n obj._then(\n ret._fulfill,\n ret._reject,\n undefined,\n ret,\n null\n );\n return ret;\n }\n return doThenable(obj, then, context);\n }\n }\n return obj;\n}\n\nfunction doGetThen(obj) {\n return obj.then;\n}\n\nfunction getThen(obj) {\n try {\n return doGetThen(obj);\n } catch (e) {\n errorObj.e = e;\n return errorObj;\n }\n}\n\nvar hasProp = {}.hasOwnProperty;\nfunction isAnyBluebirdPromise(obj) {\n try {\n return hasProp.call(obj, \"_promise0\");\n } catch (e) {\n return false;\n }\n}\n\nfunction doThenable(x, then, context) {\n var promise = new Promise(INTERNAL);\n var ret = promise;\n if (context) context._pushContext();\n promise._captureStackTrace();\n if (context) context._popContext();\n var synchronous = true;\n var result = util.tryCatch(then).call(x, resolve, reject);\n synchronous = false;\n\n if (promise && result === errorObj) {\n promise._rejectCallback(result.e, true, true);\n promise = null;\n }\n\n function resolve(value) {\n if (!promise) return;\n promise._resolveCallback(value);\n promise = null;\n }\n\n function reject(reason) {\n if (!promise) return;\n promise._rejectCallback(reason, synchronous, true);\n promise = null;\n }\n return ret;\n}\n\nreturn tryConvertToPromise;\n};\n\n},{\"./util\":36}],34:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function(Promise, INTERNAL, debug) {\nvar util = _dereq_(\"./util\");\nvar TimeoutError = Promise.TimeoutError;\n\nfunction HandleWrapper(handle) {\n this.handle = handle;\n}\n\nHandleWrapper.prototype._resultCancelled = function() {\n clearTimeout(this.handle);\n};\n\nvar afterValue = function(value) { return delay(+this).thenReturn(value); };\nvar delay = Promise.delay = function (ms, value) {\n var ret;\n var handle;\n if (value !== undefined) {\n ret = Promise.resolve(value)\n ._then(afterValue, null, null, ms, undefined);\n if (debug.cancellation() && value instanceof Promise) {\n ret._setOnCancel(value);\n }\n } else {\n ret = new Promise(INTERNAL);\n handle = setTimeout(function() { ret._fulfill(); }, +ms);\n if (debug.cancellation()) {\n ret._setOnCancel(new HandleWrapper(handle));\n }\n ret._captureStackTrace();\n }\n ret._setAsyncGuaranteed();\n return ret;\n};\n\nPromise.prototype.delay = function (ms) {\n return delay(ms, this);\n};\n\nvar afterTimeout = function (promise, message, parent) {\n var err;\n if (typeof message !== \"string\") {\n if (message instanceof Error) {\n err = message;\n } else {\n err = new TimeoutError(\"operation timed out\");\n }\n } else {\n err = new TimeoutError(message);\n }\n util.markAsOriginatingFromRejection(err);\n promise._attachExtraTrace(err);\n promise._reject(err);\n\n if (parent != null) {\n parent.cancel();\n }\n};\n\nfunction successClear(value) {\n clearTimeout(this.handle);\n return value;\n}\n\nfunction failureClear(reason) {\n clearTimeout(this.handle);\n throw reason;\n}\n\nPromise.prototype.timeout = function (ms, message) {\n ms = +ms;\n var ret, parent;\n\n var handleWrapper = new HandleWrapper(setTimeout(function timeoutTimeout() {\n if (ret.isPending()) {\n afterTimeout(ret, message, parent);\n }\n }, ms));\n\n if (debug.cancellation()) {\n parent = this.then();\n ret = parent._then(successClear, failureClear,\n undefined, handleWrapper, undefined);\n ret._setOnCancel(handleWrapper);\n } else {\n ret = this._then(successClear, failureClear,\n undefined, handleWrapper, undefined);\n }\n\n return ret;\n};\n\n};\n\n},{\"./util\":36}],35:[function(_dereq_,module,exports){\n\"use strict\";\nmodule.exports = function (Promise, apiRejection, tryConvertToPromise,\n createContext, INTERNAL, debug) {\n var util = _dereq_(\"./util\");\n var TypeError = _dereq_(\"./errors\").TypeError;\n var inherits = _dereq_(\"./util\").inherits;\n var errorObj = util.errorObj;\n var tryCatch = util.tryCatch;\n var NULL = {};\n\n function thrower(e) {\n setTimeout(function(){throw e;}, 0);\n }\n\n function castPreservingDisposable(thenable) {\n var maybePromise = tryConvertToPromise(thenable);\n if (maybePromise !== thenable &&\n typeof thenable._isDisposable === \"function\" &&\n typeof thenable._getDisposer === \"function\" &&\n thenable._isDisposable()) {\n maybePromise._setDisposable(thenable._getDisposer());\n }\n return maybePromise;\n }\n function dispose(resources, inspection) {\n var i = 0;\n var len = resources.length;\n var ret = new Promise(INTERNAL);\n function iterator() {\n if (i >= len) return ret._fulfill();\n var maybePromise = castPreservingDisposable(resources[i++]);\n if (maybePromise instanceof Promise &&\n maybePromise._isDisposable()) {\n try {\n maybePromise = tryConvertToPromise(\n maybePromise._getDisposer().tryDispose(inspection),\n resources.promise);\n } catch (e) {\n return thrower(e);\n }\n if (maybePromise instanceof Promise) {\n return maybePromise._then(iterator, thrower,\n null, null, null);\n }\n }\n iterator();\n }\n iterator();\n return ret;\n }\n\n function Disposer(data, promise, context) {\n this._data = data;\n this._promise = promise;\n this._context = context;\n }\n\n Disposer.prototype.data = function () {\n return this._data;\n };\n\n Disposer.prototype.promise = function () {\n return this._promise;\n };\n\n Disposer.prototype.resource = function () {\n if (this.promise().isFulfilled()) {\n return this.promise().value();\n }\n return NULL;\n };\n\n Disposer.prototype.tryDispose = function(inspection) {\n var resource = this.resource();\n var context = this._context;\n if (context !== undefined) context._pushContext();\n var ret = resource !== NULL\n ? this.doDispose(resource, inspection) : null;\n if (context !== undefined) context._popContext();\n this._promise._unsetDisposable();\n this._data = null;\n return ret;\n };\n\n Disposer.isDisposer = function (d) {\n return (d != null &&\n typeof d.resource === \"function\" &&\n typeof d.tryDispose === \"function\");\n };\n\n function FunctionDisposer(fn, promise, context) {\n this.constructor$(fn, promise, context);\n }\n inherits(FunctionDisposer, Disposer);\n\n FunctionDisposer.prototype.doDispose = function (resource, inspection) {\n var fn = this.data();\n return fn.call(resource, resource, inspection);\n };\n\n function maybeUnwrapDisposer(value) {\n if (Disposer.isDisposer(value)) {\n this.resources[this.index]._setDisposable(value);\n return value.promise();\n }\n return value;\n }\n\n function ResourceList(length) {\n this.length = length;\n this.promise = null;\n this[length-1] = null;\n }\n\n ResourceList.prototype._resultCancelled = function() {\n var len = this.length;\n for (var i = 0; i < len; ++i) {\n var item = this[i];\n if (item instanceof Promise) {\n item.cancel();\n }\n }\n };\n\n Promise.using = function () {\n var len = arguments.length;\n if (len < 2) return apiRejection(\n \"you must pass at least 2 arguments to Promise.using\");\n var fn = arguments[len - 1];\n if (typeof fn !== \"function\") {\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\n }\n var input;\n var spreadArgs = true;\n if (len === 2 && Array.isArray(arguments[0])) {\n input = arguments[0];\n len = input.length;\n spreadArgs = false;\n } else {\n input = arguments;\n len--;\n }\n var resources = new ResourceList(len);\n for (var i = 0; i < len; ++i) {\n var resource = input[i];\n if (Disposer.isDisposer(resource)) {\n var disposer = resource;\n resource = resource.promise();\n resource._setDisposable(disposer);\n } else {\n var maybePromise = tryConvertToPromise(resource);\n if (maybePromise instanceof Promise) {\n resource =\n maybePromise._then(maybeUnwrapDisposer, null, null, {\n resources: resources,\n index: i\n }, undefined);\n }\n }\n resources[i] = resource;\n }\n\n var reflectedResources = new Array(resources.length);\n for (var i = 0; i < reflectedResources.length; ++i) {\n reflectedResources[i] = Promise.resolve(resources[i]).reflect();\n }\n\n var resultPromise = Promise.all(reflectedResources)\n .then(function(inspections) {\n for (var i = 0; i < inspections.length; ++i) {\n var inspection = inspections[i];\n if (inspection.isRejected()) {\n errorObj.e = inspection.error();\n return errorObj;\n } else if (!inspection.isFulfilled()) {\n resultPromise.cancel();\n return;\n }\n inspections[i] = inspection.value();\n }\n promise._pushContext();\n\n fn = tryCatch(fn);\n var ret = spreadArgs\n ? fn.apply(undefined, inspections) : fn(inspections);\n var promiseCreated = promise._popContext();\n debug.checkForgottenReturns(\n ret, promiseCreated, \"Promise.using\", promise);\n return ret;\n });\n\n var promise = resultPromise.lastly(function() {\n var inspection = new Promise.PromiseInspection(resultPromise);\n return dispose(resources, inspection);\n });\n resources.promise = promise;\n promise._setOnCancel(resources);\n return promise;\n };\n\n Promise.prototype._setDisposable = function (disposer) {\n this._bitField = this._bitField | 131072;\n this._disposer = disposer;\n };\n\n Promise.prototype._isDisposable = function () {\n return (this._bitField & 131072) > 0;\n };\n\n Promise.prototype._getDisposer = function () {\n return this._disposer;\n };\n\n Promise.prototype._unsetDisposable = function () {\n this._bitField = this._bitField & (~131072);\n this._disposer = undefined;\n };\n\n Promise.prototype.disposer = function (fn) {\n if (typeof fn === \"function\") {\n return new FunctionDisposer(fn, this, createContext());\n }\n throw new TypeError();\n };\n\n};\n\n},{\"./errors\":12,\"./util\":36}],36:[function(_dereq_,module,exports){\n\"use strict\";\nvar es5 = _dereq_(\"./es5\");\nvar canEvaluate = typeof navigator == \"undefined\";\n\nvar errorObj = {e: {}};\nvar tryCatchTarget;\nvar globalObject = typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window :\n typeof global !== \"undefined\" ? global :\n this !== undefined ? this : null;\n\nfunction tryCatcher() {\n try {\n var target = tryCatchTarget;\n tryCatchTarget = null;\n return target.apply(this, arguments);\n } catch (e) {\n errorObj.e = e;\n return errorObj;\n }\n}\nfunction tryCatch(fn) {\n tryCatchTarget = fn;\n return tryCatcher;\n}\n\nvar inherits = function(Child, Parent) {\n var hasProp = {}.hasOwnProperty;\n\n function T() {\n this.constructor = Child;\n this.constructor$ = Parent;\n for (var propertyName in Parent.prototype) {\n if (hasProp.call(Parent.prototype, propertyName) &&\n propertyName.charAt(propertyName.length-1) !== \"$\"\n ) {\n this[propertyName + \"$\"] = Parent.prototype[propertyName];\n }\n }\n }\n T.prototype = Parent.prototype;\n Child.prototype = new T();\n return Child.prototype;\n};\n\n\nfunction isPrimitive(val) {\n return val == null || val === true || val === false ||\n typeof val === \"string\" || typeof val === \"number\";\n\n}\n\nfunction isObject(value) {\n return typeof value === \"function\" ||\n typeof value === \"object\" && value !== null;\n}\n\nfunction maybeWrapAsError(maybeError) {\n if (!isPrimitive(maybeError)) return maybeError;\n\n return new Error(safeToString(maybeError));\n}\n\nfunction withAppended(target, appendee) {\n var len = target.length;\n var ret = new Array(len + 1);\n var i;\n for (i = 0; i < len; ++i) {\n ret[i] = target[i];\n }\n ret[i] = appendee;\n return ret;\n}\n\nfunction getDataPropertyOrDefault(obj, key, defaultValue) {\n if (es5.isES5) {\n var desc = Object.getOwnPropertyDescriptor(obj, key);\n\n if (desc != null) {\n return desc.get == null && desc.set == null\n ? desc.value\n : defaultValue;\n }\n } else {\n return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;\n }\n}\n\nfunction notEnumerableProp(obj, name, value) {\n if (isPrimitive(obj)) return obj;\n var descriptor = {\n value: value,\n configurable: true,\n enumerable: false,\n writable: true\n };\n es5.defineProperty(obj, name, descriptor);\n return obj;\n}\n\nfunction thrower(r) {\n throw r;\n}\n\nvar inheritedDataKeys = (function() {\n var excludedPrototypes = [\n Array.prototype,\n Object.prototype,\n Function.prototype\n ];\n\n var isExcludedProto = function(val) {\n for (var i = 0; i < excludedPrototypes.length; ++i) {\n if (excludedPrototypes[i] === val) {\n return true;\n }\n }\n return false;\n };\n\n if (es5.isES5) {\n var getKeys = Object.getOwnPropertyNames;\n return function(obj) {\n var ret = [];\n var visitedKeys = Object.create(null);\n while (obj != null && !isExcludedProto(obj)) {\n var keys;\n try {\n keys = getKeys(obj);\n } catch (e) {\n return ret;\n }\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (visitedKeys[key]) continue;\n visitedKeys[key] = true;\n var desc = Object.getOwnPropertyDescriptor(obj, key);\n if (desc != null && desc.get == null && desc.set == null) {\n ret.push(key);\n }\n }\n obj = es5.getPrototypeOf(obj);\n }\n return ret;\n };\n } else {\n var hasProp = {}.hasOwnProperty;\n return function(obj) {\n if (isExcludedProto(obj)) return [];\n var ret = [];\n\n /*jshint forin:false */\n enumeration: for (var key in obj) {\n if (hasProp.call(obj, key)) {\n ret.push(key);\n } else {\n for (var i = 0; i < excludedPrototypes.length; ++i) {\n if (hasProp.call(excludedPrototypes[i], key)) {\n continue enumeration;\n }\n }\n ret.push(key);\n }\n }\n return ret;\n };\n }\n\n})();\n\nvar thisAssignmentPattern = /this\\s*\\.\\s*\\S+\\s*=/;\nfunction isClass(fn) {\n try {\n if (typeof fn === \"function\") {\n var keys = es5.names(fn.prototype);\n\n var hasMethods = es5.isES5 && keys.length > 1;\n var hasMethodsOtherThanConstructor = keys.length > 0 &&\n !(keys.length === 1 && keys[0] === \"constructor\");\n var hasThisAssignmentAndStaticMethods =\n thisAssignmentPattern.test(fn + \"\") && es5.names(fn).length > 0;\n\n if (hasMethods || hasMethodsOtherThanConstructor ||\n hasThisAssignmentAndStaticMethods) {\n return true;\n }\n }\n return false;\n } catch (e) {\n return false;\n }\n}\n\nfunction toFastProperties(obj) {\n /*jshint -W027,-W055,-W031*/\n function FakeConstructor() {}\n FakeConstructor.prototype = obj;\n var l = 8;\n while (l--) new FakeConstructor();\n return obj;\n eval(obj);\n}\n\nvar rident = /^[a-z$_][a-z$_0-9]*$/i;\nfunction isIdentifier(str) {\n return rident.test(str);\n}\n\nfunction filledRange(count, prefix, suffix) {\n var ret = new Array(count);\n for(var i = 0; i < count; ++i) {\n ret[i] = prefix + i + suffix;\n }\n return ret;\n}\n\nfunction safeToString(obj) {\n try {\n return obj + \"\";\n } catch (e) {\n return \"[no string representation]\";\n }\n}\n\nfunction isError(obj) {\n return obj instanceof Error ||\n (obj !== null &&\n typeof obj === \"object\" &&\n typeof obj.message === \"string\" &&\n typeof obj.name === \"string\");\n}\n\nfunction markAsOriginatingFromRejection(e) {\n try {\n notEnumerableProp(e, \"isOperational\", true);\n }\n catch(ignore) {}\n}\n\nfunction originatesFromRejection(e) {\n if (e == null) return false;\n return ((e instanceof Error[\"__BluebirdErrorTypes__\"].OperationalError) ||\n e[\"isOperational\"] === true);\n}\n\nfunction canAttachTrace(obj) {\n return isError(obj) && es5.propertyIsWritable(obj, \"stack\");\n}\n\nvar ensureErrorObject = (function() {\n if (!(\"stack\" in new Error())) {\n return function(value) {\n if (canAttachTrace(value)) return value;\n try {throw new Error(safeToString(value));}\n catch(err) {return err;}\n };\n } else {\n return function(value) {\n if (canAttachTrace(value)) return value;\n return new Error(safeToString(value));\n };\n }\n})();\n\nfunction classString(obj) {\n return {}.toString.call(obj);\n}\n\nfunction copyDescriptors(from, to, filter) {\n var keys = es5.names(from);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (filter(key)) {\n try {\n es5.defineProperty(to, key, es5.getDescriptor(from, key));\n } catch (ignore) {}\n }\n }\n}\n\nvar asArray = function(v) {\n if (es5.isArray(v)) {\n return v;\n }\n return null;\n};\n\nif (typeof Symbol !== \"undefined\" && Symbol.iterator) {\n var ArrayFrom = typeof Array.from === \"function\" ? function(v) {\n return Array.from(v);\n } : function(v) {\n var ret = [];\n var it = v[Symbol.iterator]();\n var itResult;\n while (!((itResult = it.next()).done)) {\n ret.push(itResult.value);\n }\n return ret;\n };\n\n asArray = function(v) {\n if (es5.isArray(v)) {\n return v;\n } else if (v != null && typeof v[Symbol.iterator] === \"function\") {\n return ArrayFrom(v);\n }\n return null;\n };\n}\n\nvar isNode = typeof process !== \"undefined\" &&\n classString(process).toLowerCase() === \"[object process]\";\n\nvar hasEnvVariables = typeof process !== \"undefined\" &&\n typeof process.env !== \"undefined\";\n\nfunction env(key) {\n return hasEnvVariables ? process.env[key] : undefined;\n}\n\nfunction getNativePromise() {\n if (typeof Promise === \"function\") {\n try {\n var promise = new Promise(function(){});\n if ({}.toString.call(promise) === \"[object Promise]\") {\n return Promise;\n }\n } catch (e) {}\n }\n}\n\nfunction domainBind(self, cb) {\n return self.bind(cb);\n}\n\nvar ret = {\n isClass: isClass,\n isIdentifier: isIdentifier,\n inheritedDataKeys: inheritedDataKeys,\n getDataPropertyOrDefault: getDataPropertyOrDefault,\n thrower: thrower,\n isArray: es5.isArray,\n asArray: asArray,\n notEnumerableProp: notEnumerableProp,\n isPrimitive: isPrimitive,\n isObject: isObject,\n isError: isError,\n canEvaluate: canEvaluate,\n errorObj: errorObj,\n tryCatch: tryCatch,\n inherits: inherits,\n withAppended: withAppended,\n maybeWrapAsError: maybeWrapAsError,\n toFastProperties: toFastProperties,\n filledRange: filledRange,\n toString: safeToString,\n canAttachTrace: canAttachTrace,\n ensureErrorObject: ensureErrorObject,\n originatesFromRejection: originatesFromRejection,\n markAsOriginatingFromRejection: markAsOriginatingFromRejection,\n classString: classString,\n copyDescriptors: copyDescriptors,\n hasDevTools: typeof chrome !== \"undefined\" && chrome &&\n typeof chrome.loadTimes === \"function\",\n isNode: isNode,\n hasEnvVariables: hasEnvVariables,\n env: env,\n global: globalObject,\n getNativePromise: getNativePromise,\n domainBind: domainBind\n};\nret.isRecentNode = ret.isNode && (function() {\n var version = process.versions.node.split(\".\").map(Number);\n return (version[0] === 0 && version[1] > 10) || (version[0] > 0);\n})();\n\nif (ret.isNode) ret.toFastProperties(process);\n\ntry {throw new Error(); } catch (e) {ret.lastLineError = e;}\nmodule.exports = ret;\n\n},{\"./es5\":13}]},{},[4])(4)\n}); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; }","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n error.request = request;\n error.response = response;\n return error;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n // Note: status is not exposed by XDomainRequest\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || require('./../helpers/btoa');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n var loadEvent = 'onreadystatechange';\n var xDomain = false;\n\n // For IE 8/9 CORS support\n // Only supports POST and GET calls and doesn't returns the response headers.\n // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.\n if (process.env.NODE_ENV !== 'test' &&\n typeof window !== 'undefined' &&\n window.XDomainRequest && !('withCredentials' in request) &&\n !isURLSameOrigin(config.url)) {\n request = new window.XDomainRequest();\n loadEvent = 'onload';\n xDomain = true;\n request.onprogress = function handleProgress() {};\n request.ontimeout = function handleTimeout() {};\n }\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request[loadEvent] = function handleLoad() {\n if (!request || (request.readyState !== 4 && !xDomain)) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n // IE sends 1223 instead of 204 (https://github.com/axios/axios/issues/201)\n status: request.status === 1223 ? 204 : request.status,\n statusText: request.status === 1223 ? 'No Content' : request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = require('./../helpers/cookies');\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","module.exports = require('./lib/axios');","// Generated by CoffeeScript 1.12.2\n(function() {\n var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - nodeLoadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n moduleLoadTime = getNanoSeconds();\n upTime = process.uptime() * 1e9;\n nodeLoadTime = moduleLoadTime - upTime;\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n//# sourceMappingURL=performance-now.js.map\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.MAX_TEXTURE_IMAGE_UNITS = exports.MAX_TEXTURE_SIZE = exports.webgl2 = void 0;\nconst vertexShaderSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec3 position;\\nin vec2 texcoord;\\nout vec2 outTex;\\n\\nvoid main () {\\n gl_Position = vec4(position, 1.0);\\n\\toutTex = texcoord;\\n}\\n\";\n\nclass WebGL2 {\n constructor() {\n this.isSupported = false;\n this.vertexShader = null;\n\n if (typeof window !== 'undefined') {\n this.canvas = document.createElement('canvas');\n this.context = this.canvas.getContext('webgl2');\n const gl = this.context;\n\n if (gl) {\n this.isSupported = true;\n gl.getExtension('EXT_color_buffer_float');\n this.MAX_TEXTURE_SIZE = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n this.MAX_TEXTURE_IMAGE_UNITS = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);\n this.init();\n } else {\n console.log('Unable to initialize WebGL2 -- your browser may not support it.');\n }\n }\n\n this._refs = {\n textures: [],\n buffers: []\n };\n }\n\n init() {\n this.createCommonVertexShader();\n }\n\n createCommonVertexShader() {\n const gl = this.context;\n const vertexShader = gl.createShader(gl.VERTEX_SHADER);\n gl.shaderSource(vertexShader, vertexShaderSource);\n gl.compileShader(vertexShader);\n const success = gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS);\n\n if (!success) {\n console.error(gl.getShaderInfoLog(vertexShader));\n gl.deleteShader(vertexShader);\n this.isSupported = false;\n }\n\n this.vertexShader = vertexShader;\n }\n\n compileProgram(source) {\n const gl = this.context;\n const fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);\n gl.shaderSource(fragmentShader, source);\n gl.compileShader(fragmentShader);\n let success = gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS);\n\n if (!success) {\n console.error(gl.getShaderInfoLog(fragmentShader));\n gl.deleteShader(fragmentShader);\n this.isSupported = false;\n }\n\n const program = gl.createProgram();\n gl.attachShader(program, this.vertexShader);\n gl.attachShader(program, fragmentShader);\n gl.linkProgram(program);\n success = gl.getProgramParameter(program, gl.LINK_STATUS);\n\n if (!success) {\n console.error(gl.getProgramInfoLog(program));\n this.isSupported = false;\n }\n\n this.setupVertices(program);\n return program;\n }\n\n setupVertices(program) {\n const gl = this.context;\n const position = gl.getAttribLocation(program, 'position');\n const positionVertexObj = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, positionVertexObj);\n this.storeRef('buffer', positionVertexObj);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1.0, -1.0, 0.0, 1.0, -1.0, 0.0, 1.0, 1.0, 0.0, -1.0, 1.0, 0.0]), gl.STATIC_DRAW);\n gl.vertexAttribPointer(position, 3, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(position);\n const texcoord = gl.getAttribLocation(program, 'texcoord');\n const texcoordVertexObj = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texcoordVertexObj);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0]), gl.STATIC_DRAW);\n gl.vertexAttribPointer(texcoord, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(texcoord);\n this.storeRef('buffer', texcoordVertexObj);\n const indicesVertexObj = gl.createBuffer();\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indicesVertexObj);\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array([0, 1, 2, 0, 2, 3]), gl.STATIC_DRAW);\n this.storeRef('buffer', indicesVertexObj);\n }\n\n selectProgram(program) {\n const gl = this.context;\n gl.useProgram(program);\n }\n\n bindUniforms(program, uniforms) {\n const gl = this.context;\n uniforms.forEach(({\n value,\n type,\n name\n }) => {\n const loc = gl.getUniformLocation(program, name);\n\n if (type === 'float') {\n gl.uniform1f(loc, value);\n } else if (type === 'int' || type === 'bool') {\n gl.uniform1i(loc, value);\n }\n });\n }\n\n bindInputTextures(program, inputs, k) {\n const gl = this.context;\n inputs.forEach(({\n input,\n name\n }, i) => {\n gl.activeTexture(gl.TEXTURE0 + i);\n\n if (input.glTextureFragments) {\n if (input.glTextureFragmentsAsColStack) {\n const {\n textureTarget\n } = this.getWebGLTextureOptions(input.glTextureType, input.glTextureFormat);\n gl.bindTexture(textureTarget, input.glTextureFragmentsAsColStack);\n } else {\n const {\n textureTarget\n } = this.getWebGLTextureOptions(input.glTextureType, input.glTextureFormat);\n gl.bindTexture(textureTarget, input.glTextureFragments[k]);\n }\n } else {\n const {\n textureTarget\n } = this.getWebGLTextureOptions(input.glTextureType, input.glTextureFormat);\n gl.bindTexture(textureTarget, input.glTexture);\n }\n\n gl.uniform1i(gl.getUniformLocation(program, name), i);\n });\n }\n\n bindOutputTexture(outputTexture, shape) {\n const gl = this.context;\n gl.viewport(0, 0, shape[1], shape[0]);\n this.framebuffer = this.framebuffer || gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, outputTexture, 0);\n }\n\n runProgram({\n program,\n output,\n inputs,\n uniforms,\n supportsTextureFragments = false\n }) {\n if (!program) throw new Error('[WebGL2] missing program');\n if (!output) throw new Error('[WebGL2] missing output');\n if (!inputs) throw new Error('[WebGL2] missing inputs');\n const gl = this.context;\n this.selectProgram(program);\n\n if (uniforms && Array.isArray(uniforms)) {\n this.bindUniforms(program, uniforms);\n }\n\n if (output.glTextureFragments) {\n if (!supportsTextureFragments) {\n throw new Error('[WebGL2] program does not support texture fragments');\n }\n\n const inputsWithFragments = inputs.filter(obj => obj.input.glTextureFragments && !obj.input.glTextureFragmentsAsColStack);\n const numFragments = output.glTextureFragments.length;\n\n if (inputsWithFragments.some(obj => obj.input.glTextureFragments.length !== numFragments)) {\n throw new Error('[WebGL2] number of texture fragments in inputs and output do not match');\n }\n\n for (let k = 0; k < numFragments; k++) {\n this.bindOutputTexture(output.glTextureFragments[k], output.glTextureFragmentShape);\n this.bindInputTextures(program, inputs, k);\n gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0);\n }\n } else {\n this.bindOutputTexture(output.glTexture, output.glTextureShape);\n this.bindInputTextures(program, inputs);\n gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0);\n }\n }\n\n readData(shape) {\n const gl = this.context;\n const buf = new ArrayBuffer(shape[0] * shape[1] * 4 * 4);\n const view = new Float32Array(buf);\n gl.readPixels(0, 0, shape[1], shape[0], gl.RGBA, gl.FLOAT, view);\n const out = [];\n\n for (let i = 0; i < view.length; i += 4) {\n out.push(view[i]);\n }\n\n return new Float32Array(out);\n }\n\n getWebGLTextureOptions(type, format) {\n const gl = this.context;\n const targetMap = {\n '2d': gl.TEXTURE_2D,\n '2d_array': gl.TEXTURE_2D_ARRAY,\n '3d': gl.TEXTURE_3D\n };\n const internalFormatMap = {\n float: gl.R32F,\n int: gl.R32I\n };\n const formatMap = {\n float: gl.RED,\n int: gl.RED_INTEGER\n };\n const typeMap = {\n float: gl.FLOAT,\n int: gl.INT\n };\n const textureTarget = targetMap[type];\n const textureInternalFormat = internalFormatMap[format];\n const textureFormat = formatMap[format];\n const textureType = typeMap[format];\n return {\n textureTarget,\n textureInternalFormat,\n textureFormat,\n textureType\n };\n }\n\n storeRef(type, obj) {\n if (type === 'texture') {\n this._refs.textures.push(obj);\n } else if (type === 'buffer') {\n this._refs.buffers.push(obj);\n }\n }\n\n clearRefs() {\n const gl = this.context;\n\n this._refs.textures.forEach(texture => gl.deleteTexture(texture));\n\n this._refs.buffers.forEach(buffer => gl.deleteBuffer(buffer));\n\n this._refs = {\n textures: [],\n buffers: []\n };\n }\n\n}\n\nconst webgl2 = new WebGL2();\nexports.webgl2 = webgl2;\nconst MAX_TEXTURE_SIZE = webgl2.MAX_TEXTURE_SIZE;\nexports.MAX_TEXTURE_SIZE = MAX_TEXTURE_SIZE;\nconst MAX_TEXTURE_IMAGE_UNITS = webgl2.MAX_TEXTURE_IMAGE_UNITS;\nexports.MAX_TEXTURE_IMAGE_UNITS = MAX_TEXTURE_IMAGE_UNITS;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _WebGL = require(\"./WebGL2\");\n\nclass Layer {\n constructor(attrs = {}) {\n this.layerClass = 'Layer';\n this.name = attrs.name;\n this.description = '';\n this.gpu = _WebGL.webgl2.isSupported && attrs.gpu;\n this.params = [];\n this.weights = {};\n this.inbound = [];\n this.outbound = [];\n }\n\n throwError(message) {\n throw new Error(`[${this.layerClass} layer: ${this.name || ''}] ${message}`);\n }\n\n toggleGPU(mode) {\n const newMode = typeof mode === 'undefined' ? !this.gpu : mode;\n\n if (_WebGL.webgl2.isSupported && newMode) {\n this.gpu = true;\n } else {\n this.gpu = false;\n }\n }\n\n setWeights(weightsArr, createGLTexture = true) {\n this.params.forEach((p, i) => {\n this.weights[p] = weightsArr[i];\n\n if (this.gpu && createGLTexture) {\n this.weights[p].createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n });\n }\n\n call(x) {\n this.output = x;\n return this.output;\n }\n\n}\n\nexports.default = Layer;","var createRange = require('./_createRange');\n\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\nvar range = createRange();\n\nmodule.exports = range;\n","\"use strict\"\n\nvar compile = require(\"cwise-compiler\")\n\nvar EmptyProc = {\n body: \"\",\n args: [],\n thisVars: [],\n localVars: []\n}\n\nfunction fixup(x) {\n if(!x) {\n return EmptyProc\n }\n for(var i=0; i>\",\n rrshift: \">>>\"\n}\n;(function(){\n for(var id in assign_ops) {\n var op = assign_ops[id]\n exports[id] = makeOp({\n args: [\"array\",\"array\",\"array\"],\n body: {args:[\"a\",\"b\",\"c\"],\n body: \"a=b\"+op+\"c\"},\n funcName: id\n })\n exports[id+\"eq\"] = makeOp({\n args: [\"array\",\"array\"],\n body: {args:[\"a\",\"b\"],\n body:\"a\"+op+\"=b\"},\n rvalue: true,\n funcName: id+\"eq\"\n })\n exports[id+\"s\"] = makeOp({\n args: [\"array\", \"array\", \"scalar\"],\n body: {args:[\"a\",\"b\",\"s\"],\n body:\"a=b\"+op+\"s\"},\n funcName: id+\"s\"\n })\n exports[id+\"seq\"] = makeOp({\n args: [\"array\",\"scalar\"],\n body: {args:[\"a\",\"s\"],\n body:\"a\"+op+\"=s\"},\n rvalue: true,\n funcName: id+\"seq\"\n })\n }\n})();\n\nvar unary_ops = {\n not: \"!\",\n bnot: \"~\",\n neg: \"-\",\n recip: \"1.0/\"\n}\n;(function(){\n for(var id in unary_ops) {\n var op = unary_ops[id]\n exports[id] = makeOp({\n args: [\"array\", \"array\"],\n body: {args:[\"a\",\"b\"],\n body:\"a=\"+op+\"b\"},\n funcName: id\n })\n exports[id+\"eq\"] = makeOp({\n args: [\"array\"],\n body: {args:[\"a\"],\n body:\"a=\"+op+\"a\"},\n rvalue: true,\n count: 2,\n funcName: id+\"eq\"\n })\n }\n})();\n\nvar binary_ops = {\n and: \"&&\",\n or: \"||\",\n eq: \"===\",\n neq: \"!==\",\n lt: \"<\",\n gt: \">\",\n leq: \"<=\",\n geq: \">=\"\n}\n;(function() {\n for(var id in binary_ops) {\n var op = binary_ops[id]\n exports[id] = makeOp({\n args: [\"array\",\"array\",\"array\"],\n body: {args:[\"a\", \"b\", \"c\"],\n body:\"a=b\"+op+\"c\"},\n funcName: id\n })\n exports[id+\"s\"] = makeOp({\n args: [\"array\",\"array\",\"scalar\"],\n body: {args:[\"a\", \"b\", \"s\"],\n body:\"a=b\"+op+\"s\"},\n funcName: id+\"s\"\n })\n exports[id+\"eq\"] = makeOp({\n args: [\"array\", \"array\"],\n body: {args:[\"a\", \"b\"],\n body:\"a=a\"+op+\"b\"},\n rvalue:true,\n count:2,\n funcName: id+\"eq\"\n })\n exports[id+\"seq\"] = makeOp({\n args: [\"array\", \"scalar\"],\n body: {args:[\"a\",\"s\"],\n body:\"a=a\"+op+\"s\"},\n rvalue:true,\n count:2,\n funcName: id+\"seq\"\n })\n }\n})();\n\nvar math_unary = [\n \"abs\",\n \"acos\",\n \"asin\",\n \"atan\",\n \"ceil\",\n \"cos\",\n \"exp\",\n \"floor\",\n \"log\",\n \"round\",\n \"sin\",\n \"sqrt\",\n \"tan\"\n]\n;(function() {\n for(var i=0; ithis_s){this_s=-a}else if(a>this_s){this_s=a}\", localVars: [], thisVars: [\"this_s\"]},\n post: {args:[], localVars:[], thisVars:[\"this_s\"], body:\"return this_s\"},\n funcName: \"norminf\"\n})\n\nexports.norm1 = compile({\n args:[\"array\"],\n pre: {args:[], localVars:[], thisVars:[\"this_s\"], body:\"this_s=0\"},\n body: {args:[{name:\"a\", lvalue:false, rvalue:true, count:3}], body: \"this_s+=a<0?-a:a\", localVars: [], thisVars: [\"this_s\"]},\n post: {args:[], localVars:[], thisVars:[\"this_s\"], body:\"return this_s\"},\n funcName: \"norm1\"\n})\n\nexports.sup = compile({\n args: [ \"array\" ],\n pre:\n { body: \"this_h=-Infinity\",\n args: [],\n thisVars: [ \"this_h\" ],\n localVars: [] },\n body:\n { body: \"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_\",\n args: [{\"name\":\"_inline_1_arg0_\",\"lvalue\":false,\"rvalue\":true,\"count\":2} ],\n thisVars: [ \"this_h\" ],\n localVars: [] },\n post:\n { body: \"return this_h\",\n args: [],\n thisVars: [ \"this_h\" ],\n localVars: [] }\n })\n\nexports.inf = compile({\n args: [ \"array\" ],\n pre:\n { body: \"this_h=Infinity\",\n args: [],\n thisVars: [ \"this_h\" ],\n localVars: [] },\n body:\n { body: \"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}\",\n args:[\n {name:\"_inline_1_arg0_\",lvalue:false,rvalue:true,count:2},\n {name:\"_inline_1_arg1_\",lvalue:false,rvalue:true,count:2}],\n thisVars:[\"this_i\",\"this_v\"],\n localVars:[\"_inline_1_k\"]},\n post:{\n body:\"{return this_i}\",\n args:[],\n thisVars:[\"this_i\"],\n localVars:[]}\n}) \n\nexports.random = makeOp({\n args: [\"array\"],\n pre: {args:[], body:\"this_f=Math.random\", thisVars:[\"this_f\"]},\n body: {args: [\"a\"], body:\"a=this_f()\", thisVars:[\"this_f\"]},\n funcName: \"random\"\n})\n\nexports.assign = makeOp({\n args:[\"array\", \"array\"],\n body: {args:[\"a\", \"b\"], body:\"a=b\"},\n funcName: \"assign\" })\n\nexports.assigns = makeOp({\n args:[\"array\", \"scalar\"],\n body: {args:[\"a\", \"b\"], body:\"a=b\"},\n funcName: \"assigns\" })\n\n\nexports.equals = compile({\n args:[\"array\", \"array\"],\n pre: EmptyProc,\n body: {args:[{name:\"x\", lvalue:false, rvalue:true, count:1},\n {name:\"y\", lvalue:false, rvalue:true, count:1}], \n body: \"if(x!==y){return false}\", \n localVars: [], \n thisVars: []},\n post: {args:[], localVars:[], thisVars:[], body:\"return true\"},\n funcName: \"equals\"\n})\n\n\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.checkShape = checkShape;\nexports.data3DLayoutForGL = data3DLayoutForGL;\nexports.createIndicesFor2DReshaped = createIndicesFor2DReshaped;\n\nvar _range2 = _interopRequireDefault(require(\"lodash/range\"));\n\nvar _ndarray = _interopRequireDefault(require(\"ndarray\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction checkShape(data, shape) {\n if (data.length && shape.length && data.length !== shape.reduce((a, b) => a * b, 1)) {\n throw new Error('[Tensor] specified shape incompatible with data.');\n }\n}\n\nfunction data3DLayoutForGL(typedarrayConstructor, arr, shape) {\n const data = new typedarrayConstructor(arr.data.length);\n const slice = (0, _ndarray.default)(new typedarrayConstructor(shape[0] * shape[1]), [shape[0], shape[1]]);\n let offset = 0;\n\n for (let i = 0; i < shape[2]; i++) {\n _ndarrayOps.default.assign(slice, arr.pick(null, null, i));\n\n data.set(slice.data, offset);\n offset += shape[0] * shape[1];\n }\n\n return data;\n}\n\nfunction createIndicesFor2DReshaped(shape, square = false, axis = -1) {\n const size = shape.reduce((a, b) => a * b, 1);\n const indicesArr = (0, _ndarray.default)(new Int32Array(size), shape);\n\n if (square) {\n const squareDim = Math.ceil(Math.sqrt(size));\n const indicesRowArrReshaped = (0, _ndarray.default)(new Int32Array(squareDim ** 2), [squareDim, squareDim]);\n const indicesColArrReshaped = (0, _ndarray.default)(new Int32Array(squareDim ** 2), [squareDim, squareDim]);\n const indicesArrReshaped = (0, _ndarray.default)(new Int32Array(squareDim ** 2), [squareDim, squareDim]);\n\n for (let i = 0; i < squareDim; i++) {\n _ndarrayOps.default.assigns(indicesRowArrReshaped.pick(i, null), i);\n }\n\n for (let j = 0; j < squareDim; j++) {\n _ndarrayOps.default.assigns(indicesColArrReshaped.pick(null, j), j);\n }\n\n _ndarrayOps.default.muls(indicesArrReshaped, indicesRowArrReshaped, squareDim);\n\n _ndarrayOps.default.addeq(indicesArrReshaped, indicesColArrReshaped);\n\n indicesArr.data.set(indicesArrReshaped.data.subarray(0, indicesArr.size));\n } else {\n if (axis < 0) {\n axis = shape.length + axis;\n }\n\n const axisSize = shape[axis];\n const indicesRowArr = (0, _ndarray.default)(new Int32Array(size), shape);\n const indicesColArr = (0, _ndarray.default)(new Int32Array(size), shape);\n const otherAxes = [...shape.slice(0, axis), ...shape.slice(axis + 1)];\n const otherAxesSize = otherAxes.reduce((a, b) => a * b, 1);\n const indicesRowArrSlice = (0, _ndarray.default)(new Int32Array((0, _range2.default)(otherAxesSize)), otherAxes);\n const axisSlices = Array(shape.length).fill(null);\n\n for (let n = 0; n < axisSize; n++) {\n axisSlices[axis] = n;\n\n _ndarrayOps.default.assign(indicesRowArr.pick(...axisSlices), indicesRowArrSlice);\n\n _ndarrayOps.default.assigns(indicesColArr.pick(...axisSlices), n);\n }\n\n _ndarrayOps.default.muls(indicesArr, indicesRowArr, axisSize);\n\n _ndarrayOps.default.addeq(indicesArr, indicesColArr);\n }\n\n return indicesArr;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _WebGL = require(\"./WebGL2\");\n\nvar tensorUtils = _interopRequireWildcard(require(\"./utils/tensorUtils\"));\n\nvar _ndarray = _interopRequireDefault(require(\"ndarray\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _ndarraySqueeze = _interopRequireDefault(require(\"ndarray-squeeze\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nclass Tensor {\n constructor(data, shape, options = {}) {\n this.arrayType = options.type || Float32Array;\n\n if (data && data.length && (data instanceof this.arrayType || data instanceof Array)) {\n tensorUtils.checkShape(data, shape);\n\n if (data instanceof this.arrayType) {\n this.tensor = (0, _ndarray.default)(data, shape);\n } else if (data instanceof Array) {\n this.tensor = (0, _ndarray.default)(new this.arrayType(data), shape);\n }\n } else if (!data.length && shape.length) {\n this.tensor = (0, _ndarray.default)(new this.arrayType(shape.reduce((a, b) => a * b, 1)), shape);\n } else {\n this.tensor = (0, _ndarray.default)(new this.arrayType([]), []);\n }\n }\n\n createGLTexture({\n type = '2d',\n format = 'float',\n supportsTextureFragments = false\n }) {\n let shape = [];\n\n if (this.tensor.shape.length === 1) {\n shape = [1, this.tensor.shape[0]];\n this.is1D = true;\n } else if (this.tensor.shape.length === 2) {\n shape = this.tensor.shape;\n } else if (this.tensor.shape.length === 3 && (type === '2d_array' || type === '3d')) {\n shape = this.tensor.shape;\n } else {\n throw new Error('[Tensor] cannot create WebGL2 texture.');\n }\n\n this.glTextureShape = shape;\n this.glTextureType = type;\n this.glTextureFormat = format;\n\n if (type === '2d') {\n if (this.glTextureShape[0] > _WebGL.MAX_TEXTURE_SIZE && supportsTextureFragments) {\n this._create2DRowFragmentedGLTexture();\n } else {\n this._create2DGLTexture();\n }\n } else if (type === '2d_array' || type === '3d') {\n this._create3DGLTexture();\n } else {\n throw new Error(`[Tensor] invalid type ${type}.`);\n }\n }\n\n _create2DGLTexture() {\n const gl = _WebGL.webgl2.context;\n\n const textureOptions = _WebGL.webgl2.getWebGLTextureOptions(this.glTextureType, this.glTextureFormat);\n\n const {\n textureTarget,\n textureInternalFormat,\n textureFormat,\n textureType\n } = textureOptions;\n this.glTexture = gl.createTexture();\n\n _WebGL.webgl2.storeRef('texture', this.glTexture);\n\n gl.bindTexture(textureTarget, this.glTexture);\n const shape = this.glTextureShape;\n const data = this.tensor.data;\n gl.texImage2D(textureTarget, 0, textureInternalFormat, shape[1], shape[0], 0, textureFormat, textureType, data);\n gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(textureTarget, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texParameteri(textureTarget, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n }\n\n _create2DRowFragmentedGLTexture() {\n const gl = _WebGL.webgl2.context;\n\n const textureOptions = _WebGL.webgl2.getWebGLTextureOptions(this.glTextureType, this.glTextureFormat);\n\n const {\n textureTarget,\n textureInternalFormat,\n textureFormat,\n textureType\n } = textureOptions;\n this.glTextureFragments = [];\n this.glTextureFragmentShape = [_WebGL.MAX_TEXTURE_SIZE, this.glTextureShape[1]];\n const shape = this.glTextureFragmentShape;\n const numFragments = Math.ceil(this.glTextureShape[0] / _WebGL.MAX_TEXTURE_SIZE);\n let offset = 0;\n\n for (let k = 0; k < numFragments; k++) {\n const glTexture = gl.createTexture();\n\n _WebGL.webgl2.storeRef('texture', glTexture);\n\n gl.bindTexture(textureTarget, glTexture);\n let data;\n\n if (k === numFragments - 1) {\n data = new this.arrayType(shape[0] * shape[1]);\n data.set(this.tensor.data.slice(offset, offset + shape[0] * shape[1]), 0);\n } else {\n data = this.tensor.data.slice(offset, offset + shape[0] * shape[1]);\n }\n\n gl.texImage2D(textureTarget, 0, textureInternalFormat, shape[1], shape[0], 0, textureFormat, textureType, data);\n gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(textureTarget, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texParameteri(textureTarget, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n this.glTextureFragments.push(glTexture);\n offset += shape[0] * shape[1];\n }\n }\n\n _create3DGLTexture() {\n const gl = _WebGL.webgl2.context;\n\n const textureOptions = _WebGL.webgl2.getWebGLTextureOptions(this.glTextureType, this.glTextureFormat);\n\n const {\n textureTarget,\n textureInternalFormat,\n textureFormat,\n textureType\n } = textureOptions;\n this.glTexture = gl.createTexture();\n\n _WebGL.webgl2.storeRef('texture', this.glTexture);\n\n gl.bindTexture(textureTarget, this.glTexture);\n const shape = this.glTextureShape;\n const data = tensorUtils.data3DLayoutForGL(this.arrayType, this.tensor, this.glTextureShape);\n gl.texImage3D(textureTarget, 0, textureInternalFormat, shape[1], shape[0], shape[2], 0, textureFormat, textureType, data);\n gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(textureTarget, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texParameteri(textureTarget, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n }\n\n convert2DRowFragmentedGLTextureToColStack() {\n if (!this.glTextureFragments || !this.glTextureFragmentShape) {\n throw new Error('[Tensor] no glTextureFragments available.');\n }\n\n const gl = _WebGL.webgl2.context;\n\n const textureOptions = _WebGL.webgl2.getWebGLTextureOptions(this.glTextureType, this.glTextureFormat);\n\n const {\n textureTarget,\n textureInternalFormat,\n textureFormat,\n textureType\n } = textureOptions;\n\n if (!this.glTextureFragmentsAsColStack) {\n this.glTextureFragmentsAsColStack = gl.createTexture();\n\n _WebGL.webgl2.storeRef('texture', this.glTextureFragmentsAsColStack);\n\n gl.bindTexture(textureTarget, this.glTextureFragmentsAsColStack);\n const numFragments = this.glTextureFragments.length;\n this.glTextureFragmentsAsColStackShape = [this.glTextureFragmentShape[0], this.glTextureFragmentShape[1] * numFragments];\n const shape = this.glTextureFragmentsAsColStackShape;\n const data = new this.arrayType(shape.reduce((a, b) => a * b, 1));\n gl.texImage2D(textureTarget, 0, textureInternalFormat, shape[1], shape[0], 0, textureFormat, textureType, data);\n gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(textureTarget, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texParameteri(textureTarget, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n } else {\n gl.bindTexture(textureTarget, this.glTextureFragmentsAsColStack);\n }\n\n const fbo = gl.createFramebuffer();\n gl.bindFramebuffer(gl.READ_FRAMEBUFFER, fbo);\n this.glTextureFragments.forEach((texture, k) => {\n gl.framebufferTexture2D(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n gl.copyTexSubImage2D(textureTarget, 0, k * this.glTextureFragmentShape[1], 0, 0, 0, this.glTextureFragmentShape[1], this.glTextureFragmentShape[0]);\n });\n gl.deleteFramebuffer(fbo);\n }\n\n removeGLTextureFragmentsAsColStack() {\n if (this.glTextureFragmentsAsColStack) {\n const gl = _WebGL.webgl2.context;\n gl.deleteTexture(this.glTextureFragmentsAsColStack);\n delete this.glTextureFragmentsAsColStack;\n delete this.glTextureFragmentsAsColStackShape;\n }\n }\n\n deleteGLTexture() {\n const gl = _WebGL.webgl2.context;\n\n if (this.glTexture) {\n gl.deleteTexture(this.glTexture);\n delete this.glTexture;\n }\n\n if (this.glTextureFragments) {\n this.glTextureFragments.forEach(texture => {\n gl.deleteTexture(texture);\n });\n delete this.glTextureFragments;\n }\n }\n\n replaceTensorData(data) {\n if (data && data.length && data instanceof this.arrayType) {\n this.tensor.data.set(data);\n } else if (data && data.length && data instanceof Array) {\n this.tensor.data.set(new this.arrayType(data));\n } else {\n throw new Error('[Tensor] invalid input for replaceTensorData method.');\n }\n\n if (this.glTexture) {\n const gl = _WebGL.webgl2.context;\n\n const textureOptions = _WebGL.webgl2.getWebGLTextureOptions(this.glTextureType, this.glTextureFormat);\n\n const {\n textureTarget,\n textureFormat,\n textureType\n } = textureOptions;\n gl.bindTexture(textureTarget, this.glTexture);\n const shape = this.glTextureShape;\n\n if (this.glTextureType === '2d') {\n const data = this.tensor.data;\n gl.texSubImage2D(textureTarget, 0, 0, 0, shape[1], shape[0], textureFormat, textureType, data, 0);\n } else if (this.glTextureType === '2d_array' || this.glTextureType === '3d') {\n const data = tensorUtils.data3DLayoutForGL(this.arrayType, this.tensor, shape);\n gl.texSubImage3D(textureTarget, 0, 0, 0, 0, shape[1], shape[0], shape[2], textureFormat, textureType, data, 0);\n }\n }\n }\n\n transferFromGLTexture() {\n if (this.glTextureFragments) {\n this.tensor = (0, _ndarray.default)(new this.arrayType(this.glTextureShape[0] * this.glTextureShape[1]), this.glTextureShape);\n let offset = 0;\n\n for (let k = 0; k < this.glTextureFragments.length; k++) {\n _WebGL.webgl2.bindOutputTexture(this.glTextureFragments[k], this.glTextureFragmentShape);\n\n const fragmentData = _WebGL.webgl2.readData(this.glTextureFragmentShape);\n\n if (k === this.glTextureFragments.length - 1) {\n const truncate = this.tensor.data.length - offset;\n this.tensor.data.set(fragmentData.subarray(0, truncate), offset);\n } else {\n this.tensor.data.set(fragmentData, offset);\n }\n\n offset += fragmentData.length;\n }\n } else {\n _WebGL.webgl2.bindOutputTexture(this.glTexture, this.glTextureShape);\n\n this.tensor = (0, _ndarray.default)(new this.arrayType([]), this.glTextureShape);\n this.tensor.data = _WebGL.webgl2.readData(this.glTextureShape);\n }\n\n if (this.is1D && this.glTextureShape[0] === 1) {\n this.tensor = (0, _ndarraySqueeze.default)(this.tensor, [0]);\n }\n }\n\n reshapeTo2D() {\n const axis = this.tensor.shape.length - 1;\n const axisSize = this.tensor.shape[axis];\n const otherAxes = this.tensor.shape.slice(0, axis);\n const otherAxesSize = otherAxes.reduce((a, b) => a * b, 1);\n const reshaped = (0, _ndarray.default)(new this.arrayType(otherAxesSize * axisSize), [otherAxesSize, axisSize]);\n const otherAxesData = (0, _ndarray.default)(new this.arrayType(otherAxesSize), otherAxes);\n const otherAxesDataRaveled = (0, _ndarray.default)(new this.arrayType(otherAxesSize), [otherAxesSize]);\n const axisSlices = Array(this.tensor.shape.length).fill(null);\n\n for (let n = 0; n < axisSize; n++) {\n axisSlices[axis] = n;\n\n _ndarrayOps.default.assign(otherAxesData, this.tensor.pick(...axisSlices));\n\n otherAxesDataRaveled.data = otherAxesData.data;\n\n _ndarrayOps.default.assign(reshaped.pick(null, n), otherAxesDataRaveled);\n }\n\n this.originalShape = this.tensor.shape;\n this.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.tensor.shape, false, axis);\n this.tensor = reshaped;\n this.is2DReshaped = true;\n }\n\n reshapeFrom2D(axis = -1) {\n if (!this.is2DReshaped) {\n throw new Error('[Tensor] not in reshaped 2D representation.');\n }\n\n if (!this.originalShape) {\n throw new Error('[Tensor] does not contain originalShape.');\n }\n\n if (axis < 0) {\n axis = this.originalShape.length + axis;\n }\n\n const channelDataSize = this.tensor.shape[0];\n const channels = this.tensor.shape[1];\n const reshaped = (0, _ndarray.default)(new this.arrayType(this.originalShape.reduce((a, b) => a * b, 1)), this.originalShape);\n const channelDataRaveled = (0, _ndarray.default)(new this.arrayType(channelDataSize), [channelDataSize]);\n const unraveledChannelShape = [...this.originalShape.slice(0, axis), ...this.originalShape.slice(axis + 1)];\n const unraveledChannel = (0, _ndarray.default)(new this.arrayType(unraveledChannelShape.reduce((a, b) => a * b, 1)), unraveledChannelShape);\n const axisSlices = Array(this.originalShape.length).fill(null);\n\n for (let n = 0; n < channels; n++) {\n _ndarrayOps.default.assign(channelDataRaveled, this.tensor.pick(null, n));\n\n unraveledChannel.data = channelDataRaveled.data;\n axisSlices[axis] = n;\n\n _ndarrayOps.default.assign(reshaped.pick(...axisSlices), unraveledChannel);\n }\n\n this.tensor = reshaped;\n }\n\n reshapeTo2DSquare() {\n const squareDim = Math.ceil(Math.sqrt(this.tensor.size));\n const reshaped = (0, _ndarray.default)(new this.arrayType(squareDim ** 2), [squareDim, squareDim]);\n reshaped.data.set(this.tensor.data);\n this.originalShape = this.tensor.shape;\n this.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.tensor.shape, true);\n this.tensor = reshaped;\n this.is2DSquareReshaped = true;\n }\n\n reshapeFrom2DSquare() {\n if (!this.is2DSquareReshaped) {\n throw new Error('[Tensor] not in reshaped 2D square representation.');\n }\n\n if (!this.originalShape) {\n throw new Error('[Tensor] does not contain originalShape.');\n }\n\n const size = this.originalShape.reduce((a, b) => a * b, 1);\n const reshaped = (0, _ndarray.default)(new this.arrayType(size), this.originalShape);\n reshaped.data.set(this.tensor.data.subarray(0, size));\n this.tensor = reshaped;\n }\n\n}\n\nexports.default = Tensor;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _isEqual2 = _interopRequireDefault(require(\"lodash/isEqual\"));\n\nvar _Layer = _interopRequireDefault(require(\"../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../Tensor\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass InputLayer extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'InputLayer';\n const {\n shape = []\n } = attrs;\n this.shape = attrs.batch_input_shape && attrs.batch_input_shape.length ? attrs.batch_input_shape.slice(1) : shape;\n this.description = `shape: ${JSON.stringify(this.shape)}`;\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.inputShape = x.tensor.shape;\n\n if (!(0, _isEqual2.default)(this.inputShape, this.shape)) {\n this.throwError(`input tensor shape ${x.tensor.shape} does not match specified shape ${this.shape}.`);\n }\n\n this.output = new _Tensor.default(x.tensor.data, x.tensor.shape);\n }\n\n _callGPU(x) {\n if (!x.glTexture && !x.glTextureFragments) {\n this.inputShape = x.tensor.shape;\n } else {\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n } else {\n this.inputShape = x.tensor.shape;\n }\n }\n\n if (!(0, _isEqual2.default)(this.inputShape, this.shape)) {\n this.throwError(`input tensor shape ${x.tensor.shape} does not match specified shape ${this.shape}.`);\n }\n\n if (!x.glTexture) {\n if (x.tensor.shape.length <= 2) {\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n } else if (x.tensor.shape.length > 2) {\n x.reshapeTo2D();\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n }\n\n this.output = x;\n }\n\n}\n\nexports.default = InputLayer;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = softmax;\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction softmax(x) {\n if (x.tensor.shape.length === 1) {\n const maxval = _ndarrayOps.default.sup(x.tensor);\n\n _ndarrayOps.default.subseq(x.tensor, maxval);\n\n _ndarrayOps.default.expeq(x.tensor);\n\n const sum = _ndarrayOps.default.sum(x.tensor);\n\n _ndarrayOps.default.divseq(x.tensor, sum);\n } else if (x.tensor.shape.length === 2) {\n for (let i = 0; i < x.tensor.shape[0]; i++) {\n const maxval = _ndarrayOps.default.sup(x.tensor.pick(i, null));\n\n _ndarrayOps.default.subseq(x.tensor.pick(i, null), maxval);\n\n _ndarrayOps.default.expeq(x.tensor.pick(i, null));\n\n const sum = _ndarrayOps.default.sum(x.tensor.pick(i, null));\n\n _ndarrayOps.default.divseq(x.tensor.pick(i, null), sum);\n }\n } else {\n throw new Error(`[activations.softmax] tensor shape ${x.tensor.shape} not supported.`);\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = selu;\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst _selu = (0, _cwise.default)({\n args: ['array', 'scalar'],\n body: function (_x) {\n const alpha = 1.6732632423543772848170429916717;\n const scale = 1.0507009873554804934193349852946;\n _x = scale * (Math.max(_x, 0) + alpha * (Math.exp(Math.min(_x, 0)) - 1));\n }\n});\n\nfunction selu(x) {\n _selu(x.tensor);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = softsign;\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst _softsign = (0, _cwise.default)({\n args: ['array'],\n body: function (_x) {\n _x /= 1 + Math.abs(_x);\n }\n});\n\nfunction softsign(x) {\n _softsign(x.tensor);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = relu;\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../Tensor\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction relu(x, opts = {}) {\n const {\n alpha = 0,\n maxValue = null\n } = opts;\n let neg;\n\n if (alpha !== 0) {\n neg = new _Tensor.default([], x.tensor.shape);\n\n _ndarrayOps.default.mins(neg.tensor, x.tensor, 0);\n\n _ndarrayOps.default.mulseq(neg.tensor, alpha);\n }\n\n _ndarrayOps.default.maxseq(x.tensor, 0);\n\n if (maxValue) {\n _ndarrayOps.default.minseq(x.tensor, maxValue);\n }\n\n if (neg) {\n _ndarrayOps.default.addeq(x.tensor, neg.tensor);\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = tanh;\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst _tanh = (0, _cwise.default)({\n args: ['array'],\n body: function (_x) {\n _x = Math.tanh(_x);\n }\n});\n\nfunction tanh(x) {\n _tanh(x.tensor);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = sigmoid;\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst _sigmoid = (0, _cwise.default)({\n args: ['array'],\n body: function (_x) {\n _x = 1 / (1 + Math.exp(-_x));\n }\n});\n\nfunction sigmoid(x) {\n _sigmoid(x.tensor);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = hard_sigmoid;\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst _hard_sigmoid = (0, _cwise.default)({\n args: ['array'],\n body: function (_x) {\n _x = _x * 0.2 + 0.5;\n\n if (_x <= 0) {\n _x = 0;\n } else if (_x >= 1) {\n _x = 1;\n }\n }\n});\n\nfunction hard_sigmoid(x) {\n _hard_sigmoid(x.tensor);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = linear;\n\nfunction linear(x) {\n return x;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"softmax\", {\n enumerable: true,\n get: function () {\n return _softmax.default;\n }\n});\nObject.defineProperty(exports, \"elu\", {\n enumerable: true,\n get: function () {\n return _elu.default;\n }\n});\nObject.defineProperty(exports, \"selu\", {\n enumerable: true,\n get: function () {\n return _selu.default;\n }\n});\nObject.defineProperty(exports, \"softplus\", {\n enumerable: true,\n get: function () {\n return _softplus.default;\n }\n});\nObject.defineProperty(exports, \"softsign\", {\n enumerable: true,\n get: function () {\n return _softsign.default;\n }\n});\nObject.defineProperty(exports, \"relu\", {\n enumerable: true,\n get: function () {\n return _relu.default;\n }\n});\nObject.defineProperty(exports, \"tanh\", {\n enumerable: true,\n get: function () {\n return _tanh.default;\n }\n});\nObject.defineProperty(exports, \"sigmoid\", {\n enumerable: true,\n get: function () {\n return _sigmoid.default;\n }\n});\nObject.defineProperty(exports, \"hard_sigmoid\", {\n enumerable: true,\n get: function () {\n return _hard_sigmoid.default;\n }\n});\nObject.defineProperty(exports, \"linear\", {\n enumerable: true,\n get: function () {\n return _linear.default;\n }\n});\n\nvar _softmax = _interopRequireDefault(require(\"./softmax\"));\n\nvar _elu = _interopRequireDefault(require(\"./elu\"));\n\nvar _selu = _interopRequireDefault(require(\"./selu\"));\n\nvar _softplus = _interopRequireDefault(require(\"./softplus\"));\n\nvar _softsign = _interopRequireDefault(require(\"./softsign\"));\n\nvar _relu = _interopRequireDefault(require(\"./relu\"));\n\nvar _tanh = _interopRequireDefault(require(\"./tanh\"));\n\nvar _sigmoid = _interopRequireDefault(require(\"./sigmoid\"));\n\nvar _hard_sigmoid = _interopRequireDefault(require(\"./hard_sigmoid\"));\n\nvar _linear = _interopRequireDefault(require(\"./linear\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _activations = require(\"../../activations\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst programSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform float alpha;\\nout vec4 outColor;\\n\\nvoid main() {\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n outColor = max(v, 0.0) + alpha * min(v, 0.0);\\n}\\n\";\n\nclass LeakyReLU extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'LeakyReLU';\n const {\n alpha = 0.3\n } = attrs;\n this.description = `alpha: ${alpha}`;\n this.alpha = alpha;\n\n if (this.gpu) {\n this.program = _WebGL.webgl2.compileProgram(programSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.output = x;\n (0, _activations.relu)(this.output, {\n alpha: this.alpha\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture && !x.glTextureFragments) {\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], x.glTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n\n if (x.is1D) {\n this.output.is1D = x.is1D;\n } else if (x.is2DReshaped || x.is2DSquareReshaped) {\n if (x.is2DReshaped) {\n this.output.is2DReshaped = x.is2DReshaped;\n } else if (x.is2DSquareReshaped) {\n this.output.is2DSquareReshaped = x.is2DSquareReshaped;\n }\n\n this.output.originalShape = x.originalShape;\n this.output.indicesForReshaped = x.indicesForReshaped;\n }\n }\n\n _WebGL.webgl2.runProgram({\n program: this.program,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: this.alpha,\n type: 'float',\n name: 'alpha'\n }],\n supportsTextureFragments: true\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = LeakyReLU;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst programSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform sampler2D alpha;\\nout vec4 outColor;\\n\\nvoid main() {\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n vec4 a = texture(alpha, vec2(outTex.x, outTex.y));\\n outColor = max(v, 0.0) + a * min(v, 0.0);\\n}\\n\";\n\nclass PReLU extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n Object.defineProperty(this, \"_compute\", {\n configurable: true,\n enumerable: true,\n writable: true,\n value: (0, _cwise.default)({\n args: ['array', 'array'],\n body: function (_x, alpha) {\n _x = Math.max(_x, 0) + alpha * Math.min(_x, 0);\n }\n })\n });\n this.layerClass = 'PReLU';\n this.params = ['alpha'];\n\n if (this.gpu) {\n this.program = _WebGL.webgl2.compileProgram(programSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.output = x;\n\n this._compute(this.output.tensor, this.weights['alpha'].tensor);\n }\n\n _callGPU(x) {\n if (!x.glTexture && !x.glTextureFragments) {\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], x.glTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n\n if (x.is1D) {\n this.output.is1D = x.is1D;\n } else if (x.is2DReshaped || x.is2DSquareReshaped) {\n if (x.is2DReshaped) {\n this.output.is2DReshaped = x.is2DReshaped;\n } else if (x.is2DSquareReshaped) {\n this.output.is2DSquareReshaped = x.is2DSquareReshaped;\n }\n\n this.output.originalShape = x.originalShape;\n this.output.indicesForReshaped = x.indicesForReshaped;\n }\n }\n\n _WebGL.webgl2.runProgram({\n program: this.program,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.weights['alpha'],\n name: 'alpha'\n }],\n supportsTextureFragments: true\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = PReLU;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst programSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform float alpha;\\nout vec4 outColor;\\n\\nvoid main() {\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n outColor = max(v, 0.0) + alpha * (exp(min(v, 0.0)) - 1.0);\\n}\\n\";\n\nclass ELU extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n\n _initialiseProps.call(this);\n\n this.layerClass = 'ELU';\n const {\n alpha = 1.0\n } = attrs;\n this.description = `alpha: ${alpha}`;\n this.alpha = alpha;\n\n if (this.gpu) {\n this.program = _WebGL.webgl2.compileProgram(programSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.output = x;\n\n this._compute(this.output.tensor, this.alpha);\n }\n\n _callGPU(x) {\n if (!x.glTexture && !x.glTextureFragments) {\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], x.glTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n\n if (x.is1D) {\n this.output.is1D = x.is1D;\n } else if (x.is2DReshaped || x.is2DSquareReshaped) {\n if (x.is2DReshaped) {\n this.output.is2DReshaped = x.is2DReshaped;\n } else if (x.is2DSquareReshaped) {\n this.output.is2DSquareReshaped = x.is2DSquareReshaped;\n }\n\n this.output.originalShape = x.originalShape;\n this.output.indicesForReshaped = x.indicesForReshaped;\n }\n }\n\n _WebGL.webgl2.runProgram({\n program: this.program,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: this.alpha,\n type: 'float',\n name: 'alpha'\n }],\n supportsTextureFragments: true\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = ELU;\n\nvar _initialiseProps = function () {\n Object.defineProperty(this, \"_compute\", {\n configurable: true,\n enumerable: true,\n writable: true,\n value: (0, _cwise.default)({\n args: ['array', 'scalar'],\n body: function (_x, alpha) {\n _x = Math.max(_x, 0) + alpha * (Math.exp(Math.min(_x, 0)) - 1);\n }\n })\n });\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst programSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform float theta;\\nout vec4 outColor;\\n\\nvoid main() {\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n outColor = v * float(greaterThan(v, vec4(theta)));\\n}\\n\";\n\nclass ThresholdedReLU extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n\n _initialiseProps.call(this);\n\n this.layerClass = 'ThresholdedReLU';\n const {\n theta = 1\n } = attrs;\n this.description = `theta: ${theta}`;\n this.theta = theta;\n\n if (this.gpu) {\n this.program = _WebGL.webgl2.compileProgram(programSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.output = x;\n\n this._compute(this.output.tensor, this.theta);\n }\n\n _callGPU(x) {\n if (!x.glTexture && !x.glTextureFragments) {\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], x.glTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n\n if (x.is1D) {\n this.output.is1D = x.is1D;\n } else if (x.is2DReshaped || x.is2DSquareReshaped) {\n if (x.is2DReshaped) {\n this.output.is2DReshaped = x.is2DReshaped;\n } else if (x.is2DSquareReshaped) {\n this.output.is2DSquareReshaped = x.is2DSquareReshaped;\n }\n\n this.output.originalShape = x.originalShape;\n this.output.indicesForReshaped = x.indicesForReshaped;\n }\n }\n\n _WebGL.webgl2.runProgram({\n program: this.program,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: this.theta,\n type: 'float',\n name: 'theta'\n }],\n supportsTextureFragments: true\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = ThresholdedReLU;\n\nvar _initialiseProps = function () {\n Object.defineProperty(this, \"_compute\", {\n configurable: true,\n enumerable: true,\n writable: true,\n value: (0, _cwise.default)({\n args: ['array', 'scalar'],\n body: function (_x, theta) {\n _x = _x * Number(_x > theta);\n }\n })\n });\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"LeakyReLU\", {\n enumerable: true,\n get: function () {\n return _LeakyReLU.default;\n }\n});\nObject.defineProperty(exports, \"PReLU\", {\n enumerable: true,\n get: function () {\n return _PReLU.default;\n }\n});\nObject.defineProperty(exports, \"ELU\", {\n enumerable: true,\n get: function () {\n return _ELU.default;\n }\n});\nObject.defineProperty(exports, \"ThresholdedReLU\", {\n enumerable: true,\n get: function () {\n return _ThresholdedReLU.default;\n }\n});\n\nvar _LeakyReLU = _interopRequireDefault(require(\"./LeakyReLU\"));\n\nvar _PReLU = _interopRequireDefault(require(\"./PReLU\"));\n\nvar _ELU = _interopRequireDefault(require(\"./ELU\"));\n\nvar _ThresholdedReLU = _interopRequireDefault(require(\"./ThresholdedReLU\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = add;\n\nvar _range2 = _interopRequireDefault(require(\"lodash/range\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction add(numInputs, shape) {\n const source = `#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs[${numInputs}];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${shape[0]}) * outTex.y);\n int out_x = int(float(${shape[1]}) * outTex.x);\n \n outColor = vec4(${(0, _range2.default)(numInputs).map(i => `texelFetch(inputs[${i}], ivec2(out_x, out_y), 0).r`).join(' + ')});\n}\n`;\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = average;\n\nvar _range2 = _interopRequireDefault(require(\"lodash/range\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction average(numInputs, shape) {\n const source = `#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs[${numInputs}];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${shape[0]}) * outTex.y);\n int out_x = int(float(${shape[1]}) * outTex.x);\n \n outColor = vec4((${(0, _range2.default)(numInputs).map(i => `texelFetch(inputs[${i}], ivec2(out_x, out_y), 0).r`).join(' + ')}) / float(${numInputs}));\n}\n`;\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = concatenate;\n\nvar _take2 = _interopRequireDefault(require(\"lodash/take\"));\n\nvar _sum2 = _interopRequireDefault(require(\"lodash/sum\"));\n\nvar _range2 = _interopRequireDefault(require(\"lodash/range\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction concatenate(numInputs, inputShapes, outputShape, concatAxis) {\n const dims = inputShapes.map(shape => shape[concatAxis]);\n const offsets = (0, _range2.default)(numInputs + 1).map(i => (0, _sum2.default)((0, _take2.default)(dims, i)));\n const outVar = concatAxis === 0 ? 'out_y' : 'out_x';\n let getOffset = `\n int n = 0;\n int offset = 0;\n if (${outVar} >= ${offsets[1]} && ${outVar} < ${offsets[2]}) {\n n = 1;\n offset = ${offsets[1]};\n }`;\n\n if (numInputs > 2) {\n getOffset += `${(0, _range2.default)(2, numInputs).map(i => ` else if (${outVar} >= ${offsets[i]} && ${outVar} < ${offsets[i + 1]}) {\n n = ${i};\n offset = ${offsets[i]};\n }`).join('')}\n`;\n }\n\n let outBlock = 'outColor = vec4(0.0);';\n\n if (concatAxis === 0 || concatAxis === 1) {\n const xCoord = i => `out_x${concatAxis === 1 ? ` - ${offsets[i]}` : ''}`;\n\n const yCoord = i => `out_y${concatAxis === 0 ? ` - ${offsets[i]}` : ''}`;\n\n outBlock = `\n if (n == 0) {\n outColor = vec4(texelFetch(inputs[0], ivec2(out_x, out_y), 0).r);\n }${(0, _range2.default)(1, numInputs).map(i => ` else if (n == ${i}) {\n outColor = vec4(texelFetch(inputs[${i}], ivec2(${xCoord(i)}, ${yCoord(i)}), 0).r);\n }`).join('')}\n`;\n }\n\n const source = `#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs[${numInputs}];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${outputShape[0]}) * outTex.y);\n int out_x = int(float(${outputShape[1]}) * outTex.x);\n${getOffset}\n${outBlock}\n}\n`;\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = maximum;\n\nfunction maximum(numInputs, shape) {\n const source = `#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs[${numInputs}];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${shape[0]}) * outTex.y);\n int out_x = int(float(${shape[1]}) * outTex.x);\n\n float val = texelFetch(inputs[0], ivec2(out_x, out_y), 0).r;\n for (int i = 1; i < ${numInputs}; i++) {\n val = max(val, texelFetch(inputs[i], ivec2(out_x, out_y), 0).r);\n }\n\n outColor = vec4(val);\n}\n`;\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = minimum;\n\nfunction minimum(numInputs, shape) {\n const source = `#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs[${numInputs}];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${shape[0]}) * outTex.y);\n int out_x = int(float(${shape[1]}) * outTex.x);\n\n float val = texelFetch(inputs[0], ivec2(out_x, out_y), 0).r;\n for (int i = 1; i < ${numInputs}; i++) {\n val = min(val, texelFetch(inputs[i], ivec2(out_x, out_y), 0).r);\n }\n\n outColor = vec4(val);\n}\n`;\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = multiply;\n\nvar _range2 = _interopRequireDefault(require(\"lodash/range\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction multiply(numInputs, shape) {\n const source = `#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs[${numInputs}];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${shape[0]}) * outTex.y);\n int out_x = int(float(${shape[1]}) * outTex.x);\n\n outColor = vec4(${(0, _range2.default)(numInputs).map(i => `texelFetch(inputs[${i}], ivec2(out_x, out_y), 0).r`).join(' * ')});\n}\n`;\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = subtract;\n\nfunction subtract(numInputs, shape) {\n const source = `#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D inputs[2];\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${shape[0]}) * outTex.y);\n int out_x = int(float(${shape[1]}) * outTex.x);\n \n outColor = vec4(texelFetch(inputs[0], ivec2(out_x, out_y), 0).r - texelFetch(inputs[1], ivec2(out_x, out_y), 0).r);\n}\n`;\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = conv2d;\n\nfunction conv2d(outputShape, inputShape, indexMapShape, useBias, hasFragments) {\n const addBias = useBias ? `sum += texelFetch(bias, ivec2(out_x, 0), 0).r;` : '';\n const adjustIndicesForFragments = hasFragments ? `int fragmentIndex = int(floor(float(rowIndex) / float(${inputShape[0]})));\n rowIndex = int(mod(float(rowIndex), float(${inputShape[0]})));\n colIndex += fragmentIndex * ${inputShape[1]};` : '';\n const source = `#version 300 es\nprecision highp float;\nprecision highp isampler2D;\n\nin vec2 outTex;\nuniform sampler2D x;\nuniform isampler2D indexMap;\nuniform sampler2D kernel;\nuniform sampler2D bias;\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${outputShape[0]}) * outTex.y);\n int out_x = int(float(${outputShape[1]}) * outTex.x);\n\n float sum = 0.;\n for (int i = 0; i < ${indexMapShape[1]}; ++i) {\n int index = texelFetch(indexMap, ivec2(i, out_y), 0).r; \n if (index != -1) {\n int rowIndex = int(floor(float(index) / float(${inputShape[1]})));\n int colIndex = int(mod(float(index), float(${inputShape[1]})));\n ${adjustIndicesForFragments}\n sum += texelFetch(x, ivec2(colIndex, rowIndex), 0).r * texelFetch(kernel, ivec2(out_x, i), 0).r;\n }\n }\n\n ${addBias}\n outColor = vec4(sum);\n} \n`;\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = conv2dTranspose;\n\nfunction conv2dTranspose(outputShape, inputShape, indexMapShape, useBias, hasFragments) {\n const addBias = useBias ? `sum += texelFetch(bias, ivec2(out_x, 0), 0).r;` : '';\n const adjustIndicesForFragments = hasFragments ? `int fragmentIndex = int(floor(float(rowIndex) / float(${inputShape[0]})));\n rowIndex = int(mod(float(rowIndex), float(${inputShape[0]})));\n colIndex += fragmentIndex * ${inputShape[1]};` : '';\n const source = `#version 300 es\nprecision highp float;\nprecision highp isampler2D;\n\nin vec2 outTex;\nuniform sampler2D matMulResult;\nuniform isampler2D indexMap;\nuniform sampler2D bias;\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${outputShape[0]}) * outTex.y);\n int out_x = int(float(${outputShape[1]}) * outTex.x);\n\n float sum = 0.;\n for (int n = 0; n < ${indexMapShape[1]}; ++n) {\n int index = texelFetch(indexMap, ivec2(n, out_y), 0).r;\n if (index != -1) {\n int rowIndex = int(floor(float(index) / float(${inputShape[1]})));\n int colIndex = int(mod(float(index), float(${inputShape[1]})));\n ${adjustIndicesForFragments}\n sum += texelFetch(matMulResult, ivec2(colIndex + out_x, rowIndex), 0).r;\n }\n }\n\n ${addBias}\n outColor = vec4(sum);\n} \n`;\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = cam;\n\nfunction cam(outputShape, numFeatures, weightsIs1D) {\n let source;\n\n if (weightsIs1D) {\n source = `#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D featureMaps;\nuniform sampler2D weights;\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${outputShape[0]}) * outTex.y);\n int out_x = int(float(${outputShape[1]}) * outTex.x);\n\n int featureMapsRow = out_x + ${outputShape[0]} * out_y;\n\n float sum = 0.;\n for (int k = 0; k < ${numFeatures}; ++k) {\n float f = texelFetch(featureMaps, ivec2(k, featureMapsRow), 0).r;\n float w = texelFetch(weights, ivec2(k, 0), 0).r;\n sum += f * w;\n }\n\n outColor = vec4(max(sum, 0.0));\n} \n`;\n } else {\n source = `#version 300 es\nprecision highp float;\n\nin vec2 outTex;\nuniform sampler2D featureMaps;\nuniform sampler2D weights;\nout vec4 outColor;\n\nvoid main() {\n int out_y = int(float(${outputShape[0]}) * outTex.y);\n int out_x = int(float(${outputShape[1]}) * outTex.x);\n\n float sum = 0.;\n for (int k = 0; k < ${numFeatures}; ++k) {\n float f = texelFetch(featureMaps, ivec2(k, out_y), 0).r;\n float w = texelFetch(weights, ivec2(out_x, k), 0).r;\n sum += f * w;\n }\n\n outColor = vec4(max(sum, 0.0));\n} \n`;\n }\n\n return source;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createGLSLProgram;\n\nvar _add = _interopRequireDefault(require(\"./merge/add\"));\n\nvar _average = _interopRequireDefault(require(\"./merge/average\"));\n\nvar _concatenate = _interopRequireDefault(require(\"./merge/concatenate\"));\n\nvar _maximum = _interopRequireDefault(require(\"./merge/maximum\"));\n\nvar _minimum = _interopRequireDefault(require(\"./merge/minimum\"));\n\nvar _multiply = _interopRequireDefault(require(\"./merge/multiply\"));\n\nvar _subtract = _interopRequireDefault(require(\"./merge/subtract\"));\n\nvar _conv2d = _interopRequireDefault(require(\"./convolutional/conv2d\"));\n\nvar _conv2dTranspose = _interopRequireDefault(require(\"./convolutional/conv2dTranspose\"));\n\nvar _cam = _interopRequireDefault(require(\"./visualizations/cam\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction createGLSLProgram(program, ...args) {\n switch (program) {\n case 'add':\n return (0, _add.default)(...args);\n\n case 'average':\n return (0, _average.default)(...args);\n\n case 'concatenate':\n return (0, _concatenate.default)(...args);\n\n case 'maximum':\n return (0, _maximum.default)(...args);\n\n case 'minimum':\n return (0, _minimum.default)(...args);\n\n case 'multiply':\n return (0, _multiply.default)(...args);\n\n case 'subtract':\n return (0, _subtract.default)(...args);\n\n case 'conv2d':\n return (0, _conv2d.default)(...args);\n\n case 'conv2dTranspose':\n return (0, _conv2dTranspose.default)(...args);\n\n case 'cam':\n return (0, _cam.default)(...args);\n\n default:\n throw new Error('GLSL program not found');\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.linear = exports.hard_sigmoid = exports.sigmoid = exports.tanh = exports.relu = exports.softsign = exports.softplus = exports.selu = exports.elu = exports.softmax = void 0;\nconst softmaxProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(x, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float maxval = 0.0;\\n for (int i = 0; i < int(size[0]); ++i) {\\n float val = texelFetch(x, ivec2(i, out_y), 0).r;\\n if (i == 0 || val > maxval) {\\n maxval = val;\\n }\\n }\\n\\n float sum = 0.0;\\n for (int i = 0; i < int(size[0]); ++i) {\\n float val = texelFetch(x, ivec2(i, out_y), 0).r;\\n sum += exp(val - maxval);\\n }\\n\\n outColor = exp(texture(x, vec2(outTex.x, outTex.y)) - maxval) / sum;\\n}\\n\";\nexports.softmax = softmaxProgramSource;\nconst eluProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n float alpha = 1.0;\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n outColor = max(v, 0.0) + alpha * (exp(min(v, 0.0)) - 1.0);\\n}\\n\";\nexports.elu = eluProgramSource;\nconst seluProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n float alpha = 1.6732632423543772848170429916717;\\n float scale = 1.0507009873554804934193349852946;\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n outColor = scale * (max(v, 0.0) + alpha * (exp(min(v, 0.0)) - 1.0));\\n}\\n\";\nexports.selu = seluProgramSource;\nconst softplusProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n outColor = log(1.0 + exp(texture(x, vec2(outTex.x, outTex.y))));\\n}\\n\";\nexports.softplus = softplusProgramSource;\nconst softsignProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n v /= 1.0 + abs(v);\\n outColor = v;\\n}\\n\";\nexports.softsign = softsignProgramSource;\nconst reluProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n outColor = max(v, 0.0);\\n}\\n\";\nexports.relu = reluProgramSource;\nconst tanhProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n outColor = tanh(v);\\n}\\n\";\nexports.tanh = tanhProgramSource;\nconst sigmoidProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n outColor = 1.0 / (1.0 + exp(-1.0 * texture(x, vec2(outTex.x, outTex.y))));\\n}\\n\";\nexports.sigmoid = sigmoidProgramSource;\nconst hardSigmoidProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n vec4 v = texture(x, vec2(outTex.x, outTex.y));\\n v = v * 0.2 + 0.5;\\n v = max(v, 0.0);\\n v = min(v, 1.0);\\n outColor = v;\\n}\\n\";\nexports.hard_sigmoid = hardSigmoidProgramSource;\nconst linearProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n outColor = texture(x, vec2(outTex.x, outTex.y));\\n}\\n\";\nexports.linear = linearProgramSource;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _Conv2D = _interopRequireDefault(require(\"./Conv2D\"));\n\nvar tensorUtils = _interopRequireWildcard(require(\"../../utils/tensorUtils\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _ndarraySqueeze = _interopRequireDefault(require(\"ndarray-squeeze\"));\n\nvar _ndarrayUnsqueeze = _interopRequireDefault(require(\"ndarray-unsqueeze\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Conv1D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Conv1D';\n const {\n filters = 1,\n kernel_size = 1,\n strides = 1,\n padding = 'valid',\n dilation_rate = 1,\n activation = 'linear',\n use_bias = true\n } = attrs;\n this.description = `${filters} filters of size ${kernel_size}, striding ${strides}`;\n this.description += padding === 'valid' ? `, no border padding` : ', pad to same borders';\n this.description += dilation_rate > 1 ? `, dilation rate ${dilation_rate}` : '';\n this.description += activation !== 'linear' ? `, ${activation} activation` : '';\n\n if (padding !== 'valid' && padding !== 'same') {\n this.throwError('Invalid padding.');\n }\n\n if (dilation_rate !== 1 && strides !== 1) {\n this.throwError('Incompatible combination of dilation_rate with strides.');\n }\n\n this.use_bias = use_bias;\n this.params = this.use_bias ? ['kernel', 'bias'] : ['kernel'];\n const conv2dAttrs = {\n filters,\n kernel_size: [kernel_size, 1],\n strides: [strides, 1],\n padding,\n data_format: 'channels_first',\n dilation_rate,\n activation,\n use_bias\n };\n this._conv2dAttrs = conv2dAttrs;\n this._conv2d = new _Conv2D.default(Object.assign(conv2dAttrs, {\n gpu: attrs.gpu\n }));\n }\n\n setWeights(weightsArr) {\n weightsArr[0].tensor = (0, _ndarrayUnsqueeze.default)(weightsArr[0].tensor).transpose(2, 1, 0, 3);\n\n this._conv2d.setWeights(weightsArr);\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n const input = new _Tensor.default(x.tensor.data, x.tensor.shape);\n input.tensor = (0, _ndarrayUnsqueeze.default)(input.tensor).transpose(0, 2, 1);\n\n const conv2dOutput = this._conv2d.call(input);\n\n this.outputShape = [0, 2].map(i => this._conv2d.outputShape[i]);\n this.output = new _Tensor.default([], this.outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor, (0, _ndarraySqueeze.default)(conv2dOutput.tensor).transpose(1, 0, 2));\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const inputShape = x.tensor.shape;\n const input = new _Tensor.default([], inputShape);\n Object.assign(input, x);\n input.glTextureShape = inputShape;\n input.is2DReshaped = true;\n input.originalShape = [inputShape[0], 1, inputShape[1]];\n input.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(input.originalShape, false, -1);\n this.output = this._conv2d.call(input);\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = Conv1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar activations = _interopRequireWildcard(require(\"../../activations\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar tensorUtils = _interopRequireWildcard(require(\"../../utils/tensorUtils\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _ndarrayGemm = _interopRequireDefault(require(\"ndarray-gemm\"));\n\nvar _Conv2D = _interopRequireDefault(require(\"./Conv2D\"));\n\nvar activationProgramSources = _interopRequireWildcard(require(\"../../activations/programSources\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass _DepthwiseConv2D extends _Conv2D.default {\n constructor(attrs = {}) {\n super(attrs);\n }\n\n _calcOutputShape(inputShape) {\n super._calcOutputShape(inputShape);\n\n const nbFilter = this.kernelShape[0];\n const inputChannels = inputShape[2];\n this.outputShape[2] = nbFilter * inputChannels;\n }\n\n _im2col(x) {\n const [inputRows, inputCols, inputChannels] = x.tensor.shape;\n const nbRow = this.kernelShape[1];\n const nbCol = this.kernelShape[2];\n const outputRows = this.outputShape[0];\n const outputCols = this.outputShape[1];\n const nbPatches = outputRows * outputCols;\n const patchLen = nbRow * nbCol;\n\n if (!this.imColsMat) {\n this.imColsMat = new _Tensor.default([], [nbPatches * inputChannels, patchLen]);\n }\n\n let patch = new _Tensor.default([], [nbRow, nbCol, 1]);\n let offset = 0;\n\n for (let c = 0; c < inputChannels; c++) {\n for (let i = 0, limit = inputRows - nbRow; i <= limit; i += this.strides[0]) {\n for (let j = 0, limit = inputCols - nbCol; j <= limit; j += this.strides[1]) {\n _ndarrayOps.default.assign(patch.tensor, x.tensor.hi(i + nbRow, j + nbCol, c + 1).lo(i, j, c));\n\n this.imColsMat.tensor.data.set(patch.tensor.data, offset);\n offset += patchLen;\n }\n }\n }\n\n return this.imColsMat;\n }\n\n _w2row() {\n const inputChannels = this.weights['kernel'].tensor.shape[2];\n const [nbFilter, nbRow, nbCol] = this.kernelShape;\n const patchLen = nbRow * nbCol;\n this.wRowsMat = new _Tensor.default([], [patchLen, nbFilter * inputChannels]);\n let patch = new _Tensor.default([], [nbRow, nbCol]);\n let patchRaveled = new _Tensor.default([], [patchLen]);\n let p = 0;\n\n for (let c = 0; c < inputChannels; c++) {\n for (let n = 0; n < nbFilter; n++) {\n _ndarrayOps.default.assign(patch.tensor, this.weights['kernel'].tensor.pick(null, null, c, n));\n\n patchRaveled.replaceTensorData(patch.tensor.data);\n\n _ndarrayOps.default.assign(this.wRowsMat.tensor.pick(null, p), patchRaveled.tensor);\n\n p += 1;\n }\n }\n\n return this.wRowsMat;\n }\n\n _callCPU(x) {\n this.inputShape = x.tensor.shape;\n\n this._calcOutputShape(this.inputShape);\n\n x = this._padInput(x);\n\n this._im2col(x);\n\n const nbFilter = this.kernelShape[0];\n const outputRows = this.outputShape[0];\n const outputCols = this.outputShape[1];\n const nbPatches = outputRows * outputCols;\n const inputChannels = this.inputShape[2];\n const matMul = new _Tensor.default([], [nbPatches * inputChannels, nbFilter * inputChannels]);\n (0, _ndarrayGemm.default)(matMul.tensor, this.imColsMat.tensor, this.wRowsMat.tensor, 1, 1);\n this.output = new _Tensor.default([], this.outputShape);\n const outputDataLength = outputRows * outputCols * nbFilter * inputChannels;\n let dataFiltered = new Float32Array(outputDataLength);\n\n for (let c = 0; c < inputChannels; c++) {\n for (let n = c * outputDataLength + c * nbFilter; n < (c + 1) * outputDataLength; n += nbFilter * inputChannels) {\n for (let m = 0; m < nbFilter; m++) {\n dataFiltered[n + m - c * outputDataLength] = matMul.tensor.data[n + m];\n }\n }\n }\n\n this.output.replaceTensorData(dataFiltered);\n }\n\n _createIndexMap(indicesForReshaped) {\n if (this.indexMap) {\n return;\n }\n\n let [inputRows, inputCols, inputChannels] = this.inputShape;\n let indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n\n if (this.padding === 'same') {\n const [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter] = this.inputPadding;\n inputRows = inputRows + paddingRowBefore + paddingRowAfter;\n inputCols = inputCols + paddingColBefore + paddingColAfter;\n const padValue = -1;\n indices = this._padInput(indices, padValue);\n }\n\n const nbRow = this.kernelShape[1];\n const nbCol = this.kernelShape[2];\n const outputRows = this.outputShape[0];\n const outputCols = this.outputShape[1];\n const nbPatches = outputRows * outputCols;\n const patchLen = nbRow * nbCol;\n this.indexMap = new _Tensor.default([], [nbPatches * inputChannels, patchLen], {\n type: Int32Array\n });\n const indicesPatch = new _Tensor.default([], [nbRow, nbCol, 1]);\n let offset = 0;\n\n for (let c = 0; c < inputChannels; c++) {\n for (let i = 0, limit = inputRows - nbRow; i <= limit; i += this.strides[0]) {\n for (let j = 0, limit = inputCols - nbCol; j <= limit; j += this.strides[1]) {\n _ndarrayOps.default.assign(indicesPatch.tensor, indices.tensor.hi(i + nbRow, j + nbCol, c + 1).lo(i, j, c));\n\n this.indexMap.tensor.data.set(indicesPatch.tensor.data, offset);\n offset += patchLen;\n }\n }\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int',\n supportsTextureFragments: true\n });\n }\n\n _createOutputReshapeIndexMap() {\n if (this.reshapeIndexMap) {\n return;\n }\n\n const nbFilter = this.kernelShape[0];\n const reshape = [this.outputShape[0] * this.outputShape[1], this.outputShape[2]];\n const reshapeRowIndices = new _Tensor.default([], reshape, {\n type: Int32Array\n });\n const reshapeColIndices = new _Tensor.default([], reshape, {\n type: Int32Array\n });\n this.reshapeIndexMap = new _Tensor.default([], reshape, {\n type: Int32Array\n });\n\n for (let j = 0; j < reshape[1]; j++) {\n for (let i = 0; i < reshape[0]; i++) {\n _ndarrayOps.default.assigns(reshapeRowIndices.tensor.pick(i, j), i + Math.floor(j / nbFilter) * reshape[0]);\n }\n }\n\n for (let j = 0; j < reshape[1]; j++) {\n _ndarrayOps.default.assigns(reshapeColIndices.tensor.pick(null, j), j);\n }\n\n _ndarrayOps.default.muls(this.reshapeIndexMap.tensor, reshapeRowIndices.tensor, reshape[1]);\n\n _ndarrayOps.default.addeq(this.reshapeIndexMap.tensor, reshapeColIndices.tensor);\n\n this.reshapeIndexMap.createGLTexture({\n type: '2d',\n format: 'int',\n supportsTextureFragments: true\n });\n }\n\n _callGPU(x) {\n super._callGPU(x);\n\n this._createOutputReshapeIndexMap();\n\n if (!this.outputReshaped) {\n const reshape = [this.outputShape[0] * this.outputShape[1], this.outputShape[2]];\n this.outputReshaped = new _Tensor.default([], reshape);\n this.outputReshaped.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.outputReshaped.is2DReshaped = true;\n this.outputReshaped.originalShape = this.outputShape;\n this.outputReshaped.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.outputShape, false, -1);\n }\n\n if (this.output.glTextureFragments) {\n this.output.convert2DRowFragmentedGLTextureToColStack();\n }\n\n _WebGL.webgl2.runProgram({\n program: this.output.glTextureFragments ? this.mapInputFragmentsProgram : this.mapInputProgram,\n output: this.outputReshaped,\n inputs: [{\n input: this.output,\n name: 'x'\n }, {\n input: this.reshapeIndexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: this.output.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }],\n supportsTextureFragments: true\n });\n\n if (this.output.glTextureFragments) {\n this.output.removeGLTextureFragmentsAsColStack();\n }\n }\n\n}\n\nclass SeparableConv2D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'SeparableConv2D';\n const {\n filters = 1,\n kernel_size = [1, 1],\n strides = [1, 1],\n padding = 'valid',\n data_format = 'channels_last',\n depth_multiplier = 1,\n activation = 'linear',\n use_bias = true\n } = attrs;\n\n if (Array.isArray(kernel_size)) {\n this.kernelShape = [filters, ...kernel_size];\n } else {\n this.kernelShape = [filters, kernel_size, kernel_size];\n }\n\n if (Array.isArray(strides)) {\n this.strides = strides;\n } else {\n this.strides = [strides, strides];\n }\n\n if (padding === 'valid' || padding === 'same') {\n this.padding = padding;\n } else {\n this.throwError('Invalid padding.');\n }\n\n if (data_format === 'channels_last' || data_format === 'channels_first') {\n this.dataFormat = data_format;\n } else {\n this.throwError('Only channels_last and channels_first data formats are allowed.');\n }\n\n this.activation = activation;\n this.activationFunc = activations[activation];\n\n if (padding === 'valid' || padding === 'same') {\n this.padding = padding;\n } else {\n this.throwError('Invalid padding.');\n }\n\n this.useBias = use_bias;\n this.params = this.useBias ? ['depthwise_kernel', 'pointwise_kernel', 'bias'] : ['depthwise_kernel', 'pointwise_kernel'];\n this.depthwiseConvAttrs = {\n filters: depth_multiplier,\n kernel_size: [this.kernelShape[1], this.kernelShape[2]],\n strides: this.strides,\n padding,\n data_format,\n activation: 'linear',\n use_bias: false,\n gpu: attrs.gpu\n };\n this.pointwiseConvAttrs = {\n filters,\n kernel_size: [1, 1],\n strides: [1, 1],\n padding,\n data_format,\n activation: 'linear',\n use_bias,\n gpu: attrs.gpu\n };\n this.description = `${this.kernelShape[0]} ${this.kernelShape.slice(1).join('x')} filters`;\n this.description += this.strides.some(s => s > 1) ? `, ${this.strides.join('x')} striding` : '';\n this.description += this.padding === 'valid' ? `, no border padding` : ', pad to same borders';\n this.description += depth_multiplier > 1 ? `, depth multiplier: ${depth_multiplier}` : '';\n this.description += this.activation !== 'linear' ? `, ${this.activation} activation` : '';\n\n if (this.gpu) {\n this.activationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.activation]);\n }\n }\n\n setWeights(weightsArr) {\n this._depthwiseConv = new _DepthwiseConv2D(this.depthwiseConvAttrs);\n\n this._depthwiseConv.setWeights(weightsArr.slice(0, 1));\n\n this._pointwiseConv = new _Conv2D.default(this.pointwiseConvAttrs);\n\n this._pointwiseConv.setWeights(weightsArr.slice(1, 3));\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this._depthwiseConv._callCPU(x);\n\n this._pointwiseConv._callCPU(this._depthwiseConv.output);\n\n this.output = this._pointwiseConv.output;\n this.activationFunc(this.output);\n }\n\n _callGPU(x) {\n this._depthwiseConv.outbound = [null];\n this._pointwiseConv.outbound = [null];\n\n this._depthwiseConv._callGPU(x);\n\n this._pointwiseConv._callGPU(this._depthwiseConv.outputReshaped);\n\n if (this.activation === 'linear') {\n this.output = this._pointwiseConv.output;\n } else {\n if (!this.output) {\n this.output = new _Tensor.default([], this._pointwiseConv.output.glTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.output.is2DReshaped = true;\n this.output.originalShape = this._pointwiseConv.output.originalShape;\n this.output.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this._pointwiseConv.output.originalShape, false, -1);\n }\n\n this.outputPreactiv = this._pointwiseConv.output;\n\n _WebGL.webgl2.runProgram({\n program: this.activationProgram,\n output: this.output,\n inputs: [{\n input: this.outputPreactiv,\n name: 'x'\n }],\n supportsTextureFragments: true\n });\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n this.output.reshapeFrom2D();\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n }\n\n}\n\nexports.default = SeparableConv2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar activations = _interopRequireWildcard(require(\"../../activations\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar tensorUtils = _interopRequireWildcard(require(\"../../utils/tensorUtils\"));\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _ndarrayGemm = _interopRequireDefault(require(\"ndarray-gemm\"));\n\nvar activationProgramSources = _interopRequireWildcard(require(\"../../activations/programSources\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst matMulProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D A;\\nuniform sampler2D B;\\nuniform sampler2D C;\\nuniform bool addC;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 A_size = textureSize(A, 0);\\n ivec2 B_size = textureSize(B, 0);\\n int out_x = int(float(B_size[0]) * outTex.x);\\n int out_y = int(float(A_size[1]) * outTex.y);\\n int commonDim = A_size[0];\\n\\n float sum = 0.;\\n for (int i = 0; i < commonDim; ++i) {\\n float a = texelFetch(A, ivec2(i, out_y), 0).r;\\n float b = texelFetch(B, ivec2(out_x, i), 0).r;\\n sum += a * b;\\n }\\n\\n if (addC) {\\n sum += texelFetch(C, ivec2(out_x, 0), 0).r;\\n }\\n\\n outColor = vec4(sum);\\n}\\n\";\nconst assignToRowIndicesMap = (0, _cwise.default)({\n args: [{\n blockIndices: -1\n }, 'scalar', 'scalar'],\n body: function (x, rowIndex, size) {\n for (let i = 0; i < size; i++) {\n if (x[i] === -1) {\n x[i] = rowIndex;\n break;\n }\n }\n }\n});\nconst assignToColIndicesMap = (0, _cwise.default)({\n args: [{\n blockIndices: -1\n }, 'array', 'scalar'],\n body: function (x, colIndex, size) {\n for (let i = 0; i < size; i++) {\n if (x[i] === -1) {\n x[i] = colIndex;\n break;\n }\n }\n }\n});\n\nclass Conv2DTranspose extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Conv2DTranspose';\n const {\n filters = 1,\n kernel_size = [3, 3],\n strides = [1, 1],\n padding = 'valid',\n data_format = 'channels_last',\n activation = 'linear',\n use_bias = true\n } = attrs;\n\n if (Array.isArray(kernel_size)) {\n this.kernelShape = [filters, ...kernel_size];\n } else {\n this.kernelShape = [filters, kernel_size, kernel_size];\n }\n\n if (Array.isArray(strides)) {\n this.strides = strides;\n } else {\n this.strides = [strides, strides];\n }\n\n if (padding === 'valid' || padding === 'same') {\n this.padding = padding;\n } else {\n this.throwError('Invalid padding.');\n }\n\n if (data_format === 'channels_last' || data_format === 'channels_first') {\n this.dataFormat = data_format;\n } else {\n this.throwError('Only channels_last and channels_first data formats are allowed.');\n }\n\n this.activation = activation;\n this.activationFunc = activations[activation];\n this.useBias = use_bias;\n this.params = this.useBias ? ['kernel', 'bias'] : ['kernel'];\n this.description = `${this.kernelShape[0]} ${this.kernelShape.slice(1).join('x')} filters`;\n this.description += this.strides.some(s => s > 1) ? `, ${this.strides.join('x')} striding` : '';\n this.description += this.padding === 'valid' ? `, no border padding` : ', pad to same borders';\n this.description += this.activation !== 'linear' ? `, ${this.activation} activation` : '';\n\n if (this.gpu) {\n this.matMulProgram = _WebGL.webgl2.compileProgram(matMulProgramSource);\n this.activationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.activation]);\n }\n }\n\n setWeights(weightsArr) {\n if (this.dataFormat === 'channels_first') {\n weightsArr[0].tensor = weightsArr[0].tensor.transpose(2, 3, 1, 0);\n }\n\n super.setWeights(weightsArr, false);\n\n this._w2row();\n\n if (this.gpu) {\n this.weights['kernel'] = this.wRowsMat;\n this.weights['kernel'].createGLTexture({\n type: '2d',\n format: 'float'\n });\n\n if (this.useBias) {\n this.weights['bias'].createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _calcOutputShape(inputShape) {\n if (this.outputShape && this.outputPadding) {\n return;\n }\n\n const inputRows = inputShape[0];\n const inputCols = inputShape[1];\n const [nbFilter, nbRow, nbCol] = this.kernelShape;\n const outputRows = this.padding === 'same' ? inputRows * this.strides[0] : inputRows * this.strides[0] + Math.max(nbRow - this.strides[0], 0);\n const outputCols = this.padding === 'same' ? inputCols * this.strides[1] : inputCols * this.strides[1] + Math.max(nbCol - this.strides[1], 0);\n const outputChannels = nbFilter;\n const paddingRow = this.padding === 'same' ? Math.max(0, Math.floor((inputRows - 1) * this.strides[0] + nbRow - outputRows)) : 0;\n const paddingCol = this.padding === 'same' ? Math.max(0, Math.floor((inputCols - 1) * this.strides[1] + nbCol - outputCols)) : 0;\n const paddingRowBefore = Math.floor(paddingRow / 2);\n const paddingRowAfter = paddingRow - paddingRowBefore;\n const paddingColBefore = Math.floor(paddingCol / 2);\n const paddingColAfter = paddingCol - paddingColBefore;\n this.outputShape = [outputRows, outputCols, outputChannels];\n this.outputPadding = [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter];\n }\n\n _im2col(x) {\n const [inputRows, inputCols, inputChannels] = x.tensor.shape;\n\n if (!this.imColsMat) {\n this.imColsMat = new _Tensor.default([], [inputRows * inputCols, inputChannels]);\n }\n\n const channelRaveled = new _Tensor.default([], [inputRows * inputCols]);\n const channel = new _Tensor.default([], [inputRows, inputCols]);\n\n for (let c = 0; c < inputChannels; c++) {\n _ndarrayOps.default.assign(channel.tensor, x.tensor.pick(null, null, c));\n\n channelRaveled.replaceTensorData(channel.tensor.data);\n\n _ndarrayOps.default.assign(this.imColsMat.tensor.pick(null, c), channelRaveled.tensor);\n }\n\n return this.imColsMat;\n }\n\n _w2row() {\n const [nbRow, nbCol, nbFilter, inputChannels] = this.weights['kernel'].tensor.shape;\n this.wRowsMat = new _Tensor.default([], [inputChannels, nbRow * nbCol * nbFilter]);\n const channelRaveled = new _Tensor.default([], [nbRow * nbCol * nbFilter]);\n const channel = new _Tensor.default([], [nbRow, nbCol, nbFilter]);\n\n for (let c = 0; c < inputChannels; c++) {\n _ndarrayOps.default.assign(channel.tensor, this.weights['kernel'].tensor.pick(null, null, null, c));\n\n channelRaveled.replaceTensorData(channel.tensor.data);\n\n _ndarrayOps.default.assign(this.wRowsMat.tensor.pick(c, null), channelRaveled.tensor);\n }\n\n return this.wRowsMat;\n }\n\n _callCPU(x) {\n this.inputShape = x.tensor.shape;\n\n this._calcOutputShape(this.inputShape);\n\n this._im2col(x);\n\n const inputRows = x.tensor.shape[0];\n const inputCols = x.tensor.shape[1];\n const [nbFilter, nbRow, nbCol] = this.kernelShape;\n const matMul = new _Tensor.default([], [inputRows * inputCols, nbRow * nbCol * nbFilter]);\n (0, _ndarrayGemm.default)(matMul.tensor, this.imColsMat.tensor, this.wRowsMat.tensor, 1, 1);\n const [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter] = this.outputPadding;\n this.output = new _Tensor.default([], this.outputShape);\n let outputPadded = new _Tensor.default([], [this.outputShape[0] + paddingRowBefore + paddingRowAfter, this.outputShape[1] + paddingColBefore + paddingColAfter, this.outputShape[2]]);\n const patchShape = [nbRow, nbCol, nbFilter];\n let patch = new _Tensor.default([], patchShape);\n let patchRaveled = new _Tensor.default([], [nbRow * nbCol * nbFilter]);\n let index = 0;\n\n for (let i = 0; i < inputRows; i++) {\n for (let j = 0; j < inputCols; j++) {\n _ndarrayOps.default.assign(patchRaveled.tensor, matMul.tensor.pick(index, null));\n\n patch.replaceTensorData(patchRaveled.tensor.data);\n const iOutPos = i * this.strides[0];\n const jOutPos = j * this.strides[1];\n\n _ndarrayOps.default.addeq(outputPadded.tensor.hi(iOutPos + nbRow, jOutPos + nbCol, this.outputShape[2]).lo(iOutPos, jOutPos, 0), patch.tensor);\n\n index += 1;\n }\n }\n\n _ndarrayOps.default.assign(this.output.tensor, outputPadded.tensor.hi(this.outputShape[0] + paddingRowBefore, this.outputShape[1] + paddingColBefore, this.outputShape[2]).lo(paddingRowBefore, paddingColBefore, 0));\n\n if (this.useBias) {\n for (let n = 0; n < nbFilter; n++) {\n _ndarrayOps.default.addseq(this.output.tensor.pick(null, null, n), this.weights['bias'].tensor.get(n));\n }\n }\n\n this.activationFunc(this.output);\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n\n _createIndexMap() {\n if (this.indexMap) {\n return;\n }\n\n const inputRows = this.inputShape[0];\n const inputCols = this.inputShape[1];\n const [nbFilter, nbRow, nbCol] = this.kernelShape;\n const [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter] = this.outputPadding;\n const effectiveKernelSize = (nbRow - this.strides[0] + 1) * (nbCol - this.strides[1] + 1);\n const indicesMapShape = [this.outputShape[0], this.outputShape[1], effectiveKernelSize];\n const indicesMapShapePadded = [this.outputShape[0] + paddingRowBefore + paddingRowAfter, this.outputShape[1] + paddingColBefore + paddingColAfter, effectiveKernelSize];\n const outputRowIndicesMap = new _Tensor.default([], indicesMapShape, {\n type: Int32Array\n });\n const outputColIndicesMap = new _Tensor.default([], indicesMapShape, {\n type: Int32Array\n });\n const outputRowIndicesMapPadded = new _Tensor.default([], indicesMapShapePadded, {\n type: Int32Array\n });\n const outputColIndicesMapPadded = new _Tensor.default([], indicesMapShapePadded, {\n type: Int32Array\n });\n\n _ndarrayOps.default.assigns(outputRowIndicesMap.tensor, -1);\n\n _ndarrayOps.default.assigns(outputColIndicesMap.tensor, -1);\n\n _ndarrayOps.default.assigns(outputRowIndicesMapPadded.tensor, -1);\n\n _ndarrayOps.default.assigns(outputColIndicesMapPadded.tensor, -1);\n\n const matMulColIndicesPatch = new _Tensor.default([], [nbRow, nbCol, nbFilter], {\n type: Int32Array\n });\n\n for (let i = 0; i < nbRow * nbCol * nbFilter; i++) {\n matMulColIndicesPatch.tensor.data[i] = i;\n }\n\n for (let i = 0; i < inputRows; i++) {\n for (let j = 0; j < inputCols; j++) {\n const matMulRowIndex = i * inputCols + j;\n const iOutPos = i * this.strides[0];\n const jOutPos = j * this.strides[1];\n assignToRowIndicesMap(outputRowIndicesMapPadded.tensor.hi(iOutPos + nbRow, jOutPos + nbCol, effectiveKernelSize).lo(iOutPos, jOutPos, 0), matMulRowIndex, effectiveKernelSize);\n assignToColIndicesMap(outputColIndicesMapPadded.tensor.hi(iOutPos + nbRow, jOutPos + nbCol, effectiveKernelSize).lo(iOutPos, jOutPos, 0), matMulColIndicesPatch.tensor.pick(null, null, 0), effectiveKernelSize);\n }\n }\n\n _ndarrayOps.default.assign(outputRowIndicesMap.tensor, outputRowIndicesMapPadded.tensor.hi(this.outputShape[0] + paddingRowBefore, this.outputShape[1] + paddingColBefore, effectiveKernelSize).lo(paddingRowBefore, paddingColBefore, 0));\n\n _ndarrayOps.default.assign(outputColIndicesMap.tensor, outputColIndicesMapPadded.tensor.hi(this.outputShape[0] + paddingRowBefore, this.outputShape[1] + paddingColBefore, effectiveKernelSize).lo(paddingRowBefore, paddingColBefore, 0));\n\n const tiledIndicesMapShape = [this.outputShape[0] * this.outputShape[1], effectiveKernelSize];\n this.indexMap = new _Tensor.default([], tiledIndicesMapShape, {\n type: Int32Array\n });\n const channelData = new _Tensor.default([], [effectiveKernelSize], {\n type: Int32Array\n });\n\n for (let i = 0; i < this.outputShape[0]; i++) {\n for (let j = 0; j < this.outputShape[1]; j++) {\n for (let k = 0; k < effectiveKernelSize; k++) {\n const rowIndex = outputRowIndicesMap.tensor.get(i, j, k);\n const colIndex = outputColIndicesMap.tensor.get(i, j, k);\n\n if (rowIndex !== -1 && colIndex !== -1) {\n channelData.tensor.set(k, rowIndex * this.weights['kernel'].glTextureShape[1] + colIndex);\n } else {\n channelData.tensor.set(k, -1);\n }\n }\n\n _ndarrayOps.default.assign(this.indexMap.tensor.pick(i * this.outputShape[1] + j, null), channelData.tensor);\n }\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int',\n supportsTextureFragments: true\n });\n }\n\n _callGPU(x) {\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n\n this._calcOutputShape(this.inputShape);\n } else {\n this.inputShape = x.tensor.shape;\n\n this._calcOutputShape(this.inputShape);\n\n this._im2col(x);\n\n this.imColsMat.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n const input = x.is2DReshaped || x.is2DSquareReshaped ? x : this.imColsMat;\n\n if (!this.matMulResult) {\n const outputTextureShape = [input.glTextureShape[0], this.weights['kernel'].glTextureShape[1]];\n this.matMulResult = new _Tensor.default([], outputTextureShape);\n this.matMulResult.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n if (this.activation !== 'linear' && !this.outputPreactiv) {\n const outputTextureShape = [this.outputShape[0] * this.outputShape[1], this.outputShape[2]];\n this.outputPreactiv = new _Tensor.default([], outputTextureShape);\n this.outputPreactiv.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.outputPreactiv.is2DReshaped = true;\n this.outputPreactiv.originalShape = this.outputShape;\n this.outputPreactiv.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.outputShape, false, -1);\n }\n\n if (!this.output) {\n const outputTextureShape = [this.outputShape[0] * this.outputShape[1], this.outputShape[2]];\n this.output = new _Tensor.default([], outputTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.output.is2DReshaped = true;\n this.output.originalShape = this.outputShape;\n this.output.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.outputShape, false, -1);\n }\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.matMulResult,\n inputs: [{\n input: input,\n name: 'A'\n }, {\n input: this.weights['kernel'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }],\n supportsTextureFragments: true\n });\n\n this._createIndexMap();\n\n const hasFragments = Boolean(this.matMulResult.glTextureFragments);\n\n if (hasFragments) {\n this.matMulResult.convert2DRowFragmentedGLTextureToColStack();\n }\n\n if (!this.convTransposeProgram) {\n const convTransposeProgramSource = (0, _createGLSLProgram.default)('conv2dTranspose', this.output.glTextureFragmentShape ? this.output.glTextureFragmentShape : this.output.glTextureShape, this.matMulResult.glTextureFragmentShape ? this.matMulResult.glTextureFragmentShape : this.matMulResult.glTextureShape, this.indexMap.glTextureFragmentShape ? this.indexMap.glTextureFragmentShape : this.indexMap.glTextureShape, this.useBias, hasFragments);\n this.convTransposeProgram = _WebGL.webgl2.compileProgram(convTransposeProgramSource);\n }\n\n _WebGL.webgl2.runProgram({\n program: this.convTransposeProgram,\n output: this.activation === 'linear' ? this.output : this.outputPreactiv,\n inputs: [{\n input: this.matMulResult,\n name: 'matMulResult'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }, ...(this.useBias ? [{\n input: this.weights['bias'],\n name: 'bias'\n }] : [])],\n supportsTextureFragments: true\n });\n\n if (hasFragments) {\n this.matMulResult.removeGLTextureFragmentsAsColStack();\n }\n\n if (this.activation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.activationProgram,\n output: this.output,\n inputs: [{\n input: this.outputPreactiv,\n name: 'x'\n }],\n supportsTextureFragments: true\n });\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n this.output.reshapeFrom2D();\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n }\n\n}\n\nexports.default = Conv2DTranspose;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar activations = _interopRequireWildcard(require(\"../../activations\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar tensorUtils = _interopRequireWildcard(require(\"../../utils/tensorUtils\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _ndarrayGemm = _interopRequireDefault(require(\"ndarray-gemm\"));\n\nvar activationProgramSources = _interopRequireWildcard(require(\"../../activations/programSources\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\nconst mapInputFragmentsProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 inputSize = textureSize(x, 0);\\n ivec2 outputSize = textureSize(indexMap, 0);\\n int out_x = int(float(outputSize[0]) * outTex.x);\\n int out_y = int(float(outputSize[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n int fragmentIndex = int(floor(float(rowIndex) / float(inputSize[1])));\\n rowIndex = int(mod(float(rowIndex), float(inputSize[1])));\\n colIndex = fragmentIndex * inputCols + colIndex;\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\nconst matMulProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D A;\\nuniform sampler2D B;\\nuniform sampler2D C;\\nuniform bool addC;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 A_size = textureSize(A, 0);\\n ivec2 B_size = textureSize(B, 0);\\n int out_x = int(float(B_size[0]) * outTex.x);\\n int out_y = int(float(A_size[1]) * outTex.y);\\n int commonDim = A_size[0];\\n\\n float sum = 0.;\\n for (int i = 0; i < commonDim; ++i) {\\n float a = texelFetch(A, ivec2(i, out_y), 0).r;\\n float b = texelFetch(B, ivec2(out_x, i), 0).r;\\n sum += a * b;\\n }\\n\\n if (addC) {\\n sum += texelFetch(C, ivec2(out_x, 0), 0).r;\\n }\\n\\n outColor = vec4(sum);\\n}\\n\";\n\nclass Conv3D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Conv3D';\n const {\n filters = 1,\n kernel_size = [1, 1, 1],\n strides = [1, 1, 1],\n padding = 'valid',\n data_format = 'channels_last',\n dilation_rate = [1, 1, 1],\n activation = 'linear',\n use_bias = true\n } = attrs;\n\n if (Array.isArray(kernel_size)) {\n this.kernelShape = [filters, ...kernel_size];\n } else {\n this.kernelShape = [filters, kernel_size, kernel_size, kernel_size];\n }\n\n if (Array.isArray(strides)) {\n this.strides = strides;\n } else {\n this.strides = [strides, strides, strides];\n }\n\n if (padding === 'valid' || padding === 'same') {\n this.padding = padding;\n } else {\n this.throwError('Invalid padding.');\n }\n\n if (data_format === 'channels_last' || data_format === 'channels_first') {\n this.dataFormat = data_format;\n } else {\n this.throwError('Only channels_last and channels_first data formats are allowed.');\n }\n\n if (Array.isArray(dilation_rate)) {\n this.dilationRate = dilation_rate;\n } else {\n this.dilationRate = [dilation_rate, dilation_rate, dilation_rate];\n }\n\n if ((this.dilationRate[0] !== 1 || this.dilationRate[1] !== 1 || this.dilationRate[2] !== 1) && (this.strides[0] !== 1 || this.strides[1] !== 1 || this.strides[2] !== 1)) {\n this.throwError('Incompatible combination of dilation_rate with strides.');\n }\n\n this.activation = activation;\n this.activationFunc = activations[activation];\n this.useBias = use_bias;\n this.params = this.useBias ? ['kernel', 'bias'] : ['kernel'];\n this.description = `${this.kernelShape[0]} ${this.kernelShape.slice(1).join('x')} filters`;\n this.description += this.strides.some(s => s > 1) ? `, ${this.strides.join('x')} striding` : '';\n this.description += this.padding === 'valid' ? `, no border padding` : ', pad to same borders';\n this.description += this.dilationRate.some(r => r > 1) ? `, ${this.dilationRate.join('x')} dilation` : '';\n this.description += this.activation !== 'linear' ? `, ${this.activation} activation` : '';\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n this.mapInputFragmentsProgram = _WebGL.webgl2.compileProgram(mapInputFragmentsProgramSource);\n this.matMulProgram = _WebGL.webgl2.compileProgram(matMulProgramSource);\n this.activationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.activation]);\n }\n }\n\n setWeights(weightsArr) {\n if (this.dataFormat === 'channels_first') {\n weightsArr[0].tensor = weightsArr[0].tensor.transpose(2, 3, 4, 1, 0);\n }\n\n super.setWeights(weightsArr, false);\n\n this._w2row();\n\n if (this.gpu) {\n this.weights['kernel'] = this.wRowsMat;\n this.weights['kernel'].createGLTexture({\n type: '2d',\n format: 'float'\n });\n\n if (this.useBias) {\n this.weights['bias'].createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _calcOutputShape(inputShape) {\n if (this.outputShape && this.inputPadding) {\n return;\n }\n\n const inputDim1 = inputShape[0];\n const inputDim2 = inputShape[1];\n const inputDim3 = inputShape[2];\n const [nbFilter, kernelDim1, kernelDim2, kernelDim3] = this.kernelShape;\n const kernelDim1Dilated = kernelDim1 + (kernelDim1 - 1) * (this.dilationRate[0] - 1);\n const kernelDim2Dilated = kernelDim2 + (kernelDim2 - 1) * (this.dilationRate[1] - 1);\n const kernelDim3Dilated = kernelDim3 + (kernelDim3 - 1) * (this.dilationRate[2] - 1);\n const outputDim1 = this.padding === 'same' ? Math.floor((inputDim1 + this.strides[0] - 1) / this.strides[0]) : Math.floor((inputDim1 - kernelDim1Dilated + this.strides[0]) / this.strides[0]);\n const outputDim2 = this.padding === 'same' ? Math.floor((inputDim2 + this.strides[1] - 1) / this.strides[1]) : Math.floor((inputDim2 - kernelDim2Dilated + this.strides[1]) / this.strides[1]);\n const outputDim3 = this.padding === 'same' ? Math.floor((inputDim3 + this.strides[2] - 1) / this.strides[2]) : Math.floor((inputDim3 - kernelDim3Dilated + this.strides[2]) / this.strides[2]);\n const outputChannels = nbFilter;\n const paddingDim1 = this.padding === 'same' ? Math.max(0, Math.floor((outputDim1 - 1) * this.strides[0] + kernelDim1Dilated - inputDim1)) : 0;\n const paddingDim2 = this.padding === 'same' ? Math.max(0, Math.floor((outputDim2 - 1) * this.strides[1] + kernelDim2Dilated - inputDim2)) : 0;\n const paddingDim3 = this.padding === 'same' ? Math.max(0, Math.floor((outputDim3 - 1) * this.strides[2] + kernelDim3Dilated - inputDim3)) : 0;\n const paddingDim1Before = Math.floor(paddingDim1 / 2);\n const paddingDim1After = paddingDim1 - paddingDim1Before;\n const paddingDim2Before = Math.floor(paddingDim2 / 2);\n const paddingDim2After = paddingDim2 - paddingDim2Before;\n const paddingDim3Before = Math.floor(paddingDim3 / 2);\n const paddingDim3After = paddingDim3 - paddingDim3Before;\n this.outputShape = [outputDim1, outputDim2, outputDim3, outputChannels];\n this.inputPadding = [paddingDim1Before, paddingDim1After, paddingDim2Before, paddingDim2After, paddingDim3Before, paddingDim3After];\n }\n\n _padInput(x, padValue = 0) {\n if (this.padding === 'same') {\n const [inputDim1, inputDim2, inputDim3, inputChannels] = x.tensor.shape;\n const [paddingDim1Before, paddingDim1After, paddingDim2Before, paddingDim2After, paddingDim3Before, paddingDim3After] = this.inputPadding;\n const newDim1 = inputDim1 + paddingDim1Before + paddingDim1After;\n const newDim2 = inputDim2 + paddingDim2Before + paddingDim2After;\n const newDim3 = inputDim3 + paddingDim3Before + paddingDim3After;\n\n const _x = new _Tensor.default([], [newDim1, newDim2, newDim3, inputChannels]);\n\n if (padValue !== 0) {\n _ndarrayOps.default.assigns(_x.tensor, padValue);\n }\n\n _ndarrayOps.default.assign(_x.tensor.hi(inputDim1 + paddingDim1Before, inputDim2 + paddingDim2Before, inputDim3 + paddingDim3Before, inputChannels).lo(paddingDim1Before, paddingDim2Before, paddingDim3Before, 0), x.tensor);\n\n return _x;\n }\n\n return x;\n }\n\n _vol2col(x) {\n const [inputDim1, inputDim2, inputDim3, inputChannels] = x.tensor.shape;\n const kernelDim1 = this.kernelShape[1];\n const kernelDim2 = this.kernelShape[2];\n const kernelDim3 = this.kernelShape[3];\n const outputDim1 = this.outputShape[0];\n const outputDim2 = this.outputShape[1];\n const outputDim3 = this.outputShape[2];\n const nbPatches = outputDim1 * outputDim2 * outputDim3;\n const patchLen = kernelDim1 * kernelDim2 * kernelDim3 * inputChannels;\n const kernelDim1Dilated = kernelDim1 + (kernelDim1 - 1) * (this.dilationRate[0] - 1);\n const kernelDim2Dilated = kernelDim2 + (kernelDim2 - 1) * (this.dilationRate[1] - 1);\n const kernelDim3Dilated = kernelDim3 + (kernelDim3 - 1) * (this.dilationRate[2] - 1);\n\n if (!this.volColsMat) {\n this.volColsMat = new _Tensor.default([], [nbPatches, patchLen]);\n }\n\n if (kernelDim1Dilated === 1 && kernelDim2Dilated === 1 && kernelDim3Dilated === 1 && this.strides[0] === 1 && this.strides[1] === 1 && this.strides[2] === 1) {\n this.volColsMat.replaceTensorData(x.tensor.data);\n return this.volColsMat;\n }\n\n const patch = new _Tensor.default([], [kernelDim1, kernelDim2, kernelDim3, inputChannels]);\n let offset = 0;\n\n for (let i = 0, limit = inputDim1 - kernelDim1Dilated; i <= limit; i += this.strides[0]) {\n for (let j = 0, limit = inputDim2 - kernelDim2Dilated; j <= limit; j += this.strides[1]) {\n for (let k = 0, limit = inputDim3 - kernelDim3Dilated; k <= limit; k += this.strides[2]) {\n _ndarrayOps.default.assign(patch.tensor, x.tensor.hi(i + kernelDim1Dilated, j + kernelDim2Dilated, k + kernelDim3Dilated, inputChannels).lo(i, j, k, 0).step(this.dilationRate[0], this.dilationRate[1], this.dilationRate[2], 1));\n\n this.volColsMat.tensor.data.set(patch.tensor.data, offset);\n offset += patchLen;\n }\n }\n }\n\n return this.volColsMat;\n }\n\n _w2row() {\n const inputChannels = this.weights['kernel'].tensor.shape[3];\n const [nbFilter, kernelDim1, kernelDim2, kernelDim3] = this.kernelShape;\n const patchLen = kernelDim1 * kernelDim2 * kernelDim3 * inputChannels;\n this.wRowsMat = new _Tensor.default([], [patchLen, nbFilter]);\n const patch = new _Tensor.default([], [kernelDim1, kernelDim2, kernelDim3, inputChannels]);\n const patchRaveled = new _Tensor.default([], [patchLen]);\n\n for (let n = 0; n < nbFilter; n++) {\n _ndarrayOps.default.assign(patch.tensor, this.weights['kernel'].tensor.pick(null, null, null, null, n));\n\n patchRaveled.replaceTensorData(patch.tensor.data);\n\n _ndarrayOps.default.assign(this.wRowsMat.tensor.pick(null, n), patchRaveled.tensor);\n }\n\n return this.wRowsMat;\n }\n\n _callCPU(x) {\n this.inputShape = x.tensor.shape;\n\n this._calcOutputShape(this.inputShape);\n\n x = this._padInput(x);\n\n this._vol2col(x);\n\n const nbFilter = this.kernelShape[0];\n const outputDim1 = this.outputShape[0];\n const outputDim2 = this.outputShape[1];\n const outputDim3 = this.outputShape[2];\n const nbPatches = outputDim1 * outputDim2 * outputDim3;\n const matMul = new _Tensor.default([], [nbPatches, nbFilter]);\n\n if (this.useBias) {\n for (let n = 0; n < nbFilter; n++) {\n _ndarrayOps.default.assigns(matMul.tensor.pick(null, n), this.weights['bias'].tensor.get(n));\n }\n }\n\n (0, _ndarrayGemm.default)(matMul.tensor, this.volColsMat.tensor, this.wRowsMat.tensor, 1, 1);\n this.output = new _Tensor.default([], this.outputShape);\n let outputChannelRaveled = new _Tensor.default([], [outputDim1 * outputDim2 * outputDim3]);\n let outputChannel = new _Tensor.default([], [outputDim1, outputDim2, outputDim3]);\n\n for (let n = 0; n < nbFilter; n++) {\n _ndarrayOps.default.assign(outputChannelRaveled.tensor, matMul.tensor.pick(null, n));\n\n outputChannel.replaceTensorData(outputChannelRaveled.tensor.data);\n\n _ndarrayOps.default.assign(this.output.tensor.pick(null, null, null, n), outputChannel.tensor);\n }\n\n this.activationFunc(this.output);\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(3, 0, 1, 2);\n }\n }\n\n _createIndexMap(indicesForReshaped) {\n if (this.indexMap) {\n return;\n }\n\n let [inputDim1, inputDim2, inputDim3, inputChannels] = this.inputShape;\n let indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n\n if (this.padding === 'same') {\n const [paddingDim1Before, paddingDim1After, paddingDim2Before, paddingDim2After, paddingDim3Before, paddingDim3After] = this.inputPadding;\n inputDim1 = inputDim1 + paddingDim1Before + paddingDim1After;\n inputDim2 = inputDim2 + paddingDim2Before + paddingDim2After;\n inputDim3 = inputDim3 + paddingDim3Before + paddingDim3After;\n const padValue = -1;\n indices = this._padInput(indices, padValue);\n }\n\n const kernelDim1 = this.kernelShape[1];\n const kernelDim2 = this.kernelShape[2];\n const kernelDim3 = this.kernelShape[3];\n const outputDim1 = this.outputShape[0];\n const outputDim2 = this.outputShape[1];\n const outputDim3 = this.outputShape[2];\n const nbPatches = outputDim1 * outputDim2 * outputDim3;\n const patchLen = kernelDim1 * kernelDim2 * kernelDim3 * inputChannels;\n const kernelDim1Dilated = kernelDim1 + (kernelDim1 - 1) * (this.dilationRate[0] - 1);\n const kernelDim2Dilated = kernelDim2 + (kernelDim2 - 1) * (this.dilationRate[1] - 1);\n const kernelDim3Dilated = kernelDim3 + (kernelDim3 - 1) * (this.dilationRate[2] - 1);\n this.indexMap = new _Tensor.default([], [nbPatches, patchLen], {\n type: Int32Array\n });\n const indicesPatch = new _Tensor.default([], [kernelDim1, kernelDim2, kernelDim3, inputChannels]);\n let offset = 0;\n\n for (let i = 0, limit = inputDim1 - kernelDim1Dilated; i <= limit; i += this.strides[0]) {\n for (let j = 0, limit = inputDim2 - kernelDim2Dilated; j <= limit; j += this.strides[1]) {\n for (let k = 0, limit = inputDim3 - kernelDim3Dilated; k <= limit; k += this.strides[2]) {\n _ndarrayOps.default.assign(indicesPatch.tensor, indices.tensor.hi(i + kernelDim1Dilated, j + kernelDim2Dilated, k + kernelDim3Dilated, inputChannels).lo(i, j, k, 0).step(this.dilationRate[0], this.dilationRate[1], this.dilationRate[2], 1));\n\n this.indexMap.tensor.data.set(indicesPatch.tensor.data, offset);\n offset += patchLen;\n }\n }\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int',\n supportsTextureFragments: true\n });\n }\n\n _callGPU(x) {\n let outputTextureShape;\n\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n\n this._calcOutputShape(this.inputShape);\n\n this._createIndexMap(x.indicesForReshaped);\n\n outputTextureShape = [this.indexMap.glTextureShape[0], this.weights['kernel'].glTextureShape[1]];\n } else {\n this.inputShape = x.tensor.shape;\n\n this._calcOutputShape(this.inputShape);\n\n x = this._padInput(x);\n\n this._vol2col(x);\n\n this.volColsMat.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n outputTextureShape = [this.volColsMat.glTextureShape[0], this.weights['kernel'].glTextureShape[1]];\n }\n\n if (this.activation !== 'linear' && !this.outputPreactiv) {\n this.outputPreactiv = new _Tensor.default([], outputTextureShape);\n this.outputPreactiv.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.outputPreactiv.is2DReshaped = true;\n this.outputPreactiv.originalShape = this.outputShape;\n this.outputPreactiv.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.outputShape, false, -1);\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], outputTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.output.is2DReshaped = true;\n this.output.originalShape = this.outputShape;\n this.output.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.outputShape, false, -1);\n }\n\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n const hasFragments = Boolean(x.glTextureFragments);\n\n if (hasFragments) {\n x.convert2DRowFragmentedGLTextureToColStack();\n }\n\n if (!this.convProgram) {\n const convProgramSource = (0, _createGLSLProgram.default)('conv2d', this.output.glTextureFragmentShape ? this.output.glTextureFragmentShape : this.output.glTextureShape, x.glTextureFragmentShape ? x.glTextureFragmentShape : x.glTextureShape, this.indexMap.glTextureFragmentShape ? this.indexMap.glTextureFragmentShape : this.indexMap.glTextureShape, this.useBias, hasFragments);\n this.convProgram = _WebGL.webgl2.compileProgram(convProgramSource);\n }\n\n _WebGL.webgl2.runProgram({\n program: this.convProgram,\n output: this.activation === 'linear' ? this.output : this.outputPreactiv,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }, {\n input: this.weights['kernel'],\n name: 'kernel'\n }, ...(this.useBias ? [{\n input: this.weights['bias'],\n name: 'bias'\n }] : [])],\n supportsTextureFragments: true\n });\n\n if (hasFragments) {\n x.removeGLTextureFragmentsAsColStack();\n }\n } else {\n const matMulInputs = [{\n input: this.volColsMat,\n name: 'A'\n }, {\n input: this.weights['kernel'],\n name: 'B'\n }];\n\n if (this.useBias) {\n matMulInputs.push({\n input: this.weights['bias'],\n name: 'C'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.activation === 'linear' ? this.output : this.outputPreactiv,\n inputs: matMulInputs,\n uniforms: [{\n value: this.useBias ? 1 : 0,\n type: 'bool',\n name: 'addC'\n }],\n supportsTextureFragments: true\n });\n }\n\n if (this.activation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.activationProgram,\n output: this.output,\n inputs: [{\n input: this.outputPreactiv,\n name: 'x'\n }],\n supportsTextureFragments: true\n });\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n this.output.reshapeFrom2D();\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(3, 0, 1, 2);\n }\n }\n }\n\n}\n\nexports.default = Conv3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass Cropping1D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Cropping1D';\n const {\n cropping = [0, 0]\n } = attrs;\n\n if (Array.isArray(cropping)) {\n this.cropping = cropping;\n } else {\n this.cropping = [cropping, cropping];\n }\n\n this.description = `${JSON.stringify(this.cropping)}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] - this.cropping[0] - this.cropping[1], this.inputShape[1]];\n this.output = new _Tensor.default([], this.outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor, x.tensor.hi(this.inputShape[0] - this.cropping[1], this.inputShape[2]).lo(this.cropping[0], 0));\n }\n\n _createIndexMap() {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesRow = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesCol = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n\n for (let i = 0; i < this.inputShape[0]; i++) {\n _ndarrayOps.default.assigns(indicesRow.tensor.pick(i, null), i);\n }\n\n for (let j = 0; j < this.inputShape[1]; j++) {\n _ndarrayOps.default.assigns(indicesCol.tensor.pick(null, j), j);\n }\n\n _ndarrayOps.default.muls(indices.tensor, indicesRow.tensor, this.inputShape[1]);\n\n _ndarrayOps.default.addeq(indices.tensor, indicesCol.tensor);\n\n this.indexMap = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n const sliceStart = [this.cropping[0], 0];\n const sliceEnd = [this.inputShape[0] - this.cropping[1], this.inputShape[2]];\n\n _ndarrayOps.default.assign(this.indexMap.tensor, indices.tensor.hi(...sliceEnd).lo(...sliceStart));\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] - this.cropping[0] - this.cropping[1], this.inputShape[1]];\n\n this._createIndexMap();\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = Cropping1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass Cropping2D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Cropping2D';\n const {\n cropping = [[0, 0], [0, 0]],\n data_format = 'channels_last'\n } = attrs;\n\n if (Array.isArray(cropping)) {\n if (Array.isArray(cropping[0])) {\n this.cropping = cropping;\n } else {\n this.cropping = [[cropping[0], cropping[0]], [cropping[1], cropping[1]]];\n }\n } else {\n this.cropping = [[cropping, cropping], [cropping, cropping]];\n }\n\n this.dataFormat = data_format;\n this.description = `${JSON.stringify(this.cropping)}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 0);\n }\n\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] - this.cropping[0][0] - this.cropping[0][1], this.inputShape[1] - this.cropping[1][0] - this.cropping[1][1], this.inputShape[2]];\n this.output = new _Tensor.default([], this.outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor, x.tensor.hi(this.inputShape[0] - this.cropping[0][1], this.inputShape[1] - this.cropping[1][1], this.inputShape[2]).lo(this.cropping[0][0], this.cropping[1][0], 0));\n\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(2, 0, 1);\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n\n _createIndexMap(indicesForReshaped, is2DReshaped) {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n this.indexMap = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n const sliceStart = this.dataFormat === 'channels_first' ? [0, this.cropping[0][0], this.cropping[1][0]] : [this.cropping[0][0], this.cropping[1][0], 0];\n const sliceEnd = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] - this.cropping[0][1], this.inputShape[2] - this.cropping[1][1]] : [this.inputShape[0] - this.cropping[0][1], this.inputShape[1] - this.cropping[1][1], this.inputShape[2]];\n\n _ndarrayOps.default.assign(this.indexMap.tensor, indices.tensor.hi(...sliceEnd).lo(...sliceStart));\n\n if (is2DReshaped) {\n this.indexMap.reshapeTo2D();\n } else {\n this.indexMap.reshapeTo2DSquare();\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.reshapeTo2DSquare();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.originalShape;\n this.outputShape = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] - this.cropping[0][0] - this.cropping[0][1], this.inputShape[2] - this.cropping[1][0] - this.cropping[1][1]] : [this.inputShape[0] - this.cropping[0][0] - this.cropping[0][1], this.inputShape[1] - this.cropping[1][0] - this.cropping[1][1], this.inputShape[2]];\n\n this._createIndexMap(x.indicesForReshaped, x.is2DReshaped);\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n\n if (x.is2DReshaped) {\n this.output.reshapeTo2D();\n } else {\n this.output.reshapeTo2DSquare();\n }\n\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = Cropping2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass Cropping3D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Cropping3D';\n const {\n cropping = [[0, 0], [0, 0], [0, 0]],\n data_format = 'channels_last'\n } = attrs;\n\n if (Array.isArray(cropping)) {\n if (Array.isArray(cropping[0])) {\n this.cropping = cropping;\n } else {\n this.cropping = [[cropping[0], cropping[0]], [cropping[1], cropping[1]], [cropping[2], cropping[2]]];\n }\n } else {\n this.cropping = [[cropping, cropping], [cropping, cropping], [cropping, cropping]];\n }\n\n this.dataFormat = data_format;\n this.description = `${JSON.stringify(this.cropping)}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 3, 0);\n }\n\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] - this.cropping[0][0] - this.cropping[0][1], this.inputShape[1] - this.cropping[1][0] - this.cropping[1][1], this.inputShape[2] - this.cropping[2][0] - this.cropping[2][1], this.inputShape[3]];\n this.output = new _Tensor.default([], this.outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor, x.tensor.hi(this.inputShape[0] - this.cropping[0][1], this.inputShape[1] - this.cropping[1][1], this.inputShape[2] - this.cropping[2][1], this.inputShape[3]).lo(this.cropping[0][0], this.cropping[1][0], this.cropping[2][0], 0));\n\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(3, 0, 1, 2);\n this.output.tensor = this.output.tensor.transpose(3, 0, 1, 2);\n }\n }\n\n _createIndexMap(indicesForReshaped, is2DReshaped) {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n this.indexMap = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n const sliceStart = this.dataFormat === 'channels_first' ? [0, this.cropping[0][0], this.cropping[1][0], this.cropping[2][0]] : [this.cropping[0][0], this.cropping[1][0], this.cropping[2][0], 0];\n const sliceEnd = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] - this.cropping[0][1], this.inputShape[2] - this.cropping[1][1], this.inputShape[3] - this.cropping[2][1]] : [this.inputShape[0] - this.cropping[0][1], this.inputShape[1] - this.cropping[1][1], this.inputShape[2] - this.cropping[2][1], this.inputShape[3]];\n\n _ndarrayOps.default.assign(this.indexMap.tensor, indices.tensor.hi(...sliceEnd).lo(...sliceStart));\n\n if (is2DReshaped) {\n this.indexMap.reshapeTo2D();\n } else {\n this.indexMap.reshapeTo2DSquare();\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.reshapeTo2DSquare();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.originalShape;\n this.outputShape = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] - this.cropping[0][0] - this.cropping[0][1], this.inputShape[2] - this.cropping[1][0] - this.cropping[1][1], this.inputShape[3] - this.cropping[2][0] - this.cropping[2][1]] : [this.inputShape[0] - this.cropping[0][0] - this.cropping[0][1], this.inputShape[1] - this.cropping[1][0] - this.cropping[1][1], this.inputShape[2] - this.cropping[2][0] - this.cropping[2][1], this.inputShape[3]];\n\n this._createIndexMap(x.indicesForReshaped, x.is2DReshaped);\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n\n if (x.is2DReshaped) {\n this.output.reshapeTo2D();\n } else {\n this.output.reshapeTo2DSquare();\n }\n\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = Cropping3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass UpSampling1D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'UpSampling1D';\n const {\n size = 2\n } = attrs;\n this.size = size;\n this.description = `size ${size}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] * this.size, this.inputShape[1]];\n this.output = new _Tensor.default([], this.outputShape);\n\n for (let i = 0; i < this.size; i++) {\n _ndarrayOps.default.assign(this.output.tensor.lo(i, 0).step(this.size, 1), x.tensor);\n }\n }\n\n _createIndexMap() {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesRow = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesCol = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n\n for (let i = 0; i < this.inputShape[0]; i++) {\n _ndarrayOps.default.assigns(indicesRow.tensor.pick(i, null), i);\n }\n\n for (let j = 0; j < this.inputShape[1]; j++) {\n _ndarrayOps.default.assigns(indicesCol.tensor.pick(null, j), j);\n }\n\n _ndarrayOps.default.muls(indices.tensor, indicesRow.tensor, this.inputShape[1]);\n\n _ndarrayOps.default.addeq(indices.tensor, indicesCol.tensor);\n\n this.indexMap = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n\n for (let i = 0; i < this.size; i++) {\n _ndarrayOps.default.assign(this.indexMap.tensor.lo(i, 0).step(this.size, 1), indices.tensor);\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] * this.size, this.inputShape[1]];\n\n this._createIndexMap();\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = UpSampling1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass UpSampling2D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'UpSampling2D';\n const {\n size = [2, 2],\n data_format = 'channels_last'\n } = attrs;\n\n if (Array.isArray(size)) {\n this.size = size;\n } else {\n this.size = [size, size];\n }\n\n this.dataFormat = data_format;\n this.description = `size ${this.size.join('x')}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 0);\n }\n\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] * this.size[0], this.inputShape[1] * this.size[1], this.inputShape[2]];\n this.output = new _Tensor.default([], this.outputShape);\n\n for (let i = 0; i < this.size[0]; i++) {\n for (let j = 0; j < this.size[1]; j++) {\n _ndarrayOps.default.assign(this.output.tensor.lo(i, j, 0).step(this.size[0], this.size[1], 1), x.tensor);\n }\n }\n\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(2, 0, 1);\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n\n _createIndexMap(indicesForReshaped, is2DReshaped) {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n this.indexMap = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n\n for (let i = 0; i < this.size[0]; i++) {\n for (let j = 0; j < this.size[1]; j++) {\n const sliceStart = this.dataFormat === 'channels_first' ? [0, i, j] : [i, j, 0];\n const step = this.dataFormat === 'channels_first' ? [1, this.size[0], this.size[1]] : [this.size[0], this.size[1], 1];\n\n _ndarrayOps.default.assign(this.indexMap.tensor.lo(...sliceStart).step(...step), indices.tensor);\n }\n }\n\n if (is2DReshaped) {\n this.indexMap.reshapeTo2D();\n } else {\n this.indexMap.reshapeTo2DSquare();\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.reshapeTo2DSquare();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.originalShape;\n this.outputShape = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] * this.size[0], this.inputShape[2] * this.size[1]] : [this.inputShape[0] * this.size[0], this.inputShape[1] * this.size[1], this.inputShape[2]];\n\n this._createIndexMap(x.indicesForReshaped, x.is2DReshaped);\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n\n if (x.is2DReshaped) {\n this.output.reshapeTo2D();\n } else {\n this.output.reshapeTo2DSquare();\n }\n\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = UpSampling2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass UpSampling3D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'UpSampling3D';\n const {\n size = [2, 2, 2],\n data_format = 'channels_last'\n } = attrs;\n\n if (Array.isArray(size)) {\n this.size = size;\n } else {\n this.size = [size, size, size];\n }\n\n this.dataFormat = data_format;\n this.description = `size ${this.size.join('x')}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 3, 0);\n }\n\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] * this.size[0], this.inputShape[1] * this.size[1], this.inputShape[2] * this.size[2], this.inputShape[3]];\n this.output = new _Tensor.default([], this.outputShape);\n\n for (let i = 0; i < this.size[0]; i++) {\n for (let j = 0; j < this.size[1]; j++) {\n for (let k = 0; k < this.size[2]; k++) {\n _ndarrayOps.default.assign(this.output.tensor.lo(i, j, k, 0).step(this.size[0], this.size[1], this.size[2], 1), x.tensor);\n }\n }\n }\n\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(3, 0, 1, 2);\n this.output.tensor = this.output.tensor.transpose(3, 0, 1, 2);\n }\n }\n\n _createIndexMap(indicesForReshaped, is2DReshaped) {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n this.indexMap = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n\n for (let i = 0; i < this.size[0]; i++) {\n for (let j = 0; j < this.size[1]; j++) {\n for (let k = 0; k < this.size[2]; k++) {\n const sliceStart = this.dataFormat === 'channels_first' ? [0, i, j, k] : [i, j, k, 0];\n const step = this.dataFormat === 'channels_first' ? [1, this.size[0], this.size[1], this.size[2]] : [this.size[0], this.size[1], this.size[2], 1];\n\n _ndarrayOps.default.assign(this.indexMap.tensor.lo(...sliceStart).step(...step), indices.tensor);\n }\n }\n }\n\n if (is2DReshaped) {\n this.indexMap.reshapeTo2D();\n } else {\n this.indexMap.reshapeTo2DSquare();\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.reshapeTo2DSquare();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.originalShape;\n this.outputShape = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] * this.size[0], this.inputShape[2] * this.size[1], this.inputShape[3] * this.size[2]] : [this.inputShape[0] * this.size[0], this.inputShape[1] * this.size[1], this.inputShape[2] * this.size[2], this.inputShape[3]];\n\n this._createIndexMap(x.indicesForReshaped, x.is2DReshaped);\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n\n if (x.is2DReshaped) {\n this.output.reshapeTo2D();\n } else {\n this.output.reshapeTo2DSquare();\n }\n\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = UpSampling3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass ZeroPadding1D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'ZeroPadding1D';\n const {\n padding = [1, 1]\n } = attrs;\n\n if (Array.isArray(padding)) {\n this.padding = padding;\n } else {\n this.padding = [padding, padding];\n }\n\n this.description = `${JSON.stringify(this.padding)}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] + this.padding[0] + this.padding[1], this.inputShape[1]];\n this.output = new _Tensor.default([], this.outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor.hi(this.inputShape[0] + this.padding[0], this.inputShape[1]).lo(this.padding[0], 0), x.tensor);\n }\n\n _createIndexMap() {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesRow = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesCol = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n\n for (let i = 0; i < this.inputShape[0]; i++) {\n _ndarrayOps.default.assigns(indicesRow.tensor.pick(i, null), i);\n }\n\n for (let j = 0; j < this.inputShape[1]; j++) {\n _ndarrayOps.default.assigns(indicesCol.tensor.pick(null, j), j);\n }\n\n _ndarrayOps.default.muls(indices.tensor, indicesRow.tensor, this.inputShape[1]);\n\n _ndarrayOps.default.addeq(indices.tensor, indicesCol.tensor);\n\n this.indexMap = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n const sliceStart = [this.padding[0], 0];\n const sliceEnd = [this.inputShape[0] + this.padding[0], this.inputShape[1]];\n\n _ndarrayOps.default.assigns(this.indexMap.tensor, -1);\n\n _ndarrayOps.default.assign(this.indexMap.tensor.hi(...sliceEnd).lo(...sliceStart), indices.tensor);\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] + this.padding[0] + this.padding[1], this.inputShape[1]];\n\n this._createIndexMap();\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = ZeroPadding1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass ZeroPadding2D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'ZeroPadding2D';\n const {\n padding = [[1, 1], [1, 1]],\n data_format = 'channels_last'\n } = attrs;\n\n if (Array.isArray(padding)) {\n if (Array.isArray(padding[0])) {\n this.padding = padding;\n } else {\n this.padding = [[padding[0], padding[0]], [padding[1], padding[1]]];\n }\n } else {\n this.padding = [[padding, padding], [padding, padding]];\n }\n\n this.dataFormat = data_format;\n this.description = `${JSON.stringify(this.padding)}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 0);\n }\n\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] + this.padding[0][0] + this.padding[0][1], this.inputShape[1] + this.padding[1][0] + this.padding[1][1], this.inputShape[2]];\n this.output = new _Tensor.default([], this.outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor.hi(this.inputShape[0] + this.padding[0][0], this.inputShape[1] + this.padding[1][0], this.inputShape[2]).lo(this.padding[0][0], this.padding[1][0], 0), x.tensor);\n\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(2, 0, 1);\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n\n _createIndexMap(indicesForReshaped, is2DReshaped) {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n this.indexMap = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n const sliceStart = this.dataFormat === 'channels_first' ? [0, this.padding[0][0], this.padding[1][0]] : [this.padding[0][0], this.padding[1][0], 0];\n const sliceEnd = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] + this.padding[0][0], this.inputShape[2] + this.padding[1][0]] : [this.inputShape[0] + this.padding[0][0], this.inputShape[1] + this.padding[1][0], this.inputShape[2]];\n\n _ndarrayOps.default.assigns(this.indexMap.tensor, -1);\n\n _ndarrayOps.default.assign(this.indexMap.tensor.hi(...sliceEnd).lo(...sliceStart), indices.tensor);\n\n if (is2DReshaped) {\n this.indexMap.reshapeTo2D();\n } else {\n this.indexMap.reshapeTo2DSquare();\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.reshapeTo2DSquare();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.originalShape;\n this.outputShape = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] + this.padding[0][0] + this.padding[0][1], this.inputShape[2] + this.padding[1][0] + this.padding[1][1]] : [this.inputShape[0] + this.padding[0][0] + this.padding[0][1], this.inputShape[1] + this.padding[1][0] + this.padding[1][1], this.inputShape[2]];\n\n this._createIndexMap(x.indicesForReshaped, x.is2DReshaped);\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n\n if (x.is2DReshaped) {\n this.output.reshapeTo2D();\n } else {\n this.output.reshapeTo2DSquare();\n }\n\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = ZeroPadding2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass ZeroPadding3D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'ZeroPadding3D';\n const {\n padding = [[1, 1], [1, 1], [1, 1]],\n data_format = 'channels_last'\n } = attrs;\n\n if (Array.isArray(padding)) {\n if (Array.isArray(padding[0])) {\n this.padding = padding;\n } else {\n this.padding = [[padding[0], padding[0]], [padding[1], padding[1]], [padding[2], padding[2]]];\n }\n } else {\n this.padding = [[padding, padding], [padding, padding], [padding, padding]];\n }\n\n this.dataFormat = data_format;\n this.description = `${JSON.stringify(this.padding)}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 3, 0);\n }\n\n this.inputShape = x.tensor.shape;\n this.outputShape = [this.inputShape[0] + this.padding[0][0] + this.padding[0][1], this.inputShape[1] + this.padding[1][0] + this.padding[1][1], this.inputShape[2] + this.padding[2][0] + this.padding[2][1], this.inputShape[3]];\n this.output = new _Tensor.default([], this.outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor.hi(this.inputShape[0] + this.padding[0][0], this.inputShape[1] + this.padding[1][0], this.inputShape[2] + this.padding[2][0], this.inputShape[3]).lo(this.padding[0][0], this.padding[1][0], this.padding[2][0], 0), x.tensor);\n\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(3, 0, 1, 2);\n this.output.tensor = this.output.tensor.transpose(3, 0, 1, 2);\n }\n }\n\n _createIndexMap(indicesForReshaped, is2DReshaped) {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n this.indexMap = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n const sliceStart = this.dataFormat === 'channels_first' ? [0, this.padding[0][0], this.padding[1][0], this.padding[2][0]] : [this.padding[0][0], this.padding[1][0], this.padding[2][0], 0];\n const sliceEnd = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] + this.padding[0][0], this.inputShape[2] + this.padding[1][0], this.inputShape[3] + this.padding[2][0]] : [this.inputShape[0] + this.padding[0][0], this.inputShape[1] + this.padding[1][0], this.inputShape[2] + this.padding[2][0], this.inputShape[3]];\n\n _ndarrayOps.default.assigns(this.indexMap.tensor, -1);\n\n _ndarrayOps.default.assign(this.indexMap.tensor.hi(...sliceEnd).lo(...sliceStart), indices.tensor);\n\n if (is2DReshaped) {\n this.indexMap.reshapeTo2D();\n } else {\n this.indexMap.reshapeTo2DSquare();\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.reshapeTo2DSquare();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.originalShape;\n this.outputShape = this.dataFormat === 'channels_first' ? [this.inputShape[0], this.inputShape[1] + this.padding[0][0] + this.padding[0][1], this.inputShape[2] + this.padding[1][0] + this.padding[1][1], this.inputShape[3] + this.padding[2][0] + this.padding[2][1]] : [this.inputShape[0] + this.padding[0][0] + this.padding[0][1], this.inputShape[1] + this.padding[1][0] + this.padding[1][1], this.inputShape[2] + this.padding[2][0] + this.padding[2][1], this.inputShape[3]];\n\n this._createIndexMap(x.indicesForReshaped, x.is2DReshaped);\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n\n if (x.is2DReshaped) {\n this.output.reshapeTo2D();\n } else {\n this.output.reshapeTo2DSquare();\n }\n\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = ZeroPadding3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Conv1D\", {\n enumerable: true,\n get: function () {\n return _Conv1D.default;\n }\n});\nObject.defineProperty(exports, \"Conv2D\", {\n enumerable: true,\n get: function () {\n return _Conv2D.default;\n }\n});\nObject.defineProperty(exports, \"SeparableConv2D\", {\n enumerable: true,\n get: function () {\n return _SeparableConv2D.default;\n }\n});\nObject.defineProperty(exports, \"Conv2DTranspose\", {\n enumerable: true,\n get: function () {\n return _Conv2DTranspose.default;\n }\n});\nObject.defineProperty(exports, \"Conv3D\", {\n enumerable: true,\n get: function () {\n return _Conv3D.default;\n }\n});\nObject.defineProperty(exports, \"Cropping1D\", {\n enumerable: true,\n get: function () {\n return _Cropping1D.default;\n }\n});\nObject.defineProperty(exports, \"Cropping2D\", {\n enumerable: true,\n get: function () {\n return _Cropping2D.default;\n }\n});\nObject.defineProperty(exports, \"Cropping3D\", {\n enumerable: true,\n get: function () {\n return _Cropping3D.default;\n }\n});\nObject.defineProperty(exports, \"UpSampling1D\", {\n enumerable: true,\n get: function () {\n return _UpSampling1D.default;\n }\n});\nObject.defineProperty(exports, \"UpSampling2D\", {\n enumerable: true,\n get: function () {\n return _UpSampling2D.default;\n }\n});\nObject.defineProperty(exports, \"UpSampling3D\", {\n enumerable: true,\n get: function () {\n return _UpSampling3D.default;\n }\n});\nObject.defineProperty(exports, \"ZeroPadding1D\", {\n enumerable: true,\n get: function () {\n return _ZeroPadding1D.default;\n }\n});\nObject.defineProperty(exports, \"ZeroPadding2D\", {\n enumerable: true,\n get: function () {\n return _ZeroPadding2D.default;\n }\n});\nObject.defineProperty(exports, \"ZeroPadding3D\", {\n enumerable: true,\n get: function () {\n return _ZeroPadding3D.default;\n }\n});\n\nvar _Conv1D = _interopRequireDefault(require(\"./Conv1D\"));\n\nvar _Conv2D = _interopRequireDefault(require(\"./Conv2D\"));\n\nvar _SeparableConv2D = _interopRequireDefault(require(\"./SeparableConv2D\"));\n\nvar _Conv2DTranspose = _interopRequireDefault(require(\"./Conv2DTranspose\"));\n\nvar _Conv3D = _interopRequireDefault(require(\"./Conv3D\"));\n\nvar _Cropping1D = _interopRequireDefault(require(\"./Cropping1D\"));\n\nvar _Cropping2D = _interopRequireDefault(require(\"./Cropping2D\"));\n\nvar _Cropping3D = _interopRequireDefault(require(\"./Cropping3D\"));\n\nvar _UpSampling1D = _interopRequireDefault(require(\"./UpSampling1D\"));\n\nvar _UpSampling2D = _interopRequireDefault(require(\"./UpSampling2D\"));\n\nvar _UpSampling3D = _interopRequireDefault(require(\"./UpSampling3D\"));\n\nvar _ZeroPadding1D = _interopRequireDefault(require(\"./ZeroPadding1D\"));\n\nvar _ZeroPadding2D = _interopRequireDefault(require(\"./ZeroPadding2D\"));\n\nvar _ZeroPadding3D = _interopRequireDefault(require(\"./ZeroPadding3D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","'use strict';\n\nmodule.exports = function swap (x, y) {\n var i, tmp;\n var dx = x.data;\n var dy = y.data;\n\n var ox = x.stride[0];\n var oy = y.stride[0];\n var px = x.offset;\n var py = y.offset;\n\n for (i = x.shape[0] - 1; i >= 0; i--, px += ox, py += oy) {\n tmp = dx[px];\n dx[px] = dy[py];\n dy[py] = tmp;\n }\n};\n","'use strict';\n\nmodule.exports = function scal (alpha, x) {\n var i;\n var dx = x.data;\n var ox = x.stride[0];\n var px = x.offset;\n for (i = x.shape[0] - 1; i >= 0; i--, px += ox) {\n dx[px] *= alpha;\n }\n};\n","'use strict';\n\nmodule.exports = function copy (x, y) {\n var i;\n var dx = x.data;\n var dy = y.data;\n var ox = x.stride[0];\n var oy = y.stride[0];\n var px = x.offset;\n var py = y.offset;\n for (i = x.shape[0] - 1; i >= 0; i--, px += ox, py += oy) {\n dy[py] = dx[px];\n }\n};\n","'use strict';\n\nmodule.exports = function axpy (alpha, x, y) {\n var i;\n var dx = x.data;\n var dy = y.data;\n var ox = x.stride[0];\n var oy = y.stride[0];\n var px = x.offset;\n var py = y.offset;\n for (i = x.shape[0] - 1; i >= 0; i--, px += ox, py += oy) {\n dy[py] += alpha * dx[px];\n }\n};\n","'use strict';\n\nmodule.exports = function dot (x, y) {\n var i, tmp;\n var dx = x.data;\n var ox = x.stride[0];\n var px = x.offset;\n\n var sum = 0;\n if (x === y) {\n for (i = x.shape[0] - 1; i >= 0; i--, px += ox) {\n tmp = dx[px];\n sum += tmp * tmp;\n }\n } else {\n var dy = y.data;\n var oy = y.stride[0];\n var py = y.offset;\n for (i = x.shape[0] - 1; i >= 0; i--, px += ox, py += oy) {\n sum += dy[py] * dx[px];\n }\n }\n return sum;\n};\n","'use strict';\n\nmodule.exports = function cpsc (alpha, x, y) {\n var i;\n var dx = x.data;\n var dy = y.data;\n var ox = x.stride[0];\n var oy = y.stride[0];\n var px = x.offset;\n var py = y.offset;\n for (i = x.shape[0] - 1; i >= 0; i--, px += ox, py += oy) {\n dy[py] = alpha * dx[px];\n }\n};\n","'use strict';\n\nvar hypot = function hypot (a, b) {\n if (a === 0 && b === 0) {\n return 0;\n }\n var x = Math.abs(a);\n var y = Math.abs(b);\n var t = Math.min(x, y);\n var u = Math.max(x, y);\n t = t / u;\n return u * Math.sqrt(1 + t * t);\n};\n\nmodule.exports = function nrm2 (x) {\n var i, tmp;\n var dx = x.data;\n var ox = x.stride[0];\n var px = x.offset;\n var sum = 0;\n for (i = x.shape[0] - 1; i >= 0; i--, px += ox) {\n tmp = dx[px];\n sum = hypot(sum, tmp);\n }\n return sum;\n};\n","'use strict';\n\nmodule.exports = function asum (x) {\n var i;\n var dx = x.data;\n var ox = x.stride[0];\n var px = x.offset;\n var sum = 0;\n for (i = x.shape[0] - 1; i >= 0; i--, px += ox) {\n sum += Math.abs(dx[px]);\n }\n return sum;\n};\n","'use strict';\n\nmodule.exports = function iamax (x) {\n var i, tmp, imax;\n var xmax = -Infinity;\n var dx = x.data;\n var ox = x.stride[0];\n var px = x.offset;\n var l = x.shape[0];\n for (i = 0; i < l; i++, px += ox) {\n tmp = Math.abs(dx[px]);\n if (tmp > xmax) {\n xmax = tmp;\n imax = i;\n }\n }\n return imax;\n};\n","'use strict';\n\nmodule.exporst = spmv;\n\nfunction spmv () {\n console.error('SPMV (symmetric packed matrix vector multiply) not yet implemented');\n}\n","'use strict';\n\nmodule.exporst = tbsv;\n\nfunction tbsv () {\n console.error('TBSV (triangular banded matrix solver) not yet implemented');\n}\n","'use strict';\n\nmodule.exports.gemv = require('./gemv');\nmodule.exports.gbmv = require('./gbmv');\nmodule.exports.symv = require('./symv');\nmodule.exports.sbmv = require('./sbmv');\nmodule.exports.spmv = require('./spmv');\nmodule.exports.trmv = require('./trmv');\nmodule.exports.tbmv = require('./tbmv');\nmodule.exports.trsv = require('./trsv');\nmodule.exports.tbsv = require('./tbsv');\nmodule.exports.tpsv = require('./tpsv');\nmodule.exports.ger = require('./ger');\nmodule.exports.syr = require('./syr');\nmodule.exports.spr = require('./spr');\nmodule.exports.syr2 = require('./syr2');\nmodule.exports.spr2 = require('./spr2');\n\nmodule.exports.trmv_lower = function (A, x) {\n console.warn('trmv_lower is deprecated. Please use the \\'isLower\\' flag with trmv.');\n return module.exports.trmv(A, x, true);\n};\n\nmodule.exports.trsv_lower = function (A, x) {\n console.warn('trsv_lower is deprecated. Please use the \\'isLower\\' flag with trsv.');\n return module.exports.trsv(A, x, true);\n};\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar activations = _interopRequireWildcard(require(\"../../activations\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayBlasLevel = require(\"ndarray-blas-level2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar activationProgramSources = _interopRequireWildcard(require(\"../../activations/programSources\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst matMulProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D A;\\nuniform sampler2D B;\\nuniform sampler2D C;\\nuniform bool addC;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 A_size = textureSize(A, 0);\\n ivec2 B_size = textureSize(B, 0);\\n int out_x = int(float(B_size[0]) * outTex.x);\\n int out_y = int(float(A_size[1]) * outTex.y);\\n int commonDim = A_size[0];\\n\\n float sum = 0.;\\n for (int i = 0; i < commonDim; ++i) {\\n float a = texelFetch(A, ivec2(i, out_y), 0).r;\\n float b = texelFetch(B, ivec2(out_x, i), 0).r;\\n sum += a * b;\\n }\\n\\n if (addC) {\\n sum += texelFetch(C, ivec2(out_x, 0), 0).r;\\n }\\n\\n outColor = vec4(sum);\\n}\\n\";\n\nclass Dense extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Dense';\n const {\n units = 1,\n activation = 'linear',\n input_dim = null,\n use_bias = true\n } = attrs;\n this.description = `${activation} activation, output dimensions: ${units}`;\n this.activation = activation;\n this.activationFunc = activations[this.activation];\n this.units = units;\n this.input_dim = input_dim;\n this.use_bias = use_bias;\n this.params = this.use_bias ? ['kernel', 'bias'] : ['kernel'];\n\n if (this.input_dim) {\n this.inputShape = [this.input_dim];\n }\n\n if (this.gpu) {\n this.matMulProgram = _WebGL.webgl2.compileProgram(matMulProgramSource);\n this.activationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.activation]);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.output = new _Tensor.default([], [this.units]);\n\n if (this.use_bias) {\n _ndarrayOps.default.assign(this.output.tensor, this.weights['bias'].tensor);\n }\n\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['kernel'].tensor.transpose(1, 0), x.tensor, 1, this.output.tensor);\n this.activationFunc(this.output);\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (this.activation !== 'linear' && !this.outputPreactiv) {\n this.outputPreactiv = new _Tensor.default([], [this.units]);\n this.outputPreactiv.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], [this.units]);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const matMulInputs = [{\n input: x,\n name: 'A'\n }, {\n input: this.weights['kernel'],\n name: 'B'\n }];\n\n if (this.use_bias) {\n matMulInputs.push({\n input: this.weights['bias'],\n name: 'C'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.activation === 'linear' ? this.output : this.outputPreactiv,\n inputs: matMulInputs,\n uniforms: [{\n value: this.use_bias ? 1 : 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n if (this.activation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.activationProgram,\n output: this.output,\n inputs: [{\n input: this.outputPreactiv,\n name: 'x'\n }]\n });\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = Dense;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar activations = _interopRequireWildcard(require(\"../../activations\"));\n\nvar activationProgramSources = _interopRequireWildcard(require(\"../../activations/programSources\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Activation extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Activation';\n const {\n activation = 'linear'\n } = attrs;\n this.activation = activation;\n this.activationFunc = activations[activation];\n this.description = `${this.activation}`;\n\n if (this.gpu) {\n this.program = _WebGL.webgl2.compileProgram(activationProgramSources[this.activation]);\n }\n }\n\n call(x) {\n if (this.activation === 'linear') {\n this.output = x;\n return this.output;\n }\n\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.output = new _Tensor.default(new x.arrayType(x.tensor.data), x.tensor.shape);\n this.activationFunc(this.output);\n }\n\n _callGPU(x) {\n if (!x.glTexture && !x.glTextureFragments) {\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], x.glTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n\n if (x.is1D) {\n this.output.is1D = x.is1D;\n } else if (x.is2DReshaped || x.is2DSquareReshaped) {\n if (x.is2DReshaped) {\n this.output.is2DReshaped = x.is2DReshaped;\n } else if (x.is2DSquareReshaped) {\n this.output.is2DSquareReshaped = x.is2DSquareReshaped;\n }\n\n this.output.originalShape = x.originalShape;\n this.output.indicesForReshaped = x.indicesForReshaped;\n }\n }\n\n _WebGL.webgl2.runProgram({\n program: this.program,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }],\n supportsTextureFragments: true\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = Activation;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Dropout extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Dropout';\n const {\n rate = 0.5\n } = attrs;\n this.description = `${rate}`;\n this.rate = Math.min(Math.max(0, rate), 1);\n }\n\n call(x) {\n this.output = x;\n return this.output;\n }\n\n}\n\nexports.default = Dropout;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass SpatialDropout1D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'SpatialDropout1D';\n const {\n p = 0.5\n } = attrs;\n this.description = `${p}`;\n this.p = Math.min(Math.max(0, p), 1);\n }\n\n call(x) {\n this.output = x;\n return this.output;\n }\n\n}\n\nexports.default = SpatialDropout1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass SpatialDropout2D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'SpatialDropout2D';\n const {\n rate = 0.5,\n data_format = 'channels_last'\n } = attrs;\n this.description = `${rate}`;\n this.rate = Math.min(Math.max(0, rate), 1);\n this.dataFormat = data_format;\n }\n\n call(x) {\n this.output = x;\n return this.output;\n }\n\n}\n\nexports.default = SpatialDropout2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass SpatialDropout3D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'SpatialDropout3D';\n const {\n rate = 0.5,\n data_format = 'channels_last'\n } = attrs;\n this.description = `${rate}`;\n this.rate = Math.min(Math.max(0, rate), 1);\n this.dataFormat = data_format;\n }\n\n call(x) {\n this.output = x;\n return this.output;\n }\n\n}\n\nexports.default = SpatialDropout3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst flattenProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform int outputSize;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n int out_x = int(float(outputSize) * outTex.x);\\n int out_y = 0;\\n\\n int i = int(floor(float(out_x) / float(inputCols)));\\n int j = int(mod(float(out_x), float(inputCols)));\\n outColor = vec4(texelFetch(x, ivec2(j, i), 0).r);\\n}\\n\";\nconst flattenFragmentsProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform int outputSize;\\nuniform int inputRows;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n int out_x = int(float(outputSize) * outTex.x);\\n int out_y = 0;\\n\\n int rowIndex = int(mod(floor(float(out_x) / float(inputCols)), float(inputRows)));\\n int colIndex = int(mod(float(out_x), float(inputCols)));\\n int fragmentIndex = int(floor(float(out_x) / (float(inputRows) * float(inputCols))));\\n colIndex += fragmentIndex * inputCols;\\n outColor = vec4(texelFetch(x, ivec2(colIndex, rowIndex), 0).r);\\n}\\n\";\n\nclass Flatten extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Flatten';\n\n if (this.gpu) {\n this.flattenProgram = _WebGL.webgl2.compileProgram(flattenProgramSource);\n this.flattenFragmentsProgram = _WebGL.webgl2.compileProgram(flattenFragmentsProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (x.tensor.shape.length <= 1) {\n this.output = x;\n } else {\n this.output = new _Tensor.default([], [x.tensor.shape.reduce((a, b) => a * b, 1)]);\n this.output.replaceTensorData(x.tensor.data);\n }\n }\n\n _callGPU(x) {\n if (!x.glTexture && !x.glTextureFragments) {\n if (x.tensor.shape.length <= 2) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n } else if (x.tensor.shape.length > 2 && !x.is2DReshaped) {\n x.reshapeTo2D();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], [x.glTextureShape.reduce((a, b) => a * b, 1)]);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (x.glTextureFragments) {\n x.convert2DRowFragmentedGLTextureToColStack();\n\n _WebGL.webgl2.runProgram({\n program: this.flattenFragmentsProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: this.output.glTextureShape[1],\n type: 'int',\n name: 'outputSize'\n }, {\n value: x.glTextureShape[0],\n type: 'int',\n name: 'inputRows'\n }, {\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }],\n supportsTextureFragments: true\n });\n\n x.removeGLTextureFragmentsAsColStack();\n } else {\n _WebGL.webgl2.runProgram({\n program: this.flattenProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: this.output.glTextureShape[1],\n type: 'int',\n name: 'outputSize'\n }, {\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }],\n supportsTextureFragments: true\n });\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = Flatten;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _last2 = _interopRequireDefault(require(\"lodash/last\"));\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass Reshape extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Reshape';\n const {\n target_shape = []\n } = attrs;\n this.targetShape = target_shape;\n this.description = `target shape: ${JSON.stringify(this.targetShape)}`;\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.targetShape.reduce((a, b) => a * b, 1) !== x.tensor.size) {\n this.throwError('The total size of new array must be unchanged in reshape layer.');\n }\n\n this.output = new _Tensor.default([], this.targetShape);\n this.output.replaceTensorData(x.tensor.data);\n }\n\n _createIndexMap() {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesRow = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesCol = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n\n if (this.inputShape.length === 2) {\n for (let i = 0; i < this.inputShape[0]; i++) {\n _ndarrayOps.default.assigns(indicesRow.tensor.pick(i, null), i);\n }\n } else if (this.inputShape.length === 3) {\n for (let i = 0; i < this.inputShape[0]; i++) {\n for (let j = 0; j < this.inputShape[1]; j++) {\n _ndarrayOps.default.assigns(indicesRow.tensor.pick(i, j, null), i * this.inputShape[1] + j);\n }\n }\n } else if (this.inputShape.length === 4) {\n for (let i = 0; i < this.inputShape[0]; i++) {\n for (let j = 0; j < this.inputShape[1]; j++) {\n for (let k = 0; k < this.inputShape[2]; k++) {\n _ndarrayOps.default.assigns(indicesRow.tensor.pick(i, j, k, null), i * this.inputShape[1] * this.inputShape[2] + j * this.inputShape[2] + k);\n }\n }\n }\n }\n\n for (let c = 0; c < (0, _last2.default)(this.inputShape); c++) {\n _ndarrayOps.default.assigns(indicesCol.tensor.pick(...Array(this.inputShape.length - 1).fill(null), c), c);\n }\n\n _ndarrayOps.default.muls(indices.tensor, indicesRow.tensor, (0, _last2.default)(this.inputShape));\n\n _ndarrayOps.default.addeq(indices.tensor, indicesCol.tensor);\n\n this.indexMap = new _Tensor.default([], this.targetShape, {\n type: Int32Array\n });\n this.indexMap.replaceTensorData(new Int32Array(indices.tensor.data));\n\n if (this.targetShape.length > 2) {\n this.indexMap.reshapeTo2D();\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n this.inputShape = x.tensor.shape;\n\n if (x.tensor.shape.length <= 2) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n } else if (x.tensor.shape.length > 2 && !x.is2DReshaped) {\n x.reshapeTo2D();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n } else if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n } else {\n this.inputShape = x.tensor.shape;\n }\n\n this._createIndexMap();\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.targetShape);\n\n if (this.targetShape.length > 2) {\n this.output.reshapeTo2D();\n }\n\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = Reshape;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _last2 = _interopRequireDefault(require(\"lodash/last\"));\n\nvar _range2 = _interopRequireDefault(require(\"lodash/range\"));\n\nvar _isEqual2 = _interopRequireDefault(require(\"lodash/isEqual\"));\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\n\nclass Permute extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Permute';\n const {\n dims = []\n } = attrs;\n this.description = `${JSON.stringify(dims)}`;\n this.dims = dims.map(dim => dim - 1);\n\n if (this.gpu) {\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n }\n }\n\n call(x) {\n if (x.tensor.shape.length <= 1 || (0, _isEqual2.default)((0, _range2.default)(x.tensor.shape.length), this.dims)) {\n this.output = x;\n return this.output;\n }\n\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.dims.length !== x.tensor.shape.length) {\n this.throwError('The specified dims permutation must match the number of dimensions.');\n }\n\n const outputShape = this.dims.map(i => x.tensor.shape[i]);\n this.output = new _Tensor.default([], outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor, x.tensor.transpose(...this.dims));\n }\n\n _createIndexMap() {\n if (this.indexMap) {\n return;\n }\n\n const indices = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesRow = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n const indicesCol = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n\n if (this.inputShape.length === 2) {\n for (let i = 0; i < this.inputShape[0]; i++) {\n _ndarrayOps.default.assigns(indicesRow.tensor.pick(i, null), i);\n }\n } else if (this.inputShape.length === 3) {\n for (let i = 0; i < this.inputShape[0]; i++) {\n for (let j = 0; j < this.inputShape[1]; j++) {\n _ndarrayOps.default.assigns(indicesRow.tensor.pick(i, j, null), i * this.inputShape[1] + j);\n }\n }\n } else if (this.inputShape.length === 4) {\n for (let i = 0; i < this.inputShape[0]; i++) {\n for (let j = 0; j < this.inputShape[1]; j++) {\n for (let k = 0; k < this.inputShape[2]; k++) {\n _ndarrayOps.default.assigns(indicesRow.tensor.pick(i, j, k, null), i * this.inputShape[1] * this.inputShape[2] + j * this.inputShape[2] + k);\n }\n }\n }\n }\n\n for (let c = 0; c < (0, _last2.default)(this.inputShape); c++) {\n _ndarrayOps.default.assigns(indicesCol.tensor.pick(...Array(this.inputShape.length - 1).fill(null), c), c);\n }\n\n _ndarrayOps.default.muls(indices.tensor, indicesRow.tensor, (0, _last2.default)(this.inputShape));\n\n _ndarrayOps.default.addeq(indices.tensor, indicesCol.tensor);\n\n const outputShape = this.dims.map(i => this.inputShape[i]);\n this.indexMap = new _Tensor.default([], outputShape, {\n type: Int32Array\n });\n\n _ndarrayOps.default.assign(this.indexMap.tensor, indices.tensor.transpose(...this.dims));\n\n if (outputShape.length > 2) {\n this.indexMap.reshapeTo2D();\n }\n\n this.indexMap.createGLTexture({\n type: '2d',\n format: 'int'\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n this.inputShape = x.tensor.shape;\n\n if (x.tensor.shape.length <= 2) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n } else if (x.tensor.shape.length > 2 && !x.is2DReshaped) {\n x.reshapeTo2D();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n } else if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n } else {\n this.inputShape = x.tensor.shape;\n }\n\n this._createIndexMap();\n\n if (!this.output) {\n const outputShape = this.dims.map(i => this.inputShape[i]);\n this.output = new _Tensor.default([], outputShape);\n\n if (outputShape.length > 2) {\n this.output.reshapeTo2D();\n }\n\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMap,\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = Permute;","'use strict'\n\nvar bits = require('bit-twiddle')\nvar dup = require('dup')\n\n//Legacy pool support\nif(!global.__TYPEDARRAY_POOL) {\n global.__TYPEDARRAY_POOL = {\n UINT8 : dup([32, 0])\n , UINT16 : dup([32, 0])\n , UINT32 : dup([32, 0])\n , INT8 : dup([32, 0])\n , INT16 : dup([32, 0])\n , INT32 : dup([32, 0])\n , FLOAT : dup([32, 0])\n , DOUBLE : dup([32, 0])\n , DATA : dup([32, 0])\n , UINT8C : dup([32, 0])\n , BUFFER : dup([32, 0])\n }\n}\n\nvar hasUint8C = (typeof Uint8ClampedArray) !== 'undefined'\nvar POOL = global.__TYPEDARRAY_POOL\n\n//Upgrade pool\nif(!POOL.UINT8C) {\n POOL.UINT8C = dup([32, 0])\n}\nif(!POOL.BUFFER) {\n POOL.BUFFER = dup([32, 0])\n}\n\n//New technique: Only allocate from ArrayBufferView and Buffer\nvar DATA = POOL.DATA\n , BUFFER = POOL.BUFFER\n\nexports.free = function free(array) {\n if(Buffer.isBuffer(array)) {\n BUFFER[bits.log2(array.length)].push(array)\n } else {\n if(Object.prototype.toString.call(array) !== '[object ArrayBuffer]') {\n array = array.buffer\n }\n if(!array) {\n return\n }\n var n = array.length || array.byteLength\n var log_n = bits.log2(n)|0\n DATA[log_n].push(array)\n }\n}\n\nfunction freeArrayBuffer(buffer) {\n if(!buffer) {\n return\n }\n var n = buffer.length || buffer.byteLength\n var log_n = bits.log2(n)\n DATA[log_n].push(buffer)\n}\n\nfunction freeTypedArray(array) {\n freeArrayBuffer(array.buffer)\n}\n\nexports.freeUint8 =\nexports.freeUint16 =\nexports.freeUint32 =\nexports.freeInt8 =\nexports.freeInt16 =\nexports.freeInt32 =\nexports.freeFloat32 = \nexports.freeFloat =\nexports.freeFloat64 = \nexports.freeDouble = \nexports.freeUint8Clamped = \nexports.freeDataView = freeTypedArray\n\nexports.freeArrayBuffer = freeArrayBuffer\n\nexports.freeBuffer = function freeBuffer(array) {\n BUFFER[bits.log2(array.length)].push(array)\n}\n\nexports.malloc = function malloc(n, dtype) {\n if(dtype === undefined || dtype === 'arraybuffer') {\n return mallocArrayBuffer(n)\n } else {\n switch(dtype) {\n case 'uint8':\n return mallocUint8(n)\n case 'uint16':\n return mallocUint16(n)\n case 'uint32':\n return mallocUint32(n)\n case 'int8':\n return mallocInt8(n)\n case 'int16':\n return mallocInt16(n)\n case 'int32':\n return mallocInt32(n)\n case 'float':\n case 'float32':\n return mallocFloat(n)\n case 'double':\n case 'float64':\n return mallocDouble(n)\n case 'uint8_clamped':\n return mallocUint8Clamped(n)\n case 'buffer':\n return mallocBuffer(n)\n case 'data':\n case 'dataview':\n return mallocDataView(n)\n\n default:\n return null\n }\n }\n return null\n}\n\nfunction mallocArrayBuffer(n) {\n var n = bits.nextPow2(n)\n var log_n = bits.log2(n)\n var d = DATA[log_n]\n if(d.length > 0) {\n return d.pop()\n }\n return new ArrayBuffer(n)\n}\nexports.mallocArrayBuffer = mallocArrayBuffer\n\nfunction mallocUint8(n) {\n return new Uint8Array(mallocArrayBuffer(n), 0, n)\n}\nexports.mallocUint8 = mallocUint8\n\nfunction mallocUint16(n) {\n return new Uint16Array(mallocArrayBuffer(2*n), 0, n)\n}\nexports.mallocUint16 = mallocUint16\n\nfunction mallocUint32(n) {\n return new Uint32Array(mallocArrayBuffer(4*n), 0, n)\n}\nexports.mallocUint32 = mallocUint32\n\nfunction mallocInt8(n) {\n return new Int8Array(mallocArrayBuffer(n), 0, n)\n}\nexports.mallocInt8 = mallocInt8\n\nfunction mallocInt16(n) {\n return new Int16Array(mallocArrayBuffer(2*n), 0, n)\n}\nexports.mallocInt16 = mallocInt16\n\nfunction mallocInt32(n) {\n return new Int32Array(mallocArrayBuffer(4*n), 0, n)\n}\nexports.mallocInt32 = mallocInt32\n\nfunction mallocFloat(n) {\n return new Float32Array(mallocArrayBuffer(4*n), 0, n)\n}\nexports.mallocFloat32 = exports.mallocFloat = mallocFloat\n\nfunction mallocDouble(n) {\n return new Float64Array(mallocArrayBuffer(8*n), 0, n)\n}\nexports.mallocFloat64 = exports.mallocDouble = mallocDouble\n\nfunction mallocUint8Clamped(n) {\n if(hasUint8C) {\n return new Uint8ClampedArray(mallocArrayBuffer(n), 0, n)\n } else {\n return mallocUint8(n)\n }\n}\nexports.mallocUint8Clamped = mallocUint8Clamped\n\nfunction mallocDataView(n) {\n return new DataView(mallocArrayBuffer(n), 0, n)\n}\nexports.mallocDataView = mallocDataView\n\nfunction mallocBuffer(n) {\n n = bits.nextPow2(n)\n var log_n = bits.log2(n)\n var cache = BUFFER[log_n]\n if(cache.length > 0) {\n return cache.pop()\n }\n return new Buffer(n)\n}\nexports.mallocBuffer = mallocBuffer\n\nexports.clearCache = function clearCache() {\n for(var i=0; i<32; ++i) {\n POOL.UINT8[i].length = 0\n POOL.UINT16[i].length = 0\n POOL.UINT32[i].length = 0\n POOL.INT8[i].length = 0\n POOL.INT16[i].length = 0\n POOL.INT32[i].length = 0\n POOL.FLOAT[i].length = 0\n POOL.DOUBLE[i].length = 0\n POOL.UINT8C[i].length = 0\n DATA[i].length = 0\n BUFFER[i].length = 0\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayUnsqueeze = _interopRequireDefault(require(\"ndarray-unsqueeze\"));\n\nvar _ndarrayTile = _interopRequireDefault(require(\"ndarray-tile\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst programSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nout vec4 outColor;\\n\\nvoid main() {\\n outColor = texture(x, vec2(outTex.x, 0));\\n}\\n\";\n\nclass RepeatVector extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'RepeatVector';\n const {\n n = 1\n } = attrs;\n this.n = n;\n this.description = `n = ${n}`;\n\n if (this.gpu) {\n this.program = _WebGL.webgl2.compileProgram(programSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (x.tensor.shape.length !== 1) {\n this.throwError('Only 1D tensor inputs allowed.');\n }\n\n this.output = new _Tensor.default([], [this.n, x.tensor.shape[1]]);\n this.output.tensor = (0, _ndarrayTile.default)((0, _ndarrayUnsqueeze.default)(x.tensor, 0), [this.n, 1]);\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], [this.n, x.glTextureShape[1]]);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.program,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = RepeatVector;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Dense\", {\n enumerable: true,\n get: function () {\n return _Dense.default;\n }\n});\nObject.defineProperty(exports, \"Activation\", {\n enumerable: true,\n get: function () {\n return _Activation.default;\n }\n});\nObject.defineProperty(exports, \"Dropout\", {\n enumerable: true,\n get: function () {\n return _Dropout.default;\n }\n});\nObject.defineProperty(exports, \"SpatialDropout1D\", {\n enumerable: true,\n get: function () {\n return _SpatialDropout1D.default;\n }\n});\nObject.defineProperty(exports, \"SpatialDropout2D\", {\n enumerable: true,\n get: function () {\n return _SpatialDropout2D.default;\n }\n});\nObject.defineProperty(exports, \"SpatialDropout3D\", {\n enumerable: true,\n get: function () {\n return _SpatialDropout3D.default;\n }\n});\nObject.defineProperty(exports, \"Flatten\", {\n enumerable: true,\n get: function () {\n return _Flatten.default;\n }\n});\nObject.defineProperty(exports, \"Reshape\", {\n enumerable: true,\n get: function () {\n return _Reshape.default;\n }\n});\nObject.defineProperty(exports, \"Permute\", {\n enumerable: true,\n get: function () {\n return _Permute.default;\n }\n});\nObject.defineProperty(exports, \"RepeatVector\", {\n enumerable: true,\n get: function () {\n return _RepeatVector.default;\n }\n});\n\nvar _Dense = _interopRequireDefault(require(\"./Dense\"));\n\nvar _Activation = _interopRequireDefault(require(\"./Activation\"));\n\nvar _Dropout = _interopRequireDefault(require(\"./Dropout\"));\n\nvar _SpatialDropout1D = _interopRequireDefault(require(\"./SpatialDropout1D\"));\n\nvar _SpatialDropout2D = _interopRequireDefault(require(\"./SpatialDropout2D\"));\n\nvar _SpatialDropout3D = _interopRequireDefault(require(\"./SpatialDropout3D\"));\n\nvar _Flatten = _interopRequireDefault(require(\"./Flatten\"));\n\nvar _Reshape = _interopRequireDefault(require(\"./Reshape\"));\n\nvar _Permute = _interopRequireDefault(require(\"./Permute\"));\n\nvar _RepeatVector = _interopRequireDefault(require(\"./RepeatVector\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst programSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform sampler2D embeddings;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 x_size = textureSize(x, 0);\\n ivec2 embeddings_size = textureSize(embeddings, 0);\\n int out_x = int(float(embeddings_size[0]) * outTex.x);\\n int out_y = int(float(x_size[0]) * outTex.y);\\n\\n int index = int(texelFetch(x, ivec2(out_y, 0), 0).r);\\n outColor = texelFetch(embeddings, ivec2(out_x, index), 0);\\n}\\n\";\n\nclass Embedding extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Embedding';\n const {\n input_dim = 1,\n output_dim = 1,\n input_length = 0,\n mask_zero = false\n } = attrs;\n this.description = `output dimensions: ${output_dim}`;\n this.inputDim = input_dim;\n this.outputDim = output_dim;\n this.inputLength = input_length;\n this.maskZero = mask_zero;\n this.params = ['embeddings'];\n\n if (this.gpu) {\n this.program = _WebGL.webgl2.compileProgram(programSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.output = new _Tensor.default([], [x.tensor.shape[0], this.weights['embeddings'].tensor.shape[1]]);\n\n for (let i = 0, len = x.tensor.shape[0]; i < len; i++) {\n _ndarrayOps.default.assign(this.output.tensor.pick(i, null), this.weights['embeddings'].tensor.pick(x.tensor.get(i), null));\n }\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], [x.glTextureShape[1], this.weights['embeddings'].glTextureShape[1]]);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.program,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.weights['embeddings'],\n name: 'embeddings'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = Embedding;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Embedding\", {\n enumerable: true,\n get: function () {\n return _Embedding.default;\n }\n});\n\nvar _Embedding = _interopRequireDefault(require(\"./Embedding\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _range2 = _interopRequireDefault(require(\"lodash/range\"));\n\nvar _isEqual2 = _interopRequireDefault(require(\"lodash/isEqual\"));\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass _Merge extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = '_Merge';\n this.isMergeLayer = true;\n }\n\n call(inputs) {\n if (this.gpu) {\n this._callGPU(inputs);\n } else {\n const valid = this._validateInputs(inputs);\n\n if (!valid) {\n this.throwError('Invalid inputs to call method.');\n }\n\n this._callCPU(inputs);\n }\n\n return this.output;\n }\n\n _validateInputs(inputs) {\n const shapes = inputs.map(x => x.tensor.shape.slice());\n\n if (['sum', 'diff', 'mul', 'ave', 'max', 'min'].indexOf(this.mode) > -1) {\n if (!shapes.every(shape => (0, _isEqual2.default)(shape, shapes[0]))) {\n this.throwError(`All input shapes must be the same for mode ${this.mode}.`);\n }\n }\n\n if (this.mode === 'dot') {\n if (inputs.length !== 2) {\n this.throwError(`Exactly 2 inputs required for mode ${this.mode}.`);\n }\n\n if (this.dotAxes[0] < 0) {\n this.dotAxes[0] = shapes[0].length + this.dotAxes[0];\n }\n\n if (this.dotAxes[1] < 0) {\n this.dotAxes[1] = shapes[1].length + this.dotAxes[1];\n }\n\n if (shapes[0][this.dotAxes[0]] !== shapes[1][this.dotAxes[1]]) {\n this.throwError('Dimensions incompatibility using dot mode.');\n }\n } else if (this.mode === 'concat') {\n let nonConcatShapes = shapes.slice();\n\n let _concatAxis = this.concatAxis < 0 ? nonConcatShapes[0].length + this.concatAxis : this.concatAxis;\n\n if (this.concatAxis === 0) _concatAxis = 0;\n (0, _range2.default)(nonConcatShapes.length).forEach(i => {\n nonConcatShapes[i].splice(_concatAxis, 1);\n });\n\n if (!nonConcatShapes.every(shape => (0, _isEqual2.default)(shape, nonConcatShapes[0]))) {\n this.throwError('In concat mode, all shapes must be the same except along the concat axis.');\n }\n }\n\n return true;\n }\n\n _callCPU() {}\n\n _callGPU(inputs) {\n inputs.forEach(input => {\n if (!input.glTexture && !input.glTextureFragments) {\n input.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n });\n\n if (!this.output) {\n this.output = new _Tensor.default([], inputs[0].glTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n\n if (inputs[0].is1D) {\n this.output.is1D = inputs[0].is1D;\n } else if (inputs[0].is2DReshaped || inputs[0].is2DSquareReshaped) {\n if (inputs[0].is2DReshaped) {\n this.output.is2DReshaped = inputs[0].is2DReshaped;\n } else if (inputs[0].is2DSquareReshaped) {\n this.output.is2DSquareReshaped = inputs[0].is2DSquareReshaped;\n }\n\n this.output.originalShape = inputs[0].originalShape.slice();\n this.output.indicesForReshaped = inputs[0].indicesForReshaped;\n }\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mergeProgram,\n output: this.output,\n inputs: inputs.map((input, i) => ({\n input,\n name: `inputs[${i}]`\n })),\n supportsTextureFragments: true\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = _Merge;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Merge2 = _interopRequireDefault(require(\"./_Merge\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Add extends _Merge2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Add';\n this.mode = 'sum';\n }\n\n _callCPU(inputs) {\n const outputShape = inputs[0].tensor.shape.slice();\n this.output = new _Tensor.default([], outputShape);\n\n for (let i = 0; i < inputs.length; i++) {\n _ndarrayOps.default.addeq(this.output.tensor, inputs[i].tensor);\n }\n }\n\n _callGPU(inputs) {\n if (!this.mergeProgram) {\n const shape = inputs[0].glTextureFragments ? inputs[0].glTextureFragmentShape : inputs[0].glTextureShape;\n const mergeProgramSource = (0, _createGLSLProgram.default)('add', inputs.length, shape);\n this.mergeProgram = _WebGL.webgl2.compileProgram(mergeProgramSource);\n }\n\n super._callGPU(inputs);\n }\n\n}\n\nexports.default = Add;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Merge2 = _interopRequireDefault(require(\"./_Merge\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Subtract extends _Merge2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Subtract';\n this.mode = 'diff';\n }\n\n _callCPU(inputs) {\n if (inputs.length !== 2) {\n this.throwError('Inputs should be an array of 2 Tensors.');\n }\n\n const outputShape = inputs[0].tensor.shape.slice();\n this.output = new _Tensor.default([], outputShape);\n\n _ndarrayOps.default.sub(this.output.tensor, inputs[0].tensor, inputs[1].tensor);\n }\n\n _callGPU(inputs) {\n if (!this.mergeProgram) {\n const shape = inputs[0].glTextureFragments ? inputs[0].glTextureFragmentShape : inputs[0].glTextureShape;\n const mergeProgramSource = (0, _createGLSLProgram.default)('subtract', inputs.length, shape);\n this.mergeProgram = _WebGL.webgl2.compileProgram(mergeProgramSource);\n }\n\n super._callGPU(inputs);\n }\n\n}\n\nexports.default = Subtract;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Merge2 = _interopRequireDefault(require(\"./_Merge\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Multiply extends _Merge2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Multiply';\n this.mode = 'mul';\n }\n\n _callCPU(inputs) {\n const outputShape = inputs[0].tensor.shape.slice();\n this.output = new _Tensor.default([], outputShape);\n\n _ndarrayOps.default.assigns(this.output.tensor, 1);\n\n for (let i = 0; i < inputs.length; i++) {\n _ndarrayOps.default.muleq(this.output.tensor, inputs[i].tensor);\n }\n }\n\n _callGPU(inputs) {\n if (!this.mergeProgram) {\n const shape = inputs[0].glTextureFragments ? inputs[0].glTextureFragmentShape : inputs[0].glTextureShape;\n const mergeProgramSource = (0, _createGLSLProgram.default)('multiply', inputs.length, shape);\n this.mergeProgram = _WebGL.webgl2.compileProgram(mergeProgramSource);\n }\n\n super._callGPU(inputs);\n }\n\n}\n\nexports.default = Multiply;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Merge2 = _interopRequireDefault(require(\"./_Merge\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Average extends _Merge2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Average';\n this.mode = 'ave';\n }\n\n _callCPU(inputs) {\n const outputShape = inputs[0].tensor.shape.slice();\n this.output = new _Tensor.default([], outputShape);\n\n for (let i = 0; i < inputs.length; i++) {\n _ndarrayOps.default.addeq(this.output.tensor, inputs[i].tensor);\n }\n\n _ndarrayOps.default.divseq(this.output.tensor, inputs.length);\n }\n\n _callGPU(inputs) {\n if (!this.mergeProgram) {\n const shape = inputs[0].glTextureFragments ? inputs[0].glTextureFragmentShape : inputs[0].glTextureShape;\n const mergeProgramSource = (0, _createGLSLProgram.default)('average', inputs.length, shape);\n this.mergeProgram = _WebGL.webgl2.compileProgram(mergeProgramSource);\n }\n\n super._callGPU(inputs);\n }\n\n}\n\nexports.default = Average;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Merge2 = _interopRequireDefault(require(\"./_Merge\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Maximum extends _Merge2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Maximum';\n this.mode = 'max';\n }\n\n _callCPU(inputs) {\n const outputShape = inputs[0].tensor.shape.slice();\n this.output = new _Tensor.default([], outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor, inputs[0].tensor);\n\n for (let i = 1; i < inputs.length; i++) {\n _ndarrayOps.default.maxeq(this.output.tensor, inputs[i].tensor);\n }\n }\n\n _callGPU(inputs) {\n if (!this.mergeProgram) {\n const shape = inputs[0].glTextureFragments ? inputs[0].glTextureFragmentShape : inputs[0].glTextureShape;\n const mergeProgramSource = (0, _createGLSLProgram.default)('maximum', inputs.length, shape);\n this.mergeProgram = _WebGL.webgl2.compileProgram(mergeProgramSource);\n }\n\n super._callGPU(inputs);\n }\n\n}\n\nexports.default = Maximum;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Merge2 = _interopRequireDefault(require(\"./_Merge\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Minimum extends _Merge2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Minimum';\n this.mode = 'min';\n }\n\n _callCPU(inputs) {\n const outputShape = inputs[0].tensor.shape.slice();\n this.output = new _Tensor.default([], outputShape);\n\n _ndarrayOps.default.assign(this.output.tensor, inputs[0].tensor);\n\n for (let i = 1; i < inputs.length; i++) {\n _ndarrayOps.default.mineq(this.output.tensor, inputs[i].tensor);\n }\n }\n\n _callGPU(inputs) {\n if (!this.mergeProgram) {\n const shape = inputs[0].glTextureFragments ? inputs[0].glTextureFragmentShape : inputs[0].glTextureShape;\n const mergeProgramSource = (0, _createGLSLProgram.default)('minimum', inputs.length, shape);\n this.mergeProgram = _WebGL.webgl2.compileProgram(mergeProgramSource);\n }\n\n super._callGPU(inputs);\n }\n\n}\n\nexports.default = Minimum;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _sum2 = _interopRequireDefault(require(\"lodash/sum\"));\n\nvar _Merge2 = _interopRequireDefault(require(\"./_Merge\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../../webgl/dynamic/createGLSLProgram\"));\n\nvar tensorUtils = _interopRequireWildcard(require(\"../../utils/tensorUtils\"));\n\nvar _ndarrayConcatRows = _interopRequireDefault(require(\"ndarray-concat-rows\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Concatenate extends _Merge2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Concatenate';\n this.mode = 'concat';\n const {\n axis = -1\n } = attrs;\n this.concatAxis = axis <= 0 ? axis : axis - 1;\n }\n\n _callCPU(inputs) {\n const outputShape = inputs[0].tensor.shape.slice();\n\n const _concatAxis = this.concatAxis < 0 ? outputShape.length + this.concatAxis : this.concatAxis;\n\n inputs.slice(1, inputs.length).forEach(x => {\n const d = x.tensor.shape.slice()[_concatAxis];\n\n outputShape[_concatAxis] += d;\n });\n this.output = new _Tensor.default([], outputShape);\n\n if (_concatAxis === 0) {\n (0, _ndarrayConcatRows.default)(this.output.tensor, inputs.map(x => x.tensor));\n } else {\n let dimsAxisSwap = [_concatAxis];\n\n for (let i = 0; i < inputs[0].tensor.shape.length; i++) {\n if (i !== _concatAxis) dimsAxisSwap.push(i);\n }\n\n (0, _ndarrayConcatRows.default)(this.output.tensor.transpose(...dimsAxisSwap), inputs.map(x => x.tensor.transpose(...dimsAxisSwap)));\n }\n }\n\n _callGPU(inputs) {\n inputs.forEach(input => {\n if (!input.glTexture && !input.glTextureFragments) {\n input.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n });\n const outputShape = inputs[0].glTextureShape.slice();\n let _concatAxis = 1;\n\n if (inputs[0].is2DReshaped) {\n if (this.concatAxis === -1 || this.concatAxis === inputs[0].originalShape.length - 1) {\n _concatAxis = 1;\n } else {\n this.throwError('specified axis not supported for now.');\n }\n } else {\n if (this.concatAxis === -1 || this.concatAxis === 1) {\n _concatAxis = 1;\n } else if (this.concatAxis === -2 || this.concatAxis === 0) {\n _concatAxis = 0;\n } else {\n this.throwError('specified axis not supported for now.');\n }\n }\n\n outputShape[_concatAxis] = (0, _sum2.default)(inputs.map(input => input.glTextureShape[_concatAxis]));\n\n if (!this.output) {\n this.output = new _Tensor.default([], outputShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: _concatAxis === 1\n });\n\n if (inputs[0].is1D) {\n this.output.is1D = inputs[0].is1D;\n } else if (inputs[0].is2DReshaped) {\n this.output.is2DReshaped = inputs[0].is2DReshaped;\n this.output.originalShape = inputs[0].originalShape.slice();\n\n const _concatAxis = this.concatAxis < 0 ? this.output.originalShape.length + this.concatAxis : this.concatAxis;\n\n this.output.originalShape[_concatAxis] = (0, _sum2.default)(inputs.map(input => input.originalShape[_concatAxis]));\n this.output.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.output.originalShape, false, _concatAxis);\n }\n }\n\n if (!this.mergeProgram) {\n const outputShape = this.output.glTextureFragments ? this.output.glTextureFragmentShape : this.output.glTextureShape;\n const mergeProgramSource = (0, _createGLSLProgram.default)('concatenate', inputs.length, inputs.map(input => input.glTextureShape), outputShape, _concatAxis);\n this.mergeProgram = _WebGL.webgl2.compileProgram(mergeProgramSource);\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mergeProgram,\n output: this.output,\n inputs: inputs.map((input, i) => ({\n input,\n name: `inputs[${i}]`\n })),\n supportsTextureFragments: true\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = Concatenate;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Merge2 = _interopRequireDefault(require(\"./_Merge\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayGemm = _interopRequireDefault(require(\"ndarray-gemm\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst mergeProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D input1;\\nuniform sampler2D input2;\\nuniform int rows;\\nuniform int cols;\\nuniform int dotAxis1;\\nuniform int dotAxis2;\\nuniform int commonDim;\\nuniform bool normalize;\\nout vec4 outColor;\\n\\nvoid main() {\\n int out_x = int(float(cols) * outTex.x);\\n int out_y = int(float(rows) * outTex.y);\\n\\n float sum = 0.;\\n float a = 0.;\\n float b = 0.;\\n float norm1 = 0.;\\n float norm2 = 0.;\\n\\n for (int i = 0; i < commonDim; ++i) {\\n if (dotAxis1 == 0 && dotAxis2 == 0) {\\n a = texelFetch(input1, ivec2(out_y, i), 0).r;\\n b = texelFetch(input2, ivec2(out_x, i), 0).r;\\n } else if (dotAxis1 == 1 && dotAxis2 == 1) {\\n a = texelFetch(input1, ivec2(i, out_y), 0).r;\\n b = texelFetch(input2, ivec2(i, out_x), 0).r;\\n }\\n\\n sum += a * b;\\n\\n if (normalize) {\\n norm1 += a * a;\\n norm2 += b * b;\\n }\\n }\\n\\n if (normalize) {\\n sum /= sqrt(norm1) * sqrt(norm2);\\n }\\n\\n outColor = vec4(sum);\\n}\\n\";\n\nclass Dot extends _Merge2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Dot';\n this.mode = 'dot';\n const {\n axes = -1,\n normalize = false\n } = attrs;\n\n if (Array.isArray(axes)) {\n this.dotAxes = [axes[0] <= 0 ? axes[0] : axes[0] - 1, axes[1] <= 0 ? axes[1] : axes[1] - 1];\n } else {\n this.dotAxes = [axes <= 0 ? axes : axes - 1, axes <= 0 ? axes : axes - 1];\n }\n\n this.normalize = normalize;\n\n if (this.gpu) {\n this.mergeProgram = _WebGL.webgl2.compileProgram(mergeProgramSource);\n }\n }\n\n _calcOutputShape(inputShapes) {\n let shape1 = inputShapes[0].slice();\n let shape2 = inputShapes[1].slice();\n shape1.splice(this.dotAxes[0], 1);\n shape2.splice(this.dotAxes[1], 1);\n this.outputShape = shape1.concat(shape2);\n\n if (this.outputShape.length === 1) {\n this.outputShape.push(1);\n }\n }\n\n _callCPU(inputs) {\n this._calcOutputShape([inputs[0].tensor.shape, inputs[1].tensor.shape]);\n\n this.output = new _Tensor.default([], this.outputShape);\n\n if (inputs[0].tensor.shape.length === 2 && inputs[1].tensor.shape.length === 2) {\n if (this.dotAxes[0] === 0 && this.dotAxes[1] === 0) {\n if (this.normalize) {\n for (let i = 0; i < inputs[0].tensor.shape[1]; i++) {\n _ndarrayOps.default.divseq(inputs[0].tensor.pick(null, i), _ndarrayOps.default.norm2(inputs[0].tensor.pick(null, i)));\n }\n\n for (let i = 0; i < inputs[1].tensor.shape[1]; i++) {\n _ndarrayOps.default.divseq(inputs[1].tensor.pick(null, i), _ndarrayOps.default.norm2(inputs[1].tensor.pick(null, i)));\n }\n }\n\n (0, _ndarrayGemm.default)(this.output.tensor, inputs[0].tensor.transpose(1, 0), inputs[1].tensor);\n } else if (this.dotAxes[0] === 1 && this.dotAxes[1] === 1) {\n if (this.normalize) {\n for (let i = 0; i < inputs[0].tensor.shape[0]; i++) {\n _ndarrayOps.default.divseq(inputs[0].tensor.pick(i, null), _ndarrayOps.default.norm2(inputs[0].tensor.pick(i, null)));\n }\n\n for (let i = 0; i < inputs[1].tensor.shape[0]; i++) {\n _ndarrayOps.default.divseq(inputs[1].tensor.pick(i, null), _ndarrayOps.default.norm2(inputs[1].tensor.pick(i, null)));\n }\n }\n\n (0, _ndarrayGemm.default)(this.output.tensor, inputs[0].tensor, inputs[1].tensor.transpose(1, 0));\n }\n } else {\n this.throwError('dot mode for 3+ dim tensors not yet implemented.');\n }\n }\n\n _callGPU(inputs) {\n inputs.forEach(input => {\n if (!input.glTexture && !input.glTextureFragments) {\n input.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n });\n\n this._calcOutputShape([inputs[0].glTextureShape, inputs[1].glTextureShape]);\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const commonDim = inputs[0].glTextureShape[this.dotAxes[0]];\n\n _WebGL.webgl2.runProgram({\n program: this.mergeProgram,\n output: this.output,\n inputs: [{\n input: inputs[0],\n name: 'input1'\n }, {\n input: inputs[1],\n name: 'input2'\n }],\n uniforms: [{\n value: this.output.glTextureShape[0],\n type: 'int',\n name: 'rows'\n }, {\n value: this.output.glTextureShape[1],\n type: 'int',\n name: 'cols'\n }, {\n value: this.dotAxes[0],\n type: 'int',\n name: 'dotAxis1'\n }, {\n value: this.dotAxes[1],\n type: 'int',\n name: 'dotAxis2'\n }, {\n value: commonDim,\n type: 'int',\n name: 'commonDim'\n }, {\n value: +this.normalize,\n type: 'bool',\n name: 'normalize'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = Dot;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Add\", {\n enumerable: true,\n get: function () {\n return _Add.default;\n }\n});\nObject.defineProperty(exports, \"Subtract\", {\n enumerable: true,\n get: function () {\n return _Subtract.default;\n }\n});\nObject.defineProperty(exports, \"Multiply\", {\n enumerable: true,\n get: function () {\n return _Multiply.default;\n }\n});\nObject.defineProperty(exports, \"Average\", {\n enumerable: true,\n get: function () {\n return _Average.default;\n }\n});\nObject.defineProperty(exports, \"Maximum\", {\n enumerable: true,\n get: function () {\n return _Maximum.default;\n }\n});\nObject.defineProperty(exports, \"Minimum\", {\n enumerable: true,\n get: function () {\n return _Minimum.default;\n }\n});\nObject.defineProperty(exports, \"Concatenate\", {\n enumerable: true,\n get: function () {\n return _Concatenate.default;\n }\n});\nObject.defineProperty(exports, \"Dot\", {\n enumerable: true,\n get: function () {\n return _Dot.default;\n }\n});\n\nvar _Add = _interopRequireDefault(require(\"./Add\"));\n\nvar _Subtract = _interopRequireDefault(require(\"./Subtract\"));\n\nvar _Multiply = _interopRequireDefault(require(\"./Multiply\"));\n\nvar _Average = _interopRequireDefault(require(\"./Average\"));\n\nvar _Maximum = _interopRequireDefault(require(\"./Maximum\"));\n\nvar _Minimum = _interopRequireDefault(require(\"./Minimum\"));\n\nvar _Concatenate = _interopRequireDefault(require(\"./Concatenate\"));\n\nvar _Dot = _interopRequireDefault(require(\"./Dot\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass GaussianDropout extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'GaussianDropout';\n const {\n rate = 0.5\n } = attrs;\n this.rate = Math.min(Math.max(0, rate), 1);\n }\n\n call(x) {\n this.output = x;\n return this.output;\n }\n\n}\n\nexports.default = GaussianDropout;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass GaussianNoise extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'GaussianNoise';\n const {\n stddev = 0\n } = attrs;\n this.stddev = stddev;\n }\n\n call(x) {\n this.output = x;\n return this.output;\n }\n\n}\n\nexports.default = GaussianNoise;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"GaussianDropout\", {\n enumerable: true,\n get: function () {\n return _GaussianDropout.default;\n }\n});\nObject.defineProperty(exports, \"GaussianNoise\", {\n enumerable: true,\n get: function () {\n return _GaussianNoise.default;\n }\n});\n\nvar _GaussianDropout = _interopRequireDefault(require(\"./GaussianDropout\"));\n\nvar _GaussianNoise = _interopRequireDefault(require(\"./GaussianNoise\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst programSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D X;\\nuniform isampler2D normAxisIndexMap;\\nuniform sampler2D gamma;\\nuniform sampler2D beta;\\nuniform sampler2D mean;\\nuniform sampler2D std;\\nuniform float epsilon;\\nuniform bool scale;\\nuniform bool center;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(X, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\nint normAxisIndex = texelFetch(normAxisIndexMap, ivec2(out_x, out_y), 0).r;\\n\\n float _x = texelFetch(X, ivec2(out_x, out_y), 0).r;\\n float _mean = texelFetch(mean, ivec2(normAxisIndex, 0), 0).r;\\n float _std = texelFetch(std, ivec2(normAxisIndex, 0), 0).r;\\n\\n float _gamma = 1.0;\\n if (scale) {\\n _gamma = texelFetch(gamma, ivec2(normAxisIndex, 0), 0).r;\\n }\\n\\n float _beta = 0.0;\\n if (center) {\\n _beta = texelFetch(beta, ivec2(normAxisIndex, 0), 0).r;\\n }\\n\\n float sum = _beta + _gamma * (_x - _mean) / sqrt(_std + epsilon);\\n\\n outColor = vec4(sum);\\n}\\n\";\n\nclass BatchNormalization extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'BatchNormalization';\n const {\n epsilon = 0.001,\n axis = -1,\n center = true,\n scale = true\n } = attrs;\n this.epsilon = epsilon;\n this.center = center;\n this.scale = scale;\n this.axis = axis;\n this.axisNormalized = false;\n this.params = [];\n\n if (this.scale) {\n this.params.push('gamma');\n }\n\n if (this.center) {\n this.params.push('beta');\n }\n\n this.params = this.params.concat(['moving_mean', 'moving_variance']);\n\n if (this.gpu) {\n this.program = _WebGL.webgl2.compileProgram(programSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (!this.axisNormalized) {\n this.axis = this.axis < 0 ? x.tensor.shape.length + this.axis : this.axis - 1;\n this.axisNormalized = true;\n }\n\n let broadcast = [];\n\n for (let d = 0; d < x.tensor.shape.length; d++) {\n if (d === this.axis) broadcast.push(1);else broadcast.push(null);\n }\n\n let _gamma = new _Tensor.default([], x.tensor.shape);\n\n let _beta = new _Tensor.default([], x.tensor.shape);\n\n for (let i = 0; i < x.tensor.shape[this.axis]; i++) {\n broadcast[this.axis] = i;\n\n if (this.scale) {\n _ndarrayOps.default.assigns(_gamma.tensor.pick(...broadcast), this.weights['gamma'].tensor.get(i));\n }\n\n if (this.center) {\n _ndarrayOps.default.assigns(_beta.tensor.pick(...broadcast), this.weights['beta'].tensor.get(i));\n }\n }\n\n let _mean = new _Tensor.default([], x.tensor.shape);\n\n let _std = new _Tensor.default([], x.tensor.shape);\n\n for (let i = 0; i < x.tensor.shape[this.axis]; i++) {\n broadcast[this.axis] = i;\n\n _ndarrayOps.default.assigns(_mean.tensor.pick(...broadcast), this.weights['moving_mean'].tensor.get(i));\n\n _ndarrayOps.default.assigns(_std.tensor.pick(...broadcast), this.weights['moving_variance'].tensor.get(i) + this.epsilon);\n }\n\n _ndarrayOps.default.sqrteq(_std.tensor);\n\n this.output = new _Tensor.default(x.tensor.data, x.tensor.shape);\n\n _ndarrayOps.default.subeq(this.output.tensor, _mean.tensor);\n\n _ndarrayOps.default.diveq(this.output.tensor, _std.tensor);\n\n if (this.scale) {\n _ndarrayOps.default.muleq(this.output.tensor, _gamma.tensor);\n }\n\n if (this.center) {\n _ndarrayOps.default.addeq(this.output.tensor, _beta.tensor);\n }\n }\n\n _createIndexMap(glTextureShape, indicesForReshaped) {\n if (this.normAxisIndexMap) {\n return;\n }\n\n const _normAxisIndexMap = new _Tensor.default([], this.inputShape, {\n type: Int32Array\n });\n\n this.normAxisIndexMap = new _Tensor.default([], glTextureShape, {\n type: Int32Array\n });\n const slice = Array(this.inputShape.length).fill(null);\n\n for (let i = 0; i < this.inputShape[this.axis]; i++) {\n slice[this.axis] = i;\n\n _ndarrayOps.default.assigns(_normAxisIndexMap.tensor.pick(...slice), i);\n }\n\n if (indicesForReshaped) {\n for (let i = 0; i < indicesForReshaped.data.length; i++) {\n this.normAxisIndexMap.tensor.data[indicesForReshaped.data[i]] = _normAxisIndexMap.tensor.data[i];\n }\n } else {\n this.normAxisIndexMap = _normAxisIndexMap;\n }\n\n this.normAxisIndexMap.createGLTexture({\n type: '2d',\n format: 'int',\n supportsTextureFragments: true\n });\n }\n\n _callGPU(x) {\n if (!this.axisNormalized) {\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n } else {\n this.inputShape = x.tensor.shape;\n }\n\n this.axis = this.axis < 0 ? this.inputShape.length + this.axis : this.axis - 1;\n this.axisNormalized = true;\n }\n\n if (!x.glTexture && !x.glTextureFragments) {\n if (x.tensor.shape.length <= 2) {\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n } else if (x.tensor.shape.length > 2 && !x.is2DReshaped) {\n x.reshapeTo2DSquare();\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n }\n\n this._createIndexMap(x.glTextureShape, x.indicesForReshaped);\n\n if (!this.output) {\n this.output = new _Tensor.default([], x.glTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n\n if (x.is1D) {\n this.output.is1D = x.is1D;\n } else if (x.is2DReshaped || x.is2DSquareReshaped) {\n if (x.is2DReshaped) {\n this.output.is2DReshaped = x.is2DReshaped;\n } else if (x.is2DSquareReshaped) {\n this.output.is2DSquareReshaped = x.is2DSquareReshaped;\n }\n\n this.output.originalShape = x.originalShape;\n this.output.indicesForReshaped = x.indicesForReshaped;\n }\n }\n\n const programInputs = [{\n input: x,\n name: 'X'\n }, {\n input: this.normAxisIndexMap,\n name: 'normAxisIndexMap'\n }];\n\n if (this.scale) {\n programInputs.push({\n input: this.weights['gamma'],\n name: 'gamma'\n });\n }\n\n if (this.center) {\n programInputs.push({\n input: this.weights['beta'],\n name: 'beta'\n });\n }\n\n programInputs.push({\n input: this.weights['moving_mean'],\n name: 'mean'\n });\n programInputs.push({\n input: this.weights['moving_variance'],\n name: 'std'\n });\n const programUniforms = [{\n value: this.epsilon,\n type: 'float',\n name: 'epsilon'\n }, {\n value: +this.scale,\n type: 'bool',\n name: 'scale'\n }, {\n value: +this.center,\n type: 'bool',\n name: 'center'\n }];\n\n _WebGL.webgl2.runProgram({\n program: this.program,\n output: this.output,\n inputs: programInputs,\n uniforms: programUniforms,\n supportsTextureFragments: true\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = BatchNormalization;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"BatchNormalization\", {\n enumerable: true,\n get: function () {\n return _BatchNormalization.default;\n }\n});\n\nvar _BatchNormalization = _interopRequireDefault(require(\"./BatchNormalization\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst poolingProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D poolIndexMap;\\nuniform int channels;\\nuniform int poolSize;\\nuniform bool isMaxPooling;\\nout vec4 outColor;\\n\\nvoid main() {\\n int out_x = int(float(channels) * outTex.x);\\n int out_y = int(float(textureSize(poolIndexMap, 0)[1]) * outTex.y);\\n\\n float val = 0.;\\n int count = 0;\\n for (int i = 0; i < poolSize; ++i) {\\n int poolIndex = texelFetch(poolIndexMap, ivec2(i, out_y), 0).r;\\n if (poolIndex != -1) {\\n float val2 = texelFetch(x, ivec2(out_x, poolIndex), 0).r;\\n if (isMaxPooling) {\\n if (count == 0 || val2 > val) {\\n val = val2;\\n }\\n } else {\\n val += val2;\\n }\\n count += 1;\\n }\\n }\\n\\n if (!isMaxPooling) {\\n val /= float(count);\\n }\\n\\n outColor = vec4(val);\\n}\\n\";\nconst poolingFragmentsProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D poolIndexMap;\\nuniform int channels;\\nuniform int poolSize;\\nuniform bool isMaxPooling;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 inputSize = textureSize(x, 0);\\n ivec2 outputSize = textureSize(poolIndexMap, 0);\\n int out_x = int(float(channels) * outTex.x);\\n int out_y = int(float(outputSize[1]) * outTex.y);\\n\\n float val = 0.;\\n int count = 0;\\n for (int i = 0; i < poolSize; ++i) {\\n int poolIndex = texelFetch(poolIndexMap, ivec2(i, out_y), 0).r;\\n int fragmentIndex = int(floor(float(poolIndex) / float(inputSize[1])));\\n if (poolIndex != -1) {\\n poolIndex = int(mod(float(poolIndex), float(inputSize[1])));\\n float val2 = texelFetch(x, ivec2(fragmentIndex * channels + out_x, poolIndex), 0).r;\\n if (isMaxPooling) {\\n if (count == 0 || val2 > val) {\\n val = val2;\\n }\\n } else {\\n val += val2;\\n }\\n count += 1;\\n }\\n }\\n\\n if (!isMaxPooling) {\\n val /= float(count);\\n }\\n\\n outColor = vec4(val);\\n}\\n\";\n\nclass _Pooling1D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = '_Pooling1D';\n const {\n pool_size = 2,\n strides = null,\n padding = 'valid'\n } = attrs;\n this.poolSize = pool_size;\n this.strides = strides === null ? this.poolSize : strides;\n this.padding = padding;\n this.poolingFunc = 'max';\n this.description = `pool size ${this.poolSize}`;\n this.description += this.strides > 1 ? `, striding ${this.strides} striding` : '';\n this.description += this.padding === 'valid' ? `, no border padding` : ', pad to same borders';\n\n if (this.gpu) {\n this.poolingProgram = _WebGL.webgl2.compileProgram(poolingProgramSource);\n this.poolingFragmentsProgram = _WebGL.webgl2.compileProgram(poolingFragmentsProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n const stepsNew = this.padding === 'valid' ? Math.floor((x.tensor.shape[0] - this.poolSize + this.strides) / this.strides) : Math.floor((x.tensor.shape[0] + this.strides - 1) / this.strides);\n this.output = new _Tensor.default([], [stepsNew, x.tensor.shape[1]]);\n const outputStep = new _Tensor.default([], [x.tensor.shape[1]]);\n let step = this.padding === 'valid' ? 0 : Math.min(0, Math.ceil((x.tensor.shape[0] - (stepsNew - 1) * this.strides - this.poolSize) / 2));\n\n for (let i = 0; i < stepsNew; i++) {\n let _step = Math.max(0, step);\n\n let limit = this.poolSize + Math.min(0, step);\n\n _ndarrayOps.default.assign(outputStep.tensor, x.tensor.pick(_step, null));\n\n let count = 1;\n\n for (let j = 1; j < limit; j++) {\n if (_step + j > x.tensor.shape[0] - 1) {\n break;\n }\n\n if (this.poolingFunc === 'max') {\n _ndarrayOps.default.maxeq(outputStep.tensor, x.tensor.pick(_step + j, null));\n } else if (this.poolingFunc === 'average') {\n _ndarrayOps.default.addeq(outputStep.tensor, x.tensor.pick(_step + j, null));\n }\n\n count += 1;\n }\n\n if (this.poolingFunc === 'average') {\n _ndarrayOps.default.divseq(outputStep.tensor, count);\n }\n\n _ndarrayOps.default.assign(this.output.tensor.pick(i, null), outputStep.tensor);\n\n step += this.strides;\n }\n }\n\n _createIndexMap() {\n if (this.poolIndexMap) {\n return;\n }\n\n const stepsNew = this.padding === 'valid' ? Math.floor((this.inputShape[0] - this.poolSize + this.strides) / this.strides) : Math.floor((this.inputShape[0] + this.strides - 1) / this.strides);\n this.outputShape = [stepsNew, this.inputShape[1]];\n this.poolIndexMap = new _Tensor.default([], [stepsNew, this.poolSize], {\n type: Int32Array\n });\n\n _ndarrayOps.default.assigns(this.poolIndexMap.tensor, -1);\n\n let step = this.padding === 'valid' ? 0 : Math.min(0, Math.ceil((this.inputShape[0] - (stepsNew - 1) * this.strides - this.poolSize) / 2));\n\n for (let i = 0; i < stepsNew; i++) {\n let _step = Math.max(0, step);\n\n let limit = this.poolSize + Math.min(0, step);\n let inputIndex = _step;\n this.poolIndexMap.tensor.set(i, 0, inputIndex);\n\n for (let j = 1; j < limit; j++) {\n inputIndex = _step + j;\n\n if (inputIndex <= this.inputShape[0] - 1) {\n this.poolIndexMap.tensor.set(i, j, inputIndex);\n } else {\n break;\n }\n }\n\n step += this.strides;\n }\n\n this.poolIndexMap.createGLTexture({\n type: '2d',\n format: 'int',\n supportsTextureFragments: true\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture && !x.glTextureFragments) {\n x.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n this.inputShape = x.tensor.shape;\n\n this._createIndexMap();\n\n if (!this.output) {\n this.output = new _Tensor.default([], this.outputShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n const isMaxPooling = this.poolingFunc === 'max';\n const programUniforms = [{\n value: this.output.glTextureShape[1],\n type: 'int',\n name: 'channels'\n }, {\n value: this.poolSize,\n type: 'int',\n name: 'poolSize'\n }, {\n value: +isMaxPooling,\n type: 'bool',\n name: 'isMaxPooling'\n }];\n\n if (x.glTextureFragments) {\n x.convert2DRowFragmentedGLTextureToColStack();\n\n _WebGL.webgl2.runProgram({\n program: this.poolingFragmentsProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.poolIndexMap,\n name: 'poolIndexMap'\n }],\n uniforms: programUniforms,\n supportsTextureFragments: true\n });\n\n x.removeGLTextureFragmentsAsColStack();\n } else {\n _WebGL.webgl2.runProgram({\n program: this.poolingProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.poolIndexMap,\n name: 'poolIndexMap'\n }],\n uniforms: programUniforms,\n supportsTextureFragments: true\n });\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = _Pooling1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Pooling1D2 = _interopRequireDefault(require(\"./_Pooling1D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass MaxPooling1D extends _Pooling1D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'MaxPooling1D';\n this.poolingFunc = 'max';\n }\n\n}\n\nexports.default = MaxPooling1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar tensorUtils = _interopRequireWildcard(require(\"../../utils/tensorUtils\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst poolingProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D poolIndexMap;\\nuniform int channels;\\nuniform int poolSize;\\nuniform bool isMaxPooling;\\nout vec4 outColor;\\n\\nvoid main() {\\n int out_x = int(float(channels) * outTex.x);\\n int out_y = int(float(textureSize(poolIndexMap, 0)[1]) * outTex.y);\\n\\n float val = 0.;\\n int count = 0;\\n for (int i = 0; i < poolSize; ++i) {\\n int poolIndex = texelFetch(poolIndexMap, ivec2(i, out_y), 0).r;\\n if (poolIndex != -1) {\\n float val2 = texelFetch(x, ivec2(out_x, poolIndex), 0).r;\\n if (isMaxPooling) {\\n if (count == 0 || val2 > val) {\\n val = val2;\\n }\\n } else {\\n val += val2;\\n }\\n count += 1;\\n }\\n }\\n\\n if (!isMaxPooling) {\\n val /= float(count);\\n }\\n\\n outColor = vec4(val);\\n}\\n\";\nconst poolingFragmentsProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D poolIndexMap;\\nuniform int channels;\\nuniform int poolSize;\\nuniform bool isMaxPooling;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 inputSize = textureSize(x, 0);\\n ivec2 outputSize = textureSize(poolIndexMap, 0);\\n int out_x = int(float(channels) * outTex.x);\\n int out_y = int(float(outputSize[1]) * outTex.y);\\n\\n float val = 0.;\\n int count = 0;\\n for (int i = 0; i < poolSize; ++i) {\\n int poolIndex = texelFetch(poolIndexMap, ivec2(i, out_y), 0).r;\\n int fragmentIndex = int(floor(float(poolIndex) / float(inputSize[1])));\\n if (poolIndex != -1) {\\n poolIndex = int(mod(float(poolIndex), float(inputSize[1])));\\n float val2 = texelFetch(x, ivec2(fragmentIndex * channels + out_x, poolIndex), 0).r;\\n if (isMaxPooling) {\\n if (count == 0 || val2 > val) {\\n val = val2;\\n }\\n } else {\\n val += val2;\\n }\\n count += 1;\\n }\\n }\\n\\n if (!isMaxPooling) {\\n val /= float(count);\\n }\\n\\n outColor = vec4(val);\\n}\\n\";\n\nclass _Pooling2D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = '_Pooling2D';\n const {\n pool_size = [2, 2],\n strides = null,\n padding = 'valid',\n data_format = 'channels_last'\n } = attrs;\n\n if (Array.isArray(pool_size)) {\n this.poolSize = pool_size;\n } else {\n this.poolSize = [pool_size, pool_size];\n }\n\n if (Array.isArray(strides)) {\n this.strides = strides;\n } else if (strides !== null) {\n this.strides = [strides, strides];\n } else {\n this.strides = this.poolSize;\n }\n\n this.padding = padding;\n this.dataFormat = data_format;\n this.poolingFunc = 'max';\n this.description = `pool size ${this.poolSize.join('x')}`;\n this.description += this.strides.some(s => s > 1) ? `, ${this.strides.join('x')} striding` : '';\n this.description += this.padding === 'valid' ? `, no border padding` : ', pad to same borders';\n\n if (this.gpu) {\n this.poolingProgram = _WebGL.webgl2.compileProgram(poolingProgramSource);\n this.poolingFragmentsProgram = _WebGL.webgl2.compileProgram(poolingFragmentsProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _calcOutputShape(inputShape) {\n if (this.outputShape && this.inputPadding) {\n return;\n }\n\n const [inputRows, inputCols, inputChannels] = inputShape;\n const [nbRow, nbCol] = this.poolSize;\n const outputRows = this.padding === 'same' ? Math.floor((inputRows + this.strides[0] - 1) / this.strides[0]) : Math.floor((inputRows - nbRow + this.strides[0]) / this.strides[0]);\n const outputCols = this.padding === 'same' ? Math.floor((inputCols + this.strides[1] - 1) / this.strides[1]) : Math.floor((inputCols - nbCol + this.strides[1]) / this.strides[1]);\n const paddingRow = this.padding === 'same' ? Math.max(0, Math.floor((outputRows - 1) * this.strides[0] + nbRow - inputRows)) : 0;\n const paddingCol = this.padding === 'same' ? Math.max(0, Math.floor((outputCols - 1) * this.strides[1] + nbCol - inputCols)) : 0;\n const paddingRowBefore = Math.floor(paddingRow / 2);\n const paddingRowAfter = paddingRow - paddingRowBefore;\n const paddingColBefore = Math.floor(paddingCol / 2);\n const paddingColAfter = paddingCol - paddingColBefore;\n this.outputShape = [outputRows, outputCols, inputChannels];\n this.inputPadding = [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter];\n }\n\n _padInput(x) {\n if (this.padding === 'same') {\n const [inputRows, inputCols, inputChannels] = x.tensor.shape;\n const [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter] = this.inputPadding;\n const newRows = inputRows + paddingRowBefore + paddingRowAfter;\n const newCols = inputCols + paddingColBefore + paddingColAfter;\n\n const _x = new _Tensor.default([], [newRows, newCols, inputChannels]);\n\n if (this.poolingFunc === 'max') {\n _ndarrayOps.default.assigns(_x.tensor, Number.NEGATIVE_INFINITY);\n }\n\n _ndarrayOps.default.assign(_x.tensor.hi(inputRows + paddingRowBefore, inputCols + paddingColBefore, inputChannels).lo(paddingRowBefore, paddingColBefore, 0), x.tensor);\n\n return _x;\n }\n\n return x;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 0);\n }\n\n this._calcOutputShape(x.tensor.shape);\n\n x = this._padInput(x);\n const [inputRows, inputCols, inputChannels] = x.tensor.shape;\n const [nbRow, nbCol] = this.poolSize;\n this.output = new _Tensor.default([], this.outputShape);\n const patch = new _Tensor.default([], [nbRow, nbCol, inputChannels]);\n const [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter] = this.inputPadding;\n\n for (let i = 0, _i = 0; i <= inputRows - nbRow; i += this.strides[0], _i++) {\n let nbRowInPadding = 0;\n\n if (i < paddingRowBefore) {\n nbRowInPadding = paddingRowBefore - i;\n } else if (i + nbRow > inputRows - paddingRowAfter) {\n nbRowInPadding = i + nbRow - (inputRows - paddingRowAfter);\n }\n\n for (let j = 0, _j = 0; j <= inputCols - nbCol; j += this.strides[1], _j++) {\n let nbColInPadding = 0;\n\n if (j < paddingColBefore) {\n nbColInPadding = paddingColBefore - j;\n } else if (j + nbCol > inputCols - paddingColAfter) {\n nbColInPadding = j + nbCol - (inputCols - paddingColAfter);\n }\n\n const nbCellsEffective = (nbRow - nbRowInPadding) * (nbCol - nbColInPadding);\n\n _ndarrayOps.default.assign(patch.tensor, x.tensor.hi(i + nbRow, j + nbCol, inputChannels).lo(i, j, 0));\n\n for (let c = 0; c < inputChannels; c++) {\n if (this.poolingFunc === 'max') {\n this.output.tensor.set(_i, _j, c, _ndarrayOps.default.sup(patch.tensor.pick(null, null, c)));\n } else if (this.poolingFunc === 'average') {\n this.output.tensor.set(_i, _j, c, _ndarrayOps.default.sum(patch.tensor.pick(null, null, c)) / nbCellsEffective);\n }\n }\n }\n }\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n\n _im2col(x) {\n const [inputRows, inputCols, inputChannels] = x.tensor.shape;\n\n if (!this.tiledInput) {\n this.tiledInput = new _Tensor.default([], [inputRows * inputCols, inputChannels]);\n }\n\n const patch = new _Tensor.default([], [inputRows, inputCols]);\n const patchRaveled = new _Tensor.default([], [inputRows * inputCols]);\n\n for (let c = 0; c < inputChannels; c++) {\n _ndarrayOps.default.assign(patch.tensor, x.tensor.pick(null, null, c));\n\n patchRaveled.replaceTensorData(patch.tensor.data);\n\n _ndarrayOps.default.assign(this.tiledInput.tensor.pick(null, c), patchRaveled.tensor);\n }\n\n return this.tiledInput;\n }\n\n _createIndexMap() {\n if (this.poolIndexMap) {\n return;\n }\n\n let inputRows = this.inputShape[0];\n let inputCols = this.inputShape[1];\n const rowIndices = new _Tensor.default([], [inputRows, inputCols]);\n let index = 0;\n\n for (let i = 0; i < inputRows; i++) {\n for (let j = 0; j < inputCols; j++) {\n rowIndices.tensor.set(i, j, index);\n index += 1;\n }\n }\n\n if (this.padding === 'same') {\n const [paddingRowBefore, paddingRowAfter, paddingColBefore, paddingColAfter] = this.inputPadding;\n inputRows = inputRows + paddingRowBefore + paddingRowAfter;\n inputCols = inputCols + paddingColBefore + paddingColAfter;\n\n const _rowIndices = new _Tensor.default([], [inputRows, inputCols]);\n\n _ndarrayOps.default.assigns(_rowIndices.tensor, -1);\n\n _ndarrayOps.default.assign(_rowIndices.tensor.hi(this.inputShape[0] + paddingRowBefore, this.inputShape[1] + paddingColBefore).lo(paddingRowBefore, paddingColBefore), rowIndices.tensor);\n\n rowIndices.tensor = _rowIndices.tensor;\n }\n\n const [nbRow, nbCol] = this.poolSize;\n const outputRows = this.outputShape[0];\n const outputCols = this.outputShape[1];\n this.poolIndexMap = new _Tensor.default([], [outputRows * outputCols, nbRow * nbCol], {\n type: Int32Array\n });\n const patchRow = new _Tensor.default([], [nbRow, nbCol]);\n let offset = 0;\n\n for (let i = 0, limit = inputRows - nbRow; i <= limit; i += this.strides[0]) {\n for (let j = 0, limit = inputCols - nbCol; j <= limit; j += this.strides[1]) {\n _ndarrayOps.default.assign(patchRow.tensor, rowIndices.tensor.hi(i + nbRow, j + nbCol).lo(i, j));\n\n this.poolIndexMap.tensor.data.set(patchRow.tensor.data, offset);\n offset += nbRow * nbCol;\n }\n }\n\n this.poolIndexMap.createGLTexture({\n type: '2d',\n format: 'int',\n supportsTextureFragments: true\n });\n }\n\n _callGPU(x) {\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n } else {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 0);\n }\n\n this.inputShape = x.tensor.shape;\n\n this._im2col(x);\n\n this.tiledInput.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n this._calcOutputShape(this.inputShape);\n\n this._createIndexMap();\n\n if (!this.output) {\n const [outputRows, outputCols, inputChannels] = this.outputShape;\n const outputTextureShape = [outputRows * outputCols, inputChannels];\n this.output = new _Tensor.default([], outputTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.output.is2DReshaped = true;\n this.output.originalShape = this.outputShape;\n this.output.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.outputShape, false, -1);\n }\n\n const input = x.is2DReshaped || x.is2DSquareReshaped ? x : this.tiledInput;\n const poolSize = this.poolSize[0] * this.poolSize[1];\n const isMaxPooling = this.poolingFunc === 'max';\n const programUniforms = [{\n value: this.output.glTextureShape[1],\n type: 'int',\n name: 'channels'\n }, {\n value: poolSize,\n type: 'int',\n name: 'poolSize'\n }, {\n value: +isMaxPooling,\n type: 'bool',\n name: 'isMaxPooling'\n }];\n\n if (input.glTextureFragments) {\n input.convert2DRowFragmentedGLTextureToColStack();\n\n _WebGL.webgl2.runProgram({\n program: this.poolingFragmentsProgram,\n output: this.output,\n inputs: [{\n input: input,\n name: 'x'\n }, {\n input: this.poolIndexMap,\n name: 'poolIndexMap'\n }],\n uniforms: programUniforms,\n supportsTextureFragments: true\n });\n\n input.removeGLTextureFragmentsAsColStack();\n } else {\n _WebGL.webgl2.runProgram({\n program: this.poolingProgram,\n output: this.output,\n inputs: [{\n input: input,\n name: 'x'\n }, {\n input: this.poolIndexMap,\n name: 'poolIndexMap'\n }],\n uniforms: programUniforms,\n supportsTextureFragments: true\n });\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n this.output.reshapeFrom2D();\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(2, 0, 1);\n }\n }\n }\n\n}\n\nexports.default = _Pooling2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Pooling2D2 = _interopRequireDefault(require(\"./_Pooling2D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass MaxPooling2D extends _Pooling2D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'MaxPooling2D';\n this.poolingFunc = 'max';\n }\n\n}\n\nexports.default = MaxPooling2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar tensorUtils = _interopRequireWildcard(require(\"../../utils/tensorUtils\"));\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst poolingProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D poolIndexMap;\\nuniform int channels;\\nuniform int poolSize;\\nuniform bool isMaxPooling;\\nout vec4 outColor;\\n\\nvoid main() {\\n int out_x = int(float(channels) * outTex.x);\\n int out_y = int(float(textureSize(poolIndexMap, 0)[1]) * outTex.y);\\n\\n float val = 0.;\\n int count = 0;\\n for (int i = 0; i < poolSize; ++i) {\\n int poolIndex = texelFetch(poolIndexMap, ivec2(i, out_y), 0).r;\\n if (poolIndex != -1) {\\n float val2 = texelFetch(x, ivec2(out_x, poolIndex), 0).r;\\n if (isMaxPooling) {\\n if (count == 0 || val2 > val) {\\n val = val2;\\n }\\n } else {\\n val += val2;\\n }\\n count += 1;\\n }\\n }\\n\\n if (!isMaxPooling) {\\n val /= float(count);\\n }\\n\\n outColor = vec4(val);\\n}\\n\";\nconst poolingFragmentsProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D poolIndexMap;\\nuniform int channels;\\nuniform int poolSize;\\nuniform bool isMaxPooling;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 inputSize = textureSize(x, 0);\\n ivec2 outputSize = textureSize(poolIndexMap, 0);\\n int out_x = int(float(channels) * outTex.x);\\n int out_y = int(float(outputSize[1]) * outTex.y);\\n\\n float val = 0.;\\n int count = 0;\\n for (int i = 0; i < poolSize; ++i) {\\n int poolIndex = texelFetch(poolIndexMap, ivec2(i, out_y), 0).r;\\n int fragmentIndex = int(floor(float(poolIndex) / float(inputSize[1])));\\n if (poolIndex != -1) {\\n poolIndex = int(mod(float(poolIndex), float(inputSize[1])));\\n float val2 = texelFetch(x, ivec2(fragmentIndex * channels + out_x, poolIndex), 0).r;\\n if (isMaxPooling) {\\n if (count == 0 || val2 > val) {\\n val = val2;\\n }\\n } else {\\n val += val2;\\n }\\n count += 1;\\n }\\n }\\n\\n if (!isMaxPooling) {\\n val /= float(count);\\n }\\n\\n outColor = vec4(val);\\n}\\n\";\n\nclass _Pooling3D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = '_Pooling3D';\n const {\n pool_size = [2, 2, 2],\n strides = null,\n padding = 'valid',\n data_format = 'channels_last'\n } = attrs;\n\n if (Array.isArray(pool_size)) {\n this.poolSize = pool_size;\n } else {\n this.poolSize = [pool_size, pool_size, pool_size];\n }\n\n if (Array.isArray(strides)) {\n this.strides = strides;\n } else if (strides !== null) {\n this.strides = [strides, strides, strides];\n } else {\n this.strides = this.poolSize;\n }\n\n this.padding = padding;\n this.dataFormat = data_format;\n this.poolingFunc = 'max';\n this.description = `pool size ${this.poolSize.join('x')}`;\n this.description += this.strides.some(s => s > 1) ? `, ${this.strides.join('x')} striding` : '';\n this.description += this.padding === 'valid' ? `, no border padding` : ', pad to same borders';\n\n if (this.gpu) {\n this.poolingProgram = _WebGL.webgl2.compileProgram(poolingProgramSource);\n this.poolingFragmentsProgram = _WebGL.webgl2.compileProgram(poolingFragmentsProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _calcOutputShape(inputShape) {\n if (this.outputShape && this.inputPadding) {\n return;\n }\n\n const [inputDim1, inputDim2, inputDim3, inputChannels] = inputShape;\n const [poolDim1, poolDim2, poolDim3] = this.poolSize;\n const outputDim1 = this.padding === 'same' ? Math.floor((inputDim1 + this.strides[0] - 1) / this.strides[0]) : Math.floor((inputDim1 - poolDim1 + this.strides[0]) / this.strides[0]);\n const outputDim2 = this.padding === 'same' ? Math.floor((inputDim2 + this.strides[1] - 1) / this.strides[1]) : Math.floor((inputDim2 - poolDim2 + this.strides[1]) / this.strides[1]);\n const outputDim3 = this.padding === 'same' ? Math.floor((inputDim3 + this.strides[2] - 1) / this.strides[2]) : Math.floor((inputDim3 - poolDim3 + this.strides[2]) / this.strides[2]);\n const paddingDim1 = this.padding === 'same' ? Math.max(0, Math.floor((outputDim1 - 1) * this.strides[0] + poolDim1 - inputDim1)) : 0;\n const paddingDim2 = this.padding === 'same' ? Math.max(0, Math.floor((outputDim2 - 1) * this.strides[1] + poolDim2 - inputDim2)) : 0;\n const paddingDim3 = this.padding === 'same' ? Math.max(0, Math.floor((outputDim3 - 1) * this.strides[2] + poolDim3 - inputDim3)) : 0;\n const paddingDim1Before = Math.floor(paddingDim1 / 2);\n const paddingDim1After = paddingDim1 - paddingDim1Before;\n const paddingDim2Before = Math.floor(paddingDim2 / 2);\n const paddingDim2After = paddingDim2 - paddingDim2Before;\n const paddingDim3Before = Math.floor(paddingDim3 / 2);\n const paddingDim3After = paddingDim3 - paddingDim3Before;\n this.outputShape = [outputDim1, outputDim2, outputDim3, inputChannels];\n this.inputPadding = [paddingDim1Before, paddingDim1After, paddingDim2Before, paddingDim2After, paddingDim3Before, paddingDim3After];\n }\n\n _padInput(x) {\n if (this.padding === 'same') {\n const [inputDim1, inputDim2, inputDim3, inputChannels] = x.tensor.shape;\n const [paddingDim1Before, paddingDim1After, paddingDim2Before, paddingDim2After, paddingDim3Before, paddingDim3After] = this.inputPadding;\n const newDim1 = inputDim1 + paddingDim1Before + paddingDim1After;\n const newDim2 = inputDim2 + paddingDim2Before + paddingDim2After;\n const newDim3 = inputDim3 + paddingDim3Before + paddingDim3After;\n\n const _x = new _Tensor.default([], [newDim1, newDim2, newDim3, inputChannels]);\n\n if (this.poolingFunc === 'max') {\n _ndarrayOps.default.assigns(_x.tensor, Number.NEGATIVE_INFINITY);\n }\n\n _ndarrayOps.default.assign(_x.tensor.hi(inputDim1 + paddingDim1Before, inputDim2 + paddingDim2Before, inputDim3 + paddingDim3Before, inputChannels).lo(paddingDim1Before, paddingDim2Before, paddingDim3Before, 0), x.tensor);\n\n return _x;\n }\n\n return x;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 3, 0);\n }\n\n this._calcOutputShape(x.tensor.shape);\n\n x = this._padInput(x);\n const [inputDim1, inputDim2, inputDim3, inputChannels] = x.tensor.shape;\n const [poolDim1, poolDim2, poolDim3] = this.poolSize;\n this.output = new _Tensor.default([], this.outputShape);\n let patch = new _Tensor.default([], [poolDim1, poolDim2, poolDim3, inputChannels]);\n const [paddingDim1Before, paddingDim1After, paddingDim2Before, paddingDim2After, paddingDim3Before, paddingDim3After] = this.inputPadding;\n\n for (let i = 0, _i = 0; i <= inputDim1 - poolDim1; i += this.strides[0], _i++) {\n let dim1InPadding = 0;\n\n if (i < paddingDim1Before) {\n dim1InPadding = paddingDim1Before - i;\n } else if (i + poolDim1 > inputDim1 - paddingDim1After) {\n dim1InPadding = i + poolDim1 - (inputDim1 - paddingDim1After);\n }\n\n for (let j = 0, _j = 0; j <= inputDim2 - poolDim2; j += this.strides[1], _j++) {\n let dim2InPadding = 0;\n\n if (j < paddingDim2Before) {\n dim2InPadding = paddingDim2Before - j;\n } else if (j + poolDim2 > inputDim2 - paddingDim2After) {\n dim2InPadding = j + poolDim2 - (inputDim2 - paddingDim2After);\n }\n\n for (let k = 0, _k = 0; k <= inputDim3 - poolDim3; k += this.strides[2], _k++) {\n let dim3InPadding = 0;\n\n if (k < paddingDim3Before) {\n dim3InPadding = paddingDim3Before - k;\n } else if (k + poolDim3 > inputDim3 - paddingDim3After) {\n dim3InPadding = k + poolDim3 - (inputDim3 - paddingDim3After);\n }\n\n const nbCellsEffective = (poolDim1 - dim1InPadding) * (poolDim2 - dim2InPadding) * (poolDim3 - dim3InPadding);\n\n _ndarrayOps.default.assign(patch.tensor, x.tensor.hi(i + poolDim1, j + poolDim2, k + poolDim3, inputChannels).lo(i, j, k, 0));\n\n for (let c = 0; c < inputChannels; c++) {\n if (this.poolingFunc === 'max') {\n this.output.tensor.set(_i, _j, _k, c, _ndarrayOps.default.sup(patch.tensor.pick(null, null, null, c)));\n } else if (this.poolingFunc === 'average') {\n this.output.tensor.set(_i, _j, _k, c, _ndarrayOps.default.sum(patch.tensor.pick(null, null, null, c)) / nbCellsEffective);\n }\n }\n }\n }\n }\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(3, 0, 1, 2);\n }\n }\n\n _vol2col(x) {\n const [inputDim1, inputDim2, inputDim3, inputChannels] = x.tensor.shape;\n\n if (!this.tiledInput) {\n this.tiledInput = new _Tensor.default([], [inputDim1 * inputDim2 * inputDim3, inputChannels]);\n }\n\n const patch = new _Tensor.default([], [inputDim1, inputDim2, inputDim3]);\n const patchRaveled = new _Tensor.default([], [inputDim1 * inputDim2 * inputDim3]);\n\n for (let c = 0; c < inputChannels; c++) {\n _ndarrayOps.default.assign(patch.tensor, x.tensor.pick(null, null, null, c));\n\n patchRaveled.replaceTensorData(patch.tensor.data);\n\n _ndarrayOps.default.assign(this.tiledInput.tensor.pick(null, c), patchRaveled.tensor);\n }\n\n return this.tiledInput;\n }\n\n _createIndexMap() {\n if (this.poolIndexMap) {\n return;\n }\n\n let inputDim1 = this.inputShape[0];\n let inputDim2 = this.inputShape[1];\n let inputDim3 = this.inputShape[2];\n const rowIndices = new _Tensor.default([], [inputDim1, inputDim2, inputDim3]);\n let index = 0;\n\n for (let i = 0; i < inputDim1; i++) {\n for (let j = 0; j < inputDim2; j++) {\n for (let k = 0; k < inputDim3; k++) {\n rowIndices.tensor.set(i, j, k, index);\n index += 1;\n }\n }\n }\n\n if (this.padding === 'same') {\n const [paddingDim1Before, paddingDim1After, paddingDim2Before, paddingDim2After, paddingDim3Before, paddingDim3After] = this.inputPadding;\n inputDim1 = inputDim1 + paddingDim1Before + paddingDim1After;\n inputDim2 = inputDim2 + paddingDim2Before + paddingDim2After;\n inputDim3 = inputDim3 + paddingDim3Before + paddingDim3After;\n\n const _rowIndices = new _Tensor.default([], [inputDim1, inputDim2, inputDim3]);\n\n _ndarrayOps.default.assigns(_rowIndices.tensor, -1);\n\n _ndarrayOps.default.assign(_rowIndices.tensor.hi(this.inputShape[0] + paddingDim1Before, this.inputShape[1] + paddingDim2Before, this.inputShape[2] + paddingDim3Before).lo(paddingDim1Before, paddingDim2Before, paddingDim3Before), rowIndices.tensor);\n\n rowIndices.tensor = _rowIndices.tensor;\n }\n\n const [poolDim1, poolDim2, poolDim3] = this.poolSize;\n const outputDim1 = this.outputShape[0];\n const outputDim2 = this.outputShape[1];\n const outputDim3 = this.outputShape[2];\n this.poolIndexMap = new _Tensor.default([], [outputDim1 * outputDim2 * outputDim3, poolDim1 * poolDim2 * poolDim3], {\n type: Int32Array\n });\n const patchRow = new _Tensor.default([], [poolDim1, poolDim2, poolDim3]);\n let offset = 0;\n\n for (let i = 0, limit = inputDim1 - poolDim1; i <= limit; i += this.strides[0]) {\n for (let j = 0, limit = inputDim2 - poolDim2; j <= limit; j += this.strides[1]) {\n for (let k = 0, limit = inputDim3 - poolDim3; k <= limit; k += this.strides[2]) {\n _ndarrayOps.default.assign(patchRow.tensor, rowIndices.tensor.hi(i + poolDim1, j + poolDim2, k + poolDim3).lo(i, j, k));\n\n this.poolIndexMap.tensor.data.set(patchRow.tensor.data, offset);\n offset += poolDim1 * poolDim2 * poolDim3;\n }\n }\n }\n\n this.poolIndexMap.createGLTexture({\n type: '2d',\n format: 'int',\n supportsTextureFragments: true\n });\n }\n\n _callGPU(x) {\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n } else {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 3, 0);\n }\n\n this.inputShape = x.tensor.shape;\n\n this._vol2col(x);\n\n this.tiledInput.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n }\n\n this._calcOutputShape(this.inputShape);\n\n this._createIndexMap();\n\n if (!this.output) {\n const [outputDim1, outputDim2, outputDim3, inputChannels] = this.outputShape;\n const outputTextureShape = [outputDim1 * outputDim2 * outputDim3, inputChannels];\n this.output = new _Tensor.default([], outputTextureShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float',\n supportsTextureFragments: true\n });\n this.output.is2DReshaped = true;\n this.output.originalShape = this.outputShape;\n this.output.indicesForReshaped = tensorUtils.createIndicesFor2DReshaped(this.outputShape, false, -1);\n }\n\n const input = x.is2DReshaped || x.is2DSquareReshaped ? x : this.tiledInput;\n const poolSize = this.poolSize[0] * this.poolSize[1] * this.poolSize[2];\n const isMaxPooling = this.poolingFunc === 'max';\n const programUniforms = [{\n value: this.output.glTextureShape[1],\n type: 'int',\n name: 'channels'\n }, {\n value: poolSize,\n type: 'int',\n name: 'poolSize'\n }, {\n value: +isMaxPooling,\n type: 'bool',\n name: 'isMaxPooling'\n }];\n\n if (input.glTextureFragments) {\n input.convert2DRowFragmentedGLTextureToColStack();\n\n _WebGL.webgl2.runProgram({\n program: this.poolingFragmentsProgram,\n output: this.output,\n inputs: [{\n input: input,\n name: 'x'\n }, {\n input: this.poolIndexMap,\n name: 'poolIndexMap'\n }],\n uniforms: programUniforms,\n supportsTextureFragments: true\n });\n\n input.removeGLTextureFragmentsAsColStack();\n } else {\n _WebGL.webgl2.runProgram({\n program: this.poolingProgram,\n output: this.output,\n inputs: [{\n input: input,\n name: 'x'\n }, {\n input: this.poolIndexMap,\n name: 'poolIndexMap'\n }],\n uniforms: programUniforms\n });\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n this.output.reshapeFrom2D();\n\n if (this.dataFormat === 'channels_first') {\n this.output.tensor = this.output.tensor.transpose(3, 0, 1, 2);\n }\n }\n }\n\n}\n\nexports.default = _Pooling3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Pooling3D2 = _interopRequireDefault(require(\"./_Pooling3D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass MaxPooling3D extends _Pooling3D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'MaxPooling3D';\n this.poolingFunc = 'max';\n }\n\n}\n\nexports.default = MaxPooling3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Pooling1D2 = _interopRequireDefault(require(\"./_Pooling1D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass AveragePooling1D extends _Pooling1D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'AveragePooling1D';\n this.poolingFunc = 'average';\n }\n\n}\n\nexports.default = AveragePooling1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Pooling2D2 = _interopRequireDefault(require(\"./_Pooling2D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass AveragePooling2D extends _Pooling2D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'AveragePooling2D';\n this.poolingFunc = 'average';\n }\n\n}\n\nexports.default = AveragePooling2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Pooling3D2 = _interopRequireDefault(require(\"./_Pooling3D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass AveragePooling3D extends _Pooling3D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'AveragePooling3D';\n this.poolingFunc = 'average';\n }\n\n}\n\nexports.default = AveragePooling3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst poolingProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform int channelDataSize;\\nuniform bool isMaxPooling;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(x, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n if (isMaxPooling) {\\n // GlobalMaxPooling\\n float maxval = 0.0;\\n for (int j = 0; j < size[1]; ++j) {\\n float val = texelFetch(x, ivec2(out_x, j), 0).r;\\n if (j == 0 || val > maxval) {\\n maxval = val;\\n }\\n }\\n outColor = vec4(maxval);\\n } else {\\n // GlobalAveragePooling\\n float sum = 0.0;\\n for (int j = 0; j < size[1]; ++j) {\\n float val = texelFetch(x, ivec2(out_x, j), 0).r;\\n sum += val;\\n }\\n outColor = vec4(sum / float(channelDataSize));\\n }\\n}\\n\";\n\nclass _GlobalPooling1D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = '_GlobalPooling1D';\n const {\n data_format = 'channels_last'\n } = attrs;\n this.dataFormat = data_format;\n this.poolingFunc = 'max';\n\n if (this.gpu) {\n this.poolingProgram = _WebGL.webgl2.compileProgram(poolingProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n const [steps, features] = x.tensor.shape;\n this.output = new _Tensor.default([], [features]);\n\n for (let i = 0, len = features; i < len; i++) {\n if (this.poolingFunc === 'max') {\n this.output.tensor.set(i, _ndarrayOps.default.sup(x.tensor.pick(null, i)));\n } else if (this.poolingFunc === 'average') {\n this.output.tensor.set(i, _ndarrayOps.default.sum(x.tensor.pick(null, i)) / steps);\n }\n }\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n this.inputShape = x.tensor.shape;\n\n if (!this.output) {\n this.output = new _Tensor.default([], [this.inputShape[1]]);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const isMaxPooling = this.poolingFunc === 'max';\n\n _WebGL.webgl2.runProgram({\n program: this.poolingProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: this.inputShape[0],\n type: 'int',\n name: 'channelDataSize'\n }, {\n value: +isMaxPooling,\n type: 'bool',\n name: 'isMaxPooling'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = _GlobalPooling1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _GlobalPooling1D2 = _interopRequireDefault(require(\"./_GlobalPooling1D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass GlobalMaxPooling1D extends _GlobalPooling1D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'GlobalMaxPooling1D';\n this.poolingFunc = 'max';\n }\n\n}\n\nexports.default = GlobalMaxPooling1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst poolingProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform int channelDataSize;\\nuniform bool isMaxPooling;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(x, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n if (isMaxPooling) {\\n // GlobalMaxPooling\\n float maxval = 0.0;\\n for (int j = 0; j < size[1]; ++j) {\\n float val = texelFetch(x, ivec2(out_x, j), 0).r;\\n if (j == 0 || val > maxval) {\\n maxval = val;\\n }\\n }\\n outColor = vec4(maxval);\\n } else {\\n // GlobalAveragePooling\\n float sum = 0.0;\\n for (int j = 0; j < size[1]; ++j) {\\n float val = texelFetch(x, ivec2(out_x, j), 0).r;\\n sum += val;\\n }\\n outColor = vec4(sum / float(channelDataSize));\\n }\\n}\\n\";\n\nclass _GlobalPooling2D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = '_GlobalPooling2D';\n const {\n data_format = 'channels_last'\n } = attrs;\n this.dataFormat = data_format;\n this.poolingFunc = 'max';\n\n if (this.gpu) {\n this.poolingProgram = _WebGL.webgl2.compileProgram(poolingProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 0);\n }\n\n const [rows, cols, channels] = x.tensor.shape;\n this.output = new _Tensor.default([], [channels]);\n\n for (let i = 0, len = channels; i < len; i++) {\n if (this.poolingFunc === 'max') {\n this.output.tensor.set(i, _ndarrayOps.default.sup(x.tensor.pick(null, null, i)));\n } else if (this.poolingFunc === 'average') {\n this.output.tensor.set(i, _ndarrayOps.default.sum(x.tensor.pick(null, null, i)) / (rows * cols));\n }\n }\n }\n\n _callGPU(x) {\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n } else {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 0);\n }\n\n this.inputShape = x.tensor.shape;\n x.reshapeTo2D();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], [this.inputShape[2]]);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const isMaxPooling = this.poolingFunc === 'max';\n\n _WebGL.webgl2.runProgram({\n program: this.poolingProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: this.inputShape[0] * this.inputShape[1],\n type: 'int',\n name: 'channelDataSize'\n }, {\n value: +isMaxPooling,\n type: 'bool',\n name: 'isMaxPooling'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = _GlobalPooling2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _GlobalPooling2D2 = _interopRequireDefault(require(\"./_GlobalPooling2D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass GlobalMaxPooling2D extends _GlobalPooling2D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'GlobalMaxPooling2D';\n this.poolingFunc = 'max';\n }\n\n}\n\nexports.default = GlobalMaxPooling2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst poolingProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform int channelDataSize;\\nuniform bool isMaxPooling;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(x, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n if (isMaxPooling) {\\n // GlobalMaxPooling\\n float maxval = 0.0;\\n for (int j = 0; j < size[1]; ++j) {\\n float val = texelFetch(x, ivec2(out_x, j), 0).r;\\n if (j == 0 || val > maxval) {\\n maxval = val;\\n }\\n }\\n outColor = vec4(maxval);\\n } else {\\n // GlobalAveragePooling\\n float sum = 0.0;\\n for (int j = 0; j < size[1]; ++j) {\\n float val = texelFetch(x, ivec2(out_x, j), 0).r;\\n sum += val;\\n }\\n outColor = vec4(sum / float(channelDataSize));\\n }\\n}\\n\";\n\nclass _GlobalPooling3D extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = '_GlobalPooling3D';\n const {\n data_format = 'channels_last'\n } = attrs;\n this.dataFormat = data_format;\n this.poolingFunc = 'max';\n\n if (this.gpu) {\n this.poolingProgram = _WebGL.webgl2.compileProgram(poolingProgramSource);\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 3, 0);\n }\n\n const [dim1, dim2, dim3, channels] = x.tensor.shape;\n this.output = new _Tensor.default([], [channels]);\n\n for (let i = 0, len = channels; i < len; i++) {\n if (this.poolingFunc === 'max') {\n this.output.tensor.set(i, _ndarrayOps.default.sup(x.tensor.pick(null, null, null, i)));\n } else if (this.poolingFunc === 'average') {\n this.output.tensor.set(i, _ndarrayOps.default.sum(x.tensor.pick(null, null, null, i)) / (dim1 * dim2 * dim3));\n }\n }\n }\n\n _callGPU(x) {\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n } else {\n if (this.dataFormat === 'channels_first') {\n x.tensor = x.tensor.transpose(1, 2, 3, 0);\n }\n\n this.inputShape = x.tensor.shape;\n x.reshapeTo2D();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], [this.inputShape[3]]);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const isMaxPooling = this.poolingFunc === 'max';\n\n _WebGL.webgl2.runProgram({\n program: this.poolingProgram,\n output: this.output,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: this.inputShape[0] * this.inputShape[1] * this.inputShape[2],\n type: 'int',\n name: 'channelDataSize'\n }, {\n value: +isMaxPooling,\n type: 'bool',\n name: 'isMaxPooling'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = _GlobalPooling3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _GlobalPooling3D2 = _interopRequireDefault(require(\"./_GlobalPooling3D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass GlobalMaxPooling3D extends _GlobalPooling3D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'GlobalMaxPooling3D';\n this.poolingFunc = 'max';\n }\n\n}\n\nexports.default = GlobalMaxPooling3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _GlobalPooling1D2 = _interopRequireDefault(require(\"./_GlobalPooling1D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass GlobalAveragePooling1D extends _GlobalPooling1D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'GlobalAveragePooling1D';\n this.poolingFunc = 'average';\n }\n\n}\n\nexports.default = GlobalAveragePooling1D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _GlobalPooling2D2 = _interopRequireDefault(require(\"./_GlobalPooling2D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass GlobalAveragePooling2D extends _GlobalPooling2D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'GlobalAveragePooling2D';\n this.poolingFunc = 'average';\n }\n\n}\n\nexports.default = GlobalAveragePooling2D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _GlobalPooling3D2 = _interopRequireDefault(require(\"./_GlobalPooling3D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass GlobalAveragePooling3D extends _GlobalPooling3D2.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'GlobalAveragePooling3D';\n this.poolingFunc = 'average';\n }\n\n}\n\nexports.default = GlobalAveragePooling3D;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"MaxPooling1D\", {\n enumerable: true,\n get: function () {\n return _MaxPooling1D.default;\n }\n});\nObject.defineProperty(exports, \"MaxPooling2D\", {\n enumerable: true,\n get: function () {\n return _MaxPooling2D.default;\n }\n});\nObject.defineProperty(exports, \"MaxPooling3D\", {\n enumerable: true,\n get: function () {\n return _MaxPooling3D.default;\n }\n});\nObject.defineProperty(exports, \"AveragePooling1D\", {\n enumerable: true,\n get: function () {\n return _AveragePooling1D.default;\n }\n});\nObject.defineProperty(exports, \"AveragePooling2D\", {\n enumerable: true,\n get: function () {\n return _AveragePooling2D.default;\n }\n});\nObject.defineProperty(exports, \"AveragePooling3D\", {\n enumerable: true,\n get: function () {\n return _AveragePooling3D.default;\n }\n});\nObject.defineProperty(exports, \"GlobalMaxPooling1D\", {\n enumerable: true,\n get: function () {\n return _GlobalMaxPooling1D.default;\n }\n});\nObject.defineProperty(exports, \"GlobalMaxPooling2D\", {\n enumerable: true,\n get: function () {\n return _GlobalMaxPooling2D.default;\n }\n});\nObject.defineProperty(exports, \"GlobalMaxPooling3D\", {\n enumerable: true,\n get: function () {\n return _GlobalMaxPooling3D.default;\n }\n});\nObject.defineProperty(exports, \"GlobalAveragePooling1D\", {\n enumerable: true,\n get: function () {\n return _GlobalAveragePooling1D.default;\n }\n});\nObject.defineProperty(exports, \"GlobalAveragePooling2D\", {\n enumerable: true,\n get: function () {\n return _GlobalAveragePooling2D.default;\n }\n});\nObject.defineProperty(exports, \"GlobalAveragePooling3D\", {\n enumerable: true,\n get: function () {\n return _GlobalAveragePooling3D.default;\n }\n});\n\nvar _MaxPooling1D = _interopRequireDefault(require(\"./MaxPooling1D\"));\n\nvar _MaxPooling2D = _interopRequireDefault(require(\"./MaxPooling2D\"));\n\nvar _MaxPooling3D = _interopRequireDefault(require(\"./MaxPooling3D\"));\n\nvar _AveragePooling1D = _interopRequireDefault(require(\"./AveragePooling1D\"));\n\nvar _AveragePooling2D = _interopRequireDefault(require(\"./AveragePooling2D\"));\n\nvar _AveragePooling3D = _interopRequireDefault(require(\"./AveragePooling3D\"));\n\nvar _GlobalMaxPooling1D = _interopRequireDefault(require(\"./GlobalMaxPooling1D\"));\n\nvar _GlobalMaxPooling2D = _interopRequireDefault(require(\"./GlobalMaxPooling2D\"));\n\nvar _GlobalMaxPooling3D = _interopRequireDefault(require(\"./GlobalMaxPooling3D\"));\n\nvar _GlobalAveragePooling1D = _interopRequireDefault(require(\"./GlobalAveragePooling1D\"));\n\nvar _GlobalAveragePooling2D = _interopRequireDefault(require(\"./GlobalAveragePooling2D\"));\n\nvar _GlobalAveragePooling3D = _interopRequireDefault(require(\"./GlobalAveragePooling3D\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar activations = _interopRequireWildcard(require(\"../../activations\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayBlasLevel = require(\"ndarray-blas-level2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nvar activationProgramSources = _interopRequireWildcard(require(\"../../activations/programSources\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nconst copyTextureProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D source;\\nout vec4 outColor;\\n\\nvoid main(void) {\\n outColor = texture(source, vec2(outTex.x, outTex.y));\\n}\\n\";\nconst matMulProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D A;\\nuniform sampler2D B;\\nuniform sampler2D C;\\nuniform bool addC;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 A_size = textureSize(A, 0);\\n ivec2 B_size = textureSize(B, 0);\\n int out_x = int(float(B_size[0]) * outTex.x);\\n int out_y = int(float(A_size[1]) * outTex.y);\\n int commonDim = A_size[0];\\n\\n float sum = 0.;\\n for (int i = 0; i < commonDim; ++i) {\\n float a = texelFetch(A, ivec2(i, out_y), 0).r;\\n float b = texelFetch(B, ivec2(out_x, i), 0).r;\\n sum += a * b;\\n }\\n\\n if (addC) {\\n sum += texelFetch(C, ivec2(out_x, 0), 0).r;\\n }\\n\\n outColor = vec4(sum);\\n}\\n\";\nconst gateSummationProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D t1;\\nuniform sampler2D t2;\\nuniform sampler2D bias;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(bias, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float t1_val = texelFetch(t1, ivec2(out_x, out_y), 0).r;\\n float t2_val = texelFetch(t2, ivec2(out_x, out_y), 0).r;\\n float bias_val = texelFetch(bias, ivec2(out_x, out_y), 0).r;\\n\\n outColor = vec4(t1_val + t2_val + bias_val);\\n}\\n\";\nconst timestepReadProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform int index;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(x, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n\\n outColor = vec4(texelFetch(x, ivec2(out_x, index), 0).r);\\n}\\n\";\nconst timestepWriteProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform sampler2D y;\\nuniform int index;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(y, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n if (out_y == index) {\\n outColor = vec4(texelFetch(x, ivec2(out_x, 0), 0).r);\\n } else {\\n outColor = vec4(texelFetch(y, ivec2(out_x, out_y), 0).r);\\n }\\n}\\n\";\n\nclass SimpleRNN extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n Object.defineProperty(this, \"_combine\", {\n configurable: true,\n enumerable: true,\n writable: true,\n value: (0, _cwise.default)({\n args: ['array', 'array', 'array', 'array'],\n body: function (_y, _x1, _x2, _b) {\n _y = _x1 + _x2 + _b;\n }\n })\n });\n this.layerClass = 'SimpleRNN';\n const {\n units = 1,\n activation = 'tanh',\n use_bias = true,\n return_sequences = false,\n go_backwards = false,\n stateful = false\n } = attrs;\n this.units = units;\n this.activation = activation;\n this.activationFunc = activations[activation];\n this.use_bias = use_bias;\n this.returnSequences = return_sequences;\n this.goBackwards = go_backwards;\n this.stateful = stateful;\n this.params = this.use_bias ? ['kernel', 'recurrent_kernel', 'bias'] : ['kernel', 'recurrent_kernel'];\n this.description = `output dimensions: ${this.units}`;\n this.description += this.activation !== 'linear' ? `, ${this.activation} activation` : '';\n this.description += this.returnSequences ? `, return sequences` : '';\n this.description += this.goBackwards ? `, backward direction` : '';\n this.description += this.stateful ? `, stateful` : '';\n\n if (this.gpu) {\n this.copyTextureProgram = _WebGL.webgl2.compileProgram(copyTextureProgramSource);\n this.matMulProgram = _WebGL.webgl2.compileProgram(matMulProgramSource);\n this.activationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.activation]);\n this.gateSummationProgram = _WebGL.webgl2.compileProgram(gateSummationProgramSource);\n this.timestepReadProgram = _WebGL.webgl2.compileProgram(timestepReadProgramSource);\n this.timestepWriteProgram = _WebGL.webgl2.compileProgram(timestepWriteProgramSource);\n }\n }\n\n setWeights(weightsArr) {\n super.setWeights(weightsArr);\n\n if (!this.use_bias) {\n this.weights['bias'] = new _Tensor.default([], [this.units]);\n\n if (this.gpu) {\n this.weights['bias'].createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n const dimHiddenState = this.units;\n const currentHiddenState = this.stateful && this.currentHiddenState ? this.currentHiddenState : new _Tensor.default([], [dimHiddenState]);\n const tempXH = new _Tensor.default([], [dimHiddenState]);\n const tempHH = new _Tensor.default([], [dimHiddenState]);\n const previousHiddenState = new _Tensor.default([], [dimHiddenState]);\n this.hiddenStateSequence = new _Tensor.default([], [x.tensor.shape[0], dimHiddenState]);\n const currentX = new _Tensor.default([], [x.tensor.shape[1]]);\n\n const _step = () => {\n _ndarrayOps.default.assign(previousHiddenState.tensor, currentHiddenState.tensor);\n\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['kernel'].tensor.transpose(1, 0), currentX.tensor, 1, tempXH.tensor);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['recurrent_kernel'].tensor.transpose(1, 0), previousHiddenState.tensor, 1, tempHH.tensor);\n\n this._combine(currentHiddenState.tensor, tempXH.tensor, tempHH.tensor, this.weights['bias'].tensor);\n\n this.activationFunc(currentHiddenState);\n };\n\n for (let i = 0, len = x.tensor.shape[0]; i < len; i++) {\n const inputIndex = this.goBackwards ? len - i - 1 : i;\n\n _ndarrayOps.default.assign(currentX.tensor, x.tensor.pick(inputIndex, null));\n\n const tempTensors = [tempXH, tempHH];\n tempTensors.forEach(temp => _ndarrayOps.default.assigns(temp.tensor, 0));\n\n _step();\n\n if (this.returnSequences) {\n _ndarrayOps.default.assign(this.hiddenStateSequence.tensor.pick(i, null), currentHiddenState.tensor);\n }\n }\n\n if (this.returnSequences) {\n this.output = this.hiddenStateSequence;\n } else {\n this.output = currentHiddenState;\n }\n\n if (this.stateful) {\n this.currentHiddenState = currentHiddenState;\n }\n }\n\n _stepGPU() {\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.previousHiddenState,\n inputs: [{\n input: this.currentHiddenState,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempXH,\n inputs: [{\n input: this.currentX,\n name: 'A'\n }, {\n input: this.weights['kernel'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempHH,\n inputs: [{\n input: this.previousHiddenState,\n name: 'A'\n }, {\n input: this.weights['recurrent_kernel'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.gateSummationProgram,\n output: this.currentHiddenStatePreactiv,\n inputs: [{\n input: this.tempXH,\n name: 't1'\n }, {\n input: this.tempHH,\n name: 't2'\n }, {\n input: this.weights['bias'],\n name: 'bias'\n }]\n });\n\n if (this.activation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.activationProgram,\n output: this.currentHiddenState,\n inputs: [{\n input: this.currentHiddenStatePreactiv,\n name: 'x'\n }]\n });\n } else {\n this.currentHiddenState = this.currentHiddenStatePreactiv;\n }\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const dimHiddenState = this.units;\n\n if (!this.currentHiddenState || !this.stateful) {\n this.currentHiddenState = new _Tensor.default([], [dimHiddenState]);\n this.currentHiddenState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentHiddenStatePreactiv) {\n this.currentHiddenStatePreactiv = new _Tensor.default([], [dimHiddenState]);\n this.currentHiddenStatePreactiv.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempXH) {\n this.tempXH = new _Tensor.default([], [dimHiddenState]);\n this.tempXH.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempHH) {\n this.tempHH = new _Tensor.default([], [dimHiddenState]);\n this.tempHH.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.previousHiddenState) {\n this.previousHiddenState = new _Tensor.default([], [dimHiddenState]);\n this.previousHiddenState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.hiddenStateSequence) {\n this.hiddenStateSequence = new _Tensor.default([], [x.glTextureShape[0], dimHiddenState]);\n this.hiddenStateSequence.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.hiddenStateSequenceCopy) {\n this.hiddenStateSequenceCopy = new _Tensor.default([], [x.glTextureShape[0], dimHiddenState]);\n this.hiddenStateSequenceCopy.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentX) {\n this.currentX = new _Tensor.default([], [x.glTextureShape[1]]);\n this.currentX.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n for (let i = 0, len = x.glTextureShape[0]; i < len; i++) {\n const inputIndex = this.goBackwards ? len - i - 1 : i;\n\n _WebGL.webgl2.runProgram({\n program: this.timestepReadProgram,\n output: this.currentX,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: inputIndex,\n type: 'int',\n name: 'index'\n }]\n });\n\n this._stepGPU();\n\n if (this.returnSequences) {\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.hiddenStateSequenceCopy,\n inputs: [{\n input: this.hiddenStateSequence,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.timestepWriteProgram,\n output: this.hiddenStateSequence,\n inputs: [{\n input: this.currentHiddenState,\n name: 'x'\n }, {\n input: this.hiddenStateSequenceCopy,\n name: 'y'\n }],\n uniforms: [{\n value: i,\n type: 'int',\n name: 'index'\n }]\n });\n }\n }\n\n if (this.returnSequences) {\n this.output = this.hiddenStateSequence;\n } else {\n this.output = this.currentHiddenState;\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = SimpleRNN;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar activations = _interopRequireWildcard(require(\"../../activations\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayBlasLevel = require(\"ndarray-blas-level2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nvar activationProgramSources = _interopRequireWildcard(require(\"../../activations/programSources\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nconst copyTextureProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D source;\\nout vec4 outColor;\\n\\nvoid main(void) {\\n outColor = texture(source, vec2(outTex.x, outTex.y));\\n}\\n\";\nconst matMulProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D A;\\nuniform sampler2D B;\\nuniform sampler2D C;\\nuniform bool addC;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 A_size = textureSize(A, 0);\\n ivec2 B_size = textureSize(B, 0);\\n int out_x = int(float(B_size[0]) * outTex.x);\\n int out_y = int(float(A_size[1]) * outTex.y);\\n int commonDim = A_size[0];\\n\\n float sum = 0.;\\n for (int i = 0; i < commonDim; ++i) {\\n float a = texelFetch(A, ivec2(i, out_y), 0).r;\\n float b = texelFetch(B, ivec2(out_x, i), 0).r;\\n sum += a * b;\\n }\\n\\n if (addC) {\\n sum += texelFetch(C, ivec2(out_x, 0), 0).r;\\n }\\n\\n outColor = vec4(sum);\\n}\\n\";\nconst gateSummationProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D t1;\\nuniform sampler2D t2;\\nuniform sampler2D bias;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(bias, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float t1_val = texelFetch(t1, ivec2(out_x, out_y), 0).r;\\n float t2_val = texelFetch(t2, ivec2(out_x, out_y), 0).r;\\n float bias_val = texelFetch(bias, ivec2(out_x, out_y), 0).r;\\n\\n outColor = vec4(t1_val + t2_val + bias_val);\\n}\\n\";\nconst gateProductProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D t1;\\nuniform sampler2D t2;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(t1, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float t1_val = texelFetch(t1, ivec2(out_x, out_y), 0).r;\\n float t2_val = texelFetch(t2, ivec2(out_x, out_y), 0).r;\\n\\n outColor = vec4(t1_val * t2_val);\\n}\\n\";\nconst timestepReadProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform int index;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(x, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n\\n outColor = vec4(texelFetch(x, ivec2(out_x, index), 0).r);\\n}\\n\";\nconst timestepWriteProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform sampler2D y;\\nuniform int index;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(y, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n if (out_y == index) {\\n outColor = vec4(texelFetch(x, ivec2(out_x, 0), 0).r);\\n } else {\\n outColor = vec4(texelFetch(y, ivec2(out_x, out_y), 0).r);\\n }\\n}\\n\";\nconst updateProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D c;\\nuniform sampler2D ctm1;\\nuniform sampler2D i;\\nuniform sampler2D f;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(c, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float c_val = texelFetch(c, ivec2(out_x, out_y), 0).r;\\n float ctm1_val = texelFetch(ctm1, ivec2(out_x, out_y), 0).r;\\n float i_val = texelFetch(i, ivec2(out_x, out_y), 0).r;\\n float f_val = texelFetch(f, ivec2(out_x, out_y), 0).r;\\n\\n outColor = vec4(c_val * i_val + ctm1_val * f_val);\\n}\\n\";\n\nclass LSTM extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n Object.defineProperty(this, \"_combine\", {\n configurable: true,\n enumerable: true,\n writable: true,\n value: (0, _cwise.default)({\n args: ['array', 'array', 'array', 'array'],\n body: function (_y, _x1, _x2, _b) {\n _y = _x1 + _x2 + _b;\n }\n })\n });\n Object.defineProperty(this, \"_update\", {\n configurable: true,\n enumerable: true,\n writable: true,\n value: (0, _cwise.default)({\n args: ['array', 'array', 'array', 'array'],\n body: function (_c, _ctm1, _i, _f) {\n _c = _c * _i + _ctm1 * _f;\n }\n })\n });\n this.layerClass = 'LSTM';\n const {\n units = 1,\n activation = 'tanh',\n use_bias = true,\n recurrent_activation = 'hard_sigmoid',\n return_sequences = false,\n go_backwards = false,\n stateful = false\n } = attrs;\n this.units = units;\n this.activation = activation;\n this.recurrentActivation = recurrent_activation;\n this.activationFunc = activations[activation];\n this.recurrentActivationFunc = activations[recurrent_activation];\n this.use_bias = use_bias;\n this.returnSequences = return_sequences;\n this.goBackwards = go_backwards;\n this.stateful = stateful;\n this.params = this.use_bias ? ['kernel', 'recurrent_kernel', 'bias'] : ['kernel', 'recurrent_kernel'];\n this.description = `output dimensions: ${this.units}`;\n this.description += this.activation !== 'linear' ? `, ${this.activation} activation` : '';\n this.description += this.recurrentActivation !== 'linear' ? `, ${this.recurrentActivation} recurrent activation` : '';\n this.description += this.returnSequences ? `, return sequences` : '';\n this.description += this.goBackwards ? `, backward direction` : '';\n this.description += this.stateful ? `, stateful` : '';\n\n if (this.gpu) {\n this.copyTextureProgram = _WebGL.webgl2.compileProgram(copyTextureProgramSource);\n this.matMulProgram = _WebGL.webgl2.compileProgram(matMulProgramSource);\n this.activationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.activation]);\n this.recurrentActivationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.recurrentActivation]);\n this.gateSummationProgram = _WebGL.webgl2.compileProgram(gateSummationProgramSource);\n this.gateProductProgram = _WebGL.webgl2.compileProgram(gateProductProgramSource);\n this.timestepReadProgram = _WebGL.webgl2.compileProgram(timestepReadProgramSource);\n this.timestepWriteProgram = _WebGL.webgl2.compileProgram(timestepWriteProgramSource);\n this.updateProgram = _WebGL.webgl2.compileProgram(updateProgramSource);\n }\n }\n\n setWeights(weightsArr) {\n super.setWeights(weightsArr);\n const shape_W = this.weights['kernel'].tensor.shape;\n this.weights['W_i'] = new _Tensor.default([], [shape_W[0], this.units]);\n this.weights['W_f'] = new _Tensor.default([], [shape_W[0], this.units]);\n this.weights['W_c'] = new _Tensor.default([], [shape_W[0], this.units]);\n this.weights['W_o'] = new _Tensor.default([], [shape_W[0], this.units]);\n\n _ndarrayOps.default.assign(this.weights['W_i'].tensor, this.weights['kernel'].tensor.hi(shape_W[0], this.units).lo(0, 0));\n\n _ndarrayOps.default.assign(this.weights['W_f'].tensor, this.weights['kernel'].tensor.hi(shape_W[0], 2 * this.units).lo(0, this.units));\n\n _ndarrayOps.default.assign(this.weights['W_c'].tensor, this.weights['kernel'].tensor.hi(shape_W[0], 3 * this.units).lo(0, 2 * this.units));\n\n _ndarrayOps.default.assign(this.weights['W_o'].tensor, this.weights['kernel'].tensor.hi(shape_W[0], 4 * this.units).lo(0, 3 * this.units));\n\n const shape_U = this.weights['recurrent_kernel'].tensor.shape;\n this.weights['U_i'] = new _Tensor.default([], [shape_U[0], this.units]);\n this.weights['U_f'] = new _Tensor.default([], [shape_U[0], this.units]);\n this.weights['U_c'] = new _Tensor.default([], [shape_U[0], this.units]);\n this.weights['U_o'] = new _Tensor.default([], [shape_U[0], this.units]);\n\n _ndarrayOps.default.assign(this.weights['U_i'].tensor, this.weights['recurrent_kernel'].tensor.hi(shape_U[0], this.units).lo(0, 0));\n\n _ndarrayOps.default.assign(this.weights['U_f'].tensor, this.weights['recurrent_kernel'].tensor.hi(shape_U[0], 2 * this.units).lo(0, this.units));\n\n _ndarrayOps.default.assign(this.weights['U_c'].tensor, this.weights['recurrent_kernel'].tensor.hi(shape_U[0], 3 * this.units).lo(0, 2 * this.units));\n\n _ndarrayOps.default.assign(this.weights['U_o'].tensor, this.weights['recurrent_kernel'].tensor.hi(shape_U[0], 4 * this.units).lo(0, 3 * this.units));\n\n this.weights['b_i'] = new _Tensor.default([], [this.units]);\n this.weights['b_f'] = new _Tensor.default([], [this.units]);\n this.weights['b_c'] = new _Tensor.default([], [this.units]);\n this.weights['b_o'] = new _Tensor.default([], [this.units]);\n\n if (this.use_bias) {\n _ndarrayOps.default.assign(this.weights['b_i'].tensor, this.weights['bias'].tensor.hi(this.units).lo(0));\n\n _ndarrayOps.default.assign(this.weights['b_f'].tensor, this.weights['bias'].tensor.hi(2 * this.units).lo(this.units));\n\n _ndarrayOps.default.assign(this.weights['b_c'].tensor, this.weights['bias'].tensor.hi(3 * this.units).lo(2 * this.units));\n\n _ndarrayOps.default.assign(this.weights['b_o'].tensor, this.weights['bias'].tensor.hi(4 * this.units).lo(3 * this.units));\n }\n\n if (this.gpu) {\n const names = ['W_i', 'W_f', 'W_c', 'W_o', 'U_i', 'U_f', 'U_c', 'U_o', 'b_i', 'b_f', 'b_c', 'b_o'];\n names.forEach(name => {\n this.weights[name].createGLTexture({\n type: '2d',\n format: 'float'\n });\n });\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n const dimInputGate = this.weights['b_i'].tensor.shape[0];\n const dimCandidate = this.weights['b_c'].tensor.shape[0];\n const dimForgetGate = this.weights['b_f'].tensor.shape[0];\n const dimOutputGate = this.weights['b_o'].tensor.shape[0];\n const currentInputGateState = new _Tensor.default([], [dimInputGate]);\n const tempXI = new _Tensor.default([], [dimInputGate]);\n const tempHI = new _Tensor.default([], [dimInputGate]);\n const currentForgetGateState = new _Tensor.default([], [dimForgetGate]);\n const tempXF = new _Tensor.default([], [dimForgetGate]);\n const tempHF = new _Tensor.default([], [dimForgetGate]);\n const currentOutputGateState = new _Tensor.default([], [dimOutputGate]);\n const tempXO = new _Tensor.default([], [dimOutputGate]);\n const tempHO = new _Tensor.default([], [dimOutputGate]);\n const currentCandidate = new _Tensor.default([], [dimCandidate]);\n const tempXC = new _Tensor.default([], [dimCandidate]);\n const tempHC = new _Tensor.default([], [dimCandidate]);\n const previousCandidate = this.stateful && this.previousCandidate ? this.previousCandidate : new _Tensor.default([], [dimCandidate]);\n const currentHiddenState = this.stateful && this.currentHiddenState ? this.currentHiddenState : new _Tensor.default([], [dimCandidate]);\n const previousHiddenState = new _Tensor.default([], [dimCandidate]);\n this.hiddenStateSequence = new _Tensor.default([], [x.tensor.shape[0], dimCandidate]);\n const currentX = new _Tensor.default([], [x.tensor.shape[1]]);\n\n const _step = () => {\n _ndarrayOps.default.assign(previousHiddenState.tensor, currentHiddenState.tensor);\n\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['W_i'].tensor.transpose(1, 0), currentX.tensor, 1, tempXI.tensor);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['U_i'].tensor.transpose(1, 0), previousHiddenState.tensor, 1, tempHI.tensor);\n\n this._combine(currentInputGateState.tensor, tempXI.tensor, tempHI.tensor, this.weights['b_i'].tensor);\n\n this.recurrentActivationFunc(currentInputGateState);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['W_f'].tensor.transpose(1, 0), currentX.tensor, 1, tempXF.tensor);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['U_f'].tensor.transpose(1, 0), previousHiddenState.tensor, 1, tempHF.tensor);\n\n this._combine(currentForgetGateState.tensor, tempXF.tensor, tempHF.tensor, this.weights['b_f'].tensor);\n\n this.recurrentActivationFunc(currentForgetGateState);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['W_o'].tensor.transpose(1, 0), currentX.tensor, 1, tempXO.tensor);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['U_o'].tensor.transpose(1, 0), previousHiddenState.tensor, 1, tempHO.tensor);\n\n this._combine(currentOutputGateState.tensor, tempXO.tensor, tempHO.tensor, this.weights['b_o'].tensor);\n\n this.recurrentActivationFunc(currentOutputGateState);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['W_c'].tensor.transpose(1, 0), currentX.tensor, 1, tempXC.tensor);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['U_c'].tensor.transpose(1, 0), previousHiddenState.tensor, 1, tempHC.tensor);\n\n this._combine(currentCandidate.tensor, tempXC.tensor, tempHC.tensor, this.weights['b_c'].tensor);\n\n this.activationFunc(currentCandidate);\n\n this._update(currentCandidate.tensor, previousCandidate.tensor, currentInputGateState.tensor, currentForgetGateState.tensor);\n\n _ndarrayOps.default.assign(previousCandidate.tensor, currentCandidate.tensor);\n\n this.activationFunc(currentCandidate);\n\n _ndarrayOps.default.mul(currentHiddenState.tensor, currentOutputGateState.tensor, currentCandidate.tensor);\n };\n\n for (let i = 0, len = x.tensor.shape[0]; i < len; i++) {\n const inputIndex = this.goBackwards ? len - i - 1 : i;\n\n _ndarrayOps.default.assign(currentX.tensor, x.tensor.pick(inputIndex, null));\n\n const tempTensors = [tempXI, tempHI, tempXF, tempHF, tempXO, tempHO, tempXC, tempHC];\n tempTensors.forEach(temp => _ndarrayOps.default.assigns(temp.tensor, 0));\n\n _step();\n\n _ndarrayOps.default.assign(this.hiddenStateSequence.tensor.pick(i, null), currentHiddenState.tensor);\n }\n\n if (this.returnSequences) {\n this.output = this.hiddenStateSequence;\n } else {\n this.output = currentHiddenState;\n }\n\n if (this.stateful) {\n this.previousCandidate = previousCandidate;\n this.currentHiddenState = currentHiddenState;\n }\n }\n\n _stepGPU() {\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.previousHiddenState,\n inputs: [{\n input: this.currentHiddenState,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempXI,\n inputs: [{\n input: this.currentX,\n name: 'A'\n }, {\n input: this.weights['W_i'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempHI,\n inputs: [{\n input: this.previousHiddenState,\n name: 'A'\n }, {\n input: this.weights['U_i'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.gateSummationProgram,\n output: this.currentInputGateStatePreactiv,\n inputs: [{\n input: this.tempXI,\n name: 't1'\n }, {\n input: this.tempHI,\n name: 't2'\n }, {\n input: this.weights['b_i'],\n name: 'bias'\n }]\n });\n\n if (this.recurrentActivation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.recurrentActivationProgram,\n output: this.currentInputGateState,\n inputs: [{\n input: this.currentInputGateStatePreactiv,\n name: 'x'\n }]\n });\n } else {\n this.currentInputGateState = this.currentInputGateStatePreactiv;\n }\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempXF,\n inputs: [{\n input: this.currentX,\n name: 'A'\n }, {\n input: this.weights['W_f'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempHF,\n inputs: [{\n input: this.previousHiddenState,\n name: 'A'\n }, {\n input: this.weights['U_f'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.gateSummationProgram,\n output: this.currentForgetGateStatePreactiv,\n inputs: [{\n input: this.tempXF,\n name: 't1'\n }, {\n input: this.tempHF,\n name: 't2'\n }, {\n input: this.weights['b_f'],\n name: 'bias'\n }]\n });\n\n if (this.recurrentActivation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.recurrentActivationProgram,\n output: this.currentForgetGateState,\n inputs: [{\n input: this.currentForgetGateStatePreactiv,\n name: 'x'\n }]\n });\n } else {\n this.currentForgetGateState = this.currentForgetGateStatePreactiv;\n }\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempXO,\n inputs: [{\n input: this.currentX,\n name: 'A'\n }, {\n input: this.weights['W_o'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempHO,\n inputs: [{\n input: this.previousHiddenState,\n name: 'A'\n }, {\n input: this.weights['U_o'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.gateSummationProgram,\n output: this.currentOutputGateStatePreactiv,\n inputs: [{\n input: this.tempXO,\n name: 't1'\n }, {\n input: this.tempHO,\n name: 't2'\n }, {\n input: this.weights['b_o'],\n name: 'bias'\n }]\n });\n\n if (this.recurrentActivation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.recurrentActivationProgram,\n output: this.currentOutputGateState,\n inputs: [{\n input: this.currentOutputGateStatePreactiv,\n name: 'x'\n }]\n });\n } else {\n this.currentOutputGateState = this.currentOutputGateStatePreactiv;\n }\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempXC,\n inputs: [{\n input: this.currentX,\n name: 'A'\n }, {\n input: this.weights['W_c'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempHC,\n inputs: [{\n input: this.previousHiddenState,\n name: 'A'\n }, {\n input: this.weights['U_c'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.gateSummationProgram,\n output: this.currentCandidatePreactiv,\n inputs: [{\n input: this.tempXC,\n name: 't1'\n }, {\n input: this.tempHC,\n name: 't2'\n }, {\n input: this.weights['b_c'],\n name: 'bias'\n }]\n });\n\n if (this.activation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.activationProgram,\n output: this.currentCandidate,\n inputs: [{\n input: this.currentCandidatePreactiv,\n name: 'x'\n }]\n });\n } else {\n this.currentCandidate = this.currentCandidatePreactiv;\n }\n\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.currentCandidateCopy,\n inputs: [{\n input: this.currentCandidate,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.updateProgram,\n output: this.currentCandidate,\n inputs: [{\n input: this.currentCandidateCopy,\n name: 'c'\n }, {\n input: this.previousCandidate,\n name: 'ctm1'\n }, {\n input: this.currentInputGateState,\n name: 'i'\n }, {\n input: this.currentForgetGateState,\n name: 'f'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.previousCandidate,\n inputs: [{\n input: this.currentCandidate,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.currentCandidatePreactiv,\n inputs: [{\n input: this.currentCandidate,\n name: 'source'\n }]\n });\n\n if (this.activation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.activationProgram,\n output: this.currentCandidate,\n inputs: [{\n input: this.currentCandidatePreactiv,\n name: 'x'\n }]\n });\n } else {\n this.currentCandidate = this.currentCandidatePreactiv;\n }\n\n _WebGL.webgl2.runProgram({\n program: this.gateProductProgram,\n output: this.currentHiddenState,\n inputs: [{\n input: this.currentOutputGateState,\n name: 't1'\n }, {\n input: this.currentCandidate,\n name: 't2'\n }]\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const dimInputGate = this.weights['b_i'].glTextureShape[1];\n const dimCandidate = this.weights['b_c'].glTextureShape[1];\n const dimForgetGate = this.weights['b_f'].glTextureShape[1];\n const dimOutputGate = this.weights['b_o'].glTextureShape[1];\n\n if (!this.currentInputGateState) {\n this.currentInputGateState = new _Tensor.default([], [dimInputGate]);\n this.currentInputGateState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentInputGateStatePreactiv) {\n this.currentInputGateStatePreactiv = new _Tensor.default([], [dimInputGate]);\n this.currentInputGateStatePreactiv.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempXI) {\n this.tempXI = new _Tensor.default([], [dimInputGate]);\n this.tempXI.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempHI) {\n this.tempHI = new _Tensor.default([], [dimInputGate]);\n this.tempHI.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentForgetGateState) {\n this.currentForgetGateState = new _Tensor.default([], [dimForgetGate]);\n this.currentForgetGateState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentForgetGateStatePreactiv) {\n this.currentForgetGateStatePreactiv = new _Tensor.default([], [dimForgetGate]);\n this.currentForgetGateStatePreactiv.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempXF) {\n this.tempXF = new _Tensor.default([], [dimForgetGate]);\n this.tempXF.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempHF) {\n this.tempHF = new _Tensor.default([], [dimForgetGate]);\n this.tempHF.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentOutputGateState) {\n this.currentOutputGateState = new _Tensor.default([], [dimOutputGate]);\n this.currentOutputGateState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentOutputGateStatePreactiv) {\n this.currentOutputGateStatePreactiv = new _Tensor.default([], [dimOutputGate]);\n this.currentOutputGateStatePreactiv.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempXO) {\n this.tempXO = new _Tensor.default([], [dimOutputGate]);\n this.tempXO.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempHO) {\n this.tempHO = new _Tensor.default([], [dimOutputGate]);\n this.tempHO.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentCandidate) {\n this.currentCandidate = new _Tensor.default([], [dimCandidate]);\n this.currentCandidate.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentCandidateCopy) {\n this.currentCandidateCopy = new _Tensor.default([], [dimCandidate]);\n this.currentCandidateCopy.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentCandidatePreactiv) {\n this.currentCandidatePreactiv = new _Tensor.default([], [dimCandidate]);\n this.currentCandidatePreactiv.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempXC) {\n this.tempXC = new _Tensor.default([], [dimCandidate]);\n this.tempXC.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempHC) {\n this.tempHC = new _Tensor.default([], [dimCandidate]);\n this.tempHC.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.previousCandidate || !this.stateful) {\n this.previousCandidate = new _Tensor.default([], [dimCandidate]);\n this.previousCandidate.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentHiddenState || !this.stateful) {\n this.currentHiddenState = new _Tensor.default([], [dimCandidate]);\n this.currentHiddenState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.previousHiddenState) {\n this.previousHiddenState = new _Tensor.default([], [dimCandidate]);\n this.previousHiddenState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.hiddenStateSequence) {\n this.hiddenStateSequence = new _Tensor.default([], [x.glTextureShape[0], dimCandidate]);\n this.hiddenStateSequence.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.hiddenStateSequenceCopy) {\n this.hiddenStateSequenceCopy = new _Tensor.default([], [x.glTextureShape[0], dimCandidate]);\n this.hiddenStateSequenceCopy.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentX) {\n this.currentX = new _Tensor.default([], [x.glTextureShape[1]]);\n this.currentX.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n for (let i = 0, len = x.glTextureShape[0]; i < len; i++) {\n const inputIndex = this.goBackwards ? len - i - 1 : i;\n\n _WebGL.webgl2.runProgram({\n program: this.timestepReadProgram,\n output: this.currentX,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: inputIndex,\n type: 'int',\n name: 'index'\n }]\n });\n\n this._stepGPU();\n\n if (this.returnSequences) {\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.hiddenStateSequenceCopy,\n inputs: [{\n input: this.hiddenStateSequence,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.timestepWriteProgram,\n output: this.hiddenStateSequence,\n inputs: [{\n input: this.currentHiddenState,\n name: 'x'\n }, {\n input: this.hiddenStateSequenceCopy,\n name: 'y'\n }],\n uniforms: [{\n value: i,\n type: 'int',\n name: 'index'\n }]\n });\n }\n }\n\n if (this.returnSequences) {\n this.output = this.hiddenStateSequence;\n } else {\n this.output = this.currentHiddenState;\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = LSTM;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar activations = _interopRequireWildcard(require(\"../../activations\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayBlasLevel = require(\"ndarray-blas-level2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _cwise = _interopRequireDefault(require(\"cwise\"));\n\nvar activationProgramSources = _interopRequireWildcard(require(\"../../activations/programSources\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nconst copyTextureProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D source;\\nout vec4 outColor;\\n\\nvoid main(void) {\\n outColor = texture(source, vec2(outTex.x, outTex.y));\\n}\\n\";\nconst matMulProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D A;\\nuniform sampler2D B;\\nuniform sampler2D C;\\nuniform bool addC;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 A_size = textureSize(A, 0);\\n ivec2 B_size = textureSize(B, 0);\\n int out_x = int(float(B_size[0]) * outTex.x);\\n int out_y = int(float(A_size[1]) * outTex.y);\\n int commonDim = A_size[0];\\n\\n float sum = 0.;\\n for (int i = 0; i < commonDim; ++i) {\\n float a = texelFetch(A, ivec2(i, out_y), 0).r;\\n float b = texelFetch(B, ivec2(out_x, i), 0).r;\\n sum += a * b;\\n }\\n\\n if (addC) {\\n sum += texelFetch(C, ivec2(out_x, 0), 0).r;\\n }\\n\\n outColor = vec4(sum);\\n}\\n\";\nconst gateSummationProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D t1;\\nuniform sampler2D t2;\\nuniform sampler2D bias;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(bias, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float t1_val = texelFetch(t1, ivec2(out_x, out_y), 0).r;\\n float t2_val = texelFetch(t2, ivec2(out_x, out_y), 0).r;\\n float bias_val = texelFetch(bias, ivec2(out_x, out_y), 0).r;\\n\\n outColor = vec4(t1_val + t2_val + bias_val);\\n}\\n\";\nconst gateProductProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D t1;\\nuniform sampler2D t2;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(t1, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float t1_val = texelFetch(t1, ivec2(out_x, out_y), 0).r;\\n float t2_val = texelFetch(t2, ivec2(out_x, out_y), 0).r;\\n\\n outColor = vec4(t1_val * t2_val);\\n}\\n\";\nconst timestepReadProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform int index;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(x, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n\\n outColor = vec4(texelFetch(x, ivec2(out_x, index), 0).r);\\n}\\n\";\nconst timestepWriteProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform sampler2D y;\\nuniform int index;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(y, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n if (out_y == index) {\\n outColor = vec4(texelFetch(x, ivec2(out_x, 0), 0).r);\\n } else {\\n outColor = vec4(texelFetch(y, ivec2(out_x, out_y), 0).r);\\n }\\n}\\n\";\nconst updateProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D h;\\nuniform sampler2D htm1;\\nuniform sampler2D z;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(h, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float h_val = texelFetch(h, ivec2(out_x, out_y), 0).r;\\n float htm1_val = texelFetch(htm1, ivec2(out_x, out_y), 0).r;\\n float z_val = texelFetch(z, ivec2(out_x, out_y), 0).r;\\n\\n outColor = vec4(h_val * (float(1.0) - z_val) + htm1_val * z_val);\\n}\\n\";\n\nclass GRU extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n Object.defineProperty(this, \"_combine\", {\n configurable: true,\n enumerable: true,\n writable: true,\n value: (0, _cwise.default)({\n args: ['array', 'array', 'array', 'array'],\n body: function (_y, _x1, _x2, _b) {\n _y = _x1 + _x2 + _b;\n }\n })\n });\n Object.defineProperty(this, \"_update\", {\n configurable: true,\n enumerable: true,\n writable: true,\n value: (0, _cwise.default)({\n args: ['array', 'array', 'array'],\n body: function (_h, _htm1, _z) {\n _h = _h * (1 - _z) + _htm1 * _z;\n }\n })\n });\n this.layerClass = 'GRU';\n const {\n units = 1,\n activation = 'tanh',\n use_bias = true,\n recurrent_activation = 'hard_sigmoid',\n return_sequences = false,\n go_backwards = false,\n stateful = false\n } = attrs;\n this.units = units;\n this.activation = activation;\n this.recurrentActivation = recurrent_activation;\n this.activationFunc = activations[activation];\n this.recurrentActivationFunc = activations[recurrent_activation];\n this.use_bias = use_bias;\n this.returnSequences = return_sequences;\n this.goBackwards = go_backwards;\n this.stateful = stateful;\n this.params = this.use_bias ? ['kernel', 'recurrent_kernel', 'bias'] : ['kernel', 'recurrent_kernel'];\n this.description = `output dimensions: ${this.units}`;\n this.description += this.activation !== 'linear' ? `, ${this.activation} activation` : '';\n this.description += this.recurrentActivation !== 'linear' ? `, ${this.recurrentActivation} recurrent activation` : '';\n this.description += this.returnSequences ? `, return sequences` : '';\n this.description += this.goBackwards ? `, backward direction` : '';\n this.description += this.stateful ? `, stateful` : '';\n\n if (this.gpu) {\n this.copyTextureProgram = _WebGL.webgl2.compileProgram(copyTextureProgramSource);\n this.matMulProgram = _WebGL.webgl2.compileProgram(matMulProgramSource);\n this.activationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.activation]);\n this.recurrentActivationProgram = _WebGL.webgl2.compileProgram(activationProgramSources[this.recurrentActivation]);\n this.gateSummationProgram = _WebGL.webgl2.compileProgram(gateSummationProgramSource);\n this.gateProductProgram = _WebGL.webgl2.compileProgram(gateProductProgramSource);\n this.timestepReadProgram = _WebGL.webgl2.compileProgram(timestepReadProgramSource);\n this.timestepWriteProgram = _WebGL.webgl2.compileProgram(timestepWriteProgramSource);\n this.updateProgram = _WebGL.webgl2.compileProgram(updateProgramSource);\n }\n }\n\n setWeights(weightsArr) {\n super.setWeights(weightsArr);\n const shape_W = this.weights['kernel'].tensor.shape;\n this.weights['W_z'] = new _Tensor.default([], [shape_W[0], this.units]);\n this.weights['W_r'] = new _Tensor.default([], [shape_W[0], this.units]);\n this.weights['W_h'] = new _Tensor.default([], [shape_W[0], this.units]);\n\n _ndarrayOps.default.assign(this.weights['W_z'].tensor, this.weights['kernel'].tensor.hi(shape_W[0], this.units).lo(0, 0));\n\n _ndarrayOps.default.assign(this.weights['W_r'].tensor, this.weights['kernel'].tensor.hi(shape_W[0], 2 * this.units).lo(0, this.units));\n\n _ndarrayOps.default.assign(this.weights['W_h'].tensor, this.weights['kernel'].tensor.hi(shape_W[0], 3 * this.units).lo(0, 2 * this.units));\n\n const shape_U = this.weights['recurrent_kernel'].tensor.shape;\n this.weights['U_z'] = new _Tensor.default([], [shape_U[0], this.units]);\n this.weights['U_r'] = new _Tensor.default([], [shape_U[0], this.units]);\n this.weights['U_h'] = new _Tensor.default([], [shape_U[0], this.units]);\n\n _ndarrayOps.default.assign(this.weights['U_z'].tensor, this.weights['recurrent_kernel'].tensor.hi(shape_U[0], this.units).lo(0, 0));\n\n _ndarrayOps.default.assign(this.weights['U_r'].tensor, this.weights['recurrent_kernel'].tensor.hi(shape_U[0], 2 * this.units).lo(0, this.units));\n\n _ndarrayOps.default.assign(this.weights['U_h'].tensor, this.weights['recurrent_kernel'].tensor.hi(shape_U[0], 3 * this.units).lo(0, 2 * this.units));\n\n this.weights['b_z'] = new _Tensor.default([], [this.units]);\n this.weights['b_r'] = new _Tensor.default([], [this.units]);\n this.weights['b_h'] = new _Tensor.default([], [this.units]);\n\n if (this.use_bias) {\n _ndarrayOps.default.assign(this.weights['b_z'].tensor, this.weights['bias'].tensor.hi(this.units).lo(0));\n\n _ndarrayOps.default.assign(this.weights['b_r'].tensor, this.weights['bias'].tensor.hi(2 * this.units).lo(this.units));\n\n _ndarrayOps.default.assign(this.weights['b_h'].tensor, this.weights['bias'].tensor.hi(3 * this.units).lo(2 * this.units));\n }\n\n if (this.gpu) {\n const names = ['W_z', 'W_r', 'W_h', 'U_z', 'U_r', 'U_h', 'b_z', 'b_r', 'b_h'];\n names.forEach(name => {\n this.weights[name].createGLTexture({\n type: '2d',\n format: 'float'\n });\n });\n }\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n const dimUpdateGate = this.weights['b_z'].tensor.shape[0];\n const dimResetGate = this.weights['b_r'].tensor.shape[0];\n const dimHiddenState = this.weights['b_h'].tensor.shape[0];\n const currentUpdateGateState = new _Tensor.default([], [dimUpdateGate]);\n const tempXZ = new _Tensor.default([], [dimUpdateGate]);\n const tempHZ = new _Tensor.default([], [dimUpdateGate]);\n const currentResetGateState = new _Tensor.default([], [dimResetGate]);\n const tempXR = new _Tensor.default([], [dimResetGate]);\n const tempHR = new _Tensor.default([], [dimResetGate]);\n const currentHiddenState = this.stateful && this.currentHiddenState ? this.currentHiddenState : new _Tensor.default([], [dimHiddenState]);\n const tempXH = new _Tensor.default([], [dimHiddenState]);\n const tempHH = new _Tensor.default([], [dimHiddenState]);\n const previousHiddenState = new _Tensor.default([], [dimHiddenState]);\n this.hiddenStateSequence = new _Tensor.default([], [x.tensor.shape[0], dimHiddenState]);\n const currentX = new _Tensor.default([], [x.tensor.shape[1]]);\n\n const _step = () => {\n _ndarrayOps.default.assign(previousHiddenState.tensor, currentHiddenState.tensor);\n\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['W_z'].tensor.transpose(1, 0), currentX.tensor, 1, tempXZ.tensor);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['U_z'].tensor.transpose(1, 0), previousHiddenState.tensor, 1, tempHZ.tensor);\n\n this._combine(currentUpdateGateState.tensor, tempXZ.tensor, tempHZ.tensor, this.weights['b_z'].tensor);\n\n this.recurrentActivationFunc(currentUpdateGateState);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['W_r'].tensor.transpose(1, 0), currentX.tensor, 1, tempXR.tensor);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['U_r'].tensor.transpose(1, 0), previousHiddenState.tensor, 1, tempHR.tensor);\n\n this._combine(currentResetGateState.tensor, tempXR.tensor, tempHR.tensor, this.weights['b_r'].tensor);\n\n this.recurrentActivationFunc(currentResetGateState);\n\n _ndarrayOps.default.muleq(currentResetGateState.tensor, previousHiddenState.tensor);\n\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['W_h'].tensor.transpose(1, 0), currentX.tensor, 1, tempXH.tensor);\n (0, _ndarrayBlasLevel.gemv)(1, this.weights['U_h'].tensor.transpose(1, 0), currentResetGateState.tensor, 1, tempHH.tensor);\n\n this._combine(currentHiddenState.tensor, tempXH.tensor, tempHH.tensor, this.weights['b_h'].tensor);\n\n this.activationFunc(currentHiddenState);\n\n this._update(currentHiddenState.tensor, previousHiddenState.tensor, currentUpdateGateState.tensor);\n };\n\n for (let i = 0, len = x.tensor.shape[0]; i < len; i++) {\n const inputIndex = this.goBackwards ? len - i - 1 : i;\n\n _ndarrayOps.default.assign(currentX.tensor, x.tensor.pick(inputIndex, null));\n\n const tempTensors = [tempXZ, tempHZ, tempXR, tempHR, tempXH, tempHH];\n tempTensors.forEach(temp => _ndarrayOps.default.assigns(temp.tensor, 0));\n\n _step();\n\n if (this.returnSequences) {\n _ndarrayOps.default.assign(this.hiddenStateSequence.tensor.pick(i, null), currentHiddenState.tensor);\n }\n }\n\n if (this.returnSequences) {\n this.output = this.hiddenStateSequence;\n } else {\n this.output = currentHiddenState;\n }\n\n if (this.stateful) {\n this.currentHiddenState = currentHiddenState;\n }\n }\n\n _stepGPU() {\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.previousHiddenState,\n inputs: [{\n input: this.currentHiddenState,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempXZ,\n inputs: [{\n input: this.currentX,\n name: 'A'\n }, {\n input: this.weights['W_z'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempHZ,\n inputs: [{\n input: this.previousHiddenState,\n name: 'A'\n }, {\n input: this.weights['U_z'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.gateSummationProgram,\n output: this.currentUpdateGateStatePreactiv,\n inputs: [{\n input: this.tempXZ,\n name: 't1'\n }, {\n input: this.tempHZ,\n name: 't2'\n }, {\n input: this.weights['b_z'],\n name: 'bias'\n }]\n });\n\n if (this.recurrentActivation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.recurrentActivationProgram,\n output: this.currentUpdateGateState,\n inputs: [{\n input: this.currentUpdateGateStatePreactiv,\n name: 'x'\n }]\n });\n } else {\n this.currentUpdateGateState = this.currentUpdateGateStatePreactiv;\n }\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempXR,\n inputs: [{\n input: this.currentX,\n name: 'A'\n }, {\n input: this.weights['W_r'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempHR,\n inputs: [{\n input: this.previousHiddenState,\n name: 'A'\n }, {\n input: this.weights['U_r'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.gateSummationProgram,\n output: this.currentResetGateStatePreactiv,\n inputs: [{\n input: this.tempXR,\n name: 't1'\n }, {\n input: this.tempHR,\n name: 't2'\n }, {\n input: this.weights['b_r'],\n name: 'bias'\n }]\n });\n\n if (this.recurrentActivation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.recurrentActivationProgram,\n output: this.currentResetGateState,\n inputs: [{\n input: this.currentResetGateStatePreactiv,\n name: 'x'\n }]\n });\n } else {\n this.currentResetGateState = this.currentResetGateStatePreactiv;\n }\n\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.currentResetGateStateCopy,\n inputs: [{\n input: this.currentResetGateState,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.gateProductProgram,\n output: this.currentResetGateState,\n inputs: [{\n input: this.currentResetGateStateCopy,\n name: 't1'\n }, {\n input: this.previousHiddenState,\n name: 't2'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempXH,\n inputs: [{\n input: this.currentX,\n name: 'A'\n }, {\n input: this.weights['W_h'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.matMulProgram,\n output: this.tempHH,\n inputs: [{\n input: this.currentResetGateState,\n name: 'A'\n }, {\n input: this.weights['U_h'],\n name: 'B'\n }],\n uniforms: [{\n value: 0,\n type: 'bool',\n name: 'addC'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.gateSummationProgram,\n output: this.currentHiddenStatePreactiv,\n inputs: [{\n input: this.tempXH,\n name: 't1'\n }, {\n input: this.tempHH,\n name: 't2'\n }, {\n input: this.weights['b_h'],\n name: 'bias'\n }]\n });\n\n if (this.activation !== 'linear') {\n _WebGL.webgl2.runProgram({\n program: this.activationProgram,\n output: this.currentHiddenState,\n inputs: [{\n input: this.currentHiddenStatePreactiv,\n name: 'x'\n }]\n });\n } else {\n this.currentHiddenState = this.currentHiddenStatePreactiv;\n }\n\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.currentHiddenStateCopy,\n inputs: [{\n input: this.currentHiddenState,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.updateProgram,\n output: this.currentHiddenState,\n inputs: [{\n input: this.currentHiddenStateCopy,\n name: 'h'\n }, {\n input: this.previousHiddenState,\n name: 'htm1'\n }, {\n input: this.currentUpdateGateState,\n name: 'z'\n }]\n });\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const dimUpdateGate = this.weights['b_z'].glTextureShape[1];\n const dimResetGate = this.weights['b_r'].glTextureShape[1];\n const dimHiddenState = this.weights['b_h'].glTextureShape[1];\n\n if (!this.currentHiddenState || !this.stateful) {\n this.currentHiddenState = new _Tensor.default([], [dimHiddenState]);\n this.currentHiddenState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentHiddenStateCopy) {\n this.currentHiddenStateCopy = new _Tensor.default([], [dimHiddenState]);\n this.currentHiddenStateCopy.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentHiddenStatePreactiv) {\n this.currentHiddenStatePreactiv = new _Tensor.default([], [dimHiddenState]);\n this.currentHiddenStatePreactiv.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentUpdateGateState) {\n this.currentUpdateGateState = new _Tensor.default([], [dimUpdateGate]);\n this.currentUpdateGateState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentUpdateGateStatePreactiv) {\n this.currentUpdateGateStatePreactiv = new _Tensor.default([], [dimUpdateGate]);\n this.currentUpdateGateStatePreactiv.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempXZ) {\n this.tempXZ = new _Tensor.default([], [dimUpdateGate]);\n this.tempXZ.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempHZ) {\n this.tempHZ = new _Tensor.default([], [dimUpdateGate]);\n this.tempHZ.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentResetGateState) {\n this.currentResetGateState = new _Tensor.default([], [dimResetGate]);\n this.currentResetGateState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentResetGateStateCopy) {\n this.currentResetGateStateCopy = new _Tensor.default([], [dimResetGate]);\n this.currentResetGateStateCopy.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentResetGateStatePreactiv) {\n this.currentResetGateStatePreactiv = new _Tensor.default([], [dimResetGate]);\n this.currentResetGateStatePreactiv.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempXR) {\n this.tempXR = new _Tensor.default([], [dimResetGate]);\n this.tempXR.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempHR) {\n this.tempHR = new _Tensor.default([], [dimResetGate]);\n this.tempHR.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempXH) {\n this.tempXH = new _Tensor.default([], [dimHiddenState]);\n this.tempXH.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.tempHH) {\n this.tempHH = new _Tensor.default([], [dimHiddenState]);\n this.tempHH.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.previousHiddenState) {\n this.previousHiddenState = new _Tensor.default([], [dimHiddenState]);\n this.previousHiddenState.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.hiddenStateSequence) {\n this.hiddenStateSequence = new _Tensor.default([], [x.glTextureShape[0], dimHiddenState]);\n this.hiddenStateSequence.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.hiddenStateSequenceCopy) {\n this.hiddenStateSequenceCopy = new _Tensor.default([], [x.glTextureShape[0], dimHiddenState]);\n this.hiddenStateSequenceCopy.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.currentX) {\n this.currentX = new _Tensor.default([], [x.glTextureShape[1]]);\n this.currentX.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n for (let i = 0, len = x.glTextureShape[0]; i < len; i++) {\n const inputIndex = this.goBackwards ? len - i - 1 : i;\n\n _WebGL.webgl2.runProgram({\n program: this.timestepReadProgram,\n output: this.currentX,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: inputIndex,\n type: 'int',\n name: 'index'\n }]\n });\n\n this._stepGPU();\n\n if (this.returnSequences) {\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.hiddenStateSequenceCopy,\n inputs: [{\n input: this.hiddenStateSequence,\n name: 'source'\n }]\n });\n\n _WebGL.webgl2.runProgram({\n program: this.timestepWriteProgram,\n output: this.hiddenStateSequence,\n inputs: [{\n input: this.currentHiddenState,\n name: 'x'\n }, {\n input: this.hiddenStateSequenceCopy,\n name: 'y'\n }],\n uniforms: [{\n value: i,\n type: 'int',\n name: 'index'\n }]\n });\n }\n }\n\n if (this.returnSequences) {\n this.output = this.hiddenStateSequence;\n } else {\n this.output = this.currentHiddenState;\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = GRU;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"SimpleRNN\", {\n enumerable: true,\n get: function () {\n return _SimpleRNN.default;\n }\n});\nObject.defineProperty(exports, \"LSTM\", {\n enumerable: true,\n get: function () {\n return _LSTM.default;\n }\n});\nObject.defineProperty(exports, \"GRU\", {\n enumerable: true,\n get: function () {\n return _GRU.default;\n }\n});\n\nvar _SimpleRNN = _interopRequireDefault(require(\"./SimpleRNN\"));\n\nvar _LSTM = _interopRequireDefault(require(\"./LSTM\"));\n\nvar _GRU = _interopRequireDefault(require(\"./GRU\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar layers = _interopRequireWildcard(require(\"../\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst copyTextureProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D source;\\nout vec4 outColor;\\n\\nvoid main(void) {\\n outColor = texture(source, vec2(outTex.x, outTex.y));\\n}\\n\";\nconst mapInputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform isampler2D indexMap;\\nuniform int inputCols;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(indexMap, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(inputCols)));\\n int colIndex = int(mod(float(index), float(inputCols)));\\n float val = texelFetch(x, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = vec4(0.0);\\n }\\n}\\n\";\nconst selectSliceProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D x;\\nuniform int t;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(x, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n\\n outColor = vec4(texelFetch(x, ivec2(out_x, t), 0).r);\\n}\\n\";\nconst copySliceOutputProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D outputCopy;\\nuniform sampler2D sliceOutput;\\nuniform int t;\\nuniform int timesteps;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(sliceOutput, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(timesteps) * outTex.y);\\n\\n if (t == out_y) {\\n outColor = vec4(texelFetch(sliceOutput, ivec2(out_x, 0), 0).r);\\n } else {\\n outColor = texelFetch(outputCopy, ivec2(out_x, out_y), 0);\\n }\\n}\\n\";\nconst mapSliceOutputProgramSource = \"#version 300 es\\nprecision highp float;\\nprecision highp isampler2D;\\n\\nin vec2 outTex;\\nuniform sampler2D outputCopy;\\nuniform sampler2D sliceOutput;\\nuniform isampler2D indexMap;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(outputCopy, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n int index = texelFetch(indexMap, ivec2(out_x, out_y), 0).r;\\n\\n if (index != -1) {\\n int rowIndex = int(floor(float(index) / float(textureSize(sliceOutput, 0)[0])));\\n int colIndex = int(mod(float(index), float(textureSize(sliceOutput, 0)[0])));\\n float val = texelFetch(sliceOutput, ivec2(colIndex, rowIndex), 0).r;\\n outColor = vec4(val);\\n } else {\\n outColor = texelFetch(outputCopy, ivec2(out_x, out_y), 0);\\n }\\n}\\n\";\n\nclass TimeDistributed extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'TimeDistributed';\n const {\n layer\n } = attrs;\n\n if (!layer) {\n this.throwError('wrapped layer is undefined.');\n }\n\n const wrappedLayerAttrs = Object.assign({}, layer.config, {\n gpu: attrs.gpu\n });\n this.wrappedLayer = new layers[layer.class_name](wrappedLayerAttrs);\n this.wrappedLayer.outbound = [null];\n\n if (this.gpu) {\n this.copyTextureProgram = _WebGL.webgl2.compileProgram(copyTextureProgramSource);\n this.mapInputProgram = _WebGL.webgl2.compileProgram(mapInputProgramSource);\n this.selectSliceProgram = _WebGL.webgl2.compileProgram(selectSliceProgramSource);\n this.copySliceOutputProgram = _WebGL.webgl2.compileProgram(copySliceOutputProgramSource);\n this.mapSliceOutputProgram = _WebGL.webgl2.compileProgram(mapSliceOutputProgramSource);\n }\n }\n\n setWeights(weightsArr) {\n this.wrappedLayer.setWeights(weightsArr);\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n const stepShape = [...x.tensor.shape.slice(1)];\n const step = new _Tensor.default([], stepShape);\n\n _ndarrayOps.default.assign(step.tensor, x.tensor.pick(0, ...Array(stepShape.length).fill(null)));\n\n let stepOutput = this.wrappedLayer.call(step);\n const stepOutputShape = stepOutput.tensor.shape.slice();\n this.output = new _Tensor.default([], [x.tensor.shape[0], ...stepOutputShape]);\n\n _ndarrayOps.default.assign(this.output.tensor.pick(0, ...Array(stepOutputShape.length).fill(null)), stepOutput.tensor);\n\n for (let i = 1, timesteps = x.tensor.shape[0]; i < timesteps; i++) {\n _ndarrayOps.default.assign(step.tensor, x.tensor.pick(i, ...Array(stepShape.length).fill(null)));\n\n stepOutput = this.wrappedLayer.call(step);\n\n _ndarrayOps.default.assign(this.output.tensor.pick(i, ...Array(stepOutputShape.length).fill(null)), stepOutput.tensor);\n }\n }\n\n _createIndexMap(indicesForReshaped) {\n if (this.indexMaps) {\n return;\n }\n\n const indices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n this.indexMaps = [];\n const timesteps = this.inputShape[0];\n const sliceShape = this.inputShape.slice(1);\n\n for (let t = 0; t < timesteps; t++) {\n const sliceIndices = new _Tensor.default([], sliceShape, {\n type: Int32Array\n });\n\n _ndarrayOps.default.assign(sliceIndices.tensor, indices.tensor.pick(t, ...Array(sliceShape.length).fill(null)));\n\n sliceIndices.reshapeTo2DSquare();\n sliceIndices.createGLTexture({\n type: '2d',\n format: 'int'\n });\n this.indexMaps.push(sliceIndices);\n }\n }\n\n _createOutputIndexMap(indicesForReshaped) {\n if (this.outputIndexMaps) {\n return;\n }\n\n const outputSliceIndices = new _Tensor.default(indicesForReshaped.data, indicesForReshaped.shape, {\n type: Int32Array\n });\n this.outputIndexMaps = [];\n const timesteps = this.outputShape[0];\n const sliceShape = this.outputShape.slice(1);\n\n for (let t = 0; t < timesteps; t++) {\n const outputIndices = new _Tensor.default([], this.outputShape, {\n type: Int32Array\n });\n\n _ndarrayOps.default.assigns(outputIndices.tensor, -1);\n\n _ndarrayOps.default.assign(outputIndices.tensor.pick(t, ...Array(sliceShape.length).fill(null)), outputSliceIndices.tensor);\n\n outputIndices.reshapeTo2DSquare();\n outputIndices.createGLTexture({\n type: '2d',\n format: 'int'\n });\n this.outputIndexMaps.push(outputIndices);\n }\n }\n\n _callGPU(x) {\n if (x.is2DReshaped || x.is2DSquareReshaped) {\n this.inputShape = x.originalShape;\n } else {\n this.inputShape = x.tensor.shape;\n }\n\n if (!x.glTexture) {\n if (x.tensor.shape.length <= 2) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n } else if (x.tensor.shape.length > 2 && !x.is2DReshaped) {\n x.reshapeTo2DSquare();\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n }\n\n if (this.inputShape.length > 2) {\n this._createIndexMap(x.indicesForReshaped);\n }\n\n const timesteps = this.inputShape[0];\n const sliceShape = this.inputShape.slice(1);\n\n if (!this.slice) {\n this.slice = new _Tensor.default([], sliceShape);\n\n if (sliceShape.length <= 2) {\n this.slice.createGLTexture({\n type: '2d',\n format: 'float'\n });\n } else {\n this.slice.reshapeTo2DSquare();\n this.slice.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n }\n\n if (this.inputShape.length <= 2) {\n _WebGL.webgl2.runProgram({\n program: this.selectSliceProgram,\n output: this.slice,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: 0,\n type: 'int',\n name: 't'\n }]\n });\n } else {\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.slice,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMaps[0],\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n }\n\n this.wrappedLayer._callGPU(this.slice);\n\n this.sliceOutput = this.wrappedLayer.output;\n\n if (!this.output) {\n if (this.inputShape.length <= 2) {\n this.outputShape = [timesteps, this.sliceOutput.glTextureShape[1]];\n this.output = new _Tensor.default([], this.outputShape);\n this.outputCopy = new _Tensor.default([], this.outputShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n this.outputCopy.createGLTexture({\n type: '2d',\n format: 'float'\n });\n } else {\n this.outputShape = [timesteps, ...this.sliceOutput.originalShape];\n this.output = new _Tensor.default([], this.outputShape);\n this.outputCopy = new _Tensor.default([], this.outputShape);\n this.output.reshapeTo2DSquare();\n this.outputCopy.reshapeTo2DSquare();\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n this.outputCopy.createGLTexture({\n type: '2d',\n format: 'float'\n });\n\n this._createOutputIndexMap(this.sliceOutput.indicesForReshaped);\n }\n }\n\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.outputCopy,\n inputs: [{\n input: this.output,\n name: 'source'\n }]\n });\n\n if (this.inputShape.length <= 2) {\n _WebGL.webgl2.runProgram({\n program: this.copySliceOutputProgram,\n output: this.output,\n inputs: [{\n input: this.outputCopy,\n name: 'outputCopy'\n }, {\n input: this.sliceOutput,\n name: 'sliceOutput'\n }],\n uniforms: [{\n value: 0,\n type: 'int',\n name: 't'\n }, {\n value: timesteps,\n type: 'int',\n name: 'timesteps'\n }]\n });\n } else {\n _WebGL.webgl2.runProgram({\n program: this.mapSliceOutputProgram,\n output: this.output,\n inputs: [{\n input: this.outputCopy,\n name: 'outputCopy'\n }, {\n input: this.sliceOutput,\n name: 'sliceOutput'\n }, {\n input: this.outputIndexMaps[0],\n name: 'indexMap'\n }]\n });\n }\n\n for (let i = 1; i < timesteps; i++) {\n if (this.inputShape.length <= 2) {\n _WebGL.webgl2.runProgram({\n program: this.selectSliceProgram,\n output: this.slice,\n inputs: [{\n input: x,\n name: 'x'\n }],\n uniforms: [{\n value: i,\n type: 'int',\n name: 't'\n }]\n });\n } else {\n _WebGL.webgl2.runProgram({\n program: this.mapInputProgram,\n output: this.slice,\n inputs: [{\n input: x,\n name: 'x'\n }, {\n input: this.indexMaps[i],\n name: 'indexMap'\n }],\n uniforms: [{\n value: x.glTextureShape[1],\n type: 'int',\n name: 'inputCols'\n }]\n });\n }\n\n this.wrappedLayer._callGPU(this.slice);\n\n this.sliceOutput = this.wrappedLayer.output;\n\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.outputCopy,\n inputs: [{\n input: this.output,\n name: 'source'\n }]\n });\n\n if (this.inputShape.length <= 2) {\n _WebGL.webgl2.runProgram({\n program: this.copySliceOutputProgram,\n output: this.output,\n inputs: [{\n input: this.outputCopy,\n name: 'outputCopy'\n }, {\n input: this.sliceOutput,\n name: 'sliceOutput'\n }],\n uniforms: [{\n value: i,\n type: 'int',\n name: 't'\n }, {\n value: timesteps,\n type: 'int',\n name: 'timesteps'\n }]\n });\n } else {\n _WebGL.webgl2.runProgram({\n program: this.mapSliceOutputProgram,\n output: this.output,\n inputs: [{\n input: this.outputCopy,\n name: 'outputCopy'\n }, {\n input: this.sliceOutput,\n name: 'sliceOutput'\n }, {\n input: this.outputIndexMaps[i],\n name: 'indexMap'\n }]\n });\n }\n }\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n } else if (this.output.is2DSquareReshaped) {\n this.output.reshapeFrom2DSquare();\n }\n }\n }\n\n}\n\nexports.default = TimeDistributed;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Layer = _interopRequireDefault(require(\"../../Layer\"));\n\nvar _Tensor = _interopRequireDefault(require(\"../../Tensor\"));\n\nvar _WebGL = require(\"../../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar recurrentLayers = _interopRequireWildcard(require(\"../recurrent\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst copyTextureProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D source;\\nout vec4 outColor;\\n\\nvoid main(void) {\\n outColor = texture(source, vec2(outTex.x, outTex.y));\\n}\\n\";\nconst concatMergeProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D forward;\\nuniform sampler2D backward;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(forward, 0);\\n int out_x = int(float(size[0] * 2) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n if (out_x >= 0 && out_x < size[0]) {\\n outColor = vec4(texelFetch(forward, ivec2(out_x, out_y), 0).r);\\n } else {\\n outColor = vec4(texelFetch(backward, ivec2(out_x - size[0], size[1] - out_y - 1), 0).r);\\n }\\n}\\n\";\nconst sumMergeProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D forward;\\nuniform sampler2D backward;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(forward, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float forward_val = texelFetch(forward, ivec2(out_x, out_y), 0).r;\\n float backward_val = texelFetch(backward, ivec2(out_x, size[1] - out_y - 1), 0).r;\\n\\n outColor = vec4(forward_val + backward_val);\\n}\\n\";\nconst mulMergeProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D forward;\\nuniform sampler2D backward;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(forward, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float forward_val = texelFetch(forward, ivec2(out_x, out_y), 0).r;\\n float backward_val = texelFetch(backward, ivec2(out_x, size[1] - out_y - 1), 0).r;\\n\\n outColor = vec4(forward_val * backward_val);\\n}\\n\";\nconst aveMergeProgramSource = \"#version 300 es\\nprecision highp float;\\n\\nin vec2 outTex;\\nuniform sampler2D forward;\\nuniform sampler2D backward;\\nout vec4 outColor;\\n\\nvoid main() {\\n ivec2 size = textureSize(forward, 0);\\n int out_x = int(float(size[0]) * outTex.x);\\n int out_y = int(float(size[1]) * outTex.y);\\n\\n float forward_val = texelFetch(forward, ivec2(out_x, out_y), 0).r;\\n float backward_val = texelFetch(backward, ivec2(out_x, size[1] - out_y - 1), 0).r;\\n\\n outColor = vec4(0.5 * (forward_val + backward_val));\\n}\\n\";\n\nclass Bidirectional extends _Layer.default {\n constructor(attrs = {}) {\n super(attrs);\n this.layerClass = 'Bidirectional';\n const {\n layer,\n merge_mode = 'concat'\n } = attrs;\n\n if (!layer) {\n this.throwError('wrapped layer is undefined.');\n }\n\n if (!['SimpleRNN', 'GRU', 'LSTM'].includes(layer.class_name)) {\n this.throwError(`cannot wrap ${layer.class_name} layer.`);\n }\n\n if (!['concat', 'sum', 'mul', 'ave'].includes(merge_mode)) {\n this.throwError(`merge_mode ${merge_mode} not supported.`);\n }\n\n const forwardLayerAttrs = Object.assign({}, layer.config, {\n gpu: attrs.gpu\n });\n const backwardLayerAttrs = Object.assign({}, layer.config, {\n gpu: attrs.gpu\n });\n backwardLayerAttrs.go_backwards = !backwardLayerAttrs.go_backwards;\n this.forwardLayer = new recurrentLayers[layer.class_name](forwardLayerAttrs);\n this.backwardLayer = new recurrentLayers[layer.class_name](backwardLayerAttrs);\n this.forwardLayer.outbound = [null];\n this.backwardLayer.outbound = [null];\n this.mergeMode = merge_mode;\n this.returnSequences = layer.config.return_sequences;\n\n if (this.gpu) {\n this.copyTextureProgram = _WebGL.webgl2.compileProgram(copyTextureProgramSource);\n\n if (this.mergeMode === 'concat') {\n this.mergeProgram = _WebGL.webgl2.compileProgram(concatMergeProgramSource);\n } else if (this.mergeMode === 'sum') {\n this.mergeProgram = _WebGL.webgl2.compileProgram(sumMergeProgramSource);\n } else if (this.mergeMode === 'mul') {\n this.mergeProgram = _WebGL.webgl2.compileProgram(mulMergeProgramSource);\n } else if (this.mergeMode === 'ave') {\n this.mergeProgram = _WebGL.webgl2.compileProgram(aveMergeProgramSource);\n }\n }\n }\n\n setWeights(weightsArr) {\n this.forwardLayer.setWeights(weightsArr.slice(0, weightsArr.length / 2));\n this.backwardLayer.setWeights(weightsArr.slice(weightsArr.length / 2));\n }\n\n call(x) {\n if (this.gpu) {\n this._callGPU(x);\n } else {\n this._callCPU(x);\n }\n\n return this.output;\n }\n\n _callCPU(x) {\n this.forwardLayer._callCPU(new _Tensor.default(x.tensor.data, x.tensor.shape));\n\n this.backwardLayer._callCPU(new _Tensor.default(x.tensor.data, x.tensor.shape));\n\n const forwardOutput = this.forwardLayer.output;\n const backwardOutput = this.backwardLayer.output;\n\n if (this.returnSequences) {\n backwardOutput.tensor = backwardOutput.tensor.step(-1);\n }\n\n const outShape = forwardOutput.tensor.shape.slice();\n\n if (this.mergeMode === 'concat') {\n outShape[outShape.length - 1] += backwardOutput.tensor.shape[outShape.length - 1];\n }\n\n this.output = new _Tensor.default([], outShape);\n\n if (this.mergeMode === 'concat') {\n if (this.returnSequences) {\n _ndarrayOps.default.assign(this.output.tensor.hi(outShape[0], forwardOutput.tensor.shape[1]).lo(0, 0), forwardOutput.tensor);\n\n _ndarrayOps.default.assign(this.output.tensor.hi(outShape[0], outShape[1]).lo(0, forwardOutput.tensor.shape[1]), backwardOutput.tensor);\n } else {\n _ndarrayOps.default.assign(this.output.tensor.hi(forwardOutput.tensor.shape[0]).lo(0), forwardOutput.tensor);\n\n _ndarrayOps.default.assign(this.output.tensor.hi(outShape[0]).lo(forwardOutput.tensor.shape[0]), backwardOutput.tensor);\n }\n } else if (this.mergeMode === 'sum') {\n _ndarrayOps.default.addeq(this.output.tensor, forwardOutput.tensor);\n\n _ndarrayOps.default.addeq(this.output.tensor, backwardOutput.tensor);\n } else if (this.mergeMode === 'mul') {\n _ndarrayOps.default.assigns(this.output.tensor, 1);\n\n _ndarrayOps.default.muleq(this.output.tensor, forwardOutput.tensor);\n\n _ndarrayOps.default.muleq(this.output.tensor, backwardOutput.tensor);\n } else if (this.mergeMode === 'ave') {\n _ndarrayOps.default.addeq(this.output.tensor, forwardOutput.tensor);\n\n _ndarrayOps.default.addeq(this.output.tensor, backwardOutput.tensor);\n\n _ndarrayOps.default.divseq(this.output.tensor, 2);\n }\n }\n\n _callGPU(x) {\n if (!x.glTexture) {\n x.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n if (!this.inputCopy) {\n this.inputCopy = new _Tensor.default([], x.glTextureShape);\n this.inputCopy.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n _WebGL.webgl2.runProgram({\n program: this.copyTextureProgram,\n output: this.inputCopy,\n inputs: [{\n input: x,\n name: 'source'\n }]\n });\n\n this.forwardLayer._callGPU(x);\n\n this.backwardLayer._callGPU(this.inputCopy);\n\n const forwardOutput = this.forwardLayer.output;\n const backwardOutput = this.backwardLayer.output;\n const outShape = forwardOutput.glTextureShape.slice();\n\n if (this.mergeMode === 'concat') {\n outShape[1] += backwardOutput.glTextureShape[1];\n }\n\n if (!this.output) {\n this.output = new _Tensor.default([], outShape);\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n\n if (!this.returnSequences) {\n this.output.is1D = true;\n }\n }\n\n _WebGL.webgl2.runProgram({\n program: this.mergeProgram,\n output: this.output,\n inputs: [{\n input: forwardOutput,\n name: 'forward'\n }, {\n input: backwardOutput,\n name: 'backward'\n }]\n });\n\n if (this.outbound.length === 0) {\n this.output.transferFromGLTexture();\n }\n }\n\n}\n\nexports.default = Bidirectional;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"TimeDistributed\", {\n enumerable: true,\n get: function () {\n return _TimeDistributed.default;\n }\n});\nObject.defineProperty(exports, \"Bidirectional\", {\n enumerable: true,\n get: function () {\n return _Bidirectional.default;\n }\n});\n\nvar _TimeDistributed = _interopRequireDefault(require(\"./TimeDistributed\"));\n\nvar _Bidirectional = _interopRequireDefault(require(\"./Bidirectional\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _exportNames = {\n InputLayer: true\n};\nObject.defineProperty(exports, \"InputLayer\", {\n enumerable: true,\n get: function () {\n return _InputLayer.default;\n }\n});\n\nvar _InputLayer = _interopRequireDefault(require(\"./InputLayer\"));\n\nvar _advanced_activations = require(\"./advanced_activations\");\n\nObject.keys(_advanced_activations).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _advanced_activations[key];\n }\n });\n});\n\nvar _convolutional = require(\"./convolutional\");\n\nObject.keys(_convolutional).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _convolutional[key];\n }\n });\n});\n\nvar _core = require(\"./core\");\n\nObject.keys(_core).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _core[key];\n }\n });\n});\n\nvar _embeddings = require(\"./embeddings\");\n\nObject.keys(_embeddings).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _embeddings[key];\n }\n });\n});\n\nvar _merge = require(\"./merge\");\n\nObject.keys(_merge).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _merge[key];\n }\n });\n});\n\nvar _noise = require(\"./noise\");\n\nObject.keys(_noise).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _noise[key];\n }\n });\n});\n\nvar _normalization = require(\"./normalization\");\n\nObject.keys(_normalization).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _normalization[key];\n }\n });\n});\n\nvar _pooling = require(\"./pooling\");\n\nObject.keys(_pooling).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _pooling[key];\n }\n });\n});\n\nvar _recurrent = require(\"./recurrent\");\n\nObject.keys(_recurrent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _recurrent[key];\n }\n });\n});\n\nvar _wrappers = require(\"./wrappers\");\n\nObject.keys(_wrappers).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _wrappers[key];\n }\n });\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _Tensor = _interopRequireDefault(require(\"../Tensor\"));\n\nvar _WebGL = require(\"../WebGL2\");\n\nvar _ndarrayOps = _interopRequireDefault(require(\"ndarray-ops\"));\n\nvar _ndarrayBlasLevel = require(\"ndarray-blas-level2\");\n\nvar _ndarrayGemm = _interopRequireDefault(require(\"ndarray-gemm\"));\n\nvar _createGLSLProgram = _interopRequireDefault(require(\"../webgl/dynamic/createGLSLProgram\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass CAM {\n constructor(attrs = {}) {\n this.modelLayersMap = attrs.modelLayersMap;\n this.gpu = attrs.gpu;\n\n if (!this.modelLayersMap) {\n throw new Error(`[CAM] modelLayersMap is required`);\n }\n }\n\n initialize() {\n this.modelLayersMap.forEach(layer => {\n if (layer.layerClass === 'GlobalAveragePooling2D') {\n this.enabled = true;\n this.poolLayer = layer;\n }\n });\n\n if (this.enabled && !this.data) {\n this.featureMaps = this.modelLayersMap.get(this.poolLayer.inbound[0]).output;\n let traversingLayer = this.poolLayer;\n\n if (!traversingLayer.outbound.length) {\n this.weights = this.poolLayer.output;\n }\n\n while (traversingLayer.outbound.length) {\n traversingLayer = this.modelLayersMap.get(traversingLayer.outbound[0]);\n\n if (traversingLayer.weights['kernel']) {\n this.weights = traversingLayer.weights['kernel'];\n } else {\n this.weights = this.poolLayer.output;\n }\n }\n\n if (this.featureMaps.is2DReshaped) {\n this.inputShape = this.featureMaps.originalShape.slice(0, 2);\n } else {\n this.inputShape = this.featureMaps.tensor.shape.slice(0, 2);\n }\n\n if (this.weights.tensor.shape.length === 1) {\n this.shape = this.inputShape;\n } else {\n const numOutputClasses = this.weights.tensor.shape[1];\n this.shape = [...this.inputShape, numOutputClasses];\n }\n\n this.data = new Float32Array(this.shape.reduce((a, b) => a * b, 1));\n }\n }\n\n update() {\n if (!this.enabled) return;\n this.featureMaps = this.modelLayersMap.get(this.poolLayer.inbound[0]).output;\n\n if (this.gpu) {\n this._updateGPU();\n } else {\n this._updateCPU();\n }\n\n const outputMin = _ndarrayOps.default.inf(this.output.tensor);\n\n const outputMax = _ndarrayOps.default.sup(this.output.tensor);\n\n _ndarrayOps.default.divseq(_ndarrayOps.default.subseq(this.output.tensor, outputMin), outputMax - outputMin);\n\n this.data = this.output.tensor.data;\n }\n\n _updateCPU() {\n if (!this.featureMaps.is2DReshaped) {\n this.featureMaps.reshapeTo2D();\n }\n\n if (this.weights.tensor.shape.length === 1) {\n if (!this.output) {\n this.output = new _Tensor.default([], this.shape);\n }\n\n const matVec = new _Tensor.default([], [this.shape[0] * this.shape[1]]);\n (0, _ndarrayBlasLevel.gemv)(1, this.featureMaps.tensor, this.weights.tensor, 1, matVec.tensor);\n this.output.replaceTensorData(matVec.tensor.data);\n } else {\n if (!this.output) {\n this.output = new _Tensor.default([], this.shape);\n }\n\n this.output.reshapeTo2D();\n (0, _ndarrayGemm.default)(this.output.tensor, this.featureMaps.tensor, this.weights.tensor, 1, 1);\n this.output.reshapeFrom2D();\n }\n\n _ndarrayOps.default.maxseq(this.output.tensor, 0);\n\n if (this.featureMaps.is2DReshaped) {\n this.featureMaps.reshapeFrom2D();\n }\n }\n\n _updateGPU() {\n if (!this.output) {\n this.output = new _Tensor.default([], this.shape);\n }\n\n const isWeights1D = this.weights.is1D;\n\n if (!this.output.glTexture && isWeights1D) {\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n } else {\n this.output.reshapeTo2D();\n this.output.createGLTexture({\n type: '2d',\n format: 'float'\n });\n }\n\n const numFeatures = isWeights1D ? this.weights.glTextureShape[1] : this.weights.glTextureShape[0];\n\n if (!this.program) {\n const programSource = (0, _createGLSLProgram.default)('cam', this.output.glTextureShape, numFeatures, isWeights1D);\n this.program = _WebGL.webgl2.compileProgram(programSource);\n }\n\n _WebGL.webgl2.runProgram({\n program: this.program,\n output: this.output,\n inputs: [{\n input: this.featureMaps,\n name: 'featureMaps'\n }, {\n input: this.weights,\n name: 'weights'\n }]\n });\n\n this.output.transferFromGLTexture();\n\n if (this.output.is2DReshaped) {\n this.output.reshapeFrom2D();\n }\n }\n\n}\n\nexports.default = CAM;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"CAM\", {\n enumerable: true,\n get: function () {\n return _CAM.default;\n }\n});\n\nvar _CAM = _interopRequireDefault(require(\"./CAM\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n","\"use strict\";\r\nvar util = exports;\r\n\r\n// used to return a Promise where callback is omitted\r\nutil.asPromise = require(\"@protobufjs/aspromise\");\r\n\r\n// converts to / from base64 encoded strings\r\nutil.base64 = require(\"@protobufjs/base64\");\r\n\r\n// base class of rpc.Service\r\nutil.EventEmitter = require(\"@protobufjs/eventemitter\");\r\n\r\n// float handling accross browsers\r\nutil.float = require(\"@protobufjs/float\");\r\n\r\n// requires modules optionally and hides the call from bundlers\r\nutil.inquire = require(\"@protobufjs/inquire\");\r\n\r\n// converts to / from utf8 encoded strings\r\nutil.utf8 = require(\"@protobufjs/utf8\");\r\n\r\n// provides a node-like buffer pool in the browser\r\nutil.pool = require(\"@protobufjs/pool\");\r\n\r\n// utility to work with the low and high bits of a 64 bit value\r\nutil.LongBits = require(\"./longbits\");\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n * @const\r\n */\r\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n * @const\r\n */\r\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n * @const\r\n */\r\nutil.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\r\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nutil.isString = function isString(value) {\r\n return typeof value === \"string\" || value instanceof String;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return value && typeof value === \"object\";\r\n};\r\n\r\n/**\r\n * Checks if a property on a message is considered to be present.\r\n * This is an alias of {@link util.isSet}.\r\n * @function\r\n * @param {Object} obj Plain object or message instance\r\n * @param {string} prop Property name\r\n * @returns {boolean} `true` if considered to be present, otherwise `false`\r\n */\r\nutil.isset =\r\n\r\n/**\r\n * Checks if a property on a message is considered to be present.\r\n * @param {Object} obj Plain object or message instance\r\n * @param {string} prop Property name\r\n * @returns {boolean} `true` if considered to be present, otherwise `false`\r\n */\r\nutil.isSet = function isSet(obj, prop) {\r\n var value = obj[prop];\r\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\r\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\r\n return false;\r\n};\r\n\r\n/**\r\n * Any compatible Buffer instance.\r\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\r\n * @interface Buffer\r\n * @extends Uint8Array\r\n */\r\n\r\n/**\r\n * Node's Buffer class if available.\r\n * @type {Constructor}\r\n */\r\nutil.Buffer = (function() {\r\n try {\r\n var Buffer = util.inquire(\"buffer\").Buffer;\r\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\r\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\r\n } catch (e) {\r\n /* istanbul ignore next */\r\n return null;\r\n }\r\n})();\r\n\r\n// Internal alias of or polyfull for Buffer.from.\r\nutil._Buffer_from = null;\r\n\r\n// Internal alias of or polyfill for Buffer.allocUnsafe.\r\nutil._Buffer_allocUnsafe = null;\r\n\r\n/**\r\n * Creates a new buffer of whatever type supported by the environment.\r\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\r\n * @returns {Uint8Array|Buffer} Buffer\r\n */\r\nutil.newBuffer = function newBuffer(sizeOrArray) {\r\n /* istanbul ignore next */\r\n return typeof sizeOrArray === \"number\"\r\n ? util.Buffer\r\n ? util._Buffer_allocUnsafe(sizeOrArray)\r\n : new util.Array(sizeOrArray)\r\n : util.Buffer\r\n ? util._Buffer_from(sizeOrArray)\r\n : typeof Uint8Array === \"undefined\"\r\n ? sizeOrArray\r\n : new Uint8Array(sizeOrArray);\r\n};\r\n\r\n/**\r\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\r\n * @type {Constructor}\r\n */\r\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\r\n * @interface Long\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\r\n\r\n/**\r\n * Long.js's Long class if available.\r\n * @type {Constructor}\r\n */\r\nutil.Long = /* istanbul ignore next */ global.dcodeIO && /* istanbul ignore next */ global.dcodeIO.Long || util.inquire(\"long\");\r\n\r\n/**\r\n * Regular expression used to verify 2 bit (`bool`) map keys.\r\n * @type {RegExp}\r\n * @const\r\n */\r\nutil.key2Re = /^true|false|0|1$/;\r\n\r\n/**\r\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\r\n * @type {RegExp}\r\n * @const\r\n */\r\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\r\n\r\n/**\r\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\r\n * @type {RegExp}\r\n * @const\r\n */\r\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? util.LongBits.from(value).toHash()\r\n : util.LongBits.zeroHash;\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = util.LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Merges the properties of the source object into the destination object.\r\n * @memberof util\r\n * @param {Object.} dst Destination object\r\n * @param {Object.} src Source object\r\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\r\n * @returns {Object.} Destination object\r\n */\r\nfunction merge(dst, src, ifNotSet) { // used by converters\r\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\r\n if (dst[keys[i]] === undefined || !ifNotSet)\r\n dst[keys[i]] = src[keys[i]];\r\n return dst;\r\n}\r\n\r\nutil.merge = merge;\r\n\r\n/**\r\n * Converts the first character of a string to lower case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.lcFirst = function lcFirst(str) {\r\n return str.charAt(0).toLowerCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Creates a custom error constructor.\r\n * @memberof util\r\n * @param {string} name Error name\r\n * @returns {Constructor} Custom error constructor\r\n */\r\nfunction newError(name) {\r\n\r\n function CustomError(message, properties) {\r\n\r\n if (!(this instanceof CustomError))\r\n return new CustomError(message, properties);\r\n\r\n // Error.call(this, message);\r\n // ^ just returns a new error instance because the ctor can be called as a function\r\n\r\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\r\n\r\n /* istanbul ignore next */\r\n if (Error.captureStackTrace) // node\r\n Error.captureStackTrace(this, CustomError);\r\n else\r\n Object.defineProperty(this, \"stack\", { value: (new Error()).stack || \"\" });\r\n\r\n if (properties)\r\n merge(this, properties);\r\n }\r\n\r\n (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;\r\n\r\n Object.defineProperty(CustomError.prototype, \"name\", { get: function() { return name; } });\r\n\r\n CustomError.prototype.toString = function toString() {\r\n return this.name + \": \" + this.message;\r\n };\r\n\r\n return CustomError;\r\n}\r\n\r\nutil.newError = newError;\r\n\r\n/**\r\n * Constructs a new protocol error.\r\n * @classdesc Error subclass indicating a protocol specifc error.\r\n * @memberof util\r\n * @extends Error\r\n * @template T extends Message\r\n * @constructor\r\n * @param {string} message Error message\r\n * @param {Object.} [properties] Additional properties\r\n * @example\r\n * try {\r\n * MyMessage.decode(someBuffer); // throws if required fields are missing\r\n * } catch (e) {\r\n * if (e instanceof ProtocolError && e.instance)\r\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\r\n * }\r\n */\r\nutil.ProtocolError = newError(\"ProtocolError\");\r\n\r\n/**\r\n * So far decoded message instance.\r\n * @name util.ProtocolError#instance\r\n * @type {Message}\r\n */\r\n\r\n/**\r\n * A OneOf getter as returned by {@link util.oneOfGetter}.\r\n * @typedef OneOfGetter\r\n * @type {function}\r\n * @returns {string|undefined} Set field name, if any\r\n */\r\n\r\n/**\r\n * Builds a getter for a oneof's present field name.\r\n * @param {string[]} fieldNames Field names\r\n * @returns {OneOfGetter} Unbound getter\r\n */\r\nutil.oneOfGetter = function getOneOf(fieldNames) {\r\n var fieldMap = {};\r\n for (var i = 0; i < fieldNames.length; ++i)\r\n fieldMap[fieldNames[i]] = 1;\r\n\r\n /**\r\n * @returns {string|undefined} Set field name, if any\r\n * @this Object\r\n * @ignore\r\n */\r\n return function() { // eslint-disable-line consistent-return\r\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\r\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\r\n return keys[i];\r\n };\r\n};\r\n\r\n/**\r\n * A OneOf setter as returned by {@link util.oneOfSetter}.\r\n * @typedef OneOfSetter\r\n * @type {function}\r\n * @param {string|undefined} value Field name\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Builds a setter for a oneof's present field name.\r\n * @param {string[]} fieldNames Field names\r\n * @returns {OneOfSetter} Unbound setter\r\n */\r\nutil.oneOfSetter = function setOneOf(fieldNames) {\r\n\r\n /**\r\n * @param {string} name Field name\r\n * @returns {undefined}\r\n * @this Object\r\n * @ignore\r\n */\r\n return function(name) {\r\n for (var i = 0; i < fieldNames.length; ++i)\r\n if (fieldNames[i] !== name)\r\n delete this[fieldNames[i]];\r\n };\r\n};\r\n\r\n/**\r\n * Default conversion options used for {@link Message#toJSON} implementations.\r\n *\r\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\r\n *\r\n * - Longs become strings\r\n * - Enums become string keys\r\n * - Bytes become base64 encoded strings\r\n * - (Sub-)Messages become plain objects\r\n * - Maps become plain objects with all string keys\r\n * - Repeated fields become arrays\r\n * - NaN and Infinity for float and double fields become strings\r\n *\r\n * @type {IConversionOptions}\r\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\r\n */\r\nutil.toJSONOptions = {\r\n longs: String,\r\n enums: String,\r\n bytes: String,\r\n json: true\r\n};\r\n\r\nutil._configure = function() {\r\n var Buffer = util.Buffer;\r\n /* istanbul ignore if */\r\n if (!Buffer) {\r\n util._Buffer_from = util._Buffer_allocUnsafe = null;\r\n return;\r\n }\r\n // because node 4.x buffers are incompatible & immutable\r\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\r\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\r\n /* istanbul ignore next */\r\n function Buffer_from(value, encoding) {\r\n return new Buffer(value, encoding);\r\n };\r\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\r\n /* istanbul ignore next */\r\n function Buffer_allocUnsafe(size) {\r\n return new Buffer(size);\r\n };\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Streaming RPC helpers.\r\n * @namespace\r\n */\r\nvar rpc = exports;\r\n\r\n/**\r\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\r\n * @typedef RPCImpl\r\n * @type {function}\r\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\r\n * @param {Uint8Array} requestData Request data\r\n * @param {RPCImplCallback} callback Callback function\r\n * @returns {undefined}\r\n * @example\r\n * function rpcImpl(method, requestData, callback) {\r\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\r\n * throw Error(\"no such method\");\r\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\r\n * callback(err, responseData);\r\n * });\r\n * }\r\n */\r\n\r\n/**\r\n * Node-style callback as used by {@link RPCImpl}.\r\n * @typedef RPCImplCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any, otherwise `null`\r\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\nrpc.Service = require(\"./rpc/service\");\r\n","\"use strict\";\r\nvar protobuf = exports;\r\n\r\n/**\r\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\r\n * @name build\r\n * @type {string}\r\n * @const\r\n */\r\nprotobuf.build = \"minimal\";\r\n\r\n// Serialization\r\nprotobuf.Writer = require(\"./writer\");\r\nprotobuf.BufferWriter = require(\"./writer_buffer\");\r\nprotobuf.Reader = require(\"./reader\");\r\nprotobuf.BufferReader = require(\"./reader_buffer\");\r\n\r\n// Utility\r\nprotobuf.util = require(\"./util/minimal\");\r\nprotobuf.rpc = require(\"./rpc\");\r\nprotobuf.roots = require(\"./roots\");\r\nprotobuf.configure = configure;\r\n\r\n/* istanbul ignore next */\r\n/**\r\n * Reconfigures the library according to the environment.\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n protobuf.Reader._configure(protobuf.BufferReader);\r\n protobuf.util._configure();\r\n}\r\n\r\n// Configure serialization\r\nprotobuf.Writer._configure(protobuf.BufferWriter);\r\nconfigure();\r\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.Model = exports.Weights = void 0;\n\nvar $protobuf = _interopRequireWildcard(require(\"protobufjs/minimal\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nconst $Reader = $protobuf.Reader,\n $Writer = $protobuf.Writer,\n $util = $protobuf.util;\nconst $root = $protobuf.roots[\"default\"] || ($protobuf.roots[\"default\"] = {});\nexports.default = $root;\n\nconst Weights = $root.Weights = (() => {\n function Weights(properties) {\n this.shape = [];\n if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];\n }\n\n Weights.prototype.layerName = \"\";\n Weights.prototype.weightName = \"\";\n Weights.prototype.shape = $util.emptyArray;\n Weights.prototype.type = \"\";\n Weights.prototype.data = $util.newBuffer([]);\n Weights.prototype.quantizeMin = 0;\n Weights.prototype.quantizeMax = 0;\n\n Weights.create = function create(properties) {\n return new Weights(properties);\n };\n\n Weights.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create();\n if (message.layerName != null && message.hasOwnProperty(\"layerName\")) writer.uint32(10).string(message.layerName);\n if (message.weightName != null && message.hasOwnProperty(\"weightName\")) writer.uint32(18).string(message.weightName);\n\n if (message.shape != null && message.shape.length) {\n writer.uint32(26).fork();\n\n for (let i = 0; i < message.shape.length; ++i) writer.uint32(message.shape[i]);\n\n writer.ldelim();\n }\n\n if (message.type != null && message.hasOwnProperty(\"type\")) writer.uint32(34).string(message.type);\n if (message.data != null && message.hasOwnProperty(\"data\")) writer.uint32(42).bytes(message.data);\n if (message.quantizeMin != null && message.hasOwnProperty(\"quantizeMin\")) writer.uint32(53).float(message.quantizeMin);\n if (message.quantizeMax != null && message.hasOwnProperty(\"quantizeMax\")) writer.uint32(61).float(message.quantizeMax);\n return writer;\n };\n\n Weights.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n Weights.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.Weights();\n\n while (reader.pos < end) {\n let tag = reader.uint32();\n\n switch (tag >>> 3) {\n case 1:\n message.layerName = reader.string();\n break;\n\n case 2:\n message.weightName = reader.string();\n break;\n\n case 3:\n if (!(message.shape && message.shape.length)) message.shape = [];\n\n if ((tag & 7) === 2) {\n let end2 = reader.uint32() + reader.pos;\n\n while (reader.pos < end2) message.shape.push(reader.uint32());\n } else message.shape.push(reader.uint32());\n\n break;\n\n case 4:\n message.type = reader.string();\n break;\n\n case 5:\n message.data = reader.bytes();\n break;\n\n case 6:\n message.quantizeMin = reader.float();\n break;\n\n case 7:\n message.quantizeMax = reader.float();\n break;\n\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n\n return message;\n };\n\n Weights.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n Weights.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null) return \"object expected\";\n if (message.layerName != null && message.hasOwnProperty(\"layerName\")) if (!$util.isString(message.layerName)) return \"layerName: string expected\";\n if (message.weightName != null && message.hasOwnProperty(\"weightName\")) if (!$util.isString(message.weightName)) return \"weightName: string expected\";\n\n if (message.shape != null && message.hasOwnProperty(\"shape\")) {\n if (!Array.isArray(message.shape)) return \"shape: array expected\";\n\n for (let i = 0; i < message.shape.length; ++i) if (!$util.isInteger(message.shape[i])) return \"shape: integer[] expected\";\n }\n\n if (message.type != null && message.hasOwnProperty(\"type\")) if (!$util.isString(message.type)) return \"type: string expected\";\n if (message.data != null && message.hasOwnProperty(\"data\")) if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data))) return \"data: buffer expected\";\n if (message.quantizeMin != null && message.hasOwnProperty(\"quantizeMin\")) if (typeof message.quantizeMin !== \"number\") return \"quantizeMin: number expected\";\n if (message.quantizeMax != null && message.hasOwnProperty(\"quantizeMax\")) if (typeof message.quantizeMax !== \"number\") return \"quantizeMax: number expected\";\n return null;\n };\n\n Weights.fromObject = function fromObject(object) {\n if (object instanceof $root.Weights) return object;\n let message = new $root.Weights();\n if (object.layerName != null) message.layerName = String(object.layerName);\n if (object.weightName != null) message.weightName = String(object.weightName);\n\n if (object.shape) {\n if (!Array.isArray(object.shape)) throw TypeError(\".Weights.shape: array expected\");\n message.shape = [];\n\n for (let i = 0; i < object.shape.length; ++i) message.shape[i] = object.shape[i] >>> 0;\n }\n\n if (object.type != null) message.type = String(object.type);\n if (object.data != null) if (typeof object.data === \"string\") $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0);else if (object.data.length) message.data = object.data;\n if (object.quantizeMin != null) message.quantizeMin = Number(object.quantizeMin);\n if (object.quantizeMax != null) message.quantizeMax = Number(object.quantizeMax);\n return message;\n };\n\n Weights.toObject = function toObject(message, options) {\n if (!options) options = {};\n let object = {};\n if (options.arrays || options.defaults) object.shape = [];\n\n if (options.defaults) {\n object.layerName = \"\";\n object.weightName = \"\";\n object.type = \"\";\n object.data = options.bytes === String ? \"\" : [];\n object.quantizeMin = 0;\n object.quantizeMax = 0;\n }\n\n if (message.layerName != null && message.hasOwnProperty(\"layerName\")) object.layerName = message.layerName;\n if (message.weightName != null && message.hasOwnProperty(\"weightName\")) object.weightName = message.weightName;\n\n if (message.shape && message.shape.length) {\n object.shape = [];\n\n for (let j = 0; j < message.shape.length; ++j) object.shape[j] = message.shape[j];\n }\n\n if (message.type != null && message.hasOwnProperty(\"type\")) object.type = message.type;\n if (message.data != null && message.hasOwnProperty(\"data\")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data;\n if (message.quantizeMin != null && message.hasOwnProperty(\"quantizeMin\")) object.quantizeMin = options.json && !isFinite(message.quantizeMin) ? String(message.quantizeMin) : message.quantizeMin;\n if (message.quantizeMax != null && message.hasOwnProperty(\"quantizeMax\")) object.quantizeMax = options.json && !isFinite(message.quantizeMax) ? String(message.quantizeMax) : message.quantizeMax;\n return object;\n };\n\n Weights.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return Weights;\n})();\n\nexports.Weights = Weights;\n\nconst Model = $root.Model = (() => {\n function Model(properties) {\n this.modelWeights = [];\n if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];\n }\n\n Model.prototype.id = \"\";\n Model.prototype.name = \"\";\n Model.prototype.kerasVersion = \"\";\n Model.prototype.backend = \"\";\n Model.prototype.modelConfig = \"\";\n Model.prototype.modelWeights = $util.emptyArray;\n\n Model.create = function create(properties) {\n return new Model(properties);\n };\n\n Model.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create();\n if (message.id != null && message.hasOwnProperty(\"id\")) writer.uint32(10).string(message.id);\n if (message.name != null && message.hasOwnProperty(\"name\")) writer.uint32(18).string(message.name);\n if (message.kerasVersion != null && message.hasOwnProperty(\"kerasVersion\")) writer.uint32(26).string(message.kerasVersion);\n if (message.backend != null && message.hasOwnProperty(\"backend\")) writer.uint32(34).string(message.backend);\n if (message.modelConfig != null && message.hasOwnProperty(\"modelConfig\")) writer.uint32(42).string(message.modelConfig);\n if (message.modelWeights != null && message.modelWeights.length) for (let i = 0; i < message.modelWeights.length; ++i) $root.Weights.encode(message.modelWeights[i], writer.uint32(50).fork()).ldelim();\n return writer;\n };\n\n Model.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n Model.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.Model();\n\n while (reader.pos < end) {\n let tag = reader.uint32();\n\n switch (tag >>> 3) {\n case 1:\n message.id = reader.string();\n break;\n\n case 2:\n message.name = reader.string();\n break;\n\n case 3:\n message.kerasVersion = reader.string();\n break;\n\n case 4:\n message.backend = reader.string();\n break;\n\n case 5:\n message.modelConfig = reader.string();\n break;\n\n case 6:\n if (!(message.modelWeights && message.modelWeights.length)) message.modelWeights = [];\n message.modelWeights.push($root.Weights.decode(reader, reader.uint32()));\n break;\n\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n\n return message;\n };\n\n Model.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n Model.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null) return \"object expected\";\n if (message.id != null && message.hasOwnProperty(\"id\")) if (!$util.isString(message.id)) return \"id: string expected\";\n if (message.name != null && message.hasOwnProperty(\"name\")) if (!$util.isString(message.name)) return \"name: string expected\";\n if (message.kerasVersion != null && message.hasOwnProperty(\"kerasVersion\")) if (!$util.isString(message.kerasVersion)) return \"kerasVersion: string expected\";\n if (message.backend != null && message.hasOwnProperty(\"backend\")) if (!$util.isString(message.backend)) return \"backend: string expected\";\n if (message.modelConfig != null && message.hasOwnProperty(\"modelConfig\")) if (!$util.isString(message.modelConfig)) return \"modelConfig: string expected\";\n\n if (message.modelWeights != null && message.hasOwnProperty(\"modelWeights\")) {\n if (!Array.isArray(message.modelWeights)) return \"modelWeights: array expected\";\n\n for (let i = 0; i < message.modelWeights.length; ++i) {\n let error = $root.Weights.verify(message.modelWeights[i]);\n if (error) return \"modelWeights.\" + error;\n }\n }\n\n return null;\n };\n\n Model.fromObject = function fromObject(object) {\n if (object instanceof $root.Model) return object;\n let message = new $root.Model();\n if (object.id != null) message.id = String(object.id);\n if (object.name != null) message.name = String(object.name);\n if (object.kerasVersion != null) message.kerasVersion = String(object.kerasVersion);\n if (object.backend != null) message.backend = String(object.backend);\n if (object.modelConfig != null) message.modelConfig = String(object.modelConfig);\n\n if (object.modelWeights) {\n if (!Array.isArray(object.modelWeights)) throw TypeError(\".Model.modelWeights: array expected\");\n message.modelWeights = [];\n\n for (let i = 0; i < object.modelWeights.length; ++i) {\n if (typeof object.modelWeights[i] !== \"object\") throw TypeError(\".Model.modelWeights: object expected\");\n message.modelWeights[i] = $root.Weights.fromObject(object.modelWeights[i]);\n }\n }\n\n return message;\n };\n\n Model.toObject = function toObject(message, options) {\n if (!options) options = {};\n let object = {};\n if (options.arrays || options.defaults) object.modelWeights = [];\n\n if (options.defaults) {\n object.id = \"\";\n object.name = \"\";\n object.kerasVersion = \"\";\n object.backend = \"\";\n object.modelConfig = \"\";\n }\n\n if (message.id != null && message.hasOwnProperty(\"id\")) object.id = message.id;\n if (message.name != null && message.hasOwnProperty(\"name\")) object.name = message.name;\n if (message.kerasVersion != null && message.hasOwnProperty(\"kerasVersion\")) object.kerasVersion = message.kerasVersion;\n if (message.backend != null && message.hasOwnProperty(\"backend\")) object.backend = message.backend;\n if (message.modelConfig != null && message.hasOwnProperty(\"modelConfig\")) object.modelConfig = message.modelConfig;\n\n if (message.modelWeights && message.modelWeights.length) {\n object.modelWeights = [];\n\n for (let j = 0; j < message.modelWeights.length; ++j) object.modelWeights[j] = $root.Weights.toObject(message.modelWeights[j], options);\n }\n\n return object;\n };\n\n Model.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return Model;\n})();\n\nexports.Model = Model;","export default {};\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _keys2 = _interopRequireDefault(require(\"lodash/keys\"));\n\nvar _isEqual2 = _interopRequireDefault(require(\"lodash/isEqual\"));\n\nvar _map2 = _interopRequireDefault(require(\"lodash/map\"));\n\nvar _every2 = _interopRequireDefault(require(\"lodash/every\"));\n\nvar _find2 = _interopRequireDefault(require(\"lodash/find\"));\n\nvar _pick2 = _interopRequireDefault(require(\"lodash/pick\"));\n\nvar _bluebird = _interopRequireDefault(require(\"bluebird\"));\n\nvar _axios = _interopRequireDefault(require(\"axios\"));\n\nvar _performanceNow = _interopRequireDefault(require(\"performance-now\"));\n\nvar _eventemitter = require(\"eventemitter3\");\n\nvar layers = _interopRequireWildcard(require(\"./layers\"));\n\nvar visMethods = _interopRequireWildcard(require(\"./visualizations\"));\n\nvar _Tensor = _interopRequireDefault(require(\"./Tensor\"));\n\nvar _WebGL = require(\"./WebGL2\");\n\nvar _proto = _interopRequireDefault(require(\"./proto\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst axiosSource = _axios.default.CancelToken.source();\n\nclass Model {\n constructor(config = {}) {\n const {\n filepath = null,\n headers = {},\n filesystem = false,\n gpu = false,\n transferLayerOutputs = false,\n pauseAfterLayerCalls = false,\n visualizations = []\n } = config;\n\n if (!filepath) {\n throw new Error('[Model] path to protobuf-serialized model definition file is missing.');\n }\n\n this.filepath = filepath;\n this.headers = headers;\n this.filesystem = typeof window !== 'undefined' ? false : filesystem;\n this.events = new _eventemitter.EventEmitter();\n this.id = null;\n this.name = null;\n this.kerasVersion = null;\n this.backend = null;\n this.modelConfig = {};\n this.modelWeights = [];\n this.gpu = typeof window !== 'undefined' && _WebGL.webgl2.isSupported ? gpu : false;\n this.transferLayerOutputs = transferLayerOutputs;\n this.pauseAfterLayerCalls = pauseAfterLayerCalls;\n this.modelLayersInfo = [];\n this.modelLayersMap = new Map();\n this.inputTensorsMap = new Map();\n this.inputLayerNames = [];\n this.outputLayerNames = [];\n this.finishedLayerNames = [];\n this.isRunning = false;\n this.runningProgress = 0;\n this.predictStats = {};\n this.visMap = new Map();\n visualizations.forEach(v => {\n if (v in visMethods) {\n const visInstance = new visMethods[v]({\n modelLayersMap: this.modelLayersMap,\n gpu: this.gpu\n });\n this.visMap.set(v, visInstance);\n }\n });\n this._ready = this._initialize();\n }\n\n checkGPUSupport() {\n return _WebGL.webgl2.isSupported;\n }\n\n ready() {\n return this._ready;\n }\n\n _interrupt() {\n axiosSource.cancel();\n }\n\n async _initialize() {\n this.events.emit('loadingProgress', 0);\n\n try {\n const req = this.filesystem ? this._dataRequestFS() : this._dataRequestHTTP(this.headers);\n await req;\n } catch (err) {\n console.log(err);\n\n this._interrupt();\n }\n\n this.events.emit('loadingProgress', 100);\n\n this._buildDAG();\n\n this.inputLayerNames.forEach(name => {\n const inputLayer = this.modelLayersMap.get(name);\n inputLayer.call(this.inputTensorsMap.get(name));\n inputLayer.hasOutput = true;\n inputLayer.visited = true;\n });\n const _pauseAfterLayerCalls = this.pauseAfterLayerCalls;\n this.pauseAfterLayerCalls = true;\n this.runningProgress = 0;\n this.events.emit('initProgress', 0);\n await this._traverseDAG(this.inputLayerNames, 'initProgress');\n this.pauseAfterLayerCalls = _pauseAfterLayerCalls;\n this.finishedLayerNames = [];\n this.modelLayersMap.forEach(layer => {\n layer.hasOutput = false;\n layer.visited = false;\n });\n this.visMap.forEach(visInstance => {\n visInstance.initialize();\n });\n this.events.emit('initProgress', 100);\n return true;\n }\n\n async _dataRequestHTTP(headers = {}) {\n try {\n const res = await _axios.default.get(this.filepath, {\n responseType: 'arraybuffer',\n headers,\n onDownloadProgress: e => {\n if (e.lengthComputable) {\n const percentComplete = Math.round(100 * e.loaded / e.total);\n this.events.emit('loadingProgress', percentComplete);\n }\n },\n cancelToken: axiosSource.token\n });\n\n this._decodeProtobuf(new Uint8Array(res.data));\n } catch (err) {\n if (_axios.default.isCancel(err)) {\n console.log('[Model] Data request canceled', err.message);\n } else {\n throw err;\n }\n }\n }\n\n async _dataRequestFS() {\n const readFile = _bluebird.default.promisify(require('fs').readFile);\n\n try {\n const file = await readFile(this.filepath);\n\n this._decodeProtobuf(file);\n } catch (err) {\n throw err;\n }\n }\n\n _decodeProtobuf(buffer) {\n const err = _proto.default.Model.verify(buffer);\n\n if (err) {\n throw new Error(`[Model] Invalid model - check protobuf serialization: {err}`);\n }\n\n const model = _proto.default.Model.decode(buffer);\n\n this.id = model.id;\n this.name = model.name;\n this.kerasVersion = model.kerasVersion;\n this.backend = model.backend;\n this.modelConfig = JSON.parse(model.modelConfig);\n this.modelWeights = model.modelWeights;\n }\n\n toggleGPU(mode) {\n if (typeof mode === 'undefined') {\n this.gpu = !this.gpu;\n } else {\n this.gpu = mode;\n }\n\n this.modelLayersMap.forEach(layer => {\n layer.toggleGPU(this.gpu);\n });\n this.visMap.forEach(visInstance => {\n visInstance.gpu = this.gpu;\n });\n this.resetInputTensors();\n }\n\n resetInputTensors() {\n this.inputLayerNames.forEach(name => {\n const inputLayer = this.modelLayersMap.get(name);\n this.inputTensorsMap.set(name, new _Tensor.default([], inputLayer.shape));\n });\n }\n\n _buildDAG() {\n const modelClass = this.modelConfig.class_name;\n let modelConfig = [];\n\n if (modelClass === 'Sequential') {\n modelConfig = this.modelConfig.config;\n } else if (modelClass === 'Model') {\n modelConfig = this.modelConfig.config.layers;\n }\n\n if (!(Array.isArray(modelConfig) && modelConfig.length)) {\n throw new Error('[Model] Model configuration does not contain any layers.');\n }\n\n modelConfig.forEach((layerDef, index) => {\n const layerClass = layerDef.class_name;\n const layerConfig = layerDef.config;\n\n if (modelClass === 'Model' && layerClass === 'Sequential') {\n layerConfig.forEach((branchLayerDef, branchIndex) => {\n const branchLayerClass = branchLayerDef.class_name;\n const branchLayerConfig = branchLayerDef.config;\n const branchInboundLayerNames = branchIndex === 0 ? layerDef.inbound_nodes[0].map(node => node[0]) : [layerConfig[branchIndex - 1].config.name];\n\n this._createLayer(branchLayerClass, branchLayerConfig, branchInboundLayerNames);\n });\n } else if (!(layerClass in layers)) {\n throw new Error(`[Model] Layer ${layerClass} specified in model configuration is not implemented!`);\n } else {\n if (modelClass === 'Sequential' && index === 0) {\n const inputName = 'input';\n const inputShape = layerConfig.batch_input_shape.slice(1);\n const layer = new layers.InputLayer({\n name: inputName,\n shape: inputShape,\n gpu: this.gpu\n });\n this.modelLayersMap.set(inputName, layer);\n this.inputTensorsMap.set(inputName, new _Tensor.default([], inputShape));\n this.inputLayerNames.push(inputName);\n } else if (modelClass === 'Model' && layerClass === 'InputLayer') {\n const inputShape = layerConfig.batch_input_shape.slice(1);\n this.inputTensorsMap.set(layerConfig.name, new _Tensor.default([], inputShape));\n this.inputLayerNames.push(layerConfig.name);\n }\n\n let inboundLayerNames = [];\n\n if (modelClass === 'Sequential') {\n if (index === 0) {\n inboundLayerNames = ['input'];\n } else {\n inboundLayerNames = [modelConfig[index - 1].config.name];\n }\n } else if (modelClass === 'Model') {\n const inboundNodes = layerDef.inbound_nodes;\n\n if (inboundNodes && inboundNodes.length) {\n inboundLayerNames = inboundNodes[0].map(node => node[0]);\n }\n }\n\n this._createLayer(layerClass, layerConfig, inboundLayerNames);\n }\n });\n this.modelLayersMap.forEach(layer => {\n this.modelLayersInfo.push((0, _pick2.default)(layer, ['name', 'description', 'layerClass', 'inbound', 'outbound']));\n\n if (layer.outbound.length === 0) {\n this.outputLayerNames.push(layer.name);\n }\n });\n this.inputLayerNames.sort();\n this.outputLayerNames.sort();\n }\n\n _createLayer(layerClass, layerConfig, inboundLayerNames) {\n const layer = new layers[layerClass](Object.assign({}, layerConfig, {\n gpu: this.gpu\n }));\n let weightNames = [];\n\n if (layerClass === 'Bidirectional') {\n const forwardWeightNames = layer.forwardLayer.params.map(param => `${layerConfig.name}/forward_${layerConfig.layer.config.name}/${param}`);\n const backwardWeightNames = layer.backwardLayer.params.map(param => `${layerConfig.name}/backward_${layerConfig.layer.config.name}/${param}`);\n weightNames = forwardWeightNames.concat(backwardWeightNames);\n } else if (layerClass === 'TimeDistributed') {\n weightNames = layer.layer.params.map(param => `${layerConfig.name}/${param}`);\n } else {\n weightNames = layer.params.map(param => `${layerConfig.name}/${param}`);\n }\n\n if (weightNames && weightNames.length) {\n const weights = weightNames.map(weightName => {\n const weightDef = (0, _find2.default)(this.modelWeights, w => {\n const weightRE = new RegExp(`^.*${weightName}`);\n return weightRE.test(w.weightName);\n });\n\n if (!weightDef) {\n throw new Error(`[Model] error loading weights.`);\n }\n\n const {\n data,\n shape,\n type\n } = weightDef;\n const buf = new ArrayBuffer(data.byteLength);\n const arr = new Uint8Array(buf);\n arr.set(new Uint8Array(data.buffer, data.byteOffset, data.byteLength));\n\n if (type === 'uint8') {\n const {\n quantizeMin,\n quantizeMax\n } = weightDef;\n const unquantized = new Float32Array(arr);\n\n for (let i = 0, len = unquantized.length; i < len; i++) {\n unquantized[i] *= (quantizeMax - quantizeMin) / 255;\n unquantized[i] += quantizeMin;\n }\n\n return new _Tensor.default(unquantized, shape);\n } else {\n return new _Tensor.default(new Float32Array(buf), shape);\n }\n });\n layer.setWeights(weights);\n }\n\n this.modelLayersMap.set(layerConfig.name, layer);\n inboundLayerNames.forEach(layerName => {\n this.modelLayersMap.get(layerConfig.name).inbound.push(layerName);\n this.modelLayersMap.get(layerName).outbound.push(layerConfig.name);\n });\n }\n\n async _traverseDAG(nodes, eventName) {\n if (nodes.length === 0) {\n this.runningProgress = 100;\n this.events.emit(eventName, 100);\n return true;\n } else if (nodes.length === 1) {\n const node = nodes[0];\n const currentLayer = this.modelLayersMap.get(node);\n\n if (currentLayer.layerClass === 'InputLayer') {\n this.finishedLayerNames.push(this.modelLayersMap.get(node).name);\n } else {\n const currentLayer = this.modelLayersMap.get(node);\n\n if (currentLayer.visited) {\n return false;\n }\n\n const inboundLayers = currentLayer.inbound.map(n => this.modelLayersMap.get(n));\n\n if (!(0, _every2.default)((0, _map2.default)(inboundLayers, 'hasOutput'))) {\n return false;\n }\n\n if (currentLayer.isMergeLayer) {\n currentLayer.call((0, _map2.default)(inboundLayers, 'output'));\n } else {\n currentLayer.call(inboundLayers[0].output);\n }\n\n currentLayer.hasOutput = true;\n currentLayer.visited = true;\n this.finishedLayerNames.push(currentLayer.name);\n\n if (this.pauseAfterLayerCalls) {\n await _bluebird.default.delay(0);\n }\n }\n\n this.runningProgress += 100 / this.modelLayersMap.size;\n this.events.emit(eventName, this.runningProgress);\n await this._traverseDAG(currentLayer.outbound, eventName);\n } else {\n await _bluebird.default.all(nodes.map(node => this._traverseDAG([node], eventName)));\n }\n }\n\n _maybeTransferIntermediateOutputs() {\n if (this.gpu && this.transferLayerOutputs) {\n this.modelLayersMap.forEach(layer => {\n if (layer.output && layer.output.glTexture) {\n _WebGL.webgl2.bindOutputTexture(layer.output.glTexture, layer.output.glTextureShape);\n\n layer.output.transferFromGLTexture();\n\n if (layer.output.is2DReshaped) {\n layer.output.reshapeFrom2D();\n }\n }\n });\n }\n }\n\n loadData(inputData) {\n this.inputLayerNames.forEach(name => {\n const inputLayer = this.modelLayersMap.get(name);\n this.inputTensorsMap.get(name).replaceTensorData(inputData[name]);\n inputLayer.call(this.inputTensorsMap.get(name));\n inputLayer.hasOutput = true;\n inputLayer.visited = true;\n });\n }\n\n async predict(inputData) {\n this.isRunning = true;\n this.runningProgress = 0;\n this.events.emit('predictProgress', 0);\n\n if (!(0, _isEqual2.default)((0, _keys2.default)(inputData).sort(), this.inputLayerNames)) {\n this.isRunning = false;\n throw new Error('[Model] predict() must take an object where the keys are the named inputs of the model: ' + JSON.stringify(this.inputLayerNames));\n }\n\n if (!(0, _every2.default)(this.inputLayerNames, name => inputData[name] instanceof Float32Array)) {\n this.isRunning = false;\n throw new Error('[Model] predict() must take an object where the values are the flattened data as Float32Array.');\n }\n\n this.finishedLayerNames = [];\n this.modelLayersMap.forEach(layer => {\n layer.hasOutput = false;\n layer.visited = false;\n });\n let start = (0, _performanceNow.default)();\n this.loadData(inputData);\n this.predictStats.loadData = (0, _performanceNow.default)() - start;\n start = (0, _performanceNow.default)();\n await this._traverseDAG(this.inputLayerNames, 'predictProgress');\n this.predictStats.forwardPass = (0, _performanceNow.default)() - start;\n\n this._maybeTransferIntermediateOutputs();\n\n const modelClass = this.modelConfig.class_name;\n const outputData = {};\n\n if (modelClass === 'Sequential') {\n const outputLayer = this.modelLayersMap.get(this.outputLayerNames[0]);\n outputData['output'] = outputLayer.output.tensor.data;\n } else if (modelClass === 'Model') {\n this.outputLayerNames.forEach(layerName => {\n const outputLayer = this.modelLayersMap.get(layerName);\n outputData[layerName] = outputLayer.output.tensor.data;\n });\n }\n\n start = (0, _performanceNow.default)();\n this.visMap.forEach(visInstance => {\n visInstance.update();\n });\n this.predictStats.visualizations = (0, _performanceNow.default)() - start;\n this.isRunning = false;\n this.events.emit('predictProgress', 100);\n return outputData;\n }\n\n layerCall(layerName, input) {\n if (!this.modelLayersMap.has(layerName)) return;\n let x;\n\n if (input instanceof _Tensor.default) {\n x = input;\n } else {\n x = new _Tensor.default(input.data, input.shape);\n }\n\n const layer = this.modelLayersMap.get(layerName);\n return layer.call(x);\n }\n\n cleanup() {\n _WebGL.webgl2.clearRefs();\n\n this.modelLayersMap.clear();\n this.inputTensorsMap.clear();\n this.visMap.clear();\n delete this.modelWeights;\n }\n\n}\n\nexports.default = Model;","\"use strict\"\n\nvar dup = require(\"dup\")\nvar cwise = require(\"cwise\")\n\nvar do_unpack = cwise({ \n args: [\"array\", \"scalar\", \"index\"],\n body: function unpackCwise(arr, a, idx) {\n var v = a, i\n for(i=0;i b[i] + tol) {\n return false;\n }\n }\n\n return true;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Model\", {\n enumerable: true,\n get: function () {\n return _Model.default;\n }\n});\nObject.defineProperty(exports, \"Tensor\", {\n enumerable: true,\n get: function () {\n return _Tensor.default;\n }\n});\nexports.testUtils = exports.layers = exports.activations = exports.default = exports.GPU_SUPPORT = void 0;\n\nrequire(\"@babel/polyfill\");\n\nvar _Model = _interopRequireDefault(require(\"./Model\"));\n\nvar _Tensor = _interopRequireDefault(require(\"./Tensor\"));\n\nvar _WebGL = require(\"./WebGL2\");\n\nvar activations = _interopRequireWildcard(require(\"./activations\"));\n\nexports.activations = activations;\n\nvar layers = _interopRequireWildcard(require(\"./layers\"));\n\nexports.layers = layers;\n\nvar testUtils = _interopRequireWildcard(require(\"./utils/testUtils\"));\n\nexports.testUtils = testUtils;\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst GPU_SUPPORT = _WebGL.webgl2.isSupported;\nexports.GPU_SUPPORT = GPU_SUPPORT;\nconst KerasJS = {\n Model: _Model.default,\n Tensor: _Tensor.default,\n GPU_SUPPORT,\n activations,\n layers,\n testUtils\n};\nexports.default = KerasJS;"],"names":["config","precision","getConfig","parseFloat","v","toPrecision","reverseInputs","result","input","reversedInput","reverse","low","high","low1","high1","open","close","volume","timestamp","hasPattern","levels","retracements","start","map","calculated","end","Math","index","Array","iteratee","isOwn","hasOwnProperty","call","tag","value","nativeObjectToString","symToStringTag","Object","getRawTag","objectToString","isObjectLike","baseGetTag","length","reIsUint","test","isLength","typedArrayTags","func","isArr","isArray","isArg","isArguments","isBuff","isBuffer","isType","isTypedArray","skipIndexes","baseTimes","String","key","inherited","push","Ctor","constructor","proto","prototype","transform","isPrototype","nativeKeys","type","isObject","isFunction","isArrayLike","arrayLikeKeys","baseKeys","__data__","size","other","array","eq","data","assocIndexOf","lastIndex","pop","entries","clear","entry","set","get","has","maskSrcKey","funcToString","isMasked","pattern","toSource","object","getValue","baseIsNative","nativeCreate","Map","isKeyable","getMapData","pairs","LARGE_ARRAY_SIZE","values","add","predicate","cache","isPartial","bitmask","arrLength","othLength","stacked","stack","seen","arrValue","othValue","compared","customizer","arraySome","cacheHas","equalFunc","forEach","byteLength","byteOffset","buffer","name","message","convert","equalArrays","symbolValueOf","offset","keysFunc","arrayPush","symbolsFunc","resIndex","baseGetAllKeys","objProps","getAllKeys","objLength","othProps","skipCtor","objValue","objCtor","othCtor","objIsArr","othIsArr","objTag","getTag","othTag","objIsObj","othIsObj","isSameTag","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","equalObjects","baseIsEqualDeep","baseIsEqual","matchData","noCustomizer","srcValue","COMPARE_PARTIAL_FLAG","keys","isStrictComparable","getMatchData","matchesStrictComparable","baseIsMatch","isSymbol","reIsPlainProp","reIsDeepProp","resolver","TypeError","memoized","args","arguments","apply","memoize","Cache","arrayMap","symbolToString","baseToString","isKey","stringToPath","toString","castPath","path","toKey","baseGet","hasFunc","isIndex","hasPath","hasIn","baseProperty","basePropertyDeep","baseMatchesProperty","baseMatches","property","iterable","props","fromRight","baseFor","collection","eachFunc","baseIteratee","guard","isIterateeCall","findIndexFunc","fromIndex","valueOf","replace","isBinary","reIsBinary","reIsOctal","freeParseInt","slice","reIsBadHex","toNumber","sign","toFinite","remainder","toInteger","nativeMax","baseFindIndex","nested","newValue","paths","basePickBy","spreadableSymbol","depth","baseFlatten","otherArgs","count","lastCalled","stamp","nativeNow","remaining","HOT_SPAN","setToString","overRest","obj","readFloatLE","FormData","val","ArrayBuffer","isView","pipe","URLSearchParams","str","navigator","product","window","document","i","l","babelHelpers.typeof","merge","thisArg","bind","encodeURIComponent","output","idx","block","charCode","charAt","charCodeAt","utils","isUndefined","headers","adapter","XMLHttpRequest","process","handlers","cancelToken","throwIfRequested","defaults","interceptors","resolvePromise","promise","Promise","token","reason","context","instance","Axios","request","extend","nativeCeil","step","baseRange","a","b","stride","terms","sort","className","join","dimension","useGetters","dtype","code","procedure","Function","CACHED_CONSTRUCTORS","indices","iota","index_str","shapeArg","strideArg","a_vars","c_vars","tShape","tStride","n","ctor","shape","d","sz","arrayDType","ctor_list","compileConstructor","ptr","len","list","compare","unique_pred","unique_eq","order","nargs","proc","arrayArgs","has_index","indexArgs","vars","pidx","j","blockSize","indexStr","innerFill","matched","orders","body","pre","post","carg","re","RegExp","ptrStr","arrNum","indexOf","argTypes","offArgIndex","offsetArgIndex","offArg","offsetArgs","localStr","arrStr","arrayBlockIndices","dtypes","lvalue","reStrArr","ptrStrArr","Error","scalarArgs","trim","summary","allEqual","t","digits","match","typesig","blockBegin","blockEnd","loopBegin","loopEnd","loopOrders","newOrder","arglist","shapeArgs","zeros","off_arg","init_string","thisVars","uniq","concat","processBlock","countMatches","outerFill","debug","log","loopName","funcName","typeSummary","f","thunkName","shimArgs","string_typesig","proc_args","shapeLengthConditions","shapeConditions","thunk","compile","user_args","arg_type","blockIndices","printCode","createThunk","axes","ndarray","rvalue","localVars","identifier","self","params","ast","expression","callee","names","nstr","prefix","id","lo","node","range","hi","parent","left","operator","LVALUE","src","esprima","parse","PREFIX_COUNTER","argNames","getArgNames","compiledArgs","exploded","RVALUE","computed","createThisVar","argNo","usage","getUsage","isGlobal","createLocal","escapeString","routine","source","REQUIRED_FIELDS","OPTIONAL_FIELDS","warn","baseSlice","current","baseSum","oOrd","oType","aOrd","bOrd","symbols","read","walk","write","shapes","generateBetaPass","sym","outType","aType","bType","useAlpha","useBeta","unpackShape","generateRowColumnLoop","generateBlockLoop","arr","os","as","bs","m","alpha","beta","classifyType","typeSig","CACHE","generatePlan","axis","Number","isFinite","splice","dot","blas1","A","y","pick","r","c","sum","Kl","Ku","alpha0","beta0","max","x","lower","fromLower","t1","t2","scal","error","dupe_array","dupe_number","pool","malloc","assign","free","buf","mindim","Infinity","offsum","reps","inputShape","newShape","newDim","repProd","origin","toPick","inputs","options","pending","reject","resolve","ctx","_listeners","LN2","Float32Array","writeUint","isNaN","exponent","mantissa","uint","readUint","NaN","writeFloatLE","writeFloat_ieee754","writeFloatBE","readFloat_ieee754","readFloatBE","f8b","pos","f32","Uint8Array","le","Float64Array","writeDoubleLE","writeDouble_ieee754","writeDoubleBE","readDoubleLE","readDouble_ieee754","readDoubleBE","f64","mod","eval","SIZE","slab","alloc","fn","next","head","writer","tail","states","utf8","utf8Write","RangeError","reader","writeLength","bits","indexOutOfRange","readFixed32_end","EventEmitter","rpcImpl","requestDelimited","responseDelimited","nativeIsFinite","linearInterpolate","before","after","newData","springFactor","fitCount","tmp","toFixed","reduce","cum","norm","__awaiter","model","ready","l2Normalize","interpolateArray","predict","AvailablePatterns","predictPattern","patternId","DB","probability","DT","HS","IHS","TU","TD","floor","exp","fromCharCode","ceil","round","min","abs","sqrt","pow","Item","prev","LinkedList","_length","_tail","_head","_current","_next","FixedSizeLinkedList","maintainHigh","maintainLow","maintainSum","totalPushed","periodHigh","periodLow","periodSum","_push","lastShift","shift","calculatePeriodHigh","calculatePeriodLow","resetCursor","CandleData","CandleList","IndicatorInput","Indicator","format","MAInput","period","SMA","price","genFn","counter","generator","calculate","EMA","priceArray","sma","prevEma","tick","nextValue","WMA","regeneratorRuntime","WEMA","MACDInput","SimpleMAOscillator","SimpleMASignal","MACD","oscillatorMAtype","signalMAtype","fastMAProducer","fastPeriod","slowMAProducer","slowPeriod","signalMAProducer","signalPeriod","fast","signal","AvgGainInput","AverageGain","currentValue","gain","avgGain","gainSum","AvgLossInput","AverageLoss","lastValue","loss","avgLoss","lossSum","RSIInput","RSI","GainProvider","LossProvider","lastAvgGain","lastAvgLoss","SDInput","SD","currentSet","iterator","nextResult","BollingerBandsInput","BollingerBandsOutput","BollingerBands","stdDev","sd","calcSMA","calcsd","upper","WilderSmoothing","MDMInput","MDM","lows","highs","last","downMove","PDMInput","PDM","upMove","TrueRangeInput","TrueRange","closes","previousClose","ADXInput","ADXOutput","ADX","plusDM","minusDM","emaPDM","emaMDM","emaTR","emaDX","tr","calcTr","lastATR","lastAPDM","lastAMDM","lastPDI","diDiff","adx","pdi","mdi","ATRInput","ATR","trueRange","wema","trange","ROCInput","ROC","pastPeriods","KSTInput","KST","rocPer1","ROCPer1","rocPer2","ROCPer2","rocPer3","ROCPer3","rocPer4","ROCPer4","smaPer1","SMAROCPer1","smaPer2","SMAROCPer2","smaPer3","SMAROCPer3","smaPer4","SMAROCPer4","roc1","roc2","roc3","roc4","sma1","sma2","sma3","sma4","signalSMA","firstResult","RCMA2","RCMA3","RCMA4","roc1Result","roc2Result","roc3Result","roc4Result","RCMA1","kst","PSARInput","PSAR","extreme","sar","furthest","accel","curr","up","StochasticInput","Stochastic","pastLowPeriods","pastHighPeriods","dSma","WilliamsRInput","WilliamsR","ADLInput","ADL","volumes","moneyFlowMultiplier","tickInput","OBVInput","OBV","lastClose","TRIXInput","TRIX","ema","emaOfema","emaOfemaOfema","trixROC","initialema","smoothedResult","doubleSmoothedResult","ForceIndexInput","ForceIndex","emaForceIndex","previousTick","CCIInput","CCI","currentTpSet","tpSMACalculator","smaTp","tp","constant","AwesomeOscillatorInput","AwesomeOscillator","slowSMA","fastSMA","slowSmaValue","fastSmaValue","VWAPInput","VWAP","cumulativeTotal","VolumeProfileInput","VolumeProfile","opens","bars","noOfBars","lastEnd","rangeStart","rangeEnd","bullishVolume","bearishVolume","totalVolume","priceBar","priceBarStart","priceBarEnd","priceBarOpen","priceBarClose","priceBarVolume","priceFallsBetweenBarRange","TypicalPriceInput","TypicalPrice","priceInput","MFIInput","MFI","typicalPrice","positiveFlow","negativeFlow","typicalPriceValue","prevousTypicalPrice","positionMoney","negativeMoney","positiveFlowForPeriod","StochasticRsiInput","StochasticRSI","rsiPeriod","stochasticPeriod","kPeriod","dPeriod","stochasticRSI","rsi","lastRSI","stochastic","k","HighestInput","Highest","periodList","LowestInput","Lowest","SumInput","Sum","RenkoInput","Renko","useATR","brickSize","atrResult","atr","lastOpen","lastHigh","lastLow","lastVolume","lastTimestamp","candleData","absoluteMovementFromClose","absoluteMovementFromOpen","Low","reference","HeikinAshiInput","HeikinAshi","CandlestickFinder","right","requiredCount","strategyFn","logic","_generateDataForCandleStick","filter","_getLastDataForCandleStick","returnVal","generatedData","MorningStar","firstdaysOpen","firstdaysClose","firstdaysHigh","firstdaysLow","seconddaysOpen","seconddaysClose","seconddaysHigh","seconddaysLow","thirddaysOpen","thirddaysClose","thirddaysHigh","thirddaysLow","isFirstBearish","BullishEngulfingPattern","BullishHarami","BullishHaramiCross","isSecondDayDoji","approximateEqual","isBullishHaramiCrossPattern","Doji","daysOpen","daysClose","daysHigh","daysLow","isOpenEqualsClose","isHighEqualsOpen","isLowEqualsClose","MorningDojiStar","dojiExists","DownsideTasukiGap","BullishMarubozu","isBullishMarbozu","PiercingLine","isDowntrend","ThreeWhiteSoldiers","isUpTrend","BullishHammerStick","isBullishHammer","BullishInvertedHammerStick","isBullishInvertedHammer","BearishHammerStick","isBearishHammer","BearishInvertedHammerStick","isBearishInvertedHammer","HammerPattern","isPattern","downwardTrend","includesHammer","hasConfirmation","confirm","gains","averagegain","losses","averageloss","possibleHammerData","bearishhammerstick","bearishinvertedhammerstick","bullishhammerstick","bullishinvertedhammerstick","possibleHammer","possibleConfirmation","HammerPatternUnconfirmed","TweezerBottom","bullishPatterns","BullishPatterns","state","BearishEngulfingPattern","BearishHarami","BearishHaramiCross","isBearishHaramiCrossPattern","EveningDojiStar","isFirstBullish","EveningStar","BearishMarubozu","isBearishMarbozu","ThreeBlackCrows","isDownTrend","HangingMan","upwardTrend","HangingManUnconfirmed","ShootingStar","ShootingStarUnconfirmed","TweezerTop","bearishPatterns","BearishPatterns","AbandonedBaby","DarkCloudCover","DragonFlyDoji","GraveStoneDoji","BullishSpinningTop","bodyLength","upperShadowLength","lowerShadowLength","BearishSpinningTop","freeGlobal","global","freeSelf","root","Symbol","objectProto","toStringTag","nullTag","undefinedTag","argsTag","propertyIsEnumerable","baseIsArguments","freeExports","exports","nodeType","freeModule","module","moduleExports","Buffer","nativeIsBuffer","MAX_SAFE_INTEGER","arrayTag","boolTag","dateTag","errorTag","funcTag","mapTag","numberTag","objectTag","regexpTag","setTag","stringTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","freeProcess","nodeUtil","binding","nodeIsTypedArray","baseUnary","overArg","asyncTag","genTag","proxyTag","arrayProto","ListCache","coreJsData","uid","exec","IE_PROTO","funcProto","reRegExpChar","reIsHostCtor","reIsNative","getNative","HASH_UNDEFINED","Hash","MapCache","Stack","SetCache","COMPARE_UNORDERED_FLAG","symbolTag","symbolProto","nativeGetSymbols","getOwnPropertySymbols","getSymbols","arrayFilter","DataView","Set","WeakMap","promiseTag","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","ctorString","FUNC_ERROR_TEXT","MAX_MEMOIZE_SIZE","reLeadingDot","rePropName","reEscapeChar","memoizeCapped","quote","string","number","INFINITY","createBaseFor","baseEach","createBaseEach","NAN","reTrim","parseInt","MAX_INTEGER","find","createFind","defineProperty","isConcatSpreadable","baseSetToString","HOT_COUNT","Date","now","shortOut","flatRest","basePick","e","define","_dereq_","s","o","ret","setHowMany","setUnwrap","init","SomePromiseArray","_SomePromiseArray","any","_customScheduler","_isTickUsed","_lateQueue","_normalQueue","_haveDrainedQueues","_trampolineEnabled","drainQueues","_drainQueues","_schedule","_queueTick","_pushOne","firstLineError","schedule","Queue","util","setScheduler","hasCustomScheduler","enableTrampoline","disableTrampolineIfNecessary","hasDevTools","haveItemsQueued","fatalError","stderr","exit","throwLater","setTimeout","invokeLater","invoke","settlePromises","_settlePromises","_drainQueue","queue","receiver","arg","_reset","calledBind","rejectThis","_reject","targetRejected","promiseRejectionQueued","bindingPromise","_then","bindingResolved","_bitField","_resolveCallback","target","bindingRejected","_propagateFrom","propagateFromFunction","_boundValue","boundValueFunction","maybePromise","tryConvertToPromise","_target","_setBoundTo","_setOnCancel","_boundTo","_isBound","old","bluebird","noConflict","cr","create","callerCache","getterCache","classString","methodName","ensureMethod","canEvaluate","isIdentifier","getGetter","getter","maybeGetter","tryCatch","errorObj","async","_async","cancel","cancellation","_warn","child","_isCancellable","_cancelBy","_isFollowing","_followee","_cancelBranched","_cancellationParent","_setWillBeCancelled","_branchHasCancelled","_branchesRemainingToCancel","_enoughBranchesHaveCancelled","canceller","_invokeOnCancel","_cancel","_setCancelled","_cancelPromises","_unsetOnCancel","_onCancelField","isPending","_isCancelled","isCancellable","isCancelled","_doInvokeOnCancel","onCancelCallback","_resultCancelled","_attachExtraTrace","_onCancel","_invokeInternalOnCancel","getKeys","boundTo","instances","item","matchesPredicate","predicateLoop","_trace","Context","CapturedTrace","peekContext","contextStack","longStackTraces","_promiseCreated","_pushContext","_popContext","_peekContext","trace","deactivateLongStackTraces","activateLongStackTraces","Promise_pushContext","Promise_popContext","Promise_PeekContext","Promise_peekContext","Promise_promiseCreated","_attachCancellationCallback","previousOnCancel","flags","branchesRemainingToCancel","isFulfilled","canAttachTrace","_parent","attachExtraTrace","__stackCleaned__","parsed","parseStackAndMessage","notEnumerableProp","warnings","warning","activeFireEvent","stacks","currentLastIndex","currentLastLine","commonRootMeetPoint","line","isTraceLine","stackFramePattern","isInternalFrame","shouldIgnore","indentStackFrames","split","stackFramesAsArray","cleanStack","console","title","formatStack","localEventFired","ruselessToString","newStr","JSON","stringify","snip","maxChars","substr","matches","_promisesCreated","uncycle","getDomain","_getDomain","Warning","bluebirdFramePattern","nodeFramePattern","parseLinePattern","debugging","env","wForgottenReturn","unhandledRejectionHandled","possiblyUnhandledRejection","printWarning","suppressUnhandledRejections","_ensurePossibleRejectionHandled","_setRejectionIsUnhandled","_notifyUnhandledRejection","_notifyUnhandledRejectionIsHandled","_setReturnedNonUndefined","_returnedNonUndefined","_isRejectionUnhandled","_settledValue","_setUnhandledRejectionIsNotified","_unsetUnhandledRejectionIsNotified","_isUnhandledRejectionNotified","_unsetRejectionIsUnhandled","onPossiblyUnhandledRejection","domain","domainBind","onUnhandledRejectionHandled","disableLongStackTraces","longStackTracesIsSupported","Promise_captureStackTrace","_captureStackTrace","Promise_attachExtraTrace","hasLongStackTraces","fireDomEvent","CustomEvent","event","dispatchEvent","domEvent","toLowerCase","Event","detail","createEvent","initCustomEvent","fireGlobalEvent","isNode","emit","method","eventToObjectGenerator","globalEventFired","domEventFired","opts","warningsOption","_clearCancellationData","_execute","monitoring","_fireEvent","parseLineInfoRegex","inherits","nodes","stackToIndex","currentStack","cycleEdgeNode","currentChildLength","reconstructStack","captureStackTrace","v8stackFramePattern","v8stackFormatter","formatNonError","stackTraceLimit","err","hasStackAfterThrow","isTTY","color","isSoft","returnValue","promiseCreated","handlerLine","creatorLine","traceLines","lineMatches","firstUserLine","msg","firstStackLines","lastStackLines","lastLineError","firstIndex","firstFileName","lastFileName","parseLineInfo","fileName","info","thenReturn","thenThrow","catchThrow","_reason","caught","catchReturn","_value","PromiseAll","PromiseReduce","all","each","mapSeries","cause","es5","Objectfreeze","freeze","subError","CancellationError","TimeoutError","AggregateError","_TypeError","_RangeError","methods","level","indent","lines","errorTypes","OperationalError","isES5","getOwnPropertyDescriptor","getOwnPropertyNames","getPrototypeOf","descriptor","writable","ObjectKeys","ObjectGetDescriptor","ObjectDefineProperty","desc","ObjectFreeze","ObjectGetPrototypeOf","ArrayIsArray","PromiseMap","handler","called","cancelPromise","finallyHandler","checkCancel","isFinallyHandler","isRejected","catchFilter","_passThrough","then","lastly","tap","tapCatch","catchInstances","yieldHandlers","internal","_finallyPromise","_promise","_stack","_generatorFunction","_receiver","_generator","_yieldHandlers","_yieldedPromise","_cancellationPhase","errors","_isResolved","_cleanup","_fulfill","_promiseCancelled","implementsReturn","coroutine","returnSentinel","_continue","_promiseFulfilled","_promiseRejected","_run","_rejectCallback","done","promiseFromYieldHandler","bitField","_proxy","yieldHandler","generatorFunction","spawn","addYieldHandler","deprecated","apiRejection","spread","constructor$","_callback","_preservedValues","_filter","_limit","_inFlight","_queue","_asyncInit","limit","concurrency","_init$","_init","_values","preservedValues","callback","checkForgottenReturns","totalResolved","_totalResolved","_resolve","booleans","_resolveFromSyncValue","attempt","isUntypedError","rErrorKey","markAsOriginatingFromRejection","maybeWrapAsError","wrapped","wrapAsOperationalError","successAdapter","newReason","asCallback","nodeify","executor","_fulfillmentHandler0","_rejectionHandler0","_promise0","_receiver0","_resolveFromExecutor","p","makeSelfResolutionError","reflectHandler","PromiseInspection","UNDEFINED_BINDING","Async","RejectionError","INTERNAL","APPLY","NEXT_FILTER","PromiseArray","createContext","PassThroughHandlerContext","nodebackForPromise","reflect","_setIsFinal","toJSON","fulfillmentValue","rejectionReason","originatesFromRejection","getNewLibraryCopy","is","fromNode","fromCallback","multiArgs","_isFateSealed","_setAsyncGuaranteed","cast","_setFulfilled","fulfilled","rejected","haveInternalData","internalData","settler","_settlePromiseCtx","_settlePromiseLateCancellationObserver","_addCallbacks","_setLength","_setRejected","_setFollowing","_isFinal","_unsetCancelled","_receiverAt","_promiseAt","_fulfillmentHandlerAt","_rejectionHandlerAt","_migrateCallback0","follower","fulfill","_migrateCallbackAt","base","_setFollowee","ensureErrorObject","hasStack","synchronous","_settlePromiseFromHandler","_settlePromise","isPromise","asyncGuaranteed","_settlePromise0","_clearCallbackDataAtIndex","_fulfillPromises","_rejectPromises","defer","version","toFastProperties","setBounds","asArray","resolveValueIfEmpty","_resolveEmptyArray","toResolutionValue","_iterate","getActualLength","shouldCopyValues","isResolved","noCopyPropsPattern","__isPromisified__","getDataPropertyOrDefault","isPromisified","suffixRegexp","keyWithoutAsyncSuffix","inheritedDataKeys","passesDefaultFilter","defaultFilter","hasPromisified","escapeIdentRegex","promisifiableMethods","promisifiedKey","promisifier","makeNodePromisified","promisified","THIS","withAppended","defaultPromisified","noCopyProps","cb","defaultThis","makeNodePromisifiedEval","promisify","copyDescriptors","promisifyAll","suffix","isClass","isMap","Es6Map","mapToEntries","_isMap","castValue","entriesToMap","keyOffset","_capacity","_front","_willBeOverCapacity","_checkCapacity","wrapMask","front","_resizeTo","oldCapacity","raceLater","promises","race","_fn","initialValue","_initialValue","_currentCancellable","_eachValues","_each","accum","_gotAccum","gotValue","_eachComplete","sender","_resultCancelled$","NativePromise","getNativePromise","MutationObserver","GlobalSetImmediate","setImmediate","ProcessNextTick","nextTick","isRecentNode","nativePromise","standalone","cordova","div","createElement","attributes","toggleScheduled","div2","o2","classList","toggle","observe","scheduleToggle","disconnect","_promiseResolved","_settledValueField","settle","_howMany","_unwrap","_initialized","howMany","CANCELLATION","isArrayResolved","_canPossiblyFulfill","_getRangeError","_addFulfilled","_fulfilled","_addRejected","_checkOutcome","_rejected","some","__isCancelled","doGetThen","hasProp","getThen","isAnyBluebirdPromise","doThenable","handle","afterValue","delay","afterTimeout","timeout","handleWrapper","thenable","_isDisposable","_getDisposer","_setDisposable","castPreservingDisposable","resources","tryDispose","thrower","_data","_context","Disposer","isDisposer","NULL","resource","doDispose","_unsetDisposable","using","spreadArgs","disposer","reflectedResources","resultPromise","inspections","inspection","dispose","_disposer","isPrimitive","safeToString","hasMethods","hasMethodsOtherThanConstructor","hasThisAssignmentAndStaticMethods","thisAssignmentPattern","rident","isError","propertyIsWritable","getDescriptor","hasEnvVariables","globalObject","propertyName","Parent","Child","excludedPrototypes","isExcludedProto","visitedKeys","enumeration","tryCatchTarget","ArrayFrom","from","it","itResult","chrome","loadTimes","versions","P","isSlowBuffer","_isBuffer","toUpperCase","normalizedName","response","enhanceError","validateStatus","status","createError","serializedParams","paramsSerializer","isURLSearchParams","parts","isDate","toISOString","encode","url","ignoreDuplicateOf","isStandardBrowserEnv","href","setAttribute","urlParsingNode","protocol","host","search","hash","hostname","port","pathname","msie","userAgent","originURL","resolveURL","location","isString","chars","E","cookie","isNumber","toGMTString","secure","decodeURIComponent","btoa","requestData","requestHeaders","isFormData","loadEvent","xDomain","XDomainRequest","isURLSameOrigin","onprogress","ontimeout","auth","username","password","Authorization","buildURL","readyState","responseURL","responseHeaders","parseHeaders","getAllResponseHeaders","responseData","responseType","responseText","statusText","onerror","xsrfValue","withCredentials","xsrfCookieName","cookies","xsrfHeaderName","setRequestHeader","onDownloadProgress","addEventListener","onUploadProgress","upload","abort","send","DEFAULT_CONTENT_TYPE","getDefaultAdapter","isArrayBuffer","isStream","isFile","isBlob","isArrayBufferView","InterceptorManager","use","eject","h","__CANCEL__","relativeURL","baseURL","isAbsoluteURL","combineURLs","transformData","transformRequest","common","transformResponse","isCancel","chain","unshift","interceptor","Cancel","CancelToken","axios","createInstance","getNanoSeconds","hrtime","loadTime","moduleLoadTime","nodeLoadTime","upTime","performance","hr","uptime","getTime","once","listener","evt","emitter","_events","_eventsCount","__proto__","eventNames","events","listeners","ee","listenerCount","removeListener","on","addListener","clearEvent","removeAllListeners","off","prefixed","WebGL2","isSupported","vertexShader","canvas","getContext","gl","getExtension","MAX_TEXTURE_SIZE","getParameter","MAX_TEXTURE_IMAGE_UNITS","_refs","createCommonVertexShader","createShader","VERTEX_SHADER","shaderSource","compileShader","success","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","deleteShader","fragmentShader","FRAGMENT_SHADER","program","createProgram","attachShader","linkProgram","getProgramParameter","LINK_STATUS","getProgramInfoLog","setupVertices","position","getAttribLocation","positionVertexObj","createBuffer","bindBuffer","ARRAY_BUFFER","storeRef","bufferData","STATIC_DRAW","vertexAttribPointer","FLOAT","enableVertexAttribArray","texcoord","texcoordVertexObj","indicesVertexObj","ELEMENT_ARRAY_BUFFER","Uint16Array","useProgram","loc","getUniformLocation","uniform1f","uniform1i","activeTexture","TEXTURE0","glTextureFragments","getWebGLTextureOptions","glTextureType","glTextureFormat","textureTarget","bindTexture","glTexture","glTextureFragmentsAsColStack","viewport","framebuffer","createFramebuffer","bindFramebuffer","FRAMEBUFFER","framebufferTexture2D","COLOR_ATTACHMENT0","TEXTURE_2D","uniforms","supportsTextureFragments","selectProgram","bindUniforms","inputsWithFragments","numFragments","bindOutputTexture","glTextureFragmentShape","bindInputTextures","drawElements","TRIANGLES","UNSIGNED_SHORT","glTextureShape","view","readPixels","RGBA","out","targetMap","TEXTURE_2D_ARRAY","TEXTURE_3D","internalFormatMap","R32F","R32I","formatMap","RED","RED_INTEGER","typeMap","INT","textureInternalFormat","textureFormat","textureType","textures","buffers","deleteTexture","deleteBuffer","webgl2","Layer","attrs","layerClass","description","gpu","_WebGL","weights","inbound","outbound","newMode","createGLTexture","weightsArr","createRange","hasTypedArrays","fixup","wrapper","pcompile","EmptyProc","assign_ops","op","makeOp","unary_ops","binary_ops","math_unary","math_comm","math_noncomm","__esModule","default","_ndarray","square","indicesArr","Int32Array","squareDim","indicesRowArrReshaped","indicesColArrReshaped","indicesArrReshaped","assigns","muls","addeq","subarray","axisSize","indicesRowArr","indicesColArr","otherAxes","otherAxesSize","indicesRowArrSlice","_range2","axisSlices","fill","_interopRequireDefault","_ndarrayOps","tensorUtils","newObj","_interopRequireWildcard","_ndarraySqueeze","Tensor","arrayType","checkShape","tensor","is1D","_create2DRowFragmentedGLTexture","_create2DGLTexture","_create3DGLTexture","textureOptions","createTexture","texImage2D","texParameteri","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","TEXTURE_MAG_FILTER","NEAREST","TEXTURE_MIN_FILTER","data3DLayoutForGL","texImage3D","glTextureFragmentsAsColStackShape","fbo","READ_FRAMEBUFFER","copyTexSubImage2D","deleteFramebuffer","texSubImage2D","texSubImage3D","fragmentData","readData","truncate","reshaped","otherAxesData","otherAxesDataRaveled","originalShape","indicesForReshaped","createIndicesFor2DReshaped","is2DReshaped","channelDataSize","channels","channelDataRaveled","unraveledChannelShape","unraveledChannel","is2DSquareReshaped","_isEqual2","_Layer","_Tensor","InputLayer","batch_input_shape","_callGPU","_callCPU","throwError","reshapeTo2D","maxval","sup","subseq","expeq","divseq","ch","Regex","NonAsciiIdentifierStart","NonAsciiIdentifierPart","strict","isStrictModeReservedWord","comment","lastCommentStart","extra","comments","attachComment","leadingComments","trailingComments","isLineTerminator","Messages","UnexpectedToken","isWhiteSpace","isHexDigit","scanHexEscape","isIdentifierStart","isIdentifierPart","getEscapedIdentifier","getIdentifier","Token","Identifier","isKeyword","Keyword","NullLiteral","BooleanLiteral","ch1","code2","ch2","ch3","ch4","tokenize","openParenToken","tokens","openCurlyToken","Punctuator","NumericLiteral","isOctalDigit","isDecimalDigit","scanHexLiteral","isImplicitOctalLiteral","scanOctalLiteral","octal","unescaped","restore","startLineNumber","startLineStart","StringLiteral","InvalidRegExp","classMarker","terminated","UnterminatedRegExp","scanRegExpBody","scanRegExpFlags","testRegExp","RegularExpression","literal","regex","scanRegExp","prevToken","checkToken","collectRegex","scanPunctuator","FnExprTokens","EOF","scanIdentifier","scanStringLiteral","scanNumericLiteral","advanceSlash","advance","TokenName","lineNumber","lineStart","collectToken","column","found","messageFormat","UnexpectedEOS","UnexpectedNumber","UnexpectedString","UnexpectedIdentifier","isFutureReservedWord","UnexpectedReserved","StrictReservedWord","lex","lookahead","oldIndex","oldLineNumber","oldLineStart","oldLookahead","expr","Syntax","MemberExpression","elements","startToken","parseAssignmentExpression","delegate","markEnd","createArrayExpression","previousStrict","parseFunctionSourceElements","first","isRestrictedWord","param","StrictParamName","createFunctionExpression","StrictOctalLiteral","createLiteral","createIdentifier","parseObjectPropertyKey","parsePropertyFunction","createProperty","parseVariableIdentifier","properties","kind","parseObjectProperty","PropertyKind","Data","Get","StrictDuplicateProperty","AccessorDataProperty","AccessorGetSet","createObjectExpression","parseExpression","parseGroupExpression","parseArrayInitialiser","parseObjectInitialiser","matchKeyword","parseFunctionExpression","createThisExpression","isIdentifierName","parseNonComputedProperty","parseLeftHandSideExpression","parseArguments","createNewExpression","previousAllowIn","allowIn","parseNewExpression","parsePrimaryExpression","parseNonComputedMember","createMemberExpression","createCallExpression","parseComputedMember","parseLeftHandSideExpressionAllowCall","peekLineTerminator","StrictLHSPostfix","isLeftHandSide","InvalidLHSInAssignment","createPostfixExpression","parsePostfixExpression","parseUnaryExpression","StrictLHSPrefix","createUnaryExpression","argument","StrictDelete","prec","marker","markers","binaryPrecedence","createBinaryExpression","consequent","alternate","parseBinaryExpression","createConditionalExpression","parseConditionalExpression","matchAssign","StrictLHSAssignment","createAssignmentExpression","createSequenceExpression","expressions","statement","parseSourceElement","parseStatementList","createBlockStatement","StrictVarName","createVariableDeclarator","parseVariableDeclaration","declarations","parseVariableDeclarationList","createVariableDeclaration","createEmptyStatement","createExpressionStatement","parseStatement","createIfStatement","oldInIteration","inIteration","createDoWhileStatement","createWhileStatement","update","parseForVariableDeclaration","InvalidLHSInForIn","createForStatement","createForInStatement","label","IllegalContinue","createContinueStatement","labelSet","UnknownLabel","inSwitch","IllegalBreak","createBreakStatement","inFunctionBody","IllegalReturn","createReturnStatement","StrictModeWith","createWithStatement","createSwitchCase","discriminant","cases","clause","oldInSwitch","defaultFound","createSwitchStatement","parseSwitchCase","MultipleDefaultsInSwitch","NewlineAfterThrow","createThrowStatement","StrictCatchVariable","parseBlock","createCatchClause","finalizer","parseCatchClause","NoCatchOrFinally","createTryStatement","createDebuggerStatement","labeledBody","parseEmptyStatement","parseExpressionStatement","parseBreakStatement","parseContinueStatement","parseDebuggerStatement","parseDoWhileStatement","parseForStatement","parseFunctionDeclaration","parseIfStatement","parseReturnStatement","parseSwitchStatement","parseThrowStatement","parseTryStatement","parseVariableStatement","parseWhileStatement","parseWithStatement","Redeclaration","createLabeledStatement","sourceElements","sourceElement","directive","firstRestricted","oldLabelSet","oldInFunctionBody","Literal","stricted","paramSet","StrictParamDupe","StrictFunctionName","parseParams","createFunctionDeclaration","parseConstLetDeclaration","parseSourceElements","SyntaxTreeDelegate","lastChild","Program","bottomRightStack","postProcess","processComment","ArrayExpression","AssignmentExpression","LogicalExpression","BinaryExpression","BlockStatement","BreakStatement","CallExpression","CatchClause","ConditionalExpression","ContinueStatement","DebuggerStatement","DoWhileStatement","EmptyStatement","ExpressionStatement","ForStatement","ForInStatement","FunctionDeclaration","FunctionExpression","IfStatement","LabeledStatement","accessor","NewExpression","ObjectExpression","UpdateExpression","Property","ReturnStatement","SequenceExpression","SwitchCase","SwitchStatement","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","tolerant","parseProgram","types","_cwise","_elu","_selu","scale","_softplus","_softsign","maxValue","neg","mins","mulseq","maxseq","minseq","_tanh","tanh","_sigmoid","_hard_sigmoid","_x","_softmax","_relu","_linear","LeakyReLU","compileProgram","_activations","relu","runProgram","transferFromGLTexture","reshapeFrom2D","reshapeFrom2DSquare","PReLU","_compute","ELU","_initialiseProps","ThresholdedReLU","theta","_LeakyReLU","_PReLU","_ELU","_ThresholdedReLU","dims","inputShapes","offsets","numInputs","_sum2","_take2","outVar","concatAxis","getOffset","outBlock","xCoord","yCoord","outputShape","addBias","useBias","adjustIndicesForFragments","hasFragments","indexMapShape","_add","_average","_concatenate","_maximum","_minimum","_multiply","_subtract","_conv2d","_conv2dTranspose","_cam","BLOCK_SIZE","activations","_createGLSLProgram","_ndarrayGemm","activationProgramSources","Conv2D","filters","kernel_size","strides","padding","data_format","dilation_rate","activation","use_bias","kernelShape","dataFormat","dilationRate","activationFunc","mapInputProgram","mapInputFragmentsProgram","matMulProgram","activationProgram","transpose","_w2row","wRowsMat","inputPadding","inputRows","inputCols","nbFilter","nbRow","nbCol","nbRowDilated","nbColDilated","outputRows","outputCols","paddingRow","paddingCol","paddingRowBefore","paddingColBefore","padValue","inputChannels","paddingRowAfter","paddingColAfter","patchLen","imColsMat","replaceTensorData","patch","patchRaveled","_calcOutputShape","_padInput","_im2col","matMul","outputChannelRaveled","outputChannel","indexMap","indicesPatch","outputTextureShape","_createIndexMap","outputPreactiv","convert2DRowFragmentedGLTextureToColStack","convProgram","convProgramSource","removeGLTextureFragmentsAsColStack","matMulInputs","_Conv2D","_ndarrayUnsqueeze","Conv1D","conv2dAttrs","_conv2dAttrs","setWeights","conv2dOutput","_DepthwiseConv2D","nbPatches","outputDataLength","dataFiltered","reshapeIndexMap","reshape","reshapeRowIndices","reshapeColIndices","_createOutputReshapeIndexMap","outputReshaped","SeparableConv2D","depth_multiplier","depthwiseConvAttrs","pointwiseConvAttrs","_depthwiseConv","_pointwiseConv","assignToRowIndicesMap","assignToColIndicesMap","Conv2DTranspose","outputPadding","channelRaveled","channel","outputPadded","patchShape","iOutPos","jOutPos","addseq","effectiveKernelSize","indicesMapShape","indicesMapShapePadded","outputRowIndicesMap","outputColIndicesMap","outputRowIndicesMapPadded","outputColIndicesMapPadded","matMulColIndicesPatch","matMulRowIndex","tiledIndicesMapShape","channelData","rowIndex","colIndex","matMulResult","convTransposeProgram","convTransposeProgramSource","Conv3D","inputDim1","inputDim2","inputDim3","kernelDim1","kernelDim2","kernelDim3","kernelDim1Dilated","kernelDim2Dilated","kernelDim3Dilated","outputDim1","outputDim2","outputDim3","paddingDim1","paddingDim2","paddingDim3","paddingDim1Before","paddingDim2Before","paddingDim3Before","paddingDim1After","paddingDim2After","paddingDim3After","volColsMat","_vol2col","Cropping1D","cropping","indicesRow","indicesCol","sliceStart","sliceEnd","Cropping2D","reshapeTo2DSquare","Cropping3D","UpSampling1D","UpSampling2D","UpSampling3D","ZeroPadding1D","ZeroPadding2D","ZeroPadding3D","_Conv1D","_SeparableConv2D","_Conv2DTranspose","_Conv3D","_Cropping1D","_Cropping2D","_Cropping3D","_UpSampling1D","_UpSampling2D","_UpSampling3D","_ZeroPadding1D","_ZeroPadding2D","_ZeroPadding3D","dx","dy","ox","oy","px","py","hypot","u","xmax","imax","csr","exporst","trmv","trsv","Dense","units","input_dim","_ndarrayBlasLevel","gemv","Activation","Dropout","rate","SpatialDropout1D","SpatialDropout2D","SpatialDropout3D","Flatten","flattenProgram","flattenFragmentsProgram","_last2","Reshape","target_shape","targetShape","Permute","dim","INT_BITS","mask","REVERSE_TABLE","z","countTrailingZeros","log_n","log2","nextPow2","DATA","mallocArrayBuffer","Uint32Array","Int8Array","Int16Array","Uint8ClampedArray","mallocUint8","BUFFER","__TYPEDARRAY_POOL","dup","hasUint8C","POOL","UINT8C","mallocUint16","mallocUint32","mallocInt8","mallocInt16","mallocInt32","mallocFloat","mallocDouble","mallocUint8Clamped","mallocBuffer","mallocDataView","UINT8","UINT16","UINT32","INT8","INT16","INT32","DOUBLE","_ndarrayTile","RepeatVector","_Dense","_Activation","_Dropout","_SpatialDropout1D","_SpatialDropout2D","_SpatialDropout3D","_Flatten","_Reshape","_Permute","_RepeatVector","Embedding","output_dim","input_length","mask_zero","inputDim","outputDim","inputLength","maskZero","_Embedding","_Merge","isMergeLayer","valid","_validateInputs","mode","every","dotAxes","nonConcatShapes","_concatAxis","mergeProgram","_Merge2","Add","mergeProgramSource","Subtract","sub","Multiply","muleq","Average","Maximum","maxeq","Minimum","mineq","_ndarrayConcatRows","Concatenate","dimsAxisSwap","Dot","normalize","shape1","shape2","norm2","commonDim","_Add","_Subtract","_Multiply","_Average","_Maximum","_Minimum","_Concatenate","_Dot","GaussianDropout","GaussianNoise","stddev","_GaussianDropout","_GaussianNoise","BatchNormalization","epsilon","center","axisNormalized","broadcast","_gamma","_beta","_mean","_std","sqrteq","subeq","diveq","normAxisIndexMap","_normAxisIndexMap","programInputs","programUniforms","_BatchNormalization","_Pooling1D","pool_size","poolSize","poolingFunc","poolingProgram","poolingFragmentsProgram","stepsNew","outputStep","_step","poolIndexMap","inputIndex","isMaxPooling","_Pooling1D2","MaxPooling1D","_Pooling2D","NEGATIVE_INFINITY","_i","_j","nbCellsEffective","tiledInput","rowIndices","_rowIndices","patchRow","_Pooling2D2","MaxPooling2D","_Pooling3D","poolDim1","poolDim2","poolDim3","_k","_Pooling3D2","MaxPooling3D","AveragePooling1D","AveragePooling2D","AveragePooling3D","_GlobalPooling1D","steps","features","_GlobalPooling1D2","GlobalMaxPooling1D","_GlobalPooling2D","rows","cols","_GlobalPooling2D2","GlobalMaxPooling2D","_GlobalPooling3D","dim1","dim2","dim3","_GlobalPooling3D2","GlobalMaxPooling3D","GlobalAveragePooling1D","GlobalAveragePooling2D","GlobalAveragePooling3D","_MaxPooling1D","_MaxPooling2D","_MaxPooling3D","_AveragePooling1D","_AveragePooling2D","_AveragePooling3D","_GlobalMaxPooling1D","_GlobalMaxPooling2D","_GlobalMaxPooling3D","_GlobalAveragePooling1D","_GlobalAveragePooling2D","_GlobalAveragePooling3D","SimpleRNN","_x1","return_sequences","go_backwards","stateful","returnSequences","goBackwards","copyTextureProgram","gateSummationProgram","timestepReadProgram","timestepWriteProgram","dimHiddenState","currentHiddenState","tempXH","tempHH","previousHiddenState","hiddenStateSequence","currentX","_combine","temp","currentHiddenStatePreactiv","hiddenStateSequenceCopy","_stepGPU","LSTM","_c","_ctm1","recurrent_activation","recurrentActivation","recurrentActivationFunc","recurrentActivationProgram","gateProductProgram","updateProgram","shape_W","shape_U","dimInputGate","dimCandidate","dimForgetGate","dimOutputGate","currentInputGateState","tempXI","tempHI","currentForgetGateState","tempXF","tempHF","currentOutputGateState","tempXO","tempHO","currentCandidate","tempXC","tempHC","previousCandidate","_update","mul","currentInputGateStatePreactiv","currentForgetGateStatePreactiv","currentOutputGateStatePreactiv","currentCandidatePreactiv","currentCandidateCopy","GRU","_h","_htm1","dimUpdateGate","dimResetGate","currentUpdateGateState","tempXZ","tempHZ","currentResetGateState","tempXR","tempHR","currentUpdateGateStatePreactiv","currentResetGateStatePreactiv","currentResetGateStateCopy","currentHiddenStateCopy","_SimpleRNN","_LSTM","_GRU","layers","TimeDistributed","layer","wrappedLayerAttrs","wrappedLayer","class_name","selectSliceProgram","copySliceOutputProgram","mapSliceOutputProgram","stepShape","stepOutput","stepOutputShape","timesteps","indexMaps","sliceShape","sliceIndices","outputIndexMaps","outputSliceIndices","outputIndices","sliceOutput","outputCopy","_createOutputIndexMap","recurrentLayers","Bidirectional","merge_mode","includes","forwardLayerAttrs","backwardLayerAttrs","forwardLayer","backwardLayer","mergeMode","forwardOutput","backwardOutput","outShape","inputCopy","_TimeDistributed","_Bidirectional","_exportNames","_InputLayer","_advanced_activations","_convolutional","_core","_embeddings","_merge","_noise","_normalization","_pooling","_recurrent","_wrappers","CAM","modelLayersMap","enabled","poolLayer","featureMaps","traversingLayer","numOutputClasses","_updateGPU","_updateCPU","outputMin","inf","outputMax","matVec","isWeights1D","numFeatures","programSource","_CAM","base64","b64","s64","chunk","invalidEncoding","decode","factory","c1","c2","zero","LongBits","zzEncode","zzDecode","zeroHash","fromNumber","Long","fromString","toLong","unsigned","fromHash","toHash","part0","part1","part2","dst","CustomError","asPromise","float","inquire","emptyArray","emptyObject","isInteger","isset","isSet","_Buffer_from","_Buffer_allocUnsafe","newBuffer","dcodeIO","key2Re","key32Re","key64Re","longToHash","longFromHash","fromBits","lcFirst","substring","newError","ProtocolError","oneOfGetter","fieldMap","fieldNames","oneOfSetter","toJSONOptions","_configure","allocUnsafe","BufferWriter","Writer","VarintOp","Op","uint32","int32","sint32","uint64","int64","sint64","bool","fixed32","sfixed32","fixed64","sfixed64","double","writeBytes","bytes","fork","reset","ldelim","finish","writeBytesBuffer","copy","create_array","BufferReader","Reader","_slice","skip","skipType","wireType","readLongVarint","readFixed64","utf8Slice","Service","rpcCall","requestCtor","responseCtor","protobuf","build","rpc","roots","configure","$protobuf","$Reader","$Writer","$util","$root","Weights","layerName","weightName","quantizeMin","quantizeMax","encodeDelimited","end2","decodeDelimited","verify","fromObject","toObject","arrays","json","Model","modelWeights","kerasVersion","backend","modelConfig","_keys2","_map2","_every2","_find2","_pick2","_bluebird","_axios","_performanceNow","visMethods","_proto","axiosSource","filepath","filesystem","transferLayerOutputs","pauseAfterLayerCalls","visualizations","_eventemitter","modelLayersInfo","inputTensorsMap","inputLayerNames","outputLayerNames","finishedLayerNames","isRunning","runningProgress","predictStats","visMap","visInstance","_ready","_initialize","req","_dataRequestFS","_dataRequestHTTP","_interrupt","_buildDAG","inputLayer","hasOutput","visited","_pauseAfterLayerCalls","_traverseDAG","initialize","res","lengthComputable","percentComplete","loaded","total","_decodeProtobuf","readFile","require$$13","file","toggleGPU","resetInputTensors","modelClass","layerDef","layerConfig","branchLayerClass","branchLayerDef","branchLayerConfig","branchInboundLayerNames","branchIndex","inbound_nodes","_createLayer","inputName","inboundLayerNames","inboundNodes","weightNames","forwardWeightNames","backwardWeightNames","weightDef","weightRE","w","unquantized","currentLayer","inboundLayers","inputData","loadData","forwardPass","_maybeTransferIntermediateOutputs","outputData","outputLayer","clearRefs","do_unpack","cwise","tol","_flattenDeep2","_ndarrayUnpack","_isFinite2","_Model","testUtils","GPU_SUPPORT","KerasJS","_arguments","isNodeEnvironment","modelPath","__dirname","PatternDetectorInput","PatternDetector","hasDoubleBottom","hasDoubleTop","hasHeadAndShoulder","hasInverseHeadAndShoulder","isTrendingUp","isTrendingDown","AvailableIndicators","getAvailableIndicators"],"mappings":"4BACA,eAAsC,SAGtC,aAA+B,OACpBA,OCJJ,aAAmB,IAClBC,GAAYC,EAAU,WAAVA,EADM,SAGXC,WAAWC,EAAEC,WAAFD,GAAXD,CAHW,GCuD1B,aAA2B,IACbG,gBADa,IAEnBC,GAAS,UAAeA,aACxBC,GAAMC,iBACCC,aAEDJ,mBCjBd,aAA2B,IACbA,gBADa,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AhCF,GADgB,OAAA,cAAA,CAAlB,CADZ,CAMaG,4BACW,WAAA,4EAEXnkG,gCATb,CAaA,CAAC,WAA6B,GACRkf,KAA0B,GAAK,IADvB,GAERA,MAA2B,GAAK,KAFxB,GAGRA,KAA0B,GAAK,IAHvB,GAIRA,KAA0B,GAAK,IAJvB,GAKRA,KAA0B,GAAK,IALvB,GAMRA,KAA0B,GAAK,IANrD,CAAA,EAOGA,mBAAAA,GAAsBA,mBAAAA,GAAtBA,CAPH,EA0FA,GAAaklF,2IAAb,CAEAA,GAAgBjlF,cAAhBilF,IACAA,GAAgBC,eAAhBD,IACAA,GAAgBE,YAAhBF,IACAA,GAAgBG,kBAAhBH,IACAA,GAAgBI,yBAAhBJ,IACAA,GAAgBK,YAAhBL,IACAA,GAAgBM,cAAhBN,ICvCA,GAAIO,IAAsBC,IAA1B"} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 3e8afd1..c3abecf 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3,9 +3,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var KerasJS = _interopDefault(require('keras-js')); +var tf = require('@tensorflow/tfjs'); class Item { constructor(data, prev, next) { @@ -3857,25 +3855,21 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume }); }; var isNodeEnvironment = false; +var model; +var oneHotMap = ['IHS', 'TU', 'DB', 'HS', 'TD', 'DT']; try { isNodeEnvironment = Object.prototype.toString.call(global.process) === '[object process]'; } catch (e) { } -var modelPath = getConfig('MODEL_PATH') || '/dist/model.bin'; -var model = new KerasJS.Model({ - filepath: isNodeEnvironment ? __dirname + '/model.bin' : modelPath, - gpu: false, - filesystem: isNodeEnvironment -}); (function (AvailablePatterns) { - AvailablePatterns[AvailablePatterns["TD"] = 0] = "TD"; - AvailablePatterns[AvailablePatterns["IHS"] = 1] = "IHS"; - AvailablePatterns[AvailablePatterns["HS"] = 2] = "HS"; - AvailablePatterns[AvailablePatterns["TU"] = 3] = "TU"; - AvailablePatterns[AvailablePatterns["DT"] = 4] = "DT"; - AvailablePatterns[AvailablePatterns["DB"] = 5] = "DB"; + AvailablePatterns[AvailablePatterns["IHS"] = 0] = "IHS"; + AvailablePatterns[AvailablePatterns["TU"] = 1] = "TU"; + AvailablePatterns[AvailablePatterns["DB"] = 2] = "DB"; + AvailablePatterns[AvailablePatterns["HS"] = 3] = "HS"; + AvailablePatterns[AvailablePatterns["TD"] = 4] = "TD"; + AvailablePatterns[AvailablePatterns["DT"] = 5] = "DT"; })(exports.AvailablePatterns || (exports.AvailablePatterns = {})); function interpolateArray(data, fitCount) { var linearInterpolate = function (before, after, atPoint) { @@ -3901,61 +3895,93 @@ function l2Normalize(arr) { return arr.map((v) => v / norm); } +var modelLoaded = false; +var laodingModel = false; +var loadingPromise; +function loadModel$1() { + return __awaiter(this, void 0, void 0, function* () { + if (modelLoaded) + return Promise.resolve(true); + if (laodingModel) + return loadingPromise; + loadingPromise = new Promise(function (resolve, reject) { + return __awaiter(this, void 0, void 0, function* () { + if (isNodeEnvironment) { + console.log('Nodejs Environment detected '); + var tfnode = require('@tensorflow/tfjs-node'); + var modelPath = require('path').resolve(__dirname, '../tf_model/model.json'); + model = yield tf.loadModel(tfnode.io.fileSystem(modelPath)); + } + else { + console.log('Browser Environment detected '); + if ((typeof tf === "undefined") || (typeof tf.loadModel === "undefined")) { + console.log('Tensorflow js not imported, pattern detection may not work'); + modelLoaded = false; + laodingModel = false; + resolve(); + return; + } + model = yield tf.loadModel('/tf_model/model.json'); + } + modelLoaded = true; + laodingModel = false; + resolve(); + return; + }); + }); + laodingModel = true; + return; + }); +} +loadModel$1(); function predictPattern(input) { return __awaiter(this, void 0, void 0, function* () { - if (input.values.length < 200) { - console.warn('Pattern detector requires atleast 250 data for a reliable prediction, received just ', input.values.length); + yield loadModel$1(); + if (input.values.length < 300) { + console.warn('Pattern detector requires atleast 300 data points for a reliable prediction, received just ', input.values.length); } - yield model.ready(); Indicator.reverseInputs(input); - var data = input.values; - var closes = l2Normalize(interpolateArray(data, 400)); - let result = yield model.predict({ - input: new Float32Array(closes) - }); - var index = result.output.indexOf(Math.max(...result.output)); + var values = input.values; + var output = yield model.predict(tf.tensor2d([l2Normalize(interpolateArray(values, 400))])); + var index = tf.argMax(output, 1).get(0); Indicator.reverseInputs(input); - return { - pattern: exports.AvailablePatterns[index], - patternId: index, - probability: result.output[index] * 100 - }; + return { patternId: index, pattern: oneHotMap[index], probability: output.get(0, 4) * 100 }; }); } function hasDoubleBottom(input) { return __awaiter(this, void 0, void 0, function* () { var result = yield predictPattern(input); - return (result.patternId === exports.AvailablePatterns.DB && result.probability > 75); + return (result.patternId === exports.AvailablePatterns.DB); }); } function hasDoubleTop(input) { return __awaiter(this, void 0, void 0, function* () { var result = yield predictPattern(input); - return (result.patternId === exports.AvailablePatterns.DT && result.probability > 75); + return (result.patternId === exports.AvailablePatterns.DT); }); } function hasHeadAndShoulder(input) { return __awaiter(this, void 0, void 0, function* () { var result = yield predictPattern(input); - return (result.patternId === exports.AvailablePatterns.HS && result.probability > 75); + return (result.patternId === exports.AvailablePatterns.HS); }); } function hasInverseHeadAndShoulder(input) { return __awaiter(this, void 0, void 0, function* () { var result = yield predictPattern(input); - return (result.patternId === exports.AvailablePatterns.IHS && result.probability > 75); + return (result.patternId === exports.AvailablePatterns.IHS); }); } function isTrendingUp(input) { return __awaiter(this, void 0, void 0, function* () { var result = yield predictPattern(input); - return (result.patternId === exports.AvailablePatterns.TU && result.probability > 75); + return (result.patternId === exports.AvailablePatterns.TU); }); } function isTrendingDown(input) { return __awaiter(this, void 0, void 0, function* () { var result = yield predictPattern(input); - return (result.patternId === exports.AvailablePatterns.TD && result.probability > 75); + return (result.patternId === exports.AvailablePatterns.TD); }); } class PatternDetector extends Indicator { diff --git a/dist/index.js.map b/dist/index.js.map index d6c9806..91b5458 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../lib/Utils/LinkedList.js","../lib/Utils/FixedSizeLinkedList.js","../lib/StockData.js","../lib/config.js","../lib/Utils/NumberFormatter.js","../lib/indicator/indicator.js","../lib/moving_averages/SMA.js","../lib/moving_averages/EMA.js","../lib/moving_averages/WMA.js","../lib/moving_averages/WEMA.js","../lib/moving_averages/MACD.js","../lib/Utils/AverageGain.js","../lib/Utils/AverageLoss.js","../lib/oscillators/RSI.js","../lib/Utils/SD.js","../lib/volatility/BollingerBands.js","../lib/moving_averages/WilderSmoothing.js","../lib/directionalmovement/MinusDM.js","../lib/directionalmovement/PlusDM.js","../lib/directionalmovement/TrueRange.js","../lib/directionalmovement/ADX.js","../lib/directionalmovement/ATR.js","../lib/momentum/ROC.js","../lib/momentum/KST.js","../lib/momentum/PSAR.js","../lib/momentum/Stochastic.js","../lib/momentum/WilliamsR.js","../lib/volume/ADL.js","../lib/volume/OBV.js","../lib/momentum/TRIX.js","../lib/volume/ForceIndex.js","../lib/oscillators/CCI.js","../lib/oscillators/AwesomeOscillator.js","../lib/volume/VWAP.js","../lib/volume/VolumeProfile.js","../lib/chart_types/TypicalPrice.js","../lib/volume/MFI.js","../lib/momentum/StochasticRSI.js","../lib/Utils/Highest.js","../lib/Utils/Lowest.js","../lib/Utils/Sum.js","../lib/chart_types/Renko.js","../lib/chart_types/HeikinAshi.js","../lib/candlestick/CandlestickFinder.js","../lib/candlestick/MorningStar.js","../lib/candlestick/BullishEngulfingPattern.js","../lib/candlestick/BullishHarami.js","../lib/candlestick/BullishHaramiCross.js","../lib/candlestick/Doji.js","../lib/candlestick/MorningDojiStar.js","../lib/candlestick/DownsideTasukiGap.js","../lib/candlestick/BullishMarubozu.js","../lib/candlestick/PiercingLine.js","../lib/candlestick/ThreeWhiteSoldiers.js","../lib/candlestick/BullishHammerStick.js","../lib/candlestick/BullishInvertedHammerStick.js","../lib/candlestick/BearishHammerStick.js","../lib/candlestick/BearishInvertedHammerStick.js","../lib/candlestick/HammerPattern.js","../lib/candlestick/HammerPatternUnconfirmed.js","../lib/candlestick/TweezerBottom.js","../lib/candlestick/Bullish.js","../lib/candlestick/BearishEngulfingPattern.js","../lib/candlestick/BearishHarami.js","../lib/candlestick/BearishHaramiCross.js","../lib/candlestick/EveningDojiStar.js","../lib/candlestick/EveningStar.js","../lib/candlestick/BearishMarubozu.js","../lib/candlestick/ThreeBlackCrows.js","../lib/candlestick/HangingMan.js","../lib/candlestick/HangingManUnconfirmed.js","../lib/candlestick/ShootingStar.js","../lib/candlestick/ShootingStarUnconfirmed.js","../lib/candlestick/TweezerTop.js","../lib/candlestick/Bearish.js","../lib/candlestick/AbandonedBaby.js","../lib/candlestick/DarkCloudCover.js","../lib/candlestick/DragonFlyDoji.js","../lib/candlestick/GraveStoneDoji.js","../lib/candlestick/BullishSpinningTop.js","../lib/candlestick/BearishSpinningTop.js","../lib/drawingtools/fibonacci.js","../lib/patterndetection/patterndetection.js","../index.js"],"sourcesContent":["class Item {\n constructor(data, prev, next) {\n this.next = next;\n if (next)\n next.prev = this;\n this.prev = prev;\n if (prev)\n prev.next = this;\n this.data = data;\n }\n}\nexport class LinkedList {\n constructor() {\n this._length = 0;\n }\n get head() {\n return this._head && this._head.data;\n }\n get tail() {\n return this._tail && this._tail.data;\n }\n get current() {\n return this._current && this._current.data;\n }\n get length() {\n return this._length;\n }\n push(data) {\n this._tail = new Item(data, this._tail);\n if (this._length === 0) {\n this._head = this._tail;\n this._current = this._head;\n this._next = this._head;\n }\n this._length++;\n }\n pop() {\n var tail = this._tail;\n if (this._length === 0) {\n return;\n }\n this._length--;\n if (this._length === 0) {\n this._head = this._tail = this._current = this._next = undefined;\n return tail.data;\n }\n this._tail = tail.prev;\n this._tail.next = undefined;\n if (this._current === tail) {\n this._current = this._tail;\n this._next = undefined;\n }\n return tail.data;\n }\n shift() {\n var head = this._head;\n if (this._length === 0) {\n return;\n }\n this._length--;\n if (this._length === 0) {\n this._head = this._tail = this._current = this._next = undefined;\n return head.data;\n }\n this._head = this._head.next;\n if (this._current === head) {\n this._current = this._head;\n this._next = this._current.next;\n }\n return head.data;\n }\n unshift(data) {\n this._head = new Item(data, undefined, this._head);\n if (this._length === 0) {\n this._tail = this._head;\n this._next = this._head;\n }\n this._length++;\n }\n unshiftCurrent() {\n var current = this._current;\n if (current === this._head || this._length < 2) {\n return current && current.data;\n }\n // remove\n if (current === this._tail) {\n this._tail = current.prev;\n this._tail.next = undefined;\n this._current = this._tail;\n }\n else {\n current.next.prev = current.prev;\n current.prev.next = current.next;\n this._current = current.prev;\n }\n this._next = this._current.next;\n // unshift\n current.next = this._head;\n current.prev = undefined;\n this._head.prev = current;\n this._head = current;\n return current.data;\n }\n removeCurrent() {\n var current = this._current;\n if (this._length === 0) {\n return;\n }\n this._length--;\n if (this._length === 0) {\n this._head = this._tail = this._current = this._next = undefined;\n return current.data;\n }\n if (current === this._tail) {\n this._tail = current.prev;\n this._tail.next = undefined;\n this._current = this._tail;\n }\n else if (current === this._head) {\n this._head = current.next;\n this._head.prev = undefined;\n this._current = this._head;\n }\n else {\n current.next.prev = current.prev;\n current.prev.next = current.next;\n this._current = current.prev;\n }\n this._next = this._current.next;\n return current.data;\n }\n resetCursor() {\n this._current = this._next = this._head;\n return this;\n }\n next() {\n var next = this._next;\n if (next !== undefined) {\n this._next = next.next;\n this._current = next;\n return next.data;\n }\n }\n}\n","/**\n * Created by AAravindan on 5/7/16.\n */\nimport { LinkedList } from './LinkedList';\nexport default class FixedSizeLinkedList extends LinkedList {\n constructor(size, maintainHigh, maintainLow, maintainSum) {\n super();\n this.size = size;\n this.maintainHigh = maintainHigh;\n this.maintainLow = maintainLow;\n this.maintainSum = maintainSum;\n this.totalPushed = 0;\n this.periodHigh = 0;\n this.periodLow = Infinity;\n this.periodSum = 0;\n if (!size || typeof size !== 'number') {\n throw ('Size required and should be a number.');\n }\n this._push = this.push;\n this.push = function (data) {\n this.add(data);\n this.totalPushed++;\n };\n }\n add(data) {\n if (this.length === this.size) {\n this.lastShift = this.shift();\n this._push(data);\n //TODO: FInd a better way\n if (this.maintainHigh)\n if (this.lastShift == this.periodHigh)\n this.calculatePeriodHigh();\n if (this.maintainLow)\n if (this.lastShift == this.periodLow)\n this.calculatePeriodLow();\n if (this.maintainSum) {\n this.periodSum = this.periodSum - this.lastShift;\n }\n }\n else {\n this._push(data);\n }\n //TODO: FInd a better way\n if (this.maintainHigh)\n if (this.periodHigh <= data)\n (this.periodHigh = data);\n if (this.maintainLow)\n if (this.periodLow >= data)\n (this.periodLow = data);\n if (this.maintainSum) {\n this.periodSum = this.periodSum + data;\n }\n }\n *iterator() {\n this.resetCursor();\n while (this.next()) {\n yield this.current;\n }\n }\n calculatePeriodHigh() {\n this.resetCursor();\n if (this.next())\n this.periodHigh = this.current;\n while (this.next()) {\n if (this.periodHigh <= this.current) {\n this.periodHigh = this.current;\n }\n ;\n }\n ;\n }\n calculatePeriodLow() {\n this.resetCursor();\n if (this.next())\n this.periodLow = this.current;\n while (this.next()) {\n if (this.periodLow >= this.current) {\n this.periodLow = this.current;\n }\n ;\n }\n ;\n }\n}\n","export default class StockData {\n constructor(open, high, low, close, reversedInput) {\n this.open = open;\n this.high = high;\n this.low = low;\n this.close = close;\n this.reversedInput = reversedInput;\n }\n}\nexport class CandleData {\n}\nexport class CandleList {\n constructor() {\n this.open = [];\n this.high = [];\n this.low = [];\n this.close = [];\n this.volume = [];\n this.timestamp = [];\n }\n}\n","let config = {};\nexport function setConfig(key, value) {\n config[key] = value;\n}\nexport function getConfig(key) {\n return config[key];\n}\n","import { getConfig } from '../config';\nexport function format(v) {\n let precision = getConfig('precision');\n if (precision) {\n return parseFloat(v.toPrecision(precision));\n }\n return v;\n}\n","import { format as nf } from '../Utils/NumberFormatter';\nexport class IndicatorInput {\n}\nexport class AllInputs {\n}\nexport class Indicator {\n constructor(input) {\n this.format = input.format || nf;\n }\n static reverseInputs(input) {\n if (input.reversedInput) {\n input.values ? input.values.reverse() : undefined;\n input.open ? input.open.reverse() : undefined;\n input.high ? input.high.reverse() : undefined;\n input.low ? input.low.reverse() : undefined;\n input.close ? input.close.reverse() : undefined;\n input.volume ? input.volume.reverse() : undefined;\n input.timestamp ? input.timestamp.reverse() : undefined;\n }\n }\n getResult() {\n return this.result;\n }\n}\n","//STEP 1. Import Necessary indicator or rather last step\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { LinkedList } from '../Utils/LinkedList';\n//STEP 2. Create the input for the indicator, mandatory should be in the constructor\nexport class MAInput extends IndicatorInput {\n constructor(period, values) {\n super();\n this.period = period;\n this.values = values;\n }\n}\n//STEP3. Add class based syntax with export\nexport class SMA extends Indicator {\n constructor(input) {\n super(input);\n this.period = input.period;\n this.price = input.values;\n var genFn = (function* (period) {\n var list = new LinkedList();\n var sum = 0;\n var counter = 1;\n var current = yield;\n var result;\n list.push(0);\n while (true) {\n if (counter < period) {\n counter++;\n list.push(current);\n sum = sum + current;\n }\n else {\n sum = sum - list.shift() + current;\n result = ((sum) / period);\n list.push(current);\n }\n current = yield result;\n }\n });\n this.generator = genFn(this.period);\n this.generator.next();\n this.result = [];\n this.price.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nSMA.calculate = sma;\nexport function sma(input) {\n Indicator.reverseInputs(input);\n var result = new SMA(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n//STEP 6. Run the tests\n","import { Indicator } from '../indicator/indicator';\nimport { SMA } from './SMA';\nexport class EMA extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n var exponent = (2 / (period + 1));\n var sma;\n this.result = [];\n sma = new SMA({ period: period, values: [] });\n var genFn = (function* () {\n var tick = yield;\n var prevEma;\n while (true) {\n if (prevEma !== undefined && tick !== undefined) {\n prevEma = ((tick - prevEma) * exponent) + prevEma;\n tick = yield prevEma;\n }\n else {\n tick = yield;\n prevEma = sma.nextValue(tick);\n if (prevEma)\n tick = yield prevEma;\n }\n }\n });\n this.generator = genFn();\n this.generator.next();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nEMA.calculate = ema;\nexport function ema(input) {\n Indicator.reverseInputs(input);\n var result = new EMA(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n","\"use strict\";\nimport { Indicator } from '../indicator/indicator';\nimport { LinkedList } from '../Utils/LinkedList';\nexport class WMA extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n this.result = [];\n this.generator = (function* () {\n let data = new LinkedList();\n let denominator = period * (period + 1) / 2;\n while (true) {\n if ((data.length) < period) {\n data.push(yield);\n }\n else {\n data.resetCursor();\n let result = 0;\n for (let i = 1; i <= period; i++) {\n result = result + (data.next() * i / (denominator));\n }\n var next = yield result;\n data.shift();\n data.push(next);\n }\n }\n })();\n this.generator.next();\n priceArray.forEach((tick, index) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n //STEP 5. REMOVE GET RESULT FUNCTION\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nWMA.calculate = wma;\n;\nexport function wma(input) {\n Indicator.reverseInputs(input);\n var result = new WMA(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n","import { Indicator } from '../indicator/indicator';\nimport { SMA } from './SMA';\nexport class WEMA extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n var exponent = 1 / period;\n var sma;\n this.result = [];\n sma = new SMA({ period: period, values: [] });\n var genFn = (function* () {\n var tick = yield;\n var prevEma;\n while (true) {\n if (prevEma !== undefined && tick !== undefined) {\n prevEma = ((tick - prevEma) * exponent) + prevEma;\n tick = yield prevEma;\n }\n else {\n tick = yield;\n prevEma = sma.nextValue(tick);\n if (prevEma !== undefined)\n tick = yield prevEma;\n }\n }\n });\n this.generator = genFn();\n this.generator.next();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nWEMA.calculate = wema;\nexport function wema(input) {\n Indicator.reverseInputs(input);\n var result = new WEMA(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n","/**\n * Created by AAravindan on 5/4/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from './SMA';\nimport { EMA } from './EMA';\nexport class MACDInput extends IndicatorInput {\n constructor(values) {\n super();\n this.values = values;\n this.SimpleMAOscillator = true;\n this.SimpleMASignal = true;\n }\n}\nexport class MACDOutput {\n}\nexport class MACD extends Indicator {\n constructor(input) {\n super(input);\n var oscillatorMAtype = input.SimpleMAOscillator ? SMA : EMA;\n var signalMAtype = input.SimpleMASignal ? SMA : EMA;\n var fastMAProducer = new oscillatorMAtype({ period: input.fastPeriod, values: [], format: (v) => { return v; } });\n var slowMAProducer = new oscillatorMAtype({ period: input.slowPeriod, values: [], format: (v) => { return v; } });\n var signalMAProducer = new signalMAtype({ period: input.signalPeriod, values: [], format: (v) => { return v; } });\n var format = this.format;\n this.result = [];\n this.generator = (function* () {\n var index = 0;\n var tick;\n var MACD, signal, histogram, fast, slow;\n while (true) {\n if (index < input.slowPeriod) {\n tick = yield;\n fast = fastMAProducer.nextValue(tick);\n slow = slowMAProducer.nextValue(tick);\n index++;\n continue;\n }\n if (fast && slow) {\n MACD = fast - slow;\n signal = signalMAProducer.nextValue(MACD);\n }\n histogram = MACD - signal;\n tick = yield ({\n //fast : fast,\n //slow : slow,\n MACD: format(MACD),\n signal: signal ? format(signal) : undefined,\n histogram: isNaN(histogram) ? undefined : format(histogram)\n });\n fast = fastMAProducer.nextValue(tick);\n slow = slowMAProducer.nextValue(tick);\n }\n })();\n this.generator.next();\n input.values.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n return result;\n }\n ;\n}\nMACD.calculate = macd;\nexport function macd(input) {\n Indicator.reverseInputs(input);\n var result = new MACD(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class AvgGainInput extends IndicatorInput {\n}\nexport class AverageGain extends Indicator {\n constructor(input) {\n super(input);\n let values = input.values;\n let period = input.period;\n let format = this.format;\n this.generator = (function* (period) {\n var currentValue = yield;\n var counter = 1;\n var gainSum = 0;\n var avgGain;\n var gain;\n var lastValue = currentValue;\n currentValue = yield;\n while (true) {\n gain = currentValue - lastValue;\n gain = gain > 0 ? gain : 0;\n if (gain > 0) {\n gainSum = gainSum + gain;\n }\n if (counter < period) {\n counter++;\n }\n else if (avgGain === undefined) {\n avgGain = gainSum / period;\n }\n else {\n avgGain = ((avgGain * (period - 1)) + gain) / period;\n }\n lastValue = currentValue;\n avgGain = (avgGain !== undefined) ? format(avgGain) : undefined;\n currentValue = yield avgGain;\n }\n })(period);\n this.generator.next();\n this.result = [];\n values.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nAverageGain.calculate = averagegain;\nexport function averagegain(input) {\n Indicator.reverseInputs(input);\n var result = new AverageGain(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class AvgLossInput extends IndicatorInput {\n}\nexport class AverageLoss extends Indicator {\n constructor(input) {\n super(input);\n let values = input.values;\n let period = input.period;\n let format = this.format;\n this.generator = (function* (period) {\n var currentValue = yield;\n var counter = 1;\n var lossSum = 0;\n var avgLoss;\n var loss;\n var lastValue = currentValue;\n currentValue = yield;\n while (true) {\n loss = lastValue - currentValue;\n loss = loss > 0 ? loss : 0;\n if (loss > 0) {\n lossSum = lossSum + loss;\n }\n if (counter < period) {\n counter++;\n }\n else if (avgLoss === undefined) {\n avgLoss = lossSum / period;\n }\n else {\n avgLoss = ((avgLoss * (period - 1)) + loss) / period;\n }\n lastValue = currentValue;\n avgLoss = (avgLoss !== undefined) ? format(avgLoss) : undefined;\n currentValue = yield avgLoss;\n }\n })(period);\n this.generator.next();\n this.result = [];\n values.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nAverageLoss.calculate = averageloss;\nexport function averageloss(input) {\n Indicator.reverseInputs(input);\n var result = new AverageLoss(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/5/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { AverageGain } from '../Utils/AverageGain';\nimport { AverageLoss } from '../Utils/AverageLoss';\nexport class RSIInput extends IndicatorInput {\n}\nexport class RSI extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var values = input.values;\n var GainProvider = new AverageGain({ period: period, values: [] });\n var LossProvider = new AverageLoss({ period: period, values: [] });\n let count = 1;\n this.generator = (function* (period) {\n var current = yield;\n var lastAvgGain, lastAvgLoss, RS, currentRSI;\n while (true) {\n lastAvgGain = GainProvider.nextValue(current);\n lastAvgLoss = LossProvider.nextValue(current);\n if ((lastAvgGain !== undefined) && (lastAvgLoss !== undefined)) {\n if (lastAvgLoss === 0) {\n currentRSI = 100;\n }\n else if (lastAvgGain === 0) {\n currentRSI = 0;\n }\n else {\n RS = lastAvgGain / lastAvgLoss;\n RS = isNaN(RS) ? 0 : RS;\n currentRSI = parseFloat((100 - (100 / (1 + RS))).toFixed(2));\n }\n }\n count++;\n current = yield currentRSI;\n }\n })(period);\n this.generator.next();\n this.result = [];\n values.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nRSI.calculate = rsi;\nexport function rsi(input) {\n Indicator.reverseInputs(input);\n var result = new RSI(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nimport LinkedList from '../Utils/FixedSizeLinkedList';\n/**\n * Created by AAravindan on 5/7/16.\n */\n\"use strict\";\nexport class SDInput extends IndicatorInput {\n}\n;\nexport class SD extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n var sma = new SMA({ period: period, values: [], format: (v) => { return v; } });\n this.result = [];\n this.generator = (function* () {\n var tick;\n var mean;\n var currentSet = new LinkedList(period);\n ;\n tick = yield;\n var sd;\n while (true) {\n currentSet.push(tick);\n mean = sma.nextValue(tick);\n if (mean) {\n let sum = 0;\n for (let x of currentSet.iterator()) {\n sum = sum + (Math.pow((x - mean), 2));\n }\n sd = Math.sqrt(sum / (period));\n }\n tick = yield sd;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var nextResult = this.generator.next(price);\n if (nextResult.value != undefined)\n return this.format(nextResult.value);\n }\n ;\n}\nSD.calculate = sd;\nexport function sd(input) {\n Indicator.reverseInputs(input);\n var result = new SD(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","\"use strict\";\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nimport { SD } from '../Utils/SD';\nexport class BollingerBandsInput extends IndicatorInput {\n}\n;\nexport class BollingerBandsOutput extends IndicatorInput {\n}\n;\nexport class BollingerBands extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n var stdDev = input.stdDev;\n var format = this.format;\n var sma, sd;\n this.result = [];\n sma = new SMA({ period: period, values: [], format: (v) => { return v; } });\n sd = new SD({ period: period, values: [], format: (v) => { return v; } });\n this.generator = (function* () {\n var result;\n var tick;\n var calcSMA;\n var calcsd;\n tick = yield;\n while (true) {\n calcSMA = sma.nextValue(tick);\n calcsd = sd.nextValue(tick);\n if (calcSMA) {\n let middle = format(calcSMA);\n let upper = format(calcSMA + (calcsd * stdDev));\n let lower = format(calcSMA - (calcsd * stdDev));\n let pb = format((tick - lower) / (upper - lower));\n result = {\n middle: middle,\n upper: upper,\n lower: lower,\n pb: pb\n };\n }\n tick = yield result;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nBollingerBands.calculate = bollingerbands;\nexport function bollingerbands(input) {\n Indicator.reverseInputs(input);\n var result = new BollingerBands(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator } from '../indicator/indicator';\nimport { LinkedList } from '../Utils/LinkedList';\n//STEP3. Add class based syntax with export\nexport class WilderSmoothing extends Indicator {\n constructor(input) {\n super(input);\n this.period = input.period;\n this.price = input.values;\n var genFn = (function* (period) {\n var list = new LinkedList();\n var sum = 0;\n var counter = 1;\n var current = yield;\n var result = 0;\n while (true) {\n if (counter < period) {\n counter++;\n sum = sum + current;\n result = undefined;\n }\n else if (counter == period) {\n counter++;\n sum = sum + current;\n result = sum;\n }\n else {\n result = result - (result / period) + current;\n }\n current = yield result;\n }\n });\n this.generator = genFn(this.period);\n this.generator.next();\n this.result = [];\n this.price.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nWilderSmoothing.calculate = wildersmoothing;\nexport function wildersmoothing(input) {\n Indicator.reverseInputs(input);\n var result = new WilderSmoothing(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n//STEP 6. Run the tests\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/8/16.\n */\n\"use strict\";\nexport class MDMInput extends IndicatorInput {\n}\n;\nexport class MDM extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var format = this.format;\n if (lows.length != highs.length) {\n throw ('Inputs(low,high) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var minusDm;\n var current = yield;\n var last;\n while (true) {\n if (last) {\n let upMove = (current.high - last.high);\n let downMove = (last.low - current.low);\n minusDm = format((downMove > upMove && downMove > 0) ? downMove : 0);\n }\n last = current;\n current = yield minusDm;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index]\n });\n if (result.value !== undefined)\n this.result.push(result.value);\n });\n }\n ;\n static calculate(input) {\n Indicator.reverseInputs(input);\n var result = new MDM(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/8/16.\n */\nexport class PDMInput extends IndicatorInput {\n}\n;\nexport class PDM extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var format = this.format;\n if (lows.length != highs.length) {\n throw ('Inputs(low,high) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var plusDm;\n var current = yield;\n var last;\n while (true) {\n if (last) {\n let upMove = (current.high - last.high);\n let downMove = (last.low - current.low);\n plusDm = format((upMove > downMove && upMove > 0) ? upMove : 0);\n }\n last = current;\n current = yield plusDm;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index]\n });\n if (result.value !== undefined)\n this.result.push(result.value);\n });\n }\n ;\n static calculate(input) {\n Indicator.reverseInputs(input);\n var result = new PDM(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/8/16.\n */\n/**\n * Created by AAravindan on 5/8/16.\n */\n\"use strict\";\nexport class TrueRangeInput extends IndicatorInput {\n}\n;\nexport class TrueRange extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var format = this.format;\n if (lows.length != highs.length) {\n throw ('Inputs(low,high) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var current = yield;\n var previousClose, result;\n while (true) {\n if (previousClose === undefined) {\n previousClose = current.close;\n current = yield result;\n }\n result = Math.max(current.high - current.low, isNaN(Math.abs(current.high - previousClose)) ? 0 : Math.abs(current.high - previousClose), isNaN(Math.abs(current.low - previousClose)) ? 0 : Math.abs(current.low - previousClose));\n previousClose = current.close;\n if (result != undefined) {\n result = format(result);\n }\n current = yield result;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nTrueRange.calculate = truerange;\nexport function truerange(input) {\n Indicator.reverseInputs(input);\n var result = new TrueRange(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { WilderSmoothing } from '../moving_averages/WilderSmoothing';\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { MDM } from './MinusDM';\nimport { PDM } from './PlusDM';\nimport { TrueRange } from './TrueRange';\nimport { WEMA } from '../moving_averages/WEMA';\nexport class ADXInput extends IndicatorInput {\n}\n;\nexport class ADXOutput extends IndicatorInput {\n}\n;\nexport class ADX extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var period = input.period;\n var format = this.format;\n var plusDM = new PDM({\n high: [],\n low: []\n });\n var minusDM = new MDM({\n high: [],\n low: []\n });\n var emaPDM = new WilderSmoothing({ period: period, values: [], format: (v) => { return v; } });\n var emaMDM = new WilderSmoothing({ period: period, values: [], format: (v) => { return v; } });\n var emaTR = new WilderSmoothing({ period: period, values: [], format: (v) => { return v; } });\n var emaDX = new WEMA({ period: period, values: [], format: (v) => { return v; } });\n var tr = new TrueRange({\n low: [],\n high: [],\n close: [],\n });\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n ADXOutput;\n this.generator = (function* () {\n var tick = yield;\n var index = 0;\n var lastATR, lastAPDM, lastAMDM, lastPDI, lastMDI, lastDX, smoothedDX;\n lastATR = 0;\n lastAPDM = 0;\n lastAMDM = 0;\n while (true) {\n let calcTr = tr.nextValue(tick);\n let calcPDM = plusDM.nextValue(tick);\n let calcMDM = minusDM.nextValue(tick);\n if (calcTr === undefined) {\n tick = yield;\n continue;\n }\n let lastATR = emaTR.nextValue(calcTr);\n let lastAPDM = emaPDM.nextValue(calcPDM);\n let lastAMDM = emaMDM.nextValue(calcMDM);\n if ((lastATR != undefined) && (lastAPDM != undefined) && (lastAMDM != undefined)) {\n lastPDI = (lastAPDM) * 100 / lastATR;\n lastMDI = (lastAMDM) * 100 / lastATR;\n let diDiff = Math.abs(lastPDI - lastMDI);\n let diSum = (lastPDI + lastMDI);\n lastDX = (diDiff / diSum) * 100;\n smoothedDX = emaDX.nextValue(lastDX);\n // console.log(tick.high.toFixed(2), tick.low.toFixed(2), tick.close.toFixed(2) , calcTr.toFixed(2), calcPDM.toFixed(2), calcMDM.toFixed(2), lastATR.toFixed(2), lastAPDM.toFixed(2), lastAMDM.toFixed(2), lastPDI.toFixed(2), lastMDI.toFixed(2), diDiff.toFixed(2), diSum.toFixed(2), lastDX.toFixed(2));\n }\n tick = yield { adx: smoothedDX, pdi: lastPDI, mdi: lastMDI };\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value != undefined && result.value.adx != undefined) {\n this.result.push({ adx: format(result.value.adx), pdi: format(result.value.pdi), mdi: format(result.value.mdi) });\n }\n });\n }\n ;\n ;\n nextValue(price) {\n let result = this.generator.next(price).value;\n if (result != undefined && result.adx != undefined) {\n return { adx: this.format(result.adx), pdi: this.format(result.pdi), mdi: this.format(result.mdi) };\n }\n }\n ;\n}\nADX.calculate = adx;\nexport function adx(input) {\n Indicator.reverseInputs(input);\n var result = new ADX(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/8/16.\n */\n\"use strict\";\nimport { WEMA } from '../moving_averages/WEMA';\nimport { TrueRange } from './TrueRange';\nexport class ATRInput extends IndicatorInput {\n}\n;\nexport class ATR extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var period = input.period;\n var format = this.format;\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n var trueRange = new TrueRange({\n low: [],\n high: [],\n close: []\n });\n var wema = new WEMA({ period: period, values: [], format: (v) => { return v; } });\n this.result = [];\n this.generator = (function* () {\n var tick = yield;\n var avgTrueRange, trange;\n ;\n while (true) {\n trange = trueRange.nextValue({\n low: tick.low,\n high: tick.high,\n close: tick.close\n });\n if (trange === undefined) {\n avgTrueRange = undefined;\n }\n else {\n avgTrueRange = wema.nextValue(trange);\n }\n tick = yield avgTrueRange;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value !== undefined) {\n this.result.push(format(result.value));\n }\n });\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nATR.calculate = atr;\nexport function atr(input) {\n Indicator.reverseInputs(input);\n var result = new ATR(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport LinkedList from '../Utils/FixedSizeLinkedList';\nexport class ROCInput extends IndicatorInput {\n}\nexport class ROC extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n this.result = [];\n this.generator = (function* () {\n let index = 1;\n var pastPeriods = new LinkedList(period);\n ;\n var tick = yield;\n var roc;\n while (true) {\n pastPeriods.push(tick);\n if (index < period) {\n index++;\n }\n else {\n roc = ((tick - pastPeriods.lastShift) / (pastPeriods.lastShift)) * 100;\n }\n tick = yield roc;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined && (!isNaN(result.value))) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var nextResult = this.generator.next(price);\n if (nextResult.value != undefined && (!isNaN(nextResult.value))) {\n return this.format(nextResult.value);\n }\n }\n ;\n}\nROC.calculate = roc;\n;\nexport function roc(input) {\n Indicator.reverseInputs(input);\n var result = new ROC(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nimport { ROC } from './ROC';\nexport class KSTInput extends IndicatorInput {\n}\nexport class KSTOutput {\n}\nexport class KST extends Indicator {\n constructor(input) {\n super(input);\n let priceArray = input.values;\n let rocPer1 = input.ROCPer1;\n let rocPer2 = input.ROCPer2;\n let rocPer3 = input.ROCPer3;\n let rocPer4 = input.ROCPer4;\n let smaPer1 = input.SMAROCPer1;\n let smaPer2 = input.SMAROCPer2;\n let smaPer3 = input.SMAROCPer3;\n let smaPer4 = input.SMAROCPer4;\n let signalPeriod = input.signalPeriod;\n let roc1 = new ROC({ period: rocPer1, values: [] });\n let roc2 = new ROC({ period: rocPer2, values: [] });\n let roc3 = new ROC({ period: rocPer3, values: [] });\n let roc4 = new ROC({ period: rocPer4, values: [] });\n let sma1 = new SMA({ period: smaPer1, values: [], format: (v) => { return v; } });\n let sma2 = new SMA({ period: smaPer2, values: [], format: (v) => { return v; } });\n let sma3 = new SMA({ period: smaPer3, values: [], format: (v) => { return v; } });\n let sma4 = new SMA({ period: smaPer4, values: [], format: (v) => { return v; } });\n let signalSMA = new SMA({ period: signalPeriod, values: [], format: (v) => { return v; } });\n var format = this.format;\n this.result = [];\n let firstResult = Math.max(rocPer1 + smaPer1, rocPer2 + smaPer2, rocPer3 + smaPer3, rocPer4 + smaPer4);\n this.generator = (function* () {\n let index = 1;\n let tick = yield;\n let kst;\n let RCMA1, RCMA2, RCMA3, RCMA4, signal, result;\n while (true) {\n let roc1Result = roc1.nextValue(tick);\n let roc2Result = roc2.nextValue(tick);\n let roc3Result = roc3.nextValue(tick);\n let roc4Result = roc4.nextValue(tick);\n RCMA1 = (roc1Result !== undefined) ? sma1.nextValue(roc1Result) : undefined;\n RCMA2 = (roc2Result !== undefined) ? sma2.nextValue(roc2Result) : undefined;\n RCMA3 = (roc3Result !== undefined) ? sma3.nextValue(roc3Result) : undefined;\n RCMA4 = (roc4Result !== undefined) ? sma4.nextValue(roc4Result) : undefined;\n if (index < firstResult) {\n index++;\n }\n else {\n kst = (RCMA1 * 1) + (RCMA2 * 2) + (RCMA3 * 3) + (RCMA4 * 4);\n }\n signal = (kst !== undefined) ? signalSMA.nextValue(kst) : undefined;\n result = kst !== undefined ? {\n kst: format(kst),\n signal: signal ? format(signal) : undefined\n } : undefined;\n tick = yield result;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n let result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n let nextResult = this.generator.next(price);\n if (nextResult.value != undefined)\n return nextResult.value;\n }\n ;\n}\nKST.calculate = kst;\nexport function kst(input) {\n Indicator.reverseInputs(input);\n var result = new KST(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\n\"use strict\";\n/*\n There seems to be a few interpretations of the rules for this regarding which prices.\n I mean the english from which periods are included. The wording does seem to\n introduce some discrepancy so maybe that is why. I want to put the author's\n own description here to reassess this later.\n ----------------------------------------------------------------------------------------\n For the first day of entry the SAR is the previous Significant Point\n\n If long the SP is the lowest price reached while in the previous short trade\n If short the SP is the highest price reached while in the previous long trade\n\n If long:\n Find the difference between the highest price made while in the trade and the SAR for today.\n Multiple the difference by the AF and ADD the result to today's SAR to obtain the SAR for tomorrow.\n Use 0.02 for the first AF and increase it by 0.02 on every day that a new high for the trade is made.\n If a new high is not made continue to use the AF as last increased. Do not increase the AF above .20\n\n Never move the SAR for tomorrow ABOVE the previous day's LOW or today's LOW.\n If the SAR is calculated to be ABOVE the previous day's LOW or today's LOW then use the lower low between today and the previous day as the new SAR.\n Make the next day's calculations based on this SAR.\n\n If short:\n Find the difference between the lowest price made while in the trade and the SAR for today.\n Multiple the difference by the AF and SUBTRACT the result to today's SAR to obtain the SAR for tomorrow.\n Use 0.02 for the first AF and increase it by 0.02 on every day that a new high for the trade is made.\n If a new high is not made continue to use the AF as last increased. Do not increase the AF above .20\n\n Never move the SAR for tomorrow BELOW the previous day's HIGH or today's HIGH.\n If the SAR is calculated to be BELOW the previous day's HIGH or today's HIGH then use the higher high between today and the previous day as the new SAR. Make the next day's calculations based on this SAR.\n ----------------------------------------------------------------------------------------\n*/\nexport class PSARInput extends IndicatorInput {\n}\n;\nexport class PSAR extends Indicator {\n constructor(input) {\n super(input);\n let highs = input.high || [];\n let lows = input.low || [];\n var genFn = function* (step, max) {\n let curr, extreme, sar, furthest;\n let up = true;\n let accel = step;\n let prev = yield;\n while (true) {\n if (curr) {\n sar = sar + accel * (extreme - sar);\n if (up) {\n sar = Math.min(sar, furthest.low, prev.low);\n if (curr.high > extreme) {\n extreme = curr.high;\n accel = Math.min(accel + step, max);\n }\n ;\n }\n else {\n sar = Math.max(sar, furthest.high, prev.high);\n if (curr.low < extreme) {\n extreme = curr.low;\n accel = Math.min(accel + step, max);\n }\n }\n if ((up && curr.low < sar) || (!up && curr.high > sar)) {\n accel = step;\n sar = extreme;\n up = !up;\n extreme = !up ? curr.low : curr.high;\n }\n }\n else {\n // Randomly setup start values? What is the trend on first tick??\n sar = prev.low;\n extreme = prev.high;\n }\n furthest = prev;\n if (curr)\n prev = curr;\n curr = yield sar;\n }\n };\n this.result = [];\n this.generator = genFn(input.step, input.max);\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n });\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(input) {\n let nextResult = this.generator.next(input);\n if (nextResult.value !== undefined)\n return nextResult.value;\n }\n ;\n}\nPSAR.calculate = psar;\nexport function psar(input) {\n Indicator.reverseInputs(input);\n var result = new PSAR(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/10/16.\n */\n\"use strict\";\nimport LinkedList from '../Utils/FixedSizeLinkedList';\nimport { SMA } from '../moving_averages/SMA';\nexport class StochasticInput extends IndicatorInput {\n}\n;\nexport class StochasticOutput {\n}\n;\nexport class Stochastic extends Indicator {\n constructor(input) {\n super(input);\n let lows = input.low;\n let highs = input.high;\n let closes = input.close;\n let period = input.period;\n let signalPeriod = input.signalPeriod;\n let format = this.format;\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n //%K = (Current Close - Lowest Low)/(Highest High - Lowest Low) * 100\n //%D = 3-day SMA of %K\n //\n //Lowest Low = lowest low for the look-back period\n //Highest High = highest high for the look-back period\n //%K is multiplied by 100 to move the decimal point two places\n this.generator = (function* () {\n let index = 1;\n let pastHighPeriods = new LinkedList(period, true, false);\n let pastLowPeriods = new LinkedList(period, false, true);\n let dSma = new SMA({\n period: signalPeriod,\n values: [],\n format: (v) => { return v; }\n });\n let k, d;\n var tick = yield;\n while (true) {\n pastHighPeriods.push(tick.high);\n pastLowPeriods.push(tick.low);\n if (index < period) {\n index++;\n tick = yield;\n continue;\n }\n let periodLow = pastLowPeriods.periodLow;\n k = (tick.close - periodLow) / (pastHighPeriods.periodHigh - periodLow) * 100;\n k = isNaN(k) ? 0 : k; //This happens when the close, high and low are same for the entire period; Bug fix for \n d = dSma.nextValue(k);\n tick = yield {\n k: format(k),\n d: (d !== undefined) ? format(d) : undefined\n };\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(input) {\n let nextResult = this.generator.next(input);\n if (nextResult.value !== undefined)\n return nextResult.value;\n }\n ;\n}\nStochastic.calculate = stochastic;\nexport function stochastic(input) {\n Indicator.reverseInputs(input);\n var result = new Stochastic(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\nimport LinkedList from '../Utils/FixedSizeLinkedList';\nexport class WilliamsRInput extends IndicatorInput {\n}\n;\nexport class WilliamsR extends Indicator {\n constructor(input) {\n super(input);\n let lows = input.low;\n let highs = input.high;\n let closes = input.close;\n let period = input.period;\n let format = this.format;\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n //%R = (Highest High - Close)/(Highest High - Lowest Low) * -100\n //Lowest Low = lowest low for the look-back period\n //Highest High = highest high for the look-back period\n //%R is multiplied by -100 correct the inversion and move the decimal.\n this.generator = (function* () {\n let index = 1;\n let pastHighPeriods = new LinkedList(period, true, false);\n let pastLowPeriods = new LinkedList(period, false, true);\n let periodLow;\n let periodHigh;\n var tick = yield;\n let williamsR;\n while (true) {\n pastHighPeriods.push(tick.high);\n pastLowPeriods.push(tick.low);\n if (index < period) {\n index++;\n tick = yield;\n continue;\n }\n periodLow = pastLowPeriods.periodLow;\n periodHigh = pastHighPeriods.periodHigh;\n williamsR = format((periodHigh - tick.close) / (periodHigh - periodLow) * -100);\n tick = yield williamsR;\n }\n })();\n this.generator.next();\n lows.forEach((low, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n var nextResult = this.generator.next(price);\n if (nextResult.value != undefined)\n return this.format(nextResult.value);\n }\n ;\n}\nWilliamsR.calculate = williamsr;\nexport function williamsr(input) {\n Indicator.reverseInputs(input);\n var result = new WilliamsR(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/17/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class ADLInput extends IndicatorInput {\n}\nexport class ADL extends Indicator {\n constructor(input) {\n super(input);\n var highs = input.high;\n var lows = input.low;\n var closes = input.close;\n var volumes = input.volume;\n if (!((lows.length === highs.length) && (highs.length === closes.length) && (highs.length === volumes.length))) {\n throw ('Inputs(low,high, close, volumes) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var result = 0;\n var tick;\n tick = yield;\n while (true) {\n let moneyFlowMultiplier = ((tick.close - tick.low) - (tick.high - tick.close)) / (tick.high - tick.low);\n moneyFlowMultiplier = isNaN(moneyFlowMultiplier) ? 1 : moneyFlowMultiplier;\n let moneyFlowVolume = moneyFlowMultiplier * tick.volume;\n result = result + moneyFlowVolume;\n tick = yield Math.round(result);\n }\n })();\n this.generator.next();\n highs.forEach((tickHigh, index) => {\n var tickInput = {\n high: tickHigh,\n low: lows[index],\n close: closes[index],\n volume: volumes[index]\n };\n var result = this.generator.next(tickInput);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nADL.calculate = adl;\nexport function adl(input) {\n Indicator.reverseInputs(input);\n var result = new ADL(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/17/16.\n */\n\"use strict\";\nexport class OBVInput extends IndicatorInput {\n}\nexport class OBV extends Indicator {\n constructor(input) {\n super(input);\n var closes = input.close;\n var volumes = input.volume;\n this.result = [];\n this.generator = (function* () {\n var result = 0;\n var tick;\n var lastClose;\n tick = yield;\n if (tick.close && (typeof tick.close === 'number')) {\n lastClose = tick.close;\n tick = yield;\n }\n while (true) {\n if (lastClose < tick.close) {\n result = result + tick.volume;\n }\n else if (tick.close < lastClose) {\n result = result - tick.volume;\n }\n lastClose = tick.close;\n tick = yield result;\n }\n })();\n this.generator.next();\n closes.forEach((close, index) => {\n let tickInput = {\n close: closes[index],\n volume: volumes[index]\n };\n let result = this.generator.next(tickInput);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nOBV.calculate = obv;\nexport function obv(input) {\n Indicator.reverseInputs(input);\n var result = new OBV(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/9/16.\n */\n\"use strict\";\nimport { ROC } from './ROC.js';\nimport { EMA } from '../moving_averages/EMA.js';\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class TRIXInput extends IndicatorInput {\n}\n;\nexport class TRIX extends Indicator {\n constructor(input) {\n super(input);\n let priceArray = input.values;\n let period = input.period;\n let format = this.format;\n let ema = new EMA({ period: period, values: [], format: (v) => { return v; } });\n let emaOfema = new EMA({ period: period, values: [], format: (v) => { return v; } });\n let emaOfemaOfema = new EMA({ period: period, values: [], format: (v) => { return v; } });\n let trixROC = new ROC({ period: 1, values: [], format: (v) => { return v; } });\n this.result = [];\n this.generator = (function* () {\n let tick = yield;\n while (true) {\n let initialema = ema.nextValue(tick);\n let smoothedResult = initialema ? emaOfema.nextValue(initialema) : undefined;\n let doubleSmoothedResult = smoothedResult ? emaOfemaOfema.nextValue(smoothedResult) : undefined;\n let result = doubleSmoothedResult ? trixROC.nextValue(doubleSmoothedResult) : undefined;\n tick = yield result ? format(result) : undefined;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n let result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n let nextResult = this.generator.next(price);\n if (nextResult.value !== undefined)\n return nextResult.value;\n }\n ;\n}\nTRIX.calculate = trix;\nexport function trix(input) {\n Indicator.reverseInputs(input);\n var result = new TRIX(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { EMA } from '../moving_averages/EMA';\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class ForceIndexInput extends IndicatorInput {\n constructor() {\n super(...arguments);\n this.period = 1;\n }\n}\n;\nexport class ForceIndex extends Indicator {\n constructor(input) {\n super(input);\n var closes = input.close;\n var volumes = input.volume;\n var period = input.period || 1;\n if (!((volumes.length === closes.length))) {\n throw ('Inputs(volume, close) not of equal size');\n }\n let emaForceIndex = new EMA({ values: [], period: period });\n this.result = [];\n this.generator = (function* () {\n var previousTick = yield;\n var tick = yield;\n let forceIndex;\n while (true) {\n forceIndex = (tick.close - previousTick.close) * tick.volume;\n previousTick = tick;\n tick = yield emaForceIndex.nextValue(forceIndex);\n }\n })();\n this.generator.next();\n volumes.forEach((tick, index) => {\n var result = this.generator.next({\n close: closes[index],\n volume: volumes[index]\n });\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n ;\n nextValue(price) {\n let result = this.generator.next(price).value;\n if (result != undefined) {\n return result;\n }\n }\n ;\n}\nForceIndex.calculate = forceindex;\nexport function forceindex(input) {\n Indicator.reverseInputs(input);\n var result = new ForceIndex(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nimport LinkedList from '../Utils/FixedSizeLinkedList';\nexport class CCIInput extends IndicatorInput {\n}\n;\nexport class CCI extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var period = input.period;\n var format = this.format;\n let constant = .015;\n var currentTpSet = new LinkedList(period);\n ;\n var tpSMACalculator = new SMA({ period: period, values: [], format: (v) => { return v; } });\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var tick = yield;\n while (true) {\n let tp = (tick.high + tick.low + tick.close) / 3;\n currentTpSet.push(tp);\n let smaTp = tpSMACalculator.nextValue(tp);\n let meanDeviation = null;\n let cci;\n let sum = 0;\n if (smaTp != undefined) {\n //First, subtract the most recent 20-period average of the typical price from each period's typical price. \n //Second, take the absolute values of these numbers.\n //Third,sum the absolute values. \n for (let x of currentTpSet.iterator()) {\n sum = sum + (Math.abs(x - smaTp));\n }\n //Fourth, divide by the total number of periods (20). \n meanDeviation = sum / 20;\n cci = (tp - smaTp) / (constant * meanDeviation);\n }\n tick = yield cci;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n ;\n nextValue(price) {\n let result = this.generator.next(price).value;\n if (result != undefined) {\n return result;\n }\n }\n ;\n}\nCCI.calculate = cci;\nexport function cci(input) {\n Indicator.reverseInputs(input);\n var result = new CCI(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nexport class AwesomeOscillatorInput extends IndicatorInput {\n}\nexport class AwesomeOscillator extends Indicator {\n constructor(input) {\n super(input);\n var highs = input.high;\n var lows = input.low;\n var fastPeriod = input.fastPeriod;\n var slowPeriod = input.slowPeriod;\n var slowSMA = new SMA({ values: [], period: slowPeriod });\n var fastSMA = new SMA({ values: [], period: fastPeriod });\n this.result = [];\n this.generator = (function* () {\n var result;\n var tick;\n var medianPrice;\n var slowSmaValue;\n var fastSmaValue;\n tick = yield;\n while (true) {\n medianPrice = (tick.high + tick.low) / 2;\n slowSmaValue = slowSMA.nextValue(medianPrice);\n fastSmaValue = fastSMA.nextValue(medianPrice);\n if (slowSmaValue !== undefined && fastSmaValue !== undefined) {\n result = fastSmaValue - slowSmaValue;\n }\n tick = yield result;\n }\n })();\n this.generator.next();\n highs.forEach((tickHigh, index) => {\n var tickInput = {\n high: tickHigh,\n low: lows[index],\n };\n var result = this.generator.next(tickInput);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return this.format(result.value);\n }\n }\n ;\n}\nAwesomeOscillator.calculate = awesomeoscillator;\nexport function awesomeoscillator(input) {\n Indicator.reverseInputs(input);\n var result = new AwesomeOscillator(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class VWAPInput extends IndicatorInput {\n}\n;\nexport class VWAP extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var volumes = input.volume;\n var format = this.format;\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var tick = yield;\n let cumulativeTotal = 0;\n let cumulativeVolume = 0;\n while (true) {\n let typicalPrice = (tick.high + tick.low + tick.close) / 3;\n let total = tick.volume * typicalPrice;\n cumulativeTotal = cumulativeTotal + total;\n cumulativeVolume = cumulativeVolume + tick.volume;\n tick = yield cumulativeTotal / cumulativeVolume;\n ;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index],\n volume: volumes[index]\n });\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n ;\n nextValue(price) {\n let result = this.generator.next(price).value;\n if (result != undefined) {\n return result;\n }\n }\n ;\n}\nVWAP.calculate = vwap;\nexport function vwap(input) {\n Indicator.reverseInputs(input);\n var result = new VWAP(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class VolumeProfileInput extends IndicatorInput {\n}\nexport class VolumeProfileOutput {\n}\nexport function priceFallsBetweenBarRange(low, high, low1, high1) {\n return (low <= low1 && high >= low1) || (low1 <= low && high1 >= low);\n}\nexport class VolumeProfile extends Indicator {\n constructor(input) {\n super(input);\n var highs = input.high;\n var lows = input.low;\n var closes = input.close;\n var opens = input.open;\n var volumes = input.volume;\n var bars = input.noOfBars;\n if (!((lows.length === highs.length) && (highs.length === closes.length) && (highs.length === volumes.length))) {\n throw ('Inputs(low,high, close, volumes) not of equal size');\n }\n this.result = [];\n var max = Math.max(...highs, ...lows, ...closes, ...opens);\n var min = Math.min(...highs, ...lows, ...closes, ...opens);\n var barRange = (max - min) / bars;\n var lastEnd = min;\n for (let i = 0; i < bars; i++) {\n let rangeStart = lastEnd;\n let rangeEnd = rangeStart + barRange;\n lastEnd = rangeEnd;\n let bullishVolume = 0;\n let bearishVolume = 0;\n let totalVolume = 0;\n for (let priceBar = 0; priceBar < highs.length; priceBar++) {\n let priceBarStart = lows[priceBar];\n let priceBarEnd = highs[priceBar];\n let priceBarOpen = opens[priceBar];\n let priceBarClose = closes[priceBar];\n let priceBarVolume = volumes[priceBar];\n if (priceFallsBetweenBarRange(rangeStart, rangeEnd, priceBarStart, priceBarEnd)) {\n totalVolume = totalVolume + priceBarVolume;\n if (priceBarOpen > priceBarClose) {\n bearishVolume = bearishVolume + priceBarVolume;\n }\n else {\n bullishVolume = bullishVolume + priceBarVolume;\n }\n }\n }\n this.result.push({\n rangeStart, rangeEnd, bullishVolume, bearishVolume, totalVolume\n });\n }\n }\n ;\n nextValue(price) {\n throw ('Next value not supported for volume profile');\n }\n ;\n}\nVolumeProfile.calculate = volumeprofile;\nexport function volumeprofile(input) {\n Indicator.reverseInputs(input);\n var result = new VolumeProfile(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/4/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class TypicalPriceInput extends IndicatorInput {\n}\nexport class TypicalPrice extends Indicator {\n constructor(input) {\n super(input);\n this.result = [];\n this.generator = (function* () {\n let priceInput = yield;\n while (true) {\n priceInput = yield (priceInput.high + priceInput.low + priceInput.close) / 3;\n }\n })();\n this.generator.next();\n input.low.forEach((tick, index) => {\n var result = this.generator.next({\n high: input.high[index],\n low: input.low[index],\n close: input.close[index],\n });\n this.result.push(result.value);\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n return result;\n }\n ;\n}\nTypicalPrice.calculate = typicalprice;\nexport function typicalprice(input) {\n Indicator.reverseInputs(input);\n var result = new TypicalPrice(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/17/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { TypicalPrice } from '../chart_types/TypicalPrice';\nimport FixedSizeLinkedList from '../Utils/FixedSizeLinkedList';\nexport class MFIInput extends IndicatorInput {\n}\nexport class MFI extends Indicator {\n constructor(input) {\n super(input);\n var highs = input.high;\n var lows = input.low;\n var closes = input.close;\n var volumes = input.volume;\n var period = input.period;\n var typicalPrice = new TypicalPrice({ low: [], high: [], close: [] });\n var positiveFlow = new FixedSizeLinkedList(period, false, false, true);\n var negativeFlow = new FixedSizeLinkedList(period, false, false, true);\n if (!((lows.length === highs.length) && (highs.length === closes.length) && (highs.length === volumes.length))) {\n throw ('Inputs(low,high, close, volumes) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var result;\n var tick;\n var lastClose;\n var positiveFlowForPeriod;\n var rawMoneyFlow = 0;\n var moneyFlowRatio;\n var negativeFlowForPeriod;\n let typicalPriceValue = null;\n let prevousTypicalPrice = null;\n tick = yield;\n lastClose = tick.close; //Fist value \n tick = yield;\n while (true) {\n var { high, low, close, volume } = tick;\n var positionMoney = 0;\n var negativeMoney = 0;\n typicalPriceValue = typicalPrice.nextValue({ high, low, close });\n rawMoneyFlow = typicalPriceValue * volume;\n if ((typicalPriceValue != null) && (prevousTypicalPrice != null)) {\n typicalPriceValue > prevousTypicalPrice ? positionMoney = rawMoneyFlow : negativeMoney = rawMoneyFlow;\n positiveFlow.push(positionMoney);\n negativeFlow.push(negativeMoney);\n positiveFlowForPeriod = positiveFlow.periodSum;\n negativeFlowForPeriod = negativeFlow.periodSum;\n if ((positiveFlow.totalPushed >= period) && (positiveFlow.totalPushed >= period)) {\n moneyFlowRatio = positiveFlowForPeriod / negativeFlowForPeriod;\n result = 100 - 100 / (1 + moneyFlowRatio);\n }\n }\n prevousTypicalPrice = typicalPriceValue;\n tick = yield result;\n }\n })();\n this.generator.next();\n highs.forEach((tickHigh, index) => {\n var tickInput = {\n high: tickHigh,\n low: lows[index],\n close: closes[index],\n volume: volumes[index]\n };\n var result = this.generator.next(tickInput);\n if (result.value != undefined) {\n this.result.push(parseFloat(result.value.toFixed(2)));\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return (parseFloat(result.value.toFixed(2)));\n }\n }\n ;\n}\nMFI.calculate = mfi;\nexport function mfi(input) {\n Indicator.reverseInputs(input);\n var result = new MFI(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/10/16.\n */\n\"use strict\";\nimport { SMA } from '../moving_averages/SMA';\nimport { RSI } from '../oscillators/RSI';\nimport { Stochastic } from '../momentum/Stochastic';\nexport class StochasticRsiInput extends IndicatorInput {\n}\n;\nexport class StochasticRSIOutput {\n}\n;\nexport class StochasticRSI extends Indicator {\n constructor(input) {\n super(input);\n let closes = input.values;\n let rsiPeriod = input.rsiPeriod;\n let stochasticPeriod = input.stochasticPeriod;\n let kPeriod = input.kPeriod;\n let dPeriod = input.dPeriod;\n let format = this.format;\n this.result = [];\n this.generator = (function* () {\n let index = 1;\n let rsi = new RSI({ period: rsiPeriod, values: [] });\n let stochastic = new Stochastic({ period: stochasticPeriod, high: [], low: [], close: [], signalPeriod: kPeriod });\n let dSma = new SMA({\n period: dPeriod,\n values: [],\n format: (v) => { return v; }\n });\n let lastRSI, stochasticRSI, d, result;\n var tick = yield;\n while (true) {\n lastRSI = rsi.nextValue(tick);\n if (lastRSI !== undefined) {\n var stochasticInput = { high: lastRSI, low: lastRSI, close: lastRSI };\n stochasticRSI = stochastic.nextValue(stochasticInput);\n if (stochasticRSI !== undefined && stochasticRSI.d !== undefined) {\n d = dSma.nextValue(stochasticRSI.d);\n if (d !== undefined)\n result = {\n stochRSI: stochasticRSI.k,\n k: stochasticRSI.d,\n d: d\n };\n }\n }\n tick = yield result;\n }\n })();\n this.generator.next();\n closes.forEach((tick, index) => {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(input) {\n let nextResult = this.generator.next(input);\n if (nextResult.value !== undefined)\n return nextResult.value;\n }\n ;\n}\nStochasticRSI.calculate = stochasticrsi;\nexport function stochasticrsi(input) {\n Indicator.reverseInputs(input);\n var result = new StochasticRSI(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport FixedSizedLinkedList from './FixedSizeLinkedList';\nexport class HighestInput extends IndicatorInput {\n}\nexport class Highest extends Indicator {\n constructor(input) {\n super(input);\n var values = input.values;\n var period = input.period;\n this.result = [];\n var periodList = new FixedSizedLinkedList(period, true, false, false);\n this.generator = (function* () {\n var result;\n var tick;\n var high;\n tick = yield;\n while (true) {\n periodList.push(tick);\n if (periodList.totalPushed >= period) {\n high = periodList.periodHigh;\n }\n tick = yield high;\n }\n })();\n this.generator.next();\n values.forEach((value, index) => {\n var result = this.generator.next(value);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return result.value;\n }\n }\n ;\n}\nHighest.calculate = highest;\nexport function highest(input) {\n Indicator.reverseInputs(input);\n var result = new Highest(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport FixedSizedLinkedList from './FixedSizeLinkedList';\nexport class LowestInput extends IndicatorInput {\n}\nexport class Lowest extends Indicator {\n constructor(input) {\n super(input);\n var values = input.values;\n var period = input.period;\n this.result = [];\n var periodList = new FixedSizedLinkedList(period, false, true, false);\n this.generator = (function* () {\n var result;\n var tick;\n var high;\n tick = yield;\n while (true) {\n periodList.push(tick);\n if (periodList.totalPushed >= period) {\n high = periodList.periodLow;\n }\n tick = yield high;\n }\n })();\n this.generator.next();\n values.forEach((value, index) => {\n var result = this.generator.next(value);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return result.value;\n }\n }\n ;\n}\nLowest.calculate = lowest;\nexport function lowest(input) {\n Indicator.reverseInputs(input);\n var result = new Lowest(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport FixedSizedLinkedList from './FixedSizeLinkedList';\nexport class SumInput extends IndicatorInput {\n}\nexport class Sum extends Indicator {\n constructor(input) {\n super(input);\n var values = input.values;\n var period = input.period;\n this.result = [];\n var periodList = new FixedSizedLinkedList(period, false, false, true);\n this.generator = (function* () {\n var result;\n var tick;\n var high;\n tick = yield;\n while (true) {\n periodList.push(tick);\n if (periodList.totalPushed >= period) {\n high = periodList.periodSum;\n }\n tick = yield high;\n }\n })();\n this.generator.next();\n values.forEach((value, index) => {\n var result = this.generator.next(value);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return result.value;\n }\n }\n ;\n}\nSum.calculate = sum;\nexport function sum(input) {\n Indicator.reverseInputs(input);\n var result = new Sum(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { CandleList } from '../StockData';\nimport { atr } from '../directionalmovement/ATR';\n/**\n * Created by AAravindan on 5/4/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class RenkoInput extends IndicatorInput {\n}\nclass Renko extends Indicator {\n constructor(input) {\n super(input);\n var format = this.format;\n let useATR = input.useATR;\n let brickSize = input.brickSize || 0;\n if (useATR) {\n let atrResult = atr(Object.assign({}, input));\n brickSize = atrResult[atrResult.length - 1];\n }\n this.result = new CandleList();\n ;\n if (brickSize === 0) {\n console.error('Not enough data to calculate brickSize for renko when using ATR');\n return;\n }\n let lastOpen = 0;\n let lastHigh = 0;\n let lastLow = Infinity;\n let lastClose = 0;\n let lastVolume = 0;\n let lastTimestamp = 0;\n this.generator = (function* () {\n let candleData = yield;\n while (true) {\n //Calculating first bar\n if (lastOpen === 0) {\n lastOpen = candleData.close;\n lastHigh = candleData.high;\n lastLow = candleData.low;\n lastClose = candleData.close;\n lastVolume = candleData.volume;\n lastTimestamp = candleData.timestamp;\n candleData = yield;\n continue;\n }\n let absoluteMovementFromClose = Math.abs(candleData.close - lastClose);\n let absoluteMovementFromOpen = Math.abs(candleData.close - lastOpen);\n if ((absoluteMovementFromClose >= brickSize) && (absoluteMovementFromOpen >= brickSize)) {\n let reference = absoluteMovementFromClose > absoluteMovementFromOpen ? lastOpen : lastClose;\n let calculated = {\n open: reference,\n high: lastHigh > candleData.high ? lastHigh : candleData.high,\n low: lastLow < candleData.Low ? lastLow : candleData.low,\n close: reference > candleData.close ? (reference - brickSize) : (reference + brickSize),\n volume: lastVolume + candleData.volume,\n timestamp: candleData.timestamp\n };\n lastOpen = calculated.open;\n lastHigh = calculated.close;\n lastLow = calculated.close;\n lastClose = calculated.close;\n lastVolume = 0;\n candleData = yield calculated;\n }\n else {\n lastHigh = lastHigh > candleData.high ? lastHigh : candleData.high;\n lastLow = lastLow < candleData.Low ? lastLow : candleData.low;\n lastVolume = lastVolume + candleData.volume;\n lastTimestamp = candleData.timestamp;\n candleData = yield;\n }\n }\n })();\n this.generator.next();\n input.low.forEach((tick, index) => {\n var result = this.generator.next({\n open: input.open[index],\n high: input.high[index],\n low: input.low[index],\n close: input.close[index],\n volume: input.volume[index],\n timestamp: input.timestamp[index]\n });\n if (result.value) {\n this.result.open.push(result.value.open);\n this.result.high.push(result.value.high);\n this.result.low.push(result.value.low);\n this.result.close.push(result.value.close);\n this.result.volume.push(result.value.volume);\n this.result.timestamp.push(result.value.timestamp);\n }\n });\n }\n nextValue(price) {\n console.error('Cannot calculate next value on Renko, Every value has to be recomputed for every change, use calcualte method');\n return null;\n }\n ;\n}\nRenko.calculate = renko;\nexport function renko(input) {\n Indicator.reverseInputs(input);\n var result = new Renko(input).result;\n if (input.reversedInput) {\n result.open.reverse();\n result.high.reverse();\n result.low.reverse();\n result.close.reverse();\n result.volume.reverse();\n result.timestamp.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { CandleList } from '../StockData';\n/**\n * Created by AAravindan on 5/4/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class HeikinAshiInput extends IndicatorInput {\n}\nexport class HeikinAshi extends Indicator {\n constructor(input) {\n super(input);\n var format = this.format;\n this.result = new CandleList();\n let lastOpen = null;\n let lastHigh = 0;\n let lastLow = Infinity;\n let lastClose = 0;\n let lastVolume = 0;\n let lastTimestamp = 0;\n this.generator = (function* () {\n let candleData = yield;\n let calculated = null;\n while (true) {\n if (lastOpen === null) {\n lastOpen = (candleData.close + candleData.open) / 2;\n lastHigh = candleData.high;\n lastLow = candleData.low;\n lastClose = (candleData.close + candleData.open + candleData.high + candleData.low) / 4;\n lastVolume = (candleData.volume || 0);\n lastTimestamp = (candleData.timestamp || 0);\n calculated = {\n open: lastOpen,\n high: lastHigh,\n low: lastLow,\n close: lastClose,\n volume: candleData.volume || 0,\n timestamp: (candleData.timestamp || 0)\n };\n }\n else {\n let newClose = (candleData.close + candleData.open + candleData.high + candleData.low) / 4;\n let newOpen = (lastOpen + lastClose) / 2;\n let newHigh = Math.max(newOpen, newClose, candleData.high);\n let newLow = Math.min(candleData.low, newOpen, newClose);\n calculated = {\n close: newClose,\n open: newOpen,\n high: newHigh,\n low: newLow,\n volume: (candleData.volume || 0),\n timestamp: (candleData.timestamp || 0)\n };\n lastClose = newClose;\n lastOpen = newOpen;\n lastHigh = newHigh;\n lastLow = newLow;\n }\n candleData = yield calculated;\n }\n })();\n this.generator.next();\n input.low.forEach((tick, index) => {\n var result = this.generator.next({\n open: input.open[index],\n high: input.high[index],\n low: input.low[index],\n close: input.close[index],\n volume: input.volume ? input.volume[index] : input.volume,\n timestamp: input.timestamp ? input.timestamp[index] : input.timestamp\n });\n if (result.value) {\n this.result.open.push(result.value.open);\n this.result.high.push(result.value.high);\n this.result.low.push(result.value.low);\n this.result.close.push(result.value.close);\n this.result.volume.push(result.value.volume);\n this.result.timestamp.push(result.value.timestamp);\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n return result;\n }\n ;\n}\nHeikinAshi.calculate = heikinashi;\nexport function heikinashi(input) {\n Indicator.reverseInputs(input);\n var result = new HeikinAshi(input).result;\n if (input.reversedInput) {\n result.open.reverse();\n result.high.reverse();\n result.low.reverse();\n result.close.reverse();\n result.volume.reverse();\n result.timestamp.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","export default class CandlestickFinder {\n constructor() {\n // if (new.target === Abstract) {\n // throw new TypeError(\"Abstract class\");\n // }\n }\n approximateEqual(a, b) {\n let left = parseFloat(Math.abs(a - b).toPrecision(4)) * 1;\n let right = parseFloat((a * 0.001).toPrecision(4)) * 1;\n return left <= right;\n }\n logic(data) {\n throw \"this has to be implemented\";\n }\n getAllPatternIndex(data) {\n if (data.close.length < this.requiredCount) {\n console.warn('Data count less than data required for the strategy ', this.name);\n return [];\n }\n if (data.reversedInput) {\n data.open.reverse();\n data.high.reverse();\n data.low.reverse();\n data.close.reverse();\n }\n let strategyFn = this.logic;\n return this._generateDataForCandleStick(data)\n .map((current, index) => {\n return strategyFn.call(this, current) ? index : undefined;\n }).filter((hasIndex) => {\n return hasIndex;\n });\n }\n hasPattern(data) {\n if (data.close.length < this.requiredCount) {\n console.warn('Data count less than data required for the strategy ', this.name);\n return false;\n }\n if (data.reversedInput) {\n data.open.reverse();\n data.high.reverse();\n data.low.reverse();\n data.close.reverse();\n }\n let strategyFn = this.logic;\n return strategyFn.call(this, this._getLastDataForCandleStick(data));\n }\n _getLastDataForCandleStick(data) {\n let requiredCount = this.requiredCount;\n if (data.close.length === requiredCount) {\n return data;\n }\n else {\n let returnVal = {\n open: [],\n high: [],\n low: [],\n close: []\n };\n let i = 0;\n let index = data.close.length - requiredCount;\n while (i < requiredCount) {\n returnVal.open.push(data.open[index + i]);\n returnVal.high.push(data.high[index + i]);\n returnVal.low.push(data.low[index + i]);\n returnVal.close.push(data.close[index + i]);\n i++;\n }\n return returnVal;\n }\n }\n _generateDataForCandleStick(data) {\n let requiredCount = this.requiredCount;\n let generatedData = data.close.map(function (currentData, index) {\n let i = 0;\n let returnVal = {\n open: [],\n high: [],\n low: [],\n close: []\n };\n while (i < requiredCount) {\n returnVal.open.push(data.open[index + i]);\n returnVal.high.push(data.high[index + i]);\n returnVal.low.push(data.low[index + i]);\n returnVal.close.push(data.close[index + i]);\n i++;\n }\n return returnVal;\n }).filter((val, index) => { return (index <= (data.close.length - requiredCount)); });\n return generatedData;\n }\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class MorningStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'MorningStar';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let isSmallBodyExists = ((firstdaysLow > seconddaysLow) &&\n (firstdaysLow > seconddaysHigh));\n let isThirdBullish = thirddaysOpen < thirddaysClose;\n let gapExists = ((seconddaysHigh < firstdaysLow) &&\n (seconddaysLow < firstdaysLow) &&\n (thirddaysOpen > seconddaysHigh) &&\n (seconddaysClose < thirddaysOpen));\n let doesCloseAboveFirstMidpoint = thirddaysClose > firstdaysMidpoint;\n return (isFirstBearish && isSmallBodyExists && gapExists && isThirdBullish && doesCloseAboveFirstMidpoint);\n }\n}\nexport function morningstar(data) {\n return new MorningStar().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishEngulfingPattern extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishEngulfingPattern';\n this.requiredCount = 2;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBullishEngulfing = ((firstdaysClose < firstdaysOpen) &&\n (firstdaysOpen > seconddaysOpen) &&\n (firstdaysClose > seconddaysOpen) &&\n (firstdaysOpen < seconddaysClose));\n return (isBullishEngulfing);\n }\n}\nexport function bullishengulfingpattern(data) {\n return new BullishEngulfingPattern().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishHarami extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = \"BullishHarami\";\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBullishHaramiPattern = ((firstdaysOpen > seconddaysOpen) &&\n (firstdaysClose < seconddaysOpen) &&\n (firstdaysClose < seconddaysClose) &&\n (firstdaysOpen > seconddaysLow) &&\n (firstdaysHigh > seconddaysHigh));\n return (isBullishHaramiPattern);\n }\n}\nexport function bullishharami(data) {\n return new BullishHarami().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishHaramiCross extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = 'BullishHaramiCross';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBullishHaramiCrossPattern = ((firstdaysOpen > seconddaysOpen) &&\n (firstdaysClose < seconddaysOpen) &&\n (firstdaysClose < seconddaysClose) &&\n (firstdaysOpen > seconddaysLow) &&\n (firstdaysHigh > seconddaysHigh));\n let isSecondDayDoji = this.approximateEqual(seconddaysOpen, seconddaysClose);\n return (isBullishHaramiCrossPattern && isSecondDayDoji);\n }\n}\nexport function bullishharamicross(data) {\n return new BullishHaramiCross().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class Doji extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'Doji';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isOpenEqualsClose = this.approximateEqual(daysOpen, daysClose);\n let isHighEqualsOpen = isOpenEqualsClose && this.approximateEqual(daysOpen, daysHigh);\n let isLowEqualsClose = isOpenEqualsClose && this.approximateEqual(daysClose, daysLow);\n return (isOpenEqualsClose && isHighEqualsOpen == isLowEqualsClose);\n }\n}\nexport function doji(data) {\n return new Doji().hasPattern(data);\n}\n","import Doji from './Doji';\nimport CandlestickFinder from './CandlestickFinder';\nexport default class MorningDojiStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'MorningDojiStar';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let dojiExists = new Doji().hasPattern({\n \"open\": [seconddaysOpen],\n \"close\": [seconddaysClose],\n \"high\": [seconddaysHigh],\n \"low\": [seconddaysLow]\n });\n let isThirdBullish = thirddaysOpen < thirddaysClose;\n let gapExists = ((seconddaysHigh < firstdaysLow) &&\n (seconddaysLow < firstdaysLow) &&\n (thirddaysOpen > seconddaysHigh) &&\n (seconddaysClose < thirddaysOpen));\n let doesCloseAboveFirstMidpoint = thirddaysClose > firstdaysMidpoint;\n return (isFirstBearish && dojiExists && isThirdBullish && gapExists &&\n doesCloseAboveFirstMidpoint);\n }\n}\nexport function morningdojistar(data) {\n return new MorningDojiStar().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class DownsideTasukiGap extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 3;\n this.name = 'DownsideTasukiGap';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let isSecondBearish = seconddaysClose < seconddaysOpen;\n let isThirdBullish = thirddaysClose > thirddaysOpen;\n let isFirstGapExists = seconddaysHigh < firstdaysLow;\n let isDownsideTasukiGap = ((seconddaysOpen > thirddaysOpen) &&\n (seconddaysClose < thirddaysOpen) &&\n (thirddaysClose > seconddaysOpen) &&\n (thirddaysClose < firstdaysClose));\n return (isFirstBearish && isSecondBearish && isThirdBullish && isFirstGapExists && isDownsideTasukiGap);\n }\n}\nexport function downsidetasukigap(data) {\n return new DownsideTasukiGap().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishMarubozu extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishMarubozu';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBullishMarbozu = this.approximateEqual(daysClose, daysHigh) &&\n this.approximateEqual(daysLow, daysOpen) &&\n daysOpen < daysClose &&\n daysOpen < daysHigh;\n return (isBullishMarbozu);\n }\n}\nexport function bullishmarubozu(data) {\n return new BullishMarubozu().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class PiercingLine extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = 'PiercingLine';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isDowntrend = seconddaysLow < firstdaysLow;\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let isSecondBullish = seconddaysClose > seconddaysOpen;\n let isPiercingLinePattern = ((firstdaysLow > seconddaysOpen) &&\n (seconddaysClose > firstdaysMidpoint));\n return (isDowntrend && isFirstBearish && isPiercingLinePattern && isSecondBullish);\n }\n}\nexport function piercingline(data) {\n return new PiercingLine().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class ThreeWhiteSoldiers extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'ThreeWhiteSoldiers';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let isUpTrend = seconddaysHigh > firstdaysHigh &&\n thirddaysHigh > seconddaysHigh;\n let isAllBullish = firstdaysOpen < firstdaysClose &&\n seconddaysOpen < seconddaysClose &&\n thirddaysOpen < thirddaysClose;\n let doesOpenWithinPreviousBody = firstdaysClose > seconddaysOpen &&\n seconddaysOpen < firstdaysHigh &&\n seconddaysHigh > thirddaysOpen &&\n thirddaysOpen < seconddaysClose;\n return (isUpTrend && isAllBullish && doesOpenWithinPreviousBody);\n }\n}\nexport function threewhitesoldiers(data) {\n return new ThreeWhiteSoldiers().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishHammerStick extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishHammerStick';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBullishHammer = daysClose > daysOpen;\n isBullishHammer = isBullishHammer && this.approximateEqual(daysClose, daysHigh);\n isBullishHammer = isBullishHammer && (daysClose - daysOpen) <= 2 * (daysOpen - daysLow);\n return isBullishHammer;\n }\n}\nexport function bullishhammerstick(data) {\n return new BullishHammerStick().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishInvertedHammerStick extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishInvertedHammerStick';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBullishInvertedHammer = daysClose > daysOpen;\n isBullishInvertedHammer = isBullishInvertedHammer && this.approximateEqual(daysOpen, daysLow);\n isBullishInvertedHammer = isBullishInvertedHammer && (daysClose - daysOpen) <= 2 * (daysHigh - daysClose);\n return isBullishInvertedHammer;\n }\n}\nexport function bullishinvertedhammerstick(data) {\n return new BullishInvertedHammerStick().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishHammerStick extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishHammerStick';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBearishHammer = daysOpen > daysClose;\n isBearishHammer = isBearishHammer && this.approximateEqual(daysOpen, daysHigh);\n isBearishHammer = isBearishHammer && (daysOpen - daysClose) <= 2 * (daysClose - daysLow);\n return isBearishHammer;\n }\n}\nexport function bearishhammerstick(data) {\n return new BearishHammerStick().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishInvertedHammerStick extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishInvertedHammerStick';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBearishInvertedHammer = daysOpen > daysClose;\n isBearishInvertedHammer = isBearishInvertedHammer && this.approximateEqual(daysClose, daysLow);\n isBearishInvertedHammer = isBearishInvertedHammer && (daysOpen - daysClose) <= 2 * (daysHigh - daysOpen);\n return isBearishInvertedHammer;\n }\n}\nexport function bearishinvertedhammerstick(data) {\n return new BearishInvertedHammerStick().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nimport { bearishhammerstick } from './BearishHammerStick';\nimport { bearishinvertedhammerstick } from './BearishInvertedHammerStick';\nimport { bullishhammerstick } from './BullishHammerStick';\nimport { bullishinvertedhammerstick } from './BullishInvertedHammerStick';\nexport default class HammerPattern extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'HammerPattern';\n this.requiredCount = 5;\n }\n logic(data) {\n let isPattern = this.downwardTrend(data);\n isPattern = isPattern && this.includesHammer(data);\n isPattern = isPattern && this.hasConfirmation(data);\n return isPattern;\n }\n downwardTrend(data, confirm = true) {\n let end = confirm ? 3 : 4;\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, end), period: end - 1 });\n let losses = averageloss({ values: data.close.slice(0, end), period: end - 1 });\n // Downward trend, so more losses than gains\n return losses > gains;\n }\n includesHammer(data, confirm = true) {\n let start = confirm ? 3 : 4;\n let end = confirm ? 4 : undefined;\n let possibleHammerData = {\n open: data.open.slice(start, end),\n close: data.close.slice(start, end),\n low: data.low.slice(start, end),\n high: data.high.slice(start, end),\n };\n let isPattern = bearishhammerstick(possibleHammerData);\n isPattern = isPattern || bearishinvertedhammerstick(possibleHammerData);\n isPattern = isPattern || bullishhammerstick(possibleHammerData);\n isPattern = isPattern || bullishinvertedhammerstick(possibleHammerData);\n return isPattern;\n }\n hasConfirmation(data) {\n let possibleHammer = {\n open: data.open[3],\n close: data.close[3],\n low: data.low[3],\n high: data.high[3],\n };\n let possibleConfirmation = {\n open: data.open[4],\n close: data.close[4],\n low: data.low[4],\n high: data.high[4],\n };\n // Confirmation candlestick is bullish\n let isPattern = possibleConfirmation.open < possibleConfirmation.close;\n return isPattern && possibleHammer.close < possibleConfirmation.close;\n }\n}\nexport function hammerpattern(data) {\n return new HammerPattern().hasPattern(data);\n}\n","import HammerPattern from './HammerPattern';\nexport default class HammerPatternUnconfirmed extends HammerPattern {\n constructor() {\n super();\n this.name = 'HammerPatternUnconfirmed';\n }\n logic(data) {\n let isPattern = this.downwardTrend(data, false);\n isPattern = isPattern && this.includesHammer(data, false);\n return isPattern;\n }\n}\nexport function hammerpatternunconfirmed(data) {\n return new HammerPatternUnconfirmed().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nexport default class TweezerBottom extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'TweezerBottom';\n this.requiredCount = 5;\n }\n logic(data) {\n return this.downwardTrend(data) && data.low[3] == data.low[4];\n }\n downwardTrend(data) {\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, 3), period: 2 });\n let losses = averageloss({ values: data.close.slice(0, 3), period: 2 });\n // Downward trend, so more losses than gains\n return losses > gains;\n }\n}\nexport function tweezerbottom(data) {\n return new TweezerBottom().hasPattern(data);\n}\n","import MorningStar from './MorningStar';\nimport BullishEngulfingPattern from './BullishEngulfingPattern';\nimport BullishHarami from './BullishHarami';\nimport BullishHaramiCross from './BullishHaramiCross';\nimport MorningDojiStar from './MorningDojiStar';\nimport DownsideTasukiGap from './DownsideTasukiGap';\nimport BullishMarubozu from './BullishMarubozu';\nimport PiercingLine from './PiercingLine';\nimport ThreeWhiteSoldiers from './ThreeWhiteSoldiers';\nimport BullishHammerStick from './BullishHammerStick';\nimport BullishInvertedHammerStick from './BullishInvertedHammerStick';\nimport HammerPattern from './HammerPattern';\nimport HammerPatternUnconfirmed from './HammerPatternUnconfirmed';\nimport CandlestickFinder from './CandlestickFinder';\nimport TweezerBottom from './TweezerBottom';\nlet bullishPatterns = [\n new BullishEngulfingPattern(),\n new DownsideTasukiGap(),\n new BullishHarami(),\n new BullishHaramiCross(),\n new MorningDojiStar(),\n new MorningStar(),\n new BullishMarubozu(),\n new PiercingLine(),\n new ThreeWhiteSoldiers(),\n new BullishHammerStick(),\n new BullishInvertedHammerStick(),\n new HammerPattern(),\n new HammerPatternUnconfirmed(),\n new TweezerBottom()\n];\nexport default class BullishPatterns extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'Bullish Candlesticks';\n }\n hasPattern(data) {\n return bullishPatterns.reduce(function (state, pattern) {\n let result = pattern.hasPattern(data);\n return state || result;\n }, false);\n }\n}\nexport function bullish(data) {\n return new BullishPatterns().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishEngulfingPattern extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishEngulfingPattern';\n this.requiredCount = 2;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBearishEngulfing = ((firstdaysClose > firstdaysOpen) &&\n (firstdaysOpen < seconddaysOpen) &&\n (firstdaysClose < seconddaysOpen) &&\n (firstdaysOpen > seconddaysClose));\n return (isBearishEngulfing);\n }\n}\nexport function bearishengulfingpattern(data) {\n return new BearishEngulfingPattern().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishHarami extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = 'BearishHarami';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBearishHaramiPattern = ((firstdaysOpen < seconddaysOpen) &&\n (firstdaysClose > seconddaysOpen) &&\n (firstdaysClose > seconddaysClose) &&\n (firstdaysOpen < seconddaysLow) &&\n (firstdaysHigh > seconddaysHigh));\n return (isBearishHaramiPattern);\n }\n}\nexport function bearishharami(data) {\n return new BearishHarami().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishHaramiCross extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = 'BearishHaramiCross';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBearishHaramiCrossPattern = ((firstdaysOpen < seconddaysOpen) &&\n (firstdaysClose > seconddaysOpen) &&\n (firstdaysClose > seconddaysClose) &&\n (firstdaysOpen < seconddaysLow) &&\n (firstdaysHigh > seconddaysHigh));\n let isSecondDayDoji = this.approximateEqual(seconddaysOpen, seconddaysClose);\n return (isBearishHaramiCrossPattern && isSecondDayDoji);\n }\n}\nexport function bearishharamicross(data) {\n return new BearishHaramiCross().hasPattern(data);\n}\n","import Doji from './Doji';\nimport CandlestickFinder from './CandlestickFinder';\nexport default class EveningDojiStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'EveningDojiStar';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isFirstBullish = firstdaysClose > firstdaysOpen;\n let dojiExists = new Doji().hasPattern({\n \"open\": [seconddaysOpen],\n \"close\": [seconddaysClose],\n \"high\": [seconddaysHigh],\n \"low\": [seconddaysLow]\n });\n let isThirdBearish = thirddaysOpen > thirddaysClose;\n let gapExists = ((seconddaysHigh > firstdaysHigh) &&\n (seconddaysLow > firstdaysHigh) &&\n (thirddaysOpen < seconddaysLow) &&\n (seconddaysClose > thirddaysOpen));\n let doesCloseBelowFirstMidpoint = thirddaysClose < firstdaysMidpoint;\n return (isFirstBullish && dojiExists && gapExists && isThirdBearish && doesCloseBelowFirstMidpoint);\n }\n}\nexport function eveningdojistar(data) {\n return new EveningDojiStar().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class EveningStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'EveningStar';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isFirstBullish = firstdaysClose > firstdaysOpen;\n let isSmallBodyExists = ((firstdaysHigh < seconddaysLow) &&\n (firstdaysHigh < seconddaysHigh));\n let isThirdBearish = thirddaysOpen > thirddaysClose;\n let gapExists = ((seconddaysHigh > firstdaysHigh) &&\n (seconddaysLow > firstdaysHigh) &&\n (thirddaysOpen < seconddaysLow) &&\n (seconddaysClose > thirddaysOpen));\n let doesCloseBelowFirstMidpoint = thirddaysClose < firstdaysMidpoint;\n return (isFirstBullish && isSmallBodyExists && gapExists && isThirdBearish && doesCloseBelowFirstMidpoint);\n }\n}\nexport function eveningstar(data) {\n return new EveningStar().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishMarubozu extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishMarubozu';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBearishMarbozu = this.approximateEqual(daysOpen, daysHigh) &&\n this.approximateEqual(daysLow, daysClose) &&\n daysOpen > daysClose &&\n daysOpen > daysLow;\n return (isBearishMarbozu);\n }\n}\nexport function bearishmarubozu(data) {\n return new BearishMarubozu().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class ThreeBlackCrows extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'ThreeBlackCrows';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let isDownTrend = firstdaysLow > seconddaysLow &&\n seconddaysLow > thirddaysLow;\n let isAllBearish = firstdaysOpen > firstdaysClose &&\n seconddaysOpen > seconddaysClose &&\n thirddaysOpen > thirddaysClose;\n let doesOpenWithinPreviousBody = firstdaysOpen > seconddaysOpen &&\n seconddaysOpen > firstdaysClose &&\n seconddaysOpen > thirddaysOpen &&\n thirddaysOpen > seconddaysClose;\n return (isDownTrend && isAllBearish && doesOpenWithinPreviousBody);\n }\n}\nexport function threeblackcrows(data) {\n return new ThreeBlackCrows().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nimport { bearishhammerstick } from './BearishHammerStick';\nimport { bullishhammerstick } from './BullishHammerStick';\nexport default class HangingMan extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'HangingMan';\n this.requiredCount = 5;\n }\n logic(data) {\n let isPattern = this.upwardTrend(data);\n isPattern = isPattern && this.includesHammer(data);\n isPattern = isPattern && this.hasConfirmation(data);\n return isPattern;\n }\n upwardTrend(data, confirm = true) {\n let end = confirm ? 3 : 4;\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, end), period: end - 1 });\n let losses = averageloss({ values: data.close.slice(0, end), period: end - 1 });\n // Upward trend, so more gains than losses\n return gains > losses;\n }\n includesHammer(data, confirm = true) {\n let start = confirm ? 3 : 4;\n let end = confirm ? 4 : undefined;\n let possibleHammerData = {\n open: data.open.slice(start, end),\n close: data.close.slice(start, end),\n low: data.low.slice(start, end),\n high: data.high.slice(start, end),\n };\n let isPattern = bearishhammerstick(possibleHammerData);\n isPattern = isPattern || bullishhammerstick(possibleHammerData);\n return isPattern;\n }\n hasConfirmation(data) {\n let possibleHammer = {\n open: data.open[3],\n close: data.close[3],\n low: data.low[3],\n high: data.high[3],\n };\n let possibleConfirmation = {\n open: data.open[4],\n close: data.close[4],\n low: data.low[4],\n high: data.high[4],\n };\n // Confirmation candlestick is bearish\n let isPattern = possibleConfirmation.open > possibleConfirmation.close;\n return isPattern && possibleHammer.close > possibleConfirmation.close;\n }\n}\nexport function hangingman(data) {\n return new HangingMan().hasPattern(data);\n}\n","import HangingMan from './HangingMan';\nexport default class HangingManUnconfirmed extends HangingMan {\n constructor() {\n super();\n this.name = 'HangingManUnconfirmed';\n }\n logic(data) {\n let isPattern = this.upwardTrend(data, false);\n isPattern = isPattern && this.includesHammer(data, false);\n return isPattern;\n }\n}\nexport function hangingmanunconfirmed(data) {\n return new HangingManUnconfirmed().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nimport { bearishinvertedhammerstick } from './BearishInvertedHammerStick';\nimport { bullishinvertedhammerstick } from './BullishInvertedHammerStick';\nexport default class ShootingStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'ShootingStar';\n this.requiredCount = 5;\n }\n logic(data) {\n let isPattern = this.upwardTrend(data);\n isPattern = isPattern && this.includesHammer(data);\n isPattern = isPattern && this.hasConfirmation(data);\n return isPattern;\n }\n upwardTrend(data, confirm = true) {\n let end = confirm ? 3 : 4;\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, end), period: end - 1 });\n let losses = averageloss({ values: data.close.slice(0, end), period: end - 1 });\n // Upward trend, so more gains than losses\n return gains > losses;\n }\n includesHammer(data, confirm = true) {\n let start = confirm ? 3 : 4;\n let end = confirm ? 4 : undefined;\n let possibleHammerData = {\n open: data.open.slice(start, end),\n close: data.close.slice(start, end),\n low: data.low.slice(start, end),\n high: data.high.slice(start, end),\n };\n let isPattern = bearishinvertedhammerstick(possibleHammerData);\n isPattern = isPattern || bullishinvertedhammerstick(possibleHammerData);\n return isPattern;\n }\n hasConfirmation(data) {\n let possibleHammer = {\n open: data.open[3],\n close: data.close[3],\n low: data.low[3],\n high: data.high[3],\n };\n let possibleConfirmation = {\n open: data.open[4],\n close: data.close[4],\n low: data.low[4],\n high: data.high[4],\n };\n // Confirmation candlestick is bearish\n let isPattern = possibleConfirmation.open > possibleConfirmation.close;\n return isPattern && possibleHammer.close > possibleConfirmation.close;\n }\n}\nexport function shootingstar(data) {\n return new ShootingStar().hasPattern(data);\n}\n","import ShootingStar from './ShootingStar';\nexport default class ShootingStarUnconfirmed extends ShootingStar {\n constructor() {\n super();\n this.name = 'ShootingStarUnconfirmed';\n }\n logic(data) {\n let isPattern = this.upwardTrend(data, false);\n isPattern = isPattern && this.includesHammer(data, false);\n return isPattern;\n }\n}\nexport function shootingstarunconfirmed(data) {\n return new ShootingStarUnconfirmed().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nexport default class TweezerTop extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'TweezerTop';\n this.requiredCount = 5;\n }\n logic(data) {\n return this.upwardTrend(data) && data.high[3] == data.high[4];\n }\n upwardTrend(data) {\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, 3), period: 2 });\n let losses = averageloss({ values: data.close.slice(0, 3), period: 2 });\n // Upward trend, so more gains than losses\n return gains > losses;\n }\n}\nexport function tweezertop(data) {\n return new TweezerTop().hasPattern(data);\n}\n","import BearishEngulfingPattern from './BearishEngulfingPattern';\nimport BearishHarami from './BearishHarami';\nimport BearishHaramiCross from './BearishHaramiCross';\nimport EveningDojiStar from './EveningDojiStar';\nimport EveningStar from './EveningStar';\nimport BearishMarubozu from './BearishMarubozu';\nimport ThreeBlackCrows from './ThreeBlackCrows';\nimport BearishHammerStick from './BearishHammerStick';\nimport BearishInvertedHammerStick from './BearishInvertedHammerStick';\nimport HangingMan from './HangingMan';\nimport HangingManUnconfirmed from './HangingManUnconfirmed';\nimport ShootingStar from './ShootingStar';\nimport ShootingStarUnconfirmed from './ShootingStarUnconfirmed';\nimport TweezerTop from './TweezerTop';\nimport CandlestickFinder from './CandlestickFinder';\nlet bearishPatterns = [\n new BearishEngulfingPattern(),\n new BearishHarami(),\n new BearishHaramiCross(),\n new EveningDojiStar(),\n new EveningStar(),\n new BearishMarubozu(),\n new ThreeBlackCrows(),\n new BearishHammerStick(),\n new BearishInvertedHammerStick(),\n new HangingMan(),\n new HangingManUnconfirmed(),\n new ShootingStar(),\n new ShootingStarUnconfirmed(),\n new TweezerTop()\n];\nexport default class BearishPatterns extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'Bearish Candlesticks';\n }\n hasPattern(data) {\n return bearishPatterns.reduce(function (state, pattern) {\n return state || pattern.hasPattern(data);\n }, false);\n }\n}\nexport function bearish(data) {\n return new BearishPatterns().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport Doji from './Doji';\nexport default class AbandonedBaby extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'AbandonedBaby';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let dojiExists = new Doji().hasPattern({\n \"open\": [seconddaysOpen],\n \"close\": [seconddaysClose],\n \"high\": [seconddaysHigh],\n \"low\": [seconddaysLow]\n });\n let gapExists = ((seconddaysHigh < firstdaysLow) &&\n (thirddaysLow > seconddaysHigh) &&\n (thirddaysClose > thirddaysOpen));\n let isThirdBullish = (thirddaysHigh < firstdaysOpen);\n return (isFirstBearish && dojiExists && gapExists && isThirdBullish);\n }\n}\nexport function abandonedbaby(data) {\n return new AbandonedBaby().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class DarkCloudCover extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'DarkCloudCover';\n this.requiredCount = 2;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let firstdayMidpoint = ((firstdaysClose + firstdaysOpen) / 2);\n let isFirstBullish = firstdaysClose > firstdaysOpen;\n let isSecondBearish = seconddaysClose < seconddaysOpen;\n let isDarkCloudPattern = ((seconddaysOpen > firstdaysHigh) &&\n (seconddaysClose < firstdayMidpoint) &&\n (seconddaysClose > firstdaysOpen));\n return (isFirstBullish && isSecondBearish && isDarkCloudPattern);\n }\n}\nexport function darkcloudcover(data) {\n return new DarkCloudCover().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class DragonFlyDoji extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 1;\n this.name = 'DragonFlyDoji';\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isOpenEqualsClose = this.approximateEqual(daysOpen, daysClose);\n let isHighEqualsOpen = isOpenEqualsClose && this.approximateEqual(daysOpen, daysHigh);\n let isLowEqualsClose = isOpenEqualsClose && this.approximateEqual(daysClose, daysLow);\n return (isOpenEqualsClose && isHighEqualsOpen && !isLowEqualsClose);\n }\n}\nexport function dragonflydoji(data) {\n return new DragonFlyDoji().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class GraveStoneDoji extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 1;\n this.name = 'GraveStoneDoji';\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isOpenEqualsClose = this.approximateEqual(daysOpen, daysClose);\n let isHighEqualsOpen = isOpenEqualsClose && this.approximateEqual(daysOpen, daysHigh);\n let isLowEqualsClose = isOpenEqualsClose && this.approximateEqual(daysClose, daysLow);\n return (isOpenEqualsClose && isLowEqualsClose && !isHighEqualsOpen);\n }\n}\nexport function gravestonedoji(data) {\n return new GraveStoneDoji().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishSpinningTop extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishSpinningTop';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let bodyLength = Math.abs(daysClose - daysOpen);\n let upperShadowLength = Math.abs(daysHigh - daysClose);\n let lowerShadowLength = Math.abs(daysOpen - daysLow);\n let isBullishSpinningTop = bodyLength < upperShadowLength &&\n bodyLength < lowerShadowLength;\n return isBullishSpinningTop;\n }\n}\nexport function bullishspinningtop(data) {\n return new BullishSpinningTop().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishSpinningTop extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishSpinningTop';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let bodyLength = Math.abs(daysClose - daysOpen);\n let upperShadowLength = Math.abs(daysHigh - daysOpen);\n let lowerShadowLength = Math.abs(daysHigh - daysLow);\n let isBearishSpinningTop = bodyLength < upperShadowLength &&\n bodyLength < lowerShadowLength;\n return isBearishSpinningTop;\n }\n}\nexport function bearishspinningtop(data) {\n return new BearishSpinningTop().hasPattern(data);\n}\n","/**\n * Calcaultes the fibonacci retracements for given start and end points\n *\n * If calculating for up trend start should be low and end should be high and vice versa\n *\n * returns an array of retracements level containing [0 , 23.6, 38.2, 50, 61.8, 78.6, 100, 127.2, 161.8, 261.8, 423.6]\n *\n * @export\n * @param {number} start\n * @param {number} end\n * @returns {number[]}\n */\nexport function fibonacciretracement(start, end) {\n let levels = [0, 23.6, 38.2, 50, 61.8, 78.6, 100, 127.2, 161.8, 261.8, 423.6];\n let retracements;\n if (start < end) {\n retracements = levels.map(function (level) {\n let calculated = end - Math.abs(start - end) * (level) / 100;\n return calculated > 0 ? calculated : 0;\n });\n }\n else {\n retracements = levels.map(function (level) {\n let calculated = end + Math.abs(start - end) * (level) / 100;\n return calculated > 0 ? calculated : 0;\n });\n }\n return retracements;\n}\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { getConfig } from '../config';\nimport KerasJS from 'keras-js';\nvar isNodeEnvironment = false;\ntry {\n isNodeEnvironment = Object.prototype.toString.call(global.process) === '[object process]';\n}\ncatch (e) { }\nvar modelPath = getConfig('MODEL_PATH') || '/dist/model.bin';\nvar model = new KerasJS.Model({\n filepath: isNodeEnvironment ? __dirname + '/model.bin' : modelPath,\n gpu: false,\n filesystem: isNodeEnvironment\n});\nexport class PatternDetectorInput extends IndicatorInput {\n constructor(values) {\n super();\n this.values = values;\n }\n}\nexport var AvailablePatterns;\n(function (AvailablePatterns) {\n AvailablePatterns[AvailablePatterns[\"TD\"] = 0] = \"TD\";\n AvailablePatterns[AvailablePatterns[\"IHS\"] = 1] = \"IHS\";\n AvailablePatterns[AvailablePatterns[\"HS\"] = 2] = \"HS\";\n AvailablePatterns[AvailablePatterns[\"TU\"] = 3] = \"TU\";\n AvailablePatterns[AvailablePatterns[\"DT\"] = 4] = \"DT\";\n AvailablePatterns[AvailablePatterns[\"DB\"] = 5] = \"DB\";\n})(AvailablePatterns || (AvailablePatterns = {}));\nfunction interpolateArray(data, fitCount) {\n var linearInterpolate = function (before, after, atPoint) {\n return before + (after - before) * atPoint;\n };\n var newData = new Array();\n var springFactor = new Number((data.length - 1) / (fitCount - 1));\n newData[0] = data[0]; // for new allocation\n for (var i = 1; i < fitCount - 1; i++) {\n var tmp = i * springFactor;\n var before = new Number(Math.floor(tmp)).toFixed();\n var after = new Number(Math.ceil(tmp)).toFixed();\n var atPoint = tmp - before;\n newData[i] = linearInterpolate(data[before], data[after], atPoint);\n }\n newData[fitCount - 1] = data[data.length - 1]; // for new allocation\n return newData;\n}\n;\nfunction l2Normalize(arr) {\n var sum = arr.reduce((cum, value) => { return cum + (value * value); }, 0);\n var norm = Math.sqrt(sum);\n return arr.map((v) => v / norm);\n}\nexport class PatternDetectorOutput {\n}\nexport function predictPattern(input) {\n return __awaiter(this, void 0, void 0, function* () {\n if (input.values.length < 200) {\n console.warn('Pattern detector requires atleast 250 data for a reliable prediction, received just ', input.values.length);\n }\n yield model.ready();\n Indicator.reverseInputs(input);\n var data = input.values;\n var closes = l2Normalize(interpolateArray(data, 400));\n let result = yield model.predict({\n input: new Float32Array(closes)\n });\n var index = result.output.indexOf(Math.max(...result.output));\n Indicator.reverseInputs(input);\n return {\n pattern: AvailablePatterns[index],\n patternId: index,\n probability: result.output[index] * 100\n };\n });\n}\nexport function hasDoubleBottom(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.DB && result.probability > 75);\n });\n}\nexport function hasDoubleTop(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.DT && result.probability > 75);\n });\n}\nexport function hasHeadAndShoulder(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.HS && result.probability > 75);\n });\n}\nexport function hasInverseHeadAndShoulder(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.IHS && result.probability > 75);\n });\n}\nexport function isTrendingUp(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.TU && result.probability > 75);\n });\n}\nexport function isTrendingDown(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.TD && result.probability > 75);\n });\n}\nexport class PatternDetector extends Indicator {\n}\nPatternDetector.predictPattern = predictPattern;\nPatternDetector.hasDoubleBottom = hasDoubleBottom;\nPatternDetector.hasDoubleTop = hasDoubleTop;\nPatternDetector.hasHeadAndShoulder = hasHeadAndShoulder;\nPatternDetector.hasInverseHeadAndShoulder = hasInverseHeadAndShoulder;\nPatternDetector.isTrendingUp = isTrendingUp;\nPatternDetector.isTrendingDown = isTrendingDown;\n","export * from './lib/index.js';\nexport function getAvailableIndicators () {\n let AvailableIndicators = []\n AvailableIndicators.push('sma');\n AvailableIndicators.push('ema');\n AvailableIndicators.push('wma');\n AvailableIndicators.push('wema');\n AvailableIndicators.push('macd');\n AvailableIndicators.push('rsi');\n AvailableIndicators.push('bollingerbands');\n AvailableIndicators.push('adx');\n AvailableIndicators.push('atr');\n AvailableIndicators.push('truerange');\n AvailableIndicators.push('roc');\n AvailableIndicators.push('kst');\n AvailableIndicators.push('psar');\n AvailableIndicators.push('stochastic');\n AvailableIndicators.push('williamsr');\n AvailableIndicators.push('adl');\n AvailableIndicators.push('obv');\n AvailableIndicators.push('trix');\n\n AvailableIndicators.push('cci');\n AvailableIndicators.push('awesomeoscillator');\n AvailableIndicators.push('forceindex');\n AvailableIndicators.push('vwap');\n AvailableIndicators.push('volumeprofile');\n AvailableIndicators.push('renko');\n AvailableIndicators.push('heikinashi');\n\n AvailableIndicators.push('stochasticrsi');\n AvailableIndicators.push('mfi');\n\n AvailableIndicators.push('averagegain');\n AvailableIndicators.push('averageloss');\n AvailableIndicators.push('highest');\n AvailableIndicators.push('lowest');\n AvailableIndicators.push('sum');\n AvailableIndicators.push('FixedSizeLinkedList');\n AvailableIndicators.push('sd');\n AvailableIndicators.push('bullish');\n AvailableIndicators.push('bearish');\n AvailableIndicators.push('abandonedbaby');\n AvailableIndicators.push('doji');\n AvailableIndicators.push('bearishengulfingpattern');\n AvailableIndicators.push('bullishengulfingpattern');\n AvailableIndicators.push('darkcloudcover');\n AvailableIndicators.push('downsidetasukigap');\n AvailableIndicators.push('dragonflydoji');\n AvailableIndicators.push('gravestonedoji');\n AvailableIndicators.push('bullishharami');\n AvailableIndicators.push('bearishharami');\n AvailableIndicators.push('bullishharamicross');\n AvailableIndicators.push('bearishharamicross');\n AvailableIndicators.push('eveningdojistar');\n AvailableIndicators.push('eveningstar');\n AvailableIndicators.push('morningdojistar');\n AvailableIndicators.push('morningstar');\n AvailableIndicators.push('bullishmarubozu');\n AvailableIndicators.push('bearishmarubozu');\n AvailableIndicators.push('piercingline');\n AvailableIndicators.push('bullishspinningtop');\n AvailableIndicators.push('bearishspinningtop');\n AvailableIndicators.push('threeblackcrows');\n AvailableIndicators.push('threewhitesoldiers');\n AvailableIndicators.push('bullishhammerstick');\n AvailableIndicators.push('bearishhammerstick');\n AvailableIndicators.push('bullishinvertedhammerstick');\n AvailableIndicators.push('bearishinvertedhammerstick');\n AvailableIndicators.push('hammerpattern');\n AvailableIndicators.push('hammerpatternunconfirmed');\n AvailableIndicators.push('hangingman');\n AvailableIndicators.push('hangingmanunconfirmed');\n AvailableIndicators.push('shootingstar');\n AvailableIndicators.push('shootingstarunconfirmed');\n AvailableIndicators.push('tweezertop');\n AvailableIndicators.push('tweezerbottom');\n\n AvailableIndicators.push('predictPattern');\n AvailableIndicators.push('hasDoubleBottom');\n AvailableIndicators.push('hasDoubleTop');\n AvailableIndicators.push('hasHeadAndShoulder');\n AvailableIndicators.push('hasInverseHeadAndShoulder');\n AvailableIndicators.push('isTrendingUp');\n AvailableIndicators.push('isTrendingDown');\n return AvailableIndicators;\n};\n\nlet AvailableIndicators = getAvailableIndicators();\nexport { AvailableIndicators }\n"],"names":["nf","sma","LinkedList","sd","wema","ema","rsi","stochastic","FixedSizedLinkedList","this","AvailablePatterns"],"mappings":";;;;;;;;;AAAA,MAAM,IAAI,CAAC;IACP,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,IAAI;YACJ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,IAAI;YACJ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;KACpB;CACJ;AACD,AAAO,MAAM,UAAU,CAAC;IACpB,WAAW,GAAG;QACV,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;KACpB;IACD,IAAI,IAAI,GAAG;QACP,OAAO,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;KACxC;IACD,IAAI,IAAI,GAAG;QACP,OAAO,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;KACxC;IACD,IAAI,OAAO,GAAG;QACV,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;KAC9C;IACD,IAAI,MAAM,GAAG;QACT,OAAO,IAAI,CAAC,OAAO,CAAC;KACvB;IACD,IAAI,CAAC,IAAI,EAAE;QACP,IAAI,CAAC,KAAK,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QACxC,IAAI,IAAI,CAAC,OAAO,KAAK,CAAC,EAAE;YACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YACxB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC;YAC3B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CA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B,CAAC,CAAC;EACvD,mBAAmB,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;EACvD,mBAAmB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;EAC1C,mBAAmB,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;EACrD,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;EACvC,mBAAmB,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;EAClD,mBAAmB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;EACzC,mBAAmB,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;EACpD,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;EACvC,mBAAmB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;;EAE1C,mBAAmB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;EAC3C,mBAAmB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;EAC5C,mBAAmB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;EACzC,mBAAmB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;EAC/C,mBAAmB,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;EACtD,mBAAmB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;EACzC,mBAAmB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;EAC3C,OAAO,mBAAmB,CAAC;CAC5B,AAAC;;AAEF,IAAI,mBAAmB,GAAG,sBAAsB,EAAE,CAAC,AACnD,AAA8B,;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../lib/Utils/LinkedList.js","../lib/Utils/FixedSizeLinkedList.js","../lib/StockData.js","../lib/config.js","../lib/Utils/NumberFormatter.js","../lib/indicator/indicator.js","../lib/moving_averages/SMA.js","../lib/moving_averages/EMA.js","../lib/moving_averages/WMA.js","../lib/moving_averages/WEMA.js","../lib/moving_averages/MACD.js","../lib/Utils/AverageGain.js","../lib/Utils/AverageLoss.js","../lib/oscillators/RSI.js","../lib/Utils/SD.js","../lib/volatility/BollingerBands.js","../lib/moving_averages/WilderSmoothing.js","../lib/directionalmovement/MinusDM.js","../lib/directionalmovement/PlusDM.js","../lib/directionalmovement/TrueRange.js","../lib/directionalmovement/ADX.js","../lib/directionalmovement/ATR.js","../lib/momentum/ROC.js","../lib/momentum/KST.js","../lib/momentum/PSAR.js","../lib/momentum/Stochastic.js","../lib/momentum/WilliamsR.js","../lib/volume/ADL.js","../lib/volume/OBV.js","../lib/momentum/TRIX.js","../lib/volume/ForceIndex.js","../lib/oscillators/CCI.js","../lib/oscillators/AwesomeOscillator.js","../lib/volume/VWAP.js","../lib/volume/VolumeProfile.js","../lib/chart_types/TypicalPrice.js","../lib/volume/MFI.js","../lib/momentum/StochasticRSI.js","../lib/Utils/Highest.js","../lib/Utils/Lowest.js","../lib/Utils/Sum.js","../lib/chart_types/Renko.js","../lib/chart_types/HeikinAshi.js","../lib/candlestick/CandlestickFinder.js","../lib/candlestick/MorningStar.js","../lib/candlestick/BullishEngulfingPattern.js","../lib/candlestick/BullishHarami.js","../lib/candlestick/BullishHaramiCross.js","../lib/candlestick/Doji.js","../lib/candlestick/MorningDojiStar.js","../lib/candlestick/DownsideTasukiGap.js","../lib/candlestick/BullishMarubozu.js","../lib/candlestick/PiercingLine.js","../lib/candlestick/ThreeWhiteSoldiers.js","../lib/candlestick/BullishHammerStick.js","../lib/candlestick/BullishInvertedHammerStick.js","../lib/candlestick/BearishHammerStick.js","../lib/candlestick/BearishInvertedHammerStick.js","../lib/candlestick/HammerPattern.js","../lib/candlestick/HammerPatternUnconfirmed.js","../lib/candlestick/TweezerBottom.js","../lib/candlestick/Bullish.js","../lib/candlestick/BearishEngulfingPattern.js","../lib/candlestick/BearishHarami.js","../lib/candlestick/BearishHaramiCross.js","../lib/candlestick/EveningDojiStar.js","../lib/candlestick/EveningStar.js","../lib/candlestick/BearishMarubozu.js","../lib/candlestick/ThreeBlackCrows.js","../lib/candlestick/HangingMan.js","../lib/candlestick/HangingManUnconfirmed.js","../lib/candlestick/ShootingStar.js","../lib/candlestick/ShootingStarUnconfirmed.js","../lib/candlestick/TweezerTop.js","../lib/candlestick/Bearish.js","../lib/candlestick/AbandonedBaby.js","../lib/candlestick/DarkCloudCover.js","../lib/candlestick/DragonFlyDoji.js","../lib/candlestick/GraveStoneDoji.js","../lib/candlestick/BullishSpinningTop.js","../lib/candlestick/BearishSpinningTop.js","../lib/drawingtools/fibonacci.js","../lib/patterndetection/patterndetection.js","../index.js"],"sourcesContent":["class Item {\n constructor(data, prev, next) {\n this.next = next;\n if (next)\n next.prev = this;\n this.prev = prev;\n if (prev)\n prev.next = this;\n this.data = data;\n }\n}\nexport class LinkedList {\n constructor() {\n this._length = 0;\n }\n get head() {\n return this._head && this._head.data;\n }\n get tail() {\n return this._tail && this._tail.data;\n }\n get current() {\n return this._current && this._current.data;\n }\n get length() {\n return this._length;\n }\n push(data) {\n this._tail = new Item(data, this._tail);\n if (this._length === 0) {\n this._head = this._tail;\n this._current = this._head;\n this._next = this._head;\n }\n this._length++;\n }\n pop() {\n var tail = this._tail;\n if (this._length === 0) {\n return;\n }\n this._length--;\n if (this._length === 0) {\n this._head = this._tail = this._current = this._next = undefined;\n return tail.data;\n }\n this._tail = tail.prev;\n this._tail.next = undefined;\n if (this._current === tail) {\n this._current = this._tail;\n this._next = undefined;\n }\n return tail.data;\n }\n shift() {\n var head = this._head;\n if (this._length === 0) {\n return;\n }\n this._length--;\n if (this._length === 0) {\n this._head = this._tail = this._current = this._next = undefined;\n return head.data;\n }\n this._head = this._head.next;\n if (this._current === head) {\n this._current = this._head;\n this._next = this._current.next;\n }\n return head.data;\n }\n unshift(data) {\n this._head = new Item(data, undefined, this._head);\n if (this._length === 0) {\n this._tail = this._head;\n this._next = this._head;\n }\n this._length++;\n }\n unshiftCurrent() {\n var current = this._current;\n if (current === this._head || this._length < 2) {\n return current && current.data;\n }\n // remove\n if (current === this._tail) {\n this._tail = current.prev;\n this._tail.next = undefined;\n this._current = this._tail;\n }\n else {\n current.next.prev = current.prev;\n current.prev.next = current.next;\n this._current = current.prev;\n }\n this._next = this._current.next;\n // unshift\n current.next = this._head;\n current.prev = undefined;\n this._head.prev = current;\n this._head = current;\n return current.data;\n }\n removeCurrent() {\n var current = this._current;\n if (this._length === 0) {\n return;\n }\n this._length--;\n if (this._length === 0) {\n this._head = this._tail = this._current = this._next = undefined;\n return current.data;\n }\n if (current === this._tail) {\n this._tail = current.prev;\n this._tail.next = undefined;\n this._current = this._tail;\n }\n else if (current === this._head) {\n this._head = current.next;\n this._head.prev = undefined;\n this._current = this._head;\n }\n else {\n current.next.prev = current.prev;\n current.prev.next = current.next;\n this._current = current.prev;\n }\n this._next = this._current.next;\n return current.data;\n }\n resetCursor() {\n this._current = this._next = this._head;\n return this;\n }\n next() {\n var next = this._next;\n if (next !== undefined) {\n this._next = next.next;\n this._current = next;\n return next.data;\n }\n }\n}\n","/**\n * Created by AAravindan on 5/7/16.\n */\nimport { LinkedList } from './LinkedList';\nexport default class FixedSizeLinkedList extends LinkedList {\n constructor(size, maintainHigh, maintainLow, maintainSum) {\n super();\n this.size = size;\n this.maintainHigh = maintainHigh;\n this.maintainLow = maintainLow;\n this.maintainSum = maintainSum;\n this.totalPushed = 0;\n this.periodHigh = 0;\n this.periodLow = Infinity;\n this.periodSum = 0;\n if (!size || typeof size !== 'number') {\n throw ('Size required and should be a number.');\n }\n this._push = this.push;\n this.push = function (data) {\n this.add(data);\n this.totalPushed++;\n };\n }\n add(data) {\n if (this.length === this.size) {\n this.lastShift = this.shift();\n this._push(data);\n //TODO: FInd a better way\n if (this.maintainHigh)\n if (this.lastShift == this.periodHigh)\n this.calculatePeriodHigh();\n if (this.maintainLow)\n if (this.lastShift == this.periodLow)\n this.calculatePeriodLow();\n if (this.maintainSum) {\n this.periodSum = this.periodSum - this.lastShift;\n }\n }\n else {\n this._push(data);\n }\n //TODO: FInd a better way\n if (this.maintainHigh)\n if (this.periodHigh <= data)\n (this.periodHigh = data);\n if (this.maintainLow)\n if (this.periodLow >= data)\n (this.periodLow = data);\n if (this.maintainSum) {\n this.periodSum = this.periodSum + data;\n }\n }\n *iterator() {\n this.resetCursor();\n while (this.next()) {\n yield this.current;\n }\n }\n calculatePeriodHigh() {\n this.resetCursor();\n if (this.next())\n this.periodHigh = this.current;\n while (this.next()) {\n if (this.periodHigh <= this.current) {\n this.periodHigh = this.current;\n }\n ;\n }\n ;\n }\n calculatePeriodLow() {\n this.resetCursor();\n if (this.next())\n this.periodLow = this.current;\n while (this.next()) {\n if (this.periodLow >= this.current) {\n this.periodLow = this.current;\n }\n ;\n }\n ;\n }\n}\n","export default class StockData {\n constructor(open, high, low, close, reversedInput) {\n this.open = open;\n this.high = high;\n this.low = low;\n this.close = close;\n this.reversedInput = reversedInput;\n }\n}\nexport class CandleData {\n}\nexport class CandleList {\n constructor() {\n this.open = [];\n this.high = [];\n this.low = [];\n this.close = [];\n this.volume = [];\n this.timestamp = [];\n }\n}\n","let config = {};\nexport function setConfig(key, value) {\n config[key] = value;\n}\nexport function getConfig(key) {\n return config[key];\n}\n","import { getConfig } from '../config';\nexport function format(v) {\n let precision = getConfig('precision');\n if (precision) {\n return parseFloat(v.toPrecision(precision));\n }\n return v;\n}\n","import { format as nf } from '../Utils/NumberFormatter';\nexport class IndicatorInput {\n}\nexport class AllInputs {\n}\nexport class Indicator {\n constructor(input) {\n this.format = input.format || nf;\n }\n static reverseInputs(input) {\n if (input.reversedInput) {\n input.values ? input.values.reverse() : undefined;\n input.open ? input.open.reverse() : undefined;\n input.high ? input.high.reverse() : undefined;\n input.low ? input.low.reverse() : undefined;\n input.close ? input.close.reverse() : undefined;\n input.volume ? input.volume.reverse() : undefined;\n input.timestamp ? input.timestamp.reverse() : undefined;\n }\n }\n getResult() {\n return this.result;\n }\n}\n","//STEP 1. Import Necessary indicator or rather last step\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { LinkedList } from '../Utils/LinkedList';\n//STEP 2. Create the input for the indicator, mandatory should be in the constructor\nexport class MAInput extends IndicatorInput {\n constructor(period, values) {\n super();\n this.period = period;\n this.values = values;\n }\n}\n//STEP3. Add class based syntax with export\nexport class SMA extends Indicator {\n constructor(input) {\n super(input);\n this.period = input.period;\n this.price = input.values;\n var genFn = (function* (period) {\n var list = new LinkedList();\n var sum = 0;\n var counter = 1;\n var current = yield;\n var result;\n list.push(0);\n while (true) {\n if (counter < period) {\n counter++;\n list.push(current);\n sum = sum + current;\n }\n else {\n sum = sum - list.shift() + current;\n result = ((sum) / period);\n list.push(current);\n }\n current = yield result;\n }\n });\n this.generator = genFn(this.period);\n this.generator.next();\n this.result = [];\n this.price.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nSMA.calculate = sma;\nexport function sma(input) {\n Indicator.reverseInputs(input);\n var result = new SMA(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n//STEP 6. Run the tests\n","import { Indicator } from '../indicator/indicator';\nimport { SMA } from './SMA';\nexport class EMA extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n var exponent = (2 / (period + 1));\n var sma;\n this.result = [];\n sma = new SMA({ period: period, values: [] });\n var genFn = (function* () {\n var tick = yield;\n var prevEma;\n while (true) {\n if (prevEma !== undefined && tick !== undefined) {\n prevEma = ((tick - prevEma) * exponent) + prevEma;\n tick = yield prevEma;\n }\n else {\n tick = yield;\n prevEma = sma.nextValue(tick);\n if (prevEma)\n tick = yield prevEma;\n }\n }\n });\n this.generator = genFn();\n this.generator.next();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nEMA.calculate = ema;\nexport function ema(input) {\n Indicator.reverseInputs(input);\n var result = new EMA(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n","\"use strict\";\nimport { Indicator } from '../indicator/indicator';\nimport { LinkedList } from '../Utils/LinkedList';\nexport class WMA extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n this.result = [];\n this.generator = (function* () {\n let data = new LinkedList();\n let denominator = period * (period + 1) / 2;\n while (true) {\n if ((data.length) < period) {\n data.push(yield);\n }\n else {\n data.resetCursor();\n let result = 0;\n for (let i = 1; i <= period; i++) {\n result = result + (data.next() * i / (denominator));\n }\n var next = yield result;\n data.shift();\n data.push(next);\n }\n }\n })();\n this.generator.next();\n priceArray.forEach((tick, index) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n //STEP 5. REMOVE GET RESULT FUNCTION\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nWMA.calculate = wma;\n;\nexport function wma(input) {\n Indicator.reverseInputs(input);\n var result = new WMA(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n","import { Indicator } from '../indicator/indicator';\nimport { SMA } from './SMA';\nexport class WEMA extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n var exponent = 1 / period;\n var sma;\n this.result = [];\n sma = new SMA({ period: period, values: [] });\n var genFn = (function* () {\n var tick = yield;\n var prevEma;\n while (true) {\n if (prevEma !== undefined && tick !== undefined) {\n prevEma = ((tick - prevEma) * exponent) + prevEma;\n tick = yield prevEma;\n }\n else {\n tick = yield;\n prevEma = sma.nextValue(tick);\n if (prevEma !== undefined)\n tick = yield prevEma;\n }\n }\n });\n this.generator = genFn();\n this.generator.next();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nWEMA.calculate = wema;\nexport function wema(input) {\n Indicator.reverseInputs(input);\n var result = new WEMA(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n","/**\n * Created by AAravindan on 5/4/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from './SMA';\nimport { EMA } from './EMA';\nexport class MACDInput extends IndicatorInput {\n constructor(values) {\n super();\n this.values = values;\n this.SimpleMAOscillator = true;\n this.SimpleMASignal = true;\n }\n}\nexport class MACDOutput {\n}\nexport class MACD extends Indicator {\n constructor(input) {\n super(input);\n var oscillatorMAtype = input.SimpleMAOscillator ? SMA : EMA;\n var signalMAtype = input.SimpleMASignal ? SMA : EMA;\n var fastMAProducer = new oscillatorMAtype({ period: input.fastPeriod, values: [], format: (v) => { return v; } });\n var slowMAProducer = new oscillatorMAtype({ period: input.slowPeriod, values: [], format: (v) => { return v; } });\n var signalMAProducer = new signalMAtype({ period: input.signalPeriod, values: [], format: (v) => { return v; } });\n var format = this.format;\n this.result = [];\n this.generator = (function* () {\n var index = 0;\n var tick;\n var MACD, signal, histogram, fast, slow;\n while (true) {\n if (index < input.slowPeriod) {\n tick = yield;\n fast = fastMAProducer.nextValue(tick);\n slow = slowMAProducer.nextValue(tick);\n index++;\n continue;\n }\n if (fast && slow) {\n MACD = fast - slow;\n signal = signalMAProducer.nextValue(MACD);\n }\n histogram = MACD - signal;\n tick = yield ({\n //fast : fast,\n //slow : slow,\n MACD: format(MACD),\n signal: signal ? format(signal) : undefined,\n histogram: isNaN(histogram) ? undefined : format(histogram)\n });\n fast = fastMAProducer.nextValue(tick);\n slow = slowMAProducer.nextValue(tick);\n }\n })();\n this.generator.next();\n input.values.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n return result;\n }\n ;\n}\nMACD.calculate = macd;\nexport function macd(input) {\n Indicator.reverseInputs(input);\n var result = new MACD(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class AvgGainInput extends IndicatorInput {\n}\nexport class AverageGain extends Indicator {\n constructor(input) {\n super(input);\n let values = input.values;\n let period = input.period;\n let format = this.format;\n this.generator = (function* (period) {\n var currentValue = yield;\n var counter = 1;\n var gainSum = 0;\n var avgGain;\n var gain;\n var lastValue = currentValue;\n currentValue = yield;\n while (true) {\n gain = currentValue - lastValue;\n gain = gain > 0 ? gain : 0;\n if (gain > 0) {\n gainSum = gainSum + gain;\n }\n if (counter < period) {\n counter++;\n }\n else if (avgGain === undefined) {\n avgGain = gainSum / period;\n }\n else {\n avgGain = ((avgGain * (period - 1)) + gain) / period;\n }\n lastValue = currentValue;\n avgGain = (avgGain !== undefined) ? format(avgGain) : undefined;\n currentValue = yield avgGain;\n }\n })(period);\n this.generator.next();\n this.result = [];\n values.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nAverageGain.calculate = averagegain;\nexport function averagegain(input) {\n Indicator.reverseInputs(input);\n var result = new AverageGain(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class AvgLossInput extends IndicatorInput {\n}\nexport class AverageLoss extends Indicator {\n constructor(input) {\n super(input);\n let values = input.values;\n let period = input.period;\n let format = this.format;\n this.generator = (function* (period) {\n var currentValue = yield;\n var counter = 1;\n var lossSum = 0;\n var avgLoss;\n var loss;\n var lastValue = currentValue;\n currentValue = yield;\n while (true) {\n loss = lastValue - currentValue;\n loss = loss > 0 ? loss : 0;\n if (loss > 0) {\n lossSum = lossSum + loss;\n }\n if (counter < period) {\n counter++;\n }\n else if (avgLoss === undefined) {\n avgLoss = lossSum / period;\n }\n else {\n avgLoss = ((avgLoss * (period - 1)) + loss) / period;\n }\n lastValue = currentValue;\n avgLoss = (avgLoss !== undefined) ? format(avgLoss) : undefined;\n currentValue = yield avgLoss;\n }\n })(period);\n this.generator.next();\n this.result = [];\n values.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nAverageLoss.calculate = averageloss;\nexport function averageloss(input) {\n Indicator.reverseInputs(input);\n var result = new AverageLoss(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/5/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { AverageGain } from '../Utils/AverageGain';\nimport { AverageLoss } from '../Utils/AverageLoss';\nexport class RSIInput extends IndicatorInput {\n}\nexport class RSI extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var values = input.values;\n var GainProvider = new AverageGain({ period: period, values: [] });\n var LossProvider = new AverageLoss({ period: period, values: [] });\n let count = 1;\n this.generator = (function* (period) {\n var current = yield;\n var lastAvgGain, lastAvgLoss, RS, currentRSI;\n while (true) {\n lastAvgGain = GainProvider.nextValue(current);\n lastAvgLoss = LossProvider.nextValue(current);\n if ((lastAvgGain !== undefined) && (lastAvgLoss !== undefined)) {\n if (lastAvgLoss === 0) {\n currentRSI = 100;\n }\n else if (lastAvgGain === 0) {\n currentRSI = 0;\n }\n else {\n RS = lastAvgGain / lastAvgLoss;\n RS = isNaN(RS) ? 0 : RS;\n currentRSI = parseFloat((100 - (100 / (1 + RS))).toFixed(2));\n }\n }\n count++;\n current = yield currentRSI;\n }\n })(period);\n this.generator.next();\n this.result = [];\n values.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nRSI.calculate = rsi;\nexport function rsi(input) {\n Indicator.reverseInputs(input);\n var result = new RSI(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nimport LinkedList from '../Utils/FixedSizeLinkedList';\n/**\n * Created by AAravindan on 5/7/16.\n */\n\"use strict\";\nexport class SDInput extends IndicatorInput {\n}\n;\nexport class SD extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n var sma = new SMA({ period: period, values: [], format: (v) => { return v; } });\n this.result = [];\n this.generator = (function* () {\n var tick;\n var mean;\n var currentSet = new LinkedList(period);\n ;\n tick = yield;\n var sd;\n while (true) {\n currentSet.push(tick);\n mean = sma.nextValue(tick);\n if (mean) {\n let sum = 0;\n for (let x of currentSet.iterator()) {\n sum = sum + (Math.pow((x - mean), 2));\n }\n sd = Math.sqrt(sum / (period));\n }\n tick = yield sd;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var nextResult = this.generator.next(price);\n if (nextResult.value != undefined)\n return this.format(nextResult.value);\n }\n ;\n}\nSD.calculate = sd;\nexport function sd(input) {\n Indicator.reverseInputs(input);\n var result = new SD(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","\"use strict\";\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nimport { SD } from '../Utils/SD';\nexport class BollingerBandsInput extends IndicatorInput {\n}\n;\nexport class BollingerBandsOutput extends IndicatorInput {\n}\n;\nexport class BollingerBands extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n var stdDev = input.stdDev;\n var format = this.format;\n var sma, sd;\n this.result = [];\n sma = new SMA({ period: period, values: [], format: (v) => { return v; } });\n sd = new SD({ period: period, values: [], format: (v) => { return v; } });\n this.generator = (function* () {\n var result;\n var tick;\n var calcSMA;\n var calcsd;\n tick = yield;\n while (true) {\n calcSMA = sma.nextValue(tick);\n calcsd = sd.nextValue(tick);\n if (calcSMA) {\n let middle = format(calcSMA);\n let upper = format(calcSMA + (calcsd * stdDev));\n let lower = format(calcSMA - (calcsd * stdDev));\n let pb = format((tick - lower) / (upper - lower));\n result = {\n middle: middle,\n upper: upper,\n lower: lower,\n pb: pb\n };\n }\n tick = yield result;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nBollingerBands.calculate = bollingerbands;\nexport function bollingerbands(input) {\n Indicator.reverseInputs(input);\n var result = new BollingerBands(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator } from '../indicator/indicator';\nimport { LinkedList } from '../Utils/LinkedList';\n//STEP3. Add class based syntax with export\nexport class WilderSmoothing extends Indicator {\n constructor(input) {\n super(input);\n this.period = input.period;\n this.price = input.values;\n var genFn = (function* (period) {\n var list = new LinkedList();\n var sum = 0;\n var counter = 1;\n var current = yield;\n var result = 0;\n while (true) {\n if (counter < period) {\n counter++;\n sum = sum + current;\n result = undefined;\n }\n else if (counter == period) {\n counter++;\n sum = sum + current;\n result = sum;\n }\n else {\n result = result - (result / period) + current;\n }\n current = yield result;\n }\n });\n this.generator = genFn(this.period);\n this.generator.next();\n this.result = [];\n this.price.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n if (result != undefined)\n return this.format(result);\n }\n ;\n}\nWilderSmoothing.calculate = wildersmoothing;\nexport function wildersmoothing(input) {\n Indicator.reverseInputs(input);\n var result = new WilderSmoothing(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n//STEP 6. Run the tests\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/8/16.\n */\n\"use strict\";\nexport class MDMInput extends IndicatorInput {\n}\n;\nexport class MDM extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var format = this.format;\n if (lows.length != highs.length) {\n throw ('Inputs(low,high) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var minusDm;\n var current = yield;\n var last;\n while (true) {\n if (last) {\n let upMove = (current.high - last.high);\n let downMove = (last.low - current.low);\n minusDm = format((downMove > upMove && downMove > 0) ? downMove : 0);\n }\n last = current;\n current = yield minusDm;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index]\n });\n if (result.value !== undefined)\n this.result.push(result.value);\n });\n }\n ;\n static calculate(input) {\n Indicator.reverseInputs(input);\n var result = new MDM(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/8/16.\n */\nexport class PDMInput extends IndicatorInput {\n}\n;\nexport class PDM extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var format = this.format;\n if (lows.length != highs.length) {\n throw ('Inputs(low,high) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var plusDm;\n var current = yield;\n var last;\n while (true) {\n if (last) {\n let upMove = (current.high - last.high);\n let downMove = (last.low - current.low);\n plusDm = format((upMove > downMove && upMove > 0) ? upMove : 0);\n }\n last = current;\n current = yield plusDm;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index]\n });\n if (result.value !== undefined)\n this.result.push(result.value);\n });\n }\n ;\n static calculate(input) {\n Indicator.reverseInputs(input);\n var result = new PDM(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/8/16.\n */\n/**\n * Created by AAravindan on 5/8/16.\n */\n\"use strict\";\nexport class TrueRangeInput extends IndicatorInput {\n}\n;\nexport class TrueRange extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var format = this.format;\n if (lows.length != highs.length) {\n throw ('Inputs(low,high) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var current = yield;\n var previousClose, result;\n while (true) {\n if (previousClose === undefined) {\n previousClose = current.close;\n current = yield result;\n }\n result = Math.max(current.high - current.low, isNaN(Math.abs(current.high - previousClose)) ? 0 : Math.abs(current.high - previousClose), isNaN(Math.abs(current.low - previousClose)) ? 0 : Math.abs(current.low - previousClose));\n previousClose = current.close;\n if (result != undefined) {\n result = format(result);\n }\n current = yield result;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nTrueRange.calculate = truerange;\nexport function truerange(input) {\n Indicator.reverseInputs(input);\n var result = new TrueRange(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { WilderSmoothing } from '../moving_averages/WilderSmoothing';\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { MDM } from './MinusDM';\nimport { PDM } from './PlusDM';\nimport { TrueRange } from './TrueRange';\nimport { WEMA } from '../moving_averages/WEMA';\nexport class ADXInput extends IndicatorInput {\n}\n;\nexport class ADXOutput extends IndicatorInput {\n}\n;\nexport class ADX extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var period = input.period;\n var format = this.format;\n var plusDM = new PDM({\n high: [],\n low: []\n });\n var minusDM = new MDM({\n high: [],\n low: []\n });\n var emaPDM = new WilderSmoothing({ period: period, values: [], format: (v) => { return v; } });\n var emaMDM = new WilderSmoothing({ period: period, values: [], format: (v) => { return v; } });\n var emaTR = new WilderSmoothing({ period: period, values: [], format: (v) => { return v; } });\n var emaDX = new WEMA({ period: period, values: [], format: (v) => { return v; } });\n var tr = new TrueRange({\n low: [],\n high: [],\n close: [],\n });\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n ADXOutput;\n this.generator = (function* () {\n var tick = yield;\n var index = 0;\n var lastATR, lastAPDM, lastAMDM, lastPDI, lastMDI, lastDX, smoothedDX;\n lastATR = 0;\n lastAPDM = 0;\n lastAMDM = 0;\n while (true) {\n let calcTr = tr.nextValue(tick);\n let calcPDM = plusDM.nextValue(tick);\n let calcMDM = minusDM.nextValue(tick);\n if (calcTr === undefined) {\n tick = yield;\n continue;\n }\n let lastATR = emaTR.nextValue(calcTr);\n let lastAPDM = emaPDM.nextValue(calcPDM);\n let lastAMDM = emaMDM.nextValue(calcMDM);\n if ((lastATR != undefined) && (lastAPDM != undefined) && (lastAMDM != undefined)) {\n lastPDI = (lastAPDM) * 100 / lastATR;\n lastMDI = (lastAMDM) * 100 / lastATR;\n let diDiff = Math.abs(lastPDI - lastMDI);\n let diSum = (lastPDI + lastMDI);\n lastDX = (diDiff / diSum) * 100;\n smoothedDX = emaDX.nextValue(lastDX);\n // console.log(tick.high.toFixed(2), tick.low.toFixed(2), tick.close.toFixed(2) , calcTr.toFixed(2), calcPDM.toFixed(2), calcMDM.toFixed(2), lastATR.toFixed(2), lastAPDM.toFixed(2), lastAMDM.toFixed(2), lastPDI.toFixed(2), lastMDI.toFixed(2), diDiff.toFixed(2), diSum.toFixed(2), lastDX.toFixed(2));\n }\n tick = yield { adx: smoothedDX, pdi: lastPDI, mdi: lastMDI };\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value != undefined && result.value.adx != undefined) {\n this.result.push({ adx: format(result.value.adx), pdi: format(result.value.pdi), mdi: format(result.value.mdi) });\n }\n });\n }\n ;\n ;\n nextValue(price) {\n let result = this.generator.next(price).value;\n if (result != undefined && result.adx != undefined) {\n return { adx: this.format(result.adx), pdi: this.format(result.pdi), mdi: this.format(result.mdi) };\n }\n }\n ;\n}\nADX.calculate = adx;\nexport function adx(input) {\n Indicator.reverseInputs(input);\n var result = new ADX(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/8/16.\n */\n\"use strict\";\nimport { WEMA } from '../moving_averages/WEMA';\nimport { TrueRange } from './TrueRange';\nexport class ATRInput extends IndicatorInput {\n}\n;\nexport class ATR extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var period = input.period;\n var format = this.format;\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n var trueRange = new TrueRange({\n low: [],\n high: [],\n close: []\n });\n var wema = new WEMA({ period: period, values: [], format: (v) => { return v; } });\n this.result = [];\n this.generator = (function* () {\n var tick = yield;\n var avgTrueRange, trange;\n ;\n while (true) {\n trange = trueRange.nextValue({\n low: tick.low,\n high: tick.high,\n close: tick.close\n });\n if (trange === undefined) {\n avgTrueRange = undefined;\n }\n else {\n avgTrueRange = wema.nextValue(trange);\n }\n tick = yield avgTrueRange;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value !== undefined) {\n this.result.push(format(result.value));\n }\n });\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nATR.calculate = atr;\nexport function atr(input) {\n Indicator.reverseInputs(input);\n var result = new ATR(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport LinkedList from '../Utils/FixedSizeLinkedList';\nexport class ROCInput extends IndicatorInput {\n}\nexport class ROC extends Indicator {\n constructor(input) {\n super(input);\n var period = input.period;\n var priceArray = input.values;\n this.result = [];\n this.generator = (function* () {\n let index = 1;\n var pastPeriods = new LinkedList(period);\n ;\n var tick = yield;\n var roc;\n while (true) {\n pastPeriods.push(tick);\n if (index < period) {\n index++;\n }\n else {\n roc = ((tick - pastPeriods.lastShift) / (pastPeriods.lastShift)) * 100;\n }\n tick = yield roc;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n var result = this.generator.next(tick);\n if (result.value != undefined && (!isNaN(result.value))) {\n this.result.push(this.format(result.value));\n }\n });\n }\n nextValue(price) {\n var nextResult = this.generator.next(price);\n if (nextResult.value != undefined && (!isNaN(nextResult.value))) {\n return this.format(nextResult.value);\n }\n }\n ;\n}\nROC.calculate = roc;\n;\nexport function roc(input) {\n Indicator.reverseInputs(input);\n var result = new ROC(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nimport { ROC } from './ROC';\nexport class KSTInput extends IndicatorInput {\n}\nexport class KSTOutput {\n}\nexport class KST extends Indicator {\n constructor(input) {\n super(input);\n let priceArray = input.values;\n let rocPer1 = input.ROCPer1;\n let rocPer2 = input.ROCPer2;\n let rocPer3 = input.ROCPer3;\n let rocPer4 = input.ROCPer4;\n let smaPer1 = input.SMAROCPer1;\n let smaPer2 = input.SMAROCPer2;\n let smaPer3 = input.SMAROCPer3;\n let smaPer4 = input.SMAROCPer4;\n let signalPeriod = input.signalPeriod;\n let roc1 = new ROC({ period: rocPer1, values: [] });\n let roc2 = new ROC({ period: rocPer2, values: [] });\n let roc3 = new ROC({ period: rocPer3, values: [] });\n let roc4 = new ROC({ period: rocPer4, values: [] });\n let sma1 = new SMA({ period: smaPer1, values: [], format: (v) => { return v; } });\n let sma2 = new SMA({ period: smaPer2, values: [], format: (v) => { return v; } });\n let sma3 = new SMA({ period: smaPer3, values: [], format: (v) => { return v; } });\n let sma4 = new SMA({ period: smaPer4, values: [], format: (v) => { return v; } });\n let signalSMA = new SMA({ period: signalPeriod, values: [], format: (v) => { return v; } });\n var format = this.format;\n this.result = [];\n let firstResult = Math.max(rocPer1 + smaPer1, rocPer2 + smaPer2, rocPer3 + smaPer3, rocPer4 + smaPer4);\n this.generator = (function* () {\n let index = 1;\n let tick = yield;\n let kst;\n let RCMA1, RCMA2, RCMA3, RCMA4, signal, result;\n while (true) {\n let roc1Result = roc1.nextValue(tick);\n let roc2Result = roc2.nextValue(tick);\n let roc3Result = roc3.nextValue(tick);\n let roc4Result = roc4.nextValue(tick);\n RCMA1 = (roc1Result !== undefined) ? sma1.nextValue(roc1Result) : undefined;\n RCMA2 = (roc2Result !== undefined) ? sma2.nextValue(roc2Result) : undefined;\n RCMA3 = (roc3Result !== undefined) ? sma3.nextValue(roc3Result) : undefined;\n RCMA4 = (roc4Result !== undefined) ? sma4.nextValue(roc4Result) : undefined;\n if (index < firstResult) {\n index++;\n }\n else {\n kst = (RCMA1 * 1) + (RCMA2 * 2) + (RCMA3 * 3) + (RCMA4 * 4);\n }\n signal = (kst !== undefined) ? signalSMA.nextValue(kst) : undefined;\n result = kst !== undefined ? {\n kst: format(kst),\n signal: signal ? format(signal) : undefined\n } : undefined;\n tick = yield result;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n let result = this.generator.next(tick);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n let nextResult = this.generator.next(price);\n if (nextResult.value != undefined)\n return nextResult.value;\n }\n ;\n}\nKST.calculate = kst;\nexport function kst(input) {\n Indicator.reverseInputs(input);\n var result = new KST(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\n\"use strict\";\n/*\n There seems to be a few interpretations of the rules for this regarding which prices.\n I mean the english from which periods are included. The wording does seem to\n introduce some discrepancy so maybe that is why. I want to put the author's\n own description here to reassess this later.\n ----------------------------------------------------------------------------------------\n For the first day of entry the SAR is the previous Significant Point\n\n If long the SP is the lowest price reached while in the previous short trade\n If short the SP is the highest price reached while in the previous long trade\n\n If long:\n Find the difference between the highest price made while in the trade and the SAR for today.\n Multiple the difference by the AF and ADD the result to today's SAR to obtain the SAR for tomorrow.\n Use 0.02 for the first AF and increase it by 0.02 on every day that a new high for the trade is made.\n If a new high is not made continue to use the AF as last increased. Do not increase the AF above .20\n\n Never move the SAR for tomorrow ABOVE the previous day's LOW or today's LOW.\n If the SAR is calculated to be ABOVE the previous day's LOW or today's LOW then use the lower low between today and the previous day as the new SAR.\n Make the next day's calculations based on this SAR.\n\n If short:\n Find the difference between the lowest price made while in the trade and the SAR for today.\n Multiple the difference by the AF and SUBTRACT the result to today's SAR to obtain the SAR for tomorrow.\n Use 0.02 for the first AF and increase it by 0.02 on every day that a new high for the trade is made.\n If a new high is not made continue to use the AF as last increased. Do not increase the AF above .20\n\n Never move the SAR for tomorrow BELOW the previous day's HIGH or today's HIGH.\n If the SAR is calculated to be BELOW the previous day's HIGH or today's HIGH then use the higher high between today and the previous day as the new SAR. Make the next day's calculations based on this SAR.\n ----------------------------------------------------------------------------------------\n*/\nexport class PSARInput extends IndicatorInput {\n}\n;\nexport class PSAR extends Indicator {\n constructor(input) {\n super(input);\n let highs = input.high || [];\n let lows = input.low || [];\n var genFn = function* (step, max) {\n let curr, extreme, sar, furthest;\n let up = true;\n let accel = step;\n let prev = yield;\n while (true) {\n if (curr) {\n sar = sar + accel * (extreme - sar);\n if (up) {\n sar = Math.min(sar, furthest.low, prev.low);\n if (curr.high > extreme) {\n extreme = curr.high;\n accel = Math.min(accel + step, max);\n }\n ;\n }\n else {\n sar = Math.max(sar, furthest.high, prev.high);\n if (curr.low < extreme) {\n extreme = curr.low;\n accel = Math.min(accel + step, max);\n }\n }\n if ((up && curr.low < sar) || (!up && curr.high > sar)) {\n accel = step;\n sar = extreme;\n up = !up;\n extreme = !up ? curr.low : curr.high;\n }\n }\n else {\n // Randomly setup start values? What is the trend on first tick??\n sar = prev.low;\n extreme = prev.high;\n }\n furthest = prev;\n if (curr)\n prev = curr;\n curr = yield sar;\n }\n };\n this.result = [];\n this.generator = genFn(input.step, input.max);\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n });\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(input) {\n let nextResult = this.generator.next(input);\n if (nextResult.value !== undefined)\n return nextResult.value;\n }\n ;\n}\nPSAR.calculate = psar;\nexport function psar(input) {\n Indicator.reverseInputs(input);\n var result = new PSAR(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/10/16.\n */\n\"use strict\";\nimport LinkedList from '../Utils/FixedSizeLinkedList';\nimport { SMA } from '../moving_averages/SMA';\nexport class StochasticInput extends IndicatorInput {\n}\n;\nexport class StochasticOutput {\n}\n;\nexport class Stochastic extends Indicator {\n constructor(input) {\n super(input);\n let lows = input.low;\n let highs = input.high;\n let closes = input.close;\n let period = input.period;\n let signalPeriod = input.signalPeriod;\n let format = this.format;\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n //%K = (Current Close - Lowest Low)/(Highest High - Lowest Low) * 100\n //%D = 3-day SMA of %K\n //\n //Lowest Low = lowest low for the look-back period\n //Highest High = highest high for the look-back period\n //%K is multiplied by 100 to move the decimal point two places\n this.generator = (function* () {\n let index = 1;\n let pastHighPeriods = new LinkedList(period, true, false);\n let pastLowPeriods = new LinkedList(period, false, true);\n let dSma = new SMA({\n period: signalPeriod,\n values: [],\n format: (v) => { return v; }\n });\n let k, d;\n var tick = yield;\n while (true) {\n pastHighPeriods.push(tick.high);\n pastLowPeriods.push(tick.low);\n if (index < period) {\n index++;\n tick = yield;\n continue;\n }\n let periodLow = pastLowPeriods.periodLow;\n k = (tick.close - periodLow) / (pastHighPeriods.periodHigh - periodLow) * 100;\n k = isNaN(k) ? 0 : k; //This happens when the close, high and low are same for the entire period; Bug fix for \n d = dSma.nextValue(k);\n tick = yield {\n k: format(k),\n d: (d !== undefined) ? format(d) : undefined\n };\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(input) {\n let nextResult = this.generator.next(input);\n if (nextResult.value !== undefined)\n return nextResult.value;\n }\n ;\n}\nStochastic.calculate = stochastic;\nexport function stochastic(input) {\n Indicator.reverseInputs(input);\n var result = new Stochastic(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\nimport LinkedList from '../Utils/FixedSizeLinkedList';\nexport class WilliamsRInput extends IndicatorInput {\n}\n;\nexport class WilliamsR extends Indicator {\n constructor(input) {\n super(input);\n let lows = input.low;\n let highs = input.high;\n let closes = input.close;\n let period = input.period;\n let format = this.format;\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n //%R = (Highest High - Close)/(Highest High - Lowest Low) * -100\n //Lowest Low = lowest low for the look-back period\n //Highest High = highest high for the look-back period\n //%R is multiplied by -100 correct the inversion and move the decimal.\n this.generator = (function* () {\n let index = 1;\n let pastHighPeriods = new LinkedList(period, true, false);\n let pastLowPeriods = new LinkedList(period, false, true);\n let periodLow;\n let periodHigh;\n var tick = yield;\n let williamsR;\n while (true) {\n pastHighPeriods.push(tick.high);\n pastLowPeriods.push(tick.low);\n if (index < period) {\n index++;\n tick = yield;\n continue;\n }\n periodLow = pastLowPeriods.periodLow;\n periodHigh = pastHighPeriods.periodHigh;\n williamsR = format((periodHigh - tick.close) / (periodHigh - periodLow) * -100);\n tick = yield williamsR;\n }\n })();\n this.generator.next();\n lows.forEach((low, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n var nextResult = this.generator.next(price);\n if (nextResult.value != undefined)\n return this.format(nextResult.value);\n }\n ;\n}\nWilliamsR.calculate = williamsr;\nexport function williamsr(input) {\n Indicator.reverseInputs(input);\n var result = new WilliamsR(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/17/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class ADLInput extends IndicatorInput {\n}\nexport class ADL extends Indicator {\n constructor(input) {\n super(input);\n var highs = input.high;\n var lows = input.low;\n var closes = input.close;\n var volumes = input.volume;\n if (!((lows.length === highs.length) && (highs.length === closes.length) && (highs.length === volumes.length))) {\n throw ('Inputs(low,high, close, volumes) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var result = 0;\n var tick;\n tick = yield;\n while (true) {\n let moneyFlowMultiplier = ((tick.close - tick.low) - (tick.high - tick.close)) / (tick.high - tick.low);\n moneyFlowMultiplier = isNaN(moneyFlowMultiplier) ? 1 : moneyFlowMultiplier;\n let moneyFlowVolume = moneyFlowMultiplier * tick.volume;\n result = result + moneyFlowVolume;\n tick = yield Math.round(result);\n }\n })();\n this.generator.next();\n highs.forEach((tickHigh, index) => {\n var tickInput = {\n high: tickHigh,\n low: lows[index],\n close: closes[index],\n volume: volumes[index]\n };\n var result = this.generator.next(tickInput);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nADL.calculate = adl;\nexport function adl(input) {\n Indicator.reverseInputs(input);\n var result = new ADL(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/17/16.\n */\n\"use strict\";\nexport class OBVInput extends IndicatorInput {\n}\nexport class OBV extends Indicator {\n constructor(input) {\n super(input);\n var closes = input.close;\n var volumes = input.volume;\n this.result = [];\n this.generator = (function* () {\n var result = 0;\n var tick;\n var lastClose;\n tick = yield;\n if (tick.close && (typeof tick.close === 'number')) {\n lastClose = tick.close;\n tick = yield;\n }\n while (true) {\n if (lastClose < tick.close) {\n result = result + tick.volume;\n }\n else if (tick.close < lastClose) {\n result = result - tick.volume;\n }\n lastClose = tick.close;\n tick = yield result;\n }\n })();\n this.generator.next();\n closes.forEach((close, index) => {\n let tickInput = {\n close: closes[index],\n volume: volumes[index]\n };\n let result = this.generator.next(tickInput);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n return this.generator.next(price).value;\n }\n ;\n}\nOBV.calculate = obv;\nexport function obv(input) {\n Indicator.reverseInputs(input);\n var result = new OBV(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/9/16.\n */\n\"use strict\";\nimport { ROC } from './ROC.js';\nimport { EMA } from '../moving_averages/EMA.js';\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class TRIXInput extends IndicatorInput {\n}\n;\nexport class TRIX extends Indicator {\n constructor(input) {\n super(input);\n let priceArray = input.values;\n let period = input.period;\n let format = this.format;\n let ema = new EMA({ period: period, values: [], format: (v) => { return v; } });\n let emaOfema = new EMA({ period: period, values: [], format: (v) => { return v; } });\n let emaOfemaOfema = new EMA({ period: period, values: [], format: (v) => { return v; } });\n let trixROC = new ROC({ period: 1, values: [], format: (v) => { return v; } });\n this.result = [];\n this.generator = (function* () {\n let tick = yield;\n while (true) {\n let initialema = ema.nextValue(tick);\n let smoothedResult = initialema ? emaOfema.nextValue(initialema) : undefined;\n let doubleSmoothedResult = smoothedResult ? emaOfemaOfema.nextValue(smoothedResult) : undefined;\n let result = doubleSmoothedResult ? trixROC.nextValue(doubleSmoothedResult) : undefined;\n tick = yield result ? format(result) : undefined;\n }\n })();\n this.generator.next();\n priceArray.forEach((tick) => {\n let result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n nextValue(price) {\n let nextResult = this.generator.next(price);\n if (nextResult.value !== undefined)\n return nextResult.value;\n }\n ;\n}\nTRIX.calculate = trix;\nexport function trix(input) {\n Indicator.reverseInputs(input);\n var result = new TRIX(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { EMA } from '../moving_averages/EMA';\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class ForceIndexInput extends IndicatorInput {\n constructor() {\n super(...arguments);\n this.period = 1;\n }\n}\n;\nexport class ForceIndex extends Indicator {\n constructor(input) {\n super(input);\n var closes = input.close;\n var volumes = input.volume;\n var period = input.period || 1;\n if (!((volumes.length === closes.length))) {\n throw ('Inputs(volume, close) not of equal size');\n }\n let emaForceIndex = new EMA({ values: [], period: period });\n this.result = [];\n this.generator = (function* () {\n var previousTick = yield;\n var tick = yield;\n let forceIndex;\n while (true) {\n forceIndex = (tick.close - previousTick.close) * tick.volume;\n previousTick = tick;\n tick = yield emaForceIndex.nextValue(forceIndex);\n }\n })();\n this.generator.next();\n volumes.forEach((tick, index) => {\n var result = this.generator.next({\n close: closes[index],\n volume: volumes[index]\n });\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n ;\n nextValue(price) {\n let result = this.generator.next(price).value;\n if (result != undefined) {\n return result;\n }\n }\n ;\n}\nForceIndex.calculate = forceindex;\nexport function forceindex(input) {\n Indicator.reverseInputs(input);\n var result = new ForceIndex(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nimport LinkedList from '../Utils/FixedSizeLinkedList';\nexport class CCIInput extends IndicatorInput {\n}\n;\nexport class CCI extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var period = input.period;\n var format = this.format;\n let constant = .015;\n var currentTpSet = new LinkedList(period);\n ;\n var tpSMACalculator = new SMA({ period: period, values: [], format: (v) => { return v; } });\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var tick = yield;\n while (true) {\n let tp = (tick.high + tick.low + tick.close) / 3;\n currentTpSet.push(tp);\n let smaTp = tpSMACalculator.nextValue(tp);\n let meanDeviation = null;\n let cci;\n let sum = 0;\n if (smaTp != undefined) {\n //First, subtract the most recent 20-period average of the typical price from each period's typical price. \n //Second, take the absolute values of these numbers.\n //Third,sum the absolute values. \n for (let x of currentTpSet.iterator()) {\n sum = sum + (Math.abs(x - smaTp));\n }\n //Fourth, divide by the total number of periods (20). \n meanDeviation = sum / 20;\n cci = (tp - smaTp) / (constant * meanDeviation);\n }\n tick = yield cci;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index]\n });\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n ;\n nextValue(price) {\n let result = this.generator.next(price).value;\n if (result != undefined) {\n return result;\n }\n }\n ;\n}\nCCI.calculate = cci;\nexport function cci(input) {\n Indicator.reverseInputs(input);\n var result = new CCI(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { SMA } from '../moving_averages/SMA';\nexport class AwesomeOscillatorInput extends IndicatorInput {\n}\nexport class AwesomeOscillator extends Indicator {\n constructor(input) {\n super(input);\n var highs = input.high;\n var lows = input.low;\n var fastPeriod = input.fastPeriod;\n var slowPeriod = input.slowPeriod;\n var slowSMA = new SMA({ values: [], period: slowPeriod });\n var fastSMA = new SMA({ values: [], period: fastPeriod });\n this.result = [];\n this.generator = (function* () {\n var result;\n var tick;\n var medianPrice;\n var slowSmaValue;\n var fastSmaValue;\n tick = yield;\n while (true) {\n medianPrice = (tick.high + tick.low) / 2;\n slowSmaValue = slowSMA.nextValue(medianPrice);\n fastSmaValue = fastSMA.nextValue(medianPrice);\n if (slowSmaValue !== undefined && fastSmaValue !== undefined) {\n result = fastSmaValue - slowSmaValue;\n }\n tick = yield result;\n }\n })();\n this.generator.next();\n highs.forEach((tickHigh, index) => {\n var tickInput = {\n high: tickHigh,\n low: lows[index],\n };\n var result = this.generator.next(tickInput);\n if (result.value != undefined) {\n this.result.push(this.format(result.value));\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return this.format(result.value);\n }\n }\n ;\n}\nAwesomeOscillator.calculate = awesomeoscillator;\nexport function awesomeoscillator(input) {\n Indicator.reverseInputs(input);\n var result = new AwesomeOscillator(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class VWAPInput extends IndicatorInput {\n}\n;\nexport class VWAP extends Indicator {\n constructor(input) {\n super(input);\n var lows = input.low;\n var highs = input.high;\n var closes = input.close;\n var volumes = input.volume;\n var format = this.format;\n if (!((lows.length === highs.length) && (highs.length === closes.length))) {\n throw ('Inputs(low,high, close) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var tick = yield;\n let cumulativeTotal = 0;\n let cumulativeVolume = 0;\n while (true) {\n let typicalPrice = (tick.high + tick.low + tick.close) / 3;\n let total = tick.volume * typicalPrice;\n cumulativeTotal = cumulativeTotal + total;\n cumulativeVolume = cumulativeVolume + tick.volume;\n tick = yield cumulativeTotal / cumulativeVolume;\n ;\n }\n })();\n this.generator.next();\n lows.forEach((tick, index) => {\n var result = this.generator.next({\n high: highs[index],\n low: lows[index],\n close: closes[index],\n volume: volumes[index]\n });\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n ;\n nextValue(price) {\n let result = this.generator.next(price).value;\n if (result != undefined) {\n return result;\n }\n }\n ;\n}\nVWAP.calculate = vwap;\nexport function vwap(input) {\n Indicator.reverseInputs(input);\n var result = new VWAP(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class VolumeProfileInput extends IndicatorInput {\n}\nexport class VolumeProfileOutput {\n}\nexport function priceFallsBetweenBarRange(low, high, low1, high1) {\n return (low <= low1 && high >= low1) || (low1 <= low && high1 >= low);\n}\nexport class VolumeProfile extends Indicator {\n constructor(input) {\n super(input);\n var highs = input.high;\n var lows = input.low;\n var closes = input.close;\n var opens = input.open;\n var volumes = input.volume;\n var bars = input.noOfBars;\n if (!((lows.length === highs.length) && (highs.length === closes.length) && (highs.length === volumes.length))) {\n throw ('Inputs(low,high, close, volumes) not of equal size');\n }\n this.result = [];\n var max = Math.max(...highs, ...lows, ...closes, ...opens);\n var min = Math.min(...highs, ...lows, ...closes, ...opens);\n var barRange = (max - min) / bars;\n var lastEnd = min;\n for (let i = 0; i < bars; i++) {\n let rangeStart = lastEnd;\n let rangeEnd = rangeStart + barRange;\n lastEnd = rangeEnd;\n let bullishVolume = 0;\n let bearishVolume = 0;\n let totalVolume = 0;\n for (let priceBar = 0; priceBar < highs.length; priceBar++) {\n let priceBarStart = lows[priceBar];\n let priceBarEnd = highs[priceBar];\n let priceBarOpen = opens[priceBar];\n let priceBarClose = closes[priceBar];\n let priceBarVolume = volumes[priceBar];\n if (priceFallsBetweenBarRange(rangeStart, rangeEnd, priceBarStart, priceBarEnd)) {\n totalVolume = totalVolume + priceBarVolume;\n if (priceBarOpen > priceBarClose) {\n bearishVolume = bearishVolume + priceBarVolume;\n }\n else {\n bullishVolume = bullishVolume + priceBarVolume;\n }\n }\n }\n this.result.push({\n rangeStart, rangeEnd, bullishVolume, bearishVolume, totalVolume\n });\n }\n }\n ;\n nextValue(price) {\n throw ('Next value not supported for volume profile');\n }\n ;\n}\nVolumeProfile.calculate = volumeprofile;\nexport function volumeprofile(input) {\n Indicator.reverseInputs(input);\n var result = new VolumeProfile(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/4/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class TypicalPriceInput extends IndicatorInput {\n}\nexport class TypicalPrice extends Indicator {\n constructor(input) {\n super(input);\n this.result = [];\n this.generator = (function* () {\n let priceInput = yield;\n while (true) {\n priceInput = yield (priceInput.high + priceInput.low + priceInput.close) / 3;\n }\n })();\n this.generator.next();\n input.low.forEach((tick, index) => {\n var result = this.generator.next({\n high: input.high[index],\n low: input.low[index],\n close: input.close[index],\n });\n this.result.push(result.value);\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n return result;\n }\n ;\n}\nTypicalPrice.calculate = typicalprice;\nexport function typicalprice(input) {\n Indicator.reverseInputs(input);\n var result = new TypicalPrice(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","/**\n * Created by AAravindan on 5/17/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport { TypicalPrice } from '../chart_types/TypicalPrice';\nimport FixedSizeLinkedList from '../Utils/FixedSizeLinkedList';\nexport class MFIInput extends IndicatorInput {\n}\nexport class MFI extends Indicator {\n constructor(input) {\n super(input);\n var highs = input.high;\n var lows = input.low;\n var closes = input.close;\n var volumes = input.volume;\n var period = input.period;\n var typicalPrice = new TypicalPrice({ low: [], high: [], close: [] });\n var positiveFlow = new FixedSizeLinkedList(period, false, false, true);\n var negativeFlow = new FixedSizeLinkedList(period, false, false, true);\n if (!((lows.length === highs.length) && (highs.length === closes.length) && (highs.length === volumes.length))) {\n throw ('Inputs(low,high, close, volumes) not of equal size');\n }\n this.result = [];\n this.generator = (function* () {\n var result;\n var tick;\n var lastClose;\n var positiveFlowForPeriod;\n var rawMoneyFlow = 0;\n var moneyFlowRatio;\n var negativeFlowForPeriod;\n let typicalPriceValue = null;\n let prevousTypicalPrice = null;\n tick = yield;\n lastClose = tick.close; //Fist value \n tick = yield;\n while (true) {\n var { high, low, close, volume } = tick;\n var positionMoney = 0;\n var negativeMoney = 0;\n typicalPriceValue = typicalPrice.nextValue({ high, low, close });\n rawMoneyFlow = typicalPriceValue * volume;\n if ((typicalPriceValue != null) && (prevousTypicalPrice != null)) {\n typicalPriceValue > prevousTypicalPrice ? positionMoney = rawMoneyFlow : negativeMoney = rawMoneyFlow;\n positiveFlow.push(positionMoney);\n negativeFlow.push(negativeMoney);\n positiveFlowForPeriod = positiveFlow.periodSum;\n negativeFlowForPeriod = negativeFlow.periodSum;\n if ((positiveFlow.totalPushed >= period) && (positiveFlow.totalPushed >= period)) {\n moneyFlowRatio = positiveFlowForPeriod / negativeFlowForPeriod;\n result = 100 - 100 / (1 + moneyFlowRatio);\n }\n }\n prevousTypicalPrice = typicalPriceValue;\n tick = yield result;\n }\n })();\n this.generator.next();\n highs.forEach((tickHigh, index) => {\n var tickInput = {\n high: tickHigh,\n low: lows[index],\n close: closes[index],\n volume: volumes[index]\n };\n var result = this.generator.next(tickInput);\n if (result.value != undefined) {\n this.result.push(parseFloat(result.value.toFixed(2)));\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return (parseFloat(result.value.toFixed(2)));\n }\n }\n ;\n}\nMFI.calculate = mfi;\nexport function mfi(input) {\n Indicator.reverseInputs(input);\n var result = new MFI(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { IndicatorInput, Indicator } from '../indicator/indicator';\n/**\n * Created by AAravindan on 5/10/16.\n */\n\"use strict\";\nimport { SMA } from '../moving_averages/SMA';\nimport { RSI } from '../oscillators/RSI';\nimport { Stochastic } from '../momentum/Stochastic';\nexport class StochasticRsiInput extends IndicatorInput {\n}\n;\nexport class StochasticRSIOutput {\n}\n;\nexport class StochasticRSI extends Indicator {\n constructor(input) {\n super(input);\n let closes = input.values;\n let rsiPeriod = input.rsiPeriod;\n let stochasticPeriod = input.stochasticPeriod;\n let kPeriod = input.kPeriod;\n let dPeriod = input.dPeriod;\n let format = this.format;\n this.result = [];\n this.generator = (function* () {\n let index = 1;\n let rsi = new RSI({ period: rsiPeriod, values: [] });\n let stochastic = new Stochastic({ period: stochasticPeriod, high: [], low: [], close: [], signalPeriod: kPeriod });\n let dSma = new SMA({\n period: dPeriod,\n values: [],\n format: (v) => { return v; }\n });\n let lastRSI, stochasticRSI, d, result;\n var tick = yield;\n while (true) {\n lastRSI = rsi.nextValue(tick);\n if (lastRSI !== undefined) {\n var stochasticInput = { high: lastRSI, low: lastRSI, close: lastRSI };\n stochasticRSI = stochastic.nextValue(stochasticInput);\n if (stochasticRSI !== undefined && stochasticRSI.d !== undefined) {\n d = dSma.nextValue(stochasticRSI.d);\n if (d !== undefined)\n result = {\n stochRSI: stochasticRSI.k,\n k: stochasticRSI.d,\n d: d\n };\n }\n }\n tick = yield result;\n }\n })();\n this.generator.next();\n closes.forEach((tick, index) => {\n var result = this.generator.next(tick);\n if (result.value !== undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(input) {\n let nextResult = this.generator.next(input);\n if (nextResult.value !== undefined)\n return nextResult.value;\n }\n ;\n}\nStochasticRSI.calculate = stochasticrsi;\nexport function stochasticrsi(input) {\n Indicator.reverseInputs(input);\n var result = new StochasticRSI(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport FixedSizedLinkedList from './FixedSizeLinkedList';\nexport class HighestInput extends IndicatorInput {\n}\nexport class Highest extends Indicator {\n constructor(input) {\n super(input);\n var values = input.values;\n var period = input.period;\n this.result = [];\n var periodList = new FixedSizedLinkedList(period, true, false, false);\n this.generator = (function* () {\n var result;\n var tick;\n var high;\n tick = yield;\n while (true) {\n periodList.push(tick);\n if (periodList.totalPushed >= period) {\n high = periodList.periodHigh;\n }\n tick = yield high;\n }\n })();\n this.generator.next();\n values.forEach((value, index) => {\n var result = this.generator.next(value);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return result.value;\n }\n }\n ;\n}\nHighest.calculate = highest;\nexport function highest(input) {\n Indicator.reverseInputs(input);\n var result = new Highest(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport FixedSizedLinkedList from './FixedSizeLinkedList';\nexport class LowestInput extends IndicatorInput {\n}\nexport class Lowest extends Indicator {\n constructor(input) {\n super(input);\n var values = input.values;\n var period = input.period;\n this.result = [];\n var periodList = new FixedSizedLinkedList(period, false, true, false);\n this.generator = (function* () {\n var result;\n var tick;\n var high;\n tick = yield;\n while (true) {\n periodList.push(tick);\n if (periodList.totalPushed >= period) {\n high = periodList.periodLow;\n }\n tick = yield high;\n }\n })();\n this.generator.next();\n values.forEach((value, index) => {\n var result = this.generator.next(value);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return result.value;\n }\n }\n ;\n}\nLowest.calculate = lowest;\nexport function lowest(input) {\n Indicator.reverseInputs(input);\n var result = new Lowest(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { Indicator, IndicatorInput } from '../indicator/indicator';\nimport FixedSizedLinkedList from './FixedSizeLinkedList';\nexport class SumInput extends IndicatorInput {\n}\nexport class Sum extends Indicator {\n constructor(input) {\n super(input);\n var values = input.values;\n var period = input.period;\n this.result = [];\n var periodList = new FixedSizedLinkedList(period, false, false, true);\n this.generator = (function* () {\n var result;\n var tick;\n var high;\n tick = yield;\n while (true) {\n periodList.push(tick);\n if (periodList.totalPushed >= period) {\n high = periodList.periodSum;\n }\n tick = yield high;\n }\n })();\n this.generator.next();\n values.forEach((value, index) => {\n var result = this.generator.next(value);\n if (result.value != undefined) {\n this.result.push(result.value);\n }\n });\n }\n ;\n nextValue(price) {\n var result = this.generator.next(price);\n if (result.value != undefined) {\n return result.value;\n }\n }\n ;\n}\nSum.calculate = sum;\nexport function sum(input) {\n Indicator.reverseInputs(input);\n var result = new Sum(input).result;\n if (input.reversedInput) {\n result.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { CandleList } from '../StockData';\nimport { atr } from '../directionalmovement/ATR';\n/**\n * Created by AAravindan on 5/4/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class RenkoInput extends IndicatorInput {\n}\nclass Renko extends Indicator {\n constructor(input) {\n super(input);\n var format = this.format;\n let useATR = input.useATR;\n let brickSize = input.brickSize || 0;\n if (useATR) {\n let atrResult = atr(Object.assign({}, input));\n brickSize = atrResult[atrResult.length - 1];\n }\n this.result = new CandleList();\n ;\n if (brickSize === 0) {\n console.error('Not enough data to calculate brickSize for renko when using ATR');\n return;\n }\n let lastOpen = 0;\n let lastHigh = 0;\n let lastLow = Infinity;\n let lastClose = 0;\n let lastVolume = 0;\n let lastTimestamp = 0;\n this.generator = (function* () {\n let candleData = yield;\n while (true) {\n //Calculating first bar\n if (lastOpen === 0) {\n lastOpen = candleData.close;\n lastHigh = candleData.high;\n lastLow = candleData.low;\n lastClose = candleData.close;\n lastVolume = candleData.volume;\n lastTimestamp = candleData.timestamp;\n candleData = yield;\n continue;\n }\n let absoluteMovementFromClose = Math.abs(candleData.close - lastClose);\n let absoluteMovementFromOpen = Math.abs(candleData.close - lastOpen);\n if ((absoluteMovementFromClose >= brickSize) && (absoluteMovementFromOpen >= brickSize)) {\n let reference = absoluteMovementFromClose > absoluteMovementFromOpen ? lastOpen : lastClose;\n let calculated = {\n open: reference,\n high: lastHigh > candleData.high ? lastHigh : candleData.high,\n low: lastLow < candleData.Low ? lastLow : candleData.low,\n close: reference > candleData.close ? (reference - brickSize) : (reference + brickSize),\n volume: lastVolume + candleData.volume,\n timestamp: candleData.timestamp\n };\n lastOpen = calculated.open;\n lastHigh = calculated.close;\n lastLow = calculated.close;\n lastClose = calculated.close;\n lastVolume = 0;\n candleData = yield calculated;\n }\n else {\n lastHigh = lastHigh > candleData.high ? lastHigh : candleData.high;\n lastLow = lastLow < candleData.Low ? lastLow : candleData.low;\n lastVolume = lastVolume + candleData.volume;\n lastTimestamp = candleData.timestamp;\n candleData = yield;\n }\n }\n })();\n this.generator.next();\n input.low.forEach((tick, index) => {\n var result = this.generator.next({\n open: input.open[index],\n high: input.high[index],\n low: input.low[index],\n close: input.close[index],\n volume: input.volume[index],\n timestamp: input.timestamp[index]\n });\n if (result.value) {\n this.result.open.push(result.value.open);\n this.result.high.push(result.value.high);\n this.result.low.push(result.value.low);\n this.result.close.push(result.value.close);\n this.result.volume.push(result.value.volume);\n this.result.timestamp.push(result.value.timestamp);\n }\n });\n }\n nextValue(price) {\n console.error('Cannot calculate next value on Renko, Every value has to be recomputed for every change, use calcualte method');\n return null;\n }\n ;\n}\nRenko.calculate = renko;\nexport function renko(input) {\n Indicator.reverseInputs(input);\n var result = new Renko(input).result;\n if (input.reversedInput) {\n result.open.reverse();\n result.high.reverse();\n result.low.reverse();\n result.close.reverse();\n result.volume.reverse();\n result.timestamp.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","import { CandleList } from '../StockData';\n/**\n * Created by AAravindan on 5/4/16.\n */\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nexport class HeikinAshiInput extends IndicatorInput {\n}\nexport class HeikinAshi extends Indicator {\n constructor(input) {\n super(input);\n var format = this.format;\n this.result = new CandleList();\n let lastOpen = null;\n let lastHigh = 0;\n let lastLow = Infinity;\n let lastClose = 0;\n let lastVolume = 0;\n let lastTimestamp = 0;\n this.generator = (function* () {\n let candleData = yield;\n let calculated = null;\n while (true) {\n if (lastOpen === null) {\n lastOpen = (candleData.close + candleData.open) / 2;\n lastHigh = candleData.high;\n lastLow = candleData.low;\n lastClose = (candleData.close + candleData.open + candleData.high + candleData.low) / 4;\n lastVolume = (candleData.volume || 0);\n lastTimestamp = (candleData.timestamp || 0);\n calculated = {\n open: lastOpen,\n high: lastHigh,\n low: lastLow,\n close: lastClose,\n volume: candleData.volume || 0,\n timestamp: (candleData.timestamp || 0)\n };\n }\n else {\n let newClose = (candleData.close + candleData.open + candleData.high + candleData.low) / 4;\n let newOpen = (lastOpen + lastClose) / 2;\n let newHigh = Math.max(newOpen, newClose, candleData.high);\n let newLow = Math.min(candleData.low, newOpen, newClose);\n calculated = {\n close: newClose,\n open: newOpen,\n high: newHigh,\n low: newLow,\n volume: (candleData.volume || 0),\n timestamp: (candleData.timestamp || 0)\n };\n lastClose = newClose;\n lastOpen = newOpen;\n lastHigh = newHigh;\n lastLow = newLow;\n }\n candleData = yield calculated;\n }\n })();\n this.generator.next();\n input.low.forEach((tick, index) => {\n var result = this.generator.next({\n open: input.open[index],\n high: input.high[index],\n low: input.low[index],\n close: input.close[index],\n volume: input.volume ? input.volume[index] : input.volume,\n timestamp: input.timestamp ? input.timestamp[index] : input.timestamp\n });\n if (result.value) {\n this.result.open.push(result.value.open);\n this.result.high.push(result.value.high);\n this.result.low.push(result.value.low);\n this.result.close.push(result.value.close);\n this.result.volume.push(result.value.volume);\n this.result.timestamp.push(result.value.timestamp);\n }\n });\n }\n nextValue(price) {\n var result = this.generator.next(price).value;\n return result;\n }\n ;\n}\nHeikinAshi.calculate = heikinashi;\nexport function heikinashi(input) {\n Indicator.reverseInputs(input);\n var result = new HeikinAshi(input).result;\n if (input.reversedInput) {\n result.open.reverse();\n result.high.reverse();\n result.low.reverse();\n result.close.reverse();\n result.volume.reverse();\n result.timestamp.reverse();\n }\n Indicator.reverseInputs(input);\n return result;\n}\n;\n","export default class CandlestickFinder {\n constructor() {\n // if (new.target === Abstract) {\n // throw new TypeError(\"Abstract class\");\n // }\n }\n approximateEqual(a, b) {\n let left = parseFloat(Math.abs(a - b).toPrecision(4)) * 1;\n let right = parseFloat((a * 0.001).toPrecision(4)) * 1;\n return left <= right;\n }\n logic(data) {\n throw \"this has to be implemented\";\n }\n getAllPatternIndex(data) {\n if (data.close.length < this.requiredCount) {\n console.warn('Data count less than data required for the strategy ', this.name);\n return [];\n }\n if (data.reversedInput) {\n data.open.reverse();\n data.high.reverse();\n data.low.reverse();\n data.close.reverse();\n }\n let strategyFn = this.logic;\n return this._generateDataForCandleStick(data)\n .map((current, index) => {\n return strategyFn.call(this, current) ? index : undefined;\n }).filter((hasIndex) => {\n return hasIndex;\n });\n }\n hasPattern(data) {\n if (data.close.length < this.requiredCount) {\n console.warn('Data count less than data required for the strategy ', this.name);\n return false;\n }\n if (data.reversedInput) {\n data.open.reverse();\n data.high.reverse();\n data.low.reverse();\n data.close.reverse();\n }\n let strategyFn = this.logic;\n return strategyFn.call(this, this._getLastDataForCandleStick(data));\n }\n _getLastDataForCandleStick(data) {\n let requiredCount = this.requiredCount;\n if (data.close.length === requiredCount) {\n return data;\n }\n else {\n let returnVal = {\n open: [],\n high: [],\n low: [],\n close: []\n };\n let i = 0;\n let index = data.close.length - requiredCount;\n while (i < requiredCount) {\n returnVal.open.push(data.open[index + i]);\n returnVal.high.push(data.high[index + i]);\n returnVal.low.push(data.low[index + i]);\n returnVal.close.push(data.close[index + i]);\n i++;\n }\n return returnVal;\n }\n }\n _generateDataForCandleStick(data) {\n let requiredCount = this.requiredCount;\n let generatedData = data.close.map(function (currentData, index) {\n let i = 0;\n let returnVal = {\n open: [],\n high: [],\n low: [],\n close: []\n };\n while (i < requiredCount) {\n returnVal.open.push(data.open[index + i]);\n returnVal.high.push(data.high[index + i]);\n returnVal.low.push(data.low[index + i]);\n returnVal.close.push(data.close[index + i]);\n i++;\n }\n return returnVal;\n }).filter((val, index) => { return (index <= (data.close.length - requiredCount)); });\n return generatedData;\n }\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class MorningStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'MorningStar';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let isSmallBodyExists = ((firstdaysLow > seconddaysLow) &&\n (firstdaysLow > seconddaysHigh));\n let isThirdBullish = thirddaysOpen < thirddaysClose;\n let gapExists = ((seconddaysHigh < firstdaysLow) &&\n (seconddaysLow < firstdaysLow) &&\n (thirddaysOpen > seconddaysHigh) &&\n (seconddaysClose < thirddaysOpen));\n let doesCloseAboveFirstMidpoint = thirddaysClose > firstdaysMidpoint;\n return (isFirstBearish && isSmallBodyExists && gapExists && isThirdBullish && doesCloseAboveFirstMidpoint);\n }\n}\nexport function morningstar(data) {\n return new MorningStar().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishEngulfingPattern extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishEngulfingPattern';\n this.requiredCount = 2;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBullishEngulfing = ((firstdaysClose < firstdaysOpen) &&\n (firstdaysOpen > seconddaysOpen) &&\n (firstdaysClose > seconddaysOpen) &&\n (firstdaysOpen < seconddaysClose));\n return (isBullishEngulfing);\n }\n}\nexport function bullishengulfingpattern(data) {\n return new BullishEngulfingPattern().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishHarami extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = \"BullishHarami\";\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBullishHaramiPattern = ((firstdaysOpen > seconddaysOpen) &&\n (firstdaysClose < seconddaysOpen) &&\n (firstdaysClose < seconddaysClose) &&\n (firstdaysOpen > seconddaysLow) &&\n (firstdaysHigh > seconddaysHigh));\n return (isBullishHaramiPattern);\n }\n}\nexport function bullishharami(data) {\n return new BullishHarami().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishHaramiCross extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = 'BullishHaramiCross';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBullishHaramiCrossPattern = ((firstdaysOpen > seconddaysOpen) &&\n (firstdaysClose < seconddaysOpen) &&\n (firstdaysClose < seconddaysClose) &&\n (firstdaysOpen > seconddaysLow) &&\n (firstdaysHigh > seconddaysHigh));\n let isSecondDayDoji = this.approximateEqual(seconddaysOpen, seconddaysClose);\n return (isBullishHaramiCrossPattern && isSecondDayDoji);\n }\n}\nexport function bullishharamicross(data) {\n return new BullishHaramiCross().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class Doji extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'Doji';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isOpenEqualsClose = this.approximateEqual(daysOpen, daysClose);\n let isHighEqualsOpen = isOpenEqualsClose && this.approximateEqual(daysOpen, daysHigh);\n let isLowEqualsClose = isOpenEqualsClose && this.approximateEqual(daysClose, daysLow);\n return (isOpenEqualsClose && isHighEqualsOpen == isLowEqualsClose);\n }\n}\nexport function doji(data) {\n return new Doji().hasPattern(data);\n}\n","import Doji from './Doji';\nimport CandlestickFinder from './CandlestickFinder';\nexport default class MorningDojiStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'MorningDojiStar';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let dojiExists = new Doji().hasPattern({\n \"open\": [seconddaysOpen],\n \"close\": [seconddaysClose],\n \"high\": [seconddaysHigh],\n \"low\": [seconddaysLow]\n });\n let isThirdBullish = thirddaysOpen < thirddaysClose;\n let gapExists = ((seconddaysHigh < firstdaysLow) &&\n (seconddaysLow < firstdaysLow) &&\n (thirddaysOpen > seconddaysHigh) &&\n (seconddaysClose < thirddaysOpen));\n let doesCloseAboveFirstMidpoint = thirddaysClose > firstdaysMidpoint;\n return (isFirstBearish && dojiExists && isThirdBullish && gapExists &&\n doesCloseAboveFirstMidpoint);\n }\n}\nexport function morningdojistar(data) {\n return new MorningDojiStar().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class DownsideTasukiGap extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 3;\n this.name = 'DownsideTasukiGap';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let isSecondBearish = seconddaysClose < seconddaysOpen;\n let isThirdBullish = thirddaysClose > thirddaysOpen;\n let isFirstGapExists = seconddaysHigh < firstdaysLow;\n let isDownsideTasukiGap = ((seconddaysOpen > thirddaysOpen) &&\n (seconddaysClose < thirddaysOpen) &&\n (thirddaysClose > seconddaysOpen) &&\n (thirddaysClose < firstdaysClose));\n return (isFirstBearish && isSecondBearish && isThirdBullish && isFirstGapExists && isDownsideTasukiGap);\n }\n}\nexport function downsidetasukigap(data) {\n return new DownsideTasukiGap().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishMarubozu extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishMarubozu';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBullishMarbozu = this.approximateEqual(daysClose, daysHigh) &&\n this.approximateEqual(daysLow, daysOpen) &&\n daysOpen < daysClose &&\n daysOpen < daysHigh;\n return (isBullishMarbozu);\n }\n}\nexport function bullishmarubozu(data) {\n return new BullishMarubozu().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class PiercingLine extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = 'PiercingLine';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isDowntrend = seconddaysLow < firstdaysLow;\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let isSecondBullish = seconddaysClose > seconddaysOpen;\n let isPiercingLinePattern = ((firstdaysLow > seconddaysOpen) &&\n (seconddaysClose > firstdaysMidpoint));\n return (isDowntrend && isFirstBearish && isPiercingLinePattern && isSecondBullish);\n }\n}\nexport function piercingline(data) {\n return new PiercingLine().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class ThreeWhiteSoldiers extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'ThreeWhiteSoldiers';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let isUpTrend = seconddaysHigh > firstdaysHigh &&\n thirddaysHigh > seconddaysHigh;\n let isAllBullish = firstdaysOpen < firstdaysClose &&\n seconddaysOpen < seconddaysClose &&\n thirddaysOpen < thirddaysClose;\n let doesOpenWithinPreviousBody = firstdaysClose > seconddaysOpen &&\n seconddaysOpen < firstdaysHigh &&\n seconddaysHigh > thirddaysOpen &&\n thirddaysOpen < seconddaysClose;\n return (isUpTrend && isAllBullish && doesOpenWithinPreviousBody);\n }\n}\nexport function threewhitesoldiers(data) {\n return new ThreeWhiteSoldiers().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishHammerStick extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishHammerStick';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBullishHammer = daysClose > daysOpen;\n isBullishHammer = isBullishHammer && this.approximateEqual(daysClose, daysHigh);\n isBullishHammer = isBullishHammer && (daysClose - daysOpen) <= 2 * (daysOpen - daysLow);\n return isBullishHammer;\n }\n}\nexport function bullishhammerstick(data) {\n return new BullishHammerStick().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishInvertedHammerStick extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishInvertedHammerStick';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBullishInvertedHammer = daysClose > daysOpen;\n isBullishInvertedHammer = isBullishInvertedHammer && this.approximateEqual(daysOpen, daysLow);\n isBullishInvertedHammer = isBullishInvertedHammer && (daysClose - daysOpen) <= 2 * (daysHigh - daysClose);\n return isBullishInvertedHammer;\n }\n}\nexport function bullishinvertedhammerstick(data) {\n return new BullishInvertedHammerStick().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishHammerStick extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishHammerStick';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBearishHammer = daysOpen > daysClose;\n isBearishHammer = isBearishHammer && this.approximateEqual(daysOpen, daysHigh);\n isBearishHammer = isBearishHammer && (daysOpen - daysClose) <= 2 * (daysClose - daysLow);\n return isBearishHammer;\n }\n}\nexport function bearishhammerstick(data) {\n return new BearishHammerStick().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishInvertedHammerStick extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishInvertedHammerStick';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBearishInvertedHammer = daysOpen > daysClose;\n isBearishInvertedHammer = isBearishInvertedHammer && this.approximateEqual(daysClose, daysLow);\n isBearishInvertedHammer = isBearishInvertedHammer && (daysOpen - daysClose) <= 2 * (daysHigh - daysOpen);\n return isBearishInvertedHammer;\n }\n}\nexport function bearishinvertedhammerstick(data) {\n return new BearishInvertedHammerStick().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nimport { bearishhammerstick } from './BearishHammerStick';\nimport { bearishinvertedhammerstick } from './BearishInvertedHammerStick';\nimport { bullishhammerstick } from './BullishHammerStick';\nimport { bullishinvertedhammerstick } from './BullishInvertedHammerStick';\nexport default class HammerPattern extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'HammerPattern';\n this.requiredCount = 5;\n }\n logic(data) {\n let isPattern = this.downwardTrend(data);\n isPattern = isPattern && this.includesHammer(data);\n isPattern = isPattern && this.hasConfirmation(data);\n return isPattern;\n }\n downwardTrend(data, confirm = true) {\n let end = confirm ? 3 : 4;\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, end), period: end - 1 });\n let losses = averageloss({ values: data.close.slice(0, end), period: end - 1 });\n // Downward trend, so more losses than gains\n return losses > gains;\n }\n includesHammer(data, confirm = true) {\n let start = confirm ? 3 : 4;\n let end = confirm ? 4 : undefined;\n let possibleHammerData = {\n open: data.open.slice(start, end),\n close: data.close.slice(start, end),\n low: data.low.slice(start, end),\n high: data.high.slice(start, end),\n };\n let isPattern = bearishhammerstick(possibleHammerData);\n isPattern = isPattern || bearishinvertedhammerstick(possibleHammerData);\n isPattern = isPattern || bullishhammerstick(possibleHammerData);\n isPattern = isPattern || bullishinvertedhammerstick(possibleHammerData);\n return isPattern;\n }\n hasConfirmation(data) {\n let possibleHammer = {\n open: data.open[3],\n close: data.close[3],\n low: data.low[3],\n high: data.high[3],\n };\n let possibleConfirmation = {\n open: data.open[4],\n close: data.close[4],\n low: data.low[4],\n high: data.high[4],\n };\n // Confirmation candlestick is bullish\n let isPattern = possibleConfirmation.open < possibleConfirmation.close;\n return isPattern && possibleHammer.close < possibleConfirmation.close;\n }\n}\nexport function hammerpattern(data) {\n return new HammerPattern().hasPattern(data);\n}\n","import HammerPattern from './HammerPattern';\nexport default class HammerPatternUnconfirmed extends HammerPattern {\n constructor() {\n super();\n this.name = 'HammerPatternUnconfirmed';\n }\n logic(data) {\n let isPattern = this.downwardTrend(data, false);\n isPattern = isPattern && this.includesHammer(data, false);\n return isPattern;\n }\n}\nexport function hammerpatternunconfirmed(data) {\n return new HammerPatternUnconfirmed().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nexport default class TweezerBottom extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'TweezerBottom';\n this.requiredCount = 5;\n }\n logic(data) {\n return this.downwardTrend(data) && data.low[3] == data.low[4];\n }\n downwardTrend(data) {\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, 3), period: 2 });\n let losses = averageloss({ values: data.close.slice(0, 3), period: 2 });\n // Downward trend, so more losses than gains\n return losses > gains;\n }\n}\nexport function tweezerbottom(data) {\n return new TweezerBottom().hasPattern(data);\n}\n","import MorningStar from './MorningStar';\nimport BullishEngulfingPattern from './BullishEngulfingPattern';\nimport BullishHarami from './BullishHarami';\nimport BullishHaramiCross from './BullishHaramiCross';\nimport MorningDojiStar from './MorningDojiStar';\nimport DownsideTasukiGap from './DownsideTasukiGap';\nimport BullishMarubozu from './BullishMarubozu';\nimport PiercingLine from './PiercingLine';\nimport ThreeWhiteSoldiers from './ThreeWhiteSoldiers';\nimport BullishHammerStick from './BullishHammerStick';\nimport BullishInvertedHammerStick from './BullishInvertedHammerStick';\nimport HammerPattern from './HammerPattern';\nimport HammerPatternUnconfirmed from './HammerPatternUnconfirmed';\nimport CandlestickFinder from './CandlestickFinder';\nimport TweezerBottom from './TweezerBottom';\nlet bullishPatterns = [\n new BullishEngulfingPattern(),\n new DownsideTasukiGap(),\n new BullishHarami(),\n new BullishHaramiCross(),\n new MorningDojiStar(),\n new MorningStar(),\n new BullishMarubozu(),\n new PiercingLine(),\n new ThreeWhiteSoldiers(),\n new BullishHammerStick(),\n new BullishInvertedHammerStick(),\n new HammerPattern(),\n new HammerPatternUnconfirmed(),\n new TweezerBottom()\n];\nexport default class BullishPatterns extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'Bullish Candlesticks';\n }\n hasPattern(data) {\n return bullishPatterns.reduce(function (state, pattern) {\n let result = pattern.hasPattern(data);\n return state || result;\n }, false);\n }\n}\nexport function bullish(data) {\n return new BullishPatterns().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishEngulfingPattern extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishEngulfingPattern';\n this.requiredCount = 2;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBearishEngulfing = ((firstdaysClose > firstdaysOpen) &&\n (firstdaysOpen < seconddaysOpen) &&\n (firstdaysClose < seconddaysOpen) &&\n (firstdaysOpen > seconddaysClose));\n return (isBearishEngulfing);\n }\n}\nexport function bearishengulfingpattern(data) {\n return new BearishEngulfingPattern().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishHarami extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = 'BearishHarami';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBearishHaramiPattern = ((firstdaysOpen < seconddaysOpen) &&\n (firstdaysClose > seconddaysOpen) &&\n (firstdaysClose > seconddaysClose) &&\n (firstdaysOpen < seconddaysLow) &&\n (firstdaysHigh > seconddaysHigh));\n return (isBearishHaramiPattern);\n }\n}\nexport function bearishharami(data) {\n return new BearishHarami().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishHaramiCross extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 2;\n this.name = 'BearishHaramiCross';\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let isBearishHaramiCrossPattern = ((firstdaysOpen < seconddaysOpen) &&\n (firstdaysClose > seconddaysOpen) &&\n (firstdaysClose > seconddaysClose) &&\n (firstdaysOpen < seconddaysLow) &&\n (firstdaysHigh > seconddaysHigh));\n let isSecondDayDoji = this.approximateEqual(seconddaysOpen, seconddaysClose);\n return (isBearishHaramiCrossPattern && isSecondDayDoji);\n }\n}\nexport function bearishharamicross(data) {\n return new BearishHaramiCross().hasPattern(data);\n}\n","import Doji from './Doji';\nimport CandlestickFinder from './CandlestickFinder';\nexport default class EveningDojiStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'EveningDojiStar';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isFirstBullish = firstdaysClose > firstdaysOpen;\n let dojiExists = new Doji().hasPattern({\n \"open\": [seconddaysOpen],\n \"close\": [seconddaysClose],\n \"high\": [seconddaysHigh],\n \"low\": [seconddaysLow]\n });\n let isThirdBearish = thirddaysOpen > thirddaysClose;\n let gapExists = ((seconddaysHigh > firstdaysHigh) &&\n (seconddaysLow > firstdaysHigh) &&\n (thirddaysOpen < seconddaysLow) &&\n (seconddaysClose > thirddaysOpen));\n let doesCloseBelowFirstMidpoint = thirddaysClose < firstdaysMidpoint;\n return (isFirstBullish && dojiExists && gapExists && isThirdBearish && doesCloseBelowFirstMidpoint);\n }\n}\nexport function eveningdojistar(data) {\n return new EveningDojiStar().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class EveningStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'EveningStar';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let firstdaysMidpoint = ((firstdaysOpen + firstdaysClose) / 2);\n let isFirstBullish = firstdaysClose > firstdaysOpen;\n let isSmallBodyExists = ((firstdaysHigh < seconddaysLow) &&\n (firstdaysHigh < seconddaysHigh));\n let isThirdBearish = thirddaysOpen > thirddaysClose;\n let gapExists = ((seconddaysHigh > firstdaysHigh) &&\n (seconddaysLow > firstdaysHigh) &&\n (thirddaysOpen < seconddaysLow) &&\n (seconddaysClose > thirddaysOpen));\n let doesCloseBelowFirstMidpoint = thirddaysClose < firstdaysMidpoint;\n return (isFirstBullish && isSmallBodyExists && gapExists && isThirdBearish && doesCloseBelowFirstMidpoint);\n }\n}\nexport function eveningstar(data) {\n return new EveningStar().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishMarubozu extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishMarubozu';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isBearishMarbozu = this.approximateEqual(daysOpen, daysHigh) &&\n this.approximateEqual(daysLow, daysClose) &&\n daysOpen > daysClose &&\n daysOpen > daysLow;\n return (isBearishMarbozu);\n }\n}\nexport function bearishmarubozu(data) {\n return new BearishMarubozu().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class ThreeBlackCrows extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'ThreeBlackCrows';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let isDownTrend = firstdaysLow > seconddaysLow &&\n seconddaysLow > thirddaysLow;\n let isAllBearish = firstdaysOpen > firstdaysClose &&\n seconddaysOpen > seconddaysClose &&\n thirddaysOpen > thirddaysClose;\n let doesOpenWithinPreviousBody = firstdaysOpen > seconddaysOpen &&\n seconddaysOpen > firstdaysClose &&\n seconddaysOpen > thirddaysOpen &&\n thirddaysOpen > seconddaysClose;\n return (isDownTrend && isAllBearish && doesOpenWithinPreviousBody);\n }\n}\nexport function threeblackcrows(data) {\n return new ThreeBlackCrows().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nimport { bearishhammerstick } from './BearishHammerStick';\nimport { bullishhammerstick } from './BullishHammerStick';\nexport default class HangingMan extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'HangingMan';\n this.requiredCount = 5;\n }\n logic(data) {\n let isPattern = this.upwardTrend(data);\n isPattern = isPattern && this.includesHammer(data);\n isPattern = isPattern && this.hasConfirmation(data);\n return isPattern;\n }\n upwardTrend(data, confirm = true) {\n let end = confirm ? 3 : 4;\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, end), period: end - 1 });\n let losses = averageloss({ values: data.close.slice(0, end), period: end - 1 });\n // Upward trend, so more gains than losses\n return gains > losses;\n }\n includesHammer(data, confirm = true) {\n let start = confirm ? 3 : 4;\n let end = confirm ? 4 : undefined;\n let possibleHammerData = {\n open: data.open.slice(start, end),\n close: data.close.slice(start, end),\n low: data.low.slice(start, end),\n high: data.high.slice(start, end),\n };\n let isPattern = bearishhammerstick(possibleHammerData);\n isPattern = isPattern || bullishhammerstick(possibleHammerData);\n return isPattern;\n }\n hasConfirmation(data) {\n let possibleHammer = {\n open: data.open[3],\n close: data.close[3],\n low: data.low[3],\n high: data.high[3],\n };\n let possibleConfirmation = {\n open: data.open[4],\n close: data.close[4],\n low: data.low[4],\n high: data.high[4],\n };\n // Confirmation candlestick is bearish\n let isPattern = possibleConfirmation.open > possibleConfirmation.close;\n return isPattern && possibleHammer.close > possibleConfirmation.close;\n }\n}\nexport function hangingman(data) {\n return new HangingMan().hasPattern(data);\n}\n","import HangingMan from './HangingMan';\nexport default class HangingManUnconfirmed extends HangingMan {\n constructor() {\n super();\n this.name = 'HangingManUnconfirmed';\n }\n logic(data) {\n let isPattern = this.upwardTrend(data, false);\n isPattern = isPattern && this.includesHammer(data, false);\n return isPattern;\n }\n}\nexport function hangingmanunconfirmed(data) {\n return new HangingManUnconfirmed().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nimport { bearishinvertedhammerstick } from './BearishInvertedHammerStick';\nimport { bullishinvertedhammerstick } from './BullishInvertedHammerStick';\nexport default class ShootingStar extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'ShootingStar';\n this.requiredCount = 5;\n }\n logic(data) {\n let isPattern = this.upwardTrend(data);\n isPattern = isPattern && this.includesHammer(data);\n isPattern = isPattern && this.hasConfirmation(data);\n return isPattern;\n }\n upwardTrend(data, confirm = true) {\n let end = confirm ? 3 : 4;\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, end), period: end - 1 });\n let losses = averageloss({ values: data.close.slice(0, end), period: end - 1 });\n // Upward trend, so more gains than losses\n return gains > losses;\n }\n includesHammer(data, confirm = true) {\n let start = confirm ? 3 : 4;\n let end = confirm ? 4 : undefined;\n let possibleHammerData = {\n open: data.open.slice(start, end),\n close: data.close.slice(start, end),\n low: data.low.slice(start, end),\n high: data.high.slice(start, end),\n };\n let isPattern = bearishinvertedhammerstick(possibleHammerData);\n isPattern = isPattern || bullishinvertedhammerstick(possibleHammerData);\n return isPattern;\n }\n hasConfirmation(data) {\n let possibleHammer = {\n open: data.open[3],\n close: data.close[3],\n low: data.low[3],\n high: data.high[3],\n };\n let possibleConfirmation = {\n open: data.open[4],\n close: data.close[4],\n low: data.low[4],\n high: data.high[4],\n };\n // Confirmation candlestick is bearish\n let isPattern = possibleConfirmation.open > possibleConfirmation.close;\n return isPattern && possibleHammer.close > possibleConfirmation.close;\n }\n}\nexport function shootingstar(data) {\n return new ShootingStar().hasPattern(data);\n}\n","import ShootingStar from './ShootingStar';\nexport default class ShootingStarUnconfirmed extends ShootingStar {\n constructor() {\n super();\n this.name = 'ShootingStarUnconfirmed';\n }\n logic(data) {\n let isPattern = this.upwardTrend(data, false);\n isPattern = isPattern && this.includesHammer(data, false);\n return isPattern;\n }\n}\nexport function shootingstarunconfirmed(data) {\n return new ShootingStarUnconfirmed().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport { averageloss } from '../Utils/AverageLoss';\nimport { averagegain } from '../Utils/AverageGain';\nexport default class TweezerTop extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'TweezerTop';\n this.requiredCount = 5;\n }\n logic(data) {\n return this.upwardTrend(data) && data.high[3] == data.high[4];\n }\n upwardTrend(data) {\n // Analyze trends in closing prices of the first three or four candlesticks\n let gains = averagegain({ values: data.close.slice(0, 3), period: 2 });\n let losses = averageloss({ values: data.close.slice(0, 3), period: 2 });\n // Upward trend, so more gains than losses\n return gains > losses;\n }\n}\nexport function tweezertop(data) {\n return new TweezerTop().hasPattern(data);\n}\n","import BearishEngulfingPattern from './BearishEngulfingPattern';\nimport BearishHarami from './BearishHarami';\nimport BearishHaramiCross from './BearishHaramiCross';\nimport EveningDojiStar from './EveningDojiStar';\nimport EveningStar from './EveningStar';\nimport BearishMarubozu from './BearishMarubozu';\nimport ThreeBlackCrows from './ThreeBlackCrows';\nimport BearishHammerStick from './BearishHammerStick';\nimport BearishInvertedHammerStick from './BearishInvertedHammerStick';\nimport HangingMan from './HangingMan';\nimport HangingManUnconfirmed from './HangingManUnconfirmed';\nimport ShootingStar from './ShootingStar';\nimport ShootingStarUnconfirmed from './ShootingStarUnconfirmed';\nimport TweezerTop from './TweezerTop';\nimport CandlestickFinder from './CandlestickFinder';\nlet bearishPatterns = [\n new BearishEngulfingPattern(),\n new BearishHarami(),\n new BearishHaramiCross(),\n new EveningDojiStar(),\n new EveningStar(),\n new BearishMarubozu(),\n new ThreeBlackCrows(),\n new BearishHammerStick(),\n new BearishInvertedHammerStick(),\n new HangingMan(),\n new HangingManUnconfirmed(),\n new ShootingStar(),\n new ShootingStarUnconfirmed(),\n new TweezerTop()\n];\nexport default class BearishPatterns extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'Bearish Candlesticks';\n }\n hasPattern(data) {\n return bearishPatterns.reduce(function (state, pattern) {\n return state || pattern.hasPattern(data);\n }, false);\n }\n}\nexport function bearish(data) {\n return new BearishPatterns().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nimport Doji from './Doji';\nexport default class AbandonedBaby extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'AbandonedBaby';\n this.requiredCount = 3;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let thirddaysOpen = data.open[2];\n let thirddaysClose = data.close[2];\n let thirddaysHigh = data.high[2];\n let thirddaysLow = data.low[2];\n let isFirstBearish = firstdaysClose < firstdaysOpen;\n let dojiExists = new Doji().hasPattern({\n \"open\": [seconddaysOpen],\n \"close\": [seconddaysClose],\n \"high\": [seconddaysHigh],\n \"low\": [seconddaysLow]\n });\n let gapExists = ((seconddaysHigh < firstdaysLow) &&\n (thirddaysLow > seconddaysHigh) &&\n (thirddaysClose > thirddaysOpen));\n let isThirdBullish = (thirddaysHigh < firstdaysOpen);\n return (isFirstBearish && dojiExists && gapExists && isThirdBullish);\n }\n}\nexport function abandonedbaby(data) {\n return new AbandonedBaby().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class DarkCloudCover extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'DarkCloudCover';\n this.requiredCount = 2;\n }\n logic(data) {\n let firstdaysOpen = data.open[0];\n let firstdaysClose = data.close[0];\n let firstdaysHigh = data.high[0];\n let firstdaysLow = data.low[0];\n let seconddaysOpen = data.open[1];\n let seconddaysClose = data.close[1];\n let seconddaysHigh = data.high[1];\n let seconddaysLow = data.low[1];\n let firstdayMidpoint = ((firstdaysClose + firstdaysOpen) / 2);\n let isFirstBullish = firstdaysClose > firstdaysOpen;\n let isSecondBearish = seconddaysClose < seconddaysOpen;\n let isDarkCloudPattern = ((seconddaysOpen > firstdaysHigh) &&\n (seconddaysClose < firstdayMidpoint) &&\n (seconddaysClose > firstdaysOpen));\n return (isFirstBullish && isSecondBearish && isDarkCloudPattern);\n }\n}\nexport function darkcloudcover(data) {\n return new DarkCloudCover().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class DragonFlyDoji extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 1;\n this.name = 'DragonFlyDoji';\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isOpenEqualsClose = this.approximateEqual(daysOpen, daysClose);\n let isHighEqualsOpen = isOpenEqualsClose && this.approximateEqual(daysOpen, daysHigh);\n let isLowEqualsClose = isOpenEqualsClose && this.approximateEqual(daysClose, daysLow);\n return (isOpenEqualsClose && isHighEqualsOpen && !isLowEqualsClose);\n }\n}\nexport function dragonflydoji(data) {\n return new DragonFlyDoji().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class GraveStoneDoji extends CandlestickFinder {\n constructor() {\n super();\n this.requiredCount = 1;\n this.name = 'GraveStoneDoji';\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let isOpenEqualsClose = this.approximateEqual(daysOpen, daysClose);\n let isHighEqualsOpen = isOpenEqualsClose && this.approximateEqual(daysOpen, daysHigh);\n let isLowEqualsClose = isOpenEqualsClose && this.approximateEqual(daysClose, daysLow);\n return (isOpenEqualsClose && isLowEqualsClose && !isHighEqualsOpen);\n }\n}\nexport function gravestonedoji(data) {\n return new GraveStoneDoji().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BullishSpinningTop extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BullishSpinningTop';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let bodyLength = Math.abs(daysClose - daysOpen);\n let upperShadowLength = Math.abs(daysHigh - daysClose);\n let lowerShadowLength = Math.abs(daysOpen - daysLow);\n let isBullishSpinningTop = bodyLength < upperShadowLength &&\n bodyLength < lowerShadowLength;\n return isBullishSpinningTop;\n }\n}\nexport function bullishspinningtop(data) {\n return new BullishSpinningTop().hasPattern(data);\n}\n","import CandlestickFinder from './CandlestickFinder';\nexport default class BearishSpinningTop extends CandlestickFinder {\n constructor() {\n super();\n this.name = 'BearishSpinningTop';\n this.requiredCount = 1;\n }\n logic(data) {\n let daysOpen = data.open[0];\n let daysClose = data.close[0];\n let daysHigh = data.high[0];\n let daysLow = data.low[0];\n let bodyLength = Math.abs(daysClose - daysOpen);\n let upperShadowLength = Math.abs(daysHigh - daysOpen);\n let lowerShadowLength = Math.abs(daysHigh - daysLow);\n let isBearishSpinningTop = bodyLength < upperShadowLength &&\n bodyLength < lowerShadowLength;\n return isBearishSpinningTop;\n }\n}\nexport function bearishspinningtop(data) {\n return new BearishSpinningTop().hasPattern(data);\n}\n","/**\n * Calcaultes the fibonacci retracements for given start and end points\n *\n * If calculating for up trend start should be low and end should be high and vice versa\n *\n * returns an array of retracements level containing [0 , 23.6, 38.2, 50, 61.8, 78.6, 100, 127.2, 161.8, 261.8, 423.6]\n *\n * @export\n * @param {number} start\n * @param {number} end\n * @returns {number[]}\n */\nexport function fibonacciretracement(start, end) {\n let levels = [0, 23.6, 38.2, 50, 61.8, 78.6, 100, 127.2, 161.8, 261.8, 423.6];\n let retracements;\n if (start < end) {\n retracements = levels.map(function (level) {\n let calculated = end - Math.abs(start - end) * (level) / 100;\n return calculated > 0 ? calculated : 0;\n });\n }\n else {\n retracements = levels.map(function (level) {\n let calculated = end + Math.abs(start - end) * (level) / 100;\n return calculated > 0 ? calculated : 0;\n });\n }\n return retracements;\n}\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { Indicator, IndicatorInput } from '../indicator/indicator';\nimport * as tf from '@tensorflow/tfjs';\nvar isNodeEnvironment = false;\nvar model;\nvar oneHotMap = ['IHS', 'TU', 'DB', 'HS', 'TD', 'DT'];\ntry {\n isNodeEnvironment = Object.prototype.toString.call(global.process) === '[object process]';\n}\ncatch (e) { }\nexport class PatternDetectorInput extends IndicatorInput {\n constructor(values) {\n super();\n this.values = values;\n }\n}\nexport var AvailablePatterns;\n(function (AvailablePatterns) {\n AvailablePatterns[AvailablePatterns[\"IHS\"] = 0] = \"IHS\";\n AvailablePatterns[AvailablePatterns[\"TU\"] = 1] = \"TU\";\n AvailablePatterns[AvailablePatterns[\"DB\"] = 2] = \"DB\";\n AvailablePatterns[AvailablePatterns[\"HS\"] = 3] = \"HS\";\n AvailablePatterns[AvailablePatterns[\"TD\"] = 4] = \"TD\";\n AvailablePatterns[AvailablePatterns[\"DT\"] = 5] = \"DT\";\n})(AvailablePatterns || (AvailablePatterns = {}));\nfunction interpolateArray(data, fitCount) {\n var linearInterpolate = function (before, after, atPoint) {\n return before + (after - before) * atPoint;\n };\n var newData = new Array();\n var springFactor = new Number((data.length - 1) / (fitCount - 1));\n newData[0] = data[0]; // for new allocation\n for (var i = 1; i < fitCount - 1; i++) {\n var tmp = i * springFactor;\n var before = new Number(Math.floor(tmp)).toFixed();\n var after = new Number(Math.ceil(tmp)).toFixed();\n var atPoint = tmp - before;\n newData[i] = linearInterpolate(data[before], data[after], atPoint);\n }\n newData[fitCount - 1] = data[data.length - 1]; // for new allocation\n return newData;\n}\n;\nfunction l2Normalize(arr) {\n var sum = arr.reduce((cum, value) => { return cum + (value * value); }, 0);\n var norm = Math.sqrt(sum);\n return arr.map((v) => v / norm);\n}\nexport class PatternDetectorOutput {\n}\nvar modelLoaded = false;\nvar laodingModel = false;\nvar loadingPromise;\nfunction loadModel() {\n return __awaiter(this, void 0, void 0, function* () {\n if (modelLoaded)\n return Promise.resolve(true);\n if (laodingModel)\n return loadingPromise;\n loadingPromise = new Promise(function (resolve, reject) {\n return __awaiter(this, void 0, void 0, function* () {\n if (isNodeEnvironment) {\n console.log('Nodejs Environment detected ');\n var tfnode = require('@tensorflow/tfjs-node');\n var modelPath = require('path').resolve(__dirname, '../tf_model/model.json');\n model = yield tf.loadModel(tfnode.io.fileSystem(modelPath));\n }\n else {\n console.log('Browser Environment detected ');\n if ((typeof tf === \"undefined\") || (typeof tf.loadModel === \"undefined\")) {\n console.log('Tensorflow js not imported, pattern detection may not work');\n modelLoaded = false;\n laodingModel = false;\n resolve();\n return;\n }\n model = yield tf.loadModel('/tf_model/model.json');\n }\n modelLoaded = true;\n laodingModel = false;\n resolve();\n return;\n });\n });\n laodingModel = true;\n return;\n });\n}\nloadModel();\nexport function predictPattern(input) {\n return __awaiter(this, void 0, void 0, function* () {\n yield loadModel();\n if (input.values.length < 300) {\n console.warn('Pattern detector requires atleast 300 data points for a reliable prediction, received just ', input.values.length);\n }\n Indicator.reverseInputs(input);\n var values = input.values;\n var output = yield model.predict(tf.tensor2d([l2Normalize(interpolateArray(values, 400))]));\n var index = tf.argMax(output, 1).get(0);\n Indicator.reverseInputs(input);\n return { patternId: index, pattern: oneHotMap[index], probability: output.get(0, 4) * 100 };\n });\n}\nexport function hasDoubleBottom(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.DB);\n });\n}\nexport function hasDoubleTop(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.DT);\n });\n}\nexport function hasHeadAndShoulder(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.HS);\n });\n}\nexport function hasInverseHeadAndShoulder(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.IHS);\n });\n}\nexport function isTrendingUp(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.TU);\n });\n}\nexport function isTrendingDown(input) {\n return __awaiter(this, void 0, void 0, function* () {\n var result = yield predictPattern(input);\n return (result.patternId === AvailablePatterns.TD);\n });\n}\nexport class PatternDetector extends Indicator {\n}\nPatternDetector.predictPattern = predictPattern;\nPatternDetector.hasDoubleBottom = hasDoubleBottom;\nPatternDetector.hasDoubleTop = hasDoubleTop;\nPatternDetector.hasHeadAndShoulder = hasHeadAndShoulder;\nPatternDetector.hasInverseHeadAndShoulder = hasInverseHeadAndShoulder;\nPatternDetector.isTrendingUp = isTrendingUp;\nPatternDetector.isTrendingDown = isTrendingDown;\n","export * from './lib/index.js';\nexport function getAvailableIndicators () {\n let AvailableIndicators = []\n AvailableIndicators.push('sma');\n AvailableIndicators.push('ema');\n AvailableIndicators.push('wma');\n AvailableIndicators.push('wema');\n AvailableIndicators.push('macd');\n AvailableIndicators.push('rsi');\n AvailableIndicators.push('bollingerbands');\n AvailableIndicators.push('adx');\n AvailableIndicators.push('atr');\n AvailableIndicators.push('truerange');\n AvailableIndicators.push('roc');\n AvailableIndicators.push('kst');\n AvailableIndicators.push('psar');\n AvailableIndicators.push('stochastic');\n AvailableIndicators.push('williamsr');\n AvailableIndicators.push('adl');\n AvailableIndicators.push('obv');\n AvailableIndicators.push('trix');\n\n AvailableIndicators.push('cci');\n AvailableIndicators.push('awesomeoscillator');\n AvailableIndicators.push('forceindex');\n AvailableIndicators.push('vwap');\n AvailableIndicators.push('volumeprofile');\n AvailableIndicators.push('renko');\n AvailableIndicators.push('heikinashi');\n\n AvailableIndicators.push('stochasticrsi');\n AvailableIndicators.push('mfi');\n\n AvailableIndicators.push('averagegain');\n AvailableIndicators.push('averageloss');\n AvailableIndicators.push('highest');\n AvailableIndicators.push('lowest');\n AvailableIndicators.push('sum');\n AvailableIndicators.push('FixedSizeLinkedList');\n AvailableIndicators.push('sd');\n AvailableIndicators.push('bullish');\n AvailableIndicators.push('bearish');\n AvailableIndicators.push('abandonedbaby');\n AvailableIndicators.push('doji');\n AvailableIndicators.push('bearishengulfingpattern');\n AvailableIndicators.push('bullishengulfingpattern');\n AvailableIndicators.push('darkcloudcover');\n AvailableIndicators.push('downsidetasukigap');\n AvailableIndicators.push('dragonflydoji');\n AvailableIndicators.push('gravestonedoji');\n AvailableIndicators.push('bullishharami');\n AvailableIndicators.push('bearishharami');\n AvailableIndicators.push('bullishharamicross');\n AvailableIndicators.push('bearishharamicross');\n AvailableIndicators.push('eveningdojistar');\n AvailableIndicators.push('eveningstar');\n AvailableIndicators.push('morningdojistar');\n AvailableIndicators.push('morningstar');\n AvailableIndicators.push('bullishmarubozu');\n AvailableIndicators.push('bearishmarubozu');\n AvailableIndicators.push('piercingline');\n AvailableIndicators.push('bullishspinningtop');\n AvailableIndicators.push('bearishspinningtop');\n AvailableIndicators.push('threeblackcrows');\n AvailableIndicators.push('threewhitesoldiers');\n AvailableIndicators.push('bullishhammerstick');\n AvailableIndicators.push('bearishhammerstick');\n AvailableIndicators.push('bullishinvertedhammerstick');\n AvailableIndicators.push('bearishinvertedhammerstick');\n AvailableIndicators.push('hammerpattern');\n AvailableIndicators.push('hammerpatternunconfirmed');\n AvailableIndicators.push('hangingman');\n AvailableIndicators.push('hangingmanunconfirmed');\n AvailableIndicators.push('shootingstar');\n AvailableIndicators.push('shootingstarunconfirmed');\n AvailableIndicators.push('tweezertop');\n AvailableIndicators.push('tweezerbottom');\n\n AvailableIndicators.push('predictPattern');\n AvailableIndicators.push('hasDoubleBottom');\n AvailableIndicators.push('hasDoubleTop');\n AvailableIndicators.push('hasHeadAndShoulder');\n AvailableIndicators.push('hasInverseHeadAndShoulder');\n AvailableIndicators.push('isTrendingUp');\n AvailableIndicators.push('isTrendingDown');\n return AvailableIndicators;\n};\n\nlet AvailableIndicators = getAvailableIndicators();\nexport { AvailableIndicators }\n"],"names":["nf","sma","LinkedList","sd","wema","ema","rsi","stochastic","FixedSizedLinkedList","this","AvailablePatterns","loadModel","tf.loadModel","tf.tensor2d","tf.argMax"],"mappings":";;;;;;;AAAA,MAAM,IAAI,CAAC;IACP,WAAW,CAAC,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