@blackglory/structures 0.2.7 → 0.2.8
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.
- package/CHANGELOG.md +8 -0
- package/README.md +41 -0
- package/dist/es2015/index.min.mjs +15 -1
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +1392 -311
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +1394 -310
- package/dist/es2015/index.umd.js.map +1 -1
- package/dist/es2015/index.umd.min.js +15 -1
- package/dist/es2015/index.umd.min.js.map +1 -1
- package/dist/es2018/index.min.mjs +15 -1
- package/dist/es2018/index.min.mjs.map +1 -1
- package/dist/es2018/index.mjs +1392 -311
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +1394 -310
- package/dist/es2018/index.umd.js.map +1 -1
- package/dist/es2018/index.umd.min.js +15 -1
- package/dist/es2018/index.umd.min.js.map +1 -1
- package/lib/es2015/finite-state-machine.d.ts +13 -0
- package/lib/es2015/finite-state-machine.js +46 -0
- package/lib/es2015/finite-state-machine.js.map +1 -0
- package/lib/es2015/index.d.ts +2 -0
- package/lib/es2015/index.js +2 -0
- package/lib/es2015/index.js.map +1 -1
- package/lib/es2015/observable-finite-state-machine.d.ts +13 -0
- package/lib/es2015/observable-finite-state-machine.js +28 -0
- package/lib/es2015/observable-finite-state-machine.js.map +1 -0
- package/lib/es2018/finite-state-machine.d.ts +13 -0
- package/lib/es2018/finite-state-machine.js +46 -0
- package/lib/es2018/finite-state-machine.js.map +1 -0
- package/lib/es2018/index.d.ts +2 -0
- package/lib/es2018/index.js +2 -0
- package/lib/es2018/index.js.map +1 -1
- package/lib/es2018/observable-finite-state-machine.d.ts +13 -0
- package/lib/es2018/observable-finite-state-machine.js +28 -0
- package/lib/es2018/observable-finite-state-machine.js.map +1 -0
- package/package.json +4 -2
package/dist/es2018/index.mjs
CHANGED
|
@@ -178,7 +178,7 @@ class Queue {
|
|
|
178
178
|
|
|
179
179
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
180
180
|
|
|
181
|
-
var es2018$
|
|
181
|
+
var es2018$6 = {};
|
|
182
182
|
|
|
183
183
|
var customError = {};
|
|
184
184
|
|
|
@@ -256,15 +256,15 @@ __exportStar(normalize$1, exports);
|
|
|
256
256
|
__exportStar(refute$1, exports);
|
|
257
257
|
__exportStar(assert$1, exports);
|
|
258
258
|
|
|
259
|
-
}(es2018$
|
|
259
|
+
}(es2018$6));
|
|
260
260
|
|
|
261
|
-
var es2018$
|
|
261
|
+
var es2018$5 = {};
|
|
262
262
|
|
|
263
263
|
var middleware = {};
|
|
264
264
|
|
|
265
265
|
var chunkAsync$1 = {};
|
|
266
266
|
|
|
267
|
-
var es2018$
|
|
267
|
+
var es2018$4 = {};
|
|
268
268
|
|
|
269
269
|
var go$1 = {};
|
|
270
270
|
|
|
@@ -286,11 +286,11 @@ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m
|
|
|
286
286
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
287
287
|
};__exportStar(go$1, exports);
|
|
288
288
|
|
|
289
|
-
}(es2018$
|
|
289
|
+
}(es2018$4));
|
|
290
290
|
|
|
291
291
|
chunkAsync$1.chunkAsync = void 0;
|
|
292
|
-
const go_1$f = es2018$
|
|
293
|
-
const errors_1$f = es2018$
|
|
292
|
+
const go_1$f = es2018$4;
|
|
293
|
+
const errors_1$f = es2018$6;
|
|
294
294
|
function chunkAsync(iterable, size) {
|
|
295
295
|
(0, errors_1$f.assert)(Number.isInteger(size), 'The parameter size must be an integer');
|
|
296
296
|
(0, errors_1$f.assert)(size > 0, 'The parameter size must be greater than 0');
|
|
@@ -311,297 +311,297 @@ chunkAsync$1.chunkAsync = chunkAsync;
|
|
|
311
311
|
|
|
312
312
|
var chunkByAsync$1 = {};
|
|
313
313
|
|
|
314
|
-
var es2018$
|
|
314
|
+
var es2018$3 = {};
|
|
315
315
|
|
|
316
|
-
var array = {};
|
|
316
|
+
var array$1 = {};
|
|
317
317
|
|
|
318
|
-
array.isntEmptyArray = array.isEmptyArray = array.isntArray = array.isArray = void 0;
|
|
319
|
-
function isArray(val) {
|
|
318
|
+
array$1.isntEmptyArray = array$1.isEmptyArray = array$1.isntArray = array$1.isArray = void 0;
|
|
319
|
+
function isArray$1(val) {
|
|
320
320
|
return Array.isArray(val);
|
|
321
321
|
}
|
|
322
|
-
array.isArray = isArray;
|
|
323
|
-
function isntArray(val) {
|
|
324
|
-
return !isArray(val);
|
|
322
|
+
array$1.isArray = isArray$1;
|
|
323
|
+
function isntArray$1(val) {
|
|
324
|
+
return !isArray$1(val);
|
|
325
325
|
}
|
|
326
|
-
array.isntArray = isntArray;
|
|
327
|
-
function isEmptyArray(val) {
|
|
326
|
+
array$1.isntArray = isntArray$1;
|
|
327
|
+
function isEmptyArray$1(val) {
|
|
328
328
|
return val.length === 0;
|
|
329
329
|
}
|
|
330
|
-
array.isEmptyArray = isEmptyArray;
|
|
331
|
-
function isntEmptyArray(val) {
|
|
330
|
+
array$1.isEmptyArray = isEmptyArray$1;
|
|
331
|
+
function isntEmptyArray$1(val) {
|
|
332
332
|
return val.length !== 0;
|
|
333
333
|
}
|
|
334
|
-
array.isntEmptyArray = isntEmptyArray;
|
|
334
|
+
array$1.isntEmptyArray = isntEmptyArray$1;
|
|
335
335
|
|
|
336
|
-
var asyncIterable = {};
|
|
336
|
+
var asyncIterable$1 = {};
|
|
337
337
|
|
|
338
|
-
var _null = {};
|
|
338
|
+
var _null$1 = {};
|
|
339
339
|
|
|
340
|
-
_null.isntNull = _null.isNull = void 0;
|
|
341
|
-
function isNull(val) {
|
|
340
|
+
_null$1.isntNull = _null$1.isNull = void 0;
|
|
341
|
+
function isNull$1(val) {
|
|
342
342
|
return val === null;
|
|
343
343
|
}
|
|
344
|
-
_null.isNull = isNull;
|
|
345
|
-
function isntNull(val) {
|
|
346
|
-
return !isNull(val);
|
|
344
|
+
_null$1.isNull = isNull$1;
|
|
345
|
+
function isntNull$1(val) {
|
|
346
|
+
return !isNull$1(val);
|
|
347
347
|
}
|
|
348
|
-
_null.isntNull = isntNull;
|
|
348
|
+
_null$1.isntNull = isntNull$1;
|
|
349
349
|
|
|
350
|
-
var _undefined = {};
|
|
350
|
+
var _undefined$1 = {};
|
|
351
351
|
|
|
352
|
-
_undefined.isntUndefined = _undefined.isUndefined = void 0;
|
|
353
|
-
function isUndefined(val) {
|
|
352
|
+
_undefined$1.isntUndefined = _undefined$1.isUndefined = void 0;
|
|
353
|
+
function isUndefined$1(val) {
|
|
354
354
|
return val === undefined;
|
|
355
355
|
}
|
|
356
|
-
_undefined.isUndefined = isUndefined;
|
|
357
|
-
function isntUndefined(val) {
|
|
358
|
-
return !isUndefined(val);
|
|
356
|
+
_undefined$1.isUndefined = isUndefined$1;
|
|
357
|
+
function isntUndefined$1(val) {
|
|
358
|
+
return !isUndefined$1(val);
|
|
359
359
|
}
|
|
360
|
-
_undefined.isntUndefined = isntUndefined;
|
|
360
|
+
_undefined$1.isntUndefined = isntUndefined$1;
|
|
361
361
|
|
|
362
|
-
asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
|
|
363
|
-
const null_1$
|
|
364
|
-
const undefined_1$
|
|
365
|
-
function isAsyncIterable(val) {
|
|
366
|
-
return (0, null_1$
|
|
367
|
-
&& (0, undefined_1$
|
|
362
|
+
asyncIterable$1.isntAsyncIterable = asyncIterable$1.isAsyncIterable = void 0;
|
|
363
|
+
const null_1$3 = _null$1;
|
|
364
|
+
const undefined_1$5 = _undefined$1;
|
|
365
|
+
function isAsyncIterable$1(val) {
|
|
366
|
+
return (0, null_1$3.isntNull)(val)
|
|
367
|
+
&& (0, undefined_1$5.isntUndefined)(val)
|
|
368
368
|
&& typeof val[Symbol.asyncIterator] === 'function';
|
|
369
369
|
}
|
|
370
|
-
asyncIterable.isAsyncIterable = isAsyncIterable;
|
|
371
|
-
function isntAsyncIterable(val) {
|
|
372
|
-
return !isAsyncIterable(val);
|
|
370
|
+
asyncIterable$1.isAsyncIterable = isAsyncIterable$1;
|
|
371
|
+
function isntAsyncIterable$1(val) {
|
|
372
|
+
return !isAsyncIterable$1(val);
|
|
373
373
|
}
|
|
374
|
-
asyncIterable.isntAsyncIterable = isntAsyncIterable;
|
|
374
|
+
asyncIterable$1.isntAsyncIterable = isntAsyncIterable$1;
|
|
375
375
|
|
|
376
|
-
var bigint = {};
|
|
376
|
+
var bigint$1 = {};
|
|
377
377
|
|
|
378
|
-
bigint.isntBigInt = bigint.isBigInt = void 0;
|
|
379
|
-
function isBigInt(val) {
|
|
378
|
+
bigint$1.isntBigInt = bigint$1.isBigInt = void 0;
|
|
379
|
+
function isBigInt$1(val) {
|
|
380
380
|
return typeof val === 'bigint';
|
|
381
381
|
}
|
|
382
|
-
bigint.isBigInt = isBigInt;
|
|
383
|
-
function isntBigInt(val) {
|
|
384
|
-
return !isBigInt(val);
|
|
382
|
+
bigint$1.isBigInt = isBigInt$1;
|
|
383
|
+
function isntBigInt$1(val) {
|
|
384
|
+
return !isBigInt$1(val);
|
|
385
385
|
}
|
|
386
|
-
bigint.isntBigInt = isntBigInt;
|
|
386
|
+
bigint$1.isntBigInt = isntBigInt$1;
|
|
387
387
|
|
|
388
|
-
var boolean = {};
|
|
388
|
+
var boolean$1 = {};
|
|
389
389
|
|
|
390
|
-
boolean.isntBoolean = boolean.isBoolean = void 0;
|
|
391
|
-
function isBoolean(val) {
|
|
390
|
+
boolean$1.isntBoolean = boolean$1.isBoolean = void 0;
|
|
391
|
+
function isBoolean$1(val) {
|
|
392
392
|
return typeof val === 'boolean';
|
|
393
393
|
}
|
|
394
|
-
boolean.isBoolean = isBoolean;
|
|
395
|
-
function isntBoolean(val) {
|
|
396
|
-
return !isBoolean(val);
|
|
394
|
+
boolean$1.isBoolean = isBoolean$1;
|
|
395
|
+
function isntBoolean$1(val) {
|
|
396
|
+
return !isBoolean$1(val);
|
|
397
397
|
}
|
|
398
|
-
boolean.isntBoolean = isntBoolean;
|
|
398
|
+
boolean$1.isntBoolean = isntBoolean$1;
|
|
399
399
|
|
|
400
|
-
var char = {};
|
|
400
|
+
var char$1 = {};
|
|
401
401
|
|
|
402
|
-
var string = {};
|
|
402
|
+
var string$1 = {};
|
|
403
403
|
|
|
404
|
-
string.isntString = string.isString = void 0;
|
|
405
|
-
function isString(val) {
|
|
404
|
+
string$1.isntString = string$1.isString = void 0;
|
|
405
|
+
function isString$1(val) {
|
|
406
406
|
return typeof val === 'string';
|
|
407
407
|
}
|
|
408
|
-
string.isString = isString;
|
|
409
|
-
function isntString(val) {
|
|
410
|
-
return !isString(val);
|
|
408
|
+
string$1.isString = isString$1;
|
|
409
|
+
function isntString$1(val) {
|
|
410
|
+
return !isString$1(val);
|
|
411
411
|
}
|
|
412
|
-
string.isntString = isntString;
|
|
412
|
+
string$1.isntString = isntString$1;
|
|
413
413
|
|
|
414
|
-
char.isntChar = char.isChar = void 0;
|
|
415
|
-
const string_1$
|
|
416
|
-
function isChar(val) {
|
|
417
|
-
return (0, string_1$
|
|
414
|
+
char$1.isntChar = char$1.isChar = void 0;
|
|
415
|
+
const string_1$3 = string$1;
|
|
416
|
+
function isChar$1(val) {
|
|
417
|
+
return (0, string_1$3.isString)(val)
|
|
418
418
|
&& val.length === 1;
|
|
419
419
|
}
|
|
420
|
-
char.isChar = isChar;
|
|
421
|
-
function isntChar(val) {
|
|
422
|
-
return !isChar(val);
|
|
420
|
+
char$1.isChar = isChar$1;
|
|
421
|
+
function isntChar$1(val) {
|
|
422
|
+
return !isChar$1(val);
|
|
423
423
|
}
|
|
424
|
-
char.isntChar = isntChar;
|
|
424
|
+
char$1.isntChar = isntChar$1;
|
|
425
425
|
|
|
426
|
-
var date = {};
|
|
426
|
+
var date$1 = {};
|
|
427
427
|
|
|
428
|
-
date.isntDate = date.isDate = void 0;
|
|
429
|
-
function isDate(val) {
|
|
428
|
+
date$1.isntDate = date$1.isDate = void 0;
|
|
429
|
+
function isDate$1(val) {
|
|
430
430
|
return val instanceof Date;
|
|
431
431
|
}
|
|
432
|
-
date.isDate = isDate;
|
|
433
|
-
function isntDate(val) {
|
|
434
|
-
return !isDate(val);
|
|
432
|
+
date$1.isDate = isDate$1;
|
|
433
|
+
function isntDate$1(val) {
|
|
434
|
+
return !isDate$1(val);
|
|
435
435
|
}
|
|
436
|
-
date.isntDate = isntDate;
|
|
436
|
+
date$1.isntDate = isntDate$1;
|
|
437
437
|
|
|
438
|
-
var _enum = {};
|
|
438
|
+
var _enum$1 = {};
|
|
439
439
|
|
|
440
|
-
_enum.inEnum = void 0;
|
|
441
|
-
function inEnum(val, _enum) {
|
|
440
|
+
_enum$1.inEnum = void 0;
|
|
441
|
+
function inEnum$1(val, _enum) {
|
|
442
442
|
return Object.values(_enum).includes(val);
|
|
443
443
|
}
|
|
444
|
-
_enum.inEnum = inEnum;
|
|
444
|
+
_enum$1.inEnum = inEnum$1;
|
|
445
445
|
|
|
446
|
-
var error = {};
|
|
446
|
+
var error$1 = {};
|
|
447
447
|
|
|
448
|
-
error.isntError = error.isError = void 0;
|
|
449
|
-
function isError(val) {
|
|
448
|
+
error$1.isntError = error$1.isError = void 0;
|
|
449
|
+
function isError$1(val) {
|
|
450
450
|
return val instanceof Error;
|
|
451
451
|
}
|
|
452
|
-
error.isError = isError;
|
|
453
|
-
function isntError(val) {
|
|
454
|
-
return !isError(val);
|
|
452
|
+
error$1.isError = isError$1;
|
|
453
|
+
function isntError$1(val) {
|
|
454
|
+
return !isError$1(val);
|
|
455
455
|
}
|
|
456
|
-
error.isntError = isntError;
|
|
456
|
+
error$1.isntError = isntError$1;
|
|
457
457
|
|
|
458
|
-
var falsy = {};
|
|
458
|
+
var falsy$1 = {};
|
|
459
459
|
|
|
460
|
-
falsy.isntFalsy = falsy.isFalsy = void 0;
|
|
461
|
-
function isFalsy(val) {
|
|
460
|
+
falsy$1.isntFalsy = falsy$1.isFalsy = void 0;
|
|
461
|
+
function isFalsy$1(val) {
|
|
462
462
|
return !val;
|
|
463
463
|
}
|
|
464
|
-
falsy.isFalsy = isFalsy;
|
|
465
|
-
function isntFalsy(val) {
|
|
466
|
-
return !isFalsy(val);
|
|
464
|
+
falsy$1.isFalsy = isFalsy$1;
|
|
465
|
+
function isntFalsy$1(val) {
|
|
466
|
+
return !isFalsy$1(val);
|
|
467
467
|
}
|
|
468
|
-
falsy.isntFalsy = isntFalsy;
|
|
468
|
+
falsy$1.isntFalsy = isntFalsy$1;
|
|
469
469
|
|
|
470
|
-
var _function = {};
|
|
470
|
+
var _function$1 = {};
|
|
471
471
|
|
|
472
|
-
_function.isntFunction = _function.isFunction = void 0;
|
|
473
|
-
function isFunction(val) {
|
|
472
|
+
_function$1.isntFunction = _function$1.isFunction = void 0;
|
|
473
|
+
function isFunction$2(val) {
|
|
474
474
|
return typeof val === 'function';
|
|
475
475
|
}
|
|
476
|
-
_function.isFunction = isFunction;
|
|
477
|
-
function isntFunction(val) {
|
|
478
|
-
return !isFunction(val);
|
|
476
|
+
_function$1.isFunction = isFunction$2;
|
|
477
|
+
function isntFunction$1(val) {
|
|
478
|
+
return !isFunction$2(val);
|
|
479
479
|
}
|
|
480
|
-
_function.isntFunction = isntFunction;
|
|
480
|
+
_function$1.isntFunction = isntFunction$1;
|
|
481
481
|
|
|
482
|
-
var iterable = {};
|
|
482
|
+
var iterable$1 = {};
|
|
483
483
|
|
|
484
|
-
iterable.isntIterable = iterable.isIterable = void 0;
|
|
485
|
-
const null_1 = _null;
|
|
486
|
-
const undefined_1$
|
|
487
|
-
function isIterable(val) {
|
|
488
|
-
return (0, null_1.isntNull)(val)
|
|
489
|
-
&& (0, undefined_1$
|
|
484
|
+
iterable$1.isntIterable = iterable$1.isIterable = void 0;
|
|
485
|
+
const null_1$2 = _null$1;
|
|
486
|
+
const undefined_1$4 = _undefined$1;
|
|
487
|
+
function isIterable$1(val) {
|
|
488
|
+
return (0, null_1$2.isntNull)(val)
|
|
489
|
+
&& (0, undefined_1$4.isntUndefined)(val)
|
|
490
490
|
&& typeof val[Symbol.iterator] === 'function';
|
|
491
491
|
}
|
|
492
|
-
iterable.isIterable = isIterable;
|
|
493
|
-
function isntIterable(val) {
|
|
494
|
-
return !isIterable(val);
|
|
492
|
+
iterable$1.isIterable = isIterable$1;
|
|
493
|
+
function isntIterable$1(val) {
|
|
494
|
+
return !isIterable$1(val);
|
|
495
495
|
}
|
|
496
|
-
iterable.isntIterable = isntIterable;
|
|
496
|
+
iterable$1.isntIterable = isntIterable$1;
|
|
497
497
|
|
|
498
|
-
var jsonRpc = {};
|
|
498
|
+
var jsonRpc$1 = {};
|
|
499
499
|
|
|
500
|
-
var object = {};
|
|
500
|
+
var object$1 = {};
|
|
501
501
|
|
|
502
|
-
object.isntEmptyObject = object.isEmptyObject = object.isRecord = object.isntObject = object.isObject = void 0;
|
|
503
|
-
function isObject(val) {
|
|
502
|
+
object$1.isntEmptyObject = object$1.isEmptyObject = object$1.isRecord = object$1.isntObject = object$1.isObject = void 0;
|
|
503
|
+
function isObject$1(val) {
|
|
504
504
|
return val !== null && typeof val === 'object';
|
|
505
505
|
}
|
|
506
|
-
object.isObject = isObject;
|
|
507
|
-
function isntObject(val) {
|
|
508
|
-
return !isObject(val);
|
|
506
|
+
object$1.isObject = isObject$1;
|
|
507
|
+
function isntObject$1(val) {
|
|
508
|
+
return !isObject$1(val);
|
|
509
509
|
}
|
|
510
|
-
object.isntObject = isntObject;
|
|
511
|
-
function isRecord(val) {
|
|
512
|
-
return isObject(val);
|
|
510
|
+
object$1.isntObject = isntObject$1;
|
|
511
|
+
function isRecord$1(val) {
|
|
512
|
+
return isObject$1(val);
|
|
513
513
|
}
|
|
514
|
-
object.isRecord = isRecord;
|
|
515
|
-
function isEmptyObject(val) {
|
|
514
|
+
object$1.isRecord = isRecord$1;
|
|
515
|
+
function isEmptyObject$1(val) {
|
|
516
516
|
return Object.keys(val).length === 0;
|
|
517
517
|
}
|
|
518
|
-
object.isEmptyObject = isEmptyObject;
|
|
519
|
-
function isntEmptyObject(val) {
|
|
518
|
+
object$1.isEmptyObject = isEmptyObject$1;
|
|
519
|
+
function isntEmptyObject$1(val) {
|
|
520
520
|
return Object.keys(val).length !== 0;
|
|
521
521
|
}
|
|
522
|
-
object.isntEmptyObject = isntEmptyObject;
|
|
522
|
+
object$1.isntEmptyObject = isntEmptyObject$1;
|
|
523
523
|
|
|
524
|
-
var number = {};
|
|
524
|
+
var number$1 = {};
|
|
525
525
|
|
|
526
|
-
number.isntNumber = number.isNumber = void 0;
|
|
527
|
-
function isNumber(val) {
|
|
526
|
+
number$1.isntNumber = number$1.isNumber = void 0;
|
|
527
|
+
function isNumber$1(val) {
|
|
528
528
|
return typeof val === 'number';
|
|
529
529
|
}
|
|
530
|
-
number.isNumber = isNumber;
|
|
531
|
-
function isntNumber(val) {
|
|
532
|
-
return !isNumber(val);
|
|
533
|
-
}
|
|
534
|
-
number.isntNumber = isntNumber;
|
|
535
|
-
|
|
536
|
-
jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
|
|
537
|
-
const array_1 = array;
|
|
538
|
-
const object_1 = object;
|
|
539
|
-
const string_1 = string;
|
|
540
|
-
const number_1 = number;
|
|
541
|
-
const undefined_1 = _undefined;
|
|
542
|
-
function isJsonRpcId(val) {
|
|
543
|
-
return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
|
|
544
|
-
}
|
|
545
|
-
function isJsonRpcParams(val) {
|
|
546
|
-
return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
|
|
547
|
-
}
|
|
548
|
-
function isJsonRpcNotification(val) {
|
|
549
|
-
return (0, object_1.isRecord)(val)
|
|
550
|
-
&& (0, string_1.isString)(val.jsonrpc)
|
|
551
|
-
&& (0, string_1.isString)(val.method)
|
|
552
|
-
&& (0, undefined_1.isUndefined)(val.id)
|
|
553
|
-
&& isJsonRpcParams(val.params);
|
|
554
|
-
}
|
|
555
|
-
jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
|
|
556
|
-
function isntJsonRpcNotification(val) {
|
|
557
|
-
return !isJsonRpcNotification(val);
|
|
558
|
-
}
|
|
559
|
-
jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
|
|
560
|
-
function isJsonRpcRequest(val) {
|
|
561
|
-
return (0, object_1.isRecord)(val)
|
|
562
|
-
&& (0, string_1.isString)(val.jsonrpc)
|
|
563
|
-
&& (0, string_1.isString)(val.method)
|
|
564
|
-
&& isJsonRpcId(val.id)
|
|
565
|
-
&& isJsonRpcParams(val.params);
|
|
566
|
-
}
|
|
567
|
-
jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
|
|
568
|
-
function isntJsonRpcRequest(val) {
|
|
569
|
-
return !isJsonRpcRequest(val);
|
|
570
|
-
}
|
|
571
|
-
jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
|
|
572
|
-
function isJsonRpcSuccess(val) {
|
|
573
|
-
return (0, object_1.isRecord)(val)
|
|
574
|
-
&& (0, string_1.isString)(val.jsonrpc)
|
|
575
|
-
&& (0, string_1.isString)(val.id)
|
|
576
|
-
&& (0, undefined_1.isntUndefined)(val.result);
|
|
577
|
-
}
|
|
578
|
-
jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
|
|
579
|
-
function isntJsonRpcSuccess(val) {
|
|
580
|
-
return !isJsonRpcSuccess(val);
|
|
581
|
-
}
|
|
582
|
-
jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
|
|
583
|
-
function isJsonRpcError(val) {
|
|
584
|
-
return (0, object_1.isRecord)(val)
|
|
585
|
-
&& (0, string_1.isString)(val.jsonrpc)
|
|
586
|
-
&& isJsonRpcId(val.id)
|
|
587
|
-
&& isJsonRpcErrorObject(val.error);
|
|
588
|
-
}
|
|
589
|
-
jsonRpc.isJsonRpcError = isJsonRpcError;
|
|
590
|
-
function isntJsonRpcError(val) {
|
|
591
|
-
return !isJsonRpcError(val);
|
|
592
|
-
}
|
|
593
|
-
jsonRpc.isntJsonRpcError = isntJsonRpcError;
|
|
594
|
-
function isJsonRpcErrorObject(val) {
|
|
595
|
-
return (0, object_1.isRecord)(val)
|
|
596
|
-
&& (0, number_1.isNumber)(val.code)
|
|
597
|
-
&& (0, string_1.isString)(val.message)
|
|
598
|
-
&& ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
var json = {};
|
|
602
|
-
|
|
603
|
-
json.isntJson = json.isJson = void 0;
|
|
604
|
-
function isJson(val) {
|
|
530
|
+
number$1.isNumber = isNumber$1;
|
|
531
|
+
function isntNumber$1(val) {
|
|
532
|
+
return !isNumber$1(val);
|
|
533
|
+
}
|
|
534
|
+
number$1.isntNumber = isntNumber$1;
|
|
535
|
+
|
|
536
|
+
jsonRpc$1.isntJsonRpcError = jsonRpc$1.isJsonRpcError = jsonRpc$1.isntJsonRpcSuccess = jsonRpc$1.isJsonRpcSuccess = jsonRpc$1.isntJsonRpcRequest = jsonRpc$1.isJsonRpcRequest = jsonRpc$1.isntJsonRpcNotification = jsonRpc$1.isJsonRpcNotification = void 0;
|
|
537
|
+
const array_1$1 = array$1;
|
|
538
|
+
const object_1$1 = object$1;
|
|
539
|
+
const string_1$2 = string$1;
|
|
540
|
+
const number_1$1 = number$1;
|
|
541
|
+
const undefined_1$3 = _undefined$1;
|
|
542
|
+
function isJsonRpcId$1(val) {
|
|
543
|
+
return (0, string_1$2.isString)(val) || (0, number_1$1.isNumber)(val);
|
|
544
|
+
}
|
|
545
|
+
function isJsonRpcParams$1(val) {
|
|
546
|
+
return (0, array_1$1.isArray)(val) || (0, object_1$1.isObject)(val);
|
|
547
|
+
}
|
|
548
|
+
function isJsonRpcNotification$1(val) {
|
|
549
|
+
return (0, object_1$1.isRecord)(val)
|
|
550
|
+
&& (0, string_1$2.isString)(val.jsonrpc)
|
|
551
|
+
&& (0, string_1$2.isString)(val.method)
|
|
552
|
+
&& (0, undefined_1$3.isUndefined)(val.id)
|
|
553
|
+
&& isJsonRpcParams$1(val.params);
|
|
554
|
+
}
|
|
555
|
+
jsonRpc$1.isJsonRpcNotification = isJsonRpcNotification$1;
|
|
556
|
+
function isntJsonRpcNotification$1(val) {
|
|
557
|
+
return !isJsonRpcNotification$1(val);
|
|
558
|
+
}
|
|
559
|
+
jsonRpc$1.isntJsonRpcNotification = isntJsonRpcNotification$1;
|
|
560
|
+
function isJsonRpcRequest$1(val) {
|
|
561
|
+
return (0, object_1$1.isRecord)(val)
|
|
562
|
+
&& (0, string_1$2.isString)(val.jsonrpc)
|
|
563
|
+
&& (0, string_1$2.isString)(val.method)
|
|
564
|
+
&& isJsonRpcId$1(val.id)
|
|
565
|
+
&& isJsonRpcParams$1(val.params);
|
|
566
|
+
}
|
|
567
|
+
jsonRpc$1.isJsonRpcRequest = isJsonRpcRequest$1;
|
|
568
|
+
function isntJsonRpcRequest$1(val) {
|
|
569
|
+
return !isJsonRpcRequest$1(val);
|
|
570
|
+
}
|
|
571
|
+
jsonRpc$1.isntJsonRpcRequest = isntJsonRpcRequest$1;
|
|
572
|
+
function isJsonRpcSuccess$1(val) {
|
|
573
|
+
return (0, object_1$1.isRecord)(val)
|
|
574
|
+
&& (0, string_1$2.isString)(val.jsonrpc)
|
|
575
|
+
&& (0, string_1$2.isString)(val.id)
|
|
576
|
+
&& (0, undefined_1$3.isntUndefined)(val.result);
|
|
577
|
+
}
|
|
578
|
+
jsonRpc$1.isJsonRpcSuccess = isJsonRpcSuccess$1;
|
|
579
|
+
function isntJsonRpcSuccess$1(val) {
|
|
580
|
+
return !isJsonRpcSuccess$1(val);
|
|
581
|
+
}
|
|
582
|
+
jsonRpc$1.isntJsonRpcSuccess = isntJsonRpcSuccess$1;
|
|
583
|
+
function isJsonRpcError$1(val) {
|
|
584
|
+
return (0, object_1$1.isRecord)(val)
|
|
585
|
+
&& (0, string_1$2.isString)(val.jsonrpc)
|
|
586
|
+
&& isJsonRpcId$1(val.id)
|
|
587
|
+
&& isJsonRpcErrorObject$1(val.error);
|
|
588
|
+
}
|
|
589
|
+
jsonRpc$1.isJsonRpcError = isJsonRpcError$1;
|
|
590
|
+
function isntJsonRpcError$1(val) {
|
|
591
|
+
return !isJsonRpcError$1(val);
|
|
592
|
+
}
|
|
593
|
+
jsonRpc$1.isntJsonRpcError = isntJsonRpcError$1;
|
|
594
|
+
function isJsonRpcErrorObject$1(val) {
|
|
595
|
+
return (0, object_1$1.isRecord)(val)
|
|
596
|
+
&& (0, number_1$1.isNumber)(val.code)
|
|
597
|
+
&& (0, string_1$2.isString)(val.message)
|
|
598
|
+
&& ((0, undefined_1$3.isUndefined)(val.data) || (0, object_1$1.isObject)(val.data));
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
var json$1 = {};
|
|
602
|
+
|
|
603
|
+
json$1.isntJson = json$1.isJson = void 0;
|
|
604
|
+
function isJson$1(val) {
|
|
605
605
|
try {
|
|
606
606
|
JSON.stringify(val);
|
|
607
607
|
return true;
|
|
@@ -610,16 +610,16 @@ function isJson(val) {
|
|
|
610
610
|
return false;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
json.isJson = isJson;
|
|
614
|
-
function isntJson(val) {
|
|
615
|
-
return !isntJson();
|
|
613
|
+
json$1.isJson = isJson$1;
|
|
614
|
+
function isntJson$1(val) {
|
|
615
|
+
return !isntJson$1();
|
|
616
616
|
}
|
|
617
|
-
json.isntJson = isntJson;
|
|
617
|
+
json$1.isntJson = isntJson$1;
|
|
618
618
|
|
|
619
|
-
var url = {};
|
|
619
|
+
var url$1 = {};
|
|
620
620
|
|
|
621
|
-
url.isAbsoluteURL = void 0;
|
|
622
|
-
function isAbsoluteURL(str) {
|
|
621
|
+
url$1.isAbsoluteURL = void 0;
|
|
622
|
+
function isAbsoluteURL$1(str) {
|
|
623
623
|
try {
|
|
624
624
|
new URL(str);
|
|
625
625
|
return true;
|
|
@@ -628,7 +628,7 @@ function isAbsoluteURL(str) {
|
|
|
628
628
|
return false;
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
|
-
url.isAbsoluteURL = isAbsoluteURL;
|
|
631
|
+
url$1.isAbsoluteURL = isAbsoluteURL$1;
|
|
632
632
|
|
|
633
633
|
(function (exports) {
|
|
634
634
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -640,30 +640,30 @@ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Obj
|
|
|
640
640
|
}));
|
|
641
641
|
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
642
642
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
643
|
-
};__exportStar(array, exports);
|
|
644
|
-
__exportStar(asyncIterable, exports);
|
|
645
|
-
__exportStar(bigint, exports);
|
|
646
|
-
__exportStar(boolean, exports);
|
|
647
|
-
__exportStar(char, exports);
|
|
648
|
-
__exportStar(date, exports);
|
|
649
|
-
__exportStar(_enum, exports);
|
|
650
|
-
__exportStar(error, exports);
|
|
651
|
-
__exportStar(falsy, exports);
|
|
652
|
-
__exportStar(_function, exports);
|
|
653
|
-
__exportStar(iterable, exports);
|
|
654
|
-
__exportStar(jsonRpc, exports);
|
|
655
|
-
__exportStar(json, exports);
|
|
656
|
-
__exportStar(_null, exports);
|
|
657
|
-
__exportStar(number, exports);
|
|
658
|
-
__exportStar(object, exports);
|
|
659
|
-
__exportStar(string, exports);
|
|
660
|
-
__exportStar(_undefined, exports);
|
|
661
|
-
__exportStar(url, exports);
|
|
643
|
+
};__exportStar(array$1, exports);
|
|
644
|
+
__exportStar(asyncIterable$1, exports);
|
|
645
|
+
__exportStar(bigint$1, exports);
|
|
646
|
+
__exportStar(boolean$1, exports);
|
|
647
|
+
__exportStar(char$1, exports);
|
|
648
|
+
__exportStar(date$1, exports);
|
|
649
|
+
__exportStar(_enum$1, exports);
|
|
650
|
+
__exportStar(error$1, exports);
|
|
651
|
+
__exportStar(falsy$1, exports);
|
|
652
|
+
__exportStar(_function$1, exports);
|
|
653
|
+
__exportStar(iterable$1, exports);
|
|
654
|
+
__exportStar(jsonRpc$1, exports);
|
|
655
|
+
__exportStar(json$1, exports);
|
|
656
|
+
__exportStar(_null$1, exports);
|
|
657
|
+
__exportStar(number$1, exports);
|
|
658
|
+
__exportStar(object$1, exports);
|
|
659
|
+
__exportStar(string$1, exports);
|
|
660
|
+
__exportStar(_undefined$1, exports);
|
|
661
|
+
__exportStar(url$1, exports);
|
|
662
662
|
|
|
663
|
-
}(es2018$
|
|
663
|
+
}(es2018$3));
|
|
664
664
|
|
|
665
665
|
chunkByAsync$1.chunkByAsync = void 0;
|
|
666
|
-
const types_1$h = es2018$
|
|
666
|
+
const types_1$h = es2018$3;
|
|
667
667
|
function chunkByAsync(iterable, predicate) {
|
|
668
668
|
if ((0, types_1$h.isAsyncIterable)(iterable)) {
|
|
669
669
|
return chunkByAsyncIterable(iterable);
|
|
@@ -724,8 +724,8 @@ chunkBy$1.chunkBy = chunkBy;
|
|
|
724
724
|
var chunk$1 = {};
|
|
725
725
|
|
|
726
726
|
chunk$1.chunk = void 0;
|
|
727
|
-
const go_1$e = es2018$
|
|
728
|
-
const errors_1$e = es2018$
|
|
727
|
+
const go_1$e = es2018$4;
|
|
728
|
+
const errors_1$e = es2018$6;
|
|
729
729
|
function chunk(iterable, size) {
|
|
730
730
|
(0, errors_1$e.assert)(Number.isInteger(size), 'The parameter size must be an integer');
|
|
731
731
|
(0, errors_1$e.assert)(size > 0, 'The parameter size must be greater than 0');
|
|
@@ -747,8 +747,8 @@ chunk$1.chunk = chunk;
|
|
|
747
747
|
var concatAsync$1 = {};
|
|
748
748
|
|
|
749
749
|
concatAsync$1.concatAsync = void 0;
|
|
750
|
-
const types_1$g = es2018$
|
|
751
|
-
const go_1$d = es2018$
|
|
750
|
+
const types_1$g = es2018$3;
|
|
751
|
+
const go_1$d = es2018$4;
|
|
752
752
|
function concatAsync(iterable, ...otherIterables) {
|
|
753
753
|
return (0, go_1$d.go)(async function* () {
|
|
754
754
|
for (const iter of [iterable, ...otherIterables]) {
|
|
@@ -770,7 +770,7 @@ concatAsync$1.concatAsync = concatAsync;
|
|
|
770
770
|
var concat$1 = {};
|
|
771
771
|
|
|
772
772
|
concat$1.concat = void 0;
|
|
773
|
-
const go_1$c = es2018$
|
|
773
|
+
const go_1$c = es2018$4;
|
|
774
774
|
function concat(iterable, ...otherIterables) {
|
|
775
775
|
return (0, go_1$c.go)(function* () {
|
|
776
776
|
for (const iter of [iterable, ...otherIterables]) {
|
|
@@ -799,9 +799,9 @@ function* copyIterable(iterable) {
|
|
|
799
799
|
utils.copyIterable = copyIterable;
|
|
800
800
|
|
|
801
801
|
dropAsync$1.dropAsync = void 0;
|
|
802
|
-
const go_1$b = es2018$
|
|
802
|
+
const go_1$b = es2018$4;
|
|
803
803
|
const utils_1$3 = utils;
|
|
804
|
-
const errors_1$d = es2018$
|
|
804
|
+
const errors_1$d = es2018$6;
|
|
805
805
|
function dropAsync(iterable, count) {
|
|
806
806
|
(0, errors_1$d.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
807
807
|
(0, errors_1$d.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
@@ -834,9 +834,9 @@ dropAsync$1.dropAsync = dropAsync;
|
|
|
834
834
|
var dropRightAsync$1 = {};
|
|
835
835
|
|
|
836
836
|
dropRightAsync$1.dropRightAsync = void 0;
|
|
837
|
-
const go_1$a = es2018$
|
|
837
|
+
const go_1$a = es2018$4;
|
|
838
838
|
const utils_1$2 = utils;
|
|
839
|
-
const errors_1$c = es2018$
|
|
839
|
+
const errors_1$c = es2018$6;
|
|
840
840
|
function dropRightAsync(iterable, count) {
|
|
841
841
|
(0, errors_1$c.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
842
842
|
(0, errors_1$c.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
@@ -862,9 +862,9 @@ async function toArrayAsync$2(iterable) {
|
|
|
862
862
|
var dropRight$1 = {};
|
|
863
863
|
|
|
864
864
|
dropRight$1.dropRight = void 0;
|
|
865
|
-
const go_1$9 = es2018$
|
|
865
|
+
const go_1$9 = es2018$4;
|
|
866
866
|
const utils_1$1 = utils;
|
|
867
|
-
const errors_1$b = es2018$
|
|
867
|
+
const errors_1$b = es2018$6;
|
|
868
868
|
function dropRight(iterable, count) {
|
|
869
869
|
(0, errors_1$b.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
870
870
|
(0, errors_1$b.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
@@ -880,7 +880,7 @@ dropRight$1.dropRight = dropRight;
|
|
|
880
880
|
var dropUntilAsync$1 = {};
|
|
881
881
|
|
|
882
882
|
dropUntilAsync$1.dropUntilAsync = void 0;
|
|
883
|
-
const types_1$f = es2018$
|
|
883
|
+
const types_1$f = es2018$3;
|
|
884
884
|
function dropUntilAsync(iterable, predicate) {
|
|
885
885
|
if ((0, types_1$f.isAsyncIterable)(iterable)) {
|
|
886
886
|
return dropUntilAsyncIterable(iterable);
|
|
@@ -962,9 +962,9 @@ dropUntil$1.dropUntil = dropUntil;
|
|
|
962
962
|
var drop$1 = {};
|
|
963
963
|
|
|
964
964
|
drop$1.drop = void 0;
|
|
965
|
-
const go_1$8 = es2018$
|
|
965
|
+
const go_1$8 = es2018$4;
|
|
966
966
|
const utils_1 = utils;
|
|
967
|
-
const errors_1$a = es2018$
|
|
967
|
+
const errors_1$a = es2018$6;
|
|
968
968
|
function drop(iterable, count) {
|
|
969
969
|
(0, errors_1$a.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
970
970
|
(0, errors_1$a.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
@@ -997,7 +997,7 @@ drop$1.drop = drop;
|
|
|
997
997
|
var filterAsync$1 = {};
|
|
998
998
|
|
|
999
999
|
filterAsync$1.filterAsync = void 0;
|
|
1000
|
-
const types_1$e = es2018$
|
|
1000
|
+
const types_1$e = es2018$3;
|
|
1001
1001
|
function filterAsync(iterable, predicate) {
|
|
1002
1002
|
if ((0, types_1$e.isAsyncIterable)(iterable)) {
|
|
1003
1003
|
return filterAsyncIterable(iterable);
|
|
@@ -1044,7 +1044,7 @@ var flattenDeepAsync$1 = {};
|
|
|
1044
1044
|
var flattenByAsync$1 = {};
|
|
1045
1045
|
|
|
1046
1046
|
flattenByAsync$1.flattenByAsync = void 0;
|
|
1047
|
-
const types_1$d = es2018$
|
|
1047
|
+
const types_1$d = es2018$3;
|
|
1048
1048
|
function flattenByAsync(iterable, predicate) {
|
|
1049
1049
|
if ((0, types_1$d.isAsyncIterable)(iterable)) {
|
|
1050
1050
|
return flattenByAsyncIterable(iterable);
|
|
@@ -1084,7 +1084,7 @@ function isFiniteIterable$1(val) {
|
|
|
1084
1084
|
|
|
1085
1085
|
flattenDeepAsync$1.flattenDeepAsync = void 0;
|
|
1086
1086
|
const flatten_by_async_1 = flattenByAsync$1;
|
|
1087
|
-
const errors_1$9 = es2018$
|
|
1087
|
+
const errors_1$9 = es2018$6;
|
|
1088
1088
|
function flattenDeepAsync(iterable, depth = Infinity) {
|
|
1089
1089
|
(0, errors_1$9.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
|
|
1090
1090
|
(0, errors_1$9.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
|
|
@@ -1102,7 +1102,7 @@ flattenAsync$1.flattenAsync = flattenAsync;
|
|
|
1102
1102
|
var flattenBy$1 = {};
|
|
1103
1103
|
|
|
1104
1104
|
flattenBy$1.flattenBy = void 0;
|
|
1105
|
-
const types_1$c = es2018$
|
|
1105
|
+
const types_1$c = es2018$3;
|
|
1106
1106
|
function flattenBy(iterable, predicate) {
|
|
1107
1107
|
return flatten(iterable, 1);
|
|
1108
1108
|
function* flatten(iterable, level) {
|
|
@@ -1125,7 +1125,7 @@ var flattenDeep$1 = {};
|
|
|
1125
1125
|
|
|
1126
1126
|
flattenDeep$1.flattenDeep = void 0;
|
|
1127
1127
|
const flatten_by_1 = flattenBy$1;
|
|
1128
|
-
const errors_1$8 = es2018$
|
|
1128
|
+
const errors_1$8 = es2018$6;
|
|
1129
1129
|
function flattenDeep(iterable, depth = Infinity) {
|
|
1130
1130
|
(0, errors_1$8.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
|
|
1131
1131
|
(0, errors_1$8.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
|
|
@@ -1145,7 +1145,7 @@ flatten$1.flatten = flatten;
|
|
|
1145
1145
|
var mapAsync$1 = {};
|
|
1146
1146
|
|
|
1147
1147
|
mapAsync$1.mapAsync = void 0;
|
|
1148
|
-
const types_1$b = es2018$
|
|
1148
|
+
const types_1$b = es2018$3;
|
|
1149
1149
|
function mapAsync(iterable, fn) {
|
|
1150
1150
|
if ((0, types_1$b.isAsyncIterable)(iterable)) {
|
|
1151
1151
|
return mapAsyncIterable(iterable);
|
|
@@ -1185,8 +1185,8 @@ map$1.map = map;
|
|
|
1185
1185
|
var repeatAsync$1 = {};
|
|
1186
1186
|
|
|
1187
1187
|
repeatAsync$1.repeatAsync = void 0;
|
|
1188
|
-
const go_1$7 = es2018$
|
|
1189
|
-
const errors_1$7 = es2018$
|
|
1188
|
+
const go_1$7 = es2018$4;
|
|
1189
|
+
const errors_1$7 = es2018$6;
|
|
1190
1190
|
function repeatAsync(iterable, times) {
|
|
1191
1191
|
(0, errors_1$7.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
|
|
1192
1192
|
(0, errors_1$7.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
|
|
@@ -1220,8 +1220,8 @@ function isProduction$1() {
|
|
|
1220
1220
|
var repeat$1 = {};
|
|
1221
1221
|
|
|
1222
1222
|
repeat$1.repeat = void 0;
|
|
1223
|
-
const go_1$6 = es2018$
|
|
1224
|
-
const errors_1$6 = es2018$
|
|
1223
|
+
const go_1$6 = es2018$4;
|
|
1224
|
+
const errors_1$6 = es2018$6;
|
|
1225
1225
|
function repeat(iterable, times) {
|
|
1226
1226
|
(0, errors_1$6.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
|
|
1227
1227
|
(0, errors_1$6.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
|
|
@@ -1255,8 +1255,8 @@ function isProduction() {
|
|
|
1255
1255
|
var sliceAsync$1 = {};
|
|
1256
1256
|
|
|
1257
1257
|
sliceAsync$1.sliceAsync = void 0;
|
|
1258
|
-
const go_1$5 = es2018$
|
|
1259
|
-
const errors_1$5 = es2018$
|
|
1258
|
+
const go_1$5 = es2018$4;
|
|
1259
|
+
const errors_1$5 = es2018$6;
|
|
1260
1260
|
function sliceAsync(iterable, start, end = Infinity) {
|
|
1261
1261
|
(0, errors_1$5.assert)(Number.isInteger(start), 'The parameter start must be an integer');
|
|
1262
1262
|
(0, errors_1$5.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
|
|
@@ -1278,8 +1278,8 @@ sliceAsync$1.sliceAsync = sliceAsync;
|
|
|
1278
1278
|
var slice$1 = {};
|
|
1279
1279
|
|
|
1280
1280
|
slice$1.slice = void 0;
|
|
1281
|
-
const go_1$4 = es2018$
|
|
1282
|
-
const errors_1$4 = es2018$
|
|
1281
|
+
const go_1$4 = es2018$4;
|
|
1282
|
+
const errors_1$4 = es2018$6;
|
|
1283
1283
|
function slice(iterable, start, end = Infinity) {
|
|
1284
1284
|
(0, errors_1$4.assert)(Number.isInteger(start), 'The parameter start must be an integer');
|
|
1285
1285
|
(0, errors_1$4.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
|
|
@@ -1319,7 +1319,7 @@ splitAsync$1.splitAsync = splitAsync;
|
|
|
1319
1319
|
var splitByAsync$1 = {};
|
|
1320
1320
|
|
|
1321
1321
|
splitByAsync$1.splitByAsync = void 0;
|
|
1322
|
-
const types_1$a = es2018$
|
|
1322
|
+
const types_1$a = es2018$3;
|
|
1323
1323
|
function splitByAsync(iterable, predicate) {
|
|
1324
1324
|
if ((0, types_1$a.isAsyncIterable)(iterable)) {
|
|
1325
1325
|
return splitByAsyncIterable(iterable);
|
|
@@ -1401,8 +1401,8 @@ split$1.split = split;
|
|
|
1401
1401
|
var takeAsync$1 = {};
|
|
1402
1402
|
|
|
1403
1403
|
takeAsync$1.takeAsync = void 0;
|
|
1404
|
-
const go_1$3 = es2018$
|
|
1405
|
-
const errors_1$3 = es2018$
|
|
1404
|
+
const go_1$3 = es2018$4;
|
|
1405
|
+
const errors_1$3 = es2018$6;
|
|
1406
1406
|
function takeAsync(iterable, count) {
|
|
1407
1407
|
(0, errors_1$3.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
1408
1408
|
(0, errors_1$3.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
@@ -1422,8 +1422,8 @@ takeAsync$1.takeAsync = takeAsync;
|
|
|
1422
1422
|
var takeRightAsync$1 = {};
|
|
1423
1423
|
|
|
1424
1424
|
takeRightAsync$1.takeRightAsync = void 0;
|
|
1425
|
-
const go_1$2 = es2018$
|
|
1426
|
-
const errors_1$2 = es2018$
|
|
1425
|
+
const go_1$2 = es2018$4;
|
|
1426
|
+
const errors_1$2 = es2018$6;
|
|
1427
1427
|
function takeRightAsync(iterable, count) {
|
|
1428
1428
|
(0, errors_1$2.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
1429
1429
|
(0, errors_1$2.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
@@ -1452,8 +1452,8 @@ takeRightAsync$1.takeRightAsync = takeRightAsync;
|
|
|
1452
1452
|
var takeRight$1 = {};
|
|
1453
1453
|
|
|
1454
1454
|
takeRight$1.takeRight = void 0;
|
|
1455
|
-
const go_1$1 = es2018$
|
|
1456
|
-
const errors_1$1 = es2018$
|
|
1455
|
+
const go_1$1 = es2018$4;
|
|
1456
|
+
const errors_1$1 = es2018$6;
|
|
1457
1457
|
function takeRight(iterable, count) {
|
|
1458
1458
|
(0, errors_1$1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
1459
1459
|
(0, errors_1$1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
@@ -1482,7 +1482,7 @@ takeRight$1.takeRight = takeRight;
|
|
|
1482
1482
|
var takeUntilAsync$1 = {};
|
|
1483
1483
|
|
|
1484
1484
|
takeUntilAsync$1.takeUntilAsync = void 0;
|
|
1485
|
-
const types_1$9 = es2018$
|
|
1485
|
+
const types_1$9 = es2018$3;
|
|
1486
1486
|
function takeUntilAsync(iterable, predicate) {
|
|
1487
1487
|
if ((0, types_1$9.isAsyncIterable)(iterable)) {
|
|
1488
1488
|
return takeUntilAsyncIterable(iterable);
|
|
@@ -1528,8 +1528,8 @@ takeUntil$1.takeUntil = takeUntil;
|
|
|
1528
1528
|
var take$1 = {};
|
|
1529
1529
|
|
|
1530
1530
|
take$1.take = void 0;
|
|
1531
|
-
const go_1 = es2018$
|
|
1532
|
-
const errors_1 = es2018$
|
|
1531
|
+
const go_1 = es2018$4;
|
|
1532
|
+
const errors_1 = es2018$6;
|
|
1533
1533
|
function take(iterable, count) {
|
|
1534
1534
|
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
1535
1535
|
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
@@ -1549,7 +1549,7 @@ take$1.take = take;
|
|
|
1549
1549
|
var tapAsync$1 = {};
|
|
1550
1550
|
|
|
1551
1551
|
tapAsync$1.tapAsync = void 0;
|
|
1552
|
-
const types_1$8 = es2018$
|
|
1552
|
+
const types_1$8 = es2018$3;
|
|
1553
1553
|
function tapAsync(iterable, fn) {
|
|
1554
1554
|
if ((0, types_1$8.isAsyncIterable)(iterable)) {
|
|
1555
1555
|
return tapAsyncIterable(iterable);
|
|
@@ -1632,7 +1632,7 @@ uniqAsync$1.uniqAsync = uniqAsync;
|
|
|
1632
1632
|
var uniqByAsync$1 = {};
|
|
1633
1633
|
|
|
1634
1634
|
uniqByAsync$1.uniqByAsync = void 0;
|
|
1635
|
-
const types_1$7 = es2018$
|
|
1635
|
+
const types_1$7 = es2018$3;
|
|
1636
1636
|
function uniqByAsync(iterable, fn) {
|
|
1637
1637
|
if ((0, types_1$7.isAsyncIterable)(iterable)) {
|
|
1638
1638
|
return uniqByAsyncIterable(iterable);
|
|
@@ -1701,7 +1701,7 @@ uniq$1.uniq = uniq;
|
|
|
1701
1701
|
var zipAsync$1 = {};
|
|
1702
1702
|
|
|
1703
1703
|
zipAsync$1.zipAsync = void 0;
|
|
1704
|
-
const types_1$6 = es2018$
|
|
1704
|
+
const types_1$6 = es2018$3;
|
|
1705
1705
|
var Kind;
|
|
1706
1706
|
(function (Kind) {
|
|
1707
1707
|
Kind[Kind["Sync"] = 0] = "Sync";
|
|
@@ -1861,7 +1861,7 @@ consume$1.consume = consume;
|
|
|
1861
1861
|
var eachAsync$1 = {};
|
|
1862
1862
|
|
|
1863
1863
|
eachAsync$1.eachAsync = void 0;
|
|
1864
|
-
const types_1$5 = es2018$
|
|
1864
|
+
const types_1$5 = es2018$3;
|
|
1865
1865
|
function eachAsync(iterable, fn) {
|
|
1866
1866
|
if ((0, types_1$5.isAsyncIterable)(iterable)) {
|
|
1867
1867
|
return eachAsyncIterable(iterable);
|
|
@@ -1901,7 +1901,7 @@ each$1.each = each;
|
|
|
1901
1901
|
var everyAsync$1 = {};
|
|
1902
1902
|
|
|
1903
1903
|
everyAsync$1.everyAsync = void 0;
|
|
1904
|
-
const types_1$4 = es2018$
|
|
1904
|
+
const types_1$4 = es2018$3;
|
|
1905
1905
|
function everyAsync(iterable, predicate) {
|
|
1906
1906
|
if ((0, types_1$4.isAsyncIterable)(iterable)) {
|
|
1907
1907
|
return everyAsyncIterable(iterable);
|
|
@@ -1947,7 +1947,7 @@ every$1.every = every;
|
|
|
1947
1947
|
var findAsync$1 = {};
|
|
1948
1948
|
|
|
1949
1949
|
findAsync$1.findAsync = void 0;
|
|
1950
|
-
const types_1$3 = es2018$
|
|
1950
|
+
const types_1$3 = es2018$3;
|
|
1951
1951
|
function findAsync(iterable, predicate) {
|
|
1952
1952
|
if ((0, types_1$3.isAsyncIterable)(iterable)) {
|
|
1953
1953
|
return findAsyncIterable(iterable);
|
|
@@ -2071,7 +2071,7 @@ match$1.match = match;
|
|
|
2071
2071
|
var reduceAsync$1 = {};
|
|
2072
2072
|
|
|
2073
2073
|
reduceAsync$1.reduceAsync = void 0;
|
|
2074
|
-
const types_1$2 = es2018$
|
|
2074
|
+
const types_1$2 = es2018$3;
|
|
2075
2075
|
function reduceAsync(iterable, fn, initialValue) {
|
|
2076
2076
|
if ((0, types_1$2.isUndefined)(initialValue)) {
|
|
2077
2077
|
return reduceAsyncWithoutInitialValue(iterable, fn);
|
|
@@ -2167,7 +2167,7 @@ function reduceAsyncWithoutInitialValue(iterable, fn) {
|
|
|
2167
2167
|
var reduce$1 = {};
|
|
2168
2168
|
|
|
2169
2169
|
reduce$1.reduce = void 0;
|
|
2170
|
-
const types_1$1 = es2018$
|
|
2170
|
+
const types_1$1 = es2018$3;
|
|
2171
2171
|
function reduce(iterable, fn, initialValue) {
|
|
2172
2172
|
if ((0, types_1$1.isUndefined)(initialValue)) {
|
|
2173
2173
|
return reduceWithoutInitialValue(iterable, fn);
|
|
@@ -2214,7 +2214,7 @@ function reduceWithoutInitialValue(iterable, fn) {
|
|
|
2214
2214
|
var someAsync$1 = {};
|
|
2215
2215
|
|
|
2216
2216
|
someAsync$1.someAsync = void 0;
|
|
2217
|
-
const types_1 = es2018$
|
|
2217
|
+
const types_1 = es2018$3;
|
|
2218
2218
|
function someAsync(iterable, predicate) {
|
|
2219
2219
|
if ((0, types_1.isAsyncIterable)(iterable)) {
|
|
2220
2220
|
return someAsyncIterable(iterable);
|
|
@@ -2398,15 +2398,15 @@ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m
|
|
|
2398
2398
|
};__exportStar(middleware, exports);
|
|
2399
2399
|
__exportStar(output, exports);
|
|
2400
2400
|
|
|
2401
|
-
}(es2018$
|
|
2401
|
+
}(es2018$5));
|
|
2402
2402
|
|
|
2403
2403
|
var _LRUMap_limit, _LRUMap_map;
|
|
2404
2404
|
class LRUMap {
|
|
2405
2405
|
constructor(limit) {
|
|
2406
2406
|
_LRUMap_limit.set(this, void 0);
|
|
2407
2407
|
_LRUMap_map.set(this, new Map());
|
|
2408
|
-
es2018$
|
|
2409
|
-
es2018$
|
|
2408
|
+
es2018$6.assert(Number.isInteger(limit), 'The parameter limit must be an integer');
|
|
2409
|
+
es2018$6.assert(limit > 0, 'The parameter limit must be a positive value');
|
|
2410
2410
|
__classPrivateFieldSet(this, _LRUMap_limit, limit, "f");
|
|
2411
2411
|
}
|
|
2412
2412
|
get [(_LRUMap_limit = new WeakMap(), _LRUMap_map = new WeakMap(), Symbol.toStringTag)]() {
|
|
@@ -2454,15 +2454,15 @@ class LRUMap {
|
|
|
2454
2454
|
* Return the earliest key inserted in the Map
|
|
2455
2455
|
*/
|
|
2456
2456
|
getColdestKey() {
|
|
2457
|
-
return es2018$
|
|
2457
|
+
return es2018$5.first(__classPrivateFieldGet(this, _LRUMap_map, "f").keys());
|
|
2458
2458
|
}
|
|
2459
2459
|
}
|
|
2460
2460
|
|
|
2461
|
-
var es2018$
|
|
2461
|
+
var es2018$2 = {};
|
|
2462
2462
|
|
|
2463
2463
|
var exponentialBackoff = {};
|
|
2464
2464
|
|
|
2465
|
-
var es2018 = {};
|
|
2465
|
+
var es2018$1 = {};
|
|
2466
2466
|
|
|
2467
2467
|
var random$1 = {};
|
|
2468
2468
|
|
|
@@ -2506,10 +2506,10 @@ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m
|
|
|
2506
2506
|
__exportStar(randomInt$1, exports);
|
|
2507
2507
|
__exportStar(randomIntInclusive$1, exports);
|
|
2508
2508
|
|
|
2509
|
-
}(es2018));
|
|
2509
|
+
}(es2018$1));
|
|
2510
2510
|
|
|
2511
2511
|
exponentialBackoff.calculateExponentialBackoffTimeout = void 0;
|
|
2512
|
-
const extra_rand_1 = es2018;
|
|
2512
|
+
const extra_rand_1 = es2018$1;
|
|
2513
2513
|
function calculateExponentialBackoffTimeout({ baseTimeout, retries, maxTimeout = Infinity, factor = 2, jitter = true }) {
|
|
2514
2514
|
const timeout = Math.min(factor ** retries * baseTimeout, maxTimeout);
|
|
2515
2515
|
if (jitter) {
|
|
@@ -2521,19 +2521,19 @@ function calculateExponentialBackoffTimeout({ baseTimeout, retries, maxTimeout =
|
|
|
2521
2521
|
}
|
|
2522
2522
|
exponentialBackoff.calculateExponentialBackoffTimeout = calculateExponentialBackoffTimeout;
|
|
2523
2523
|
|
|
2524
|
-
var setTimeout$
|
|
2524
|
+
var setTimeout$2 = {};
|
|
2525
2525
|
|
|
2526
|
-
setTimeout$
|
|
2527
|
-
function setTimeout(timeout, cb) {
|
|
2526
|
+
setTimeout$2.setTimeout = void 0;
|
|
2527
|
+
function setTimeout$1(timeout, cb) {
|
|
2528
2528
|
const timer = globalThis.setTimeout(cb, timeout);
|
|
2529
2529
|
return () => clearTimeout(timer);
|
|
2530
2530
|
}
|
|
2531
|
-
setTimeout$
|
|
2531
|
+
setTimeout$2.setTimeout = setTimeout$1;
|
|
2532
2532
|
|
|
2533
2533
|
var setSchedule$1 = {};
|
|
2534
2534
|
|
|
2535
2535
|
setSchedule$1.setSchedule = void 0;
|
|
2536
|
-
const set_timeout_1$3 = setTimeout$
|
|
2536
|
+
const set_timeout_1$3 = setTimeout$2;
|
|
2537
2537
|
function setSchedule(timestamp, cb) {
|
|
2538
2538
|
const timeout = timestamp - Date.now();
|
|
2539
2539
|
return (0, set_timeout_1$3.setTimeout)(timeout, cb);
|
|
@@ -2552,7 +2552,7 @@ setInterval$1.setInterval = setInterval;
|
|
|
2552
2552
|
var setImmediate$1 = {};
|
|
2553
2553
|
|
|
2554
2554
|
setImmediate$1.setImmediate = void 0;
|
|
2555
|
-
const set_timeout_1$2 = setTimeout$
|
|
2555
|
+
const set_timeout_1$2 = setTimeout$2;
|
|
2556
2556
|
function setImmediate(cb) {
|
|
2557
2557
|
if (globalThis.setImmediate) {
|
|
2558
2558
|
const timer = globalThis.setImmediate(cb);
|
|
@@ -2567,7 +2567,7 @@ setImmediate$1.setImmediate = setImmediate;
|
|
|
2567
2567
|
var setTimeoutLoop$1 = {};
|
|
2568
2568
|
|
|
2569
2569
|
setTimeoutLoop$1.setTimeoutLoop = void 0;
|
|
2570
|
-
const set_timeout_1$1 = setTimeout$
|
|
2570
|
+
const set_timeout_1$1 = setTimeout$2;
|
|
2571
2571
|
function setTimeoutLoop(timeout, cb) {
|
|
2572
2572
|
let isCancelled = false;
|
|
2573
2573
|
let cancel = (0, set_timeout_1$1.setTimeout)(timeout, loop);
|
|
@@ -2587,7 +2587,7 @@ setTimeoutLoop$1.setTimeoutLoop = setTimeoutLoop;
|
|
|
2587
2587
|
var setDynamicTimeoutLoop$1 = {};
|
|
2588
2588
|
|
|
2589
2589
|
setDynamicTimeoutLoop$1.setDynamicTimeoutLoop = void 0;
|
|
2590
|
-
const set_timeout_1 = setTimeout$
|
|
2590
|
+
const set_timeout_1 = setTimeout$2;
|
|
2591
2591
|
function setDynamicTimeoutLoop(timeout, cb) {
|
|
2592
2592
|
let isCancelled = false;
|
|
2593
2593
|
let cancel = (0, set_timeout_1.setTimeout)(timeout, loop);
|
|
@@ -2617,14 +2617,14 @@ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Obj
|
|
|
2617
2617
|
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
2618
2618
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
2619
2619
|
};__exportStar(exponentialBackoff, exports);
|
|
2620
|
-
__exportStar(setTimeout$
|
|
2620
|
+
__exportStar(setTimeout$2, exports);
|
|
2621
2621
|
__exportStar(setSchedule$1, exports);
|
|
2622
2622
|
__exportStar(setInterval$1, exports);
|
|
2623
2623
|
__exportStar(setImmediate$1, exports);
|
|
2624
2624
|
__exportStar(setTimeoutLoop$1, exports);
|
|
2625
2625
|
__exportStar(setDynamicTimeoutLoop$1, exports);
|
|
2626
2626
|
|
|
2627
|
-
}(es2018$
|
|
2627
|
+
}(es2018$2));
|
|
2628
2628
|
|
|
2629
2629
|
var _ExpirableMap_map, _ExpirableMap_cancelClearTimeout;
|
|
2630
2630
|
class ExpirableMap {
|
|
@@ -2714,7 +2714,7 @@ class ExpirableMap {
|
|
|
2714
2714
|
if (this.itemMetadataSortedByExpirationTime.length > 0) {
|
|
2715
2715
|
const item = this.itemMetadataSortedByExpirationTime[0];
|
|
2716
2716
|
if (Number.isFinite(item.expirationTime)) {
|
|
2717
|
-
const cancel = es2018$
|
|
2717
|
+
const cancel = es2018$2.setSchedule(item.expirationTime, () => {
|
|
2718
2718
|
this.clearExpiredItems(Date.now());
|
|
2719
2719
|
this.rescheduleClearTimeout();
|
|
2720
2720
|
});
|
|
@@ -2740,8 +2740,8 @@ class TLRUMap {
|
|
|
2740
2740
|
* 按过期时间升序排列所有项目的元数据
|
|
2741
2741
|
*/
|
|
2742
2742
|
this.itemMetadataSortedByExpirationTime = [];
|
|
2743
|
-
es2018$
|
|
2744
|
-
es2018$
|
|
2743
|
+
es2018$6.assert(Number.isInteger(limit), 'The parameter limit must be an integer');
|
|
2744
|
+
es2018$6.assert(limit > 0, 'The parameter limit must be a positive value');
|
|
2745
2745
|
__classPrivateFieldSet(this, _TLRUMap_limit, limit, "f");
|
|
2746
2746
|
}
|
|
2747
2747
|
get [(_TLRUMap_limit = new WeakMap(), _TLRUMap_map = new WeakMap(), _TLRUMap_cancelClearTimeout = new WeakMap(), Symbol.toStringTag)]() {
|
|
@@ -2845,7 +2845,7 @@ class TLRUMap {
|
|
|
2845
2845
|
if (this.itemMetadataSortedByExpirationTime.length > 0) {
|
|
2846
2846
|
const item = this.itemMetadataSortedByExpirationTime[0];
|
|
2847
2847
|
if (Number.isFinite(item.expirationTime)) {
|
|
2848
|
-
const cancel = es2018$
|
|
2848
|
+
const cancel = es2018$2.setSchedule(item.expirationTime, () => {
|
|
2849
2849
|
this.clearExpiredItems(Date.now());
|
|
2850
2850
|
this.rescheduleClearTimeout();
|
|
2851
2851
|
});
|
|
@@ -2860,7 +2860,7 @@ class TLRUMap {
|
|
|
2860
2860
|
* Return the earliest key inserted in the Map
|
|
2861
2861
|
*/
|
|
2862
2862
|
getColdestKey() {
|
|
2863
|
-
return es2018$
|
|
2863
|
+
return es2018$5.first(__classPrivateFieldGet(this, _TLRUMap_map, "f").keys());
|
|
2864
2864
|
}
|
|
2865
2865
|
}
|
|
2866
2866
|
|
|
@@ -2928,7 +2928,7 @@ class TrieMap {
|
|
|
2928
2928
|
delete node.value;
|
|
2929
2929
|
// 如果节点没有后缀, 则代表这是末端节点, 往前删除其前缀
|
|
2930
2930
|
if (node.children.size === 0) {
|
|
2931
|
-
for (const [part, parentNode] of es2018$
|
|
2931
|
+
for (const [part, parentNode] of es2018$5.toArray(es2018$5.zip(key, parentNodes)).reverse()) {
|
|
2932
2932
|
parentNode.children.delete(part);
|
|
2933
2933
|
if (parentNode.children.size !== 0)
|
|
2934
2934
|
break;
|
|
@@ -2938,5 +2938,1086 @@ class TrieMap {
|
|
|
2938
2938
|
}
|
|
2939
2939
|
}
|
|
2940
2940
|
|
|
2941
|
-
|
|
2941
|
+
var _FiniteStateMachine_state;
|
|
2942
|
+
class FiniteStateMachine {
|
|
2943
|
+
constructor(schema, initialState) {
|
|
2944
|
+
this.schema = schema;
|
|
2945
|
+
_FiniteStateMachine_state.set(this, void 0);
|
|
2946
|
+
__classPrivateFieldSet(this, _FiniteStateMachine_state, initialState, "f");
|
|
2947
|
+
}
|
|
2948
|
+
get state() {
|
|
2949
|
+
return __classPrivateFieldGet(this, _FiniteStateMachine_state, "f");
|
|
2950
|
+
}
|
|
2951
|
+
matches(state) {
|
|
2952
|
+
return __classPrivateFieldGet(this, _FiniteStateMachine_state, "f") === state;
|
|
2953
|
+
}
|
|
2954
|
+
/**
|
|
2955
|
+
* @throws {BadEventError}
|
|
2956
|
+
*/
|
|
2957
|
+
send(event) {
|
|
2958
|
+
if (event in this.schema[this.state]) {
|
|
2959
|
+
__classPrivateFieldSet(this, _FiniteStateMachine_state, this.schema[this.state][event], "f");
|
|
2960
|
+
}
|
|
2961
|
+
else {
|
|
2962
|
+
throw new BadEventError(this.state, event);
|
|
2963
|
+
}
|
|
2964
|
+
}
|
|
2965
|
+
}
|
|
2966
|
+
_FiniteStateMachine_state = new WeakMap();
|
|
2967
|
+
class BadEventError extends es2018$6.CustomError {
|
|
2968
|
+
constructor(state, event) {
|
|
2969
|
+
super(`State ${state} cannot react to event ${event}`);
|
|
2970
|
+
}
|
|
2971
|
+
}
|
|
2972
|
+
|
|
2973
|
+
/*! *****************************************************************************
|
|
2974
|
+
Copyright (c) Microsoft Corporation.
|
|
2975
|
+
|
|
2976
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
2977
|
+
purpose with or without fee is hereby granted.
|
|
2978
|
+
|
|
2979
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
2980
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
2981
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
2982
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
2983
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2984
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2985
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
2986
|
+
***************************************************************************** */
|
|
2987
|
+
/* global Reflect, Promise */
|
|
2988
|
+
|
|
2989
|
+
var extendStatics = function(d, b) {
|
|
2990
|
+
extendStatics = Object.setPrototypeOf ||
|
|
2991
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
2992
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
2993
|
+
return extendStatics(d, b);
|
|
2994
|
+
};
|
|
2995
|
+
|
|
2996
|
+
function __extends(d, b) {
|
|
2997
|
+
if (typeof b !== "function" && b !== null)
|
|
2998
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
2999
|
+
extendStatics(d, b);
|
|
3000
|
+
function __() { this.constructor = d; }
|
|
3001
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3002
|
+
}
|
|
3003
|
+
|
|
3004
|
+
function __values(o) {
|
|
3005
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
3006
|
+
if (m) return m.call(o);
|
|
3007
|
+
if (o && typeof o.length === "number") return {
|
|
3008
|
+
next: function () {
|
|
3009
|
+
if (o && i >= o.length) o = void 0;
|
|
3010
|
+
return { value: o && o[i++], done: !o };
|
|
3011
|
+
}
|
|
3012
|
+
};
|
|
3013
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
3014
|
+
}
|
|
3015
|
+
|
|
3016
|
+
function __read(o, n) {
|
|
3017
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
3018
|
+
if (!m) return o;
|
|
3019
|
+
var i = m.call(o), r, ar = [], e;
|
|
3020
|
+
try {
|
|
3021
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
3022
|
+
}
|
|
3023
|
+
catch (error) { e = { error: error }; }
|
|
3024
|
+
finally {
|
|
3025
|
+
try {
|
|
3026
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
3027
|
+
}
|
|
3028
|
+
finally { if (e) throw e.error; }
|
|
3029
|
+
}
|
|
3030
|
+
return ar;
|
|
3031
|
+
}
|
|
3032
|
+
|
|
3033
|
+
function __spreadArray(to, from) {
|
|
3034
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
3035
|
+
to[j] = from[i];
|
|
3036
|
+
return to;
|
|
3037
|
+
}
|
|
3038
|
+
|
|
3039
|
+
function isFunction$1(value) {
|
|
3040
|
+
return typeof value === 'function';
|
|
3041
|
+
}
|
|
3042
|
+
|
|
3043
|
+
function createErrorClass(createImpl) {
|
|
3044
|
+
var _super = function (instance) {
|
|
3045
|
+
Error.call(instance);
|
|
3046
|
+
instance.stack = new Error().stack;
|
|
3047
|
+
};
|
|
3048
|
+
var ctorFunc = createImpl(_super);
|
|
3049
|
+
ctorFunc.prototype = Object.create(Error.prototype);
|
|
3050
|
+
ctorFunc.prototype.constructor = ctorFunc;
|
|
3051
|
+
return ctorFunc;
|
|
3052
|
+
}
|
|
3053
|
+
|
|
3054
|
+
var UnsubscriptionError = createErrorClass(function (_super) {
|
|
3055
|
+
return function UnsubscriptionErrorImpl(errors) {
|
|
3056
|
+
_super(this);
|
|
3057
|
+
this.message = errors
|
|
3058
|
+
? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ')
|
|
3059
|
+
: '';
|
|
3060
|
+
this.name = 'UnsubscriptionError';
|
|
3061
|
+
this.errors = errors;
|
|
3062
|
+
};
|
|
3063
|
+
});
|
|
3064
|
+
|
|
3065
|
+
function arrRemove(arr, item) {
|
|
3066
|
+
if (arr) {
|
|
3067
|
+
var index = arr.indexOf(item);
|
|
3068
|
+
0 <= index && arr.splice(index, 1);
|
|
3069
|
+
}
|
|
3070
|
+
}
|
|
3071
|
+
|
|
3072
|
+
var Subscription = (function () {
|
|
3073
|
+
function Subscription(initialTeardown) {
|
|
3074
|
+
this.initialTeardown = initialTeardown;
|
|
3075
|
+
this.closed = false;
|
|
3076
|
+
this._parentage = null;
|
|
3077
|
+
this._teardowns = null;
|
|
3078
|
+
}
|
|
3079
|
+
Subscription.prototype.unsubscribe = function () {
|
|
3080
|
+
var e_1, _a, e_2, _b;
|
|
3081
|
+
var errors;
|
|
3082
|
+
if (!this.closed) {
|
|
3083
|
+
this.closed = true;
|
|
3084
|
+
var _parentage = this._parentage;
|
|
3085
|
+
if (_parentage) {
|
|
3086
|
+
this._parentage = null;
|
|
3087
|
+
if (Array.isArray(_parentage)) {
|
|
3088
|
+
try {
|
|
3089
|
+
for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {
|
|
3090
|
+
var parent_1 = _parentage_1_1.value;
|
|
3091
|
+
parent_1.remove(this);
|
|
3092
|
+
}
|
|
3093
|
+
}
|
|
3094
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3095
|
+
finally {
|
|
3096
|
+
try {
|
|
3097
|
+
if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);
|
|
3098
|
+
}
|
|
3099
|
+
finally { if (e_1) throw e_1.error; }
|
|
3100
|
+
}
|
|
3101
|
+
}
|
|
3102
|
+
else {
|
|
3103
|
+
_parentage.remove(this);
|
|
3104
|
+
}
|
|
3105
|
+
}
|
|
3106
|
+
var initialTeardown = this.initialTeardown;
|
|
3107
|
+
if (isFunction$1(initialTeardown)) {
|
|
3108
|
+
try {
|
|
3109
|
+
initialTeardown();
|
|
3110
|
+
}
|
|
3111
|
+
catch (e) {
|
|
3112
|
+
errors = e instanceof UnsubscriptionError ? e.errors : [e];
|
|
3113
|
+
}
|
|
3114
|
+
}
|
|
3115
|
+
var _teardowns = this._teardowns;
|
|
3116
|
+
if (_teardowns) {
|
|
3117
|
+
this._teardowns = null;
|
|
3118
|
+
try {
|
|
3119
|
+
for (var _teardowns_1 = __values(_teardowns), _teardowns_1_1 = _teardowns_1.next(); !_teardowns_1_1.done; _teardowns_1_1 = _teardowns_1.next()) {
|
|
3120
|
+
var teardown_1 = _teardowns_1_1.value;
|
|
3121
|
+
try {
|
|
3122
|
+
execTeardown(teardown_1);
|
|
3123
|
+
}
|
|
3124
|
+
catch (err) {
|
|
3125
|
+
errors = errors !== null && errors !== void 0 ? errors : [];
|
|
3126
|
+
if (err instanceof UnsubscriptionError) {
|
|
3127
|
+
errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));
|
|
3128
|
+
}
|
|
3129
|
+
else {
|
|
3130
|
+
errors.push(err);
|
|
3131
|
+
}
|
|
3132
|
+
}
|
|
3133
|
+
}
|
|
3134
|
+
}
|
|
3135
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
3136
|
+
finally {
|
|
3137
|
+
try {
|
|
3138
|
+
if (_teardowns_1_1 && !_teardowns_1_1.done && (_b = _teardowns_1.return)) _b.call(_teardowns_1);
|
|
3139
|
+
}
|
|
3140
|
+
finally { if (e_2) throw e_2.error; }
|
|
3141
|
+
}
|
|
3142
|
+
}
|
|
3143
|
+
if (errors) {
|
|
3144
|
+
throw new UnsubscriptionError(errors);
|
|
3145
|
+
}
|
|
3146
|
+
}
|
|
3147
|
+
};
|
|
3148
|
+
Subscription.prototype.add = function (teardown) {
|
|
3149
|
+
var _a;
|
|
3150
|
+
if (teardown && teardown !== this) {
|
|
3151
|
+
if (this.closed) {
|
|
3152
|
+
execTeardown(teardown);
|
|
3153
|
+
}
|
|
3154
|
+
else {
|
|
3155
|
+
if (teardown instanceof Subscription) {
|
|
3156
|
+
if (teardown.closed || teardown._hasParent(this)) {
|
|
3157
|
+
return;
|
|
3158
|
+
}
|
|
3159
|
+
teardown._addParent(this);
|
|
3160
|
+
}
|
|
3161
|
+
(this._teardowns = (_a = this._teardowns) !== null && _a !== void 0 ? _a : []).push(teardown);
|
|
3162
|
+
}
|
|
3163
|
+
}
|
|
3164
|
+
};
|
|
3165
|
+
Subscription.prototype._hasParent = function (parent) {
|
|
3166
|
+
var _parentage = this._parentage;
|
|
3167
|
+
return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));
|
|
3168
|
+
};
|
|
3169
|
+
Subscription.prototype._addParent = function (parent) {
|
|
3170
|
+
var _parentage = this._parentage;
|
|
3171
|
+
this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
|
|
3172
|
+
};
|
|
3173
|
+
Subscription.prototype._removeParent = function (parent) {
|
|
3174
|
+
var _parentage = this._parentage;
|
|
3175
|
+
if (_parentage === parent) {
|
|
3176
|
+
this._parentage = null;
|
|
3177
|
+
}
|
|
3178
|
+
else if (Array.isArray(_parentage)) {
|
|
3179
|
+
arrRemove(_parentage, parent);
|
|
3180
|
+
}
|
|
3181
|
+
};
|
|
3182
|
+
Subscription.prototype.remove = function (teardown) {
|
|
3183
|
+
var _teardowns = this._teardowns;
|
|
3184
|
+
_teardowns && arrRemove(_teardowns, teardown);
|
|
3185
|
+
if (teardown instanceof Subscription) {
|
|
3186
|
+
teardown._removeParent(this);
|
|
3187
|
+
}
|
|
3188
|
+
};
|
|
3189
|
+
Subscription.EMPTY = (function () {
|
|
3190
|
+
var empty = new Subscription();
|
|
3191
|
+
empty.closed = true;
|
|
3192
|
+
return empty;
|
|
3193
|
+
})();
|
|
3194
|
+
return Subscription;
|
|
3195
|
+
}());
|
|
3196
|
+
var EMPTY_SUBSCRIPTION = Subscription.EMPTY;
|
|
3197
|
+
function isSubscription(value) {
|
|
3198
|
+
return (value instanceof Subscription ||
|
|
3199
|
+
(value && 'closed' in value && isFunction$1(value.remove) && isFunction$1(value.add) && isFunction$1(value.unsubscribe)));
|
|
3200
|
+
}
|
|
3201
|
+
function execTeardown(teardown) {
|
|
3202
|
+
if (isFunction$1(teardown)) {
|
|
3203
|
+
teardown();
|
|
3204
|
+
}
|
|
3205
|
+
else {
|
|
3206
|
+
teardown.unsubscribe();
|
|
3207
|
+
}
|
|
3208
|
+
}
|
|
3209
|
+
|
|
3210
|
+
var config = {
|
|
3211
|
+
onUnhandledError: null,
|
|
3212
|
+
onStoppedNotification: null,
|
|
3213
|
+
Promise: undefined,
|
|
3214
|
+
useDeprecatedSynchronousErrorHandling: false,
|
|
3215
|
+
useDeprecatedNextContext: false,
|
|
3216
|
+
};
|
|
3217
|
+
|
|
3218
|
+
var timeoutProvider = {
|
|
3219
|
+
setTimeout: function () {
|
|
3220
|
+
var args = [];
|
|
3221
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3222
|
+
args[_i] = arguments[_i];
|
|
3223
|
+
}
|
|
3224
|
+
var delegate = timeoutProvider.delegate;
|
|
3225
|
+
return ((delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) || setTimeout).apply(void 0, __spreadArray([], __read(args)));
|
|
3226
|
+
},
|
|
3227
|
+
clearTimeout: function (handle) {
|
|
3228
|
+
var delegate = timeoutProvider.delegate;
|
|
3229
|
+
return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);
|
|
3230
|
+
},
|
|
3231
|
+
delegate: undefined,
|
|
3232
|
+
};
|
|
3233
|
+
|
|
3234
|
+
function reportUnhandledError(err) {
|
|
3235
|
+
timeoutProvider.setTimeout(function () {
|
|
3236
|
+
{
|
|
3237
|
+
throw err;
|
|
3238
|
+
}
|
|
3239
|
+
});
|
|
3240
|
+
}
|
|
3241
|
+
|
|
3242
|
+
function noop() { }
|
|
3243
|
+
|
|
3244
|
+
var context = null;
|
|
3245
|
+
function errorContext(cb) {
|
|
3246
|
+
if (config.useDeprecatedSynchronousErrorHandling) {
|
|
3247
|
+
var isRoot = !context;
|
|
3248
|
+
if (isRoot) {
|
|
3249
|
+
context = { errorThrown: false, error: null };
|
|
3250
|
+
}
|
|
3251
|
+
cb();
|
|
3252
|
+
if (isRoot) {
|
|
3253
|
+
var _a = context, errorThrown = _a.errorThrown, error = _a.error;
|
|
3254
|
+
context = null;
|
|
3255
|
+
if (errorThrown) {
|
|
3256
|
+
throw error;
|
|
3257
|
+
}
|
|
3258
|
+
}
|
|
3259
|
+
}
|
|
3260
|
+
else {
|
|
3261
|
+
cb();
|
|
3262
|
+
}
|
|
3263
|
+
}
|
|
3264
|
+
|
|
3265
|
+
var Subscriber = (function (_super) {
|
|
3266
|
+
__extends(Subscriber, _super);
|
|
3267
|
+
function Subscriber(destination) {
|
|
3268
|
+
var _this = _super.call(this) || this;
|
|
3269
|
+
_this.isStopped = false;
|
|
3270
|
+
if (destination) {
|
|
3271
|
+
_this.destination = destination;
|
|
3272
|
+
if (isSubscription(destination)) {
|
|
3273
|
+
destination.add(_this);
|
|
3274
|
+
}
|
|
3275
|
+
}
|
|
3276
|
+
else {
|
|
3277
|
+
_this.destination = EMPTY_OBSERVER;
|
|
3278
|
+
}
|
|
3279
|
+
return _this;
|
|
3280
|
+
}
|
|
3281
|
+
Subscriber.create = function (next, error, complete) {
|
|
3282
|
+
return new SafeSubscriber(next, error, complete);
|
|
3283
|
+
};
|
|
3284
|
+
Subscriber.prototype.next = function (value) {
|
|
3285
|
+
if (this.isStopped) ;
|
|
3286
|
+
else {
|
|
3287
|
+
this._next(value);
|
|
3288
|
+
}
|
|
3289
|
+
};
|
|
3290
|
+
Subscriber.prototype.error = function (err) {
|
|
3291
|
+
if (this.isStopped) ;
|
|
3292
|
+
else {
|
|
3293
|
+
this.isStopped = true;
|
|
3294
|
+
this._error(err);
|
|
3295
|
+
}
|
|
3296
|
+
};
|
|
3297
|
+
Subscriber.prototype.complete = function () {
|
|
3298
|
+
if (this.isStopped) ;
|
|
3299
|
+
else {
|
|
3300
|
+
this.isStopped = true;
|
|
3301
|
+
this._complete();
|
|
3302
|
+
}
|
|
3303
|
+
};
|
|
3304
|
+
Subscriber.prototype.unsubscribe = function () {
|
|
3305
|
+
if (!this.closed) {
|
|
3306
|
+
this.isStopped = true;
|
|
3307
|
+
_super.prototype.unsubscribe.call(this);
|
|
3308
|
+
this.destination = null;
|
|
3309
|
+
}
|
|
3310
|
+
};
|
|
3311
|
+
Subscriber.prototype._next = function (value) {
|
|
3312
|
+
this.destination.next(value);
|
|
3313
|
+
};
|
|
3314
|
+
Subscriber.prototype._error = function (err) {
|
|
3315
|
+
try {
|
|
3316
|
+
this.destination.error(err);
|
|
3317
|
+
}
|
|
3318
|
+
finally {
|
|
3319
|
+
this.unsubscribe();
|
|
3320
|
+
}
|
|
3321
|
+
};
|
|
3322
|
+
Subscriber.prototype._complete = function () {
|
|
3323
|
+
try {
|
|
3324
|
+
this.destination.complete();
|
|
3325
|
+
}
|
|
3326
|
+
finally {
|
|
3327
|
+
this.unsubscribe();
|
|
3328
|
+
}
|
|
3329
|
+
};
|
|
3330
|
+
return Subscriber;
|
|
3331
|
+
}(Subscription));
|
|
3332
|
+
var SafeSubscriber = (function (_super) {
|
|
3333
|
+
__extends(SafeSubscriber, _super);
|
|
3334
|
+
function SafeSubscriber(observerOrNext, error, complete) {
|
|
3335
|
+
var _this = _super.call(this) || this;
|
|
3336
|
+
var next;
|
|
3337
|
+
if (isFunction$1(observerOrNext)) {
|
|
3338
|
+
next = observerOrNext;
|
|
3339
|
+
}
|
|
3340
|
+
else if (observerOrNext) {
|
|
3341
|
+
(next = observerOrNext.next, error = observerOrNext.error, complete = observerOrNext.complete);
|
|
3342
|
+
var context_1;
|
|
3343
|
+
if (_this && config.useDeprecatedNextContext) {
|
|
3344
|
+
context_1 = Object.create(observerOrNext);
|
|
3345
|
+
context_1.unsubscribe = function () { return _this.unsubscribe(); };
|
|
3346
|
+
}
|
|
3347
|
+
else {
|
|
3348
|
+
context_1 = observerOrNext;
|
|
3349
|
+
}
|
|
3350
|
+
next = next === null || next === void 0 ? void 0 : next.bind(context_1);
|
|
3351
|
+
error = error === null || error === void 0 ? void 0 : error.bind(context_1);
|
|
3352
|
+
complete = complete === null || complete === void 0 ? void 0 : complete.bind(context_1);
|
|
3353
|
+
}
|
|
3354
|
+
_this.destination = {
|
|
3355
|
+
next: next ? wrapForErrorHandling(next) : noop,
|
|
3356
|
+
error: wrapForErrorHandling(error !== null && error !== void 0 ? error : defaultErrorHandler),
|
|
3357
|
+
complete: complete ? wrapForErrorHandling(complete) : noop,
|
|
3358
|
+
};
|
|
3359
|
+
return _this;
|
|
3360
|
+
}
|
|
3361
|
+
return SafeSubscriber;
|
|
3362
|
+
}(Subscriber));
|
|
3363
|
+
function wrapForErrorHandling(handler, instance) {
|
|
3364
|
+
return function () {
|
|
3365
|
+
var args = [];
|
|
3366
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3367
|
+
args[_i] = arguments[_i];
|
|
3368
|
+
}
|
|
3369
|
+
try {
|
|
3370
|
+
handler.apply(void 0, __spreadArray([], __read(args)));
|
|
3371
|
+
}
|
|
3372
|
+
catch (err) {
|
|
3373
|
+
{
|
|
3374
|
+
reportUnhandledError(err);
|
|
3375
|
+
}
|
|
3376
|
+
}
|
|
3377
|
+
};
|
|
3378
|
+
}
|
|
3379
|
+
function defaultErrorHandler(err) {
|
|
3380
|
+
throw err;
|
|
3381
|
+
}
|
|
3382
|
+
var EMPTY_OBSERVER = {
|
|
3383
|
+
closed: true,
|
|
3384
|
+
next: noop,
|
|
3385
|
+
error: defaultErrorHandler,
|
|
3386
|
+
complete: noop,
|
|
3387
|
+
};
|
|
3388
|
+
|
|
3389
|
+
var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })();
|
|
3390
|
+
|
|
3391
|
+
function identity(x) {
|
|
3392
|
+
return x;
|
|
3393
|
+
}
|
|
3394
|
+
|
|
3395
|
+
function pipeFromArray(fns) {
|
|
3396
|
+
if (fns.length === 0) {
|
|
3397
|
+
return identity;
|
|
3398
|
+
}
|
|
3399
|
+
if (fns.length === 1) {
|
|
3400
|
+
return fns[0];
|
|
3401
|
+
}
|
|
3402
|
+
return function piped(input) {
|
|
3403
|
+
return fns.reduce(function (prev, fn) { return fn(prev); }, input);
|
|
3404
|
+
};
|
|
3405
|
+
}
|
|
3406
|
+
|
|
3407
|
+
var Observable = (function () {
|
|
3408
|
+
function Observable(subscribe) {
|
|
3409
|
+
if (subscribe) {
|
|
3410
|
+
this._subscribe = subscribe;
|
|
3411
|
+
}
|
|
3412
|
+
}
|
|
3413
|
+
Observable.prototype.lift = function (operator) {
|
|
3414
|
+
var observable = new Observable();
|
|
3415
|
+
observable.source = this;
|
|
3416
|
+
observable.operator = operator;
|
|
3417
|
+
return observable;
|
|
3418
|
+
};
|
|
3419
|
+
Observable.prototype.subscribe = function (observerOrNext, error, complete) {
|
|
3420
|
+
var _this = this;
|
|
3421
|
+
var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);
|
|
3422
|
+
errorContext(function () {
|
|
3423
|
+
var _a = _this, operator = _a.operator, source = _a.source;
|
|
3424
|
+
subscriber.add(operator
|
|
3425
|
+
?
|
|
3426
|
+
operator.call(subscriber, source)
|
|
3427
|
+
: source
|
|
3428
|
+
?
|
|
3429
|
+
_this._subscribe(subscriber)
|
|
3430
|
+
:
|
|
3431
|
+
_this._trySubscribe(subscriber));
|
|
3432
|
+
});
|
|
3433
|
+
return subscriber;
|
|
3434
|
+
};
|
|
3435
|
+
Observable.prototype._trySubscribe = function (sink) {
|
|
3436
|
+
try {
|
|
3437
|
+
return this._subscribe(sink);
|
|
3438
|
+
}
|
|
3439
|
+
catch (err) {
|
|
3440
|
+
sink.error(err);
|
|
3441
|
+
}
|
|
3442
|
+
};
|
|
3443
|
+
Observable.prototype.forEach = function (next, promiseCtor) {
|
|
3444
|
+
var _this = this;
|
|
3445
|
+
promiseCtor = getPromiseCtor(promiseCtor);
|
|
3446
|
+
return new promiseCtor(function (resolve, reject) {
|
|
3447
|
+
var subscription;
|
|
3448
|
+
subscription = _this.subscribe(function (value) {
|
|
3449
|
+
try {
|
|
3450
|
+
next(value);
|
|
3451
|
+
}
|
|
3452
|
+
catch (err) {
|
|
3453
|
+
reject(err);
|
|
3454
|
+
subscription === null || subscription === void 0 ? void 0 : subscription.unsubscribe();
|
|
3455
|
+
}
|
|
3456
|
+
}, reject, resolve);
|
|
3457
|
+
});
|
|
3458
|
+
};
|
|
3459
|
+
Observable.prototype._subscribe = function (subscriber) {
|
|
3460
|
+
var _a;
|
|
3461
|
+
return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);
|
|
3462
|
+
};
|
|
3463
|
+
Observable.prototype[observable] = function () {
|
|
3464
|
+
return this;
|
|
3465
|
+
};
|
|
3466
|
+
Observable.prototype.pipe = function () {
|
|
3467
|
+
var operations = [];
|
|
3468
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3469
|
+
operations[_i] = arguments[_i];
|
|
3470
|
+
}
|
|
3471
|
+
return pipeFromArray(operations)(this);
|
|
3472
|
+
};
|
|
3473
|
+
Observable.prototype.toPromise = function (promiseCtor) {
|
|
3474
|
+
var _this = this;
|
|
3475
|
+
promiseCtor = getPromiseCtor(promiseCtor);
|
|
3476
|
+
return new promiseCtor(function (resolve, reject) {
|
|
3477
|
+
var value;
|
|
3478
|
+
_this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); });
|
|
3479
|
+
});
|
|
3480
|
+
};
|
|
3481
|
+
Observable.create = function (subscribe) {
|
|
3482
|
+
return new Observable(subscribe);
|
|
3483
|
+
};
|
|
3484
|
+
return Observable;
|
|
3485
|
+
}());
|
|
3486
|
+
function getPromiseCtor(promiseCtor) {
|
|
3487
|
+
var _a;
|
|
3488
|
+
return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;
|
|
3489
|
+
}
|
|
3490
|
+
function isObserver(value) {
|
|
3491
|
+
return value && isFunction$1(value.next) && isFunction$1(value.error) && isFunction$1(value.complete);
|
|
3492
|
+
}
|
|
3493
|
+
function isSubscriber(value) {
|
|
3494
|
+
return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));
|
|
3495
|
+
}
|
|
3496
|
+
|
|
3497
|
+
var ObjectUnsubscribedError = createErrorClass(function (_super) {
|
|
3498
|
+
return function ObjectUnsubscribedErrorImpl() {
|
|
3499
|
+
_super(this);
|
|
3500
|
+
this.name = 'ObjectUnsubscribedError';
|
|
3501
|
+
this.message = 'object unsubscribed';
|
|
3502
|
+
};
|
|
3503
|
+
});
|
|
3504
|
+
|
|
3505
|
+
var Subject = (function (_super) {
|
|
3506
|
+
__extends(Subject, _super);
|
|
3507
|
+
function Subject() {
|
|
3508
|
+
var _this = _super.call(this) || this;
|
|
3509
|
+
_this.closed = false;
|
|
3510
|
+
_this.observers = [];
|
|
3511
|
+
_this.isStopped = false;
|
|
3512
|
+
_this.hasError = false;
|
|
3513
|
+
_this.thrownError = null;
|
|
3514
|
+
return _this;
|
|
3515
|
+
}
|
|
3516
|
+
Subject.prototype.lift = function (operator) {
|
|
3517
|
+
var subject = new AnonymousSubject(this, this);
|
|
3518
|
+
subject.operator = operator;
|
|
3519
|
+
return subject;
|
|
3520
|
+
};
|
|
3521
|
+
Subject.prototype._throwIfClosed = function () {
|
|
3522
|
+
if (this.closed) {
|
|
3523
|
+
throw new ObjectUnsubscribedError();
|
|
3524
|
+
}
|
|
3525
|
+
};
|
|
3526
|
+
Subject.prototype.next = function (value) {
|
|
3527
|
+
var _this = this;
|
|
3528
|
+
errorContext(function () {
|
|
3529
|
+
var e_1, _a;
|
|
3530
|
+
_this._throwIfClosed();
|
|
3531
|
+
if (!_this.isStopped) {
|
|
3532
|
+
var copy = _this.observers.slice();
|
|
3533
|
+
try {
|
|
3534
|
+
for (var copy_1 = __values(copy), copy_1_1 = copy_1.next(); !copy_1_1.done; copy_1_1 = copy_1.next()) {
|
|
3535
|
+
var observer = copy_1_1.value;
|
|
3536
|
+
observer.next(value);
|
|
3537
|
+
}
|
|
3538
|
+
}
|
|
3539
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3540
|
+
finally {
|
|
3541
|
+
try {
|
|
3542
|
+
if (copy_1_1 && !copy_1_1.done && (_a = copy_1.return)) _a.call(copy_1);
|
|
3543
|
+
}
|
|
3544
|
+
finally { if (e_1) throw e_1.error; }
|
|
3545
|
+
}
|
|
3546
|
+
}
|
|
3547
|
+
});
|
|
3548
|
+
};
|
|
3549
|
+
Subject.prototype.error = function (err) {
|
|
3550
|
+
var _this = this;
|
|
3551
|
+
errorContext(function () {
|
|
3552
|
+
_this._throwIfClosed();
|
|
3553
|
+
if (!_this.isStopped) {
|
|
3554
|
+
_this.hasError = _this.isStopped = true;
|
|
3555
|
+
_this.thrownError = err;
|
|
3556
|
+
var observers = _this.observers;
|
|
3557
|
+
while (observers.length) {
|
|
3558
|
+
observers.shift().error(err);
|
|
3559
|
+
}
|
|
3560
|
+
}
|
|
3561
|
+
});
|
|
3562
|
+
};
|
|
3563
|
+
Subject.prototype.complete = function () {
|
|
3564
|
+
var _this = this;
|
|
3565
|
+
errorContext(function () {
|
|
3566
|
+
_this._throwIfClosed();
|
|
3567
|
+
if (!_this.isStopped) {
|
|
3568
|
+
_this.isStopped = true;
|
|
3569
|
+
var observers = _this.observers;
|
|
3570
|
+
while (observers.length) {
|
|
3571
|
+
observers.shift().complete();
|
|
3572
|
+
}
|
|
3573
|
+
}
|
|
3574
|
+
});
|
|
3575
|
+
};
|
|
3576
|
+
Subject.prototype.unsubscribe = function () {
|
|
3577
|
+
this.isStopped = this.closed = true;
|
|
3578
|
+
this.observers = null;
|
|
3579
|
+
};
|
|
3580
|
+
Object.defineProperty(Subject.prototype, "observed", {
|
|
3581
|
+
get: function () {
|
|
3582
|
+
var _a;
|
|
3583
|
+
return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
3584
|
+
},
|
|
3585
|
+
enumerable: false,
|
|
3586
|
+
configurable: true
|
|
3587
|
+
});
|
|
3588
|
+
Subject.prototype._trySubscribe = function (subscriber) {
|
|
3589
|
+
this._throwIfClosed();
|
|
3590
|
+
return _super.prototype._trySubscribe.call(this, subscriber);
|
|
3591
|
+
};
|
|
3592
|
+
Subject.prototype._subscribe = function (subscriber) {
|
|
3593
|
+
this._throwIfClosed();
|
|
3594
|
+
this._checkFinalizedStatuses(subscriber);
|
|
3595
|
+
return this._innerSubscribe(subscriber);
|
|
3596
|
+
};
|
|
3597
|
+
Subject.prototype._innerSubscribe = function (subscriber) {
|
|
3598
|
+
var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;
|
|
3599
|
+
return hasError || isStopped
|
|
3600
|
+
? EMPTY_SUBSCRIPTION
|
|
3601
|
+
: (observers.push(subscriber), new Subscription(function () { return arrRemove(observers, subscriber); }));
|
|
3602
|
+
};
|
|
3603
|
+
Subject.prototype._checkFinalizedStatuses = function (subscriber) {
|
|
3604
|
+
var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;
|
|
3605
|
+
if (hasError) {
|
|
3606
|
+
subscriber.error(thrownError);
|
|
3607
|
+
}
|
|
3608
|
+
else if (isStopped) {
|
|
3609
|
+
subscriber.complete();
|
|
3610
|
+
}
|
|
3611
|
+
};
|
|
3612
|
+
Subject.prototype.asObservable = function () {
|
|
3613
|
+
var observable = new Observable();
|
|
3614
|
+
observable.source = this;
|
|
3615
|
+
return observable;
|
|
3616
|
+
};
|
|
3617
|
+
Subject.create = function (destination, source) {
|
|
3618
|
+
return new AnonymousSubject(destination, source);
|
|
3619
|
+
};
|
|
3620
|
+
return Subject;
|
|
3621
|
+
}(Observable));
|
|
3622
|
+
var AnonymousSubject = (function (_super) {
|
|
3623
|
+
__extends(AnonymousSubject, _super);
|
|
3624
|
+
function AnonymousSubject(destination, source) {
|
|
3625
|
+
var _this = _super.call(this) || this;
|
|
3626
|
+
_this.destination = destination;
|
|
3627
|
+
_this.source = source;
|
|
3628
|
+
return _this;
|
|
3629
|
+
}
|
|
3630
|
+
AnonymousSubject.prototype.next = function (value) {
|
|
3631
|
+
var _a, _b;
|
|
3632
|
+
(_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);
|
|
3633
|
+
};
|
|
3634
|
+
AnonymousSubject.prototype.error = function (err) {
|
|
3635
|
+
var _a, _b;
|
|
3636
|
+
(_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);
|
|
3637
|
+
};
|
|
3638
|
+
AnonymousSubject.prototype.complete = function () {
|
|
3639
|
+
var _a, _b;
|
|
3640
|
+
(_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
3641
|
+
};
|
|
3642
|
+
AnonymousSubject.prototype._subscribe = function (subscriber) {
|
|
3643
|
+
var _a, _b;
|
|
3644
|
+
return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;
|
|
3645
|
+
};
|
|
3646
|
+
return AnonymousSubject;
|
|
3647
|
+
}(Subject));
|
|
3648
|
+
|
|
3649
|
+
var es2018 = {};
|
|
3650
|
+
|
|
3651
|
+
var array = {};
|
|
3652
|
+
|
|
3653
|
+
array.isntEmptyArray = array.isEmptyArray = array.isntArray = array.isArray = void 0;
|
|
3654
|
+
function isArray(val) {
|
|
3655
|
+
return Array.isArray(val);
|
|
3656
|
+
}
|
|
3657
|
+
array.isArray = isArray;
|
|
3658
|
+
function isntArray(val) {
|
|
3659
|
+
return !isArray(val);
|
|
3660
|
+
}
|
|
3661
|
+
array.isntArray = isntArray;
|
|
3662
|
+
function isEmptyArray(val) {
|
|
3663
|
+
return val.length === 0;
|
|
3664
|
+
}
|
|
3665
|
+
array.isEmptyArray = isEmptyArray;
|
|
3666
|
+
function isntEmptyArray(val) {
|
|
3667
|
+
return val.length !== 0;
|
|
3668
|
+
}
|
|
3669
|
+
array.isntEmptyArray = isntEmptyArray;
|
|
3670
|
+
|
|
3671
|
+
var asyncIterable = {};
|
|
3672
|
+
|
|
3673
|
+
var _null = {};
|
|
3674
|
+
|
|
3675
|
+
_null.isntNull = _null.isNull = void 0;
|
|
3676
|
+
function isNull(val) {
|
|
3677
|
+
return val === null;
|
|
3678
|
+
}
|
|
3679
|
+
_null.isNull = isNull;
|
|
3680
|
+
function isntNull(val) {
|
|
3681
|
+
return !isNull(val);
|
|
3682
|
+
}
|
|
3683
|
+
_null.isntNull = isntNull;
|
|
3684
|
+
|
|
3685
|
+
var _undefined = {};
|
|
3686
|
+
|
|
3687
|
+
_undefined.isntUndefined = _undefined.isUndefined = void 0;
|
|
3688
|
+
function isUndefined(val) {
|
|
3689
|
+
return val === undefined;
|
|
3690
|
+
}
|
|
3691
|
+
_undefined.isUndefined = isUndefined;
|
|
3692
|
+
function isntUndefined(val) {
|
|
3693
|
+
return !isUndefined(val);
|
|
3694
|
+
}
|
|
3695
|
+
_undefined.isntUndefined = isntUndefined;
|
|
3696
|
+
|
|
3697
|
+
asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
|
|
3698
|
+
const null_1$1 = _null;
|
|
3699
|
+
const undefined_1$2 = _undefined;
|
|
3700
|
+
function isAsyncIterable(val) {
|
|
3701
|
+
return (0, null_1$1.isntNull)(val)
|
|
3702
|
+
&& (0, undefined_1$2.isntUndefined)(val)
|
|
3703
|
+
&& typeof val[Symbol.asyncIterator] === 'function';
|
|
3704
|
+
}
|
|
3705
|
+
asyncIterable.isAsyncIterable = isAsyncIterable;
|
|
3706
|
+
function isntAsyncIterable(val) {
|
|
3707
|
+
return !isAsyncIterable(val);
|
|
3708
|
+
}
|
|
3709
|
+
asyncIterable.isntAsyncIterable = isntAsyncIterable;
|
|
3710
|
+
|
|
3711
|
+
var bigint = {};
|
|
3712
|
+
|
|
3713
|
+
bigint.isntBigInt = bigint.isBigInt = void 0;
|
|
3714
|
+
function isBigInt(val) {
|
|
3715
|
+
return typeof val === 'bigint';
|
|
3716
|
+
}
|
|
3717
|
+
bigint.isBigInt = isBigInt;
|
|
3718
|
+
function isntBigInt(val) {
|
|
3719
|
+
return !isBigInt(val);
|
|
3720
|
+
}
|
|
3721
|
+
bigint.isntBigInt = isntBigInt;
|
|
3722
|
+
|
|
3723
|
+
var boolean = {};
|
|
3724
|
+
|
|
3725
|
+
boolean.isntBoolean = boolean.isBoolean = void 0;
|
|
3726
|
+
function isBoolean(val) {
|
|
3727
|
+
return typeof val === 'boolean';
|
|
3728
|
+
}
|
|
3729
|
+
boolean.isBoolean = isBoolean;
|
|
3730
|
+
function isntBoolean(val) {
|
|
3731
|
+
return !isBoolean(val);
|
|
3732
|
+
}
|
|
3733
|
+
boolean.isntBoolean = isntBoolean;
|
|
3734
|
+
|
|
3735
|
+
var char = {};
|
|
3736
|
+
|
|
3737
|
+
var string = {};
|
|
3738
|
+
|
|
3739
|
+
string.isntString = string.isString = void 0;
|
|
3740
|
+
function isString(val) {
|
|
3741
|
+
return typeof val === 'string';
|
|
3742
|
+
}
|
|
3743
|
+
string.isString = isString;
|
|
3744
|
+
function isntString(val) {
|
|
3745
|
+
return !isString(val);
|
|
3746
|
+
}
|
|
3747
|
+
string.isntString = isntString;
|
|
3748
|
+
|
|
3749
|
+
char.isntChar = char.isChar = void 0;
|
|
3750
|
+
const string_1$1 = string;
|
|
3751
|
+
function isChar(val) {
|
|
3752
|
+
return (0, string_1$1.isString)(val)
|
|
3753
|
+
&& val.length === 1;
|
|
3754
|
+
}
|
|
3755
|
+
char.isChar = isChar;
|
|
3756
|
+
function isntChar(val) {
|
|
3757
|
+
return !isChar(val);
|
|
3758
|
+
}
|
|
3759
|
+
char.isntChar = isntChar;
|
|
3760
|
+
|
|
3761
|
+
var date = {};
|
|
3762
|
+
|
|
3763
|
+
date.isntDate = date.isDate = void 0;
|
|
3764
|
+
function isDate(val) {
|
|
3765
|
+
return val instanceof Date;
|
|
3766
|
+
}
|
|
3767
|
+
date.isDate = isDate;
|
|
3768
|
+
function isntDate(val) {
|
|
3769
|
+
return !isDate(val);
|
|
3770
|
+
}
|
|
3771
|
+
date.isntDate = isntDate;
|
|
3772
|
+
|
|
3773
|
+
var _enum = {};
|
|
3774
|
+
|
|
3775
|
+
_enum.inEnum = void 0;
|
|
3776
|
+
function inEnum(val, _enum) {
|
|
3777
|
+
return Object.values(_enum).includes(val);
|
|
3778
|
+
}
|
|
3779
|
+
_enum.inEnum = inEnum;
|
|
3780
|
+
|
|
3781
|
+
var error = {};
|
|
3782
|
+
|
|
3783
|
+
error.isntError = error.isError = void 0;
|
|
3784
|
+
function isError(val) {
|
|
3785
|
+
return val instanceof Error;
|
|
3786
|
+
}
|
|
3787
|
+
error.isError = isError;
|
|
3788
|
+
function isntError(val) {
|
|
3789
|
+
return !isError(val);
|
|
3790
|
+
}
|
|
3791
|
+
error.isntError = isntError;
|
|
3792
|
+
|
|
3793
|
+
var falsy = {};
|
|
3794
|
+
|
|
3795
|
+
falsy.isntFalsy = falsy.isFalsy = void 0;
|
|
3796
|
+
function isFalsy(val) {
|
|
3797
|
+
return !val;
|
|
3798
|
+
}
|
|
3799
|
+
falsy.isFalsy = isFalsy;
|
|
3800
|
+
function isntFalsy(val) {
|
|
3801
|
+
return !isFalsy(val);
|
|
3802
|
+
}
|
|
3803
|
+
falsy.isntFalsy = isntFalsy;
|
|
3804
|
+
|
|
3805
|
+
var _function = {};
|
|
3806
|
+
|
|
3807
|
+
_function.isntFunction = _function.isFunction = void 0;
|
|
3808
|
+
function isFunction(val) {
|
|
3809
|
+
return typeof val === 'function';
|
|
3810
|
+
}
|
|
3811
|
+
_function.isFunction = isFunction;
|
|
3812
|
+
function isntFunction(val) {
|
|
3813
|
+
return !isFunction(val);
|
|
3814
|
+
}
|
|
3815
|
+
_function.isntFunction = isntFunction;
|
|
3816
|
+
|
|
3817
|
+
var iterable = {};
|
|
3818
|
+
|
|
3819
|
+
iterable.isntIterable = iterable.isIterable = void 0;
|
|
3820
|
+
const null_1 = _null;
|
|
3821
|
+
const undefined_1$1 = _undefined;
|
|
3822
|
+
function isIterable(val) {
|
|
3823
|
+
return (0, null_1.isntNull)(val)
|
|
3824
|
+
&& (0, undefined_1$1.isntUndefined)(val)
|
|
3825
|
+
&& typeof val[Symbol.iterator] === 'function';
|
|
3826
|
+
}
|
|
3827
|
+
iterable.isIterable = isIterable;
|
|
3828
|
+
function isntIterable(val) {
|
|
3829
|
+
return !isIterable(val);
|
|
3830
|
+
}
|
|
3831
|
+
iterable.isntIterable = isntIterable;
|
|
3832
|
+
|
|
3833
|
+
var jsonRpc = {};
|
|
3834
|
+
|
|
3835
|
+
var object = {};
|
|
3836
|
+
|
|
3837
|
+
object.isntEmptyObject = object.isEmptyObject = object.isRecord = object.isntObject = object.isObject = void 0;
|
|
3838
|
+
function isObject(val) {
|
|
3839
|
+
return val !== null && typeof val === 'object';
|
|
3840
|
+
}
|
|
3841
|
+
object.isObject = isObject;
|
|
3842
|
+
function isntObject(val) {
|
|
3843
|
+
return !isObject(val);
|
|
3844
|
+
}
|
|
3845
|
+
object.isntObject = isntObject;
|
|
3846
|
+
function isRecord(val) {
|
|
3847
|
+
return isObject(val);
|
|
3848
|
+
}
|
|
3849
|
+
object.isRecord = isRecord;
|
|
3850
|
+
function isEmptyObject(val) {
|
|
3851
|
+
return Object.keys(val).length === 0;
|
|
3852
|
+
}
|
|
3853
|
+
object.isEmptyObject = isEmptyObject;
|
|
3854
|
+
function isntEmptyObject(val) {
|
|
3855
|
+
return Object.keys(val).length !== 0;
|
|
3856
|
+
}
|
|
3857
|
+
object.isntEmptyObject = isntEmptyObject;
|
|
3858
|
+
|
|
3859
|
+
var number = {};
|
|
3860
|
+
|
|
3861
|
+
number.isntNumber = number.isNumber = void 0;
|
|
3862
|
+
function isNumber(val) {
|
|
3863
|
+
return typeof val === 'number';
|
|
3864
|
+
}
|
|
3865
|
+
number.isNumber = isNumber;
|
|
3866
|
+
function isntNumber(val) {
|
|
3867
|
+
return !isNumber(val);
|
|
3868
|
+
}
|
|
3869
|
+
number.isntNumber = isntNumber;
|
|
3870
|
+
|
|
3871
|
+
jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
|
|
3872
|
+
const array_1 = array;
|
|
3873
|
+
const object_1 = object;
|
|
3874
|
+
const string_1 = string;
|
|
3875
|
+
const number_1 = number;
|
|
3876
|
+
const undefined_1 = _undefined;
|
|
3877
|
+
function isJsonRpcId(val) {
|
|
3878
|
+
return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
|
|
3879
|
+
}
|
|
3880
|
+
function isJsonRpcParams(val) {
|
|
3881
|
+
return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
|
|
3882
|
+
}
|
|
3883
|
+
function isJsonRpcNotification(val) {
|
|
3884
|
+
return (0, object_1.isRecord)(val)
|
|
3885
|
+
&& (0, string_1.isString)(val.jsonrpc)
|
|
3886
|
+
&& (0, string_1.isString)(val.method)
|
|
3887
|
+
&& (0, undefined_1.isUndefined)(val.id)
|
|
3888
|
+
&& isJsonRpcParams(val.params);
|
|
3889
|
+
}
|
|
3890
|
+
jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
|
|
3891
|
+
function isntJsonRpcNotification(val) {
|
|
3892
|
+
return !isJsonRpcNotification(val);
|
|
3893
|
+
}
|
|
3894
|
+
jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
|
|
3895
|
+
function isJsonRpcRequest(val) {
|
|
3896
|
+
return (0, object_1.isRecord)(val)
|
|
3897
|
+
&& (0, string_1.isString)(val.jsonrpc)
|
|
3898
|
+
&& (0, string_1.isString)(val.method)
|
|
3899
|
+
&& isJsonRpcId(val.id)
|
|
3900
|
+
&& isJsonRpcParams(val.params);
|
|
3901
|
+
}
|
|
3902
|
+
jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
|
|
3903
|
+
function isntJsonRpcRequest(val) {
|
|
3904
|
+
return !isJsonRpcRequest(val);
|
|
3905
|
+
}
|
|
3906
|
+
jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
|
|
3907
|
+
function isJsonRpcSuccess(val) {
|
|
3908
|
+
return (0, object_1.isRecord)(val)
|
|
3909
|
+
&& (0, string_1.isString)(val.jsonrpc)
|
|
3910
|
+
&& (0, string_1.isString)(val.id)
|
|
3911
|
+
&& 'result' in val;
|
|
3912
|
+
}
|
|
3913
|
+
jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
|
|
3914
|
+
function isntJsonRpcSuccess(val) {
|
|
3915
|
+
return !isJsonRpcSuccess(val);
|
|
3916
|
+
}
|
|
3917
|
+
jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
|
|
3918
|
+
function isJsonRpcError(val) {
|
|
3919
|
+
return (0, object_1.isRecord)(val)
|
|
3920
|
+
&& (0, string_1.isString)(val.jsonrpc)
|
|
3921
|
+
&& isJsonRpcId(val.id)
|
|
3922
|
+
&& isJsonRpcErrorObject(val.error);
|
|
3923
|
+
}
|
|
3924
|
+
jsonRpc.isJsonRpcError = isJsonRpcError;
|
|
3925
|
+
function isntJsonRpcError(val) {
|
|
3926
|
+
return !isJsonRpcError(val);
|
|
3927
|
+
}
|
|
3928
|
+
jsonRpc.isntJsonRpcError = isntJsonRpcError;
|
|
3929
|
+
function isJsonRpcErrorObject(val) {
|
|
3930
|
+
return (0, object_1.isRecord)(val)
|
|
3931
|
+
&& (0, number_1.isNumber)(val.code)
|
|
3932
|
+
&& (0, string_1.isString)(val.message)
|
|
3933
|
+
&& ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
|
|
3934
|
+
}
|
|
3935
|
+
|
|
3936
|
+
var json = {};
|
|
3937
|
+
|
|
3938
|
+
json.isntJson = json.isJson = void 0;
|
|
3939
|
+
function isJson(val) {
|
|
3940
|
+
try {
|
|
3941
|
+
JSON.stringify(val);
|
|
3942
|
+
return true;
|
|
3943
|
+
}
|
|
3944
|
+
catch (_a) {
|
|
3945
|
+
return false;
|
|
3946
|
+
}
|
|
3947
|
+
}
|
|
3948
|
+
json.isJson = isJson;
|
|
3949
|
+
function isntJson(val) {
|
|
3950
|
+
return !isntJson();
|
|
3951
|
+
}
|
|
3952
|
+
json.isntJson = isntJson;
|
|
3953
|
+
|
|
3954
|
+
var url = {};
|
|
3955
|
+
|
|
3956
|
+
url.isAbsoluteURL = void 0;
|
|
3957
|
+
function isAbsoluteURL(str) {
|
|
3958
|
+
try {
|
|
3959
|
+
new URL(str);
|
|
3960
|
+
return true;
|
|
3961
|
+
}
|
|
3962
|
+
catch (_a) {
|
|
3963
|
+
return false;
|
|
3964
|
+
}
|
|
3965
|
+
}
|
|
3966
|
+
url.isAbsoluteURL = isAbsoluteURL;
|
|
3967
|
+
|
|
3968
|
+
(function (exports) {
|
|
3969
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3970
|
+
if (k2 === undefined) k2 = k;
|
|
3971
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
3972
|
+
}) : (function(o, m, k, k2) {
|
|
3973
|
+
if (k2 === undefined) k2 = k;
|
|
3974
|
+
o[k2] = m[k];
|
|
3975
|
+
}));
|
|
3976
|
+
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
3977
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
3978
|
+
};__exportStar(array, exports);
|
|
3979
|
+
__exportStar(asyncIterable, exports);
|
|
3980
|
+
__exportStar(bigint, exports);
|
|
3981
|
+
__exportStar(boolean, exports);
|
|
3982
|
+
__exportStar(char, exports);
|
|
3983
|
+
__exportStar(date, exports);
|
|
3984
|
+
__exportStar(_enum, exports);
|
|
3985
|
+
__exportStar(error, exports);
|
|
3986
|
+
__exportStar(falsy, exports);
|
|
3987
|
+
__exportStar(_function, exports);
|
|
3988
|
+
__exportStar(iterable, exports);
|
|
3989
|
+
__exportStar(jsonRpc, exports);
|
|
3990
|
+
__exportStar(json, exports);
|
|
3991
|
+
__exportStar(_null, exports);
|
|
3992
|
+
__exportStar(number, exports);
|
|
3993
|
+
__exportStar(object, exports);
|
|
3994
|
+
__exportStar(string, exports);
|
|
3995
|
+
__exportStar(_undefined, exports);
|
|
3996
|
+
__exportStar(url, exports);
|
|
3997
|
+
|
|
3998
|
+
}(es2018));
|
|
3999
|
+
|
|
4000
|
+
class ObservableFiniteStateMachine extends FiniteStateMachine {
|
|
4001
|
+
constructor() {
|
|
4002
|
+
super(...arguments);
|
|
4003
|
+
this.stateChanged = new Subject();
|
|
4004
|
+
}
|
|
4005
|
+
get stateChangedObservable() {
|
|
4006
|
+
return this.stateChanged;
|
|
4007
|
+
}
|
|
4008
|
+
/**
|
|
4009
|
+
* @throws {BadEventError}
|
|
4010
|
+
*/
|
|
4011
|
+
send(event) {
|
|
4012
|
+
const oldState = this.state;
|
|
4013
|
+
super.send(event);
|
|
4014
|
+
const newState = this.state;
|
|
4015
|
+
this.stateChanged.next({ event, oldState, newState });
|
|
4016
|
+
if (es2018.isEmptyObject(this.schema[newState])) {
|
|
4017
|
+
this.stateChanged.complete();
|
|
4018
|
+
}
|
|
4019
|
+
}
|
|
4020
|
+
}
|
|
4021
|
+
|
|
4022
|
+
export { BadEventError, Box, Emitter, ExpirableMap, FiniteStateMachine, HashMap, HashSet, LRUMap, ObservableFiniteStateMachine, Queue, TLRUMap, TrieMap, convertArrayToCons, convertConsToArray };
|
|
2942
4023
|
//# sourceMappingURL=index.mjs.map
|