aboutsummaryrefslogtreecommitdiff
path: root/node_modules/async
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-08-14 05:01:11 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-08-14 05:02:09 +0200
commit363723fc84f7b8477592e0105aeb331ec9a017af (patch)
tree29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/async
parent5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff)
downloadwallet-core-363723fc84f7b8477592e0105aeb331ec9a017af.tar.xz
node_modules
Diffstat (limited to 'node_modules/async')
-rw-r--r--node_modules/async/CHANGELOG.md23
-rw-r--r--node_modules/async/README.md2
-rw-r--r--node_modules/async/concat.js10
-rw-r--r--node_modules/async/concatLimit.js65
-rw-r--r--node_modules/async/concatSeries.js10
-rw-r--r--node_modules/async/dist/async.js66
-rw-r--r--node_modules/async/dist/async.min.js2
-rw-r--r--node_modules/async/index.js137
-rw-r--r--node_modules/async/internal/concat.js18
-rw-r--r--node_modules/async/internal/doSeries.js23
-rw-r--r--node_modules/async/internal/queue.js5
-rw-r--r--node_modules/async/package.json2
-rw-r--r--node_modules/async/queue.js3
13 files changed, 216 insertions, 150 deletions
diff --git a/node_modules/async/CHANGELOG.md b/node_modules/async/CHANGELOG.md
index 6ff975fa9..fa7e4d614 100644
--- a/node_modules/async/CHANGELOG.md
+++ b/node_modules/async/CHANGELOG.md
@@ -1,11 +1,20 @@
+# v2.5.0
+- Added `concatLimit`, the `Limit` equivalent of [`concat`](https://caolan.github.io/async/docs.html#concat) ([#1426](https://github.com/caolan/async/issues/1426), [#1430](https://github.com/caolan/async/pull/1430))
+- `concat` improvements: it now preserves order, handles falsy values and the `iteratee` callback takes a variable number of arguments ([#1437](https://github.com/caolan/async/issues/1437), [#1436](https://github.com/caolan/async/pull/1436))
+- Fixed an issue in `queue` where there was a size discrepancy between `workersList().length` and `running()` ([#1428](https://github.com/caolan/async/issues/1428), [#1429](https://github.com/caolan/async/pull/1429))
+- Various doc fixes ([#1422](https://github.com/caolan/async/issues/1422), [#1424](https://github.com/caolan/async/pull/1424))
+
+# v2.4.1
+- Fixed a bug preventing functions wrapped with `timeout()` from being re-used. ([#1418](https://github.com/caolan/async/issues/1418), [#1419](https://github.com/caolan/async/issues/1419))
+
# v2.4.0
-- Added `tryEach`, for running async functions in parallel, where you only expect one to succeed. (#1365, #687)
-- Improved performance, most notably in `parallel` and `waterfall` (#1395)
-- Added `queue.remove()`, for removing items in a `queue` (#1397, #1391)
-- Fixed using `eval`, preventing Async from running in pages with Content Security Policy (#1404, #1403)
-- Fixed errors thrown in an `asyncify`ed function's callback being caught by the underlying Promise (#1408)
-- Fixed timing of `queue.empty()` (#1367)
-- Various doc fixes (#1314, #1394, #1412)
+- Added `tryEach`, for running async functions in parallel, where you only expect one to succeed. ([#1365](https://github.com/caolan/async/issues/1365), [#687](https://github.com/caolan/async/issues/687))
+- Improved performance, most notably in `parallel` and `waterfall` ([#1395](https://github.com/caolan/async/issues/1395))
+- Added `queue.remove()`, for removing items in a `queue` ([#1397](https://github.com/caolan/async/issues/1397), [#1391](https://github.com/caolan/async/issues/1391))
+- Fixed using `eval`, preventing Async from running in pages with Content Security Policy ([#1404](https://github.com/caolan/async/issues/1404), [#1403](https://github.com/caolan/async/issues/1403))
+- Fixed errors thrown in an `asyncify`ed function's callback being caught by the underlying Promise ([#1408](https://github.com/caolan/async/issues/1408))
+- Fixed timing of `queue.empty()` ([#1367](https://github.com/caolan/async/issues/1367))
+- Various doc fixes ([#1314](https://github.com/caolan/async/issues/1314), [#1394](https://github.com/caolan/async/issues/1394), [#1412](https://github.com/caolan/async/issues/1412))
# v2.3.0
- Added support for ES2017 `async` functions. Wherever you can pass a Node-style/CPS function that uses a callback, you can also pass an `async` function. Previously, you had to wrap `async` functions with `asyncify`. The caveat is that it will only work if `async` functions are supported natively in your environment, transpiled implementations can't be detected. ([#1386](https://github.com/caolan/async/issues/1386), [#1390](https://github.com/caolan/async/issues/1390))
diff --git a/node_modules/async/README.md b/node_modules/async/README.md
index f59b13cdf..141926b72 100644
--- a/node_modules/async/README.md
+++ b/node_modules/async/README.md
@@ -9,6 +9,6 @@
Async is a utility module which provides straight-forward, powerful functions for working with asynchronous JavaScript. Although originally designed for use with [Node.js](https://nodejs.org/) and installable via `npm install --save async`, it can also be used directly in the browser.
-For Documentation, visit <http://caolan.github.io/async/>
+For Documentation, visit <https://caolan.github.io/async/>
*For Async v1.5.x documentation, go [HERE](https://github.com/caolan/async/blob/v1.5.2/README.md)*
diff --git a/node_modules/async/concat.js b/node_modules/async/concat.js
index bee45d72d..c39ea0001 100644
--- a/node_modules/async/concat.js
+++ b/node_modules/async/concat.js
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _concat = require('./internal/concat');
+var _doLimit = require('./internal/doLimit');
-var _concat2 = _interopRequireDefault(_concat);
+var _doLimit2 = _interopRequireDefault(_doLimit);
-var _doParallel = require('./internal/doParallel');
+var _concatLimit = require('./concatLimit');
-var _doParallel2 = _interopRequireDefault(_doParallel);
+var _concatLimit2 = _interopRequireDefault(_concatLimit);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -39,5 +39,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* // files is now a list of filenames that exist in the 3 directories
* });
*/
-exports.default = (0, _doParallel2.default)(_concat2.default);
+exports.default = (0, _doLimit2.default)(_concatLimit2.default, Infinity);
module.exports = exports['default']; \ No newline at end of file
diff --git a/node_modules/async/concatLimit.js b/node_modules/async/concatLimit.js
new file mode 100644
index 000000000..f32cd4d34
--- /dev/null
+++ b/node_modules/async/concatLimit.js
@@ -0,0 +1,65 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+exports.default = function (coll, limit, iteratee, callback) {
+ callback = callback || _noop2.default;
+ var _iteratee = (0, _wrapAsync2.default)(iteratee);
+ (0, _mapLimit2.default)(coll, limit, function (val, callback) {
+ _iteratee(val, function (err /*, ...args*/) {
+ if (err) return callback(err);
+ return callback(null, (0, _slice2.default)(arguments, 1));
+ });
+ }, function (err, mapResults) {
+ var result = [];
+ for (var i = 0; i < mapResults.length; i++) {
+ if (mapResults[i]) {
+ result = _concat.apply(result, mapResults[i]);
+ }
+ }
+
+ return callback(err, result);
+ });
+};
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _wrapAsync = require('./internal/wrapAsync');
+
+var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
+
+var _slice = require('./internal/slice');
+
+var _slice2 = _interopRequireDefault(_slice);
+
+var _mapLimit = require('./mapLimit');
+
+var _mapLimit2 = _interopRequireDefault(_mapLimit);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var _concat = Array.prototype.concat;
+
+/**
+ * The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time.
+ *
+ * @name concatLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.concat]{@link module:Collections.concat}
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
+ * which should use an array as its result. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished, or an error occurs. Results is an array
+ * containing the concatenated results of the `iteratee` function. Invoked with
+ * (err, results).
+ */
+module.exports = exports['default']; \ No newline at end of file
diff --git a/node_modules/async/concatSeries.js b/node_modules/async/concatSeries.js
index 94d6d7f46..541ab7d06 100644
--- a/node_modules/async/concatSeries.js
+++ b/node_modules/async/concatSeries.js
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _concat = require('./internal/concat');
+var _doLimit = require('./internal/doLimit');
-var _concat2 = _interopRequireDefault(_concat);
+var _doLimit2 = _interopRequireDefault(_doLimit);
-var _doSeries = require('./internal/doSeries');
+var _concatLimit = require('./concatLimit');
-var _doSeries2 = _interopRequireDefault(_doSeries);
+var _concatLimit2 = _interopRequireDefault(_concatLimit);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -32,5 +32,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* containing the concatenated results of the `iteratee` function. Invoked with
* (err, results).
*/
-exports.default = (0, _doSeries2.default)(_concat2.default);
+exports.default = (0, _doLimit2.default)(_concatLimit2.default, 1);
module.exports = exports['default']; \ No newline at end of file
diff --git a/node_modules/async/dist/async.js b/node_modules/async/dist/async.js
index a0f30b0d4..c4fbcef46 100644
--- a/node_modules/async/dist/async.js
+++ b/node_modules/async/dist/async.js
@@ -2235,9 +2235,10 @@ function queue(worker, concurrency, payload) {
for (var i = 0, l = tasks.length; i < l; i++) {
var task = tasks[i];
+
var index = baseIndexOf(workersList, task, 0);
if (index >= 0) {
- workersList.splice(index);
+ workersList.splice(index, 1);
}
task.callback.apply(task, arguments);
@@ -2298,11 +2299,11 @@ function queue(worker, concurrency, payload) {
for (var i = 0; i < l; i++) {
var node = q._tasks.shift();
tasks.push(node);
+ workersList.push(node);
data.push(node.data);
}
numRunning += 1;
- workersList.push(tasks[0]);
if (q._tasks.length === 0) {
q.empty();
@@ -2596,17 +2597,45 @@ var compose = function(/*...args*/) {
return seq.apply(null, slice(arguments).reverse());
};
-function concat$1(eachfn, arr, fn, callback) {
- var result = [];
- eachfn(arr, function (x, index, cb) {
- fn(x, function (err, y) {
- result = result.concat(y || []);
- cb(err);
+var _concat = Array.prototype.concat;
+
+/**
+ * The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time.
+ *
+ * @name concatLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.concat]{@link module:Collections.concat}
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
+ * which should use an array as its result. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished, or an error occurs. Results is an array
+ * containing the concatenated results of the `iteratee` function. Invoked with
+ * (err, results).
+ */
+var concatLimit = function(coll, limit, iteratee, callback) {
+ callback = callback || noop;
+ var _iteratee = wrapAsync(iteratee);
+ mapLimit(coll, limit, function(val, callback) {
+ _iteratee(val, function(err /*, ...args*/) {
+ if (err) return callback(err);
+ return callback(null, slice(arguments, 1));
});
- }, function (err) {
- callback(err, result);
+ }, function(err, mapResults) {
+ var result = [];
+ for (var i = 0; i < mapResults.length; i++) {
+ if (mapResults[i]) {
+ result = _concat.apply(result, mapResults[i]);
+ }
+ }
+
+ return callback(err, result);
});
-}
+};
/**
* Applies `iteratee` to each item in `coll`, concatenating the results. Returns
@@ -2633,13 +2662,7 @@ function concat$1(eachfn, arr, fn, callback) {
* // files is now a list of filenames that exist in the 3 directories
* });
*/
-var concat = doParallel(concat$1);
-
-function doSeries(fn) {
- return function (obj, iteratee, callback) {
- return fn(eachOfSeries, obj, wrapAsync(iteratee), callback);
- };
-}
+var concat = doLimit(concatLimit, Infinity);
/**
* The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time.
@@ -2659,7 +2682,7 @@ function doSeries(fn) {
* containing the concatenated results of the `iteratee` function. Invoked with
* (err, results).
*/
-var concatSeries = doSeries(concat$1);
+var concatSeries = doLimit(concatLimit, 1);
/**
* Returns a function that when called, calls-back with the values provided.
@@ -3985,7 +4008,8 @@ function parallelLimit$1(tasks, limit, callback) {
* @property {Function} resume - a function that resumes the processing of
* queued tasks when the queue is paused. Invoke with `queue.resume()`.
* @property {Function} kill - a function that removes the `drain` callback and
- * empties remaining tasks from the queue forcing it to go idle. Invoke with `queue.kill()`.
+ * empties remaining tasks from the queue forcing it to go idle. No more tasks
+ * should be pushed to the queue after calling this function. Invoke with `queue.kill()`.
*/
/**
@@ -5358,6 +5382,7 @@ var index = {
cargo: cargo,
compose: compose,
concat: concat,
+ concatLimit: concatLimit,
concatSeries: concatSeries,
constant: constant,
detect: detect,
@@ -5454,6 +5479,7 @@ exports.autoInject = autoInject;
exports.cargo = cargo;
exports.compose = compose;
exports.concat = concat;
+exports.concatLimit = concatLimit;
exports.concatSeries = concatSeries;
exports.constant = constant;
exports.detect = detect;
diff --git a/node_modules/async/dist/async.min.js b/node_modules/async/dist/async.min.js
index 61e48cb10..364629992 100644
--- a/node_modules/async/dist/async.min.js
+++ b/node_modules/async/dist/async.min.js
@@ -1,2 +1,2 @@
-!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.async=n.async||{})}(this,function(n){"use strict";function t(n,t){t|=0;for(var e=Math.max(n.length-t,0),r=Array(e),u=0;u<e;u++)r[u]=n[t+u];return r}function e(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function r(n){setTimeout(n,0)}function u(n){return function(e){var r=t(arguments,1);n(function(){e.apply(null,r)})}}function o(n){return ft(function(t,r){var u;try{u=n.apply(this,t)}catch(n){return r(n)}e(u)&&"function"==typeof u.then?u.then(function(n){i(r,null,n)},function(n){i(r,n.message?n:new Error(n))}):r(null,u)})}function i(n,t,e){try{n(t,e)}catch(n){st(c,n)}}function c(n){throw n}function f(n){return pt&&"AsyncFunction"===n[Symbol.toStringTag]}function a(n){return f(n)?o(n):n}function l(n){return function(e){var r=t(arguments,1),u=ft(function(t,r){var u=this;return n(e,function(n,e){a(n).apply(u,t.concat(e))},r)});return r.length?u.apply(this,r):u}}function s(n){var t=gt.call(n,jt),e=n[jt];try{n[jt]=void 0;var r=!0}catch(n){}var u=bt.call(n);return r&&(t?n[jt]=e:delete n[jt]),u}function p(n){return kt.call(n)}function h(n){return null==n?void 0===n?wt:Ot:(n=Object(n),xt&&xt in n?s(n):p(n))}function y(n){if(!e(n))return!1;var t=h(n);return t==Et||t==At||t==Lt||t==Tt}function v(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=Bt}function d(n){return null!=n&&v(n.length)&&!y(n)}function m(){}function g(n){return function(){if(null!==n){var t=n;n=null,t.apply(this,arguments)}}}function b(n,t){for(var e=-1,r=Array(n);++e<n;)r[e]=t(e);return r}function j(n){return null!=n&&"object"==typeof n}function S(n){return j(n)&&h(n)==Mt}function k(){return!1}function O(n,t){return t=null==t?Qt:t,!!t&&("number"==typeof n||Gt.test(n))&&n>-1&&n%1==0&&n<t}function w(n){return j(n)&&v(n.length)&&!!ge[h(n)]}function x(n){return function(t){return n(t)}}function L(n,t){var e=qt(n),r=!e&&Vt(n),u=!e&&!r&&Nt(n),o=!e&&!r&&!u&&xe(n),i=e||r||u||o,c=i?b(n.length,String):[],f=c.length;for(var a in n)!t&&!Ee.call(n,a)||i&&("length"==a||u&&("offset"==a||"parent"==a)||o&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||O(a,f))||c.push(a);return c}function E(n){var t=n&&n.constructor,e="function"==typeof t&&t.prototype||Ae;return n===e}function A(n,t){return function(e){return n(t(e))}}function T(n){if(!E(n))return Te(n);var t=[];for(var e in Object(n))Fe.call(n,e)&&"constructor"!=e&&t.push(e);return t}function B(n){return d(n)?L(n):T(n)}function F(n){var t=-1,e=n.length;return function(){return++t<e?{value:n[t],key:t}:null}}function I(n){var t=-1;return function(){var e=n.next();return e.done?null:(t++,{value:e.value,key:t})}}function _(n){var t=B(n),e=-1,r=t.length;return function(){var u=t[++e];return e<r?{value:n[u],key:u}:null}}function M(n){if(d(n))return F(n);var t=_t(n);return t?I(t):_(n)}function U(n){return function(){if(null===n)throw new Error("Callback was already called.");var t=n;n=null,t.apply(this,arguments)}}function z(n){return function(t,e,r){function u(n,t){if(f-=1,n)c=!0,r(n);else{if(t===Ft||c&&f<=0)return c=!0,r(null);o()}}function o(){for(;f<n&&!c;){var t=i();if(null===t)return c=!0,void(f<=0&&r(null));f+=1,e(t.value,t.key,U(u))}}if(r=g(r||m),n<=0||!t)return r(null);var i=M(t),c=!1,f=0;o()}}function P(n,t,e,r){z(t)(n,a(e),r)}function V(n,t){return function(e,r,u){return n(e,t,r,u)}}function q(n,t,e){function r(n,t){n?e(n):++o!==i&&t!==Ft||e(null)}e=g(e||m);var u=0,o=0,i=n.length;for(0===i&&e(null);u<i;u++)t(n[u],u,U(r))}function D(n){return function(t,e,r){return n(_e,t,a(e),r)}}function R(n,t,e,r){r=r||m,t=t||[];var u=[],o=0,i=a(e);n(t,function(n,t,e){var r=o++;i(n,function(n,t){u[r]=t,e(n)})},function(n){r(n,u)})}function C(n){return function(t,e,r,u){return n(z(e),t,a(r),u)}}function $(n,t){for(var e=-1,r=null==n?0:n.length;++e<r&&t(n[e],e,n)!==!1;);return n}function W(n){return function(t,e,r){for(var u=-1,o=Object(t),i=r(t),c=i.length;c--;){var f=i[n?c:++u];if(e(o[f],f,o)===!1)break}return t}}function N(n,t){return n&&De(n,t,B)}function Q(n,t,e,r){for(var u=n.length,o=e+(r?1:-1);r?o--:++o<u;)if(t(n[o],o,n))return o;return-1}function G(n){return n!==n}function H(n,t,e){for(var r=e-1,u=n.length;++r<u;)if(n[r]===t)return r;return-1}function J(n,t,e){return t===t?H(n,t,e):Q(n,G,e)}function K(n,t){for(var e=-1,r=null==n?0:n.length,u=Array(r);++e<r;)u[e]=t(n[e],e,n);return u}function X(n){return"symbol"==typeof n||j(n)&&h(n)==Ce}function Y(n){if("string"==typeof n)return n;if(qt(n))return K(n,Y)+"";if(X(n))return Ne?Ne.call(n):"";var t=n+"";return"0"==t&&1/n==-$e?"-0":t}function Z(n,t,e){var r=-1,u=n.length;t<0&&(t=-t>u?0:u+t),e=e>u?u:e,e<0&&(e+=u),u=t>e?0:e-t>>>0,t>>>=0;for(var o=Array(u);++r<u;)o[r]=n[r+t];return o}function nn(n,t,e){var r=n.length;return e=void 0===e?r:e,!t&&e>=r?n:Z(n,t,e)}function tn(n,t){for(var e=n.length;e--&&J(t,n[e],0)>-1;);return e}function en(n,t){for(var e=-1,r=n.length;++e<r&&J(t,n[e],0)>-1;);return e}function rn(n){return n.split("")}function un(n){return Xe.test(n)}function on(n){return n.match(vr)||[]}function cn(n){return un(n)?on(n):rn(n)}function fn(n){return null==n?"":Y(n)}function an(n,t,e){if(n=fn(n),n&&(e||void 0===t))return n.replace(dr,"");if(!n||!(t=Y(t)))return n;var r=cn(n),u=cn(t),o=en(r,u),i=tn(r,u)+1;return nn(r,o,i).join("")}function ln(n){return n=n.toString().replace(jr,""),n=n.match(mr)[2].replace(" ",""),n=n?n.split(gr):[],n=n.map(function(n){return an(n.replace(br,""))})}function sn(n,t){var e={};N(n,function(n,t){function r(t,e){var r=K(u,function(n){return t[n]});r.push(e),a(n).apply(null,r)}var u,o=f(n),i=!o&&1===n.length||o&&0===n.length;if(qt(n))u=n.slice(0,-1),n=n[n.length-1],e[t]=u.concat(u.length>0?r:n);else if(i)e[t]=n;else{if(u=ln(n),0===n.length&&!o&&0===u.length)throw new Error("autoInject task functions require explicit parameters.");o||u.pop(),e[t]=u.concat(r)}}),Re(e,t)}function pn(){this.head=this.tail=null,this.length=0}function hn(n,t){n.length=1,n.head=n.tail=t}function yn(n,t,e){function r(n,t,e){if(null!=e&&"function"!=typeof e)throw new Error("task callback must be a function");if(l.started=!0,qt(n)||(n=[n]),0===n.length&&l.idle())return st(function(){l.drain()});for(var r=0,u=n.length;r<u;r++){var o={data:n[r],callback:e||m};t?l._tasks.unshift(o):l._tasks.push(o)}st(l.process)}function u(n){return function(t){i-=1;for(var e=0,r=n.length;e<r;e++){var u=n[e],o=J(c,u,0);o>=0&&c.splice(o),u.callback.apply(u,arguments),null!=t&&l.error(t,u.data)}i<=l.concurrency-l.buffer&&l.unsaturated(),l.idle()&&l.drain(),l.process()}}if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var o=a(n),i=0,c=[],f=!1,l={_tasks:new pn,concurrency:t,payload:e,saturated:m,unsaturated:m,buffer:t/4,empty:m,drain:m,error:m,started:!1,paused:!1,push:function(n,t){r(n,!1,t)},kill:function(){l.drain=m,l._tasks.empty()},unshift:function(n,t){r(n,!0,t)},remove:function(n){l._tasks.remove(n)},process:function(){if(!f){for(f=!0;!l.paused&&i<l.concurrency&&l._tasks.length;){var n=[],t=[],e=l._tasks.length;l.payload&&(e=Math.min(e,l.payload));for(var r=0;r<e;r++){var a=l._tasks.shift();n.push(a),t.push(a.data)}i+=1,c.push(n[0]),0===l._tasks.length&&l.empty(),i===l.concurrency&&l.saturated();var s=U(u(n));o(t,s)}f=!1}},length:function(){return l._tasks.length},running:function(){return i},workersList:function(){return c},idle:function(){return l._tasks.length+i===0},pause:function(){l.paused=!0},resume:function(){l.paused!==!1&&(l.paused=!1,st(l.process))}};return l}function vn(n,t){return yn(n,1,t)}function dn(n,t,e,r){r=g(r||m);var u=a(e);kr(n,function(n,e,r){u(t,n,function(n,e){t=e,r(n)})},function(n){r(n,t)})}function mn(){var n=K(arguments,a);return function(){var e=t(arguments),r=this,u=e[e.length-1];"function"==typeof u?e.pop():u=m,dn(n,e,function(n,e,u){e.apply(r,n.concat(function(n){var e=t(arguments,1);u(n,e)}))},function(n,t){u.apply(r,[n].concat(t))})}}function gn(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(n,t){u=u.concat(t||[]),r(n)})},function(n){r(n,u)})}function bn(n){return function(t,e,r){return n(kr,t,a(e),r)}}function jn(n){return n}function Sn(n,t){return function(e,r,u,o){o=o||m;var i,c=!1;e(r,function(e,r,o){u(e,function(r,u){r?o(r):n(u)&&!i?(c=!0,i=t(!0,e),o(null,Ft)):o()})},function(n){n?o(n):o(null,c?i:t(!1))})}}function kn(n,t){return t}function On(n){return function(e){var r=t(arguments,1);r.push(function(e){var r=t(arguments,1);"object"==typeof console&&(e?console.error&&console.error(e):console[n]&&$(r,function(t){console[n](t)}))}),a(e).apply(null,r)}}function wn(n,e,r){function u(n){if(n)return r(n);var e=t(arguments,1);e.push(o),c.apply(this,e)}function o(n,t){return n?r(n):t?void i(u):r(null)}r=U(r||m);var i=a(n),c=a(e);o(null,!0)}function xn(n,e,r){r=U(r||m);var u=a(n),o=function(n){if(n)return r(n);var i=t(arguments,1);return e.apply(this,i)?u(o):void r.apply(null,[null].concat(i))};u(o)}function Ln(n,t,e){xn(n,function(){return!t.apply(this,arguments)},e)}function En(n,t,e){function r(n){return n?e(n):void i(u)}function u(n,t){return n?e(n):t?void o(r):e(null)}e=U(e||m);var o=a(t),i=a(n);i(u)}function An(n){return function(t,e,r){return n(t,r)}}function Tn(n,t,e){_e(n,An(a(t)),e)}function Bn(n,t,e,r){z(t)(n,An(a(e)),r)}function Fn(n){return f(n)?n:ft(function(t,e){var r=!0;t.push(function(){var n=arguments;r?st(function(){e.apply(null,n)}):e.apply(null,n)}),n.apply(this,t),r=!1})}function In(n){return!n}function _n(n){return function(t){return null==t?void 0:t[n]}}function Mn(n,t,e,r){var u=new Array(t.length);n(t,function(n,t,r){e(n,function(n,e){u[t]=!!e,r(n)})},function(n){if(n)return r(n);for(var e=[],o=0;o<t.length;o++)u[o]&&e.push(t[o]);r(null,e)})}function Un(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(e,o){e?r(e):(o&&u.push({index:t,value:n}),r())})},function(n){n?r(n):r(null,K(u.sort(function(n,t){return n.index-t.index}),_n("value")))})}function zn(n,t,e,r){var u=d(t)?Mn:Un;u(n,t,a(e),r||m)}function Pn(n,t){function e(n){return n?r(n):void u(e)}var r=U(t||m),u=a(Fn(n));e()}function Vn(n,t,e,r){r=g(r||m);var u={},o=a(e);P(n,t,function(n,t,e){o(n,t,function(n,r){return n?e(n):(u[t]=r,void e())})},function(n){r(n,u)})}function qn(n,t){return t in n}function Dn(n,e){var r=Object.create(null),u=Object.create(null);e=e||jn;var o=a(n),i=ft(function(n,i){var c=e.apply(null,n);qn(r,c)?st(function(){i.apply(null,r[c])}):qn(u,c)?u[c].push(i):(u[c]=[i],o.apply(null,n.concat(function(){var n=t(arguments);r[c]=n;var e=u[c];delete u[c];for(var o=0,i=e.length;o<i;o++)e[o].apply(null,n)})))});return i.memo=r,i.unmemoized=n,i}function Rn(n,e,r){r=r||m;var u=d(e)?[]:{};n(e,function(n,e,r){a(n)(function(n,o){arguments.length>2&&(o=t(arguments,1)),u[e]=o,r(n)})},function(n){r(n,u)})}function Cn(n,t){Rn(_e,n,t)}function $n(n,t,e){Rn(z(t),n,e)}function Wn(n,t){if(t=g(t||m),!qt(n))return t(new TypeError("First argument to race must be an array of functions"));if(!n.length)return t();for(var e=0,r=n.length;e<r;e++)a(n[e])(t)}function Nn(n,e,r,u){var o=t(n).reverse();dn(o,e,r,u)}function Qn(n){var e=a(n);return ft(function(n,r){return n.push(function(n,e){if(n)r(null,{error:n});else{var u;u=arguments.length<=2?e:t(arguments,1),r(null,{value:u})}}),e.apply(this,n)})}function Gn(n,t,e,r){zn(n,t,function(n,t){e(n,function(n,e){t(n,!e)})},r)}function Hn(n){var t;return qt(n)?t=K(n,Qn):(t={},N(n,function(n,e){t[e]=Qn.call(this,n)})),t}function Jn(n){return function(){return n}}function Kn(n,t,e){function r(n,t){if("object"==typeof t)n.times=+t.times||o,n.intervalFunc="function"==typeof t.interval?t.interval:Jn(+t.interval||i),n.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");n.times=+t||o}}function u(){f(function(n){n&&l++<c.times&&("function"!=typeof c.errorFilter||c.errorFilter(n))?setTimeout(u,c.intervalFunc(l)):e.apply(null,arguments)})}var o=5,i=0,c={times:o,intervalFunc:Jn(i)};if(arguments.length<3&&"function"==typeof n?(e=t||m,t=n):(r(c,n),e=e||m),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var f=a(t),l=1;u()}function Xn(n,t){Rn(kr,n,t)}function Yn(n,t,e){function r(n,t){var e=n.criteria,r=t.criteria;return e<r?-1:e>r?1:0}var u=a(t);Me(n,function(n,t){u(n,function(e,r){return e?t(e):void t(null,{value:n,criteria:r})})},function(n,t){return n?e(n):void e(null,K(t.sort(r),_n("value")))})}function Zn(n,t,e){var r=a(n);return ft(function(u,o){function i(){var t=n.name||"anonymous",r=new Error('Callback function "'+t+'" timed out.');r.code="ETIMEDOUT",e&&(r.info=e),f=!0,o(r)}var c,f=!1;u.push(function(){f||(o.apply(null,arguments),clearTimeout(c))}),c=setTimeout(i,t),r.apply(null,u)})}function nt(n,t,e,r){for(var u=-1,o=tu(nu((t-n)/(e||1)),0),i=Array(o);o--;)i[r?o:++u]=n,n+=e;return i}function tt(n,t,e,r){var u=a(e);ze(nt(0,n,1),t,u,r)}function et(n,t,e,r){arguments.length<=3&&(r=e,e=t,t=qt(n)?[]:{}),r=g(r||m);var u=a(e);_e(n,function(n,e,r){u(t,n,e,r)},function(n){r(n,t)})}function rt(n,e){var r,u=null;e=e||m,Fr(n,function(n,e){a(n)(function(n,o){r=arguments.length>2?t(arguments,1):o,u=n,e(!n)})},function(){e(u,r)})}function ut(n){return function(){return(n.unmemoized||n).apply(null,arguments)}}function ot(n,e,r){r=U(r||m);var u=a(e);if(!n())return r(null);var o=function(e){if(e)return r(e);if(n())return u(o);var i=t(arguments,1);r.apply(null,[null].concat(i))};u(o)}function it(n,t,e){ot(function(){return!n.apply(this,arguments)},t,e)}var ct,ft=function(n){return function(){var e=t(arguments),r=e.pop();n.call(this,e,r)}},at="function"==typeof setImmediate&&setImmediate,lt="object"==typeof process&&"function"==typeof process.nextTick;ct=at?setImmediate:lt?process.nextTick:r;var st=u(ct),pt="function"==typeof Symbol,ht="object"==typeof global&&global&&global.Object===Object&&global,yt="object"==typeof self&&self&&self.Object===Object&&self,vt=ht||yt||Function("return this")(),dt=vt.Symbol,mt=Object.prototype,gt=mt.hasOwnProperty,bt=mt.toString,jt=dt?dt.toStringTag:void 0,St=Object.prototype,kt=St.toString,Ot="[object Null]",wt="[object Undefined]",xt=dt?dt.toStringTag:void 0,Lt="[object AsyncFunction]",Et="[object Function]",At="[object GeneratorFunction]",Tt="[object Proxy]",Bt=9007199254740991,Ft={},It="function"==typeof Symbol&&Symbol.iterator,_t=function(n){return It&&n[It]&&n[It]()},Mt="[object Arguments]",Ut=Object.prototype,zt=Ut.hasOwnProperty,Pt=Ut.propertyIsEnumerable,Vt=S(function(){return arguments}())?S:function(n){return j(n)&&zt.call(n,"callee")&&!Pt.call(n,"callee")},qt=Array.isArray,Dt="object"==typeof n&&n&&!n.nodeType&&n,Rt=Dt&&"object"==typeof module&&module&&!module.nodeType&&module,Ct=Rt&&Rt.exports===Dt,$t=Ct?vt.Buffer:void 0,Wt=$t?$t.isBuffer:void 0,Nt=Wt||k,Qt=9007199254740991,Gt=/^(?:0|[1-9]\d*)$/,Ht="[object Arguments]",Jt="[object Array]",Kt="[object Boolean]",Xt="[object Date]",Yt="[object Error]",Zt="[object Function]",ne="[object Map]",te="[object Number]",ee="[object Object]",re="[object RegExp]",ue="[object Set]",oe="[object String]",ie="[object WeakMap]",ce="[object ArrayBuffer]",fe="[object DataView]",ae="[object Float32Array]",le="[object Float64Array]",se="[object Int8Array]",pe="[object Int16Array]",he="[object Int32Array]",ye="[object Uint8Array]",ve="[object Uint8ClampedArray]",de="[object Uint16Array]",me="[object Uint32Array]",ge={};ge[ae]=ge[le]=ge[se]=ge[pe]=ge[he]=ge[ye]=ge[ve]=ge[de]=ge[me]=!0,ge[Ht]=ge[Jt]=ge[ce]=ge[Kt]=ge[fe]=ge[Xt]=ge[Yt]=ge[Zt]=ge[ne]=ge[te]=ge[ee]=ge[re]=ge[ue]=ge[oe]=ge[ie]=!1;var be="object"==typeof n&&n&&!n.nodeType&&n,je=be&&"object"==typeof module&&module&&!module.nodeType&&module,Se=je&&je.exports===be,ke=Se&&ht.process,Oe=function(){try{return ke&&ke.binding("util")}catch(n){}}(),we=Oe&&Oe.isTypedArray,xe=we?x(we):w,Le=Object.prototype,Ee=Le.hasOwnProperty,Ae=Object.prototype,Te=A(Object.keys,Object),Be=Object.prototype,Fe=Be.hasOwnProperty,Ie=V(P,1/0),_e=function(n,t,e){var r=d(n)?q:Ie;r(n,a(t),e)},Me=D(R),Ue=l(Me),ze=C(R),Pe=V(ze,1),Ve=l(Pe),qe=function(n){var e=t(arguments,1);return function(){var r=t(arguments);return n.apply(null,e.concat(r))}},De=W(),Re=function(n,e,r){function u(n,t){j.push(function(){f(n,t)})}function o(){if(0===j.length&&0===v)return r(null,y);for(;j.length&&v<e;){var n=j.shift();n()}}function i(n,t){var e=b[n];e||(e=b[n]=[]),e.push(t)}function c(n){var t=b[n]||[];$(t,function(n){n()}),o()}function f(n,e){if(!d){var u=U(function(e,u){if(v--,arguments.length>2&&(u=t(arguments,1)),e){var o={};N(y,function(n,t){o[t]=n}),o[n]=u,d=!0,b=Object.create(null),r(e,o)}else y[n]=u,c(n)});v++;var o=a(e[e.length-1]);e.length>1?o(y,u):o(u)}}function l(){for(var n,t=0;S.length;)n=S.pop(),t++,$(s(n),function(n){0===--k[n]&&S.push(n)});if(t!==h)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function s(t){var e=[];return N(n,function(n,r){qt(n)&&J(n,t,0)>=0&&e.push(r)}),e}"function"==typeof e&&(r=e,e=null),r=g(r||m);var p=B(n),h=p.length;if(!h)return r(null);e||(e=h);var y={},v=0,d=!1,b=Object.create(null),j=[],S=[],k={};N(n,function(t,e){if(!qt(t))return u(e,[t]),void S.push(e);var r=t.slice(0,t.length-1),o=r.length;return 0===o?(u(e,t),void S.push(e)):(k[e]=o,void $(r,function(c){if(!n[c])throw new Error("async.auto task `"+e+"` has a non-existent dependency `"+c+"` in "+r.join(", "));i(c,function(){o--,0===o&&u(e,t)})}))}),l(),o()},Ce="[object Symbol]",$e=1/0,We=dt?dt.prototype:void 0,Ne=We?We.toString:void 0,Qe="\\ud800-\\udfff",Ge="\\u0300-\\u036f\\ufe20-\\ufe23",He="\\u20d0-\\u20f0",Je="\\ufe0e\\ufe0f",Ke="\\u200d",Xe=RegExp("["+Ke+Qe+Ge+He+Je+"]"),Ye="\\ud800-\\udfff",Ze="\\u0300-\\u036f\\ufe20-\\ufe23",nr="\\u20d0-\\u20f0",tr="\\ufe0e\\ufe0f",er="["+Ye+"]",rr="["+Ze+nr+"]",ur="\\ud83c[\\udffb-\\udfff]",or="(?:"+rr+"|"+ur+")",ir="[^"+Ye+"]",cr="(?:\\ud83c[\\udde6-\\uddff]){2}",fr="[\\ud800-\\udbff][\\udc00-\\udfff]",ar="\\u200d",lr=or+"?",sr="["+tr+"]?",pr="(?:"+ar+"(?:"+[ir,cr,fr].join("|")+")"+sr+lr+")*",hr=sr+lr+pr,yr="(?:"+[ir+rr+"?",rr,cr,fr,er].join("|")+")",vr=RegExp(ur+"(?="+ur+")|"+yr+hr,"g"),dr=/^\s+|\s+$/g,mr=/^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,gr=/,/,br=/(=.+)?(\s*)$/,jr=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;pn.prototype.removeLink=function(n){return n.prev?n.prev.next=n.next:this.head=n.next,n.next?n.next.prev=n.prev:this.tail=n.prev,n.prev=n.next=null,this.length-=1,n},pn.prototype.empty=function(){for(;this.head;)this.shift();return this},pn.prototype.insertAfter=function(n,t){t.prev=n,t.next=n.next,n.next?n.next.prev=t:this.tail=t,n.next=t,this.length+=1},pn.prototype.insertBefore=function(n,t){t.prev=n.prev,t.next=n,n.prev?n.prev.next=t:this.head=t,n.prev=t,this.length+=1},pn.prototype.unshift=function(n){this.head?this.insertBefore(this.head,n):hn(this,n)},pn.prototype.push=function(n){this.tail?this.insertAfter(this.tail,n):hn(this,n)},pn.prototype.shift=function(){return this.head&&this.removeLink(this.head)},pn.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)},pn.prototype.toArray=function(){for(var n=Array(this.length),t=this.head,e=0;e<this.length;e++)n[e]=t.data,t=t.next;return n},pn.prototype.remove=function(n){for(var t=this.head;t;){var e=t.next;n(t)&&this.removeLink(t),t=e}return this};var Sr,kr=V(P,1),Or=function(){return mn.apply(null,t(arguments).reverse())},wr=D(gn),xr=bn(gn),Lr=function(){var n=t(arguments),e=[null].concat(n);return function(){var n=arguments[arguments.length-1];return n.apply(this,e)}},Er=D(Sn(jn,kn)),Ar=C(Sn(jn,kn)),Tr=V(Ar,1),Br=On("dir"),Fr=V(Bn,1),Ir=D(Sn(In,In)),_r=C(Sn(In,In)),Mr=V(_r,1),Ur=D(zn),zr=C(zn),Pr=V(zr,1),Vr=function(n,t,e,r){r=r||m;var u=a(e);ze(n,t,function(n,t){u(n,function(e,r){return e?t(e):t(null,{key:r,val:n})})},function(n,t){for(var e={},u=Object.prototype.hasOwnProperty,o=0;o<t.length;o++)if(t[o]){var i=t[o].key,c=t[o].val;u.call(e,i)?e[i].push(c):e[i]=[c]}return r(n,e)})},qr=V(Vr,1/0),Dr=V(Vr,1),Rr=On("log"),Cr=V(Vn,1/0),$r=V(Vn,1);Sr=lt?process.nextTick:at?setImmediate:r;var Wr=u(Sr),Nr=function(n,t){var e=a(n);return yn(function(n,t){e(n[0],t)},t,1)},Qr=function(n,t){var e=Nr(n,t);return e.push=function(n,t,r){if(null==r&&(r=m),"function"!=typeof r)throw new Error("task callback must be a function");if(e.started=!0,qt(n)||(n=[n]),0===n.length)return st(function(){e.drain()});t=t||0;for(var u=e._tasks.head;u&&t>=u.priority;)u=u.next;for(var o=0,i=n.length;o<i;o++){var c={data:n[o],priority:t,callback:r};u?e._tasks.insertBefore(u,c):e._tasks.push(c)}st(e.process)},delete e.unshift,e},Gr=D(Gn),Hr=C(Gn),Jr=V(Hr,1),Kr=function(n,t){t||(t=n,n=null);var e=a(t);return ft(function(t,r){function u(n){e.apply(null,t.concat(n))}n?Kn(n,u,r):Kn(u,r)})},Xr=D(Sn(Boolean,jn)),Yr=C(Sn(Boolean,jn)),Zr=V(Yr,1),nu=Math.ceil,tu=Math.max,eu=V(tt,1/0),ru=V(tt,1),uu=function(n,e){function r(t){var e=a(n[o++]);t.push(U(u)),e.apply(null,t)}function u(u){return u||o===n.length?e.apply(null,arguments):void r(t(arguments,1))}if(e=g(e||m),!qt(n))return e(new Error("First argument to waterfall must be an array of functions"));if(!n.length)return e();var o=0;r([])},ou={applyEach:Ue,applyEachSeries:Ve,apply:qe,asyncify:o,auto:Re,autoInject:sn,cargo:vn,compose:Or,concat:wr,concatSeries:xr,constant:Lr,detect:Er,detectLimit:Ar,detectSeries:Tr,dir:Br,doDuring:wn,doUntil:Ln,doWhilst:xn,during:En,each:Tn,eachLimit:Bn,eachOf:_e,eachOfLimit:P,eachOfSeries:kr,eachSeries:Fr,ensureAsync:Fn,every:Ir,everyLimit:_r,everySeries:Mr,filter:Ur,filterLimit:zr,filterSeries:Pr,forever:Pn,groupBy:qr,groupByLimit:Vr,groupBySeries:Dr,log:Rr,map:Me,mapLimit:ze,mapSeries:Pe,mapValues:Cr,mapValuesLimit:Vn,mapValuesSeries:$r,memoize:Dn,nextTick:Wr,parallel:Cn,parallelLimit:$n,priorityQueue:Qr,queue:Nr,race:Wn,reduce:dn,reduceRight:Nn,reflect:Qn,reflectAll:Hn,reject:Gr,rejectLimit:Hr,rejectSeries:Jr,retry:Kn,retryable:Kr,seq:mn,series:Xn,setImmediate:st,some:Xr,someLimit:Yr,someSeries:Zr,sortBy:Yn,timeout:Zn,times:eu,timesLimit:tt,timesSeries:ru,transform:et,tryEach:rt,unmemoize:ut,until:it,waterfall:uu,whilst:ot,all:Ir,any:Xr,forEach:Tn,forEachSeries:Fr,forEachLimit:Bn,forEachOf:_e,forEachOfSeries:kr,forEachOfLimit:P,inject:dn,foldl:dn,foldr:Nn,select:Ur,selectLimit:zr,selectSeries:Pr,wrapSync:o};n.default=ou,n.applyEach=Ue,n.applyEachSeries=Ve,n.apply=qe,n.asyncify=o,n.auto=Re,n.autoInject=sn,n.cargo=vn,n.compose=Or,n.concat=wr,n.concatSeries=xr,n.constant=Lr,n.detect=Er,n.detectLimit=Ar,n.detectSeries=Tr,n.dir=Br,n.doDuring=wn,n.doUntil=Ln,n.doWhilst=xn,n.during=En,n.each=Tn,n.eachLimit=Bn,n.eachOf=_e,n.eachOfLimit=P,n.eachOfSeries=kr,n.eachSeries=Fr,n.ensureAsync=Fn,n.every=Ir,n.everyLimit=_r,n.everySeries=Mr,n.filter=Ur,n.filterLimit=zr,n.filterSeries=Pr,n.forever=Pn,n.groupBy=qr,n.groupByLimit=Vr,n.groupBySeries=Dr,n.log=Rr,n.map=Me,n.mapLimit=ze,n.mapSeries=Pe,n.mapValues=Cr,n.mapValuesLimit=Vn,n.mapValuesSeries=$r,n.memoize=Dn,n.nextTick=Wr,n.parallel=Cn,n.parallelLimit=$n,n.priorityQueue=Qr,n.queue=Nr,n.race=Wn,n.reduce=dn,n.reduceRight=Nn,n.reflect=Qn,n.reflectAll=Hn,n.reject=Gr,n.rejectLimit=Hr,n.rejectSeries=Jr,n.retry=Kn,n.retryable=Kr,n.seq=mn,n.series=Xn,n.setImmediate=st,n.some=Xr,n.someLimit=Yr,n.someSeries=Zr,n.sortBy=Yn,n.timeout=Zn,n.times=eu,n.timesLimit=tt,n.timesSeries=ru,n.transform=et,n.tryEach=rt,n.unmemoize=ut,n.until=it,n.waterfall=uu,n.whilst=ot,n.all=Ir,n.allLimit=_r,n.allSeries=Mr,n.any=Xr,n.anyLimit=Yr,n.anySeries=Zr,n.find=Er,n.findLimit=Ar,n.findSeries=Tr,n.forEach=Tn,n.forEachSeries=Fr,n.forEachLimit=Bn,n.forEachOf=_e,n.forEachOfSeries=kr,n.forEachOfLimit=P,n.inject=dn,n.foldl=dn,n.foldr=Nn,n.select=Ur,n.selectLimit=zr,n.selectSeries=Pr,n.wrapSync=o,Object.defineProperty(n,"__esModule",{value:!0})});
+!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.async=n.async||{})}(this,function(n){"use strict";function t(n,t){t|=0;for(var e=Math.max(n.length-t,0),r=Array(e),u=0;u<e;u++)r[u]=n[t+u];return r}function e(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function r(n){setTimeout(n,0)}function u(n){return function(e){var r=t(arguments,1);n(function(){e.apply(null,r)})}}function o(n){return it(function(t,r){var u;try{u=n.apply(this,t)}catch(n){return r(n)}e(u)&&"function"==typeof u.then?u.then(function(n){i(r,null,n)},function(n){i(r,n.message?n:new Error(n))}):r(null,u)})}function i(n,t,e){try{n(t,e)}catch(n){at(c,n)}}function c(n){throw n}function f(n){return lt&&"AsyncFunction"===n[Symbol.toStringTag]}function a(n){return f(n)?o(n):n}function l(n){return function(e){var r=t(arguments,1),u=it(function(t,r){var u=this;return n(e,function(n,e){a(n).apply(u,t.concat(e))},r)});return r.length?u.apply(this,r):u}}function s(n){var t=dt.call(n,gt),e=n[gt];try{n[gt]=void 0;var r=!0}catch(n){}var u=mt.call(n);return r&&(t?n[gt]=e:delete n[gt]),u}function p(n){return jt.call(n)}function h(n){return null==n?void 0===n?kt:St:(n=Object(n),Lt&&Lt in n?s(n):p(n))}function y(n){if(!e(n))return!1;var t=h(n);return t==wt||t==xt||t==Ot||t==Et}function v(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=At}function d(n){return null!=n&&v(n.length)&&!y(n)}function m(){}function g(n){return function(){if(null!==n){var t=n;n=null,t.apply(this,arguments)}}}function b(n,t){for(var e=-1,r=Array(n);++e<n;)r[e]=t(e);return r}function j(n){return null!=n&&"object"==typeof n}function S(n){return j(n)&&h(n)==It}function k(){return!1}function L(n,t){return t=null==t?Wt:t,!!t&&("number"==typeof n||Nt.test(n))&&n>-1&&n%1==0&&n<t}function O(n){return j(n)&&v(n.length)&&!!de[h(n)]}function w(n){return function(t){return n(t)}}function x(n,t){var e=Pt(n),r=!e&&zt(n),u=!e&&!r&&$t(n),o=!e&&!r&&!u&&Le(n),i=e||r||u||o,c=i?b(n.length,String):[],f=c.length;for(var a in n)!t&&!we.call(n,a)||i&&("length"==a||u&&("offset"==a||"parent"==a)||o&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||L(a,f))||c.push(a);return c}function E(n){var t=n&&n.constructor,e="function"==typeof t&&t.prototype||xe;return n===e}function A(n,t){return function(e){return n(t(e))}}function T(n){if(!E(n))return Ee(n);var t=[];for(var e in Object(n))Te.call(n,e)&&"constructor"!=e&&t.push(e);return t}function B(n){return d(n)?x(n):T(n)}function F(n){var t=-1,e=n.length;return function(){return++t<e?{value:n[t],key:t}:null}}function I(n){var t=-1;return function(){var e=n.next();return e.done?null:(t++,{value:e.value,key:t})}}function _(n){var t=B(n),e=-1,r=t.length;return function(){var u=t[++e];return e<r?{value:n[u],key:u}:null}}function M(n){if(d(n))return F(n);var t=Ft(n);return t?I(t):_(n)}function U(n){return function(){if(null===n)throw new Error("Callback was already called.");var t=n;n=null,t.apply(this,arguments)}}function z(n){return function(t,e,r){function u(n,t){if(f-=1,n)c=!0,r(n);else{if(t===Tt||c&&f<=0)return c=!0,r(null);o()}}function o(){for(;f<n&&!c;){var t=i();if(null===t)return c=!0,void(f<=0&&r(null));f+=1,e(t.value,t.key,U(u))}}if(r=g(r||m),n<=0||!t)return r(null);var i=M(t),c=!1,f=0;o()}}function P(n,t,e,r){z(t)(n,a(e),r)}function V(n,t){return function(e,r,u){return n(e,t,r,u)}}function q(n,t,e){function r(n,t){n?e(n):++o!==i&&t!==Tt||e(null)}e=g(e||m);var u=0,o=0,i=n.length;for(0===i&&e(null);u<i;u++)t(n[u],u,U(r))}function D(n){return function(t,e,r){return n(Fe,t,a(e),r)}}function R(n,t,e,r){r=r||m,t=t||[];var u=[],o=0,i=a(e);n(t,function(n,t,e){var r=o++;i(n,function(n,t){u[r]=t,e(n)})},function(n){r(n,u)})}function C(n){return function(t,e,r,u){return n(z(e),t,a(r),u)}}function $(n,t){for(var e=-1,r=null==n?0:n.length;++e<r&&t(n[e],e,n)!==!1;);return n}function W(n){return function(t,e,r){for(var u=-1,o=Object(t),i=r(t),c=i.length;c--;){var f=i[n?c:++u];if(e(o[f],f,o)===!1)break}return t}}function N(n,t){return n&&Ve(n,t,B)}function Q(n,t,e,r){for(var u=n.length,o=e+(r?1:-1);r?o--:++o<u;)if(t(n[o],o,n))return o;return-1}function G(n){return n!==n}function H(n,t,e){for(var r=e-1,u=n.length;++r<u;)if(n[r]===t)return r;return-1}function J(n,t,e){return t===t?H(n,t,e):Q(n,G,e)}function K(n,t){for(var e=-1,r=null==n?0:n.length,u=Array(r);++e<r;)u[e]=t(n[e],e,n);return u}function X(n){return"symbol"==typeof n||j(n)&&h(n)==De}function Y(n){if("string"==typeof n)return n;if(Pt(n))return K(n,Y)+"";if(X(n))return $e?$e.call(n):"";var t=n+"";return"0"==t&&1/n==-Re?"-0":t}function Z(n,t,e){var r=-1,u=n.length;t<0&&(t=-t>u?0:u+t),e=e>u?u:e,e<0&&(e+=u),u=t>e?0:e-t>>>0,t>>>=0;for(var o=Array(u);++r<u;)o[r]=n[r+t];return o}function nn(n,t,e){var r=n.length;return e=void 0===e?r:e,!t&&e>=r?n:Z(n,t,e)}function tn(n,t){for(var e=n.length;e--&&J(t,n[e],0)>-1;);return e}function en(n,t){for(var e=-1,r=n.length;++e<r&&J(t,n[e],0)>-1;);return e}function rn(n){return n.split("")}function un(n){return Je.test(n)}function on(n){return n.match(hr)||[]}function cn(n){return un(n)?on(n):rn(n)}function fn(n){return null==n?"":Y(n)}function an(n,t,e){if(n=fn(n),n&&(e||void 0===t))return n.replace(yr,"");if(!n||!(t=Y(t)))return n;var r=cn(n),u=cn(t),o=en(r,u),i=tn(r,u)+1;return nn(r,o,i).join("")}function ln(n){return n=n.toString().replace(gr,""),n=n.match(vr)[2].replace(" ",""),n=n?n.split(dr):[],n=n.map(function(n){return an(n.replace(mr,""))})}function sn(n,t){var e={};N(n,function(n,t){function r(t,e){var r=K(u,function(n){return t[n]});r.push(e),a(n).apply(null,r)}var u,o=f(n),i=!o&&1===n.length||o&&0===n.length;if(Pt(n))u=n.slice(0,-1),n=n[n.length-1],e[t]=u.concat(u.length>0?r:n);else if(i)e[t]=n;else{if(u=ln(n),0===n.length&&!o&&0===u.length)throw new Error("autoInject task functions require explicit parameters.");o||u.pop(),e[t]=u.concat(r)}}),qe(e,t)}function pn(){this.head=this.tail=null,this.length=0}function hn(n,t){n.length=1,n.head=n.tail=t}function yn(n,t,e){function r(n,t,e){if(null!=e&&"function"!=typeof e)throw new Error("task callback must be a function");if(l.started=!0,Pt(n)||(n=[n]),0===n.length&&l.idle())return at(function(){l.drain()});for(var r=0,u=n.length;r<u;r++){var o={data:n[r],callback:e||m};t?l._tasks.unshift(o):l._tasks.push(o)}at(l.process)}function u(n){return function(t){i-=1;for(var e=0,r=n.length;e<r;e++){var u=n[e],o=J(c,u,0);o>=0&&c.splice(o,1),u.callback.apply(u,arguments),null!=t&&l.error(t,u.data)}i<=l.concurrency-l.buffer&&l.unsaturated(),l.idle()&&l.drain(),l.process()}}if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var o=a(n),i=0,c=[],f=!1,l={_tasks:new pn,concurrency:t,payload:e,saturated:m,unsaturated:m,buffer:t/4,empty:m,drain:m,error:m,started:!1,paused:!1,push:function(n,t){r(n,!1,t)},kill:function(){l.drain=m,l._tasks.empty()},unshift:function(n,t){r(n,!0,t)},remove:function(n){l._tasks.remove(n)},process:function(){if(!f){for(f=!0;!l.paused&&i<l.concurrency&&l._tasks.length;){var n=[],t=[],e=l._tasks.length;l.payload&&(e=Math.min(e,l.payload));for(var r=0;r<e;r++){var a=l._tasks.shift();n.push(a),c.push(a),t.push(a.data)}i+=1,0===l._tasks.length&&l.empty(),i===l.concurrency&&l.saturated();var s=U(u(n));o(t,s)}f=!1}},length:function(){return l._tasks.length},running:function(){return i},workersList:function(){return c},idle:function(){return l._tasks.length+i===0},pause:function(){l.paused=!0},resume:function(){l.paused!==!1&&(l.paused=!1,at(l.process))}};return l}function vn(n,t){return yn(n,1,t)}function dn(n,t,e,r){r=g(r||m);var u=a(e);jr(n,function(n,e,r){u(t,n,function(n,e){t=e,r(n)})},function(n){r(n,t)})}function mn(){var n=K(arguments,a);return function(){var e=t(arguments),r=this,u=e[e.length-1];"function"==typeof u?e.pop():u=m,dn(n,e,function(n,e,u){e.apply(r,n.concat(function(n){var e=t(arguments,1);u(n,e)}))},function(n,t){u.apply(r,[n].concat(t))})}}function gn(n){return n}function bn(n,t){return function(e,r,u,o){o=o||m;var i,c=!1;e(r,function(e,r,o){u(e,function(r,u){r?o(r):n(u)&&!i?(c=!0,i=t(!0,e),o(null,Tt)):o()})},function(n){n?o(n):o(null,c?i:t(!1))})}}function jn(n,t){return t}function Sn(n){return function(e){var r=t(arguments,1);r.push(function(e){var r=t(arguments,1);"object"==typeof console&&(e?console.error&&console.error(e):console[n]&&$(r,function(t){console[n](t)}))}),a(e).apply(null,r)}}function kn(n,e,r){function u(n){if(n)return r(n);var e=t(arguments,1);e.push(o),c.apply(this,e)}function o(n,t){return n?r(n):t?void i(u):r(null)}r=U(r||m);var i=a(n),c=a(e);o(null,!0)}function Ln(n,e,r){r=U(r||m);var u=a(n),o=function(n){if(n)return r(n);var i=t(arguments,1);return e.apply(this,i)?u(o):void r.apply(null,[null].concat(i))};u(o)}function On(n,t,e){Ln(n,function(){return!t.apply(this,arguments)},e)}function wn(n,t,e){function r(n){return n?e(n):void i(u)}function u(n,t){return n?e(n):t?void o(r):e(null)}e=U(e||m);var o=a(t),i=a(n);i(u)}function xn(n){return function(t,e,r){return n(t,r)}}function En(n,t,e){Fe(n,xn(a(t)),e)}function An(n,t,e,r){z(t)(n,xn(a(e)),r)}function Tn(n){return f(n)?n:it(function(t,e){var r=!0;t.push(function(){var n=arguments;r?at(function(){e.apply(null,n)}):e.apply(null,n)}),n.apply(this,t),r=!1})}function Bn(n){return!n}function Fn(n){return function(t){return null==t?void 0:t[n]}}function In(n,t,e,r){var u=new Array(t.length);n(t,function(n,t,r){e(n,function(n,e){u[t]=!!e,r(n)})},function(n){if(n)return r(n);for(var e=[],o=0;o<t.length;o++)u[o]&&e.push(t[o]);r(null,e)})}function _n(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(e,o){e?r(e):(o&&u.push({index:t,value:n}),r())})},function(n){n?r(n):r(null,K(u.sort(function(n,t){return n.index-t.index}),Fn("value")))})}function Mn(n,t,e,r){var u=d(t)?In:_n;u(n,t,a(e),r||m)}function Un(n,t){function e(n){return n?r(n):void u(e)}var r=U(t||m),u=a(Tn(n));e()}function zn(n,t,e,r){r=g(r||m);var u={},o=a(e);P(n,t,function(n,t,e){o(n,t,function(n,r){return n?e(n):(u[t]=r,void e())})},function(n){r(n,u)})}function Pn(n,t){return t in n}function Vn(n,e){var r=Object.create(null),u=Object.create(null);e=e||gn;var o=a(n),i=it(function(n,i){var c=e.apply(null,n);Pn(r,c)?at(function(){i.apply(null,r[c])}):Pn(u,c)?u[c].push(i):(u[c]=[i],o.apply(null,n.concat(function(){var n=t(arguments);r[c]=n;var e=u[c];delete u[c];for(var o=0,i=e.length;o<i;o++)e[o].apply(null,n)})))});return i.memo=r,i.unmemoized=n,i}function qn(n,e,r){r=r||m;var u=d(e)?[]:{};n(e,function(n,e,r){a(n)(function(n,o){arguments.length>2&&(o=t(arguments,1)),u[e]=o,r(n)})},function(n){r(n,u)})}function Dn(n,t){qn(Fe,n,t)}function Rn(n,t,e){qn(z(t),n,e)}function Cn(n,t){if(t=g(t||m),!Pt(n))return t(new TypeError("First argument to race must be an array of functions"));if(!n.length)return t();for(var e=0,r=n.length;e<r;e++)a(n[e])(t)}function $n(n,e,r,u){var o=t(n).reverse();dn(o,e,r,u)}function Wn(n){var e=a(n);return it(function(n,r){return n.push(function(n,e){if(n)r(null,{error:n});else{var u;u=arguments.length<=2?e:t(arguments,1),r(null,{value:u})}}),e.apply(this,n)})}function Nn(n,t,e,r){Mn(n,t,function(n,t){e(n,function(n,e){t(n,!e)})},r)}function Qn(n){var t;return Pt(n)?t=K(n,Wn):(t={},N(n,function(n,e){t[e]=Wn.call(this,n)})),t}function Gn(n){return function(){return n}}function Hn(n,t,e){function r(n,t){if("object"==typeof t)n.times=+t.times||o,n.intervalFunc="function"==typeof t.interval?t.interval:Gn(+t.interval||i),n.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");n.times=+t||o}}function u(){f(function(n){n&&l++<c.times&&("function"!=typeof c.errorFilter||c.errorFilter(n))?setTimeout(u,c.intervalFunc(l)):e.apply(null,arguments)})}var o=5,i=0,c={times:o,intervalFunc:Gn(i)};if(arguments.length<3&&"function"==typeof n?(e=t||m,t=n):(r(c,n),e=e||m),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var f=a(t),l=1;u()}function Jn(n,t){qn(jr,n,t)}function Kn(n,t,e){function r(n,t){var e=n.criteria,r=t.criteria;return e<r?-1:e>r?1:0}var u=a(t);Ie(n,function(n,t){u(n,function(e,r){return e?t(e):void t(null,{value:n,criteria:r})})},function(n,t){return n?e(n):void e(null,K(t.sort(r),Fn("value")))})}function Xn(n,t,e){var r=a(n);return it(function(u,o){function i(){var t=n.name||"anonymous",r=new Error('Callback function "'+t+'" timed out.');r.code="ETIMEDOUT",e&&(r.info=e),f=!0,o(r)}var c,f=!1;u.push(function(){f||(o.apply(null,arguments),clearTimeout(c))}),c=setTimeout(i,t),r.apply(null,u)})}function Yn(n,t,e,r){for(var u=-1,o=tu(nu((t-n)/(e||1)),0),i=Array(o);o--;)i[r?o:++u]=n,n+=e;return i}function Zn(n,t,e,r){var u=a(e);Me(Yn(0,n,1),t,u,r)}function nt(n,t,e,r){arguments.length<=3&&(r=e,e=t,t=Pt(n)?[]:{}),r=g(r||m);var u=a(e);Fe(n,function(n,e,r){u(t,n,e,r)},function(n){r(n,t)})}function tt(n,e){var r,u=null;e=e||m,Fr(n,function(n,e){a(n)(function(n,o){r=arguments.length>2?t(arguments,1):o,u=n,e(!n)})},function(){e(u,r)})}function et(n){return function(){return(n.unmemoized||n).apply(null,arguments)}}function rt(n,e,r){r=U(r||m);var u=a(e);if(!n())return r(null);var o=function(e){if(e)return r(e);if(n())return u(o);var i=t(arguments,1);r.apply(null,[null].concat(i))};u(o)}function ut(n,t,e){rt(function(){return!n.apply(this,arguments)},t,e)}var ot,it=function(n){return function(){var e=t(arguments),r=e.pop();n.call(this,e,r)}},ct="function"==typeof setImmediate&&setImmediate,ft="object"==typeof process&&"function"==typeof process.nextTick;ot=ct?setImmediate:ft?process.nextTick:r;var at=u(ot),lt="function"==typeof Symbol,st="object"==typeof global&&global&&global.Object===Object&&global,pt="object"==typeof self&&self&&self.Object===Object&&self,ht=st||pt||Function("return this")(),yt=ht.Symbol,vt=Object.prototype,dt=vt.hasOwnProperty,mt=vt.toString,gt=yt?yt.toStringTag:void 0,bt=Object.prototype,jt=bt.toString,St="[object Null]",kt="[object Undefined]",Lt=yt?yt.toStringTag:void 0,Ot="[object AsyncFunction]",wt="[object Function]",xt="[object GeneratorFunction]",Et="[object Proxy]",At=9007199254740991,Tt={},Bt="function"==typeof Symbol&&Symbol.iterator,Ft=function(n){return Bt&&n[Bt]&&n[Bt]()},It="[object Arguments]",_t=Object.prototype,Mt=_t.hasOwnProperty,Ut=_t.propertyIsEnumerable,zt=S(function(){return arguments}())?S:function(n){return j(n)&&Mt.call(n,"callee")&&!Ut.call(n,"callee")},Pt=Array.isArray,Vt="object"==typeof n&&n&&!n.nodeType&&n,qt=Vt&&"object"==typeof module&&module&&!module.nodeType&&module,Dt=qt&&qt.exports===Vt,Rt=Dt?ht.Buffer:void 0,Ct=Rt?Rt.isBuffer:void 0,$t=Ct||k,Wt=9007199254740991,Nt=/^(?:0|[1-9]\d*)$/,Qt="[object Arguments]",Gt="[object Array]",Ht="[object Boolean]",Jt="[object Date]",Kt="[object Error]",Xt="[object Function]",Yt="[object Map]",Zt="[object Number]",ne="[object Object]",te="[object RegExp]",ee="[object Set]",re="[object String]",ue="[object WeakMap]",oe="[object ArrayBuffer]",ie="[object DataView]",ce="[object Float32Array]",fe="[object Float64Array]",ae="[object Int8Array]",le="[object Int16Array]",se="[object Int32Array]",pe="[object Uint8Array]",he="[object Uint8ClampedArray]",ye="[object Uint16Array]",ve="[object Uint32Array]",de={};de[ce]=de[fe]=de[ae]=de[le]=de[se]=de[pe]=de[he]=de[ye]=de[ve]=!0,de[Qt]=de[Gt]=de[oe]=de[Ht]=de[ie]=de[Jt]=de[Kt]=de[Xt]=de[Yt]=de[Zt]=de[ne]=de[te]=de[ee]=de[re]=de[ue]=!1;var me="object"==typeof n&&n&&!n.nodeType&&n,ge=me&&"object"==typeof module&&module&&!module.nodeType&&module,be=ge&&ge.exports===me,je=be&&st.process,Se=function(){try{return je&&je.binding("util")}catch(n){}}(),ke=Se&&Se.isTypedArray,Le=ke?w(ke):O,Oe=Object.prototype,we=Oe.hasOwnProperty,xe=Object.prototype,Ee=A(Object.keys,Object),Ae=Object.prototype,Te=Ae.hasOwnProperty,Be=V(P,1/0),Fe=function(n,t,e){var r=d(n)?q:Be;r(n,a(t),e)},Ie=D(R),_e=l(Ie),Me=C(R),Ue=V(Me,1),ze=l(Ue),Pe=function(n){var e=t(arguments,1);return function(){var r=t(arguments);return n.apply(null,e.concat(r))}},Ve=W(),qe=function(n,e,r){function u(n,t){j.push(function(){f(n,t)})}function o(){if(0===j.length&&0===v)return r(null,y);for(;j.length&&v<e;){var n=j.shift();n()}}function i(n,t){var e=b[n];e||(e=b[n]=[]),e.push(t)}function c(n){var t=b[n]||[];$(t,function(n){n()}),o()}function f(n,e){if(!d){var u=U(function(e,u){if(v--,arguments.length>2&&(u=t(arguments,1)),e){var o={};N(y,function(n,t){o[t]=n}),o[n]=u,d=!0,b=Object.create(null),r(e,o)}else y[n]=u,c(n)});v++;var o=a(e[e.length-1]);e.length>1?o(y,u):o(u)}}function l(){for(var n,t=0;S.length;)n=S.pop(),t++,$(s(n),function(n){0===--k[n]&&S.push(n)});if(t!==h)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function s(t){var e=[];return N(n,function(n,r){Pt(n)&&J(n,t,0)>=0&&e.push(r)}),e}"function"==typeof e&&(r=e,e=null),r=g(r||m);var p=B(n),h=p.length;if(!h)return r(null);e||(e=h);var y={},v=0,d=!1,b=Object.create(null),j=[],S=[],k={};N(n,function(t,e){if(!Pt(t))return u(e,[t]),void S.push(e);var r=t.slice(0,t.length-1),o=r.length;return 0===o?(u(e,t),void S.push(e)):(k[e]=o,void $(r,function(c){if(!n[c])throw new Error("async.auto task `"+e+"` has a non-existent dependency `"+c+"` in "+r.join(", "));i(c,function(){o--,0===o&&u(e,t)})}))}),l(),o()},De="[object Symbol]",Re=1/0,Ce=yt?yt.prototype:void 0,$e=Ce?Ce.toString:void 0,We="\\ud800-\\udfff",Ne="\\u0300-\\u036f\\ufe20-\\ufe23",Qe="\\u20d0-\\u20f0",Ge="\\ufe0e\\ufe0f",He="\\u200d",Je=RegExp("["+He+We+Ne+Qe+Ge+"]"),Ke="\\ud800-\\udfff",Xe="\\u0300-\\u036f\\ufe20-\\ufe23",Ye="\\u20d0-\\u20f0",Ze="\\ufe0e\\ufe0f",nr="["+Ke+"]",tr="["+Xe+Ye+"]",er="\\ud83c[\\udffb-\\udfff]",rr="(?:"+tr+"|"+er+")",ur="[^"+Ke+"]",or="(?:\\ud83c[\\udde6-\\uddff]){2}",ir="[\\ud800-\\udbff][\\udc00-\\udfff]",cr="\\u200d",fr=rr+"?",ar="["+Ze+"]?",lr="(?:"+cr+"(?:"+[ur,or,ir].join("|")+")"+ar+fr+")*",sr=ar+fr+lr,pr="(?:"+[ur+tr+"?",tr,or,ir,nr].join("|")+")",hr=RegExp(er+"(?="+er+")|"+pr+sr,"g"),yr=/^\s+|\s+$/g,vr=/^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,dr=/,/,mr=/(=.+)?(\s*)$/,gr=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;pn.prototype.removeLink=function(n){return n.prev?n.prev.next=n.next:this.head=n.next,n.next?n.next.prev=n.prev:this.tail=n.prev,n.prev=n.next=null,this.length-=1,n},pn.prototype.empty=function(){for(;this.head;)this.shift();return this},pn.prototype.insertAfter=function(n,t){t.prev=n,t.next=n.next,n.next?n.next.prev=t:this.tail=t,n.next=t,this.length+=1},pn.prototype.insertBefore=function(n,t){t.prev=n.prev,t.next=n,n.prev?n.prev.next=t:this.head=t,n.prev=t,this.length+=1},pn.prototype.unshift=function(n){this.head?this.insertBefore(this.head,n):hn(this,n)},pn.prototype.push=function(n){this.tail?this.insertAfter(this.tail,n):hn(this,n)},pn.prototype.shift=function(){return this.head&&this.removeLink(this.head)},pn.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)},pn.prototype.toArray=function(){for(var n=Array(this.length),t=this.head,e=0;e<this.length;e++)n[e]=t.data,t=t.next;return n},pn.prototype.remove=function(n){for(var t=this.head;t;){var e=t.next;n(t)&&this.removeLink(t),t=e}return this};var br,jr=V(P,1),Sr=function(){return mn.apply(null,t(arguments).reverse())},kr=Array.prototype.concat,Lr=function(n,e,r,u){u=u||m;var o=a(r);Me(n,e,function(n,e){o(n,function(n){return n?e(n):e(null,t(arguments,1))})},function(n,t){for(var e=[],r=0;r<t.length;r++)t[r]&&(e=kr.apply(e,t[r]));return u(n,e)})},Or=V(Lr,1/0),wr=V(Lr,1),xr=function(){var n=t(arguments),e=[null].concat(n);return function(){var n=arguments[arguments.length-1];return n.apply(this,e)}},Er=D(bn(gn,jn)),Ar=C(bn(gn,jn)),Tr=V(Ar,1),Br=Sn("dir"),Fr=V(An,1),Ir=D(bn(Bn,Bn)),_r=C(bn(Bn,Bn)),Mr=V(_r,1),Ur=D(Mn),zr=C(Mn),Pr=V(zr,1),Vr=function(n,t,e,r){r=r||m;var u=a(e);Me(n,t,function(n,t){u(n,function(e,r){return e?t(e):t(null,{key:r,val:n})})},function(n,t){for(var e={},u=Object.prototype.hasOwnProperty,o=0;o<t.length;o++)if(t[o]){var i=t[o].key,c=t[o].val;u.call(e,i)?e[i].push(c):e[i]=[c]}return r(n,e)})},qr=V(Vr,1/0),Dr=V(Vr,1),Rr=Sn("log"),Cr=V(zn,1/0),$r=V(zn,1);br=ft?process.nextTick:ct?setImmediate:r;var Wr=u(br),Nr=function(n,t){var e=a(n);return yn(function(n,t){e(n[0],t)},t,1)},Qr=function(n,t){var e=Nr(n,t);return e.push=function(n,t,r){if(null==r&&(r=m),"function"!=typeof r)throw new Error("task callback must be a function");if(e.started=!0,Pt(n)||(n=[n]),0===n.length)return at(function(){e.drain()});t=t||0;for(var u=e._tasks.head;u&&t>=u.priority;)u=u.next;for(var o=0,i=n.length;o<i;o++){var c={data:n[o],priority:t,callback:r};u?e._tasks.insertBefore(u,c):e._tasks.push(c)}at(e.process)},delete e.unshift,e},Gr=D(Nn),Hr=C(Nn),Jr=V(Hr,1),Kr=function(n,t){t||(t=n,n=null);var e=a(t);return it(function(t,r){function u(n){e.apply(null,t.concat(n))}n?Hn(n,u,r):Hn(u,r)})},Xr=D(bn(Boolean,gn)),Yr=C(bn(Boolean,gn)),Zr=V(Yr,1),nu=Math.ceil,tu=Math.max,eu=V(Zn,1/0),ru=V(Zn,1),uu=function(n,e){function r(t){var e=a(n[o++]);t.push(U(u)),e.apply(null,t)}function u(u){return u||o===n.length?e.apply(null,arguments):void r(t(arguments,1))}if(e=g(e||m),!Pt(n))return e(new Error("First argument to waterfall must be an array of functions"));if(!n.length)return e();var o=0;r([])},ou={applyEach:_e,applyEachSeries:ze,apply:Pe,asyncify:o,auto:qe,autoInject:sn,cargo:vn,compose:Sr,concat:Or,concatLimit:Lr,concatSeries:wr,constant:xr,detect:Er,detectLimit:Ar,detectSeries:Tr,dir:Br,doDuring:kn,doUntil:On,doWhilst:Ln,during:wn,each:En,eachLimit:An,eachOf:Fe,eachOfLimit:P,eachOfSeries:jr,eachSeries:Fr,ensureAsync:Tn,every:Ir,everyLimit:_r,everySeries:Mr,filter:Ur,filterLimit:zr,filterSeries:Pr,forever:Un,groupBy:qr,groupByLimit:Vr,groupBySeries:Dr,log:Rr,map:Ie,mapLimit:Me,mapSeries:Ue,mapValues:Cr,mapValuesLimit:zn,mapValuesSeries:$r,memoize:Vn,nextTick:Wr,parallel:Dn,parallelLimit:Rn,priorityQueue:Qr,queue:Nr,race:Cn,reduce:dn,reduceRight:$n,reflect:Wn,reflectAll:Qn,reject:Gr,rejectLimit:Hr,rejectSeries:Jr,retry:Hn,retryable:Kr,seq:mn,series:Jn,setImmediate:at,some:Xr,someLimit:Yr,someSeries:Zr,sortBy:Kn,timeout:Xn,times:eu,timesLimit:Zn,timesSeries:ru,transform:nt,tryEach:tt,unmemoize:et,until:ut,waterfall:uu,whilst:rt,all:Ir,any:Xr,forEach:En,forEachSeries:Fr,forEachLimit:An,forEachOf:Fe,forEachOfSeries:jr,forEachOfLimit:P,inject:dn,foldl:dn,foldr:$n,select:Ur,selectLimit:zr,selectSeries:Pr,wrapSync:o};n.default=ou,n.applyEach=_e,n.applyEachSeries=ze,n.apply=Pe,n.asyncify=o,n.auto=qe,n.autoInject=sn,n.cargo=vn,n.compose=Sr,n.concat=Or,n.concatLimit=Lr,n.concatSeries=wr,n.constant=xr,n.detect=Er,n.detectLimit=Ar,n.detectSeries=Tr,n.dir=Br,n.doDuring=kn,n.doUntil=On,n.doWhilst=Ln,n.during=wn,n.each=En,n.eachLimit=An,n.eachOf=Fe,n.eachOfLimit=P,n.eachOfSeries=jr,n.eachSeries=Fr,n.ensureAsync=Tn,n.every=Ir,n.everyLimit=_r,n.everySeries=Mr,n.filter=Ur,n.filterLimit=zr,n.filterSeries=Pr,n.forever=Un,n.groupBy=qr,n.groupByLimit=Vr,n.groupBySeries=Dr,n.log=Rr,n.map=Ie,n.mapLimit=Me,n.mapSeries=Ue,n.mapValues=Cr,n.mapValuesLimit=zn,n.mapValuesSeries=$r,n.memoize=Vn,n.nextTick=Wr,n.parallel=Dn,n.parallelLimit=Rn,n.priorityQueue=Qr,n.queue=Nr,n.race=Cn,n.reduce=dn,n.reduceRight=$n,n.reflect=Wn,n.reflectAll=Qn,n.reject=Gr,n.rejectLimit=Hr,n.rejectSeries=Jr,n.retry=Hn,n.retryable=Kr,n.seq=mn,n.series=Jn,n.setImmediate=at,n.some=Xr,n.someLimit=Yr,n.someSeries=Zr,n.sortBy=Kn,n.timeout=Xn,n.times=eu,n.timesLimit=Zn,n.timesSeries=ru,n.transform=nt,n.tryEach=tt,n.unmemoize=et,n.until=ut,n.waterfall=uu,n.whilst=rt,n.all=Ir,n.allLimit=_r,n.allSeries=Mr,n.any=Xr,n.anyLimit=Yr,n.anySeries=Zr,n.find=Er,n.findLimit=Ar,n.findSeries=Tr,n.forEach=En,n.forEachSeries=Fr,n.forEachLimit=An,n.forEachOf=Fe,n.forEachOfSeries=jr,n.forEachOfLimit=P,n.inject=dn,n.foldl=dn,n.foldr=$n,n.select=Ur,n.selectLimit=zr,n.selectSeries=Pr,n.wrapSync=o,Object.defineProperty(n,"__esModule",{value:!0})});
//# sourceMappingURL=async.min.map \ No newline at end of file
diff --git a/node_modules/async/index.js b/node_modules/async/index.js
index 1b1e2aaaa..090cade67 100644
--- a/node_modules/async/index.js
+++ b/node_modules/async/index.js
@@ -3,7 +3,7 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.wrapSync = exports.selectSeries = exports.selectLimit = exports.select = exports.foldr = exports.foldl = exports.inject = exports.forEachOfLimit = exports.forEachOfSeries = exports.forEachOf = exports.forEachLimit = exports.forEachSeries = exports.forEach = exports.findSeries = exports.findLimit = exports.find = exports.anySeries = exports.anyLimit = exports.any = exports.allSeries = exports.allLimit = exports.all = exports.whilst = exports.waterfall = exports.until = exports.unmemoize = exports.tryEach = exports.transform = exports.timesSeries = exports.timesLimit = exports.times = exports.timeout = exports.sortBy = exports.someSeries = exports.someLimit = exports.some = exports.setImmediate = exports.series = exports.seq = exports.retryable = exports.retry = exports.rejectSeries = exports.rejectLimit = exports.reject = exports.reflectAll = exports.reflect = exports.reduceRight = exports.reduce = exports.race = exports.queue = exports.priorityQueue = exports.parallelLimit = exports.parallel = exports.nextTick = exports.memoize = exports.mapValuesSeries = exports.mapValuesLimit = exports.mapValues = exports.mapSeries = exports.mapLimit = exports.map = exports.log = exports.groupBySeries = exports.groupByLimit = exports.groupBy = exports.forever = exports.filterSeries = exports.filterLimit = exports.filter = exports.everySeries = exports.everyLimit = exports.every = exports.ensureAsync = exports.eachSeries = exports.eachOfSeries = exports.eachOfLimit = exports.eachOf = exports.eachLimit = exports.each = exports.during = exports.doWhilst = exports.doUntil = exports.doDuring = exports.dir = exports.detectSeries = exports.detectLimit = exports.detect = exports.constant = exports.concatSeries = exports.concat = exports.compose = exports.cargo = exports.autoInject = exports.auto = exports.asyncify = exports.apply = exports.applyEachSeries = exports.applyEach = undefined;
+exports.wrapSync = exports.selectSeries = exports.selectLimit = exports.select = exports.foldr = exports.foldl = exports.inject = exports.forEachOfLimit = exports.forEachOfSeries = exports.forEachOf = exports.forEachLimit = exports.forEachSeries = exports.forEach = exports.findSeries = exports.findLimit = exports.find = exports.anySeries = exports.anyLimit = exports.any = exports.allSeries = exports.allLimit = exports.all = exports.whilst = exports.waterfall = exports.until = exports.unmemoize = exports.tryEach = exports.transform = exports.timesSeries = exports.timesLimit = exports.times = exports.timeout = exports.sortBy = exports.someSeries = exports.someLimit = exports.some = exports.setImmediate = exports.series = exports.seq = exports.retryable = exports.retry = exports.rejectSeries = exports.rejectLimit = exports.reject = exports.reflectAll = exports.reflect = exports.reduceRight = exports.reduce = exports.race = exports.queue = exports.priorityQueue = exports.parallelLimit = exports.parallel = exports.nextTick = exports.memoize = exports.mapValuesSeries = exports.mapValuesLimit = exports.mapValues = exports.mapSeries = exports.mapLimit = exports.map = exports.log = exports.groupBySeries = exports.groupByLimit = exports.groupBy = exports.forever = exports.filterSeries = exports.filterLimit = exports.filter = exports.everySeries = exports.everyLimit = exports.every = exports.ensureAsync = exports.eachSeries = exports.eachOfSeries = exports.eachOfLimit = exports.eachOf = exports.eachLimit = exports.each = exports.during = exports.doWhilst = exports.doUntil = exports.doDuring = exports.dir = exports.detectSeries = exports.detectLimit = exports.detect = exports.constant = exports.concatSeries = exports.concatLimit = exports.concat = exports.compose = exports.cargo = exports.autoInject = exports.auto = exports.asyncify = exports.apply = exports.applyEachSeries = exports.applyEach = undefined;
var _applyEach = require('./applyEach');
@@ -41,6 +41,10 @@ var _concat = require('./concat');
var _concat2 = _interopRequireDefault(_concat);
+var _concatLimit = require('./concatLimit');
+
+var _concatLimit2 = _interopRequireDefault(_concatLimit);
+
var _concatSeries = require('./concatSeries');
var _concatSeries2 = _interopRequireDefault(_concatSeries);
@@ -311,70 +315,6 @@ var _whilst2 = _interopRequireDefault(_whilst);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-/**
- * An "async function" in the context of Async is an asynchronous function with
- * a variable number of parameters, with the final parameter being a callback.
- * (`function (arg1, arg2, ..., callback) {}`)
- * The final callback is of the form `callback(err, results...)`, which must be
- * called once the function is completed. The callback should be called with a
- * Error as its first argument to signal that an error occurred.
- * Otherwise, if no error occurred, it should be called with `null` as the first
- * argument, and any additional `result` arguments that may apply, to signal
- * successful completion.
- * The callback must be called exactly once, ideally on a later tick of the
- * JavaScript event loop.
- *
- * This type of function is also referred to as a "Node-style async function",
- * or a "continuation passing-style function" (CPS). Most of the methods of this
- * library are themselves CPS/Node-style async functions, or functions that
- * return CPS/Node-style async functions.
- *
- * Wherever we accept a Node-style async function, we also directly accept an
- * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}.
- * In this case, the `async` function will not be passed a final callback
- * argument, and any thrown error will be used as the `err` argument of the
- * implicit callback, and the return value will be used as the `result` value.
- * (i.e. a `rejected` of the returned Promise becomes the `err` callback
- * argument, and a `resolved` value becomes the `result`.)
- *
- * Note, due to JavaScript limitations, we can only detect native `async`
- * functions and not transpilied implementations.
- * Your environment must have `async`/`await` support for this to work.
- * (e.g. Node > v7.6, or a recent version of a modern browser).
- * If you are using `async` functions through a transpiler (e.g. Babel), you
- * must still wrap the function with [asyncify]{@link module:Utils.asyncify},
- * because the `async function` will be compiled to an ordinary function that
- * returns a promise.
- *
- * @typedef {Function} AsyncFunction
- * @static
- */
-
-/**
- * Async is a utility module which provides straight-forward, powerful functions
- * for working with asynchronous JavaScript. Although originally designed for
- * use with [Node.js](http://nodejs.org) and installable via
- * `npm install --save async`, it can also be used directly in the browser.
- * @module async
- * @see AsyncFunction
- */
-
-/**
- * A collection of `async` functions for manipulating collections, such as
- * arrays and objects.
- * @module Collections
- */
-
-/**
- * A collection of `async` functions for controlling the flow through a script.
- * @module ControlFlow
- */
-
-/**
- * A collection of `async` utility functions.
- * @module Utils
- */
-
exports.default = {
applyEach: _applyEach2.default,
applyEachSeries: _applyEachSeries2.default,
@@ -385,6 +325,7 @@ exports.default = {
cargo: _cargo2.default,
compose: _compose2.default,
concat: _concat2.default,
+ concatLimit: _concatLimit2.default,
concatSeries: _concatSeries2.default,
constant: _constant2.default,
detect: _detect2.default,
@@ -469,7 +410,70 @@ exports.default = {
selectLimit: _filterLimit2.default,
selectSeries: _filterSeries2.default,
wrapSync: _asyncify2.default
-};
+}; /**
+ * An "async function" in the context of Async is an asynchronous function with
+ * a variable number of parameters, with the final parameter being a callback.
+ * (`function (arg1, arg2, ..., callback) {}`)
+ * The final callback is of the form `callback(err, results...)`, which must be
+ * called once the function is completed. The callback should be called with a
+ * Error as its first argument to signal that an error occurred.
+ * Otherwise, if no error occurred, it should be called with `null` as the first
+ * argument, and any additional `result` arguments that may apply, to signal
+ * successful completion.
+ * The callback must be called exactly once, ideally on a later tick of the
+ * JavaScript event loop.
+ *
+ * This type of function is also referred to as a "Node-style async function",
+ * or a "continuation passing-style function" (CPS). Most of the methods of this
+ * library are themselves CPS/Node-style async functions, or functions that
+ * return CPS/Node-style async functions.
+ *
+ * Wherever we accept a Node-style async function, we also directly accept an
+ * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}.
+ * In this case, the `async` function will not be passed a final callback
+ * argument, and any thrown error will be used as the `err` argument of the
+ * implicit callback, and the return value will be used as the `result` value.
+ * (i.e. a `rejected` of the returned Promise becomes the `err` callback
+ * argument, and a `resolved` value becomes the `result`.)
+ *
+ * Note, due to JavaScript limitations, we can only detect native `async`
+ * functions and not transpilied implementations.
+ * Your environment must have `async`/`await` support for this to work.
+ * (e.g. Node > v7.6, or a recent version of a modern browser).
+ * If you are using `async` functions through a transpiler (e.g. Babel), you
+ * must still wrap the function with [asyncify]{@link module:Utils.asyncify},
+ * because the `async function` will be compiled to an ordinary function that
+ * returns a promise.
+ *
+ * @typedef {Function} AsyncFunction
+ * @static
+ */
+
+/**
+ * Async is a utility module which provides straight-forward, powerful functions
+ * for working with asynchronous JavaScript. Although originally designed for
+ * use with [Node.js](http://nodejs.org) and installable via
+ * `npm install --save async`, it can also be used directly in the browser.
+ * @module async
+ * @see AsyncFunction
+ */
+
+/**
+ * A collection of `async` functions for manipulating collections, such as
+ * arrays and objects.
+ * @module Collections
+ */
+
+/**
+ * A collection of `async` functions for controlling the flow through a script.
+ * @module ControlFlow
+ */
+
+/**
+ * A collection of `async` utility functions.
+ * @module Utils
+ */
+
exports.applyEach = _applyEach2.default;
exports.applyEachSeries = _applyEachSeries2.default;
exports.apply = _apply2.default;
@@ -479,6 +483,7 @@ exports.autoInject = _autoInject2.default;
exports.cargo = _cargo2.default;
exports.compose = _compose2.default;
exports.concat = _concat2.default;
+exports.concatLimit = _concatLimit2.default;
exports.concatSeries = _concatSeries2.default;
exports.constant = _constant2.default;
exports.detect = _detect2.default;
diff --git a/node_modules/async/internal/concat.js b/node_modules/async/internal/concat.js
deleted file mode 100644
index f2ffb5379..000000000
--- a/node_modules/async/internal/concat.js
+++ /dev/null
@@ -1,18 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = concat;
-function concat(eachfn, arr, fn, callback) {
- var result = [];
- eachfn(arr, function (x, index, cb) {
- fn(x, function (err, y) {
- result = result.concat(y || []);
- cb(err);
- });
- }, function (err) {
- callback(err, result);
- });
-}
-module.exports = exports["default"]; \ No newline at end of file
diff --git a/node_modules/async/internal/doSeries.js b/node_modules/async/internal/doSeries.js
deleted file mode 100644
index f3ca5aa83..000000000
--- a/node_modules/async/internal/doSeries.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = doSeries;
-
-var _eachOfSeries = require('../eachOfSeries');
-
-var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries);
-
-var _wrapAsync = require('./wrapAsync');
-
-var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function doSeries(fn) {
- return function (obj, iteratee, callback) {
- return fn(_eachOfSeries2.default, obj, (0, _wrapAsync2.default)(iteratee), callback);
- };
-}
-module.exports = exports['default']; \ No newline at end of file
diff --git a/node_modules/async/internal/queue.js b/node_modules/async/internal/queue.js
index 8188368b9..6a7c455a8 100644
--- a/node_modules/async/internal/queue.js
+++ b/node_modules/async/internal/queue.js
@@ -82,9 +82,10 @@ function queue(worker, concurrency, payload) {
for (var i = 0, l = tasks.length; i < l; i++) {
var task = tasks[i];
+
var index = (0, _baseIndexOf2.default)(workersList, task, 0);
if (index >= 0) {
- workersList.splice(index);
+ workersList.splice(index, 1);
}
task.callback.apply(task, arguments);
@@ -146,11 +147,11 @@ function queue(worker, concurrency, payload) {
for (var i = 0; i < l; i++) {
var node = q._tasks.shift();
tasks.push(node);
+ workersList.push(node);
data.push(node.data);
}
numRunning += 1;
- workersList.push(tasks[0]);
if (q._tasks.length === 0) {
q.empty();
diff --git a/node_modules/async/package.json b/node_modules/async/package.json
index edce090a5..8fa028cc3 100644
--- a/node_modules/async/package.json
+++ b/node_modules/async/package.json
@@ -1,7 +1,7 @@
{
"name": "async",
"description": "Higher-order functions and common patterns for asynchronous code",
- "version": "2.4.1",
+ "version": "2.5.0",
"main": "dist/async.js",
"author": "Caolan McMahon",
"repository": {
diff --git a/node_modules/async/queue.js b/node_modules/async/queue.js
index 0a61736d3..0ca8ba2bb 100644
--- a/node_modules/async/queue.js
+++ b/node_modules/async/queue.js
@@ -73,7 +73,8 @@ module.exports = exports['default'];
* @property {Function} resume - a function that resumes the processing of
* queued tasks when the queue is paused. Invoke with `queue.resume()`.
* @property {Function} kill - a function that removes the `drain` callback and
- * empties remaining tasks from the queue forcing it to go idle. Invoke with `queue.kill()`.
+ * empties remaining tasks from the queue forcing it to go idle. No more tasks
+ * should be pushed to the queue after calling this function. Invoke with `queue.kill()`.
*/
/**