extra-request 4.0.0 → 4.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
2
2
 
3
- var es2018$2 = {};
3
+ var es2018$5 = {};
4
4
 
5
5
  var fetch_browser = {};
6
6
 
@@ -50,7 +50,11 @@ eventSource_browser.EventSource = globalThis.EventSource;
50
50
  (function (exports) {
51
51
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
52
52
  if (k2 === undefined) k2 = k;
53
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
53
+ var desc = Object.getOwnPropertyDescriptor(m, k);
54
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
55
+ desc = { enumerable: true, get: function() { return m[k]; } };
56
+ }
57
+ Object.defineProperty(o, k2, desc);
54
58
  }) : (function(o, m, k, k2) {
55
59
  if (k2 === undefined) k2 = k;
56
60
  o[k2] = m[k];
@@ -67,9 +71,9 @@ __exportStar(abortError_browser, exports);
67
71
  __exportStar(blob_browser, exports);
68
72
  __exportStar(eventSource_browser, exports);
69
73
 
70
- }(es2018$2));
74
+ }(es2018$5));
71
75
 
72
- var es2018$1 = {};
76
+ var es2018$4 = {};
73
77
 
74
78
  var array = {};
75
79
 
@@ -117,13 +121,26 @@ function isntUndefined(val) {
117
121
  }
118
122
  _undefined.isntUndefined = isntUndefined;
119
123
 
124
+ var _function = {};
125
+
126
+ _function.isntFunction = _function.isFunction = void 0;
127
+ function isFunction(val) {
128
+ return typeof val === 'function';
129
+ }
130
+ _function.isFunction = isFunction;
131
+ function isntFunction(val) {
132
+ return !isFunction(val);
133
+ }
134
+ _function.isntFunction = isntFunction;
135
+
120
136
  asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
121
- const null_1$1 = _null;
122
- const undefined_1$2 = _undefined;
137
+ const null_1$2 = _null;
138
+ const undefined_1$1 = _undefined;
139
+ const function_1$2 = _function;
123
140
  function isAsyncIterable(val) {
124
- return (0, null_1$1.isntNull)(val)
125
- && (0, undefined_1$2.isntUndefined)(val)
126
- && typeof val[Symbol.asyncIterator] === 'function';
141
+ return (0, null_1$2.isntNull)(val)
142
+ && (0, undefined_1$1.isntUndefined)(val)
143
+ && (0, function_1$2.isFunction)(val[Symbol.asyncIterator]);
127
144
  }
128
145
  asyncIterable.isAsyncIterable = isAsyncIterable;
