@jscutlery/operators 2.1.1 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs DELETED
@@ -1,1154 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var rxjs = require('rxjs');
6
- var operators = require('rxjs/operators');
7
-
8
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
9
-
10
- var check = function (it) {
11
- return it && it.Math == Math && it;
12
- };
13
-
14
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
15
- var global$a =
16
- // eslint-disable-next-line es-x/no-global-this -- safe
17
- check(typeof globalThis == 'object' && globalThis) ||
18
- check(typeof window == 'object' && window) ||
19
- // eslint-disable-next-line no-restricted-globals -- safe
20
- check(typeof self == 'object' && self) ||
21
- check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
22
- // eslint-disable-next-line no-new-func -- fallback
23
- (function () { return this; })() || Function('return this')();
24
-
25
- var objectGetOwnPropertyDescriptor = {};
26
-
27
- var fails$9 = function (exec) {
28
- try {
29
- return !!exec();
30
- } catch (error) {
31
- return true;
32
- }
33
- };
34
-
35
- var fails$8 = fails$9;
36
-
37
- // Detect IE8's incomplete defineProperty implementation
38
- var descriptors = !fails$8(function () {
39
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
40
- return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
41
- });
42
-
43
- var fails$7 = fails$9;
44
-
45
- var functionBindNative = !fails$7(function () {
46
- // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
47
- var test = (function () { /* empty */ }).bind();
48
- // eslint-disable-next-line no-prototype-builtins -- safe
49
- return typeof test != 'function' || test.hasOwnProperty('prototype');
50
- });
51
-
52
- var NATIVE_BIND$1 = functionBindNative;
53
-
54
- var call$5 = Function.prototype.call;
55
-
56
- var functionCall = NATIVE_BIND$1 ? call$5.bind(call$5) : function () {
57
- return call$5.apply(call$5, arguments);
58
- };
59
-
60
- var objectPropertyIsEnumerable = {};
61
-
62
- var $propertyIsEnumerable = {}.propertyIsEnumerable;
63
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
64
- var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
65
-
66
- // Nashorn ~ JDK8 bug
67
- var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
68
-
69
- // `Object.prototype.propertyIsEnumerable` method implementation
70
- // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
71
- objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
72
- var descriptor = getOwnPropertyDescriptor$1(this, V);
73
- return !!descriptor && descriptor.enumerable;
74
- } : $propertyIsEnumerable;
75
-
76
- var createPropertyDescriptor$2 = function (bitmap, value) {
77
- return {
78
- enumerable: !(bitmap & 1),
79
- configurable: !(bitmap & 2),
80
- writable: !(bitmap & 4),
81
- value: value
82
- };
83
- };
84
-
85
- var NATIVE_BIND = functionBindNative;
86
-
87
- var FunctionPrototype$1 = Function.prototype;
88
- var bind = FunctionPrototype$1.bind;
89
- var call$4 = FunctionPrototype$1.call;
90
- var uncurryThis$a = NATIVE_BIND && bind.bind(call$4, call$4);
91
-
92
- var functionUncurryThis = NATIVE_BIND ? function (fn) {
93
- return fn && uncurryThis$a(fn);
94
- } : function (fn) {
95
- return fn && function () {
96
- return call$4.apply(fn, arguments);
97
- };
98
- };
99
-
100
- var uncurryThis$9 = functionUncurryThis;
101
-
102
- var toString$1 = uncurryThis$9({}.toString);
103
- var stringSlice = uncurryThis$9(''.slice);
104
-
105
- var classofRaw = function (it) {
106
- return stringSlice(toString$1(it), 8, -1);
107
- };
108
-
109
- var uncurryThis$8 = functionUncurryThis;
110
- var fails$6 = fails$9;
111
- var classof = classofRaw;
112
-
113
- var $Object$2 = Object;
114
- var split = uncurryThis$8(''.split);
115
-
116
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
117
- var indexedObject = fails$6(function () {
118
- // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
119
- // eslint-disable-next-line no-prototype-builtins -- safe
120
- return !$Object$2('z').propertyIsEnumerable(0);
121
- }) ? function (it) {
122
- return classof(it) == 'String' ? split(it, '') : $Object$2(it);
123
- } : $Object$2;
124
-
125
- // we can't use just `it == null` since of `document.all` special case
126
- // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
127
- var isNullOrUndefined$2 = function (it) {
128
- return it === null || it === undefined;
129
- };
130
-
131
- var isNullOrUndefined$1 = isNullOrUndefined$2;
132
-
133
- var $TypeError$5 = TypeError;
134
-
135
- // `RequireObjectCoercible` abstract operation
136
- // https://tc39.es/ecma262/#sec-requireobjectcoercible
137
- var requireObjectCoercible$2 = function (it) {
138
- if (isNullOrUndefined$1(it)) throw $TypeError$5("Can't call method on " + it);
139
- return it;
140
- };
141
-
142
- // toObject with fallback for non-array-like ES3 strings
143
- var IndexedObject$1 = indexedObject;
144
- var requireObjectCoercible$1 = requireObjectCoercible$2;
145
-
146
- var toIndexedObject$3 = function (it) {
147
- return IndexedObject$1(requireObjectCoercible$1(it));
148
- };
149
-
150
- // `IsCallable` abstract operation
151
- // https://tc39.es/ecma262/#sec-iscallable
152
- var isCallable$a = function (argument) {
153
- return typeof argument == 'function';
154
- };
155
-
156
- var isCallable$9 = isCallable$a;
157
-
158
- var documentAll = typeof document == 'object' && document.all;
159
-
160
- // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
161
- var SPECIAL_DOCUMENT_ALL = typeof documentAll == 'undefined' && documentAll !== undefined;
162
-
163
- var isObject$5 = SPECIAL_DOCUMENT_ALL ? function (it) {
164
- return typeof it == 'object' ? it !== null : isCallable$9(it) || it === documentAll;
165
- } : function (it) {
166
- return typeof it == 'object' ? it !== null : isCallable$9(it);
167
- };
168
-
169
- var global$9 = global$a;
170
- var isCallable$8 = isCallable$a;
171
-
172
- var aFunction = function (argument) {
173
- return isCallable$8(argument) ? argument : undefined;
174
- };
175
-
176
- var getBuiltIn$3 = function (namespace, method) {
177
- return arguments.length < 2 ? aFunction(global$9[namespace]) : global$9[namespace] && global$9[namespace][method];
178
- };
179
-
180
- var uncurryThis$7 = functionUncurryThis;
181
-
182
- var objectIsPrototypeOf = uncurryThis$7({}.isPrototypeOf);
183
-
184
- var getBuiltIn$2 = getBuiltIn$3;
185
-
186
- var engineUserAgent = getBuiltIn$2('navigator', 'userAgent') || '';
187
-
188
- var global$8 = global$a;
189
- var userAgent = engineUserAgent;
190
-
191
- var process = global$8.process;
192
- var Deno = global$8.Deno;
193
- var versions = process && process.versions || Deno && Deno.version;
194
- var v8 = versions && versions.v8;
195
- var match, version;
196
-
197
- if (v8) {
198
- match = v8.split('.');
199
- // in old Chrome, versions of V8 isn't V8 = Chrome / 10
200
- // but their correct versions are not interesting for us
201
- version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
202
- }
203
-
204
- // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
205
- // so check `userAgent` even if `.v8` exists, but 0
206
- if (!version && userAgent) {
207
- match = userAgent.match(/Edge\/(\d+)/);
208
- if (!match || match[1] >= 74) {
209
- match = userAgent.match(/Chrome\/(\d+)/);
210
- if (match) version = +match[1];
211
- }
212
- }
213
-
214
- var engineV8Version = version;
215
-
216
- /* eslint-disable es-x/no-symbol -- required for testing */
217
-
218
- var V8_VERSION = engineV8Version;
219
- var fails$5 = fails$9;
220
-
221
- // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
222
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5(function () {
223
- var symbol = Symbol();
224
- // Chrome 38 Symbol has incorrect toString conversion
225
- // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
226
- return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
227
- // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
228
- !Symbol.sham && V8_VERSION && V8_VERSION < 41;
229
- });
230
-
231
- /* eslint-disable es-x/no-symbol -- required for testing */
232
-
233
- var NATIVE_SYMBOL$1 = symbolConstructorDetection;
234
-
235
- var useSymbolAsUid = NATIVE_SYMBOL$1
236
- && !Symbol.sham
237
- && typeof Symbol.iterator == 'symbol';
238
-
239
- var getBuiltIn$1 = getBuiltIn$3;
240
- var isCallable$7 = isCallable$a;
241
- var isPrototypeOf = objectIsPrototypeOf;
242
- var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
243
-
244
- var $Object$1 = Object;
245
-
246
- var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
247
- return typeof it == 'symbol';
248
- } : function (it) {
249
- var $Symbol = getBuiltIn$1('Symbol');
250
- return isCallable$7($Symbol) && isPrototypeOf($Symbol.prototype, $Object$1(it));
251
- };
252
-
253
- var $String$1 = String;
254
-
255
- var tryToString$1 = function (argument) {
256
- try {
257
- return $String$1(argument);
258
- } catch (error) {
259
- return 'Object';
260
- }
261
- };
262
-
263
- var isCallable$6 = isCallable$a;
264
- var tryToString = tryToString$1;
265
-
266
- var $TypeError$4 = TypeError;
267
-
268
- // `Assert: IsCallable(argument) is true`
269
- var aCallable$1 = function (argument) {
270
- if (isCallable$6(argument)) return argument;
271
- throw $TypeError$4(tryToString(argument) + ' is not a function');
272
- };
273
-
274
- var aCallable = aCallable$1;
275
- var isNullOrUndefined = isNullOrUndefined$2;
276
-
277
- // `GetMethod` abstract operation
278
- // https://tc39.es/ecma262/#sec-getmethod
279
- var getMethod$1 = function (V, P) {
280
- var func = V[P];
281
- return isNullOrUndefined(func) ? undefined : aCallable(func);
282
- };
283
-
284
- var call$3 = functionCall;
285
- var isCallable$5 = isCallable$a;
286
- var isObject$4 = isObject$5;
287
-
288
- var $TypeError$3 = TypeError;
289
-
290
- // `OrdinaryToPrimitive` abstract operation
291
- // https://tc39.es/ecma262/#sec-ordinarytoprimitive
292
- var ordinaryToPrimitive$1 = function (input, pref) {
293
- var fn, val;
294
- if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
295
- if (isCallable$5(fn = input.valueOf) && !isObject$4(val = call$3(fn, input))) return val;
296
- if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
297
- throw $TypeError$3("Can't convert object to primitive value");
298
- };
299
-
300
- var shared$3 = {exports: {}};
301
-
302
- var global$7 = global$a;
303
-
304
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
305
- var defineProperty$2 = Object.defineProperty;
306
-
307
- var defineGlobalProperty$3 = function (key, value) {
308
- try {
309
- defineProperty$2(global$7, key, { value: value, configurable: true, writable: true });
310
- } catch (error) {
311
- global$7[key] = value;
312
- } return value;
313
- };
314
-
315
- var global$6 = global$a;
316
- var defineGlobalProperty$2 = defineGlobalProperty$3;
317
-
318
- var SHARED = '__core-js_shared__';
319
- var store$3 = global$6[SHARED] || defineGlobalProperty$2(SHARED, {});
320
-
321
- var sharedStore = store$3;
322
-
323
- var store$2 = sharedStore;
324
-
325
- (shared$3.exports = function (key, value) {
326
- return store$2[key] || (store$2[key] = value !== undefined ? value : {});
327
- })('versions', []).push({
328
- version: '3.25.0',
329
- mode: 'global',
330
- copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
331
- license: 'https://github.com/zloirock/core-js/blob/v3.25.0/LICENSE',
332
- source: 'https://github.com/zloirock/core-js'
333
- });
334
-
335
- var requireObjectCoercible = requireObjectCoercible$2;
336
-
337
- var $Object = Object;
338
-
339
- // `ToObject` abstract operation
340
- // https://tc39.es/ecma262/#sec-toobject
341
- var toObject$2 = function (argument) {
342
- return $Object(requireObjectCoercible(argument));
343
- };
344
-
345
- var uncurryThis$6 = functionUncurryThis;
346
- var toObject$1 = toObject$2;
347
-
348
- var hasOwnProperty = uncurryThis$6({}.hasOwnProperty);
349
-
350
- // `HasOwnProperty` abstract operation
351
- // https://tc39.es/ecma262/#sec-hasownproperty
352
- // eslint-disable-next-line es-x/no-object-hasown -- safe
353
- var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
354
- return hasOwnProperty(toObject$1(it), key);
355
- };
356
-
357
- var uncurryThis$5 = functionUncurryThis;
358
-
359
- var id = 0;
360
- var postfix = Math.random();
361
- var toString = uncurryThis$5(1.0.toString);
362
-
363
- var uid$2 = function (key) {
364
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
365
- };
366
-
367
- var global$5 = global$a;
368
- var shared$2 = shared$3.exports;
369
- var hasOwn$6 = hasOwnProperty_1;
370
- var uid$1 = uid$2;
371
- var NATIVE_SYMBOL = symbolConstructorDetection;
372
- var USE_SYMBOL_AS_UID = useSymbolAsUid;
373
-
374
- var WellKnownSymbolsStore = shared$2('wks');
375
- var Symbol$1 = global$5.Symbol;
376
- var symbolFor = Symbol$1 && Symbol$1['for'];
377
- var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
378
-
379
- var wellKnownSymbol$1 = function (name) {
380
- if (!hasOwn$6(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
381
- var description = 'Symbol.' + name;
382
- if (NATIVE_SYMBOL && hasOwn$6(Symbol$1, name)) {
383
- WellKnownSymbolsStore[name] = Symbol$1[name];
384
- } else if (USE_SYMBOL_AS_UID && symbolFor) {
385
- WellKnownSymbolsStore[name] = symbolFor(description);
386
- } else {
387
- WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
388
- }
389
- } return WellKnownSymbolsStore[name];
390
- };
391
-
392
- var call$2 = functionCall;
393
- var isObject$3 = isObject$5;
394
- var isSymbol$1 = isSymbol$2;
395
- var getMethod = getMethod$1;
396
- var ordinaryToPrimitive = ordinaryToPrimitive$1;
397
- var wellKnownSymbol = wellKnownSymbol$1;
398
-
399
- var $TypeError$2 = TypeError;
400
- var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
401
-
402
- // `ToPrimitive` abstract operation
403
- // https://tc39.es/ecma262/#sec-toprimitive
404
- var toPrimitive$1 = function (input, pref) {
405
- if (!isObject$3(input) || isSymbol$1(input)) return input;
406
- var exoticToPrim = getMethod(input, TO_PRIMITIVE);
407
- var result;
408
- if (exoticToPrim) {
409
- if (pref === undefined) pref = 'default';
410
- result = call$2(exoticToPrim, input, pref);
411
- if (!isObject$3(result) || isSymbol$1(result)) return result;
412
- throw $TypeError$2("Can't convert object to primitive value");
413
- }
414
- if (pref === undefined) pref = 'number';
415
- return ordinaryToPrimitive(input, pref);
416
- };
417
-
418
- var toPrimitive = toPrimitive$1;
419
- var isSymbol = isSymbol$2;
420
-
421
- // `ToPropertyKey` abstract operation
422
- // https://tc39.es/ecma262/#sec-topropertykey
423
- var toPropertyKey$2 = function (argument) {
424
- var key = toPrimitive(argument, 'string');
425
- return isSymbol(key) ? key : key + '';
426
- };
427
-
428
- var global$4 = global$a;
429
- var isObject$2 = isObject$5;
430
-
431
- var document$1 = global$4.document;
432
- // typeof document.createElement is 'object' in old IE
433
- var EXISTS$1 = isObject$2(document$1) && isObject$2(document$1.createElement);
434
-
435
- var documentCreateElement = function (it) {
436
- return EXISTS$1 ? document$1.createElement(it) : {};
437
- };
438
-
439
- var DESCRIPTORS$7 = descriptors;
440
- var fails$4 = fails$9;
441
- var createElement = documentCreateElement;
442
-
443
- // Thanks to IE8 for its funny defineProperty
444
- var ie8DomDefine = !DESCRIPTORS$7 && !fails$4(function () {
445
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
446
- return Object.defineProperty(createElement('div'), 'a', {
447
- get: function () { return 7; }
448
- }).a != 7;
449
- });
450
-
451
- var DESCRIPTORS$6 = descriptors;
452
- var call$1 = functionCall;
453
- var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
454
- var createPropertyDescriptor$1 = createPropertyDescriptor$2;
455
- var toIndexedObject$2 = toIndexedObject$3;
456
- var toPropertyKey$1 = toPropertyKey$2;
457
- var hasOwn$5 = hasOwnProperty_1;
458
- var IE8_DOM_DEFINE$1 = ie8DomDefine;
459
-
460
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
461
- var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
462
-
463
- // `Object.getOwnPropertyDescriptor` method
464
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
465
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$6 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
466
- O = toIndexedObject$2(O);
467
- P = toPropertyKey$1(P);
468
- if (IE8_DOM_DEFINE$1) try {
469
- return $getOwnPropertyDescriptor$1(O, P);
470
- } catch (error) { /* empty */ }
471
- if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$1(propertyIsEnumerableModule$1.f, O, P), O[P]);
472
- };
473
-
474
- var objectDefineProperty = {};
475
-
476
- var DESCRIPTORS$5 = descriptors;
477
- var fails$3 = fails$9;
478
-
479
- // V8 ~ Chrome 36-
480
- // https://bugs.chromium.org/p/v8/issues/detail?id=3334
481
- var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$3(function () {
482
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
483
- return Object.defineProperty(function () { /* empty */ }, 'prototype', {
484
- value: 42,
485
- writable: false
486
- }).prototype != 42;
487
- });
488
-
489
- var isObject$1 = isObject$5;
490
-
491
- var $String = String;
492
- var $TypeError$1 = TypeError;
493
-
494
- // `Assert: Type(argument) is Object`
495
- var anObject$2 = function (argument) {
496
- if (isObject$1(argument)) return argument;
497
- throw $TypeError$1($String(argument) + ' is not an object');
498
- };
499
-
500
- var DESCRIPTORS$4 = descriptors;
501
- var IE8_DOM_DEFINE = ie8DomDefine;
502
- var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
503
- var anObject$1 = anObject$2;
504
- var toPropertyKey = toPropertyKey$2;
505
-
506
- var $TypeError = TypeError;
507
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
508
- var $defineProperty = Object.defineProperty;
509
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
510
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
511
- var ENUMERABLE = 'enumerable';
512
- var CONFIGURABLE$1 = 'configurable';
513
- var WRITABLE = 'writable';
514
-
515
- // `Object.defineProperty` method
516
- // https://tc39.es/ecma262/#sec-object.defineproperty
517
- objectDefineProperty.f = DESCRIPTORS$4 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
518
- anObject$1(O);
519
- P = toPropertyKey(P);
520
- anObject$1(Attributes);
521
- if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
522
- var current = $getOwnPropertyDescriptor(O, P);
523
- if (current && current[WRITABLE]) {
524
- O[P] = Attributes.value;
525
- Attributes = {
526
- configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
527
- enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
528
- writable: false
529
- };
530
- }
531
- } return $defineProperty(O, P, Attributes);
532
- } : $defineProperty : function defineProperty(O, P, Attributes) {
533
- anObject$1(O);
534
- P = toPropertyKey(P);
535
- anObject$1(Attributes);
536
- if (IE8_DOM_DEFINE) try {
537
- return $defineProperty(O, P, Attributes);
538
- } catch (error) { /* empty */ }
539
- if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');
540
- if ('value' in Attributes) O[P] = Attributes.value;
541
- return O;
542
- };
543
-
544
- var DESCRIPTORS$3 = descriptors;
545
- var definePropertyModule$2 = objectDefineProperty;
546
- var createPropertyDescriptor = createPropertyDescriptor$2;
547
-
548
- var createNonEnumerableProperty$2 = DESCRIPTORS$3 ? function (object, key, value) {
549
- return definePropertyModule$2.f(object, key, createPropertyDescriptor(1, value));
550
- } : function (object, key, value) {
551
- object[key] = value;
552
- return object;
553
- };
554
-
555
- var makeBuiltIn$2 = {exports: {}};
556
-
557
- var DESCRIPTORS$2 = descriptors;
558
- var hasOwn$4 = hasOwnProperty_1;
559
-
560
- var FunctionPrototype = Function.prototype;
561
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
562
- var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
563
-
564
- var EXISTS = hasOwn$4(FunctionPrototype, 'name');
565
- // additional protection from minified / mangled / dropped function names
566
- var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
567
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype, 'name').configurable));
568
-
569
- var functionName = {
570
- EXISTS: EXISTS,
571
- PROPER: PROPER,
572
- CONFIGURABLE: CONFIGURABLE
573
- };
574
-
575
- var uncurryThis$4 = functionUncurryThis;
576
- var isCallable$4 = isCallable$a;
577
- var store$1 = sharedStore;
578
-
579
- var functionToString = uncurryThis$4(Function.toString);
580
-
581
- // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
582
- if (!isCallable$4(store$1.inspectSource)) {
583
- store$1.inspectSource = function (it) {
584
- return functionToString(it);
585
- };
586
- }
587
-
588
- var inspectSource$1 = store$1.inspectSource;
589
-
590
- var global$3 = global$a;
591
- var isCallable$3 = isCallable$a;
592
-
593
- var WeakMap$1 = global$3.WeakMap;
594
-
595
- var weakMapBasicDetection = isCallable$3(WeakMap$1) && /native code/.test(String(WeakMap$1));
596
-
597
- var shared$1 = shared$3.exports;
598
- var uid = uid$2;
599
-
600
- var keys = shared$1('keys');
601
-
602
- var sharedKey$1 = function (key) {
603
- return keys[key] || (keys[key] = uid(key));
604
- };
605
-
606
- var hiddenKeys$3 = {};
607
-
608
- var NATIVE_WEAK_MAP = weakMapBasicDetection;
609
- var global$2 = global$a;
610
- var uncurryThis$3 = functionUncurryThis;
611
- var isObject = isObject$5;
612
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
613
- var hasOwn$3 = hasOwnProperty_1;
614
- var shared = sharedStore;
615
- var sharedKey = sharedKey$1;
616
- var hiddenKeys$2 = hiddenKeys$3;
617
-
618
- var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
619
- var TypeError$1 = global$2.TypeError;
620
- var WeakMap = global$2.WeakMap;
621
- var set, get, has;
622
-
623
- var enforce = function (it) {
624
- return has(it) ? get(it) : set(it, {});
625
- };
626
-
627
- var getterFor = function (TYPE) {
628
- return function (it) {
629
- var state;
630
- if (!isObject(it) || (state = get(it)).type !== TYPE) {
631
- throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
632
- } return state;
633
- };
634
- };
635
-
636
- if (NATIVE_WEAK_MAP || shared.state) {
637
- var store = shared.state || (shared.state = new WeakMap());
638
- var wmget = uncurryThis$3(store.get);
639
- var wmhas = uncurryThis$3(store.has);
640
- var wmset = uncurryThis$3(store.set);
641
- set = function (it, metadata) {
642
- if (wmhas(store, it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
643
- metadata.facade = it;
644
- wmset(store, it, metadata);
645
- return metadata;
646
- };
647
- get = function (it) {
648
- return wmget(store, it) || {};
649
- };
650
- has = function (it) {
651
- return wmhas(store, it);
652
- };
653
- } else {
654
- var STATE = sharedKey('state');
655
- hiddenKeys$2[STATE] = true;
656
- set = function (it, metadata) {
657
- if (hasOwn$3(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
658
- metadata.facade = it;
659
- createNonEnumerableProperty$1(it, STATE, metadata);
660
- return metadata;
661
- };
662
- get = function (it) {
663
- return hasOwn$3(it, STATE) ? it[STATE] : {};
664
- };
665
- has = function (it) {
666
- return hasOwn$3(it, STATE);
667
- };
668
- }
669
-
670
- var internalState = {
671
- set: set,
672
- get: get,
673
- has: has,
674
- enforce: enforce,
675
- getterFor: getterFor
676
- };
677
-
678
- var fails$2 = fails$9;
679
- var isCallable$2 = isCallable$a;
680
- var hasOwn$2 = hasOwnProperty_1;
681
- var DESCRIPTORS$1 = descriptors;
682
- var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
683
- var inspectSource = inspectSource$1;
684
- var InternalStateModule = internalState;
685
-
686
- var enforceInternalState = InternalStateModule.enforce;
687
- var getInternalState = InternalStateModule.get;
688
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
689
- var defineProperty$1 = Object.defineProperty;
690
-
691
- var CONFIGURABLE_LENGTH = DESCRIPTORS$1 && !fails$2(function () {
692
- return defineProperty$1(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
693
- });
694
-
695
- var TEMPLATE = String(String).split('String');
696
-
697
- var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
698
- if (String(name).slice(0, 7) === 'Symbol(') {
699
- name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
700
- }
701
- if (options && options.getter) name = 'get ' + name;
702
- if (options && options.setter) name = 'set ' + name;
703
- if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
704
- if (DESCRIPTORS$1) defineProperty$1(value, 'name', { value: name, configurable: true });
705
- else value.name = name;
706
- }
707
- if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) {
708
- defineProperty$1(value, 'length', { value: options.arity });
709
- }
710
- try {
711
- if (options && hasOwn$2(options, 'constructor') && options.constructor) {
712
- if (DESCRIPTORS$1) defineProperty$1(value, 'prototype', { writable: false });
713
- // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
714
- } else if (value.prototype) value.prototype = undefined;
715
- } catch (error) { /* empty */ }
716
- var state = enforceInternalState(value);
717
- if (!hasOwn$2(state, 'source')) {
718
- state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
719
- } return value;
720
- };
721
-
722
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
723
- // eslint-disable-next-line no-extend-native -- required
724
- Function.prototype.toString = makeBuiltIn$1(function toString() {
725
- return isCallable$2(this) && getInternalState(this).source || inspectSource(this);
726
- }, 'toString');
727
-
728
- var isCallable$1 = isCallable$a;
729
- var definePropertyModule$1 = objectDefineProperty;
730
- var makeBuiltIn = makeBuiltIn$2.exports;
731
- var defineGlobalProperty$1 = defineGlobalProperty$3;
732
-
733
- var defineBuiltIn$1 = function (O, key, value, options) {
734
- if (!options) options = {};
735
- var simple = options.enumerable;
736
- var name = options.name !== undefined ? options.name : key;
737
- if (isCallable$1(value)) makeBuiltIn(value, name, options);
738
- if (options.global) {
739
- if (simple) O[key] = value;
740
- else defineGlobalProperty$1(key, value);
741
- } else {
742
- try {
743
- if (!options.unsafe) delete O[key];
744
- else if (O[key]) simple = true;
745
- } catch (error) { /* empty */ }
746
- if (simple) O[key] = value;
747
- else definePropertyModule$1.f(O, key, {
748
- value: value,
749
- enumerable: false,
750
- configurable: !options.nonConfigurable,
751
- writable: !options.nonWritable
752
- });
753
- } return O;
754
- };
755
-
756
- var objectGetOwnPropertyNames = {};
757
-
758
- var ceil = Math.ceil;
759
- var floor = Math.floor;
760
-
761
- // `Math.trunc` method
762
- // https://tc39.es/ecma262/#sec-math.trunc
763
- // eslint-disable-next-line es-x/no-math-trunc -- safe
764
- var mathTrunc = Math.trunc || function trunc(x) {
765
- var n = +x;
766
- return (n > 0 ? floor : ceil)(n);
767
- };
768
-
769
- var trunc = mathTrunc;
770
-
771
- // `ToIntegerOrInfinity` abstract operation
772
- // https://tc39.es/ecma262/#sec-tointegerorinfinity
773
- var toIntegerOrInfinity$2 = function (argument) {
774
- var number = +argument;
775
- // eslint-disable-next-line no-self-compare -- NaN check
776
- return number !== number || number === 0 ? 0 : trunc(number);
777
- };
778
-
779
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
780
-
781
- var max = Math.max;
782
- var min$1 = Math.min;
783
-
784
- // Helper for a popular repeating case of the spec:
785
- // Let integer be ? ToInteger(index).
786
- // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
787
- var toAbsoluteIndex$1 = function (index, length) {
788
- var integer = toIntegerOrInfinity$1(index);
789
- return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
790
- };
791
-
792
- var toIntegerOrInfinity = toIntegerOrInfinity$2;
793
-
794
- var min = Math.min;
795
-
796
- // `ToLength` abstract operation
797
- // https://tc39.es/ecma262/#sec-tolength
798
- var toLength$1 = function (argument) {
799
- return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
800
- };
801
-
802
- var toLength = toLength$1;
803
-
804
- // `LengthOfArrayLike` abstract operation
805
- // https://tc39.es/ecma262/#sec-lengthofarraylike
806
- var lengthOfArrayLike$1 = function (obj) {
807
- return toLength(obj.length);
808
- };
809
-
810
- var toIndexedObject$1 = toIndexedObject$3;
811
- var toAbsoluteIndex = toAbsoluteIndex$1;
812
- var lengthOfArrayLike = lengthOfArrayLike$1;
813
-
814
- // `Array.prototype.{ indexOf, includes }` methods implementation
815
- var createMethod = function (IS_INCLUDES) {
816
- return function ($this, el, fromIndex) {
817
- var O = toIndexedObject$1($this);
818
- var length = lengthOfArrayLike(O);
819
- var index = toAbsoluteIndex(fromIndex, length);
820
- var value;
821
- // Array#includes uses SameValueZero equality algorithm
822
- // eslint-disable-next-line no-self-compare -- NaN check
823
- if (IS_INCLUDES && el != el) while (length > index) {
824
- value = O[index++];
825
- // eslint-disable-next-line no-self-compare -- NaN check
826
- if (value != value) return true;
827
- // Array#indexOf ignores holes, Array#includes - not
828
- } else for (;length > index; index++) {
829
- if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
830
- } return !IS_INCLUDES && -1;
831
- };
832
- };
833
-
834
- var arrayIncludes = {
835
- // `Array.prototype.includes` method
836
- // https://tc39.es/ecma262/#sec-array.prototype.includes
837
- includes: createMethod(true),
838
- // `Array.prototype.indexOf` method
839
- // https://tc39.es/ecma262/#sec-array.prototype.indexof
840
- indexOf: createMethod(false)
841
- };
842
-
843
- var uncurryThis$2 = functionUncurryThis;
844
- var hasOwn$1 = hasOwnProperty_1;
845
- var toIndexedObject = toIndexedObject$3;
846
- var indexOf = arrayIncludes.indexOf;
847
- var hiddenKeys$1 = hiddenKeys$3;
848
-
849
- var push = uncurryThis$2([].push);
850
-
851
- var objectKeysInternal = function (object, names) {
852
- var O = toIndexedObject(object);
853
- var i = 0;
854
- var result = [];
855
- var key;
856
- for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && push(result, key);
857
- // Don't enum bug & hidden keys
858
- while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
859
- ~indexOf(result, key) || push(result, key);
860
- }
861
- return result;
862
- };
863
-
864
- // IE8- don't enum bug keys
865
- var enumBugKeys$2 = [
866
- 'constructor',
867
- 'hasOwnProperty',
868
- 'isPrototypeOf',
869
- 'propertyIsEnumerable',
870
- 'toLocaleString',
871
- 'toString',
872
- 'valueOf'
873
- ];
874
-
875
- var internalObjectKeys$1 = objectKeysInternal;
876
- var enumBugKeys$1 = enumBugKeys$2;
877
-
878
- var hiddenKeys = enumBugKeys$1.concat('length', 'prototype');
879
-
880
- // `Object.getOwnPropertyNames` method
881
- // https://tc39.es/ecma262/#sec-object.getownpropertynames
882
- // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
883
- objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
884
- return internalObjectKeys$1(O, hiddenKeys);
885
- };
886
-
887
- var objectGetOwnPropertySymbols = {};
888
-
889
- // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
890
- objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
891
-
892
- var getBuiltIn = getBuiltIn$3;
893
- var uncurryThis$1 = functionUncurryThis;
894
- var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
895
- var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
896
- var anObject = anObject$2;
897
-
898
- var concat$1 = uncurryThis$1([].concat);
899
-
900
- // all object keys, includes non-enumerable and symbols
901
- var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
902
- var keys = getOwnPropertyNamesModule.f(anObject(it));
903
- var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
904
- return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
905
- };
906
-
907
- var hasOwn = hasOwnProperty_1;
908
- var ownKeys = ownKeys$1;
909
- var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
910
- var definePropertyModule = objectDefineProperty;
911
-
912
- var copyConstructorProperties$1 = function (target, source, exceptions) {
913
- var keys = ownKeys(source);
914
- var defineProperty = definePropertyModule.f;
915
- var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
916
- for (var i = 0; i < keys.length; i++) {
917
- var key = keys[i];
918
- if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
919
- defineProperty(target, key, getOwnPropertyDescriptor(source, key));
920
- }
921
- }
922
- };
923
-
924
- var fails$1 = fails$9;
925
- var isCallable = isCallable$a;
926
-
927
- var replacement = /#|\.prototype\./;
928
-
929
- var isForced$1 = function (feature, detection) {
930
- var value = data[normalize(feature)];
931
- return value == POLYFILL ? true
932
- : value == NATIVE ? false
933
- : isCallable(detection) ? fails$1(detection)
934
- : !!detection;
935
- };
936
-
937
- var normalize = isForced$1.normalize = function (string) {
938
- return String(string).replace(replacement, '.').toLowerCase();
939
- };
940
-
941
- var data = isForced$1.data = {};
942
- var NATIVE = isForced$1.NATIVE = 'N';
943
- var POLYFILL = isForced$1.POLYFILL = 'P';
944
-
945
- var isForced_1 = isForced$1;
946
-
947
- var global$1 = global$a;
948
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
949
- var createNonEnumerableProperty = createNonEnumerableProperty$2;
950
- var defineBuiltIn = defineBuiltIn$1;
951
- var defineGlobalProperty = defineGlobalProperty$3;
952
- var copyConstructorProperties = copyConstructorProperties$1;
953
- var isForced = isForced_1;
954
-
955
- /*
956
- options.target - name of the target object
957
- options.global - target is the global object
958
- options.stat - export as static methods of target
959
- options.proto - export as prototype methods of target
960
- options.real - real prototype method for the `pure` version
961
- options.forced - export even if the native feature is available
962
- options.bind - bind methods to the target, required for the `pure` version
963
- options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
964
- options.unsafe - use the simple assignment of property instead of delete + defineProperty
965
- options.sham - add a flag to not completely full polyfills
966
- options.enumerable - export as enumerable property
967
- options.dontCallGetSet - prevent calling a getter on target
968
- options.name - the .name of the function if it does not match the key
969
- */
970
- var _export = function (options, source) {
971
- var TARGET = options.target;
972
- var GLOBAL = options.global;
973
- var STATIC = options.stat;
974
- var FORCED, target, key, targetProperty, sourceProperty, descriptor;
975
- if (GLOBAL) {
976
- target = global$1;
977
- } else if (STATIC) {
978
- target = global$1[TARGET] || defineGlobalProperty(TARGET, {});
979
- } else {
980
- target = (global$1[TARGET] || {}).prototype;
981
- }
982
- if (target) for (key in source) {
983
- sourceProperty = source[key];
984
- if (options.dontCallGetSet) {
985
- descriptor = getOwnPropertyDescriptor(target, key);
986
- targetProperty = descriptor && descriptor.value;
987
- } else targetProperty = target[key];
988
- FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
989
- // contained in target
990
- if (!FORCED && targetProperty !== undefined) {
991
- if (typeof sourceProperty == typeof targetProperty) continue;
992
- copyConstructorProperties(sourceProperty, targetProperty);
993
- }
994
- // add a flag to not completely full polyfills
995
- if (options.sham || (targetProperty && targetProperty.sham)) {
996
- createNonEnumerableProperty(sourceProperty, 'sham', true);
997
- }
998
- defineBuiltIn(target, key, sourceProperty, options);
999
- }
1000
- };
1001
-
1002
- var internalObjectKeys = objectKeysInternal;
1003
- var enumBugKeys = enumBugKeys$2;
1004
-
1005
- // `Object.keys` method
1006
- // https://tc39.es/ecma262/#sec-object.keys
1007
- // eslint-disable-next-line es-x/no-object-keys -- safe
1008
- var objectKeys$1 = Object.keys || function keys(O) {
1009
- return internalObjectKeys(O, enumBugKeys);
1010
- };
1011
-
1012
- var DESCRIPTORS = descriptors;
1013
- var uncurryThis = functionUncurryThis;
1014
- var call = functionCall;
1015
- var fails = fails$9;
1016
- var objectKeys = objectKeys$1;
1017
- var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1018
- var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1019
- var toObject = toObject$2;
1020
- var IndexedObject = indexedObject;
1021
-
1022
- // eslint-disable-next-line es-x/no-object-assign -- safe
1023
- var $assign = Object.assign;
1024
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
1025
- var defineProperty = Object.defineProperty;
1026
- var concat = uncurryThis([].concat);
1027
-
1028
- // `Object.assign` method
1029
- // https://tc39.es/ecma262/#sec-object.assign
1030
- var objectAssign = !$assign || fails(function () {
1031
- // should have correct order of operations (Edge bug)
1032
- if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
1033
- enumerable: true,
1034
- get: function () {
1035
- defineProperty(this, 'b', {
1036
- value: 3,
1037
- enumerable: false
1038
- });
1039
- }
1040
- }), { b: 2 })).b !== 1) return true;
1041
- // should work with symbols and should have deterministic property order (V8 bug)
1042
- var A = {};
1043
- var B = {};
1044
- // eslint-disable-next-line es-x/no-symbol -- safe
1045
- var symbol = Symbol();
1046
- var alphabet = 'abcdefghijklmnopqrst';
1047
- A[symbol] = 7;
1048
- alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1049
- return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
1050
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1051
- var T = toObject(target);
1052
- var argumentsLength = arguments.length;
1053
- var index = 1;
1054
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1055
- var propertyIsEnumerable = propertyIsEnumerableModule.f;
1056
- while (argumentsLength > index) {
1057
- var S = IndexedObject(arguments[index++]);
1058
- var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1059
- var length = keys.length;
1060
- var j = 0;
1061
- var key;
1062
- while (length > j) {
1063
- key = keys[j++];
1064
- if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
1065
- }
1066
- } return T;
1067
- } : $assign;
1068
-
1069
- var $ = _export;
1070
- var assign = objectAssign;
1071
-
1072
- // `Object.assign` method
1073
- // https://tc39.es/ecma262/#sec-object.assign
1074
- // eslint-disable-next-line es-x/no-object-assign -- required for testing
1075
- $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1076
- assign: assign
1077
- });
1078
-
1079
- function suspensify({
1080
- strict = true
1081
- } = {}) {
1082
- return source$ => {
1083
- const strictSuspense$ = source$.pipe(_suspensify(), _coalesceFirstEmittedValue());
1084
- return strict ? strictSuspense$ : strictSuspense$.pipe(operators.map(strictSuspense => Object.assign({
1085
- error: undefined,
1086
- value: undefined
1087
- }, strictSuspense))
1088
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1089
- );
1090
- };
1091
- }
1092
- /**
1093
- * This is the initial state of the Suspense.
1094
- * It is exposed for convenience and edge cases where the initial state must be set initially.
1095
- * e.g. when using {@link suspensify} on inner observables.
1096
- * @example toSignal(source$.pipe(switchMap(() => fetchData().pipe(suspensify()))), {initialValue: pending});
1097
- */
1098
- const pending = {
1099
- finalized: false,
1100
- hasError: false,
1101
- hasValue: false,
1102
- pending: true
1103
- };
1104
- function _coalesceFirstEmittedValue() {
1105
- return source$ => {
1106
- return new rxjs.Observable(observer => {
1107
- const isReadySubject = new rxjs.ReplaySubject(1);
1108
- const subscription = source$.pipe( /* Wait for all synchronous processing to be done. */
1109
- operators.debounce(() => isReadySubject)).subscribe(observer);
1110
- /* Sync emitted values have been processed now.
1111
- * Mark source as ready and emit last computed state. */
1112
- isReadySubject.next(undefined);
1113
- return () => subscription.unsubscribe();
1114
- });
1115
- };
1116
- }
1117
- /* Use values as types for better type checking. */
1118
- const TRUE = true;
1119
- const FALSE = false;
1120
- function _suspensify() {
1121
- return source$ => {
1122
- return source$.pipe(operators.materialize(), operators.scan((state, notification) => {
1123
- switch (notification.kind) {
1124
- /* Value. */
1125
- case 'N':
1126
- return {
1127
- finalized: FALSE,
1128
- hasError: FALSE,
1129
- hasValue: TRUE,
1130
- value: notification.value,
1131
- pending: FALSE
1132
- };
1133
- /* Error. */
1134
- case 'E':
1135
- return {
1136
- finalized: TRUE,
1137
- hasError: TRUE,
1138
- hasValue: FALSE,
1139
- pending: FALSE,
1140
- error: notification.error
1141
- };
1142
- /* Complete. */
1143
- case 'C':
1144
- return Object.assign({}, state, {
1145
- finalized: TRUE,
1146
- pending: FALSE
1147
- });
1148
- }
1149
- }, pending), operators.startWith(pending));
1150
- };
1151
- }
1152
-
1153
- exports.pending = pending;
1154
- exports.suspensify = suspensify;