@fncts/observable 0.0.32 → 0.0.33
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/LICENSE +26 -0
- package/_cjs/Action.cjs +15 -16
- package/_cjs/Action.cjs.map +1 -1
- package/_cjs/AnimationFrameAction.cjs +30 -35
- package/_cjs/AnimationFrameAction.cjs.map +1 -1
- package/_cjs/AnimationFrameScheduler.cjs +30 -35
- package/_cjs/AnimationFrameScheduler.cjs.map +1 -1
- package/_cjs/AsyncAction.cjs +73 -93
- package/_cjs/AsyncAction.cjs.map +1 -1
- package/_cjs/AsyncScheduler.cjs +35 -41
- package/_cjs/AsyncScheduler.cjs.map +1 -1
- package/_cjs/BehaviorSubject.cjs +31 -38
- package/_cjs/BehaviorSubject.cjs.map +1 -1
- package/_cjs/Notification.cjs +65 -66
- package/_cjs/Notification.cjs.map +1 -1
- package/_cjs/Observable/api/connect.cjs +23 -25
- package/_cjs/Observable/api/connect.cjs.map +1 -1
- package/_cjs/Observable/api/connectable.cjs +46 -50
- package/_cjs/Observable/api/connectable.cjs.map +1 -1
- package/_cjs/Observable/api/fromCallback.cjs +44 -48
- package/_cjs/Observable/api/fromCallback.cjs.map +1 -1
- package/_cjs/Observable/api/fromEvent.cjs +15 -15
- package/_cjs/Observable/api/fromEvent.cjs.map +1 -1
- package/_cjs/Observable/api/index.cjs +32 -160
- package/_cjs/Observable/api/race.cjs +26 -30
- package/_cjs/Observable/api/race.cjs.map +1 -1
- package/_cjs/Observable/api/raceWith.cjs +14 -15
- package/_cjs/Observable/api/raceWith.cjs.map +1 -1
- package/_cjs/Observable/api/repeatWhen.cjs +54 -57
- package/_cjs/Observable/api/repeatWhen.cjs.map +1 -1
- package/_cjs/Observable/api/retryWhen.cjs +37 -41
- package/_cjs/Observable/api/retryWhen.cjs.map +1 -1
- package/_cjs/Observable/api/share.cjs +73 -83
- package/_cjs/Observable/api/share.cjs.map +1 -1
- package/_cjs/Observable/api/window.cjs +46 -43
- package/_cjs/Observable/api/window.cjs.map +1 -1
- package/_cjs/Observable/api/windowCount.cjs +45 -51
- package/_cjs/Observable/api/windowCount.cjs.map +1 -1
- package/_cjs/Observable/api/windowTime.cjs +73 -74
- package/_cjs/Observable/api/windowTime.cjs.map +1 -1
- package/_cjs/Observable/api/windowToggle.cjs +71 -74
- package/_cjs/Observable/api/windowToggle.cjs.map +1 -1
- package/_cjs/Observable/api/windowWhen.cjs +59 -55
- package/_cjs/Observable/api/windowWhen.cjs.map +1 -1
- package/_cjs/Observable/api.cjs +1858 -2034
- package/_cjs/Observable/api.cjs.map +1 -1
- package/_cjs/Observable/definition.cjs +107 -120
- package/_cjs/Observable/definition.cjs.map +1 -1
- package/_cjs/Observable/dom/animationFrames.cjs +30 -33
- package/_cjs/Observable/dom/animationFrames.cjs.map +1 -1
- package/_cjs/Observable/instances.cjs +0 -2
- package/_cjs/Observable.cjs +180 -215
- package/_cjs/ObservableRef/api.cjs +188 -189
- package/_cjs/ObservableRef/api.cjs.map +1 -1
- package/_cjs/ObservableRef/atomic.cjs +25 -25
- package/_cjs/ObservableRef/atomic.cjs.map +1 -1
- package/_cjs/ObservableRef/definition.cjs +32 -33
- package/_cjs/ObservableRef/definition.cjs.map +1 -1
- package/_cjs/ObservableRef.cjs +17 -39
- package/_cjs/Observer.cjs +0 -2
- package/_cjs/Operator.cjs +58 -62
- package/_cjs/Operator.cjs.map +1 -1
- package/_cjs/Scheduler.cjs +38 -37
- package/_cjs/Scheduler.cjs.map +1 -1
- package/_cjs/Subject.cjs +163 -201
- package/_cjs/Subject.cjs.map +1 -1
- package/_cjs/Subscriber.cjs +151 -170
- package/_cjs/Subscriber.cjs.map +1 -1
- package/_cjs/Subscription.cjs +98 -122
- package/_cjs/Subscription.cjs.map +1 -1
- package/_cjs/chunk.cjs +28 -0
- package/_cjs/config.cjs +11 -12
- package/_cjs/config.cjs.map +1 -1
- package/_cjs/global.cjs +0 -2
- package/_cjs/index.cjs +112 -36
- package/_cjs/internal/animationFrameProvider.cjs +32 -38
- package/_cjs/internal/animationFrameProvider.cjs.map +1 -1
- package/_cjs/internal/args.cjs +12 -12
- package/_cjs/internal/args.cjs.map +1 -1
- package/_cjs/internal/intervalProvider.cjs +15 -22
- package/_cjs/internal/intervalProvider.cjs.map +1 -1
- package/_cjs/internal/performanceTimestampProvider.cjs +10 -11
- package/_cjs/internal/performanceTimestampProvider.cjs.map +1 -1
- package/_cjs/internal/timeoutProvider.cjs +15 -22
- package/_cjs/internal/timeoutProvider.cjs.map +1 -1
- package/_cjs/internal/timestampProvider.cjs +10 -11
- package/_cjs/internal/timestampProvider.cjs.map +1 -1
- package/_cjs/internal/util.cjs +60 -68
- package/_cjs/internal/util.cjs.map +1 -1
- package/_mjs/Action.mjs +12 -8
- package/_mjs/Action.mjs.map +1 -1
- package/_mjs/AnimationFrameAction.mjs +25 -26
- package/_mjs/AnimationFrameAction.mjs.map +1 -1
- package/_mjs/AnimationFrameScheduler.mjs +25 -27
- package/_mjs/AnimationFrameScheduler.mjs.map +1 -1
- package/_mjs/AsyncAction.mjs +69 -84
- package/_mjs/AsyncAction.mjs.map +1 -1
- package/_mjs/AsyncScheduler.mjs +31 -33
- package/_mjs/AsyncScheduler.mjs.map +1 -1
- package/_mjs/BehaviorSubject.mjs +28 -30
- package/_mjs/BehaviorSubject.mjs.map +1 -1
- package/_mjs/Notification.mjs +57 -56
- package/_mjs/Notification.mjs.map +1 -1
- package/_mjs/Observable/api/connect.mjs +17 -17
- package/_mjs/Observable/api/connect.mjs.map +1 -1
- package/_mjs/Observable/api/connectable.mjs +39 -40
- package/_mjs/Observable/api/connectable.mjs.map +1 -1
- package/_mjs/Observable/api/fromCallback.mjs +40 -41
- package/_mjs/Observable/api/fromCallback.mjs.map +1 -1
- package/_mjs/Observable/api/fromEvent.mjs +12 -8
- package/_mjs/Observable/api/fromEvent.mjs.map +1 -1
- package/_mjs/Observable/api/index.mjs +15 -15
- package/_mjs/Observable/api/race.mjs +20 -22
- package/_mjs/Observable/api/race.mjs.map +1 -1
- package/_mjs/Observable/api/raceWith.mjs +11 -8
- package/_mjs/Observable/api/raceWith.mjs.map +1 -1
- package/_mjs/Observable/api/repeatWhen.mjs +48 -49
- package/_mjs/Observable/api/repeatWhen.mjs.map +1 -1
- package/_mjs/Observable/api/retryWhen.mjs +31 -33
- package/_mjs/Observable/api/retryWhen.mjs.map +1 -1
- package/_mjs/Observable/api/share.mjs +65 -74
- package/_mjs/Observable/api/share.mjs.map +1 -1
- package/_mjs/Observable/api/window.mjs +38 -34
- package/_mjs/Observable/api/window.mjs.map +1 -1
- package/_mjs/Observable/api/windowCount.mjs +39 -43
- package/_mjs/Observable/api/windowCount.mjs.map +1 -1
- package/_mjs/Observable/api/windowTime.mjs +63 -64
- package/_mjs/Observable/api/windowTime.mjs.map +1 -1
- package/_mjs/Observable/api/windowToggle.mjs +58 -62
- package/_mjs/Observable/api/windowToggle.mjs.map +1 -1
- package/_mjs/Observable/api/windowWhen.mjs +50 -46
- package/_mjs/Observable/api/windowWhen.mjs.map +1 -1
- package/_mjs/Observable/api.mjs +1822 -2031
- package/_mjs/Observable/api.mjs.map +1 -1
- package/_mjs/Observable/definition.mjs +94 -108
- package/_mjs/Observable/definition.mjs.map +1 -1
- package/_mjs/Observable/dom/animationFrames.mjs +23 -23
- package/_mjs/Observable/dom/animationFrames.mjs.map +1 -1
- package/_mjs/Observable/instances.mjs +0 -2
- package/_mjs/Observable.mjs +20 -25
- package/_mjs/ObservableRef/api.mjs +180 -177
- package/_mjs/ObservableRef/api.mjs.map +1 -1
- package/_mjs/ObservableRef/atomic.mjs +21 -17
- package/_mjs/ObservableRef/atomic.mjs.map +1 -1
- package/_mjs/ObservableRef/definition.mjs +29 -25
- package/_mjs/ObservableRef/definition.mjs.map +1 -1
- package/_mjs/ObservableRef.mjs +4 -5
- package/_mjs/Observer.mjs +0 -2
- package/_mjs/Operator.mjs +50 -51
- package/_mjs/Operator.mjs.map +1 -1
- package/_mjs/Scheduler.mjs +30 -26
- package/_mjs/Scheduler.mjs.map +1 -1
- package/_mjs/Subject.mjs +154 -190
- package/_mjs/Subject.mjs.map +1 -1
- package/_mjs/Subscriber.mjs +136 -156
- package/_mjs/Subscriber.mjs.map +1 -1
- package/_mjs/Subscription.mjs +90 -112
- package/_mjs/Subscription.mjs.map +1 -1
- package/_mjs/config.mjs +10 -6
- package/_mjs/config.mjs.map +1 -1
- package/_mjs/global.mjs +0 -2
- package/_mjs/index.mjs +14 -15
- package/_mjs/internal/animationFrameProvider.mjs +28 -30
- package/_mjs/internal/animationFrameProvider.mjs.map +1 -1
- package/_mjs/internal/args.mjs +9 -5
- package/_mjs/internal/args.mjs.map +1 -1
- package/_mjs/internal/intervalProvider.mjs +14 -16
- package/_mjs/internal/intervalProvider.mjs.map +1 -1
- package/_mjs/internal/performanceTimestampProvider.mjs +9 -5
- package/_mjs/internal/performanceTimestampProvider.mjs.map +1 -1
- package/_mjs/internal/timeoutProvider.mjs +14 -16
- package/_mjs/internal/timeoutProvider.mjs.map +1 -1
- package/_mjs/internal/timestampProvider.mjs +9 -5
- package/_mjs/internal/timestampProvider.mjs.map +1 -1
- package/_mjs/internal/util.mjs +54 -59
- package/_mjs/internal/util.mjs.map +1 -1
- package/_src/Observable/api.ts +1 -1
- package/package.json +6 -2
- package/_cjs/Observable/api/index.cjs.map +0 -1
- package/_cjs/Observable/instances.cjs.map +0 -1
- package/_cjs/Observable.cjs.map +0 -1
- package/_cjs/ObservableRef.cjs.map +0 -1
- package/_cjs/Observer.cjs.map +0 -1
- package/_cjs/global.cjs.map +0 -1
- package/_cjs/index.cjs.map +0 -1
- package/_mjs/Observable/api/index.mjs.map +0 -1
- package/_mjs/Observable/instances.mjs.map +0 -1
- package/_mjs/Observable.mjs.map +0 -1
- package/_mjs/ObservableRef.mjs.map +0 -1
- package/_mjs/Observer.mjs.map +0 -1
- package/_mjs/global.mjs.map +0 -1
- package/_mjs/index.mjs.map +0 -1
package/_cjs/Observable/api.cjs
CHANGED
|
@@ -1,2318 +1,2142 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
exports.flatten = flatten;
|
|
49
|
-
exports.foldLeftWithIndex = exports.foldLeft = void 0;
|
|
50
|
-
exports.forkJoin = forkJoin;
|
|
51
|
-
exports.from = void 0;
|
|
52
|
-
exports.fromArrayLike = fromArrayLike;
|
|
53
|
-
exports.fromAsyncIterable = fromAsyncIterable;
|
|
54
|
-
exports.fromIO = void 0;
|
|
55
|
-
exports.fromInterop = fromInterop;
|
|
56
|
-
exports.fromIterable = fromIterable;
|
|
57
|
-
exports.fromPromise = fromPromise;
|
|
58
|
-
exports.fromReadableStreamLike = fromReadableStreamLike;
|
|
59
|
-
exports.fromSubscribable = void 0;
|
|
60
|
-
exports.halt = halt;
|
|
61
|
-
exports.if = _if_1;
|
|
62
|
-
exports.ignore = ignore;
|
|
63
|
-
exports.interval = void 0;
|
|
64
|
-
exports.isEmpty = isEmpty;
|
|
65
|
-
exports.iterate = iterate;
|
|
66
|
-
exports.joinAllInternal = joinAllInternal;
|
|
67
|
-
exports.makeZip = makeZip;
|
|
68
|
-
exports.mapError = mapError;
|
|
69
|
-
exports.map_ = exports.mapWithIndex = void 0;
|
|
70
|
-
exports.materialize = materialize;
|
|
71
|
-
exports.merge = merge;
|
|
72
|
-
exports.mergeMapWithIndex = exports.mergeMap = exports.mergeAll = void 0;
|
|
73
|
-
exports.mergeScan = mergeScan;
|
|
74
|
-
exports.onEmpty = exports.of = exports.mergeScanWithIndex = void 0;
|
|
75
|
-
exports.onErrorResumeNext = onErrorResumeNext;
|
|
76
|
-
exports.partition = partition;
|
|
77
|
-
exports.partitionMap = partitionMap;
|
|
78
|
-
exports.partitionWithIndex = exports.partitionMapWithIndex = void 0;
|
|
79
|
-
exports.provideService = provideService;
|
|
80
|
-
exports.repeat = repeat;
|
|
81
|
-
exports.retry = retry;
|
|
82
|
-
exports.sample = void 0;
|
|
83
|
-
exports.sampleTime = sampleTime;
|
|
84
|
-
exports.scanInternal = scanInternal;
|
|
85
|
-
exports.scanLeft = scanLeft;
|
|
86
|
-
exports.scanLeftWithIndex = void 0;
|
|
87
|
-
exports.scheduleArray = scheduleArray;
|
|
88
|
-
exports.scheduleAsyncIterable = scheduleAsyncIterable;
|
|
89
|
-
exports.scheduleIterable = scheduleIterable;
|
|
90
|
-
exports.scheduleObservable = scheduleObservable;
|
|
91
|
-
exports.schedulePromise = schedulePromise;
|
|
92
|
-
exports.scheduleReadableStreamLike = scheduleReadableStreamLike;
|
|
93
|
-
exports.scheduled = void 0;
|
|
94
|
-
exports.service = service;
|
|
95
|
-
exports.serviceWith = serviceWith;
|
|
96
|
-
exports.single = exports.serviceWithObservable = void 0;
|
|
97
|
-
exports.skip = skip;
|
|
98
|
-
exports.skipLast = skipLast;
|
|
99
|
-
exports.skipUntil = skipUntil;
|
|
100
|
-
exports.skipWhile = skipWhile;
|
|
101
|
-
exports.startWith = startWith;
|
|
102
|
-
exports.subscribeOn = subscribeOn;
|
|
103
|
-
exports.swap = swap;
|
|
104
|
-
exports.switchAll = switchAll;
|
|
105
|
-
exports.switchMapWithIndex = exports.switchMap = void 0;
|
|
106
|
-
exports.switchScan = switchScan;
|
|
107
|
-
exports.take = exports.switchScanWithIndex = void 0;
|
|
108
|
-
exports.takeLast = takeLast;
|
|
109
|
-
exports.takeUntil = takeUntil;
|
|
110
|
-
exports.takeWhile = takeWhile;
|
|
111
|
-
exports.takeWhileWithIndex = void 0;
|
|
112
|
-
exports.tap = tap;
|
|
113
|
-
exports.throttle = void 0;
|
|
114
|
-
exports.throttleTime = throttleTime;
|
|
115
|
-
exports.timeout = timeout;
|
|
116
|
-
exports.toArray = exports.timer = void 0;
|
|
117
|
-
exports.unique = unique;
|
|
118
|
-
exports.uniqueUntilChanged = void 0;
|
|
119
|
-
exports.uniqueUntilKeyChanged = uniqueUntilKeyChanged;
|
|
120
|
-
exports.unit = void 0;
|
|
121
|
-
exports.zip = zip;
|
|
122
|
-
exports.zipWith = exports.zipLatest = void 0;
|
|
123
|
-
exports.zipWithLatest = zipWithLatest;
|
|
124
|
-
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Cause/api"));
|
|
125
|
-
var _util = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/observable/internal/util"));
|
|
126
|
-
var tsplus_module_2 = _util;
|
|
127
|
-
var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/util/predicates"));
|
|
128
|
-
var tsplus_module_4 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/IO"));
|
|
129
|
-
var tsplus_module_5 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/observable/AsyncScheduler"));
|
|
130
|
-
var tsplus_module_6 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/observable/Subscription"));
|
|
131
|
-
var _Scheduler = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/observable/Scheduler"));
|
|
132
|
-
var tsplus_module_7 = _Scheduler;
|
|
133
|
-
var tsplus_module_8 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/observable/Operator"));
|
|
134
|
-
var tsplus_module_9 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/IO/api/environment"));
|
|
135
|
-
var tsplus_module_10 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/IO/runtime"));
|
|
136
|
-
var tsplus_module_11 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Exit/api"));
|
|
137
|
-
var tsplus_module_12 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/Fiber/api/interrupt"));
|
|
138
|
-
var tsplus_module_13 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/function/api"));
|
|
139
|
-
var tsplus_module_14 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Either/destructors"));
|
|
140
|
-
var tsplus_module_15 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/destructors"));
|
|
141
|
-
var tsplus_module_16 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Environment/api"));
|
|
142
|
-
var tsplus_module_17 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/constructors"));
|
|
143
|
-
var tsplus_module_18 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/definition"));
|
|
144
|
-
var tsplus_module_19 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Either/constructors"));
|
|
145
|
-
var tsplus_module_20 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/observable/Notification"));
|
|
146
|
-
var tsplus_module_21 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/HashSet/api"));
|
|
147
|
-
var _args = /*#__PURE__*/require("@fncts/observable/internal/args");
|
|
148
|
-
var _definition2 = /*#__PURE__*/require("@fncts/observable/Observable/definition");
|
|
149
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_chunk = require("../chunk.cjs");
|
|
3
|
+
let _fncts_observable_AsyncScheduler = require("@fncts/observable/AsyncScheduler");
|
|
4
|
+
_fncts_observable_AsyncScheduler = require_chunk.__toESM(_fncts_observable_AsyncScheduler, 1);
|
|
5
|
+
let _fncts_observable_Operator = require("@fncts/observable/Operator");
|
|
6
|
+
_fncts_observable_Operator = require_chunk.__toESM(_fncts_observable_Operator, 1);
|
|
7
|
+
let _fncts_observable_Scheduler = require("@fncts/observable/Scheduler");
|
|
8
|
+
_fncts_observable_Scheduler = require_chunk.__toESM(_fncts_observable_Scheduler, 1);
|
|
9
|
+
let _fncts_observable_Subscription = require("@fncts/observable/Subscription");
|
|
10
|
+
_fncts_observable_Subscription = require_chunk.__toESM(_fncts_observable_Subscription, 1);
|
|
11
|
+
let _fncts_base_util_predicates = require("@fncts/base/util/predicates");
|
|
12
|
+
_fncts_base_util_predicates = require_chunk.__toESM(_fncts_base_util_predicates, 1);
|
|
13
|
+
let _fncts_observable_Notification = require("@fncts/observable/Notification");
|
|
14
|
+
_fncts_observable_Notification = require_chunk.__toESM(_fncts_observable_Notification, 1);
|
|
15
|
+
let _fncts_base_data_Cause_api = require("@fncts/base/data/Cause/api");
|
|
16
|
+
_fncts_base_data_Cause_api = require_chunk.__toESM(_fncts_base_data_Cause_api, 1);
|
|
17
|
+
let _fncts_observable_internal_util = require("@fncts/observable/internal/util");
|
|
18
|
+
_fncts_observable_internal_util = require_chunk.__toESM(_fncts_observable_internal_util, 1);
|
|
19
|
+
let _fncts_base_data_Either_destructors = require("@fncts/base/data/Either/destructors");
|
|
20
|
+
_fncts_base_data_Either_destructors = require_chunk.__toESM(_fncts_base_data_Either_destructors, 1);
|
|
21
|
+
let _fncts_base_data_Either_constructors = require("@fncts/base/data/Either/constructors");
|
|
22
|
+
_fncts_base_data_Either_constructors = require_chunk.__toESM(_fncts_base_data_Either_constructors, 1);
|
|
23
|
+
let _fncts_io_IO = require("@fncts/io/IO");
|
|
24
|
+
_fncts_io_IO = require_chunk.__toESM(_fncts_io_IO, 1);
|
|
25
|
+
let _fncts_io_IO_api_environment = require("@fncts/io/IO/api/environment");
|
|
26
|
+
_fncts_io_IO_api_environment = require_chunk.__toESM(_fncts_io_IO_api_environment, 1);
|
|
27
|
+
let _fncts_io_IO_runtime = require("@fncts/io/IO/runtime");
|
|
28
|
+
_fncts_io_IO_runtime = require_chunk.__toESM(_fncts_io_IO_runtime, 1);
|
|
29
|
+
let _fncts_base_data_Exit_api = require("@fncts/base/data/Exit/api");
|
|
30
|
+
_fncts_base_data_Exit_api = require_chunk.__toESM(_fncts_base_data_Exit_api, 1);
|
|
31
|
+
let _fncts_io_Fiber_api_interrupt = require("@fncts/io/Fiber/api/interrupt");
|
|
32
|
+
_fncts_io_Fiber_api_interrupt = require_chunk.__toESM(_fncts_io_Fiber_api_interrupt, 1);
|
|
33
|
+
let _fncts_base_data_function_api = require("@fncts/base/data/function/api");
|
|
34
|
+
_fncts_base_data_function_api = require_chunk.__toESM(_fncts_base_data_function_api, 1);
|
|
35
|
+
let _fncts_base_data_Maybe_destructors = require("@fncts/base/data/Maybe/destructors");
|
|
36
|
+
_fncts_base_data_Maybe_destructors = require_chunk.__toESM(_fncts_base_data_Maybe_destructors, 1);
|
|
37
|
+
let _fncts_base_data_Environment_api = require("@fncts/base/data/Environment/api");
|
|
38
|
+
_fncts_base_data_Environment_api = require_chunk.__toESM(_fncts_base_data_Environment_api, 1);
|
|
39
|
+
let _fncts_base_data_Maybe_constructors = require("@fncts/base/data/Maybe/constructors");
|
|
40
|
+
_fncts_base_data_Maybe_constructors = require_chunk.__toESM(_fncts_base_data_Maybe_constructors, 1);
|
|
41
|
+
let _fncts_base_data_Maybe_definition = require("@fncts/base/data/Maybe/definition");
|
|
42
|
+
_fncts_base_data_Maybe_definition = require_chunk.__toESM(_fncts_base_data_Maybe_definition, 1);
|
|
43
|
+
let _fncts_base_collection_immutable_HashSet_api = require("@fncts/base/collection/immutable/HashSet/api");
|
|
44
|
+
_fncts_base_collection_immutable_HashSet_api = require_chunk.__toESM(_fncts_base_collection_immutable_HashSet_api, 1);
|
|
45
|
+
let _fncts_observable_internal_args = require("@fncts/observable/internal/args");
|
|
46
|
+
let _fncts_observable_Observable_definition = require("@fncts/observable/Observable/definition");
|
|
47
|
+
//#region build/esm/Observable/api.js
|
|
150
48
|
const fileName_1 = "(@fncts/observable) src/Observable/api.ts";
|
|
151
|
-
const defer =
|
|
152
|
-
const empty =
|
|
153
|
-
const environmentWithObservable =
|
|
154
|
-
const fail =
|
|
155
|
-
const from =
|
|
156
|
-
const fromSubscribable =
|
|
157
|
-
const _if =
|
|
158
|
-
const interval =
|
|
159
|
-
const of =
|
|
160
|
-
const single =
|
|
161
|
-
const scheduled =
|
|
162
|
-
const timer =
|
|
163
|
-
const fromIO =
|
|
164
|
-
const zipWith =
|
|
165
|
-
const mapWithIndex =
|
|
166
|
-
const map_ =
|
|
167
|
-
const as =
|
|
168
|
-
const filterWithIndex =
|
|
169
|
-
const filterMapWithIndex =
|
|
170
|
-
const partitionWithIndex =
|
|
171
|
-
const partitionMapWithIndex =
|
|
172
|
-
const mergeMapWithIndex =
|
|
173
|
-
const mergeMap =
|
|
174
|
-
const contramapEnvironment =
|
|
175
|
-
const foldLeftWithIndex =
|
|
176
|
-
const foldLeft =
|
|
177
|
-
const audit =
|
|
178
|
-
const catchAllCause =
|
|
179
|
-
const concatAll =
|
|
180
|
-
const concat =
|
|
181
|
-
const countWithIndex =
|
|
182
|
-
const zipLatest =
|
|
183
|
-
const delayWithIndex =
|
|
184
|
-
const delayWith =
|
|
185
|
-
const exhaustMapWithIndex =
|
|
186
|
-
const expandWithIndex =
|
|
187
|
-
const findWithIndex =
|
|
188
|
-
const findIndexWithIndex =
|
|
189
|
-
const mergeAll =
|
|
190
|
-
const mergeScanWithIndex =
|
|
191
|
-
const onEmpty =
|
|
192
|
-
const sample =
|
|
193
|
-
const scanLeftWithIndex =
|
|
194
|
-
const serviceWithObservable =
|
|
195
|
-
const switchMapWithIndex =
|
|
196
|
-
const switchMap =
|
|
197
|
-
const switchScanWithIndex =
|
|
198
|
-
const take =
|
|
199
|
-
const takeWhileWithIndex =
|
|
200
|
-
const throttle =
|
|
201
|
-
const toArray =
|
|
202
|
-
const uniqueUntilChanged =
|
|
203
|
-
/**
|
|
204
|
-
|
|
205
|
-
|
|
49
|
+
const defer = defer_1;
|
|
50
|
+
const empty = empty_1;
|
|
51
|
+
const environmentWithObservable = environmentWithObservable_1;
|
|
52
|
+
const fail = fail_1;
|
|
53
|
+
const from = from_1;
|
|
54
|
+
const fromSubscribable = fromSubscribable_1;
|
|
55
|
+
const _if = _if_1;
|
|
56
|
+
const interval = interval_1;
|
|
57
|
+
const of = of_1;
|
|
58
|
+
const single = single_1;
|
|
59
|
+
const scheduled = scheduled_1;
|
|
60
|
+
const timer = timer_1;
|
|
61
|
+
const fromIO = fromIO_1;
|
|
62
|
+
const zipWith = zipWith_1;
|
|
63
|
+
const mapWithIndex = mapWithIndex_1;
|
|
64
|
+
const map_ = map_1;
|
|
65
|
+
const as = as_1;
|
|
66
|
+
const filterWithIndex = filterWithIndex_1;
|
|
67
|
+
const filterMapWithIndex = filterMapWithIndex_1;
|
|
68
|
+
const partitionWithIndex = partitionWithIndex_1;
|
|
69
|
+
const partitionMapWithIndex = partitionMapWithIndex_1;
|
|
70
|
+
const mergeMapWithIndex = mergeMapWithIndex_1;
|
|
71
|
+
const mergeMap = mergeMap_1;
|
|
72
|
+
const contramapEnvironment = contramapEnvironment_1;
|
|
73
|
+
const foldLeftWithIndex = foldLeftWithIndex_1;
|
|
74
|
+
const foldLeft = foldLeft_1;
|
|
75
|
+
const audit = audit_1;
|
|
76
|
+
const catchAllCause = catchAllCause_1;
|
|
77
|
+
const concatAll = concatAll_1;
|
|
78
|
+
const concat = concat_1;
|
|
79
|
+
const countWithIndex = countWithIndex_1;
|
|
80
|
+
const zipLatest = zipLatest_1;
|
|
81
|
+
const delayWithIndex = delayWithIndex_1;
|
|
82
|
+
const delayWith = delayWith_1;
|
|
83
|
+
const exhaustMapWithIndex = exhaustMapWithIndex_1;
|
|
84
|
+
const expandWithIndex = expandWithIndex_1;
|
|
85
|
+
const findWithIndex = findWithIndex_1;
|
|
86
|
+
const findIndexWithIndex = findIndexWithIndex_1;
|
|
87
|
+
const mergeAll = mergeAll_1;
|
|
88
|
+
const mergeScanWithIndex = mergeScanWithIndex_1;
|
|
89
|
+
const onEmpty = onEmpty_1;
|
|
90
|
+
const sample = sample_1;
|
|
91
|
+
const scanLeftWithIndex = scanLeftWithIndex_1;
|
|
92
|
+
const serviceWithObservable = serviceWithObservable_1;
|
|
93
|
+
const switchMapWithIndex = switchMapWithIndex_1;
|
|
94
|
+
const switchMap = switchMap_1;
|
|
95
|
+
const switchScanWithIndex = switchScanWithIndex_1;
|
|
96
|
+
const take = take_1;
|
|
97
|
+
const takeWhileWithIndex = takeWhileWithIndex_1;
|
|
98
|
+
const throttle = throttle_1;
|
|
99
|
+
const toArray = toArray_1;
|
|
100
|
+
const uniqueUntilChanged = uniqueUntilChanged_1;
|
|
101
|
+
/**
|
|
102
|
+
* @tsplus static fncts.observable.ObservableOps halt
|
|
103
|
+
*/
|
|
206
104
|
function halt(defect) {
|
|
207
|
-
|
|
105
|
+
return new _fncts_observable_Observable_definition.Observable((s) => s.error(_fncts_base_data_Cause_api.halt(defect)));
|
|
208
106
|
}
|
|
209
107
|
/**
|
|
210
|
-
|
|
211
|
-
|
|
108
|
+
* @tsplus static fncts.observable.ObservableOps defer
|
|
109
|
+
*/
|
|
212
110
|
function defer_1(observable) {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
111
|
+
return new _fncts_observable_Observable_definition.Observable((s, environment) => {
|
|
112
|
+
from_1(observable()).provideEnvironment(environment).subscribe(s);
|
|
113
|
+
});
|
|
216
114
|
}
|
|
217
115
|
/**
|
|
218
|
-
|
|
219
|
-
|
|
116
|
+
* @tsplus static fncts.observable.ObservableOps empty
|
|
117
|
+
*/
|
|
220
118
|
function empty_1() {
|
|
221
|
-
|
|
119
|
+
return _fncts_observable_Observable_definition.EMPTY;
|
|
222
120
|
}
|
|
223
121
|
/**
|
|
224
|
-
|
|
225
|
-
|
|
122
|
+
* @tsplus static fncts.observable.ObservableOps environmentWithObservable
|
|
123
|
+
*/
|
|
226
124
|
function environmentWithObservable_1(f) {
|
|
227
|
-
|
|
125
|
+
return new _fncts_observable_Observable_definition.EnvironmentWith(f);
|
|
228
126
|
}
|
|
229
127
|
/**
|
|
230
|
-
|
|
231
|
-
|
|
128
|
+
* @tsplus static fncts.observable.ObservableOps failCause
|
|
129
|
+
*/
|
|
232
130
|
function failCause(cause) {
|
|
233
|
-
|
|
131
|
+
return new _fncts_observable_Observable_definition.Observable((s) => s.error(cause));
|
|
234
132
|
}
|
|
235
133
|
/**
|
|
236
|
-
|
|
237
|
-
|
|
134
|
+
* @tsplus static fncts.observable.ObservableOps fail
|
|
135
|
+
*/
|
|
238
136
|
function fail_1(e) {
|
|
239
|
-
|
|
137
|
+
return new _fncts_observable_Observable_definition.Observable((s) => s.error(_fncts_base_data_Cause_api.fail(e)));
|
|
240
138
|
}
|
|
241
139
|
/**
|
|
242
|
-
|
|
243
|
-
|
|
140
|
+
* @tsplus static fncts.observable.ObservableOps from
|
|
141
|
+
*/
|
|
244
142
|
function from_1(input) {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
if (tsplus_module_2.isAsyncIterable(input)) {
|
|
255
|
-
return fromAsyncIterable(input);
|
|
256
|
-
}
|
|
257
|
-
if (tsplus_module_3.isIterable(input)) {
|
|
258
|
-
return fromIterable(input);
|
|
259
|
-
}
|
|
260
|
-
if (tsplus_module_2.isReadableStream(input)) {
|
|
261
|
-
return fromReadableStreamLike(input);
|
|
262
|
-
}
|
|
263
|
-
if (tsplus_module_4.isIO(input)) {
|
|
264
|
-
return fromIO_1(input);
|
|
265
|
-
}
|
|
266
|
-
if ("subscribe" in input) {
|
|
267
|
-
return fromSubscribable_1(input);
|
|
268
|
-
}
|
|
269
|
-
throw new TypeError("Invalid Observable input");
|
|
143
|
+
if (input instanceof _fncts_observable_Observable_definition.Observable) return input;
|
|
144
|
+
if (_fncts_observable_internal_util.isArrayLike(input)) return fromArrayLike(input);
|
|
145
|
+
if (_fncts_observable_internal_util.isPromiseLike(input)) return fromPromise(input);
|
|
146
|
+
if (_fncts_observable_internal_util.isAsyncIterable(input)) return fromAsyncIterable(input);
|
|
147
|
+
if (_fncts_base_util_predicates.isIterable(input)) return fromIterable(input);
|
|
148
|
+
if (_fncts_observable_internal_util.isReadableStream(input)) return fromReadableStreamLike(input);
|
|
149
|
+
if (_fncts_io_IO.isIO(input)) return fromIO_1(input);
|
|
150
|
+
if ("subscribe" in input) return fromSubscribable_1(input);
|
|
151
|
+
throw new TypeError("Invalid Observable input");
|
|
270
152
|
}
|
|
271
153
|
function fromArrayLike(input) {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
s.complete();
|
|
277
|
-
});
|
|
154
|
+
return new _fncts_observable_Observable_definition.Observable((s) => {
|
|
155
|
+
for (let i = 0; i < input.length && !s._closed; i++) s.next(input[i]);
|
|
156
|
+
s.complete();
|
|
157
|
+
});
|
|
278
158
|
}
|
|
279
159
|
function fromAsyncIterable(asyncIterable) {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
160
|
+
return new _fncts_observable_Observable_definition.Observable((s) => {
|
|
161
|
+
process(asyncIterable, s).catch((err) => s.error(_fncts_base_data_Cause_api.halt(err)));
|
|
162
|
+
});
|
|
283
163
|
}
|
|
284
164
|
function fromIterable(iterable) {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
s.complete();
|
|
293
|
-
});
|
|
165
|
+
return new _fncts_observable_Observable_definition.Observable((s) => {
|
|
166
|
+
for (const value of iterable) {
|
|
167
|
+
s.next(value);
|
|
168
|
+
if (s._closed) return;
|
|
169
|
+
}
|
|
170
|
+
s.complete();
|
|
171
|
+
});
|
|
294
172
|
}
|
|
295
173
|
function fromPromise(promise) {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
174
|
+
return new _fncts_observable_Observable_definition.Observable((s) => {
|
|
175
|
+
promise.then((value) => {
|
|
176
|
+
if (!s._closed) {
|
|
177
|
+
s.next(value);
|
|
178
|
+
s.complete();
|
|
179
|
+
}
|
|
180
|
+
}, (err) => s.error(_fncts_base_data_Cause_api.halt(err))).then(null, _fncts_observable_internal_util.reportUnhandledError);
|
|
181
|
+
});
|
|
304
182
|
}
|
|
305
183
|
function fromReadableStreamLike(readableStream) {
|
|
306
|
-
|
|
184
|
+
return fromAsyncIterable((0, _fncts_observable_internal_util.readableStreamToAsyncGenerator)(readableStream));
|
|
307
185
|
}
|
|
308
186
|
/**
|
|
309
|
-
|
|
310
|
-
|
|
187
|
+
* @tsplus static fncts.observable.ObservableOps fromSubscribable
|
|
188
|
+
*/
|
|
311
189
|
function fromSubscribable_1(subscribable) {
|
|
312
|
-
|
|
190
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber) => subscribable.subscribe(subscriber));
|
|
313
191
|
}
|
|
314
192
|
function fromInterop(subscribable) {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
193
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber) => subscribable.subscribe({
|
|
194
|
+
next: (value) => subscriber.next(value),
|
|
195
|
+
error: (err) => subscriber.error(_fncts_base_data_Cause_api.halt(err)),
|
|
196
|
+
complete: () => subscriber.complete()
|
|
197
|
+
}));
|
|
320
198
|
}
|
|
321
199
|
/**
|
|
322
|
-
|
|
323
|
-
|
|
200
|
+
* @tsplus static fncts.observable.ObservableOps if
|
|
201
|
+
*/
|
|
324
202
|
function _if_1(condition, onTrue, onFalse) {
|
|
325
|
-
|
|
203
|
+
return defer_1(() => condition() ? onTrue : onFalse);
|
|
326
204
|
}
|
|
327
205
|
/**
|
|
328
|
-
|
|
329
|
-
|
|
206
|
+
* @tsplus static fncts.observable.ObservableOps iterate
|
|
207
|
+
*/
|
|
330
208
|
function iterate(options) {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
} = options;
|
|
337
|
-
function* gen() {
|
|
338
|
-
for (let state = initialState; !cont || cont(state); state = iterate(state)) {
|
|
339
|
-
yield state;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
return defer_1(scheduler ? () => scheduleIterable(gen(), scheduler) : gen);
|
|
209
|
+
const { initialState, cont, iterate, scheduler } = options;
|
|
210
|
+
function* gen() {
|
|
211
|
+
for (let state = initialState; !cont || cont(state); state = iterate(state)) yield state;
|
|
212
|
+
}
|
|
213
|
+
return defer_1(scheduler ? () => scheduleIterable(gen(), scheduler) : gen);
|
|
343
214
|
}
|
|
344
215
|
async function process(asyncIterable, subscriber) {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
if (period < 0) {
|
|
358
|
-
period = 0;
|
|
359
|
-
}
|
|
360
|
-
return timer_1(period, period, scheduler);
|
|
216
|
+
for await (const value of asyncIterable) {
|
|
217
|
+
subscriber.next(value);
|
|
218
|
+
if (subscriber._closed) return;
|
|
219
|
+
}
|
|
220
|
+
subscriber.complete();
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* @tsplus static fncts.obervable.ObservableOps interval
|
|
224
|
+
*/
|
|
225
|
+
function interval_1(period = 0, scheduler = _fncts_observable_AsyncScheduler.asyncScheduler) {
|
|
226
|
+
if (period < 0) period = 0;
|
|
227
|
+
return timer_1(period, period, scheduler);
|
|
361
228
|
}
|
|
362
229
|
function merge(...sources) {
|
|
363
|
-
|
|
364
|
-
|
|
230
|
+
const concurrency = (0, _fncts_observable_internal_args.popNumber)(sources, Infinity);
|
|
231
|
+
return !sources.length ? empty_1() : sources.length === 1 ? from_1(sources[0]) : mergeAll_1(concurrency)(fromArrayLike(sources));
|
|
365
232
|
}
|
|
366
233
|
/**
|
|
367
|
-
|
|
368
|
-
|
|
234
|
+
* @tsplus static fncts.observable.ObservableOps of
|
|
235
|
+
*/
|
|
369
236
|
function of_1(...items) {
|
|
370
|
-
|
|
237
|
+
return fromArrayLike(items);
|
|
371
238
|
}
|
|
372
239
|
/**
|
|
373
|
-
|
|
374
|
-
|
|
240
|
+
* @tsplus static fncts.observable.ObservableOps single
|
|
241
|
+
*/
|
|
375
242
|
function single_1(a) {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
243
|
+
return new _fncts_observable_Observable_definition.Observable((s) => {
|
|
244
|
+
s.next(a);
|
|
245
|
+
s.complete();
|
|
246
|
+
});
|
|
380
247
|
}
|
|
381
248
|
/**
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
249
|
+
* @tsplus pipeable fncts.observable.Observable scheduled
|
|
250
|
+
* @tsplus static fncts.observable.ObservableOps scheduled
|
|
251
|
+
*/
|
|
385
252
|
function scheduled_1(scheduler) {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
return scheduleIterable(input, scheduler);
|
|
395
|
-
}
|
|
396
|
-
if (tsplus_module_2.isAsyncIterable(input)) {
|
|
397
|
-
return scheduleAsyncIterable(input, scheduler);
|
|
398
|
-
}
|
|
399
|
-
if (tsplus_module_2.isReadableStream(input)) {
|
|
400
|
-
return scheduleReadableStreamLike(input, scheduler);
|
|
401
|
-
}
|
|
402
|
-
return scheduleObservable(from_1(input), scheduler);
|
|
403
|
-
};
|
|
253
|
+
return (input) => {
|
|
254
|
+
if (_fncts_observable_internal_util.isArrayLike(input)) return scheduleArray(input, scheduler);
|
|
255
|
+
if (_fncts_observable_internal_util.isPromiseLike(input)) return schedulePromise(input, scheduler);
|
|
256
|
+
if (_fncts_base_util_predicates.isIterable(input)) return scheduleIterable(input, scheduler);
|
|
257
|
+
if (_fncts_observable_internal_util.isAsyncIterable(input)) return scheduleAsyncIterable(input, scheduler);
|
|
258
|
+
if (_fncts_observable_internal_util.isReadableStream(input)) return scheduleReadableStreamLike(input, scheduler);
|
|
259
|
+
return scheduleObservable(from_1(input), scheduler);
|
|
260
|
+
};
|
|
404
261
|
}
|
|
405
262
|
function scheduleArray(input, scheduler) {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
}
|
|
417
|
-
});
|
|
418
|
-
});
|
|
263
|
+
return new _fncts_observable_Observable_definition.Observable((s) => {
|
|
264
|
+
let i = 0;
|
|
265
|
+
return scheduler.schedule(function() {
|
|
266
|
+
if (i === input.length) s.complete();
|
|
267
|
+
else {
|
|
268
|
+
s.next(input[i++]);
|
|
269
|
+
if (!s._closed) this.schedule();
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
});
|
|
419
273
|
}
|
|
420
274
|
function scheduleAsyncIterable(input, scheduler) {
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
});
|
|
275
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber) => {
|
|
276
|
+
const sub = new _fncts_observable_Subscription.Subscription();
|
|
277
|
+
sub.add(scheduler.schedule(() => {
|
|
278
|
+
const iterator = input[Symbol.asyncIterator]();
|
|
279
|
+
sub.add(scheduler.schedule(function() {
|
|
280
|
+
iterator.next().then((result) => {
|
|
281
|
+
if (result.done) subscriber.complete();
|
|
282
|
+
else {
|
|
283
|
+
subscriber.next(result.value);
|
|
284
|
+
this.schedule();
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
}));
|
|
288
|
+
}));
|
|
289
|
+
return sub;
|
|
290
|
+
});
|
|
438
291
|
}
|
|
439
292
|
function scheduleIterable(input, scheduler) {
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
});
|
|
456
|
-
}));
|
|
457
|
-
return () => tsplus_module_3.isFunction(iterator?.return) && iterator.return();
|
|
458
|
-
});
|
|
293
|
+
return new _fncts_observable_Observable_definition.Observable((s) => {
|
|
294
|
+
let iterator;
|
|
295
|
+
s.add(scheduler.schedule(() => {
|
|
296
|
+
iterator = input[Symbol.iterator]();
|
|
297
|
+
(0, _fncts_observable_Scheduler.caughtSchedule)(s, scheduler, function() {
|
|
298
|
+
const { value, done } = iterator.next();
|
|
299
|
+
if (done) s.complete();
|
|
300
|
+
else {
|
|
301
|
+
s.next(value);
|
|
302
|
+
this.schedule();
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
}));
|
|
306
|
+
return () => _fncts_base_util_predicates.isFunction(iterator?.return) && iterator.return();
|
|
307
|
+
});
|
|
459
308
|
}
|
|
460
309
|
function scheduleObservable(input, scheduler) {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
310
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
311
|
+
const sub = new _fncts_observable_Subscription.Subscription();
|
|
312
|
+
sub.add(scheduler.schedule(() => {
|
|
313
|
+
sub.add(input.provideEnvironment(environment).subscribe({
|
|
314
|
+
next: (value) => {
|
|
315
|
+
sub.add(scheduler.schedule(() => subscriber.next(value)));
|
|
316
|
+
},
|
|
317
|
+
error: (err) => {
|
|
318
|
+
sub.add(scheduler.schedule(() => subscriber.error(err)));
|
|
319
|
+
},
|
|
320
|
+
complete: () => {
|
|
321
|
+
sub.add(scheduler.schedule(() => subscriber.complete()));
|
|
322
|
+
}
|
|
323
|
+
}));
|
|
324
|
+
}));
|
|
325
|
+
});
|
|
477
326
|
}
|
|
478
327
|
function schedulePromise(input, scheduler) {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
328
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber) => {
|
|
329
|
+
return scheduler.schedule(() => {
|
|
330
|
+
input.then((value) => {
|
|
331
|
+
subscriber.add(scheduler.schedule(() => {
|
|
332
|
+
subscriber.next(value);
|
|
333
|
+
subscriber.add(scheduler.schedule(() => subscriber.complete()));
|
|
334
|
+
}));
|
|
335
|
+
}, (err) => {
|
|
336
|
+
subscriber.add(scheduler.schedule(() => subscriber.error(_fncts_base_data_Cause_api.halt(err))));
|
|
337
|
+
});
|
|
338
|
+
});
|
|
339
|
+
});
|
|
491
340
|
}
|
|
492
341
|
function scheduleReadableStreamLike(input, scheduler) {
|
|
493
|
-
|
|
494
|
-
}
|
|
495
|
-
function timer_1(time = 0, intervalOrScheduler, scheduler =
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
} else {
|
|
516
|
-
s.complete();
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
}, due);
|
|
520
|
-
});
|
|
521
|
-
}
|
|
522
|
-
/**
|
|
523
|
-
* @tsplus static fncts.observable.ObservableOps zip
|
|
524
|
-
*/
|
|
342
|
+
return scheduleAsyncIterable((0, _fncts_observable_internal_util.readableStreamToAsyncGenerator)(input), scheduler);
|
|
343
|
+
}
|
|
344
|
+
function timer_1(time = 0, intervalOrScheduler, scheduler = _fncts_observable_AsyncScheduler.asyncScheduler) {
|
|
345
|
+
let intervalDuration = -1;
|
|
346
|
+
if (intervalOrScheduler != null) if (_fncts_observable_Scheduler.isScheduler(intervalOrScheduler)) scheduler = intervalOrScheduler;
|
|
347
|
+
else intervalDuration = intervalOrScheduler;
|
|
348
|
+
return new _fncts_observable_Observable_definition.Observable((s) => {
|
|
349
|
+
let due = _fncts_observable_internal_util.isValidDate(time) ? +time - scheduler.now() : time;
|
|
350
|
+
if (due < 0) due = 0;
|
|
351
|
+
let n = 0;
|
|
352
|
+
return scheduler.schedule(function() {
|
|
353
|
+
if (!s._closed) {
|
|
354
|
+
s.next(n++);
|
|
355
|
+
if (0 <= intervalDuration) this.schedule(void 0, intervalDuration);
|
|
356
|
+
else s.complete();
|
|
357
|
+
}
|
|
358
|
+
}, due);
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* @tsplus static fncts.observable.ObservableOps zip
|
|
363
|
+
*/
|
|
525
364
|
function makeZip(...sources) {
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
/**
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
const unit = exports.unit = /*#__PURE__*/single_1(undefined);
|
|
580
|
-
/**
|
|
581
|
-
* @tsplus pipeable fncts.observable.Observable zipWith
|
|
582
|
-
*/
|
|
365
|
+
return sources.length ? new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
366
|
+
let buffers = sources.map(() => []);
|
|
367
|
+
let completed = sources.map(() => false);
|
|
368
|
+
subscriber.add(() => {
|
|
369
|
+
buffers = completed = null;
|
|
370
|
+
});
|
|
371
|
+
for (let sourceIndex = 0; !subscriber._closed && sourceIndex < sources.length; sourceIndex++) from_1(sources[sourceIndex]).provideEnvironment(environment).subscribe(_fncts_observable_Operator.operatorSubscriber(subscriber, {
|
|
372
|
+
next: (value) => {
|
|
373
|
+
buffers[sourceIndex].push(value);
|
|
374
|
+
if (buffers.every((buffer) => buffer.length)) {
|
|
375
|
+
const result = buffers.map((buffer) => buffer.shift());
|
|
376
|
+
subscriber.next(result);
|
|
377
|
+
if (buffers.some((buffer, i) => !buffer.length && completed[i])) subscriber.complete();
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
complete: () => {
|
|
381
|
+
completed[sourceIndex] = true;
|
|
382
|
+
!buffers[sourceIndex].length && subscriber.complete();
|
|
383
|
+
}
|
|
384
|
+
}));
|
|
385
|
+
return () => {
|
|
386
|
+
buffers = completed = null;
|
|
387
|
+
};
|
|
388
|
+
}) : empty_1();
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* @tsplus static fncts.observable.ObservableOps fromIO
|
|
392
|
+
*/
|
|
393
|
+
function fromIO_1(io, scheduler = _fncts_observable_AsyncScheduler.asyncScheduler) {
|
|
394
|
+
return new _fncts_observable_Observable_definition.Observable((s, env) => {
|
|
395
|
+
let fiber;
|
|
396
|
+
const scheduled = scheduler.schedule(() => {
|
|
397
|
+
fiber = _fncts_io_IO_runtime.unsafeRunFiber(_fncts_io_IO_api_environment.provideEnvironment(env, fileName_1 + ":493:36")(io), fileName_1 + ":493:56");
|
|
398
|
+
fiber.addObserver((exit) => {
|
|
399
|
+
if (!s._closed) {
|
|
400
|
+
_fncts_base_data_Exit_api.match((cause) => s.error(cause), (a) => s.next(a))(exit);
|
|
401
|
+
s.complete();
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
});
|
|
405
|
+
return () => {
|
|
406
|
+
scheduled.unsubscribe();
|
|
407
|
+
fiber && _fncts_io_IO_runtime.unsafeRunFiber(_fncts_io_Fiber_api_interrupt.interrupt(fiber), fileName_1 + ":506:46");
|
|
408
|
+
};
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* @tsplus static fncts.observable.ObservableOps unit
|
|
413
|
+
*/
|
|
414
|
+
const unit = single_1(void 0);
|
|
415
|
+
/**
|
|
416
|
+
* @tsplus pipeable fncts.observable.Observable zipWith
|
|
417
|
+
*/
|
|
583
418
|
function zipWith_1(fb, f) {
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
419
|
+
return (fa) => {
|
|
420
|
+
return mergeMap_1((a) => map_1((b) => f(a, b))(fb))(fa);
|
|
421
|
+
};
|
|
587
422
|
}
|
|
588
423
|
/**
|
|
589
|
-
|
|
590
|
-
|
|
424
|
+
* @tsplus pipeable fncts.observable.Observable zip
|
|
425
|
+
*/
|
|
591
426
|
function zip(fb) {
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
427
|
+
return (fa) => {
|
|
428
|
+
return zipWith_1(fb, _fncts_base_data_function_api.tuple)(fa);
|
|
429
|
+
};
|
|
595
430
|
}
|
|
596
431
|
/**
|
|
597
|
-
|
|
598
|
-
|
|
432
|
+
* @tsplus pipeable fncts.observable.Observable ap
|
|
433
|
+
*/
|
|
599
434
|
function ap(fa) {
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
435
|
+
return (fab) => {
|
|
436
|
+
return zipWith_1(fa, (f, a) => f(a))(fab);
|
|
437
|
+
};
|
|
603
438
|
}
|
|
604
439
|
/**
|
|
605
|
-
|
|
606
|
-
|
|
440
|
+
* @tsplus pipeable fncts.observable.Observable mapWithIndex
|
|
441
|
+
*/
|
|
607
442
|
function mapWithIndex_1(f) {
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
* @tsplus pipeable fncts.observable.Observable map
|
|
621
|
-
*/
|
|
443
|
+
return (fa) => {
|
|
444
|
+
return new _fncts_observable_Observable_definition.Observable((destination, environment) => {
|
|
445
|
+
let i = 0;
|
|
446
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ next: (value) => {
|
|
447
|
+
destination.next(f(i++, value));
|
|
448
|
+
} })(destination));
|
|
449
|
+
});
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* @tsplus pipeable fncts.observable.Observable map
|
|
454
|
+
*/
|
|
622
455
|
function map_1(f) {
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
456
|
+
return (fa) => {
|
|
457
|
+
return mapWithIndex_1((_, a) => f(a))(fa);
|
|
458
|
+
};
|
|
626
459
|
}
|
|
627
460
|
/**
|
|
628
|
-
|
|
629
|
-
|
|
461
|
+
* @tsplus pipeable fncts.observable.Observable as
|
|
462
|
+
*/
|
|
630
463
|
function as_1(b) {
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
464
|
+
return (fa) => {
|
|
465
|
+
return map_1(b)(fa);
|
|
466
|
+
};
|
|
634
467
|
}
|
|
635
468
|
/**
|
|
636
|
-
|
|
637
|
-
|
|
469
|
+
* @tsplus pipeable fncts.observable.Observable mapError
|
|
470
|
+
*/
|
|
638
471
|
function mapError(f) {
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
* @tsplus getter fncts.observable.Observable swap
|
|
651
|
-
*/
|
|
472
|
+
return (fa) => {
|
|
473
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
474
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ error: (err) => {
|
|
475
|
+
subscriber.error(_fncts_base_data_Cause_api.map(f)(err));
|
|
476
|
+
} })(subscriber));
|
|
477
|
+
});
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* @tsplus getter fncts.observable.Observable swap
|
|
482
|
+
*/
|
|
652
483
|
function swap(fa) {
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
484
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
485
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
486
|
+
next: (value) => {
|
|
487
|
+
subscriber.error(_fncts_base_data_Cause_api.fail(value));
|
|
488
|
+
},
|
|
489
|
+
error: (err) => {
|
|
490
|
+
_fncts_base_data_Either_destructors.match((e) => {
|
|
491
|
+
subscriber.next(e);
|
|
492
|
+
}, (cause) => {
|
|
493
|
+
subscriber.error(cause);
|
|
494
|
+
})(_fncts_base_data_Cause_api.failureOrCause(err));
|
|
495
|
+
}
|
|
496
|
+
})(subscriber));
|
|
497
|
+
});
|
|
667
498
|
}
|
|
668
499
|
function filterWithIndex_1(predicate) {
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
});
|
|
676
|
-
};
|
|
500
|
+
return (fa) => {
|
|
501
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
502
|
+
let index = 0;
|
|
503
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ next: (value) => predicate(index++, value) && subscriber.next(value) })(subscriber));
|
|
504
|
+
});
|
|
505
|
+
};
|
|
677
506
|
}
|
|
678
507
|
function filter(predicate) {
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
508
|
+
return (fa) => {
|
|
509
|
+
return filterWithIndex_1((_, a) => predicate(a))(fa);
|
|
510
|
+
};
|
|
682
511
|
}
|
|
683
512
|
/**
|
|
684
|
-
|
|
685
|
-
|
|
513
|
+
* @tsplus pipeable fncts.observable.Observable filterMapWithIndex
|
|
514
|
+
*/
|
|
686
515
|
function filterMapWithIndex_1(f) {
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
* @tsplus pipeable fncts.observable.Observable filterMap
|
|
698
|
-
*/
|
|
516
|
+
return (fa) => {
|
|
517
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
518
|
+
let index = 0;
|
|
519
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ next: (value) => _fncts_base_data_Maybe_destructors.match(() => _fncts_observable_internal_util.noop, (b) => subscriber.next(b))(f(index++, value)) })(subscriber));
|
|
520
|
+
});
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* @tsplus pipeable fncts.observable.Observable filterMap
|
|
525
|
+
*/
|
|
699
526
|
function filterMap(f) {
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
527
|
+
return (fa) => {
|
|
528
|
+
return filterMapWithIndex_1((_, a) => f(a))(fa);
|
|
529
|
+
};
|
|
703
530
|
}
|
|
704
531
|
function partitionWithIndex_1(predicate) {
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
532
|
+
return (fa) => {
|
|
533
|
+
return [filterWithIndex_1((i, a) => !predicate(i, a))(fa), filterWithIndex_1(predicate)(fa)];
|
|
534
|
+
};
|
|
708
535
|
}
|
|
709
536
|
function partition(predicate) {
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
537
|
+
return (fa) => {
|
|
538
|
+
return partitionWithIndex_1((_, a) => predicate(a))(fa);
|
|
539
|
+
};
|
|
713
540
|
}
|
|
714
541
|
/**
|
|
715
|
-
|
|
716
|
-
|
|
542
|
+
* @tsplus pipeable fncts.observable.Observable partitionMapWithIndex
|
|
543
|
+
*/
|
|
717
544
|
function partitionMapWithIndex_1(f) {
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
}
|
|
736
|
-
/**
|
|
737
|
-
* @tsplus pipeable fncts.observable.Observable partitionMap
|
|
738
|
-
*/
|
|
545
|
+
return (fa) => {
|
|
546
|
+
return [new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
547
|
+
let index = 0;
|
|
548
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ next: (value) => {
|
|
549
|
+
_fncts_base_data_Either_destructors.match((b) => subscriber.next(b), _fncts_observable_internal_util.noop)(f(index++, value));
|
|
550
|
+
} })(subscriber));
|
|
551
|
+
}), new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
552
|
+
let index = 0;
|
|
553
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ next: (value) => {
|
|
554
|
+
_fncts_base_data_Either_destructors.match(_fncts_observable_internal_util.noop, (c) => subscriber.next(c))(f(index++, value));
|
|
555
|
+
} })(subscriber));
|
|
556
|
+
})];
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* @tsplus pipeable fncts.observable.Observable partitionMap
|
|
561
|
+
*/
|
|
739
562
|
function partitionMap(f) {
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
563
|
+
return (fa) => {
|
|
564
|
+
return partitionMapWithIndex_1((_, a) => f(a))(fa);
|
|
565
|
+
};
|
|
743
566
|
}
|
|
744
567
|
/**
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
function provideService(service,
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
568
|
+
* @tsplus pipeable fncts.observable.Observable provideService
|
|
569
|
+
*/
|
|
570
|
+
function provideService(service, tag) {
|
|
571
|
+
return (self) => {
|
|
572
|
+
return contramapEnvironment_1((environment) => _fncts_base_data_Environment_api.add(service, tag)(environment))(self);
|
|
573
|
+
};
|
|
751
574
|
}
|
|
752
575
|
/**
|
|
753
|
-
|
|
754
|
-
|
|
576
|
+
* @tsplus pipeable fncts.observable.Observable mergeMapWithIndex
|
|
577
|
+
*/
|
|
755
578
|
function mergeMapWithIndex_1(f, concurrent = Infinity) {
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
579
|
+
return (ma) => {
|
|
580
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
581
|
+
return mergeInternal(ma, subscriber, environment, f, concurrent);
|
|
582
|
+
});
|
|
583
|
+
};
|
|
761
584
|
}
|
|
762
585
|
/**
|
|
763
|
-
|
|
764
|
-
|
|
586
|
+
* @tsplus pipeable fncts.observable.Observable mergeMap
|
|
587
|
+
*/
|
|
765
588
|
function mergeMap_1(f, concurrent = Infinity) {
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
589
|
+
return (ma) => {
|
|
590
|
+
return mergeMapWithIndex_1((_, a) => f(a), concurrent)(ma);
|
|
591
|
+
};
|
|
769
592
|
}
|
|
770
593
|
/**
|
|
771
|
-
|
|
772
|
-
|
|
594
|
+
* @tsplus pipeable fncts.observable.Observable concatMapWithIndex
|
|
595
|
+
*/
|
|
773
596
|
function concatMapWithIndex(f) {
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
597
|
+
return (ma) => {
|
|
598
|
+
return mergeMapWithIndex_1(f, 1)(ma);
|
|
599
|
+
};
|
|
777
600
|
}
|
|
778
601
|
/**
|
|
779
|
-
|
|
780
|
-
|
|
602
|
+
* @tsplus pipeable fncts.observable.Observable concatMap
|
|
603
|
+
*/
|
|
781
604
|
function concatMap(f) {
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
605
|
+
return (ma) => {
|
|
606
|
+
return mergeMapWithIndex_1((_, a) => f(a), 1)(ma);
|
|
607
|
+
};
|
|
785
608
|
}
|
|
786
609
|
/**
|
|
787
|
-
|
|
788
|
-
|
|
610
|
+
* @tsplus pipeable fncts.observable.Observable contramapEnvironment
|
|
611
|
+
*/
|
|
789
612
|
function contramapEnvironment_1(f) {
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
613
|
+
return (self) => {
|
|
614
|
+
return environmentWithObservable_1((environment) => self.provideEnvironment(f(environment)));
|
|
615
|
+
};
|
|
793
616
|
}
|
|
794
617
|
/**
|
|
795
|
-
|
|
796
|
-
|
|
618
|
+
* @tsplus getter fncts.observable.Observable flatten
|
|
619
|
+
*/
|
|
797
620
|
function flatten(mma) {
|
|
798
|
-
|
|
621
|
+
return concatAll_1(mma);
|
|
799
622
|
}
|
|
800
623
|
/**
|
|
801
|
-
|
|
802
|
-
|
|
624
|
+
* @tsplus pipeable fncts.observable.Observable foldLeftWithIndex
|
|
625
|
+
*/
|
|
803
626
|
function foldLeftWithIndex_1(initial, f) {
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
627
|
+
return (fa) => {
|
|
628
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
629
|
+
return scanInternal(fa, subscriber, environment, f, initial, true, false, true);
|
|
630
|
+
});
|
|
631
|
+
};
|
|
809
632
|
}
|
|
810
633
|
/**
|
|
811
|
-
|
|
812
|
-
|
|
634
|
+
* @tsplus pipeable fncts.observable.Observable foldLeft
|
|
635
|
+
*/
|
|
813
636
|
function foldLeft_1(initial, f) {
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
637
|
+
return (fa) => {
|
|
638
|
+
return foldLeftWithIndex_1(initial, (_, b, a) => f(b, a))(fa);
|
|
639
|
+
};
|
|
817
640
|
}
|
|
818
641
|
/**
|
|
819
|
-
|
|
820
|
-
|
|
642
|
+
* @tsplus pipeable fncts.observable.Observable at
|
|
643
|
+
*/
|
|
821
644
|
function at(index) {
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
645
|
+
return (fa) => {
|
|
646
|
+
return onEmpty_1(() => _fncts_base_data_Maybe_constructors.nothing(fileName_1 + ":849:29"))(map_1(_fncts_base_data_Maybe_constructors.just)(take_1(1)(filterWithIndex_1((i) => i === index)(fa))));
|
|
647
|
+
};
|
|
825
648
|
}
|
|
826
649
|
/**
|
|
827
|
-
|
|
828
|
-
|
|
650
|
+
* @tsplus pipeable fncts.observable.Observable audit
|
|
651
|
+
*/
|
|
829
652
|
function audit_1(durationSelector) {
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
}
|
|
877
|
-
/**
|
|
878
|
-
* @tsplus pipeable fncts.observable.Observable buffer
|
|
879
|
-
*/
|
|
653
|
+
return (fa) => {
|
|
654
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
655
|
+
let lastValue = _fncts_base_data_Maybe_constructors.nothing(fileName_1 + ":859:40");
|
|
656
|
+
let durationSubscriber = null;
|
|
657
|
+
let isComplete = false;
|
|
658
|
+
const endDuration = () => {
|
|
659
|
+
durationSubscriber?.unsubscribe();
|
|
660
|
+
durationSubscriber = null;
|
|
661
|
+
if (_fncts_base_data_Maybe_definition.isJust(lastValue)) {
|
|
662
|
+
const { value } = lastValue;
|
|
663
|
+
lastValue = _fncts_base_data_Maybe_constructors.nothing(fileName_1 + ":867:36");
|
|
664
|
+
subscriber.next(value);
|
|
665
|
+
}
|
|
666
|
+
isComplete && subscriber.complete();
|
|
667
|
+
};
|
|
668
|
+
const cleanupDuration = () => {
|
|
669
|
+
durationSubscriber = null;
|
|
670
|
+
isComplete && subscriber.complete();
|
|
671
|
+
};
|
|
672
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operatorSubscriber(subscriber, {
|
|
673
|
+
next: (value) => {
|
|
674
|
+
lastValue = _fncts_base_data_Maybe_constructors.just(value, fileName_1 + ":879:29");
|
|
675
|
+
if (!durationSubscriber) from_1(durationSelector(value)).provideEnvironment(environment).subscribe(durationSubscriber = _fncts_observable_Operator.operatorSubscriber(subscriber, {
|
|
676
|
+
next: endDuration,
|
|
677
|
+
complete: cleanupDuration
|
|
678
|
+
}));
|
|
679
|
+
},
|
|
680
|
+
complete: () => {
|
|
681
|
+
isComplete = true;
|
|
682
|
+
(_fncts_base_data_Maybe_definition.isNothing(lastValue) || !durationSubscriber || durationSubscriber._closed) && subscriber.complete();
|
|
683
|
+
}
|
|
684
|
+
}));
|
|
685
|
+
});
|
|
686
|
+
};
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* @tsplus pipeable fncts.observable.Observable auditTime
|
|
690
|
+
*/
|
|
691
|
+
function auditTime(duration, scheduler = _fncts_observable_AsyncScheduler.asyncScheduler) {
|
|
692
|
+
return (fa) => {
|
|
693
|
+
return audit_1(() => timer_1(duration, scheduler))(fa);
|
|
694
|
+
};
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* @tsplus pipeable fncts.observable.Observable buffer
|
|
698
|
+
*/
|
|
880
699
|
function buffer(closingNotifier) {
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
}
|
|
905
|
-
/**
|
|
906
|
-
|
|
907
|
-
|
|
700
|
+
return (fa) => {
|
|
701
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
702
|
+
let buffer = [];
|
|
703
|
+
fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
704
|
+
next: (value) => buffer.push(value),
|
|
705
|
+
complete: () => {
|
|
706
|
+
subscriber.next(buffer);
|
|
707
|
+
subscriber.complete();
|
|
708
|
+
}
|
|
709
|
+
})(subscriber));
|
|
710
|
+
closingNotifier.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
711
|
+
next: () => {
|
|
712
|
+
const b = buffer;
|
|
713
|
+
buffer = [];
|
|
714
|
+
subscriber.next(b);
|
|
715
|
+
},
|
|
716
|
+
complete: _fncts_observable_internal_util.noop
|
|
717
|
+
})(subscriber));
|
|
718
|
+
return () => {
|
|
719
|
+
buffer = null;
|
|
720
|
+
};
|
|
721
|
+
});
|
|
722
|
+
};
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* @tsplus pipeable fncts.observable.Observable bufferCount
|
|
726
|
+
*/
|
|
908
727
|
function bufferCount(bufferSize, startBufferEvery) {
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
});
|
|
945
|
-
};
|
|
946
|
-
}
|
|
947
|
-
/**
|
|
948
|
-
* @tsplus pipeable fncts.observable.Observable bufferTime
|
|
949
|
-
*/
|
|
728
|
+
return (fa) => {
|
|
729
|
+
startBufferEvery = startBufferEvery ?? bufferSize;
|
|
730
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
731
|
+
let buffers = [];
|
|
732
|
+
let count = 0;
|
|
733
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
734
|
+
next: (value) => {
|
|
735
|
+
let toEmit = null;
|
|
736
|
+
if (count++ % startBufferEvery === 0) buffers.push([]);
|
|
737
|
+
for (const buffer of buffers) {
|
|
738
|
+
buffer.push(value);
|
|
739
|
+
if (bufferSize <= buffer.length) {
|
|
740
|
+
toEmit = toEmit ?? [];
|
|
741
|
+
toEmit.push(buffer);
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
if (toEmit) for (const buffer of toEmit) {
|
|
745
|
+
(0, _fncts_observable_internal_util.arrayRemove)(buffers, buffer);
|
|
746
|
+
subscriber.next(buffer);
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
complete: () => {
|
|
750
|
+
for (const buffer of buffers) subscriber.next(buffer);
|
|
751
|
+
subscriber.complete();
|
|
752
|
+
},
|
|
753
|
+
finalize: () => {
|
|
754
|
+
buffers = null;
|
|
755
|
+
}
|
|
756
|
+
})(subscriber));
|
|
757
|
+
});
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
/**
|
|
761
|
+
* @tsplus pipeable fncts.observable.Observable bufferTime
|
|
762
|
+
*/
|
|
950
763
|
function bufferTime(config) {
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
subscriber.unsubscribe();
|
|
1007
|
-
},
|
|
1008
|
-
finalize: () => {
|
|
1009
|
-
bufferRecords = null;
|
|
1010
|
-
}
|
|
1011
|
-
})(subscriber);
|
|
1012
|
-
return fa.provideEnvironment(environment).subscribe(bufferTimeSubscriber);
|
|
1013
|
-
});
|
|
1014
|
-
};
|
|
1015
|
-
}
|
|
1016
|
-
/**
|
|
1017
|
-
* @tsplus pipeable fncts.observable.Observable bufferToggle
|
|
1018
|
-
*/
|
|
764
|
+
return (fa) => {
|
|
765
|
+
const { bufferTimeSpan, bufferCreationInterval = null, maxBufferSize = Infinity, scheduler = _fncts_observable_AsyncScheduler.asyncScheduler } = config;
|
|
766
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
767
|
+
let bufferRecords = [];
|
|
768
|
+
let restartOnEmit = true;
|
|
769
|
+
const emit = (record) => {
|
|
770
|
+
const { buffer, subs } = record;
|
|
771
|
+
subs.unsubscribe();
|
|
772
|
+
(0, _fncts_observable_internal_util.arrayRemove)(bufferRecords, record);
|
|
773
|
+
subscriber.next(buffer);
|
|
774
|
+
restartOnEmit && startBuffer();
|
|
775
|
+
};
|
|
776
|
+
const startBuffer = () => {
|
|
777
|
+
if (bufferRecords) {
|
|
778
|
+
const subs = new _fncts_observable_Subscription.Subscription();
|
|
779
|
+
subscriber.add(subs);
|
|
780
|
+
const record = {
|
|
781
|
+
buffer: [],
|
|
782
|
+
subs
|
|
783
|
+
};
|
|
784
|
+
bufferRecords.push(record);
|
|
785
|
+
subs.add(scheduler.schedule(() => emit(record), bufferTimeSpan));
|
|
786
|
+
}
|
|
787
|
+
};
|
|
788
|
+
bufferCreationInterval !== null && bufferCreationInterval >= 0 ? subscriber.add(scheduler.schedule(function() {
|
|
789
|
+
startBuffer();
|
|
790
|
+
!this._closed && subscriber.add(this.schedule(null, bufferCreationInterval));
|
|
791
|
+
}, bufferCreationInterval)) : restartOnEmit = true;
|
|
792
|
+
startBuffer();
|
|
793
|
+
const bufferTimeSubscriber = _fncts_observable_Operator.operate_({
|
|
794
|
+
next: (value) => {
|
|
795
|
+
const recordsCopy = bufferRecords.slice();
|
|
796
|
+
for (const record of recordsCopy) {
|
|
797
|
+
const { buffer } = record;
|
|
798
|
+
buffer.push(value);
|
|
799
|
+
maxBufferSize <= buffer.length && emit(record);
|
|
800
|
+
}
|
|
801
|
+
},
|
|
802
|
+
complete: () => {
|
|
803
|
+
while (bufferRecords?.length) subscriber.next(bufferRecords.shift().buffer);
|
|
804
|
+
bufferTimeSubscriber?.unsubscribe();
|
|
805
|
+
subscriber.complete();
|
|
806
|
+
subscriber.unsubscribe();
|
|
807
|
+
},
|
|
808
|
+
finalize: () => {
|
|
809
|
+
bufferRecords = null;
|
|
810
|
+
}
|
|
811
|
+
})(subscriber);
|
|
812
|
+
return fa.provideEnvironment(environment).subscribe(bufferTimeSubscriber);
|
|
813
|
+
});
|
|
814
|
+
};
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* @tsplus pipeable fncts.observable.Observable bufferToggle
|
|
818
|
+
*/
|
|
1019
819
|
function bufferToggle(openings, closingSelector) {
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
}
|
|
1056
|
-
/**
|
|
1057
|
-
* @tsplus pipeable fncts.observable.Observable bufferWhen
|
|
1058
|
-
*/
|
|
820
|
+
return (fa) => {
|
|
821
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
822
|
+
const buffers = [];
|
|
823
|
+
from_1(openings).provideEnvironment(environment).subscribe(_fncts_observable_Operator.operatorSubscriber(subscriber, {
|
|
824
|
+
next: (openValue) => {
|
|
825
|
+
const buffer = [];
|
|
826
|
+
buffers.push(buffer);
|
|
827
|
+
const closingSubscription = new _fncts_observable_Subscription.Subscription();
|
|
828
|
+
const emitBuffer = () => {
|
|
829
|
+
(0, _fncts_observable_internal_util.arrayRemove)(buffers, buffer);
|
|
830
|
+
subscriber.next(buffer);
|
|
831
|
+
closingSubscription.unsubscribe();
|
|
832
|
+
};
|
|
833
|
+
closingSubscription.add(from_1(closingSelector(openValue)).provideEnvironment(environment).subscribe(_fncts_observable_Operator.operatorSubscriber(subscriber, {
|
|
834
|
+
next: emitBuffer,
|
|
835
|
+
complete: _fncts_observable_internal_util.noop
|
|
836
|
+
})));
|
|
837
|
+
},
|
|
838
|
+
complete: _fncts_observable_internal_util.noop
|
|
839
|
+
}));
|
|
840
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
841
|
+
next: (value) => {
|
|
842
|
+
for (const buffer of buffers) buffer.push(value);
|
|
843
|
+
},
|
|
844
|
+
complete: () => {
|
|
845
|
+
while (buffers.length > 0) subscriber.next(buffers.shift());
|
|
846
|
+
subscriber.complete();
|
|
847
|
+
}
|
|
848
|
+
})(subscriber));
|
|
849
|
+
});
|
|
850
|
+
};
|
|
851
|
+
}
|
|
852
|
+
/**
|
|
853
|
+
* @tsplus pipeable fncts.observable.Observable bufferWhen
|
|
854
|
+
*/
|
|
1059
855
|
function bufferWhen(closingSelector) {
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
}
|
|
1086
|
-
/**
|
|
1087
|
-
|
|
1088
|
-
|
|
856
|
+
return (fa) => {
|
|
857
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
858
|
+
let buffer = null;
|
|
859
|
+
let closingSubscriber = null;
|
|
860
|
+
const openBuffer = () => {
|
|
861
|
+
closingSubscriber?.unsubscribe();
|
|
862
|
+
const b = buffer;
|
|
863
|
+
buffer = [];
|
|
864
|
+
b && subscriber.next(b);
|
|
865
|
+
from_1(closingSelector()).provideEnvironment(environment).subscribe(closingSubscriber = _fncts_observable_Operator.operatorSubscriber(subscriber, {
|
|
866
|
+
next: openBuffer,
|
|
867
|
+
complete: _fncts_observable_internal_util.noop
|
|
868
|
+
}));
|
|
869
|
+
};
|
|
870
|
+
openBuffer();
|
|
871
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
872
|
+
next: (value) => buffer?.push(value),
|
|
873
|
+
complete: () => {
|
|
874
|
+
buffer && subscriber.next(buffer);
|
|
875
|
+
subscriber.complete();
|
|
876
|
+
},
|
|
877
|
+
finalize: () => buffer = closingSubscriber = null
|
|
878
|
+
})(subscriber));
|
|
879
|
+
});
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* @tsplus pipeable fncts.observable.Observable catchAllCause
|
|
884
|
+
*/
|
|
1089
885
|
function catchAllCause_1(f) {
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
}
|
|
1115
|
-
/**
|
|
1116
|
-
* @tsplus getter fncts.observable.Observable concatAll
|
|
1117
|
-
*/
|
|
886
|
+
return (self) => {
|
|
887
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
888
|
+
let innerSub = null;
|
|
889
|
+
let syncUnsub = false;
|
|
890
|
+
let handledResult;
|
|
891
|
+
innerSub = self.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ error: (cause) => {
|
|
892
|
+
handledResult = from_1(f(cause, catchAllCause_1(f)(self)));
|
|
893
|
+
if (innerSub) {
|
|
894
|
+
innerSub.unsubscribe();
|
|
895
|
+
innerSub = null;
|
|
896
|
+
handledResult.provideEnvironment(environment).subscribe(subscriber);
|
|
897
|
+
} else syncUnsub = true;
|
|
898
|
+
} })(subscriber));
|
|
899
|
+
if (syncUnsub) {
|
|
900
|
+
innerSub.unsubscribe();
|
|
901
|
+
innerSub = null;
|
|
902
|
+
handledResult.provideEnvironment(environment).subscribe(subscriber);
|
|
903
|
+
}
|
|
904
|
+
});
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
/**
|
|
908
|
+
* @tsplus getter fncts.observable.Observable concatAll
|
|
909
|
+
*/
|
|
1118
910
|
function concatAll_1(ffa) {
|
|
1119
|
-
|
|
911
|
+
return mergeAll_1(1)(ffa);
|
|
1120
912
|
}
|
|
1121
913
|
/**
|
|
1122
|
-
|
|
1123
|
-
|
|
914
|
+
* @tsplus pipeable fncts.observable.Observable concat
|
|
915
|
+
*/
|
|
1124
916
|
function concat_1(...sources) {
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
917
|
+
return (fa) => {
|
|
918
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
919
|
+
return concatAll_1(fromArrayLike([fa, ...sources])).provideEnvironment(environment).subscribe(subscriber);
|
|
920
|
+
});
|
|
921
|
+
};
|
|
1130
922
|
}
|
|
1131
923
|
/**
|
|
1132
|
-
|
|
1133
|
-
|
|
924
|
+
* @tsplus getter fncts.observable.Observable count
|
|
925
|
+
*/
|
|
1134
926
|
function count(fa) {
|
|
1135
|
-
|
|
927
|
+
return foldLeft_1(0, (total, _) => total + 1)(fa);
|
|
1136
928
|
}
|
|
1137
929
|
/**
|
|
1138
|
-
|
|
1139
|
-
|
|
930
|
+
* @tsplus pipeable fncts.observable.Observable countWithIndex
|
|
931
|
+
*/
|
|
1140
932
|
function countWithIndex_1(predicate) {
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
933
|
+
return (fa) => {
|
|
934
|
+
return foldLeftWithIndex_1(0, (i, total, v) => predicate(i, v) ? total + 1 : total)(fa);
|
|
935
|
+
};
|
|
1144
936
|
}
|
|
1145
937
|
/**
|
|
1146
|
-
|
|
1147
|
-
|
|
938
|
+
* @tsplus pipeable fncts.observable.Observable countWith
|
|
939
|
+
*/
|
|
1148
940
|
function countWith(predicate) {
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
941
|
+
return (fa) => {
|
|
942
|
+
return countWithIndex_1((_, a) => predicate(a))(fa);
|
|
943
|
+
};
|
|
1152
944
|
}
|
|
1153
945
|
/**
|
|
1154
|
-
|
|
1155
|
-
|
|
946
|
+
* @tsplus getter fncts.observable.Observable combineLatestAll
|
|
947
|
+
*/
|
|
1156
948
|
function combineLatestAll(fa) {
|
|
1157
|
-
|
|
949
|
+
return joinAllInternal(fa, (sources) => !sources.length ? empty_1() : zipLatest_1(sources[0], ...sources.slice(1)));
|
|
1158
950
|
}
|
|
1159
951
|
/**
|
|
1160
|
-
|
|
1161
|
-
|
|
952
|
+
* @tsplus pipeable fncts.observable.Observable zipLatest
|
|
953
|
+
*/
|
|
1162
954
|
function zipLatest_1(...sources) {
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
* @tsplus pipeable fncts.observable.Observable zipWithLatest
|
|
1174
|
-
*/
|
|
955
|
+
return (self) => {
|
|
956
|
+
if (!sources.length) return from_1(self);
|
|
957
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
958
|
+
return combineLatestInternal(subscriber, environment, [self, ...sources]);
|
|
959
|
+
});
|
|
960
|
+
};
|
|
961
|
+
}
|
|
962
|
+
/**
|
|
963
|
+
* @tsplus pipeable fncts.observable.Observable zipWithLatest
|
|
964
|
+
*/
|
|
1175
965
|
function zipWithLatest(that, f) {
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
966
|
+
return (self) => {
|
|
967
|
+
return map_1(_fncts_base_data_function_api.tupled(f))(zipLatest_1(from_1(that))(self));
|
|
968
|
+
};
|
|
1179
969
|
}
|
|
1180
970
|
/**
|
|
1181
|
-
|
|
1182
|
-
|
|
971
|
+
* @tsplus pipeable fncts.observable.Observable debounceWith
|
|
972
|
+
*/
|
|
1183
973
|
function debounceWith(durationSelector) {
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
* @tsplus getter fncts.observable.Observable either
|
|
1270
|
-
*/
|
|
974
|
+
return (fa) => {
|
|
975
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
976
|
+
let lastValue = _fncts_base_data_Maybe_constructors.nothing(fileName_1 + ":1294:40");
|
|
977
|
+
let durationSubscriber = null;
|
|
978
|
+
const emit = () => {
|
|
979
|
+
durationSubscriber?.unsubscribe();
|
|
980
|
+
durationSubscriber = null;
|
|
981
|
+
if (_fncts_base_data_Maybe_definition.isJust(lastValue)) {
|
|
982
|
+
const { value } = lastValue;
|
|
983
|
+
lastValue = _fncts_base_data_Maybe_constructors.nothing(fileName_1 + ":1301:36");
|
|
984
|
+
subscriber.next(value);
|
|
985
|
+
}
|
|
986
|
+
};
|
|
987
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
988
|
+
next: (value) => {
|
|
989
|
+
durationSubscriber?.unsubscribe();
|
|
990
|
+
lastValue = _fncts_base_data_Maybe_constructors.just(value, fileName_1 + ":1309:38");
|
|
991
|
+
durationSubscriber = _fncts_observable_Operator.operate_({
|
|
992
|
+
next: emit,
|
|
993
|
+
complete: _fncts_observable_internal_util.noop
|
|
994
|
+
})(subscriber);
|
|
995
|
+
from_1(durationSelector(value)).provideEnvironment(environment).subscribe(durationSubscriber);
|
|
996
|
+
},
|
|
997
|
+
complete: () => {
|
|
998
|
+
emit();
|
|
999
|
+
subscriber.complete();
|
|
1000
|
+
},
|
|
1001
|
+
finalize: () => {
|
|
1002
|
+
lastValue = durationSubscriber = null;
|
|
1003
|
+
}
|
|
1004
|
+
})(subscriber));
|
|
1005
|
+
});
|
|
1006
|
+
};
|
|
1007
|
+
}
|
|
1008
|
+
/**
|
|
1009
|
+
* @tsplus pipeable fncts.observable.Observable debounce
|
|
1010
|
+
*/
|
|
1011
|
+
function debounce(dueTime, scheduler = _fncts_observable_AsyncScheduler.asyncScheduler) {
|
|
1012
|
+
return (fa) => {
|
|
1013
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1014
|
+
let activeTask = null;
|
|
1015
|
+
let lastValue = null;
|
|
1016
|
+
let lastTime = null;
|
|
1017
|
+
const emit = () => {
|
|
1018
|
+
if (activeTask) {
|
|
1019
|
+
activeTask.unsubscribe();
|
|
1020
|
+
activeTask = null;
|
|
1021
|
+
const value = lastValue;
|
|
1022
|
+
lastValue = null;
|
|
1023
|
+
subscriber.next(value);
|
|
1024
|
+
}
|
|
1025
|
+
};
|
|
1026
|
+
function emitWhenIdle() {
|
|
1027
|
+
const targetTime = lastTime + dueTime;
|
|
1028
|
+
const now = scheduler.now();
|
|
1029
|
+
if (now < targetTime) {
|
|
1030
|
+
activeTask = this.schedule(void 0, targetTime - now);
|
|
1031
|
+
subscriber.add(activeTask);
|
|
1032
|
+
return;
|
|
1033
|
+
}
|
|
1034
|
+
emit();
|
|
1035
|
+
}
|
|
1036
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1037
|
+
next: (value) => {
|
|
1038
|
+
lastValue = value;
|
|
1039
|
+
lastTime = scheduler.now();
|
|
1040
|
+
if (!activeTask) {
|
|
1041
|
+
activeTask = scheduler.schedule(emitWhenIdle, dueTime);
|
|
1042
|
+
subscriber.add(activeTask);
|
|
1043
|
+
}
|
|
1044
|
+
},
|
|
1045
|
+
complete: () => {
|
|
1046
|
+
emit();
|
|
1047
|
+
subscriber.complete();
|
|
1048
|
+
},
|
|
1049
|
+
finalize: () => {
|
|
1050
|
+
lastValue = activeTask = null;
|
|
1051
|
+
}
|
|
1052
|
+
})(subscriber));
|
|
1053
|
+
});
|
|
1054
|
+
};
|
|
1055
|
+
}
|
|
1056
|
+
/**
|
|
1057
|
+
* @tsplus getter fncts.observable.Observable either
|
|
1058
|
+
*/
|
|
1271
1059
|
function either(fa) {
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
}
|
|
1283
|
-
/**
|
|
1284
|
-
|
|
1285
|
-
|
|
1060
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1061
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1062
|
+
next: (value) => {
|
|
1063
|
+
subscriber.next(_fncts_base_data_Either_constructors.right(value, fileName_1 + ":1385:39"));
|
|
1064
|
+
},
|
|
1065
|
+
error: (error) => {
|
|
1066
|
+
_fncts_base_data_Either_destructors.match((e) => subscriber.next(_fncts_base_data_Either_constructors.left(e, fileName_1 + ":1389:47")), (cause) => subscriber.error(cause))(_fncts_base_data_Cause_api.failureOrCause(error));
|
|
1067
|
+
}
|
|
1068
|
+
})(subscriber));
|
|
1069
|
+
});
|
|
1070
|
+
}
|
|
1071
|
+
/**
|
|
1072
|
+
* @tsplus pipeable fncts.observable.Observable delayWithIndex
|
|
1073
|
+
*/
|
|
1286
1074
|
function delayWithIndex_1(f) {
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1075
|
+
return (fa) => {
|
|
1076
|
+
return mergeMapWithIndex_1((i, a) => as_1(() => a)(take_1(1)(f(i, a))))(fa);
|
|
1077
|
+
};
|
|
1290
1078
|
}
|
|
1291
1079
|
/**
|
|
1292
|
-
|
|
1293
|
-
|
|
1080
|
+
* @tsplus pipeable fncts.observable.Observable delayWith
|
|
1081
|
+
*/
|
|
1294
1082
|
function delayWith_1(f) {
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1083
|
+
return (fa) => {
|
|
1084
|
+
return delayWithIndex_1((_, a) => f(a))(fa);
|
|
1085
|
+
};
|
|
1298
1086
|
}
|
|
1299
1087
|
/**
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
function delay(due, scheduler =
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1088
|
+
* @tsplus pipeable fncts.observable.Observable delay
|
|
1089
|
+
*/
|
|
1090
|
+
function delay(due, scheduler = _fncts_observable_AsyncScheduler.asyncScheduler) {
|
|
1091
|
+
return (fa) => {
|
|
1092
|
+
const duration = timer_1(due, scheduler);
|
|
1093
|
+
return delayWith_1(() => duration)(fa);
|
|
1094
|
+
};
|
|
1307
1095
|
}
|
|
1308
1096
|
/**
|
|
1309
|
-
|
|
1310
|
-
|
|
1097
|
+
* @tsplus getter fncts.observable.Observable dematerialize
|
|
1098
|
+
*/
|
|
1311
1099
|
function dematerialize(fa) {
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
})(subscriber));
|
|
1316
|
-
});
|
|
1100
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1101
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ next: (notification) => _fncts_observable_Notification.observe(subscriber)(notification) })(subscriber));
|
|
1102
|
+
});
|
|
1317
1103
|
}
|
|
1318
1104
|
/**
|
|
1319
|
-
|
|
1320
|
-
|
|
1105
|
+
* @tsplus pipeable fncts.observable.Observable ensuring
|
|
1106
|
+
*/
|
|
1321
1107
|
function ensuring(finalizer) {
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1108
|
+
return (fa) => {
|
|
1109
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1110
|
+
subscriber.add(finalizer);
|
|
1111
|
+
return fa.provideEnvironment(environment).subscribe(subscriber);
|
|
1112
|
+
});
|
|
1113
|
+
};
|
|
1328
1114
|
}
|
|
1329
1115
|
/**
|
|
1330
|
-
|
|
1331
|
-
|
|
1116
|
+
* @tsplus getter fncts.observable.Observable exhaustAll
|
|
1117
|
+
*/
|
|
1332
1118
|
function exhaustAll(ffa) {
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
}
|
|
1354
|
-
/**
|
|
1355
|
-
* @tsplus pipeable fncts.observable.Observable exhaustMapWithIndex
|
|
1356
|
-
*/
|
|
1119
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1120
|
+
let isComplete = false;
|
|
1121
|
+
let innerSub = null;
|
|
1122
|
+
return ffa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operatorSubscriber(subscriber, {
|
|
1123
|
+
next: (inner) => {
|
|
1124
|
+
if (!innerSub) innerSub = from_1(inner).provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ complete: () => {
|
|
1125
|
+
innerSub = null;
|
|
1126
|
+
isComplete && subscriber.complete();
|
|
1127
|
+
} })(subscriber));
|
|
1128
|
+
},
|
|
1129
|
+
complete: () => {
|
|
1130
|
+
isComplete = true;
|
|
1131
|
+
!innerSub && subscriber.complete();
|
|
1132
|
+
}
|
|
1133
|
+
}));
|
|
1134
|
+
});
|
|
1135
|
+
}
|
|
1136
|
+
/**
|
|
1137
|
+
* @tsplus pipeable fncts.observable.Observable exhaustMapWithIndex
|
|
1138
|
+
*/
|
|
1357
1139
|
function exhaustMapWithIndex_1(f) {
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
* @tsplus pipeable fncts.observable.Observable exhaustMap
|
|
1385
|
-
*/
|
|
1140
|
+
return (self) => {
|
|
1141
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1142
|
+
let index = 0;
|
|
1143
|
+
let innerSub = null;
|
|
1144
|
+
let isComplete = false;
|
|
1145
|
+
self.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1146
|
+
next: (outerValue) => {
|
|
1147
|
+
if (!innerSub) {
|
|
1148
|
+
innerSub = _fncts_observable_Operator.operate_({ complete: () => {
|
|
1149
|
+
innerSub = null;
|
|
1150
|
+
isComplete && subscriber.complete();
|
|
1151
|
+
} })(subscriber);
|
|
1152
|
+
from_1(f(index++, outerValue)).provideEnvironment(environment).subscribe(innerSub);
|
|
1153
|
+
}
|
|
1154
|
+
},
|
|
1155
|
+
complete: () => {
|
|
1156
|
+
isComplete = true;
|
|
1157
|
+
!innerSub && subscriber.complete();
|
|
1158
|
+
}
|
|
1159
|
+
})(subscriber));
|
|
1160
|
+
});
|
|
1161
|
+
};
|
|
1162
|
+
}
|
|
1163
|
+
/**
|
|
1164
|
+
* @tsplus pipeable fncts.observable.Observable exhaustMap
|
|
1165
|
+
*/
|
|
1386
1166
|
function exhaustMap(f) {
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1167
|
+
return (self) => {
|
|
1168
|
+
return exhaustMapWithIndex_1((_, a) => f(a))(self);
|
|
1169
|
+
};
|
|
1390
1170
|
}
|
|
1391
1171
|
/**
|
|
1392
|
-
|
|
1393
|
-
|
|
1172
|
+
* @tsplus pipeable fncts.observable.Observable expandWithIndex
|
|
1173
|
+
*/
|
|
1394
1174
|
function expandWithIndex_1(f, concurrent = Infinity) {
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1175
|
+
return (fa) => {
|
|
1176
|
+
concurrent = (concurrent || 0) < 1 ? Infinity : concurrent;
|
|
1177
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1178
|
+
return mergeInternal(fa, subscriber, environment, f, concurrent, void 0, true);
|
|
1179
|
+
});
|
|
1180
|
+
};
|
|
1401
1181
|
}
|
|
1402
1182
|
/**
|
|
1403
|
-
|
|
1404
|
-
|
|
1183
|
+
* @tsplus pipeable fncts.observable.Observable expand
|
|
1184
|
+
*/
|
|
1405
1185
|
function expand(f, concurrent = Infinity) {
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1186
|
+
return (fa) => {
|
|
1187
|
+
return expandWithIndex_1((_, a) => f(a), concurrent)(fa);
|
|
1188
|
+
};
|
|
1409
1189
|
}
|
|
1410
1190
|
function findWithIndex_1(predicate) {
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1191
|
+
return (fa) => {
|
|
1192
|
+
return new _fncts_observable_Observable_definition.Observable(findInternal(fa, predicate, "value"));
|
|
1193
|
+
};
|
|
1414
1194
|
}
|
|
1415
1195
|
function find(predicate) {
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1196
|
+
return (fa) => {
|
|
1197
|
+
return findWithIndex_1((_, a) => predicate(a))(fa);
|
|
1198
|
+
};
|
|
1419
1199
|
}
|
|
1420
1200
|
function findIndexWithIndex_1(predicate) {
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1201
|
+
return (fa) => {
|
|
1202
|
+
return new _fncts_observable_Observable_definition.Observable(findInternal(fa, predicate, "index"));
|
|
1203
|
+
};
|
|
1424
1204
|
}
|
|
1425
1205
|
function findIndex(predicate) {
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1206
|
+
return (fa) => {
|
|
1207
|
+
return findIndexWithIndex_1((_, a) => predicate(a))(fa);
|
|
1208
|
+
};
|
|
1429
1209
|
}
|
|
1430
1210
|
function forkJoin(...args) {
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
}
|
|
1468
|
-
});
|
|
1469
|
-
}
|
|
1470
|
-
/**
|
|
1471
|
-
* @tsplus getter fncts.observable.Observable ignore
|
|
1472
|
-
*/
|
|
1211
|
+
const { args: sources, keys } = (0, _fncts_observable_internal_util.arrayOrObject)(args);
|
|
1212
|
+
return new _fncts_observable_Observable_definition.Observable((s, environment) => {
|
|
1213
|
+
const length = sources.length;
|
|
1214
|
+
if (!length) {
|
|
1215
|
+
s.complete();
|
|
1216
|
+
return;
|
|
1217
|
+
}
|
|
1218
|
+
const values = new Array(length);
|
|
1219
|
+
let remainingCompletions = length;
|
|
1220
|
+
let remainingEmissions = length;
|
|
1221
|
+
for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) {
|
|
1222
|
+
let hasValue = false;
|
|
1223
|
+
from_1(sources[sourceIndex]).provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1224
|
+
next: (value) => {
|
|
1225
|
+
if (!hasValue) {
|
|
1226
|
+
hasValue = true;
|
|
1227
|
+
remainingEmissions--;
|
|
1228
|
+
}
|
|
1229
|
+
values[sourceIndex] = value;
|
|
1230
|
+
},
|
|
1231
|
+
complete: () => {
|
|
1232
|
+
if (!--remainingCompletions || !hasValue) {
|
|
1233
|
+
if (!remainingEmissions) s.next(keys ? keys.reduce((b, k, i) => {
|
|
1234
|
+
b[k] = values[i];
|
|
1235
|
+
return b;
|
|
1236
|
+
}, {}) : values);
|
|
1237
|
+
s.complete();
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
})(s));
|
|
1241
|
+
}
|
|
1242
|
+
});
|
|
1243
|
+
}
|
|
1244
|
+
/**
|
|
1245
|
+
* @tsplus getter fncts.observable.Observable ignore
|
|
1246
|
+
*/
|
|
1473
1247
|
function ignore(fa) {
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
})(subscriber));
|
|
1478
|
-
});
|
|
1248
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1249
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ next: _fncts_observable_internal_util.noop })(subscriber));
|
|
1250
|
+
});
|
|
1479
1251
|
}
|
|
1480
1252
|
/**
|
|
1481
|
-
|
|
1482
|
-
|
|
1253
|
+
* @tsplus getter fncts.observable.Observable isEmpty
|
|
1254
|
+
*/
|
|
1483
1255
|
function isEmpty(fa) {
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
}
|
|
1497
|
-
/**
|
|
1498
|
-
|
|
1499
|
-
|
|
1256
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1257
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1258
|
+
next: () => {
|
|
1259
|
+
subscriber.next(false);
|
|
1260
|
+
subscriber.complete();
|
|
1261
|
+
},
|
|
1262
|
+
complete: () => {
|
|
1263
|
+
subscriber.next(true);
|
|
1264
|
+
subscriber.complete();
|
|
1265
|
+
}
|
|
1266
|
+
})(subscriber));
|
|
1267
|
+
});
|
|
1268
|
+
}
|
|
1269
|
+
/**
|
|
1270
|
+
* @tsplus getter fncts.observable.Observable materialize
|
|
1271
|
+
*/
|
|
1500
1272
|
function materialize(fa) {
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
}
|
|
1515
|
-
/**
|
|
1516
|
-
|
|
1517
|
-
|
|
1273
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1274
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1275
|
+
next: (value) => {
|
|
1276
|
+
subscriber.next(_fncts_observable_Notification.next(value));
|
|
1277
|
+
},
|
|
1278
|
+
error: (error) => {
|
|
1279
|
+
subscriber.next(_fncts_observable_Notification.error(error));
|
|
1280
|
+
},
|
|
1281
|
+
complete: () => {
|
|
1282
|
+
subscriber.next(_fncts_observable_Notification.complete());
|
|
1283
|
+
}
|
|
1284
|
+
})(subscriber));
|
|
1285
|
+
});
|
|
1286
|
+
}
|
|
1287
|
+
/**
|
|
1288
|
+
* @tsplus pipeable fncts.observable.Observable mergeAll
|
|
1289
|
+
*/
|
|
1518
1290
|
function mergeAll_1(concurrent = Infinity) {
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1291
|
+
return (self) => {
|
|
1292
|
+
return mergeMap_1(_fncts_base_data_function_api.identity, concurrent)(self);
|
|
1293
|
+
};
|
|
1522
1294
|
}
|
|
1523
1295
|
/**
|
|
1524
|
-
|
|
1525
|
-
|
|
1296
|
+
* @tsplus pipeable fncts.observable.Observable mergeScanWithIndex
|
|
1297
|
+
*/
|
|
1526
1298
|
function mergeScanWithIndex_1(initial, f, concurrent = Infinity) {
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
}
|
|
1536
|
-
/**
|
|
1537
|
-
|
|
1538
|
-
|
|
1299
|
+
return (fa) => {
|
|
1300
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1301
|
+
let state = initial;
|
|
1302
|
+
return mergeInternal(fa, subscriber, environment, (index, value) => f(index, state, value), concurrent, (value) => {
|
|
1303
|
+
state = value;
|
|
1304
|
+
}, false, void 0, () => state = null);
|
|
1305
|
+
});
|
|
1306
|
+
};
|
|
1307
|
+
}
|
|
1308
|
+
/**
|
|
1309
|
+
* @tsplus pipeable fncts.observable.Observable mergeScan
|
|
1310
|
+
*/
|
|
1539
1311
|
function mergeScan(initial, f, concurrent = Infinity) {
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1312
|
+
return (fa) => {
|
|
1313
|
+
return mergeScanWithIndex_1(initial, (_, b, a) => f(b, a), concurrent)(fa);
|
|
1314
|
+
};
|
|
1543
1315
|
}
|
|
1544
1316
|
function onErrorResumeNext(fa, ...sources) {
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
}
|
|
1571
|
-
/**
|
|
1572
|
-
* @tsplus pipeable fncts.observable.Observable onEmpty
|
|
1573
|
-
*/
|
|
1317
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1318
|
+
const remaining = [fa, ...sources];
|
|
1319
|
+
const subscribeNext = () => {
|
|
1320
|
+
if (!subscriber._closed) if (remaining.length > 0) {
|
|
1321
|
+
let nextSource;
|
|
1322
|
+
try {
|
|
1323
|
+
nextSource = from_1(remaining.shift());
|
|
1324
|
+
} catch (err) {
|
|
1325
|
+
subscribeNext();
|
|
1326
|
+
return;
|
|
1327
|
+
}
|
|
1328
|
+
const innerSub = _fncts_observable_Operator.operate_({
|
|
1329
|
+
error: _fncts_observable_internal_util.noop,
|
|
1330
|
+
complete: _fncts_observable_internal_util.noop
|
|
1331
|
+
})(subscriber);
|
|
1332
|
+
subscriber.add(nextSource.provideEnvironment(environment).subscribe(innerSub));
|
|
1333
|
+
innerSub.add(subscribeNext);
|
|
1334
|
+
} else subscriber.complete();
|
|
1335
|
+
};
|
|
1336
|
+
subscribeNext();
|
|
1337
|
+
});
|
|
1338
|
+
}
|
|
1339
|
+
/**
|
|
1340
|
+
* @tsplus pipeable fncts.observable.Observable onEmpty
|
|
1341
|
+
*/
|
|
1574
1342
|
function onEmpty_1(f) {
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
* @tsplus pipeable fncts.observable.Observable repeat
|
|
1595
|
-
*/
|
|
1343
|
+
return (fa) => {
|
|
1344
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1345
|
+
let hasValue = false;
|
|
1346
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1347
|
+
next: (value) => {
|
|
1348
|
+
hasValue = true;
|
|
1349
|
+
subscriber.next(value);
|
|
1350
|
+
},
|
|
1351
|
+
complete: () => {
|
|
1352
|
+
if (!hasValue) subscriber.next(f());
|
|
1353
|
+
subscriber.complete();
|
|
1354
|
+
}
|
|
1355
|
+
})(subscriber));
|
|
1356
|
+
});
|
|
1357
|
+
};
|
|
1358
|
+
}
|
|
1359
|
+
/**
|
|
1360
|
+
* @tsplus pipeable fncts.observable.Observable repeat
|
|
1361
|
+
*/
|
|
1596
1362
|
function repeat(count = Infinity) {
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
innerSub = null;
|
|
1621
|
-
loop();
|
|
1622
|
-
}
|
|
1623
|
-
};
|
|
1624
|
-
loop();
|
|
1625
|
-
});
|
|
1626
|
-
};
|
|
1363
|
+
return (fa) => {
|
|
1364
|
+
return count <= 0 ? empty_1() : new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1365
|
+
let repeats = 0;
|
|
1366
|
+
let innerSub;
|
|
1367
|
+
const loop = () => {
|
|
1368
|
+
let syncUnsub = false;
|
|
1369
|
+
innerSub = fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ complete: () => {
|
|
1370
|
+
if (++repeats < count) if (innerSub) {
|
|
1371
|
+
innerSub.unsubscribe();
|
|
1372
|
+
innerSub = null;
|
|
1373
|
+
loop();
|
|
1374
|
+
} else syncUnsub = true;
|
|
1375
|
+
else subscriber.complete;
|
|
1376
|
+
} })(subscriber));
|
|
1377
|
+
if (syncUnsub) {
|
|
1378
|
+
innerSub.unsubscribe();
|
|
1379
|
+
innerSub = null;
|
|
1380
|
+
loop();
|
|
1381
|
+
}
|
|
1382
|
+
};
|
|
1383
|
+
loop();
|
|
1384
|
+
});
|
|
1385
|
+
};
|
|
1627
1386
|
}
|
|
1628
1387
|
function retry(configOrCount = Infinity) {
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
}
|
|
1667
|
-
})(subscriber));
|
|
1668
|
-
if (syncUnsub) {
|
|
1669
|
-
innerSub.unsubscribe();
|
|
1670
|
-
innerSub = null;
|
|
1671
|
-
loop();
|
|
1672
|
-
}
|
|
1673
|
-
};
|
|
1674
|
-
loop();
|
|
1675
|
-
});
|
|
1676
|
-
};
|
|
1677
|
-
}
|
|
1678
|
-
/**
|
|
1679
|
-
* @tsplus pipeable fncts.observable.Observable sample
|
|
1680
|
-
*/
|
|
1388
|
+
return (fa) => {
|
|
1389
|
+
let config;
|
|
1390
|
+
if (configOrCount && typeof configOrCount === "object") config = configOrCount;
|
|
1391
|
+
else config = { count: configOrCount };
|
|
1392
|
+
const { count, resetOnSuccess = false } = config;
|
|
1393
|
+
return count <= 0 ? fa : new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1394
|
+
let retries = 0;
|
|
1395
|
+
let innerSub;
|
|
1396
|
+
const loop = () => {
|
|
1397
|
+
let syncUnsub = false;
|
|
1398
|
+
innerSub = fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1399
|
+
next: (value) => {
|
|
1400
|
+
if (resetOnSuccess) retries = 0;
|
|
1401
|
+
subscriber.next(value);
|
|
1402
|
+
},
|
|
1403
|
+
error: (err) => {
|
|
1404
|
+
if (retries++ < count) if (innerSub) {
|
|
1405
|
+
innerSub.unsubscribe();
|
|
1406
|
+
innerSub = null;
|
|
1407
|
+
loop();
|
|
1408
|
+
} else syncUnsub = true;
|
|
1409
|
+
else subscriber.error(err);
|
|
1410
|
+
}
|
|
1411
|
+
})(subscriber));
|
|
1412
|
+
if (syncUnsub) {
|
|
1413
|
+
innerSub.unsubscribe();
|
|
1414
|
+
innerSub = null;
|
|
1415
|
+
loop();
|
|
1416
|
+
}
|
|
1417
|
+
};
|
|
1418
|
+
loop();
|
|
1419
|
+
});
|
|
1420
|
+
};
|
|
1421
|
+
}
|
|
1422
|
+
/**
|
|
1423
|
+
* @tsplus pipeable fncts.observable.Observable sample
|
|
1424
|
+
*/
|
|
1681
1425
|
function sample_1(notifier) {
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
* @tsplus pipeable fncts.observable.Observable scanLeftWithIndex
|
|
1717
|
-
*/
|
|
1426
|
+
return (fa) => {
|
|
1427
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1428
|
+
let hasValue = false;
|
|
1429
|
+
let lastValue = null;
|
|
1430
|
+
fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ next: (value) => {
|
|
1431
|
+
hasValue = true;
|
|
1432
|
+
lastValue = value;
|
|
1433
|
+
} })(subscriber));
|
|
1434
|
+
const emit = () => {
|
|
1435
|
+
if (hasValue) {
|
|
1436
|
+
hasValue = false;
|
|
1437
|
+
const value = lastValue;
|
|
1438
|
+
lastValue = null;
|
|
1439
|
+
subscriber.next(value);
|
|
1440
|
+
}
|
|
1441
|
+
};
|
|
1442
|
+
notifier.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1443
|
+
next: emit,
|
|
1444
|
+
complete: _fncts_observable_internal_util.noop
|
|
1445
|
+
})(subscriber));
|
|
1446
|
+
});
|
|
1447
|
+
};
|
|
1448
|
+
}
|
|
1449
|
+
/**
|
|
1450
|
+
* @tsplus pipeable fncts.observable.Observable sampleTime
|
|
1451
|
+
*/
|
|
1452
|
+
function sampleTime(period, scheduler = _fncts_observable_AsyncScheduler.asyncScheduler) {
|
|
1453
|
+
return (fa) => {
|
|
1454
|
+
return sample_1(interval_1(period, scheduler))(fa);
|
|
1455
|
+
};
|
|
1456
|
+
}
|
|
1457
|
+
/**
|
|
1458
|
+
* @tsplus pipeable fncts.observable.Observable scanLeftWithIndex
|
|
1459
|
+
*/
|
|
1718
1460
|
function scanLeftWithIndex_1(initial, f) {
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1461
|
+
return (fa) => {
|
|
1462
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => scanInternal(fa, subscriber, environment, f, initial, true, true));
|
|
1463
|
+
};
|
|
1722
1464
|
}
|
|
1723
1465
|
/**
|
|
1724
|
-
|
|
1725
|
-
|
|
1466
|
+
* @tsplus pipeable fncts.observable.Observable scanLeft
|
|
1467
|
+
*/
|
|
1726
1468
|
function scanLeft(initial, f) {
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1469
|
+
return (fa) => {
|
|
1470
|
+
return scanLeftWithIndex_1(initial, (_, b, a) => f(b, a))(fa);
|
|
1471
|
+
};
|
|
1730
1472
|
}
|
|
1731
1473
|
/**
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
function service(
|
|
1735
|
-
|
|
1474
|
+
* @tsplus static fncts.observable.ObservableOps service
|
|
1475
|
+
*/
|
|
1476
|
+
function service(tag) {
|
|
1477
|
+
return serviceWithObservable_1((service) => of_1(service), tag);
|
|
1736
1478
|
}
|
|
1737
1479
|
/**
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
function serviceWith(f,
|
|
1741
|
-
|
|
1480
|
+
* @tsplus static fncts.observable.ObservableOps serviceWith
|
|
1481
|
+
*/
|
|
1482
|
+
function serviceWith(f, tag) {
|
|
1483
|
+
return serviceWithObservable_1((service) => of_1(f(service)), tag);
|
|
1742
1484
|
}
|
|
1743
1485
|
/**
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
function serviceWithObservable_1(f,
|
|
1747
|
-
|
|
1486
|
+
* @tsplus static fncts.observable.ObservableOps serviceWithObservable
|
|
1487
|
+
*/
|
|
1488
|
+
function serviceWithObservable_1(f, tag) {
|
|
1489
|
+
return environmentWithObservable_1((environment) => f(_fncts_base_data_Environment_api.unsafeGet(tag)(environment)));
|
|
1748
1490
|
}
|
|
1749
1491
|
/**
|
|
1750
|
-
|
|
1751
|
-
|
|
1492
|
+
* @tsplus pipeable fncts.observable.Observable skip
|
|
1493
|
+
*/
|
|
1752
1494
|
function skip(count) {
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1495
|
+
return (fa) => {
|
|
1496
|
+
return filterWithIndex_1((index, _) => count <= index)(fa);
|
|
1497
|
+
};
|
|
1756
1498
|
}
|
|
1757
1499
|
/**
|
|
1758
|
-
|
|
1759
|
-
|
|
1500
|
+
* @tsplus pipeable fncts.observable.Observable skipLast
|
|
1501
|
+
*/
|
|
1760
1502
|
function skipLast(skipCount) {
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
/**
|
|
1785
|
-
* @tsplus pipeable fncts.observable.Observable skipUntil
|
|
1786
|
-
*/
|
|
1503
|
+
return (fa) => {
|
|
1504
|
+
return skipCount <= 0 ? fa : new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1505
|
+
let ring = new Array(skipCount);
|
|
1506
|
+
let seen = 0;
|
|
1507
|
+
fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ next: (value) => {
|
|
1508
|
+
const valueIndex = seen++;
|
|
1509
|
+
if (valueIndex < skipCount) ring[valueIndex] = value;
|
|
1510
|
+
else {
|
|
1511
|
+
const index = valueIndex % skipCount;
|
|
1512
|
+
const oldValue = ring[index];
|
|
1513
|
+
ring[index] = value;
|
|
1514
|
+
subscriber.next(oldValue);
|
|
1515
|
+
}
|
|
1516
|
+
} })(subscriber));
|
|
1517
|
+
return () => {
|
|
1518
|
+
ring = null;
|
|
1519
|
+
};
|
|
1520
|
+
});
|
|
1521
|
+
};
|
|
1522
|
+
}
|
|
1523
|
+
/**
|
|
1524
|
+
* @tsplus pipeable fncts.observable.Observable skipUntil
|
|
1525
|
+
*/
|
|
1787
1526
|
function skipUntil(notifier) {
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
* @tsplus pipeable fncts.observable.Observable skipWhile
|
|
1807
|
-
*/
|
|
1527
|
+
return (fa) => {
|
|
1528
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1529
|
+
let taking = false;
|
|
1530
|
+
const skipSubscriber = _fncts_observable_Operator.operate_({
|
|
1531
|
+
next: () => {
|
|
1532
|
+
skipSubscriber?.unsubscribe();
|
|
1533
|
+
taking = true;
|
|
1534
|
+
},
|
|
1535
|
+
complete: _fncts_observable_internal_util.noop
|
|
1536
|
+
})(subscriber);
|
|
1537
|
+
from_1(notifier).provideEnvironment(environment).subscribe(skipSubscriber);
|
|
1538
|
+
fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ next: (value) => taking && subscriber.next(value) })(subscriber));
|
|
1539
|
+
});
|
|
1540
|
+
};
|
|
1541
|
+
}
|
|
1542
|
+
/**
|
|
1543
|
+
* @tsplus pipeable fncts.observable.Observable skipWhile
|
|
1544
|
+
*/
|
|
1808
1545
|
function skipWhile(predicate) {
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
* @tsplus pipeable fncts.observable.Observable startWith
|
|
1821
|
-
*/
|
|
1546
|
+
return (fa) => {
|
|
1547
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1548
|
+
let taking = false;
|
|
1549
|
+
let index = 0;
|
|
1550
|
+
return fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ next: (value) => (taking || (taking = !predicate(index++, value))) && subscriber.next(value) })(subscriber));
|
|
1551
|
+
});
|
|
1552
|
+
};
|
|
1553
|
+
}
|
|
1554
|
+
/**
|
|
1555
|
+
* @tsplus pipeable fncts.observable.Observable startWith
|
|
1556
|
+
*/
|
|
1822
1557
|
function startWith(...values) {
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
};
|
|
1558
|
+
return (fa) => {
|
|
1559
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1560
|
+
return concat_1(values)(fa).provideEnvironment(environment).subscribe(subscriber);
|
|
1561
|
+
});
|
|
1562
|
+
};
|
|
1829
1563
|
}
|
|
1830
1564
|
/**
|
|
1831
|
-
|
|
1832
|
-
|
|
1565
|
+
* @tsplus pipeable fncts.observable.Observable subscribeOn
|
|
1566
|
+
*/
|
|
1833
1567
|
function subscribeOn(scheduler, delay = 0) {
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1568
|
+
return (fa) => {
|
|
1569
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1570
|
+
subscriber.add(scheduler.schedule(() => fa.provideEnvironment(environment).subscribe(subscriber), delay));
|
|
1571
|
+
});
|
|
1572
|
+
};
|
|
1839
1573
|
}
|
|
1840
1574
|
/**
|
|
1841
|
-
|
|
1842
|
-
|
|
1575
|
+
* @tsplus getter fncts.observable.Observable switchAll
|
|
1576
|
+
*/
|
|
1843
1577
|
function switchAll(ffa) {
|
|
1844
|
-
|
|
1578
|
+
return switchMap_1(_fncts_base_data_function_api.identity)(ffa);
|
|
1845
1579
|
}
|
|
1846
1580
|
/**
|
|
1847
|
-
|
|
1848
|
-
|
|
1581
|
+
* @tsplus pipeable fncts.observable.Observable switchMapWithIndex
|
|
1582
|
+
*/
|
|
1849
1583
|
function switchMapWithIndex_1(f) {
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
*/
|
|
1584
|
+
return (fa) => {
|
|
1585
|
+
return new _fncts_observable_Observable_definition.Observable((destination, environment) => {
|
|
1586
|
+
let innerSubscriber = null;
|
|
1587
|
+
let index = 0;
|
|
1588
|
+
let isComplete = false;
|
|
1589
|
+
const checkComplete = () => isComplete && !innerSubscriber && destination.complete();
|
|
1590
|
+
fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1591
|
+
next: (value) => {
|
|
1592
|
+
innerSubscriber?.unsubscribe();
|
|
1593
|
+
from_1(f(index++, value)).provideEnvironment(environment).subscribe(innerSubscriber = _fncts_observable_Operator.operate_({
|
|
1594
|
+
next: (innerValue) => destination.next(innerValue),
|
|
1595
|
+
complete: () => {
|
|
1596
|
+
innerSubscriber = null;
|
|
1597
|
+
checkComplete();
|
|
1598
|
+
}
|
|
1599
|
+
})(destination));
|
|
1600
|
+
},
|
|
1601
|
+
complete: () => {
|
|
1602
|
+
isComplete = true;
|
|
1603
|
+
checkComplete();
|
|
1604
|
+
}
|
|
1605
|
+
})(destination));
|
|
1606
|
+
});
|
|
1607
|
+
};
|
|
1608
|
+
}
|
|
1609
|
+
/**
|
|
1610
|
+
* @tsplus pipeable fncts.observable.Observable switchMap
|
|
1611
|
+
*/
|
|
1879
1612
|
function switchMap_1(f) {
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1613
|
+
return (fa) => {
|
|
1614
|
+
return switchMapWithIndex_1((_, a) => f(a))(fa);
|
|
1615
|
+
};
|
|
1883
1616
|
}
|
|
1884
1617
|
/**
|
|
1885
|
-
|
|
1886
|
-
|
|
1618
|
+
* @tsplus pipeable fncts.observable.Observable switchScanWithIndex
|
|
1619
|
+
*/
|
|
1887
1620
|
function switchScanWithIndex_1(initial, f) {
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
}
|
|
1898
|
-
/**
|
|
1899
|
-
|
|
1900
|
-
|
|
1621
|
+
return (fa) => {
|
|
1622
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1623
|
+
let state = initial;
|
|
1624
|
+
switchMapWithIndex_1((index, value) => map_1((b) => (state = b, b))(from_1(f(index, state, value))))(fa).provideEnvironment(environment).subscribe(subscriber);
|
|
1625
|
+
return () => {
|
|
1626
|
+
state = null;
|
|
1627
|
+
};
|
|
1628
|
+
});
|
|
1629
|
+
};
|
|
1630
|
+
}
|
|
1631
|
+
/**
|
|
1632
|
+
* @tsplus pipeable fncts.observable.Observable switchScan
|
|
1633
|
+
*/
|
|
1901
1634
|
function switchScan(initial, f) {
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1635
|
+
return (fa) => {
|
|
1636
|
+
return switchScanWithIndex_1(initial, (_, b, a) => f(b, a))(fa);
|
|
1637
|
+
};
|
|
1905
1638
|
}
|
|
1906
1639
|
/**
|
|
1907
|
-
|
|
1908
|
-
|
|
1640
|
+
* @tsplus pipeable fncts.observable.Observable take
|
|
1641
|
+
*/
|
|
1909
1642
|
function take_1(count) {
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
}
|
|
1926
|
-
/**
|
|
1927
|
-
* @tsplus pipeable fncts.observable.Observable takeLast
|
|
1928
|
-
*/
|
|
1643
|
+
return (fa) => {
|
|
1644
|
+
return count <= 0 ? empty_1() : new _fncts_observable_Observable_definition.Observable((sub, environment) => {
|
|
1645
|
+
let seen = 0;
|
|
1646
|
+
fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ next: (value) => {
|
|
1647
|
+
if (++seen <= count) {
|
|
1648
|
+
sub.next(value);
|
|
1649
|
+
if (count <= seen) sub.complete();
|
|
1650
|
+
}
|
|
1651
|
+
} })(sub));
|
|
1652
|
+
});
|
|
1653
|
+
};
|
|
1654
|
+
}
|
|
1655
|
+
/**
|
|
1656
|
+
* @tsplus pipeable fncts.observable.Observable takeLast
|
|
1657
|
+
*/
|
|
1929
1658
|
function takeLast(count) {
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
* @tsplus pipeable fncts.observable.Observable takeUntil
|
|
1953
|
-
*/
|
|
1659
|
+
return (fa) => {
|
|
1660
|
+
return count <= 0 ? empty_1() : new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1661
|
+
let buffer = [];
|
|
1662
|
+
fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1663
|
+
next: (value) => {
|
|
1664
|
+
buffer.push(value);
|
|
1665
|
+
count < buffer.length && buffer.shift();
|
|
1666
|
+
},
|
|
1667
|
+
complete: () => {
|
|
1668
|
+
for (const value of buffer) subscriber.next(value);
|
|
1669
|
+
subscriber.complete();
|
|
1670
|
+
},
|
|
1671
|
+
finalize: () => {
|
|
1672
|
+
buffer = null;
|
|
1673
|
+
}
|
|
1674
|
+
})(subscriber));
|
|
1675
|
+
});
|
|
1676
|
+
};
|
|
1677
|
+
}
|
|
1678
|
+
/**
|
|
1679
|
+
* @tsplus pipeable fncts.observable.Observable takeUntil
|
|
1680
|
+
*/
|
|
1954
1681
|
function takeUntil(notifier) {
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1682
|
+
return (fa) => {
|
|
1683
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1684
|
+
from_1(notifier).provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1685
|
+
next: () => subscriber.complete(),
|
|
1686
|
+
complete: _fncts_observable_internal_util.noop
|
|
1687
|
+
})(subscriber));
|
|
1688
|
+
!subscriber._closed && fa.provideEnvironment(environment).subscribe(subscriber);
|
|
1689
|
+
});
|
|
1690
|
+
};
|
|
1964
1691
|
}
|
|
1965
1692
|
function takeWhileWithIndex_1(predicate, inclusive) {
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
});
|
|
1977
|
-
};
|
|
1693
|
+
return (fa) => {
|
|
1694
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1695
|
+
let index = 0;
|
|
1696
|
+
fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ next: (value) => {
|
|
1697
|
+
const result = predicate(index++, value);
|
|
1698
|
+
(result || inclusive) && subscriber.next(value);
|
|
1699
|
+
!result && subscriber.complete();
|
|
1700
|
+
} })(subscriber));
|
|
1701
|
+
});
|
|
1702
|
+
};
|
|
1978
1703
|
}
|
|
1979
1704
|
function takeWhile(predicate, inclusive) {
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1705
|
+
return (fa) => {
|
|
1706
|
+
return takeWhileWithIndex_1((_, a) => predicate(a), inclusive)(fa);
|
|
1707
|
+
};
|
|
1983
1708
|
}
|
|
1984
1709
|
/**
|
|
1985
|
-
|
|
1986
|
-
|
|
1710
|
+
* @tsplus pipeable fncts.observable.Observable tap
|
|
1711
|
+
*/
|
|
1987
1712
|
function tap(observer) {
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
}
|
|
2007
|
-
const defaultThrottleConfig =
|
|
2008
|
-
|
|
2009
|
-
|
|
1713
|
+
return (fa) => {
|
|
1714
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1715
|
+
fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1716
|
+
next: (value) => {
|
|
1717
|
+
observer.next?.(value);
|
|
1718
|
+
subscriber.next(value);
|
|
1719
|
+
},
|
|
1720
|
+
error: (err) => {
|
|
1721
|
+
observer.error?.(err);
|
|
1722
|
+
subscriber.error(err);
|
|
1723
|
+
},
|
|
1724
|
+
complete: () => {
|
|
1725
|
+
observer.complete?.();
|
|
1726
|
+
subscriber.complete();
|
|
1727
|
+
}
|
|
1728
|
+
})(subscriber));
|
|
1729
|
+
});
|
|
1730
|
+
};
|
|
1731
|
+
}
|
|
1732
|
+
const defaultThrottleConfig = {
|
|
1733
|
+
leading: true,
|
|
1734
|
+
trailing: false
|
|
2010
1735
|
};
|
|
2011
1736
|
/**
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
function throttle_1(durationSelector, {
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
super("Timeout has occurred");
|
|
2075
|
-
this.info = info;
|
|
2076
|
-
this.name = "TimeoutError";
|
|
2077
|
-
}
|
|
2078
|
-
}
|
|
2079
|
-
exports.TimeoutError = TimeoutError;
|
|
1737
|
+
* @tsplus pipeable fncts.observable.Observable throttle
|
|
1738
|
+
*/
|
|
1739
|
+
function throttle_1(durationSelector, { leading, trailing } = defaultThrottleConfig) {
|
|
1740
|
+
return (fa) => {
|
|
1741
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1742
|
+
let sendValue = _fncts_base_data_Maybe_constructors.nothing(fileName_1 + ":2369:51");
|
|
1743
|
+
let throttled = null;
|
|
1744
|
+
let isComplete = false;
|
|
1745
|
+
const endThrottling = () => {
|
|
1746
|
+
throttled?.unsubscribe();
|
|
1747
|
+
throttled = null;
|
|
1748
|
+
if (trailing) {
|
|
1749
|
+
send();
|
|
1750
|
+
isComplete && subscriber.complete();
|
|
1751
|
+
}
|
|
1752
|
+
};
|
|
1753
|
+
const cleanupThrottling = () => {
|
|
1754
|
+
throttled = null;
|
|
1755
|
+
isComplete && subscriber.complete();
|
|
1756
|
+
};
|
|
1757
|
+
const startThrottling = (value) => throttled = from_1(durationSelector(value)).provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1758
|
+
next: endThrottling,
|
|
1759
|
+
complete: cleanupThrottling
|
|
1760
|
+
})(subscriber));
|
|
1761
|
+
const send = () => {
|
|
1762
|
+
if (_fncts_base_data_Maybe_definition.isJust(sendValue)) {
|
|
1763
|
+
const { value } = sendValue;
|
|
1764
|
+
sendValue = _fncts_base_data_Maybe_constructors.nothing(fileName_1 + ":2391:36");
|
|
1765
|
+
subscriber.next(value);
|
|
1766
|
+
!isComplete && startThrottling(value);
|
|
1767
|
+
}
|
|
1768
|
+
};
|
|
1769
|
+
fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1770
|
+
next: (value) => {
|
|
1771
|
+
sendValue = _fncts_base_data_Maybe_constructors.just(value, fileName_1 + ":2399:29");
|
|
1772
|
+
!(throttled && !throttled._closed) && (leading ? send() : startThrottling(value));
|
|
1773
|
+
},
|
|
1774
|
+
complete: () => {
|
|
1775
|
+
isComplete = true;
|
|
1776
|
+
!(trailing && _fncts_base_data_Maybe_definition.isJust(sendValue) && throttled && !throttled._closed) && subscriber.complete();
|
|
1777
|
+
}
|
|
1778
|
+
})(subscriber));
|
|
1779
|
+
});
|
|
1780
|
+
};
|
|
1781
|
+
}
|
|
1782
|
+
/**
|
|
1783
|
+
* @tsplus pipeable fncts.observable.Observable throttleTime
|
|
1784
|
+
*/
|
|
1785
|
+
function throttleTime(duration, scheduler = _fncts_observable_AsyncScheduler.asyncScheduler, config = defaultThrottleConfig) {
|
|
1786
|
+
return (fa) => {
|
|
1787
|
+
const duration$ = timer_1(duration, scheduler);
|
|
1788
|
+
return throttle_1(() => duration$, config)(fa);
|
|
1789
|
+
};
|
|
1790
|
+
}
|
|
1791
|
+
var TimeoutError = class extends Error {
|
|
1792
|
+
info;
|
|
1793
|
+
constructor(info) {
|
|
1794
|
+
super("Timeout has occurred");
|
|
1795
|
+
this.info = info;
|
|
1796
|
+
this.name = "TimeoutError";
|
|
1797
|
+
}
|
|
1798
|
+
};
|
|
2080
1799
|
function timeout(config) {
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
if (!timerSubscription?._closed) {
|
|
2115
|
-
timerSubscription?.unsubscribe();
|
|
2116
|
-
}
|
|
2117
|
-
lastValue = tsplus_module_17.nothing(fileName_1 + ":2514:32");
|
|
2118
|
-
}
|
|
2119
|
-
})(subscriber));
|
|
2120
|
-
startTimer(first != null ? typeof first === "number" ? first : +first - scheduler.now() : each);
|
|
2121
|
-
});
|
|
2122
|
-
};
|
|
1800
|
+
return (fa) => {
|
|
1801
|
+
const { first, each, with: _with = timeoutError, scheduler = _fncts_observable_AsyncScheduler.asyncScheduler, meta = null } = config;
|
|
1802
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1803
|
+
let originalSourceSubscription;
|
|
1804
|
+
let timerSubscription;
|
|
1805
|
+
let lastValue = _fncts_base_data_Maybe_constructors.nothing(fileName_1 + ":2480:40");
|
|
1806
|
+
let seen = 0;
|
|
1807
|
+
const startTimer = (delay) => {
|
|
1808
|
+
timerSubscription = (0, _fncts_observable_Scheduler.caughtSchedule)(subscriber, scheduler, () => {
|
|
1809
|
+
originalSourceSubscription.unsubscribe();
|
|
1810
|
+
from_1(_with({
|
|
1811
|
+
meta,
|
|
1812
|
+
lastValue,
|
|
1813
|
+
seen
|
|
1814
|
+
})).provideEnvironment(environment).subscribe(subscriber);
|
|
1815
|
+
}, delay);
|
|
1816
|
+
};
|
|
1817
|
+
originalSourceSubscription = fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1818
|
+
next: (value) => {
|
|
1819
|
+
timerSubscription?.unsubscribe();
|
|
1820
|
+
seen++;
|
|
1821
|
+
lastValue = _fncts_base_data_Maybe_constructors.just(value, fileName_1 + ":2506:29");
|
|
1822
|
+
subscriber.next(value);
|
|
1823
|
+
each > 0 && startTimer(each);
|
|
1824
|
+
},
|
|
1825
|
+
finalize: () => {
|
|
1826
|
+
if (!timerSubscription?._closed) timerSubscription?.unsubscribe();
|
|
1827
|
+
lastValue = _fncts_base_data_Maybe_constructors.nothing(fileName_1 + ":2514:32");
|
|
1828
|
+
}
|
|
1829
|
+
})(subscriber));
|
|
1830
|
+
startTimer(first != null ? typeof first === "number" ? first : +first - scheduler.now() : each);
|
|
1831
|
+
});
|
|
1832
|
+
};
|
|
2123
1833
|
}
|
|
2124
1834
|
function timeoutError(info) {
|
|
2125
|
-
|
|
1835
|
+
return fail_1(new TimeoutError(info));
|
|
2126
1836
|
}
|
|
2127
1837
|
function toArrayAccumulator(arr, value) {
|
|
2128
|
-
|
|
1838
|
+
return arr.push(value), arr;
|
|
2129
1839
|
}
|
|
2130
1840
|
/**
|
|
2131
|
-
|
|
2132
|
-
|
|
1841
|
+
* @tsplus getter fncts.observable.Observable toArray
|
|
1842
|
+
*/
|
|
2133
1843
|
function toArray_1(fa) {
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
1844
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1845
|
+
foldLeft_1([], toArrayAccumulator)(fa).provideEnvironment(environment).subscribe(subscriber);
|
|
1846
|
+
});
|
|
2137
1847
|
}
|
|
2138
1848
|
/**
|
|
2139
|
-
|
|
2140
|
-
|
|
1849
|
+
* @tsplus pipeable fncts.observable.Observable unique
|
|
1850
|
+
*/
|
|
2141
1851
|
function unique(toKey, flushes) {
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
}
|
|
2176
|
-
})(subscriber));
|
|
2177
|
-
});
|
|
2178
|
-
};
|
|
1852
|
+
return (fa) => {
|
|
1853
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1854
|
+
let distinctKeys = _fncts_base_collection_immutable_HashSet_api.empty();
|
|
1855
|
+
fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ next: (value) => {
|
|
1856
|
+
const key = toKey ? toKey(value) : value;
|
|
1857
|
+
if (!_fncts_base_collection_immutable_HashSet_api.has(key)(distinctKeys)) {
|
|
1858
|
+
_fncts_base_collection_immutable_HashSet_api.add(key)(distinctKeys);
|
|
1859
|
+
subscriber.next(value);
|
|
1860
|
+
}
|
|
1861
|
+
} })(subscriber));
|
|
1862
|
+
flushes?.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1863
|
+
next: () => distinctKeys = _fncts_base_collection_immutable_HashSet_api.empty(),
|
|
1864
|
+
complete: _fncts_observable_internal_util.noop
|
|
1865
|
+
})(subscriber));
|
|
1866
|
+
});
|
|
1867
|
+
};
|
|
1868
|
+
}
|
|
1869
|
+
function uniqueUntilChanged_1(E, keySelector = _fncts_base_data_function_api.identity) {
|
|
1870
|
+
return (fa) => {
|
|
1871
|
+
const compare = "equals" in E ? E.equals : E;
|
|
1872
|
+
return new _fncts_observable_Observable_definition.Observable((subscriber, environment) => {
|
|
1873
|
+
let previousKey;
|
|
1874
|
+
let first = true;
|
|
1875
|
+
fa.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({ next: (value) => {
|
|
1876
|
+
const currentKey = keySelector(value);
|
|
1877
|
+
if (first || !compare(previousKey, currentKey)) {
|
|
1878
|
+
first = false;
|
|
1879
|
+
previousKey = currentKey;
|
|
1880
|
+
subscriber.next(value);
|
|
1881
|
+
}
|
|
1882
|
+
} })(subscriber));
|
|
1883
|
+
});
|
|
1884
|
+
};
|
|
2179
1885
|
}
|
|
2180
1886
|
function uniqueUntilKeyChanged(key, equals) {
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
}
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
}
|
|
2209
|
-
},
|
|
2210
|
-
complete: () => {
|
|
2211
|
-
if (! --active) {
|
|
2212
|
-
subscriber.complete();
|
|
2213
|
-
}
|
|
2214
|
-
}
|
|
2215
|
-
})(subscriber));
|
|
2216
|
-
});
|
|
2217
|
-
}
|
|
2218
|
-
});
|
|
1887
|
+
if ("equals" in equals) return (fa) => uniqueUntilChanged_1((x, y) => equals.equals(y[key])(x[key]))(fa);
|
|
1888
|
+
else return (fa) => uniqueUntilChanged_1((x, y) => equals(x[key], y[key]))(fa);
|
|
1889
|
+
}
|
|
1890
|
+
function combineLatestInternal(subscriber, environment, observables, scheduler, valueTransform = _fncts_base_data_function_api.identity) {
|
|
1891
|
+
return maybeSchedule(subscriber, scheduler, () => {
|
|
1892
|
+
const { length } = observables;
|
|
1893
|
+
const values = new Array(length);
|
|
1894
|
+
let active = length;
|
|
1895
|
+
let remainingFirstValues = length;
|
|
1896
|
+
for (let i = 0; i < length; i++) maybeSchedule(subscriber, scheduler, () => {
|
|
1897
|
+
const source = scheduler ? scheduled_1(scheduler)(observables[i]) : from_1(observables[i]);
|
|
1898
|
+
let hasFirstValue = false;
|
|
1899
|
+
source.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1900
|
+
next: (value) => {
|
|
1901
|
+
values[i] = value;
|
|
1902
|
+
if (!hasFirstValue) {
|
|
1903
|
+
hasFirstValue = true;
|
|
1904
|
+
remainingFirstValues--;
|
|
1905
|
+
}
|
|
1906
|
+
if (!remainingFirstValues) subscriber.next(valueTransform(values.slice()));
|
|
1907
|
+
},
|
|
1908
|
+
complete: () => {
|
|
1909
|
+
if (!--active) subscriber.complete();
|
|
1910
|
+
}
|
|
1911
|
+
})(subscriber));
|
|
1912
|
+
});
|
|
1913
|
+
});
|
|
2219
1914
|
}
|
|
2220
1915
|
function findInternal(source, predicate, emit) {
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
1916
|
+
const findIndex = emit === "index";
|
|
1917
|
+
return (subscriber, environment) => {
|
|
1918
|
+
let index = 0;
|
|
1919
|
+
source.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1920
|
+
next: (value) => {
|
|
1921
|
+
const i = index++;
|
|
1922
|
+
if (predicate(index++, value)) {
|
|
1923
|
+
subscriber.next(findIndex ? i : _fncts_base_data_Maybe_constructors.just(value, fileName_1 + ":2684:49"));
|
|
1924
|
+
subscriber.complete();
|
|
1925
|
+
}
|
|
1926
|
+
},
|
|
1927
|
+
complete: () => {
|
|
1928
|
+
subscriber.next(findIndex ? -1 : _fncts_base_data_Maybe_constructors.nothing(fileName_1 + ":2689:51"));
|
|
1929
|
+
subscriber.complete();
|
|
1930
|
+
}
|
|
1931
|
+
})(subscriber));
|
|
1932
|
+
};
|
|
2238
1933
|
}
|
|
2239
1934
|
function joinAllInternal(fa, joiner) {
|
|
2240
|
-
|
|
1935
|
+
return mergeMap_1(joiner)(toArray_1(fa));
|
|
2241
1936
|
}
|
|
2242
1937
|
function maybeSchedule(subscription, scheduler, execute) {
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
} else {
|
|
2246
|
-
execute();
|
|
2247
|
-
}
|
|
1938
|
+
if (scheduler) subscription.add(scheduler.schedule(execute));
|
|
1939
|
+
else execute();
|
|
2248
1940
|
}
|
|
2249
1941
|
function mergeInternal(source, subscriber, environment, f, concurrent, onBeforeNext, expand, innerSubScheduler, additionalTeardown) {
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
isComplete = true;
|
|
2295
|
-
checkComplete();
|
|
2296
|
-
}
|
|
2297
|
-
}));
|
|
2298
|
-
return () => {
|
|
2299
|
-
additionalTeardown?.();
|
|
2300
|
-
};
|
|
1942
|
+
const buffer = [];
|
|
1943
|
+
let active = 0;
|
|
1944
|
+
let index = 0;
|
|
1945
|
+
let isComplete = false;
|
|
1946
|
+
const checkComplete = () => {
|
|
1947
|
+
if (isComplete && !buffer.length && !active) subscriber.complete();
|
|
1948
|
+
};
|
|
1949
|
+
const outerNext = (a) => active < concurrent ? doInnerSub(a) : buffer.push(a);
|
|
1950
|
+
const doInnerSub = (a) => {
|
|
1951
|
+
expand && subscriber.next(a);
|
|
1952
|
+
active++;
|
|
1953
|
+
let innerComplete = false;
|
|
1954
|
+
from_1(f(index++, a)).provideEnvironment(environment).subscribe(new _fncts_observable_Operator.OperatorSubscriber(subscriber, {
|
|
1955
|
+
next: (b) => {
|
|
1956
|
+
onBeforeNext?.(b);
|
|
1957
|
+
if (expand) outerNext(b);
|
|
1958
|
+
else subscriber.next(b);
|
|
1959
|
+
},
|
|
1960
|
+
complete: () => {
|
|
1961
|
+
innerComplete = true;
|
|
1962
|
+
}
|
|
1963
|
+
}, () => {
|
|
1964
|
+
if (innerComplete) try {
|
|
1965
|
+
active--;
|
|
1966
|
+
while (buffer.length && active < concurrent) {
|
|
1967
|
+
const bufferedValue = buffer.shift();
|
|
1968
|
+
innerSubScheduler ? subscriber.add(innerSubScheduler.schedule(() => doInnerSub(bufferedValue))) : doInnerSub(bufferedValue);
|
|
1969
|
+
}
|
|
1970
|
+
checkComplete();
|
|
1971
|
+
} catch (err) {
|
|
1972
|
+
subscriber.error(_fncts_base_data_Cause_api.halt(err));
|
|
1973
|
+
}
|
|
1974
|
+
}));
|
|
1975
|
+
};
|
|
1976
|
+
source.provideEnvironment(environment).subscribe(new _fncts_observable_Operator.OperatorSubscriber(subscriber, {
|
|
1977
|
+
next: outerNext,
|
|
1978
|
+
complete: () => {
|
|
1979
|
+
isComplete = true;
|
|
1980
|
+
checkComplete();
|
|
1981
|
+
}
|
|
1982
|
+
}));
|
|
1983
|
+
return () => {
|
|
1984
|
+
additionalTeardown?.();
|
|
1985
|
+
};
|
|
2301
1986
|
}
|
|
2302
1987
|
function scanInternal(source, subscriber, environment, f, initial, hasInitial, emitOnNext, emitBeforeComplete) {
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
}
|
|
1988
|
+
let hasState = hasInitial;
|
|
1989
|
+
let state = initial;
|
|
1990
|
+
let index = 0;
|
|
1991
|
+
return source.provideEnvironment(environment).subscribe(_fncts_observable_Operator.operate_({
|
|
1992
|
+
next: (value) => {
|
|
1993
|
+
const i = index++;
|
|
1994
|
+
state = hasState ? f(i, state, value) : (hasState = true, value);
|
|
1995
|
+
emitOnNext && subscriber.next(state);
|
|
1996
|
+
},
|
|
1997
|
+
complete: emitBeforeComplete && (() => {
|
|
1998
|
+
hasState && subscriber.next(state);
|
|
1999
|
+
subscriber.complete();
|
|
2000
|
+
})
|
|
2001
|
+
})(subscriber));
|
|
2002
|
+
}
|
|
2003
|
+
//#endregion
|
|
2004
|
+
exports.TimeoutError = TimeoutError;
|
|
2005
|
+
exports._if = _if;
|
|
2006
|
+
exports.ap = ap;
|
|
2007
|
+
exports.as = as;
|
|
2008
|
+
exports.at = at;
|
|
2009
|
+
exports.audit = audit;
|
|
2010
|
+
exports.auditTime = auditTime;
|
|
2011
|
+
exports.buffer = buffer;
|
|
2012
|
+
exports.bufferCount = bufferCount;
|
|
2013
|
+
exports.bufferTime = bufferTime;
|
|
2014
|
+
exports.bufferToggle = bufferToggle;
|
|
2015
|
+
exports.bufferWhen = bufferWhen;
|
|
2016
|
+
exports.catchAllCause = catchAllCause;
|
|
2017
|
+
exports.combineLatestAll = combineLatestAll;
|
|
2018
|
+
exports.concat = concat;
|
|
2019
|
+
exports.concatAll = concatAll;
|
|
2020
|
+
exports.concatMap = concatMap;
|
|
2021
|
+
exports.concatMapWithIndex = concatMapWithIndex;
|
|
2022
|
+
exports.contramapEnvironment = contramapEnvironment;
|
|
2023
|
+
exports.count = count;
|
|
2024
|
+
exports.countWith = countWith;
|
|
2025
|
+
exports.countWithIndex = countWithIndex;
|
|
2026
|
+
exports.debounce = debounce;
|
|
2027
|
+
exports.debounceWith = debounceWith;
|
|
2028
|
+
exports.defaultThrottleConfig = defaultThrottleConfig;
|
|
2029
|
+
exports.defer = defer;
|
|
2030
|
+
exports.delay = delay;
|
|
2031
|
+
exports.delayWith = delayWith;
|
|
2032
|
+
exports.delayWithIndex = delayWithIndex;
|
|
2033
|
+
exports.dematerialize = dematerialize;
|
|
2034
|
+
exports.either = either;
|
|
2035
|
+
exports.empty = empty;
|
|
2036
|
+
exports.ensuring = ensuring;
|
|
2037
|
+
exports.environmentWithObservable = environmentWithObservable;
|
|
2038
|
+
exports.exhaustAll = exhaustAll;
|
|
2039
|
+
exports.exhaustMap = exhaustMap;
|
|
2040
|
+
exports.exhaustMapWithIndex = exhaustMapWithIndex;
|
|
2041
|
+
exports.expand = expand;
|
|
2042
|
+
exports.expandWithIndex = expandWithIndex;
|
|
2043
|
+
exports.fail = fail;
|
|
2044
|
+
exports.failCause = failCause;
|
|
2045
|
+
exports.filter = filter;
|
|
2046
|
+
exports.filterMap = filterMap;
|
|
2047
|
+
exports.filterMapWithIndex = filterMapWithIndex;
|
|
2048
|
+
exports.filterWithIndex = filterWithIndex;
|
|
2049
|
+
exports.find = find;
|
|
2050
|
+
exports.findIndex = findIndex;
|
|
2051
|
+
exports.findIndexWithIndex = findIndexWithIndex;
|
|
2052
|
+
exports.findWithIndex = findWithIndex;
|
|
2053
|
+
exports.flatten = flatten;
|
|
2054
|
+
exports.foldLeft = foldLeft;
|
|
2055
|
+
exports.foldLeftWithIndex = foldLeftWithIndex;
|
|
2056
|
+
exports.forkJoin = forkJoin;
|
|
2057
|
+
exports.from = from;
|
|
2058
|
+
exports.fromArrayLike = fromArrayLike;
|
|
2059
|
+
exports.fromAsyncIterable = fromAsyncIterable;
|
|
2060
|
+
exports.fromIO = fromIO;
|
|
2061
|
+
exports.fromInterop = fromInterop;
|
|
2062
|
+
exports.fromIterable = fromIterable;
|
|
2063
|
+
exports.fromPromise = fromPromise;
|
|
2064
|
+
exports.fromReadableStreamLike = fromReadableStreamLike;
|
|
2065
|
+
exports.fromSubscribable = fromSubscribable;
|
|
2066
|
+
exports.halt = halt;
|
|
2067
|
+
exports.if = _if_1;
|
|
2068
|
+
exports.ignore = ignore;
|
|
2069
|
+
exports.interval = interval;
|
|
2070
|
+
exports.isEmpty = isEmpty;
|
|
2071
|
+
exports.iterate = iterate;
|
|
2072
|
+
exports.joinAllInternal = joinAllInternal;
|
|
2073
|
+
exports.makeZip = makeZip;
|
|
2074
|
+
exports.mapError = mapError;
|
|
2075
|
+
exports.mapWithIndex = mapWithIndex;
|
|
2076
|
+
exports.map_ = map_;
|
|
2077
|
+
exports.materialize = materialize;
|
|
2078
|
+
exports.merge = merge;
|
|
2079
|
+
exports.mergeAll = mergeAll;
|
|
2080
|
+
exports.mergeMap = mergeMap;
|
|
2081
|
+
exports.mergeMapWithIndex = mergeMapWithIndex;
|
|
2082
|
+
exports.mergeScan = mergeScan;
|
|
2083
|
+
exports.mergeScanWithIndex = mergeScanWithIndex;
|
|
2084
|
+
exports.of = of;
|
|
2085
|
+
exports.onEmpty = onEmpty;
|
|
2086
|
+
exports.onErrorResumeNext = onErrorResumeNext;
|
|
2087
|
+
exports.partition = partition;
|
|
2088
|
+
exports.partitionMap = partitionMap;
|
|
2089
|
+
exports.partitionMapWithIndex = partitionMapWithIndex;
|
|
2090
|
+
exports.partitionWithIndex = partitionWithIndex;
|
|
2091
|
+
exports.provideService = provideService;
|
|
2092
|
+
exports.repeat = repeat;
|
|
2093
|
+
exports.retry = retry;
|
|
2094
|
+
exports.sample = sample;
|
|
2095
|
+
exports.sampleTime = sampleTime;
|
|
2096
|
+
exports.scanInternal = scanInternal;
|
|
2097
|
+
exports.scanLeft = scanLeft;
|
|
2098
|
+
exports.scanLeftWithIndex = scanLeftWithIndex;
|
|
2099
|
+
exports.scheduleArray = scheduleArray;
|
|
2100
|
+
exports.scheduleAsyncIterable = scheduleAsyncIterable;
|
|
2101
|
+
exports.scheduleIterable = scheduleIterable;
|
|
2102
|
+
exports.scheduleObservable = scheduleObservable;
|
|
2103
|
+
exports.schedulePromise = schedulePromise;
|
|
2104
|
+
exports.scheduleReadableStreamLike = scheduleReadableStreamLike;
|
|
2105
|
+
exports.scheduled = scheduled;
|
|
2106
|
+
exports.service = service;
|
|
2107
|
+
exports.serviceWith = serviceWith;
|
|
2108
|
+
exports.serviceWithObservable = serviceWithObservable;
|
|
2109
|
+
exports.single = single;
|
|
2110
|
+
exports.skip = skip;
|
|
2111
|
+
exports.skipLast = skipLast;
|
|
2112
|
+
exports.skipUntil = skipUntil;
|
|
2113
|
+
exports.skipWhile = skipWhile;
|
|
2114
|
+
exports.startWith = startWith;
|
|
2115
|
+
exports.subscribeOn = subscribeOn;
|
|
2116
|
+
exports.swap = swap;
|
|
2117
|
+
exports.switchAll = switchAll;
|
|
2118
|
+
exports.switchMap = switchMap;
|
|
2119
|
+
exports.switchMapWithIndex = switchMapWithIndex;
|
|
2120
|
+
exports.switchScan = switchScan;
|
|
2121
|
+
exports.switchScanWithIndex = switchScanWithIndex;
|
|
2122
|
+
exports.take = take;
|
|
2123
|
+
exports.takeLast = takeLast;
|
|
2124
|
+
exports.takeUntil = takeUntil;
|
|
2125
|
+
exports.takeWhile = takeWhile;
|
|
2126
|
+
exports.takeWhileWithIndex = takeWhileWithIndex;
|
|
2127
|
+
exports.tap = tap;
|
|
2128
|
+
exports.throttle = throttle;
|
|
2129
|
+
exports.throttleTime = throttleTime;
|
|
2130
|
+
exports.timeout = timeout;
|
|
2131
|
+
exports.timer = timer;
|
|
2132
|
+
exports.toArray = toArray;
|
|
2133
|
+
exports.unique = unique;
|
|
2134
|
+
exports.uniqueUntilChanged = uniqueUntilChanged;
|
|
2135
|
+
exports.uniqueUntilKeyChanged = uniqueUntilKeyChanged;
|
|
2136
|
+
exports.unit = unit;
|
|
2137
|
+
exports.zip = zip;
|
|
2138
|
+
exports.zipLatest = zipLatest;
|
|
2139
|
+
exports.zipWith = zipWith;
|
|
2140
|
+
exports.zipWithLatest = zipWithLatest;
|
|
2141
|
+
|
|
2318
2142
|
//# sourceMappingURL=api.cjs.map
|