biofriction-wp-theme/node_modules/rx/dist/rx.lite.compat.min.js

5 lines
86 KiB
JavaScript

/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
(function(a){function b(a){return a&&a.Object===Object?a:null}function c(a){for(var b=a.length,c=new Array(b),d=0;b>d;d++)c[d]=a[d];return c}function d(a){return function(){try{return a.apply(this,arguments)}catch(b){return va.e=b,va}}}function e(a){throw a}function f(a,b){if(xa&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(Ba)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var e=c.join("\n"+Ba+"\n");a.stack=g(e)}}function g(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var f=b[d];h(f)||i(f)||!f||c.push(f)}return c.join("\n")}function h(a){var b=k(a);if(!b)return!1;var c=b[0],d=b[1];return c===za&&d>=Aa&&xe>=d}function i(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function j(){if(xa)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=k(c);if(!d)return;return za=d[0],d[1]}}function k(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 l(b,c,d,e,f,g){var h=vb(b),i=h.length,j=vb(c),k=j.length;if(i!==k&&!e)return!1;for(var l,m=i;m--;)if(l=h[m],!(e?l in c:sb.call(c,l)))return!1;for(var n=e;++m<i;){l=h[m];var o,p=b[l],q=c[l];if(!(o===a?d(p,q,e,f,g):o))return!1;n||(n="constructor"===l)}if(!n){var r=b.constructor,s=c.constructor;if(r!==s&&"constructor"in b&&"constructor"in c&&!("function"==typeof r&&r instanceof r&&"function"==typeof s&&s instanceof s))return!1}return!0}function m(a,b,c){switch(c){case Xa:case Ya:return+a===+b;case Za:return a.name===b.name&&a.message===b.message;case ab:return a!==+a?b!==+b:a===+b;case cb:case eb:return a===b+""}return!1}function n(a){return!!a&&"object"==typeof a}function o(a){return"number"==typeof a&&a>-1&&a%1===0&&ub>=a}function p(a){return n(a)&&o(a.length)&&!!qb[tb.call(a)]}function q(a,b){for(var c=-1,d=a.length;++c<d;)if(b(a[c],c,a))return!0;return!1}function r(b,c,d,e,f,g){var h=-1,i=b.length,j=c.length;if(i!==j&&!(e&&j>i))return!1;for(;++h<i;){var k,l=b[h],m=c[h];if(k!==a){if(k)continue;return!1}if(e){if(!q(c,function(a){return l===a||d(l,a,e,f,g)}))return!1}else if(l!==m&&!d(l,m,e,f,g))return!1}return!0}function s(a,b,c,d,e,f){var g=yb(a),h=yb(b),i=Wa,j=Wa;g||(i=tb.call(a),i===Va?i=bb:i!==bb&&(g=p(a))),h||(j=tb.call(b),j===Va&&(j=bb));var k=i===bb&&!xb(a),n=j===bb&&!xb(b),o=i===j;if(o&&!g&&!k)return m(a,b,i);if(!d){var q=k&&sb.call(a,"__wrapped__"),s=n&&sb.call(b,"__wrapped__");if(q||s)return c(q?a.value():a,s?b.value():b,d,e,f)}if(!o)return!1;e||(e=[]),f||(f=[]);for(var t=e.length;t--;)if(e[t]===a)return f[t]===b;e.push(a),f.push(b);var u=(g?r:l)(a,b,c,d,e,f);return e.pop(),f.pop(),u}function t(a,b,c,d,e){return a===b?!0:null==a||null==b||!wb(a)&&!n(b)?a!==a&&b!==b:s(a,b,t,c,d,e)}function u(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function v(a,b){this.id=a,this.value=b}function w(a){this._s=a,this.isDisposed=!1}function x(a){this._s=a}function y(a){this._s=a,this._l=a.length,this._i=0}function z(a){this._a=a}function A(a){this._a=a,this._l=E(a),this._i=0}function B(a){return"number"==typeof a&&la.isFinite(a)}function C(b){var c,d=b[Oa];if(!d&&"string"==typeof b)return c=new x(b),c[Oa]();if(!d&&b.length!==a)return c=new z(b),c[Oa]();if(!d)throw new TypeError("Object is not iterable");return b[Oa]()}function D(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function E(a){var b=+a.length;return isNaN(b)?0:0!==b&&B(b)?(b=D(b)*Math.floor(Math.abs(b)),0>=b?0:b>Hc?Hc:b):b}function F(a,b){return Rb(a)||(a=Xb),new Jc(b,a)}function G(a,b){this.observer=a,this.parent=b}function H(){return!1}function I(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function H(){return!1}function I(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function H(){return!1}function J(){return[]}function H(){return!1}function J(){return[]}function I(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function K(a){return function(b){return a.subscribe(b)}}function L(a){return{"@@iterator":function(){return{next:function(){return{done:!1,value:a}}}}}}function L(a){return{"@@iterator":function(){return{next:function(){return{done:!1,value:a}}}}}}function M(b,c){return 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}}function N(a,b,c,d){var e=new te;return d.push(O(e,b,c)),a.apply(b,d),e.asObservable()}function O(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];if(ua(c)){if(e=wa(c).apply(b,e),e===va)return a.onError(e.e);a.onNext(e)}else e.length<=1?a.onNext(e[0]):a.onNext(e);a.onCompleted()}}function P(a,b,c,d){var e=new te;return d.push(Q(e,b,c)),a.apply(b,d),e.asObservable()}function Q(a,b,c){return function(){var d=arguments[0];if(d)return a.onError(d);for(var e=arguments.length,f=[],g=1;e>g;g++)f[g-1]=arguments[g];if(ua(c)){var f=wa(c).apply(b,f);if(f===va)return a.onError(f.e);a.onNext(f)}else f.length<=1?a.onNext(f[0]):a.onNext(f);a.onCompleted()}}function R(a){return la.StaticNodeList?a instanceof la.StaticNodeList||a instanceof la.NodeList:"[object NodeList]"===Object.prototype.toString.call(a)}function S(a,b,c){this._e=a,this._n=b,this._fn=c,this._e.addEventListener(this._n,this._fn,!1),this.isDisposed=!1}function T(a,b,c){var d=new Cb,e=Object.prototype.toString.call(a);if(R(a)||"[object HTMLCollection]"===e)for(var f=0,g=a.length;g>f;f++)d.add(T(a.item(f),b,c));else a&&d.add(new S(a,b,c));return d}function U(a,b){return new ae(a,b)}function V(a,b,c){return new pe(function(d){var e=a,f=Qb(b);return c.scheduleRecursiveFuture(0,e,function(a,b){if(f>0){var g=c.now();e=new Date(e.getTime()+f),e.getTime()<=g&&(e=new Date(g+f))}d.onNext(a),b(a+1,new Date(e))})})}function W(a,b,c){return a===b?new pe(function(a){return c.schedulePeriodic(0,b,function(b){return a.onNext(b),b+1})}):Cc(function(){return V(new Date(c.now()+a),b,c)})}function X(a,b,c){return new pe(function(d){var e,f=!1,g=new Lb,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.error,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new Kb,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveFuture(null,b,function(a,b){var e,g,k,l;if(null===h){j=!0;do k=null,i.length>0&&i[0].timestamp-c.now()<=0&&(k=i.shift().value),null!==k&&k.accept(d);while(null!==k);l=!1,g=0,i.length>0?(l=!0,g=Math.max(0,i[0].timestamp-c.now())):f=!1,e=h,j=!1,null!==e?d.onError(e):l&&b(null,g)}}))))}),new Mb(e,g)},a)}function Y(a,b,c){return Cc(function(){return X(a,b-c.now(),c)})}function Z(a,b,c){var d,e;return ua(b)?e=b:(d=b,e=c),new pe(function(b){function c(){i.setDisposable(a.subscribe(function(a){var c=wa(e)(a);if(c===va)return b.onError(c.e);var d=new Kb;g.add(d),d.setDisposable(c.subscribe(function(){b.onNext(a),g.remove(d),f()},function(a){b.onError(a)},function(){b.onNext(a),g.remove(d),f()}))},function(a){b.onError(a)},function(){h=!0,i.dispose(),f()}))}function f(){h&&0===g.length&&b.onCompleted()}var g=new Cb,h=!1,i=new Lb;return d?i.setDisposable(d.subscribe(c,function(a){b.onError(a)},c)):c(),new Mb(i,g)},a)}function $(a,b){return new pe(function(c){var d,e=!1,f=new Lb,g=0,h=a.subscribe(function(a){var h=wa(b)(a);if(h===va)return c.onError(h.e);ta(h)&&(h=Yd(h)),e=!0,d=a,g++;var i=g,j=new Kb;f.setDisposable(j),j.setDisposable(h.subscribe(function(){e&&g===i&&c.onNext(d),e=!1,j.dispose()},function(a){c.onError(a)},function(){e&&g===i&&c.onNext(d),e=!1,j.dispose()}))},function(a){f.dispose(),c.onError(a),e=!1,g++},function(){f.dispose(),e&&c.onNext(d),c.onCompleted(),e=!1,g++});return new Mb(h,f)},a)}function _(a,b,c,d){return ua(b)&&(d=c,c=b,b=Nc()),pc.isObservable(d)||(d=Tc(new je)),new pe(function(e){function f(a){function b(){return l=c===k}var c=k,f=new Kb;i.setDisposable(f),f.setDisposable(a.subscribe(function(){b()&&h.setDisposable(d.subscribe(e)),f.dispose()},function(a){b()&&e.onError(a)},function(){b()&&h.setDisposable(d.subscribe(e))}))}function g(){var a=!l;return a&&k++,a}var h=new Lb,i=new Lb,j=new Kb;h.setDisposable(j);var k=0,l=!1;return f(b),j.setDisposable(a.subscribe(function(a){if(g()){e.onNext(a);var b=wa(c)(a);if(b===va)return e.onError(b.e);f(ta(b)?Yd(b):b)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new Mb(h,i)},a)}function aa(a,b,c,d){return Rb(c)&&(d=c,c=Tc(new je)),c instanceof Error&&(c=Tc(c)),Rb(d)||(d=ac),pc.isObservable(c)||(c=Tc(new je)),new pe(function(e){function f(){var a=g;k.setDisposable(d.scheduleFuture(null,b,function(){j=g===a,j&&(ta(c)&&(c=Yd(c)),i.setDisposable(c.subscribe(e)))}))}var g=0,h=new Kb,i=new Lb,j=!1,k=new Lb;return i.setDisposable(h),f(),h.setDisposable(a.subscribe(function(a){j||(g++,e.onNext(a),f())},function(a){j||(g++,e.onError(a))},function(){j||(g++,e.onCompleted())})),new Mb(i,k)},a)}function ba(a,b,c){return new pe(function(d){function e(a,b){if(j[b]=a,g[b]=!0,h||(h=g.every(oa))){if(f)return d.onError(f);var e=wa(c).apply(null,j);if(e===va)return d.onError(e.e);d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new Mb(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)}function ca(a){return{"@@transducer/init":function(){return a},"@@transducer/step":function(a,b){return a.onNext(b)},"@@transducer/result":function(a){return a.onCompleted()}}}var da={"function":!0,object:!0},ea=da[typeof exports]&&exports&&!exports.nodeType?exports:null,fa=da[typeof module]&&module&&!module.nodeType?module:null,ga=b(ea&&fa&&"object"==typeof global&&global),ha=b(da[typeof self]&&self),ia=b(da[typeof window]&&window),ja=fa&&fa.exports===ea?ea:null,ka=b(da[typeof this]&&this),la=ga||ia!==(ka&&ka.window)&&ia||ha||ka||Function("return this")(),ma={internals:{},config:{Promise:la.Promise},helpers:{}},na=ma.helpers.noop=function(){},oa=ma.helpers.identity=function(a){return a},pa=ma.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}(),qa=ma.helpers.defaultComparer=function(a,b){return zb(a,b)},ra=ma.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},sa=(ma.helpers.defaultKeySerializer=function(a){return a.toString()},ma.helpers.defaultError=function(a){throw a}),ta=ma.helpers.isPromise=function(a){return!!a&&"function"!=typeof a.subscribe&&"function"==typeof a.then},ua=ma.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Ca.call(a)}),a}(),va={e:{}},wa=ma.internals.tryCatch=function(a){if(!ua(a))throw new TypeError("fn must be a function");return d(a)};ma.config.longStackSupport=!1;var xa=!1,ya=wa(function(){throw new Error})();xa=!!ya.e&&!!ya.e.stack;var za,Aa=j(),Ba="From previous event:",Ca=Object.prototype.toString,Da="[object Array]",Ea="[object Function]",Fa="[object String]";Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c,d;if(null==this)throw new TypeError(" this is null or not defined");var e=Object(this),f=e.length>>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(c=b),d=0;f>d;){var g;d in e&&(g=e[d],a.call(c,g,d,e)),d++}});var Ga=Object("a"),Ha="a"!==Ga[0]||!(0 in Ga);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=Ha&&Ca.call(this)===Fa?this.split(""):b,d=c.length>>>0,e=arguments[1];if(Ca.call(a)!==Ea)throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.map||(Array.prototype.map=function(a){var b=Object(this),c=Ha&&Ca.call(this)===Fa?this.split(""):b,d=c.length>>>0,e=new Array(d),f=arguments[1];if(Ca.call(a)!==Ea)throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){for(var b,c=[],d=new Object(this),e=0,f=d.length>>>0;f>e;e++)b=d[e],e in d&&a.call(arguments[1],b,e,d)&&c.push(b);return c}),Array.isArray||(Array.isArray=function(a){return Ca.call(a)===Da}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!==d?d=0:0!==d&&d!==1/0&&d!==-(1/0)&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),Object.prototype.propertyIsEnumerable||(Object.prototype.propertyIsEnumerable=function(a){for(var b in this)if(b===a)return!0;return!1}),Object.keys||(Object.keys=function(){"use strict";var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString");return function(c){if("object"!=typeof c&&("function"!=typeof c||null===c))throw new TypeError("Object.keys called on non-object");var d,e,f=[];for(d in c)a.call(c,d)&&f.push(d);if(b)for(e=0;Ua>e;e++)a.call(c,Ta[e])&&f.push(Ta[e]);return f}}()),"function"!=typeof Object.create&&(Object.create=function(){function a(){}var b=Object.prototype.hasOwnProperty;return function(c){if("object"!=typeof c)throw new TypeError("Object prototype may only be an Object or null");a.prototype=c;var d=new a;if(a.prototype=null,arguments.length>1){var e=Object(arguments[1]);for(var f in e)b.call(e,f)&&(d[f]=e[f])}return d}}()),la.Element&&la.Element.prototype.attachEvent&&!la.Element.prototype.addEventListener&&function(){function a(a,b){Window.prototype[a]=HTMLDocument.prototype[a]=Element.prototype[a]=b}function b(){b.interval&&document.body&&(b.interval=clearInterval(b.interval),document.dispatchEvent(new CustomEvent("DOMContentLoaded")))}a("addEventListener",function(a,b){var c=this,d=c._c1_listeners=c._c1_listeners||{},e=d[a]=d[a]||[];c.attachEvent("on"+a,e.event=function(a){a||(a=la.event);var b=c.document&&c.document.documentElement||c.documentElement||{scrollLeft:0,scrollTop:0};switch(a.currentTarget=c,a.pageX=a.clientX+b.scrollLeft,a.pageY=a.clientY+b.scrollTop,a.preventDefault=function(){if(a.bubbledKeyCode=a.keyCode,a.ctrlKey)try{a.keyCode=0}catch(a){}a.defaultPrevented=!0,a.returnValue=!1,a.modified=!0,a.returnValue=!1},a.stopImmediatePropagation=function(){k=!1,a.cancelBubble=!0},a.stopPropagation=function(){a.cancelBubble=!0},a.relatedTarget=a.fromElement||null,a.target=a.srcElement||c,a.timeStamp=+new Date,a.type){case"keypress":var d="charCode"in a?a.charCode:a.keyCode;10===d?(d=0,a.keyCode=13):13===d||27===d?d=0:3===d&&(d=99),a.charCode=d,a.keyChar=a.charCode?String.fromCharCode(a.charCode):""}var f={};for(var g in a)f[g]=a[g];for(var h,i=0,j=[].concat(e),k=!0;k&&(h=j[i]);++i)for(var l,m=0;l=e[m];++m)if(l===h){l.call(c,f);break}}),e.push(b)}),a("removeEventListener",function(a,b){for(var c,d=this,e=d._c1_listeners=d._c1_listeners||{},f=e[a]=e[a]||[],g=f.length-1;c=f[g];--g)if(c===b){f.splice(g,1);break}!f.length&&f.event&&d.detachEvent("on"+a,f.event)}),a("dispatchEvent",function(a){var b=this,c=a.type,d=b._c1_listeners=b._c1_listeners||{},e=d[c]=d[c]||[];try{return b.fireEvent("on"+c,a)}catch(f){return e.event&&e.event(a)}}),b.interval=setInterval(b,1),la.addEventListener("load",b)}(),(!la.CustomEvent||"object"==typeof la.CustomEvent)&&function(){function b(b,c){var d;c=c||{bubbles:!1,cancelable:!1,detail:a};try{document.createEvent?(d=document.createEvent("CustomEvent"),d.initCustomEvent(b,c.bubbles,c.cancelable,c.detail)):document.createEventObject&&(d=document.createEventObject())}catch(e){d=document.createEvent("Event"),d.initEvent(b,c.bubbles,c.cancelable),d.detail=c.detail}return d}la.CustomEvent&&(b.prototype=la.CustomEvent.prototype),la.CustomEvent=b}();var Ia=ma.EmptyError=function(){this.message="Sequence contains no elements.",Error.call(this)};Ia.prototype=Object.create(Error.prototype),Ia.prototype.name="EmptyError";var Ja=ma.ObjectDisposedError=function(){this.message="Object has been disposed",Error.call(this)};Ja.prototype=Object.create(Error.prototype),Ja.prototype.name="ObjectDisposedError";var Ka=ma.ArgumentOutOfRangeError=function(){this.message="Argument out of range",Error.call(this)};Ka.prototype=Object.create(Error.prototype),Ka.prototype.name="ArgumentOutOfRangeError";var La=ma.NotSupportedError=function(a){this.message=a||"This operation is not supported",Error.call(this)};La.prototype=Object.create(Error.prototype),La.prototype.name="NotSupportedError";var Ma=ma.NotImplementedError=function(a){this.message=a||"This operation is not implemented",Error.call(this)};Ma.prototype=Object.create(Error.prototype),Ma.prototype.name="NotImplementedError";var Na=ma.helpers.notImplemented=function(){throw new Ma},Oa=(ma.helpers.notSupported=function(){throw new La},"function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_");la.Set&&"function"==typeof(new la.Set)["@@iterator"]&&(Oa="@@iterator");var Pa=ma.doneEnumerator={done:!0,value:a},Qa=ma.helpers.isIterable=function(b){return b&&b[Oa]!==a},Ra=ma.helpers.isArrayLike=function(b){return b&&b.length!==a};ma.helpers.iterator=Oa;var Sa=ma.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)}},Ta=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Ua=Ta.length,Va="[object Arguments]",Wa="[object Array]",Xa="[object Boolean]",Ya="[object Date]",Za="[object Error]",$a="[object Function]",_a="[object Map]",ab="[object Number]",bb="[object Object]",cb="[object RegExp]",db="[object Set]",eb="[object String]",fb="[object WeakMap]",gb="[object ArrayBuffer]",hb="[object Float32Array]",ib="[object Float64Array]",jb="[object Int8Array]",kb="[object Int16Array]",lb="[object Int32Array]",mb="[object Uint8Array]",nb="[object Uint8ClampedArray]",ob="[object Uint16Array]",pb="[object Uint32Array]",qb={};qb[hb]=qb[ib]=qb[jb]=qb[kb]=qb[lb]=qb[mb]=qb[nb]=qb[ob]=qb[pb]=!0,qb[Va]=qb[Wa]=qb[gb]=qb[Xa]=qb[Ya]=qb[Za]=qb[$a]=qb[_a]=qb[ab]=qb[bb]=qb[cb]=qb[db]=qb[eb]=qb[fb]=!1;var rb=Object.prototype,sb=rb.hasOwnProperty,tb=rb.toString,ub=Math.pow(2,53)-1,vb=Object.keys||function(){var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=c.length;return function(e){if("object"!=typeof e&&("function"!=typeof e||null===e))throw new TypeError("Object.keys called on non-object");var f,g,h=[];for(f in e)a.call(e,f)&&h.push(f);if(b)for(g=0;d>g;g++)a.call(e,c[g])&&h.push(c[g]);return h}}(),wb=ma.internals.isObject=function(a){var b=typeof a;return!!a&&("object"===b||"function"===b)},xb=function(){try{Object({toString:0}+"")}catch(a){return function(){return!1}}return function(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}}(),yb=Array.isArray||function(a){return n(a)&&o(a.length)&&tb.call(a)===Wa},zb=ma.internals.isEqual=function(a,b){return t(a,b)},Ab=({}.hasOwnProperty,Array.prototype.slice,ma.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),Bb=ma.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]}},Cb=(ma.internals.addRef=function(a,b){return new pe(function(c){return new Mb(b.getDisposable(),a.subscribe(c))})},ma.CompositeDisposable=function(){var a,b,c=[];if(Array.isArray(arguments[0]))c=arguments[0];else for(b=arguments.length,c=new Array(b),a=0;b>a;a++)c[a]=arguments[a];this.disposables=c,this.isDisposed=!1,this.length=c.length}),Db=Cb.prototype;Db.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},Db.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},Db.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 Eb=ma.Disposable=function(a){this.isDisposed=!1,this.action=a||na};Eb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Fb=Eb.create=function(a){return new Eb(a)},Gb=Eb.empty={dispose:na},Hb=Eb.isDisposable=function(a){return a&&ua(a.dispose)},Ib=Eb.checkDisposed=function(a){if(a.isDisposed)throw new Ja},Jb=Eb._fixup=function(a){return Hb(a)?a:Gb},Kb=ma.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null};Kb.prototype.getDisposable=function(){return this.current},Kb.prototype.setDisposable=function(a){if(this.current)throw new Error("Disposable has already been assigned");var b=this.isDisposed;!b&&(this.current=a),b&&a&&a.dispose()},Kb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null,a&&a.dispose()}};var Lb=ma.SerialDisposable=function(){this.isDisposed=!1,this.current=null};Lb.prototype.getDisposable=function(){return this.current},Lb.prototype.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},Lb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var Mb=ma.BinaryDisposable=function(a,b){this._first=a,this._second=b,this.isDisposed=!1};Mb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this._first;this._first=null,a&&a.dispose();var b=this._second;this._second=null,b&&b.dispose()}};var Nb=ma.NAryDisposable=function(a){this._disposables=a,this.isDisposed=!1};Nb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=0,b=this._disposables.length;b>a;a++)this._disposables[a].dispose();this._disposables.length=0}};var Ob=(ma.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?Gb:new a(this)},b}(),ma.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||ra,this.disposable=new Kb});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 Jb(this.action(this.scheduler,this.state))};var Pb=ma.Scheduler=function(){function a(){}a.isScheduler=function(b){return b instanceof a};var b=a.prototype;return b.schedule=function(a,b){throw new Ma},b.scheduleFuture=function(b,c,d){var e=c;return e instanceof Date&&(e-=this.now()),e=a.normalize(e),0===e?this.schedule(b,d):this._scheduleFuture(b,e,d)},b._scheduleFuture=function(a,b,c){throw new Ma},a.now=pa,a.prototype.now=pa,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Qb=Pb.normalize,Rb=Pb.isScheduler;!function(a){function b(a,b){function c(b){function d(a,b){return g?f.remove(i):h=!0,e(b,c),Gb}var g=!1,h=!1,i=a.schedule(b,d);h||(f.add(i),g=!0)}var d=b[0],e=b[1],f=new Cb;return e(d,c),f}function c(a,b){function c(b,d){function g(a,b){return h?f.remove(j):i=!0,e(b,c),Gb}var h=!1,i=!1,j=a.scheduleFuture(b,d,g);i||(f.add(j),h=!0)}var d=b[0],e=b[1],f=new Cb;return e(d,c),f}a.scheduleRecursive=function(a,c){return this.schedule([a,c],b)},a.scheduleRecursiveFuture=function(a,b,d){return this.scheduleFuture([a,d],b,c)}}(Pb.prototype),function(a){a.schedulePeriodic=function(a,b,c){if("undefined"==typeof la.setInterval)throw new La;b=Qb(b);var d=a,e=la.setInterval(function(){d=c(d)},b);return Fb(function(){la.clearInterval(e)})}}(Pb.prototype);var Sb,Tb,Ub=function(a){function b(){a.call(this)}return Ab(b,a),b.prototype.schedule=function(a,b){return Jb(b(this,a))},b}(Pb),Vb=Pb.immediate=new Ub,Wb=function(a){function b(){for(;d.length>0;){var a=d.dequeue();!a.isCancelled()&&a.invoke()}}function c(){a.call(this)}var d;return Ab(c,a),c.prototype.schedule=function(a,c){var f=new Ob(this,a,c,this.now());if(d)d.enqueue(f);else{d=new bc(4),d.enqueue(f);var g=wa(b)();d=null,g===va&&e(g.e)}return f.disposable},c.prototype.scheduleRequired=function(){return!d},c}(Pb),Xb=Pb.currentThread=new Wb,Yb=(ma.internals.SchedulePeriodicRecursive=function(){function a(a){return function(b,c){c(0,a._period);var d=wa(a._action)(a._state);d===va&&(a._cancel.dispose(),e(d.e)),a._state=d}}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 Kb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveFuture(0,this._period,a(this))),b},b}(),function(){var a,b=na;if(la.setTimeout)a=la.setTimeout,b=la.clearTimeout;else{if(!la.WScript)throw new La;a=function(a,b){la.WScript.Sleep(b),a()}}return{setTimeout:a,clearTimeout:b}}()),Zb=Yb.setTimeout,$b=Yb.clearTimeout;!function(){function a(b){if(f)Zb(function(){a(b)},0);else{var c=d[b];if(c){f=!0;var g=wa(c)();Tb(b),f=!1,g===va&&e(g.e)}}}function b(){if(!la.postMessage||la.importScripts)return!1;var a=!1,b=la.onmessage;return la.onmessage=function(){a=!0},la.postMessage("","*"),la.onmessage=b,a}var c=1,d={},f=!1;Tb=function(a){delete d[a]};var g=new RegExp("^"+String(Ca).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),h="function"==typeof(h=ga&&ja&&ga.setImmediate)&&!g.test(h)&&h;if(ua(h))Sb=function(b){var e=c++;return d[e]=b,h(function(){a(e)}),e};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Sb=function(b){var e=c++;return d[e]=b,process.nextTick(function(){a(e)}),e};else if(b()){var i="ms.rx.schedule"+Math.random(),j=function(b){"string"==typeof b.data&&b.data.substring(0,i.length)===i&&a(b.data.substring(i.length))};la.addEventListener("message",j,!1),Sb=function(a){var b=c++;return d[b]=a,la.postMessage(i+b,"*"),b}}else if(la.MessageChannel){var k=new la.MessageChannel;k.port1.onmessage=function(b){a(b.data)},Sb=function(a){var b=c++;return d[b]=a,k.port2.postMessage(b),b}}else Sb="document"in la&&"onreadystatechange"in la.document.createElement("script")?function(b){var e=la.document.createElement("script"),f=c++;return d[f]=b,e.onreadystatechange=function(){a(f),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},la.document.documentElement.appendChild(e),f}:function(b){var e=c++;return d[e]=b,Zb(function(){a(e)},0),e}}();var _b=function(a){function b(){a.call(this)}function c(a,b,c,d){return function(){a.setDisposable(Eb._fixup(b(c,d)))}}function d(a){this._id=a,this.isDisposed=!1}function e(a){this._id=a,this.isDisposed=!1}function f(a,b,c){return function(){b(a,c)}}return Ab(b,a),d.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,Tb(this._id))},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,$b(this._id))},b.prototype.schedule=function(a,b){var e=new Kb,f=Sb(c(e,b,this,a));return new Mb(e,new d(f))},b.prototype._scheduleFuture=function(a,b,d){if(0===b)return this.schedule(a,d);var f=new Kb,g=Zb(c(f,d,this,a),b);return new Mb(f,new e(g))},b.prototype.scheduleLongRunning=function(a,b){var c=Fb(na);return Sb(f(a,b,c)),c},b}(Pb),ac=Pb["default"]=Pb.async=new _b;v.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var bc=ma.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},cc=bc.prototype;cc.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},cc.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)}}},cc.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)}}},cc.peek=function(){return this.items[0].value},cc.removeAt=function(b){this.items[b]=this.items[--this.length],this.items[this.length]=a,this.heapify()},cc.dequeue=function(){var a=this.peek();return this.removeAt(0),a},cc.enqueue=function(a){var b=this.length++;this.items[b]=new v(bc.count++,a),this.percolate(b)},cc.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},bc.count=0;var dc,ec=ma.Notification=function(){function a(){}return a.prototype._accept=function(a,b,c){throw new Ma},a.prototype._acceptObserver=function(a,b,c){throw new Ma},a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObserver(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return Rb(a)||(a=Vb),new pe(function(c){return a.schedule(b,function(a,b){b._acceptObserver(c),"N"===b.kind&&c.onCompleted()})})},a}(),fc=function(a){function b(a){this.value=a,this.kind="N"}return Ab(b,a),b.prototype._accept=function(a){return a(this.value)},b.prototype._acceptObserver=function(a){return a.onNext(this.value)},b.prototype.toString=function(){return"OnNext("+this.value+")"},b}(ec),gc=function(a){function b(a){this.error=a,this.kind="E"}return Ab(b,a),b.prototype._accept=function(a,b){return b(this.error)},b.prototype._acceptObserver=function(a){return a.onError(this.error)},b.prototype.toString=function(){return"OnError("+this.error+")"},b}(ec),hc=function(a){function b(){this.kind="C"}return Ab(b,a),b.prototype._accept=function(a,b,c){return c()},b.prototype._acceptObserver=function(a){return a.onCompleted()},b.prototype.toString=function(){return"OnCompleted()"},b}(ec),ic=ec.createOnNext=function(a){return new fc(a)},jc=ec.createOnError=function(a){return new gc(a)},kc=ec.createOnCompleted=function(){return new hc},lc=ma.Observer=function(){},mc=lc.create=function(a,b,c){return a||(a=na),b||(b=sa),c||(c=na),new oc(a,b,c)},nc=ma.internals.AbstractObserver=function(a){function b(){this.isStopped=!1}return Ab(b,a),b.prototype.next=Na,b.prototype.error=Na,b.prototype.completed=Na,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}(lc),oc=ma.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return Ab(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}(nc),pc=ma.Observable=function(){function a(a,b){return function(c){var d=c.onError;return c.onError=function(b){f(b,a),d.call(c,b)},b.call(a,c)}}function b(){if(ma.config.longStackSupport&&xa){var b=this._subscribe,c=wa(e)(new Error).e;this.stack=c.stack.substring(c.stack.indexOf("\n")+1),
this._subscribe=a(this,b)}}return dc=b.prototype,b.isObservable=function(a){return a&&ua(a.subscribe)},dc.subscribe=dc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:mc(a,b,c))},dc.subscribeOnNext=function(a,b){return this._subscribe(mc("undefined"!=typeof b?function(c){a.call(b,c)}:a))},dc.subscribeOnError=function(a,b){return this._subscribe(mc(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},dc.subscribeOnCompleted=function(a,b){return this._subscribe(mc(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},b}(),qc=ma.ObservableBase=function(a){function b(a){return a&&ua(a.dispose)?a:ua(a)?Fb(a):Gb}function c(a,c){var d=c[0],f=c[1],g=wa(f.subscribeCore).call(f,d);g!==va||d.fail(va.e)||e(va.e),d.setDisposable(b(g))}function d(){a.call(this)}return Ab(d,a),d.prototype._subscribe=function(a){var b=new qe(a),d=[b,this];return Xb.scheduleRequired()?Xb.schedule(d,c):c(null,d),b},d.prototype.subscribeCore=Na,d}(pc),rc=ma.FlatMapObservable=function(a){function b(b,c,d,e){this.resultSelector=ua(d)?d:null,this.selector=Sa(ua(c)?c:function(){return c},e,3),this.source=b,a.call(this)}function c(a,b,c,d){this.i=0,this.selector=b,this.resultSelector=c,this.source=d,this.o=a,nc.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this.selector,this.resultSelector,this))},Ab(c,nc),c.prototype._wrapResult=function(a,b,c){return this.resultSelector?a.map(function(a,d){return this.resultSelector(b,a,c,d)},this):a},c.prototype.next=function(a){var b=this.i++,c=wa(this.selector)(a,b,this.source);return c===va?this.o.onError(c.e):(ta(c)&&(c=Yd(c)),(Ra(c)||Qa(c))&&(c=pc.from(c)),void this.o.onNext(this._wrapResult(c,a,b)))},c.prototype.error=function(a){this.o.onError(a)},c.prototype.completed=function(){this.o.onCompleted()},b}(qc),sc=ma.internals.Enumerable=function(){};w.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._s.isDisposed=!0)};var tc=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){if(!a.isDisposed){var c=wa(a.e.next).call(a.e);if(c===va)return a.o.onError(c.e);if(c.done)return a.o.onCompleted();var e=c.value;ta(e)&&(e=Yd(e));var f=new Kb;a.subscription.setDisposable(f),f.setDisposable(e.subscribe(new d(a,b)))}}function d(a,b){this._state=a,this._recurse=b,nc.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=new Lb,d={isDisposed:!1,o:a,subscription:b,e:this.sources[Oa]()},e=Xb.scheduleRecursive(d,c);return new Nb([b,e,new w(d)])},Ab(d,nc),d.prototype.next=function(a){this._state.o.onNext(a)},d.prototype.error=function(a){this._state.o.onError(a)},d.prototype.completed=function(){this._recurse(this._state)},b}(qc);sc.prototype.concat=function(){return new tc(this)};var uc=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){if(!a.isDisposed){var c=wa(a.e.next).call(a.e);if(c===va)return a.o.onError(c.e);if(c.done)return null!==a.lastError?a.o.onError(a.lastError):a.o.onCompleted();var e=c.value;ta(e)&&(e=Yd(e));var f=new Kb;a.subscription.setDisposable(f),f.setDisposable(e.subscribe(new d(a,b)))}}function d(a,b){this._state=a,this._recurse=b,nc.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=new Lb,d={isDisposed:!1,e:this.sources[Oa](),subscription:b,lastError:null,o:a},e=Xb.scheduleRecursive(d,c);return new Nb([b,e,new w(d)])},Ab(d,nc),d.prototype.next=function(a){this._state.o.onNext(a)},d.prototype.error=function(a){this._state.lastError=a,this._recurse(this._state)},d.prototype.completed=function(){this._state.o.onCompleted()},b}(qc);sc.prototype.catchError=function(){return new uc(this)};var vc=function(a){function b(a,b){this.v=a,this.c=null==b?-1:b}function c(a){this.v=a.v,this.l=a.c}return Ab(b,a),b.prototype[Oa]=function(){return new c(this)},c.prototype.next=function(){return 0===this.l?Pa:(this.l>0&&this.l--,{done:!1,value:this.v})},b}(sc),wc=sc.repeat=function(a,b){return new vc(a,b)},xc=function(a){function b(a,b,c){this.s=a,this.fn=b?Sa(b,c,3):null}function c(a){this.i=-1,this.s=a.s,this.l=this.s.length,this.fn=a.fn}return Ab(b,a),b.prototype[Oa]=function(){return new c(this)},c.prototype.next=function(){return++this.i<this.l?{done:!1,value:this.fn?this.fn(this.s[this.i],this.i,this.s):this.s[this.i]}:Pa},b}(sc),yc=sc.of=function(a,b,c){return new xc(a,b,c)},zc=ma.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 Lb}function c(a,b){return function(){a.onNext(b)}}function d(a,b){return function(){a.onError(b)}}function f(a){return function(){a.onCompleted()}}function g(a,b){var c;if(!(a.queue.length>0))return void(a.isAcquired=!1);c=a.queue.shift();var d=wa(c)();return d===va?(a.queue=[],a.hasFaulted=!0,e(d.e)):void b(a)}return Ab(b,a),b.prototype.next=function(a){this.queue.push(c(this.observer,a))},b.prototype.error=function(a){this.queue.push(d(this.observer,a))},b.prototype.completed=function(){this.queue.push(f(this.observer))},b.prototype.ensureActive=function(){var a=!1;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(this,g))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(nc),Ac=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.a=[],nc.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},Ab(c,nc),c.prototype.next=function(a){this.a.push(a)},c.prototype.error=function(a){this.o.onError(a)},c.prototype.completed=function(){this.o.onNext(this.a),this.o.onCompleted()},b}(qc);dc.toArray=function(){return new Ac(this)},pc.create=function(a,b){return new pe(a,b)};var Bc=function(a){function b(b){this._f=b,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=wa(this._f)();return b===va?Tc(b.e).subscribe(a):(ta(b)&&(b=Yd(b)),b.subscribe(a))},b}(qc),Cc=pc.defer=function(a){return new Bc(a)},Dc=function(a){function b(b){this.scheduler=b,a.call(this)}function c(a,b){this.observer=a,this.scheduler=b}function d(a,b){return b.onCompleted(),Gb}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this.scheduler);return b.run()},c.prototype.run=function(){var a=this.observer;return this.scheduler===Vb?d(null,a):this.scheduler.schedule(a,d)},b}(qc),Ec=new Dc(Vb),Fc=pc.empty=function(a){return Rb(a)||(a=Vb),a===Vb?Ec:new Dc(a)},Gc=function(a){function b(b,c,d){this._iterable=b,this._fn=c,this._scheduler=d,a.call(this)}function c(a,b,c){return function(d,e){var f=wa(b.next).call(b);if(f===va)return a.onError(f.e);if(f.done)return a.onCompleted();var g=f.value;return ua(c)&&(g=wa(c)(g,d),g===va)?a.onError(g.e):(a.onNext(g),void e(d+1))}}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=Object(this._iterable),d=C(b);return this._scheduler.scheduleRecursive(0,c(a,d,this._fn))},b}(qc),Hc=Math.pow(2,53)-1;x.prototype[Oa]=function(){return new y(this._s)},y.prototype[Oa]=function(){return this},y.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:Pa},z.prototype[Oa]=function(){return new A(this._a)},A.prototype[Oa]=function(){return this},A.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:Pa};var Ic=pc.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!ua(b))throw new Error("mapFn when provided must be a function");if(b)var e=Sa(b,c,2);return Rb(d)||(d=Xb),new Gc(a,e,d)},Jc=function(a){function b(b,c){this._args=b,this._scheduler=c,a.call(this)}function c(a,b){var c=b.length;return function(d,e){c>d?(a.onNext(b[d]),e(d+1)):a.onCompleted()}}return Ab(b,a),b.prototype.subscribeCore=function(a){return this._scheduler.scheduleRecursive(0,c(a,this._args))},b}(qc),Kc=pc.fromArray=function(a,b){return Rb(b)||(b=Xb),new Jc(a,b)},Lc=function(a){function b(){a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){return Gb},b}(qc),Mc=new Lc,Nc=pc.never=function(){return Mc};pc.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new Jc(b,Xb)},pc.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 Jc(c,a)};var Oc=function(a){function b(b,c){this._o=b,this._keys=Object.keys(b),this._scheduler=c,a.call(this)}function c(a,b,c){return function(d,e){if(d<c.length){var f=c[d];a.onNext([f,b[f]]),e(d+1)}else a.onCompleted()}}return Ab(b,a),b.prototype.subscribeCore=function(a){return this._scheduler.scheduleRecursive(0,c(a,this._o,this._keys))},b}(qc);pc.pairs=function(a,b){return b||(b=Xb),new Oc(a,b)};var Pc=function(a){function b(b,c,d){this.start=b,this.rangeCount=c,this.scheduler=d,a.call(this)}function c(a,b,c){return function(d,e){b>d?(c.onNext(a+d),e(d+1)):c.onCompleted()}}return Ab(b,a),b.prototype.subscribeCore=function(a){return this.scheduler.scheduleRecursive(0,c(this.start,this.rangeCount,a))},b}(qc);pc.range=function(a,b,c){return Rb(c)||(c=Xb),new Pc(a,b,c)};var Qc=function(a){function b(b,c,d){this.value=b,this.repeatCount=null==c?-1:c,this.scheduler=d,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=new G(a,this);return b.run()},b}(qc);G.prototype.run=function(){function a(a,d){return(-1===a||a>0)&&(b.onNext(c),a>0&&a--),0===a?b.onCompleted():void d(a)}var b=this.observer,c=this.parent.value;return this.parent.scheduler.scheduleRecursive(this.parent.repeatCount,a)},pc.repeat=function(a,b,c){return Rb(c)||(c=Xb),new Qc(a,b,c)};var Rc=function(a){function b(b,c){this._value=b,this._scheduler=c,a.call(this)}function c(a,b){var c=b[0],d=b[1];return d.onNext(c),d.onCompleted(),Gb}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=[this._value,a];return this._scheduler===Vb?c(null,b):this._scheduler.schedule(b,c)},b}(qc),Sc=(pc["return"]=pc.just=function(a,b){return Rb(b)||(b=Vb),new Rc(a,b)},function(a){function b(b,c){this._error=b,this._scheduler=c,a.call(this)}function c(a,b){var c=b[0],d=b[1];return d.onError(c),Gb}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=[this._error,a];return this._scheduler===Vb?c(null,b):this._scheduler.schedule(b,c)},b}(qc)),Tc=pc["throw"]=function(a,b){return Rb(b)||(b=Vb),new Sc(a,b)},Uc=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=new Kb,c=new Lb;return c.setDisposable(b),b.setDisposable(this.source.subscribe(new Vc(a,c,this._fn))),c},b}(qc),Vc=function(a){function b(b,c,d){this._o=b,this._s=c,this._fn=d,a.call(this)}return Ab(b,a),b.prototype.next=function(a){this._o.onNext(a)},b.prototype.completed=function(){return this._o.onCompleted()},b.prototype.error=function(a){var b=wa(this._fn)(a);if(b===va)return this._o.onError(b.e);ta(b)&&(b=Yd(b));var c=new Kb;this._s.setDisposable(c),c.setDisposable(b.subscribe(this._o))},b}(nc);dc["catch"]=function(a){return ua(a)?new Uc(this,a):Wc([this,a])};var Wc=pc["catch"]=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 yc(a).catchError()};dc.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),Zc.apply(this,b)};var Xc=function(a){function b(b,c){this._params=b,this._cb=c,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){for(var b=this._params.length,c=new Array(b),d={hasValue:u(b,H),hasValueAll:!1,isDone:u(b,H),values:new Array(b)},e=0;b>e;e++){var f=this._params[e],g=new Kb;c[e]=g,ta(f)&&(f=Yd(f)),g.setDisposable(f.subscribe(new Yc(a,e,this._cb,d)))}return new Nb(c)},b}(qc),Yc=function(a){function b(b,c,d,e){this._o=b,this._i=c,this._cb=d,this._state=e,a.call(this)}function c(a){return function(b,c){return c!==a}}return Ab(b,a),b.prototype.next=function(a){if(this._state.values[this._i]=a,this._state.hasValue[this._i]=!0,this._state.hasValueAll||(this._state.hasValueAll=this._state.hasValue.every(oa))){var b=wa(this._cb).apply(null,this._state.values);if(b===va)return this._o.onError(b.e);this._o.onNext(b)}else this._state.isDone.filter(c(this._i)).every(oa)&&this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._state.isDone[this._i]=!0,this._state.isDone.every(oa)&&this._o.onCompleted()},b}(nc),Zc=pc.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ua(b[a-1])?b.pop():I;return Array.isArray(b[0])&&(b=b[0]),new Xc(b,d)};dc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),ad.apply(null,a)};var $c=function(a){function b(b,c){this._s=b,this._fn=c,a.call(this)}return Ab(b,a),b.prototype.next=function(a){this._s.o.onNext(a)},b.prototype.error=function(a){this._s.o.onError(a)},b.prototype.completed=function(){this._s.i++,this._fn(this._s)},b}(nc),_c=function(a){function b(b){this._sources=b,a.call(this)}function c(a,b){if(!a.disposable.isDisposed){if(a.i===a.sources.length)return a.o.onCompleted();var c=a.sources[a.i];ta(c)&&(c=Yd(c));var d=new Kb;a.subscription.setDisposable(d),d.setDisposable(c.subscribe(new $c(a,b)))}}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=new Lb,d=Fb(na),e={o:a,i:0,subscription:b,disposable:d,sources:this._sources},f=Vb.scheduleRecursive(e,c);return new Nb([b,d,f])},b}(qc),ad=pc.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 new _c(a)};dc.concatAll=function(){return this.merge(1)};var bd=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=new Cb;return b.add(this.source.subscribe(new cd(a,this.maxConcurrent,b))),b},b}(qc),cd=function(a){function b(b,c,d){this.o=b,this.max=c,this.g=d,this.done=!1,this.q=[],this.activeCount=0,a.call(this)}function c(b,c){this.parent=b,this.sad=c,a.call(this)}return Ab(b,a),b.prototype.handleSubscribe=function(a){var b=new Kb;this.g.add(b),ta(a)&&(a=Yd(a)),b.setDisposable(a.subscribe(new c(this,b)))},b.prototype.next=function(a){this.activeCount<this.max?(this.activeCount++,this.handleSubscribe(a)):this.q.push(a)},b.prototype.error=function(a){this.o.onError(a)},b.prototype.completed=function(){this.done=!0,0===this.activeCount&&this.o.onCompleted()},Ab(c,a),c.prototype.next=function(a){this.parent.o.onNext(a)},c.prototype.error=function(a){this.parent.o.onError(a)},c.prototype.completed=function(){this.parent.g.remove(this.sad),this.parent.q.length>0?this.parent.handleSubscribe(this.parent.q.shift()):(this.parent.activeCount--,this.parent.done&&0===this.parent.activeCount&&this.parent.o.onCompleted())},b}(nc);dc.merge=function(a){return"number"!=typeof a?dd(this,a):new bd(this,a)};var dd=pc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(Rb(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=Vb,b=0;d>b;b++)c.push(arguments[b]);else for(a=Vb,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),F(a,c).mergeAll()},ed=function(a){function b(b){this.source=b,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=new Cb,c=new Kb;return b.add(c),c.setDisposable(this.source.subscribe(new fd(a,b))),b},b}(qc),fd=function(a){function b(b,c){this.o=b,this.g=c,this.done=!1,a.call(this)}function c(b,c){this.parent=b,this.sad=c,a.call(this)}return Ab(b,a),b.prototype.next=function(a){var b=new Kb;this.g.add(b),ta(a)&&(a=Yd(a)),b.setDisposable(a.subscribe(new c(this,b)))},b.prototype.error=function(a){this.o.onError(a)},b.prototype.completed=function(){this.done=!0,1===this.g.length&&this.o.onCompleted()},Ab(c,a),c.prototype.next=function(a){this.parent.o.onNext(a)},c.prototype.error=function(a){this.parent.o.onError(a)},c.prototype.completed=function(){this.parent.g.remove(this.sad),this.parent.done&&1===this.parent.g.length&&this.parent.o.onCompleted()},b}(nc);dc.mergeAll=function(){return new ed(this)};var gd=ma.CompositeError=function(a){this.innerErrors=a,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};gd.prototype=Object.create(Error.prototype),gd.prototype.name="CompositeError";var hd=function(a){function b(b){this.source=b,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=new Cb,c=new Kb,d={isStopped:!1,errors:[],o:a};return b.add(c),c.setDisposable(this.source.subscribe(new id(b,d))),b},b}(qc),id=function(a){function b(b,c){this._group=b,this._state=c,a.call(this)}function c(a,b){0===b.length?a.onCompleted():1===b.length?a.onError(b[0]):a.onError(new gd(b))}function d(b,c,d){this._inner=b,this._group=c,this._state=d,a.call(this)}return Ab(b,a),b.prototype.next=function(a){var b=new Kb;this._group.add(b),ta(a)&&(a=Yd(a)),b.setDisposable(a.subscribe(new d(b,this._group,this._state)))},b.prototype.error=function(a){this._state.errors.push(a),this._state.isStopped=!0,1===this._group.length&&c(this._state.o,this._state.errors)},b.prototype.completed=function(){this._state.isStopped=!0,1===this._group.length&&c(this._state.o,this._state.errors)},Ab(d,a),d.prototype.next=function(a){this._state.o.onNext(a)},d.prototype.error=function(a){this._state.errors.push(a),this._group.remove(this._inner),this._state.isStopped&&1===this._group.length&&c(this._state.o,this._state.errors)},d.prototype.completed=function(){this._group.remove(this._inner),this._state.isStopped&&1===this._group.length&&c(this._state.o,this._state.errors)},b}(nc);pc.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=F(null,a);return new hd(d)};var jd=function(a){function b(b,c){this._s=b,this._o=ta(c)?Yd(c):c,this._open=!1,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=new Kb;b.setDisposable(this._s.subscribe(new kd(a,this))),ta(this._o)&&(this._o=Yd(this._o));var c=new Kb;return c.setDisposable(this._o.subscribe(new ld(a,this,c))),new Mb(b,c)},b}(qc),kd=function(a){function b(b,c){this._o=b,this._p=c,a.call(this)}return Ab(b,a),b.prototype.next=function(a){this._p._open&&this._o.onNext(a)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.onCompleted=function(){this._p._open&&this._o.onCompleted()},b}(nc),ld=function(a){function b(b,c,d){this._o=b,this._p=c,this._r=d,a.call(this)}return Ab(b,a),b.prototype.next=function(){this._p._open=!0,this._r.dispose()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.onCompleted=function(){this._r.dispose()},b}(nc);dc.skipUntil=function(a){return new jd(this,a)};var md=function(a){function b(b){this.source=b,a.call(this)}function c(a,b){this.o=a,this.inner=b,this.stopped=!1,this.latest=0,this.hasLatest=!1,nc.call(this)}function d(a,b){this.parent=a,this.id=b,nc.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=new Lb,d=this.source.subscribe(new c(a,b));return new Mb(d,b)},Ab(c,nc),c.prototype.next=function(a){var b=new Kb,c=++this.latest;this.hasLatest=!0,this.inner.setDisposable(b),ta(a)&&(a=Yd(a)),b.setDisposable(a.subscribe(new d(this,c)))},c.prototype.error=function(a){this.o.onError(a)},c.prototype.completed=function(){this.stopped=!0,!this.hasLatest&&this.o.onCompleted()},Ab(d,nc),d.prototype.next=function(a){this.parent.latest===this.id&&this.parent.o.onNext(a)},d.prototype.error=function(a){this.parent.latest===this.id&&this.parent.o.onError(a)},d.prototype.completed=function(){this.parent.latest===this.id&&(this.parent.hasLatest=!1,this.parent.stopped&&this.parent.o.onCompleted())},b}(qc);dc["switch"]=dc.switchLatest=function(){return new md(this)};var nd=function(a){function b(b,c){this.source=b,this.other=ta(c)?Yd(c):c,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){return new Mb(this.source.subscribe(a),this.other.subscribe(new od(a)))},b}(qc),od=function(a){function b(b){this._o=b,a.call(this)}return Ab(b,a),b.prototype.next=function(){this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.onCompleted=na,b}(nc);dc.takeUntil=function(a){return new nd(this,a)};var pd=function(a){function b(b,c,d){this._s=b,this._ss=c,this._cb=d,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){for(var b=this._ss.length,c={hasValue:u(b,H),hasValueAll:!1,values:new Array(b)},d=this._ss.length,e=new Array(d+1),f=0;d>f;f++){var g=this._ss[f],h=new Kb;ta(g)&&(g=Yd(g)),h.setDisposable(g.subscribe(new qd(a,f,c))),e[f]=h}var i=new Kb;return i.setDisposable(this._s.subscribe(new rd(a,this._cb,c))),e[d]=i,new Nb(e)},b}(qc),qd=function(a){function b(b,c,d){this._o=b,this._i=c,this._state=d,a.call(this)}return Ab(b,a),b.prototype.next=function(a){this._state.values[this._i]=a,this._state.hasValue[this._i]=!0,this._state.hasValueAll=this._state.hasValue.every(oa)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=na,b}(nc),rd=function(a){function b(b,c,d){this._o=b,this._cb=c,this._state=d,a.call(this)}return Ab(b,a),b.prototype.next=function(a){var b=[a].concat(this._state.values);if(this._state.hasValueAll){var c=wa(this._cb).apply(null,b);return c===va?this._o.onError(c.e):void this._o.onNext(c)}},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(nc);dc.withLatestFrom=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ua(b[a-1])?b.pop():I;return Array.isArray(b[0])&&(b=b[0]),new pd(this,b,d)};var sd=function(a){function b(b,c){this._s=b,this._cb=c,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){for(var b=this._s.length,c=new Array(b),d=u(b,H),e=u(b,J),f=0;b>f;f++){var g=this._s[f],h=new Kb;c[f]=h,ta(g)&&(g=Yd(g)),h.setDisposable(g.subscribe(new td(a,f,this,e,d)))}return new Nb(c)},b}(qc),td=function(a){function b(b,c,d,e,f){this._o=b,this._i=c,this._p=d,this._q=e,this._d=f,a.call(this)}function c(a){return a.length>0}function d(a){return a.shift()}function e(a){return function(b,c){return c!==a}}return Ab(b,a),b.prototype.next=function(a){if(this._q[this._i].push(a),this._q.every(c)){var b=this._q.map(d),f=wa(this._p._cb).apply(null,b);if(f===va)return this._o.onError(f.e);this._o.onNext(f)}else this._d.filter(e(this._i)).every(oa)&&this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._d[this._i]=!0,this._d.every(oa)&&this._o.onCompleted()},b}(nc);dc.zip=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ua(b[a-1])?b.pop():I;Array.isArray(b[0])&&(b=b[0]);var e=this;return b.unshift(e),new sd(b,d)},pc.zip=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];Array.isArray(b[0])&&(b=ua(b[1])?b[0].concat(b[1]):b[0]);var d=b.shift();return d.zip.apply(d,b)};var ud=function(a){function b(b,c){this.sources=b,this._cb=c,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){for(var b=this.sources,c=b.length,d=new Array(c),e={q:u(c,J),done:u(c,H),cb:this._cb,o:a},f=0;c>f;f++)!function(a){var c=b[a],f=new Kb;(Ra(c)||Qa(c))&&(c=Ic(c)),d[a]=f,f.setDisposable(c.subscribe(new vd(e,a)))}(f);return new Nb(d)},b}(qc),vd=function(a){function b(b,c){this._s=b,this._i=c,a.call(this)}function c(a){return a.length>0}function d(a){return a.shift()}function e(a){return function(b,c){return c!==a}}return Ab(b,a),b.prototype.next=function(a){if(this._s.q[this._i].push(a),this._s.q.every(c)){var b=this._s.q.map(d),f=wa(this._s.cb).apply(null,b);if(f===va)return this._s.o.onError(f.e);this._s.o.onNext(f)}else this._s.done.filter(e(this._i)).every(oa)&&this._s.o.onCompleted()},b.prototype.error=function(a){this._s.o.onError(a)},b.prototype.completed=function(){this._s.done[this._i]=!0,this._s.done.every(oa)&&this._s.o.onCompleted()},b}(nc);dc.zipIterable=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ua(b[a-1])?b.pop():I,e=this;return b.unshift(e),new ud(b,d)},dc.asObservable=function(){return new pe(K(this),this)};var wd=function(a){function b(b){this.source=b,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new xd(a))},b}(qc),xd=function(a){function b(b){this._o=b,a.call(this)}return Ab(b,a),b.prototype.next=function(a){a.accept(this._o)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(nc);dc.dematerialize=function(){return new wd(this)};var yd=function(a){function b(b,c,d){this.source=b,this.keyFn=c,this.comparer=d,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new zd(a,this.keyFn,this.comparer))},b}(qc),zd=function(a){function b(b,c,d){this.o=b,this.keyFn=c,this.comparer=d,this.hasCurrentKey=!1,this.currentKey=null,a.call(this)}return Ab(b,a),b.prototype.next=function(a){var b,c=a;return ua(this.keyFn)&&(c=wa(this.keyFn)(a),c===va)?this.o.onError(c.e):this.hasCurrentKey&&(b=wa(this.comparer)(this.currentKey,c),b===va)?this.o.onError(b.e):void(this.hasCurrentKey&&b||(this.hasCurrentKey=!0,this.currentKey=c,this.o.onNext(a)))},b.prototype.error=function(a){this.o.onError(a)},b.prototype.completed=function(){this.o.onCompleted()},b}(nc);dc.distinctUntilChanged=function(a,b){return b||(b=qa),new yd(this,a,b)};var Ad=function(a){function b(b,c,d,e){this.source=b,this._oN=c,this._oE=d,this._oC=e,a.call(this)}function c(a,b){this.o=a,this.t=!b._oN||ua(b._oN)?mc(b._oN||na,b._oE||na,b._oC||na):b._oN,this.isStopped=!1,nc.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this))},Ab(c,nc),c.prototype.next=function(a){var b=wa(this.t.onNext).call(this.t,a);b===va&&this.o.onError(b.e),this.o.onNext(a)},c.prototype.error=function(a){var b=wa(this.t.onError).call(this.t,a);return b===va?this.o.onError(b.e):void this.o.onError(a)},c.prototype.completed=function(){var a=wa(this.t.onCompleted).call(this.t);return a===va?this.o.onError(a.e):void this.o.onCompleted()},b}(qc);dc["do"]=dc.tap=dc.doAction=function(a,b,c){return new Ad(this,a,b,c)},dc.doOnNext=dc.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},dc.doOnError=dc.tapOnError=function(a,b){return this.tap(na,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},dc.doOnCompleted=dc.tapOnCompleted=function(a,b){return this.tap(na,null,"undefined"!=typeof b?function(){a.call(b)}:a)};var Bd=function(a){function b(b,c,d){this.source=b,this._fn=Sa(c,d,0),a.call(this)}function c(a,b){this.isDisposed=!1,this._s=a,this._fn=b}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=wa(this.source.subscribe).call(this.source,a);return b===va&&(this._fn(),e(b.e)),new c(b,this._fn)},c.prototype.dispose=function(){if(!this.isDisposed){var a=wa(this._s.dispose).call(this._s);this._fn(),a===va&&e(a.e)}},b}(qc);dc["finally"]=function(a,b){return new Bd(this,a,b)};var Cd=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.isStopped=!1}return Ab(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},c.prototype.onNext=na,c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},b}(qc);dc.ignoreElements=function(){return new Cd(this)};var Dd=function(a){function b(b,c){this.source=b,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Ed(a))},b}(qc),Ed=function(a){function b(b){this._o=b,a.call(this)}return Ab(b,a),b.prototype.next=function(a){this._o.onNext(ic(a))},b.prototype.error=function(a){this._o.onNext(jc(a)),this._o.onCompleted()},b.prototype.completed=function(){this._o.onNext(kc()),this._o.onCompleted()},b}(nc);dc.materialize=function(){return new Dd(this)},dc.repeat=function(a){return wc(this,a).concat()},dc.retry=function(a){return wc(this,a).catchError()};var Fd=function(a){function b(a){return{isDisposed:!1,dispose:function(){this.isDisposed||(this.isDisposed=!0,a.isDisposed=!0)}}}function c(b,c){this.source=b,this._notifier=c,a.call(this)}return Ab(c,a),c.prototype.subscribeCore=function(a){var c,d=new se,e=new se,f=this._notifier(d),g=f.subscribe(e),h=this.source["@@iterator"](),i={isDisposed:!1},j=new Lb,k=Xb.scheduleRecursive(null,function(b,f){if(!i.isDisposed){var g=h.next();if(g.done)return void(c?a.onError(c):a.onCompleted());var k=g.value;ta(k)&&(k=Yd(k));var l=new Kb,m=new Kb;j.setDisposable(new Mb(m,l)),l.setDisposable(k.subscribe(function(b){a.onNext(b)},function(b){m.setDisposable(e.subscribe(f,function(b){a.onError(b)},function(){a.onCompleted()})),d.onNext(b),l.dispose()},function(){a.onCompleted()}))}});return new Nb([g,j,k,b(i)])},c}(qc);dc.retryWhen=function(a){return new Fd(L(this),a)};var Gd=function(a){function b(a){return{isDisposed:!1,dispose:function(){this.isDisposed||(this.isDisposed=!0,a.isDisposed=!0)}}}function c(b,c){this.source=b,this._notifier=c,a.call(this)}return Ab(c,a),c.prototype.subscribeCore=function(a){var c,d=new se,e=new se,f=this._notifier(d),g=f.subscribe(e),h=this.source["@@iterator"](),i={isDisposed:!1},j=new Lb,k=Xb.scheduleRecursive(null,function(b,f){if(!i.isDisposed){var g=h.next();if(g.done)return void(c?a.onError(c):a.onCompleted());var k=g.value;ta(k)&&(k=Yd(k));var l=new Kb,m=new Kb;j.setDisposable(new Mb(m,l)),l.setDisposable(k.subscribe(function(b){a.onNext(b)},function(b){a.onError(b)},function(){m.setDisposable(e.subscribe(f,function(b){a.onError(b)},function(){a.onCompleted()})),d.onNext(null),l.dispose()}))}});return new Nb([g,j,k,b(i)])},c}(qc);dc.repeatWhen=function(a){return new Gd(L(this),a)};var Hd=function(a){function b(b,c,d,e){this.source=b,this.accumulator=c,this.hasSeed=d,this.seed=e,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Id(a,this))},b}(qc),Id=function(a){function b(b,c){this._o=b,this._p=c,this._fn=c.accumulator,this._hs=c.hasSeed,this._s=c.seed,this._ha=!1,this._a=null,this._hv=!1,this._i=0,a.call(this)}return Ab(b,a),b.prototype.next=function(a){return!this._hv&&(this._hv=!0),this._ha?this._a=wa(this._fn)(this._a,a,this._i,this._p):(this._a=this._hs?wa(this._fn)(this._s,a,this._i,this._p):a,this._ha=!0),this._a===va?this._o.onError(this._a.e):(this._o.onNext(this._a),void this._i++)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){!this._hv&&this._hs&&this._o.onNext(this._s),this._o.onCompleted()},b}(nc);dc.scan=function(){var a,b=!1,c=arguments[0];return 2===arguments.length&&(b=!0,a=arguments[1]),new Hd(this,c,b,a)};var Jd=function(a){function b(b,c){this.source=b,this._c=c,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Kd(a,this._c))},b}(qc),Kd=function(a){function b(b,c){this._o=b,this._c=c,this._q=[],a.call(this)}return Ab(b,a),b.prototype.next=function(a){this._q.push(a),this._q.length>this._c&&this._o.onNext(this._q.shift())},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(nc);dc.skipLast=function(a){if(0>a)throw new Ka;return new Jd(this,a)},dc.startWith=function(){var a,b=0;arguments.length&&Rb(arguments[0])?(a=arguments[0],b=1):a=Vb;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return ad.apply(null,[Kc(c,a),this])};var Ld=function(a){function b(b,c){this._o=b,this._c=c,this._q=[],a.call(this)}return Ab(b,a),
b.prototype.next=function(a){this._q.push(a),this._q.length>this._c&&this._q.shift()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){for(;this._q.length>0;)this._o.onNext(this._q.shift());this._o.onCompleted()},b}(nc);dc.takeLast=function(a){if(0>a)throw new Ka;var b=this;return new pe(function(c){return b.subscribe(new Ld(c,a))},b)},dc.flatMapConcat=dc.concatMap=function(a,b,c){return new rc(this,a,b,c).merge(1)};var Md=function(a){function b(b,c,d){this.source=b,this.selector=Sa(c,d,3),a.call(this)}function c(a,b){return function(c,d,e){return a.call(this,b.selector(c,d,e),d,e)}}function d(a,b,c){this.o=a,this.selector=b,this.source=c,this.i=0,nc.call(this)}return Ab(b,a),b.prototype.internalMap=function(a,d){return new b(this.source,c(a,this),d)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new d(a,this.selector,this))},Ab(d,nc),d.prototype.next=function(a){var b=wa(this.selector)(a,this.i++,this.source);return b===va?this.o.onError(b.e):void this.o.onNext(b)},d.prototype.error=function(a){this.o.onError(a)},d.prototype.completed=function(){this.o.onCompleted()},b}(qc);dc.map=dc.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Md?this.internalMap(c,b):new Md(this,c,b)},dc.pluck=function(){var a=arguments.length,b=new Array(a);if(0===a)throw new Error("List of properties cannot be empty.");for(var c=0;a>c;c++)b[c]=arguments[c];return this.map(M(b,a))},dc.flatMap=dc.selectMany=dc.mergeMap=function(a,b,c){return new rc(this,a,b,c).mergeAll()},dc.flatMapLatest=dc.switchMap=function(a,b,c){return new rc(this,a,b,c).switchLatest()};var Nd=function(a){function b(b,c){this.source=b,this._count=c,a.call(this)}function c(a,b){this._o=a,this._r=b,nc.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this._count))},Ab(c,nc),c.prototype.next=function(a){this._r<=0?this._o.onNext(a):this._r--},c.prototype.error=function(a){this._o.onError(a)},c.prototype.completed=function(){this._o.onCompleted()},b}(qc);dc.skip=function(a){if(0>a)throw new Ka;return new Nd(this,a)};var Od=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Pd(a,this))},b}(qc),Pd=function(a){function b(b,c){this._o=b,this._p=c,this._i=0,this._r=!1,a.call(this)}return Ab(b,a),b.prototype.next=function(a){if(!this._r){var b=wa(this._p._fn)(a,this._i++,this._p);if(b===va)return this._o.onError(b.e);this._r=!b}this._r&&this._o.onNext(a)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(nc);dc.skipWhile=function(a,b){var c=Sa(a,b,3);return new Od(this,c)};var Qd=function(a){function b(b,c){this.source=b,this._count=c,a.call(this)}function c(a,b){this._o=a,this._c=b,this._r=b,nc.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this._count))},Ab(c,nc),c.prototype.next=function(a){this._r-->0&&(this._o.onNext(a),this._r<=0&&this._o.onCompleted())},c.prototype.error=function(a){this._o.onError(a)},c.prototype.completed=function(){this._o.onCompleted()},b}(qc);dc.take=function(a,b){if(0>a)throw new Ka;return 0===a?Fc(b):new Qd(this,a)};var Rd=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Sd(a,this))},b}(qc),Sd=function(a){function b(b,c){this._o=b,this._p=c,this._i=0,this._r=!0,a.call(this)}return Ab(b,a),b.prototype.next=function(a){return this._r&&(this._r=wa(this._p._fn)(a,this._i++,this._p),this._r===va)?this._o.onError(this._r.e):void(this._r?this._o.onNext(a):this._o.onCompleted())},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(nc);dc.takeWhile=function(a,b){var c=Sa(a,b,3);return new Rd(this,c)};var Td=function(a){function b(b,c,d){this.source=b,this.predicate=Sa(c,d,3),a.call(this)}function c(a,b){return function(c,d,e){return b.predicate(c,d,e)&&a.call(this,c,d,e)}}function d(a,b,c){this.o=a,this.predicate=b,this.source=c,this.i=0,nc.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new d(a,this.predicate,this))},b.prototype.internalFilter=function(a,d){return new b(this.source,c(a,this),d)},Ab(d,nc),d.prototype.next=function(a){var b=wa(this.predicate)(a,this.i++,this.source);return b===va?this.o.onError(b.e):void(b&&this.o.onNext(a))},d.prototype.error=function(a){this.o.onError(a)},d.prototype.completed=function(){this.o.onCompleted()},b}(qc);dc.filter=dc.where=function(a,b){return this instanceof Td?this.internalFilter(a,b):new Td(this,a,b)},pc.fromCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return N(a,b,c,e)}},pc.fromNodeCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return P(a,b,c,e)}},S.prototype.dispose=function(){this.isDisposed||(this._e.removeEventListener(this._n,this._fn,!1),this.isDisposed=!0)},ma.config.useNativeEvents=!1;var Ud=function(a){function b(b,c,d){this._el=b,this._n=c,this._fn=d,a.call(this)}function c(a,b){return function(){var c=arguments[0];return ua(b)&&(c=wa(b).apply(null,arguments),c===va)?a.onError(c.e):void a.onNext(c)}}return Ab(b,a),b.prototype.subscribeCore=function(a){return T(this._el,this._n,c(a,this._fn))},b}(qc);pc.fromEvent=function(a,b,c){return a.addListener?Wd(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c):ma.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new Ud(a,b,c).publish().refCount():Wd(function(c){a.on(b,c)},function(c){a.off(b,c)},c)};var Vd=function(a){function b(b,c,d){this._add=b,this._del=c,this._fn=d,a.call(this)}function c(a,b){return function(){var c=arguments[0];return ua(b)&&(c=wa(b).apply(null,arguments),c===va)?a.onError(c.e):void a.onNext(c)}}function d(a,b,c){this._del=a,this._fn=b,this._ret=c,this.isDisposed=!1}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=c(a,this._fn),e=this._add(b);return new d(this._del,b,e)},d.prototype.dispose=function(){this.isDisposed||(ua(this._del)&&this._del(this._fn,this._ret),this.isDisposed=!0)},b}(qc),Wd=pc.fromEventPattern=function(a,b,c){return new Vd(a,b,c).publish().refCount()},Xd=function(a){function b(b,c){this._p=b,this._s=c,a.call(this)}function c(a,b){var c=b[0],d=b[1];c.onNext(d),c.onCompleted()}function d(a,b){var c=b[0],d=b[1];c.onError(d)}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=new Kb,e=this,f=this._p;return ua(f)&&(f=wa(f)(),f===va)?(a.onError(f.e),b):(f.then(function(d){b.setDisposable(e._s.schedule([a,d],c))},function(c){b.setDisposable(e._s.schedule([a,c],d))}),b)},b}(qc),Yd=pc.fromPromise=function(a,b){return b||(b=ac),new Xd(a,b)};dc.toPromise=function(a){if(a||(a=ma.config.Promise),!a)throw new La("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d;b.subscribe(function(a){d=a},c,function(){a(d)})})},pc.startAsync=function(a){var b=wa(a)();return b===va?Tc(b.e):Yd(b)};var Zd=function(a){function b(b,c,d){this.source=b,this._fn1=c,this._fn2=d,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=this.source.multicast(this._fn1());return new Mb(this._fn2(b).subscribe(a),b.connect())},b}(qc);dc.multicast=function(a,b){return ua(a)?new Zd(this,a,b):new _d(this,a)},dc.publish=function(a){return a&&ua(a)?this.multicast(function(){return new se},a):this.multicast(new se)},dc.share=function(){return this.publish().refCount()},dc.publishLast=function(a){return a&&ua(a)?this.multicast(function(){return new te},a):this.multicast(new te)},dc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new ve(b)},a):this.multicast(new ve(a))},dc.shareValue=function(a){return this.publishValue(a).refCount()},dc.replay=function(a,b,c,d){return a&&ua(a)?this.multicast(function(){return new we(b,c,d)},a):this.multicast(new we(b,c,d))},dc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var $d=function(a){function b(b){this.source=b,this._count=0,this._connectableSubscription=null,a.call(this)}function c(a,b){this._p=a,this._s=b,this.isDisposed=!1}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=this.source.subscribe(a);return 1===++this._count&&(this._connectableSubscription=this.source.connect()),new c(this,b)},c.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._s.dispose(),0===--this._p._count&&this._p._connectableSubscription.dispose())},b}(qc),_d=ma.ConnectableObservable=function(a){function b(b,c){this.source=b,this._connection=null,this._source=b.asObservable(),this._subject=c,a.call(this)}function c(a,b){this._p=a,this._s=b}return Ab(b,a),c.prototype.dispose=function(){this._s&&(this._s.dispose(),this._s=null,this._p._connection=null)},b.prototype.connect=function(){if(!this._connection){if(this._subject.isStopped)return Gb;var a=this._source.subscribe(this._subject);this._connection=new c(this,a)}return this._connection},b.prototype._subscribe=function(a){return this._subject.subscribe(a)},b.prototype.refCount=function(){return new $d(this)},b}(pc),ae=function(a){function b(b,c){this._dt=b,this._s=c,a.call(this)}function c(a,b){b.onNext(0),b.onCompleted()}return Ab(b,a),b.prototype.subscribeCore=function(a){return this._s.scheduleFuture(a,this._dt,c)},b}(qc),be=pc.interval=function(a,b){return W(a,a,Rb(b)?b:ac)};pc.timer=function(b,c,d){var e;return Rb(d)||(d=ac),null!=c&&"number"==typeof c?e=c:Rb(c)&&(d=c),(b instanceof Date||"number"==typeof b)&&e===a?U(b,d):b instanceof Date&&e!==a?V(b,c,d):W(b,e,d)};dc.delay=function(){var a=arguments[0];if("number"==typeof a||a instanceof Date){var b=a,c=arguments[1];return Rb(c)||(c=ac),b instanceof Date?Y(this,b,c):X(this,b,c)}if(pc.isObservable(a)||ua(a))return Z(this,a,arguments[1]);throw new Error("Invalid arguments")};var ce=function(a){function b(b,c,d){Rb(d)||(d=ac),this.source=b,this._dt=c,this._s=d,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){var b=new Lb;return new Mb(this.source.subscribe(new de(a,this._dt,this._s,b)),b)},b}(qc),de=function(a){function b(b,c,d,e){this._o=b,this._d=c,this._scheduler=d,this._c=e,this._v=null,this._hv=!1,this._id=0,a.call(this)}return Ab(b,a),b.prototype.next=function(a){this._hv=!0,this._v=a;var b=++this._id,c=new Kb;this._c.setDisposable(c),c.setDisposable(this._scheduler.scheduleFuture(this,this._d,function(c,d){d._hv&&d._id===b&&d._o.onNext(a),d._hv=!1}))},b.prototype.error=function(a){this._c.dispose(),this._o.onError(a),this._hv=!1,this._id++},b.prototype.completed=function(){this._c.dispose(),this._hv&&this._o.onNext(this._v),this._o.onCompleted(),this._hv=!1,this._id++},b}(nc);dc.debounce=function(){if(ua(arguments[0]))return $(this,arguments[0]);if("number"==typeof arguments[0])return new ce(this,arguments[0],arguments[1]);throw new Error("Invalid arguments")};var ee=function(a){function b(b,c){this.source=b,this._s=c,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new fe(a,this._s))},b}(qc),fe=function(a){function b(b,c){this._o=b,this._s=c,a.call(this)}return Ab(b,a),b.prototype.next=function(a){this._o.onNext({value:a,timestamp:this._s.now()})},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(nc);dc.timestamp=function(a){return Rb(a)||(a=ac),new ee(this,a)};var ge=function(a){function b(b,c){this.source=b,this._sampler=c,a.call(this)}return Ab(b,a),b.prototype.subscribeCore=function(a){var b={o:a,atEnd:!1,value:null,hasValue:!1,sourceSubscription:new Kb};return b.sourceSubscription.setDisposable(this.source.subscribe(new ie(b))),new Mb(b.sourceSubscription,this._sampler.subscribe(new he(b)))},b}(qc),he=function(a){function b(b){this._s=b,a.call(this)}return Ab(b,a),b.prototype._handleMessage=function(){this._s.hasValue&&(this._s.hasValue=!1,this._s.o.onNext(this._s.value)),this._s.atEnd&&this._s.o.onCompleted()},b.prototype.next=function(){this._handleMessage()},b.prototype.error=function(a){this._s.onError(a)},b.prototype.completed=function(){this._handleMessage()},b}(nc),ie=function(a){function b(b){this._s=b,a.call(this)}return Ab(b,a),b.prototype.next=function(a){this._s.hasValue=!0,this._s.value=a},b.prototype.error=function(a){this._s.o.onError(a)},b.prototype.completed=function(){this._s.atEnd=!0,this._s.sourceSubscription.dispose()},b}(nc);dc.sample=function(a,b){return Rb(b)||(b=ac),"number"==typeof a?new ge(this,be(a,b)):new ge(this,a)};var je=ma.TimeoutError=function(a){this.message=a||"Timeout has occurred",this.name="TimeoutError",Error.call(this)};je.prototype=Object.create(Error.prototype),dc.timeout=function(){var a=arguments[0];if(a instanceof Date||"number"==typeof a)return aa(this,a,arguments[1],arguments[2]);if(pc.isObservable(a)||ua(a))return _(this,a,arguments[1],arguments[2]);throw new Error("Invalid arguments")},dc.throttle=function(a,b){Rb(b)||(b=ac);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new pe(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 ke=function(a){function b(b,c){this.source=b,this.controller=new se,this.paused=!0,c&&c.subscribe?this.pauser=this.controller.merge(c):this.pauser=this.controller,a.call(this)}return Ab(b,a),b.prototype._subscribe=function(a){var b=this.source.publish(),c=b.subscribe(a),d=Gb,e=this.pauser.startWith(!this.paused).distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=Gb)});return new Nb([c,d,e])},b.prototype.pause=function(){this.paused=!0,this.controller.onNext(!1)},b.prototype.resume=function(){this.paused=!1,this.controller.onNext(!0)},b}(pc);dc.pausable=function(a){return new ke(this,a)};var le=function(b){function c(a,c){this.source=a,this.controller=new se,this.paused=!0,c&&c.subscribe?this.pauser=this.controller.merge(c):this.pauser=this.controller,b.call(this)}return Ab(c,b),c.prototype._subscribe=function(b){function c(){for(;e.length>0;)b.onNext(e.shift())}var d,e=[],f=ba(this.source,this.pauser.startWith(!this.paused).distinctUntilChanged(),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(f){d!==a&&f.shouldFire!==d?(d=f.shouldFire,f.shouldFire&&c()):(d=f.shouldFire,f.shouldFire?b.onNext(f.data):e.push(f.data))},function(a){c(),b.onError(a)},function(){c(),b.onCompleted()});return f},c.prototype.pause=function(){this.paused=!0,this.controller.onNext(!1)},c.prototype.resume=function(){this.paused=!1,this.controller.onNext(!0)},c}(pc);dc.pausableBuffered=function(a){return new le(this,a)};var me=function(a){function b(b,c,d){a.call(this),this.subject=new ne(c,d),this.source=b.multicast(this.subject).refCount()}return Ab(b,a),b.prototype._subscribe=function(a){return this.source.subscribe(a)},b.prototype.request=function(a){return this.subject.request(null==a?-1:a)},b}(pc),ne=function(a){function b(b,c){null==b&&(b=!0),a.call(this),this.subject=new se,this.enableQueue=b,this.queue=b?[]:null,this.requestedCount=0,this.requestedDisposable=null,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.scheduler=c||Xb}return Ab(b,a),Bb(b.prototype,lc,{_subscribe:function(a){return this.subject.subscribe(a)},onCompleted:function(){this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length?this.queue.push(ec.createOnCompleted()):(this.subject.onCompleted(),this.disposeCurrentRequest())},onError:function(a){this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length?this.queue.push(ec.createOnError(a)):(this.subject.onError(a),this.disposeCurrentRequest())},onNext:function(a){this.requestedCount<=0?this.enableQueue&&this.queue.push(ec.createOnNext(a)):(0===this.requestedCount--&&this.disposeCurrentRequest(),this.subject.onNext(a))},_processRequest:function(a){if(this.enableQueue)for(;this.queue.length>0&&(a>0||"N"!==this.queue[0].kind);){var b=this.queue.shift();b.accept(this.subject),"N"===b.kind?a--:(this.disposeCurrentRequest(),this.queue=[])}return a},request:function(a){this.disposeCurrentRequest();var b=this;return this.requestedDisposable=this.scheduler.schedule(a,function(a,c){var d=b._processRequest(c),e=b.hasCompleted||b.hasFailed;return!e&&d>0?(b.requestedCount=d,Fb(function(){b.requestedCount=0})):void 0}),this.requestedDisposable},disposeCurrentRequest:function(){this.requestedDisposable&&(this.requestedDisposable.dispose(),this.requestedDisposable=null)}}),b}(pc);dc.controlled=function(a,b){return a&&Rb(a)&&(b=a,a=!0),null==a&&(a=!0),new me(this,a,b)},dc.pipe=function(a){function b(){c.resume()}var c=this.pausableBuffered();return a.addListener("drain",b),c.subscribe(function(b){!a.write(b)&&c.pause()},function(b){a.emit("error",b)},function(){!a._isStdio&&a.end(),a.removeListener("drain",b)}),c.resume(),a};var oe=function(a){function b(b,c){this._o=b,this._xform=c,a.call(this)}return Ab(b,a),b.prototype.next=function(a){var b=wa(this._xform["@@transducer/step"]).call(this._xform,this._o,a);b===va&&this._o.onError(b.e)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._xform["@@transducer/result"](this._o)},b}(nc);dc.transduce=function(a){var b=this;return new pe(function(c){var d=a(ca(c));return b.subscribe(new oe(c,d))},b)};var pe=ma.AnonymousObservable=function(a){function b(a){return a&&ua(a.dispose)?a:ua(a)?Fb(a):Gb}function c(a,c){var d=c[0],f=c[1],g=wa(f.__subscribe).call(f,d);g!==va||d.fail(va.e)||e(va.e),d.setDisposable(b(g))}function d(b,c){this.source=c,this.__subscribe=b,a.call(this)}return Ab(d,a),d.prototype._subscribe=function(a){var b=new qe(a),d=[b,this];return Xb.scheduleRequired()?Xb.schedule(d,c):c(null,d),b},d}(pc),qe=function(a){function b(b){a.call(this),this.observer=b,this.m=new Kb}Ab(b,a);var c=b.prototype;return c.next=function(a){var b=wa(this.observer.onNext).call(this.observer,a);b===va&&(this.dispose(),e(b.e))},c.error=function(a){var b=wa(this.observer.onError).call(this.observer,a);this.dispose(),b===va&&e(b.e)},c.completed=function(){var a=wa(this.observer.onCompleted).call(this.observer);this.dispose(),a===va&&e(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}(nc),re=function(a,b){this._s=a,this._o=b};re.prototype.dispose=function(){if(!this._s.isDisposed&&null!==this._o){var a=this._s.observers.indexOf(this._o);this._s.observers.splice(a,1),this._o=null}};var se=ma.Subject=function(a){function b(){a.call(this),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Ab(b,a),Bb(b.prototype,lc.prototype,{_subscribe:function(a){return Ib(this),this.isStopped?this.hasError?(a.onError(this.error),Gb):(a.onCompleted(),Gb):(this.observers.push(a),new re(this,a))},hasObservers:function(){return Ib(this),this.observers.length>0},onCompleted:function(){if(Ib(this),!this.isStopped){this.isStopped=!0;for(var a=0,b=c(this.observers),d=b.length;d>a;a++)b[a].onCompleted();this.observers.length=0}},onError:function(a){if(Ib(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var b=0,d=c(this.observers),e=d.length;e>b;b++)d[b].onError(a);this.observers.length=0}},onNext:function(a){if(Ib(this),!this.isStopped)for(var b=0,d=c(this.observers),e=d.length;e>b;b++)d[b].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),b.create=function(a,b){return new ue(a,b)},b}(pc),te=ma.AsyncSubject=function(a){function b(){a.call(this),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Ab(b,a),Bb(b.prototype,lc.prototype,{_subscribe:function(a){return Ib(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),Gb):(this.observers.push(a),new re(this,a))},hasObservers:function(){return Ib(this),this.observers.length>0},onCompleted:function(){var a,b;if(Ib(this),!this.isStopped){this.isStopped=!0;var d=c(this.observers),b=d.length;if(this.hasValue)for(a=0;b>a;a++){var e=d[a];e.onNext(this.value),e.onCompleted()}else for(a=0;b>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(Ib(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var b=0,d=c(this.observers),e=d.length;e>b;b++)d[b].onError(a);this.observers.length=0}},onNext:function(a){Ib(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.error=null,this.value=null}}),b}(pc),ue=ma.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this)}return Ab(b,a),Bb(b.prototype,lc.prototype,{_subscribe:function(a){return this.observable.subscribe(a)},onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(pc),ve=ma.BehaviorSubject=function(a){function b(b){a.call(this),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return Ab(b,a),Bb(b.prototype,lc.prototype,{_subscribe:function(a){return Ib(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),Gb):(this.observers.push(a),a.onNext(this.value),new re(this,a))},getValue:function(){return Ib(this),this.hasError&&e(this.error),this.value},hasObservers:function(){return Ib(this),this.observers.length>0},onCompleted:function(){if(Ib(this),!this.isStopped){this.isStopped=!0;for(var a=0,b=c(this.observers),d=b.length;d>a;a++)b[a].onCompleted();this.observers.length=0}},onError:function(a){if(Ib(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var b=0,d=c(this.observers),e=d.length;e>b;b++)d[b].onError(a);this.observers.length=0}},onNext:function(a){if(Ib(this),!this.isStopped){this.value=a;for(var b=0,d=c(this.observers),e=d.length;e>b;b++)d[b].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.error=null}}),b}(pc),we=ma.ReplaySubject=function(a){function b(a,b){return Fb(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(b,c,d){this.bufferSize=null==b?e:b,this.windowSize=null==c?e:c,this.scheduler=d||Xb,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this)}var e=Math.pow(2,53)-1;return Ab(d,a),Bb(d.prototype,lc.prototype,{_subscribe:function(a){Ib(this);var c=new zc(this.scheduler,a),d=b(this,c);this._trim(this.scheduler.now()),this.observers.push(c);for(var e=0,f=this.q.length;f>e;e++)c.onNext(this.q[e].value);return this.hasError?c.onError(this.error):this.isStopped&&c.onCompleted(),c.ensureActive(),d},hasObservers:function(){return Ib(this),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(Ib(this),!this.isStopped){var b=this.scheduler.now();this.q.push({interval:b,value:a}),this._trim(b);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onNext(a),g.ensureActive()}}},onError:function(a){if(Ib(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var b=this.scheduler.now();this._trim(b);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onError(a),g.ensureActive()}this.observers.length=0}},onCompleted:function(){if(Ib(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var b=0,d=c(this.observers),e=d.length;e>b;b++){var f=d[b];f.onCompleted(),f.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),d}(pc);ma.Pauser=function(a){function b(){a.call(this)}return Ab(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(se),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(la.Rx=ma,define(function(){return ma})):ea&&fa?ja?(fa.exports=ma).Rx=ma:ea.Rx=ma:la.Rx=ma;var xe=j()}).call(this);
//# sourceMappingURL=rx.lite.compat.map