Comparing version 4.0.13 to 4.0.14
@@ -1,2 +0,2 @@ | ||
import { talkbackT } from '../Wonka_types.gen'; | ||
import { talkbackT, signalT } from '../Wonka_types.gen'; | ||
declare type talkbackCb = (tb: talkbackT) => void; | ||
@@ -3,0 +3,0 @@ export declare const pull: import("../shims/Js.shim").talkbackT; |
1668
dist/wonka.js
@@ -1,2 +0,2 @@ | ||
"use strict"; | ||
'use strict'; | ||
@@ -11,17 +11,24 @@ function __(a, b) { | ||
function fromArray(a) { | ||
return function(b) { | ||
return function (b) { | ||
var c = a.length; | ||
let e = !1, d = !1, f = !1, g = 0; | ||
b(__(0, [ function(h) { | ||
if (h) { | ||
e = !0; | ||
} else if (d) { | ||
f = !0; | ||
} else { | ||
for (d = f = !0; f && !e; ) { | ||
g < c ? (h = a[g], g = g + 1 | 0, f = !1, b(__(1, [ h ]))) : (e = !0, b(0)); | ||
} | ||
d = !1; | ||
} | ||
} ])); | ||
let e = !1, | ||
d = !1, | ||
f = !1, | ||
g = 0; | ||
b( | ||
__(0, [ | ||
function (h) { | ||
if (h) { | ||
e = !0; | ||
} else if (d) { | ||
f = !0; | ||
} else { | ||
for (d = f = !0; f && !e; ) { | ||
g < c ? ((h = a[g]), (g = (g + 1) | 0), (f = !1), b(__(1, [h]))) : ((e = !0), b(0)); | ||
} | ||
d = !1; | ||
} | ||
}, | ||
]) | ||
); | ||
}; | ||
@@ -38,77 +45,14 @@ } | ||
let b = !1; | ||
a(__(0, [ function(c) { | ||
c ? b = !0 : b || a(0); | ||
} ])); | ||
a( | ||
__(0, [ | ||
function (c) { | ||
c ? (b = !0) : b || a(0); | ||
}, | ||
]) | ||
); | ||
} | ||
var fromArray$1 = fromArray, fromList$1 = function fromList(a) { | ||
return function(b) { | ||
let c = !1, e = !1, d = !1, f = a; | ||
b(__(0, [ function(a) { | ||
if (a) { | ||
c = !0; | ||
} else if (e) { | ||
d = !0; | ||
} else { | ||
for (e = d = !0; d && !c; ) { | ||
(a = f) ? (f = a[1], d = !1, b(__(1, [ a[0] ]))) : (c = !0, b(0)); | ||
} | ||
e = !1; | ||
} | ||
} ])); | ||
}; | ||
}, fromValue$1 = function fromValue(a) { | ||
return function(b) { | ||
let c = !1; | ||
b(__(0, [ function(e) { | ||
e ? c = !0 : c || (c = !0, b(__(1, [ a ])), b(0)); | ||
} ])); | ||
}; | ||
}, make$1 = function make(a) { | ||
return function(b) { | ||
let c = _ref, e = !1; | ||
c = a({ | ||
next: function(d) { | ||
e || b(__(1, [ d ])); | ||
}, | ||
complete: function(d) { | ||
e || (e = !0, b(0)); | ||
} | ||
}); | ||
b(__(0, [ function(d) { | ||
if (d && !e) { | ||
return e = !0, c(); | ||
} | ||
} ])); | ||
}; | ||
}, makeSubject$1 = function makeSubject(a) { | ||
let b = [], c = !1; | ||
return { | ||
source: function(a) { | ||
function d(d) { | ||
return d !== a; | ||
} | ||
b = b.concat(a); | ||
a(__(0, [ function(a) { | ||
a && (b = b.filter(d)); | ||
} ])); | ||
}, | ||
next: function(a) { | ||
c || b.forEach((function d(d) { | ||
d(__(1, [ a ])); | ||
})); | ||
}, | ||
complete: function(a) { | ||
c || (c = !0, b.forEach(_ref4)); | ||
} | ||
}; | ||
}, empty$1 = empty, never$1 = function never(a) { | ||
a(__(0, [ talkbackPlaceholder ])); | ||
}; | ||
var undefinedHeader = []; | ||
function some(a) { | ||
if (void 0 === a) { | ||
return (a = [ undefinedHeader, 0 ]).tag = 256, a; | ||
return ((a = [undefinedHeader, 0]).tag = 256), a; | ||
} | ||
@@ -118,3 +62,3 @@ if (null === a || a[0] !== undefinedHeader) { | ||
} | ||
(a = [ undefinedHeader, a[1] + 1 | 0 ]).tag = 256; | ||
(a = [undefinedHeader, (a[1] + 1) | 0]).tag = 256; | ||
return a; | ||
@@ -128,3 +72,3 @@ } | ||
if (0 !== (a = a[1])) { | ||
return [ undefinedHeader, a - 1 | 0 ]; | ||
return [undefinedHeader, (a - 1) | 0]; | ||
} | ||
@@ -134,25 +78,50 @@ } | ||
function concatMap(a) { | ||
return function(b) { | ||
return function(c) { | ||
return function (b) { | ||
return function (c) { | ||
function e(b) { | ||
"number" == typeof b ? k && (k = !1, void 0 !== (b = d.shift()) ? (b = a(valFromOption(b)), | ||
k = !0, b(e)) : m ? c(0) : g || (g = !0, f(0))) : b.tag ? k && (c(b), l ? l = !1 : h(0)) : (h = b = b[0], | ||
l = !1, b(0)); | ||
'number' == typeof b | ||
? k && | ||
((k = !1), | ||
void 0 !== (b = d.shift()) | ||
? ((b = a(valFromOption(b))), (k = !0), b(e)) | ||
: m | ||
? c(0) | ||
: g || ((g = !0), f(0))) | ||
: b.tag | ||
? k && (c(b), l ? (l = !1) : h(0)) | ||
: ((h = b = b[0]), (l = !1), b(0)); | ||
} | ||
let d = [], f = talkbackPlaceholder, g = !1, h = talkbackPlaceholder, k = !1, l = !1, m = !1; | ||
b((function(b) { | ||
"number" == typeof b ? m || (m = !0, !k && function isEmpty(a) { | ||
return 0 === a.length; | ||
}(d) && c(0)) : b.tag ? m || (b = b[0], g = !1, k ? d.push(b) : (b = a(b), k = !0, | ||
b(e))) : f = b[0]; | ||
})); | ||
c(__(0, [ function(a) { | ||
if (a) { | ||
if (m || (m = !0, f(1)), k) { | ||
return k = !1, h(1); | ||
} | ||
} else { | ||
m || g || (g = !0, f(0)), k && !l && (l = !0, h(0)); | ||
} | ||
} ])); | ||
let d = [], | ||
f = talkbackPlaceholder, | ||
g = !1, | ||
h = talkbackPlaceholder, | ||
k = !1, | ||
l = !1, | ||
m = !1; | ||
b(function (b) { | ||
'number' == typeof b | ||
? m || | ||
((m = !0), | ||
!k && | ||
(function (a) { | ||
return 0 === a.length; | ||
})(d) && | ||
c(0)) | ||
: b.tag | ||
? m || ((b = b[0]), (g = !1), k ? d.push(b) : ((b = a(b)), (k = !0), b(e))) | ||
: (f = b[0]); | ||
}); | ||
c( | ||
__(0, [ | ||
function (a) { | ||
if (a) { | ||
if ((m || ((m = !0), f(1)), k)) { | ||
return (k = !1), h(1); | ||
} | ||
} else { | ||
m || g || ((g = !0), f(0)), k && !l && ((l = !0), h(0)); | ||
} | ||
}, | ||
]) | ||
); | ||
}; | ||
@@ -175,25 +144,47 @@ }; | ||
function mergeMap(a) { | ||
return function(b) { | ||
return function(c) { | ||
let e = talkbackPlaceholder, d = !1, f = [], g = !1; | ||
b((function(b) { | ||
"number" == typeof b ? g || (g = !0, 0 === f.length && c(0)) : b.tag ? g || (d = !1, | ||
function(a) { | ||
function b(a) { | ||
return a !== k; | ||
} | ||
var h = function(a) { | ||
"number" == typeof a ? 0 !== f.length && (f = f.filter(b), a = 0 === f.length, g && a ? c(0) : !d && a && (d = !0, | ||
e(0))) : a.tag ? 0 !== f.length && (c(__(1, [ a[0] ])), k(0)) : (k = a = a[0], f = f.concat(a), | ||
a(0)); | ||
}; | ||
let k = talkbackPlaceholder; | ||
1 === a.length ? a(h) : a.bind(null, h); | ||
}(a(b[0])), d || (d = !0, e(0))) : e = b[0]; | ||
})); | ||
c(__(0, [ function(a) { | ||
a ? (g || (g = !0, e(a)), f.forEach((function c(c) { | ||
return c(a); | ||
})), f = []) : (d || g ? d = !1 : (d = !0, e(0)), f.forEach(_ref7)); | ||
} ])); | ||
return function (b) { | ||
return function (c) { | ||
let e = talkbackPlaceholder, | ||
d = !1, | ||
f = [], | ||
g = !1; | ||
b(function (b) { | ||
'number' == typeof b | ||
? g || ((g = !0), 0 === f.length && c(0)) | ||
: b.tag | ||
? g || | ||
((d = !1), | ||
(function (a) { | ||
function b(a) { | ||
return a !== k; | ||
} | ||
var h = function (a) { | ||
'number' == typeof a | ||
? 0 !== f.length && | ||
((f = f.filter(b)), | ||
(a = 0 === f.length), | ||
g && a ? c(0) : !d && a && ((d = !0), e(0))) | ||
: a.tag | ||
? 0 !== f.length && (c(__(1, [a[0]])), k(0)) | ||
: ((k = a = a[0]), (f = f.concat(a)), a(0)); | ||
}; | ||
let k = talkbackPlaceholder; | ||
1 === a.length ? a(h) : a.bind(null, h); | ||
})(a(b[0])), | ||
d || ((d = !0), e(0))) | ||
: (e = b[0]); | ||
}); | ||
c( | ||
__(0, [ | ||
function (a) { | ||
a | ||
? (g || ((g = !0), e(a)), | ||
f.forEach(function (c) { | ||
return c(a); | ||
}), | ||
(f = [])) | ||
: (d || g ? (d = !1) : ((d = !0), e(0)), f.forEach(_ref7)); | ||
}, | ||
]) | ||
); | ||
}; | ||
@@ -216,8 +207,8 @@ }; | ||
function onPush(a) { | ||
return function(b) { | ||
return function(c) { | ||
return function (b) { | ||
return function (c) { | ||
let e = !1; | ||
return b((function(d) { | ||
if ("number" == typeof d) { | ||
e || (e = !0, c(d)); | ||
return b(function (d) { | ||
if ('number' == typeof d) { | ||
e || ((e = !0), c(d)); | ||
} else if (d.tag) { | ||
@@ -227,9 +218,13 @@ e || (a(d[0]), c(d)); | ||
var g = d[0]; | ||
c(__(0, [ function b(a) { | ||
if (!e) { | ||
return a && (e = !0), g(a); | ||
} | ||
} ])); | ||
c( | ||
__(0, [ | ||
function (a) { | ||
if (!e) { | ||
return a && (e = !0), g(a); | ||
} | ||
}, | ||
]) | ||
); | ||
} | ||
})); | ||
}); | ||
}; | ||
@@ -244,22 +239,43 @@ }; | ||
function switchMap(a) { | ||
return function(b) { | ||
return function(c) { | ||
return function (b) { | ||
return function (c) { | ||
function e(a) { | ||
h && ("number" == typeof a ? (h = !1, l ? c(a) : f || (f = !0, d(0))) : a.tag ? (c(a), | ||
k ? k = !1 : g(0)) : (g = a = a[0], k = !1, a(0))); | ||
h && | ||
('number' == typeof a | ||
? ((h = !1), l ? c(a) : f || ((f = !0), d(0))) | ||
: a.tag | ||
? (c(a), k ? (k = !1) : g(0)) | ||
: ((g = a = a[0]), (k = !1), a(0))); | ||
} | ||
let d = talkbackPlaceholder, f = !1, g = talkbackPlaceholder, h = !1, k = !1, l = !1; | ||
b((function(b) { | ||
"number" == typeof b ? l || (l = !0, h || c(0)) : b.tag ? l || (h && (g(1), g = talkbackPlaceholder), | ||
f ? f = !1 : (f = !0, d(0)), b = a(b[0]), h = !0, b(e)) : d = b[0]; | ||
})); | ||
c(__(0, [ function(a) { | ||
if (a) { | ||
if (l || (l = !0, d(1)), h) { | ||
return h = !1, g(1); | ||
} | ||
} else { | ||
l || f || (f = !0, d(0)), h && !k && (k = !0, g(0)); | ||
} | ||
} ])); | ||
let d = talkbackPlaceholder, | ||
f = !1, | ||
g = talkbackPlaceholder, | ||
h = !1, | ||
k = !1, | ||
l = !1; | ||
b(function (b) { | ||
'number' == typeof b | ||
? l || ((l = !0), h || c(0)) | ||
: b.tag | ||
? l || | ||
(h && (g(1), (g = talkbackPlaceholder)), | ||
f ? (f = !1) : ((f = !0), d(0)), | ||
(b = a(b[0])), | ||
(h = !0), | ||
b(e)) | ||
: (d = b[0]); | ||
}); | ||
c( | ||
__(0, [ | ||
function (a) { | ||
if (a) { | ||
if ((l || ((l = !0), d(1)), h)) { | ||
return (h = !1), g(1); | ||
} | ||
} else { | ||
l || f || ((f = !0), d(0)), h && !k && ((k = !0), g(0)); | ||
} | ||
}, | ||
]) | ||
); | ||
}; | ||
@@ -274,9 +290,13 @@ }; | ||
function takeLast(a) { | ||
return function(b) { | ||
return function(c) { | ||
let e = [], d = talkbackPlaceholder; | ||
return b((function(b) { | ||
"number" == typeof b ? fromArray(e)(c) : b.tag ? (e.length >= a && 0 < a && e.shift(), | ||
e.push(b[0]), d(0)) : (b = b[0], 0 >= a ? (b(1), empty(c)) : (d = b, b(0))); | ||
})); | ||
return function (b) { | ||
return function (c) { | ||
let e = [], | ||
d = talkbackPlaceholder; | ||
return b(function (b) { | ||
'number' == typeof b | ||
? fromArray(e)(c) | ||
: b.tag | ||
? (e.length >= a && 0 < a && e.shift(), e.push(b[0]), d(0)) | ||
: ((b = b[0]), 0 >= a ? (b(1), empty(c)) : ((d = b), b(0))); | ||
}); | ||
}; | ||
@@ -286,501 +306,786 @@ }; | ||
var buffer$1 = function buffer(a) { | ||
return function(b) { | ||
return function(c) { | ||
function e(a) { | ||
"number" == typeof a ? k || (k = !0, f(1), 0 < d.length && c(__(1, [ d ])), c(0)) : a.tag ? !k && 0 < d.length && (a = d, | ||
d = [], c(__(1, [ a ]))) : g = a[0]; | ||
} | ||
let d = [], f = talkbackPlaceholder, g = talkbackPlaceholder, h = !1, k = !1; | ||
b((function(b) { | ||
"number" == typeof b ? k || (k = !0, g(1), 0 < d.length && c(__(1, [ d ])), c(0)) : b.tag ? k || (d.push(b[0]), | ||
h ? h = !1 : (h = !0, f(0), g(0))) : (f = b[0], a(e)); | ||
})); | ||
c(__(0, [ function(a) { | ||
if (!k) { | ||
if (a) { | ||
return k = !0, f(1), g(1); | ||
} | ||
if (!h) { | ||
return h = !0, f(0), g(0); | ||
} | ||
function subscribe(a) { | ||
return function (b) { | ||
let c = talkbackPlaceholder, | ||
e = !1; | ||
b(function (b) { | ||
'number' == typeof b ? (e = !0) : b.tag ? e || (a(b[0]), c(0)) : ((c = b = b[0]), b(0)); | ||
}); | ||
return { | ||
unsubscribe: function (a) { | ||
if (!e) { | ||
return (e = !0), c(1); | ||
} | ||
} ])); | ||
}, | ||
}; | ||
}; | ||
}, concatMap$1 = concatMap, concatAll$1 = function concatAll(a) { | ||
return concatMap(_ref3)(a); | ||
}, concat$1 = function concat(a) { | ||
return concatMap(_ref4$1)(fromArray(a)); | ||
}, filter$1 = function filter(a) { | ||
return function(b) { | ||
return function(c) { | ||
let e = talkbackPlaceholder; | ||
return b((function(d) { | ||
"number" == typeof d ? c(d) : d.tag ? a(d[0]) ? c(d) : e(0) : (e = d[0], c(d)); | ||
})); | ||
} | ||
function _ref$1(a) {} | ||
function _ref$2(a) {} | ||
function _ref3$1(a, b, c) { | ||
a.addEventListener(b, c); | ||
} | ||
function _ref4$2(a, b, c) { | ||
a.removeEventListener(b, c); | ||
} | ||
var undefinedHeader, | ||
buffer$1, | ||
combine$1, | ||
concatMap$1, | ||
concatAll$1, | ||
concat$1, | ||
filter$1, | ||
map$1, | ||
mergeMap$1, | ||
merge$1, | ||
mergeAll$1, | ||
flatten$1, | ||
onEnd$1, | ||
onPush$1, | ||
tap$1, | ||
onStart$1, | ||
sample$1, | ||
scan$1, | ||
share$1, | ||
skip$1, | ||
skipUntil$1, | ||
skipWhile$1, | ||
switchMap$1, | ||
switchAll$1, | ||
take$1, | ||
takeLast$1, | ||
takeUntil$1, | ||
takeWhile$1, | ||
subscribe$1, | ||
forEach$1, | ||
publish$1, | ||
toArray$1, | ||
observableSymbol, | ||
fromObservable$2, | ||
toObservable$2, | ||
fromCallbag$2, | ||
toCallbag$2, | ||
debounce$1, | ||
delay$1, | ||
throttle$1, | ||
toPromise$1, | ||
interval$1, | ||
fromDomEvent$1, | ||
fromPromise$1, | ||
fromArray$1 = fromArray, | ||
empty$1 = empty; | ||
undefinedHeader = []; | ||
(buffer$1 = function (a) { | ||
return function (b) { | ||
return function (c) { | ||
function e(a) { | ||
'number' == typeof a | ||
? k || ((k = !0), f(1), 0 < d.length && c(__(1, [d])), c(0)) | ||
: a.tag | ||
? !k && 0 < d.length && ((a = d), (d = []), c(__(1, [a]))) | ||
: (g = a[0]); | ||
} | ||
let d = [], | ||
f = talkbackPlaceholder, | ||
g = talkbackPlaceholder, | ||
h = !1, | ||
k = !1; | ||
b(function (b) { | ||
'number' == typeof b | ||
? k || ((k = !0), g(1), 0 < d.length && c(__(1, [d])), c(0)) | ||
: b.tag | ||
? k || (d.push(b[0]), h ? (h = !1) : ((h = !0), f(0), g(0))) | ||
: ((f = b[0]), a(e)); | ||
}); | ||
c( | ||
__(0, [ | ||
function (a) { | ||
if (!k) { | ||
if (a) { | ||
return (k = !0), f(1), g(1); | ||
} | ||
if (!h) { | ||
return (h = !0), f(0), g(0); | ||
} | ||
} | ||
}, | ||
]) | ||
); | ||
}; | ||
}; | ||
}, map$1 = function map(a) { | ||
return function(b) { | ||
return function(c) { | ||
return b((function(b) { | ||
b = "number" == typeof b ? 0 : b.tag ? __(1, [ a(b[0]) ]) : __(0, [ b[0] ]); | ||
c(b); | ||
})); | ||
}), | ||
(combine$1 = function (a, b) { | ||
return (function (a, b) { | ||
return function (c) { | ||
let e = talkbackPlaceholder, | ||
d = talkbackPlaceholder, | ||
f = void 0, | ||
g = void 0, | ||
h = !1, | ||
k = 0, | ||
l = !1; | ||
a(function (a) { | ||
var b = g; | ||
'number' == typeof a | ||
? 1 > k | ||
? (k = (k + 1) | 0) | ||
: l || ((l = !0), c(0)) | ||
: a.tag | ||
? ((a = a[0]), | ||
void 0 !== b | ||
? l || ((f = some(a)), (h = !1), c(__(1, [[a, valFromOption(b)]]))) | ||
: ((f = some(a)), h ? (h = !1) : d(0))) | ||
: (e = a[0]); | ||
}); | ||
b(function (a) { | ||
var b = f; | ||
'number' == typeof a | ||
? 1 > k | ||
? (k = (k + 1) | 0) | ||
: l || ((l = !0), c(0)) | ||
: a.tag | ||
? ((a = a[0]), | ||
void 0 !== b | ||
? l || ((g = some(a)), (h = !1), c(__(1, [[valFromOption(b), a]]))) | ||
: ((g = some(a)), h ? (h = !1) : e(0))) | ||
: (d = a[0]); | ||
}); | ||
c( | ||
__(0, [ | ||
function (a) { | ||
if (!l) { | ||
if (a) { | ||
return (l = !0), e(1), d(1); | ||
} | ||
if (!h) { | ||
return (h = !0), e(a), d(a); | ||
} | ||
} | ||
}, | ||
]) | ||
); | ||
}; | ||
})(a, b); | ||
}), | ||
(concatMap$1 = concatMap), | ||
(concatAll$1 = function (a) { | ||
return concatMap(_ref3)(a); | ||
}), | ||
(concat$1 = function (a) { | ||
return concatMap(_ref4$1)(fromArray(a)); | ||
}), | ||
(filter$1 = function (a) { | ||
return function (b) { | ||
return function (c) { | ||
let e = talkbackPlaceholder; | ||
return b(function (d) { | ||
'number' == typeof d ? c(d) : d.tag ? (a(d[0]) ? c(d) : e(0)) : ((e = d[0]), c(d)); | ||
}); | ||
}; | ||
}; | ||
}; | ||
}, mergeMap$1 = mergeMap, merge$1 = function merge(a) { | ||
return mergeMap(_ref8)(fromArray(a)); | ||
}, mergeAll$1 = mergeAll, flatten$1 = mergeAll, onEnd$1 = function onEnd(a) { | ||
return function(b) { | ||
return function(c) { | ||
let e = !1; | ||
return b((function(d) { | ||
if ("number" == typeof d) { | ||
if (e) { | ||
return; | ||
} | ||
e = !0; | ||
c(d); | ||
return a(); | ||
} | ||
if (d.tag) { | ||
e || c(d); | ||
} else { | ||
var b = d[0]; | ||
c(__(0, [ function(c) { | ||
if (!e) { | ||
return c ? (e = !0, b(c), a()) : b(c); | ||
}), | ||
(map$1 = function (a) { | ||
return function (b) { | ||
return function (c) { | ||
return b(function (b) { | ||
b = 'number' == typeof b ? 0 : b.tag ? __(1, [a(b[0])]) : __(0, [b[0]]); | ||
c(b); | ||
}); | ||
}; | ||
}; | ||
}), | ||
(mergeMap$1 = mergeMap), | ||
(merge$1 = function (a) { | ||
return mergeMap(_ref8)(fromArray(a)); | ||
}), | ||
(mergeAll$1 = mergeAll), | ||
(flatten$1 = mergeAll), | ||
(onEnd$1 = function (a) { | ||
return function (b) { | ||
return function (c) { | ||
let e = !1; | ||
return b(function (d) { | ||
if ('number' == typeof d) { | ||
if (e) { | ||
return; | ||
} | ||
} ])); | ||
} | ||
})); | ||
}; | ||
}; | ||
}, onPush$1 = onPush, tap$1 = onPush, onStart$1 = function onStart(a) { | ||
return function(b) { | ||
return function(c) { | ||
return b((function(b) { | ||
"number" == typeof b ? c(b) : b.tag ? c(b) : (c(b), a()); | ||
})); | ||
}; | ||
}; | ||
}, sample$1 = function sample(a) { | ||
return function(b) { | ||
return function(c) { | ||
let e = talkbackPlaceholder, d = talkbackPlaceholder, f = void 0, g = !1, h = !1; | ||
b((function(a) { | ||
"number" == typeof a ? h || (h = !0, d(1), c(0)) : a.tag ? (f = some(a[0]), g ? g = !1 : (g = !0, | ||
d(0), e(0))) : e = a[0]; | ||
})); | ||
a((function(a) { | ||
var b = f; | ||
"number" == typeof a ? h || (h = !0, e(1), c(0)) : a.tag ? void 0 === b || h || (f = void 0, | ||
c(__(1, [ valFromOption(b) ]))) : d = a[0]; | ||
})); | ||
c(__(0, [ function(a) { | ||
if (!h) { | ||
if (a) { | ||
return h = !0, e(1), d(1); | ||
e = !0; | ||
c(d); | ||
return a(); | ||
} | ||
if (!g) { | ||
return g = !0, e(0), d(0); | ||
if (d.tag) { | ||
e || c(d); | ||
} else { | ||
var b = d[0]; | ||
c( | ||
__(0, [ | ||
function (c) { | ||
if (!e) { | ||
return c ? ((e = !0), b(c), a()) : b(c); | ||
} | ||
}, | ||
]) | ||
); | ||
} | ||
} | ||
} ])); | ||
}); | ||
}; | ||
}; | ||
}; | ||
}, share$1 = function share(a) { | ||
function b(a) { | ||
"number" == typeof a ? (c.forEach(_ref11), c = []) : a.tag ? (d = !1, c.forEach((function(c) { | ||
c(a); | ||
}))) : e = a[0]; | ||
} | ||
let c = [], e = talkbackPlaceholder, d = !1; | ||
return function(f) { | ||
function g(a) { | ||
return a !== f; | ||
}), | ||
(onPush$1 = onPush), | ||
(tap$1 = onPush), | ||
(onStart$1 = function (a) { | ||
return function (b) { | ||
return function (c) { | ||
return b(function (b) { | ||
'number' == typeof b ? c(b) : b.tag ? c(b) : (c(b), a()); | ||
}); | ||
}; | ||
}; | ||
}), | ||
(sample$1 = function (a) { | ||
return function (b) { | ||
return function (c) { | ||
let e = talkbackPlaceholder, | ||
d = talkbackPlaceholder, | ||
f = void 0, | ||
g = !1, | ||
h = !1; | ||
b(function (a) { | ||
'number' == typeof a | ||
? h || ((h = !0), d(1), c(0)) | ||
: a.tag | ||
? ((f = some(a[0])), g ? (g = !1) : ((g = !0), d(0), e(0))) | ||
: (e = a[0]); | ||
}); | ||
a(function (a) { | ||
var b = f; | ||
'number' == typeof a | ||
? h || ((h = !0), e(1), c(0)) | ||
: a.tag | ||
? void 0 === b || h || ((f = void 0), c(__(1, [valFromOption(b)]))) | ||
: (d = a[0]); | ||
}); | ||
c( | ||
__(0, [ | ||
function (a) { | ||
if (!h) { | ||
if (a) { | ||
return (h = !0), e(1), d(1); | ||
} | ||
if (!g) { | ||
return (g = !0), e(0), d(0); | ||
} | ||
} | ||
}, | ||
]) | ||
); | ||
}; | ||
}; | ||
}), | ||
(scan$1 = function (a, b) { | ||
return (function (a, b) { | ||
return function (c) { | ||
return function (e) { | ||
let d = b; | ||
return c(function (c) { | ||
'number' == typeof c | ||
? (c = 0) | ||
: c.tag | ||
? ((d = a(d, c[0])), (c = __(1, [d]))) | ||
: (c = __(0, [c[0]])); | ||
e(c); | ||
}); | ||
}; | ||
}; | ||
})(a, b); | ||
}), | ||
(share$1 = function (a) { | ||
function b(a) { | ||
'number' == typeof a | ||
? (c.forEach(_ref11), (c = [])) | ||
: a.tag | ||
? ((d = !1), | ||
c.forEach(function (c) { | ||
c(a); | ||
})) | ||
: (e = a[0]); | ||
} | ||
c = c.concat(f); | ||
1 === c.length && a(b); | ||
f(__(0, [ function(a) { | ||
if (a) { | ||
if (c = c.filter(g), 0 === c.length) { | ||
return e(1); | ||
} | ||
} else { | ||
d || (d = !0, e(a)); | ||
let c = [], | ||
e = talkbackPlaceholder, | ||
d = !1; | ||
return function (f) { | ||
function g(a) { | ||
return a !== f; | ||
} | ||
} ])); | ||
}; | ||
}, skip$1 = function skip(a) { | ||
return function(b) { | ||
return function(c) { | ||
let e = talkbackPlaceholder, d = a; | ||
return b((function(a) { | ||
"number" == typeof a ? c(a) : a.tag ? 0 < d ? (d = d - 1 | 0, e(0)) : c(a) : (e = a[0], | ||
c(a)); | ||
})); | ||
}; | ||
}; | ||
}, skipUntil$1 = function skipUntil(a) { | ||
return function(b) { | ||
return function(c) { | ||
function e(a) { | ||
"number" == typeof a ? g && (k = !0, d(1)) : a.tag ? (g = !1, f(1)) : (f = a = a[0], | ||
a(0)); | ||
} | ||
let d = talkbackPlaceholder, f = talkbackPlaceholder, g = !0, h = !1, k = !1; | ||
b((function(b) { | ||
"number" == typeof b ? (g && f(1), k = !0, c(0)) : b.tag ? g || k ? h ? h = !1 : (h = !0, | ||
d(0), f(0)) : (h = !1, c(b)) : (d = b[0], a(e)); | ||
})); | ||
c(__(0, [ function(a) { | ||
if (!k) { | ||
if (a) { | ||
if (k = !0, d(1), g) { | ||
return f(1); | ||
c = c.concat(f); | ||
1 === c.length && a(b); | ||
f( | ||
__(0, [ | ||
function (a) { | ||
if (a) { | ||
if (((c = c.filter(g)), 0 === c.length)) { | ||
return e(1); | ||
} | ||
} else { | ||
d || ((d = !0), e(a)); | ||
} | ||
} else { | ||
h || (h = !0, g && f(0), d(0)); | ||
} | ||
} | ||
} ])); | ||
}, | ||
]) | ||
); | ||
}; | ||
}; | ||
}, skipWhile$1 = function skipWhile(a) { | ||
return function(b) { | ||
return function(c) { | ||
let e = talkbackPlaceholder, d = !0; | ||
return b((function(b) { | ||
"number" == typeof b ? c(b) : b.tag ? d ? a(b[0]) ? e(0) : (d = !1, c(b)) : c(b) : (e = b[0], | ||
c(b)); | ||
})); | ||
}), | ||
(skip$1 = function (a) { | ||
return function (b) { | ||
return function (c) { | ||
let e = talkbackPlaceholder, | ||
d = a; | ||
return b(function (a) { | ||
'number' == typeof a | ||
? c(a) | ||
: a.tag | ||
? 0 < d | ||
? ((d = (d - 1) | 0), e(0)) | ||
: c(a) | ||
: ((e = a[0]), c(a)); | ||
}); | ||
}; | ||
}; | ||
}; | ||
}, switchMap$1 = switchMap, switchAll$1 = function switchAll(a) { | ||
return switchMap(_ref16)(a); | ||
}, take$1 = function take(a) { | ||
return function(b) { | ||
return function(c) { | ||
let e = !1, d = 0, f = talkbackPlaceholder; | ||
b((function(b) { | ||
"number" == typeof b ? e || (e = !0, c(0)) : b.tag ? d < a && !e && (d = d + 1 | 0, | ||
c(b), !e && d >= a && (e = !0, c(0), f(1))) : (b = b[0], 0 >= a ? (e = !0, c(0), | ||
b(1)) : f = b); | ||
})); | ||
c(__(0, [ function(b) { | ||
if (!e) { | ||
if (b) { | ||
return e = !0, f(1); | ||
} | ||
if (d < a) { | ||
return f(0); | ||
} | ||
}), | ||
(skipUntil$1 = function (a) { | ||
return function (b) { | ||
return function (c) { | ||
function e(a) { | ||
'number' == typeof a | ||
? g && ((k = !0), d(1)) | ||
: a.tag | ||
? ((g = !1), f(1)) | ||
: ((f = a = a[0]), a(0)); | ||
} | ||
} ])); | ||
let d = talkbackPlaceholder, | ||
f = talkbackPlaceholder, | ||
g = !0, | ||
h = !1, | ||
k = !1; | ||
b(function (b) { | ||
'number' == typeof b | ||
? (g && f(1), (k = !0), c(0)) | ||
: b.tag | ||
? g || k | ||
? h | ||
? (h = !1) | ||
: ((h = !0), d(0), f(0)) | ||
: ((h = !1), c(b)) | ||
: ((d = b[0]), a(e)); | ||
}); | ||
c( | ||
__(0, [ | ||
function (a) { | ||
if (!k) { | ||
if (a) { | ||
if (((k = !0), d(1), g)) { | ||
return f(1); | ||
} | ||
} else { | ||
h || ((h = !0), g && f(0), d(0)); | ||
} | ||
} | ||
}, | ||
]) | ||
); | ||
}; | ||
}; | ||
}; | ||
}, takeLast$1 = takeLast, takeUntil$1 = function takeUntil(a) { | ||
return function(b) { | ||
return function(c) { | ||
function e(a) { | ||
"number" != typeof a && (a.tag ? (d = !0, f(1), c(0)) : (g = a = a[0], a(0))); | ||
} | ||
let d = !1, f = talkbackPlaceholder, g = talkbackPlaceholder; | ||
b((function(b) { | ||
"number" == typeof b ? d || (d = !0, g(1), c(0)) : b.tag ? d || c(b) : (f = b[0], | ||
a(e)); | ||
})); | ||
c(__(0, [ function(a) { | ||
if (!d) { | ||
return a ? (d = !0, f(1), g(1)) : f(0); | ||
}), | ||
(skipWhile$1 = function (a) { | ||
return function (b) { | ||
return function (c) { | ||
let e = talkbackPlaceholder, | ||
d = !0; | ||
return b(function (b) { | ||
'number' == typeof b | ||
? c(b) | ||
: b.tag | ||
? d | ||
? a(b[0]) | ||
? e(0) | ||
: ((d = !1), c(b)) | ||
: c(b) | ||
: ((e = b[0]), c(b)); | ||
}); | ||
}; | ||
}; | ||
}), | ||
(switchMap$1 = switchMap), | ||
(switchAll$1 = function (a) { | ||
return switchMap(_ref16)(a); | ||
}), | ||
(take$1 = function (a) { | ||
return function (b) { | ||
return function (c) { | ||
let e = !1, | ||
d = 0, | ||
f = talkbackPlaceholder; | ||
b(function (b) { | ||
'number' == typeof b | ||
? e || ((e = !0), c(0)) | ||
: b.tag | ||
? d < a && !e && ((d = (d + 1) | 0), c(b), !e && d >= a && ((e = !0), c(0), f(1))) | ||
: ((b = b[0]), 0 >= a ? ((e = !0), c(0), b(1)) : (f = b)); | ||
}); | ||
c( | ||
__(0, [ | ||
function (b) { | ||
if (!e) { | ||
if (b) { | ||
return (e = !0), f(1); | ||
} | ||
if (d < a) { | ||
return f(0); | ||
} | ||
} | ||
}, | ||
]) | ||
); | ||
}; | ||
}; | ||
}), | ||
(takeLast$1 = takeLast), | ||
(takeUntil$1 = function (a) { | ||
return function (b) { | ||
return function (c) { | ||
function e(a) { | ||
'number' != typeof a && (a.tag ? ((d = !0), f(1), c(0)) : ((g = a = a[0]), a(0))); | ||
} | ||
} ])); | ||
let d = !1, | ||
f = talkbackPlaceholder, | ||
g = talkbackPlaceholder; | ||
b(function (b) { | ||
'number' == typeof b | ||
? d || ((d = !0), g(1), c(0)) | ||
: b.tag | ||
? d || c(b) | ||
: ((f = b[0]), a(e)); | ||
}); | ||
c( | ||
__(0, [ | ||
function (a) { | ||
if (!d) { | ||
return a ? ((d = !0), f(1), g(1)) : f(0); | ||
} | ||
}, | ||
]) | ||
); | ||
}; | ||
}; | ||
}; | ||
}, takeWhile$1 = function takeWhile(a) { | ||
return function(b) { | ||
return function(c) { | ||
let e = talkbackPlaceholder, d = !1; | ||
return b((function(b) { | ||
"number" == typeof b ? d || (d = !0, c(0)) : b.tag ? d || (a(b[0]) ? c(b) : (d = !0, | ||
c(0), e(1))) : (e = b[0], c(b)); | ||
})); | ||
}), | ||
(takeWhile$1 = function (a) { | ||
return function (b) { | ||
return function (c) { | ||
let e = talkbackPlaceholder, | ||
d = !1; | ||
return b(function (b) { | ||
'number' == typeof b | ||
? d || ((d = !0), c(0)) | ||
: b.tag | ||
? d || (a(b[0]) ? c(b) : ((d = !0), c(0), e(1))) | ||
: ((e = b[0]), c(b)); | ||
}); | ||
}; | ||
}; | ||
}; | ||
}; | ||
}); | ||
function subscribe(a) { | ||
return function(b) { | ||
let c = talkbackPlaceholder, e = !1; | ||
b((function(b) { | ||
"number" == typeof b ? e = !0 : b.tag ? e || (a(b[0]), c(0)) : (c = b = b[0], b(0)); | ||
})); | ||
return { | ||
unsubscribe: function(a) { | ||
if (!e) { | ||
return e = !0, c(1); | ||
} | ||
} | ||
(subscribe$1 = subscribe), | ||
(forEach$1 = function (a) { | ||
return function (b) { | ||
subscribe(a)(b); | ||
}; | ||
}; | ||
} | ||
}), | ||
(publish$1 = function (a) { | ||
return subscribe(_ref$1)(a); | ||
}), | ||
(toArray$1 = function (a) { | ||
let b = [], | ||
c = talkbackPlaceholder, | ||
e = !1; | ||
a(function (a) { | ||
'number' == typeof a ? (e = !0) : a.tag ? (b.push(a[0]), c(0)) : ((c = a = a[0]), a(0)); | ||
}); | ||
e || c(1); | ||
return b; | ||
}); | ||
function _ref$1(a) {} | ||
observableSymbol = | ||
'function' == typeof Symbol | ||
? Symbol.observable || (Symbol.observable = Symbol('observable')) | ||
: '@@observable'; | ||
var subscribe$1 = subscribe, forEach$1 = function forEach(a) { | ||
return function(b) { | ||
subscribe(a)(b); | ||
}; | ||
}, publish$1 = function publish(a) { | ||
return subscribe(_ref$1)(a); | ||
}, toArray$1 = function toArray(a) { | ||
let b = [], c = talkbackPlaceholder, e = !1; | ||
a((function(a) { | ||
"number" == typeof a ? e = !0 : a.tag ? (b.push(a[0]), c(0)) : (c = a = a[0], a(0)); | ||
})); | ||
e || c(1); | ||
return b; | ||
}; | ||
var observableSymbol = "function" == typeof Symbol ? Symbol.observable || (Symbol.observable = Symbol("observable")) : "@@observable"; | ||
function _ref$2(a) {} | ||
function _ref3$1(a, b, c) { | ||
a.addEventListener(b, c); | ||
} | ||
function _ref4$2(a, b, c) { | ||
a.removeEventListener(b, c); | ||
} | ||
var fromObservable$2 = function fromObservable(a) { | ||
(fromObservable$2 = function (a) { | ||
var b = void 0 !== a[observableSymbol] ? a[observableSymbol]() : a; | ||
return function(a) { | ||
return function (a) { | ||
var c = b.subscribe({ | ||
next: function(b) { | ||
a(__(1, [ b ])); | ||
next: function (b) { | ||
a(__(1, [b])); | ||
}, | ||
complete: function() { | ||
complete: function () { | ||
a(0); | ||
}, | ||
error: _ref$2 | ||
error: _ref$2, | ||
}); | ||
a(__(0, [ function(a) { | ||
if (a) { | ||
return c.unsubscribe(); | ||
} | ||
} ])); | ||
a( | ||
__(0, [ | ||
function (a) { | ||
if (a) { | ||
return c.unsubscribe(); | ||
} | ||
}, | ||
]) | ||
); | ||
}; | ||
}, toObservable$2 = function toObservable(a) { | ||
var b = { | ||
subscribe: function(b) { | ||
let c = talkbackPlaceholder, d = !1; | ||
a((function(a) { | ||
if ("number" == typeof a) { | ||
return d = !0, b.complete(); | ||
} | ||
if (a.tag) { | ||
if (d) { | ||
return; | ||
}), | ||
(toObservable$2 = function (a) { | ||
var b = { | ||
subscribe: function (b) { | ||
let c = talkbackPlaceholder, | ||
d = !1; | ||
a(function (a) { | ||
if ('number' == typeof a) { | ||
return (d = !0), b.complete(); | ||
} | ||
b.next(a[0]); | ||
return c(0); | ||
} | ||
c = a = a[0]; | ||
a(0); | ||
})); | ||
return { | ||
unsubscribe: function() { | ||
if (!d) { | ||
return d = !0, c(1); | ||
if (a.tag) { | ||
if (d) { | ||
return; | ||
} | ||
b.next(a[0]); | ||
return c(0); | ||
} | ||
c = a = a[0]; | ||
a(0); | ||
}); | ||
return { | ||
unsubscribe: function () { | ||
if (!d) { | ||
return (d = !0), c(1); | ||
} | ||
}, | ||
}; | ||
}, | ||
}; | ||
b[observableSymbol] = function (a) { | ||
return b; | ||
}; | ||
return b; | ||
}), | ||
(fromCallbag$2 = function (a) { | ||
return function (b) { | ||
var c = function (a, c) { | ||
switch (a) { | ||
case 0: | ||
b( | ||
__(0, [ | ||
function (a) { | ||
return a ? c(2) : c(1); | ||
}, | ||
]) | ||
); | ||
break; | ||
case 1: | ||
b(__(1, [c])); | ||
break; | ||
case 2: | ||
b(0); | ||
} | ||
}; | ||
} | ||
}; | ||
b[observableSymbol] = function(a) { | ||
return b; | ||
}; | ||
return b; | ||
}, fromCallbag$2 = function fromCallbag(a) { | ||
return function(b) { | ||
var c = function(a, c) { | ||
switch (a) { | ||
case 0: | ||
b(__(0, [ function d(a) { | ||
return a ? c(2) : c(1); | ||
} ])); | ||
break; | ||
return 2 === a.length ? a(0, c) : a.bind(null, 0, c); | ||
}; | ||
}), | ||
(toCallbag$2 = function (a) { | ||
return function (b, c) { | ||
if (0 === b) { | ||
return a(function (a) { | ||
if ('number' == typeof a) { | ||
return 2 === c.length ? c(2, void 0) : c.bind(null, 2, void 0); | ||
} | ||
if (a.tag) { | ||
return (a = a[0]), 2 === c.length ? c(1, a) : c.bind(null, 1, a); | ||
} | ||
var b = a[0]; | ||
a = function (a) { | ||
switch (a) { | ||
case 1: | ||
b(0); | ||
break; | ||
case 1: | ||
b(__(1, [ c ])); | ||
break; | ||
case 2: | ||
b(0); | ||
case 2: | ||
b(1); | ||
} | ||
}; | ||
return 2 === c.length ? c(0, a) : c.bind(null, 0, a); | ||
}); | ||
} | ||
}; | ||
return 2 === a.length ? a(0, c) : a.bind(null, 0, c); | ||
}; | ||
}, toCallbag$2 = function toCallbag(a) { | ||
return function(b, c) { | ||
if (0 === b) { | ||
return a((function e(a) { | ||
if ("number" == typeof a) { | ||
return 2 === c.length ? c(2, void 0) : c.bind(null, 2, void 0); | ||
} | ||
if (a.tag) { | ||
return a = a[0], 2 === c.length ? c(1, a) : c.bind(null, 1, a); | ||
} | ||
var b = a[0]; | ||
a = function(a) { | ||
switch (a) { | ||
case 1: | ||
b(0); | ||
break; | ||
case 2: | ||
b(1); | ||
}), | ||
(debounce$1 = function (a) { | ||
return function (b) { | ||
return function (c) { | ||
let e = void 0, | ||
d = !1, | ||
f = !1; | ||
var g = function (a) { | ||
void 0 !== (a = e) && ((e = void 0), clearTimeout(valFromOption(a))); | ||
}; | ||
return b(function (b) { | ||
if ('number' == typeof b) { | ||
f || ((f = !0), void 0 !== e ? (d = !0) : c(0)); | ||
} else if (b.tag) { | ||
f || | ||
(g(), | ||
(e = some( | ||
setTimeout(function (a) { | ||
e = void 0; | ||
c(b); | ||
d && c(0); | ||
}, a(b[0])) | ||
))); | ||
} else { | ||
var l = b[0]; | ||
c( | ||
__(0, [ | ||
function (a) { | ||
if (!f) { | ||
return a ? ((f = !0), (d = !1), g(), l(1)) : l(0); | ||
} | ||
}, | ||
]) | ||
); | ||
} | ||
}; | ||
return 2 === c.length ? c(0, a) : c.bind(null, 0, a); | ||
})); | ||
} | ||
}; | ||
}, debounce$1 = function debounce(a) { | ||
return function(b) { | ||
return function(c) { | ||
let e = void 0, d = !1, f = !1; | ||
var g = function(a) { | ||
void 0 !== (a = e) && (e = void 0, clearTimeout(valFromOption(a))); | ||
}); | ||
}; | ||
return b((function(b) { | ||
if ("number" == typeof b) { | ||
f || (f = !0, void 0 !== e ? d = !0 : c(0)); | ||
} else if (b.tag) { | ||
f || (g(), e = some(setTimeout((function h(a) { | ||
e = void 0; | ||
c(b); | ||
d && c(0); | ||
}), a(b[0])))); | ||
} else { | ||
var l = b[0]; | ||
c(__(0, [ function(a) { | ||
if (!f) { | ||
return a ? (f = !0, d = !1, g(), l(1)) : l(0); | ||
} | ||
} ])); | ||
} | ||
})); | ||
}; | ||
}; | ||
}, delay$1 = function delay(a) { | ||
return function(b) { | ||
return function(c) { | ||
let e = 0; | ||
return b((function(b) { | ||
"number" == typeof b || b.tag ? (e = e + 1 | 0, setTimeout((function(a) { | ||
0 !== e && (e = e - 1 | 0, c(b)); | ||
}), a)) : c(b); | ||
})); | ||
}; | ||
}; | ||
}, throttle$1 = function throttle(a) { | ||
return function(b) { | ||
return function(c) { | ||
function e(a) { | ||
f = void 0; | ||
d = !1; | ||
} | ||
let d = !1, f = void 0; | ||
var g = function(a) { | ||
void 0 !== (a = f) && clearTimeout(valFromOption(a)); | ||
}), | ||
(delay$1 = function (a) { | ||
return function (b) { | ||
return function (c) { | ||
let e = 0; | ||
return b(function (b) { | ||
'number' == typeof b || b.tag | ||
? ((e = (e + 1) | 0), | ||
setTimeout(function (a) { | ||
0 !== e && ((e = (e - 1) | 0), c(b)); | ||
}, a)) | ||
: c(b); | ||
}); | ||
}; | ||
return b((function(b) { | ||
if ("number" == typeof b) { | ||
g(), c(0); | ||
} else if (b.tag) { | ||
d || (d = !0, g(), f = some(setTimeout(e, a(b[0]))), c(b)); | ||
} else { | ||
var h = b[0]; | ||
c(__(0, [ function(a) { | ||
return a ? (g(), h(1)) : h(a); | ||
} ])); | ||
} | ||
})); | ||
}; | ||
}; | ||
}, toPromise$1 = function toPromise(a) { | ||
return new Promise((function(b, c) { | ||
takeLast(1)(a)((function(a) { | ||
if ("number" != typeof a) { | ||
if (a.tag) { | ||
b(a[0]); | ||
} else { | ||
a[0](0); | ||
}), | ||
(throttle$1 = function (a) { | ||
return function (b) { | ||
return function (c) { | ||
function e(a) { | ||
f = void 0; | ||
d = !1; | ||
} | ||
} | ||
})); | ||
})); | ||
}, interval$1 = function interval(a) { | ||
return function(b) { | ||
let c = 0; | ||
var e = setInterval((function(a) { | ||
a = c; | ||
c = c + 1 | 0; | ||
b(__(1, [ a ])); | ||
}), a); | ||
b(__(0, [ function(a) { | ||
a && clearInterval(e); | ||
} ])); | ||
}; | ||
}, fromPromise$1 = function fromPromise(a) { | ||
return function(b) { | ||
let c = !1; | ||
a.then((function(a) { | ||
c || (b(__(1, [ a ])), b(0)); | ||
return Promise.resolve(void 0); | ||
})); | ||
b(__(0, [ function(a) { | ||
a && (c = !0); | ||
} ])); | ||
}; | ||
}; | ||
exports.buffer = buffer$1; | ||
exports.combine = function(a, b) { | ||
return function combine(a, b) { | ||
return function(c) { | ||
let e = talkbackPlaceholder, d = talkbackPlaceholder, f = void 0, g = void 0, h = !1, k = 0, l = !1; | ||
a((function(a) { | ||
var b = g; | ||
"number" == typeof a ? 1 > k ? k = k + 1 | 0 : l || (l = !0, c(0)) : a.tag ? (a = a[0], | ||
void 0 !== b ? l || (f = some(a), h = !1, c(__(1, [ [ a, valFromOption(b) ] ]))) : (f = some(a), | ||
h ? h = !1 : d(0))) : e = a[0]; | ||
})); | ||
b((function(a) { | ||
var b = f; | ||
"number" == typeof a ? 1 > k ? k = k + 1 | 0 : l || (l = !0, c(0)) : a.tag ? (a = a[0], | ||
void 0 !== b ? l || (g = some(a), h = !1, c(__(1, [ [ valFromOption(b), a ] ]))) : (g = some(a), | ||
h ? h = !1 : e(0))) : d = a[0]; | ||
})); | ||
c(__(0, [ function(a) { | ||
if (!l) { | ||
if (a) { | ||
return l = !0, e(1), d(1); | ||
let d = !1, | ||
f = void 0; | ||
var g = function (a) { | ||
void 0 !== (a = f) && clearTimeout(valFromOption(a)); | ||
}; | ||
return b(function (b) { | ||
if ('number' == typeof b) { | ||
g(), c(0); | ||
} else if (b.tag) { | ||
d || ((d = !0), g(), (f = some(setTimeout(e, a(b[0])))), c(b)); | ||
} else { | ||
var h = b[0]; | ||
c( | ||
__(0, [ | ||
function (a) { | ||
return a ? (g(), h(1)) : h(a); | ||
}, | ||
]) | ||
); | ||
} | ||
if (!h) { | ||
return h = !0, e(a), d(a); | ||
}); | ||
}; | ||
}; | ||
}), | ||
(toPromise$1 = function (a) { | ||
return new Promise(function (b, c) { | ||
takeLast(1)(a)(function (a) { | ||
if ('number' != typeof a) { | ||
if (a.tag) { | ||
b(a[0]); | ||
} else { | ||
a[0](0); | ||
} | ||
} | ||
} ])); | ||
}); | ||
}); | ||
}), | ||
(interval$1 = function (a) { | ||
return function (b) { | ||
let c = 0; | ||
var e = setInterval(function (a) { | ||
a = c; | ||
c = (c + 1) | 0; | ||
b(__(1, [a])); | ||
}, a); | ||
b( | ||
__(0, [ | ||
function (a) { | ||
a && clearInterval(e); | ||
}, | ||
]) | ||
); | ||
}; | ||
}(a, b); | ||
}; | ||
}), | ||
(fromDomEvent$1 = function (a, b) { | ||
return (function (a, b) { | ||
return function (c) { | ||
var e = _ref3$1, | ||
d = _ref4$2, | ||
f = function (a) { | ||
c(__(1, [a])); | ||
}; | ||
c( | ||
__(0, [ | ||
function (c) { | ||
if (c) { | ||
return d(a, b, f); | ||
} | ||
}, | ||
]) | ||
); | ||
return e(a, b, f); | ||
}; | ||
})(a, b); | ||
}), | ||
(fromPromise$1 = function (a) { | ||
return function (b) { | ||
let c = !1; | ||
a.then(function (a) { | ||
c || (b(__(1, [a])), b(0)); | ||
return Promise.resolve(void 0); | ||
}); | ||
b( | ||
__(0, [ | ||
function (a) { | ||
a && (c = !0); | ||
}, | ||
]) | ||
); | ||
}; | ||
}); | ||
exports.buffer = buffer$1; | ||
exports.combine = combine$1; | ||
exports.concat = concat$1; | ||
@@ -808,20 +1113,29 @@ | ||
exports.fromDomEvent = function(a, b) { | ||
return function fromDomEvent(a, b) { | ||
return function(c) { | ||
var e = _ref3$1, d = _ref4$2, f = function(a) { | ||
c(__(1, [ a ])); | ||
}; | ||
c(__(0, [ function(c) { | ||
if (c) { | ||
return d(a, b, f); | ||
} | ||
} ])); | ||
return e(a, b, f); | ||
}; | ||
}(a, b); | ||
exports.fromDomEvent = fromDomEvent$1; | ||
exports.fromList = function (a) { | ||
return function (b) { | ||
let c = !1, | ||
e = !1, | ||
d = !1, | ||
f = a; | ||
b( | ||
__(0, [ | ||
function (a) { | ||
if (a) { | ||
c = !0; | ||
} else if (e) { | ||
d = !0; | ||
} else { | ||
for (e = d = !0; d && !c; ) { | ||
(a = f) ? ((f = a[1]), (d = !1), b(__(1, [a[0]]))) : ((c = !0), b(0)); | ||
} | ||
e = !1; | ||
} | ||
}, | ||
]) | ||
); | ||
}; | ||
}; | ||
exports.fromList = fromList$1; | ||
exports.fromObservable = fromObservable$2; | ||
@@ -831,9 +1145,69 @@ | ||
exports.fromValue = fromValue$1; | ||
exports.fromValue = function (a) { | ||
return function (b) { | ||
let c = !1; | ||
b( | ||
__(0, [ | ||
function (e) { | ||
e ? (c = !0) : c || ((c = !0), b(__(1, [a])), b(0)); | ||
}, | ||
]) | ||
); | ||
}; | ||
}; | ||
exports.interval = interval$1; | ||
exports.make = make$1; | ||
exports.make = function (a) { | ||
return function (b) { | ||
let c = _ref, | ||
e = !1; | ||
c = a({ | ||
next: function (d) { | ||
e || b(__(1, [d])); | ||
}, | ||
complete: function (d) { | ||
e || ((e = !0), b(0)); | ||
}, | ||
}); | ||
b( | ||
__(0, [ | ||
function (d) { | ||
if (d && !e) { | ||
return (e = !0), c(); | ||
} | ||
}, | ||
]) | ||
); | ||
}; | ||
}; | ||
exports.makeSubject = makeSubject$1; | ||
exports.makeSubject = function (a) { | ||
let b = [], | ||
c = !1; | ||
return { | ||
source: function (a) { | ||
function d(d) { | ||
return d !== a; | ||
} | ||
b = b.concat(a); | ||
a( | ||
__(0, [ | ||
function (a) { | ||
a && (b = b.filter(d)); | ||
}, | ||
]) | ||
); | ||
}, | ||
next: function (a) { | ||
c || | ||
b.forEach(function (d) { | ||
d(__(1, [a])); | ||
}); | ||
}, | ||
complete: function (a) { | ||
c || ((c = !0), b.forEach(_ref4)); | ||
}, | ||
}; | ||
}; | ||
@@ -848,3 +1222,5 @@ exports.map = map$1; | ||
exports.never = never$1; | ||
exports.never = function (a) { | ||
a(__(0, [talkbackPlaceholder])); | ||
}; | ||
@@ -857,3 +1233,3 @@ exports.onEnd = onEnd$1; | ||
exports.pipe = function pipe() { | ||
exports.pipe = function () { | ||
for (var a = arguments, b = arguments[0], c = 1, e = arguments.length; c < e; c++) { | ||
@@ -869,15 +1245,3 @@ b = a[c](b); | ||
exports.scan = function(a, b) { | ||
return function scan(a, b) { | ||
return function(c) { | ||
return function(e) { | ||
let d = b; | ||
return c((function(c) { | ||
"number" == typeof c ? c = 0 : c.tag ? (d = a(d, c[0]), c = __(1, [ d ])) : c = __(0, [ c[0] ]); | ||
e(c); | ||
})); | ||
}; | ||
}; | ||
}(a, b); | ||
}; | ||
exports.scan = scan$1; | ||
@@ -884,0 +1248,0 @@ exports.share = share$1; |
{ | ||
"name": "wonka", | ||
"description": "A fast push & pull stream library for Reason/OCaml, Flow, and TypeScript", | ||
"version": "4.0.13", | ||
"version": "4.0.14", | ||
"author": "Phil Pluckthun <phil@kitten.sh>", | ||
@@ -69,14 +69,14 @@ "source": "./src/Wonka.ts", | ||
"@ampproject/rollup-plugin-closure-compiler": "^0.25.2", | ||
"@babel/core": "^7.9.6", | ||
"@babel/plugin-syntax-typescript": "^7.8.3", | ||
"@babel/plugin-transform-modules-commonjs": "^7.9.6", | ||
"@babel/preset-env": "^7.9.6", | ||
"@babel/core": "^7.10.2", | ||
"@babel/plugin-syntax-typescript": "^7.10.1", | ||
"@babel/plugin-transform-modules-commonjs": "^7.10.1", | ||
"@babel/preset-env": "^7.10.2", | ||
"@glennsl/bs-jest": "^0.5.1", | ||
"@rollup/plugin-buble": "^0.21.3", | ||
"@rollup/plugin-commonjs": "^11.1.0", | ||
"@rollup/plugin-node-resolve": "^7.1.3", | ||
"@types/jest": "^25.2.1", | ||
"@rollup/plugin-commonjs": "^12.0.0", | ||
"@rollup/plugin-node-resolve": "^8.0.0", | ||
"@types/jest": "^25.2.3", | ||
"@types/zen-observable": "^0.8.0", | ||
"babel-plugin-closure-elimination": "^1.3.1", | ||
"bs-platform": "^7.3.1", | ||
"bs-platform": "^7.3.2", | ||
"callbag-from-iter": "^1.2.0", | ||
@@ -86,3 +86,3 @@ "callbag-iterate": "^1.0.0", | ||
"coveralls": "^3.1.0", | ||
"flow-bin": "^0.123.0", | ||
"flow-bin": "^0.125.1", | ||
"flowgen": "^1.10.0", | ||
@@ -92,6 +92,6 @@ "gatsby": "^2.18.17", | ||
"gatsby-theme-docs-system": "^0.2.2", | ||
"gentype": "^3.21.0", | ||
"gentype": "^3.23.0", | ||
"globby": "^11.0.0", | ||
"husky": "^4.2.5", | ||
"lint-staged": "^10.2.1", | ||
"lint-staged": "^10.2.7", | ||
"npm-run-all": "^4.1.5", | ||
@@ -102,8 +102,9 @@ "prettier": "^2.0.5", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.7.6", | ||
"rollup": "^2.12.0", | ||
"rollup-plugin-babel": "^4.4.0", | ||
"rollup-plugin-terser": "^5.3.0", | ||
"rollup-plugin-typescript2": "^0.27.0", | ||
"ts-jest": "^25.4.0", | ||
"typescript": "^3.8.3", | ||
"rollup-plugin-prettier": "^2.1.0", | ||
"rollup-plugin-terser": "^6.1.0", | ||
"rollup-plugin-typescript2": "^0.27.1", | ||
"ts-jest": "^26.1.0", | ||
"typescript": "^3.9.2", | ||
"zen-observable": "^0.8.15" | ||
@@ -110,0 +111,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
406050
7574
39