Comparing version 1.7.0 to 1.7.1
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.most={})}(this,function(t){"use strict";function e(t){this.source=t}function n(t,e){var n=e.length,i=new Array(n+1);i[0]=t;for(var r=0;r<n;++r)i[r+1]=e[r];return i}function i(t,e){for(var n=e.length,i=new Array(n+1),r=0;r<n;++r)i[r]=e[r];return i[n]=t,i}function r(t,e){if(t<0)throw new TypeError("n must be >= 0");var n=e.length;return 0===t||0===n?e:t>=n?[]:o(t,e,n-t)}function o(t,e,n){for(var i=new Array(n),r=0;r<n;++r)i[r]=e[t+r];return i}function s(t){return r(1,t)}function u(t,e){for(var n=e.length,i=new Array(n),r=0;r<n;++r)i[r]=t(e[r]);return i}function h(t,e,n){if(e<0)throw new TypeError("i must be >= 0");for(var i=n.length,r=new Array(i),o=0;o<i;++o)r[o]=e===o?t:n[o];return r}function p(t,e){if(t<0)throw new TypeError("i must be >= 0");var n=e.length;return 0===n||t>=n?e:1===n?[]:c(t,e,n-1)}function c(t,e,n){var i,r=new Array(n);for(i=0;i<t;++i)r[i]=e[i];for(i=t;i<n;++i)r[i]=e[i+1];return r}function f(t,e){for(var n=e.length,i=new Array(n),r=0,o=void 0,s=0;s<n;++s)t(o=e[s])||(i[r]=o,++r);return i.length=r,i}function a(t,e){for(var n=0,i=e.length;n<i;++n)if(t===e[n])return n;return-1}function d(t){return null!=t&&"number"==typeof t.length&&"function"!=typeof t}function l(t,e){this._dispose=t,this._data=e}function y(){this.disposable=void 0,this.disposed=!1,this._resolve=void 0;var t=this;this.result=new Promise(function(e){t._resolve=e})}function v(t){return null!==t&&"object"==typeof t&&"function"==typeof t.then}function w(t,e,n){var i=g(e);return v(i)?i.catch(function(e){n.error(t,e)}):i}function k(t,e){return E(new l(t,e))}function m(){return new l(Li,void 0)}function _(t){return k(b,t)}function b(t){return Promise.all(Wi(g,t))}function g(t){try{return t.dispose()}catch(t){return Promise.reject(t)}}function x(){return new y}function E(t){return new l(A,P(t))}function A(t){return t.disposed||(t.disposed=!0,t.value=g(t.disposable),t.disposable=void 0),t.value}function P(t){return{disposed:!1,disposable:t,value:void 0}}function T(t){setTimeout(function(){throw t},0)}function M(t,e,n){this._run=t,this.value=e,this.sink=n,this.active=!0}function R(t,e,n){n.error(t,e)}function I(t,e,n){n.event(t,e)}function W(t,e,n){n.end(t,e)}function L(t){return new e(new C(t))}function C(t){this.value=t}function N(t,e,n){n.event(t,e),n.end(t,void 0)}function S(){return Ci}function q(){}function B(t){return t.dispose()}function j(){}function D(t){return new e(new V(t))}function V(t){this.array=t}function U(t,e,n){for(var i=0,r=e.length;i<r&&this.active;++i)n.event(t,e[i]);this.active&&n.end(t)}function z(t){return"function"==typeof t[Si]}function O(t){return t[Si]()}function F(t){return new e(new G(t))}function G(t){this.iterable=t}function H(t,e,n){for(var i=e.next();!i.done&&this.active;)n.event(t,i.value),i=e.next();n.end(t,i.value)}function J(t){var e=null;if(t){var n=t[Bi];if("function"==typeof n&&(!(e=n.call(t))||"function"!=typeof e.subscribe))throw new TypeError("invalid observable "+e)}return e}function K(t,e,n){try{n.event(t,e)}catch(e){n.error(t,e)}}function Q(t,e,n){try{n.end(t,e)}catch(e){n.error(t,e)}}function X(t){return new e(new Y(t))}function Y(t){this.observable=t}function Z(t,e){this.sink=t,this.scheduler=e}function $(t){return t.unsubscribe()}function tt(t){if(t instanceof e)return t;var n=J(t);if(null!=n)return X(n);if(Array.isArray(t)||d(t))return D(t);if(z(t))return F(t);throw new TypeError("from(x) must be observable, iterable, or array-like: "+t)}function et(t,e){this.period=t,this.value=e}function nt(t,e,n,i){this.time=t,this.period=e,this.task=n,this.scheduler=i,this.active=!0}function it(t){return Promise.resolve(t).then(rt)}function rt(t){try{return t.run()}catch(e){return t.error(e)}}function ot(t,e){this.timer=t,this.timeline=e,this._timer=null,this._nextArrival=1/0;var n=this;this._runReadyTasksBound=function(){n._runReadyTasks(n.now())}}function st(){}function ut(t){this.f=t,this.active=!0}function ht(t){var e=new ut(t);return it(e),e}function pt(){this.tasks=[]}function ct(t,e,n){for(var i=e.events,r=0;r<i.length;++r){var o=i[r];o.active&&(t(o),o.period>=0&&o.active&&(o.time=o.time+o.period,ft(o,n)))}return n}function ft(t,e){var n=e.length;if(0!==n){var i=dt(t.time,e);i>=n?e.push(lt(t.time,[t])):t.time===e[i].time?e[i].events.push(t):e.splice(i,0,lt(t.time,[t]))}else e.push(lt(t.time,[t]))}function at(t,e){e.events=f(t,e.events)}function dt(t,e){for(var n,i,r=0,o=e.length;r<o;){if(n=Math.floor((r+o)/2),i=e[n],t===i.time)return n;t<i.time?o=n:r=n+1}return o}function lt(t,e){return{time:t,events:e}}function yt(t,e){if(Object(t)!==t)throw new TypeError("subscriber must be an object");var n=x(),i=new vt(T,t,n);return n.setDisposable(e.source.run(i,ji)),new wt(n)}function vt(t,e,n){this.fatalError=t,this.subscriber=e,this.disposable=n}function wt(t){this.disposable=t}function kt(t,e,n){if("function"==typeof e.error)try{e.error(t)}catch(t){n(t)}else n(t)}function mt(t,e){return t(e)}function _t(t,e,n){this.event=t,this.source=e,this.capture=n}function bt(t){var e=t.target;e.source.removeEventListener(e.event,t.addEvent,e.capture)}function gt(t){this.sink=t,this.events=[],this.active=!0}function xt(t,e,n){this.sink=t,this.events=n,this.time=e}function Et(t,e,n){this.time=t,this.value=e,this.sink=n}function At(t,e,n){this.time=t,this.value=e,this.sink=n}function Pt(t,e){this.event=t,this.source=e}function Tt(t){var e=t.target;e.source.removeListener(e.event,t.addEvent)}function Mt(t){return Rt(t,ji)}function Rt(t,e){return new Promise(function(n,i){It(t,e,n,i)})}function It(t,e,n,i){var r=x(),o=new Wt(n,i,r);r.setDisposable(t.run(o,e))}function Wt(t,e,n){this._end=t,this._error=e,this._disposable=n,this.active=!0}function Lt(t,e,n,i){Promise.resolve(n.dispose()).then(function(){t(i)},e)}function Ct(t){this.sink=t}function Nt(t,e){this.p=t,this.source=e}function St(t,e){this.p=t,this.sink=e}function qt(t,e){return function(n){return t(n)&&e(n)}}function Bt(t,e,n){this.p=t,this.f=e,this.source=n}function jt(t,e,n){this.p=t,this.f=e,this.sink=n}function Dt(t,e){this.f=t,this.source=e}function Vt(t,e){this.f=t,this.sink=e}function Ut(t,n){return new e(Dt.create(t,n.source))}function zt(t,e){return Ut(function(){return t},e)}function Ot(t,n){return new e(new Ft(t,n.source))}function Ft(t,e){this.source=e,this.f=t}function Gt(t,e){this.sink=e,this.f=t}function Ht(t,e){return Jt(Ot(t,e))}function Jt(t){return Mt(t.source)}function Kt(t,n,i){return new e(new Qt(t,n,i.source))}function Qt(t,e,n){this.step=t,this.seed=e,this.source=n}function Xt(t,e,n){this.step=t,this.seed=e,this.sink=n}function Yt(t,n,i){return new e(new Zt(t,n,i.source))}function Zt(t,e,n){this.source=n,this.f=t,this.value=e}function $t(t,e,n){this.f=t,this.value=e,this.sink=n}function te(t,e,n){return Mt(new ee(t,e,n.source))}function ee(t,e,n){this.source=n,this.f=t,this.value=e}function ne(t,e,n){this.f=t,this.value=e,this.sink=n}function ie(t,e){this.f=t,this.value=e}function re(t,e,n,i){this.f=t,this.sink=n,this.scheduler=i,this.active=!0;var r=this;Promise.resolve(this).then(function(t){return oe(t,e)}).catch(function(t){r.sink.error(r.scheduler.now(),t)})}function oe(t,e){var n=t.f;return Promise.resolve(n(e)).then(function(e){return se(t,e)})}function se(t,e){return e.done?(t.sink.end(t.scheduler.now(),e.value),e.value):(t.sink.event(t.scheduler.now(),e.value),t.active?oe(t,e.seed):e.value)}function ue(t,e){this.f=t,this.value=e}function he(t,e,n,i){this.f=t,this.sink=n,this.scheduler=i,this.active=!0;var r=e,o=this;Promise.resolve(this).then(function(t){return pe(t,r)}).catch(function(t){o.sink.error(o.scheduler.now(),t)})}function pe(t,e){if(t.sink.event(t.scheduler.now(),e),!t.active)return e;var n=t.f;return Promise.resolve(n(e)).then(function(e){return ce(t,e)})}function ce(t,e){return t.active?pe(t,e):t.value}function fe(t,e){this.f=t,this.args=e}function ae(t,e,n){this.iterator=t,this.sink=e,this.scheduler=n,this.active=!0;var i=this;Promise.resolve(this).then(de).catch(function(t){i.sink.error(i.scheduler.now(),t)})}function de(t,e){return t.active?le(t,t.iterator.next(e)):e}function le(t,e){return e.done?t.sink.end(t.scheduler.now(),e.value):Promise.resolve(e.value).then(function(e){return ye(t,e)},function(e){return ve(t,e)})}function ye(t,e){return t.sink.event(t.scheduler.now(),e),de(t,e)}function ve(t,e){return le(t,t.iterator.throw(e))}function we(t,n){return new e(new ke(t,n.source))}function ke(t,e){this.f=t,this.source=e}function me(t,e,n,i){this.f=t,this.sink=n,this.scheduler=i,this.active=!0,this.disposable=E(e.run(this,i))}function _e(t,e){return be(L(t),e)}function be(t,e){return we(function(){return e},t)}function ge(t,e){this.sink=e,this.index=t,this.active=!0,this.value=void 0}function xe(t,e){switch(e.length){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]);case 5:return t(e[0],e[1],e[2],e[3],e[4]);default:return t.apply(void 0,e)}}function Ee(t){return Ae(t,Vi(arguments))}function Ae(t,n){var i=n.length;return 0===i?S():1===i?Ut(t,n[0]):new e(Pe(t,n))}function Pe(t,e){return new Me(t,Di(Te,e))}function Te(t){return t.source}function Me(t,e){this.f=t,this.sources=e}function Re(t,e,n,i){var r=this;this.sink=n,this.disposables=t,this.sinks=e,this.f=i;var o=e.length;this.awaiting=o,this.values=new Array(o),this.hasValue=new Array(o);for(var s=0;s<o;++s)r.hasValue[s]=!1;this.activeCount=e.length}function Ie(t,e){return Ee(Ii,t,e)}function We(t,n){return new e(new Le(t,n.source))}function Le(t,e){this.transducer=t,this.source=e}function Ce(t,e){this.xf=t,this.sink=e}function Ne(t){this.time=-1/0,this.sink=t}function Se(t){return"function"==typeof t["@@transducer/step"]?new qe(t):new Be(t)}function qe(t){this.tx=t}function Be(t){this.tx=t}function je(){this.head=null,this.length=0}function De(t,e){return Ve(Mi,t,e)}function Ve(t,n,i){return new e(new Ue(t,n,i.source))}function Ue(t,e,n){this.f=t,this.concurrency=e,this.source=n}function ze(t,e,n,i,r){this.f=t,this.concurrency=e,this.sink=i,this.scheduler=r,this.pending=[],this.current=new je,this.disposable=E(n.run(this,r)),this.active=!0}function Oe(t,e,n,i){return t(e).source.run(n,i)}function Fe(t,e,n){this.prev=this.next=null,this.time=t,this.outer=e,this.sink=n,this.disposable=void 0}function Ge(t,e){return Ve(t,1/0,e)}function He(t){return De(1/0,t)}function Je(t,e){return Ve(t,1,e)}function Ke(t){var n=t.length;return 0===n?S():1===n?t[0]:new e(Qe(t))}function Qe(t){return new Ye(zi(Xe,[],t))}function Xe(t,e){var n=e.source;return n instanceof Ye?t.concat(n.sources):t.concat(n)}function Ye(t){this.sources=t}function Ze(t,e,n){this.sink=n,this.disposables=t,this.activeCount=e.length}function $e(t,n){return new e(new nn(Mi,t.source,[n.source]))}function tn(t,n,i){return new e(new nn(t,n.source,u(en,i)))}function en(t){return t.source}function nn(t,e,n){this.f=t,this.sampler=e,this.sources=n}function rn(t){this.sink=t,this.hasValue=!1}function on(t,e,n){this.f=t,this.sinks=e,this.sink=n,this.active=!1}function sn(t){return t.hasValue}function un(t){return t.value}function hn(t){this._capacity=t||32,this._length=0,this._head=0}function pn(t,e,n,i,r){for(var o=0;o<r;++o)n[o+i]=t[o+e],t[o+e]=void 0}function cn(t,n){return 0===n.length?S():1===n.length?Ut(t,n[0]):new e(new an(t,Oi(fn,n)))}function fn(t){return t.source}function an(t,e){this.f=t,this.sources=e}function dn(t,e,n,i){this.f=t,this.sinks=n,this.sink=i,this.buffers=e}function ln(t,e,n,i){i.event(e,xe(t,Oi(yn,n)))}function yn(t){return t.shift()}function vn(t,e){for(var n=0,i=t.length;n<i;++n)if(t[n].isEmpty()&&!e[n].active)return!0;return!1}function wn(t){for(var e=0,n=t.length;e<n;++e)if(t[e].isEmpty())return!1;return!0}function kn(t){return new e(new mn(t.source))}function mn(t){this.source=t}function _n(t,e){this.sink=t,this.scheduler=e,this.current=null,this.ended=!1}function bn(t,e,n,i){this.min=t,this.max=e,this.outer=n,this.sink=i,this.disposable=m()}function gn(t,n){return new e(Nt.create(t,n.source))}function xn(t){return En(Tn,t)}function En(t,n){return new e(new An(t,n.source))}function An(t,e){this.equals=t,this.source=e}function Pn(t,e){this.equals=t,this.sink=e,this.value=void 0,this.init=!0}function Tn(t,e){return t===e}function Mn(t,e){return In(0,t,e)}function Rn(t,e){return In(t,1/0,e)}function In(t,n,i){return n<=t?S():new e(Wn(t,n,i.source))}function Wn(t,e,n){return n instanceof Dt?Ln(t,e,n):n instanceof Nn?Cn(t,e,n):new Nn(t,e,n)}function Ln(t,e,n){return Dt.create(n.f,Wn(t,e,n.source))}function Cn(t,e,n){return t+=n.min,e=Math.min(e+n.min,n.max),new Nn(t,e,n.source)}function Nn(t,e,n){this.source=n,this.min=t,this.max=e}function Sn(t,e,n,i){this.sink=n,this.skip=t,this.take=e,this.disposable=i}function qn(t,n){return new e(new Bn(t,n.source))}function Bn(t,e){this.p=t,this.source=e}function jn(t,e,n){this.p=t,this.sink=e,this.active=!0,this.disposable=n}function Dn(t,n){return new e(new Vn(t,n.source))}function Vn(t,e){this.p=t,this.source=e}function Un(t,e){this.p=t,this.sink=e,this.skipping=!0}function zn(t,n){return new e(new On(t,n.source))}function On(t,e){this.p=t,this.source=e}function Fn(t,e){this.p=t,this.sink=e,this.skipping=!1}function Gn(t,n){return new e(new Kn(t.source,n.source))}function Hn(t,n){return new e(new Qn(t.source,n.source))}function Jn(t,e){return Gn(He(t),Hn(t,e))}function Kn(t,e){this.maxSignal=t,this.source=e}function Qn(t,e){this.minSignal=t,this.source=e}function Xn(t,e){this.value=t,this.sink=e}function Yn(t,e,n){this.min=t,this.max=e,this.sink=n}function Zn(t,e,n){this.value=1/0,this.sink=e,this.disposable=t.run(this,n)}function $n(t,e,n){this.value=1/0,this.sink=e,this.disposable=t.run(this,n)}function ti(){}function ei(t,n){return t<=0?n:new e(new ni(t,n.source))}function ni(t,e){this.dt=t,this.source=e}function ii(t,e,n){this.dt=t,this.sink=e,this.scheduler=n}function ri(t){return new e(new oi(t.source))}function oi(t){this.source=t}function si(t){this.sink=t}function ui(t,n){return new e(hi(t,n.source))}function hi(t,e){return e instanceof Dt?pi(t,e):e instanceof fi?ci(t,e):new fi(t,e)}function pi(t,e){return Dt.create(e.f,hi(t,e.source))}function ci(t,e){return new fi(Math.max(t,e.period),e.source)}function fi(t,e){this.period=t,this.source=e}function ai(t,e){this.time=0,this.period=t,this.sink=e}function di(t,n){return new e(new li(t,n.source))}function li(t,e){this.dt=t,this.source=e}function yi(t,e,n,i){this.dt=t,this.sink=n,this.scheduler=i,this.value=void 0,this.timer=null,this.disposable=e.run(this,i)}function vi(t){return new e(new wi(t.source))}function wi(t){this.source=t}function ki(t,e){this.sink=t,this.scheduler=e,this.queue=Promise.resolve();var n=this;this._eventBound=function(t){n.sink.event(n.scheduler.now(),t)},this._endBound=function(t){n.sink.end(n.scheduler.now(),t)},this._errorBound=function(t){n.sink.error(n.scheduler.now(),t)}}function mi(t){this.sink=t,this.active=!0}function _i(t,n){return new e(new xi(t,n.source))}function bi(t){this.value=t}function gi(t,e,n){n.error(t,e)}function xi(t,e){this.f=t,this.source=e}function Ei(t,e,n,i){this.f=t,this.sink=new mi(n),this.scheduler=i,this.disposable=e.run(this,i)}function Ai(t,e,n){try{n.event(t,e)}catch(e){n.error(t,e)}}function Pi(t,e,n){try{n.end(t,e)}catch(e){n.error(t,e)}}function Ti(t){var e=t.source;return e instanceof Qi?t:new t.constructor(new Qi(e))}e.prototype.run=function(t,e){return this.source.run(t,e)};var Mi=function(t){return t},Ri=function(t,e){return function(n){return t(e(n))}},Ii=function(t,e){return t(e)};l.prototype.dispose=function(){return this._dispose(this._data)},y.prototype.setDisposable=function(t){if(void 0!==this.disposable)throw new Error("setDisposable called more than once");this.disposable=t,this.disposed&&this._resolve(t.dispose())},y.prototype.dispose=function(){return this.disposed?this.result:(this.disposed=!0,void 0!==this.disposable&&(this.result=this.disposable.dispose()),this.result)};var Wi=u,Li=Mi;M.event=function(t,e){return new M(I,t,e)},M.end=function(t,e){return new M(W,t,e)},M.error=function(t,e){return new M(R,t,e)},M.prototype.dispose=function(){this.active=!1},M.prototype.run=function(t){this.active&&this._run(t,this.value,this.sink)},M.prototype.error=function(t,e){if(!this.active)return T(e);this.sink.error(t,e)},C.prototype.run=function(t,e){return e.asap(new M(N,this.value,t))},q.prototype.run=function(t,e){var n=M.end(void 0,t);return e.asap(n),k(B,n)};var Ci=new e(new q);j.prototype.run=function(){return m()};var Ni=new e(new j);V.prototype.run=function(t,e){return e.asap(new M(U,this.array,t))};var Si;Si="function"==typeof Set&&"function"==typeof(new Set)["@@iterator"]?"@@iterator":"function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_",G.prototype.run=function(t,e){return e.asap(new M(H,O(this.iterable),t))};var qi,Bi=function(t){var e,n=t.Symbol;return"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}(qi="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")());Y.prototype.run=function(t,e){var n=this.observable.subscribe(new Z(t,e));if("function"==typeof n)return k(n);if(n&&"function"==typeof n.unsubscribe)return k($,n);throw new TypeError("Observable returned invalid subscription "+String(n))},Z.prototype.next=function(t){K(this.scheduler.now(),t,this.sink)},Z.prototype.complete=function(t){Q(this.scheduler.now(),t,this.sink)},Z.prototype.error=function(t){this.sink.error(this.scheduler.now(),t)},et.prototype.run=function(t,e){return e.periodic(this.period,M.event(this.value,t))},nt.prototype.run=function(){return this.task.run(this.time)},nt.prototype.error=function(t){return this.task.error(this.time,t)},nt.prototype.dispose=function(){return this.scheduler.cancel(this),this.task.dispose()},ot.prototype.now=function(){return this.timer.now()},ot.prototype.asap=function(t){return this.schedule(0,-1,t)},ot.prototype.delay=function(t,e){return this.schedule(t,-1,e)},ot.prototype.periodic=function(t,e){return this.schedule(0,t,e)},ot.prototype.schedule=function(t,e,n){var i=this.now(),r=new nt(i+Math.max(0,t),e,n,this);return this.timeline.add(r),this._scheduleNextRun(i),r},ot.prototype.cancel=function(t){t.active=!1,this.timeline.remove(t)&&this._reschedule()},ot.prototype.cancelAll=function(t){this.timeline.removeAll(t),this._reschedule()},ot.prototype._reschedule=function(){this.timeline.isEmpty()?this._unschedule():this._scheduleNextRun(this.now())},ot.prototype._unschedule=function(){this.timer.clearTimer(this._timer),this._timer=null},ot.prototype._scheduleNextRun=function(t){if(!this.timeline.isEmpty()){var e=this.timeline.nextArrival();null===this._timer?this._scheduleNextArrival(e,t):e<this._nextArrival&&(this._unschedule(),this._scheduleNextArrival(e,t))}},ot.prototype._scheduleNextArrival=function(t,e){this._nextArrival=t;var n=Math.max(0,t-e);this._timer=this.timer.setTimer(this._runReadyTasksBound,n)},ot.prototype._runReadyTasks=function(t){this._timer=null,this.timeline.runTasks(t,rt),this._scheduleNextRun(this.now())},st.prototype.now=Date.now,st.prototype.setTimer=function(t,e){return e<=0?ht(t):setTimeout(t,e)},st.prototype.clearTimer=function(t){return t instanceof ut?t.cancel():clearTimeout(t)},ut.prototype.run=function(){return this.active&&this.f()},ut.prototype.error=function(t){throw t},ut.prototype.cancel=function(){this.active=!1},pt.prototype.nextArrival=function(){return this.isEmpty()?1/0:this.tasks[0].time},pt.prototype.isEmpty=function(){return 0===this.tasks.length},pt.prototype.add=function(t){ft(t,this.tasks)},pt.prototype.remove=function(t){var e=dt(t.time,this.tasks);if(e>=0&&e<this.tasks.length){var n=a(t,this.tasks[e].events);if(n>=0)return this.tasks[e].events.splice(n,1),!0}return!1},pt.prototype.removeAll=function(t){for(var e=this,n=0,i=this.tasks.length;n<i;++n)at(t,e.tasks[n])},pt.prototype.runTasks=function(t,e){for(var n=this,i=this.tasks,r=i.length,o=0;o<r&&i[o].time<=t;)++o;this.tasks=i.slice(o);for(var s=0;s<o;++s)n.tasks=ct(e,i[s],n.tasks)};var ji=new ot(new st,new pt);vt.prototype.event=function(t,e){this.disposable.disposed||"function"!=typeof this.subscriber.next||this.subscriber.next(e)},vt.prototype.end=function(t,e){if(!this.disposable.disposed){var n=this.subscriber,i=this.fatalError;Promise.resolve(this.disposable.dispose()).then(function(){"function"==typeof n.complete&&n.complete(e)}).catch(function(t){kt(t,n,i)})}},vt.prototype.error=function(t,e){var n=this.subscriber,i=this.fatalError;Promise.resolve(this.disposable.dispose()).then(function(){kt(e,n,i)})},wt.prototype.unsubscribe=function(){this.disposable.dispose()},_t.prototype.run=function(t,e){function n(n){K(e.now(),n,t)}return this.source.addEventListener(this.event,n,this.capture),k(bt,{target:this,addEvent:n})},gt.prototype.event=function(t,e){this.active&&(0===this.events.length&&it(new xt(this.sink,t,this.events)),this.events.push({time:t,value:e}))},gt.prototype.end=function(t,e){this.active&&this._end(new Et(t,e,this.sink))},gt.prototype.error=function(t,e){this._end(new At(t,e,this.sink))},gt.prototype._end=function(t){this.active=!1,it(t)},xt.prototype.run=function(){for(var t,e=this,n=this.events,i=this.sink,r=0,o=n.length;r<o;++r)t=n[r],e.time=t.time,i.event(t.time,t.value);n.length=0},xt.prototype.error=function(t){this.sink.error(this.time,t)},Et.prototype.run=function(){this.sink.end(this.time,this.value)},Et.prototype.error=function(t){this.sink.error(this.time,t)},At.prototype.run=function(){this.sink.error(this.time,this.value)},At.prototype.error=function(t){throw t},Pt.prototype.run=function(t,e){function n(t){var n=arguments,r=arguments.length;if(r>1){for(var o=new Array(r),s=0;s<r;++s)o[s]=n[s];K(e.now(),o,i)}else K(e.now(),t,i)}var i=new gt(t);return this.source.addListener(this.event,n),k(Tt,{target:this,addEvent:n})},Wt.prototype.event=function(t,e){},Wt.prototype.end=function(t,e){this.active&&(this.active=!1,Lt(this._end,this._error,this._disposable,e))},Wt.prototype.error=function(t,e){this.active=!1,Lt(this._error,this._error,this._disposable,e)},Ct.prototype.event=function(t,e){return this.sink.event(t,e)},Ct.prototype.end=function(t,e){return this.sink.end(t,e)},Ct.prototype.error=function(t,e){return this.sink.error(t,e)},Nt.create=function(t,e){return e instanceof Nt?new Nt(qt(e.p,t),e.source):new Nt(t,e)},Nt.prototype.run=function(t,e){return this.source.run(new St(this.p,t),e)},St.prototype.end=Ct.prototype.end,St.prototype.error=Ct.prototype.error,St.prototype.event=function(t,e){(0,this.p)(e)&&this.sink.event(t,e)},Bt.prototype.run=function(t,e){return this.source.run(new jt(this.p,this.f,t),e)},jt.prototype.event=function(t,e){var n=this.f;(0,this.p)(e)&&this.sink.event(t,n(e))},jt.prototype.end=Ct.prototype.end,jt.prototype.error=Ct.prototype.error,Dt.create=function(t,e){return e instanceof Dt?new Dt(Ri(t,e.f),e.source):e instanceof Nt?new Bt(e.p,t,e.source):new Dt(t,e)},Dt.prototype.run=function(t,e){return this.source.run(new Vt(this.f,t),e)},Vt.prototype.end=Ct.prototype.end,Vt.prototype.error=Ct.prototype.error,Vt.prototype.event=function(t,e){var n=this.f;this.sink.event(t,n(e))},Ft.prototype.run=function(t,e){return this.source.run(new Gt(this.f,t),e)},Gt.prototype.end=Ct.prototype.end,Gt.prototype.error=Ct.prototype.error,Gt.prototype.event=function(t,e){(0,this.f)(e),this.sink.event(t,e)},Qt.prototype.run=function(t,e){return this.source.run(new Xt(this.step,this.seed,t),e)},Xt.prototype.error=Ct.prototype.error,Xt.prototype.event=function(t,e){var n=this.step(this.seed,e);this.seed=n.seed,this.sink.event(t,n.value)},Xt.prototype.end=function(t){this.sink.end(t,this.seed)},Zt.prototype.run=function(t,e){return _([e.asap(M.event(this.value,t)),this.source.run(new $t(this.f,this.value,t),e)])},$t.prototype.event=function(t,e){var n=this.f;this.value=n(this.value,e),this.sink.event(t,this.value)},$t.prototype.error=Ct.prototype.error,$t.prototype.end=Ct.prototype.end,ee.prototype.run=function(t,e){return this.source.run(new ne(this.f,this.value,t),e)},ne.prototype.event=function(t,e){var n=this.f;this.value=n(this.value,e),this.sink.event(t,this.value)},ne.prototype.error=Ct.prototype.error,ne.prototype.end=function(t){this.sink.end(t,this.value)},ie.prototype.run=function(t,e){return new re(this.f,this.value,t,e)},re.prototype.dispose=function(){this.active=!1},ue.prototype.run=function(t,e){return new he(this.f,this.value,t,e)},he.prototype.dispose=function(){this.active=!1},fe.prototype.run=function(t,e){return new ae(this.f.apply(void 0,this.args),t,e)},ae.prototype.dispose=function(){this.active=!1},ke.prototype.run=function(t,e){return new me(this.f,this.source,t,e)},me.prototype.error=Ct.prototype.error,me.prototype.event=function(t,e){this.active&&this.sink.event(t,e)},me.prototype.end=function(t,e){this.active&&(w(t,this.disposable,this.sink),this._startNext(t,e,this.sink))},me.prototype._startNext=function(t,e,n){try{this.disposable=this._continue(this.f,e,n)}catch(e){n.error(t,e)}},me.prototype._continue=function(t,e,n){return t(e).source.run(n,this.scheduler)},me.prototype.dispose=function(){return this.active=!1,this.disposable.dispose()},ge.prototype.event=function(t,e){this.active&&(this.value=e,this.sink.event(t,this))},ge.prototype.end=function(t,e){this.active&&(this.active=!1,this.sink.end(t,{index:this.index,value:e}))},ge.prototype.error=Ct.prototype.error;var Di=u,Vi=s;Me.prototype.run=function(t,e){for(var n,i=this,r=this.sources.length,o=new Array(r),s=new Array(r),u=new Re(o,s,t,this.f),h=0;h<r;++h)n=s[h]=new ge(h,u),o[h]=i.sources[h].run(n,e);return _(o)},Re.prototype.error=Ct.prototype.error,Re.prototype.event=function(t,e){var n=e.index,i=this._updateReady(n);this.values[n]=e.value,0===i&&this.sink.event(t,xe(this.f,this.values))},Re.prototype._updateReady=function(t){return this.awaiting>0&&(this.hasValue[t]||(this.hasValue[t]=!0,this.awaiting-=1)),this.awaiting},Re.prototype.end=function(t,e){w(t,this.disposables[e.index],this.sink),0==--this.activeCount&&this.sink.end(t,e.value)},Le.prototype.run=function(t,e){var n=this.transducer(new Ne(t));return this.source.run(new Ce(Se(n),t),e)},Ce.prototype.event=function(t,e){var n=this.xf.step(t,e);return this.xf.isReduced(n)?this.sink.end(t,this.xf.getResult(n)):n},Ce.prototype.end=function(t,e){return this.xf.result(e)},Ce.prototype.error=function(t,e){return this.sink.error(t,e)},Ne.prototype["@@transducer/init"]=Ne.prototype.init=function(){},Ne.prototype["@@transducer/step"]=Ne.prototype.step=function(t,e){return isNaN(t)||(this.time=Math.max(t,this.time)),this.sink.event(this.time,e)},Ne.prototype["@@transducer/result"]=Ne.prototype.result=function(t){return this.sink.end(this.time,t)},qe.prototype.step=function(t,e){return this.tx["@@transducer/step"](t,e)},qe.prototype.result=function(t){return this.tx["@@transducer/result"](t)},qe.prototype.isReduced=function(t){return null!=t&&t["@@transducer/reduced"]},qe.prototype.getResult=function(t){return t["@@transducer/value"]},Be.prototype.step=function(t,e){return this.tx.step(t,e)},Be.prototype.result=function(t){return this.tx.result(t)},Be.prototype.isReduced=function(t){return null!=t&&t.__transducers_reduced__},Be.prototype.getResult=function(t){return t.value},je.prototype.add=function(t){null!==this.head&&(this.head.prev=t,t.next=this.head),this.head=t,++this.length},je.prototype.remove=function(t){--this.length,t===this.head&&(this.head=this.head.next),null!==t.next&&(t.next.prev=t.prev,t.next=null),null!==t.prev&&(t.prev.next=t.next,t.prev=null)},je.prototype.isEmpty=function(){return 0===this.length},je.prototype.dispose=function(){if(this.isEmpty())return Promise.resolve();var t=[],e=this.head;for(this.head=null,this.length=0;null!==e;)t.push(e.dispose()),e=e.next;return Promise.all(t)},Ue.prototype.run=function(t,e){return new ze(this.f,this.concurrency,this.source,t,e)},ze.prototype.event=function(t,e){this._addInner(t,e)},ze.prototype._addInner=function(t,e){this.current.length<this.concurrency?this._startInner(t,e):this.pending.push(e)},ze.prototype._startInner=function(t,e){try{this._initInner(t,e)}catch(e){this.error(t,e)}},ze.prototype._initInner=function(t,e){var n=new Fe(t,this,this.sink);n.disposable=Oe(this.f,e,n,this.scheduler),this.current.add(n)},ze.prototype.end=function(t,e){this.active=!1,w(t,this.disposable,this.sink),this._checkEnd(t,e)},ze.prototype.error=function(t,e){this.active=!1,this.sink.error(t,e)},ze.prototype.dispose=function(){return this.active=!1,this.pending.length=0,Promise.all([this.disposable.dispose(),this.current.dispose()])},ze.prototype._endInner=function(t,e,n){this.current.remove(n),w(t,n,this),0===this.pending.length?this._checkEnd(t,e):this._startInner(t,this.pending.shift())},ze.prototype._checkEnd=function(t,e){!this.active&&this.current.isEmpty()&&this.sink.end(t,e)},Fe.prototype.event=function(t,e){this.sink.event(Math.max(t,this.time),e)},Fe.prototype.end=function(t,e){this.outer._endInner(Math.max(t,this.time),e,this)},Fe.prototype.error=function(t,e){this.outer.error(Math.max(t,this.time),e)},Fe.prototype.dispose=function(){return this.disposable.dispose()};var Ui=function(t){for(var e=t.length,n=new Array(e),i=0;i<e;++i)n[i]=t[i];return n},zi=function(t,e,n){for(var i=e,r=0,o=n.length;r<o;++r)i=t(i,n[r],r);return i};Ye.prototype.run=function(t,e){for(var n,i=this,r=this.sources.length,o=new Array(r),s=new Array(r),u=new Ze(o,s,t),h=0;h<r;++h)n=s[h]=new ge(h,u),o[h]=i.sources[h].run(n,e);return _(o)},Ze.prototype.error=Ct.prototype.error,Ze.prototype.event=function(t,e){this.sink.event(t,e.value)},Ze.prototype.end=function(t,e){w(t,this.disposables[e.index],this.sink),0==--this.activeCount&&this.sink.end(t,e.value)},nn.prototype.run=function(t,e){for(var n,i=this,r=this.sources.length,o=new Array(r+1),s=new Array(r),u=new on(this.f,s,t),h=0;h<r;++h)n=s[h]=new rn(u),o[h]=i.sources[h].run(n,e);return o[h]=this.sampler.run(u,e),_(o)},rn.prototype.event=function(t,e){this.value=e,this.hasValue=!0,this.sink._notify(this)},rn.prototype.end=function(){},rn.prototype.error=Ct.prototype.error,on.prototype._notify=function(){this.active||(this.active=this.sinks.every(sn))},on.prototype.event=function(t){this.active&&this.sink.event(t,xe(this.f,u(un,this.sinks)))},on.prototype.end=Ct.prototype.end,on.prototype.error=Ct.prototype.error,hn.prototype.push=function(t){var e=this._length;this._checkCapacity(e+1),this[this._head+e&this._capacity-1]=t,this._length=e+1},hn.prototype.shift=function(){var t=this._head,e=this[t];return this[t]=void 0,this._head=t+1&this._capacity-1,this._length--,e},hn.prototype.isEmpty=function(){return 0===this._length},hn.prototype.length=function(){return this._length},hn.prototype._checkCapacity=function(t){this._capacity<t&&this._ensureCapacity(this._capacity<<1)},hn.prototype._ensureCapacity=function(t){var e=this._capacity;this._capacity=t;var n=this._head+this._length;n>e&&pn(this,0,this,e,n&e-1)};var Oi=u,Fi=s;an.prototype.run=function(t,e){for(var n,i=this,r=this.sources.length,o=new Array(r),s=new Array(r),u=new Array(r),h=new dn(this.f,u,s,t),p=0;p<r;++p)u[p]=new hn,n=s[p]=new ge(p,h),o[p]=i.sources[p].run(n,e);return _(o)},dn.prototype.event=function(t,e){var n=this.buffers,i=n[e.index];if(i.push(e.value),1===i.length()){if(!wn(this.buffers))return;ln(this.f,t,n,this.sink),vn(this.buffers,this.sinks)&&this.sink.end(t,void 0)}},dn.prototype.end=function(t,e){this.buffers[e.index].isEmpty()&&this.sink.end(t,e.value)},dn.prototype.error=Ct.prototype.error,mn.prototype.run=function(t,e){var n=new _n(t,e);return _([n,this.source.run(n,e)])},_n.prototype.event=function(t,e){this._disposeCurrent(t),this.current=new bn(t,1/0,this,this.sink),this.current.disposable=e.source.run(this.current,this.scheduler)},_n.prototype.end=function(t,e){this.ended=!0,this._checkEnd(t,e)},_n.prototype.error=function(t,e){this.ended=!0,this.sink.error(t,e)},_n.prototype.dispose=function(){return this._disposeCurrent(this.scheduler.now())},_n.prototype._disposeCurrent=function(t){if(null!==this.current)return this.current._dispose(t)},_n.prototype._disposeInner=function(t,e){e._dispose(t),e===this.current&&(this.current=null)},_n.prototype._checkEnd=function(t,e){this.ended&&null===this.current&&this.sink.end(t,e)},_n.prototype._endInner=function(t,e,n){this._disposeInner(t,n),this._checkEnd(t,e)},_n.prototype._errorInner=function(t,e,n){this._disposeInner(t,n),this.sink.error(t,e)},bn.prototype.event=function(t,e){t<this.max&&this.sink.event(Math.max(t,this.min),e)},bn.prototype.end=function(t,e){this.outer._endInner(Math.max(t,this.min),e,this)},bn.prototype.error=function(t,e){this.outer._errorInner(Math.max(t,this.min),e,this)},bn.prototype._dispose=function(t){this.max=t,w(t,this.disposable,this.sink)},An.prototype.run=function(t,e){return this.source.run(new Pn(this.equals,t),e)},Pn.prototype.end=Ct.prototype.end,Pn.prototype.error=Ct.prototype.error,Pn.prototype.event=function(t,e){this.init?(this.init=!1,this.value=e,this.sink.event(t,e)):this.equals(this.value,e)||(this.value=e,this.sink.event(t,e))},Nn.prototype.run=function(t,e){var n=x(),i=new Sn(this.min,this.max-this.min,t,n);return n.setDisposable(this.source.run(i,e)),n},Sn.prototype.end=Ct.prototype.end,Sn.prototype.error=Ct.prototype.error,Sn.prototype.event=function(t,e){this.skip>0?this.skip-=1:0!==this.take&&(this.take-=1,this.sink.event(t,e),0===this.take&&(this.disposable.dispose(),this.sink.end(t,e)))},Bn.prototype.run=function(t,e){var n=x(),i=new jn(this.p,t,n);return n.setDisposable(this.source.run(i,e)),n},jn.prototype.end=Ct.prototype.end,jn.prototype.error=Ct.prototype.error,jn.prototype.event=function(t,e){if(this.active){var n=this.p;this.active=n(e),this.active?this.sink.event(t,e):(this.disposable.dispose(),this.sink.end(t,e))}},Vn.prototype.run=function(t,e){return this.source.run(new Un(this.p,t),e)},Un.prototype.end=Ct.prototype.end,Un.prototype.error=Ct.prototype.error,Un.prototype.event=function(t,e){if(this.skipping){var n=this.p;if(this.skipping=n(e),this.skipping)return}this.sink.event(t,e)},On.prototype.run=function(t,e){return this.source.run(new Fn(this.p,t),e)},Fn.prototype.event=function(t,e){if(!this.skipping){var n=this.p;this.skipping=n(e),this.sink.event(t,e),this.skipping&&this.sink.end(t,e)}},Fn.prototype.end=Ct.prototype.end,Fn.prototype.error=Ct.prototype.error,Kn.prototype.run=function(t,e){var n=new Xn(-1/0,t),i=new $n(this.maxSignal,t,e);return _([n,i,this.source.run(new Yn(n,i,t),e)])},Qn.prototype.run=function(t,e){var n=new Zn(this.minSignal,t,e),i=new Xn(1/0,t);return _([n,i,this.source.run(new Yn(n,i,t),e)])},Xn.prototype.error=Ct.prototype.error,Xn.prototype.event=ti,Xn.prototype.end=ti,Xn.prototype.dispose=ti,Yn.prototype.event=function(t,e){t>=this.min.value&&t<this.max.value&&this.sink.event(t,e)},Yn.prototype.error=Ct.prototype.error,Yn.prototype.end=Ct.prototype.end,Zn.prototype.event=function(t){t<this.value&&(this.value=t)},Zn.prototype.end=ti,Zn.prototype.error=Ct.prototype.error,Zn.prototype.dispose=function(){return this.disposable.dispose()},$n.prototype.event=function(t,e){t<this.value&&(this.value=t,this.sink.end(t,e))},$n.prototype.end=ti,$n.prototype.error=Ct.prototype.error,$n.prototype.dispose=function(){return this.disposable.dispose()},ni.prototype.run=function(t,e){var n=new ii(this.dt,t,e);return _([n,this.source.run(n,e)])},ii.prototype.dispose=function(){var t=this;this.scheduler.cancelAll(function(e){return e.sink===t.sink})},ii.prototype.event=function(t,e){this.scheduler.delay(this.dt,M.event(e,this.sink))},ii.prototype.end=function(t,e){this.scheduler.delay(this.dt,M.end(e,this.sink))},ii.prototype.error=Ct.prototype.error,oi.prototype.run=function(t,e){return this.source.run(new si(t),e)},si.prototype.end=Ct.prototype.end,si.prototype.error=Ct.prototype.error,si.prototype.event=function(t,e){this.sink.event(t,{time:t,value:e})},fi.prototype.run=function(t,e){return this.source.run(new ai(this.period,t),e)},ai.prototype.event=function(t,e){t>=this.time&&(this.time=t+this.period,this.sink.event(t,e))},ai.prototype.end=Ct.prototype.end,ai.prototype.error=Ct.prototype.error,li.prototype.run=function(t,e){return new yi(this.dt,this.source,t,e)},yi.prototype.event=function(t,e){this._clearTimer(),this.value=e,this.timer=this.scheduler.delay(this.dt,M.event(e,this.sink))},yi.prototype.end=function(t,e){this._clearTimer()&&(this.sink.event(t,this.value),this.value=void 0),this.sink.end(t,e)},yi.prototype.error=function(t,e){this._clearTimer(),this.sink.error(t,e)},yi.prototype.dispose=function(){return this._clearTimer(),this.disposable.dispose()},yi.prototype._clearTimer=function(){return null!==this.timer&&(this.timer.dispose(),this.timer=null,!0)},wi.prototype.run=function(t,e){return this.source.run(new ki(t,e),e)},ki.prototype.event=function(t,e){var n=this;this.queue=this.queue.then(function(){return n._event(e)}).catch(this._errorBound)},ki.prototype.end=function(t,e){var n=this;this.queue=this.queue.then(function(){return n._end(e)}).catch(this._errorBound)},ki.prototype.error=function(t,e){var n=this;this.queue=this.queue.then(function(){return n._errorBound(e)}).catch(T)},ki.prototype._event=function(t){return t.then(this._eventBound)},ki.prototype._end=function(t){return Promise.resolve(t).then(this._endBound)},mi.prototype.event=function(t,e){this.active&&this.sink.event(t,e)},mi.prototype.end=function(t,e){this.active&&(this.disable(),this.sink.end(t,e))},mi.prototype.error=function(t,e){this.disable(),this.sink.error(t,e)},mi.prototype.disable=function(){return this.active=!1,this.sink};var Gi=_i;bi.prototype.run=function(t,e){return e.asap(new M(gi,this.value,t))},xi.prototype.run=function(t,e){return new Ei(this.f,this.source,t,e)},Ei.prototype.event=function(t,e){K(t,e,this.sink)},Ei.prototype.end=function(t,e){Q(t,e,this.sink)},Ei.prototype.error=function(t,e){var n=this.sink.disable();w(t,this.disposable,this.sink),this._startNext(t,e,n)},Ei.prototype._startNext=function(t,e,n){try{this.disposable=this._continue(this.f,e,n)}catch(e){n.error(t,e)}},Ei.prototype._continue=function(t,e,n){return t(e).source.run(n,this.scheduler)},Ei.prototype.dispose=function(){return this.disposable.dispose()};var Hi=function(t,e){this.source=t,this.sink=e,this.disposed=!1};Hi.prototype.dispose=function(){if(!this.disposed)return this.disposed=!0,0===this.source.remove(this.sink)&&this.source._dispose()};var Ji=function(t){return t.dispose()},Ki={dispose:function(){}},Qi=function(t){this.source=t,this.sinks=[],this._disposable=Ki};Qi.prototype.run=function(t,e){return 1===this.add(t)&&(this._disposable=this.source.run(this,e)),new Hi(this,t)},Qi.prototype._dispose=function(){var t=this._disposable;return this._disposable=Ki,Promise.resolve(t).then(Ji)},Qi.prototype.add=function(t){return this.sinks=i(t,this.sinks),this.sinks.length},Qi.prototype.remove=function(t){var e=a(t,this.sinks);return e>=0&&(this.sinks=p(e,this.sinks)),this.sinks.length},Qi.prototype.event=function(t,e){var n=this.sinks;if(1===n.length)return n[0].event(t,e);for(var i=0;i<n.length;++i)Ai(t,e,n[i])},Qi.prototype.end=function(t,e){for(var n=this.sinks,i=0;i<n.length;++i)Pi(t,e,n[i])},Qi.prototype.error=function(t,e){for(var n=this.sinks,i=0;i<n.length;++i)n[i].error(t,e)},e.of=L,e.empty=S,e.from=tt,e.prototype.subscribe=function(t){return yt(t,this)},e.prototype[Bi]=function(){return this},e.prototype.thru=function(t){return mt(t,this)},e.prototype.observe=e.prototype.forEach=function(t){return Ht(t,this)},e.prototype.drain=function(){return Jt(this)},e.prototype.loop=function(t,e){return Kt(t,e,this)},e.prototype.scan=function(t,e){return Yt(t,e,this)},e.prototype.reduce=function(t,e){return te(t,e,this)},e.prototype.concat=function(t){return be(this,t)},e.prototype.startWith=function(t){return _e(t,this)},e.prototype.map=function(t){return Ut(t,this)},e.prototype.ap=function(t){return Ie(this,t)},e.prototype.constant=function(t){return zt(t,this)},e.prototype.tap=function(t){return Ot(t,this)},e.prototype.transduce=function(t){return We(t,this)},e.prototype.chain=function(t){return Ge(t,this)},e.prototype.flatMap=e.prototype.chain,e.prototype.join=function(){return He(this)},e.prototype.continueWith=function(t){return we(t,this)},e.prototype.flatMapEnd=e.prototype.continueWith,e.prototype.concatMap=function(t){return Je(t,this)},e.prototype.mergeConcurrently=function(t){return De(t,this)},e.prototype.merge=function(){return Ke(n(this,arguments))},e.prototype.combine=function(t){return Ae(t,h(this,0,arguments))},e.prototype.sampleWith=function(t){return $e(t,this)},e.prototype.sample=function(t){return tn(t,this,s(arguments))},e.prototype.zip=function(t){return cn(t,h(this,0,arguments))},e.prototype.switchLatest=function(){return kn(this)},e.prototype.switch=e.prototype.switchLatest,e.prototype.filter=function(t){return gn(t,this)},e.prototype.skipRepeats=function(){return xn(this)},e.prototype.skipRepeatsWith=function(t){return En(t,this)},e.prototype.take=function(t){return Mn(t,this)},e.prototype.skip=function(t){return Rn(t,this)},e.prototype.slice=function(t,e){return In(t,e,this)},e.prototype.takeWhile=function(t){return qn(t,this)},e.prototype.skipWhile=function(t){return Dn(t,this)},e.prototype.skipAfter=function(t){return zn(t,this)},e.prototype.until=function(t){return Gn(t,this)},e.prototype.takeUntil=e.prototype.until,e.prototype.since=function(t){return Hn(t,this)},e.prototype.skipUntil=e.prototype.since,e.prototype.during=function(t){return Jn(t,this)},e.prototype.delay=function(t){return ei(t,this)},e.prototype.timestamp=function(){return ri(this)},e.prototype.throttle=function(t){return ui(t,this)},e.prototype.debounce=function(t){return di(t,this)},e.prototype.awaitPromises=function(){return vi(this)},e.prototype.await=e.prototype.awaitPromises,e.prototype.recoverWith=function(t){return Gi(t,this)},e.prototype.flatMapError=e.prototype.recoverWith,e.prototype.multicast=function(){return Ti(this)},t.Stream=e,t.of=L,t.just=L,t.empty=S,t.never=function(){return Ni},t.from=tt,t.periodic=function(t,n){return new e(new et(t,n))},t.observe=Ht,t.forEach=Ht,t.drain=Jt,t.loop=Kt,t.scan=Yt,t.reduce=te,t.concat=be,t.startWith=_e,t.map=Ut,t.constant=zt,t.tap=Ot,t.ap=Ie,t.transduce=We,t.flatMap=Ge,t.chain=Ge,t.join=He,t.continueWith=we,t.flatMapEnd=we,t.concatMap=Je,t.mergeConcurrently=De,t.merge=function(){return Ke(Ui(arguments))},t.mergeArray=Ke,t.combine=Ee,t.combineArray=Ae,t.sample=function(t,e){return tn(t,e,r(2,arguments))},t.sampleArray=tn,t.sampleWith=$e,t.zip=function(t){return cn(t,Fi(arguments))},t.zipArray=cn,t.switchLatest=kn,t.switch=kn,t.filter=gn,t.skipRepeats=xn,t.distinct=xn,t.skipRepeatsWith=En,t.distinctBy=En,t.take=Mn,t.skip=Rn,t.slice=In,t.takeWhile=qn,t.skipWhile=Dn,t.skipAfter=zn,t.takeUntil=Gn,t.until=Gn,t.skipUntil=Hn,t.since=Hn,t.during=Jn,t.delay=ei,t.timestamp=ri,t.throttle=ui,t.debounce=di,t.fromPromise=function(t){return vi(L(t))},t.awaitPromises=vi,t.await=vi,t.recoverWith=_i,t.flatMapError=Gi,t.throwError=function(t){return new e(new bi(t))},t.multicast=Ti,t.defaultScheduler=ji,t.PropagateTask=M,t.fromEvent=function(t,n,i){var r;if("function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener)arguments.length<3&&(i=!1),r=new _t(t,n,i);else{if("function"!=typeof n.addListener||"function"!=typeof n.removeListener)throw new Error("source must support addEventListener/removeEventListener or addListener/removeListener");r=new Pt(t,n)}return new e(r)},t.unfold=function(t,n){return new e(new ie(t,n))},t.iterate=function(t,n){return new e(new ue(t,n))},t.generate=function(t){return new e(new fe(t,s(arguments)))},Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.most={})}(this,function(t){"use strict";function e(t){this.source=t}function n(t,e){var n=e.length,i=new Array(n+1);i[0]=t;for(var r=0;r<n;++r)i[r+1]=e[r];return i}function i(t,e){for(var n=e.length,i=new Array(n+1),r=0;r<n;++r)i[r]=e[r];return i[n]=t,i}function r(t,e){if(t<0)throw new TypeError("n must be >= 0");var n=e.length;return 0===t||0===n?e:t>=n?[]:o(t,e,n-t)}function o(t,e,n){for(var i=new Array(n),r=0;r<n;++r)i[r]=e[t+r];return i}function s(t){return r(1,t)}function u(t,e){for(var n=e.length,i=new Array(n),r=0;r<n;++r)i[r]=t(e[r]);return i}function h(t,e,n){if(e<0)throw new TypeError("i must be >= 0");for(var i=n.length,r=new Array(i),o=0;o<i;++o)r[o]=e===o?t:n[o];return r}function p(t,e){if(t<0)throw new TypeError("i must be >= 0");var n=e.length;return 0===n||t>=n?e:1===n?[]:c(t,e,n-1)}function c(t,e,n){var i,r=new Array(n);for(i=0;i<t;++i)r[i]=e[i];for(i=t;i<n;++i)r[i]=e[i+1];return r}function f(t,e){for(var n=e.length,i=new Array(n),r=0,o=void 0,s=0;s<n;++s)t(o=e[s])||(i[r]=o,++r);return i.length=r,i}function a(t,e){for(var n=0,i=e.length;n<i;++n)if(t===e[n])return n;return-1}function d(t){return null!=t&&"number"==typeof t.length&&"function"!=typeof t}function l(t,e){this._dispose=t,this._data=e}function y(){this.disposable=void 0,this.disposed=!1,this._resolve=void 0;var t=this;this.result=new Promise(function(e){t._resolve=e})}function v(t){return null!==t&&"object"==typeof t&&"function"==typeof t.then}function w(t,e,n){var i=g(e);return v(i)?i.catch(function(e){n.error(t,e)}):i}function k(t,e){return E(new l(t,e))}function m(){return new l(Li,void 0)}function _(t){return k(b,t)}function b(t){return Promise.all(Wi(g,t))}function g(t){try{return t.dispose()}catch(t){return Promise.reject(t)}}function x(){return new y}function E(t){return new l(A,P(t))}function A(t){return t.disposed||(t.disposed=!0,t.value=g(t.disposable),t.disposable=void 0),t.value}function P(t){return{disposed:!1,disposable:t,value:void 0}}function T(t){setTimeout(function(){throw t},0)}function M(t,e,n){this._run=t,this.value=e,this.sink=n,this.active=!0}function R(t,e,n){n.error(t,e)}function I(t,e,n){n.event(t,e)}function W(t,e,n){n.end(t,e)}function L(t){return new e(new C(t))}function C(t){this.value=t}function N(t,e,n){n.event(t,e),n.end(t,void 0)}function S(){return Ci}function q(){}function B(t){return t.dispose()}function j(){}function D(t){return new e(new V(t))}function V(t){this.array=t}function U(t,e,n){for(var i=0,r=e.length;i<r&&this.active;++i)n.event(t,e[i]);this.active&&n.end(t)}function z(t){return"function"==typeof t[Si]}function O(t){return t[Si]()}function F(t){return new e(new G(t))}function G(t){this.iterable=t}function H(t,e,n){for(var i=e.next();!i.done&&this.active;)n.event(t,i.value),i=e.next();n.end(t,i.value)}function J(t){var e=null;if(t){var n=t[Bi];if("function"==typeof n&&(!(e=n.call(t))||"function"!=typeof e.subscribe))throw new TypeError("invalid observable "+e)}return e}function K(t,e,n){try{n.event(t,e)}catch(e){n.error(t,e)}}function Q(t,e,n){try{n.end(t,e)}catch(e){n.error(t,e)}}function X(t){return new e(new Y(t))}function Y(t){this.observable=t}function Z(t,e){this.sink=t,this.scheduler=e}function $(t){return t.unsubscribe()}function tt(t){if(t instanceof e)return t;var n=J(t);if(null!=n)return X(n);if(Array.isArray(t)||d(t))return D(t);if(z(t))return F(t);throw new TypeError("from(x) must be observable, iterable, or array-like: "+t)}function et(t,e){this.period=t,this.value=e}function nt(t,e,n,i){this.time=t,this.period=e,this.task=n,this.scheduler=i,this.active=!0}function it(t){return Promise.resolve(t).then(rt)}function rt(t){try{return t.run()}catch(e){return t.error(e)}}function ot(t,e){this.timer=t,this.timeline=e,this._timer=null,this._nextArrival=1/0;var n=this;this._runReadyTasksBound=function(){n._runReadyTasks(n.now())}}function st(){}function ut(t){this.f=t,this.active=!0}function ht(t){var e=new ut(t);return it(e),e}function pt(){this.tasks=[]}function ct(t,e,n){for(var i=e.events,r=0;r<i.length;++r){var o=i[r];o.active&&(t(o),o.period>=0&&o.active&&(o.time=o.time+o.period,ft(o,n)))}return n}function ft(t,e){var n=e.length;if(0!==n){var i=dt(t.time,e);i>=n?e.push(lt(t.time,[t])):t.time===e[i].time?e[i].events.push(t):e.splice(i,0,lt(t.time,[t]))}else e.push(lt(t.time,[t]))}function at(t,e){e.events=f(t,e.events)}function dt(t,e){for(var n,i,r=0,o=e.length;r<o;){if(n=Math.floor((r+o)/2),i=e[n],t===i.time)return n;t<i.time?o=n:r=n+1}return o}function lt(t,e){return{time:t,events:e}}function yt(t,e){if(Object(t)!==t)throw new TypeError("subscriber must be an object");var n=x(),i=new vt(T,t,n);return n.setDisposable(e.source.run(i,ji)),new wt(n)}function vt(t,e,n){this.fatalError=t,this.subscriber=e,this.disposable=n}function wt(t){this.disposable=t}function kt(t,e,n){if("function"==typeof e.error)try{e.error(t)}catch(t){n(t)}else n(t)}function mt(t,e){return t(e)}function _t(t,e,n){this.event=t,this.source=e,this.capture=n}function bt(t){var e=t.target;e.source.removeEventListener(e.event,t.addEvent,e.capture)}function gt(t){this.sink=t,this.events=[],this.active=!0}function xt(t,e,n){this.sink=t,this.events=n,this.time=e}function Et(t,e,n){this.time=t,this.value=e,this.sink=n}function At(t,e,n){this.time=t,this.value=e,this.sink=n}function Pt(t,e){this.event=t,this.source=e}function Tt(t){var e=t.target;e.source.removeListener(e.event,t.addEvent)}function Mt(t){return Rt(t,ji)}function Rt(t,e){return new Promise(function(n,i){It(t,e,n,i)})}function It(t,e,n,i){var r=x(),o=new Wt(n,i,r);r.setDisposable(t.run(o,e))}function Wt(t,e,n){this._end=t,this._error=e,this._disposable=n,this.active=!0}function Lt(t,e,n,i){Promise.resolve(n.dispose()).then(function(){t(i)},e)}function Ct(t){this.sink=t}function Nt(t,e){this.p=t,this.source=e}function St(t,e){this.p=t,this.sink=e}function qt(t,e){return function(n){return t(n)&&e(n)}}function Bt(t,e,n){this.p=t,this.f=e,this.source=n}function jt(t,e,n){this.p=t,this.f=e,this.sink=n}function Dt(t,e){this.f=t,this.source=e}function Vt(t,e){this.f=t,this.sink=e}function Ut(t,n){return new e(Dt.create(t,n.source))}function zt(t,e){return Ut(function(){return t},e)}function Ot(t,n){return new e(new Ft(t,n.source))}function Ft(t,e){this.source=e,this.f=t}function Gt(t,e){this.sink=e,this.f=t}function Ht(t,e){return Jt(Ot(t,e))}function Jt(t){return Mt(t.source)}function Kt(t,n,i){return new e(new Qt(t,n,i.source))}function Qt(t,e,n){this.step=t,this.seed=e,this.source=n}function Xt(t,e,n){this.step=t,this.seed=e,this.sink=n}function Yt(t,n,i){return new e(new Zt(t,n,i.source))}function Zt(t,e,n){this.source=n,this.f=t,this.value=e}function $t(t,e,n){this.f=t,this.value=e,this.sink=n}function te(t,e,n){return Mt(new ee(t,e,n.source))}function ee(t,e,n){this.source=n,this.f=t,this.value=e}function ne(t,e,n){this.f=t,this.value=e,this.sink=n}function ie(t,e){this.f=t,this.value=e}function re(t,e,n,i){this.f=t,this.sink=n,this.scheduler=i,this.active=!0;var r=this;Promise.resolve(this).then(function(t){return oe(t,e)}).catch(function(t){r.sink.error(r.scheduler.now(),t)})}function oe(t,e){var n=t.f;return Promise.resolve(n(e)).then(function(e){return se(t,e)})}function se(t,e){return e.done?(t.sink.end(t.scheduler.now(),e.value),e.value):(t.sink.event(t.scheduler.now(),e.value),t.active?oe(t,e.seed):e.value)}function ue(t,e){this.f=t,this.value=e}function he(t,e,n,i){this.f=t,this.sink=n,this.scheduler=i,this.active=!0;var r=e,o=this;Promise.resolve(this).then(function(t){return pe(t,r)}).catch(function(t){o.sink.error(o.scheduler.now(),t)})}function pe(t,e){if(t.sink.event(t.scheduler.now(),e),!t.active)return e;var n=t.f;return Promise.resolve(n(e)).then(function(e){return ce(t,e)})}function ce(t,e){return t.active?pe(t,e):t.value}function fe(t,e){this.f=t,this.args=e}function ae(t,e,n){this.iterator=t,this.sink=e,this.scheduler=n,this.active=!0;var i=this;Promise.resolve(this).then(de).catch(function(t){i.sink.error(i.scheduler.now(),t)})}function de(t,e){return t.active?le(t,t.iterator.next(e)):e}function le(t,e){return e.done?t.sink.end(t.scheduler.now(),e.value):Promise.resolve(e.value).then(function(e){return ye(t,e)},function(e){return ve(t,e)})}function ye(t,e){return t.sink.event(t.scheduler.now(),e),de(t,e)}function ve(t,e){return le(t,t.iterator.throw(e))}function we(t,n){return new e(new ke(t,n.source))}function ke(t,e){this.f=t,this.source=e}function me(t,e,n,i){this.f=t,this.sink=n,this.scheduler=i,this.active=!0,this.disposable=E(e.run(this,i))}function _e(t,e){return be(L(t),e)}function be(t,e){return we(function(){return e},t)}function ge(t,e){this.sink=e,this.index=t,this.active=!0,this.value=void 0}function xe(t,e){switch(e.length){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]);case 5:return t(e[0],e[1],e[2],e[3],e[4]);default:return t.apply(void 0,e)}}function Ee(t){return Ae(t,Vi(arguments))}function Ae(t,n){var i=n.length;return 0===i?S():1===i?Ut(t,n[0]):new e(Pe(t,n))}function Pe(t,e){return new Me(t,Di(Te,e))}function Te(t){return t.source}function Me(t,e){this.f=t,this.sources=e}function Re(t,e,n,i){var r=this;this.sink=n,this.disposables=t,this.sinks=e,this.f=i;var o=e.length;this.awaiting=o,this.values=new Array(o),this.hasValue=new Array(o);for(var s=0;s<o;++s)r.hasValue[s]=!1;this.activeCount=e.length}function Ie(t,e){return Ee(Ii,t,e)}function We(t,n){return new e(new Le(t,n.source))}function Le(t,e){this.transducer=t,this.source=e}function Ce(t,e){this.xf=t,this.sink=e}function Ne(t){this.time=-1/0,this.sink=t}function Se(t){return"function"==typeof t["@@transducer/step"]?new qe(t):new Be(t)}function qe(t){this.tx=t}function Be(t){this.tx=t}function je(){this.head=null,this.length=0}function De(t,e){return Ve(Mi,t,e)}function Ve(t,n,i){return new e(new Ue(t,n,i.source))}function Ue(t,e,n){this.f=t,this.concurrency=e,this.source=n}function ze(t,e,n,i,r){this.f=t,this.concurrency=e,this.sink=i,this.scheduler=r,this.pending=[],this.current=new je,this.disposable=E(n.run(this,r)),this.active=!0}function Oe(t,e,n,i){return t(e).source.run(n,i)}function Fe(t,e,n){this.prev=this.next=null,this.time=t,this.outer=e,this.sink=n,this.disposable=void 0}function Ge(t,e){return Ve(t,1/0,e)}function He(t){return De(1/0,t)}function Je(t,e){return Ve(t,1,e)}function Ke(t){var n=t.length;return 0===n?S():1===n?t[0]:new e(Qe(t))}function Qe(t){return new Ye(zi(Xe,[],t))}function Xe(t,e){var n=e.source;return n instanceof Ye?t.concat(n.sources):t.concat(n)}function Ye(t){this.sources=t}function Ze(t,e,n){this.sink=n,this.disposables=t,this.activeCount=e.length}function $e(t,n){return new e(new nn(Mi,t.source,[n.source]))}function tn(t,n,i){return new e(new nn(t,n.source,u(en,i)))}function en(t){return t.source}function nn(t,e,n){this.f=t,this.sampler=e,this.sources=n}function rn(t){this.sink=t,this.hasValue=!1}function on(t,e,n){this.f=t,this.sinks=e,this.sink=n,this.active=!1}function sn(t){return t.hasValue}function un(t){return t.value}function hn(t){this._capacity=t||32,this._length=0,this._head=0}function pn(t,e,n,i,r){for(var o=0;o<r;++o)n[o+i]=t[o+e],t[o+e]=void 0}function cn(t,n){return 0===n.length?S():1===n.length?Ut(t,n[0]):new e(new an(t,Oi(fn,n)))}function fn(t){return t.source}function an(t,e){this.f=t,this.sources=e}function dn(t,e,n,i){this.f=t,this.sinks=n,this.sink=i,this.buffers=e}function ln(t,e,n,i){i.event(e,xe(t,Oi(yn,n)))}function yn(t){return t.shift()}function vn(t,e){for(var n=0,i=t.length;n<i;++n)if(t[n].isEmpty()&&!e[n].active)return!0;return!1}function wn(t){for(var e=0,n=t.length;e<n;++e)if(t[e].isEmpty())return!1;return!0}function kn(t){return new e(new mn(t.source))}function mn(t){this.source=t}function _n(t,e){this.sink=t,this.scheduler=e,this.current=null,this.ended=!1}function bn(t,e,n,i){this.min=t,this.max=e,this.outer=n,this.sink=i,this.disposable=m()}function gn(t,n){return new e(Nt.create(t,n.source))}function xn(t){return En(Tn,t)}function En(t,n){return new e(new An(t,n.source))}function An(t,e){this.equals=t,this.source=e}function Pn(t,e){this.equals=t,this.sink=e,this.value=void 0,this.init=!0}function Tn(t,e){return t===e}function Mn(t,e){return In(0,t,e)}function Rn(t,e){return In(t,1/0,e)}function In(t,n,i){return n<=t?S():new e(Wn(t,n,i.source))}function Wn(t,e,n){return n instanceof Dt?Ln(t,e,n):n instanceof Nn?Cn(t,e,n):new Nn(t,e,n)}function Ln(t,e,n){return Dt.create(n.f,Wn(t,e,n.source))}function Cn(t,e,n){return t+=n.min,e=Math.min(e+n.min,n.max),new Nn(t,e,n.source)}function Nn(t,e,n){this.source=n,this.min=t,this.max=e}function Sn(t,e,n,i){this.sink=n,this.skip=t,this.take=e,this.disposable=i}function qn(t,n){return new e(new Bn(t,n.source))}function Bn(t,e){this.p=t,this.source=e}function jn(t,e,n){this.p=t,this.sink=e,this.active=!0,this.disposable=n}function Dn(t,n){return new e(new Vn(t,n.source))}function Vn(t,e){this.p=t,this.source=e}function Un(t,e){this.p=t,this.sink=e,this.skipping=!0}function zn(t,n){return new e(new On(t,n.source))}function On(t,e){this.p=t,this.source=e}function Fn(t,e){this.p=t,this.sink=e,this.skipping=!1}function Gn(t,n){return new e(new Kn(t.source,n.source))}function Hn(t,n){return new e(new Qn(t.source,n.source))}function Jn(t,e){return Gn(He(t),Hn(t,e))}function Kn(t,e){this.maxSignal=t,this.source=e}function Qn(t,e){this.minSignal=t,this.source=e}function Xn(t,e){this.value=t,this.sink=e}function Yn(t,e,n){this.min=t,this.max=e,this.sink=n}function Zn(t,e,n){this.value=1/0,this.sink=e,this.disposable=t.run(this,n)}function $n(t,e,n){this.value=1/0,this.sink=e,this.disposable=t.run(this,n)}function ti(){}function ei(t,n){return t<=0?n:new e(new ni(t,n.source))}function ni(t,e){this.dt=t,this.source=e}function ii(t,e,n){this.dt=t,this.sink=e,this.scheduler=n}function ri(t){return new e(new oi(t.source))}function oi(t){this.source=t}function si(t){this.sink=t}function ui(t,n){return new e(hi(t,n.source))}function hi(t,e){return e instanceof Dt?pi(t,e):e instanceof fi?ci(t,e):new fi(t,e)}function pi(t,e){return Dt.create(e.f,hi(t,e.source))}function ci(t,e){return new fi(Math.max(t,e.period),e.source)}function fi(t,e){this.period=t,this.source=e}function ai(t,e){this.time=0,this.period=t,this.sink=e}function di(t,n){return new e(new li(t,n.source))}function li(t,e){this.dt=t,this.source=e}function yi(t,e,n,i){this.dt=t,this.sink=n,this.scheduler=i,this.value=void 0,this.timer=null,this.disposable=e.run(this,i)}function vi(t){return new e(new wi(t.source))}function wi(t){this.source=t}function ki(t,e){this.sink=t,this.scheduler=e,this.queue=Promise.resolve();var n=this;this._eventBound=function(t){n.sink.event(n.scheduler.now(),t)},this._endBound=function(t){n.sink.end(n.scheduler.now(),t)},this._errorBound=function(t){n.sink.error(n.scheduler.now(),t)}}function mi(t){this.sink=t,this.active=!0}function _i(t,n){return new e(new xi(t,n.source))}function bi(t){this.value=t}function gi(t,e,n){n.error(t,e)}function xi(t,e){this.f=t,this.source=e}function Ei(t,e,n,i){this.f=t,this.sink=new mi(n),this.scheduler=i,this.disposable=e.run(this,i)}function Ai(t,e,n){try{n.event(t,e)}catch(e){n.error(t,e)}}function Pi(t,e,n){try{n.end(t,e)}catch(e){n.error(t,e)}}function Ti(t){var e=t.source;return e instanceof Qi?t:new t.constructor(new Qi(e))}e.prototype.run=function(t,e){return this.source.run(t,e)};var Mi=function(t){return t},Ri=function(t,e){return function(n){return t(e(n))}},Ii=function(t,e){return t(e)};l.prototype.dispose=function(){return this._dispose(this._data)},y.prototype.setDisposable=function(t){if(void 0!==this.disposable)throw new Error("setDisposable called more than once");this.disposable=t,this.disposed&&this._resolve(t.dispose())},y.prototype.dispose=function(){return this.disposed?this.result:(this.disposed=!0,void 0!==this.disposable&&(this.result=this.disposable.dispose()),this.result)};var Wi=u,Li=Mi;M.event=function(t,e){return new M(I,t,e)},M.end=function(t,e){return new M(W,t,e)},M.error=function(t,e){return new M(R,t,e)},M.prototype.dispose=function(){this.active=!1},M.prototype.run=function(t){this.active&&this._run(t,this.value,this.sink)},M.prototype.error=function(t,e){if(!this.active)return T(e);this.sink.error(t,e)},C.prototype.run=function(t,e){return e.asap(new M(N,this.value,t))},q.prototype.run=function(t,e){var n=M.end(void 0,t);return e.asap(n),k(B,n)};var Ci=new e(new q);j.prototype.run=function(){return m()};var Ni=new e(new j);V.prototype.run=function(t,e){return e.asap(new M(U,this.array,t))};var Si;Si="function"==typeof Set&&"function"==typeof(new Set)["@@iterator"]?"@@iterator":"function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_",G.prototype.run=function(t,e){return e.asap(new M(H,O(this.iterable),t))};var qi,Bi=function(t){var e,n=t.Symbol;return"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}(qi="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")());Y.prototype.run=function(t,e){var n=this.observable.subscribe(new Z(t,e));if("function"==typeof n)return k(n);if(n&&"function"==typeof n.unsubscribe)return k($,n);throw new TypeError("Observable returned invalid subscription "+String(n))},Z.prototype.next=function(t){K(this.scheduler.now(),t,this.sink)},Z.prototype.complete=function(t){Q(this.scheduler.now(),t,this.sink)},Z.prototype.error=function(t){this.sink.error(this.scheduler.now(),t)},et.prototype.run=function(t,e){return e.periodic(this.period,M.event(this.value,t))},nt.prototype.run=function(){return this.task.run(this.time)},nt.prototype.error=function(t){return this.task.error(this.time,t)},nt.prototype.dispose=function(){return this.scheduler.cancel(this),this.task.dispose()},ot.prototype.now=function(){return this.timer.now()},ot.prototype.asap=function(t){return this.schedule(0,-1,t)},ot.prototype.delay=function(t,e){return this.schedule(t,-1,e)},ot.prototype.periodic=function(t,e){return this.schedule(0,t,e)},ot.prototype.schedule=function(t,e,n){var i=this.now(),r=new nt(i+Math.max(0,t),e,n,this);return this.timeline.add(r),this._scheduleNextRun(i),r},ot.prototype.cancel=function(t){t.active=!1,this.timeline.remove(t)&&this._reschedule()},ot.prototype.cancelAll=function(t){this.timeline.removeAll(t),this._reschedule()},ot.prototype._reschedule=function(){this.timeline.isEmpty()?this._unschedule():this._scheduleNextRun(this.now())},ot.prototype._unschedule=function(){this.timer.clearTimer(this._timer),this._timer=null},ot.prototype._scheduleNextRun=function(t){if(!this.timeline.isEmpty()){var e=this.timeline.nextArrival();null===this._timer?this._scheduleNextArrival(e,t):e<this._nextArrival&&(this._unschedule(),this._scheduleNextArrival(e,t))}},ot.prototype._scheduleNextArrival=function(t,e){this._nextArrival=t;var n=Math.max(0,t-e);this._timer=this.timer.setTimer(this._runReadyTasksBound,n)},ot.prototype._runReadyTasks=function(t){this._timer=null,this.timeline.runTasks(t,rt),this._scheduleNextRun(this.now())},st.prototype.now=Date.now,st.prototype.setTimer=function(t,e){return e<=0?ht(t):setTimeout(t,e)},st.prototype.clearTimer=function(t){return t instanceof ut?t.cancel():clearTimeout(t)},ut.prototype.run=function(){return this.active&&this.f()},ut.prototype.error=function(t){throw t},ut.prototype.cancel=function(){this.active=!1},pt.prototype.nextArrival=function(){return this.isEmpty()?1/0:this.tasks[0].time},pt.prototype.isEmpty=function(){return 0===this.tasks.length},pt.prototype.add=function(t){ft(t,this.tasks)},pt.prototype.remove=function(t){var e=dt(t.time,this.tasks);if(e>=0&&e<this.tasks.length){var n=a(t,this.tasks[e].events);if(n>=0)return this.tasks[e].events.splice(n,1),!0}return!1},pt.prototype.removeAll=function(t){for(var e=this,n=0,i=this.tasks.length;n<i;++n)at(t,e.tasks[n])},pt.prototype.runTasks=function(t,e){for(var n=this,i=this.tasks,r=i.length,o=0;o<r&&i[o].time<=t;)++o;this.tasks=i.slice(o);for(var s=0;s<o;++s)n.tasks=ct(e,i[s],n.tasks)};var ji=new ot(new st,new pt);vt.prototype.event=function(t,e){this.disposable.disposed||"function"!=typeof this.subscriber.next||this.subscriber.next(e)},vt.prototype.end=function(t,e){if(!this.disposable.disposed){var n=this.subscriber,i=this.fatalError;Promise.resolve(this.disposable.dispose()).then(function(){"function"==typeof n.complete&&n.complete(e)}).catch(function(t){kt(t,n,i)})}},vt.prototype.error=function(t,e){var n=this.subscriber,i=this.fatalError;Promise.resolve(this.disposable.dispose()).then(function(){kt(e,n,i)})},wt.prototype.unsubscribe=function(){this.disposable.dispose()},_t.prototype.run=function(t,e){function n(n){K(e.now(),n,t)}return this.source.addEventListener(this.event,n,this.capture),k(bt,{target:this,addEvent:n})},gt.prototype.event=function(t,e){this.active&&(0===this.events.length&&it(new xt(this.sink,t,this.events)),this.events.push({time:t,value:e}))},gt.prototype.end=function(t,e){this.active&&this._end(new Et(t,e,this.sink))},gt.prototype.error=function(t,e){this._end(new At(t,e,this.sink))},gt.prototype._end=function(t){this.active=!1,it(t)},xt.prototype.run=function(){for(var t,e=this,n=this.events,i=this.sink,r=0,o=n.length;r<o;++r)t=n[r],e.time=t.time,i.event(t.time,t.value);n.length=0},xt.prototype.error=function(t){this.sink.error(this.time,t)},Et.prototype.run=function(){this.sink.end(this.time,this.value)},Et.prototype.error=function(t){this.sink.error(this.time,t)},At.prototype.run=function(){this.sink.error(this.time,this.value)},At.prototype.error=function(t){throw t},Pt.prototype.run=function(t,e){function n(t){var n=arguments,r=arguments.length;if(r>1){for(var o=new Array(r),s=0;s<r;++s)o[s]=n[s];K(e.now(),o,i)}else K(e.now(),t,i)}var i=new gt(t);return this.source.addListener(this.event,n),k(Tt,{target:this,addEvent:n})},Wt.prototype.event=function(t,e){},Wt.prototype.end=function(t,e){this.active&&(this.active=!1,Lt(this._end,this._error,this._disposable,e))},Wt.prototype.error=function(t,e){this.active=!1,Lt(this._error,this._error,this._disposable,e)},Ct.prototype.event=function(t,e){return this.sink.event(t,e)},Ct.prototype.end=function(t,e){return this.sink.end(t,e)},Ct.prototype.error=function(t,e){return this.sink.error(t,e)},Nt.create=function(t,e){return e instanceof Nt?new Nt(qt(e.p,t),e.source):new Nt(t,e)},Nt.prototype.run=function(t,e){return this.source.run(new St(this.p,t),e)},St.prototype.end=Ct.prototype.end,St.prototype.error=Ct.prototype.error,St.prototype.event=function(t,e){(0,this.p)(e)&&this.sink.event(t,e)},Bt.prototype.run=function(t,e){return this.source.run(new jt(this.p,this.f,t),e)},jt.prototype.event=function(t,e){var n=this.f;(0,this.p)(e)&&this.sink.event(t,n(e))},jt.prototype.end=Ct.prototype.end,jt.prototype.error=Ct.prototype.error,Dt.create=function(t,e){return e instanceof Dt?new Dt(Ri(t,e.f),e.source):e instanceof Nt?new Bt(e.p,t,e.source):new Dt(t,e)},Dt.prototype.run=function(t,e){return this.source.run(new Vt(this.f,t),e)},Vt.prototype.end=Ct.prototype.end,Vt.prototype.error=Ct.prototype.error,Vt.prototype.event=function(t,e){var n=this.f;this.sink.event(t,n(e))},Ft.prototype.run=function(t,e){return this.source.run(new Gt(this.f,t),e)},Gt.prototype.end=Ct.prototype.end,Gt.prototype.error=Ct.prototype.error,Gt.prototype.event=function(t,e){(0,this.f)(e),this.sink.event(t,e)},Qt.prototype.run=function(t,e){return this.source.run(new Xt(this.step,this.seed,t),e)},Xt.prototype.error=Ct.prototype.error,Xt.prototype.event=function(t,e){var n=this.step(this.seed,e);this.seed=n.seed,this.sink.event(t,n.value)},Xt.prototype.end=function(t){this.sink.end(t,this.seed)},Zt.prototype.run=function(t,e){return _([e.asap(M.event(this.value,t)),this.source.run(new $t(this.f,this.value,t),e)])},$t.prototype.event=function(t,e){var n=this.f;this.value=n(this.value,e),this.sink.event(t,this.value)},$t.prototype.error=Ct.prototype.error,$t.prototype.end=Ct.prototype.end,ee.prototype.run=function(t,e){return this.source.run(new ne(this.f,this.value,t),e)},ne.prototype.event=function(t,e){var n=this.f;this.value=n(this.value,e),this.sink.event(t,this.value)},ne.prototype.error=Ct.prototype.error,ne.prototype.end=function(t){this.sink.end(t,this.value)},ie.prototype.run=function(t,e){return new re(this.f,this.value,t,e)},re.prototype.dispose=function(){this.active=!1},ue.prototype.run=function(t,e){return new he(this.f,this.value,t,e)},he.prototype.dispose=function(){this.active=!1},fe.prototype.run=function(t,e){return new ae(this.f.apply(void 0,this.args),t,e)},ae.prototype.dispose=function(){this.active=!1},ke.prototype.run=function(t,e){return new me(this.f,this.source,t,e)},me.prototype.error=Ct.prototype.error,me.prototype.event=function(t,e){this.active&&this.sink.event(t,e)},me.prototype.end=function(t,e){this.active&&(w(t,this.disposable,this.sink),this._startNext(t,e,this.sink))},me.prototype._startNext=function(t,e,n){try{this.disposable=this._continue(this.f,e,n)}catch(e){n.error(t,e)}},me.prototype._continue=function(t,e,n){return t(e).source.run(n,this.scheduler)},me.prototype.dispose=function(){return this.active=!1,this.disposable.dispose()},ge.prototype.event=function(t,e){this.active&&(this.value=e,this.sink.event(t,this))},ge.prototype.end=function(t,e){this.active&&(this.active=!1,this.sink.end(t,{index:this.index,value:e}))},ge.prototype.error=Ct.prototype.error;var Di=u,Vi=s;Me.prototype.run=function(t,e){for(var n,i=this,r=this.sources.length,o=new Array(r),s=new Array(r),u=new Re(o,s,t,this.f),h=0;h<r;++h)n=s[h]=new ge(h,u),o[h]=i.sources[h].run(n,e);return _(o)},Re.prototype.error=Ct.prototype.error,Re.prototype.event=function(t,e){var n=e.index,i=this._updateReady(n);this.values[n]=e.value,0===i&&this.sink.event(t,xe(this.f,this.values))},Re.prototype._updateReady=function(t){return this.awaiting>0&&(this.hasValue[t]||(this.hasValue[t]=!0,this.awaiting-=1)),this.awaiting},Re.prototype.end=function(t,e){w(t,this.disposables[e.index],this.sink),0==--this.activeCount&&this.sink.end(t,e.value)},Le.prototype.run=function(t,e){var n=this.transducer(new Ne(t));return this.source.run(new Ce(Se(n),t),e)},Ce.prototype.event=function(t,e){var n=this.xf.step(t,e);return this.xf.isReduced(n)?this.sink.end(t,this.xf.getResult(n)):n},Ce.prototype.end=function(t,e){return this.xf.result(e)},Ce.prototype.error=function(t,e){return this.sink.error(t,e)},Ne.prototype["@@transducer/init"]=Ne.prototype.init=function(){},Ne.prototype["@@transducer/step"]=Ne.prototype.step=function(t,e){return isNaN(t)||(this.time=Math.max(t,this.time)),this.sink.event(this.time,e)},Ne.prototype["@@transducer/result"]=Ne.prototype.result=function(t){return this.sink.end(this.time,t)},qe.prototype.step=function(t,e){return this.tx["@@transducer/step"](t,e)},qe.prototype.result=function(t){return this.tx["@@transducer/result"](t)},qe.prototype.isReduced=function(t){return null!=t&&t["@@transducer/reduced"]},qe.prototype.getResult=function(t){return t["@@transducer/value"]},Be.prototype.step=function(t,e){return this.tx.step(t,e)},Be.prototype.result=function(t){return this.tx.result(t)},Be.prototype.isReduced=function(t){return null!=t&&t.__transducers_reduced__},Be.prototype.getResult=function(t){return t.value},je.prototype.add=function(t){null!==this.head&&(this.head.prev=t,t.next=this.head),this.head=t,++this.length},je.prototype.remove=function(t){--this.length,t===this.head&&(this.head=this.head.next),null!==t.next&&(t.next.prev=t.prev,t.next=null),null!==t.prev&&(t.prev.next=t.next,t.prev=null)},je.prototype.isEmpty=function(){return 0===this.length},je.prototype.dispose=function(){if(this.isEmpty())return Promise.resolve();var t=[],e=this.head;for(this.head=null,this.length=0;null!==e;)t.push(e.dispose()),e=e.next;return Promise.all(t)},Ue.prototype.run=function(t,e){return new ze(this.f,this.concurrency,this.source,t,e)},ze.prototype.event=function(t,e){this._addInner(t,e)},ze.prototype._addInner=function(t,e){this.current.length<this.concurrency?this._startInner(t,e):this.pending.push(e)},ze.prototype._startInner=function(t,e){try{this._initInner(t,e)}catch(e){this.error(t,e)}},ze.prototype._initInner=function(t,e){var n=new Fe(t,this,this.sink);n.disposable=Oe(this.f,e,n,this.scheduler),this.current.add(n)},ze.prototype.end=function(t,e){this.active=!1,w(t,this.disposable,this.sink),this._checkEnd(t,e)},ze.prototype.error=function(t,e){this.active=!1,this.sink.error(t,e)},ze.prototype.dispose=function(){return this.active=!1,this.pending.length=0,Promise.all([this.disposable.dispose(),this.current.dispose()])},ze.prototype._endInner=function(t,e,n){this.current.remove(n),w(t,n,this),0===this.pending.length?this._checkEnd(t,e):this._startInner(t,this.pending.shift())},ze.prototype._checkEnd=function(t,e){!this.active&&this.current.isEmpty()&&this.sink.end(t,e)},Fe.prototype.event=function(t,e){this.sink.event(Math.max(t,this.time),e)},Fe.prototype.end=function(t,e){this.outer._endInner(Math.max(t,this.time),e,this)},Fe.prototype.error=function(t,e){this.outer.error(Math.max(t,this.time),e)},Fe.prototype.dispose=function(){return this.disposable.dispose()};var Ui=function(t){for(var e=t.length,n=new Array(e),i=0;i<e;++i)n[i]=t[i];return n},zi=function(t,e,n){for(var i=e,r=0,o=n.length;r<o;++r)i=t(i,n[r],r);return i};Ye.prototype.run=function(t,e){for(var n,i=this,r=this.sources.length,o=new Array(r),s=new Array(r),u=new Ze(o,s,t),h=0;h<r;++h)n=s[h]=new ge(h,u),o[h]=i.sources[h].run(n,e);return _(o)},Ze.prototype.error=Ct.prototype.error,Ze.prototype.event=function(t,e){this.sink.event(t,e.value)},Ze.prototype.end=function(t,e){w(t,this.disposables[e.index],this.sink),0==--this.activeCount&&this.sink.end(t,e.value)},nn.prototype.run=function(t,e){for(var n,i=this,r=this.sources.length,o=new Array(r+1),s=new Array(r),u=new on(this.f,s,t),h=0;h<r;++h)n=s[h]=new rn(u),o[h]=i.sources[h].run(n,e);return o[h]=this.sampler.run(u,e),_(o)},rn.prototype.event=function(t,e){this.value=e,this.hasValue=!0,this.sink._notify(this)},rn.prototype.end=function(){},rn.prototype.error=Ct.prototype.error,on.prototype._notify=function(){this.active||(this.active=this.sinks.every(sn))},on.prototype.event=function(t){this.active&&this.sink.event(t,xe(this.f,u(un,this.sinks)))},on.prototype.end=Ct.prototype.end,on.prototype.error=Ct.prototype.error,hn.prototype.push=function(t){var e=this._length;this._checkCapacity(e+1),this[this._head+e&this._capacity-1]=t,this._length=e+1},hn.prototype.shift=function(){var t=this._head,e=this[t];return this[t]=void 0,this._head=t+1&this._capacity-1,this._length--,e},hn.prototype.isEmpty=function(){return 0===this._length},hn.prototype.length=function(){return this._length},hn.prototype._checkCapacity=function(t){this._capacity<t&&this._ensureCapacity(this._capacity<<1)},hn.prototype._ensureCapacity=function(t){var e=this._capacity;this._capacity=t;var n=this._head+this._length;n>e&&pn(this,0,this,e,n&e-1)};var Oi=u,Fi=s;an.prototype.run=function(t,e){for(var n,i=this,r=this.sources.length,o=new Array(r),s=new Array(r),u=new Array(r),h=new dn(this.f,u,s,t),p=0;p<r;++p)u[p]=new hn,n=s[p]=new ge(p,h),o[p]=i.sources[p].run(n,e);return _(o)},dn.prototype.event=function(t,e){var n=this.buffers,i=n[e.index];if(i.push(e.value),1===i.length()){if(!wn(this.buffers))return;ln(this.f,t,n,this.sink),vn(this.buffers,this.sinks)&&this.sink.end(t,void 0)}},dn.prototype.end=function(t,e){this.buffers[e.index].isEmpty()&&this.sink.end(t,e.value)},dn.prototype.error=Ct.prototype.error,mn.prototype.run=function(t,e){var n=new _n(t,e);return _([n,this.source.run(n,e)])},_n.prototype.event=function(t,e){this._disposeCurrent(t),this.current=new bn(t,1/0,this,this.sink),this.current.disposable=e.source.run(this.current,this.scheduler)},_n.prototype.end=function(t,e){this.ended=!0,this._checkEnd(t,e)},_n.prototype.error=function(t,e){this.ended=!0,this.sink.error(t,e)},_n.prototype.dispose=function(){return this._disposeCurrent(this.scheduler.now())},_n.prototype._disposeCurrent=function(t){if(null!==this.current)return this.current._dispose(t)},_n.prototype._disposeInner=function(t,e){e._dispose(t),e===this.current&&(this.current=null)},_n.prototype._checkEnd=function(t,e){this.ended&&null===this.current&&this.sink.end(t,e)},_n.prototype._endInner=function(t,e,n){this._disposeInner(t,n),this._checkEnd(t,e)},_n.prototype._errorInner=function(t,e,n){this._disposeInner(t,n),this.sink.error(t,e)},bn.prototype.event=function(t,e){t<this.max&&this.sink.event(Math.max(t,this.min),e)},bn.prototype.end=function(t,e){this.outer._endInner(Math.max(t,this.min),e,this)},bn.prototype.error=function(t,e){this.outer._errorInner(Math.max(t,this.min),e,this)},bn.prototype._dispose=function(t){this.max=t,w(t,this.disposable,this.sink)},An.prototype.run=function(t,e){return this.source.run(new Pn(this.equals,t),e)},Pn.prototype.end=Ct.prototype.end,Pn.prototype.error=Ct.prototype.error,Pn.prototype.event=function(t,e){this.init?(this.init=!1,this.value=e,this.sink.event(t,e)):this.equals(this.value,e)||(this.value=e,this.sink.event(t,e))},Nn.prototype.run=function(t,e){var n=x(),i=new Sn(this.min,this.max-this.min,t,n);return n.setDisposable(this.source.run(i,e)),n},Sn.prototype.end=Ct.prototype.end,Sn.prototype.error=Ct.prototype.error,Sn.prototype.event=function(t,e){this.skip>0?this.skip-=1:0!==this.take&&(this.take-=1,this.sink.event(t,e),0===this.take&&(this.disposable.dispose(),this.sink.end(t,e)))},Bn.prototype.run=function(t,e){var n=x(),i=new jn(this.p,t,n);return n.setDisposable(this.source.run(i,e)),n},jn.prototype.end=Ct.prototype.end,jn.prototype.error=Ct.prototype.error,jn.prototype.event=function(t,e){if(this.active){var n=this.p;this.active=n(e),this.active?this.sink.event(t,e):(this.disposable.dispose(),this.sink.end(t,e))}},Vn.prototype.run=function(t,e){return this.source.run(new Un(this.p,t),e)},Un.prototype.end=Ct.prototype.end,Un.prototype.error=Ct.prototype.error,Un.prototype.event=function(t,e){if(this.skipping){var n=this.p;if(this.skipping=n(e),this.skipping)return}this.sink.event(t,e)},On.prototype.run=function(t,e){return this.source.run(new Fn(this.p,t),e)},Fn.prototype.event=function(t,e){if(!this.skipping){var n=this.p;this.skipping=n(e),this.sink.event(t,e),this.skipping&&this.sink.end(t,e)}},Fn.prototype.end=Ct.prototype.end,Fn.prototype.error=Ct.prototype.error,Kn.prototype.run=function(t,e){var n=new Xn(-1/0,t),i=new $n(this.maxSignal,t,e);return _([n,i,this.source.run(new Yn(n,i,t),e)])},Qn.prototype.run=function(t,e){var n=new Zn(this.minSignal,t,e),i=new Xn(1/0,t);return _([n,i,this.source.run(new Yn(n,i,t),e)])},Xn.prototype.error=Ct.prototype.error,Xn.prototype.event=ti,Xn.prototype.end=ti,Xn.prototype.dispose=ti,Yn.prototype.event=function(t,e){t>=this.min.value&&t<this.max.value&&this.sink.event(t,e)},Yn.prototype.error=Ct.prototype.error,Yn.prototype.end=Ct.prototype.end,Zn.prototype.event=function(t){t<this.value&&(this.value=t)},Zn.prototype.end=ti,Zn.prototype.error=Ct.prototype.error,Zn.prototype.dispose=function(){return this.disposable.dispose()},$n.prototype.event=function(t,e){t<this.value&&(this.value=t,this.sink.end(t,e))},$n.prototype.end=ti,$n.prototype.error=Ct.prototype.error,$n.prototype.dispose=function(){return this.disposable.dispose()},ni.prototype.run=function(t,e){var n=new ii(this.dt,t,e);return _([n,this.source.run(n,e)])},ii.prototype.dispose=function(){var t=this;this.scheduler.cancelAll(function(e){return e.task.sink===t.sink})},ii.prototype.event=function(t,e){this.scheduler.delay(this.dt,M.event(e,this.sink))},ii.prototype.end=function(t,e){this.scheduler.delay(this.dt,M.end(e,this.sink))},ii.prototype.error=Ct.prototype.error,oi.prototype.run=function(t,e){return this.source.run(new si(t),e)},si.prototype.end=Ct.prototype.end,si.prototype.error=Ct.prototype.error,si.prototype.event=function(t,e){this.sink.event(t,{time:t,value:e})},fi.prototype.run=function(t,e){return this.source.run(new ai(this.period,t),e)},ai.prototype.event=function(t,e){t>=this.time&&(this.time=t+this.period,this.sink.event(t,e))},ai.prototype.end=Ct.prototype.end,ai.prototype.error=Ct.prototype.error,li.prototype.run=function(t,e){return new yi(this.dt,this.source,t,e)},yi.prototype.event=function(t,e){this._clearTimer(),this.value=e,this.timer=this.scheduler.delay(this.dt,M.event(e,this.sink))},yi.prototype.end=function(t,e){this._clearTimer()&&(this.sink.event(t,this.value),this.value=void 0),this.sink.end(t,e)},yi.prototype.error=function(t,e){this._clearTimer(),this.sink.error(t,e)},yi.prototype.dispose=function(){return this._clearTimer(),this.disposable.dispose()},yi.prototype._clearTimer=function(){return null!==this.timer&&(this.timer.dispose(),this.timer=null,!0)},wi.prototype.run=function(t,e){return this.source.run(new ki(t,e),e)},ki.prototype.event=function(t,e){var n=this;this.queue=this.queue.then(function(){return n._event(e)}).catch(this._errorBound)},ki.prototype.end=function(t,e){var n=this;this.queue=this.queue.then(function(){return n._end(e)}).catch(this._errorBound)},ki.prototype.error=function(t,e){var n=this;this.queue=this.queue.then(function(){return n._errorBound(e)}).catch(T)},ki.prototype._event=function(t){return t.then(this._eventBound)},ki.prototype._end=function(t){return Promise.resolve(t).then(this._endBound)},mi.prototype.event=function(t,e){this.active&&this.sink.event(t,e)},mi.prototype.end=function(t,e){this.active&&(this.disable(),this.sink.end(t,e))},mi.prototype.error=function(t,e){this.disable(),this.sink.error(t,e)},mi.prototype.disable=function(){return this.active=!1,this.sink};var Gi=_i;bi.prototype.run=function(t,e){return e.asap(new M(gi,this.value,t))},xi.prototype.run=function(t,e){return new Ei(this.f,this.source,t,e)},Ei.prototype.event=function(t,e){K(t,e,this.sink)},Ei.prototype.end=function(t,e){Q(t,e,this.sink)},Ei.prototype.error=function(t,e){var n=this.sink.disable();w(t,this.disposable,this.sink),this._startNext(t,e,n)},Ei.prototype._startNext=function(t,e,n){try{this.disposable=this._continue(this.f,e,n)}catch(e){n.error(t,e)}},Ei.prototype._continue=function(t,e,n){return t(e).source.run(n,this.scheduler)},Ei.prototype.dispose=function(){return this.disposable.dispose()};var Hi=function(t,e){this.source=t,this.sink=e,this.disposed=!1};Hi.prototype.dispose=function(){if(!this.disposed)return this.disposed=!0,0===this.source.remove(this.sink)&&this.source._dispose()};var Ji=function(t){return t.dispose()},Ki={dispose:function(){}},Qi=function(t){this.source=t,this.sinks=[],this._disposable=Ki};Qi.prototype.run=function(t,e){return 1===this.add(t)&&(this._disposable=this.source.run(this,e)),new Hi(this,t)},Qi.prototype._dispose=function(){var t=this._disposable;return this._disposable=Ki,Promise.resolve(t).then(Ji)},Qi.prototype.add=function(t){return this.sinks=i(t,this.sinks),this.sinks.length},Qi.prototype.remove=function(t){var e=a(t,this.sinks);return e>=0&&(this.sinks=p(e,this.sinks)),this.sinks.length},Qi.prototype.event=function(t,e){var n=this.sinks;if(1===n.length)return n[0].event(t,e);for(var i=0;i<n.length;++i)Ai(t,e,n[i])},Qi.prototype.end=function(t,e){for(var n=this.sinks,i=0;i<n.length;++i)Pi(t,e,n[i])},Qi.prototype.error=function(t,e){for(var n=this.sinks,i=0;i<n.length;++i)n[i].error(t,e)},e.of=L,e.empty=S,e.from=tt,e.prototype.subscribe=function(t){return yt(t,this)},e.prototype[Bi]=function(){return this},e.prototype.thru=function(t){return mt(t,this)},e.prototype.observe=e.prototype.forEach=function(t){return Ht(t,this)},e.prototype.drain=function(){return Jt(this)},e.prototype.loop=function(t,e){return Kt(t,e,this)},e.prototype.scan=function(t,e){return Yt(t,e,this)},e.prototype.reduce=function(t,e){return te(t,e,this)},e.prototype.concat=function(t){return be(this,t)},e.prototype.startWith=function(t){return _e(t,this)},e.prototype.map=function(t){return Ut(t,this)},e.prototype.ap=function(t){return Ie(this,t)},e.prototype.constant=function(t){return zt(t,this)},e.prototype.tap=function(t){return Ot(t,this)},e.prototype.transduce=function(t){return We(t,this)},e.prototype.chain=function(t){return Ge(t,this)},e.prototype.flatMap=e.prototype.chain,e.prototype.join=function(){return He(this)},e.prototype.continueWith=function(t){return we(t,this)},e.prototype.flatMapEnd=e.prototype.continueWith,e.prototype.concatMap=function(t){return Je(t,this)},e.prototype.mergeConcurrently=function(t){return De(t,this)},e.prototype.merge=function(){return Ke(n(this,arguments))},e.prototype.combine=function(t){return Ae(t,h(this,0,arguments))},e.prototype.sampleWith=function(t){return $e(t,this)},e.prototype.sample=function(t){return tn(t,this,s(arguments))},e.prototype.zip=function(t){return cn(t,h(this,0,arguments))},e.prototype.switchLatest=function(){return kn(this)},e.prototype.switch=e.prototype.switchLatest,e.prototype.filter=function(t){return gn(t,this)},e.prototype.skipRepeats=function(){return xn(this)},e.prototype.skipRepeatsWith=function(t){return En(t,this)},e.prototype.take=function(t){return Mn(t,this)},e.prototype.skip=function(t){return Rn(t,this)},e.prototype.slice=function(t,e){return In(t,e,this)},e.prototype.takeWhile=function(t){return qn(t,this)},e.prototype.skipWhile=function(t){return Dn(t,this)},e.prototype.skipAfter=function(t){return zn(t,this)},e.prototype.until=function(t){return Gn(t,this)},e.prototype.takeUntil=e.prototype.until,e.prototype.since=function(t){return Hn(t,this)},e.prototype.skipUntil=e.prototype.since,e.prototype.during=function(t){return Jn(t,this)},e.prototype.delay=function(t){return ei(t,this)},e.prototype.timestamp=function(){return ri(this)},e.prototype.throttle=function(t){return ui(t,this)},e.prototype.debounce=function(t){return di(t,this)},e.prototype.awaitPromises=function(){return vi(this)},e.prototype.await=e.prototype.awaitPromises,e.prototype.recoverWith=function(t){return Gi(t,this)},e.prototype.flatMapError=e.prototype.recoverWith,e.prototype.multicast=function(){return Ti(this)},t.Stream=e,t.of=L,t.just=L,t.empty=S,t.never=function(){return Ni},t.from=tt,t.periodic=function(t,n){return new e(new et(t,n))},t.observe=Ht,t.forEach=Ht,t.drain=Jt,t.loop=Kt,t.scan=Yt,t.reduce=te,t.concat=be,t.startWith=_e,t.map=Ut,t.constant=zt,t.tap=Ot,t.ap=Ie,t.transduce=We,t.flatMap=Ge,t.chain=Ge,t.join=He,t.continueWith=we,t.flatMapEnd=we,t.concatMap=Je,t.mergeConcurrently=De,t.merge=function(){return Ke(Ui(arguments))},t.mergeArray=Ke,t.combine=Ee,t.combineArray=Ae,t.sample=function(t,e){return tn(t,e,r(2,arguments))},t.sampleArray=tn,t.sampleWith=$e,t.zip=function(t){return cn(t,Fi(arguments))},t.zipArray=cn,t.switchLatest=kn,t.switch=kn,t.filter=gn,t.skipRepeats=xn,t.distinct=xn,t.skipRepeatsWith=En,t.distinctBy=En,t.take=Mn,t.skip=Rn,t.slice=In,t.takeWhile=qn,t.skipWhile=Dn,t.skipAfter=zn,t.takeUntil=Gn,t.until=Gn,t.skipUntil=Hn,t.since=Hn,t.during=Jn,t.delay=ei,t.timestamp=ri,t.throttle=ui,t.debounce=di,t.fromPromise=function(t){return vi(L(t))},t.awaitPromises=vi,t.await=vi,t.recoverWith=_i,t.flatMapError=Gi,t.throwError=function(t){return new e(new bi(t))},t.multicast=Ti,t.defaultScheduler=ji,t.PropagateTask=M,t.fromEvent=function(t,n,i){var r;if("function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener)arguments.length<3&&(i=!1),r=new _t(t,n,i);else{if("function"!=typeof n.addListener||"function"!=typeof n.removeListener)throw new Error("source must support addEventListener/removeEventListener or addListener/removeListener");r=new Pt(t,n)}return new e(r)},t.unfold=function(t,n){return new e(new ie(t,n))},t.iterate=function(t,n){return new e(new ue(t,n))},t.generate=function(t){return new e(new fe(t,s(arguments)))},Object.defineProperty(t,"__esModule",{value:!0})}); |
@@ -59,4 +59,4 @@ 'use strict'; | ||
var self = this; | ||
this.scheduler.cancelAll(function (task) { | ||
return task.sink === self.sink; | ||
this.scheduler.cancelAll(function (scheduledTask) { | ||
return scheduledTask.task.sink === self.sink; | ||
}); | ||
@@ -63,0 +63,0 @@ }; |
{ | ||
"name": "most", | ||
"version": "1.7.0", | ||
"version": "1.7.1", | ||
"description": "Monadic streams", | ||
@@ -16,4 +16,4 @@ "typings": "type-definitions/most.d.ts", | ||
"scripts": { | ||
"unit-test": "buster-test", | ||
"test": "eslint src test && npm run unit-test && npm run doctest", | ||
"test:unit": "buster-test", | ||
"test": "eslint test/flow src test && flow check && npm run test:unit && npm run doctest", | ||
"build": "npm run build:dist && npm run build:min && npm run build:flow", | ||
@@ -58,2 +58,3 @@ "build:dist": "rimraf lib dist && buba src -o lib && rollup -c", | ||
"eslint": "^3.12.1", | ||
"flow-bin": "^0.54.1", | ||
"markdown-doctest": "^0.9.1", | ||
@@ -60,0 +61,0 @@ "rimraf": "^2.5.4", |
@@ -38,4 +38,4 @@ /** @license MIT License (c) copyright 2010-2016 original author or authors */ | ||
var self = this | ||
this.scheduler.cancelAll(function (task) { | ||
return task.sink === self.sink | ||
this.scheduler.cancelAll(function (scheduledTask) { | ||
return scheduledTask.task.sink === self.sink | ||
}) | ||
@@ -42,0 +42,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
709117
15