Comparing version 2.4.1 to 2.5.0
@@ -27,3 +27,3 @@ ## Comparison of public APIs of `Bacon v0.7.52` and `Kefir v2.0.0` | ||
| Use bus | `Kefir.emitter()` | | | ||
| `Bacon.fromBinder(subscribe)` | `Kefir.stream(subscribe)` | In Kefir [emitter](https://pozadi.github.io/kefir/#emitter-object) is used unlike `sink` function in Bacon. In Kefir there is no feature "The sink function may return Bacon.noMore ..." | | ||
| `Bacon.fromBinder(subscribe)` | `Kefir.stream(subscribe)` | In Kefir [emitter](https://rpominov.github.io/kefir/#emitter-object) is used unlike `sink` function in Bacon. In Kefir there is no feature "The sink function may return Bacon.noMore ..." | | ||
| No alt. | `Kefir.withInterval(interval, handler)` | | | ||
@@ -30,0 +30,0 @@ |
@@ -0,1 +1,8 @@ | ||
## 2.5.0 | ||
- The repository moved from `pozadi/kefir` to `rpominov/kefir` | ||
- [emitter](http://rpominov.github.io/kefir/#emitter-object) methods now return a boolean representing whether anybody interested in future events (i.e. whether connected observable is active) | ||
- Another optimization for `.flatMap((x) => Kefir.constan(...))` case (see [9e4a58a](https://github.com/rpominov/kefir/commit/9e4a58a02ec5f80b3c3c6cf52e5e5065249aba50)) | ||
- Methods `.takeWhileBy` and `.skipWhileBy` are deprecated (see [#105](https://github.com/rpominov/kefir/issues/105)) | ||
## 2.4.1 (14/05/2015) | ||
@@ -8,4 +15,4 @@ | ||
- New method `.flatMapErrors` | ||
- A bug in `.flatMap*` fixed (see [98f65b7](https://github.com/pozadi/kefir/commit/98f65b775e2a9785bb66fa1f4a98ffc9bd03b9ff)) | ||
- `Kefir.constant()` and `Kefir.contantError()` made cheaper and faster, so they can be used with `.flatMap` even more freely (see [1c9de75](https://github.com/pozadi/kefir/commit/1c9de75aa7ed38949716b9d117b430587bd3425c)) | ||
- A bug in `.flatMap*` fixed (see [98f65b7](https://github.com/rpominov/kefir/commit/98f65b775e2a9785bb66fa1f4a98ffc9bd03b9ff)) | ||
- `Kefir.constant()` and `Kefir.contantError()` made cheaper and faster, so they can be used with `.flatMap` even more freely (see [1c9de75](https://github.com/rpominov/kefir/commit/1c9de75aa7ed38949716b9d117b430587bd3425c)) | ||
@@ -23,3 +30,3 @@ ## 2.3.0 (10/05/2015) | ||
- Codebase ported to ES6 (Babel) with CommonJS modules | ||
- A bug in .combine fixed (see [#98](https://github.com/pozadi/kefir/issues/98)) | ||
- A bug in .combine fixed (see [#98](https://github.com/rpominov/kefir/issues/98)) | ||
@@ -37,3 +44,3 @@ ## 2.1.0 (28/04/2015) | ||
- A bug in `.flatMap` fixed (see [#92](https://github.com/pozadi/kefir/issues/92)) | ||
- A bug in `.flatMap` fixed (see [#92](https://github.com/rpominov/kefir/issues/92)) | ||
@@ -44,23 +51,23 @@ ## 2.0.0 (22/04/2015) | ||
- Removed support of old transducers protocol in the `.transduce` (see [#79](https://github.com/pozadi/kefir/issues/79)) | ||
- `stream.changes()` now returns a new stream with current values/errors removed (see [#56](https://github.com/pozadi/kefir/issues/56)) | ||
- Properties now can't have both current value and current error at the same time (see [#55](https://github.com/pozadi/kefir/issues/55)) | ||
- Better errors handling in `.combine` (see [#54](https://github.com/pozadi/kefir/issues/54)) | ||
- The `.toProperty` method now accepts a callbak instead of a simple value (see [#82](https://github.com/pozadi/kefir/issues/82)) | ||
- Removed support of old transducers protocol in the `.transduce` (see [#79](https://github.com/rpominov/kefir/issues/79)) | ||
- `stream.changes()` now returns a new stream with current values/errors removed (see [#56](https://github.com/rpominov/kefir/issues/56)) | ||
- Properties now can't have both current value and current error at the same time (see [#55](https://github.com/rpominov/kefir/issues/55)) | ||
- Better errors handling in `.combine` (see [#54](https://github.com/rpominov/kefir/issues/54)) | ||
- The `.toProperty` method now accepts a callbak instead of a simple value (see [#82](https://github.com/rpominov/kefir/issues/82)) | ||
- The `.fromEvent` method is renamed to `.fromEvents` | ||
- The `.fromBinder` method is renamed to `.stream` | ||
- The `.mapEnd` method is renamed to `.beforeEnd` (see [#89](https://github.com/pozadi/kefir/issues/89)) | ||
- The `.mapEnd` method is renamed to `.beforeEnd` (see [#89](https://github.com/rpominov/kefir/issues/89)) | ||
### Other changes | ||
- The `.fromSubUnsub` method is deprecated (see [#71](https://github.com/pozadi/kefir/issues/71)) | ||
- Methods `Kefir.emitter()` and `Kefir.bus()` are deprecated (see [#88](https://github.com/pozadi/kefir/issues/88)) | ||
- The `.fromSubUnsub` method is deprecated (see [#71](https://github.com/rpominov/kefir/issues/71)) | ||
- Methods `Kefir.emitter()` and `Kefir.bus()` are deprecated (see [#88](https://github.com/rpominov/kefir/issues/88)) | ||
## 1.3.2 (26/04/2015) | ||
- A bug in `.flatMap` fixed (see [#92](https://github.com/pozadi/kefir/issues/92)) | ||
- A bug in `.flatMap` fixed (see [#92](https://github.com/rpominov/kefir/issues/92)) | ||
## 1.3.1 (04/04/2015) | ||
- The `.transduce` method updated to add support of new protocol (see [#78](https://github.com/pozadi/kefir/issues/78)) | ||
- The `.transduce` method updated to add support of new protocol (see [#78](https://github.com/rpominov/kefir/issues/78)) | ||
@@ -72,3 +79,3 @@ | ||
`.repeatedly`, `.mapTo`, `.pluck`, `.invoke`, `.not`, `.timestamp`, `.tap`, `.and`, `.or` | ||
(see [#71](https://github.com/pozadi/kefir/issues/71)) | ||
(see [#71](https://github.com/rpominov/kefir/issues/71)) | ||
@@ -88,4 +95,4 @@ ## 1.2.0 (14/03/2015) | ||
- jQuery plugin moved to a [separate repo](https://github.com/pozadi/kefir-jquery) | ||
- Minor improvement in .skipDuplicates method [#42](https://github.com/pozadi/kefir/issues/42) | ||
- jQuery plugin moved to a [separate repo](https://github.com/rpominov/kefir-jquery) | ||
- Minor improvement in .skipDuplicates method [#42](https://github.com/rpominov/kefir/issues/42) | ||
- Deperecated method .withDefault now removed | ||
@@ -95,7 +102,7 @@ | ||
- A bug in .fromBinder fixed (continuation of [#35](https://github.com/pozadi/kefir/issues/35)) | ||
- A bug in .fromBinder fixed (continuation of [#35](https://github.com/rpominov/kefir/issues/35)) | ||
## 0.5.2 (12/01/2015) | ||
- A bug in .fromBinder fixed [#35](https://github.com/pozadi/kefir/issues/35) | ||
- A bug in .fromBinder fixed [#35](https://github.com/rpominov/kefir/issues/35) | ||
@@ -132,3 +139,3 @@ ## 0.5.1 (08/01/2015) | ||
- A bug in `.flatMap` fixed [#29](https://github.com/pozadi/kefir/issues/29) | ||
- A bug in `.flatMap` fixed [#29](https://github.com/rpominov/kefir/issues/29) | ||
- Minor perf fixes | ||
@@ -148,3 +155,3 @@ | ||
- The `seed` argument in `.scan`, `.reduce`, and `.diff` is now optional | ||
- Removed support of ["array functions"](https://github.com/pozadi/kefir/blob/2edf32a82d5b24ecb6ed99c9bcbd2391b91c8715/docs-src/descriptions/about-callbacks.jade) | ||
- Removed support of ["array functions"](https://github.com/rpominov/kefir/blob/2edf32a82d5b24ecb6ed99c9bcbd2391b91c8715/docs-src/descriptions/about-callbacks.jade) | ||
- The default `fn` in `obs.sampledBy(other, fn)` changed from `function(a, b) {return [a, b]}` to `function(a, b) {return a}`. The default `fn` for `Kefir.sampledBy` hasn't changed. | ||
@@ -151,0 +158,0 @@ - New method `.mapEnd` |
# Deprecated API Methods documentation | ||
All documentation on deprecated methods are moved | ||
from [main docs](http://pozadi.github.io/kefir/) to this file. | ||
from [main docs](http://rpominov.github.io/kefir/) to this file. | ||
@@ -320,3 +320,3 @@ | ||
Same as [.combine](http://pozadi.github.io/kefir/#combine), | ||
Same as [.combine](http://rpominov.github.io/kefir/#combine), | ||
except passive observables goes as the first argument unlike second in **.combine**, | ||
@@ -330,3 +330,3 @@ and both `passiveObss` and `activeObss` are required. | ||
Creates a stream from **subscribe** and **unsubscribe** functions. | ||
The **subscribe** function is called on each [activation](http://pozadi.github.io/kefir/#active-state) | ||
The **subscribe** function is called on each [activation](http://rpominov.github.io/kefir/#active-state) | ||
with a callback as argument, | ||
@@ -338,3 +338,3 @@ giving you an opportunity to subscribe with this callback to an original source of values. | ||
You can also provide a **transform** function, which will work the same way as in | ||
[fromEvents](http://pozadi.github.io/kefir/#from-event). | ||
[fromEvents](http://rpominov.github.io/kefir/#from-event). | ||
@@ -380,3 +380,3 @@ ```js | ||
The first three are pretty self-descriptive, and the last one accepts an event object with the same format | ||
than in the [onAny](http://pozadi.github.io/kefir/#on-any) method, and emits that event. | ||
than in the [onAny](http://rpominov.github.io/kefir/#on-any) method, and emits that event. | ||
Once an emitter was created, one can easily emit all three kinds of events from it, | ||
@@ -441,3 +441,3 @@ using these methods. | ||
Similar to [.scan](http://pozadi.github.io/kefir/#scan), | ||
Similar to [.scan](http://rpominov.github.io/kefir/#scan), | ||
but emits only the last result just before end. | ||
@@ -466,1 +466,73 @@ | ||
``` | ||
### obs.takeWhileBy(otherObs) | ||
Works like [takeWhile](http://rpominov.github.io/kefir/#take-while), but instead | ||
of using a predicate function it uses another observable. It takes values from | ||
**obs** observable until the first falsey value from **otherObs**. | ||
Note: it will not produce any value until the first value from **otherObs**. | ||
If that is not what you need, just turn your stream into a property with the | ||
current value at `true` by calling `.toProperty(() => true)`. | ||
```js | ||
// Example | ||
var foo = Kefir.sequentially(100, [1, 2, 3, 4, 5, 6, 7, 8]); | ||
var bar = Kefir.sequentially(200, [true, false, true]).delay(40).toProperty(() => true); | ||
var result = foo.takeWhileBy(bar); | ||
result.log(); | ||
// Output | ||
> [sequentially.takeWhileBy] <value> 1 | ||
> [sequentially.takeWhileBy] <value> 2 | ||
> [sequentially.takeWhileBy] <value> 3 | ||
> [sequentially.takeWhileBy] <value> 4 | ||
> [sequentially.takeWhileBy] <end> | ||
// Events diagram | ||
foo: ----1----2----3----4----5----6----7----8X | ||
bar: t----------t---------f---------tX | ||
result: ----1----2----3----4-X | ||
``` | ||
### obs.skipWhileBy(otherObs) | ||
Works like [skipWhile](http://rpominov.github.io/kefir/#skip-while), but instead | ||
of using a predicate function it uses another observable. It skips values from | ||
**obs** observable until the first falsey value from **otherObs**. | ||
```js | ||
// Example | ||
var foo = Kefir.sequentially(100, [1, 2, 3, 4, 5, 6, 7, 8]); | ||
var bar = Kefir.sequentially(200, [true, false, true]).delay(40); | ||
var result = foo.skipWhileBy(bar); | ||
result.log(); | ||
// Output | ||
> [sequentially.skipWhileBy] <value> 1 | ||
> [sequentially.skipWhileBy] <value> 2 | ||
> [sequentially.skipWhileBy] <value> 3 | ||
> [sequentially.skipWhileBy] <value> 4 | ||
> [sequentially.skipWhileBy] <end> | ||
// Events diagram | ||
foo: ----1----2----3----4----5----6----7----8X | ||
bar: -----------t---------f---------tX | ||
result: ------------------------5----6----7----8X | ||
``` |
@@ -1,6 +0,6 @@ | ||
/*! Kefir.js v2.4.1 | ||
* https://github.com/pozadi/kefir | ||
/*! Kefir.js v2.5.0 | ||
* https://github.com/rpominov/kefir | ||
*/ | ||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):"object"==typeof exports?exports.Kefir=n():t.Kefir=n()}(this,function(){return function(t){function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){"use strict";function i(t,n,e){return function(){if(r.DEPRECATION_WARNINGS&&"undefined"!=typeof console&&console.log){var i="Method `"+t+"` is deprecated, and to be removed in v3.0.0.\nUse `"+n+"` instead.\nTo disable all warnings like this set `Kefir.DEPRECATION_WARNINGS = false`.";console.log(i)}return e.apply(this,arguments)}}var r=t.exports={};r.Kefir=r;var s=r.Observable=e(1);r.Stream=e(2),r.Property=e(3),r.never=e(4),r.later=e(5),r.interval=e(6),r.sequentially=e(7),r.fromPoll=e(8),r.withInterval=e(9),r.fromCallback=e(10),r.fromNodeCallback=e(11),r.fromEvents=e(12),r.stream=e(13),r.constant=e(14),r.constantError=e(15),r.fromPromise=e(16);var u=e(17);s.prototype.toProperty=function(t){return u(this,t)};var o=e(18);s.prototype.changes=function(){return o(this)};var a=e(19);s.prototype.toPromise=function(t){return a(this,t)};var c=e(20);s.prototype.map=function(t){return c(this,t)};var h=e(21);s.prototype.filter=function(t){return h(this,t)};var f=e(22);s.prototype.take=function(t){return f(this,t)};var l=e(23);s.prototype.takeWhile=function(t){return l(this,t)};var _=e(24);s.prototype.last=function(){return _(this)};var d=e(25);s.prototype.skip=function(t){return d(this,t)};var v=e(26);s.prototype.skipWhile=function(t){return v(this,t)};var m=e(27);s.prototype.skipDuplicates=function(t){return m(this,t)};var p=e(28);s.prototype.diff=function(t,n){return p(this,t,n)};var y=e(29);s.prototype.scan=function(t,n){return y(this,t,n)};var g=e(30);s.prototype.flatten=function(t){return g(this,t)};var E=e(31);s.prototype.delay=function(t){return E(this,t)};var S=e(32);s.prototype.throttle=function(t,n){return S(this,t,n)};var A=e(33);s.prototype.debounce=function(t,n){return A(this,t,n)};var b=e(34);s.prototype.valuesToErrors=function(t){return b(this,t)};var x=e(35);s.prototype.errorsToValues=function(t){return x(this,t)};var V=e(36);s.prototype.mapErrors=function(t){return V(this,t)};var w=e(37);s.prototype.filterErrors=function(t){return w(this,t)};var T=e(38);s.prototype.endOnError=function(){return T(this)};var P=e(39);s.prototype.skipValues=function(){return P(this)};var N=e(40);s.prototype.skipErrors=function(){return N(this)};var $=e(41);s.prototype.skipEnd=function(){return $(this)};var k=e(42);s.prototype.beforeEnd=function(t){return k(this,t)};var C=e(43);s.prototype.slidingWindow=function(t,n){return C(this,t,n)};var I=e(44);s.prototype.bufferWhile=function(t,n){return I(this,t,n)};var L=e(45);s.prototype.transduce=function(t){return L(this,t)};var O=e(46);s.prototype.withHandler=function(t){return O(this,t)};var R=r.combine=e(47);s.prototype.combine=function(t,n){return R([this,t],n)};var D=r.zip=e(48);s.prototype.zip=function(t,n){return D([this,t],n)};var B=r.merge=e(49);s.prototype.merge=function(t){return B([this,t])};var H=r.concat=e(50);s.prototype.concat=function(t){return H([this,t])};var M=r.Pool=e(51);r.pool=function(){return new M},r.repeat=e(52);var U=e(53);s.prototype.flatMap=function(t){return new U(this,t).setName(this,"flatMap")},s.prototype.flatMapLatest=function(t){return new U(this,t,{concurLim:1,drop:"old"}).setName(this,"flatMapLatest")},s.prototype.flatMapFirst=function(t){return new U(this,t,{concurLim:1}).setName(this,"flatMapFirst")},s.prototype.flatMapConcat=function(t){return new U(this,t,{queueLim:-1,concurLim:1}).setName(this,"flatMapConcat")},s.prototype.flatMapConcurLimit=function(t,n){return new U(this,t,{queueLim:-1,concurLim:n}).setName(this,"flatMapConcurLimit")};var W=e(54);s.prototype.flatMapErrors=function(t){return new W(this,t).setName(this,"flatMapErrors")};var q=e(55);s.prototype.filterBy=function(t){return q(this,t)};var K=e(56);s.prototype.sampledBy=function(t,n){return K(this,t,n)};var F=e(57);s.prototype.takeWhileBy=function(t){return F(this,t)};var G=e(58);s.prototype.skipWhileBy=function(t){return G(this,t)};var Q=e(59);s.prototype.skipUntilBy=function(t){return Q(this,t)};var j=e(60);s.prototype.takeUntilBy=function(t){return j(this,t)};var z=e(61);s.prototype.bufferBy=function(t,n){return z(this,t,n)};var Y=e(62);s.prototype.bufferWhileBy=function(t,n){return Y(this,t,n)};var J=e(63);s.prototype.awaiting=function(t){return J(this,t)},r.DEPRECATION_WARNINGS=!0;var X=r.Emitter=e(64);r.emitter=i("Kefir.emitter()","Kefir.stream()",function(){return new X});var Z=r.Bus=e(65);r.bus=i("Kefir.bus()","Kefir.pool() or Kefir.stream()",function(){return new Z});var tt=e(66);s.prototype.reduce=i(".reduce(fn, seed)",".scan(fn, seed).last()",function(t,n){return tt(this,t,n)});var nt=e(67);r.sampledBy=i("Kefir.sampledBy()","Kefir.combine()",nt);var et=e(68);r.repeatedly=i("Kefir.repeatedly()","Kefir.repeat(() => Kefir.sequentially(...)})",et);var it=e(69);s.prototype.mapTo=i(".mapTo()",".map(() => value)",function(t){return it(this,t)});var rt=e(70);s.prototype.tap=i(".tap()",".map((v) => {fn(v); return v})",function(t){return rt(this,t)});var st=e(71);s.prototype.pluck=i(".pluck()",".map((x) => x.foo)",function(t){return st(this,t)});var ut=e(72);s.prototype.invoke=i(".invoke()",".map((x) => x.foo())",function(t){for(var n=arguments.length,e=Array(n>1?n-1:0),i=1;n>i;i++)e[i-1]=arguments[i];return ut(this,t,e)});var ot=e(73);s.prototype.timestamp=i(".timestamp()",".map((x) => {value: x, time: Date.now()})",function(){return ot(this)});var at=e(74);r.and=i("Kefir.and()","Kefir.combine([a, b], (a, b) => a && b)",at),s.prototype.and=i(".and()",".combine(other, (a, b) => a && b)",function(t){return at([this,t])});var ct=e(75);r.or=i("Kefir.or()","Kefir.combine([a, b], (a, b) => a || b)",ct),s.prototype.or=i(".or()",".combine(other, (a, b) => a || b)",function(t){return ct([this,t])});var ht=e(76);s.prototype.not=i(".not()",".map((x) => !x)",function(){return ht(this)});var ft=e(77);r.fromSubUnsub=i(".fromSubUnsub()","Kefir.stream()",ft)},function(t,n,e){"use strict";function i(){this._dispatcher=new l,this._active=!1,this._alive=!0,this._activating=!1,this._logHandlers=null}var r=e(78),s=r.extend,u=e(79),o=u.VALUE,a=u.ERROR,c=u.ANY,h=u.END,f=e(80),l=f.Dispatcher,_=f.callSubscriber,d=e(81),v=d.findByPred;s(i.prototype,{_name:"observable",_onActivation:function(){},_onDeactivation:function(){},_setActive:function(t){this._active!==t&&(this._active=t,t?(this._activating=!0,this._onActivation(),this._activating=!1):this._onDeactivation())},_clear:function(){this._setActive(!1),this._alive=!1,this._dispatcher=null,this._logHandlers=null},_emit:function(t,n){switch(t){case o:return this._emitValue(n);case a:return this._emitError(n);case h:return this._emitEnd()}},_emitValue:function(t){this._alive&&this._dispatcher.dispatch({type:o,value:t,current:this._activating})},_emitError:function(t){this._alive&&this._dispatcher.dispatch({type:a,value:t,current:this._activating})},_emitEnd:function(){this._alive&&(this._dispatcher.dispatch({type:h,current:this._activating}),this._clear())},_on:function(t,n){return this._alive?(this._dispatcher.add(t,n),this._setActive(!0)):_(t,n,{type:h,current:!0}),this},_off:function(t,n){if(this._alive){var e=this._dispatcher.remove(t,n);0===e&&this._setActive(!1)}return this},onValue:function(t){return this._on(o,t)},onError:function(t){return this._on(a,t)},onEnd:function(t){return this._on(h,t)},onAny:function(t){return this._on(c,t)},offValue:function(t){return this._off(o,t)},offError:function(t){return this._off(a,t)},offEnd:function(t){return this._off(h,t)},offAny:function(t){return this._off(c,t)},ofSameType:function(t,n){return t.prototype.getType()===this.getType()?t:n},setName:function(t,n){return this._name=n?""+t._name+"."+n:t,this},log:function(){var t=void 0===arguments[0]?this.toString():arguments[0],n=function(n){var e="<"+n.type+(n.current?":current":"")+">";n.type===h?console.log(t,e):console.log(t,e,n.value)};return this._alive&&(this._logHandlers||(this._logHandlers=[]),this._logHandlers.push({name:t,handler:n})),this.onAny(n),this},offLog:function(){var t=void 0===arguments[0]?this.toString():arguments[0];if(this._logHandlers){var n=v(this._logHandlers,function(n){return n.name===t});-1!==n&&(this.offAny(this._logHandlers[n].handler),this._logHandlers.splice(n,1))}return this}}),i.prototype.toString=function(){return"["+this._name+"]"},t.exports=i},function(t,n,e){"use strict";function i(){u.call(this)}var r=e(78),s=r.inherit,u=e(1);s(i,u,{_name:"stream",getType:function(){return"stream"}}),t.exports=i},function(t,n,e){"use strict";function i(){l.call(this),this._currentEvent=null}var r=e(78),s=r.inherit,u=e(79),o=u.VALUE,a=u.ERROR,c=u.END,h=e(80),f=h.callSubscriber,l=e(1);s(i,l,{_name:"property",_emitValue:function(t){this._alive&&(this._activating||this._dispatcher.dispatch({type:o,value:t,current:this._activating}),this._currentEvent={type:o,value:t,current:!0})},_emitError:function(t){this._alive&&(this._activating||this._dispatcher.dispatch({type:a,value:t,current:this._activating}),this._currentEvent={type:a,value:t,current:!0})},_emitEnd:function(){this._alive&&(this._activating||this._dispatcher.dispatch({type:c,current:this._activating}),this._clear())},_on:function(t,n){return this._alive&&(this._dispatcher.add(t,n),this._setActive(!0)),null!==this._currentEvent&&f(t,n,this._currentEvent),this._alive||f(t,n,{type:c,current:!0}),this},getType:function(){return"property"}}),t.exports=i},function(t,n,e){"use strict";var i=e(2),r=new i;r._emitEnd(),r._name="never",t.exports=function(){return r}},function(t,n,e){"use strict";var i=e(82),r=i({_name:"later",_init:function(t){var n=t.x;this._x=n},_free:function(){this._x=null},_onTick:function(){this._emitValue(this._x),this._emitEnd()}});t.exports=function(t,n){return new r(t,{x:n})}},function(t,n,e){"use strict";var i=e(82),r=i({_name:"interval",_init:function(t){var n=t.x;this._x=n},_free:function(){this._x=null},_onTick:function(){this._emitValue(this._x)}});t.exports=function(t,n){return new r(t,{x:n})}},function(t,n,e){"use strict";var i=e(82),r=e(81),s=r.cloneArray,u=e(4),o=i({_name:"sequentially",_init:function(t){var n=t.xs;this._xs=s(n)},_free:function(){this._xs=null},_onTick:function(){1===this._xs.length?(this._emitValue(this._xs[0]),this._emitEnd()):this._emitValue(this._xs.shift())}});t.exports=function(t,n){return 0===n.length?u():new o(t,{xs:n})}},function(t,n,e){"use strict";var i=e(82),r=i({_name:"fromPoll",_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_onTick:function(){var t=this._fn;this._emitValue(t())}});t.exports=function(t,n){return new r(t,{fn:n})}},function(t,n,e){"use strict";var i=e(82),r=e(83),s=i({_name:"withInterval",_init:function(t){var n=t.fn;this._fn=n,this._emitter=r(this)},_free:function(){this._fn=null,this._emitter=null},_onTick:function(){var t=this._fn;t(this._emitter)}});t.exports=function(t,n){return new s(t,{fn:n})}},function(t,n,e){"use strict";var i=e(13);t.exports=function(t){var n=!1;return i(function(e){n||(t(function(t){e.emit(t),e.end()}),n=!0)}).setName("fromCallback")}},function(t,n,e){"use strict";var i=e(13);t.exports=function(t){var n=!1;return i(function(e){n||(t(function(t,n){t?e.error(t):e.emit(n),e.end()}),n=!0)}).setName("fromNodeCallback")}},function(t,n,e){"use strict";var i=e(77),r=[["addEventListener","removeEventListener"],["addListener","removeListener"],["on","off"]];t.exports=function(t,n,e){for(var s=void 0,u=void 0,o=0;o<r.length;o++)if("function"==typeof t[r[o][0]]&&"function"==typeof t[r[o][1]]){s=r[o][0],u=r[o][1];break}if(void 0===s)throw new Error("target don't support any of addEventListener/removeEventListener, addListener/removeListener, on/off method pair");return i(function(e){return t[s](n,e)},function(e){return t[u](n,e)},e).setName("fromEvents")}},function(t,n,e){"use strict";function i(t){u.call(this),this._fn=t,this._unsubscribe=null}var r=e(78),s=r.inherit,u=e(2),o=e(83);s(i,u,{_name:"stream",_onActivation:function(){var t=this._fn;this._unsubscribe=t(o(this))||null,this._active||this._callUnsubscribe()},_callUnsubscribe:function(){null!==this._unsubscribe&&(this._unsubscribe(),this._unsubscribe=null)},_onDeactivation:function(){this._callUnsubscribe()},_clear:function(){u.prototype._clear.call(this),this._fn=null}}),t.exports=function(t){return new i(t)}},function(t,n,e){"use strict";function i(t){this._currentEvent={type:"value",value:t,current:!0}}var r=e(78),s=r.inherit,u=e(3);s(i,u,{_name:"constant",_active:!1,_activating:!1,_alive:!1,_dispatcher:null,_logHandlers:null}),t.exports=function(t){return new i(t)}},function(t,n,e){"use strict";function i(t){this._currentEvent={type:"error",value:t,current:!0}}var r=e(78),s=r.inherit,u=e(3);s(i,u,{_name:"constantError",_active:!1,_activating:!1,_alive:!1,_dispatcher:null,_logHandlers:null}),t.exports=function(t){return new i(t)}},function(t,n,e){"use strict";var i=e(13),r=e(17);t.exports=function(t){var n=!1,e=i(function(e){if(!n){var i=function(t){e.emit(t),e.end()},r=function(t){e.error(t),e.end()},s=t.then(i,r);s&&"function"==typeof s.done&&s.done(),n=!0}});return r(e,null).setName("fromPromise")}},function(t,n,e){"use strict";var i=e(84),r=i.createProperty,s=r("toProperty",{_init:function(t){var n=t.fn;this._getInitialCurrent=n},_onActivation:function(){null!==this._getInitialCurrent&&this._emitValue(this._getInitialCurrent()),this._source.onAny(this._$handleAny)}});t.exports=function(t){var n=void 0===arguments[1]?null:arguments[1];return new s(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=r("changes",{_handleValue:function(t){this._activating||this._emitValue(t)},_handleError:function(t){this._activating||this._emitError(t)}});t.exports=function(t){return new s(t)}},function(t,n,e){"use strict";function i(){if("function"==typeof Promise)return Promise;throw new Error("There isn't default Promise, use shim or parameter")}t.exports=function(t){var n=void 0===arguments[1]?i():arguments[1],e=null;return new n(function(n,i){t.onAny(function(t){"end"===t.type&&null!==e?(("value"===e.type?n:i)(e.value),e=null):e=t})})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleValue:function(t){var n=this._fn;this._emitValue(n(t))}},o=r("map",u),a=s("map",u),c=function(t){return t};t.exports=function(t){var n=void 0===arguments[1]?c:arguments[1];return new(t.ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleValue:function(t){var n=this._fn;n(t)&&this._emitValue(t)}},o=r("filter",u),a=s("filter",u),c=function(t){return t};t.exports=function(t){var n=void 0===arguments[1]?c:arguments[1];return new(t.ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.n;this._n=n,0>=n&&this._emitEnd()},_handleValue:function(t){this._n--,this._emitValue(t),0===this._n&&this._emitEnd()}},o=r("take",u),a=s("take",u);t.exports=function(t,n){return new(t.ofSameType(o,a))(t,{n:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleValue:function(t){var n=this._fn;n(t)?this._emitValue(t):this._emitEnd()}},o=r("takeWhile",u),a=s("takeWhile",u),c=function(t){return t};t.exports=function(t){var n=void 0===arguments[1]?c:arguments[1];return new(t.ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u=e(79),o=u.NOTHING,a={_init:function(){this._lastValue=o},_free:function(){this._lastValue=null},_handleValue:function(t){this._lastValue=t},_handleEnd:function(){this._lastValue!==o&&this._emitValue(this._lastValue),this._emitEnd()}},c=r("last",a),h=s("last",a);t.exports=function(t){return new(t.ofSameType(c,h))(t)}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.n;this._n=Math.max(0,n)},_handleValue:function(t){0===this._n?this._emitValue(t):this._n--}},o=r("skip",u),a=s("skip",u);t.exports=function(t,n){return new(t.ofSameType(o,a))(t,{n:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleValue:function(t){var n=this._fn;null===this._fn||n(t)||(this._fn=null),null===this._fn&&this._emitValue(t)}},o=r("skipWhile",u),a=s("skipWhile",u),c=function(t){return t};t.exports=function(t){var n=void 0===arguments[1]?c:arguments[1];return new(t.ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u=e(79),o=u.NOTHING,a={_init:function(t){var n=t.fn;this._fn=n,this._prev=o},_free:function(){this._fn=null,this._prev=null},_handleValue:function(t){var n=this._fn;this._prev!==o&&n(this._prev,t)||(this._prev=t,this._emitValue(t))}},c=r("skipDuplicates",a),h=s("skipDuplicates",a),f=function(t,n){return t===n};t.exports=function(t){var n=void 0===arguments[1]?f:arguments[1];return new(t.ofSameType(c,h))(t,{fn:n})}},function(t,n,e){"use strict";function i(t,n){return[t,n]}var r=e(84),s=r.createStream,u=r.createProperty,o=e(79),a=o.NOTHING,c={_init:function(t){var n=t.fn,e=t.seed;this._fn=n,this._prev=e},_free:function(){this._prev=null,this._fn=null},_handleValue:function(t){if(this._prev!==a){var n=this._fn;this._emitValue(n(this._prev,t))}this._prev=t}},h=s("diff",c),f=u("diff",c);t.exports=function(t,n){var e=void 0===arguments[2]?a:arguments[2];return new(t.ofSameType(h,f))(t,{fn:n||i,seed:e})}},function(t,n,e){"use strict";var i=e(84),r=i.createProperty,s=e(79),u=s.ERROR,o=s.NOTHING,a=r("scan",{_init:function(t){var n=t.fn,e=t.seed;this._fn=n,e!==o&&this._emitValue(e)},_free:function(){this._fn=null},_handleValue:function(t){if(null!==this._currentEvent&&this._currentEvent.type!==u){var n=this._fn;t=n(this._currentEvent.value,t)}this._emitValue(t)}});t.exports=function(t,n){var e=void 0===arguments[2]?o:arguments[2];return new a(t,{fn:n,seed:e})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleValue:function(t){for(var n=this._fn,e=n(t),i=0;i<e.length;i++)this._emitValue(e[i])}},o=r("flatten",u),a=s("flatten",u),c=function(t){return t};t.exports=function(t){var n=void 0===arguments[1]?c:arguments[1];return new(t.ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=this,e=t.wait;this._wait=Math.max(0,e),this._buff=[],this._$shiftBuff=function(){return n._emitValue(n._buff.shift())}},_free:function(){this._buff=null,this._$shiftBuff=null},_handleValue:function(t){this._activating?this._emitValue(t):(this._buff.push(t),setTimeout(this._$shiftBuff,this._wait))},_handleEnd:function(){var t=this;this._activating?this._emitEnd():setTimeout(function(){return t._emitEnd()},this._wait)}},o=r("delay",u),a=s("delay",u);t.exports=function(t,n){return new(t.ofSameType(o,a))(t,{wait:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u=e(85),o={_init:function(t){var n=this,e=t.wait,i=t.leading,r=t.trailing;this._wait=Math.max(0,e),this._leading=i,this._trailing=r,this._trailingValue=null,this._timeoutId=null,this._endLater=!1,this._lastCallTime=0,this._$trailingCall=function(){return n._trailingCall()}},_free:function(){this._trailingValue=null,this._$trailingCall=null},_handleValue:function(t){if(this._activating)this._emitValue(t);else{var n=u();0!==this._lastCallTime||this._leading||(this._lastCallTime=n);var e=this._wait-(n-this._lastCallTime);0>=e?(this._cancelTrailing(),this._lastCallTime=n,this._emitValue(t)):this._trailing&&(this._cancelTrailing(),this._trailingValue=t,this._timeoutId=setTimeout(this._$trailingCall,e))}},_handleEnd:function(){this._activating?this._emitEnd():this._timeoutId?this._endLater=!0:this._emitEnd()},_cancelTrailing:function(){null!==this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)},_trailingCall:function(){this._emitValue(this._trailingValue),this._timeoutId=null,this._trailingValue=null,this._lastCallTime=this._leading?u():0,this._endLater&&this._emitEnd()}},a=r("throttle",o),c=s("throttle",o);t.exports=function(t,n){var e=void 0===arguments[2]?{}:arguments[2],i=e.leading,r=void 0===i?!0:i,s=e.trailing,u=void 0===s?!0:s;return new(t.ofSameType(a,c))(t,{wait:n,leading:r,trailing:u})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u=e(85),o={_init:function(t){var n=this,e=t.wait,i=t.immediate;this._wait=Math.max(0,e),this._immediate=i,this._lastAttempt=0,this._timeoutId=null,this._laterValue=null,this._endLater=!1,this._$later=function(){return n._later()}},_free:function(){this._laterValue=null,this._$later=null},_handleValue:function(t){this._activating?this._emitValue(t):(this._lastAttempt=u(),this._immediate&&!this._timeoutId&&this._emitValue(t),this._timeoutId||(this._timeoutId=setTimeout(this._$later,this._wait)),this._immediate||(this._laterValue=t))},_handleEnd:function(){this._activating?this._emitEnd():this._timeoutId&&!this._immediate?this._endLater=!0:this._emitEnd()},_later:function(){var t=u()-this._lastAttempt;t<this._wait&&t>=0?this._timeoutId=setTimeout(this._$later,this._wait-t):(this._timeoutId=null,this._immediate||(this._emitValue(this._laterValue),this._laterValue=null),this._endLater&&this._emitEnd())}},a=r("debounce",o),c=s("debounce",o);t.exports=function(t,n){var e=void 0===arguments[2]?{}:arguments[2],i=e.immediate,r=void 0===i?!1:i;return new(t.ofSameType(a,c))(t,{wait:n,immediate:r})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleValue:function(t){var n=this._fn,e=n(t);e.convert?this._emitError(e.error):this._emitValue(t)}},o=r("valuesToErrors",u),a=s("valuesToErrors",u),c=function(t){return{convert:!0,error:t}};t.exports=function(t){var n=void 0===arguments[1]?c:arguments[1];return new(t.ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleError:function(t){var n=this._fn,e=n(t);e.convert?this._emitValue(e.value):this._emitError(t)}},o=r("errorsToValues",u),a=s("errorsToValues",u),c=function(t){return{convert:!0,value:t}};t.exports=function(t){var n=void 0===arguments[1]?c:arguments[1];return new(t.ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleError:function(t){var n=this._fn;this._emitError(n(t))}},o=r("mapErrors",u),a=s("mapErrors",u),c=function(t){return t};t.exports=function(t){var n=void 0===arguments[1]?c:arguments[1];return new(t.ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleError:function(t){var n=this._fn;n(t)&&this._emitError(t)}},o=r("filterErrors",u),a=s("filterErrors",u),c=function(t){return t};t.exports=function(t){var n=void 0===arguments[1]?c:arguments[1];return new(t.ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_handleError:function(t){this._emitError(t),this._emitEnd()}},o=r("endOnError",u),a=s("endOnError",u);t.exports=function(t){return new(t.ofSameType(o,a))(t)}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_handleValue:function(){}},o=r("skipValues",u),a=s("skipValues",u);t.exports=function(t){return new(t.ofSameType(o,a))(t)}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_handleError:function(){}},o=r("skipErrors",u),a=s("skipErrors",u);t.exports=function(t){return new(t.ofSameType(o,a))(t)}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_handleEnd:function(){}},o=r("skipEnd",u),a=s("skipEnd",u);t.exports=function(t){return new(t.ofSameType(o,a))(t)}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleEnd:function(){var t=this._fn;this._emitValue(t()),this._emitEnd()}},o=r("beforeEnd",u),a=s("beforeEnd",u);t.exports=function(t,n){return new(t.ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u=e(81),o=u.slide,a={_init:function(t){var n=t.min,e=t.max;this._max=e,this._min=n,this._buff=[]},_free:function(){this._buff=null},_handleValue:function(t){this._buff=o(this._buff,t,this._max),this._buff.length>=this._min&&this._emitValue(this._buff)}},c=r("slidingWindow",a),h=s("slidingWindow",a);t.exports=function(t,n){var e=void 0===arguments[2]?0:arguments[2];return new(t.ofSameType(c,h))(t,{min:e,max:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn,e=t.flushOnEnd;this._fn=n,this._flushOnEnd=e,this._buff=[]},_free:function(){this._buff=null},_flush:function(){null!==this._buff&&0!==this._buff.length&&(this._emitValue(this._buff),this._buff=[])},_handleValue:function(t){this._buff.push(t);var n=this._fn;n(t)||this._flush()},_handleEnd:function(){this._flushOnEnd&&this._flush(),this._emitEnd()}},o=r("bufferWhile",u),a=s("bufferWhile",u),c=function(t){return t};t.exports=function(t,n){var e=void 0===arguments[2]?{}:arguments[2],i=e.flushOnEnd,r=void 0===i?!0:i;return new(t.ofSameType(o,a))(t,{fn:n||c,flushOnEnd:r})}},function(t,n,e){"use strict";function i(t){return{"@@transducer/step":function(n,e){return t._emitValue(e),null},"@@transducer/result":function(n){return t._emitEnd(),null}}}var r=e(84),s=r.createStream,u=r.createProperty,o={_init:function(t){var n=t.transducer;this._xform=n(i(this))},_free:function(){this._xform=null},_handleValue:function(t){null!==this._xform["@@transducer/step"](null,t)&&this._xform["@@transducer/result"](null)},_handleEnd:function(){this._xform["@@transducer/result"](null)}},a=s("transduce",o),c=u("transduce",o);t.exports=function(t,n){return new(t.ofSameType(a,c))(t,{transducer:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u=e(83),o={_init:function(t){var n=t.fn;this._handler=n,this._emitter=u(this)},_free:function(){this._handler=null,this._emitter=null},_handleAny:function(t){this._handler(this._emitter,t)}},a=r("withHandler",o),c=s("withHandler",o);t.exports=function(t,n){return new(t.ofSameType(a,c))(t,{fn:n})}},function(t,n,e){"use strict";function i(t){for(var n=void 0,e=0;e<t.length;e++)void 0!==t[e]&&(void 0===n||n.index<t[e].index)&&(n=t[e]);return n.error}function r(t,n,e){var i=this;s.call(this),this._activeCount=t.length,this._sources=_(t,n),this._combinator=e?m(e,this._sources.length):function(t){return t},this._aliveCount=0,this._latestValues=new Array(this._sources.length),this._latestErrors=new Array(this._sources.length),d(this._latestValues,c),this._emitAfterActivation=!1,this._endAfterActivation=!1,this._latestErrorIndex=0,this._$handlers=[];for(var r=function(t){i._$handlers.push(function(n){return i._handleAny(t,n)})},u=0;u<this._sources.length;u++)r(u)}var s=e(2),u=e(79),o=u.VALUE,a=u.ERROR,c=u.NOTHING,h=e(78),f=h.inherit,l=e(81),_=l.concat,d=l.fillArray,v=e(86),m=v.spread,p=e(4);f(r,s,{_name:"combine",_onActivation:function(){this._aliveCount=this._activeCount;for(var t=this._activeCount;t<this._sources.length;t++)this._sources[t].onAny(this._$handlers[t]);for(var t=0;t<this._activeCount;t++)this._sources[t].onAny(this._$handlers[t]);this._emitAfterActivation&&(this._emitAfterActivation=!1,this._emitIfFull()),this._endAfterActivation&&this._emitEnd()},_onDeactivation:function(){var t=this._sources.length,n=void 0;for(n=0;t>n;n++)this._sources[n].offAny(this._$handlers[n])},_emitIfFull:function(){for(var t=!0,n=!1,e=this._latestValues.length,r=new Array(e),s=new Array(e),u=0;e>u;u++)r[u]=this._latestValues[u],s[u]=this._latestErrors[u],r[u]===c&&(t=!1),void 0!==s[u]&&(n=!0);if(t){var o=this._combinator;this._emitValue(o(r))}n&&this._emitError(i(s))},_handleAny:function(t,n){n.type===o||n.type===a?(n.type===o&&(this._latestValues[t]=n.value,this._latestErrors[t]=void 0),n.type===a&&(this._latestValues[t]=c,this._latestErrors[t]={index:this._latestErrorIndex++,error:n.value}),t<this._activeCount&&(this._activating?this._emitAfterActivation=!0:this._emitIfFull())):t<this._activeCount&&(this._aliveCount--,0===this._aliveCount&&(this._activating?this._endAfterActivation=!0:this._emitEnd()))},_clear:function(){s.prototype._clear.call(this),this._sources=null,this._latestValues=null,this._latestErrors=null,this._combinator=null,this._$handlers=null}}),t.exports=function(t,n,e){var i=void 0===arguments[1]?[]:arguments[1];return"function"==typeof i&&(e=i,i=[]),0===t.length?p():new r(t,i,e)}},function(t,n,e){"use strict";function i(t,n){var e=this;r.call(this),this._buffers=l(t,function(t){return p(t)?_(t):[]}),this._sources=l(t,function(t){return p(t)?m():t}),this._combinator=n?v(n,this._sources.length):function(t){return t},this._aliveCount=0,this._$handlers=[];for(var i=function(t){e._$handlers.push(function(n){return e._handleAny(t,n)})},s=0;s<this._sources.length;s++)i(s)}var r=e(2),s=e(79),u=s.VALUE,o=s.ERROR,a=s.END,c=e(78),h=c.inherit,f=e(81),l=f.map,_=f.cloneArray,d=e(86),v=d.spread,m=e(4),p=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};h(i,r,{_name:"zip",_onActivation:function(){for(;this._isFull();)this._emit();var t=this._sources.length;this._aliveCount=t;for(var n=0;t>n&&this._active;n++)this._sources[n].onAny(this._$handlers[n])},_onDeactivation:function(){for(var t=0;t<this._sources.length;t++)this._sources[t].offAny(this._$handlers[t])},_emit:function(){for(var t=new Array(this._buffers.length),n=0;n<this._buffers.length;n++)t[n]=this._buffers[n].shift();var e=this._combinator;this._emitValue(e(t))},_isFull:function(){for(var t=0;t<this._buffers.length;t++)if(0===this._buffers[t].length)return!1;return!0},_handleAny:function(t,n){n.type===u&&(this._buffers[t].push(n.value),this._isFull()&&this._emit()),n.type===o&&this._emitError(n.value),n.type===a&&(this._aliveCount--,0===this._aliveCount&&this._emitEnd())},_clear:function(){r.prototype._clear.call(this),this._sources=null,this._buffers=null,this._combinator=null,this._$handlers=null}}),t.exports=function(t,n){return 0===t.length?m():new i(t,n)}},function(t,n,e){"use strict";function i(t){u.call(this),this._addAll(t),this._initialised=!0}var r=e(78),s=r.inherit,u=e(87),o=e(4);s(i,u,{_name:"merge",_onEmpty:function(){this._initialised&&this._emitEnd()}}),t.exports=function(t){return 0===t.length?o():new i(t)}},function(t,n,e){"use strict";var i=e(52);t.exports=function(t){return i(function(n){return t.length>n?t[n]:!1}).setName("concat")}},function(t,n,e){"use strict";function i(){u.call(this)}var r=e(78),s=r.inherit,u=e(87);s(i,u,{_name:"pool",plug:function(t){return this._add(t),this},unplug:function(t){return this._remove(t),this}}),t.exports=i},function(t,n,e){"use strict";function i(t){var n=this;u.call(this),this._generator=t,this._source=null,this._inLoop=!1,this._iteration=0,this._$handleAny=function(t){return n._handleAny(t)}}var r=e(78),s=r.inherit,u=e(2),o=e(79),a=o.END;s(i,u,{_name:"repeat",_handleAny:function(t){t.type===a?(this._source=null,this._getSource()):this._emit(t.type,t.value)},_getSource:function(){if(!this._inLoop){this._inLoop=!0; | ||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):"object"==typeof exports?exports.Kefir=n():t.Kefir=n()}(this,function(){return function(t){function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){"use strict";function i(t,n,e){return function(){if(r.DEPRECATION_WARNINGS&&"undefined"!=typeof console&&console.log){var i="Method `"+t+"` is deprecated, and to be removed in v3.0.0.\nUse `"+n+"` instead.\nTo disable all warnings like this set `Kefir.DEPRECATION_WARNINGS = false`.";console.log(i)}return e.apply(this,arguments)}}var r=t.exports={};r.Kefir=r;var s=r.Observable=e(1);r.Stream=e(2),r.Property=e(3),r.never=e(4),r.later=e(5),r.interval=e(6),r.sequentially=e(7),r.fromPoll=e(8),r.withInterval=e(9),r.fromCallback=e(10),r.fromNodeCallback=e(11),r.fromEvents=e(12),r.stream=e(13),r.constant=e(14),r.constantError=e(15),r.fromPromise=e(16);var u=e(17);s.prototype.toProperty=function(t){return u(this,t)};var o=e(18);s.prototype.changes=function(){return o(this)};var a=e(19);s.prototype.toPromise=function(t){return a(this,t)};var c=e(20);s.prototype.map=function(t){return c(this,t)};var h=e(21);s.prototype.filter=function(t){return h(this,t)};var f=e(22);s.prototype.take=function(t){return f(this,t)};var l=e(23);s.prototype.takeWhile=function(t){return l(this,t)};var _=e(24);s.prototype.last=function(){return _(this)};var d=e(25);s.prototype.skip=function(t){return d(this,t)};var v=e(26);s.prototype.skipWhile=function(t){return v(this,t)};var m=e(27);s.prototype.skipDuplicates=function(t){return m(this,t)};var p=e(28);s.prototype.diff=function(t,n){return p(this,t,n)};var y=e(29);s.prototype.scan=function(t,n){return y(this,t,n)};var g=e(30);s.prototype.flatten=function(t){return g(this,t)};var E=e(31);s.prototype.delay=function(t){return E(this,t)};var S=e(32);s.prototype.throttle=function(t,n){return S(this,t,n)};var A=e(33);s.prototype.debounce=function(t,n){return A(this,t,n)};var x=e(34);s.prototype.valuesToErrors=function(t){return x(this,t)};var b=e(35);s.prototype.errorsToValues=function(t){return b(this,t)};var V=e(36);s.prototype.mapErrors=function(t){return V(this,t)};var w=e(37);s.prototype.filterErrors=function(t){return w(this,t)};var T=e(38);s.prototype.endOnError=function(){return T(this)};var P=e(39);s.prototype.skipValues=function(){return P(this)};var N=e(40);s.prototype.skipErrors=function(){return N(this)};var k=e(41);s.prototype.skipEnd=function(){return k(this)};var $=e(42);s.prototype.beforeEnd=function(t){return $(this,t)};var C=e(43);s.prototype.slidingWindow=function(t,n){return C(this,t,n)};var I=e(44);s.prototype.bufferWhile=function(t,n){return I(this,t,n)};var L=e(45);s.prototype.transduce=function(t){return L(this,t)};var O=e(46);s.prototype.withHandler=function(t){return O(this,t)};var R=r.combine=e(47);s.prototype.combine=function(t,n){return R([this,t],n)};var B=r.zip=e(48);s.prototype.zip=function(t,n){return B([this,t],n)};var D=r.merge=e(49);s.prototype.merge=function(t){return D([this,t])};var H=r.concat=e(50);s.prototype.concat=function(t){return H([this,t])};var U=r.Pool=e(51);r.pool=function(){return new U},r.repeat=e(52);var W=e(53);s.prototype.flatMap=function(t){return new W(this,t).setName(this,"flatMap")},s.prototype.flatMapLatest=function(t){return new W(this,t,{concurLim:1,drop:"old"}).setName(this,"flatMapLatest")},s.prototype.flatMapFirst=function(t){return new W(this,t,{concurLim:1}).setName(this,"flatMapFirst")},s.prototype.flatMapConcat=function(t){return new W(this,t,{queueLim:-1,concurLim:1}).setName(this,"flatMapConcat")},s.prototype.flatMapConcurLimit=function(t,n){return new W(this,t,{queueLim:-1,concurLim:n}).setName(this,"flatMapConcurLimit")};var M=e(54);s.prototype.flatMapErrors=function(t){return new M(this,t).setName(this,"flatMapErrors")};var q=e(55);s.prototype.filterBy=function(t){return q(this,t)};var K=e(56);s.prototype.sampledBy=function(t,n){return K(this,t,n)};var F=e(57);s.prototype.skipUntilBy=function(t){return F(this,t)};var G=e(58);s.prototype.takeUntilBy=function(t){return G(this,t)};var Q=e(59);s.prototype.bufferBy=function(t,n){return Q(this,t,n)};var j=e(60);s.prototype.bufferWhileBy=function(t,n){return j(this,t,n)};var z=e(61);s.prototype.awaiting=function(t){return z(this,t)},r.DEPRECATION_WARNINGS=!0;var Y=r.Emitter=e(62);r.emitter=i("Kefir.emitter()","Kefir.stream()",function(){return new Y});var J=r.Bus=e(63);r.bus=i("Kefir.bus()","Kefir.pool() or Kefir.stream()",function(){return new J});var X=e(64);s.prototype.reduce=i(".reduce(fn, seed)",".scan(fn, seed).last()",function(t,n){return X(this,t,n)});var Z=e(65);r.sampledBy=i("Kefir.sampledBy()","Kefir.combine()",Z);var tt=e(66);r.repeatedly=i("Kefir.repeatedly()","Kefir.repeat(() => Kefir.sequentially(...)})",tt);var nt=e(67);s.prototype.mapTo=i(".mapTo()",".map(() => value)",function(t){return nt(this,t)});var et=e(68);s.prototype.tap=i(".tap()",".map((v) => {fn(v); return v})",function(t){return et(this,t)});var it=e(69);s.prototype.pluck=i(".pluck()",".map((x) => x.foo)",function(t){return it(this,t)});var rt=e(70);s.prototype.invoke=i(".invoke()",".map((x) => x.foo())",function(t){for(var n=arguments.length,e=Array(n>1?n-1:0),i=1;n>i;i++)e[i-1]=arguments[i];return rt(this,t,e)});var st=e(71);s.prototype.timestamp=i(".timestamp()",".map((x) => {value: x, time: Date.now()})",function(){return st(this)});var ut=e(72);r.and=i("Kefir.and()","Kefir.combine([a, b], (a, b) => a && b)",ut),s.prototype.and=i(".and()",".combine(other, (a, b) => a && b)",function(t){return ut([this,t])});var ot=e(73);r.or=i("Kefir.or()","Kefir.combine([a, b], (a, b) => a || b)",ot),s.prototype.or=i(".or()",".combine(other, (a, b) => a || b)",function(t){return ot([this,t])});var at=e(74);s.prototype.not=i(".not()",".map((x) => !x)",function(){return at(this)});var ct=e(75);r.fromSubUnsub=i(".fromSubUnsub()","Kefir.stream()",ct);var ht=e(76);s.prototype.takeWhileBy=i(".takeWhileBy(foo)",".skipUntilBy(foo.filter((x) => !x))",function(t){return ht(this,t)});var ft=e(77);s.prototype.skipWhileBy=i(".skipWhileBy(foo)",".takeUntilBy(foo.filter((x) => !x))",function(t){return ft(this,t)})},function(t,n,e){"use strict";function i(){this._dispatcher=new l,this._active=!1,this._alive=!0,this._activating=!1,this._logHandlers=null}var r=e(78),s=r.extend,u=e(79),o=u.VALUE,a=u.ERROR,c=u.ANY,h=u.END,f=e(80),l=f.Dispatcher,_=f.callSubscriber,d=e(81),v=d.findByPred;s(i.prototype,{_name:"observable",_onActivation:function(){},_onDeactivation:function(){},_setActive:function(t){this._active!==t&&(this._active=t,t?(this._activating=!0,this._onActivation(),this._activating=!1):this._onDeactivation())},_clear:function(){this._setActive(!1),this._alive=!1,this._dispatcher=null,this._logHandlers=null},_emit:function(t,n){switch(t){case o:return this._emitValue(n);case a:return this._emitError(n);case h:return this._emitEnd()}},_emitValue:function(t){this._alive&&this._dispatcher.dispatch({type:o,value:t,current:this._activating})},_emitError:function(t){this._alive&&this._dispatcher.dispatch({type:a,value:t,current:this._activating})},_emitEnd:function(){this._alive&&(this._dispatcher.dispatch({type:h,current:this._activating}),this._clear())},_on:function(t,n){return this._alive?(this._dispatcher.add(t,n),this._setActive(!0)):_(t,n,{type:h,current:!0}),this},_off:function(t,n){if(this._alive){var e=this._dispatcher.remove(t,n);0===e&&this._setActive(!1)}return this},onValue:function(t){return this._on(o,t)},onError:function(t){return this._on(a,t)},onEnd:function(t){return this._on(h,t)},onAny:function(t){return this._on(c,t)},offValue:function(t){return this._off(o,t)},offError:function(t){return this._off(a,t)},offEnd:function(t){return this._off(h,t)},offAny:function(t){return this._off(c,t)},_ofSameType:function(t,n){return t.prototype.getType()===this.getType()?t:n},setName:function(t,n){return this._name=n?""+t._name+"."+n:t,this},log:function(){var t=void 0===arguments[0]?this.toString():arguments[0],n=function(n){var e="<"+n.type+(n.current?":current":"")+">";n.type===h?console.log(t,e):console.log(t,e,n.value)};return this._alive&&(this._logHandlers||(this._logHandlers=[]),this._logHandlers.push({name:t,handler:n})),this.onAny(n),this},offLog:function(){var t=void 0===arguments[0]?this.toString():arguments[0];if(this._logHandlers){var n=v(this._logHandlers,function(n){return n.name===t});-1!==n&&(this.offAny(this._logHandlers[n].handler),this._logHandlers.splice(n,1))}return this}}),i.prototype.toString=function(){return"["+this._name+"]"},t.exports=i},function(t,n,e){"use strict";function i(){u.call(this)}var r=e(78),s=r.inherit,u=e(1);s(i,u,{_name:"stream",getType:function(){return"stream"}}),t.exports=i},function(t,n,e){"use strict";function i(){l.call(this),this._currentEvent=null}var r=e(78),s=r.inherit,u=e(79),o=u.VALUE,a=u.ERROR,c=u.END,h=e(80),f=h.callSubscriber,l=e(1);s(i,l,{_name:"property",_emitValue:function(t){this._alive&&(this._activating||this._dispatcher.dispatch({type:o,value:t,current:this._activating}),this._currentEvent={type:o,value:t,current:!0})},_emitError:function(t){this._alive&&(this._activating||this._dispatcher.dispatch({type:a,value:t,current:this._activating}),this._currentEvent={type:a,value:t,current:!0})},_emitEnd:function(){this._alive&&(this._activating||this._dispatcher.dispatch({type:c,current:this._activating}),this._clear())},_on:function(t,n){return this._alive&&(this._dispatcher.add(t,n),this._setActive(!0)),null!==this._currentEvent&&f(t,n,this._currentEvent),this._alive||f(t,n,{type:c,current:!0}),this},getType:function(){return"property"}}),t.exports=i},function(t,n,e){"use strict";var i=e(2),r=new i;r._emitEnd(),r._name="never",t.exports=function(){return r}},function(t,n,e){"use strict";var i=e(82),r=i({_name:"later",_init:function(t){var n=t.x;this._x=n},_free:function(){this._x=null},_onTick:function(){this._emitValue(this._x),this._emitEnd()}});t.exports=function(t,n){return new r(t,{x:n})}},function(t,n,e){"use strict";var i=e(82),r=i({_name:"interval",_init:function(t){var n=t.x;this._x=n},_free:function(){this._x=null},_onTick:function(){this._emitValue(this._x)}});t.exports=function(t,n){return new r(t,{x:n})}},function(t,n,e){"use strict";var i=e(82),r=e(81),s=r.cloneArray,u=e(4),o=i({_name:"sequentially",_init:function(t){var n=t.xs;this._xs=s(n)},_free:function(){this._xs=null},_onTick:function(){1===this._xs.length?(this._emitValue(this._xs[0]),this._emitEnd()):this._emitValue(this._xs.shift())}});t.exports=function(t,n){return 0===n.length?u():new o(t,{xs:n})}},function(t,n,e){"use strict";var i=e(82),r=i({_name:"fromPoll",_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_onTick:function(){var t=this._fn;this._emitValue(t())}});t.exports=function(t,n){return new r(t,{fn:n})}},function(t,n,e){"use strict";var i=e(82),r=e(83),s=i({_name:"withInterval",_init:function(t){var n=t.fn;this._fn=n,this._emitter=r(this)},_free:function(){this._fn=null,this._emitter=null},_onTick:function(){var t=this._fn;t(this._emitter)}});t.exports=function(t,n){return new s(t,{fn:n})}},function(t,n,e){"use strict";var i=e(13);t.exports=function(t){var n=!1;return i(function(e){n||(t(function(t){e.emit(t),e.end()}),n=!0)}).setName("fromCallback")}},function(t,n,e){"use strict";var i=e(13);t.exports=function(t){var n=!1;return i(function(e){n||(t(function(t,n){t?e.error(t):e.emit(n),e.end()}),n=!0)}).setName("fromNodeCallback")}},function(t,n,e){"use strict";var i=e(75),r=[["addEventListener","removeEventListener"],["addListener","removeListener"],["on","off"]];t.exports=function(t,n,e){for(var s=void 0,u=void 0,o=0;o<r.length;o++)if("function"==typeof t[r[o][0]]&&"function"==typeof t[r[o][1]]){s=r[o][0],u=r[o][1];break}if(void 0===s)throw new Error("target don't support any of addEventListener/removeEventListener, addListener/removeListener, on/off method pair");return i(function(e){return t[s](n,e)},function(e){return t[u](n,e)},e).setName("fromEvents")}},function(t,n,e){"use strict";function i(t){u.call(this),this._fn=t,this._unsubscribe=null}var r=e(78),s=r.inherit,u=e(2),o=e(83);s(i,u,{_name:"stream",_onActivation:function(){var t=this._fn,n=t(o(this));this._unsubscribe="function"==typeof n?n:null,this._active||this._callUnsubscribe()},_callUnsubscribe:function(){null!==this._unsubscribe&&(this._unsubscribe(),this._unsubscribe=null)},_onDeactivation:function(){this._callUnsubscribe()},_clear:function(){u.prototype._clear.call(this),this._fn=null}}),t.exports=function(t){return new i(t)}},function(t,n,e){"use strict";function i(t){this._currentEvent={type:"value",value:t,current:!0}}var r=e(78),s=r.inherit,u=e(3);s(i,u,{_name:"constant",_active:!1,_activating:!1,_alive:!1,_dispatcher:null,_logHandlers:null}),t.exports=function(t){return new i(t)}},function(t,n,e){"use strict";function i(t){this._currentEvent={type:"error",value:t,current:!0}}var r=e(78),s=r.inherit,u=e(3);s(i,u,{_name:"constantError",_active:!1,_activating:!1,_alive:!1,_dispatcher:null,_logHandlers:null}),t.exports=function(t){return new i(t)}},function(t,n,e){"use strict";var i=e(13),r=e(17);t.exports=function(t){var n=!1,e=i(function(e){if(!n){var i=function(t){e.emit(t),e.end()},r=function(t){e.error(t),e.end()},s=t.then(i,r);s&&"function"==typeof s.done&&s.done(),n=!0}});return r(e,null).setName("fromPromise")}},function(t,n,e){"use strict";var i=e(84),r=i.createProperty,s=r("toProperty",{_init:function(t){var n=t.fn;this._getInitialCurrent=n},_onActivation:function(){null!==this._getInitialCurrent&&this._emitValue(this._getInitialCurrent()),this._source.onAny(this._$handleAny)}});t.exports=function(t){var n=void 0===arguments[1]?null:arguments[1];return new s(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=r("changes",{_handleValue:function(t){this._activating||this._emitValue(t)},_handleError:function(t){this._activating||this._emitError(t)}});t.exports=function(t){return new s(t)}},function(t,n,e){"use strict";function i(){if("function"==typeof Promise)return Promise;throw new Error("There isn't default Promise, use shim or parameter")}t.exports=function(t){var n=void 0===arguments[1]?i():arguments[1],e=null;return new n(function(n,i){t.onAny(function(t){"end"===t.type&&null!==e?(("value"===e.type?n:i)(e.value),e=null):e=t})})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleValue:function(t){var n=this._fn;this._emitValue(n(t))}},o=r("map",u),a=s("map",u),c=function(t){return t};t.exports=function(t){var n=void 0===arguments[1]?c:arguments[1];return new(t._ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleValue:function(t){var n=this._fn;n(t)&&this._emitValue(t)}},o=r("filter",u),a=s("filter",u),c=function(t){return t};t.exports=function(t){var n=void 0===arguments[1]?c:arguments[1];return new(t._ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.n;this._n=n,0>=n&&this._emitEnd()},_handleValue:function(t){this._n--,this._emitValue(t),0===this._n&&this._emitEnd()}},o=r("take",u),a=s("take",u);t.exports=function(t,n){return new(t._ofSameType(o,a))(t,{n:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleValue:function(t){var n=this._fn;n(t)?this._emitValue(t):this._emitEnd()}},o=r("takeWhile",u),a=s("takeWhile",u),c=function(t){return t};t.exports=function(t){var n=void 0===arguments[1]?c:arguments[1];return new(t._ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u=e(79),o=u.NOTHING,a={_init:function(){this._lastValue=o},_free:function(){this._lastValue=null},_handleValue:function(t){this._lastValue=t},_handleEnd:function(){this._lastValue!==o&&this._emitValue(this._lastValue),this._emitEnd()}},c=r("last",a),h=s("last",a);t.exports=function(t){return new(t._ofSameType(c,h))(t)}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.n;this._n=Math.max(0,n)},_handleValue:function(t){0===this._n?this._emitValue(t):this._n--}},o=r("skip",u),a=s("skip",u);t.exports=function(t,n){return new(t._ofSameType(o,a))(t,{n:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleValue:function(t){var n=this._fn;null===this._fn||n(t)||(this._fn=null),null===this._fn&&this._emitValue(t)}},o=r("skipWhile",u),a=s("skipWhile",u),c=function(t){return t};t.exports=function(t){var n=void 0===arguments[1]?c:arguments[1];return new(t._ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u=e(79),o=u.NOTHING,a={_init:function(t){var n=t.fn;this._fn=n,this._prev=o},_free:function(){this._fn=null,this._prev=null},_handleValue:function(t){var n=this._fn;this._prev!==o&&n(this._prev,t)||(this._prev=t,this._emitValue(t))}},c=r("skipDuplicates",a),h=s("skipDuplicates",a),f=function(t,n){return t===n};t.exports=function(t){var n=void 0===arguments[1]?f:arguments[1];return new(t._ofSameType(c,h))(t,{fn:n})}},function(t,n,e){"use strict";function i(t,n){return[t,n]}var r=e(84),s=r.createStream,u=r.createProperty,o=e(79),a=o.NOTHING,c={_init:function(t){var n=t.fn,e=t.seed;this._fn=n,this._prev=e},_free:function(){this._prev=null,this._fn=null},_handleValue:function(t){if(this._prev!==a){var n=this._fn;this._emitValue(n(this._prev,t))}this._prev=t}},h=s("diff",c),f=u("diff",c);t.exports=function(t,n){var e=void 0===arguments[2]?a:arguments[2];return new(t._ofSameType(h,f))(t,{fn:n||i,seed:e})}},function(t,n,e){"use strict";var i=e(84),r=i.createProperty,s=e(79),u=s.ERROR,o=s.NOTHING,a=r("scan",{_init:function(t){var n=t.fn,e=t.seed;this._fn=n,e!==o&&this._emitValue(e)},_free:function(){this._fn=null},_handleValue:function(t){if(null!==this._currentEvent&&this._currentEvent.type!==u){var n=this._fn;t=n(this._currentEvent.value,t)}this._emitValue(t)}});t.exports=function(t,n){var e=void 0===arguments[2]?o:arguments[2];return new a(t,{fn:n,seed:e})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleValue:function(t){for(var n=this._fn,e=n(t),i=0;i<e.length;i++)this._emitValue(e[i])}},o=r("flatten",u),a=s("flatten",u),c=function(t){return t};t.exports=function(t){var n=void 0===arguments[1]?c:arguments[1];return new(t._ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=this,e=t.wait;this._wait=Math.max(0,e),this._buff=[],this._$shiftBuff=function(){return n._emitValue(n._buff.shift())}},_free:function(){this._buff=null,this._$shiftBuff=null},_handleValue:function(t){this._activating?this._emitValue(t):(this._buff.push(t),setTimeout(this._$shiftBuff,this._wait))},_handleEnd:function(){var t=this;this._activating?this._emitEnd():setTimeout(function(){return t._emitEnd()},this._wait)}},o=r("delay",u),a=s("delay",u);t.exports=function(t,n){return new(t._ofSameType(o,a))(t,{wait:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u=e(85),o={_init:function(t){var n=this,e=t.wait,i=t.leading,r=t.trailing;this._wait=Math.max(0,e),this._leading=i,this._trailing=r,this._trailingValue=null,this._timeoutId=null,this._endLater=!1,this._lastCallTime=0,this._$trailingCall=function(){return n._trailingCall()}},_free:function(){this._trailingValue=null,this._$trailingCall=null},_handleValue:function(t){if(this._activating)this._emitValue(t);else{var n=u();0!==this._lastCallTime||this._leading||(this._lastCallTime=n);var e=this._wait-(n-this._lastCallTime);0>=e?(this._cancelTrailing(),this._lastCallTime=n,this._emitValue(t)):this._trailing&&(this._cancelTrailing(),this._trailingValue=t,this._timeoutId=setTimeout(this._$trailingCall,e))}},_handleEnd:function(){this._activating?this._emitEnd():this._timeoutId?this._endLater=!0:this._emitEnd()},_cancelTrailing:function(){null!==this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)},_trailingCall:function(){this._emitValue(this._trailingValue),this._timeoutId=null,this._trailingValue=null,this._lastCallTime=this._leading?u():0,this._endLater&&this._emitEnd()}},a=r("throttle",o),c=s("throttle",o);t.exports=function(t,n){var e=void 0===arguments[2]?{}:arguments[2],i=e.leading,r=void 0===i?!0:i,s=e.trailing,u=void 0===s?!0:s;return new(t._ofSameType(a,c))(t,{wait:n,leading:r,trailing:u})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u=e(85),o={_init:function(t){var n=this,e=t.wait,i=t.immediate;this._wait=Math.max(0,e),this._immediate=i,this._lastAttempt=0,this._timeoutId=null,this._laterValue=null,this._endLater=!1,this._$later=function(){return n._later()}},_free:function(){this._laterValue=null,this._$later=null},_handleValue:function(t){this._activating?this._emitValue(t):(this._lastAttempt=u(),this._immediate&&!this._timeoutId&&this._emitValue(t),this._timeoutId||(this._timeoutId=setTimeout(this._$later,this._wait)),this._immediate||(this._laterValue=t))},_handleEnd:function(){this._activating?this._emitEnd():this._timeoutId&&!this._immediate?this._endLater=!0:this._emitEnd()},_later:function(){var t=u()-this._lastAttempt;t<this._wait&&t>=0?this._timeoutId=setTimeout(this._$later,this._wait-t):(this._timeoutId=null,this._immediate||(this._emitValue(this._laterValue),this._laterValue=null),this._endLater&&this._emitEnd())}},a=r("debounce",o),c=s("debounce",o);t.exports=function(t,n){var e=void 0===arguments[2]?{}:arguments[2],i=e.immediate,r=void 0===i?!1:i;return new(t._ofSameType(a,c))(t,{wait:n,immediate:r})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleValue:function(t){var n=this._fn,e=n(t);e.convert?this._emitError(e.error):this._emitValue(t)}},o=r("valuesToErrors",u),a=s("valuesToErrors",u),c=function(t){return{convert:!0,error:t}};t.exports=function(t){var n=void 0===arguments[1]?c:arguments[1];return new(t._ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleError:function(t){var n=this._fn,e=n(t);e.convert?this._emitValue(e.value):this._emitError(t)}},o=r("errorsToValues",u),a=s("errorsToValues",u),c=function(t){return{convert:!0,value:t}};t.exports=function(t){var n=void 0===arguments[1]?c:arguments[1];return new(t._ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleError:function(t){var n=this._fn;this._emitError(n(t))}},o=r("mapErrors",u),a=s("mapErrors",u),c=function(t){return t};t.exports=function(t){var n=void 0===arguments[1]?c:arguments[1];return new(t._ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleError:function(t){var n=this._fn;n(t)&&this._emitError(t)}},o=r("filterErrors",u),a=s("filterErrors",u),c=function(t){return t};t.exports=function(t){var n=void 0===arguments[1]?c:arguments[1];return new(t._ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_handleError:function(t){this._emitError(t),this._emitEnd()}},o=r("endOnError",u),a=s("endOnError",u);t.exports=function(t){return new(t._ofSameType(o,a))(t)}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_handleValue:function(){}},o=r("skipValues",u),a=s("skipValues",u);t.exports=function(t){return new(t._ofSameType(o,a))(t)}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_handleError:function(){}},o=r("skipErrors",u),a=s("skipErrors",u);t.exports=function(t){return new(t._ofSameType(o,a))(t)}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_handleEnd:function(){}},o=r("skipEnd",u),a=s("skipEnd",u);t.exports=function(t){return new(t._ofSameType(o,a))(t)}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleEnd:function(){var t=this._fn;this._emitValue(t()),this._emitEnd()}},o=r("beforeEnd",u),a=s("beforeEnd",u);t.exports=function(t,n){return new(t._ofSameType(o,a))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u=e(81),o=u.slide,a={_init:function(t){var n=t.min,e=t.max;this._max=e,this._min=n,this._buff=[]},_free:function(){this._buff=null},_handleValue:function(t){this._buff=o(this._buff,t,this._max),this._buff.length>=this._min&&this._emitValue(this._buff)}},c=r("slidingWindow",a),h=s("slidingWindow",a);t.exports=function(t,n){var e=void 0===arguments[2]?0:arguments[2];return new(t._ofSameType(c,h))(t,{min:e,max:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn,e=t.flushOnEnd;this._fn=n,this._flushOnEnd=e,this._buff=[]},_free:function(){this._buff=null},_flush:function(){null!==this._buff&&0!==this._buff.length&&(this._emitValue(this._buff),this._buff=[])},_handleValue:function(t){this._buff.push(t);var n=this._fn;n(t)||this._flush()},_handleEnd:function(){this._flushOnEnd&&this._flush(),this._emitEnd()}},o=r("bufferWhile",u),a=s("bufferWhile",u),c=function(t){return t};t.exports=function(t,n){var e=void 0===arguments[2]?{}:arguments[2],i=e.flushOnEnd,r=void 0===i?!0:i;return new(t._ofSameType(o,a))(t,{fn:n||c,flushOnEnd:r})}},function(t,n,e){"use strict";function i(t){return{"@@transducer/step":function(n,e){return t._emitValue(e),null},"@@transducer/result":function(n){return t._emitEnd(),null}}}var r=e(84),s=r.createStream,u=r.createProperty,o={_init:function(t){var n=t.transducer;this._xform=n(i(this))},_free:function(){this._xform=null},_handleValue:function(t){null!==this._xform["@@transducer/step"](null,t)&&this._xform["@@transducer/result"](null)},_handleEnd:function(){this._xform["@@transducer/result"](null)}},a=s("transduce",o),c=u("transduce",o);t.exports=function(t,n){return new(t._ofSameType(a,c))(t,{transducer:n})}},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u=e(83),o={_init:function(t){var n=t.fn;this._handler=n,this._emitter=u(this)},_free:function(){this._handler=null,this._emitter=null},_handleAny:function(t){this._handler(this._emitter,t)}},a=r("withHandler",o),c=s("withHandler",o);t.exports=function(t,n){return new(t._ofSameType(a,c))(t,{fn:n})}},function(t,n,e){"use strict";function i(t){for(var n=void 0,e=0;e<t.length;e++)void 0!==t[e]&&(void 0===n||n.index<t[e].index)&&(n=t[e]);return n.error}function r(t,n,e){var i=this;s.call(this),this._activeCount=t.length,this._sources=_(t,n),this._combinator=e?m(e,this._sources.length):function(t){return t},this._aliveCount=0,this._latestValues=new Array(this._sources.length),this._latestErrors=new Array(this._sources.length),d(this._latestValues,c),this._emitAfterActivation=!1,this._endAfterActivation=!1,this._latestErrorIndex=0,this._$handlers=[];for(var r=function(t){i._$handlers.push(function(n){return i._handleAny(t,n)})},u=0;u<this._sources.length;u++)r(u)}var s=e(2),u=e(79),o=u.VALUE,a=u.ERROR,c=u.NOTHING,h=e(78),f=h.inherit,l=e(81),_=l.concat,d=l.fillArray,v=e(86),m=v.spread,p=e(4);f(r,s,{_name:"combine",_onActivation:function(){this._aliveCount=this._activeCount;for(var t=this._activeCount;t<this._sources.length;t++)this._sources[t].onAny(this._$handlers[t]);for(var t=0;t<this._activeCount;t++)this._sources[t].onAny(this._$handlers[t]);this._emitAfterActivation&&(this._emitAfterActivation=!1,this._emitIfFull()),this._endAfterActivation&&this._emitEnd()},_onDeactivation:function(){var t=this._sources.length,n=void 0;for(n=0;t>n;n++)this._sources[n].offAny(this._$handlers[n])},_emitIfFull:function(){for(var t=!0,n=!1,e=this._latestValues.length,r=new Array(e),s=new Array(e),u=0;e>u;u++)r[u]=this._latestValues[u],s[u]=this._latestErrors[u],r[u]===c&&(t=!1),void 0!==s[u]&&(n=!0);if(t){var o=this._combinator;this._emitValue(o(r))}n&&this._emitError(i(s))},_handleAny:function(t,n){n.type===o||n.type===a?(n.type===o&&(this._latestValues[t]=n.value,this._latestErrors[t]=void 0),n.type===a&&(this._latestValues[t]=c,this._latestErrors[t]={index:this._latestErrorIndex++,error:n.value}),t<this._activeCount&&(this._activating?this._emitAfterActivation=!0:this._emitIfFull())):t<this._activeCount&&(this._aliveCount--,0===this._aliveCount&&(this._activating?this._endAfterActivation=!0:this._emitEnd()))},_clear:function(){s.prototype._clear.call(this),this._sources=null,this._latestValues=null,this._latestErrors=null,this._combinator=null,this._$handlers=null}}),t.exports=function(t,n,e){var i=void 0===arguments[1]?[]:arguments[1];return"function"==typeof i&&(e=i,i=[]),0===t.length?p():new r(t,i,e)}},function(t,n,e){"use strict";function i(t,n){var e=this;r.call(this),this._buffers=l(t,function(t){return p(t)?_(t):[]}),this._sources=l(t,function(t){return p(t)?m():t}),this._combinator=n?v(n,this._sources.length):function(t){return t},this._aliveCount=0,this._$handlers=[];for(var i=function(t){e._$handlers.push(function(n){return e._handleAny(t,n)})},s=0;s<this._sources.length;s++)i(s)}var r=e(2),s=e(79),u=s.VALUE,o=s.ERROR,a=s.END,c=e(78),h=c.inherit,f=e(81),l=f.map,_=f.cloneArray,d=e(86),v=d.spread,m=e(4),p=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};h(i,r,{_name:"zip",_onActivation:function(){for(;this._isFull();)this._emit();var t=this._sources.length;this._aliveCount=t;for(var n=0;t>n&&this._active;n++)this._sources[n].onAny(this._$handlers[n])},_onDeactivation:function(){for(var t=0;t<this._sources.length;t++)this._sources[t].offAny(this._$handlers[t])},_emit:function(){for(var t=new Array(this._buffers.length),n=0;n<this._buffers.length;n++)t[n]=this._buffers[n].shift();var e=this._combinator;this._emitValue(e(t))},_isFull:function(){for(var t=0;t<this._buffers.length;t++)if(0===this._buffers[t].length)return!1;return!0},_handleAny:function(t,n){n.type===u&&(this._buffers[t].push(n.value),this._isFull()&&this._emit()),n.type===o&&this._emitError(n.value),n.type===a&&(this._aliveCount--,0===this._aliveCount&&this._emitEnd())},_clear:function(){r.prototype._clear.call(this),this._sources=null,this._buffers=null,this._combinator=null,this._$handlers=null}}),t.exports=function(t,n){return 0===t.length?m():new i(t,n)}},function(t,n,e){"use strict";function i(t){u.call(this),this._addAll(t),this._initialised=!0}var r=e(78),s=r.inherit,u=e(87),o=e(4);s(i,u,{_name:"merge",_onEmpty:function(){this._initialised&&this._emitEnd()}}),t.exports=function(t){return 0===t.length?o():new i(t)}},function(t,n,e){"use strict";var i=e(52);t.exports=function(t){return i(function(n){return t.length>n?t[n]:!1}).setName("concat")}},function(t,n,e){"use strict";function i(){u.call(this)}var r=e(78),s=r.inherit,u=e(87);s(i,u,{_name:"pool",plug:function(t){return this._add(t),this},unplug:function(t){return this._remove(t),this}}),t.exports=i},function(t,n,e){"use strict";function i(t){var n=this;u.call(this),this._generator=t,this._source=null,this._inLoop=!1,this._iteration=0,this._$handleAny=function(t){return n._handleAny(t)}}var r=e(78),s=r.inherit,u=e(2),o=e(79),a=o.END; | ||
for(var t=this._generator;null===this._source&&this._alive&&this._active;)this._source=t(this._iteration++),this._source?this._source.onAny(this._$handleAny):this._emitEnd();this._inLoop=!1}},_onActivation:function(){this._source?this._source.onAny(this._$handleAny):this._getSource()},_onDeactivation:function(){this._source&&this._source.offAny(this._$handleAny)},_clear:function(){u.prototype._clear.call(this),this._generator=null,this._source=null,this._$handleAny=null}}),t.exports=function(t){return new i(t)}},function(t,n,e){"use strict";function i(t,n,e){var i=this;h.call(this,e),this._source=t,this._fn=n,this._mainEnded=!1,this._lastCurrent=null,this._$handleMain=function(t){return i._handleMain(t)}}var r=e(79),s=r.VALUE,u=r.ERROR,o=r.END,a=e(78),c=a.inherit,h=e(87);c(i,h,{_onActivation:function(){h.prototype._onActivation.call(this),this._active&&this._source.onAny(this._$handleMain)},_onDeactivation:function(){h.prototype._onDeactivation.call(this),this._source.offAny(this._$handleMain),this._hadNoEvSinceDeact=!0},_handleMain:function(t){if(t.type===s){var n=this._activating&&this._hadNoEvSinceDeact&&this._lastCurrent===t.value;n||this._add(t.value,this._fn),this._lastCurrent=t.value,this._hadNoEvSinceDeact=!1}t.type===u&&this._emitError(t.value),t.type===o&&(this._isEmpty()?this._emitEnd():this._mainEnded=!0)},_onEmpty:function(){this._mainEnded&&this._emitEnd()},_clear:function(){h.prototype._clear.call(this),this._source=null,this._lastCurrent=null,this._$handleMain=null}}),t.exports=i},function(t,n,e){"use strict";function i(t,n){h.call(this,t,n)}var r=e(79),s=r.VALUE,u=r.ERROR,o=r.END,a=e(78),c=a.inherit,h=e(53);c(i,h,{_handleMain:function(t){if(t.type===u){var n=this._activating&&this._hadNoEvSinceDeact&&this._lastCurrent===t.value;n||this._add(t.value,this._fn),this._lastCurrent=t.value,this._hadNoEvSinceDeact=!1}t.type===s&&this._emitValue(t.value),t.type===o&&(this._isEmpty()?this._emitEnd():this._mainEnded=!0)}}),t.exports=i},function(t,n,e){"use strict";var i=e(88),r=i.createStream,s=i.createProperty,u=e(79),o=u.NOTHING,a={_handlePrimaryValue:function(t){this._lastSecondary!==o&&this._lastSecondary&&this._emitValue(t)},_handleSecondaryEnd:function(){this._lastSecondary!==o&&this._lastSecondary||this._emitEnd()}},c=r("filterBy",a),h=s("filterBy",a);t.exports=function(t,n){return new(t.ofSameType(c,h))(t,n)}},function(t,n,e){"use strict";var i=e(47),r=function(t,n){return n};t.exports=function(t,n,e){var s=e?function(t,n){return e(n,t)}:r;return i([n],[t],s).setName(t,"sampledBy")}},function(t,n,e){"use strict";var i=e(88),r=i.createStream,s=i.createProperty,u=e(79),o=u.NOTHING,a={_handlePrimaryValue:function(t){this._lastSecondary!==o&&this._emitValue(t)},_handleSecondaryValue:function(t){this._lastSecondary=t,this._lastSecondary||this._emitEnd()},_handleSecondaryEnd:function(){this._lastSecondary===o&&this._emitEnd()}},c=r("takeWhileBy",a),h=s("takeWhileBy",a);t.exports=function(t,n){return new(t.ofSameType(c,h))(t,n)}},function(t,n,e){"use strict";var i=e(88),r=i.createStream,s=i.createProperty,u={_init:function(){this._hasFalseyFromSecondary=!1},_handlePrimaryValue:function(t){this._hasFalseyFromSecondary&&this._emitValue(t)},_handleSecondaryValue:function(t){this._hasFalseyFromSecondary=this._hasFalseyFromSecondary||!t},_handleSecondaryEnd:function(){this._hasFalseyFromSecondary||this._emitEnd()}},o=r("skipWhileBy",u),a=s("skipWhileBy",u);t.exports=function(t,n){return new(t.ofSameType(o,a))(t,n)}},function(t,n,e){"use strict";var i=e(88),r=i.createStream,s=i.createProperty,u=e(79),o=u.NOTHING,a={_handlePrimaryValue:function(t){this._lastSecondary!==o&&this._emitValue(t)},_handleSecondaryEnd:function(){this._lastSecondary===o&&this._emitEnd()}},c=r("skipUntilBy",a),h=s("skipUntilBy",a);t.exports=function(t,n){return new(t.ofSameType(c,h))(t,n)}},function(t,n,e){"use strict";var i=e(88),r=i.createStream,s=i.createProperty,u={_handleSecondaryValue:function(t){this._emitEnd()}},o=r("takeUntilBy",u),a=s("takeUntilBy",u);t.exports=function(t,n){return new(t.ofSameType(o,a))(t,n)}},function(t,n,e){"use strict";var i=e(88),r=i.createStream,s=i.createProperty,u={_init:function(){var t=void 0===arguments[0]?{}:arguments[0],n=t.flushOnEnd,e=void 0===n?!0:n;this._buff=[],this._flushOnEnd=e},_free:function(){this._buff=null},_flush:function(){null!==this._buff&&0!==this._buff.length&&(this._emitValue(this._buff),this._buff=[])},_handlePrimaryEnd:function(){this._flushOnEnd&&this._flush(),this._emitEnd()},_onActivation:function(){this._primary.onAny(this._$handlePrimaryAny),this._alive&&null!==this._secondary&&this._secondary.onAny(this._$handleSecondaryAny)},_handlePrimaryValue:function(t){this._buff.push(t)},_handleSecondaryValue:function(t){this._flush()},_handleSecondaryEnd:function(t){this._flushOnEnd||this._emitEnd()}},o=r("bufferBy",u),a=s("bufferBy",u);t.exports=function(t,n,e){return new(t.ofSameType(o,a))(t,n,e)}},function(t,n,e){"use strict";var i=e(88),r=i.createStream,s=i.createProperty,u=e(79),o=u.NOTHING,a={_init:function(){var t=void 0===arguments[0]?{}:arguments[0],n=t.flushOnEnd,e=void 0===n?!0:n;this._buff=[],this._flushOnEnd=e},_free:function(){this._buff=null},_flush:function(){null!==this._buff&&0!==this._buff.length&&(this._emitValue(this._buff),this._buff=[])},_handlePrimaryEnd:function(){this._flushOnEnd&&this._flush(),this._emitEnd()},_handlePrimaryValue:function(t){this._buff.push(t),this._lastSecondary===o||this._lastSecondary||this._flush()},_handleSecondaryEnd:function(t){this._flushOnEnd||this._lastSecondary!==o&&!this._lastSecondary||this._emitEnd()}},c=r("bufferWhileBy",a),h=s("bufferWhileBy",a);t.exports=function(t,n,e){return new(t.ofSameType(c,h))(t,n,e)}},function(t,n,e){"use strict";var i=e(49),r=e(20),s=e(27),u=e(17),o=function(){return!1},a=function(){return!0};t.exports=function(t,n){var e=i([r(t,a),r(n,o)]);return e=s(e),e=u(e,o),e.setName(t,"awaiting")}},function(t,n,e){"use strict";function i(){u.call(this)}var r=e(78),s=r.inherit,u=e(2);s(i,u,{_name:"emitter",emit:function(t){return this._emitValue(t),this},error:function(t){return this._emitError(t),this},end:function(){return this._emitEnd(),this},emitEvent:function(t){this._emit(t.type,t.value)}}),t.exports=i},function(t,n,e){"use strict";function i(){u.call(this)}var r=e(78),s=r.inherit,u=e(87);s(i,u,{_name:"bus",plug:function(t){return this._add(t),this},unplug:function(t){return this._remove(t),this},emit:function(t){return this._emitValue(t),this},error:function(t){return this._emitError(t),this},end:function(){return this._emitEnd(),this},emitEvent:function(t){this._emit(t.type,t.value)}}),t.exports=i},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u=e(79),o=u.NOTHING,a={_init:function(t){var n=t.fn,e=t.seed;this._fn=n,this._result=e},_free:function(){this._fn=null,this._result=null},_handleValue:function(t){var n=this._fn;this._result=this._result===o?t:n(this._result,t)},_handleEnd:function(){this._result!==o&&this._emitValue(this._result),this._emitEnd()}},c=r("reduce",a),h=s("reduce",a);t.exports=function(t,n){var e=void 0===arguments[2]?o:arguments[2];return new(t.ofSameType(c,h))(t,{fn:n,seed:e})}},function(t,n,e){"use strict";var i=e(47),r=e(86),s=r.apply,u=e(81),o=u.circleShift;t.exports=function(t,n,e){var r=e;return t.length>0&&(r=function(){var n=o(arguments,t.length);return e?s(e,null,n):n}),i(n,t,r).setName("sampledBy")}},function(t,n,e){"use strict";var i=e(82),r=e(81),s=r.cloneArray,u=i({_name:"repeatedly",_init:function(t){var n=t.xs;this._xs=s(n),this._i=-1},_onTick:function(){this._xs.length>0&&(this._i=(this._i+1)%this._xs.length,this._emitValue(this._xs[this._i]))}});t.exports=function(t,n){return new u(t,{xs:n})}},function(t,n,e){"use strict";var i=e(20);t.exports=function(t,n){return i(t,function(){return n}).setName(t,"mapTo")}},function(t,n,e){"use strict";var i=e(20);t.exports=function(t,n){return i(t,function(t){return n(t),t}).setName(t,"tap")}},function(t,n,e){"use strict";var i=e(20);t.exports=function(t,n){return i(t,function(t){return t[n]}).setName(t,"pluck")}},function(t,n,e){"use strict";var i=e(20),r=e(86),s=r.apply;t.exports=function(t,n,e){var r=0===e.length?function(t){return t[n]()}:function(t){return s(t[n],t,e)};return i(t,r).setName(t,"invoke")}},function(t,n,e){"use strict";var i=e(20),r=e(85);t.exports=function(t){return i(t,function(t){return{value:t,time:r()}}).setName(t,"timestamp")}},function(t,n,e){"use strict";function i(){var t=void 0;for(t=0;t<arguments.length;t++)if(!arguments[t])return arguments[t];return arguments[t-1]}var r=e(47);t.exports=function(t){return r(t,[],i).setName("and")}},function(t,n,e){"use strict";function i(){var t=void 0;for(t=0;t<arguments.length;t++)if(arguments[t])return arguments[t];return arguments[t-1]}var r=e(47);t.exports=function(t){return r(t,[],i).setName("or")}},function(t,n,e){"use strict";var i=e(20);t.exports=function(t){return i(t,function(t){return!t}).setName(t,"not")}},function(t,n,e){"use strict";var i=e(13),r=e(86),s=r.apply;t.exports=function(t,n,e){return i(function(i){var r=e?function(){i.emit(s(e,this,arguments))}:i.emit;return t(r),function(){return n(r)}}).setName("fromSubUnsub")}},function(t,n,e){"use strict";function i(t){var n=function(){};return n.prototype=t,new n}function r(t){var n=arguments.length,e=void 0,i=void 0;for(e=1;n>e;e++)for(i in arguments[e])t[i]=arguments[e][i];return t}function s(t,n){var e=arguments.length,s=void 0;for(t.prototype=i(n.prototype),t.prototype.constructor=t,s=2;e>s;s++)r(t.prototype,arguments[s]);return t}t.exports={extend:r,inherit:s}},function(t,n,e){"use strict";n.NOTHING=["<nothing>"],n.END="end",n.VALUE="value",n.ERROR="error",n.ANY="any"},function(t,n,e){"use strict";function i(t,n,e){t===h?n(e):t===e.type&&(t===a||t===c?n(e.value):n())}function r(){this._items=[]}var s=e(78),u=s.extend,o=e(79),a=o.VALUE,c=o.ERROR,h=o.ANY,f=e(81),l=f.concat,_=f.removeByPred;u(r.prototype,{add:function(t,n){return this._items=l(this._items,[{type:t,fn:n}]),this._items.length},remove:function(t,n){return this._items=_(this._items,function(e){return e.type===t&&e.fn===n}),this._items.length},dispatch:function(t){for(var n=0,e=this._items;n<e.length;n++)i(e[n].type,e[n].fn,t)}}),t.exports={callSubscriber:i,Dispatcher:r}},function(t,n,e){"use strict";function i(t,n){var e=void 0,i=void 0,r=void 0,s=void 0;if(0===t.length)return n;if(0===n.length)return t;for(s=0,e=new Array(t.length+n.length),i=t.length,r=0;i>r;r++,s++)e[s]=t[r];for(i=n.length,r=0;i>r;r++,s++)e[s]=n[r];return e}function r(t,n){var e=t.length,i=new Array(e),r=void 0;for(r=0;e>r;r++)i[(r+n)%e]=t[r];return i}function s(t,n){var e=t.length,i=void 0;for(i=0;e>i;i++)if(t[i]===n)return i;return-1}function u(t,n){var e=t.length,i=void 0;for(i=0;e>i;i++)if(n(t[i]))return i;return-1}function o(t){var n=t.length,e=new Array(n),i=void 0;for(i=0;n>i;i++)e[i]=t[i];return e}function a(t,n){var e=t.length,i=void 0,r=void 0,s=void 0;if(n>=0&&e>n){if(1===e)return[];for(i=new Array(e-1),r=0,s=0;e>r;r++)r!==n&&(i[s]=t[r],s++);return i}return t}function c(t,n){return a(t,u(t,n))}function h(t,n){var e=t.length,i=new Array(e),r=void 0;for(r=0;e>r;r++)i[r]=n(t[r]);return i}function f(t,n){var e=t.length,i=void 0;for(i=0;e>i;i++)n(t[i])}function l(t,n){var e=t.length,i=void 0;for(i=0;e>i;i++)t[i]=n}function _(t,n){return-1!==s(t,n)}function d(t,n,e){var i=Math.min(e,t.length+1),r=t.length-i+1,s=new Array(i),u=void 0;for(u=r;i>u;u++)s[u-r]=t[u];return s[i-1]=n,s}t.exports={concat:i,circleShift:r,find:s,findByPred:u,cloneArray:o,remove:a,removeByPred:c,map:h,forEach:f,fillArray:l,contains:_,slide:d}},function(t,n,e){"use strict";var i=e(78),r=i.inherit,s=e(2);t.exports=function(t){function n(t,n){var e=this;s.call(this),this._wait=t,this._intervalId=null,this._$onTick=function(){return e._onTick()},this._init(n)}return r(n,s,{_init:function(t){},_free:function(){},_onTick:function(){},_onActivation:function(){this._intervalId=setInterval(this._$onTick,this._wait)},_onDeactivation:function(){null!==this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null)},_clear:function(){s.prototype._clear.call(this),this._$onTick=null,this._free()}},t),n}},function(t,n,e){"use strict";t.exports=function(t){return{emit:function(n){return t._emitValue(n)},error:function(n){return t._emitError(n)},end:function(){return t._emitEnd()},emitEvent:function(n){return t._emit(n.type,n.value)}}}},function(t,n,e){"use strict";function i(t,n){return function(e,i){var r=this;t.call(this),this._source=e,this._name=""+e._name+"."+n,this._init(i),this._$handleAny=function(t){return r._handleAny(t)}}}function r(t){return{_init:function(t){},_free:function(){},_handleValue:function(t){this._emitValue(t)},_handleError:function(t){this._emitError(t)},_handleEnd:function(){this._emitEnd()},_handleAny:function(t){switch(t.type){case l:return this._handleValue(t.value);case _:return this._handleError(t.value);case d:return this._handleEnd()}},_onActivation:function(){this._source.onAny(this._$handleAny)},_onDeactivation:function(){this._source.offAny(this._$handleAny)},_clear:function(){t.prototype._clear.call(this),this._source=null,this._$handleAny=null,this._free()}}}function s(t,n){var e=i(o,t);return h(e,o,r(o),n),e}function u(t,n){var e=i(a,t);return h(e,a,r(a),n),e}var o=e(2),a=e(3),c=e(78),h=c.inherit,f=e(79),l=f.VALUE,_=f.ERROR,d=f.END;t.exports={createStream:s,createProperty:u}},function(t,n,e){"use strict";t.exports=Date.now?function(){return Date.now()}:function(){return(new Date).getTime()}},function(t,n,e){"use strict";function i(t,n){switch(n){case 0:return function(n){return t()};case 1:return function(n){return t(n[0])};case 2:return function(n){return t(n[0],n[1])};case 3:return function(n){return t(n[0],n[1],n[2])};case 4:return function(n){return t(n[0],n[1],n[2],n[3])};default:return function(n){return t.apply(null,n)}}}function r(t,n,e){var i=e?e.length:0;if(null==n)switch(i){case 0:return t();case 1:return t(e[0]);case 2:return t(e[0],e[1]);case 3:return t(e[0],e[1],e[2]);case 4:return t(e[0],e[1],e[2],e[3]);default:return t.apply(null,e)}else switch(i){case 0:return t.call(n);default:return t.apply(n,e)}}t.exports={spread:i,apply:r}},function(t,n,e){"use strict";function i(){var t=this,n=void 0===arguments[0]?{}:arguments[0],e=n.queueLim,i=void 0===e?0:e,s=n.concurLim,u=void 0===s?-1:s,o=n.drop,a=void 0===o?"new":o;r.call(this),this._queueLim=0>i?-1:i,this._concurLim=0>u?-1:u,this._drop=a,this._queue=[],this._curSources=[],this._$handleSubAny=function(n){return t._handleSubAny(n)},this._$endHandlers=[],this._currentlyAdding=null,0===this._concurLim&&this._emitEnd()}var r=e(2),s=e(79),u=s.VALUE,o=s.ERROR,a=e(78),c=a.inherit,h=e(81),f=h.concat,l=h.forEach,_=h.findByPred,d=h.find,v=h.remove,m=h.cloneArray,p=function(t){return t};c(i,r,{_name:"abstractPool",_add:function(t,n){n=n||p,-1===this._concurLim||this._curSources.length<this._concurLim?this._addToCur(n(t)):-1===this._queueLim||this._queue.length<this._queueLim?this._addToQueue(n(t)):"old"===this._drop&&(this._removeOldest(),this._add(t,n))},_addAll:function(t){var n=this;l(t,function(t){return n._add(t)})},_remove:function(t){-1===this._removeCur(t)&&this._removeQueue(t)},_addToQueue:function(t){this._queue=f(this._queue,[t])},_addToCur:function(t){this._active?(this._currentlyAdding=t,t.onAny(this._$handleSubAny),this._currentlyAdding=null,t._alive&&(this._curSources=f(this._curSources,[t]),this._active&&this._subToEnd(t))):this._curSources=f(this._curSources,[t])},_subToEnd:function(t){var n=this,e=function(){return n._removeCur(t)};this._$endHandlers.push({obs:t,handler:e}),t.onEnd(e)},_subscribe:function(t){t.onAny(this._$handleSubAny),this._active&&this._subToEnd(t)},_unsubscribe:function(t){t.offAny(this._$handleSubAny);var n=_(this._$endHandlers,function(n){return n.obs===t});-1!==n&&(t.offEnd(this._$endHandlers[n].handler),this._$endHandlers.splice(n,1))},_handleSubAny:function(t){(t.type===u||t.type===o)&&this._emit(t.type,t.value)},_removeQueue:function(t){var n=d(this._queue,t);return this._queue=v(this._queue,n),n},_removeCur:function(t){this._active&&this._unsubscribe(t);var n=d(this._curSources,t);return this._curSources=v(this._curSources,n),-1!==n&&(0!==this._queue.length?this._pullQueue():0===this._curSources.length&&this._onEmpty()),n},_removeOldest:function(){this._removeCur(this._curSources[0])},_pullQueue:function(){0!==this._queue.length&&(this._queue=m(this._queue),this._addToCur(this._queue.shift()))},_onActivation:function(){for(var t=0,n=this._curSources;t<n.length&&this._active;t++)this._subscribe(n[t])},_onDeactivation:function(){for(var t=0,n=this._curSources;t<n.length;t++)this._unsubscribe(n[t]);null!==this._currentlyAdding&&this._unsubscribe(this._currentlyAdding)},_isEmpty:function(){return 0===this._curSources.length},_onEmpty:function(){},_clear:function(){r.prototype._clear.call(this),this._queue=null,this._curSources=null,this._$handleSubAny=null,this._$endHandlers=null}}),t.exports=i},function(t,n,e){"use strict";function i(t,n){return function(e,i,r){var s=this;t.call(this),this._primary=e,this._secondary=i,this._name=""+e._name+"."+n,this._lastSecondary=v,this._$handleSecondaryAny=function(t){return s._handleSecondaryAny(t)},this._$handlePrimaryAny=function(t){return s._handlePrimaryAny(t)},this._init(r)}}function r(t){return{_init:function(t){},_free:function(){},_handlePrimaryValue:function(t){this._emitValue(t)},_handlePrimaryError:function(t){this._emitError(t)},_handlePrimaryEnd:function(){this._emitEnd()},_handleSecondaryValue:function(t){this._lastSecondary=t},_handleSecondaryError:function(t){this._emitError(t)},_handleSecondaryEnd:function(){},_handlePrimaryAny:function(t){switch(t.type){case l:return this._handlePrimaryValue(t.value);case _:return this._handlePrimaryError(t.value);case d:return this._handlePrimaryEnd(t.value)}},_handleSecondaryAny:function(t){switch(t.type){case l:return this._handleSecondaryValue(t.value);case _:return this._handleSecondaryError(t.value);case d:this._handleSecondaryEnd(t.value),this._removeSecondary()}},_removeSecondary:function(){null!==this._secondary&&(this._secondary.offAny(this._$handleSecondaryAny),this._$handleSecondaryAny=null,this._secondary=null)},_onActivation:function(){null!==this._secondary&&this._secondary.onAny(this._$handleSecondaryAny),this._active&&this._primary.onAny(this._$handlePrimaryAny)},_onDeactivation:function(){null!==this._secondary&&this._secondary.offAny(this._$handleSecondaryAny),this._primary.offAny(this._$handlePrimaryAny)},_clear:function(){t.prototype._clear.call(this),this._primary=null,this._secondary=null,this._lastSecondary=null,this._$handleSecondaryAny=null,this._$handlePrimaryAny=null,this._free()}}}function s(t,n){var e=i(o,t);return h(e,o,r(o),n),e}function u(t,n){var e=i(a,t);return h(e,a,r(a),n),e}var o=e(2),a=e(3),c=e(78),h=c.inherit,f=e(79),l=f.VALUE,_=f.ERROR,d=f.END,v=f.NOTHING;t.exports={createStream:s,createProperty:u}}])}); | ||
s(i,u,{_name:"repeat",_handleAny:function(t){t.type===a?(this._source=null,this._getSource()):this._emit(t.type,t.value)},_getSource:function(){if(!this._inLoop){this._inLoop=!0;for(var t=this._generator;null===this._source&&this._alive&&this._active;)this._source=t(this._iteration++),this._source?this._source.onAny(this._$handleAny):this._emitEnd();this._inLoop=!1}},_onActivation:function(){this._source?this._source.onAny(this._$handleAny):this._getSource()},_onDeactivation:function(){this._source&&this._source.offAny(this._$handleAny)},_clear:function(){u.prototype._clear.call(this),this._generator=null,this._source=null,this._$handleAny=null}}),t.exports=function(t){return new i(t)}},function(t,n,e){"use strict";function i(t,n,e){var i=this;h.call(this,e),this._source=t,this._fn=n,this._mainEnded=!1,this._lastCurrent=null,this._$handleMain=function(t){return i._handleMain(t)}}var r=e(79),s=r.VALUE,u=r.ERROR,o=r.END,a=e(78),c=a.inherit,h=e(87);c(i,h,{_onActivation:function(){h.prototype._onActivation.call(this),this._active&&this._source.onAny(this._$handleMain)},_onDeactivation:function(){h.prototype._onDeactivation.call(this),this._source.offAny(this._$handleMain),this._hadNoEvSinceDeact=!0},_handleMain:function(t){if(t.type===s){var n=this._activating&&this._hadNoEvSinceDeact&&this._lastCurrent===t.value;n||this._add(t.value,this._fn),this._lastCurrent=t.value,this._hadNoEvSinceDeact=!1}t.type===u&&this._emitError(t.value),t.type===o&&(this._isEmpty()?this._emitEnd():this._mainEnded=!0)},_onEmpty:function(){this._mainEnded&&this._emitEnd()},_clear:function(){h.prototype._clear.call(this),this._source=null,this._lastCurrent=null,this._$handleMain=null}}),t.exports=i},function(t,n,e){"use strict";function i(t,n){h.call(this,t,n)}var r=e(79),s=r.VALUE,u=r.ERROR,o=r.END,a=e(78),c=a.inherit,h=e(53);c(i,h,{_handleMain:function(t){if(t.type===u){var n=this._activating&&this._hadNoEvSinceDeact&&this._lastCurrent===t.value;n||this._add(t.value,this._fn),this._lastCurrent=t.value,this._hadNoEvSinceDeact=!1}t.type===s&&this._emitValue(t.value),t.type===o&&(this._isEmpty()?this._emitEnd():this._mainEnded=!0)}}),t.exports=i},function(t,n,e){"use strict";var i=e(88),r=i.createStream,s=i.createProperty,u=e(79),o=u.NOTHING,a={_handlePrimaryValue:function(t){this._lastSecondary!==o&&this._lastSecondary&&this._emitValue(t)},_handleSecondaryEnd:function(){this._lastSecondary!==o&&this._lastSecondary||this._emitEnd()}},c=r("filterBy",a),h=s("filterBy",a);t.exports=function(t,n){return new(t._ofSameType(c,h))(t,n)}},function(t,n,e){"use strict";var i=e(47),r=function(t,n){return n};t.exports=function(t,n,e){var s=e?function(t,n){return e(n,t)}:r;return i([n],[t],s).setName(t,"sampledBy")}},function(t,n,e){"use strict";var i=e(88),r=i.createStream,s=i.createProperty,u=e(79),o=u.NOTHING,a={_handlePrimaryValue:function(t){this._lastSecondary!==o&&this._emitValue(t)},_handleSecondaryEnd:function(){this._lastSecondary===o&&this._emitEnd()}},c=r("skipUntilBy",a),h=s("skipUntilBy",a);t.exports=function(t,n){return new(t._ofSameType(c,h))(t,n)}},function(t,n,e){"use strict";var i=e(88),r=i.createStream,s=i.createProperty,u={_handleSecondaryValue:function(t){this._emitEnd()}},o=r("takeUntilBy",u),a=s("takeUntilBy",u);t.exports=function(t,n){return new(t._ofSameType(o,a))(t,n)}},function(t,n,e){"use strict";var i=e(88),r=i.createStream,s=i.createProperty,u={_init:function(){var t=void 0===arguments[0]?{}:arguments[0],n=t.flushOnEnd,e=void 0===n?!0:n;this._buff=[],this._flushOnEnd=e},_free:function(){this._buff=null},_flush:function(){null!==this._buff&&0!==this._buff.length&&(this._emitValue(this._buff),this._buff=[])},_handlePrimaryEnd:function(){this._flushOnEnd&&this._flush(),this._emitEnd()},_onActivation:function(){this._primary.onAny(this._$handlePrimaryAny),this._alive&&null!==this._secondary&&this._secondary.onAny(this._$handleSecondaryAny)},_handlePrimaryValue:function(t){this._buff.push(t)},_handleSecondaryValue:function(t){this._flush()},_handleSecondaryEnd:function(t){this._flushOnEnd||this._emitEnd()}},o=r("bufferBy",u),a=s("bufferBy",u);t.exports=function(t,n,e){return new(t._ofSameType(o,a))(t,n,e)}},function(t,n,e){"use strict";var i=e(88),r=i.createStream,s=i.createProperty,u=e(79),o=u.NOTHING,a={_init:function(){var t=void 0===arguments[0]?{}:arguments[0],n=t.flushOnEnd,e=void 0===n?!0:n;this._buff=[],this._flushOnEnd=e},_free:function(){this._buff=null},_flush:function(){null!==this._buff&&0!==this._buff.length&&(this._emitValue(this._buff),this._buff=[])},_handlePrimaryEnd:function(){this._flushOnEnd&&this._flush(),this._emitEnd()},_handlePrimaryValue:function(t){this._buff.push(t),this._lastSecondary===o||this._lastSecondary||this._flush()},_handleSecondaryEnd:function(t){this._flushOnEnd||this._lastSecondary!==o&&!this._lastSecondary||this._emitEnd()}},c=r("bufferWhileBy",a),h=s("bufferWhileBy",a);t.exports=function(t,n,e){return new(t._ofSameType(c,h))(t,n,e)}},function(t,n,e){"use strict";var i=e(49),r=e(20),s=e(27),u=e(17),o=function(){return!1},a=function(){return!0};t.exports=function(t,n){var e=i([r(t,a),r(n,o)]);return e=s(e),e=u(e,o),e.setName(t,"awaiting")}},function(t,n,e){"use strict";function i(){u.call(this)}var r=e(78),s=r.inherit,u=e(2);s(i,u,{_name:"emitter",emit:function(t){return this._emitValue(t),this},error:function(t){return this._emitError(t),this},end:function(){return this._emitEnd(),this},emitEvent:function(t){this._emit(t.type,t.value)}}),t.exports=i},function(t,n,e){"use strict";function i(){u.call(this)}var r=e(78),s=r.inherit,u=e(87);s(i,u,{_name:"bus",plug:function(t){return this._add(t),this},unplug:function(t){return this._remove(t),this},emit:function(t){return this._emitValue(t),this},error:function(t){return this._emitError(t),this},end:function(){return this._emitEnd(),this},emitEvent:function(t){this._emit(t.type,t.value)}}),t.exports=i},function(t,n,e){"use strict";var i=e(84),r=i.createStream,s=i.createProperty,u=e(79),o=u.NOTHING,a={_init:function(t){var n=t.fn,e=t.seed;this._fn=n,this._result=e},_free:function(){this._fn=null,this._result=null},_handleValue:function(t){var n=this._fn;this._result=this._result===o?t:n(this._result,t)},_handleEnd:function(){this._result!==o&&this._emitValue(this._result),this._emitEnd()}},c=r("reduce",a),h=s("reduce",a);t.exports=function(t,n){var e=void 0===arguments[2]?o:arguments[2];return new(t._ofSameType(c,h))(t,{fn:n,seed:e})}},function(t,n,e){"use strict";var i=e(47),r=e(86),s=r.apply,u=e(81),o=u.circleShift;t.exports=function(t,n,e){var r=e;return t.length>0&&(r=function(){var n=o(arguments,t.length);return e?s(e,null,n):n}),i(n,t,r).setName("sampledBy")}},function(t,n,e){"use strict";var i=e(82),r=e(81),s=r.cloneArray,u=i({_name:"repeatedly",_init:function(t){var n=t.xs;this._xs=s(n),this._i=-1},_onTick:function(){this._xs.length>0&&(this._i=(this._i+1)%this._xs.length,this._emitValue(this._xs[this._i]))}});t.exports=function(t,n){return new u(t,{xs:n})}},function(t,n,e){"use strict";var i=e(20);t.exports=function(t,n){return i(t,function(){return n}).setName(t,"mapTo")}},function(t,n,e){"use strict";var i=e(20);t.exports=function(t,n){return i(t,function(t){return n(t),t}).setName(t,"tap")}},function(t,n,e){"use strict";var i=e(20);t.exports=function(t,n){return i(t,function(t){return t[n]}).setName(t,"pluck")}},function(t,n,e){"use strict";var i=e(20),r=e(86),s=r.apply;t.exports=function(t,n,e){var r=0===e.length?function(t){return t[n]()}:function(t){return s(t[n],t,e)};return i(t,r).setName(t,"invoke")}},function(t,n,e){"use strict";var i=e(20),r=e(85);t.exports=function(t){return i(t,function(t){return{value:t,time:r()}}).setName(t,"timestamp")}},function(t,n,e){"use strict";function i(){var t=void 0;for(t=0;t<arguments.length;t++)if(!arguments[t])return arguments[t];return arguments[t-1]}var r=e(47);t.exports=function(t){return r(t,[],i).setName("and")}},function(t,n,e){"use strict";function i(){var t=void 0;for(t=0;t<arguments.length;t++)if(arguments[t])return arguments[t];return arguments[t-1]}var r=e(47);t.exports=function(t){return r(t,[],i).setName("or")}},function(t,n,e){"use strict";var i=e(20);t.exports=function(t){return i(t,function(t){return!t}).setName(t,"not")}},function(t,n,e){"use strict";var i=e(13),r=e(86),s=r.apply;t.exports=function(t,n,e){return i(function(i){var r=e?function(){i.emit(s(e,this,arguments))}:i.emit;return t(r),function(){return n(r)}}).setName("fromSubUnsub")}},function(t,n,e){"use strict";var i=e(88),r=i.createStream,s=i.createProperty,u=e(79),o=u.NOTHING,a={_handlePrimaryValue:function(t){this._lastSecondary!==o&&this._emitValue(t)},_handleSecondaryValue:function(t){this._lastSecondary=t,this._lastSecondary||this._emitEnd()},_handleSecondaryEnd:function(){this._lastSecondary===o&&this._emitEnd()}},c=r("takeWhileBy",a),h=s("takeWhileBy",a);t.exports=function(t,n){return new(t._ofSameType(c,h))(t,n)}},function(t,n,e){"use strict";var i=e(88),r=i.createStream,s=i.createProperty,u={_init:function(){this._hasFalseyFromSecondary=!1},_handlePrimaryValue:function(t){this._hasFalseyFromSecondary&&this._emitValue(t)},_handleSecondaryValue:function(t){this._hasFalseyFromSecondary=this._hasFalseyFromSecondary||!t},_handleSecondaryEnd:function(){this._hasFalseyFromSecondary||this._emitEnd()}},o=r("skipWhileBy",u),a=s("skipWhileBy",u);t.exports=function(t,n){return new(t._ofSameType(o,a))(t,n)}},function(t,n,e){"use strict";function i(t){var n=function(){};return n.prototype=t,new n}function r(t){var n=arguments.length,e=void 0,i=void 0;for(e=1;n>e;e++)for(i in arguments[e])t[i]=arguments[e][i];return t}function s(t,n){var e=arguments.length,s=void 0;for(t.prototype=i(n.prototype),t.prototype.constructor=t,s=2;e>s;s++)r(t.prototype,arguments[s]);return t}t.exports={extend:r,inherit:s}},function(t,n,e){"use strict";n.NOTHING=["<nothing>"],n.END="end",n.VALUE="value",n.ERROR="error",n.ANY="any"},function(t,n,e){"use strict";function i(t,n,e){t===h?n(e):t===e.type&&(t===a||t===c?n(e.value):n())}function r(){this._items=[]}var s=e(78),u=s.extend,o=e(79),a=o.VALUE,c=o.ERROR,h=o.ANY,f=e(81),l=f.concat,_=f.removeByPred;u(r.prototype,{add:function(t,n){return this._items=l(this._items,[{type:t,fn:n}]),this._items.length},remove:function(t,n){return this._items=_(this._items,function(e){return e.type===t&&e.fn===n}),this._items.length},dispatch:function(t){for(var n=0,e=this._items;n<e.length;n++)i(e[n].type,e[n].fn,t)}}),t.exports={callSubscriber:i,Dispatcher:r}},function(t,n,e){"use strict";function i(t,n){var e=void 0,i=void 0,r=void 0,s=void 0;if(0===t.length)return n;if(0===n.length)return t;for(s=0,e=new Array(t.length+n.length),i=t.length,r=0;i>r;r++,s++)e[s]=t[r];for(i=n.length,r=0;i>r;r++,s++)e[s]=n[r];return e}function r(t,n){var e=t.length,i=new Array(e),r=void 0;for(r=0;e>r;r++)i[(r+n)%e]=t[r];return i}function s(t,n){var e=t.length,i=void 0;for(i=0;e>i;i++)if(t[i]===n)return i;return-1}function u(t,n){var e=t.length,i=void 0;for(i=0;e>i;i++)if(n(t[i]))return i;return-1}function o(t){var n=t.length,e=new Array(n),i=void 0;for(i=0;n>i;i++)e[i]=t[i];return e}function a(t,n){var e=t.length,i=void 0,r=void 0,s=void 0;if(n>=0&&e>n){if(1===e)return[];for(i=new Array(e-1),r=0,s=0;e>r;r++)r!==n&&(i[s]=t[r],s++);return i}return t}function c(t,n){return a(t,u(t,n))}function h(t,n){var e=t.length,i=new Array(e),r=void 0;for(r=0;e>r;r++)i[r]=n(t[r]);return i}function f(t,n){var e=t.length,i=void 0;for(i=0;e>i;i++)n(t[i])}function l(t,n){var e=t.length,i=void 0;for(i=0;e>i;i++)t[i]=n}function _(t,n){return-1!==s(t,n)}function d(t,n,e){var i=Math.min(e,t.length+1),r=t.length-i+1,s=new Array(i),u=void 0;for(u=r;i>u;u++)s[u-r]=t[u];return s[i-1]=n,s}t.exports={concat:i,circleShift:r,find:s,findByPred:u,cloneArray:o,remove:a,removeByPred:c,map:h,forEach:f,fillArray:l,contains:_,slide:d}},function(t,n,e){"use strict";var i=e(78),r=i.inherit,s=e(2);t.exports=function(t){function n(t,n){var e=this;s.call(this),this._wait=t,this._intervalId=null,this._$onTick=function(){return e._onTick()},this._init(n)}return r(n,s,{_init:function(t){},_free:function(){},_onTick:function(){},_onActivation:function(){this._intervalId=setInterval(this._$onTick,this._wait)},_onDeactivation:function(){null!==this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null)},_clear:function(){s.prototype._clear.call(this),this._$onTick=null,this._free()}},t),n}},function(t,n,e){"use strict";t.exports=function(t){function n(n){return t._emitValue(n),t._active}function e(n){return t._emitError(n),t._active}function i(){return t._emitEnd(),t._active}function r(n){return t._emit(n.type,n.value),t._active}return{value:n,error:e,end:i,event:r,emit:n,emitEvent:r}}},function(t,n,e){"use strict";function i(t,n){return function(e,i){var r=this;t.call(this),this._source=e,this._name=""+e._name+"."+n,this._init(i),this._$handleAny=function(t){return r._handleAny(t)}}}function r(t){return{_init:function(t){},_free:function(){},_handleValue:function(t){this._emitValue(t)},_handleError:function(t){this._emitError(t)},_handleEnd:function(){this._emitEnd()},_handleAny:function(t){switch(t.type){case l:return this._handleValue(t.value);case _:return this._handleError(t.value);case d:return this._handleEnd()}},_onActivation:function(){this._source.onAny(this._$handleAny)},_onDeactivation:function(){this._source.offAny(this._$handleAny)},_clear:function(){t.prototype._clear.call(this),this._source=null,this._$handleAny=null,this._free()}}}function s(t,n){var e=i(o,t);return h(e,o,r(o),n),e}function u(t,n){var e=i(a,t);return h(e,a,r(a),n),e}var o=e(2),a=e(3),c=e(78),h=c.inherit,f=e(79),l=f.VALUE,_=f.ERROR,d=f.END;t.exports={createStream:s,createProperty:u}},function(t,n,e){"use strict";t.exports=Date.now?function(){return Date.now()}:function(){return(new Date).getTime()}},function(t,n,e){"use strict";function i(t,n){switch(n){case 0:return function(n){return t()};case 1:return function(n){return t(n[0])};case 2:return function(n){return t(n[0],n[1])};case 3:return function(n){return t(n[0],n[1],n[2])};case 4:return function(n){return t(n[0],n[1],n[2],n[3])};default:return function(n){return t.apply(null,n)}}}function r(t,n,e){var i=e?e.length:0;if(null==n)switch(i){case 0:return t();case 1:return t(e[0]);case 2:return t(e[0],e[1]);case 3:return t(e[0],e[1],e[2]);case 4:return t(e[0],e[1],e[2],e[3]);default:return t.apply(null,e)}else switch(i){case 0:return t.call(n);default:return t.apply(n,e)}}t.exports={spread:i,apply:r}},function(t,n,e){"use strict";function i(){var t=this,n=void 0===arguments[0]?{}:arguments[0],e=n.queueLim,i=void 0===e?0:e,s=n.concurLim,u=void 0===s?-1:s,o=n.drop,a=void 0===o?"new":o;r.call(this),this._queueLim=0>i?-1:i,this._concurLim=0>u?-1:u,this._drop=a,this._queue=[],this._curSources=[],this._$handleSubAny=function(n){return t._handleSubAny(n)},this._$endHandlers=[],this._currentlyAdding=null,0===this._concurLim&&this._emitEnd()}var r=e(2),s=e(79),u=s.VALUE,o=s.ERROR,a=e(78),c=a.inherit,h=e(81),f=h.concat,l=h.forEach,_=h.findByPred,d=h.find,v=h.remove,m=h.cloneArray,p=function(t){return t};c(i,r,{_name:"abstractPool",_add:function(t,n){n=n||p,-1===this._concurLim||this._curSources.length<this._concurLim?this._addToCur(n(t)):-1===this._queueLim||this._queue.length<this._queueLim?this._addToQueue(n(t)):"old"===this._drop&&(this._removeOldest(),this._add(t,n))},_addAll:function(t){var n=this;l(t,function(t){return n._add(t)})},_remove:function(t){-1===this._removeCur(t)&&this._removeQueue(t)},_addToQueue:function(t){this._queue=f(this._queue,[t])},_addToCur:function(t){if(this._active){if(!t._alive)return void(t._currentEvent&&this._emit(t._currentEvent.type,t._currentEvent.value));this._currentlyAdding=t,t.onAny(this._$handleSubAny),this._currentlyAdding=null,t._alive&&(this._curSources=f(this._curSources,[t]),this._active&&this._subToEnd(t))}else this._curSources=f(this._curSources,[t])},_subToEnd:function(t){var n=this,e=function(){return n._removeCur(t)};this._$endHandlers.push({obs:t,handler:e}),t.onEnd(e)},_subscribe:function(t){t.onAny(this._$handleSubAny),this._active&&this._subToEnd(t)},_unsubscribe:function(t){t.offAny(this._$handleSubAny);var n=_(this._$endHandlers,function(n){return n.obs===t});-1!==n&&(t.offEnd(this._$endHandlers[n].handler),this._$endHandlers.splice(n,1))},_handleSubAny:function(t){(t.type===u||t.type===o)&&this._emit(t.type,t.value)},_removeQueue:function(t){var n=d(this._queue,t);return this._queue=v(this._queue,n),n},_removeCur:function(t){this._active&&this._unsubscribe(t);var n=d(this._curSources,t);return this._curSources=v(this._curSources,n),-1!==n&&(0!==this._queue.length?this._pullQueue():0===this._curSources.length&&this._onEmpty()),n},_removeOldest:function(){this._removeCur(this._curSources[0])},_pullQueue:function(){0!==this._queue.length&&(this._queue=m(this._queue),this._addToCur(this._queue.shift()))},_onActivation:function(){for(var t=0,n=this._curSources;t<n.length&&this._active;t++)this._subscribe(n[t])},_onDeactivation:function(){for(var t=0,n=this._curSources;t<n.length;t++)this._unsubscribe(n[t]);null!==this._currentlyAdding&&this._unsubscribe(this._currentlyAdding)},_isEmpty:function(){return 0===this._curSources.length},_onEmpty:function(){},_clear:function(){r.prototype._clear.call(this),this._queue=null,this._curSources=null,this._$handleSubAny=null,this._$endHandlers=null}}),t.exports=i},function(t,n,e){"use strict";function i(t,n){return function(e,i,r){var s=this;t.call(this),this._primary=e,this._secondary=i,this._name=""+e._name+"."+n,this._lastSecondary=v,this._$handleSecondaryAny=function(t){return s._handleSecondaryAny(t)},this._$handlePrimaryAny=function(t){return s._handlePrimaryAny(t)},this._init(r)}}function r(t){return{_init:function(t){},_free:function(){},_handlePrimaryValue:function(t){this._emitValue(t)},_handlePrimaryError:function(t){this._emitError(t)},_handlePrimaryEnd:function(){this._emitEnd()},_handleSecondaryValue:function(t){this._lastSecondary=t},_handleSecondaryError:function(t){this._emitError(t)},_handleSecondaryEnd:function(){},_handlePrimaryAny:function(t){switch(t.type){case l:return this._handlePrimaryValue(t.value);case _:return this._handlePrimaryError(t.value);case d:return this._handlePrimaryEnd(t.value)}},_handleSecondaryAny:function(t){switch(t.type){case l:return this._handleSecondaryValue(t.value);case _:return this._handleSecondaryError(t.value);case d:this._handleSecondaryEnd(t.value),this._removeSecondary()}},_removeSecondary:function(){null!==this._secondary&&(this._secondary.offAny(this._$handleSecondaryAny),this._$handleSecondaryAny=null,this._secondary=null)},_onActivation:function(){null!==this._secondary&&this._secondary.onAny(this._$handleSecondaryAny),this._active&&this._primary.onAny(this._$handlePrimaryAny)},_onDeactivation:function(){null!==this._secondary&&this._secondary.offAny(this._$handleSecondaryAny),this._primary.offAny(this._$handlePrimaryAny)},_clear:function(){t.prototype._clear.call(this),this._primary=null,this._secondary=null,this._lastSecondary=null,this._$handleSecondaryAny=null,this._$handlePrimaryAny=null,this._free()}}}function s(t,n){var e=i(o,t);return h(e,o,r(o),n),e}function u(t,n){var e=i(a,t);return h(e,a,r(a),n),e}var o=e(2),a=e(3),c=e(78),h=c.inherit,f=e(79),l=f.VALUE,_=f.ERROR,d=f.END,v=f.NOTHING;t.exports={createStream:s,createProperty:u}}])}); |
{ | ||
"name": "kefir", | ||
"version": "2.4.1", | ||
"version": "2.5.0", | ||
"description": "Reactive Programming library for JavaScript inspired by Bacon.js and RxJS with focus on high performance and low memory usage", | ||
@@ -25,6 +25,6 @@ "main": "dist/kefir.js", | ||
"author": "Roman Pominov <rpominov@gmail.com>", | ||
"homepage": "https://github.com/pozadi/kefir", | ||
"homepage": "https://github.com/rpominov/kefir", | ||
"repository": { | ||
"type": "git", | ||
"url": "http://github.com/pozadi/kefir.git" | ||
"url": "http://github.com/rpominov/kefir.git" | ||
}, | ||
@@ -31,0 +31,0 @@ "license": "MIT", |
@@ -1,2 +0,2 @@ | ||
# <a href="http://pozadi.github.io/kefir/"><img src="http://pozadi.github.io/kefir/Kefir-with-bg.svg" width="60" height="60"></a> Kefir | ||
# <a href="http://rpominov.github.io/kefir/"><img src="http://rpominov.github.io/kefir/Kefir-with-bg.svg" width="60" height="60"></a> Kefir | ||
@@ -10,14 +10,14 @@ | ||
For docs visit [pozadi.github.io/kefir](http://pozadi.github.io/kefir). | ||
See also [Deprecated API docs](https://github.com/pozadi/kefir/blob/master/deprecated-api-docs.md). | ||
For docs visit [rpominov.github.io/kefir](http://rpominov.github.io/kefir). | ||
See also [Deprecated API docs](https://github.com/rpominov/kefir/blob/master/deprecated-api-docs.md). | ||
[![Build Status](https://travis-ci.org/pozadi/kefir.svg?branch=master)](https://travis-ci.org/pozadi/kefir) | ||
[![Dependency Status](https://david-dm.org/pozadi/kefir.svg)](https://david-dm.org/pozadi/kefir) | ||
[![devDependency Status](https://david-dm.org/pozadi/kefir/dev-status.svg)](https://david-dm.org/pozadi/kefir#info=devDependencies) | ||
[![Build Status](https://travis-ci.org/rpominov/kefir.svg?branch=master)](https://travis-ci.org/rpominov/kefir) | ||
[![Dependency Status](https://david-dm.org/rpominov/kefir.svg)](https://david-dm.org/rpominov/kefir) | ||
[![devDependency Status](https://david-dm.org/rpominov/kefir/dev-status.svg)](https://david-dm.org/rpominov/kefir#info=devDependencies) | ||
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pozadi/kefir?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) | ||
<!-- [![Code Climate](http://img.shields.io/codeclimate/github/pozadi/kefir.svg)](https://codeclimate.com/github/pozadi/kefir) --> | ||
<!-- [![Code Climate](http://img.shields.io/codeclimate/github/rpominov/kefir.svg)](https://codeclimate.com/github/rpominov/kefir) --> | ||
[Run tests in your browser](http://pozadi.github.io/kefir/test/in-browser/SpecRunner.html) (`gh-pages` branch, i.e. last stable version) | ||
[Run tests in your browser](http://rpominov.github.io/kefir/test/in-browser/SpecRunner.html) (`gh-pages` branch, i.e. last stable version) | ||
@@ -42,3 +42,3 @@ | ||
See [downloads](https://pozadi.github.io/kefir/#downloads) section in the docs. | ||
See [downloads](https://rpominov.github.io/kefir/#downloads) section in the docs. | ||
@@ -61,3 +61,3 @@ | ||
To run all memory tests (see [results](https://github.com/pozadi/kefir/blob/master/test/perf/memory-results.txt)): | ||
To run all memory tests (see [results](https://github.com/rpominov/kefir/blob/master/test/perf/memory-results.txt)): | ||
@@ -64,0 +64,0 @@ coffee --nodejs '--expose-gc' test/perf/memory-all.coffee |
Sorry, the diff of this file is too big to display
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
202263
4019