129
146
  function isntAsyncIterable(val) {
@@ -225,27 +242,16 @@ function isntFalsy(val) {
225
242
  }
226
243
  falsy.isntFalsy = isntFalsy;
227
244
 
228
- var _function = {};
229
-
230
- _function.isntFunction = _function.isFunction = void 0;
231
- function isFunction(val) {
232
- return typeof val === 'function';
233
- }
234
- _function.isFunction = isFunction;
235
- function isntFunction(val) {
236
- return !isFunction(val);
237
- }
238
- _function.isntFunction = isntFunction;
239
-
240
245
  var iterable = {};
241
246
 
242
247
  iterable.isntIterable = iterable.isIterable = void 0;
243
- const null_1 = _null;
244
- const undefined_1$1 = _undefined;
248
+ const null_1$1 = _null;
249
+ const undefined_1 = _undefined;
250
+ const function_1$1 = _function;
245
251
  function isIterable(val) {
246
- return (0, null_1.isntNull)(val)
247
- && (0, undefined_1$1.isntUndefined)(val)
248
- && typeof val[Symbol.iterator] === 'function';
252
+ return (0, null_1$1.isntNull)(val)
253
+ && (0, undefined_1.isntUndefined)(val)
254
+ && (0, function_1$1.isFunction)(val[Symbol.iterator]);
249
255
  }
250
256
  iterable.isIterable = isIterable;
251
257
  function isntIterable(val) {
@@ -253,41 +259,145 @@ function isntIterable(val) {
253
259
  }
254
260
  iterable.isntIterable = isntIterable;
255
261
 
256
- var jsonRpc = {};
262
+ var json$1 = {};
263
+
264
+ var number = {};
265
+
266
+ number.isntNumber = number.isNumber = void 0;
267
+ function isNumber(val) {
268
+ return typeof val === 'number';
269
+ }
270
+ number.isNumber = isNumber;
271
+ function isntNumber(val) {
272
+ return !isNumber(val);
273
+ }
274
+ number.isntNumber = isntNumber;
257
275
 
258
276
  var object = {};
259
277
 
278
+ /** Detect free variable `global` from Node.js. */
279
+
280
+ var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
281
+
282
+ var _freeGlobal = freeGlobal$1;
283
+
284
+ var freeGlobal = _freeGlobal;
285
+
286
+ /** Detect free variable `self`. */
287
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
288
+
289
+ /** Used as a reference to the global object. */
290
+ var root$1 = freeGlobal || freeSelf || Function('return this')();
291
+
292
+ var _root = root$1;
293
+
294
+ var root = _root;
295
+
296
+ /** Built-in value references. */
297
+ var Symbol$3 = root.Symbol;
298
+
299
+ var _Symbol = Symbol$3;
300
+
301
+ var Symbol$2 = _Symbol;
302
+
303
+ /** Used for built-in method references. */
304
+ var objectProto$2 = Object.prototype;
305
+
306
+ /** Used to check objects for own properties. */
307
+ var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
308
+
260
309
  /**
261
- * lodash (Custom Build) <https://lodash.com/>
262
- * Build: `lodash modularize exports="npm" -o ./`
263
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
264
- * Released under MIT license <https://lodash.com/license>
265
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
266
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
310
+ * Used to resolve the
311
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
312
+ * of values.
267
313
  */
314
+ var nativeObjectToString$1 = objectProto$2.toString;
268
315
 
269
- /** `Object#toString` result references. */
270
- var objectTag = '[object Object]';
316
+ /** Built-in value references. */
317
+ var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
271
318
 
272
319
  /**
273
- * Checks if `value` is a host object in IE < 9.
320
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
274
321
  *
275
322
  * @private
276
- * @param {*} value The value to check.
277
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
323
+ * @param {*} value The value to query.
324
+ * @returns {string} Returns the raw `toStringTag`.
278
325
  */
279
- function isHostObject(value) {
280
- // Many host objects are `Object` objects that can coerce to strings
281
- // despite having improperly defined `toString` methods.
282
- var result = false;
283
- if (value != null && typeof value.toString != 'function') {
284
- try {
285
- result = !!(value + '');
286
- } catch (e) {}
326
+ function getRawTag$1(value) {
327
+ var isOwn = hasOwnProperty$1.call(value, symToStringTag$1),
328
+ tag = value[symToStringTag$1];
329
+
330
+ try {
331
+ value[symToStringTag$1] = undefined;
332
+ var unmasked = true;
333
+ } catch (e) {}
334
+
335
+ var result = nativeObjectToString$1.call(value);
336
+ if (unmasked) {
337
+ if (isOwn) {
338
+ value[symToStringTag$1] = tag;
339
+ } else {
340
+ delete value[symToStringTag$1];
341
+ }
287
342
  }
288
343
  return result;
289
344
  }
290
345
 
346
+ var _getRawTag = getRawTag$1;
347
+
348
+ /** Used for built-in method references. */
349
+
350
+ var objectProto$1 = Object.prototype;
351
+
352
+ /**
353
+ * Used to resolve the
354
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
355
+ * of values.
356
+ */
357
+ var nativeObjectToString = objectProto$1.toString;
358
+
359
+ /**
360
+ * Converts `value` to a string using `Object.prototype.toString`.
361
+ *
362
+ * @private
363
+ * @param {*} value The value to convert.
364
+ * @returns {string} Returns the converted string.
365
+ */
366
+ function objectToString$1(value) {
367
+ return nativeObjectToString.call(value);
368
+ }
369
+
370
+ var _objectToString = objectToString$1;
371
+
372
+ var Symbol$1 = _Symbol,
373
+ getRawTag = _getRawTag,
374
+ objectToString = _objectToString;
375
+
376
+ /** `Object#toString` result references. */
377
+ var nullTag = '[object Null]',
378
+ undefinedTag = '[object Undefined]';
379
+
380
+ /** Built-in value references. */
381
+ var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
382
+
383
+ /**
384
+ * The base implementation of `getTag` without fallbacks for buggy environments.
385
+ *
386
+ * @private
387
+ * @param {*} value The value to query.
388
+ * @returns {string} Returns the `toStringTag`.
389
+ */
390
+ function baseGetTag$1(value) {
391
+ if (value == null) {
392
+ return value === undefined ? undefinedTag : nullTag;
393
+ }
394
+ return (symToStringTag && symToStringTag in Object(value))
395
+ ? getRawTag(value)
396
+ : objectToString(value);
397
+ }
398
+
399
+ var _baseGetTag = baseGetTag$1;
400
+
291
401
  /**
292
402
  * Creates a unary function that invokes `func` with its argument transformed.
293
403
  *
@@ -296,34 +406,21 @@ function isHostObject(value) {
296
406
  * @param {Function} transform The argument transform.
297
407
  * @returns {Function} Returns the new function.
298
408
  */
299
- function overArg(func, transform) {
409
+
410
+ function overArg$1(func, transform) {
300
411
  return function(arg) {
301
412
  return func(transform(arg));
302
413
  };
303
414
  }
304
415
 
305
- /** Used for built-in method references. */
306
- var funcProto = Function.prototype,
307
- objectProto = Object.prototype;
308
-
309
- /** Used to resolve the decompiled source of functions. */
310
- var funcToString = funcProto.toString;
311
-
312
- /** Used to check objects for own properties. */
313
- var hasOwnProperty = objectProto.hasOwnProperty;
314
-
315
- /** Used to infer the `Object` constructor. */
316
- var objectCtorString = funcToString.call(Object);
416
+ var _overArg = overArg$1;
317
417
 
318
- /**
319
- * Used to resolve the
320
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
321
- * of values.
322
- */
323
- var objectToString = objectProto.toString;
418
+ var overArg = _overArg;
324
419
 
325
420
  /** Built-in value references. */
326
- var getPrototype = overArg(Object.getPrototypeOf, Object);
421
+ var getPrototype$1 = overArg(Object.getPrototypeOf, Object);
422
+
423
+ var _getPrototype = getPrototype$1;
327
424
 
328
425
  /**
329
426
  * Checks if `value` is object-like. A value is object-like if it's not `null`
@@ -349,10 +446,33 @@ var getPrototype = overArg(Object.getPrototypeOf, Object);
349
446
  * _.isObjectLike(null);
350
447
  * // => false
351
448
  */
352
- function isObjectLike(value) {
353
- return !!value && typeof value == 'object';
449
+
450
+ function isObjectLike$1(value) {
451
+ return value != null && typeof value == 'object';
354
452
  }
355
453
 
454
+ var isObjectLike_1 = isObjectLike$1;
455
+
456
+ var baseGetTag = _baseGetTag,
457
+ getPrototype = _getPrototype,
458
+ isObjectLike = isObjectLike_1;
459
+
460
+ /** `Object#toString` result references. */
461
+ var objectTag = '[object Object]';
462
+
463
+ /** Used for built-in method references. */
464
+ var funcProto = Function.prototype,
465
+ objectProto = Object.prototype;
466
+
467
+ /** Used to resolve the decompiled source of functions. */
468
+ var funcToString = funcProto.toString;
469
+
470
+ /** Used to check objects for own properties. */
471
+ var hasOwnProperty = objectProto.hasOwnProperty;
472
+
473
+ /** Used to infer the `Object` constructor. */
474
+ var objectCtorString = funcToString.call(Object);
475
+
356
476
  /**
357
477
  * Checks if `value` is a plain object, that is, an object created by the
358
478
  * `Object` constructor or one with a `[[Prototype]]` of `null`.
@@ -382,8 +502,7 @@ function isObjectLike(value) {
382
502
  * // => true
383
503
  */
384
504
  function isPlainObject$1(value) {
385
- if (!isObjectLike(value) ||
386
- objectToString.call(value) != objectTag || isHostObject(value)) {
505
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
387
506
  return false;
388
507
  }
389
508
  var proto = getPrototype(value);
@@ -391,16 +510,16 @@ function isPlainObject$1(value) {
391
510
  return true;
392
511
  }
393
512
  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
394
- return (typeof Ctor == 'function' &&
395
- Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
513
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
514
+ funcToString.call(Ctor) == objectCtorString;
396
515
  }
397
516
 
398
- var lodash_isplainobject = isPlainObject$1;
517
+ var isPlainObject_1$1 = isPlainObject$1;
399
518
 
400
519
  var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
401
520
  return (mod && mod.__esModule) ? mod : { "default": mod };
402
521
  };object.isntEmptyObject = object.isEmptyObject = object.isntPlainObject = object.isPlainObject = object.isntObject = object.isObject = void 0;
403
- const lodash_isplainobject_1 = __importDefault(lodash_isplainobject);
522
+ const isPlainObject_1 = __importDefault(isPlainObject_1$1);
404
523
  function isObject(val) {
405
524
  return val !== null
406
525
  && typeof val === 'object';
@@ -411,7 +530,7 @@ function isntObject(val) {
411
530
  }
412
531
  object.isntObject = isntObject;
413
532
  function isPlainObject(val) {
414
- return (0, lodash_isplainobject_1.default)(val);
533
+ return (0, isPlainObject_1.default)(val);
415
534
  }
416
535
  object.isPlainObject = isPlainObject;
417
536
  function isntPlainObject(val) {
@@ -427,87 +546,27 @@ function isntEmptyObject(val) {
427
546
  }
428
547
  object.isntEmptyObject = isntEmptyObject;
429
548
 
430
- var number = {};
431
-
432
- number.isntNumber = number.isNumber = void 0;
433
- function isNumber(val) {
434
- return typeof val === 'number';
435
- }
436
- number.isNumber = isNumber;
437
- function isntNumber(val) {
438
- return !isNumber(val);
439
- }
440
- number.isntNumber = isntNumber;
441
-
442
- jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
443
- const array_1 = array;
444
- const object_1 = object;
549
+ json$1.isntJsonable = json$1.isJsonable = json$1.isntJson = json$1.isJson = void 0;
550
+ const null_1 = _null;
551
+ const boolean_1 = boolean;
445
552
  const string_1 = string;
446
553
  const number_1 = number;
447
- const undefined_1 = _undefined;
448
- function isJsonRpcId(val) {
449
- return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
450
- }
451
- function isJsonRpcParams(val) {
452
- return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
453
- }
454
- function isJsonRpcNotification(val) {
455
- return (0, object_1.isPlainObject)(val)
456
- && (0, string_1.isString)(val.jsonrpc)
457
- && (0, string_1.isString)(val.method)
458
- && (0, undefined_1.isUndefined)(val.id)
459
- && isJsonRpcParams(val.params);
460
- }
461
- jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
462
- function isntJsonRpcNotification(val) {
463
- return !isJsonRpcNotification(val);
464
- }
465
- jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
466
- function isJsonRpcRequest(val) {
467
- return (0, object_1.isPlainObject)(val)
468
- && (0, string_1.isString)(val.jsonrpc)
469
- && (0, string_1.isString)(val.method)
470
- && isJsonRpcId(val.id)
471
- && isJsonRpcParams(val.params);
472
- }
473
- jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
474
- function isntJsonRpcRequest(val) {
475
- return !isJsonRpcRequest(val);
476
- }
477
- jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
478
- function isJsonRpcSuccess(val) {
479
- return (0, object_1.isPlainObject)(val)
480
- && (0, string_1.isString)(val.jsonrpc)
481
- && (0, string_1.isString)(val.id)
482
- && 'result' in val;
483
- }
484
- jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
485
- function isntJsonRpcSuccess(val) {
486
- return !isJsonRpcSuccess(val);
487
- }
488
- jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
489
- function isJsonRpcError(val) {
490
- return (0, object_1.isPlainObject)(val)
491
- && (0, string_1.isString)(val.jsonrpc)
492
- && isJsonRpcId(val.id)
493
- && isJsonRpcErrorObject(val.error);
494
- }
495
- jsonRpc.isJsonRpcError = isJsonRpcError;
496
- function isntJsonRpcError(val) {
497
- return !isJsonRpcError(val);
498
- }
499
- jsonRpc.isntJsonRpcError = isntJsonRpcError;
500
- function isJsonRpcErrorObject(val) {
501
- return (0, object_1.isPlainObject)(val)
502
- && (0, number_1.isNumber)(val.code)
503
- && (0, string_1.isString)(val.message)
504
- && ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
505
- }
506
-
507
- var json$1 = {};
508
-
509
- json$1.isntJson = json$1.isJson = void 0;
554
+ const array_1 = array;
555
+ const object_1$1 = object;
510
556
  function isJson(val) {
557
+ return (0, null_1.isNull)(val)
558
+ || (0, boolean_1.isBoolean)(val)
559
+ || (0, string_1.isString)(val)
560
+ || (0, number_1.isNumber)(val)
561
+ || ((0, array_1.isArray)(val) && val.every(isJson))
562
+ || ((0, object_1$1.isPlainObject)(val) && Object.values(val).every(isJson));
563
+ }
564
+ json$1.isJson = isJson;
565
+ function isntJson(val) {
566
+ return !isJson(val);
567
+ }
568
+ json$1.isntJson = isntJson;
569
+ function isJsonable(val) {
511
570
  try {
512
571
  JSON.stringify(val);
513
572
  return true;
@@ -516,11 +575,34 @@ function isJson(val) {
516
575
  return false;
517
576
  }
518
577
  }
519
- json$1.isJson = isJson;
520
- function isntJson(val) {
521
- return !isntJson();
578
+ json$1.isJsonable = isJsonable;
579
+ function isntJsonable(val) {
580
+ return !isntJsonable();
522
581
  }
523
- json$1.isntJson = isntJson;
582
+ json$1.isntJsonable = isntJsonable;
583
+
584
+ var promise = {};
585
+
586
+ promise.isPromiseLike = promise.isntPromiseLike = promise.isntPromise = promise.isPromise = void 0;
587
+ const object_1 = object;
588
+ const function_1 = _function;
589
+ function isPromise(val) {
590
+ return val instanceof Promise;
591
+ }
592
+ promise.isPromise = isPromise;
593
+ function isntPromise(val) {
594
+ return !isPromise(val);
595
+ }
596
+ promise.isntPromise = isntPromise;
597
+ function isntPromiseLike(val) {
598
+ return !isPromiseLike(val);
599
+ }
600
+ promise.isntPromiseLike = isntPromiseLike;
601
+ function isPromiseLike(val) {
602
+ return (0, object_1.isObject)(val)
603
+ && (0, function_1.isFunction)(val.then);
604
+ }
605
+ promise.isPromiseLike = isPromiseLike;
524
606
 
525
607
  var url$1 = {};
526
608
 
@@ -539,7 +621,11 @@ url$1.isAbsoluteURL = isAbsoluteURL;
539
621
  (function (exports) {
540
622
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
541
623
  if (k2 === undefined) k2 = k;
542
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
624
+ var desc = Object.getOwnPropertyDescriptor(m, k);
625
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
626
+ desc = { enumerable: true, get: function() { return m[k]; } };
627
+ }
628
+ Object.defineProperty(o, k2, desc);
543
629
  }) : (function(o, m, k, k2) {
544
630
  if (k2 === undefined) k2 = k;
545
631
  o[k2] = m[k];
@@ -557,16 +643,16 @@ __exportStar(error, exports);
557
643
  __exportStar(falsy, exports);
558
644
  __exportStar(_function, exports);
559
645
  __exportStar(iterable, exports);
560
- __exportStar(jsonRpc, exports);
561
646
  __exportStar(json$1, exports);
562
647
  __exportStar(_null, exports);
563
648
  __exportStar(number, exports);
564
649
  __exportStar(object, exports);
650
+ __exportStar(promise, exports);
565
651
  __exportStar(string, exports);
566
652
  __exportStar(_undefined, exports);
567
653
  __exportStar(url$1, exports);
568
654
 
569
- }(es2018$1));
655
+ }(es2018$4));
570
656
 
571
657
  function get(...transformers) {
572
658
  return request('GET', ...transformers);
@@ -587,12 +673,12 @@ function del(...transformers) {
587
673
  return request('DELETE', ...transformers);
588
674
  }
589
675
  function request(method, ...transformers) {
590
- const options = transformers.reduce((options, trans) => es2018$1.isFunction(trans) ? trans(options) : options, {
676
+ const options = transformers.reduce((options, trans) => es2018$4.isFunction(trans) ? trans(options) : options, {
591
677
  url: new URL('http://localhost'),
592
- headers: new es2018$2.Headers()
678
+ headers: new es2018$5.Headers()
593
679
  });
594
- const headers = new es2018$2.Headers(options.headers);
595
- return new es2018$2.Request(options.url.href, {
680
+ const headers = new es2018$5.Headers(options.headers);
681
+ return new es2018$5.Request(options.url.href, {
596
682
  method,
597
683
  headers,
598
684
  signal: options.signal,
@@ -613,7 +699,7 @@ function url(...urls) {
613
699
 
614
700
  function text(payload) {
615
701
  return (options) => {
616
- const headers = new es2018$2.Headers(options.headers);
702
+ const headers = new es2018$5.Headers(options.headers);
617
703
  headers.set('Content-Type', 'application/x-www-form-urlencoded');
618
704
  return {
619
705
  ...options,
@@ -625,7 +711,7 @@ function text(payload) {
625
711
 
626
712
  function json(payload) {
627
713
  return (options) => {
628
- const headers = new es2018$2.Headers(options.headers);
714
+ const headers = new es2018$5.Headers(options.headers);
629
715
  headers.set('Content-Type', 'application/json');
630
716
  return {
631
717
  ...options,
@@ -639,75 +725,34 @@ var papaparse_min = {exports: {}};
639
725
 
640
726
  /* @license
641
727
  Papa Parse
642
- v5.3.1
728
+ v5.3.2
643
729
  https://github.com/mholt/PapaParse
644
730
  License: MIT
645
731
  */
646
732
 
647
733
  (function (module, exports) {
648
- !function(e,t){module.exports=t();}(commonjsGlobal,function s(){var f="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==f?f:{};var n=!f.document&&!!f.postMessage,o=n&&/blob:/i.test((f.location||{}).protocol),a={},h=0,b={parse:function(e,t){var i=(t=t||{}).dynamicTyping||!1;M(i)&&(t.dynamicTypingFunction=i,i={});if(t.dynamicTyping=i,t.transform=!!M(t.transform)&&t.transform,t.worker&&b.WORKERS_SUPPORTED){var r=function(){if(!b.WORKERS_SUPPORTED)return !1;var e=(i=f.URL||f.webkitURL||null,r=s.toString(),b.BLOB_URL||(b.BLOB_URL=i.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))),t=new f.Worker(e);var i,r;return t.onmessage=_,t.id=h++,a[t.id]=t}();return r.userStep=t.step,r.userChunk=t.chunk,r.userComplete=t.complete,r.userError=t.error,t.step=M(t.step),t.chunk=M(t.chunk),t.complete=M(t.complete),t.error=M(t.error),delete t.worker,void r.postMessage({input:e,config:t,workerId:r.id})}var n=null;b.NODE_STREAM_INPUT,"string"==typeof e?n=t.download?new l(t):new p(t):!0===e.readable&&M(e.read)&&M(e.on)?n=new g(t):(f.File&&e instanceof File||e instanceof Object)&&(n=new c(t));return n.stream(e)},unparse:function(e,t){var n=!1,_=!0,m=",",y="\r\n",s='"',a=s+s,i=!1,r=null,o=!1;!function(){if("object"!=typeof t)return;"string"!=typeof t.delimiter||b.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(m=t.delimiter);("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes);"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(i=t.skipEmptyLines);"string"==typeof t.newline&&(y=t.newline);"string"==typeof t.quoteChar&&(s=t.quoteChar);"boolean"==typeof t.header&&(_=t.header);if(Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");r=t.columns;}void 0!==t.escapeChar&&(a=t.escapeChar+s);"boolean"==typeof t.escapeFormulae&&(o=t.escapeFormulae);}();var h=new RegExp(j(s),"g");"string"==typeof e&&(e=JSON.parse(e));if(Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return u(null,e,i);if("object"==typeof e[0])return u(r||Object.keys(e[0]),e,i)}else if("object"==typeof e)return "string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),u(e.fields||[],e.data||[],i);throw new Error("Unable to serialize unrecognized input");function u(e,t,i){var r="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var n=Array.isArray(e)&&0<e.length,s=!Array.isArray(t[0]);if(n&&_){for(var a=0;a<e.length;a++)0<a&&(r+=m),r+=v(e[a],a);0<t.length&&(r+=y);}for(var o=0;o<t.length;o++){var h=n?e.length:t[o].length,u=!1,f=n?0===Object.keys(t[o]).length:0===t[o].length;if(i&&!n&&(u="greedy"===i?""===t[o].join("").trim():1===t[o].length&&0===t[o][0].length),"greedy"===i&&n){for(var d=[],l=0;l<h;l++){var c=s?e[l]:l;d.push(t[o][c]);}u=""===d.join("").trim();}if(!u){for(var p=0;p<h;p++){0<p&&!f&&(r+=m);var g=n&&s?e[p]:p;r+=v(t[o][g],p);}o<t.length-1&&(!i||0<h&&!f)&&(r+=y);}}return r}function v(e,t){if(null==e)return "";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);!0===o&&"string"==typeof e&&null!==e.match(/^[=+\-@].*$/)&&(e="'"+e);var i=e.toString().replace(h,a),r="boolean"==typeof n&&n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||function(e,t){for(var i=0;i<t.length;i++)if(-1<e.indexOf(t[i]))return !0;return !1}(i,b.BAD_DELIMITERS)||-1<i.indexOf(m)||" "===i.charAt(0)||" "===i.charAt(i.length-1);return r?s+i+s:i}}};if(b.RECORD_SEP=String.fromCharCode(30),b.UNIT_SEP=String.fromCharCode(31),b.BYTE_ORDER_MARK="\ufeff",b.BAD_DELIMITERS=["\r","\n",'"',b.BYTE_ORDER_MARK],b.WORKERS_SUPPORTED=!n&&!!f.Worker,b.NODE_STREAM_INPUT=1,b.LocalChunkSize=10485760,b.RemoteChunkSize=5242880,b.DefaultDelimiter=",",b.Parser=E,b.ParserHandle=i,b.NetworkStreamer=l,b.FileStreamer=c,b.StringStreamer=p,b.ReadableStreamStreamer=g,f.jQuery){var d=f.jQuery;d.fn.parse=function(o){var i=o.config||{},h=[];return this.each(function(e){if(!("INPUT"===d(this).prop("tagName").toUpperCase()&&"file"===d(this).attr("type").toLowerCase()&&f.FileReader)||!this.files||0===this.files.length)return !0;for(var t=0;t<this.files.length;t++)h.push({file:this.files[t],inputElem:this,instanceConfig:d.extend({},i)});}),e(),this;function e(){if(0!==h.length){var e,t,i,r,n=h[0];if(M(o.before)){var s=o.before(n.file,n.inputElem);if("object"==typeof s){if("abort"===s.action)return e="AbortError",t=n.file,i=n.inputElem,r=s.reason,void(M(o.error)&&o.error({name:e},t,i,r));if("skip"===s.action)return void u();"object"==typeof s.config&&(n.instanceConfig=d.extend(n.instanceConfig,s.config));}else if("skip"===s)return void u()}var a=n.instanceConfig.complete;n.instanceConfig.complete=function(e){M(a)&&a(e,n.file,n.inputElem),u();},b.parse(n.file,n.instanceConfig);}else M(o.complete)&&o.complete();}function u(){h.splice(0,1),e();}};}function u(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=w(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null);this._handle=new i(t),(this._handle.streamer=this)._config=t;}.call(this,e),this.parseChunk=function(e,t){if(this.isFirstChunk&&M(this._config.beforeFirstChunk)){var i=this._config.beforeFirstChunk(e);void 0!==i&&(e=i);}this.isFirstChunk=!1,this._halted=!1;var r=this._partialLine+e;this._partialLine="";var n=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var s=n.meta.cursor;this._finished||(this._partialLine=r.substring(s-this._baseIndex),this._baseIndex=s),n&&n.data&&(this._rowCount+=n.data.length);var a=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(o)f.postMessage({results:n,workerId:b.WORKER_ID,finished:a});else if(M(this._config.chunk)&&!t){if(this._config.chunk(n,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);n=void 0,this._completeResults=void 0;}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),this._completed||!a||!M(this._config.complete)||n&&n.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),a||n&&n.meta.paused||this._nextChunk(),n}this._halted=!0;},this._sendError=function(e){M(this._config.error)?this._config.error(e):o&&this._config.error&&f.postMessage({workerId:b.WORKER_ID,error:e,finished:!1});};}function l(e){var r;(e=e||{}).chunkSize||(e.chunkSize=b.RemoteChunkSize),u.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded();}:function(){this._readChunk();},this.stream=function(e){this._input=e,this._nextChunk();},this._readChunk=function(){if(this._finished)this._chunkLoaded();else {if(r=new XMLHttpRequest,this._config.withCredentials&&(r.withCredentials=this._config.withCredentials),n||(r.onload=v(this._chunkLoaded,this),r.onerror=v(this._chunkError,this)),r.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var t in e)r.setRequestHeader(t,e[t]);}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;r.setRequestHeader("Range","bytes="+this._start+"-"+i);}try{r.send(this._config.downloadRequestBody);}catch(e){this._chunkError(e.message);}n&&0===r.status&&this._chunkError();}},this._chunkLoaded=function(){4===r.readyState&&(r.status<200||400<=r.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:r.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");if(null===t)return -1;return parseInt(t.substring(t.lastIndexOf("/")+1))}(r),this.parseChunk(r.responseText)));},this._chunkError=function(e){var t=r.statusText||e;this._sendError(new Error(t));};}function c(e){var r,n;(e=e||{}).chunkSize||(e.chunkSize=b.LocalChunkSize),u.call(this,e);var s="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,s?((r=new FileReader).onload=v(this._chunkLoaded,this),r.onerror=v(this._chunkError,this)):r=new FileReaderSync,this._nextChunk();},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk();},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var t=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,t);}var i=r.readAsText(e,this._config.encoding);s||this._chunkLoaded({target:{result:i}});},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result);},this._chunkError=function(){this._sendError(r.error);};}function p(e){var i;u.call(this,e=e||{}),this.stream=function(e){return i=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,t=this._config.chunkSize;return t?(e=i.substring(0,t),i=i.substring(t)):(e=i,i=""),this._finished=!i,this.parseChunk(e)}};}function g(e){u.call(this,e=e||{});var t=[],i=!0,r=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause();},this.resume=function(){u.prototype.resume.apply(this,arguments),this._input.resume();},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError);},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0);},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):i=!0;},this._streamData=v(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(t.shift()));}catch(e){this._streamError(e);}},this),this._streamError=v(function(e){this._streamCleanUp(),this._sendError(e);},this),this._streamEnd=v(function(){this._streamCleanUp(),r=!0,this._streamData("");},this),this._streamCleanUp=v(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError);},this);}function i(m){var a,o,h,r=Math.pow(2,53),n=-r,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,u=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,t=this,i=0,f=0,d=!1,e=!1,l=[],c={data:[],errors:[],meta:{}};if(M(m.step)){var p=m.step;m.step=function(e){if(c=e,_())g();else {if(g(),0===c.data.length)return;i+=e.data.length,m.preview&&i>m.preview?o.abort():(c.data=c.data[0],p(c,t));}};}function y(e){return "greedy"===m.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function g(){if(c&&h&&(k("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+b.DefaultDelimiter+"'"),h=!1),m.skipEmptyLines)for(var e=0;e<c.data.length;e++)y(c.data[e])&&c.data.splice(e--,1);return _()&&function(){if(!c)return;function e(e,t){M(m.transformHeader)&&(e=m.transformHeader(e,t)),l.push(e);}if(Array.isArray(c.data[0])){for(var t=0;_()&&t<c.data.length;t++)c.data[t].forEach(e);c.data.splice(0,1);}else c.data.forEach(e);}(),function(){if(!c||!m.header&&!m.dynamicTyping&&!m.transform)return c;function e(e,t){var i,r=m.header?{}:[];for(i=0;i<e.length;i++){var n=i,s=e[i];m.header&&(n=i>=l.length?"__parsed_extra":l[i]),m.transform&&(s=m.transform(s,n)),s=v(n,s),"__parsed_extra"===n?(r[n]=r[n]||[],r[n].push(s)):r[n]=s;}return m.header&&(i>l.length?k("FieldMismatch","TooManyFields","Too many fields: expected "+l.length+" fields but parsed "+i,f+t):i<l.length&&k("FieldMismatch","TooFewFields","Too few fields: expected "+l.length+" fields but parsed "+i,f+t)),r}var t=1;!c.data.length||Array.isArray(c.data[0])?(c.data=c.data.map(e),t=c.data.length):c.data=e(c.data,0);m.header&&c.meta&&(c.meta.fields=l);return f+=t,c}()}function _(){return m.header&&0===l.length}function v(e,t){return i=e,m.dynamicTypingFunction&&void 0===m.dynamicTyping[i]&&(m.dynamicTyping[i]=m.dynamicTypingFunction(i)),!0===(m.dynamicTyping[i]||m.dynamicTyping)?"true"===t||"TRUE"===t||"false"!==t&&"FALSE"!==t&&(function(e){if(s.test(e)){var t=parseFloat(e);if(n<t&&t<r)return !0}return !1}(t)?parseFloat(t):u.test(t)?new Date(t):""===t?null:t):t;var i;}function k(e,t,i,r){var n={type:e,code:t,message:i};void 0!==r&&(n.row=r),c.errors.push(n);}this.parse=function(e,t,i){var r=m.quoteChar||'"';if(m.newline||(m.newline=function(e,t){e=e.substring(0,1048576);var i=new RegExp(j(t)+"([^]*?)"+j(t),"gm"),r=(e=e.replace(i,"")).split("\r"),n=e.split("\n"),s=1<n.length&&n[0].length<r[0].length;if(1===r.length||s)return "\n";for(var a=0,o=0;o<r.length;o++)"\n"===r[o][0]&&a++;return a>=r.length/2?"\r\n":"\r"}(e,r)),h=!1,m.delimiter)M(m.delimiter)&&(m.delimiter=m.delimiter(e),c.meta.delimiter=m.delimiter);else {var n=function(e,t,i,r,n){var s,a,o,h;n=n||[",","\t","|",";",b.RECORD_SEP,b.UNIT_SEP];for(var u=0;u<n.length;u++){var f=n[u],d=0,l=0,c=0;o=void 0;for(var p=new E({comments:r,delimiter:f,newline:t,preview:10}).parse(e),g=0;g<p.data.length;g++)if(i&&y(p.data[g]))c++;else {var _=p.data[g].length;l+=_,void 0!==o?0<_&&(d+=Math.abs(_-o),o=_):o=_;}0<p.data.length&&(l/=p.data.length-c),(void 0===a||d<=a)&&(void 0===h||h<l)&&1.99<l&&(a=d,s=f,h=l);}return {successful:!!(m.delimiter=s),bestDelimiter:s}}(e,m.newline,m.skipEmptyLines,m.comments,m.delimitersToGuess);n.successful?m.delimiter=n.bestDelimiter:(h=!0,m.delimiter=b.DefaultDelimiter),c.meta.delimiter=m.delimiter;}var s=w(m);return m.preview&&m.header&&s.preview++,a=e,o=new E(s),c=o.parse(a,t,i),g(),d?{meta:{paused:!0}}:c||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,o.abort(),a=M(m.chunk)?"":a.substring(o.getCharIndex());},this.resume=function(){t.streamer._halted?(d=!1,t.streamer.parseChunk(a,!0)):setTimeout(t.resume,3);},this.aborted=function(){return e},this.abort=function(){e=!0,o.abort(),c.meta.aborted=!0,M(m.complete)&&m.complete(c),a="";};}function j(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function E(e){var S,O=(e=e||{}).delimiter,x=e.newline,I=e.comments,T=e.step,D=e.preview,A=e.fastMode,L=S=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(L=e.escapeChar),("string"!=typeof O||-1<b.BAD_DELIMITERS.indexOf(O))&&(O=","),I===O)throw new Error("Comment character same as delimiter");!0===I?I="#":("string"!=typeof I||-1<b.BAD_DELIMITERS.indexOf(I))&&(I=!1),"\n"!==x&&"\r"!==x&&"\r\n"!==x&&(x="\n");var F=0,z=!1;this.parse=function(r,t,i){if("string"!=typeof r)throw new Error("Input must be a string");var n=r.length,e=O.length,s=x.length,a=I.length,o=M(T),h=[],u=[],f=[],d=F=0;if(!r)return C();if(A||!1!==A&&-1===r.indexOf(S)){for(var l=r.split(x),c=0;c<l.length;c++){if(f=l[c],F+=f.length,c!==l.length-1)F+=x.length;else if(i)return C();if(!I||f.substring(0,a)!==I){if(o){if(h=[],k(f.split(O)),R(),z)return C()}else k(f.split(O));if(D&&D<=c)return h=h.slice(0,D),C(!0)}}return C()}for(var p=r.indexOf(O,F),g=r.indexOf(x,F),_=new RegExp(j(L)+j(S),"g"),m=r.indexOf(S,F);;)if(r[F]!==S)if(I&&0===f.length&&r.substring(F,F+a)===I){if(-1===g)return C();F=g+s,g=r.indexOf(x,F),p=r.indexOf(O,F);}else if(-1!==p&&(p<g||-1===g))f.push(r.substring(F,p)),F=p+e,p=r.indexOf(O,F);else {if(-1===g)break;if(f.push(r.substring(F,g)),w(g+s),o&&(R(),z))return C();if(D&&h.length>=D)return C(!0)}else for(m=F,F++;;){if(-1===(m=r.indexOf(S,m+1)))return i||u.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:h.length,index:F}),E();if(m===n-1)return E(r.substring(F,m).replace(_,S));if(S!==L||r[m+1]!==L){if(S===L||0===m||r[m-1]!==L){-1!==p&&p<m+1&&(p=r.indexOf(O,m+1)),-1!==g&&g<m+1&&(g=r.indexOf(x,m+1));var y=b(-1===g?p:Math.min(p,g));if(r[m+1+y]===O){f.push(r.substring(F,m).replace(_,S)),r[F=m+1+y+e]!==S&&(m=r.indexOf(S,F)),p=r.indexOf(O,F),g=r.indexOf(x,F);break}var v=b(g);if(r.substring(m+1+v,m+1+v+s)===x){if(f.push(r.substring(F,m).replace(_,S)),w(m+1+v+s),p=r.indexOf(O,F),m=r.indexOf(S,F),o&&(R(),z))return C();if(D&&h.length>=D)return C(!0);break}u.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:h.length,index:F}),m++;}}else m++;}return E();function k(e){h.push(e),d=F;}function b(e){var t=0;if(-1!==e){var i=r.substring(m+1,e);i&&""===i.trim()&&(t=i.length);}return t}function E(e){return i||(void 0===e&&(e=r.substring(F)),f.push(e),F=n,k(f),o&&R()),C()}function w(e){F=e,k(f),f=[],g=r.indexOf(x,F);}function C(e){return {data:h,errors:u,meta:{delimiter:O,linebreak:x,aborted:z,truncated:!!e,cursor:d+(t||0)}}}function R(){T(C()),h=[],u=[];}},this.abort=function(){z=!0;},this.getCharIndex=function(){return F};}function _(e){var t=e.data,i=a[t.workerId],r=!1;if(t.error)i.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){r=!0,m(t.workerId,{data:[],errors:[],meta:{aborted:!0}});},pause:y,resume:y};if(M(i.userStep)){for(var s=0;s<t.results.data.length&&(i.userStep({data:t.results.data[s],errors:t.results.errors,meta:t.results.meta},n),!r);s++);delete t.results;}else M(i.userChunk)&&(i.userChunk(t.results,n,t.file),delete t.results);}t.finished&&!r&&m(t.workerId,t.results);}function m(e,t){var i=a[e];M(i.userComplete)&&i.userComplete(t),i.terminate(),delete a[e];}function y(){throw new Error("Not implemented.")}function w(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var i in e)t[i]=w(e[i]);return t}function v(e,t){return function(){e.apply(t,arguments);}}function M(e){return "function"==typeof e}return o&&(f.onmessage=function(e){var t=e.data;void 0===b.WORKER_ID&&t&&(b.WORKER_ID=t.workerId);if("string"==typeof t.input)f.postMessage({workerId:b.WORKER_ID,results:b.parse(t.input,t.config),finished:!0});else if(f.File&&t.input instanceof File||t.input instanceof Object){var i=b.parse(t.input,t.config);i&&f.postMessage({workerId:b.WORKER_ID,results:i,finished:!0});}}),(l.prototype=Object.create(u.prototype)).constructor=l,(c.prototype=Object.create(u.prototype)).constructor=c,(p.prototype=Object.create(p.prototype)).constructor=p,(g.prototype=Object.create(u.prototype)).constructor=g,b});
734
+ !function(e,t){module.exports=t();}(commonjsGlobal,function s(){var f="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==f?f:{};var n=!f.document&&!!f.postMessage,o=n&&/blob:/i.test((f.location||{}).protocol),a={},h=0,b={parse:function(e,t){var i=(t=t||{}).dynamicTyping||!1;M(i)&&(t.dynamicTypingFunction=i,i={});if(t.dynamicTyping=i,t.transform=!!M(t.transform)&&t.transform,t.worker&&b.WORKERS_SUPPORTED){var r=function(){if(!b.WORKERS_SUPPORTED)return !1;var e=(i=f.URL||f.webkitURL||null,r=s.toString(),b.BLOB_URL||(b.BLOB_URL=i.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))),t=new f.Worker(e);var i,r;return t.onmessage=_,t.id=h++,a[t.id]=t}();return r.userStep=t.step,r.userChunk=t.chunk,r.userComplete=t.complete,r.userError=t.error,t.step=M(t.step),t.chunk=M(t.chunk),t.complete=M(t.complete),t.error=M(t.error),delete t.worker,void r.postMessage({input:e,config:t,workerId:r.id})}var n=null;b.NODE_STREAM_INPUT,"string"==typeof e?n=t.download?new l(t):new p(t):!0===e.readable&&M(e.read)&&M(e.on)?n=new g(t):(f.File&&e instanceof File||e instanceof Object)&&(n=new c(t));return n.stream(e)},unparse:function(e,t){var n=!1,_=!0,m=",",y="\r\n",s='"',a=s+s,i=!1,r=null,o=!1;!function(){if("object"!=typeof t)return;"string"!=typeof t.delimiter||b.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(m=t.delimiter);("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes);"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(i=t.skipEmptyLines);"string"==typeof t.newline&&(y=t.newline);"string"==typeof t.quoteChar&&(s=t.quoteChar);"boolean"==typeof t.header&&(_=t.header);if(Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");r=t.columns;}void 0!==t.escapeChar&&(a=t.escapeChar+s);("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(o=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/);}();var h=new RegExp(j(s),"g");"string"==typeof e&&(e=JSON.parse(e));if(Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return u(null,e,i);if("object"==typeof e[0])return u(r||Object.keys(e[0]),e,i)}else if("object"==typeof e)return "string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||r),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),u(e.fields||[],e.data||[],i);throw new Error("Unable to serialize unrecognized input");function u(e,t,i){var r="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var n=Array.isArray(e)&&0<e.length,s=!Array.isArray(t[0]);if(n&&_){for(var a=0;a<e.length;a++)0<a&&(r+=m),r+=v(e[a],a);0<t.length&&(r+=y);}for(var o=0;o<t.length;o++){var h=n?e.length:t[o].length,u=!1,f=n?0===Object.keys(t[o]).length:0===t[o].length;if(i&&!n&&(u="greedy"===i?""===t[o].join("").trim():1===t[o].length&&0===t[o][0].length),"greedy"===i&&n){for(var d=[],l=0;l<h;l++){var c=s?e[l]:l;d.push(t[o][c]);}u=""===d.join("").trim();}if(!u){for(var p=0;p<h;p++){0<p&&!f&&(r+=m);var g=n&&s?e[p]:p;r+=v(t[o][g],p);}o<t.length-1&&(!i||0<h&&!f)&&(r+=y);}}return r}function v(e,t){if(null==e)return "";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var i=!1;o&&"string"==typeof e&&o.test(e)&&(e="'"+e,i=!0);var r=e.toString().replace(h,a);return (i=i||!0===n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||function(e,t){for(var i=0;i<t.length;i++)if(-1<e.indexOf(t[i]))return !0;return !1}(r,b.BAD_DELIMITERS)||-1<r.indexOf(m)||" "===r.charAt(0)||" "===r.charAt(r.length-1))?s+r+s:r}}};if(b.RECORD_SEP=String.fromCharCode(30),b.UNIT_SEP=String.fromCharCode(31),b.BYTE_ORDER_MARK="\ufeff",b.BAD_DELIMITERS=["\r","\n",'"',b.BYTE_ORDER_MARK],b.WORKERS_SUPPORTED=!n&&!!f.Worker,b.NODE_STREAM_INPUT=1,b.LocalChunkSize=10485760,b.RemoteChunkSize=5242880,b.DefaultDelimiter=",",b.Parser=E,b.ParserHandle=i,b.NetworkStreamer=l,b.FileStreamer=c,b.StringStreamer=p,b.ReadableStreamStreamer=g,f.jQuery){var d=f.jQuery;d.fn.parse=function(o){var i=o.config||{},h=[];return this.each(function(e){if(!("INPUT"===d(this).prop("tagName").toUpperCase()&&"file"===d(this).attr("type").toLowerCase()&&f.FileReader)||!this.files||0===this.files.length)return !0;for(var t=0;t<this.files.length;t++)h.push({file:this.files[t],inputElem:this,instanceConfig:d.extend({},i)});}),e(),this;function e(){if(0!==h.length){var e,t,i,r,n=h[0];if(M(o.before)){var s=o.before(n.file,n.inputElem);if("object"==typeof s){if("abort"===s.action)return e="AbortError",t=n.file,i=n.inputElem,r=s.reason,void(M(o.error)&&o.error({name:e},t,i,r));if("skip"===s.action)return void u();"object"==typeof s.config&&(n.instanceConfig=d.extend(n.instanceConfig,s.config));}else if("skip"===s)return void u()}var a=n.instanceConfig.complete;n.instanceConfig.complete=function(e){M(a)&&a(e,n.file,n.inputElem),u();},b.parse(n.file,n.instanceConfig);}else M(o.complete)&&o.complete();}function u(){h.splice(0,1),e();}};}function u(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=w(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null);this._handle=new i(t),(this._handle.streamer=this)._config=t;}.call(this,e),this.parseChunk=function(e,t){if(this.isFirstChunk&&M(this._config.beforeFirstChunk)){var i=this._config.beforeFirstChunk(e);void 0!==i&&(e=i);}this.isFirstChunk=!1,this._halted=!1;var r=this._partialLine+e;this._partialLine="";var n=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var s=n.meta.cursor;this._finished||(this._partialLine=r.substring(s-this._baseIndex),this._baseIndex=s),n&&n.data&&(this._rowCount+=n.data.length);var a=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(o)f.postMessage({results:n,workerId:b.WORKER_ID,finished:a});else if(M(this._config.chunk)&&!t){if(this._config.chunk(n,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);n=void 0,this._completeResults=void 0;}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),this._completed||!a||!M(this._config.complete)||n&&n.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),a||n&&n.meta.paused||this._nextChunk(),n}this._halted=!0;},this._sendError=function(e){M(this._config.error)?this._config.error(e):o&&this._config.error&&f.postMessage({workerId:b.WORKER_ID,error:e,finished:!1});};}function l(e){var r;(e=e||{}).chunkSize||(e.chunkSize=b.RemoteChunkSize),u.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded();}:function(){this._readChunk();},this.stream=function(e){this._input=e,this._nextChunk();},this._readChunk=function(){if(this._finished)this._chunkLoaded();else {if(r=new XMLHttpRequest,this._config.withCredentials&&(r.withCredentials=this._config.withCredentials),n||(r.onload=v(this._chunkLoaded,this),r.onerror=v(this._chunkError,this)),r.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var t in e)r.setRequestHeader(t,e[t]);}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;r.setRequestHeader("Range","bytes="+this._start+"-"+i);}try{r.send(this._config.downloadRequestBody);}catch(e){this._chunkError(e.message);}n&&0===r.status&&this._chunkError();}},this._chunkLoaded=function(){4===r.readyState&&(r.status<200||400<=r.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:r.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");if(null===t)return -1;return parseInt(t.substring(t.lastIndexOf("/")+1))}(r),this.parseChunk(r.responseText)));},this._chunkError=function(e){var t=r.statusText||e;this._sendError(new Error(t));};}function c(e){var r,n;(e=e||{}).chunkSize||(e.chunkSize=b.LocalChunkSize),u.call(this,e);var s="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,s?((r=new FileReader).onload=v(this._chunkLoaded,this),r.onerror=v(this._chunkError,this)):r=new FileReaderSync,this._nextChunk();},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk();},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var t=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,t);}var i=r.readAsText(e,this._config.encoding);s||this._chunkLoaded({target:{result:i}});},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result);},this._chunkError=function(){this._sendError(r.error);};}function p(e){var i;u.call(this,e=e||{}),this.stream=function(e){return i=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,t=this._config.chunkSize;return t?(e=i.substring(0,t),i=i.substring(t)):(e=i,i=""),this._finished=!i,this.parseChunk(e)}};}function g(e){u.call(this,e=e||{});var t=[],i=!0,r=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause();},this.resume=function(){u.prototype.resume.apply(this,arguments),this._input.resume();},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError);},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0);},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):i=!0;},this._streamData=v(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(t.shift()));}catch(e){this._streamError(e);}},this),this._streamError=v(function(e){this._streamCleanUp(),this._sendError(e);},this),this._streamEnd=v(function(){this._streamCleanUp(),r=!0,this._streamData("");},this),this._streamCleanUp=v(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError);},this);}function i(m){var a,o,h,r=Math.pow(2,53),n=-r,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,u=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,t=this,i=0,f=0,d=!1,e=!1,l=[],c={data:[],errors:[],meta:{}};if(M(m.step)){var p=m.step;m.step=function(e){if(c=e,_())g();else {if(g(),0===c.data.length)return;i+=e.data.length,m.preview&&i>m.preview?o.abort():(c.data=c.data[0],p(c,t));}};}function y(e){return "greedy"===m.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function g(){return c&&h&&(k("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+b.DefaultDelimiter+"'"),h=!1),m.skipEmptyLines&&(c.data=c.data.filter(function(e){return !y(e)})),_()&&function(){if(!c)return;function e(e,t){M(m.transformHeader)&&(e=m.transformHeader(e,t)),l.push(e);}if(Array.isArray(c.data[0])){for(var t=0;_()&&t<c.data.length;t++)c.data[t].forEach(e);c.data.splice(0,1);}else c.data.forEach(e);}(),function(){if(!c||!m.header&&!m.dynamicTyping&&!m.transform)return c;function e(e,t){var i,r=m.header?{}:[];for(i=0;i<e.length;i++){var n=i,s=e[i];m.header&&(n=i>=l.length?"__parsed_extra":l[i]),m.transform&&(s=m.transform(s,n)),s=v(n,s),"__parsed_extra"===n?(r[n]=r[n]||[],r[n].push(s)):r[n]=s;}return m.header&&(i>l.length?k("FieldMismatch","TooManyFields","Too many fields: expected "+l.length+" fields but parsed "+i,f+t):i<l.length&&k("FieldMismatch","TooFewFields","Too few fields: expected "+l.length+" fields but parsed "+i,f+t)),r}var t=1;!c.data.length||Array.isArray(c.data[0])?(c.data=c.data.map(e),t=c.data.length):c.data=e(c.data,0);m.header&&c.meta&&(c.meta.fields=l);return f+=t,c}()}function _(){return m.header&&0===l.length}function v(e,t){return i=e,m.dynamicTypingFunction&&void 0===m.dynamicTyping[i]&&(m.dynamicTyping[i]=m.dynamicTypingFunction(i)),!0===(m.dynamicTyping[i]||m.dynamicTyping)?"true"===t||"TRUE"===t||"false"!==t&&"FALSE"!==t&&(function(e){if(s.test(e)){var t=parseFloat(e);if(n<t&&t<r)return !0}return !1}(t)?parseFloat(t):u.test(t)?new Date(t):""===t?null:t):t;var i;}function k(e,t,i,r){var n={type:e,code:t,message:i};void 0!==r&&(n.row=r),c.errors.push(n);}this.parse=function(e,t,i){var r=m.quoteChar||'"';if(m.newline||(m.newline=function(e,t){e=e.substring(0,1048576);var i=new RegExp(j(t)+"([^]*?)"+j(t),"gm"),r=(e=e.replace(i,"")).split("\r"),n=e.split("\n"),s=1<n.length&&n[0].length<r[0].length;if(1===r.length||s)return "\n";for(var a=0,o=0;o<r.length;o++)"\n"===r[o][0]&&a++;return a>=r.length/2?"\r\n":"\r"}(e,r)),h=!1,m.delimiter)M(m.delimiter)&&(m.delimiter=m.delimiter(e),c.meta.delimiter=m.delimiter);else {var n=function(e,t,i,r,n){var s,a,o,h;n=n||[",","\t","|",";",b.RECORD_SEP,b.UNIT_SEP];for(var u=0;u<n.length;u++){var f=n[u],d=0,l=0,c=0;o=void 0;for(var p=new E({comments:r,delimiter:f,newline:t,preview:10}).parse(e),g=0;g<p.data.length;g++)if(i&&y(p.data[g]))c++;else {var _=p.data[g].length;l+=_,void 0!==o?0<_&&(d+=Math.abs(_-o),o=_):o=_;}0<p.data.length&&(l/=p.data.length-c),(void 0===a||d<=a)&&(void 0===h||h<l)&&1.99<l&&(a=d,s=f,h=l);}return {successful:!!(m.delimiter=s),bestDelimiter:s}}(e,m.newline,m.skipEmptyLines,m.comments,m.delimitersToGuess);n.successful?m.delimiter=n.bestDelimiter:(h=!0,m.delimiter=b.DefaultDelimiter),c.meta.delimiter=m.delimiter;}var s=w(m);return m.preview&&m.header&&s.preview++,a=e,o=new E(s),c=o.parse(a,t,i),g(),d?{meta:{paused:!0}}:c||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,o.abort(),a=M(m.chunk)?"":a.substring(o.getCharIndex());},this.resume=function(){t.streamer._halted?(d=!1,t.streamer.parseChunk(a,!0)):setTimeout(t.resume,3);},this.aborted=function(){return e},this.abort=function(){e=!0,o.abort(),c.meta.aborted=!0,M(m.complete)&&m.complete(c),a="";};}function j(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function E(e){var S,O=(e=e||{}).delimiter,x=e.newline,I=e.comments,T=e.step,D=e.preview,A=e.fastMode,L=S=void 0===e.quoteChar||null===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(L=e.escapeChar),("string"!=typeof O||-1<b.BAD_DELIMITERS.indexOf(O))&&(O=","),I===O)throw new Error("Comment character same as delimiter");!0===I?I="#":("string"!=typeof I||-1<b.BAD_DELIMITERS.indexOf(I))&&(I=!1),"\n"!==x&&"\r"!==x&&"\r\n"!==x&&(x="\n");var F=0,z=!1;this.parse=function(r,t,i){if("string"!=typeof r)throw new Error("Input must be a string");var n=r.length,e=O.length,s=x.length,a=I.length,o=M(T),h=[],u=[],f=[],d=F=0;if(!r)return C();if(A||!1!==A&&-1===r.indexOf(S)){for(var l=r.split(x),c=0;c<l.length;c++){if(f=l[c],F+=f.length,c!==l.length-1)F+=x.length;else if(i)return C();if(!I||f.substring(0,a)!==I){if(o){if(h=[],k(f.split(O)),R(),z)return C()}else k(f.split(O));if(D&&D<=c)return h=h.slice(0,D),C(!0)}}return C()}for(var p=r.indexOf(O,F),g=r.indexOf(x,F),_=new RegExp(j(L)+j(S),"g"),m=r.indexOf(S,F);;)if(r[F]!==S)if(I&&0===f.length&&r.substring(F,F+a)===I){if(-1===g)return C();F=g+s,g=r.indexOf(x,F),p=r.indexOf(O,F);}else if(-1!==p&&(p<g||-1===g))f.push(r.substring(F,p)),F=p+e,p=r.indexOf(O,F);else {if(-1===g)break;if(f.push(r.substring(F,g)),w(g+s),o&&(R(),z))return C();if(D&&h.length>=D)return C(!0)}else for(m=F,F++;;){if(-1===(m=r.indexOf(S,m+1)))return i||u.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:h.length,index:F}),E();if(m===n-1)return E(r.substring(F,m).replace(_,S));if(S!==L||r[m+1]!==L){if(S===L||0===m||r[m-1]!==L){-1!==p&&p<m+1&&(p=r.indexOf(O,m+1)),-1!==g&&g<m+1&&(g=r.indexOf(x,m+1));var y=b(-1===g?p:Math.min(p,g));if(r.substr(m+1+y,e)===O){f.push(r.substring(F,m).replace(_,S)),r[F=m+1+y+e]!==S&&(m=r.indexOf(S,F)),p=r.indexOf(O,F),g=r.indexOf(x,F);break}var v=b(g);if(r.substring(m+1+v,m+1+v+s)===x){if(f.push(r.substring(F,m).replace(_,S)),w(m+1+v+s),p=r.indexOf(O,F),m=r.indexOf(S,F),o&&(R(),z))return C();if(D&&h.length>=D)return C(!0);break}u.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:h.length,index:F}),m++;}}else m++;}return E();function k(e){h.push(e),d=F;}function b(e){var t=0;if(-1!==e){var i=r.substring(m+1,e);i&&""===i.trim()&&(t=i.length);}return t}function E(e){return i||(void 0===e&&(e=r.substring(F)),f.push(e),F=n,k(f),o&&R()),C()}function w(e){F=e,k(f),f=[],g=r.indexOf(x,F);}function C(e){return {data:h,errors:u,meta:{delimiter:O,linebreak:x,aborted:z,truncated:!!e,cursor:d+(t||0)}}}function R(){T(C()),h=[],u=[];}},this.abort=function(){z=!0;},this.getCharIndex=function(){return F};}function _(e){var t=e.data,i=a[t.workerId],r=!1;if(t.error)i.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){r=!0,m(t.workerId,{data:[],errors:[],meta:{aborted:!0}});},pause:y,resume:y};if(M(i.userStep)){for(var s=0;s<t.results.data.length&&(i.userStep({data:t.results.data[s],errors:t.results.errors,meta:t.results.meta},n),!r);s++);delete t.results;}else M(i.userChunk)&&(i.userChunk(t.results,n,t.file),delete t.results);}t.finished&&!r&&m(t.workerId,t.results);}function m(e,t){var i=a[e];M(i.userComplete)&&i.userComplete(t),i.terminate(),delete a[e];}function y(){throw new Error("Not implemented.")}function w(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var i in e)t[i]=w(e[i]);return t}function v(e,t){return function(){e.apply(t,arguments);}}function M(e){return "function"==typeof e}return o&&(f.onmessage=function(e){var t=e.data;void 0===b.WORKER_ID&&t&&(b.WORKER_ID=t.workerId);if("string"==typeof t.input)f.postMessage({workerId:b.WORKER_ID,results:b.parse(t.input,t.config),finished:!0});else if(f.File&&t.input instanceof File||t.input instanceof Object){var i=b.parse(t.input,t.config);i&&f.postMessage({workerId:b.WORKER_ID,results:i,finished:!0});}}),(l.prototype=Object.create(u.prototype)).constructor=l,(c.prototype=Object.create(u.prototype)).constructor=c,(p.prototype=Object.create(p.prototype)).constructor=p,(g.prototype=Object.create(u.prototype)).constructor=g,b});
649
735
  }(papaparse_min));
650
736
 
651
- var es2018 = {};
737
+ var es2018$3 = {};
652
738
 
653
739
  var customError = {};
654
740
 
655
- customError.CustomError = void 0;
656
- class CustomError extends Error {
657
- get name() {
658
- return this.constructor.name;
659
- }
660
- }
661
- customError.CustomError = CustomError;
662
-
663
- var expectedError = {};
664
-
665
- expectedError.ExpectedError = void 0;
666
- const custom_error_1$1 = customError;
667
- class ExpectedError extends custom_error_1$1.CustomError {
668
- }
669
- expectedError.ExpectedError = ExpectedError;
670
-
671
- var assertionError = {};
672
-
673
- assertionError.AssertionError = void 0;
674
- const custom_error_1 = customError;
675
- class AssertionError extends custom_error_1.CustomError {
676
- }
677
- assertionError.AssertionError = AssertionError;
678
-
679
- var normalize$1 = {};
741
+ var es2018$2 = {};
680
742
 
681
- normalize$1.normalize = void 0;
682
- function normalize(err) {
683
- var _a;
684
- return {
685
- name: err.name,
686
- message: err.message,
687
- stack: (_a = err.stack) !== null && _a !== void 0 ? _a : null
688
- };
689
- }
690
- normalize$1.normalize = normalize;
743
+ var middleware = {};
691
744
 
692
- var refute$1 = {};
745
+ var chunkAsync$1 = {};
693
746
 
694
- refute$1.refute = void 0;
695
- const expected_error_1 = expectedError;
696
- function refute(condition, message) {
697
- if (condition)
698
- throw new expected_error_1.ExpectedError(message);
699
- }
700
- refute$1.refute = refute;
747
+ var es2018$1 = {};
701
748
 
702
- var assert$1 = {};
749
+ var go$1 = {};
703
750
 
704
- assert$1.assert = void 0;
705
- const assertion_error_1 = assertionError;
706
- function assert(condition, message) {
707
- if (!condition)
708
- throw new assertion_error_1.AssertionError(message);
751
+ go$1.go = void 0;
752
+ function go(fn) {
753
+ return fn();
709
754
  }
710
- assert$1.assert = assert;
755
+ go$1.go = go;
711
756
 
712
757
  (function (exports) {
713
758
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -719,19 +764,1971 @@ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Obj
719
764
  }));
720
765
  var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
721
766
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
722
- };__exportStar(customError, exports);
723
- __exportStar(expectedError, exports);
724
- __exportStar(assertionError, exports);
725
- __exportStar(normalize$1, exports);
726
- __exportStar(refute$1, exports);
727
- __exportStar(assert$1, exports);
767
+ };__exportStar(go$1, exports);
728
768
 
729
- }(es2018));
769
+ }(es2018$1));
770
+
771
+ chunkAsync$1.chunkAsync = void 0;
772
+ const go_1$f = es2018$1;
773
+ const errors_1$f = es2018$3;
774
+ function chunkAsync(iterable, size) {
775
+ (0, errors_1$f.assert)(Number.isInteger(size), 'The parameter size must be an integer');
776
+ (0, errors_1$f.assert)(size > 0, 'The parameter size must be greater than 0');
777
+ return (0, go_1$f.go)(async function* () {
778
+ let buffer = [];
779
+ for await (const element of iterable) {
780
+ buffer.push(element);
781
+ if (buffer.length >= size) {
782
+ yield buffer;
783
+ buffer = [];
784
+ }
785
+ }
786
+ if (buffer.length)
787
+ yield buffer;
788
+ });
789
+ }
790
+ chunkAsync$1.chunkAsync = chunkAsync;
791
+
792
+ var chunkByAsync$1 = {};
793
+
794
+ chunkByAsync$1.chunkByAsync = void 0;
795
+ const types_1$k = es2018$4;
796
+ function chunkByAsync(iterable, predicate) {
797
+ if ((0, types_1$k.isAsyncIterable)(iterable)) {
798
+ return chunkByAsyncIterable(iterable);
799
+ }
800
+ else {
801
+ return chunkByIterable(iterable);
802
+ }
803
+ async function* chunkByAsyncIterable(iterable) {
804
+ let buffer = [];
805
+ let index = 0;
806
+ for await (const element of iterable) {
807
+ buffer.push(element);
808
+ if (await predicate(element, index)) {
809
+ yield buffer;
810
+ buffer = [];
811
+ }
812
+ index++;
813
+ }
814
+ if (buffer.length)
815
+ yield buffer;
816
+ }
817
+ async function* chunkByIterable(iterable) {
818
+ let buffer = [];
819
+ let index = 0;
820
+ for (const element of iterable) {
821
+ buffer.push(element);
822
+ if (await predicate(element, index)) {
823
+ yield buffer;
824
+ buffer = [];
825
+ }
826
+ index++;
827
+ }
828
+ if (buffer.length)
829
+ yield buffer;
830
+ }
831
+ }
832
+ chunkByAsync$1.chunkByAsync = chunkByAsync;
833
+
834
+ var chunkBy$1 = {};
835
+
836
+ chunkBy$1.chunkBy = void 0;
837
+ function* chunkBy(iterable, predicate) {
838
+ let buffer = [];
839
+ let index = 0;
840
+ for (const element of iterable) {
841
+ buffer.push(element);
842
+ if (predicate(element, index)) {
843
+ yield buffer;
844
+ buffer = [];
845
+ }
846
+ index++;
847
+ }
848
+ if (buffer.length)
849
+ yield buffer;
850
+ }
851
+ chunkBy$1.chunkBy = chunkBy;
852
+
853
+ var chunk$1 = {};
854
+
855
+ chunk$1.chunk = void 0;
856
+ const go_1$e = es2018$1;
857
+ const errors_1$e = es2018$3;
858
+ function chunk(iterable, size) {
859
+ (0, errors_1$e.assert)(Number.isInteger(size), 'The parameter size must be an integer');
860
+ (0, errors_1$e.assert)(size > 0, 'The parameter size must be greater than 0');
861
+ return (0, go_1$e.go)(function* () {
862
+ let buffer = [];
863
+ for (const element of iterable) {
864
+ buffer.push(element);
865
+ if (buffer.length >= size) {
866
+ yield buffer;
867
+ buffer = [];
868
+ }
869
+ }
870
+ if (buffer.length)
871
+ yield buffer;
872
+ });
873
+ }
874
+ chunk$1.chunk = chunk;
875
+
876
+ var concatAsync$1 = {};
877
+
878
+ concatAsync$1.concatAsync = void 0;
879
+ const types_1$j = es2018$4;
880
+ const go_1$d = es2018$1;
881
+ function concatAsync(iterable, ...otherIterables) {
882
+ return (0, go_1$d.go)(async function* () {
883
+ for (const iter of [iterable, ...otherIterables]) {
884
+ if ((0, types_1$j.isAsyncIterable)(iter)) {
885
+ for await (const element of iter) {
886
+ yield element;
887
+ }
888
+ }
889
+ else {
890
+ for (const element of iter) {
891
+ yield element;
892
+ }
893
+ }
894
+ }
895
+ });
896
+ }
897
+ concatAsync$1.concatAsync = concatAsync;
898
+
899
+ var concat$1 = {};
900
+
901
+ concat$1.concat = void 0;
902
+ const go_1$c = es2018$1;
903
+ function concat(iterable, ...otherIterables) {
904
+ return (0, go_1$c.go)(function* () {
905
+ for (const iter of [iterable, ...otherIterables]) {
906
+ yield* iter;
907
+ }
908
+ });
909
+ }
910
+ concat$1.concat = concat;
911
+
912
+ var dropAsync$1 = {};
913
+
914
+ var utils = {};
915
+
916
+ utils.copyIterable = utils.copyAsyncIterable = void 0;
917
+ async function* copyAsyncIterable(iterable) {
918
+ for await (const element of iterable) {
919
+ yield element;
920
+ }
921
+ }
922
+ utils.copyAsyncIterable = copyAsyncIterable;
923
+ function* copyIterable(iterable) {
924
+ for (const element of iterable) {
925
+ yield element;
926
+ }
927
+ }
928
+ utils.copyIterable = copyIterable;
929
+
930
+ dropAsync$1.dropAsync = void 0;
931
+ const go_1$b = es2018$1;
932
+ const utils_1$3 = utils;
933
+ const errors_1$d = es2018$3;
934
+ function dropAsync(iterable, count) {
935
+ (0, errors_1$d.assert)(Number.isInteger(count), 'The parameter count must be an integer');
936
+ (0, errors_1$d.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
937
+ if (count === 0)
938
+ return (0, utils_1$3.copyAsyncIterable)(iterable);
939
+ return (0, go_1$b.go)(async function* () {
940
+ var _a;
941
+ const iterator = iterable[Symbol.asyncIterator]();
942
+ let done;
943
+ try {
944
+ let value;
945
+ while ({ value, done } = await iterator.next(), !done) {
946
+ if (count <= 0)
947
+ break;
948
+ count--;
949
+ }
950
+ while (!done) {
951
+ yield value;
952
+ ({ value, done } = await iterator.next());
953
+ }
954
+ }
955
+ finally {
956
+ if (!done)
957
+ await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
958
+ }
959
+ });
960
+ }
961
+ dropAsync$1.dropAsync = dropAsync;
962
+
963
+ var dropRightAsync$1 = {};
964
+
965
+ dropRightAsync$1.dropRightAsync = void 0;
966
+ const go_1$a = es2018$1;
967
+ const utils_1$2 = utils;
968
+ const errors_1$c = es2018$3;
969
+ function dropRightAsync(iterable, count) {
970
+ (0, errors_1$c.assert)(Number.isInteger(count), 'The parameter count must be an integer');
971
+ (0, errors_1$c.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
972
+ if (count === 0)
973
+ return (0, utils_1$2.copyAsyncIterable)(iterable);
974
+ return (0, go_1$a.go)(async function* () {
975
+ const arr = await toArrayAsync$2(iterable);
976
+ const result = arr.slice(0, -count);
977
+ for (const value of result) {
978
+ yield value;
979
+ }
980
+ });
981
+ }
982
+ dropRightAsync$1.dropRightAsync = dropRightAsync;
983
+ async function toArrayAsync$2(iterable) {
984
+ const result = [];
985
+ for await (const element of iterable) {
986
+ result.push(element);
987
+ }
988
+ return result;
989
+ }
990
+
991
+ var dropRight$1 = {};
992
+
993
+ dropRight$1.dropRight = void 0;
994
+ const go_1$9 = es2018$1;
995
+ const utils_1$1 = utils;
996
+ const errors_1$b = es2018$3;
997
+ function dropRight(iterable, count) {
998
+ (0, errors_1$b.assert)(Number.isInteger(count), 'The parameter count must be an integer');
999
+ (0, errors_1$b.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1000
+ if (count === 0)
1001
+ return (0, utils_1$1.copyIterable)(iterable);
1002
+ return (0, go_1$9.go)(function* () {
1003
+ const arr = Array.from(iterable);
1004
+ yield* arr.slice(0, -count);
1005
+ });
1006
+ }
1007
+ dropRight$1.dropRight = dropRight;
1008
+
1009
+ var dropUntilAsync$1 = {};
1010
+
1011
+ dropUntilAsync$1.dropUntilAsync = void 0;
1012
+ const types_1$i = es2018$4;
1013
+ function dropUntilAsync(iterable, predicate) {
1014
+ if ((0, types_1$i.isAsyncIterable)(iterable)) {
1015
+ return dropUntilAsyncIterable(iterable);
1016
+ }
1017
+ else {
1018
+ return dropUntilIterable(iterable);
1019
+ }
1020
+ async function* dropUntilAsyncIterable(iterable) {
1021
+ var _a;
1022
+ const iterator = iterable[Symbol.asyncIterator]();
1023
+ let done;
1024
+ try {
1025
+ let index = 0;
1026
+ let value;
1027
+ while ({ value, done } = await iterator.next(), !done) {
1028
+ if (await predicate(value, index++))
1029
+ break;
1030
+ }
1031
+ while (!done) {
1032
+ yield value;
1033
+ ({ value, done } = await iterator.next());
1034
+ }
1035
+ }
1036
+ finally {
1037
+ if (!done)
1038
+ await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
1039
+ }
1040
+ }
1041
+ async function* dropUntilIterable(iterable) {
1042
+ var _a;
1043
+ const iterator = iterable[Symbol.iterator]();
1044
+ let done;
1045
+ try {
1046
+ let index = 0;
1047
+ let value;
1048
+ while ({ value, done } = iterator.next(), !done) {
1049
+ if (await predicate(value, index++))
1050
+ break;
1051
+ }
1052
+ while (!done) {
1053
+ yield value;
1054
+ ({ value, done } = iterator.next());
1055
+ }
1056
+ }
1057
+ finally {
1058
+ if (!done)
1059
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
1060
+ }
1061
+ }
1062
+ }
1063
+ dropUntilAsync$1.dropUntilAsync = dropUntilAsync;
1064
+
1065
+ var dropUntil$1 = {};
1066
+
1067
+ dropUntil$1.dropUntil = void 0;
1068
+ function* dropUntil(iterable, predicate) {
1069
+ var _a;
1070
+ const iterator = iterable[Symbol.iterator]();
1071
+ let done;
1072
+ try {
1073
+ let index = 0;
1074
+ let value;
1075
+ while ({ value, done } = iterator.next(), !done) {
1076
+ if (predicate(value, index++))
1077
+ break;
1078
+ }
1079
+ while (!done) {
1080
+ yield value;
1081
+ ({ value, done } = iterator.next());
1082
+ }
1083
+ }
1084
+ finally {
1085
+ if (!done)
1086
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
1087
+ }
1088
+ }
1089
+ dropUntil$1.dropUntil = dropUntil;
1090
+
1091
+ var drop$1 = {};
1092
+
1093
+ drop$1.drop = void 0;
1094
+ const go_1$8 = es2018$1;
1095
+ const utils_1 = utils;
1096
+ const errors_1$a = es2018$3;
1097
+ function drop(iterable, count) {
1098
+ (0, errors_1$a.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1099
+ (0, errors_1$a.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1100
+ if (count === 0)
1101
+ return (0, utils_1.copyIterable)(iterable);
1102
+ return (0, go_1$8.go)(function* () {
1103
+ var _a;
1104
+ const iterator = iterable[Symbol.iterator]();
1105
+ let done;
1106
+ try {
1107
+ let value;
1108
+ while ({ value, done } = iterator.next(), !done) {
1109
+ if (count <= 0)
1110
+ break;
1111
+ count--;
1112
+ }
1113
+ while (!done) {
1114
+ yield value;
1115
+ ({ value, done } = iterator.next());
1116
+ }
1117
+ }
1118
+ finally {
1119
+ if (!done)
1120
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
1121
+ }
1122
+ });
1123
+ }
1124
+ drop$1.drop = drop;
1125
+
1126
+ var filterAsync$1 = {};
1127
+
1128
+ filterAsync$1.filterAsync = void 0;
1129
+ const types_1$h = es2018$4;
1130
+ function filterAsync(iterable, predicate) {
1131
+ if ((0, types_1$h.isAsyncIterable)(iterable)) {
1132
+ return filterAsyncIterable(iterable);
1133
+ }
1134
+ else {
1135
+ return filterIterable(iterable);
1136
+ }
1137
+ async function* filterAsyncIterable(iterable) {
1138
+ let index = 0;
1139
+ for await (const element of iterable) {
1140
+ if (await predicate(element, index))
1141
+ yield element;
1142
+ index++;
1143
+ }
1144
+ }
1145
+ async function* filterIterable(iterable) {
1146
+ let index = 0;
1147
+ for (const element of iterable) {
1148
+ if (await predicate(element, index))
1149
+ yield element;
1150
+ index++;
1151
+ }
1152
+ }
1153
+ }
1154
+ filterAsync$1.filterAsync = filterAsync;
1155
+
1156
+ var filter$1 = {};
1157
+
1158
+ filter$1.filter = void 0;
1159
+ function* filter(iterable, predicate) {
1160
+ let index = 0;
1161
+ for (const element of iterable) {
1162
+ if (predicate(element, index))
1163
+ yield element;
1164
+ index++;
1165
+ }
1166
+ }
1167
+ filter$1.filter = filter;
1168
+
1169
+ var flattenAsync$1 = {};
1170
+
1171
+ var flattenDeepAsync$1 = {};
1172
+
1173
+ var flattenByAsync$1 = {};
1174
+
1175
+ flattenByAsync$1.flattenByAsync = void 0;
1176
+ const types_1$g = es2018$4;
1177
+ function flattenByAsync(iterable, predicate) {
1178
+ if ((0, types_1$g.isAsyncIterable)(iterable)) {
1179
+ return flattenByAsyncIterable(iterable);
1180
+ }
1181
+ else {
1182
+ return flattenByIterable(iterable);
1183
+ }
1184
+ async function* flattenByAsyncIterable(iterable) {
1185
+ const level = 1;
1186
+ for await (const element of iterable) {
1187
+ if (isFiniteIterable$1(element) && await predicate(element, level)) {
1188
+ yield* flatten(element, level + 1);
1189
+ }
1190
+ else {
1191
+ yield element;
1192
+ }
1193
+ }
1194
+ }
1195
+ function flattenByIterable(iterable) {
1196
+ return flatten(iterable, 1);
1197
+ }
1198
+ async function* flatten(iterable, level) {
1199
+ for (const element of iterable) {
1200
+ if (isFiniteIterable$1(element) && await predicate(element, level)) {
1201
+ yield* flatten(element, level + 1);
1202
+ }
1203
+ else {
1204
+ yield element;
1205
+ }
1206
+ }
1207
+ }
1208
+ }
1209
+ flattenByAsync$1.flattenByAsync = flattenByAsync;
1210
+ function isFiniteIterable$1(val) {
1211
+ return (0, types_1$g.isIterable)(val) && (0, types_1$g.isntChar)(val);
1212
+ }
1213
+
1214
+ flattenDeepAsync$1.flattenDeepAsync = void 0;
1215
+ const flatten_by_async_1 = flattenByAsync$1;
1216
+ const errors_1$9 = es2018$3;
1217
+ function flattenDeepAsync(iterable, depth = Infinity) {
1218
+ (0, errors_1$9.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
1219
+ (0, errors_1$9.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
1220
+ return (0, flatten_by_async_1.flattenByAsync)(iterable, (_, level) => level <= depth);
1221
+ }
1222
+ flattenDeepAsync$1.flattenDeepAsync = flattenDeepAsync;
1223
+
1224
+ flattenAsync$1.flattenAsync = void 0;
1225
+ const flatten_deep_async_1 = flattenDeepAsync$1;
1226
+ function flattenAsync(iterable) {
1227
+ return (0, flatten_deep_async_1.flattenDeepAsync)(iterable, 1);
1228
+ }
1229
+ flattenAsync$1.flattenAsync = flattenAsync;
1230
+
1231
+ var flattenBy$1 = {};
1232
+
1233
+ flattenBy$1.flattenBy = void 0;
1234
+ const types_1$f = es2018$4;
1235
+ function flattenBy(iterable, predicate) {
1236
+ return flatten(iterable, 1);
1237
+ function* flatten(iterable, level) {
1238
+ for (const element of iterable) {
1239
+ if (isFiniteIterable(element) && predicate(element, level)) {
1240
+ yield* flatten(element, level + 1);
1241
+ }
1242
+ else {
1243
+ yield element;
1244
+ }
1245
+ }
1246
+ }
1247
+ }
1248
+ flattenBy$1.flattenBy = flattenBy;
1249
+ function isFiniteIterable(val) {
1250
+ return (0, types_1$f.isIterable)(val) && (0, types_1$f.isntChar)(val);
1251
+ }
1252
+
1253
+ var flattenDeep$1 = {};
1254
+
1255
+ flattenDeep$1.flattenDeep = void 0;
1256
+ const flatten_by_1 = flattenBy$1;
1257
+ const errors_1$8 = es2018$3;
1258
+ function flattenDeep(iterable, depth = Infinity) {
1259
+ (0, errors_1$8.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
1260
+ (0, errors_1$8.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
1261
+ return (0, flatten_by_1.flattenBy)(iterable, (_, level) => level <= depth);
1262
+ }
1263
+ flattenDeep$1.flattenDeep = flattenDeep;
1264
+
1265
+ var flatten$1 = {};
1266
+
1267
+ flatten$1.flatten = void 0;
1268
+ const flatten_deep_1 = flattenDeep$1;
1269
+ function flatten(iterable) {
1270
+ return (0, flatten_deep_1.flattenDeep)(iterable, 1);
1271
+ }
1272
+ flatten$1.flatten = flatten;
1273
+
1274
+ var mapAsync$1 = {};
1275
+
1276
+ mapAsync$1.mapAsync = void 0;
1277
+ const types_1$e = es2018$4;
1278
+ function mapAsync(iterable, fn) {
1279
+ if ((0, types_1$e.isAsyncIterable)(iterable)) {
1280
+ return mapAsyncIterable(iterable);
1281
+ }
1282
+ else {
1283
+ return mapIterable(iterable);
1284
+ }
1285
+ async function* mapAsyncIterable(iterable) {
1286
+ let index = 0;
1287
+ for await (const element of iterable) {
1288
+ yield await fn(element, index);
1289
+ index++;
1290
+ }
1291
+ }
1292
+ async function* mapIterable(iterable) {
1293
+ let index = 0;
1294
+ for (const element of iterable) {
1295
+ yield await fn(element, index);
1296
+ index++;
1297
+ }
1298
+ }
1299
+ }
1300
+ mapAsync$1.mapAsync = mapAsync;
1301
+
1302
+ var map$1 = {};
1303
+
1304
+ map$1.map = void 0;
1305
+ function* map(iterable, fn) {
1306
+ let index = 0;
1307
+ for (const element of iterable) {
1308
+ yield fn(element, index);
1309
+ index++;
1310
+ }
1311
+ }
1312
+ map$1.map = map;
1313
+
1314
+ var repeatAsync$1 = {};
1315
+
1316
+ repeatAsync$1.repeatAsync = void 0;
1317
+ const go_1$7 = es2018$1;
1318
+ const errors_1$7 = es2018$3;
1319
+ function repeatAsync(iterable, times) {
1320
+ (0, errors_1$7.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
1321
+ (0, errors_1$7.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
1322
+ if (times === Infinity)
1323
+ warnInfiniteLoop$1();
1324
+ return (0, go_1$7.go)(async function* () {
1325
+ const cache = [];
1326
+ if (times > 0) {
1327
+ for await (const element of iterable) {
1328
+ yield element;
1329
+ cache.push(element);
1330
+ }
1331
+ times--;
1332
+ }
1333
+ while (times > 0) {
1334
+ yield* cache;
1335
+ times--;
1336
+ }
1337
+ });
1338
+ }
1339
+ repeatAsync$1.repeatAsync = repeatAsync;
1340
+ function warnInfiniteLoop$1() {
1341
+ if (isProduction$1())
1342
+ return;
1343
+ console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');
1344
+ }
1345
+ function isProduction$1() {
1346
+ return process.env.NODE_ENV === 'production';
1347
+ }
1348
+
1349
+ var repeat$1 = {};
1350
+
1351
+ repeat$1.repeat = void 0;
1352
+ const go_1$6 = es2018$1;
1353
+ const errors_1$6 = es2018$3;
1354
+ function repeat(iterable, times) {
1355
+ (0, errors_1$6.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
1356
+ (0, errors_1$6.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
1357
+ if (times === Infinity)
1358
+ warnInfiniteLoop();
1359
+ return (0, go_1$6.go)(function* () {
1360
+ const cache = [];
1361
+ if (times > 0) {
1362
+ for (const element of iterable) {
1363
+ yield element;
1364
+ cache.push(element);
1365
+ }
1366
+ times--;
1367
+ }
1368
+ while (times > 0) {
1369
+ yield* cache;
1370
+ times--;
1371
+ }
1372
+ });
1373
+ }
1374
+ repeat$1.repeat = repeat;
1375
+ function warnInfiniteLoop() {
1376
+ if (isProduction())
1377
+ return;
1378
+ console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');
1379
+ }
1380
+ function isProduction() {
1381
+ return process.env.NODE_ENV === 'production';
1382
+ }
1383
+
1384
+ var sliceAsync$1 = {};
1385
+
1386
+ sliceAsync$1.sliceAsync = void 0;
1387
+ const go_1$5 = es2018$1;
1388
+ const errors_1$5 = es2018$3;
1389
+ function sliceAsync(iterable, start, end = Infinity) {
1390
+ (0, errors_1$5.assert)(Number.isInteger(start), 'The parameter start must be an integer');
1391
+ (0, errors_1$5.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
1392
+ (0, errors_1$5.assert)(Number.isInteger(end), 'The parameter end must be an integer');
1393
+ (0, errors_1$5.assert)(end >= start, 'The parameter end must be greater than or equal to start');
1394
+ return (0, go_1$5.go)(async function* () {
1395
+ let index = 0;
1396
+ for await (const element of iterable) {
1397
+ if (index >= end)
1398
+ break;
1399
+ if (index >= start)
1400
+ yield element;
1401
+ index++;
1402
+ }
1403
+ });
1404
+ }
1405
+ sliceAsync$1.sliceAsync = sliceAsync;
1406
+
1407
+ var slice$1 = {};
1408
+
1409
+ slice$1.slice = void 0;
1410
+ const go_1$4 = es2018$1;
1411
+ const errors_1$4 = es2018$3;
1412
+ function slice(iterable, start, end = Infinity) {
1413
+ (0, errors_1$4.assert)(Number.isInteger(start), 'The parameter start must be an integer');
1414
+ (0, errors_1$4.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
1415
+ (0, errors_1$4.assert)(Number.isInteger(end), 'The parameter end must be an integer');
1416
+ (0, errors_1$4.assert)(end >= start, 'The parameter end must be greater than or equal to start');
1417
+ return (0, go_1$4.go)(function* () {
1418
+ let index = 0;
1419
+ for (const element of iterable) {
1420
+ if (index >= end)
1421
+ break;
1422
+ if (index >= start)
1423
+ yield element;
1424
+ index++;
1425
+ }
1426
+ });
1427
+ }
1428
+ slice$1.slice = slice;
1429
+
1430
+ var splitAsync$1 = {};
1431
+
1432
+ splitAsync$1.splitAsync = void 0;
1433
+ async function* splitAsync(iterable, separator) {
1434
+ let buffer = [];
1435
+ for await (const element of iterable) {
1436
+ if (element === separator) {
1437
+ yield buffer;
1438
+ buffer = [];
1439
+ }
1440
+ else {
1441
+ buffer.push(element);
1442
+ }
1443
+ }
1444
+ yield buffer;
1445
+ }
1446
+ splitAsync$1.splitAsync = splitAsync;
1447
+
1448
+ var splitByAsync$1 = {};
1449
+
1450
+ splitByAsync$1.splitByAsync = void 0;
1451
+ const types_1$d = es2018$4;
1452
+ function splitByAsync(iterable, predicate) {
1453
+ if ((0, types_1$d.isAsyncIterable)(iterable)) {
1454
+ return splitByAsyncIterable(iterable);
1455
+ }
1456
+ else {
1457
+ return splitByIterable(iterable);
1458
+ }
1459
+ async function* splitByIterable(iterable) {
1460
+ let buffer = [];
1461
+ let index = 0;
1462
+ for (const element of iterable) {
1463
+ if (await predicate(element, index)) {
1464
+ yield buffer;
1465
+ buffer = [];
1466
+ }
1467
+ else {
1468
+ buffer.push(element);
1469
+ }
1470
+ index++;
1471
+ }
1472
+ yield buffer;
1473
+ }
1474
+ async function* splitByAsyncIterable(iterable) {
1475
+ let buffer = [];
1476
+ let index = 0;
1477
+ for await (const element of iterable) {
1478
+ if (await predicate(element, index)) {
1479
+ yield buffer;
1480
+ buffer = [];
1481
+ }
1482
+ else {
1483
+ buffer.push(element);
1484
+ }
1485
+ index++;
1486
+ }
1487
+ yield buffer;
1488
+ }
1489
+ }
1490
+ splitByAsync$1.splitByAsync = splitByAsync;
1491
+
1492
+ var splitBy$1 = {};
1493
+
1494
+ splitBy$1.splitBy = void 0;
1495
+ function* splitBy(iterable, predicate) {
1496
+ let buffer = [];
1497
+ let index = 0;
1498
+ for (const element of iterable) {
1499
+ if (predicate(element, index)) {
1500
+ yield buffer;
1501
+ buffer = [];
1502
+ }
1503
+ else {
1504
+ buffer.push(element);
1505
+ }
1506
+ index++;
1507
+ }
1508
+ yield buffer;
1509
+ }
1510
+ splitBy$1.splitBy = splitBy;
1511
+
1512
+ var split$1 = {};
1513
+
1514
+ split$1.split = void 0;
1515
+ function* split(iterable, separator) {
1516
+ let buffer = [];
1517
+ for (const element of iterable) {
1518
+ if (element === separator) {
1519
+ yield buffer;
1520
+ buffer = [];
1521
+ }
1522
+ else {
1523
+ buffer.push(element);
1524
+ }
1525
+ }
1526
+ yield buffer;
1527
+ }
1528
+ split$1.split = split;
1529
+
1530
+ var takeAsync$1 = {};
1531
+
1532
+ takeAsync$1.takeAsync = void 0;
1533
+ const go_1$3 = es2018$1;
1534
+ const errors_1$3 = es2018$3;
1535
+ function takeAsync(iterable, count) {
1536
+ (0, errors_1$3.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1537
+ (0, errors_1$3.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1538
+ return (0, go_1$3.go)(async function* () {
1539
+ if (count === 0)
1540
+ return;
1541
+ for await (const element of iterable) {
1542
+ yield element;
1543
+ count--;
1544
+ if (count === 0)
1545
+ break;
1546
+ }
1547
+ });
1548
+ }
1549
+ takeAsync$1.takeAsync = takeAsync;
1550
+
1551
+ var takeRightAsync$1 = {};
1552
+
1553
+ takeRightAsync$1.takeRightAsync = void 0;
1554
+ const go_1$2 = es2018$1;
1555
+ const errors_1$2 = es2018$3;
1556
+ function takeRightAsync(iterable, count) {
1557
+ (0, errors_1$2.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1558
+ (0, errors_1$2.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1559
+ return (0, go_1$2.go)(async function* () {
1560
+ var _a;
1561
+ const iterator = iterable[Symbol.asyncIterator]();
1562
+ let done;
1563
+ try {
1564
+ const buffer = [];
1565
+ let value;
1566
+ while ({ value, done } = await iterator.next(), !done) {
1567
+ buffer.push(value);
1568
+ if (buffer.length > count)
1569
+ buffer.shift();
1570
+ }
1571
+ yield* buffer;
1572
+ }
1573
+ finally {
1574
+ if (!done)
1575
+ await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
1576
+ }
1577
+ });
1578
+ }
1579
+ takeRightAsync$1.takeRightAsync = takeRightAsync;
1580
+
1581
+ var takeRight$1 = {};
1582
+
1583
+ takeRight$1.takeRight = void 0;
1584
+ const go_1$1 = es2018$1;
1585
+ const errors_1$1 = es2018$3;
1586
+ function takeRight(iterable, count) {
1587
+ (0, errors_1$1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1588
+ (0, errors_1$1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1589
+ return (0, go_1$1.go)(function* () {
1590
+ var _a;
1591
+ const iterator = iterable[Symbol.iterator]();
1592
+ let done;
1593
+ try {
1594
+ const buffer = [];
1595
+ let value;
1596
+ while ({ value, done } = iterator.next(), !done) {
1597
+ buffer.push(value);
1598
+ if (buffer.length > count)
1599
+ buffer.shift();
1600
+ }
1601
+ yield* buffer;
1602
+ }
1603
+ finally {
1604
+ if (!done)
1605
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
1606
+ }
1607
+ });
1608
+ }
1609
+ takeRight$1.takeRight = takeRight;
1610
+
1611
+ var takeUntilAsync$1 = {};
1612
+
1613
+ takeUntilAsync$1.takeUntilAsync = void 0;
1614
+ const types_1$c = es2018$4;
1615
+ function takeUntilAsync(iterable, predicate) {
1616
+ if ((0, types_1$c.isAsyncIterable)(iterable)) {
1617
+ return takeUntilAsyncIterable(iterable);
1618
+ }
1619
+ else {
1620
+ return takeUntilIterable(iterable);
1621
+ }
1622
+ async function* takeUntilAsyncIterable(iterable) {
1623
+ let index = 0;
1624
+ for await (const element of iterable) {
1625
+ if (await predicate(element, index))
1626
+ break;
1627
+ yield element;
1628
+ index++;
1629
+ }
1630
+ }
1631
+ async function* takeUntilIterable(iterable) {
1632
+ let index = 0;
1633
+ for (const element of iterable) {
1634
+ if (await predicate(element, index))
1635
+ break;
1636
+ yield element;
1637
+ index++;
1638
+ }
1639
+ }
1640
+ }
1641
+ takeUntilAsync$1.takeUntilAsync = takeUntilAsync;
1642
+
1643
+ var takeUntil$1 = {};
1644
+
1645
+ takeUntil$1.takeUntil = void 0;
1646
+ function* takeUntil(iterable, predicate) {
1647
+ let index = 0;
1648
+ for (const element of iterable) {
1649
+ if (predicate(element, index))
1650
+ break;
1651
+ yield element;
1652
+ index++;
1653
+ }
1654
+ }
1655
+ takeUntil$1.takeUntil = takeUntil;
1656
+
1657
+ var take$1 = {};
1658
+
1659
+ take$1.take = void 0;
1660
+ const go_1 = es2018$1;
1661
+ const errors_1 = es2018$3;
1662
+ function take(iterable, count) {
1663
+ (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1664
+ (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1665
+ return (0, go_1.go)(function* () {
1666
+ if (count === 0)
1667
+ return;
1668
+ for (const element of iterable) {
1669
+ yield element;
1670
+ count--;
1671
+ if (count === 0)
1672
+ break;
1673
+ }
1674
+ });
1675
+ }
1676
+ take$1.take = take;
1677
+
1678
+ var tapAsync$1 = {};
1679
+
1680
+ tapAsync$1.tapAsync = void 0;
1681
+ const types_1$b = es2018$4;
1682
+ function tapAsync(iterable, fn) {
1683
+ if ((0, types_1$b.isAsyncIterable)(iterable)) {
1684
+ return tapAsyncIterable(iterable);
1685
+ }
1686
+ else {
1687
+ return tapIterable(iterable);
1688
+ }
1689
+ async function* tapIterable(iterable) {
1690
+ let index = 0;
1691
+ for (const element of iterable) {
1692
+ await fn(element, index);
1693
+ yield element;
1694
+ index++;
1695
+ }
1696
+ }
1697
+ async function* tapAsyncIterable(iterable) {
1698
+ let index = 0;
1699
+ for await (const element of iterable) {
1700
+ await fn(element, index);
1701
+ yield element;
1702
+ index++;
1703
+ }
1704
+ }
1705
+ }
1706
+ tapAsync$1.tapAsync = tapAsync;
1707
+
1708
+ var tap$1 = {};
1709
+
1710
+ tap$1.tap = void 0;
1711
+ function* tap(iterable, fn) {
1712
+ let index = 0;
1713
+ for (const element of iterable) {
1714
+ fn(element, index);
1715
+ yield element;
1716
+ index++;
1717
+ }
1718
+ }
1719
+ tap$1.tap = tap;
1720
+
1721
+ var toAsyncIterable$1 = {};
1722
+
1723
+ toAsyncIterable$1.toAsyncIterable = void 0;
1724
+ async function* toAsyncIterable(iterable) {
1725
+ for (const value of iterable) {
1726
+ yield value;
1727
+ }
1728
+ }
1729
+ toAsyncIterable$1.toAsyncIterable = toAsyncIterable;
1730
+
1731
+ var transformAsync$1 = {};
1732
+
1733
+ transformAsync$1.transformAsync = void 0;
1734
+ async function* transformAsync(iterable, transformer) {
1735
+ yield* transformer(iterable);
1736
+ }
1737
+ transformAsync$1.transformAsync = transformAsync;
1738
+
1739
+ var transform$1 = {};
1740
+
1741
+ transform$1.transform = void 0;
1742
+ function* transform(iterable, transformer) {
1743
+ yield* transformer(iterable);
1744
+ }
1745
+ transform$1.transform = transform;
1746
+
1747
+ var uniqAsync$1 = {};
1748
+
1749
+ uniqAsync$1.uniqAsync = void 0;
1750
+ async function* uniqAsync(iterable) {
1751
+ const bucket = new Set();
1752
+ for await (const element of iterable) {
1753
+ if (!bucket.has(element)) {
1754
+ yield element;
1755
+ bucket.add(element);
1756
+ }
1757
+ }
1758
+ }
1759
+ uniqAsync$1.uniqAsync = uniqAsync;
1760
+
1761
+ var uniqByAsync$1 = {};
1762
+
1763
+ uniqByAsync$1.uniqByAsync = void 0;
1764
+ const types_1$a = es2018$4;
1765
+ function uniqByAsync(iterable, fn) {
1766
+ if ((0, types_1$a.isAsyncIterable)(iterable)) {
1767
+ return uniqByAsyncIterable(iterable);
1768
+ }
1769
+ else {
1770
+ return uniqByIterable(iterable);
1771
+ }
1772
+ async function* uniqByAsyncIterable(iterable) {
1773
+ const bucket = new Set();
1774
+ let index = 0;
1775
+ for await (const element of iterable) {
1776
+ const result = await fn(element, index);
1777
+ if (!bucket.has(result)) {
1778
+ yield element;
1779
+ bucket.add(result);
1780
+ }
1781
+ index++;
1782
+ }
1783
+ }
1784
+ async function* uniqByIterable(iterable) {
1785
+ const bucket = new Set();
1786
+ let index = 0;
1787
+ for (const element of iterable) {
1788
+ const result = await fn(element, index);
1789
+ if (!bucket.has(result)) {
1790
+ yield element;
1791
+ bucket.add(result);
1792
+ }
1793
+ index++;
1794
+ }
1795
+ }
1796
+ }
1797
+ uniqByAsync$1.uniqByAsync = uniqByAsync;
1798
+
1799
+ var uniqBy$1 = {};
1800
+
1801
+ uniqBy$1.uniqBy = void 0;
1802
+ function* uniqBy(iterable, fn) {
1803
+ const bucket = new Set();
1804
+ let index = 0;
1805
+ for (const element of iterable) {
1806
+ const result = fn(element, index);
1807
+ if (!bucket.has(result)) {
1808
+ yield element;
1809
+ bucket.add(result);
1810
+ }
1811
+ index++;
1812
+ }
1813
+ }
1814
+ uniqBy$1.uniqBy = uniqBy;
1815
+
1816
+ var uniq$1 = {};
1817
+
1818
+ uniq$1.uniq = void 0;
1819
+ function* uniq(iterable) {
1820
+ const bucket = new Set();
1821
+ for (const element of iterable) {
1822
+ if (!bucket.has(element)) {
1823
+ yield element;
1824
+ bucket.add(element);
1825
+ }
1826
+ }
1827
+ }
1828
+ uniq$1.uniq = uniq;
1829
+
1830
+ var zipAsync$1 = {};
1831
+
1832
+ zipAsync$1.zipAsync = void 0;
1833
+ const types_1$9 = es2018$4;
1834
+ var Kind;
1835
+ (function (Kind) {
1836
+ Kind[Kind["Sync"] = 0] = "Sync";
1837
+ Kind[Kind["Async"] = 1] = "Async";
1838
+ })(Kind || (Kind = {}));
1839
+ function zipAsync(iterable, ...otherIterables) {
1840
+ return zipWithSize$1(iterable, ...otherIterables);
1841
+ }
1842
+ zipAsync$1.zipAsync = zipAsync;
1843
+ async function* zipWithSize$1(...iterables) {
1844
+ var _a, _b, _c, _d;
1845
+ const length = iterables.length;
1846
+ const iterators = iterables.map(iterable => {
1847
+ if ((0, types_1$9.isAsyncIterable)(iterable)) {
1848
+ return [Kind.Async, iterable[Symbol.asyncIterator]()];
1849
+ }
1850
+ else {
1851
+ return [Kind.Sync, iterable[Symbol.iterator]()];
1852
+ }
1853
+ });
1854
+ const dones = iterators.map(() => false);
1855
+ try {
1856
+ while (true) {
1857
+ const result = new Array(length);
1858
+ for (let i = 0; i < length; i++) {
1859
+ const [kind, iterator] = iterators[i];
1860
+ let temp;
1861
+ if (kind === Kind.Async) {
1862
+ temp = await iterator.next();
1863
+ }
1864
+ else {
1865
+ temp = iterator.next();
1866
+ }
1867
+ if (temp.done) {
1868
+ dones[i] = true;
1869
+ return;
1870
+ }
1871
+ result[i] = temp.value;
1872
+ }
1873
+ yield result;
1874
+ }
1875
+ }
1876
+ finally {
1877
+ const undoneIterators = iterators.filter((_, i) => !dones[i]);
1878
+ for (const [kind, iterator] of undoneIterators) {
1879
+ if (kind === Kind.Async) {
1880
+ await ((_b = (_a = iterator).return) === null || _b === void 0 ? void 0 : _b.call(_a));
1881
+ }
1882
+ else {
1883
+ (_d = (_c = iterator).return) === null || _d === void 0 ? void 0 : _d.call(_c);
1884
+ }
1885
+ }
1886
+ }
1887
+ }
1888
+
1889
+ var zip$1 = {};
1890
+
1891
+ zip$1.zip = void 0;
1892
+ function zip(iterable, ...otherIterables) {
1893
+ return zipWithSize(iterable, ...otherIterables);
1894
+ }
1895
+ zip$1.zip = zip;
1896
+ function* zipWithSize(...iterables) {
1897
+ const length = iterables.length;
1898
+ const iterators = iterables.map(iterable => iterable[Symbol.iterator]());
1899
+ const dones = iterators.map(() => false);
1900
+ try {
1901
+ while (true) {
1902
+ const result = new Array(length);
1903
+ for (let i = 0; i < length; i++) {
1904
+ const { value, done } = iterators[i].next();
1905
+ if (done) {
1906
+ dones[i] = true;
1907
+ return;
1908
+ }
1909
+ result[i] = value;
1910
+ }
1911
+ yield result;
1912
+ }
1913
+ }
1914
+ finally {
1915
+ const undoneIterators = iterators.filter((_, i) => !dones[i]);
1916
+ undoneIterators.forEach(x => { var _a; return (_a = x.return) === null || _a === void 0 ? void 0 : _a.call(x); });
1917
+ }
1918
+ }
1919
+
1920
+ (function (exports) {
1921
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
1922
+ if (k2 === undefined) k2 = k;
1923
+ var desc = Object.getOwnPropertyDescriptor(m, k);
1924
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1925
+ desc = { enumerable: true, get: function() { return m[k]; } };
1926
+ }
1927
+ Object.defineProperty(o, k2, desc);
1928
+ }) : (function(o, m, k, k2) {
1929
+ if (k2 === undefined) k2 = k;
1930
+ o[k2] = m[k];
1931
+ }));
1932
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
1933
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1934
+ };__exportStar(chunkAsync$1, exports);
1935
+ __exportStar(chunkByAsync$1, exports);
1936
+ __exportStar(chunkBy$1, exports);
1937
+ __exportStar(chunk$1, exports);
1938
+ __exportStar(concatAsync$1, exports);
1939
+ __exportStar(concat$1, exports);
1940
+ __exportStar(dropAsync$1, exports);
1941
+ __exportStar(dropRightAsync$1, exports);
1942
+ __exportStar(dropRight$1, exports);
1943
+ __exportStar(dropUntilAsync$1, exports);
1944
+ __exportStar(dropUntil$1, exports);
1945
+ __exportStar(drop$1, exports);
1946
+ __exportStar(filterAsync$1, exports);
1947
+ __exportStar(filter$1, exports);
1948
+ __exportStar(flattenAsync$1, exports);
1949
+ __exportStar(flattenByAsync$1, exports);
1950
+ __exportStar(flattenBy$1, exports);
1951
+ __exportStar(flattenDeepAsync$1, exports);
1952
+ __exportStar(flattenDeep$1, exports);
1953
+ __exportStar(flatten$1, exports);
1954
+ __exportStar(mapAsync$1, exports);
1955
+ __exportStar(map$1, exports);
1956
+ __exportStar(repeatAsync$1, exports);
1957
+ __exportStar(repeat$1, exports);
1958
+ __exportStar(sliceAsync$1, exports);
1959
+ __exportStar(slice$1, exports);
1960
+ __exportStar(splitAsync$1, exports);
1961
+ __exportStar(splitByAsync$1, exports);
1962
+ __exportStar(splitBy$1, exports);
1963
+ __exportStar(split$1, exports);
1964
+ __exportStar(takeAsync$1, exports);
1965
+ __exportStar(takeRightAsync$1, exports);
1966
+ __exportStar(takeRight$1, exports);
1967
+ __exportStar(takeUntilAsync$1, exports);
1968
+ __exportStar(takeUntil$1, exports);
1969
+ __exportStar(take$1, exports);
1970
+ __exportStar(tapAsync$1, exports);
1971
+ __exportStar(tap$1, exports);
1972
+ __exportStar(toAsyncIterable$1, exports);
1973
+ __exportStar(transformAsync$1, exports);
1974
+ __exportStar(transform$1, exports);
1975
+ __exportStar(uniqAsync$1, exports);
1976
+ __exportStar(uniqByAsync$1, exports);
1977
+ __exportStar(uniqBy$1, exports);
1978
+ __exportStar(uniq$1, exports);
1979
+ __exportStar(zipAsync$1, exports);
1980
+ __exportStar(zip$1, exports);
1981
+
1982
+ }(middleware));
1983
+
1984
+ var output = {};
1985
+
1986
+ var consume$1 = {};
1987
+
1988
+ consume$1.consume = void 0;
1989
+ function consume(iterable, consumer) {
1990
+ return consumer(iterable);
1991
+ }
1992
+ consume$1.consume = consume;
1993
+
1994
+ var eachAsync$1 = {};
1995
+
1996
+ eachAsync$1.eachAsync = void 0;
1997
+ const types_1$8 = es2018$4;
1998
+ function eachAsync(iterable, fn) {
1999
+ if ((0, types_1$8.isAsyncIterable)(iterable)) {
2000
+ return eachAsyncIterable(iterable);
2001
+ }
2002
+ else {
2003
+ return eachIterable(iterable);
2004
+ }
2005
+ async function eachAsyncIterable(iterable) {
2006
+ let index = 0;
2007
+ for await (const element of iterable) {
2008
+ await fn(element, index);
2009
+ index++;
2010
+ }
2011
+ }
2012
+ async function eachIterable(iterable) {
2013
+ let index = 0;
2014
+ for (const element of iterable) {
2015
+ await fn(element, index);
2016
+ index++;
2017
+ }
2018
+ }
2019
+ }
2020
+ eachAsync$1.eachAsync = eachAsync;
2021
+
2022
+ var each$1 = {};
2023
+
2024
+ each$1.each = void 0;
2025
+ function each(iterable, fn) {
2026
+ let index = 0;
2027
+ for (const element of iterable) {
2028
+ fn(element, index);
2029
+ index++;
2030
+ }
2031
+ }
2032
+ each$1.each = each;
2033
+
2034
+ var everyAsync$1 = {};
2035
+
2036
+ everyAsync$1.everyAsync = void 0;
2037
+ const types_1$7 = es2018$4;
2038
+ function everyAsync(iterable, predicate) {
2039
+ if ((0, types_1$7.isAsyncIterable)(iterable)) {
2040
+ return everyAsyncIterable(iterable);
2041
+ }
2042
+ else {
2043
+ return everyIterable(iterable);
2044
+ }
2045
+ async function everyIterable(iterable) {
2046
+ let index = 0;
2047
+ for (const element of iterable) {
2048
+ if (!await predicate(element, index))
2049
+ return false;
2050
+ index++;
2051
+ }
2052
+ return true;
2053
+ }
2054
+ async function everyAsyncIterable(iterable) {
2055
+ let index = 0;
2056
+ for await (const element of iterable) {
2057
+ if (!await predicate(element, index))
2058
+ return false;
2059
+ index++;
2060
+ }
2061
+ return true;
2062
+ }
2063
+ }
2064
+ everyAsync$1.everyAsync = everyAsync;
2065
+
2066
+ var every$1 = {};
2067
+
2068
+ every$1.every = void 0;
2069
+ function every(iterable, predicate) {
2070
+ let index = 0;
2071
+ for (const element of iterable) {
2072
+ if (!predicate(element, index))
2073
+ return false;
2074
+ index++;
2075
+ }
2076
+ return true;
2077
+ }
2078
+ every$1.every = every;
2079
+
2080
+ var findAsync$1 = {};
2081
+
2082
+ findAsync$1.findAsync = void 0;
2083
+ const types_1$6 = es2018$4;
2084
+ function findAsync(iterable, predicate) {
2085
+ if ((0, types_1$6.isAsyncIterable)(iterable)) {
2086
+ return findAsyncIterable(iterable);
2087
+ }
2088
+ else {
2089
+ return findIterable(iterable);
2090
+ }
2091
+ async function findIterable(iterable) {
2092
+ let index = 0;
2093
+ for (const element of iterable) {
2094
+ if (await predicate(element, index))
2095
+ return element;
2096
+ index++;
2097
+ }
2098
+ return undefined;
2099
+ }
2100
+ async function findAsyncIterable(iterable) {
2101
+ let index = 0;
2102
+ for await (const element of iterable) {
2103
+ if (await predicate(element, index))
2104
+ return element;
2105
+ index++;
2106
+ }
2107
+ return undefined;
2108
+ }
2109
+ }
2110
+ findAsync$1.findAsync = findAsync;
2111
+
2112
+ var find$1 = {};
2113
+
2114
+ find$1.find = void 0;
2115
+ function find(iterable, predicate) {
2116
+ let index = 0;
2117
+ for (const element of iterable) {
2118
+ if (predicate(element, index))
2119
+ return element;
2120
+ index++;
2121
+ }
2122
+ return undefined;
2123
+ }
2124
+ find$1.find = find;
2125
+
2126
+ var firstAsync$1 = {};
2127
+
2128
+ firstAsync$1.firstAsync = void 0;
2129
+ async function firstAsync(iterable) {
2130
+ for await (const element of iterable) {
2131
+ return element;
2132
+ }
2133
+ return undefined;
2134
+ }
2135
+ firstAsync$1.firstAsync = firstAsync;
2136
+
2137
+ var first$1 = {};
2138
+
2139
+ first$1.first = void 0;
2140
+ function first(iterable) {
2141
+ for (const element of iterable) {
2142
+ return element;
2143
+ }
2144
+ return undefined;
2145
+ }
2146
+ first$1.first = first;
2147
+
2148
+ var includesAsync$1 = {};
2149
+
2150
+ includesAsync$1.includesAsync = void 0;
2151
+ async function includesAsync(iterable, value) {
2152
+ for await (const element of iterable) {
2153
+ if (element === value)
2154
+ return true;
2155
+ }
2156
+ return false;
2157
+ }
2158
+ includesAsync$1.includesAsync = includesAsync;
2159
+
2160
+ var includes$1 = {};
2161
+
2162
+ includes$1.includes = void 0;
2163
+ function includes(iterable, value) {
2164
+ for (const element of iterable) {
2165
+ if (element === value)
2166
+ return true;
2167
+ }
2168
+ return false;
2169
+ }
2170
+ includes$1.includes = includes;
2171
+
2172
+ var matchAsync$1 = {};
2173
+
2174
+ matchAsync$1.matchAsync = void 0;
2175
+ async function matchAsync(iterable, sequence) {
2176
+ const sequenceLength = sequence.length;
2177
+ let matchCount = 0;
2178
+ for await (const element of iterable) {
2179
+ if (element === sequence[matchCount])
2180
+ matchCount++;
2181
+ if (matchCount === sequenceLength)
2182
+ return true;
2183
+ }
2184
+ return false;
2185
+ }
2186
+ matchAsync$1.matchAsync = matchAsync;
2187
+
2188
+ var match$1 = {};
2189
+
2190
+ match$1.match = void 0;
2191
+ function match(iterable, sequence) {
2192
+ const sequenceLength = sequence.length;
2193
+ let matchCount = 0;
2194
+ for (const element of iterable) {
2195
+ if (element === sequence[matchCount])
2196
+ matchCount++;
2197
+ if (matchCount === sequenceLength)
2198
+ return true;
2199
+ }
2200
+ return false;
2201
+ }
2202
+ match$1.match = match;
2203
+
2204
+ var reduceAsync$1 = {};
2205
+
2206
+ reduceAsync$1.reduceAsync = void 0;
2207
+ const types_1$5 = es2018$4;
2208
+ function reduceAsync(iterable, fn, initialValue) {
2209
+ if ((0, types_1$5.isUndefined)(initialValue)) {
2210
+ return reduceAsyncWithoutInitialValue(iterable, fn);
2211
+ }
2212
+ else {
2213
+ return reduceAsyncWithInitialValue(iterable, fn, initialValue);
2214
+ }
2215
+ }
2216
+ reduceAsync$1.reduceAsync = reduceAsync;
2217
+ function reduceAsyncWithInitialValue(iterable, fn, initialValue) {
2218
+ if ((0, types_1$5.isAsyncIterable)(iterable)) {
2219
+ return reduceAsyncIterable(iterable);
2220
+ }
2221
+ else {
2222
+ return reduceIterable(iterable);
2223
+ }
2224
+ async function reduceIterable(iterable) {
2225
+ let result = initialValue, index = 0;
2226
+ for (const currentValue of iterable) {
2227
+ result = await fn(result, currentValue, index++);
2228
+ }
2229
+ return result;
2230
+ }
2231
+ async function reduceAsyncIterable(iterable) {
2232
+ let result = initialValue, index = 0;
2233
+ for await (const currentValue of iterable) {
2234
+ result = await fn(result, currentValue, index++);
2235
+ }
2236
+ return result;
2237
+ }
2238
+ }
2239
+ function reduceAsyncWithoutInitialValue(iterable, fn) {
2240
+ if ((0, types_1$5.isAsyncIterable)(iterable)) {
2241
+ return reduceAsyncIterable(iterable);
2242
+ }
2243
+ else {
2244
+ return reduceIterable(iterable);
2245
+ }
2246
+ async function reduceAsyncIterable(iterable) {
2247
+ var _a;
2248
+ const iterator = iterable[Symbol.asyncIterator]();
2249
+ let done;
2250
+ try {
2251
+ let result = await readInitialValue(iterator);
2252
+ let index = 1;
2253
+ let value;
2254
+ while ({ value, done } = await iterator.next(), !done) {
2255
+ result = await fn(result, value, index++);
2256
+ }
2257
+ return result;
2258
+ }
2259
+ finally {
2260
+ if (!done)
2261
+ await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
2262
+ }
2263
+ async function readInitialValue(iterator) {
2264
+ const result = await iterator.next();
2265
+ if (result.done) {
2266
+ done = true;
2267
+ throw new Error('Reduce of empty iterable with no initial value');
2268
+ }
2269
+ return result.value;
2270
+ }
2271
+ }
2272
+ async function reduceIterable(iterable) {
2273
+ var _a;
2274
+ const iterator = iterable[Symbol.iterator]();
2275
+ let done;
2276
+ try {
2277
+ let result = readInitialValue(iterator);
2278
+ let index = 1;
2279
+ let value;
2280
+ while ({ value, done } = iterator.next(), !done) {
2281
+ result = await fn(result, value, index++);
2282
+ }
2283
+ return result;
2284
+ }
2285
+ finally {
2286
+ if (!done)
2287
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
2288
+ }
2289
+ function readInitialValue(iterator) {
2290
+ const result = iterator.next();
2291
+ if (result.done) {
2292
+ done = true;
2293
+ throw new Error('Reduce of empty iterable with no initial value');
2294
+ }
2295
+ return result.value;
2296
+ }
2297
+ }
2298
+ }
2299
+
2300
+ var reduce$1 = {};
2301
+
2302
+ reduce$1.reduce = void 0;
2303
+ const types_1$4 = es2018$4;
2304
+ function reduce(iterable, fn, initialValue) {
2305
+ if ((0, types_1$4.isUndefined)(initialValue)) {
2306
+ return reduceWithoutInitialValue(iterable, fn);
2307
+ }
2308
+ else {
2309
+ return reduceWithInitialValue(iterable, fn, initialValue);
2310
+ }
2311
+ }
2312
+ reduce$1.reduce = reduce;
2313
+ function reduceWithInitialValue(iterable, fn, initialValue) {
2314
+ let result = initialValue, index = 0;
2315
+ for (const currentValue of iterable) {
2316
+ result = fn(result, currentValue, index++);
2317
+ }
2318
+ return result;
2319
+ }
2320
+ function reduceWithoutInitialValue(iterable, fn) {
2321
+ var _a;
2322
+ const iterator = iterable[Symbol.iterator]();
2323
+ let done;
2324
+ try {
2325
+ let result = readInitialValue(iterator);
2326
+ let index = 1;
2327
+ let value;
2328
+ while ({ value, done } = iterator.next(), !done) {
2329
+ result = fn(result, value, index++);
2330
+ }
2331
+ return result;
2332
+ }
2333
+ finally {
2334
+ if (!done)
2335
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
2336
+ }
2337
+ function readInitialValue(iterator) {
2338
+ const result = iterator.next();
2339
+ if (result.done) {
2340
+ done = true;
2341
+ throw new Error('Reduce of empty iterable with no initial value');
2342
+ }
2343
+ return result.value;
2344
+ }
2345
+ }
2346
+
2347
+ var someAsync$1 = {};
2348
+
2349
+ someAsync$1.someAsync = void 0;
2350
+ const types_1$3 = es2018$4;
2351
+ function someAsync(iterable, predicate) {
2352
+ if ((0, types_1$3.isAsyncIterable)(iterable)) {
2353
+ return someAsyncIterable(iterable);
2354
+ }
2355
+ else {
2356
+ return someIterable(iterable);
2357
+ }
2358
+ async function someIterable(iterable) {
2359
+ let index = 0;
2360
+ for (const element of iterable) {
2361
+ if (await predicate(element, index))
2362
+ return true;
2363
+ index++;
2364
+ }
2365
+ return false;
2366
+ }
2367
+ async function someAsyncIterable(iterable) {
2368
+ let index = 0;
2369
+ for await (const element of iterable) {
2370
+ if (await predicate(element, index))
2371
+ return true;
2372
+ index++;
2373
+ }
2374
+ return false;
2375
+ }
2376
+ }
2377
+ someAsync$1.someAsync = someAsync;
2378
+
2379
+ var some$1 = {};
2380
+
2381
+ some$1.some = void 0;
2382
+ function some(iterable, predicate) {
2383
+ let index = 0;
2384
+ for (const element of iterable) {
2385
+ if (predicate(element, index))
2386
+ return true;
2387
+ index++;
2388
+ }
2389
+ return false;
2390
+ }
2391
+ some$1.some = some;
2392
+
2393
+ var lastAsync$1 = {};
2394
+
2395
+ lastAsync$1.lastAsync = void 0;
2396
+ async function lastAsync(iterable) {
2397
+ var _a;
2398
+ const iterator = iterable[Symbol.asyncIterator]();
2399
+ let done;
2400
+ try {
2401
+ let value;
2402
+ let result;
2403
+ while ({ value, done } = await iterator.next(), !done) {
2404
+ result = value;
2405
+ }
2406
+ return result;
2407
+ }
2408
+ finally {
2409
+ if (!done)
2410
+ await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
2411
+ }
2412
+ }
2413
+ lastAsync$1.lastAsync = lastAsync;
2414
+
2415
+ var last$1 = {};
2416
+
2417
+ last$1.last = void 0;
2418
+ function last(iterable) {
2419
+ var _a;
2420
+ const iterator = iterable[Symbol.iterator]();
2421
+ let done;
2422
+ try {
2423
+ let value;
2424
+ let result;
2425
+ while ({ value, done } = iterator.next(), !done) {
2426
+ result = value;
2427
+ }
2428
+ return result;
2429
+ }
2430
+ finally {
2431
+ if (!done)
2432
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
2433
+ }
2434
+ }
2435
+ last$1.last = last;
2436
+
2437
+ var toArrayAsync$1 = {};
2438
+
2439
+ toArrayAsync$1.toArrayAsync = void 0;
2440
+ const consume_1$3 = consume$1;
2441
+ function toArrayAsync(iterable) {
2442
+ return (0, consume_1$3.consume)(iterable, async (iterable) => {
2443
+ const result = [];
2444
+ for await (const element of iterable) {
2445
+ result.push(element);
2446
+ }
2447
+ return result;
2448
+ });
2449
+ }
2450
+ toArrayAsync$1.toArrayAsync = toArrayAsync;
2451
+
2452
+ var toArray$1 = {};
2453
+
2454
+ toArray$1.toArray = void 0;
2455
+ const consume_1$2 = consume$1;
2456
+ function toArray(iterable) {
2457
+ return (0, consume_1$2.consume)(iterable, iterable => Array.from(iterable));
2458
+ }
2459
+ toArray$1.toArray = toArray;
2460
+
2461
+ var toSetAsync$1 = {};
2462
+
2463
+ toSetAsync$1.toSetAsync = void 0;
2464
+ const consume_1$1 = consume$1;
2465
+ function toSetAsync(iterable) {
2466
+ return (0, consume_1$1.consume)(iterable, async (iterable) => {
2467
+ const result = new Set();
2468
+ for await (const element of iterable) {
2469
+ result.add(element);
2470
+ }
2471
+ return result;
2472
+ });
2473
+ }
2474
+ toSetAsync$1.toSetAsync = toSetAsync;
2475
+
2476
+ var toSet$1 = {};
2477
+
2478
+ toSet$1.toSet = void 0;
2479
+ const consume_1 = consume$1;
2480
+ function toSet(iterable) {
2481
+ return (0, consume_1.consume)(iterable, iterable => new Set(iterable));
2482
+ }
2483
+ toSet$1.toSet = toSet;
2484
+
2485
+ (function (exports) {
2486
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2487
+ if (k2 === undefined) k2 = k;
2488
+ var desc = Object.getOwnPropertyDescriptor(m, k);
2489
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
2490
+ desc = { enumerable: true, get: function() { return m[k]; } };
2491
+ }
2492
+ Object.defineProperty(o, k2, desc);
2493
+ }) : (function(o, m, k, k2) {
2494
+ if (k2 === undefined) k2 = k;
2495
+ o[k2] = m[k];
2496
+ }));
2497
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2498
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2499
+ };__exportStar(consume$1, exports);
2500
+ __exportStar(eachAsync$1, exports);
2501
+ __exportStar(each$1, exports);
2502
+ __exportStar(everyAsync$1, exports);
2503
+ __exportStar(every$1, exports);
2504
+ __exportStar(findAsync$1, exports);
2505
+ __exportStar(find$1, exports);
2506
+ __exportStar(firstAsync$1, exports);
2507
+ __exportStar(first$1, exports);
2508
+ __exportStar(includesAsync$1, exports);
2509
+ __exportStar(includes$1, exports);
2510
+ __exportStar(matchAsync$1, exports);
2511
+ __exportStar(match$1, exports);
2512
+ __exportStar(reduceAsync$1, exports);
2513
+ __exportStar(reduce$1, exports);
2514
+ __exportStar(someAsync$1, exports);
2515
+ __exportStar(some$1, exports);
2516
+ __exportStar(lastAsync$1, exports);
2517
+ __exportStar(last$1, exports);
2518
+ __exportStar(toArrayAsync$1, exports);
2519
+ __exportStar(toArray$1, exports);
2520
+ __exportStar(toSetAsync$1, exports);
2521
+ __exportStar(toSet$1, exports);
2522
+
2523
+ }(output));
2524
+
2525
+ (function (exports) {
2526
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2527
+ if (k2 === undefined) k2 = k;
2528
+ var desc = Object.getOwnPropertyDescriptor(m, k);
2529
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
2530
+ desc = { enumerable: true, get: function() { return m[k]; } };
2531
+ }
2532
+ Object.defineProperty(o, k2, desc);
2533
+ }) : (function(o, m, k, k2) {
2534
+ if (k2 === undefined) k2 = k;
2535
+ o[k2] = m[k];
2536
+ }));
2537
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2538
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2539
+ };__exportStar(middleware, exports);
2540
+ __exportStar(output, exports);
2541
+
2542
+ }(es2018$2));
2543
+
2544
+ var getErrorNames$1 = {};
2545
+
2546
+ var traverseErrorPrototypeChain$1 = {};
2547
+
2548
+ traverseErrorPrototypeChain$1.traverseErrorPrototypeChain = void 0;
2549
+ function* traverseErrorPrototypeChain(err) {
2550
+ let current = err;
2551
+ while ((current = Object.getPrototypeOf(current))) {
2552
+ yield current;
2553
+ if (current === Error.prototype)
2554
+ break;
2555
+ }
2556
+ }
2557
+ traverseErrorPrototypeChain$1.traverseErrorPrototypeChain = traverseErrorPrototypeChain;
2558
+
2559
+ getErrorNames$1.getErrorNames = void 0;
2560
+ const types_1$2 = es2018$4;
2561
+ const traverse_error_prototype_chain_1 = traverseErrorPrototypeChain$1;
2562
+ function* getErrorNames(err) {
2563
+ var _a;
2564
+ if ((0, types_1$2.isError)(err)) {
2565
+ for (const prototype of (0, traverse_error_prototype_chain_1.traverseErrorPrototypeChain)(err)) {
2566
+ if ((_a = prototype.constructor) === null || _a === void 0 ? void 0 : _a.name) {
2567
+ yield prototype.constructor.name;
2568
+ }
2569
+ }
2570
+ }
2571
+ else {
2572
+ yield err.name;
2573
+ yield* err.ancestors;
2574
+ }
2575
+ }
2576
+ getErrorNames$1.getErrorNames = getErrorNames;
2577
+
2578
+ var serializableError = {};
2579
+
2580
+ serializableError.isSerializableError = void 0;
2581
+ const types_1$1 = es2018$4;
2582
+ function isSerializableError(val) {
2583
+ return (0, types_1$1.isObject)(val)
2584
+ && (0, types_1$1.isString)(val.name)
2585
+ && (0, types_1$1.isString)(val.message)
2586
+ && ((0, types_1$1.isString)(val.stack) || (0, types_1$1.isNull)(val.stack))
2587
+ && ((0, types_1$1.isArray)(val.ancestors) && val.ancestors.every(types_1$1.isString));
2588
+ }
2589
+ serializableError.isSerializableError = isSerializableError;
2590
+
2591
+ customError.CustomError = void 0;
2592
+ const iterable_operator_1$1 = es2018$2;
2593
+ const get_error_names_1$1 = getErrorNames$1;
2594
+ const types_1 = es2018$4;
2595
+ const serializable_error_1 = serializableError;
2596
+ class CustomError extends Error {
2597
+ get name() {
2598
+ var _a, _b;
2599
+ return (_b = (_a = (0, iterable_operator_1$1.first)((0, get_error_names_1$1.getErrorNames)(this))) !== null && _a !== void 0 ? _a : CustomError.name) !== null && _b !== void 0 ? _b : 'CustomError';
2600
+ }
2601
+ static [Symbol.hasInstance](instance) {
2602
+ var _a;
2603
+ if ((0, types_1.isError)(instance) || (0, serializable_error_1.isSerializableError)(instance)) {
2604
+ const reversedClassNames = [
2605
+ (_a = this.prototype.constructor.name) !== null && _a !== void 0 ? _a : this.name,
2606
+ ...(0, get_error_names_1$1.getErrorNames)(this.prototype)
2607
+ ].reverse();
2608
+ const reversedInstanceNames = (0, iterable_operator_1$1.toArray)((0, get_error_names_1$1.getErrorNames)(instance)).reverse();
2609
+ return reversedClassNames.every((x, i) => x === reversedInstanceNames[i]);
2610
+ }
2611
+ else {
2612
+ return false;
2613
+ }
2614
+ }
2615
+ }
2616
+ customError.CustomError = CustomError;
2617
+
2618
+ var assertionError = {};
2619
+
2620
+ assertionError.AssertionError = void 0;
2621
+ const custom_error_1 = customError;
2622
+ class AssertionError extends custom_error_1.CustomError {
2623
+ }
2624
+ assertionError.AssertionError = AssertionError;
2625
+
2626
+ var normalize$1 = {};
2627
+
2628
+ normalize$1.normalize = void 0;
2629
+ const get_error_names_1 = getErrorNames$1;
2630
+ const iterable_operator_1 = es2018$2;
2631
+ function normalize(err) {
2632
+ var _a;
2633
+ const [name, ...ancestors] = (0, iterable_operator_1.toArray)((0, get_error_names_1.getErrorNames)(err));
2634
+ return {
2635
+ name,
2636
+ ancestors,
2637
+ message: err.message,
2638
+ stack: (_a = err.stack) !== null && _a !== void 0 ? _a : null
2639
+ };
2640
+ }
2641
+ normalize$1.normalize = normalize;
2642
+
2643
+ var hydrate$1 = {};
2644
+
2645
+ var es2018 = {};
2646
+
2647
+ var pass$1 = {};
2648
+
2649
+ pass$1.pass = void 0;
2650
+ function pass() { }
2651
+ pass$1.pass = pass;
2652
+
2653
+ (function (exports) {
2654
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2655
+ if (k2 === undefined) k2 = k;
2656
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
2657
+ }) : (function(o, m, k, k2) {
2658
+ if (k2 === undefined) k2 = k;
2659
+ o[k2] = m[k];
2660
+ }));
2661
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2662
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2663
+ };__exportStar(pass$1, exports);
2664
+
2665
+ }(es2018));
2666
+
2667
+ hydrate$1.hydrate = void 0;
2668
+ const pass_1 = es2018;
2669
+ function hydrate(err) {
2670
+ var _a;
2671
+ const errorNames = [err.name, ...err.ancestors]
2672
+ .slice(0, -1)
2673
+ .reverse();
2674
+ let errorConstructor = Error;
2675
+ for (const name of errorNames) {
2676
+ errorConstructor = createChildErrorConstructor(errorConstructor, name);
2677
+ }
2678
+ const result = new errorConstructor();
2679
+ result.name = err.name;
2680
+ result.message = err.message;
2681
+ result.stack = (_a = err.stack) !== null && _a !== void 0 ? _a : undefined;
2682
+ return result;
2683
+ }
2684
+ hydrate$1.hydrate = hydrate;
2685
+ function createChildErrorConstructor(parentErrorConstructor, name) {
2686
+ const constructor = function () { (0, pass_1.pass)(); };
2687
+ constructor.prototype = Object.create(parentErrorConstructor.prototype);
2688
+ constructor.prototype.constructor = constructor;
2689
+ Object.defineProperty(constructor, 'name', { value: name });
2690
+ return constructor;
2691
+ }
2692
+
2693
+ var assert$1 = {};
2694
+
2695
+ assert$1.assert = void 0;
2696
+ const assertion_error_1 = assertionError;
2697
+ function assert(condition, message) {
2698
+ if (!condition)
2699
+ throw new assertion_error_1.AssertionError(message);
2700
+ }
2701
+ assert$1.assert = assert;
2702
+
2703
+ (function (exports) {
2704
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2705
+ if (k2 === undefined) k2 = k;
2706
+ var desc = Object.getOwnPropertyDescriptor(m, k);
2707
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
2708
+ desc = { enumerable: true, get: function() { return m[k]; } };
2709
+ }
2710
+ Object.defineProperty(o, k2, desc);
2711
+ }) : (function(o, m, k, k2) {
2712
+ if (k2 === undefined) k2 = k;
2713
+ o[k2] = m[k];
2714
+ }));
2715
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2716
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2717
+ };__exportStar(customError, exports);
2718
+ __exportStar(assertionError, exports);
2719
+ __exportStar(serializableError, exports);
2720
+ __exportStar(normalize$1, exports);
2721
+ __exportStar(hydrate$1, exports);
2722
+ __exportStar(assert$1, exports);
2723
+ __exportStar(getErrorNames$1, exports);
2724
+ __exportStar(traverseErrorPrototypeChain$1, exports);
2725
+
2726
+ }(es2018$3));
730
2727
 
731
2728
  function csv(payload) {
732
- es2018.assert(payload.length > 0, 'payload must be a non-empty array');
2729
+ es2018$3.assert(payload.length > 0, 'payload must be a non-empty array');
733
2730
  return (options) => {
734
- const headers = new es2018$2.Headers(options.headers);
2731
+ const headers = new es2018$5.Headers(options.headers);
735
2732
  headers.set('Content-Type', 'text/csv');
736
2733
  return {
737
2734
  ...options,
@@ -756,7 +2753,7 @@ function signal(signal) {
756
2753
 
757
2754
  function header(name, value) {
758
2755
  return (options) => {
759
- const headers = new es2018$2.Headers(options.headers);
2756
+ const headers = new es2018$5.Headers(options.headers);
760
2757
  headers.set(name, value);
761
2758
  return {
762
2759
  ...options,
@@ -767,7 +2764,7 @@ function header(name, value) {
767
2764
 
768
2765
  function appendHeader(name, value) {
769
2766
  return (options) => {
770
- const headers = new es2018$2.Headers(options.headers);
2767
+ const headers = new es2018$5.Headers(options.headers);
771
2768
  headers.append(name, value);
772
2769
  return {
773
2770
  ...options,
@@ -778,7 +2775,7 @@ function appendHeader(name, value) {
778
2775
 
779
2776
  function headers(headers) {
780
2777
  return (options) => {
781
- const newHeaders = new es2018$2.Headers(options.headers);
2778
+ const newHeaders = new es2018$5.Headers(options.headers);
782
2779
  for (const [name, value] of Object.entries(headers)) {
783
2780
  newHeaders.set(name, value);
784
2781
  }
@@ -880,10 +2877,10 @@ function appendSearchParam(name, value) {
880
2877
 
881
2878
  function formDataField(name, value) {
882
2879
  return (options) => {
883
- const formData = options.payload instanceof es2018$2.FormData
2880
+ const formData = options.payload instanceof es2018$5.FormData
884
2881
  ? cloneFormData(options.payload)
885
- : new es2018$2.FormData();
886
- if (es2018$1.isArray(value)) {
2882
+ : new es2018$5.FormData();
2883
+ if (es2018$4.isArray(value)) {
887
2884
  value.forEach(x => formData.append(name, x));
888
2885
  }
889
2886
  else {
@@ -896,7 +2893,7 @@ function formDataField(name, value) {
896
2893
  };
897
2894
  }
898
2895
  function cloneFormData(formData) {
899
- const result = new es2018$2.FormData();
2896
+ const result = new es2018$5.FormData();
900
2897
  for (const [name, value] of formData.entries()) {
901
2898
  result.append(name, value);
902
2899
  }