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