Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rx-lite

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rx-lite - npm Package Compare versions

Comparing version 2.4.2 to 2.4.3

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Lightweight library for composing asynchronous and event-based operations in JavaScript",
"version": "2.4.2",
"version": "2.4.3",
"homepage": "https://github.com/Reactive-Extensions/RxJS",

@@ -8,0 +8,0 @@ "author": {

/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
(function(a){function b(a){for(var b=a.length,c=new Array(b),d=0;b>d;d++)c[d]=a[d];return c}function c(a,b){if(kb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(ob)){for(var c=[],e=b;e;e=e.source)e.stack&&c.unshift(e.stack);c.unshift(a.stack);var f=c.join("\n"+ob+"\n");a.stack=d(f)}}function d(a){for(var b=a.split("\n"),c=[],d=0,g=b.length;g>d;d++){var h=b[d];e(h)||f(h)||!h||c.push(h)}return c.join("\n")}function e(a){var b=h(a);if(!b)return!1;var c=b[0],d=b[1];return c===mb&&d>=nb&&Bd>=d}function f(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function g(){if(kb)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=h(c);if(!d)return;return mb=d[0],d[1]}}function h(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function i(a){var b=[];if(!Xb(a))return b;Wb.nonEnumArgs&&a.length&&Yb(a)&&(a=ac.call(a));var c=Wb.enumPrototypes&&"function"==typeof a,d=Wb.enumErrorProps&&(a===Rb||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Wb.nonEnumShadows&&a!==Sb){var f=a.constructor,g=-1,h=Db;if(a===(f&&f.prototype))var i=a===Tb?Nb:a===Rb?Ib:Ob.call(a),j=Vb[i];for(;++g<h;)e=Cb[g],j&&j[e]||!Pb.call(a,e)||b.push(e)}return b}function j(a,b,c){for(var d=-1,e=c(a),f=e.length;++d<f;){var g=e[d];if(b(a[g],g,a)===!1)break}return a}function k(a,b){return j(a,b,i)}function l(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function m(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,f=typeof b;if(a===a&&(null==a||null==b||"function"!=e&&"object"!=e&&"function"!=f&&"object"!=f))return!1;var g=Ob.call(a),h=Ob.call(b);if(g==Eb&&(g=Lb),h==Eb&&(h=Lb),g!=h)return!1;switch(g){case Gb:case Hb:return+a==+b;case Kb:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case Mb:case Nb:return a==String(b)}var i=g==Fb;if(!i){if(g!=Lb||!Wb.nodeClass&&(l(a)||l(b)))return!1;var j=!Wb.argsObject&&Yb(a)?Object:a.constructor,n=!Wb.argsObject&&Yb(b)?Object:b.constructor;if(!(j==n||Pb.call(a,"constructor")&&Pb.call(b,"constructor")||jb(j)&&j instanceof j&&jb(n)&&n instanceof n||!("constructor"in a&&"constructor"in b)))return!1}c||(c=[]),d||(d=[]);for(var o=c.length;o--;)if(c[o]==a)return d[o]==b;var p=0,q=!0;if(c.push(a),d.push(b),i){if(o=a.length,p=b.length,q=p==o)for(;p--;){var r=b[p];if(!(q=m(a[p],r,c,d)))break}}else k(b,function(b,e,f){return Pb.call(f,e)?(p++,q=Pb.call(a,e)&&m(a[e],b,c,d)):void 0}),q&&k(a,function(a,b,c){return Pb.call(c,b)?q=--p>-1:void 0});return c.pop(),d.pop(),q}function n(){try{return Zb.apply(this,arguments)}catch(a){return _b.e=a,_b}}function o(a){if(!jb(a))throw new TypeError("fn must be a function");return Zb=a,n}function p(a){throw a}function q(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function r(a,b){this.id=a,this.value=b}function t(a){this.observer=a,this.a=[],this.isStopped=!1}function u(){this._s=s}function v(){this._s=s,this._l=s.length,this._i=0}function w(a){this._a=a}function x(a){this._a=a,this._l=B(a),this._i=0}function y(a){return"number"==typeof a&&X.isFinite(a)}function z(b){var c,d=b[wb];if(!d&&"string"==typeof b)return c=new u(b),c[wb]();if(!d&&b.length!==a)return c=new w(b),c[wb]();if(!d)throw new TypeError("Object is not iterable");return b[wb]()}function A(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function B(a){var b=+a.length;return isNaN(b)?0:0!==b&&y(b)?(b=A(b)*Math.floor(Math.abs(b)),0>=b?0:b>Uc?Uc:b):b}function C(a,b){this.observer=a,this.parent=b}function D(a,b){return cb(a)||(a=tc),new Wc(b,a)}function E(a,b){return new td(function(c){var d=new mc,e=new nc;return e.setDisposable(d),d.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){try{var d=b(a)}catch(f){return c.onError(f)}ib(d)&&(d=md(d));var g=new mc;e.setDisposable(g),g.setDisposable(d.subscribe(c))},function(a){c.onCompleted(a)})),e},a)}function F(a,b){var c=this;return new td(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function G(){return!1}function H(){return[]}function I(a,b,c){var d=Bb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return ib(e)&&(e=md(e)),(zb(e)||yb(e))&&(e=Vc(e)),e}).concatAll()}function J(a,b,c){this.observer=a,this.selector=b,this.source=c,this.i=0,this.isStopped=!1}function K(a,b,c){var d=Bb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return ib(e)&&(e=md(e)),(zb(e)||yb(e))&&(e=Vc(e)),e}).mergeAll()}function L(a,b,c){this.observer=a,this.predicate=b,this.source=c,this.i=0,this.isStopped=!1}function M(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),ic(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function N(a,b,c){var d=new fc;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(N(a.item(e),b,c));else a&&d.add(M(a,b,c));return d}function O(a,b){return new td(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function P(a,b,c){return new td(function(d){var e=a,f=qc(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function Q(a,b){return new td(function(c){return b.scheduleWithRelative(qc(a),function(){c.onNext(0),c.onCompleted()})})}function R(a,b,c){return a===b?new td(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):Qc(function(){return P(c.now()+a,b,c)})}function S(a,b,c){return new td(function(d){var e,f=!1,g=new nc,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new mc,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new fc(e,g)},a)}function T(a,b,c){return Qc(function(){return S(a,b-c.now(),c)})}function U(a,b){return new td(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new fc(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))},a)}function V(a,b,c){return new td(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(db))){if(f)return void d.onError(f);try{e=c.apply(null,j)}catch(k){return void d.onError(k)}d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new fc(a.subscribe(function(a){e(a,0)},function(a){j[1]?d.onError(a):f=a},function(){i=!0,j[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}var W={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},X=W[typeof window]&&window||this,Y=W[typeof exports]&&exports&&!exports.nodeType&&exports,Z=W[typeof module]&&module&&!module.nodeType&&module,$=Z&&Z.exports===Y&&Y,_=W[typeof global]&&global;!_||_.global!==_&&_.window!==_||(X=_);var ab={internals:{},config:{Promise:X.Promise},helpers:{}},bb=ab.helpers.noop=function(){},cb=(ab.helpers.notDefined=function(a){return"undefined"==typeof a},ab.helpers.isScheduler=function(a){return a instanceof ab.Scheduler}),db=ab.helpers.identity=function(a){return a},eb=(ab.helpers.pluck=function(a){return function(b){return b[a]}},ab.helpers.just=function(a){return function(){return a}},ab.helpers.defaultNow=Date.now),fb=ab.helpers.defaultComparer=function(a,b){return $b(a,b)},gb=ab.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},hb=(ab.helpers.defaultKeySerializer=function(a){return a.toString()},ab.helpers.defaultError=function(a){throw a}),ib=ab.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},jb=(ab.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},ab.helpers.not=function(a){return!a},ab.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Ob.call(a)}),a}());ab.config.longStackSupport=!1;var kb=!1;try{throw new Error}catch(lb){kb=!!lb.stack}var mb,nb=g(),ob="From previous event:",pb=ab.EmptyError=function(){this.message="Sequence contains no elements.",Error.call(this)};pb.prototype=Error.prototype;var qb=ab.ObjectDisposedError=function(){this.message="Object has been disposed",Error.call(this)};qb.prototype=Error.prototype;var rb=ab.ArgumentOutOfRangeError=function(){this.message="Argument out of range",Error.call(this)};rb.prototype=Error.prototype;var sb=ab.NotSupportedError=function(a){this.message=a||"This operation is not supported",Error.call(this)};sb.prototype=Error.prototype;var tb=ab.NotImplementedError=function(a){this.message=a||"This operation is not implemented",Error.call(this)};tb.prototype=Error.prototype;var ub=ab.helpers.notImplemented=function(){throw new tb},vb=ab.helpers.notSupported=function(){throw new sb},wb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";X.Set&&"function"==typeof(new X.Set)["@@iterator"]&&(wb="@@iterator");var xb=ab.doneEnumerator={done:!0,value:a},yb=ab.helpers.isIterable=function(b){return b[wb]!==a},zb=ab.helpers.isArrayLike=function(b){return b&&b.length!==a};ab.helpers.iterator=wb;var Ab,Bb=ab.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},Cb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Db=Cb.length,Eb="[object Arguments]",Fb="[object Array]",Gb="[object Boolean]",Hb="[object Date]",Ib="[object Error]",Jb="[object Function]",Kb="[object Number]",Lb="[object Object]",Mb="[object RegExp]",Nb="[object String]",Ob=Object.prototype.toString,Pb=Object.prototype.hasOwnProperty,Qb=Ob.call(arguments)==Eb,Rb=Error.prototype,Sb=Object.prototype,Tb=String.prototype,Ub=Sb.propertyIsEnumerable;try{Ab=!(Ob.call(document)==Lb&&!({toString:0}+""))}catch(lb){Ab=!0}var Vb={};Vb[Fb]=Vb[Hb]=Vb[Kb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Vb[Gb]=Vb[Nb]={constructor:!0,toString:!0,valueOf:!0},Vb[Ib]=Vb[Jb]=Vb[Mb]={constructor:!0,toString:!0},Vb[Lb]={constructor:!0};var Wb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);Wb.enumErrorProps=Ub.call(Rb,"message")||Ub.call(Rb,"name"),Wb.enumPrototypes=Ub.call(a,"prototype"),Wb.nonEnumArgs=0!=c,Wb.nonEnumShadows=!/valueOf/.test(b)}(1);var Xb=ab.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Yb=function(a){return a&&"object"==typeof a?Ob.call(a)==Eb:!1};Qb||(Yb=function(a){return a&&"object"==typeof a?Pb.call(a,"callee"):!1});{var Zb,$b=ab.internals.isEqual=function(a,b){return m(a,b,[],[])},_b={e:{}},ac=({}.hasOwnProperty,Array.prototype.slice),bc=this.inherits=ab.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},cc=ab.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}};ab.internals.addRef=function(a,b){return new td(function(c){return new fc(b.getDisposable(),a.subscribe(c))})}}r.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var dc=ab.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},ec=dc.prototype;ec.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},ec.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},ec.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(b<this.length&&this.isHigherPriority(b,d)&&(d=b),c<this.length&&this.isHigherPriority(c,d)&&(d=c),d!==a){var e=this.items[a];this.items[a]=this.items[d],this.items[d]=e,this.heapify(d)}}},ec.peek=function(){return this.items[0].value},ec.removeAt=function(b){this.items[b]=this.items[--this.length],this.items[this.length]=a,this.heapify()},ec.dequeue=function(){var a=this.peek();return this.removeAt(0),a},ec.enqueue=function(a){var b=this.length++;this.items[b]=new r(dc.count++,a),this.percolate(b)},ec.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},dc.count=0;var fc=ab.CompositeDisposable=function(){var a,b,c=[];if(Array.isArray(arguments[0]))c=arguments[0],b=c.length;else for(b=arguments.length,c=new Array(b),a=0;b>a;a++)c[a]=arguments[a];for(a=0;b>a;a++)if(!kc(c[a]))throw new TypeError("Not a disposable");this.disposables=c,this.isDisposed=!1,this.length=c.length},gc=fc.prototype;gc.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},gc.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},gc.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=this.disposables.length,b=new Array(a),c=0;a>c;c++)b[c]=this.disposables[c];for(this.disposables=[],this.length=0,c=0;a>c;c++)b[c].dispose()}};var hc=ab.Disposable=function(a){this.isDisposed=!1,this.action=a||bb};hc.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var ic=hc.create=function(a){return new hc(a)},jc=hc.empty={dispose:bb},kc=hc.isDisposable=function(a){return a&&jb(a.dispose)},lc=hc.checkDisposed=function(a){if(a.isDisposed)throw new qb},mc=ab.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()},a}(),nc=ab.SerialDisposable=mc,oc=(ab.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?jc:new a(this)},b}(),ab.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||gb,this.disposable=new mc});oc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},oc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},oc.prototype.isCancelled=function(){return this.disposable.isDisposed},oc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var pc=ab.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),jc}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=eb,a.normalize=function(a){return 0>a&&(a=0),a},a}(),qc=pc.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new fc,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),jc});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new fc,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c](b,d,function(a,b){return e?f.remove(i):h=!0,g(b),jc});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(pc.prototype),function(){pc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},pc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof X.setInterval)throw new sb;var d=a,e=X.setInterval(function(){d=c(d)},b);return ic(function(){X.clearInterval(e)})}}(pc.prototype);var rc,sc=pc.immediate=function(){function a(a,b){return b(this,a)}return new pc(eb,a,vb,vb)}(),tc=pc.currentThread=function(){function a(){for(;c.length>0;){var a=c.dequeue();a.isCancelled()||!a.isCancelled()&&a.invoke()}}function b(b,d){var e=new oc(this,b,d,this.now());if(c)c.enqueue(e);else{c=new dc(4),c.enqueue(e);var f=o(a)();if(c=null,f===_b)return p(f.e)}return e.disposable}var c,d=new pc(eb,b,vb,vb);return d.scheduleRequired=function(){return!c},d.ensureTrampoline=function(a){c?a():this.schedule(a)},d}(),uc=(ab.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new mc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),bb),vc=function(){var a,b=bb;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!X.setTimeout)throw new sb;a=X.setTimeout,b=X.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),wc=vc.setTimeout,xc=vc.clearTimeout;!function(){function a(){if(!X.postMessage||X.importScripts)return!1;var a=!1,b=X.onmessage;return X.onmessage=function(){a=!0},X.postMessage("","*"),X.onmessage=b,a}var b=RegExp("^"+String(Ob).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=_&&$&&_.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=_&&$&&_.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)rc=c,uc=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))rc=process.nextTick;else if(a()){var e="ms.rx.schedule"+Math.random(),f={},g=0,h=function(a){if("string"==typeof a.data&&a.data.substring(0,e.length)===e){var b=a.data.substring(e.length),c=f[b];c(),delete f[b]}};X.addEventListener?X.addEventListener("message",h,!1):X.attachEvent("onmessage",h,!1),rc=function(a){var b=g++;f[b]=a,X.postMessage(e+b,"*")}}else if(X.MessageChannel){var i=new X.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},rc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in X&&"onreadystatechange"in X.document.createElement("script")?rc=function(a){var b=X.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},X.document.documentElement.appendChild(b)}:(rc=function(a){return wc(a,0)},uc=xc)}();var yc=pc.timeout=function(){function a(a,b){var c=this,d=new mc,e=rc(function(){d.isDisposed||d.setDisposable(b(c,a))});return new fc(d,ic(function(){uc(e)}))}function b(a,b,c){var d=this,e=pc.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new mc,g=wc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new fc(f,ic(function(){xc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new pc(eb,a,b,c)}(),zc=ab.Notification=function(){function a(a,b,c,d,e,f){this.kind=a,this.value=b,this.exception=c,this._accept=d,this._acceptObservable=e,this.toString=f}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return cb(a)||(a=sc),new td(function(c){return a.scheduleWithState(b,function(a,b){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Ac=zc.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){return new zc("N",d,null,a,b,c)}}(),Bc=zc.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){return new zc("E",null,d,a,b,c)}}(),Cc=zc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){return new zc("C",null,null,a,b,c)}}(),Dc=ab.internals.Enumerator=function(a){this._next=a};Dc.prototype.next=function(){return this._next()},Dc.prototype[wb]=function(){return this};var Ec=ab.internals.Enumerable=function(a){this._iterator=a};Ec.prototype[wb]=function(){return this._iterator()},Ec.prototype.concat=function(){var a=this;return new td(function(b){var c,d=a[wb](),e=new nc,f=sc.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;ib(h)&&(h=md(h));var i=new mc;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new fc(e,f,ic(function(){c=!0}))})},Ec.prototype.catchError=function(){var a=this;return new td(function(b){var c,d=a[wb](),e=new nc,f=sc.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;ib(i)&&(i=md(i));var j=new mc;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new fc(e,f,ic(function(){c=!0}))})},Ec.prototype.catchErrorWhen=function(a){var b=this;return new td(function(c){var d,e,f=new wd,g=new wd,h=a(f),i=h.subscribe(g),j=b[wb](),k=new nc,l=sc.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;ib(i)&&(i=md(i));var l=new mc,m=new mc;k.setDisposable(new fc(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new fc(i,k,l,ic(function(){d=!0}))})};var Fc,Gc=Ec.repeat=function(a,b){return null==b&&(b=-1),new Ec(function(){var c=b;return new Dc(function(){return 0===c?xb:(c>0&&c--,{done:!1,value:a})})})},Hc=Ec.of=function(a,b,c){if(b)var d=Bb(b,c,3);return new Ec(function(){var c=-1;return new Dc(function(){return++c<a.length?{done:!1,value:b?d(a[c],c,a):a[c]}:xb})})},Ic=ab.Observer=function(){},Jc=Ic.create=function(a,b,c){return a||(a=bb),b||(b=hb),c||(c=bb),new Lc(a,b,c)},Kc=ab.internals.AbstractObserver=function(a){function b(){this.isStopped=!1,a.call(this)}return bc(b,a),b.prototype.next=ub,b.prototype.error=ub,b.prototype.completed=ub,b.prototype.onNext=function(a){this.isStopped||this.next(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.error(a))},b.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}(Ic),Lc=ab.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return bc(b,a),b.prototype.next=function(a){this._onNext(a)},b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(Kc),Mc=ab.Observable=function(){function a(a){if(ab.config.longStackSupport&&kb){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var d=this;this._subscribe=function(b){var e=b.onError.bind(b);return b.onError=function(a){c(a,d),e(a)},a.call(d,b)}}else this._subscribe=a}return Fc=a.prototype,Fc.subscribe=Fc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:Jc(a,b,c))},Fc.subscribeOnNext=function(a,b){return this._subscribe(Jc("undefined"!=typeof b?function(c){a.call(b,c)}:a))},Fc.subscribeOnError=function(a,b){return this._subscribe(Jc(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},Fc.subscribeOnCompleted=function(a,b){return this._subscribe(Jc(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),Nc=ab.internals.ScheduledObserver=function(a){function b(b,c){a.call(this),this.scheduler=b,this.observer=c,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new nc}return bc(b,a),b.prototype.next=function(a){var b=this;this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},b.prototype.ensureActive=function(){var a=!1,b=this;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Kc),Oc=ab.ObservableBase=function(a){function b(a){return a&&jb(a.dispose)?a:jb(a)?ic(a):jc}function c(a,c){var d=c[0],e=c[1],f=o(e.subscribeCore).call(e,d);return f!==_b||d.fail(_b.e)?void d.setDisposable(b(f)):p(_b.e)}function d(a){var b=new ud(a),d=[b,this];return tc.scheduleRequired()?tc.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return bc(e,a),e.prototype.subscribeCore=ub,e}(Mc),Pc=function(a){function b(b){this.source=b,a.call(this)}return bc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new t(a))},b}(Oc);t.prototype.onNext=function(a){this.isStopped||this.a.push(a)},t.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},t.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onNext(this.a),this.observer.onCompleted())},t.prototype.dispose=function(){this.isStopped=!0},t.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},Fc.toArray=function(){return new Pc(this)},Mc.create=Mc.createWithDisposable=function(a,b){return new td(a,b)};var Qc=Mc.defer=function(a){return new td(function(b){var c;try{c=a()}catch(d){return _c(d).subscribe(b)}return ib(c)&&(c=md(c)),c.subscribe(b)})},Rc=Mc.empty=function(a){return cb(a)||(a=sc),new td(function(b){return a.schedule(function(){b.onCompleted()})})},Sc=function(a){function b(b,c,d){this.iterable=b,this.mapper=c,this.scheduler=d,a.call(this)}return bc(b,a),b.prototype.subscribeCore=function(a){var b=new Tc(a,this);return b.run()},b}(Oc),Tc=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,b){try{var f=c.next()}catch(g){return d.onError(g)}if(f.done)return d.onCompleted();var h=f.value;if(e)try{h=e(h,a)}catch(g){return d.onError(g)}d.onNext(h),b(a+1)}var b=Object(this.parent.iterable),c=z(b),d=this.observer,e=this.parent.mapper;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}(),Uc=Math.pow(2,53)-1;u.prototype[wb]=function(){return new v(this._s)},v.prototype[wb]=function(){return this},v.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:xb},w.prototype[wb]=function(){return new x(this._a)},x.prototype[wb]=function(){return this},x.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:xb};var Vc=Mc.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!jb(b))throw new Error("mapFn when provided must be a function");if(b)var e=Bb(b,c,2);return cb(d)||(d=tc),new Sc(a,e,d)},Wc=function(a){function b(b,c){this.args=b,this.scheduler=c,a.call(this)}return bc(b,a),b.prototype.subscribeCore=function(a){var b=new C(a,this);return b.run()},b}(Oc);C.prototype.run=function(){function a(a,e){d>a?(b.onNext(c[a]),e(a+1)):b.onCompleted()}var b=this.observer,c=this.parent.args,d=c.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)};{var Xc=Mc.fromArray=function(a,b){return cb(b)||(b=tc),new Wc(a,b)};Mc.never=function(){return new td(function(){return jc})}}Mc.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new Wc(b,tc)},Mc.ofWithScheduler=function(a){for(var b=arguments.length,c=new Array(b-1),d=1;b>d;d++)c[d-1]=arguments[d];return new Wc(c,a)},Mc.pairs=function(a,b){return b||(b=ab.Scheduler.currentThread),new td(function(c){var d=Object.keys(a),e=d.length;return b.scheduleRecursiveWithState(0,function(b,f){if(e>b){var g=d[b];c.onNext([g,a[g]]),f(b+1)}else c.onCompleted()})})};var Yc=function(a){function b(b,c,d){this.start=b,this.count=c,this.scheduler=d,a.call(this)}return bc(b,a),b.prototype.subscribeCore=function(a){var b=new Zc(a,this);return b.run()},b}(Oc),Zc=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,e){c>a?(d.onNext(b+a),e(a+1)):d.onCompleted()}var b=this.parent.start,c=this.parent.count,d=this.observer;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}();Mc.range=function(a,b,c){return cb(c)||(c=tc),new Yc(a,b,c)},Mc.repeat=function(a,b,c){return cb(c)||(c=tc),$c(a,c).repeat(null==b?-1:b)};var $c=Mc["return"]=Mc.just=function(a,b){return cb(b)||(b=sc),new td(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};Mc.returnValue=function(){return $c.apply(null,arguments)};var _c=Mc["throw"]=Mc.throwError=function(a,b){return cb(b)||(b=sc),new td(function(c){return b.schedule(function(){c.onError(a)})})};Mc.throwException=function(){return Mc.throwError.apply(null,arguments)},Fc["catch"]=Fc.catchError=Fc.catchException=function(a){return"function"==typeof a?E(this,a):ad([this,a])};var ad=Mc.catchError=Mc["catch"]=Mc.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Hc(a).catchError()};Fc.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return Array.isArray(b[0])?b[0].unshift(this):b.unshift(this),bd.apply(this,b)
};var bd=Mc.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.pop();return Array.isArray(b[0])&&(b=b[0]),new td(function(a){function c(b){if(h[b]=!0,i||(i=h.every(db))){try{var c=d.apply(null,k)}catch(e){return a.onError(e)}a.onNext(c)}else j.filter(function(a,c){return c!==b}).every(db)&&a.onCompleted()}function e(b){j[b]=!0,j.every(db)&&a.onCompleted()}for(var f=b.length,g=function(){return!1},h=q(f,g),i=!1,j=q(f,g),k=new Array(f),l=new Array(f),m=0;f>m;m++)!function(d){var f=b[d],g=new mc;ib(f)&&(f=md(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(b){a.onError(b)},function(){e(d)})),l[d]=g}(m);return new fc(l)},this)};Fc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),cd.apply(null,a)};var cd=Mc.concat=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(arguments.length);for(var b=0,c=arguments.length;c>b;b++)a[b]=arguments[b]}return Hc(a).concat()};Fc.concatAll=Fc.concatObservable=function(){return this.merge(1)};var dd=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return bc(b,a),b.prototype.subscribeCore=function(a){var b=new fc;return b.add(this.source.subscribe(new ed(a,this.maxConcurrent,b))),b},b}(Oc),ed=function(){function a(a,b,c){this.o=a,this.max=b,this.g=c,this.done=!1,this.q=[],this.activeCount=0,this.isStopped=!1}function b(a,b){this.parent=a,this.sad=b,this.isStopped=!1}return a.prototype.handleSubscribe=function(a){var c=new mc;this.g.add(c),ib(a)&&(a=md(a)),c.setDisposable(a.subscribe(new b(this,c)))},a.prototype.onNext=function(a){this.isStopped||(this.activeCount<this.max?(this.activeCount++,this.handleSubscribe(a)):this.q.push(a))},a.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},a.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,0===this.activeCount&&this.o.onCompleted())},a.prototype.dispose=function(){this.isStopped=!0},a.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},b.prototype.onCompleted=function(){if(!this.isStopped){this.isStopped=!0;var a=this.parent;a.g.remove(this.sad),a.q.length>0?a.handleSubscribe(a.q.shift()):(a.activeCount--,a.done&&0===a.activeCount&&a.o.onCompleted())}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();Fc.merge=function(a){return"number"!=typeof a?fd(this,a):new dd(this,a)};var fd=Mc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(cb(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=sc,b=0;d>b;b++)c.push(arguments[b]);else for(a=sc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),D(a,c).mergeAll()},gd=ab.CompositeError=function(a){this.name="NotImplementedError",this.innerErrors=a,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};gd.prototype=Error.prototype,Mc.mergeDelayError=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}var d=D(null,a);return new td(function(a){function b(){0===g.length?a.onCompleted():a.onError(1===g.length?g[0]:new gd(g))}var c=new fc,e=new mc,f=!1,g=[];return c.add(e),e.setDisposable(d.subscribe(function(d){var e=new mc;c.add(e),ib(d)&&(d=md(d)),e.setDisposable(d.subscribe(function(b){a.onNext(b)},function(a){g.push(a),c.remove(e),f&&1===c.length&&b()},function(){c.remove(e),f&&1===c.length&&b()}))},function(a){g.push(a),f=!0,1===c.length&&b()},function(){f=!0,1===c.length&&b()})),c})};var hd=function(a){function b(b){this.source=b,a.call(this)}return bc(b,a),b.prototype.subscribeCore=function(a){var b=new fc,c=new mc;return b.add(c),c.setDisposable(this.source.subscribe(new id(a,b))),b},b}(Oc),id=function(){function a(a,b){this.o=a,this.g=b,this.isStopped=!1,this.done=!1}function b(a,b,c){this.parent=a,this.g=b,this.sad=c,this.isStopped=!1}return a.prototype.onNext=function(a){if(!this.isStopped){var c=new mc;this.g.add(c),ib(a)&&(a=md(a)),c.setDisposable(a.subscribe(new b(this,this.g,c)))}},a.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},a.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,1===this.g.length&&this.o.onCompleted())},a.prototype.dispose=function(){this.isStopped=!0},a.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},b.prototype.onCompleted=function(){if(!this.isStopped){var a=this.parent;this.isStopped=!0,a.g.remove(this.sad),a.done&&1===a.g.length&&a.o.onCompleted()}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();Fc.mergeAll=Fc.mergeObservable=function(){return new hd(this)},Fc.skipUntil=function(a){var b=this;return new td(function(c){var d=!1,e=new fc(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));ib(a)&&(a=md(a));var f=new mc;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)},Fc["switch"]=Fc.switchLatest=function(){var a=this;return new td(function(b){var c=!1,d=new nc,e=!1,f=0,g=a.subscribe(function(a){var g=new mc,h=++f;c=!0,d.setDisposable(g),ib(a)&&(a=md(a)),g.setDisposable(a.subscribe(function(a){f===h&&b.onNext(a)},function(a){f===h&&b.onError(a)},function(){f===h&&(c=!1,e&&b.onCompleted())}))},function(a){b.onError(a)},function(){e=!0,!c&&b.onCompleted()});return new fc(g,d)},a)},Fc.takeUntil=function(a){var b=this;return new td(function(c){return ib(a)&&(a=md(a)),new fc(b.subscribe(c),a.subscribe(function(){c.onCompleted()},function(a){c.onError(a)},bb))},b)},Fc.withLatestFrom=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(b[0])&&(b=b[0]),new td(function(a){for(var c=function(){return!1},f=b.length,g=q(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=b[c],e=new mc;ib(d)&&(d=md(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(db)},a.onError.bind(a),function(){})),j[c]=e}(k);var l=new mc;return l.setDisposable(e.subscribe(function(b){var c,e=[b].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void a.onError(f)}a.onNext(c)}},a.onError.bind(a),function(){a.onCompleted()})),j[f]=l,new fc(j)},this)},Fc.zip=function(){if(Array.isArray(arguments[0]))return F.apply(this,arguments);for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=this,e=b.pop();return b.unshift(d),new td(function(a){function c(b){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void a.onError(g)}a.onNext(c)}else i.filter(function(a,c){return c!==b}).every(db)&&a.onCompleted()}function f(b){i[b]=!0,i.every(function(a){return a})&&a.onCompleted()}for(var g=b.length,h=q(g,H),i=q(g,G),j=new Array(g),k=0;g>k;k++)!function(d){var e=b[d],g=new mc;ib(e)&&(e=md(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(b){a.onError(b)},function(){f(d)})),j[d]=g}(k);return new fc(j)},d)},Mc.zip=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.shift();return d.zip.apply(d,b)},Mc.zipArray=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new td(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(db))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(db)?void b.onCompleted():void 0}for(var e=a.length,f=q(e,function(){return[]}),g=q(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new mc,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new fc(h)})},Fc.asObservable=function(){var a=this;return new td(function(b){return a.subscribe(b)},this)},Fc.dematerialize=function(){var a=this;return new td(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},Fc.distinctUntilChanged=function(a,b){var c=this;return b||(b=fb),new td(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},Fc["do"]=Fc.tap=Fc.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?Jc(a||bb,b||bb,c||bb):a;return new td(function(a){return d.subscribe(function(b){try{e.onNext(b)}catch(c){a.onError(c)}a.onNext(b)},function(b){try{e.onError(b)}catch(c){a.onError(c)}a.onError(b)},function(){try{e.onCompleted()}catch(b){a.onError(b)}a.onCompleted()})},this)},Fc.doOnNext=Fc.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},Fc.doOnError=Fc.tapOnError=function(a,b){return this.tap(bb,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},Fc.doOnCompleted=Fc.tapOnCompleted=function(a,b){return this.tap(bb,null,"undefined"!=typeof b?function(){a.call(b)}:a)},Fc["finally"]=Fc.ensure=function(a){var b=this;return new td(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return ic(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},Fc.finallyAction=function(a){return this.ensure(a)},Fc.ignoreElements=function(){var a=this;return new td(function(b){return a.subscribe(bb,function(a){b.onError(a)},function(){b.onCompleted()})},a)},Fc.materialize=function(){var a=this;return new td(function(b){return a.subscribe(function(a){b.onNext(Ac(a))},function(a){b.onNext(Bc(a)),b.onCompleted()},function(){b.onNext(Cc()),b.onCompleted()})},a)},Fc.repeat=function(a){return Gc(this,a).concat()},Fc.retry=function(a){return Gc(this,a).catchError()},Fc.retryWhen=function(a){return Gc(this).catchErrorWhen(a)},Fc.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new td(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},Fc.skipLast=function(a){if(0>a)throw new rb;var b=this;return new td(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},Fc.startWith=function(){var a,b=0;arguments.length&&cb(arguments[0])?(a=arguments[0],b=1):a=sc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return Hc([Xc(c,a),this]).concat()},Fc.takeLast=function(a){if(0>a)throw new rb;var b=this;return new td(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},Fc.selectConcat=Fc.concatMap=function(a,b,c){return jb(a)&&jb(b)?this.concatMap(function(c,d){var e=a(c,d);return ib(e)&&(e=md(e)),(zb(e)||yb(e))&&(e=Vc(e)),e.map(function(a,e){return b(c,a,d,e)})}):jb(a)?I(this,a,c):I(this,function(){return a})};var jd=function(a){function b(b,c,d){this.source=b,this.selector=Bb(c,d,3),a.call(this)}return bc(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a(d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new J(a,this.selector,this))},b}(Oc);J.prototype.onNext=function(a){if(!this.isStopped){var b=o(this.selector).call(this,a,this.i++,this.source);return b===_b?this.observer.onError(b.e):void this.observer.onNext(b)}},J.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},J.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},J.prototype.dispose=function(){this.isStopped=!0},J.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},Fc.map=Fc.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof jd?this.internalMap(c,b):new jd(this,c,b)},Fc.pluck=function(){var b=arguments,c=arguments.length;if(0===c)throw new Error("List of properties cannot be empty.");return this.map(function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e})},Fc.selectMany=Fc.flatMap=function(a,b,c){return jb(a)&&jb(b)?this.flatMap(function(c,d){var e=a(c,d);return ib(e)&&(e=md(e)),(zb(e)||yb(e))&&(e=Vc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):jb(a)?K(this,a,c):K(this,function(){return a})},Fc.selectSwitch=Fc.flatMapLatest=Fc.switchMap=function(a,b){return this.select(a,b).switchLatest()},Fc.skip=function(a){if(0>a)throw new rb;var b=this;return new td(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},Fc.skipWhile=function(a,b){var c=this,d=Bb(a,b,3);return new td(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},Fc.take=function(a,b){if(0>a)throw new rb;if(0===a)return Rc(b);var c=this;return new td(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},Fc.takeWhile=function(a,b){var c=this,d=Bb(a,b,3);return new td(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var kd=function(a){function b(b,c,d){this.source=b,this.predicate=Bb(c,d,3),a.call(this)}return bc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new L(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a(b,c,e)},c)},b}(Oc);L.prototype.onNext=function(a){if(!this.isStopped){var b=o(this.predicate).call(this,a,this.i++,this.source);return b===_b?this.observer.onError(b.e):void(b&&this.observer.onNext(a))}},L.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},L.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},L.prototype.dispose=function(){this.isStopped=!0},L.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},Fc.filter=Fc.where=function(a,b){return this instanceof kd?this.internalFilter(a,b):new kd(this,a,b)},Mc.fromCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new td(function(e){function f(){var a=arguments;if(c){try{a=c(a)}catch(b){return e.onError(b)}e.onNext(a)}else a.length<=1?e.onNext.apply(e,a):e.onNext(a);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},Mc.fromNodeCallback=function(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return new td(function(d){function f(a){if(a)return void d.onError(a);for(var b=arguments.length,e=new Array(b-1),f=1;b>f;f++)e[f-1]=arguments[f];if(c){try{e=c(e)}catch(g){return d.onError(g)}d.onNext(e)}else e.length<=1?d.onNext.apply(d,e):d.onNext(e);d.onCompleted()}e.push(f),a.apply(b,e)}).publishLast().refCount()}},ab.config.useNativeEvents=!1,Mc.fromEvent=function(a,b,c){return a.addListener?ld(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c):ab.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new td(function(d){return N(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e)}d.onNext(b)})}).publish().refCount():ld(function(c){a.on(b,c)},function(c){a.off(b,c)},c)};var ld=Mc.fromEventPattern=function(a,b,c){return new td(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e)}d.onNext(b)}var f=a(e);return ic(function(){b&&b(e,f)})}).publish().refCount()},md=Mc.fromPromise=function(a){return Qc(function(){var b=new ab.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};Fc.toPromise=function(a){if(a||(a=ab.config.Promise),!a)throw new sb("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},Mc.startAsync=function(a){var b;try{b=a()}catch(c){return _c(c)}return md(b)},Fc.multicast=function(a,b){var c=this;return"function"==typeof a?new td(function(d){var e=c.multicast(a());return new fc(b(e).subscribe(d),e.connect())},c):new nd(c,a)},Fc.publish=function(a){return a&&jb(a)?this.multicast(function(){return new wd},a):this.multicast(new wd)},Fc.share=function(){return this.publish().refCount()},Fc.publishLast=function(a){return a&&jb(a)?this.multicast(function(){return new xd},a):this.multicast(new xd)},Fc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new zd(b)},a):this.multicast(new zd(a))},Fc.shareValue=function(a){return this.publishValue(a).refCount()},Fc.replay=function(a,b,c,d){return a&&jb(a)?this.multicast(function(){return new Ad(b,c,d)},a):this.multicast(new Ad(b,c,d))},Fc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};{var nd=ab.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new fc(f.subscribe(c),ic(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return bc(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new td(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(Mc),od=Mc.interval=function(a,b){return R(a,a,cb(b)?b:yc)};Mc.timer=function(b,c,d){var e;return cb(d)||(d=yc),c!==a&&"number"==typeof c?e=c:cb(c)&&(d=c),b instanceof Date&&e===a?O(b.getTime(),d):b instanceof Date&&e!==a?(e=c,P(b.getTime(),e,d)):e===a?Q(b,d):R(b,e,d)}}Fc.delay=function(a,b){return cb(b)||(b=yc),a instanceof Date?T(this,a.getTime(),b):S(this,a,b)},Fc.debounce=Fc.throttleWithTimeout=function(a,b){cb(b)||(b=yc);var c=this;return new td(function(d){var e,f=new nc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new mc;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new fc(i,f)},this)},Fc.throttle=function(a,b){return this.debounce(a,b)},Fc.timestamp=function(a){return cb(a)||(a=yc),this.map(function(b){return{value:b,timestamp:a.now()}})},Fc.sample=Fc.throttleLatest=function(a,b){return cb(b)||(b=yc),"number"==typeof a?U(this,od(a,b)):U(this,a)},Fc.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=_c(new Error(b||"Timeout"))),cb(c)||(c=yc);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new td(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(ib(b)&&(b=md(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new mc,j=new nc,k=!1,l=new nc;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new fc(j,l)},d)},Fc.throttleFirst=function(a,b){cb(b)||(b=yc);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new td(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)};var pd=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=jc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=jc)});return new fc(c,d,e)}function c(c,d){this.source=c,this.controller=new wd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return bc(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(Mc);Fc.pausable=function(a){return new pd(this,a)};var qd=function(b){function c(b){var c,d=[],e=V(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(c!==a&&e.shouldFire!=c){if(c=e.shouldFire,e.shouldFire)for(;d.length>0;)b.onNext(d.shift())}else c=e.shouldFire,e.shouldFire?b.onNext(e.data):d.push(e.data)},function(a){for(;d.length>0;)b.onNext(d.shift());b.onError(a)},function(){for(;d.length>0;)b.onNext(d.shift());b.onCompleted()});return e}function d(a,d){this.source=a,this.controller=new wd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return bc(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(Mc);Fc.pausableBuffered=function(a){return new qd(this,a)};var rd=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b,c),this.subject=new sd(d),this.source=c.multicast(this.subject).refCount()}return bc(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(Mc),sd=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new wd,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=jc,this.error=null,this.hasFailed=!1,this.hasCompleted=!1}return bc(c,a),cc(c.prototype,Ic,{onCompleted:function(){this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length?this.queue.push(ab.Notification.createOnCompleted()):this.subject.onCompleted()},onError:function(a){this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length?this.queue.push(ab.Notification.createOnError(a)):this.subject.onError(a)},onNext:function(a){var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(ab.Notification.createOnNext(a)):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0||this.queue.length>0&&"N"!==this.queue[0].kind;){var b=this.queue.shift();b.accept(this.subject),"N"===b.kind?a--:(this.disposeCurrentRequest(),this.queue=[])}return{numberOfItems:a,returnValue:0!==this.queue.length}}return{numberOfItems:a,returnValue:!1}},request:function(a){this.disposeCurrentRequest();var b=this,c=this._processRequest(a),a=c.numberOfItems;return c.returnValue?jc:(this.requestedCount=a,this.requestedDisposable=ic(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=jc}}),c}(Mc);Fc.controlled=function(a){return null==a&&(a=!0),new rd(this,a)},Fc.transduce=function(a){function b(a){return{init:function(){return a},step:function(a,b){return a.onNext(b)},result:function(a){return a.onCompleted()}}}var c=this;return new td(function(d){var e=a(b(d));return c.subscribe(function(a){try{e.step(d,a)}catch(b){d.onError(b)}},d.onError.bind(d),function(){e.result(d)})},c)};var td=ab.AnonymousObservable=function(a){function b(a){return a&&jb(a.dispose)?a:jb(a)?ic(a):jc}function c(a,c){var d=c[0],e=c[1],f=o(e)(d);return f!==_b||d.fail(_b.e)?void d.setDisposable(b(f)):p(_b.e)}function d(b,d){function e(a){var d=new ud(a),e=[d,b];return tc.scheduleRequired()?tc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return bc(d,a),d}(Mc),ud=function(a){function b(b){a.call(this),this.observer=b,this.m=new mc}bc(b,a);var c=b.prototype;return c.next=function(a){var b=o(this.observer.onNext).call(this.observer,a);b===_b&&(this.dispose(),p(b.e))},c.error=function(a){var b=o(this.observer.onError).call(this.observer,a);this.dispose(),b===_b&&p(b.e)},c.completed=function(){var a=o(this.observer.onCompleted).call(this.observer);this.dispose(),a===_b&&p(a.e)},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Kc),vd=function(a,b){this.subject=a,this.observer=b};vd.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var wd=ab.Subject=function(a){function c(a){return lc(this),this.isStopped?this.hasError?(a.onError(this.error),jc):(a.onCompleted(),jc):(this.observers.push(a),new vd(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return bc(d,a),cc(d.prototype,Ic.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(lc(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=b(this.observers),d=c.length;d>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(lc(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){if(lc(this),!this.isStopped)for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new yd(a,b)},d}(Mc),xd=ab.AsyncSubject=function(a){function c(a){return lc(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),jc):(this.observers.push(a),new vd(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return bc(d,a),cc(d.prototype,Ic,{hasObservers:function(){return lc(this),this.observers.length>0},onCompleted:function(){var a,c;if(lc(this),!this.isStopped){this.isStopped=!0;var d=b(this.observers),c=d.length;if(this.hasValue)for(a=0;c>a;a++){var e=d[a];e.onNext(this.value),e.onCompleted()}else for(a=0;c>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(lc(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){lc(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(Mc),yd=ab.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return bc(c,a),cc(c.prototype,Ic.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Mc),zd=ab.BehaviorSubject=function(a){function c(a){return lc(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),jc):(this.observers.push(a),a.onNext(this.value),new vd(this,a))}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return bc(d,a),cc(d.prototype,Ic,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(lc(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=b(this.observers),d=c.length;d>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(lc(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){if(lc(this),!this.isStopped){this.value=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),d}(Mc),Ad=ab.ReplaySubject=function(a){function c(a,b){return ic(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var b=new Nc(this.scheduler,a),d=c(this,b);lc(this),this._trim(this.scheduler.now()),this.observers.push(b);for(var e=0,f=this.q.length;f>e;e++)b.onNext(this.q[e].value);return this.hasError?b.onError(this.error):this.isStopped&&b.onCompleted(),b.ensureActive(),d}function e(b,c,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=e||tc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)}return bc(e,a),cc(e.prototype,Ic.prototype,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(lc(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var d=0,e=b(this.observers),f=e.length;f>d;d++){var g=e[d];g.onNext(a),g.ensureActive()}}},onError:function(a){if(lc(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var d=0,e=b(this.observers),f=e.length;f>d;d++){var g=e[d];g.onError(a),g.ensureActive()}this.observers.length=0}},onCompleted:function(){if(lc(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var c=0,d=b(this.observers),e=d.length;e>c;c++){var f=d[c];f.onCompleted(),f.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(Mc);ab.Pauser=function(a){function b(){a.call(this)}return bc(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(wd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(X.Rx=ab,define(function(){return ab})):Y&&Z?$?(Z.exports=ab).Rx=ab:Y.Rx=ab:X.Rx=ab;var Bd=g()}).call(this);
(function(a){function b(a){for(var b=a.length,c=new Array(b),d=0;b>d;d++)c[d]=a[d];return c}function c(a,b){if(ka&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(oa)){for(var c=[],e=b;e;e=e.source)e.stack&&c.unshift(e.stack);c.unshift(a.stack);var f=c.join("\n"+oa+"\n");a.stack=d(f)}}function d(a){for(var b=a.split("\n"),c=[],d=0,g=b.length;g>d;d++){var h=b[d];e(h)||f(h)||!h||c.push(h)}return c.join("\n")}function e(a){var b=h(a);if(!b)return!1;var c=b[0],d=b[1];return c===ma&&d>=na&&Bc>=d}function f(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function g(){if(ka)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=h(c);if(!d)return;return ma=d[0],d[1]}}function h(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function i(a){var b=[];if(!Xa(a))return b;Wa.nonEnumArgs&&a.length&&Ya(a)&&(a=ab.call(a));var c=Wa.enumPrototypes&&"function"==typeof a,d=Wa.enumErrorProps&&(a===Ra||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Wa.nonEnumShadows&&a!==Sa){var f=a.constructor,g=-1,h=Da;if(a===(f&&f.prototype))var i=a===Ta?Na:a===Ra?Ia:Oa.call(a),j=Va[i];for(;++g<h;)e=Ca[g],j&&j[e]||!Pa.call(a,e)||b.push(e)}return b}function j(a,b,c){for(var d=-1,e=c(a),f=e.length;++d<f;){var g=e[d];if(b(a[g],g,a)===!1)break}return a}function k(a,b){return j(a,b,i)}function l(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function m(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,f=typeof b;if(a===a&&(null==a||null==b||"function"!=e&&"object"!=e&&"function"!=f&&"object"!=f))return!1;var g=Oa.call(a),h=Oa.call(b);if(g==Ea&&(g=La),h==Ea&&(h=La),g!=h)return!1;switch(g){case Ga:case Ha:return+a==+b;case Ka:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case Ma:case Na:return a==String(b)}var i=g==Fa;if(!i){if(g!=La||!Wa.nodeClass&&(l(a)||l(b)))return!1;var j=!Wa.argsObject&&Ya(a)?Object:a.constructor,n=!Wa.argsObject&&Ya(b)?Object:b.constructor;if(!(j==n||Pa.call(a,"constructor")&&Pa.call(b,"constructor")||ja(j)&&j instanceof j&&ja(n)&&n instanceof n||!("constructor"in a&&"constructor"in b)))return!1}c||(c=[]),d||(d=[]);for(var o=c.length;o--;)if(c[o]==a)return d[o]==b;var p=0,q=!0;if(c.push(a),d.push(b),i){if(o=a.length,p=b.length,q=p==o)for(;p--;){var r=b[p];if(!(q=m(a[p],r,c,d)))break}}else k(b,function(b,e,f){return Pa.call(f,e)?(p++,q=Pa.call(a,e)&&m(a[e],b,c,d)):void 0}),q&&k(a,function(a,b,c){return Pa.call(c,b)?q=--p>-1:void 0});return c.pop(),d.pop(),q}function n(){try{return Za.apply(this,arguments)}catch(a){return _a.e=a,_a}}function o(a){if(!ja(a))throw new TypeError("fn must be a function");return Za=a,n}function p(a){throw a}function q(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function r(a,b){this.id=a,this.value=b}function t(a){this.observer=a,this.a=[],this.isStopped=!1}function u(){this._s=s}function v(){this._s=s,this._l=s.length,this._i=0}function w(a){this._a=a}function x(a){this._a=a,this._l=B(a),this._i=0}function y(a){return"number"==typeof a&&X.isFinite(a)}function z(b){var c,d=b[wa];if(!d&&"string"==typeof b)return c=new u(b),c[wa]();if(!d&&b.length!==a)return c=new w(b),c[wa]();if(!d)throw new TypeError("Object is not iterable");return b[wa]()}function A(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function B(a){var b=+a.length;return isNaN(b)?0:0!==b&&y(b)?(b=A(b)*Math.floor(Math.abs(b)),0>=b?0:b>Ub?Ub:b):b}function C(a,b){this.observer=a,this.parent=b}function D(a,b){return ca(a)||(a=tb),new Wb(b,a)}function E(a,b){return new tc(function(c){var d=new mb,e=new nb;return e.setDisposable(d),d.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){try{var d=b(a)}catch(f){return c.onError(f)}ia(d)&&(d=mc(d));var g=new mb;e.setDisposable(g),g.setDisposable(d.subscribe(c))},function(a){c.onCompleted(a)})),e},a)}function F(a,b){var c=this;return new tc(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function G(){return!1}function H(){return[]}function I(a,b,c){var d=Ba(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return ia(e)&&(e=mc(e)),(za(e)||ya(e))&&(e=Vb(e)),e}).concatAll()}function J(a,b,c){this.observer=a,this.selector=b,this.source=c,this.i=0,this.isStopped=!1}function K(a,b,c){var d=Ba(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return ia(e)&&(e=mc(e)),(za(e)||ya(e))&&(e=Vb(e)),e}).mergeAll()}function L(a,b,c){this.observer=a,this.predicate=b,this.source=c,this.i=0,this.isStopped=!1}function M(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),ib(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function N(a,b,c){var d=new fb;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(N(a.item(e),b,c));else a&&d.add(M(a,b,c));return d}function O(a,b){return new tc(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function P(a,b,c){return new tc(function(d){var e=a,f=qb(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function Q(a,b){return new tc(function(c){return b.scheduleWithRelative(qb(a),function(){c.onNext(0),c.onCompleted()})})}function R(a,b,c){return a===b?new tc(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):Qb(function(){return P(c.now()+a,b,c)})}function S(a,b,c){return new tc(function(d){var e,f=!1,g=new nb,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new mb,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new fb(e,g)},a)}function T(a,b,c){return Qb(function(){return S(a,b-c.now(),c)})}function U(a,b){return new tc(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new fb(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))},a)}function V(a,b,c){return new tc(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(da))){if(f)return void d.onError(f);try{e=c.apply(null,j)}catch(k){return void d.onError(k)}d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new fb(a.subscribe(function(a){e(a,0)},function(a){j[1]?d.onError(a):f=a},function(){i=!0,j[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}var W={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},X=W[typeof window]&&window||this,Y=W[typeof exports]&&exports&&!exports.nodeType&&exports,Z=W[typeof module]&&module&&!module.nodeType&&module,$=Z&&Z.exports===Y&&Y,_=W[typeof global]&&global;!_||_.global!==_&&_.window!==_||(X=_);var aa={internals:{},config:{Promise:X.Promise},helpers:{}},ba=aa.helpers.noop=function(){},ca=(aa.helpers.notDefined=function(a){return"undefined"==typeof a},aa.helpers.isScheduler=function(a){return a instanceof aa.Scheduler}),da=aa.helpers.identity=function(a){return a},ea=(aa.helpers.pluck=function(a){return function(b){return b[a]}},aa.helpers.just=function(a){return function(){return a}},aa.helpers.defaultNow=Date.now),fa=aa.helpers.defaultComparer=function(a,b){return $a(a,b)},ga=aa.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},ha=(aa.helpers.defaultKeySerializer=function(a){return a.toString()},aa.helpers.defaultError=function(a){throw a}),ia=aa.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},ja=(aa.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},aa.helpers.not=function(a){return!a},aa.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Oa.call(a)}),a}());aa.config.longStackSupport=!1;var ka=!1;try{throw new Error}catch(la){ka=!!la.stack}var ma,na=g(),oa="From previous event:",pa=aa.EmptyError=function(){this.message="Sequence contains no elements.",Error.call(this)};pa.prototype=Error.prototype;var qa=aa.ObjectDisposedError=function(){this.message="Object has been disposed",Error.call(this)};qa.prototype=Error.prototype;var ra=aa.ArgumentOutOfRangeError=function(){this.message="Argument out of range",Error.call(this)};ra.prototype=Error.prototype;var sa=aa.NotSupportedError=function(a){this.message=a||"This operation is not supported",Error.call(this)};sa.prototype=Error.prototype;var ta=aa.NotImplementedError=function(a){this.message=a||"This operation is not implemented",Error.call(this)};ta.prototype=Error.prototype;var ua=aa.helpers.notImplemented=function(){throw new ta},va=aa.helpers.notSupported=function(){throw new sa},wa="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";X.Set&&"function"==typeof(new X.Set)["@@iterator"]&&(wa="@@iterator");var xa=aa.doneEnumerator={done:!0,value:a},ya=aa.helpers.isIterable=function(b){return b[wa]!==a},za=aa.helpers.isArrayLike=function(b){return b&&b.length!==a};aa.helpers.iterator=wa;var Aa,Ba=aa.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},Ca=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Da=Ca.length,Ea="[object Arguments]",Fa="[object Array]",Ga="[object Boolean]",Ha="[object Date]",Ia="[object Error]",Ja="[object Function]",Ka="[object Number]",La="[object Object]",Ma="[object RegExp]",Na="[object String]",Oa=Object.prototype.toString,Pa=Object.prototype.hasOwnProperty,Qa=Oa.call(arguments)==Ea,Ra=Error.prototype,Sa=Object.prototype,Ta=String.prototype,Ua=Sa.propertyIsEnumerable;try{Aa=!(Oa.call(document)==La&&!({toString:0}+""))}catch(la){Aa=!0}var Va={};Va[Fa]=Va[Ha]=Va[Ka]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Va[Ga]=Va[Na]={constructor:!0,toString:!0,valueOf:!0},Va[Ia]=Va[Ja]=Va[Ma]={constructor:!0,toString:!0},Va[La]={constructor:!0};var Wa={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);Wa.enumErrorProps=Ua.call(Ra,"message")||Ua.call(Ra,"name"),Wa.enumPrototypes=Ua.call(a,"prototype"),Wa.nonEnumArgs=0!=c,Wa.nonEnumShadows=!/valueOf/.test(b)}(1);var Xa=aa.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Ya=function(a){return a&&"object"==typeof a?Oa.call(a)==Ea:!1};Qa||(Ya=function(a){return a&&"object"==typeof a?Pa.call(a,"callee"):!1});{var Za,$a=aa.internals.isEqual=function(a,b){return m(a,b,[],[])},_a={e:{}},ab=({}.hasOwnProperty,Array.prototype.slice),bb=this.inherits=aa.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},cb=aa.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}};aa.internals.addRef=function(a,b){return new tc(function(c){return new fb(b.getDisposable(),a.subscribe(c))})}}r.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var db=aa.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},eb=db.prototype;eb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},eb.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},eb.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(b<this.length&&this.isHigherPriority(b,d)&&(d=b),c<this.length&&this.isHigherPriority(c,d)&&(d=c),d!==a){var e=this.items[a];this.items[a]=this.items[d],this.items[d]=e,this.heapify(d)}}},eb.peek=function(){return this.items[0].value},eb.removeAt=function(b){this.items[b]=this.items[--this.length],this.items[this.length]=a,this.heapify()},eb.dequeue=function(){var a=this.peek();return this.removeAt(0),a},eb.enqueue=function(a){var b=this.length++;this.items[b]=new r(db.count++,a),this.percolate(b)},eb.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},db.count=0;var fb=aa.CompositeDisposable=function(){var a,b,c=[];if(Array.isArray(arguments[0]))c=arguments[0],b=c.length;else for(b=arguments.length,c=new Array(b),a=0;b>a;a++)c[a]=arguments[a];for(a=0;b>a;a++)if(!kb(c[a]))throw new TypeError("Not a disposable");this.disposables=c,this.isDisposed=!1,this.length=c.length},gb=fb.prototype;gb.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},gb.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},gb.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=this.disposables.length,b=new Array(a),c=0;a>c;c++)b[c]=this.disposables[c];for(this.disposables=[],this.length=0,c=0;a>c;c++)b[c].dispose()}};var hb=aa.Disposable=function(a){this.isDisposed=!1,this.action=a||ba};hb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var ib=hb.create=function(a){return new hb(a)},jb=hb.empty={dispose:ba},kb=hb.isDisposable=function(a){return a&&ja(a.dispose)},lb=hb.checkDisposed=function(a){if(a.isDisposed)throw new qa},mb=aa.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()},a}(),nb=aa.SerialDisposable=mb,ob=(aa.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?jb:new a(this)},b}(),aa.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||ga,this.disposable=new mb});ob.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},ob.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},ob.prototype.isCancelled=function(){return this.disposable.isDisposed},ob.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var pb=aa.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),jb}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=ea,a.normalize=function(a){return 0>a&&(a=0),a},a}(),qb=pb.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new fb,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),jb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new fb,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c](b,d,function(a,b){return e?f.remove(i):h=!0,g(b),jb});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(pb.prototype),function(){pb.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},pb.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof X.setInterval)throw new sa;var d=a,e=X.setInterval(function(){d=c(d)},b);return ib(function(){X.clearInterval(e)})}}(pb.prototype);var rb,sb=pb.immediate=function(){function a(a,b){return b(this,a)}return new pb(ea,a,va,va)}(),tb=pb.currentThread=function(){function a(){for(;c.length>0;){var a=c.dequeue();a.isCancelled()||!a.isCancelled()&&a.invoke()}}function b(b,d){var e=new ob(this,b,d,this.now());if(c)c.enqueue(e);else{c=new db(4),c.enqueue(e);var f=o(a)();if(c=null,f===_a)return p(f.e)}return e.disposable}var c,d=new pb(ea,b,va,va);return d.scheduleRequired=function(){return!c},d.ensureTrampoline=function(a){c?a():this.schedule(a)},d}(),ub=(aa.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new mb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),ba),vb=function(){var a,b=ba;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!X.setTimeout)throw new sa;a=X.setTimeout,b=X.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),wb=vb.setTimeout,xb=vb.clearTimeout;!function(){function a(){if(!X.postMessage||X.importScripts)return!1;var a=!1,b=X.onmessage;return X.onmessage=function(){a=!0},X.postMessage("","*"),X.onmessage=b,a}var b=RegExp("^"+String(Oa).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=_&&$&&_.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=_&&$&&_.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)rb=c,ub=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))rb=process.nextTick;else if(a()){var e="ms.rx.schedule"+Math.random(),f={},g=0,h=function(a){if("string"==typeof a.data&&a.data.substring(0,e.length)===e){var b=a.data.substring(e.length),c=f[b];c(),delete f[b]}};X.addEventListener?X.addEventListener("message",h,!1):X.attachEvent("onmessage",h,!1),rb=function(a){var b=g++;f[b]=a,X.postMessage(e+b,"*")}}else if(X.MessageChannel){var i=new X.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},rb=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in X&&"onreadystatechange"in X.document.createElement("script")?rb=function(a){var b=X.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},X.document.documentElement.appendChild(b)}:(rb=function(a){return wb(a,0)},ub=xb)}();var yb=pb.timeout=function(){function a(a,b){var c=this,d=new mb,e=rb(function(){d.isDisposed||d.setDisposable(b(c,a))});return new fb(d,ib(function(){ub(e)}))}function b(a,b,c){var d=this,e=pb.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new mb,g=wb(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new fb(f,ib(function(){xb(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new pb(ea,a,b,c)}(),zb=aa.Notification=function(){function a(a,b,c,d,e,f){this.kind=a,this.value=b,this.exception=c,this._accept=d,this._acceptObservable=e,this.toString=f}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return ca(a)||(a=sb),new tc(function(c){return a.scheduleWithState(b,function(a,b){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Ab=zb.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){return new zb("N",d,null,a,b,c)}}(),Bb=zb.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){return new zb("E",null,d,a,b,c)}}(),Cb=zb.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){return new zb("C",null,null,a,b,c)}}(),Db=aa.internals.Enumerator=function(a){this._next=a};Db.prototype.next=function(){return this._next()},Db.prototype[wa]=function(){return this};var Eb=aa.internals.Enumerable=function(a){this._iterator=a};Eb.prototype[wa]=function(){return this._iterator()},Eb.prototype.concat=function(){var a=this;return new tc(function(b){var c,d=a[wa](),e=new nb,f=sb.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;ia(h)&&(h=mc(h));var i=new mb;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new fb(e,f,ib(function(){c=!0}))})},Eb.prototype.catchError=function(){var a=this;return new tc(function(b){var c,d=a[wa](),e=new nb,f=sb.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;ia(i)&&(i=mc(i));var j=new mb;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new fb(e,f,ib(function(){c=!0}))})},Eb.prototype.catchErrorWhen=function(a){var b=this;return new tc(function(c){var d,e,f=new wc,g=new wc,h=a(f),i=h.subscribe(g),j=b[wa](),k=new nb,l=sb.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;ia(i)&&(i=mc(i));var l=new mb,m=new mb;k.setDisposable(new fb(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new fb(i,k,l,ib(function(){d=!0}))})};var Fb,Gb=Eb.repeat=function(a,b){return null==b&&(b=-1),new Eb(function(){var c=b;return new Db(function(){return 0===c?xa:(c>0&&c--,{done:!1,value:a})})})},Hb=Eb.of=function(a,b,c){if(b)var d=Ba(b,c,3);return new Eb(function(){var c=-1;return new Db(function(){return++c<a.length?{done:!1,value:b?d(a[c],c,a):a[c]}:xa})})},Ib=aa.Observer=function(){},Jb=Ib.create=function(a,b,c){return a||(a=ba),b||(b=ha),c||(c=ba),new Lb(a,b,c)},Kb=aa.internals.AbstractObserver=function(a){function b(){this.isStopped=!1,a.call(this)}return bb(b,a),b.prototype.next=ua,b.prototype.error=ua,b.prototype.completed=ua,b.prototype.onNext=function(a){this.isStopped||this.next(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.error(a))},b.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}(Ib),Lb=aa.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return bb(b,a),b.prototype.next=function(a){this._onNext(a)},b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(Kb),Mb=aa.Observable=function(){function a(a){if(aa.config.longStackSupport&&ka){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var d=this;this._subscribe=function(b){var e=b.onError.bind(b);return b.onError=function(a){c(a,d),e(a)},a.call(d,b)}}else this._subscribe=a}return Fb=a.prototype,Fb.subscribe=Fb.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:Jb(a,b,c))},Fb.subscribeOnNext=function(a,b){return this._subscribe(Jb("undefined"!=typeof b?function(c){a.call(b,c)}:a))},Fb.subscribeOnError=function(a,b){return this._subscribe(Jb(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},Fb.subscribeOnCompleted=function(a,b){return this._subscribe(Jb(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),Nb=aa.internals.ScheduledObserver=function(a){function b(b,c){a.call(this),this.scheduler=b,this.observer=c,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new nb}return bb(b,a),b.prototype.next=function(a){var b=this;this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},b.prototype.ensureActive=function(){var a=!1,b=this;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Kb),Ob=aa.ObservableBase=function(a){function b(a){return a&&ja(a.dispose)?a:ja(a)?ib(a):jb}function c(a,c){var d=c[0],e=c[1],f=o(e.subscribeCore).call(e,d);return f!==_a||d.fail(_a.e)?void d.setDisposable(b(f)):p(_a.e)}function d(a){var b=new uc(a),d=[b,this];return tb.scheduleRequired()?tb.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return bb(e,a),e.prototype.subscribeCore=ua,e}(Mb),Pb=function(a){function b(b){this.source=b,a.call(this)}return bb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new t(a))},b}(Ob);t.prototype.onNext=function(a){this.isStopped||this.a.push(a)},t.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},t.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onNext(this.a),this.observer.onCompleted())},t.prototype.dispose=function(){this.isStopped=!0},t.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},Fb.toArray=function(){return new Pb(this)},Mb.create=Mb.createWithDisposable=function(a,b){return new tc(a,b)};var Qb=Mb.defer=function(a){return new tc(function(b){var c;try{c=a()}catch(d){return _b(d).subscribe(b)}return ia(c)&&(c=mc(c)),c.subscribe(b)})},Rb=Mb.empty=function(a){return ca(a)||(a=sb),new tc(function(b){return a.schedule(function(){b.onCompleted()})})},Sb=function(a){function b(b,c,d){this.iterable=b,this.mapper=c,this.scheduler=d,a.call(this)}return bb(b,a),b.prototype.subscribeCore=function(a){var b=new Tb(a,this);return b.run()},b}(Ob),Tb=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,b){try{var f=c.next()}catch(g){return d.onError(g)}if(f.done)return d.onCompleted();var h=f.value;if(e)try{h=e(h,a)}catch(g){return d.onError(g)}d.onNext(h),b(a+1)}var b=Object(this.parent.iterable),c=z(b),d=this.observer,e=this.parent.mapper;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}(),Ub=Math.pow(2,53)-1;u.prototype[wa]=function(){return new v(this._s)},v.prototype[wa]=function(){return this},v.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:xa},w.prototype[wa]=function(){return new x(this._a)},x.prototype[wa]=function(){return this},x.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:xa};var Vb=Mb.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!ja(b))throw new Error("mapFn when provided must be a function");if(b)var e=Ba(b,c,2);return ca(d)||(d=tb),new Sb(a,e,d)},Wb=function(a){function b(b,c){this.args=b,this.scheduler=c,a.call(this)}return bb(b,a),b.prototype.subscribeCore=function(a){var b=new C(a,this);return b.run()},b}(Ob);C.prototype.run=function(){function a(a,e){d>a?(b.onNext(c[a]),e(a+1)):b.onCompleted()}var b=this.observer,c=this.parent.args,d=c.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)};{var Xb=Mb.fromArray=function(a,b){return ca(b)||(b=tb),new Wb(a,b)};Mb.never=function(){return new tc(function(){return jb})}}Mb.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new Wb(b,tb)},Mb.ofWithScheduler=function(a){for(var b=arguments.length,c=new Array(b-1),d=1;b>d;d++)c[d-1]=arguments[d];return new Wb(c,a)},Mb.pairs=function(a,b){return b||(b=aa.Scheduler.currentThread),new tc(function(c){var d=Object.keys(a),e=d.length;return b.scheduleRecursiveWithState(0,function(b,f){if(e>b){var g=d[b];c.onNext([g,a[g]]),f(b+1)}else c.onCompleted()})})};var Yb=function(a){function b(b,c,d){this.start=b,this.count=c,this.scheduler=d,a.call(this)}return bb(b,a),b.prototype.subscribeCore=function(a){var b=new Zb(a,this);return b.run()},b}(Ob),Zb=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,e){c>a?(d.onNext(b+a),e(a+1)):d.onCompleted()}var b=this.parent.start,c=this.parent.count,d=this.observer;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}();Mb.range=function(a,b,c){return ca(c)||(c=tb),new Yb(a,b,c)},Mb.repeat=function(a,b,c){return ca(c)||(c=tb),$b(a,c).repeat(null==b?-1:b)};var $b=Mb["return"]=Mb.just=function(a,b){return ca(b)||(b=sb),new tc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};Mb.returnValue=function(){return $b.apply(null,arguments)};var _b=Mb["throw"]=Mb.throwError=function(a,b){return ca(b)||(b=sb),new tc(function(c){return b.schedule(function(){c.onError(a)})})};Mb.throwException=function(){return Mb.throwError.apply(null,arguments)},Fb["catch"]=Fb.catchError=Fb.catchException=function(a){return"function"==typeof a?E(this,a):ac([this,a])};var ac=Mb.catchError=Mb["catch"]=Mb.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Hb(a).catchError()};Fb.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return Array.isArray(b[0])?b[0].unshift(this):b.unshift(this),
bc.apply(this,b)};var bc=Mb.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.pop();return Array.isArray(b[0])&&(b=b[0]),new tc(function(a){function c(b){if(h[b]=!0,i||(i=h.every(da))){try{var c=d.apply(null,k)}catch(e){return a.onError(e)}a.onNext(c)}else j.filter(function(a,c){return c!==b}).every(da)&&a.onCompleted()}function e(b){j[b]=!0,j.every(da)&&a.onCompleted()}for(var f=b.length,g=function(){return!1},h=q(f,g),i=!1,j=q(f,g),k=new Array(f),l=new Array(f),m=0;f>m;m++)!function(d){var f=b[d],g=new mb;ia(f)&&(f=mc(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(b){a.onError(b)},function(){e(d)})),l[d]=g}(m);return new fb(l)},this)};Fb.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),cc.apply(null,a)};var cc=Mb.concat=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(arguments.length);for(var b=0,c=arguments.length;c>b;b++)a[b]=arguments[b]}return Hb(a).concat()};Fb.concatAll=Fb.concatObservable=function(){return this.merge(1)};var dc=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return bb(b,a),b.prototype.subscribeCore=function(a){var b=new fb;return b.add(this.source.subscribe(new ec(a,this.maxConcurrent,b))),b},b}(Ob),ec=function(){function a(a,b,c){this.o=a,this.max=b,this.g=c,this.done=!1,this.q=[],this.activeCount=0,this.isStopped=!1}function b(a,b){this.parent=a,this.sad=b,this.isStopped=!1}return a.prototype.handleSubscribe=function(a){var c=new mb;this.g.add(c),ia(a)&&(a=mc(a)),c.setDisposable(a.subscribe(new b(this,c)))},a.prototype.onNext=function(a){this.isStopped||(this.activeCount<this.max?(this.activeCount++,this.handleSubscribe(a)):this.q.push(a))},a.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},a.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,0===this.activeCount&&this.o.onCompleted())},a.prototype.dispose=function(){this.isStopped=!0},a.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},b.prototype.onCompleted=function(){if(!this.isStopped){this.isStopped=!0;var a=this.parent;a.g.remove(this.sad),a.q.length>0?a.handleSubscribe(a.q.shift()):(a.activeCount--,a.done&&0===a.activeCount&&a.o.onCompleted())}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();Fb.merge=function(a){return"number"!=typeof a?fc(this,a):new dc(this,a)};var fc=Mb.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(ca(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=sb,b=0;d>b;b++)c.push(arguments[b]);else for(a=sb,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),D(a,c).mergeAll()},gc=aa.CompositeError=function(a){this.name="NotImplementedError",this.innerErrors=a,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};gc.prototype=Error.prototype,Mb.mergeDelayError=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}var d=D(null,a);return new tc(function(a){function b(){0===g.length?a.onCompleted():a.onError(1===g.length?g[0]:new gc(g))}var c=new fb,e=new mb,f=!1,g=[];return c.add(e),e.setDisposable(d.subscribe(function(d){var e=new mb;c.add(e),ia(d)&&(d=mc(d)),e.setDisposable(d.subscribe(function(b){a.onNext(b)},function(a){g.push(a),c.remove(e),f&&1===c.length&&b()},function(){c.remove(e),f&&1===c.length&&b()}))},function(a){g.push(a),f=!0,1===c.length&&b()},function(){f=!0,1===c.length&&b()})),c})};var hc=function(a){function b(b){this.source=b,a.call(this)}return bb(b,a),b.prototype.subscribeCore=function(a){var b=new fb,c=new mb;return b.add(c),c.setDisposable(this.source.subscribe(new ic(a,b))),b},b}(Ob),ic=function(){function a(a,b){this.o=a,this.g=b,this.isStopped=!1,this.done=!1}function b(a,b,c){this.parent=a,this.g=b,this.sad=c,this.isStopped=!1}return a.prototype.onNext=function(a){if(!this.isStopped){var c=new mb;this.g.add(c),ia(a)&&(a=mc(a)),c.setDisposable(a.subscribe(new b(this,this.g,c)))}},a.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},a.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,1===this.g.length&&this.o.onCompleted())},a.prototype.dispose=function(){this.isStopped=!0},a.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},b.prototype.onCompleted=function(){if(!this.isStopped){var a=this.parent;this.isStopped=!0,a.g.remove(this.sad),a.done&&1===a.g.length&&a.o.onCompleted()}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();Fb.mergeAll=Fb.mergeObservable=function(){return new hc(this)},Fb.skipUntil=function(a){var b=this;return new tc(function(c){var d=!1,e=new fb(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));ia(a)&&(a=mc(a));var f=new mb;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)},Fb["switch"]=Fb.switchLatest=function(){var a=this;return new tc(function(b){var c=!1,d=new nb,e=!1,f=0,g=a.subscribe(function(a){var g=new mb,h=++f;c=!0,d.setDisposable(g),ia(a)&&(a=mc(a)),g.setDisposable(a.subscribe(function(a){f===h&&b.onNext(a)},function(a){f===h&&b.onError(a)},function(){f===h&&(c=!1,e&&b.onCompleted())}))},function(a){b.onError(a)},function(){e=!0,!c&&b.onCompleted()});return new fb(g,d)},a)},Fb.takeUntil=function(a){var b=this;return new tc(function(c){return ia(a)&&(a=mc(a)),new fb(b.subscribe(c),a.subscribe(function(){c.onCompleted()},function(a){c.onError(a)},ba))},b)},Fb.withLatestFrom=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(b[0])&&(b=b[0]),new tc(function(a){for(var c=function(){return!1},f=b.length,g=q(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=b[c],e=new mb;ia(d)&&(d=mc(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(da)},a.onError.bind(a),function(){})),j[c]=e}(k);var l=new mb;return l.setDisposable(e.subscribe(function(b){var c,e=[b].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void a.onError(f)}a.onNext(c)}},a.onError.bind(a),function(){a.onCompleted()})),j[f]=l,new fb(j)},this)},Fb.zip=function(){if(Array.isArray(arguments[0]))return F.apply(this,arguments);for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=this,e=b.pop();return b.unshift(d),new tc(function(a){function c(b){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void a.onError(g)}a.onNext(c)}else i.filter(function(a,c){return c!==b}).every(da)&&a.onCompleted()}function f(b){i[b]=!0,i.every(function(a){return a})&&a.onCompleted()}for(var g=b.length,h=q(g,H),i=q(g,G),j=new Array(g),k=0;g>k;k++)!function(d){var e=b[d],g=new mb;ia(e)&&(e=mc(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(b){a.onError(b)},function(){f(d)})),j[d]=g}(k);return new fb(j)},d)},Mb.zip=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.shift();return d.zip.apply(d,b)},Mb.zipArray=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new tc(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(da))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(da)?void b.onCompleted():void 0}for(var e=a.length,f=q(e,function(){return[]}),g=q(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new mb,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new fb(h)})},Fb.asObservable=function(){var a=this;return new tc(function(b){return a.subscribe(b)},this)},Fb.dematerialize=function(){var a=this;return new tc(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},Fb.distinctUntilChanged=function(a,b){var c=this;return b||(b=fa),new tc(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},Fb["do"]=Fb.tap=Fb.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?Jb(a||ba,b||ba,c||ba):a;return new tc(function(a){return d.subscribe(function(b){try{e.onNext(b)}catch(c){a.onError(c)}a.onNext(b)},function(b){try{e.onError(b)}catch(c){a.onError(c)}a.onError(b)},function(){try{e.onCompleted()}catch(b){a.onError(b)}a.onCompleted()})},this)},Fb.doOnNext=Fb.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},Fb.doOnError=Fb.tapOnError=function(a,b){return this.tap(ba,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},Fb.doOnCompleted=Fb.tapOnCompleted=function(a,b){return this.tap(ba,null,"undefined"!=typeof b?function(){a.call(b)}:a)},Fb["finally"]=Fb.ensure=function(a){var b=this;return new tc(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return ib(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},Fb.finallyAction=function(a){return this.ensure(a)},Fb.ignoreElements=function(){var a=this;return new tc(function(b){return a.subscribe(ba,function(a){b.onError(a)},function(){b.onCompleted()})},a)},Fb.materialize=function(){var a=this;return new tc(function(b){return a.subscribe(function(a){b.onNext(Ab(a))},function(a){b.onNext(Bb(a)),b.onCompleted()},function(){b.onNext(Cb()),b.onCompleted()})},a)},Fb.repeat=function(a){return Gb(this,a).concat()},Fb.retry=function(a){return Gb(this,a).catchError()},Fb.retryWhen=function(a){return Gb(this).catchErrorWhen(a)},Fb.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new tc(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},Fb.skipLast=function(a){if(0>a)throw new ra;var b=this;return new tc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},Fb.startWith=function(){var a,b=0;arguments.length&&ca(arguments[0])?(a=arguments[0],b=1):a=sb;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return Hb([Xb(c,a),this]).concat()},Fb.takeLast=function(a){if(0>a)throw new ra;var b=this;return new tc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},Fb.selectConcat=Fb.concatMap=function(a,b,c){return ja(a)&&ja(b)?this.concatMap(function(c,d){var e=a(c,d);return ia(e)&&(e=mc(e)),(za(e)||ya(e))&&(e=Vb(e)),e.map(function(a,e){return b(c,a,d,e)})}):ja(a)?I(this,a,c):I(this,function(){return a})};var jc=function(a){function b(b,c,d){this.source=b,this.selector=Ba(c,d,3),a.call(this)}return bb(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a(d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new J(a,this.selector,this))},b}(Ob);J.prototype.onNext=function(a){if(!this.isStopped){var b=o(this.selector).call(this,a,this.i++,this.source);return b===_a?this.observer.onError(b.e):void this.observer.onNext(b)}},J.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},J.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},J.prototype.dispose=function(){this.isStopped=!0},J.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},Fb.map=Fb.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof jc?this.internalMap(c,b):new jc(this,c,b)},Fb.pluck=function(){var b=arguments,c=arguments.length;if(0===c)throw new Error("List of properties cannot be empty.");return this.map(function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e})},Fb.selectMany=Fb.flatMap=function(a,b,c){return ja(a)&&ja(b)?this.flatMap(function(c,d){var e=a(c,d);return ia(e)&&(e=mc(e)),(za(e)||ya(e))&&(e=Vb(e)),e.map(function(a,e){return b(c,a,d,e)})},c):ja(a)?K(this,a,c):K(this,function(){return a})},Fb.selectSwitch=Fb.flatMapLatest=Fb.switchMap=function(a,b){return this.select(a,b).switchLatest()},Fb.skip=function(a){if(0>a)throw new ra;var b=this;return new tc(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},Fb.skipWhile=function(a,b){var c=this,d=Ba(a,b,3);return new tc(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},Fb.take=function(a,b){if(0>a)throw new ra;if(0===a)return Rb(b);var c=this;return new tc(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},Fb.takeWhile=function(a,b){var c=this,d=Ba(a,b,3);return new tc(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var kc=function(a){function b(b,c,d){this.source=b,this.predicate=Ba(c,d,3),a.call(this)}return bb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new L(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a(b,c,e)},c)},b}(Ob);L.prototype.onNext=function(a){if(!this.isStopped){var b=o(this.predicate).call(this,a,this.i++,this.source);return b===_a?this.observer.onError(b.e):void(b&&this.observer.onNext(a))}},L.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},L.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},L.prototype.dispose=function(){this.isStopped=!0},L.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},Fb.filter=Fb.where=function(a,b){return this instanceof kc?this.internalFilter(a,b):new kc(this,a,b)},Mb.fromCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new tc(function(e){function f(){var a=arguments;if(c){try{a=c(a)}catch(b){return e.onError(b)}e.onNext(a)}else a.length<=1?e.onNext.apply(e,a):e.onNext(a);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},Mb.fromNodeCallback=function(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return new tc(function(d){function f(a){if(a)return void d.onError(a);for(var b=arguments.length,e=new Array(b-1),f=1;b>f;f++)e[f-1]=arguments[f];if(c){try{e=c(e)}catch(g){return d.onError(g)}d.onNext(e)}else e.length<=1?d.onNext.apply(d,e):d.onNext(e);d.onCompleted()}e.push(f),a.apply(b,e)}).publishLast().refCount()}},aa.config.useNativeEvents=!1,Mb.fromEvent=function(a,b,c){return a.addListener?lc(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c):aa.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new tc(function(d){return N(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e)}d.onNext(b)})}).publish().refCount():lc(function(c){a.on(b,c)},function(c){a.off(b,c)},c)};var lc=Mb.fromEventPattern=function(a,b,c){return new tc(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e)}d.onNext(b)}var f=a(e);return ib(function(){b&&b(e,f)})}).publish().refCount()},mc=Mb.fromPromise=function(a){return Qb(function(){var b=new aa.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};Fb.toPromise=function(a){if(a||(a=aa.config.Promise),!a)throw new sa("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},Mb.startAsync=function(a){var b;try{b=a()}catch(c){return _b(c)}return mc(b)},Fb.multicast=function(a,b){var c=this;return"function"==typeof a?new tc(function(d){var e=c.multicast(a());return new fb(b(e).subscribe(d),e.connect())},c):new nc(c,a)},Fb.publish=function(a){return a&&ja(a)?this.multicast(function(){return new wc},a):this.multicast(new wc)},Fb.share=function(){return this.publish().refCount()},Fb.publishLast=function(a){return a&&ja(a)?this.multicast(function(){return new xc},a):this.multicast(new xc)},Fb.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new zc(b)},a):this.multicast(new zc(a))},Fb.shareValue=function(a){return this.publishValue(a).refCount()},Fb.replay=function(a,b,c,d){return a&&ja(a)?this.multicast(function(){return new Ac(b,c,d)},a):this.multicast(new Ac(b,c,d))},Fb.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};{var nc=aa.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new fb(f.subscribe(c),ib(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return bb(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new tc(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(Mb),oc=Mb.interval=function(a,b){return R(a,a,ca(b)?b:yb)};Mb.timer=function(b,c,d){var e;return ca(d)||(d=yb),c!==a&&"number"==typeof c?e=c:ca(c)&&(d=c),b instanceof Date&&e===a?O(b.getTime(),d):b instanceof Date&&e!==a?(e=c,P(b.getTime(),e,d)):e===a?Q(b,d):R(b,e,d)}}Fb.delay=function(a,b){return ca(b)||(b=yb),a instanceof Date?T(this,a.getTime(),b):S(this,a,b)},Fb.debounce=Fb.throttleWithTimeout=function(a,b){ca(b)||(b=yb);var c=this;return new tc(function(d){var e,f=new nb,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new mb;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new fb(i,f)},this)},Fb.throttle=function(a,b){return this.debounce(a,b)},Fb.timestamp=function(a){return ca(a)||(a=yb),this.map(function(b){return{value:b,timestamp:a.now()}})},Fb.sample=Fb.throttleLatest=function(a,b){return ca(b)||(b=yb),"number"==typeof a?U(this,oc(a,b)):U(this,a)},Fb.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=_b(new Error(b||"Timeout"))),ca(c)||(c=yb);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new tc(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(ia(b)&&(b=mc(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new mb,j=new nb,k=!1,l=new nb;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new fb(j,l)},d)},Fb.throttleFirst=function(a,b){ca(b)||(b=yb);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new tc(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)};var pc=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=jb,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=jb)});return new fb(c,d,e)}function c(c,d){this.source=c,this.controller=new wc,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return bb(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(Mb);Fb.pausable=function(a){return new pc(this,a)};var qc=function(b){function c(b){var c,d=[],e=V(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(c!==a&&e.shouldFire!=c){if(c=e.shouldFire,e.shouldFire)for(;d.length>0;)b.onNext(d.shift())}else c=e.shouldFire,e.shouldFire?b.onNext(e.data):d.push(e.data)},function(a){for(;d.length>0;)b.onNext(d.shift());b.onError(a)},function(){for(;d.length>0;)b.onNext(d.shift());b.onCompleted()});return e}function d(a,d){this.source=a,this.controller=new wc,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return bb(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(Mb);Fb.pausableBuffered=function(a){return new qc(this,a)};var rc=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b,c),this.subject=new sc(d),this.source=c.multicast(this.subject).refCount()}return bb(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(Mb),sc=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new wc,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=jb,this.error=null,this.hasFailed=!1,this.hasCompleted=!1}return bb(c,a),cb(c.prototype,Ib,{onCompleted:function(){this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length?this.queue.push(aa.Notification.createOnCompleted()):this.subject.onCompleted()},onError:function(a){this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length?this.queue.push(aa.Notification.createOnError(a)):this.subject.onError(a)},onNext:function(a){var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(aa.Notification.createOnNext(a)):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0||this.queue.length>0&&"N"!==this.queue[0].kind;){var b=this.queue.shift();b.accept(this.subject),"N"===b.kind?a--:(this.disposeCurrentRequest(),this.queue=[])}return{numberOfItems:a,returnValue:0!==this.queue.length}}return{numberOfItems:a,returnValue:!1}},request:function(a){this.disposeCurrentRequest();var b=this,c=this._processRequest(a),a=c.numberOfItems;return c.returnValue?jb:(this.requestedCount=a,this.requestedDisposable=ib(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=jb}}),c}(Mb);Fb.controlled=function(a){return null==a&&(a=!0),new rc(this,a)},Fb.transduce=function(a){function b(a){return{init:function(){return a},step:function(a,b){return a.onNext(b)},result:function(a){return a.onCompleted()}}}var c=this;return new tc(function(d){var e=a(b(d));return c.subscribe(function(a){try{e.step(d,a)}catch(b){d.onError(b)}},d.onError.bind(d),function(){e.result(d)})},c)};var tc=aa.AnonymousObservable=function(a){function b(a){return a&&ja(a.dispose)?a:ja(a)?ib(a):jb}function c(a,c){var d=c[0],e=c[1],f=o(e)(d);return f!==_a||d.fail(_a.e)?void d.setDisposable(b(f)):p(_a.e)}function d(b,d){function e(a){var d=new uc(a),e=[d,b];return tb.scheduleRequired()?tb.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return bb(d,a),d}(Mb),uc=function(a){function b(b){a.call(this),this.observer=b,this.m=new mb}bb(b,a);var c=b.prototype;return c.next=function(a){var b=o(this.observer.onNext).call(this.observer,a);b===_a&&(this.dispose(),p(b.e))},c.error=function(a){var b=o(this.observer.onError).call(this.observer,a);this.dispose(),b===_a&&p(b.e)},c.completed=function(){var a=o(this.observer.onCompleted).call(this.observer);this.dispose(),a===_a&&p(a.e)},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Kb),vc=function(a,b){this.subject=a,this.observer=b};vc.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var wc=aa.Subject=function(a){function c(a){return lb(this),this.isStopped?this.hasError?(a.onError(this.error),jb):(a.onCompleted(),jb):(this.observers.push(a),new vc(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return bb(d,a),cb(d.prototype,Ib.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(lb(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=b(this.observers),d=c.length;d>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(lb(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){if(lb(this),!this.isStopped)for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new yc(a,b)},d}(Mb),xc=aa.AsyncSubject=function(a){function c(a){return lb(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),jb):(this.observers.push(a),new vc(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return bb(d,a),cb(d.prototype,Ib,{hasObservers:function(){return lb(this),this.observers.length>0},onCompleted:function(){var a,c;if(lb(this),!this.isStopped){this.isStopped=!0;var d=b(this.observers),c=d.length;if(this.hasValue)for(a=0;c>a;a++){var e=d[a];e.onNext(this.value),e.onCompleted()}else for(a=0;c>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(lb(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){lb(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(Mb),yc=aa.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return bb(c,a),cb(c.prototype,Ib.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Mb),zc=aa.BehaviorSubject=function(a){function c(a){return lb(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),jb):(this.observers.push(a),a.onNext(this.value),new vc(this,a))}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return bb(d,a),cb(d.prototype,Ib,{getValue:function(){if(lb(this),this.hasError)throw this.error;return this.value},hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(lb(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=b(this.observers),d=c.length;d>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(lb(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){if(lb(this),!this.isStopped){this.value=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),d}(Mb),Ac=aa.ReplaySubject=function(a){function c(a,b){return ib(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var b=new Nb(this.scheduler,a),d=c(this,b);lb(this),this._trim(this.scheduler.now()),this.observers.push(b);for(var e=0,f=this.q.length;f>e;e++)b.onNext(this.q[e].value);return this.hasError?b.onError(this.error):this.isStopped&&b.onCompleted(),b.ensureActive(),d}function e(b,c,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=e||tb,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)}return bb(e,a),cb(e.prototype,Ib.prototype,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(lb(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var d=0,e=b(this.observers),f=e.length;f>d;d++){var g=e[d];g.onNext(a),g.ensureActive()}}},onError:function(a){if(lb(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var d=0,e=b(this.observers),f=e.length;f>d;d++){var g=e[d];g.onError(a),g.ensureActive()}this.observers.length=0}},onCompleted:function(){if(lb(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var c=0,d=b(this.observers),e=d.length;e>c;c++){var f=d[c];f.onCompleted(),f.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(Mb);aa.Pauser=function(a){function b(){a.call(this)}return bb(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(wc),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(X.Rx=aa,define(function(){return aa})):Y&&Z?$?(Z.exports=aa).Rx=aa:Y.Rx=aa:X.Rx=aa;var Bc=g()}).call(this);
//# sourceMappingURL=rx.lite.map

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc