parallel-es
Version:
Simple parallelization for EcmaScript
3 lines • 31.7 kB
JavaScript
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("process")):"function"==typeof define&&define.amd?define(["process"],n):"object"==typeof exports?exports["parallel-es"]=n(require("process")):t["parallel-es"]=n(t.process)}(this,function(t){return function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var e={};return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=173)}([function(t,n,e){"use strict";n.__esModule=!0,n.default=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}},function(t,n,e){"use strict";n.__esModule=!0;var r=e(79),o=function(t){return t&&t.__esModule?t:{default:t}}(r);n.default=function(){function t(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,o.default)(t,r.key,r)}}return function(n,e,r){return e&&t(n.prototype,e),r&&t(n,r),n}}()},function(t,n){var e=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=e)},function(t,n,e){var r=e(35)("wks"),o=e(24),i=e(4).Symbol,u="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=r},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n,e){var r=e(4),o=e(2),i=e(16),u=e(11),c=function(t,n,e){var a,f,s,l=t&c.F,p=t&c.G,v=t&c.S,y=t&c.P,h=t&c.B,d=t&c.W,g=p?o:o[n]||(o[n]={}),_=g.prototype,b=p?r:v?r[n]:(r[n]||{}).prototype;p&&(e=n);for(a in e)(f=!l&&b&&void 0!==b[a])&&a in g||(s=f?b[a]:e[a],g[a]=p&&"function"!=typeof b[a]?e[a]:h&&f?i(s,r):d&&b[a]==s?function(t){var n=function(n,e,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,r)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(s):y&&"function"==typeof s?i(Function.call,s):s,y&&((g.virtual||(g.virtual={}))[a]=s,t&c.R&&_&&!_[a]&&u(_,a,s)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,n,e){var r=e(7),o=e(57),i=e(37),u=Object.defineProperty;n.f=e(8)?Object.defineProperty:function(t,n,e){if(r(t),n=i(n,!0),r(e),o)try{return u(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(14);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n,e){t.exports=!e(13)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(58),o=e(30);t.exports=function(t){return r(o(t))}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){var r=e(6),o=e(19);t.exports=e(8)?function(t,n,e){return r.f(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){t.exports={default:e(85),__esModule:!0}},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},,function(t,n,e){var r=e(51);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports={}},function(t,n,e){var r=e(63),o=e(31);t.exports=Object.keys||function(t){return r(t,o)}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){"use strict";function r(t,n){return{_______isFunctionId:!0,identifier:t+"-"+n}}function o(t){return!!t&&!0===t._______isFunctionId}n.a=r,n.b=o},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,e){var r=e(30);t.exports=function(t){return Object(r(t))}},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},function(t,n,e){"use strict";e.d(n,"a",function(){return o});var r=e(20),o={FILTER:e.i(r.a)("parallel",0),IDENTITY:e.i(r.a)("parallel",1),MAP:e.i(r.a)("parallel",2),PARALLEL_JOB_EXECUTOR:e.i(r.a)("parallel",3),RANGE:e.i(r.a)("parallel",4),REDUCE:e.i(r.a)("parallel",5),TIMES:e.i(r.a)("parallel",6),TO_ITERATOR:e.i(r.a)("parallel",7)}},function(t,n){t.exports=!0},function(t,n,e){var r=e(6).f,o=e(10),i=e(3)("toStringTag");t.exports=function(t,n,e){t&&!o(t=e?t:t.prototype,i)&&r(t,i,{configurable:!0,value:n})}},function(t,n,e){"use strict";var r=e(107)(!0);e(59)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,n=this._t,e=this._i;return e>=n.length?{value:void 0,done:!0}:(t=r(n,e),this._i+=t.length,{value:t,done:!1})})},function(t,n,e){"use strict";function r(t){return s()(t)}function o(t){for(var n=[],e=void 0;!(e=t.next()).done;)n.push(e.value);return n}function i(t){if(0===t.length)return[];var n=a()(t),e=n[0],r=n.slice(1);return Array.prototype.concat.apply(e,r)}function u(t,n){var e=t.length;t.length+=n.length;for(var r=0;r<n.length;++r)t[e+r]=n[r];return t}n.a=r,n.b=o,n.c=i,n.d=u;var c=e(55),a=e.n(c),f=e(12),s=e.n(f)},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,e){var r=e(7),o=e(105),i=e(31),u=e(34)("IE_PROTO"),c=function(){},a=function(){var t,n=e(43)("iframe"),r=i.length;for(n.style.display="none",e(68).appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),a=t.F;r--;)delete a.prototype[i[r]];return a()};t.exports=Object.create||function(t,n){var e;return null!==t?(c.prototype=r(t),e=new c,c.prototype=null,e[u]=t):e=a(),void 0===n?e:o(e,n)}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(35)("keys"),o=e(24);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,n,e){var r=e(4),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n,e){var r=e(14);t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n,e){var r=e(4),o=e(2),i=e(26),u=e(39),c=e(6).f;t.exports=function(t){var n=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in n||c(n,t,{value:u.f(t)})}},function(t,n,e){n.f=e(3)},function(t,n,e){"use strict";function r(t){return!!t&&!0===t.______serializedFunctionCall}n.a=r},function(t,n,e){"use strict";function r(t){return{type:0,workerId:t}}function o(t){return{task:t,type:1}}function i(t){for(var n=arguments.length,e=Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];return{functionIds:[t].concat(e),type:2}}function u(t){for(var n=arguments.length,e=Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];return{functions:t,missingFunctions:e,type:3}}function c(t){return{result:t,type:4}}function a(t){var n={},e=!0,r=!1,o=void 0;try{for(var i,u=O()(x()(t));!(e=(i=u.next()).done);e=!0){var c=i.value;n[c]=_()(t[c])}}catch(t){r=!0,o=t}finally{try{!e&&u.return&&u.return()}finally{if(r)throw o}}return{error:n,type:5}}function f(){return{type:6}}function s(t){return 1===t.type}function l(t){return 0===t.type}function p(t){return 2===t.type}function v(t){return 3===t.type}function y(t){return 4===t.type}function h(t){return 5===t.type}function d(t){return 6===t.type}n.h=r,n.i=o,n.d=i,n.n=u,n.g=c,n.f=a,n.j=f,n.c=s,n.b=l,n.k=p,n.e=v,n.l=y,n.m=h,n.a=d;var g=e(77),_=e.n(g),b=e(80),x=e.n(b),m=e(12),O=e.n(m)},function(t,n,e){t.exports={default:e(91),__esModule:!0}},function(t,n,e){var r=e(14),o=e(4).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n,e){var r=e(22),o=e(19),i=e(9),u=e(37),c=e(10),a=e(57),f=Object.getOwnPropertyDescriptor;n.f=e(8)?f:function(t,n){if(t=i(t),n=u(n,!0),a)try{return f(t,n)}catch(t){}if(c(t,n))return o(!r.f.call(t,n),t[n])}},function(t,n,e){var r=e(5),o=e(2),i=e(13);t.exports=function(t,n){var e=(o.Object||{})[t]||Object[t],u={};u[t]=n(e),r(r.S+r.F*i(function(){e(1)}),"Object",u)}},function(t,n,e){var r=e(36),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,n,e){var r=e(67),o=e(3)("iterator"),i=e(17);t.exports=e(2).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,n,e){e(112);for(var r=e(4),o=e(11),i=e(17),u=e(3)("toStringTag"),c=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],a=0;a<5;a++){var f=c[a],s=r[f],l=s&&s.prototype;l&&!l[u]&&o(l,u,f),i[f]=i.Array}},,function(t,n,e){"use strict";n.__esModule=!0;var r=e(52),o=function(t){return t&&t.__esModule?t:{default:t}}(r);n.default=function(t){if(Array.isArray(t)){for(var n=0,e=Array(t.length);n<t.length;n++)e[n]=t[n];return e}return(0,o.default)(t)}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,e){t.exports={default:e(84),__esModule:!0}},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var o=e(81),i=r(o),u=e(78),c=r(u),a=e(56),f=r(a);n.default=function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+(void 0===n?"undefined":(0,f.default)(n)));t.prototype=(0,c.default)(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(i.default?(0,i.default)(t,n):t.__proto__=n)}},function(t,n,e){"use strict";n.__esModule=!0;var r=e(56),o=function(t){return t&&t.__esModule?t:{default:t}}(r);n.default=function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!==(void 0===n?"undefined":(0,o.default)(n))&&"function"!=typeof n?t:n}},function(t,n,e){"use strict";n.__esModule=!0;var r=e(52),o=function(t){return t&&t.__esModule?t:{default:t}}(r);n.default=function(t){return Array.isArray(t)?t:(0,o.default)(t)}},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var o=e(83),i=r(o),u=e(82),c=r(u),a="function"==typeof c.default&&"symbol"==typeof i.default?function(t){return typeof t}:function(t){return t&&"function"==typeof c.default&&t.constructor===c.default&&t!==c.default.prototype?"symbol":typeof t};n.default="function"==typeof c.default&&"symbol"===a(i.default)?function(t){return void 0===t?"undefined":a(t)}:function(t){return t&&"function"==typeof c.default&&t.constructor===c.default&&t!==c.default.prototype?"symbol":void 0===t?"undefined":a(t)}},function(t,n,e){t.exports=!e(8)&&!e(13)(function(){return 7!=Object.defineProperty(e(43)("div"),"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(21);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n,e){"use strict";var r=e(26),o=e(5),i=e(64),u=e(11),c=e(10),a=e(17),f=e(100),s=e(27),l=e(62),p=e(3)("iterator"),v=!([].keys&&"next"in[].keys()),y=function(){return this};t.exports=function(t,n,e,h,d,g,_){f(e,n,h);var b,x,m,O=function(t){if(!v&&t in M)return M[t];switch(t){case"keys":case"values":return function(){return new e(this,t)}}return function(){return new e(this,t)}},w=n+" Iterator",S="values"==d,j=!1,M=t.prototype,k=M[p]||M["@@iterator"]||d&&M[d],E=k||O(d),F=d?S?O("entries"):E:void 0,P="Array"==n?M.entries||k:k;if(P&&(m=l(P.call(new t)))!==Object.prototype&&(s(m,w,!0),r||c(m,p)||u(m,p,y)),S&&k&&"values"!==k.name&&(j=!0,E=function(){return k.call(this)}),r&&!_||!v&&!j&&M[p]||u(M,p,E),a[n]=E,a[w]=y,d)if(b={values:S?E:O("values"),keys:g?E:O("keys"),entries:F},_)for(x in b)x in M||i(M,x,b[x]);else o(o.P+o.F*(v||j),n,b);return b}},function(t,n,e){var r=e(9),o=e(61).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return o(t)}catch(t){return u.slice()}};t.exports.f=function(t){return u&&"[object Window]"==i.call(t)?c(t):o(r(t))}},function(t,n,e){var r=e(63),o=e(31).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,n,e){var r=e(10),o=e(23),i=e(34)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n,e){var r=e(10),o=e(9),i=e(96)(!1),u=e(34)("IE_PROTO");t.exports=function(t,n){var e,c=o(t),a=0,f=[];for(e in c)e!=u&&r(c,e)&&f.push(e);for(;n.length>a;)r(c,e=n[a++])&&(~i(f,e)||f.push(e));return f}},function(t,n,e){t.exports=e(11)},function(t,n,e){t.exports={default:e(87),__esModule:!0}},,function(t,n,e){var r=e(21),o=e(3)("toStringTag"),i="Arguments"==r(function(){return arguments}()),u=function(t,n){try{return t[n]}catch(t){}};t.exports=function(t){var n,e,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=u(n=Object(t),o))?e:i?r(n):"Object"==(c=r(n))&&"function"==typeof n.callee?"Arguments":c}},function(t,n,e){t.exports=e(4).document&&document.documentElement},function(t,n,e){var r=e(17),o=e(3)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,n,e){var r=e(7);t.exports=function(t,n,e,o){try{return o?n(r(e)[0],e[1]):n(e)}catch(n){var i=t.return;throw void 0!==i&&r(i.call(t)),n}}},function(t,n,e){var r=e(3)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,n){if(!n&&!o)return!1;var e=!1;try{var i=[7],u=i[r]();u.next=function(){return{done:e=!0}},i[r]=function(){return u},t(i)}catch(t){}return e}},function(t,n){},,,,function(t,n,e){"use strict";e.d(n,"a",function(){return c});var r=e(0),o=e.n(r),i=e(1),u=e.n(i),c=function(){function t(){o()(this,t),this.data={}}return u()(t,[{key:"get",value:function(t){var n=this.toInternalKey(t);return this.has(t)?this.data[n]:void 0}},{key:"has",value:function(t){return this.hasOwnProperty.call(this.data,this.toInternalKey(t))}},{key:"set",value:function(t,n){this.data[this.toInternalKey(t)]=n}},{key:"clear",value:function(){this.data={}}},{key:"toInternalKey",value:function(t){return"@"+t}}]),t}()},function(t,n,e){t.exports={default:e(86),__esModule:!0}},function(t,n,e){t.exports={default:e(88),__esModule:!0}},function(t,n,e){t.exports={default:e(89),__esModule:!0}},function(t,n,e){t.exports={default:e(90),__esModule:!0}},function(t,n,e){t.exports={default:e(92),__esModule:!0}},function(t,n,e){t.exports={default:e(93),__esModule:!0}},function(t,n,e){t.exports={default:e(94),__esModule:!0}},function(t,n,e){e(28),e(111),t.exports=e(2).Array.from},function(t,n,e){e(48),e(28),t.exports=e(110)},function(t,n,e){var r=e(2),o=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},function(t,n,e){e(113),t.exports=e(2).Object.assign},function(t,n,e){e(114);var r=e(2).Object;t.exports=function(t,n){return r.create(t,n)}},function(t,n,e){e(115);var r=e(2).Object;t.exports=function(t,n,e){return r.defineProperty(t,n,e)}},function(t,n,e){e(116);var r=e(2).Object;t.exports=function(t){return r.getOwnPropertyNames(t)}},function(t,n,e){e(117),t.exports=e(2).Object.getPrototypeOf},function(t,n,e){e(118),t.exports=e(2).Object.setPrototypeOf},function(t,n,e){e(119),e(72),e(120),e(121),t.exports=e(2).Symbol},function(t,n,e){e(28),e(48),t.exports=e(39).f("iterator")},function(t,n){t.exports=function(){}},function(t,n,e){var r=e(9),o=e(46),i=e(109);t.exports=function(t){return function(n,e,u){var c,a=r(n),f=o(a.length),s=i(u,f);if(t&&e!=e){for(;f>s;)if((c=a[s++])!=c)return!0}else for(;f>s;s++)if((t||s in a)&&a[s]===e)return t||s||0;return!t&&-1}}},function(t,n,e){"use strict";var r=e(6),o=e(19);t.exports=function(t,n,e){n in t?r.f(t,n,o(0,e)):t[n]=e}},function(t,n,e){var r=e(18),o=e(33),i=e(22);t.exports=function(t){var n=r(t),e=o.f;if(e)for(var u,c=e(t),a=i.f,f=0;c.length>f;)a.call(t,u=c[f++])&&n.push(u);return n}},function(t,n,e){var r=e(21);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n,e){"use strict";var r=e(32),o=e(19),i=e(27),u={};e(11)(u,e(3)("iterator"),function(){return this}),t.exports=function(t,n,e){t.prototype=r(u,{next:o(1,e)}),i(t,n+" Iterator")}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,e){var r=e(18),o=e(9);t.exports=function(t,n){for(var e,i=o(t),u=r(i),c=u.length,a=0;c>a;)if(i[e=u[a++]]===n)return e}},function(t,n,e){var r=e(24)("meta"),o=e(14),i=e(10),u=e(6).f,c=0,a=Object.isExtensible||function(){return!0},f=!e(13)(function(){return a(Object.preventExtensions({}))}),s=function(t){u(t,r,{value:{i:"O"+ ++c,w:{}}})},l=function(t,n){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!a(t))return"F";if(!n)return"E";s(t)}return t[r].i},p=function(t,n){if(!i(t,r)){if(!a(t))return!0;if(!n)return!1;s(t)}return t[r].w},v=function(t){return f&&y.NEED&&a(t)&&!i(t,r)&&s(t),t},y=t.exports={KEY:r,NEED:!1,fastKey:l,getWeak:p,onFreeze:v}},function(t,n,e){"use strict";var r=e(18),o=e(33),i=e(22),u=e(23),c=e(58),a=Object.assign;t.exports=!a||e(13)(function(){var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach(function(t){n[t]=t}),7!=a({},t)[e]||Object.keys(a({},n)).join("")!=r})?function(t,n){for(var e=u(t),a=arguments.length,f=1,s=o.f,l=i.f;a>f;)for(var p,v=c(arguments[f++]),y=s?r(v).concat(s(v)):r(v),h=y.length,d=0;h>d;)l.call(v,p=y[d++])&&(e[p]=v[p]);return e}:a},function(t,n,e){var r=e(6),o=e(7),i=e(18);t.exports=e(8)?Object.defineProperties:function(t,n){o(t);for(var e,u=i(n),c=u.length,a=0;c>a;)r.f(t,e=u[a++],n[e]);return t}},function(t,n,e){var r=e(14),o=e(7),i=function(t,n){if(o(t),!r(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{r=e(16)(Function.call,e(44).f(Object.prototype,"__proto__").set,2),r(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,e){return i(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:i}},function(t,n,e){var r=e(36),o=e(30);t.exports=function(t){return function(n,e){var i,u,c=String(o(n)),a=r(e),f=c.length;return a<0||a>=f?t?"":void 0:(i=c.charCodeAt(a),i<55296||i>56319||a+1===f||(u=c.charCodeAt(a+1))<56320||u>57343?t?c.charAt(a):i:t?c.slice(a,a+2):u-56320+(i-55296<<10)+65536)}}},,function(t,n,e){var r=e(36),o=Math.max,i=Math.min;t.exports=function(t,n){return t=r(t),t<0?o(t+n,0):i(t,n)}},function(t,n,e){var r=e(7),o=e(47);t.exports=e(2).getIterator=function(t){var n=o(t);if("function"!=typeof n)throw TypeError(t+" is not iterable!");return r(n.call(t))}},function(t,n,e){"use strict";var r=e(16),o=e(5),i=e(23),u=e(70),c=e(69),a=e(46),f=e(97),s=e(47);o(o.S+o.F*!e(71)(function(t){Array.from(t)}),"Array",{from:function(t){var n,e,o,l,p=i(t),v="function"==typeof this?this:Array,y=arguments.length,h=y>1?arguments[1]:void 0,d=void 0!==h,g=0,_=s(p);if(d&&(h=r(h,y>2?arguments[2]:void 0,2)),void 0==_||v==Array&&c(_))for(n=a(p.length),e=new v(n);n>g;g++)f(e,g,d?h(p[g],g):p[g]);else for(l=_.call(p),e=new v;!(o=l.next()).done;g++)f(e,g,d?u(l,h,[o.value,g],!0):o.value);return e.length=g,e}})},function(t,n,e){"use strict";var r=e(95),o=e(101),i=e(17),u=e(9);t.exports=e(59)(Array,"Array",function(t,n){this._t=u(t),this._i=0,this._k=n},function(){var t=this._t,n=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,o(1)):"keys"==n?o(0,e):"values"==n?o(0,t[e]):o(0,[e,t[e]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,n,e){var r=e(5);r(r.S+r.F,"Object",{assign:e(104)})},function(t,n,e){var r=e(5);r(r.S,"Object",{create:e(32)})},function(t,n,e){var r=e(5);r(r.S+r.F*!e(8),"Object",{defineProperty:e(6).f})},function(t,n,e){e(45)("getOwnPropertyNames",function(){return e(60).f})},function(t,n,e){var r=e(23),o=e(62);e(45)("getPrototypeOf",function(){return function(t){return o(r(t))}})},function(t,n,e){var r=e(5);r(r.S,"Object",{setPrototypeOf:e(106).set})},function(t,n,e){"use strict";var r=e(4),o=e(10),i=e(8),u=e(5),c=e(64),a=e(103).KEY,f=e(13),s=e(35),l=e(27),p=e(24),v=e(3),y=e(39),h=e(38),d=e(102),g=e(98),_=e(99),b=e(7),x=e(9),m=e(37),O=e(19),w=e(32),S=e(60),j=e(44),M=e(6),k=e(18),E=j.f,F=M.f,P=S.f,A=r.Symbol,T=r.JSON,I=T&&T.stringify,C=v("_hidden"),N=v("toPrimitive"),R={}.propertyIsEnumerable,L=s("symbol-registry"),z=s("symbols"),D=s("op-symbols"),J=Object.prototype,K="function"==typeof A,W=r.QObject,U=!W||!W.prototype||!W.prototype.findChild,q=i&&f(function(){return 7!=w(F({},"a",{get:function(){return F(this,"a",{value:7}).a}})).a})?function(t,n,e){var r=E(J,n);r&&delete J[n],F(t,n,e),r&&t!==J&&F(J,n,r)}:F,G=function(t){var n=z[t]=w(A.prototype);return n._k=t,n},B=K&&"symbol"==typeof A.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof A},Y=function(t,n,e){return t===J&&Y(D,n,e),b(t),n=m(n,!0),b(e),o(z,n)?(e.enumerable?(o(t,C)&&t[C][n]&&(t[C][n]=!1),e=w(e,{enumerable:O(0,!1)})):(o(t,C)||F(t,C,O(1,{})),t[C][n]=!0),q(t,n,e)):F(t,n,e)},X=function(t,n){b(t);for(var e,r=g(n=x(n)),o=0,i=r.length;i>o;)Y(t,e=r[o++],n[e]);return t},Q=function(t,n){return void 0===n?w(t):X(w(t),n)},H=function(t){var n=R.call(this,t=m(t,!0));return!(this===J&&o(z,t)&&!o(D,t))&&(!(n||!o(this,t)||!o(z,t)||o(this,C)&&this[C][t])||n)},V=function(t,n){if(t=x(t),n=m(n,!0),t!==J||!o(z,n)||o(D,n)){var e=E(t,n);return!e||!o(z,n)||o(t,C)&&t[C][n]||(e.enumerable=!0),e}},Z=function(t){for(var n,e=P(x(t)),r=[],i=0;e.length>i;)o(z,n=e[i++])||n==C||n==a||r.push(n);return r},$=function(t){for(var n,e=t===J,r=P(e?D:x(t)),i=[],u=0;r.length>u;)!o(z,n=r[u++])||e&&!o(J,n)||i.push(z[n]);return i};K||(A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),n=function(e){this===J&&n.call(D,e),o(this,C)&&o(this[C],t)&&(this[C][t]=!1),q(this,t,O(1,e))};return i&&U&&q(J,t,{configurable:!0,set:n}),G(t)},c(A.prototype,"toString",function(){return this._k}),j.f=V,M.f=Y,e(61).f=S.f=Z,e(22).f=H,e(33).f=$,i&&!e(26)&&c(J,"propertyIsEnumerable",H,!0),y.f=function(t){return G(v(t))}),u(u.G+u.W+u.F*!K,{Symbol:A});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;tt.length>nt;)v(tt[nt++]);for(var tt=k(v.store),nt=0;tt.length>nt;)h(tt[nt++]);u(u.S+u.F*!K,"Symbol",{for:function(t){return o(L,t+="")?L[t]:L[t]=A(t)},keyFor:function(t){if(B(t))return d(L,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){U=!0},useSimple:function(){U=!1}}),u(u.S+u.F*!K,"Object",{create:Q,defineProperty:Y,defineProperties:X,getOwnPropertyDescriptor:V,getOwnPropertyNames:Z,getOwnPropertySymbols:$}),T&&u(u.S+u.F*(!K||f(function(){var t=A();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!B(t)){for(var n,e,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);return n=r[1],"function"==typeof n&&(e=n),!e&&_(n)||(n=function(t,n){if(e&&(n=e.call(this,t,n)),!B(n))return n}),r[1]=n,I.apply(T,r)}}}),A.prototype[N]||e(11)(A.prototype,N,A.prototype.valueOf),l(A,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,n,e){e(38)("asyncIterator")},function(t,n,e){e(38)("observable")},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,n){t.exports=require("process")},function(t,n,e){"use strict";e.d(n,"a",function(){return s});var r=e(50),o=e.n(r),i=e(0),u=e.n(i),c=e(1),a=e.n(c),f=e(76),s=function(){function t(){u()(this,t),this.cache=new f.a}return a()(t,[{key:"getFunction",value:function(t){return this.cache.get(t.identifier)}},{key:"registerFunction",value:function(t){var n=this.toFunction(t);return this.cache.set(t.id.identifier,n),n}},{key:"registerStaticFunction",value:function(t,n){if(this.has(t))throw new Error("The given function id '"+t.identifier+"' is already used by another function registration, the id needs to be unique.");this.cache.set(t.identifier,n)}},{key:"has",value:function(t){return this.cache.has(t.identifier)}},{key:"toFunction",value:function(t){if(t.name){var n=t.argumentNames.join(", ");return Function.apply(void 0,["return function "+t.name+" ("+n+") { "+t.body+" }; "])()}return Function.apply(void 0,[].concat(o()(t.argumentNames),[t.body]))}}]),t}()},function(t,n,e){"use strict";function r(t){t.registerStaticFunction(o.a.IDENTITY,i.a),t.registerStaticFunction(o.a.FILTER,u.a),t.registerStaticFunction(o.a.MAP,c.a),t.registerStaticFunction(o.a.PARALLEL_JOB_EXECUTOR,a.a),t.registerStaticFunction(o.a.RANGE,f.a),t.registerStaticFunction(o.a.REDUCE,s.a),t.registerStaticFunction(o.a.TO_ITERATOR,l.a)}n.a=r;var o=e(25),i=e(170),u=e(165),c=e(166),a=e(167),f=e(168),s=e(169),l=e(29)},function(t,n,e){"use strict";e.d(n,"a",function(){return h});var r=e(42),o=e.n(r),i=e(0),u=e.n(i),c=e(1),a=e.n(c),f=e(54),s=e.n(f),l=e(53),p=e.n(l),v=e(171),y=e(160),h=(e.n(y),function(t){function n(t){u()(this,n);var e=s()(this,(n.__proto__||o()(n)).call(this,t));return e.functionCache=t,e}return p()(n,t),a()(n,[{key:"postMessage",value:function(t){if(!y.send)throw new Error("Slave not executing inside of a child process");y.send(t)}},{key:"terminate",value:function(){}}]),n}(v.a))},function(t,n,e){"use strict";function r(t,n){return"function"==typeof t.bind?t.bind.apply(t,[void 0].concat(f()(n))):function(){for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.apply(void 0,n.concat(r))}}e.d(n,"a",function(){return l});var o=e(0),i=e.n(o),u=e(1),c=e.n(u),a=e(50),f=e.n(a),s=e(40),l=function(){function t(n){i()(this,t),this.functionLookupTable=n}return c()(t,[{key:"deserializeFunctionCall",value:function(t){var n=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.functionLookupTable.getFunction(t.functionId);if(!i)throw new Error("The function with the id "+t.functionId.identifier+" could not be retrieved while deserializing the function call. Is the function correctly registered?");var u=t.parameters||[];return o&&(u=u.map(function(t){return e.i(s.a)(t)?n.deserializeFunctionCall(t):t})),r(i,u)}}]),t}()},function(t,n,e){"use strict";function r(t,n,e){return{next:function(){for(var r=void 0;!(r=t.next()).done;)if(n(r.value,e))return r;return r}}}n.a=r},function(t,n,e){"use strict";function r(t,n,e){return{next:function(){var r=t.next();return r.done?{done:!0}:{done:r.done,value:n(r.value,e)}}}}n.a=r},function(t,n,e){"use strict";function r(t,n){var r={taskIndex:t.taskIndex,valuesPerTask:t.valuesPerTask},o=!0,i=!1,c=void 0;try{for(var f,l=a()(t.environments);!(o=(f=l.next()).done);o=!0){var p=f.value,v=void 0;v=e.i(s.a)(p)?n.deserializeFunctionCall(p)(r):p,r=u()(r,v)}}catch(t){i=!0,c=t}finally{try{!o&&l.return&&l.return()}finally{if(i)throw c}}return r}function o(t,n){var o=n.functionCallDeserializer,i=r(t,o),u=o.deserializeFunctionCall(t.generator,!0),c=u(i),s=!0,l=!1,p=void 0;try{for(var v,y=a()(t.operations);!(s=(v=y.next()).done);s=!0){var h=v.value;c=o.deserializeFunctionCall(h.iterator)(c,o.deserializeFunctionCall(h.iteratee),i)}}catch(t){l=!0,p=t}finally{try{!s&&y.return&&y.return()}finally{if(l)throw p}}return e.i(f.b)(c)}n.a=o;var i=e(65),u=e.n(i),c=e(12),a=e.n(c),f=e(29),s=e(40)},function(t,n,e){"use strict";function r(t,n,e){var r=n-t,o=Math.max(Math.floor(r/(e||1)),0),i=t;return{next:function(){var t=i;return i+=e,0!=o--?{done:!1,value:t}:{done:!0}}}}n.a=r},function(t,n,e){"use strict";function r(t,n,r,i){for(var u=t,c=void 0;!(c=n.next()).done;)u=r(u,c.value,i);return e.i(o.a)([u])}n.a=r;var o=e(29)},function(t,n,e){"use strict";function r(t){return t}n.a=r},function(t,n,e){"use strict";e.d(n,"a",function(){return f});var r=e(0),o=e.n(r),i=e(1),u=e.n(i),c=e(41),a=e(172),f=function(){function t(n){o()(this,t),this.functionCache=n,this.id=Number.NaN,this.state=new a.a(this)}return u()(t,[{key:"changeState",value:function(t){this.state=t,this.state.enter()}},{key:"onMessage",value:function(t){if(e.i(c.a)(t))this.terminate();else if(!this.state.onMessage(t))throw new Error("Message with type "+t.type+" cannot be handled by "+this)}},{key:"toString",value:function(){return"Slave { id: "+this.id+", state: '"+this.state.name+"' }"}}]),t}()},function(t,n,e){"use strict";e.d(n,"a",function(){return O});var r=e(12),o=e.n(r),i=e(50),u=e.n(i),c=e(55),a=e.n(c),f=e(42),s=e.n(f),l=e(54),p=e.n(l),v=e(53),y=e.n(v),h=e(0),d=e.n(h),g=e(1),_=e.n(g),b=e(164),x=e(41),m=function(){function t(n,e){d()(this,t),this.name=n,this.slave=e}return _()(t,[{key:"enter",value:function(){}},{key:"onMessage",value:function(t){return!1}}]),t}(),O=function(t){function n(t){return d()(this,n),p()(this,(n.__proto__||s()(n)).call(this,"Default",t))}return y()(n,t),_()(n,[{key:"onMessage",value:function(t){return!!e.i(x.b)(t)&&(this.slave.id=t.workerId,this.slave.changeState(new w(this.slave)),!0)}}]),n}(m),w=function(t){function n(t){return d()(this,n),p()(this,(n.__proto__||s()(n)).call(this,"Idle",t))}return y()(n,t),_()(n,[{key:"onMessage",value:function(t){var n=this;if(!e.i(x.c)(t))return!1;var r=t.task,o=r.usedFunctionIds.filter(function(t){return!n.slave.functionCache.has(t)});if(0===o.length)this.slave.changeState(new j(this.slave,r));else{var i=a()(o),c=i[0],f=i.slice(1);this.slave.postMessage(x.d.apply(void 0,[c].concat(u()(f)))),this.slave.changeState(new S(this.slave,r))}return!0}}]),n}(m),S=function(t){function n(t,e){d()(this,n);var r=p()(this,(n.__proto__||s()(n)).call(this,"WaitingForFunctionDefinition",t));return r.task=e,r}return y()(n,t),_()(n,[{key:"onMessage",value:function(t){if(e.i(x.e)(t)){if(t.missingFunctions.length>0){var n=t.missingFunctions.map(function(t){return t.identifier}).join(", ");this.slave.postMessage(e.i(x.f)(new Error("The function ids ["+n+"] could not be resolved by slave "+this.slave.id+"."))),this.slave.changeState(new w(this.slave))}else{var r=!0,i=!1,u=void 0;try{for(var c,a=o()(t.functions);!(r=(c=a.next()).done);r=!0){var f=c.value;this.slave.functionCache.registerFunction(f)}}catch(t){i=!0,u=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw u}}this.slave.changeState(new j(this.slave,this.task))}return!0}return!1}}]),n}(m),j=function(t){function n(t,e){d()(this,n);var r=p()(this,(n.__proto__||s()(n)).call(this,"Executing",t));return r.task=e,r}return y()(n,t),_()(n,[{key:"enter",value:function(){var t=new b.a(this.slave.functionCache);try{var n=t.deserializeFunctionCall(this.task.main),r=n({functionCallDeserializer:t});this.slave.postMessage(e.i(x.g)(r))}catch(t){this.slave.postMessage(e.i(x.f)(t))}this.slave.changeState(new w(this.slave))}}]),n}(m)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(161),o=e(162),i=e(163),u=e(160),slaveFunctionLookupTable=(e.n(u),new r.a);e.i(o.a)(slaveFunctionLookupTable);/** @preserve WORKER_SLAVE_STATIC_FUNCTIONS_PLACEHOLDER */
var c=new i.a(slaveFunctionLookupTable);u.on("message",c.onMessage.bind(c))}])});
//# sourceMappingURL=node-slave.parallel.js.map