UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

102 lines 177 kB
/** @license Apache License 2.0 https://github.com/ReactiveX/RxJS/blob/master/LICENSE.txt **/ (function(w){"object"===typeof exports&&"undefined"!==typeof module?module.exports=w():"function"===typeof define&&define.amd?define([],w):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).Rx=w()})(function(){return function a(b,f,h){function k(e,c){if(!f[e]){if(!b[e]){var d="function"==typeof require&&require;if(!c&&d)return d(e,!0);if(l)return l(e,!0);d=Error("Cannot find module '"+e+"'");throw d.code="MODULE_NOT_FOUND",d;}d=f[e]={exports:{}}; b[e][0].call(d.exports,function(a){var d=b[e][1][a];return k(d?d:a)},d,d.exports,a,b,f,h)}return f[e].exports}for(var l="function"==typeof require&&require,g=0;g<h.length;g++)k(h[g]);return k}({1:[function(a,b,f){var h=this&&this.__extends||function(a,b){function g(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(g.prototype=b.prototype,new g)};a=function(a){function b(){a.apply(this,arguments);this.value=null;this.hasNext=!1}h(b,a);b.prototype._subscribe= function(b){this.hasCompleted&&this.hasNext&&b.next(this.value);return a.prototype._subscribe.call(this,b)};b.prototype._next=function(a){this.value=a;this.hasNext=!0};b.prototype._complete=function(){var a=-1,e=this.observers,c=e.length;this.isUnsubscribed=!0;if(this.hasNext)for(;++a<c;){var d=e[a];d.next(this.value);d.complete()}else for(;++a<c;)e[a].complete();this.isUnsubscribed=!1;this.unsubscribe()};return b}(a("./Subject").Subject);f.AsyncSubject=a},{"./Subject":11}],2:[function(a,b,f){var h= this&&this.__extends||function(a,e){function c(){this.constructor=a}for(var d in e)e.hasOwnProperty(d)&&(a[d]=e[d]);a.prototype=null===e?Object.create(e):(c.prototype=e.prototype,new c)};b=a("./Subject");var k=a("./util/throwError"),l=a("./util/ObjectUnsubscribedError");a=function(a){function e(c){a.call(this);this._value=c}h(e,a);e.prototype.getValue=function(){if(this.hasErrored)k.throwError(this.errorValue);else if(this.isUnsubscribed)k.throwError(new l.ObjectUnsubscribedError);else return this._value}; Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0});e.prototype._subscribe=function(c){var d=a.prototype._subscribe.call(this,c);d&&!d.isUnsubscribed&&c.next(this._value);return d};e.prototype._next=function(c){a.prototype._next.call(this,this._value=c)};e.prototype._error=function(c){this.hasErrored=!0;a.prototype._error.call(this,this.errorValue=c)};return e}(b.Subject);f.BehaviorSubject=a},{"./Subject":11,"./util/ObjectUnsubscribedError":259, "./util/throwError":273}],3:[function(a,b,f){var h=this&&this.__extends||function(a,b){function g(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(g.prototype=b.prototype,new g)};a=function(a){function b(g,e,c){a.call(this);this.parent=g;this.outerValue=e;this.outerIndex=c;this.index=0}h(b,a);b.prototype._next=function(a){this.parent.notifyNext(this.outerValue,a,this.outerIndex,this.index++,this)};b.prototype._error=function(a){this.parent.notifyError(a, this);this.unsubscribe()};b.prototype._complete=function(){this.parent.notifyComplete(this);this.unsubscribe()};return b}(a("./Subscriber").Subscriber);f.InnerSubscriber=a},{"./Subscriber":13}],4:[function(a,b,f){var h=a("./Observable");a=function(){function a(b,g,e){this.kind=b;this.value=g;this.exception=e;this.hasValue="N"===b}a.prototype.observe=function(a){switch(this.kind){case "N":return a.next&&a.next(this.value);case "E":return a.error&&a.error(this.exception);case "C":return a.complete&& a.complete()}};a.prototype["do"]=function(a,b,e){switch(this.kind){case "N":return a&&a(this.value);case "E":return b&&b(this.exception);case "C":return e&&e()}};a.prototype.accept=function(a,b,e){return a&&"function"===typeof a.next?this.observe(a):this["do"](a,b,e)};a.prototype.toObservable=function(){switch(this.kind){case "N":return h.Observable.of(this.value);case "E":return h.Observable["throw"](this.exception);case "C":return h.Observable.empty()}};a.createNext=function(b){return"undefined"!== typeof b?new a("N",b):this.undefinedValueNotification};a.createError=function(b){return new a("E",void 0,b)};a.createComplete=function(){return this.completeNotification};a.completeNotification=new a("C");a.undefinedValueNotification=new a("N",void 0);return a}();f.Notification=a},{"./Observable":5}],5:[function(a,b,f){var h=a("./util/root"),k=a("./symbol/observable"),l=a("./util/toSubscriber");a=function(){function a(e){this._isScalar=!1;e&&(this._subscribe=e)}a.prototype.lift=function(e){var c= new a;c.source=this;c.operator=e;return c};a.prototype.subscribe=function(a,c,d){var m=this.operator;a=l.toSubscriber(a,c,d);a.add(m?m.call(a,this):this._subscribe(a));if(a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a};a.prototype.forEach=function(a,c){var d=this;c||(h.root.Rx&&h.root.Rx.config&&h.root.Rx.config.Promise?c=h.root.Rx.config.Promise:h.root.Promise&&(c=h.root.Promise));if(!c)throw Error("no Promise impl found");return new c(function(c, n){var b=d.subscribe(function(d){if(b)try{a(d)}catch(c){n(c),b.unsubscribe()}else a(d)},n,c)})};a.prototype._subscribe=function(a){return this.source.subscribe(a)};a.prototype[k.$$observable]=function(){return this};a.create=function(e){return new a(e)};return a}();f.Observable=a},{"./symbol/observable":251,"./util/root":271,"./util/toSubscriber":274}],6:[function(a,b,f){f.empty={isUnsubscribed:!0,next:function(a){},error:function(a){throw a;},complete:function(){}}},{}],7:[function(a,b,f){var h= a("./Subscriber");a=function(){function a(){}a.prototype.call=function(a,b){return b._subscribe(new h.Subscriber(a))};return a}();f.Operator=a},{"./Subscriber":13}],8:[function(a,b,f){var h=this&&this.__extends||function(a,b){function g(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(g.prototype=b.prototype,new g)};a=function(a){function b(){a.apply(this,arguments)}h(b,a);b.prototype.notifyNext=function(a,e,c,d,m){this.destination.next(e)}; b.prototype.notifyError=function(a,e){this.destination.error(a)};b.prototype.notifyComplete=function(a){this.destination.complete()};return b}(a("./Subscriber").Subscriber);f.OuterSubscriber=a},{"./Subscriber":13}],9:[function(a,b,f){var h=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var m in c)c.hasOwnProperty(m)&&(a[m]=c[m]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)};b=a("./Subject");var k=a("./scheduler/queue"),l=a("./operator/observeOn"); a=function(a){function c(d,c,n){void 0===d&&(d=Number.POSITIVE_INFINITY);void 0===c&&(c=Number.POSITIVE_INFINITY);a.call(this);this.events=[];this.scheduler=n;this.bufferSize=1>d?1:d;this._windowTime=1>c?1:c}h(c,a);c.prototype._next=function(d){var c=this._getNow();this.events.push(new g(c,d));this._trimBufferThenGetEvents(c);a.prototype._next.call(this,d)};c.prototype._subscribe=function(d){var c=this._trimBufferThenGetEvents(this._getNow()),n=this.scheduler;n&&d.add(d=new l.ObserveOnSubscriber(d, n));for(var n=-1,b=c.length;++n<b&&!d.isUnsubscribed;)d.next(c[n].value);return a.prototype._subscribe.call(this,d)};c.prototype._getNow=function(){return(this.scheduler||k.queue).now()};c.prototype._trimBufferThenGetEvents=function(a){for(var c=this.bufferSize,e=this._windowTime,b=this.events,g=b.length,f=0;f<g&&!(a-b[f].time<e);)f+=1;g>c&&(f=Math.max(f,g-c));0<f&&b.splice(0,f);return b};return c}(b.Subject);f.ReplaySubject=a;var g=function(){return function(a,c){this.time=a;this.value=c}}()},{"./Subject":11, "./operator/observeOn":198,"./scheduler/queue":249}],10:[function(a,b,f){b=a("./Subject");f.Subject=b.Subject;b=a("./Observable");f.Observable=b.Observable;a("./add/observable/bindCallback");a("./add/observable/bindNodeCallback");a("./add/observable/combineLatest");a("./add/observable/concat");a("./add/observable/defer");a("./add/observable/empty");a("./add/observable/forkJoin");a("./add/observable/from");a("./add/observable/fromEvent");a("./add/observable/fromEventPattern");a("./add/observable/fromPromise"); a("./add/observable/interval");a("./add/observable/merge");a("./add/observable/race");a("./add/observable/never");a("./add/observable/of");a("./add/observable/range");a("./add/observable/throw");a("./add/observable/timer");a("./add/observable/zip");a("./add/operator/buffer");a("./add/operator/bufferCount");a("./add/operator/bufferTime");a("./add/operator/bufferToggle");a("./add/operator/bufferWhen");a("./add/operator/cache");a("./add/operator/catch");a("./add/operator/combineAll");a("./add/operator/combineLatest"); a("./add/operator/concat");a("./add/operator/concatAll");a("./add/operator/concatMap");a("./add/operator/concatMapTo");a("./add/operator/count");a("./add/operator/dematerialize");a("./add/operator/debounce");a("./add/operator/debounceTime");a("./add/operator/defaultIfEmpty");a("./add/operator/delay");a("./add/operator/delayWhen");a("./add/operator/distinctUntilChanged");a("./add/operator/do");a("./add/operator/expand");a("./add/operator/filter");a("./add/operator/finally");a("./add/operator/first"); a("./add/operator/groupBy");a("./add/operator/ignoreElements");a("./add/operator/audit");a("./add/operator/auditTime");a("./add/operator/last");a("./add/operator/let");a("./add/operator/every");a("./add/operator/map");a("./add/operator/mapTo");a("./add/operator/materialize");a("./add/operator/merge");a("./add/operator/mergeAll");a("./add/operator/mergeMap");a("./add/operator/mergeMapTo");a("./add/operator/multicast");a("./add/operator/observeOn");a("./add/operator/partition");a("./add/operator/pluck"); a("./add/operator/publish");a("./add/operator/publishBehavior");a("./add/operator/publishReplay");a("./add/operator/publishLast");a("./add/operator/race");a("./add/operator/reduce");a("./add/operator/repeat");a("./add/operator/retry");a("./add/operator/retryWhen");a("./add/operator/sample");a("./add/operator/sampleTime");a("./add/operator/scan");a("./add/operator/share");a("./add/operator/single");a("./add/operator/skip");a("./add/operator/skipUntil");a("./add/operator/skipWhile");a("./add/operator/startWith"); a("./add/operator/subscribeOn");a("./add/operator/switch");a("./add/operator/switchMap");a("./add/operator/switchMapTo");a("./add/operator/take");a("./add/operator/takeLast");a("./add/operator/takeUntil");a("./add/operator/takeWhile");a("./add/operator/throttle");a("./add/operator/throttleTime");a("./add/operator/timeout");a("./add/operator/timeoutWith");a("./add/operator/toArray");a("./add/operator/toPromise");a("./add/operator/window");a("./add/operator/windowCount");a("./add/operator/windowTime"); a("./add/operator/windowToggle");a("./add/operator/windowWhen");a("./add/operator/withLatestFrom");a("./add/operator/zip");a("./add/operator/zipAll");b=a("./Operator");f.Operator=b.Operator;b=a("./Subscription");f.Subscription=b.Subscription;b=a("./Subscriber");f.Subscriber=b.Subscriber;b=a("./AsyncSubject");f.AsyncSubject=b.AsyncSubject;b=a("./ReplaySubject");f.ReplaySubject=b.ReplaySubject;b=a("./BehaviorSubject");f.BehaviorSubject=b.BehaviorSubject;b=a("./observable/ConnectableObservable");f.ConnectableObservable= b.ConnectableObservable;b=a("./Notification");f.Notification=b.Notification;b=a("./util/EmptyError");f.EmptyError=b.EmptyError;b=a("./util/ArgumentOutOfRangeError");f.ArgumentOutOfRangeError=b.ArgumentOutOfRangeError;b=a("./util/ObjectUnsubscribedError");f.ObjectUnsubscribedError=b.ObjectUnsubscribedError;b=a("./util/UnsubscriptionError");f.UnsubscriptionError=b.UnsubscriptionError;b=a("./scheduler/asap");var h=a("./scheduler/async"),k=a("./scheduler/queue"),l=a("./symbol/rxSubscriber"),g=a("./symbol/observable"); a=a("./symbol/iterator");f.Scheduler={asap:b.asap,async:h.async,queue:k.queue};f.Symbol={rxSubscriber:l.$$rxSubscriber,observable:g.$$observable,iterator:a.$$iterator}},{"./AsyncSubject":1,"./BehaviorSubject":2,"./Notification":4,"./Observable":5,"./Operator":7,"./ReplaySubject":9,"./Subject":11,"./Subscriber":13,"./Subscription":14,"./add/observable/bindCallback":15,"./add/observable/bindNodeCallback":16,"./add/observable/combineLatest":17,"./add/observable/concat":18,"./add/observable/defer":19, "./add/observable/empty":20,"./add/observable/forkJoin":21,"./add/observable/from":22,"./add/observable/fromEvent":23,"./add/observable/fromEventPattern":24,"./add/observable/fromPromise":25,"./add/observable/interval":26,"./add/observable/merge":27,"./add/observable/never":28,"./add/observable/of":29,"./add/observable/race":30,"./add/observable/range":31,"./add/observable/throw":32,"./add/observable/timer":33,"./add/observable/zip":34,"./add/operator/audit":35,"./add/operator/auditTime":36,"./add/operator/buffer":37, "./add/operator/bufferCount":38,"./add/operator/bufferTime":39,"./add/operator/bufferToggle":40,"./add/operator/bufferWhen":41,"./add/operator/cache":42,"./add/operator/catch":43,"./add/operator/combineAll":44,"./add/operator/combineLatest":45,"./add/operator/concat":46,"./add/operator/concatAll":47,"./add/operator/concatMap":48,"./add/operator/concatMapTo":49,"./add/operator/count":50,"./add/operator/debounce":51,"./add/operator/debounceTime":52,"./add/operator/defaultIfEmpty":53,"./add/operator/delay":54, "./add/operator/delayWhen":55,"./add/operator/dematerialize":56,"./add/operator/distinctUntilChanged":57,"./add/operator/do":58,"./add/operator/every":59,"./add/operator/expand":60,"./add/operator/filter":61,"./add/operator/finally":62,"./add/operator/first":63,"./add/operator/groupBy":64,"./add/operator/ignoreElements":65,"./add/operator/last":66,"./add/operator/let":67,"./add/operator/map":68,"./add/operator/mapTo":69,"./add/operator/materialize":70,"./add/operator/merge":71,"./add/operator/mergeAll":72, "./add/operator/mergeMap":73,"./add/operator/mergeMapTo":74,"./add/operator/multicast":75,"./add/operator/observeOn":76,"./add/operator/partition":77,"./add/operator/pluck":78,"./add/operator/publish":79,"./add/operator/publishBehavior":80,"./add/operator/publishLast":81,"./add/operator/publishReplay":82,"./add/operator/race":83,"./add/operator/reduce":84,"./add/operator/repeat":85,"./add/operator/retry":86,"./add/operator/retryWhen":87,"./add/operator/sample":88,"./add/operator/sampleTime":89,"./add/operator/scan":90, "./add/operator/share":91,"./add/operator/single":92,"./add/operator/skip":93,"./add/operator/skipUntil":94,"./add/operator/skipWhile":95,"./add/operator/startWith":96,"./add/operator/subscribeOn":97,"./add/operator/switch":98,"./add/operator/switchMap":99,"./add/operator/switchMapTo":100,"./add/operator/take":101,"./add/operator/takeLast":102,"./add/operator/takeUntil":103,"./add/operator/takeWhile":104,"./add/operator/throttle":105,"./add/operator/throttleTime":106,"./add/operator/timeout":107, "./add/operator/timeoutWith":108,"./add/operator/toArray":109,"./add/operator/toPromise":110,"./add/operator/window":111,"./add/operator/windowCount":112,"./add/operator/windowTime":113,"./add/operator/windowToggle":114,"./add/operator/windowWhen":115,"./add/operator/withLatestFrom":116,"./add/operator/zip":117,"./add/operator/zipAll":118,"./observable/ConnectableObservable":123,"./scheduler/asap":247,"./scheduler/async":248,"./scheduler/queue":249,"./symbol/iterator":250,"./symbol/observable":251, "./symbol/rxSubscriber":252,"./util/ArgumentOutOfRangeError":253,"./util/EmptyError":254,"./util/ObjectUnsubscribedError":259,"./util/UnsubscriptionError":260}],11:[function(a,b,f){var h=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var m in d)d.hasOwnProperty(m)&&(a[m]=d[m]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("./Observable");var k=a("./Subscriber"),l=a("./Subscription"),g=a("./SubjectSubscription"),e=a("./symbol/rxSubscriber"),c=a("./util/throwError"), d=a("./util/ObjectUnsubscribedError");a=function(a){function b(d,c){a.call(this);this.destination=d;this.source=c;this.observers=[];this.hasCompleted=this.dispatching=this.hasErrored=this.isStopped=this.isUnsubscribed=!1;this.source=c}h(b,a);b.prototype.lift=function(a){var d=new b(this.destination||this,this);d.operator=a;return d};b.prototype.add=function(a){return l.Subscription.prototype.add.call(this,a)};b.prototype.remove=function(a){l.Subscription.prototype.remove.call(this,a)};b.prototype.unsubscribe= function(){l.Subscription.prototype.unsubscribe.call(this)};b.prototype._subscribe=function(a){if(this.source)return this.source.subscribe(a);if(!a.isUnsubscribed){if(this.hasErrored)return a.error(this.errorValue);if(this.hasCompleted)return a.complete();this.throwIfUnsubscribed();var d=new g.SubjectSubscription(this,a);this.observers.push(a);return d}};b.prototype._unsubscribe=function(){this.source=null;this.isStopped=!0;this.destination=this.observers=null};b.prototype.next=function(a){this.throwIfUnsubscribed(); this.isStopped||(this.dispatching=!0,this._next(a),this.dispatching=!1,this.hasErrored?this._error(this.errorValue):this.hasCompleted&&this._complete())};b.prototype.error=function(a){this.throwIfUnsubscribed();this.isStopped||(this.hasErrored=this.isStopped=!0,this.errorValue=a,this.dispatching||this._error(a))};b.prototype.complete=function(){this.throwIfUnsubscribed();this.isStopped||(this.hasCompleted=this.isStopped=!0,this.dispatching||this._complete())};b.prototype.asObservable=function(){return new m(this)}; b.prototype._next=function(a){this.destination?this.destination.next(a):this._finalNext(a)};b.prototype._finalNext=function(a){for(var d=-1,c=this.observers.slice(0),m=c.length;++d<m;)c[d].next(a)};b.prototype._error=function(a){this.destination?this.destination.error(a):this._finalError(a)};b.prototype._finalError=function(a){var d=-1,c=this.observers;this.observers=null;this.isUnsubscribed=!0;if(c)for(var m=c.length;++d<m;)c[d].error(a);this.isUnsubscribed=!1;this.unsubscribe()};b.prototype._complete= function(){this.destination?this.destination.complete():this._finalComplete()};b.prototype._finalComplete=function(){var a=-1,d=this.observers;this.observers=null;this.isUnsubscribed=!0;if(d)for(var c=d.length;++a<c;)d[a].complete();this.isUnsubscribed=!1;this.unsubscribe()};b.prototype.throwIfUnsubscribed=function(){this.isUnsubscribed&&c.throwError(new d.ObjectUnsubscribedError)};b.prototype[e.$$rxSubscriber]=function(){return new k.Subscriber(this)};b.create=function(a,d){return new b(a,d)};return b}(b.Observable); f.Subject=a;var m=function(a){function d(c){a.call(this);this.source=c}h(d,a);return d}(b.Observable)},{"./Observable":5,"./SubjectSubscription":12,"./Subscriber":13,"./Subscription":14,"./symbol/rxSubscriber":252,"./util/ObjectUnsubscribedError":259,"./util/throwError":273}],12:[function(a,b,f){var h=this&&this.__extends||function(a,b){function g(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(g.prototype=b.prototype,new g)};a=function(a){function b(g, e){a.call(this);this.subject=g;this.observer=e;this.isUnsubscribed=!1}h(b,a);b.prototype.unsubscribe=function(){if(!this.isUnsubscribed){this.isUnsubscribed=!0;var a=this.subject,e=a.observers;this.subject=null;e&&0!==e.length&&!a.isUnsubscribed&&(a=e.indexOf(this.observer),-1!==a&&e.splice(a,1))}};return b}(a("./Subscription").Subscription);f.SubjectSubscription=a},{"./Subscription":14}],13:[function(a,b,f){var h=this&&this.__extends||function(a,d){function m(){this.constructor=a}for(var e in d)d.hasOwnProperty(e)&& (a[e]=d[e]);a.prototype=null===d?Object.create(d):(m.prototype=d.prototype,new m)},k=a("./util/isFunction");b=a("./Subscription");var l=a("./symbol/rxSubscriber"),g=a("./Observer");a=function(a){function d(m,n,b){a.call(this);this.syncErrorValue=null;this.isStopped=this.syncErrorThrowable=this.syncErrorThrown=!1;switch(arguments.length){case 0:this.destination=g.empty;break;case 1:if(!m){this.destination=g.empty;break}if("object"===typeof m){m instanceof d?(this.destination=m,this.destination.add(this)): (this.syncErrorThrowable=!0,this.destination=new e(this,m));break}default:this.syncErrorThrowable=!0,this.destination=new e(this,m,n,b)}}h(d,a);d.create=function(a,c,e){a=new d(a,c,e);a.syncErrorThrowable=!1;return a};d.prototype.next=function(a){this.isStopped||this._next(a)};d.prototype.error=function(a){this.isStopped||(this.isStopped=!0,this._error(a))};d.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())};d.prototype.unsubscribe=function(){this.isUnsubscribed|| (this.isStopped=!0,a.prototype.unsubscribe.call(this))};d.prototype._next=function(a){this.destination.next(a)};d.prototype._error=function(a){this.destination.error(a);this.unsubscribe()};d.prototype._complete=function(){this.destination.complete();this.unsubscribe()};d.prototype[l.$$rxSubscriber]=function(){return this};return d}(b.Subscription);f.Subscriber=a;var e=function(a){function d(d,e,b,g){a.call(this);this._parent=d;var f;d=this;k.isFunction(e)?f=e:e&&(d=e,f=e.next,b=e.error,g=e.complete, k.isFunction(d.unsubscribe)&&this.add(d.unsubscribe.bind(d)),d.unsubscribe=this.unsubscribe.bind(this));this._context=d;this._next=f;this._error=b;this._complete=g}h(d,a);d.prototype.next=function(a){if(!this.isStopped&&this._next){var d=this._parent;d.syncErrorThrowable?this.__tryOrSetError(d,this._next,a)&&this.unsubscribe():this.__tryOrUnsub(this._next,a)}};d.prototype.error=function(a){if(!this.isStopped){var d=this._parent;if(this._error)d.syncErrorThrowable?this.__tryOrSetError(d,this._error, a):this.__tryOrUnsub(this._error,a),this.unsubscribe();else if(d.syncErrorThrowable)d.syncErrorValue=a,d.syncErrorThrown=!0,this.unsubscribe();else throw this.unsubscribe(),a;}};d.prototype.complete=function(){if(!this.isStopped){var a=this._parent;this._complete&&(a.syncErrorThrowable?this.__tryOrSetError(a,this._complete):this.__tryOrUnsub(this._complete));this.unsubscribe()}};d.prototype.__tryOrUnsub=function(a,d){try{a.call(this._context,d)}catch(c){throw this.unsubscribe(),c;}};d.prototype.__tryOrSetError= function(a,d,c){try{d.call(this._context,c)}catch(e){return a.syncErrorValue=e,a.syncErrorThrown=!0}return!1};d.prototype._unsubscribe=function(){var a=this._parent;this._parent=this._context=null;a.unsubscribe()};return d}(a)},{"./Observer":6,"./Subscription":14,"./symbol/rxSubscriber":252,"./util/isFunction":264}],14:[function(a,b,f){var h=a("./util/isArray"),k=a("./util/isObject"),l=a("./util/isFunction"),g=a("./util/tryCatch"),e=a("./util/errorObject"),c=a("./util/UnsubscriptionError");a=function(){function a(d){this.isUnsubscribed= !1;d&&(this._unsubscribe=d)}a.prototype.unsubscribe=function(){var a=!1,d;if(!this.isUnsubscribed){this.isUnsubscribed=!0;var b=this._unsubscribe,f=this._subscriptions;this._subscriptions=null;if(l.isFunction(b)){var p=g.tryCatch(b).call(this);p===e.errorObject&&(a=!0,(d=d||[]).push(e.errorObject.e))}if(h.isArray(f))for(var b=-1,t=f.length;++b<t;)p=f[b],k.isObject(p)&&(p=g.tryCatch(p.unsubscribe).call(p),p===e.errorObject&&(a=!0,d=d||[],p=e.errorObject.e,p instanceof c.UnsubscriptionError?d=d.concat(p.errors): d.push(p)));if(a)throw new c.UnsubscriptionError(d);}};a.prototype.add=function(c){if(c&&c!==this&&c!==a.EMPTY){var e=c;switch(typeof c){case "function":e=new a(c);case "object":e.isUnsubscribed||"function"!==typeof e.unsubscribe||(this.isUnsubscribed?e.unsubscribe():(this._subscriptions||(this._subscriptions=[])).push(e));break;default:throw Error("Unrecognized teardown "+c+" added to Subscription.");}return e}};a.prototype.remove=function(c){if(null!=c&&c!==this&&c!==a.EMPTY){var e=this._subscriptions; e&&(c=e.indexOf(c),-1!==c&&e.splice(c,1))}};a.EMPTY=function(a){a.isUnsubscribed=!0;return a}(new a);return a}();f.Subscription=a},{"./util/UnsubscriptionError":260,"./util/errorObject":261,"./util/isArray":262,"./util/isFunction":264,"./util/isObject":266,"./util/tryCatch":275}],15:[function(a,b,f){b=a("../../Observable");a=a("../../observable/bindCallback");b.Observable.bindCallback=a.bindCallback},{"../../Observable":5,"../../observable/bindCallback":139}],16:[function(a,b,f){b=a("../../Observable"); a=a("../../observable/bindNodeCallback");b.Observable.bindNodeCallback=a.bindNodeCallback},{"../../Observable":5,"../../observable/bindNodeCallback":140}],17:[function(a,b,f){b=a("../../Observable");a=a("../../operator/combineLatest");b.Observable.combineLatest=a.combineLatestStatic},{"../../Observable":5,"../../operator/combineLatest":167}],18:[function(a,b,f){b=a("../../Observable");a=a("../../observable/concat");b.Observable.concat=a.concat},{"../../Observable":5,"../../observable/concat":141}], 19:[function(a,b,f){b=a("../../Observable");a=a("../../observable/defer");b.Observable.defer=a.defer},{"../../Observable":5,"../../observable/defer":142}],20:[function(a,b,f){b=a("../../Observable");a=a("../../observable/empty");b.Observable.empty=a.empty},{"../../Observable":5,"../../observable/empty":143}],21:[function(a,b,f){b=a("../../Observable");a=a("../../observable/forkJoin");b.Observable.forkJoin=a.forkJoin},{"../../Observable":5,"../../observable/forkJoin":144}],22:[function(a,b,f){b=a("../../Observable"); a=a("../../observable/from");b.Observable.from=a.from},{"../../Observable":5,"../../observable/from":145}],23:[function(a,b,f){b=a("../../Observable");a=a("../../observable/fromEvent");b.Observable.fromEvent=a.fromEvent},{"../../Observable":5,"../../observable/fromEvent":146}],24:[function(a,b,f){b=a("../../Observable");a=a("../../observable/fromEventPattern");b.Observable.fromEventPattern=a.fromEventPattern},{"../../Observable":5,"../../observable/fromEventPattern":147}],25:[function(a,b,f){b=a("../../Observable"); a=a("../../observable/fromPromise");b.Observable.fromPromise=a.fromPromise},{"../../Observable":5,"../../observable/fromPromise":148}],26:[function(a,b,f){b=a("../../Observable");a=a("../../observable/interval");b.Observable.interval=a.interval},{"../../Observable":5,"../../observable/interval":149}],27:[function(a,b,f){b=a("../../Observable");a=a("../../observable/merge");b.Observable.merge=a.merge},{"../../Observable":5,"../../observable/merge":150}],28:[function(a,b,f){b=a("../../Observable"); a=a("../../observable/never");b.Observable.never=a.never},{"../../Observable":5,"../../observable/never":151}],29:[function(a,b,f){b=a("../../Observable");a=a("../../observable/of");b.Observable.of=a.of},{"../../Observable":5,"../../observable/of":152}],30:[function(a,b,f){b=a("../../Observable");a=a("../../operator/race");b.Observable.race=a.raceStatic},{"../../Observable":5,"../../operator/race":205}],31:[function(a,b,f){b=a("../../Observable");a=a("../../observable/range");b.Observable.range=a.range}, {"../../Observable":5,"../../observable/range":153}],32:[function(a,b,f){b=a("../../Observable");a=a("../../observable/throw");b.Observable["throw"]=a._throw},{"../../Observable":5,"../../observable/throw":154}],33:[function(a,b,f){b=a("../../Observable");a=a("../../observable/timer");b.Observable.timer=a.timer},{"../../Observable":5,"../../observable/timer":155}],34:[function(a,b,f){b=a("../../Observable");a=a("../../observable/zip");b.Observable.zip=a.zip},{"../../Observable":5,"../../observable/zip":156}], 35:[function(a,b,f){b=a("../../Observable");a=a("../../operator/audit");b.Observable.prototype.audit=a.audit},{"../../Observable":5,"../../operator/audit":157}],36:[function(a,b,f){b=a("../../Observable");a=a("../../operator/auditTime");b.Observable.prototype.auditTime=a.auditTime},{"../../Observable":5,"../../operator/auditTime":158}],37:[function(a,b,f){b=a("../../Observable");a=a("../../operator/buffer");b.Observable.prototype.buffer=a.buffer},{"../../Observable":5,"../../operator/buffer":159}], 38:[function(a,b,f){b=a("../../Observable");a=a("../../operator/bufferCount");b.Observable.prototype.bufferCount=a.bufferCount},{"../../Observable":5,"../../operator/bufferCount":160}],39:[function(a,b,f){b=a("../../Observable");a=a("../../operator/bufferTime");b.Observable.prototype.bufferTime=a.bufferTime},{"../../Observable":5,"../../operator/bufferTime":161}],40:[function(a,b,f){b=a("../../Observable");a=a("../../operator/bufferToggle");b.Observable.prototype.bufferToggle=a.bufferToggle},{"../../Observable":5, "../../operator/bufferToggle":162}],41:[function(a,b,f){b=a("../../Observable");a=a("../../operator/bufferWhen");b.Observable.prototype.bufferWhen=a.bufferWhen},{"../../Observable":5,"../../operator/bufferWhen":163}],42:[function(a,b,f){b=a("../../Observable");a=a("../../operator/cache");b.Observable.prototype.cache=a.cache},{"../../Observable":5,"../../operator/cache":164}],43:[function(a,b,f){b=a("../../Observable");a=a("../../operator/catch");b.Observable.prototype["catch"]=a._catch},{"../../Observable":5, "../../operator/catch":165}],44:[function(a,b,f){b=a("../../Observable");a=a("../../operator/combineAll");b.Observable.prototype.combineAll=a.combineAll},{"../../Observable":5,"../../operator/combineAll":166}],45:[function(a,b,f){b=a("../../Observable");a=a("../../operator/combineLatest");b.Observable.prototype.combineLatest=a.combineLatest},{"../../Observable":5,"../../operator/combineLatest":167}],46:[function(a,b,f){b=a("../../Observable");a=a("../../operator/concat");b.Observable.prototype.concat= a.concat},{"../../Observable":5,"../../operator/concat":168}],47:[function(a,b,f){b=a("../../Observable");a=a("../../operator/concatAll");b.Observable.prototype.concatAll=a.concatAll},{"../../Observable":5,"../../operator/concatAll":169}],48:[function(a,b,f){b=a("../../Observable");a=a("../../operator/concatMap");b.Observable.prototype.concatMap=a.concatMap},{"../../Observable":5,"../../operator/concatMap":170}],49:[function(a,b,f){b=a("../../Observable");a=a("../../operator/concatMapTo");b.Observable.prototype.concatMapTo= a.concatMapTo},{"../../Observable":5,"../../operator/concatMapTo":171}],50:[function(a,b,f){b=a("../../Observable");a=a("../../operator/count");b.Observable.prototype.count=a.count},{"../../Observable":5,"../../operator/count":172}],51:[function(a,b,f){b=a("../../Observable");a=a("../../operator/debounce");b.Observable.prototype.debounce=a.debounce},{"../../Observable":5,"../../operator/debounce":173}],52:[function(a,b,f){b=a("../../Observable");a=a("../../operator/debounceTime");b.Observable.prototype.debounceTime= a.debounceTime},{"../../Observable":5,"../../operator/debounceTime":174}],53:[function(a,b,f){b=a("../../Observable");a=a("../../operator/defaultIfEmpty");b.Observable.prototype.defaultIfEmpty=a.defaultIfEmpty},{"../../Observable":5,"../../operator/defaultIfEmpty":175}],54:[function(a,b,f){b=a("../../Observable");a=a("../../operator/delay");b.Observable.prototype.delay=a.delay},{"../../Observable":5,"../../operator/delay":176}],55:[function(a,b,f){b=a("../../Observable");a=a("../../operator/delayWhen"); b.Observable.prototype.delayWhen=a.delayWhen},{"../../Observable":5,"../../operator/delayWhen":177}],56:[function(a,b,f){b=a("../../Observable");a=a("../../operator/dematerialize");b.Observable.prototype.dematerialize=a.dematerialize},{"../../Observable":5,"../../operator/dematerialize":178}],57:[function(a,b,f){b=a("../../Observable");a=a("../../operator/distinctUntilChanged");b.Observable.prototype.distinctUntilChanged=a.distinctUntilChanged},{"../../Observable":5,"../../operator/distinctUntilChanged":179}], 58:[function(a,b,f){b=a("../../Observable");a=a("../../operator/do");b.Observable.prototype["do"]=a._do},{"../../Observable":5,"../../operator/do":180}],59:[function(a,b,f){b=a("../../Observable");a=a("../../operator/every");b.Observable.prototype.every=a.every},{"../../Observable":5,"../../operator/every":181}],60:[function(a,b,f){b=a("../../Observable");a=a("../../operator/expand");b.Observable.prototype.expand=a.expand},{"../../Observable":5,"../../operator/expand":182}],61:[function(a,b,f){b= a("../../Observable");a=a("../../operator/filter");b.Observable.prototype.filter=a.filter},{"../../Observable":5,"../../operator/filter":183}],62:[function(a,b,f){b=a("../../Observable");a=a("../../operator/finally");b.Observable.prototype["finally"]=a._finally},{"../../Observable":5,"../../operator/finally":184}],63:[function(a,b,f){b=a("../../Observable");a=a("../../operator/first");b.Observable.prototype.first=a.first},{"../../Observable":5,"../../operator/first":185}],64:[function(a,b,f){b=a("../../Observable"); a=a("../../operator/groupBy");b.Observable.prototype.groupBy=a.groupBy},{"../../Observable":5,"../../operator/groupBy":186}],65:[function(a,b,f){b=a("../../Observable");a=a("../../operator/ignoreElements");b.Observable.prototype.ignoreElements=a.ignoreElements},{"../../Observable":5,"../../operator/ignoreElements":187}],66:[function(a,b,f){b=a("../../Observable");a=a("../../operator/last");b.Observable.prototype.last=a.last},{"../../Observable":5,"../../operator/last":188}],67:[function(a,b,f){b= a("../../Observable");a=a("../../operator/let");b.Observable.prototype.let=a.letProto;b.Observable.prototype.letBind=a.letProto},{"../../Observable":5,"../../operator/let":189}],68:[function(a,b,f){b=a("../../Observable");a=a("../../operator/map");b.Observable.prototype.map=a.map},{"../../Observable":5,"../../operator/map":190}],69:[function(a,b,f){b=a("../../Observable");a=a("../../operator/mapTo");b.Observable.prototype.mapTo=a.mapTo},{"../../Observable":5,"../../operator/mapTo":191}],70:[function(a, b,f){b=a("../../Observable");a=a("../../operator/materialize");b.Observable.prototype.materialize=a.materialize},{"../../Observable":5,"../../operator/materialize":192}],71:[function(a,b,f){b=a("../../Observable");a=a("../../operator/merge");b.Observable.prototype.merge=a.merge},{"../../Observable":5,"../../operator/merge":193}],72:[function(a,b,f){b=a("../../Observable");a=a("../../operator/mergeAll");b.Observable.prototype.mergeAll=a.mergeAll},{"../../Observable":5,"../../operator/mergeAll":194}], 73:[function(a,b,f){b=a("../../Observable");a=a("../../operator/mergeMap");b.Observable.prototype.mergeMap=a.mergeMap;b.Observable.prototype.flatMap=a.mergeMap},{"../../Observable":5,"../../operator/mergeMap":195}],74:[function(a,b,f){b=a("../../Observable");a=a("../../operator/mergeMapTo");b.Observable.prototype.flatMapTo=a.mergeMapTo;b.Observable.prototype.mergeMapTo=a.mergeMapTo},{"../../Observable":5,"../../operator/mergeMapTo":196}],75:[function(a,b,f){b=a("../../Observable");a=a("../../operator/multicast"); b.Observable.prototype.multicast=a.multicast},{"../../Observable":5,"../../operator/multicast":197}],76:[function(a,b,f){b=a("../../Observable");a=a("../../operator/observeOn");b.Observable.prototype.observeOn=a.observeOn},{"../../Observable":5,"../../operator/observeOn":198}],77:[function(a,b,f){b=a("../../Observable");a=a("../../operator/partition");b.Observable.prototype.partition=a.partition},{"../../Observable":5,"../../operator/partition":199}],78:[function(a,b,f){b=a("../../Observable");a= a("../../operator/pluck");b.Observable.prototype.pluck=a.pluck},{"../../Observable":5,"../../operator/pluck":200}],79:[function(a,b,f){b=a("../../Observable");a=a("../../operator/publish");b.Observable.prototype.publish=a.publish},{"../../Observable":5,"../../operator/publish":201}],80:[function(a,b,f){b=a("../../Observable");a=a("../../operator/publishBehavior");b.Observable.prototype.publishBehavior=a.publishBehavior},{"../../Observable":5,"../../operator/publishBehavior":202}],81:[function(a,b, f){b=a("../../Observable");a=a("../../operator/publishLast");b.Observable.prototype.publishLast=a.publishLast},{"../../Observable":5,"../../operator/publishLast":203}],82:[function(a,b,f){b=a("../../Observable");a=a("../../operator/publishReplay");b.Observable.prototype.publishReplay=a.publishReplay},{"../../Observable":5,"../../operator/publishReplay":204}],83:[function(a,b,f){b=a("../../Observable");a=a("../../operator/race");b.Observable.prototype.race=a.race},{"../../Observable":5,"../../operator/race":205}], 84:[function(a,b,f){b=a("../../Observable");a=a("../../operator/reduce");b.Observable.prototype.reduce=a.reduce},{"../../Observable":5,"../../operator/reduce":206}],85:[function(a,b,f){b=a("../../Observable");a=a("../../operator/repeat");b.Observable.prototype.repeat=a.repeat},{"../../Observable":5,"../../operator/repeat":207}],86:[function(a,b,f){b=a("../../Observable");a=a("../../operator/retry");b.Observable.prototype.retry=a.retry},{"../../Observable":5,"../../operator/retry":208}],87:[function(a, b,f){b=a("../../Observable");a=a("../../operator/retryWhen");b.Observable.prototype.retryWhen=a.retryWhen},{"../../Observable":5,"../../operator/retryWhen":209}],88:[function(a,b,f){b=a("../../Observable");a=a("../../operator/sample");b.Observable.prototype.sample=a.sample},{"../../Observable":5,"../../operator/sample":210}],89:[function(a,b,f){b=a("../../Observable");a=a("../../operator/sampleTime");b.Observable.prototype.sampleTime=a.sampleTime},{"../../Observable":5,"../../operator/sampleTime":211}], 90:[function(a,b,f){b=a("../../Observable");a=a("../../operator/scan");b.Observable.prototype.scan=a.scan},{"../../Observable":5,"../../operator/scan":212}],91:[function(a,b,f){b=a("../../Observable");a=a("../../operator/share");b.Observable.prototype.share=a.share},{"../../Observable":5,"../../operator/share":213}],92:[function(a,b,f){b=a("../../Observable");a=a("../../operator/single");b.Observable.prototype.single=a.single},{"../../Observable":5,"../../operator/single":214}],93:[function(a,b,f){b= a("../../Observable");a=a("../../operator/skip");b.Observable.prototype.skip=a.skip},{"../../Observable":5,"../../operator/skip":215}],94:[function(a,b,f){b=a("../../Observable");a=a("../../operator/skipUntil");b.Observable.prototype.skipUntil=a.skipUntil},{"../../Observable":5,"../../operator/skipUntil":216}],95:[function(a,b,f){b=a("../../Observable");a=a("../../operator/skipWhile");b.Observable.prototype.skipWhile=a.skipWhile},{"../../Observable":5,"../../operator/skipWhile":217}],96:[function(a, b,f){b=a("../../Observable");a=a("../../operator/startWith");b.Observable.prototype.startWith=a.startWith},{"../../Observable":5,"../../operator/startWith":218}],97:[function(a,b,f){b=a("../../Observable");a=a("../../operator/subscribeOn");b.Observable.prototype.subscribeOn=a.subscribeOn},{"../../Observable":5,"../../operator/subscribeOn":219}],98:[function(a,b,f){b=a("../../Observable");a=a("../../operator/switch");b.Observable.prototype["switch"]=a._switch},{"../../Observable":5,"../../operator/switch":220}], 99:[function(a,b,f){b=a("../../Observable");a=a("../../operator/switchMap");b.Observable.prototype.switchMap=a.switchMap},{"../../Observable":5,"../../operator/switchMap":221}],100:[function(a,b,f){b=a("../../Observable");a=a("../../operator/switchMapTo");b.Observable.prototype.switchMapTo=a.switchMapTo},{"../../Observable":5,"../../operator/switchMapTo":222}],101:[function(a,b,f){b=a("../../Observable");a=a("../../operator/take");b.Observable.prototype.take=a.take},{"../../Observable":5,"../../operator/take":223}], 102:[function(a,b,f){b=a("../../Observable");a=a("../../operator/takeLast");b.Observable.prototype.takeLast=a.takeLast},{"../../Observable":5,"../../operator/takeLast":224}],103:[function(a,b,f){b=a("../../Observable");a=a("../../operator/takeUntil");b.Observable.prototype.takeUntil=a.takeUntil},{"../../Observable":5,"../../operator/takeUntil":225}],104:[function(a,b,f){b=a("../../Observable");a=a("../../operator/takeWhile");b.Observable.prototype.takeWhile=a.takeWhile},{"../../Observable":5,"../../operator/takeWhile":226}], 105:[function(a,b,f){b=a("../../Observable");a=a("../../operator/throttle");b.Observable.prototype.throttle=a.throttle},{"../../Observable":5,"../../operator/throttle":227}],106:[function(a,b,f){b=a("../../Observable");a=a("../../operator/throttleTime");b.Observable.prototype.throttleTime=a.throttleTime},{"../../Observable":5,"../../operator/throttleTime":228}],107:[function(a,b,f){b=a("../../Observable");a=a("../../operator/timeout");b.Observable.prototype.timeout=a.timeout},{"../../Observable":5, "../../operator/timeout":229}],108:[function(a,b,f){b=a("../../Observable");a=a("../../operator/timeoutWith");b.Observable.prototype.timeoutWith=a.timeoutWith},{"../../Observable":5,"../../operator/timeoutWith":230}],109:[function(a,b,f){b=a("../../Observable");a=a("../../operator/toArray");b.Observable.prototype.toArray=a.toArray},{"../../Observable":5,"../../operator/toArray":231}],110:[function(a,b,f){b=a("../../Observable");a=a("../../operator/toPromise");b.Observable.prototype.toPromise=a.toPromise}, {"../../Observable":5,"../../operator/toPromise":232}],111:[function(a,b,f){b=a("../../Observable");a=a("../../operator/window");b.Observable.prototype.window=a.window},{"../../Observable":5,"../../operator/window":233}],112:[function(a,b,f){b=a("../../Observable");a=a("../../operator/windowCount");b.Observable.prototype.windowCount=a.windowCount},{"../../Observable":5,"../../operator/windowCount":234}],113:[function(a,b,f){b=a("../../Observable");a=a("../../operator/windowTime");b.Observable.prototype.windowTime= a.windowTime},{"../../Observable":5,"../../operator/windowTime":235}],114:[function(a,b,f){b=a("../../Observable");a=a("../../operator/windowToggle");b.Observable.prototype.windowToggle=a.windowToggle},{"../../Observable":5,"../../operator/windowToggle":236}],115:[function(a,b,f){b=a("../../Observable");a=a("../../operator/windowWhen");b.Observable.prototype.windowWhen=a.windowWhen},{"../../Observable":5,"../../operator/windowWhen":237}],116:[function(a,b,f){b=a("../../Observable");a=a("../../operator/withLatestFrom"); b.Observable.prototype.withLatestFrom=a.withLatestFrom},{"../../Observable":5,"../../operator/withLatestFrom":238}],117:[function(a,b,f){b=a("../../Observable");a=a("../../operator/zip");b.Observable.prototype.zip=a.zipProto},{"../../Observable":5,"../../operator/zip":239}],118:[function(a,b,f){b=a("../../Observable");a=a("../../operator/zipAll");b.Observable.prototype.zipAll=a.zipAll},{"../../Observable":5,"../../operator/zipAll":240}],119:[function(a,b,f){var h=this&&this.__extends||function(a, e){function c(){this.constructor=a}for(var d in e)e.hasOwnProperty(d)&&(a[d]=e[d]);a.prototype=null===e?Object.create(e):(c.prototype=e.prototype,new c)};b=a("../Observable");var k=a("./ScalarObservable"),l=a("./EmptyObservable");a=function(a){function e(c,d,e,n){a.call(this);this.arrayLike=c;this.scheduler=n;d||n||1!==c.length||(this._isScalar=!0,this.value=c[0]);d&&(this.mapFn=d.bind(e))}h(e,a);e.create=function(a,d,m,n){var b=a.length;return 0===b?new l.EmptyObservable:1!==b||d?new e(a,d,m,n): new k.ScalarObservable(a[0],n)};e.dispatch=function(a){var d=a.arrayLike,e=a.index,n=a.length,b=a.mapFn,g=a.subscriber;g.isUnsubscribed||(e>=n?g.complete():(d=b?b(d[e],e):d[e],g.next(d),a.index=e+1,this.schedule(a)))};e.prototype._subscribe=function(a){var d=this.arrayLike,m=this.mapFn,b=this.scheduler,g=d.length;if(b)return b.schedule(e.dispatch,0,{arrayLike:d,index:0,length:g,mapFn:m,subscriber:a});for(b=0;b<g&&!a.isUnsubscribed;b++){var f=m?m(d[b],b):d[b];a.next(f)}a.complete()};return e}(b.Observable); f.ArrayLikeObservable=a},{"../Observable":5,"./EmptyObservable":125,"./ScalarObservable":136}],120:[function(a,b,f){var h=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var m in c)c.hasOwnProperty(m)&&(a[m]=c[m]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)};b=a("../Observable");var k=a("./ScalarObservable"),l=a("./EmptyObservable"),g=a("../util/isScheduler");a=function(a){function c(d,c){a.call(this);this.array=d;this.scheduler=c;c||1!==d.length|| (this._isScalar=!0,this.value=d[0])}h(c,a);c.create=function(a,e){return new c(a,e)};c.of=function(){for(var a=[],e=0;e<arguments.length;e++)a[e-0]=arguments[e];e=a[a.length-1];g.isScheduler(e)?a.pop():e=null;var b=a.length;return 1<b?new c(a,e):1===b?new k.ScalarObservable(a[0],e):new l.EmptyObservable(e)};c.dispatch=function(a){var c=a.array,e=a.index,b=a.subscriber;e>=a.count?b.complete():(b.next(c[e]),b.isUnsubscribed||(a.index=e+1,this.schedule(a)))};c.prototype._subscribe=function(a){var e= this.array,b=e.length,g=this.scheduler;if(g)return g.schedule(c.dispatch,0,{array:e,index:0,count:b,subscriber:a});for(g=0;g<b&&!a.isUnsubscribed;g++)a.next(e[g]);a.complete()};return c}(b.Observable);f.ArrayObservable=a},{"../Observable":5,"../util/isScheduler":268,"./EmptyObservable":125,"./ScalarObservable":136}],121:[function(a,b,f){function h(a){var b=this,g=a.source;a=a.subscriber;var f=g.callbackFunc,h=g.args,t=g.scheduler,q=g.subject;if(!q){var q=g.subject=new d.AsyncSubject,v=function x(){for(var a= [],d=0;d<arguments.length;d++)a[d-0]=arguments[d];var m=x.source,d=m.selector,m=m.subject;d?(a=e.tryCatch(d).apply(this,a),a===c.errorObject?b.add(t.schedule(l,0,{err:c.errorObject.e,subject:m})):b.add(t.schedule(k,0,{value:a,subject:m}))):b.add(t.schedule(k,0,{value:1===a.length?a[0]:a,subject:m}))};v.source=g;e.tryCatch(f).apply(this,h.concat(v))===c.errorObject&&q.error(c.errorObject.e)}b.add(q.subscribe(a))}function k(a){var d=a.subject;d.next(a.value);d.complete()}function l(a){a.subject.error(a.err)} var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var e in d)d.hasOwnProperty(e)&&(a[e]=d[e]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../Observable");var e=a("../util/tryCatch"),c=a("../util/errorObject"),d=a("../AsyncSubject");a=function(a){function b(d,c,e,n){a.call(this);this.callbackFunc=d;this.selector=c;this.args=e;this.scheduler=n}g(b,a);b.create=function(a,d,c){void 0===d&&(d=void 0);return function(){for(var e=[],m=0;m<arguments.length;m++)e[m- 0]=arguments[m];return new b(a,d,e,c)}};b.prototype._subscribe=function(a){var m=this.callbackFunc,b=this.args,n=this.scheduler,g=this.subject;if(n)return n.schedule(h,0,{source:this,subscriber:a});g||(g=this.subject=new d.AsyncSubject,n=function y(){for(var a=[],d=0;d<arguments.length;d++)a[d-0]=arguments[d];var m=y.source,d=m.selector,m=m.subject;d?(a=e.tryCatch(d).apply(this,a),a===c.errorObject?m.error(c.errorObject.e):(m.next(a),m.complete())):(m.next(1===a.length?a[0]:a),m.complete())},n.source= this,e.tryCatch(m).apply(this,b.concat(n))===c.errorObject&&g.error(c.errorObject.e));return g.subscribe(a)};return b}(b.Observable);f.BoundCallbackObservable=a},{"../AsyncSubject":1,"../Observable":5,"../util/errorObject":261,"../util/tryCatch":275}],122:[function(a,b,f){function h(a){var b=this,g=a.source;a=a.subscriber;var f=g.callbackFunc,h=g.args,t=g.scheduler,q=g.subject;if(!q){var q=g.subject=new d.AsyncSubject,v=function x(){for(var a=[],d=0;d<arguments.length;d++)a[d-0]=arguments[d];var m= x.source,d=m.selector,m=m.subject,g=a.shift();g?m.error(g):d?(a=e.tryCatch(d).apply(this,a),a===c.errorObject?b.add(t.schedule(l,0,{err:c.errorObject.e,subject:m})):b.add(t.schedule(k,0,{value:a,subject:m}))):b.add(t.schedule(k,0,{value:1===a.length?a[0]:a,subject:m}))};v.source=g;e.tryCatch(f).apply(this,h.concat(v))===c.errorObject&&q.error(c.errorObject.e)}b.add(q.subscribe(a))}function k(a){var d=a.subject;d.next(a.value);d.complete()}function l(a){a.subject.error(a.err)}var g=this&&this.__extends|| function(a,d){function c(){this.constructor=a}for(var e in d)d.hasOwnProperty(e)&&(a[e]=d[e]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../Observable");var e=a("../util/tryCatch"),c=a("../util/errorObject"),d=a("../AsyncSubject");a=function(a){function b(d,c,e,n){a.call(this);this.callbackFunc=d;this.selector=c;this.args=e;this.scheduler=n}g(b,a);b.create=function(a,d,c){void 0===d&&(d=void 0);return function(){for(var e=[],m=0;m<arguments.length;m++)e[m-0]=arguments[m]; return new b(a,d,e,c)}};b.prototype._subscribe=function(a){var m=this.callbackFunc,b=this.args,n=this.scheduler,g=this.subject;if(n)return n.schedule(h,0,{source:this,subscriber:a});g||(g=this.subject=new d.AsyncSubject,n=function y(){for(var a=[],d=0;d<arguments.length;d++)a[d-0]=arguments[d];var m=y.source,d=m.selector,m=m.subject,b=a.shift();b?m.error(b):d?(a=e.tryCatch(d).apply(this,a),a===c.errorObject?m.error(c.errorObject.e):(m.next(a),m.complete())):(m.next(1===a.length?a[0]:a),m.complete())}, n.source=this,e.tryCatch(m).apply(this,b.concat(n))===c.errorObject&&g.error(c.errorObject.e));return g.subscribe(a)};return b}(b.Observable);f.BoundNodeCallbackObservable=a},{"../AsyncSubject":1,"../Observable":5,"../util/errorObject":261,"../util/tryCatch":275}],123:[function(a,b,f){var h=this&&this.__extends||function(a,c){function e(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b]);a.prototype=null===c?Object.create(c):(e.prototype=c.prototype,new e)};b=a("../Observable");var k= a("../Subscriber");a=a("../Subscription");var l=function(a){function c(e,m){a.call(this);this.source=e;this.subjectFactory=m}h(c,a);c.prototype._subscribe=function(a){return this.getSubject().subscribe(a)};c.prototype.getSubject=function(){var a=this.subject;return a&&!a.isUnsubscribed?a:this.subject=this.subjectFactory()};c.prototype.connect=function(){var a=this.subscription;if(a&&!a.isUnsubscribed)return a;a=this.source.subscribe(this.getSubject());a.add(new g(this));return this.subscription=a}; c.prototype.refCount=function(){return new e(this)};c.prototype._closeSubscription=function(){this.subscription=this.subject=null};return c}(b.Observable);f.ConnectableObservable=l;var g=function(a){function c(e){a.call(this);this.connectable=e}h(c,a);c.prototype._unsubscribe=function(){this.connectable._closeSubscription();this.connectable=null};return c}(a.Subscription),e=function(a){function e(c,m){void 0===m&&(m=0);a.call(this);this.connectable=c;this.refCount=m}h(e,a);e.prototype._subscribe= function(a){var d=this.connectable;a=new c(a,this);var e=d.subscribe(a);e.isUnsubscribed||1!==++this.refCount||(a.connection=this.connection=d.connect());return e};return e}(b.Observable),c=function(a){function c(e,m){a.call(this,null);this.destination=e