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

5 lines
72 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=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function d(a){return function(){try{return a.apply(this,arguments)}catch(b){return la.e=b,la}}}function e(a){throw a}function f(a,b){if(na&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(ra)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var e=c.join("\n"+ra+"\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===pa&&d>=qa&&$d>=d}function i(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function j(){if(na)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 pa=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=eb(b),i=h.length,j=eb(c),k=j.length;if(i!==k&&!e)return!1;for(var l,m=i;m--;)if(l=h[m],!(e?l in c:bb.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 Ga:case Ha:return+a===+b;case Ia:return a.name===b.name&&a.message===b.message;case La:return a!==+a?b!==+b:a===+b;case Na:case Pa: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&&db>=a}function p(a){return n(a)&&o(a.length)&&!!_a[cb.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=hb(a),h=hb(b),i=Fa,j=Fa;g||(i=cb.call(a),i===Ea?i=Ma:i!==Ma&&(g=p(a))),h||(j=cb.call(b),j===Ea&&(j=Ma));var k=i===Ma&&!gb(a),n=j===Ma&&!gb(b),o=i===j;if(o&&!g&&!k)return m(a,b,i);if(!d){var q=k&&bb.call(a,"__wrapped__"),s=n&&bb.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||!fb(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.scheduler=a,this.disposable=b,this.isDisposed=!1}function w(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function x(a,b){this.id=a,this.value=b}function y(a){this._s=a,this.isDisposed=!1}function z(a){this._s=a}function A(a){this._s=a,this._l=a.length,this._i=0}function B(a){this._a=a}function C(a){this._a=a,this._l=G(a),this._i=0}function D(a){return"number"==typeof a&&ba.isFinite(a)}function E(b){var c,d=b[ya];if(!d&&"string"==typeof b)return c=new z(b),c[ya]();if(!d&&b.length!==a)return c=new B(b),c[ya]();if(!d)throw new TypeError("Object is not iterable");return b[ya]()}function F(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function G(a){var b=+a.length;return isNaN(b)?0:0!==b&&D(b)?(b=F(b)*Math.floor(Math.abs(b)),0>=b?0:b>yc?yc:b):b}function H(a,b){return Cb(a)||(a=Ib),new Ac(b,a)}function I(a,b){this.observer=a,this.parent=b}function J(a,b){return a.amb(b)}function K(){return!1}function L(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function K(){return!1}function L(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function K(){return!1}function M(){return[]}function K(){return!1}function M(){return[]}function L(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function N(a){return function(b){return a.subscribe(b)}}function O(a){return a.toArray()}function P(a){return a.length>0}function Q(a){return{"@@iterator":function(){return{next:function(){return{done:!1,value:a}}}}}}function Q(a){return{"@@iterator":function(){return{next:function(){return{done:!1,value:a}}}}}}function R(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function S(a){this.comparer=a,this.set=[]}function T(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 U(a){return{"@@transducer/init":function(){return a},"@@transducer/step":function(a,b){return a.onNext(b)},"@@transducer/result":function(a){return a.onCompleted()}}}var V={"function":!0,object:!0},W=V[typeof exports]&&exports&&!exports.nodeType?exports:null,X=V[typeof module]&&module&&!module.nodeType?module:null,Y=b(W&&X&&"object"==typeof global&&global),Z=b(V[typeof self]&&self),$=b(V[typeof window]&&window),_=X&&X.exports===W?W:null,aa=b(V[typeof this]&&this),ba=Y||$!==(aa&&aa.window)&&$||Z||aa||Function("return this")(),ca={internals:{},config:{Promise:ba.Promise},helpers:{}},da=ca.helpers.noop=function(){},ea=ca.helpers.identity=function(a){return a},fa=ca.helpers.defaultNow=Date.now,ga=ca.helpers.defaultComparer=function(a,b){return ib(a,b)},ha=ca.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},ia=(ca.helpers.defaultKeySerializer=function(a){return a.toString()},ca.helpers.defaultError=function(a){throw a}),ja=ca.helpers.isPromise=function(a){return!!a&&"function"!=typeof a.subscribe&&"function"==typeof a.then},ka=ca.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==toString.call(a)}),a}(),la={e:{}},ma=ca.internals.tryCatch=function(a){if(!ka(a))throw new TypeError("fn must be a function");return d(a)};ca.config.longStackSupport=!1;var na=!1,oa=ma(function(){throw new Error})();na=!!oa.e&&!!oa.e.stack;var pa,qa=j(),ra="From previous event:",sa=ca.EmptyError=function(){this.message="Sequence contains no elements.",Error.call(this)};sa.prototype=Object.create(Error.prototype),sa.prototype.name="EmptyError";var ta=ca.ObjectDisposedError=function(){this.message="Object has been disposed",Error.call(this)};ta.prototype=Object.create(Error.prototype),ta.prototype.name="ObjectDisposedError";var ua=ca.ArgumentOutOfRangeError=function(){this.message="Argument out of range",Error.call(this)};ua.prototype=Object.create(Error.prototype),ua.prototype.name="ArgumentOutOfRangeError";var va=ca.NotSupportedError=function(a){this.message=a||"This operation is not supported",Error.call(this)};va.prototype=Object.create(Error.prototype),va.prototype.name="NotSupportedError";var wa=ca.NotImplementedError=function(a){this.message=a||"This operation is not implemented",Error.call(this)};wa.prototype=Object.create(Error.prototype),wa.prototype.name="NotImplementedError";var xa=ca.helpers.notImplemented=function(){throw new wa},ya=(ca.helpers.notSupported=function(){throw new va},"function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_");ba.Set&&"function"==typeof(new ba.Set)["@@iterator"]&&(ya="@@iterator");var za=ca.doneEnumerator={done:!0,value:a},Aa=ca.helpers.isIterable=function(b){return b&&b[ya]!==a},Ba=ca.helpers.isArrayLike=function(b){return b&&b.length!==a};ca.helpers.iterator=ya;var Ca=ca.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)}},Da=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Ea=(Da.length,"[object Arguments]"),Fa="[object Array]",Ga="[object Boolean]",Ha="[object Date]",Ia="[object Error]",Ja="[object Function]",Ka="[object Map]",La="[object Number]",Ma="[object Object]",Na="[object RegExp]",Oa="[object Set]",Pa="[object String]",Qa="[object WeakMap]",Ra="[object ArrayBuffer]",Sa="[object Float32Array]",Ta="[object Float64Array]",Ua="[object Int8Array]",Va="[object Int16Array]",Wa="[object Int32Array]",Xa="[object Uint8Array]",Ya="[object Uint8ClampedArray]",Za="[object Uint16Array]",$a="[object Uint32Array]",_a={};_a[Sa]=_a[Ta]=_a[Ua]=_a[Va]=_a[Wa]=_a[Xa]=_a[Ya]=_a[Za]=_a[$a]=!0,_a[Ea]=_a[Fa]=_a[Ra]=_a[Ga]=_a[Ha]=_a[Ia]=_a[Ja]=_a[Ka]=_a[La]=_a[Ma]=_a[Na]=_a[Oa]=_a[Pa]=_a[Qa]=!1;var ab=Object.prototype,bb=ab.hasOwnProperty,cb=ab.toString,db=Math.pow(2,53)-1,eb=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}}(),fb=ca.internals.isObject=function(a){var b=typeof a;return!!a&&("object"===b||"function"===b)},gb=function(){try{Object({toString:0}+"")}catch(a){return function(){return!1}}return function(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}}(),hb=Array.isArray||function(a){return n(a)&&o(a.length)&&cb.call(a)===Fa},ib=ca.internals.isEqual=function(a,b){return t(a,b)},jb=({}.hasOwnProperty,Array.prototype.slice,ca.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),kb=ca.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]}},lb=ca.internals.addRef=function(a,b){return new Vd(function(c){return new wb(b.getDisposable(),a.subscribe(c))})},mb=ca.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},nb=mb.prototype;nb.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},nb.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},nb.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 ob=ca.Disposable=function(a){this.isDisposed=!1,this.action=a||da};ob.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var pb=ob.create=function(a){return new ob(a)},qb=ob.empty={dispose:da},rb=ob.isDisposable=function(a){return a&&ka(a.dispose)},sb=ob.checkDisposed=function(a){if(a.isDisposed)throw new ta},tb=ob._fixup=function(a){return rb(a)?a:qb},ub=ca.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null};ub.prototype.getDisposable=function(){return this.current},ub.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()},ub.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null,a&&a.dispose()}};var vb=ca.SerialDisposable=function(){this.isDisposed=!1,this.current=null};vb.prototype.getDisposable=function(){return this.current},vb.prototype.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},vb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var wb=ca.BinaryDisposable=function(a,b){this._first=a,this._second=b,this.isDisposed=!1};wb.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 xb=ca.NAryDisposable=function(a){this._disposables=a,this.isDisposed=!1};xb.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 yb=ca.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?qb:new a(this)},b}();v.prototype.dispose=function(){this.scheduler.schedule(this,w)};var zb=ca.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||ha,this.disposable=new ub};zb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},zb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},zb.prototype.isCancelled=function(){return this.disposable.isDisposed},zb.prototype.invokeCore=function(){return tb(this.action(this.scheduler,this.state))};var Ab=ca.Scheduler=function(){function a(){}a.isScheduler=function(b){return b instanceof a};var b=a.prototype;return b.schedule=function(a,b){throw new wa},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 wa},a.now=fa,a.prototype.now=fa,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Bb=Ab.normalize,Cb=Ab.isScheduler;!function(a){function b(a,b){function c(b){function d(a,b){return g?f.remove(i):h=!0,e(b,c),qb}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 mb;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),qb}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 mb;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)}}(Ab.prototype),function(a){a.schedulePeriodic=function(a,b,c){if("undefined"==typeof ba.setInterval)throw new va;b=Bb(b);var d=a,e=ba.setInterval(function(){d=c(d)},b);return pb(function(){ba.clearInterval(e)})}}(Ab.prototype),function(a){a.catchError=a["catch"]=function(a){return new Ob(this,a)}}(Ab.prototype);var Db,Eb,Fb=(ca.internals.SchedulePeriodicRecursive=function(){function a(a){return function(b,c){c(0,a._period);var d=ma(a._action)(a._state);d===la&&(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 ub;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveFuture(0,this._period,a(this))),b},b}(),function(a){function b(){a.call(this)}return jb(b,a),b.prototype.schedule=function(a,b){return tb(b(this,a))},b}(Ab)),Gb=Ab.immediate=new Fb,Hb=function(a){function b(){for(;d.length>0;){var a=d.dequeue();!a.isCancelled()&&a.invoke()}}function c(){a.call(this)}var d;return jb(c,a),c.prototype.schedule=function(a,c){var f=new zb(this,a,c,this.now());if(d)d.enqueue(f);else{d=new Pb(4),d.enqueue(f);var g=ma(b)();d=null,g===la&&e(g.e)}return f.disposable},c.prototype.scheduleRequired=function(){return!d},c}(Ab),Ib=Ab.currentThread=new Hb,Jb=function(){var a,b=da;if(ba.setTimeout)a=ba.setTimeout,b=ba.clearTimeout;else{if(!ba.WScript)throw new va;a=function(a,b){ba.WScript.Sleep(b),a()}}return{setTimeout:a,clearTimeout:b}}(),Kb=Jb.setTimeout,Lb=Jb.clearTimeout;!function(){function a(b){if(f)Kb(function(){a(b)},0);else{var c=d[b];if(c){f=!0;var g=ma(c)();Eb(b),f=!1,g===la&&e(g.e)}}}function b(){if(!ba.postMessage||ba.importScripts)return!1;var a=!1,b=ba.onmessage;return ba.onmessage=function(){a=!0},ba.postMessage("","*"),ba.onmessage=b,a}var c=1,d={},f=!1;Eb=function(a){delete d[a]};var g=new RegExp("^"+String(toString).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),h="function"==typeof(h=Y&&_&&Y.setImmediate)&&!g.test(h)&&h;if(ka(h))Db=function(b){var e=c++;return d[e]=b,h(function(){a(e)}),e};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Db=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))};ba.addEventListener("message",j,!1),Db=function(a){var b=c++;return d[b]=a,ba.postMessage(i+b,"*"),b}}else if(ba.MessageChannel){var k=new ba.MessageChannel;k.port1.onmessage=function(b){a(b.data)},Db=function(a){var b=c++;return d[b]=a,k.port2.postMessage(b),b}}else Db="document"in ba&&"onreadystatechange"in ba.document.createElement("script")?function(b){var e=ba.document.createElement("script"),f=c++;return d[f]=b,e.onreadystatechange=function(){a(f),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},ba.document.documentElement.appendChild(e),f}:function(b){var e=c++;return d[e]=b,Kb(function(){a(e)},0),e}}();var Mb=function(a){function b(){a.call(this)}function c(a,b,c,d){return function(){a.setDisposable(ob._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 jb(b,a),d.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,Eb(this._id))},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,Lb(this._id))},b.prototype.schedule=function(a,b){var e=new ub,f=Db(c(e,b,this,a));return new wb(e,new d(f))},b.prototype._scheduleFuture=function(a,b,d){if(0===b)return this.schedule(a,d);var f=new ub,g=Kb(c(f,d,this,a),b);return new wb(f,new e(g))},b.prototype.scheduleLongRunning=function(a,b){var c=pb(da);return Db(f(a,b,c)),c},b}(Ab),Nb=Ab["default"]=Ab.async=new Mb,Ob=function(a){function b(b,c){this._scheduler=b,this._handler=c,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this)}return jb(b,a),b.prototype.schedule=function(a,b){return this._scheduler.schedule(a,this._wrap(b))},b.prototype._scheduleFuture=function(a,b,c){return this._scheduler.schedule(a,b,this._wrap(c))},b.prototype.now=function(){return this._scheduler.now()},b.prototype._clone=function(a){return new b(a,this._handler)},b.prototype._wrap=function(a){var b=this;return function(c,d){var f=ma(a)(b._getRecursiveWrapper(c),d);return f===la?(b._handler(f.e)||e(f.e),qb):tb(f)}},b.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},b.prototype.schedulePeriodic=function(a,b,c){var d=this,f=!1,g=new ub;return g.setDisposable(this._scheduler.schedulePeriodic(a,b,function(a){if(f)return null;var b=ma(c)(a);return b===la?(f=!0,d._handler(b.e)||e(b.e),g.dispose(),null):b})),g},b}(Ab);x.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Pb=ca.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Qb=Pb.prototype;Qb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Qb.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)}}},Qb.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)}}},Qb.peek=function(){return this.items[0].value},Qb.removeAt=function(b){this.items[b]=this.items[--this.length],this.items[this.length]=a,this.heapify()},Qb.dequeue=function(){var a=this.peek();return this.removeAt(0),a},Qb.enqueue=function(a){var b=this.length++;this.items[b]=new x(Pb.count++,a),this.percolate(b)},Qb.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},Pb.count=0;var Rb=ca.Notification=function(){function a(){}return a.prototype._accept=function(a,b,c){throw new wa},a.prototype._acceptObserver=function(a,b,c){throw new wa},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 Cb(a)||(a=Gb),new Vd(function(c){return a.schedule(b,function(a,b){b._acceptObserver(c),"N"===b.kind&&c.onCompleted()})})},a}(),Sb=function(a){function b(a){this.value=a,this.kind="N"}return jb(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}(Rb),Tb=function(a){function b(a){this.error=a,this.kind="E"}return jb(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}(Rb),Ub=function(a){function b(){this.kind="C"}return jb(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}(Rb),Vb=Rb.createOnNext=function(a){return new Sb(a)},Wb=Rb.createOnError=function(a){return new Tb(a)},Xb=Rb.createOnCompleted=function(){return new Ub},Yb=ca.Observer=function(){};Yb.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},Yb.prototype.asObserver=function(){var a=this;return new ac(function(b){a.onNext(b)},function(b){a.onError(b)},function(){a.onCompleted()})},Yb.prototype.checked=function(){return new bc(this)};var Zb=Yb.create=function(a,b,c){return a||(a=da),b||(b=ia),c||(c=da),new ac(a,b,c)};Yb.fromNotifier=function(a,b){var c=Ca(a,b,1);return new ac(function(a){return c(Vb(a))},function(a){return c(Wb(a))},function(){return c(Xb())})},Yb.prototype.notifyOn=function(a){return new dc(a,this)},Yb.prototype.makeSafe=function(a){return new AnonymousSafeObserver(this._onNext,this._onError,this._onCompleted,a)};var $b,_b=ca.internals.AbstractObserver=function(a){function b(){this.isStopped=!1}return jb(b,a),b.prototype.next=xa,b.prototype.error=xa,b.prototype.completed=xa,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}(Yb),ac=ca.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return jb(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}(_b),bc=function(a){function b(b){a.call(this),this._observer=b,this._state=0}jb(b,a);var c=b.prototype;return c.onNext=function(a){this.checkAccess();var b=ma(this._observer.onNext).call(this._observer,a);this._state=0,b===la&&e(b.e)},c.onError=function(a){this.checkAccess();var b=ma(this._observer.onError).call(this._observer,a);this._state=2,b===la&&e(b.e)},c.onCompleted=function(){this.checkAccess();var a=ma(this._observer.onCompleted).call(this._observer);this._state=2,a===la&&e(a.e)},c.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},b}(Yb),cc=ca.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 vb}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=ma(c)();return d===la?(a.queue=[],a.hasFaulted=!0,e(d.e)):void b(a)}return jb(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}(_b),dc=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return jb(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(cc),ec=ca.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(ca.config.longStackSupport&&na){var b=this._subscribe,c=ma(e)(new Error).e;this.stack=c.stack.substring(c.stack.indexOf("\n")+1),this._subscribe=a(this,b)}}return $b=b.prototype,b.isObservable=function(a){return a&&ka(a.subscribe)},$b.subscribe=$b.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:Zb(a,b,c))},$b.subscribeOnNext=function(a,b){return this._subscribe(Zb("undefined"!=typeof b?function(c){a.call(b,c)}:a))},$b.subscribeOnError=function(a,b){return this._subscribe(Zb(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},$b.subscribeOnCompleted=function(a,b){return this._subscribe(Zb(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},b}(),fc=ca.ObservableBase=function(a){function b(a){return a&&ka(a.dispose)?a:ka(a)?pb(a):qb}function c(a,c){var d=c[0],f=c[1],g=ma(f.subscribeCore).call(f,d);g!==la||d.fail(la.e)||e(la.e),d.setDisposable(b(g))}function d(){a.call(this)}return jb(d,a),d.prototype._subscribe=function(a){var b=new Wd(a),d=[b,this];return Ib.scheduleRequired()?Ib.schedule(d,c):c(null,d),b},d.prototype.subscribeCore=xa,d}(ec),gc=ca.FlatMapObservable=function(a){function b(b,c,d,e){this.resultSelector=ka(d)?d:null,this.selector=Ca(ka(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,_b.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this.selector,this.resultSelector,this))},jb(c,_b),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=ma(this.selector)(a,b,this.source);return c===la?this.o.onError(c.e):(ja(c)&&(c=rc(c)),(Ba(c)||Aa(c))&&(c=ec.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}(fc),hc=ca.internals.Enumerable=function(){};y.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._s.isDisposed=!0)};var ic=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){if(!a.isDisposed){var c=ma(a.e.next).call(a.e);if(c===la)return a.o.onError(c.e);if(c.done)return a.o.onCompleted();var e=c.value;ja(e)&&(e=rc(e));var f=new ub;a.subscription.setDisposable(f),f.setDisposable(e.subscribe(new d(a,b)))}}function d(a,b){this._state=a,this._recurse=b,_b.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){var b=new vb,d={isDisposed:!1,o:a,subscription:b,e:this.sources[ya]()},e=Ib.scheduleRecursive(d,c);return new xb([b,e,new y(d)])},jb(d,_b),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}(fc);hc.prototype.concat=function(){return new ic(this)};var jc=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){if(!a.isDisposed){var c=ma(a.e.next).call(a.e);if(c===la)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;ja(e)&&(e=rc(e));var f=new ub;a.subscription.setDisposable(f),f.setDisposable(e.subscribe(new d(a,b)))}}function d(a,b){this._state=a,this._recurse=b,_b.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){var b=new vb,d={isDisposed:!1,e:this.sources[ya](),subscription:b,lastError:null,o:a},e=Ib.scheduleRecursive(d,c);return new xb([b,e,new y(d)])},jb(d,_b),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}(fc);hc.prototype.catchError=function(){return new jc(this)};var kc=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 jb(b,a),b.prototype[ya]=function(){return new c(this)},c.prototype.next=function(){return 0===this.l?za:(this.l>0&&this.l--,{done:!1,value:this.v})},b}(hc),lc=hc.repeat=function(a,b){return new kc(a,b)},mc=function(a){function b(a,b,c){this.s=a,this.fn=b?Ca(b,c,3):null}function c(a){this.i=-1,this.s=a.s,this.l=this.s.length,this.fn=a.fn}return jb(b,a),b.prototype[ya]=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]}:za},b}(hc),nc=hc.of=function(a,b,c){return new mc(a,b,c)},oc=function(a){function b(b,c){this.source=b,this._s=c,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new dc(this._s,a))},b}(fc);$b.observeOn=function(a){return new oc(this,a)};var pc=function(a){function b(b,c){this.source=b,this._s=c,a.call(this)}function c(a,b){var c=b[0],d=b[1],e=b[2];d.setDisposable(new v(a,c.subscribe(e)))}return jb(b,a),b.prototype.subscribeCore=function(a){var b=new ub,d=new vb;return d.setDisposable(b),b.setDisposable(this._s.schedule([this.source,d,a],c)),d},b}(fc);$b.subscribeOn=function(a){return new pc(this,a)};var qc=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 jb(b,a),b.prototype.subscribeCore=function(a){var b=new ub,e=this,f=this._p;return ka(f)&&(f=ma(f)(),f===la)?(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}(fc),rc=ec.fromPromise=function(a,b){return b||(b=Nb),new qc(a,b)};$b.toPromise=function(a){if(a||(a=ca.config.Promise),!a)throw new va("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)})})};var sc=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.a=[],_b.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},jb(c,_b),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}(fc);$b.toArray=function(){return new sc(this)},ec.create=function(a,b){return new Vd(a,b)};var tc=function(a){function b(b){this._f=b,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){var b=ma(this._f)();return b===la?Lc(b.e).subscribe(a):(ja(b)&&(b=rc(b)),b.subscribe(a))},b}(fc),uc=(ec.defer=function(a){return new tc(a)},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(),qb}return jb(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===Gb?d(null,a):this.scheduler.schedule(a,d)},b}(fc)),vc=new uc(Gb),wc=ec.empty=function(a){return Cb(a)||(a=Gb),a===Gb?vc:new uc(a)},xc=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=ma(b.next).call(b);if(f===la)return a.onError(f.e);if(f.done)return a.onCompleted();var g=f.value;return ka(c)&&(g=ma(c)(g,d),g===la)?a.onError(g.e):(a.onNext(g),void e(d+1))}}return jb(b,a),b.prototype.subscribeCore=function(a){var b=Object(this._iterable),d=E(b);return this._scheduler.scheduleRecursive(0,c(a,d,this._fn))},b}(fc),yc=Math.pow(2,53)-1;z.prototype[ya]=function(){return new A(this._s)},A.prototype[ya]=function(){return this},A.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:za},B.prototype[ya]=function(){return new C(this._a)},C.prototype[ya]=function(){return this},C.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:za};var zc=ec.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!ka(b))throw new Error("mapFn when provided must be a function");if(b)var e=Ca(b,c,2);return Cb(d)||(d=Ib),new xc(a,e,d)},Ac=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 jb(b,a),b.prototype.subscribeCore=function(a){return this._scheduler.scheduleRecursive(0,c(a,this._args))},b}(fc),Bc=ec.fromArray=function(a,b){return Cb(b)||(b=Ib),new Ac(a,b)},Cc=function(a){function b(b,c,d,e,f){this._initialState=b,this._cndFn=c,this._itrFn=d,this._resFn=e,this._s=f,a.call(this)}function c(a,b){if(a.first)a.first=!1;else if(a.newState=ma(a.self._itrFn)(a.newState),a.newState===la)return a.o.onError(a.newState.e);var c=ma(a.self._cndFn)(a.newState);if(c===la)return a.o.onError(c.e);if(c){var d=ma(a.self._resFn)(a.newState);if(d===la)return a.o.onError(d.e);a.o.onNext(d),b(a)}else a.o.onCompleted()}return jb(b,a),b.prototype.subscribeCore=function(a){var b={o:a,self:this,first:!0,newState:this._initialState};return this._s.scheduleRecursive(b,c)},b}(fc);ec.generate=function(a,b,c,d,e){return Cb(e)||(e=Ib),new Cc(a,b,c,d,e)};var Dc=function(a){function b(){a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return qb},b}(fc),Ec=new Dc,Fc=ec.never=function(){return Ec};ec.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new Ac(b,Ib)},ec.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 Ac(c,a)};var Gc=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 jb(b,a),b.prototype.subscribeCore=function(a){return this._scheduler.scheduleRecursive(0,c(a,this._o,this._keys))},b}(fc);ec.pairs=function(a,b){return b||(b=Ib),new Gc(a,b)};var Hc=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 jb(b,a),b.prototype.subscribeCore=function(a){return this.scheduler.scheduleRecursive(0,c(this.start,this.rangeCount,a))},b}(fc);ec.range=function(a,b,c){return Cb(c)||(c=Ib),new Hc(a,b,c)};var Ic=function(a){function b(b,c,d){this.value=b,this.repeatCount=null==c?-1:c,this.scheduler=d,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){var b=new I(a,this);return b.run()},b}(fc);I.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)},ec.repeat=function(a,b,c){return Cb(c)||(c=Ib),new Ic(a,b,c)};var Jc=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(),qb}return jb(b,a),b.prototype.subscribeCore=function(a){var b=[this._value,a];return this._scheduler===Gb?c(null,b):this._scheduler.schedule(b,c)},b}(fc),Kc=(ec["return"]=ec.just=function(a,b){return Cb(b)||(b=Gb),new Jc(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),qb}return jb(b,a),b.prototype.subscribeCore=function(a){var b=[this._error,a];return this._scheduler===Gb?c(null,b):this._scheduler.schedule(b,c)},b}(fc)),Lc=ec["throw"]=function(a,b){return Cb(b)||(b=Gb),new Kc(a,b)},Mc=function(a){function b(b,c){this._resFn=b,this._obsFn=c,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){var b=qb,c=ma(this._resFn)();if(c===la)return new wb(Lc(c.e).subscribe(a),b);c&&(b=c);var d=ma(this._obsFn)(c);return d===la?new wb(Lc(d.e).subscribe(a),b):new wb(d.subscribe(a),b)},b}(fc);ec.using=function(a,b){return new Mc(a,b)},$b.amb=function(a){var b=this;return new Vd(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new ub,j=new ub;ja(a)&&(a=rc(a));var k=Zb(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()}),l=Zb(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()});return i.setDisposable(b.subscribe(k)),j.setDisposable(a.subscribe(l)),new wb(i,j)})},ec.amb=function(){var a,b=Fc();if(Array.isArray(arguments[0]))a=arguments[0];else{var c=arguments.length;a=new Array(a);for(var d=0;c>d;d++)a[d]=arguments[d]}for(var d=0,c=a.length;c>d;d++)b=J(b,a[d]);return b};var Nc=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){var b=new ub,c=new vb;return c.setDisposable(b),b.setDisposable(this.source.subscribe(new Oc(a,c,this._fn))),c},b}(fc),Oc=function(a){function b(b,c,d){this._o=b,this._s=c,this._fn=d,a.call(this)}return jb(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=ma(this._fn)(a);if(b===la)return this._o.onError(b.e);ja(b)&&(b=rc(b));var c=new ub;this._s.setDisposable(c),c.setDisposable(b.subscribe(this._o))},b}(_b);$b["catch"]=function(a){return ka(a)?new Nc(this,a):Pc([this,a])};var Pc=ec["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 nc(a).catchError()};$b.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),Sc.apply(this,b)};var Qc=function(a){function b(b,c){this._params=b,this._cb=c,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){for(var b=this._params.length,c=new Array(b),d={hasValue:u(b,K),hasValueAll:!1,isDone:u(b,K),values:new Array(b)},e=0;b>e;e++){var f=this._params[e],g=new ub;c[e]=g,ja(f)&&(f=rc(f)),g.setDisposable(f.subscribe(new Rc(a,e,this._cb,d)))}return new xb(c)},b}(fc),Rc=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 jb(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(ea))){var b=ma(this._cb).apply(null,this._state.values);if(b===la)return this._o.onError(b.e);this._o.onNext(b)}else this._state.isDone.filter(c(this._i)).every(ea)&&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(ea)&&this._o.onCompleted()},b}(_b),Sc=ec.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ka(b[a-1])?b.pop():L;return Array.isArray(b[0])&&(b=b[0]),new Qc(b,d)};$b.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Vc.apply(null,a)};var Tc=function(a){function b(b,c){this._s=b,this._fn=c,a.call(this)}return jb(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}(_b),Uc=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];ja(c)&&(c=rc(c));var d=new ub;a.subscription.setDisposable(d),d.setDisposable(c.subscribe(new Tc(a,b)))}}return jb(b,a),b.prototype.subscribeCore=function(a){var b=new vb,d=pb(da),e={o:a,i:0,subscription:b,disposable:d,sources:this._sources},f=Gb.scheduleRecursive(e,c);return new xb([b,d,f])},b}(fc),Vc=ec.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 Uc(a)};$b.concatAll=function(){return this.merge(1)};var Wc=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){var b=new mb;return b.add(this.source.subscribe(new Xc(a,this.maxConcurrent,b))),b},b}(fc),Xc=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 jb(b,a),b.prototype.handleSubscribe=function(a){var b=new ub;this.g.add(b),ja(a)&&(a=rc(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()},jb(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}(_b);$b.merge=function(a){return"number"!=typeof a?Yc(this,a):new Wc(this,a)};var Yc=ec.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=Gb,b=0;d>b;b++)c.push(arguments[b]);else for(a=Gb,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),H(a,c).mergeAll()},Zc=ca.CompositeError=function(a){this.innerErrors=a,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};Zc.prototype=Object.create(Error.prototype),Zc.prototype.name="CompositeError";var $c=function(a){function b(b){this.source=b,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){var b=new mb,c=new ub,d={isStopped:!1,errors:[],o:a};return b.add(c),c.setDisposable(this.source.subscribe(new _c(b,d))),b},b}(fc),_c=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 Zc(b))}function d(b,c,d){this._inner=b,this._group=c,this._state=d,a.call(this)}return jb(b,a),b.prototype.next=function(a){var b=new ub;this._group.add(b),ja(a)&&(a=rc(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)},jb(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}(_b);ec.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=H(null,a);return new $c(d)};var ad=function(a){function b(b){this.source=b,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){var b=new mb,c=new ub;return b.add(c),c.setDisposable(this.source.subscribe(new bd(a,b))),b},b}(fc),bd=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 jb(b,a),b.prototype.next=function(a){var b=new ub;this.g.add(b),ja(a)&&(a=rc(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()},jb(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}(_b);$b.mergeAll=function(){return new ad(this)},$b.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return ed([this,a])};var cd=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){if(a.pos<a.sources.length){var c=a.sources[a.pos++];ja(c)&&(c=rc(c));var d=new ub;a.subscription.setDisposable(d),d.setDisposable(c.subscribe(new dd(a,b)))}else a.o.onCompleted()}return jb(b,a),b.prototype.subscribeCore=function(a){var b=new vb,d={pos:0,subscription:b,o:a,sources:this.sources},e=Gb.scheduleRecursive(d,c);return new wb(b,e)},b}(fc),dd=function(a){function b(b,c){this._state=b,this._recurse=c,a.call(this)}return jb(b,a),b.prototype.next=function(a){this._state.o.onNext(a)},b.prototype.error=function(){this._recurse(this._state)},b.prototype.completed=function(){this._recurse(this._state)},b}(_b),ed=ec.onErrorResumeNext=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 cd(a)},fd=function(a){function b(b,c){this._s=b,this._o=ja(c)?rc(c):c,this._open=!1,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){var b=new ub;b.setDisposable(this._s.subscribe(new gd(a,this))),ja(this._o)&&(this._o=rc(this._o));var c=new ub;return c.setDisposable(this._o.subscribe(new hd(a,this,c))),new wb(b,c)},b}(fc),gd=function(a){function b(b,c){this._o=b,this._p=c,a.call(this)}return jb(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}(_b),hd=function(a){function b(b,c,d){this._o=b,this._p=c,this._r=d,a.call(this)}return jb(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}(_b);$b.skipUntil=function(a){return new fd(this,a)};var id=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,_b.call(this)}function d(a,b){this.parent=a,this.id=b,_b.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){var b=new vb,d=this.source.subscribe(new c(a,b));return new wb(d,b)},jb(c,_b),c.prototype.next=function(a){var b=new ub,c=++this.latest;this.hasLatest=!0,this.inner.setDisposable(b),ja(a)&&(a=rc(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()},jb(d,_b),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}(fc);$b["switch"]=$b.switchLatest=function(){return new id(this)};var jd=function(a){function b(b,c){this.source=b,this.other=ja(c)?rc(c):c,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return new wb(this.source.subscribe(a),this.other.subscribe(new kd(a)))},b}(fc),kd=function(a){function b(b){this._o=b,a.call(this)}return jb(b,a),b.prototype.next=function(){this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.onCompleted=da,b}(_b);$b.takeUntil=function(a){return new jd(this,a)};var ld=function(a){function b(b,c,d){this._s=b,this._ss=c,this._cb=d,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){for(var b=this._ss.length,c={hasValue:u(b,K),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 ub;ja(g)&&(g=rc(g)),h.setDisposable(g.subscribe(new md(a,f,c))),e[f]=h}var i=new ub;return i.setDisposable(this._s.subscribe(new nd(a,this._cb,c))),e[d]=i,new xb(e)},b}(fc),md=function(a){function b(b,c,d){this._o=b,this._i=c,this._state=d,a.call(this)}return jb(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(ea)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=da,b}(_b),nd=function(a){function b(b,c,d){this._o=b,this._cb=c,this._state=d,a.call(this)}return jb(b,a),b.prototype.next=function(a){var b=[a].concat(this._state.values);if(this._state.hasValueAll){var c=ma(this._cb).apply(null,b);return c===la?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}(_b);$b.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=ka(b[a-1])?b.pop():L;return Array.isArray(b[0])&&(b=b[0]),new ld(this,b,d)};var od=function(a){function b(b,c){this._s=b,this._cb=c,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){for(var b=this._s.length,c=new Array(b),d=u(b,K),e=u(b,M),f=0;b>f;f++){var g=this._s[f],h=new ub;c[f]=h,ja(g)&&(g=rc(g)),h.setDisposable(g.subscribe(new pd(a,f,this,e,d)))}return new xb(c)},b}(fc),pd=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 jb(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=ma(this._p._cb).apply(null,b);if(f===la)return this._o.onError(f.e);this._o.onNext(f)}else this._d.filter(e(this._i)).every(ea)&&this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._d[this._i]=!0,this._d.every(ea)&&this._o.onCompleted()},b}(_b);$b.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=ka(b[a-1])?b.pop():L;Array.isArray(b[0])&&(b=b[0]);var e=this;return b.unshift(e),new od(b,d)},ec.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=ka(b[1])?b[0].concat(b[1]):b[0]);var d=b.shift();return d.zip.apply(d,b)};var qd=function(a){function b(b,c){this.sources=b,this._cb=c,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){for(var b=this.sources,c=b.length,d=new Array(c),e={q:u(c,M),done:u(c,K),cb:this._cb,o:a},f=0;c>f;f++)!function(a){var c=b[a],f=new ub;(Ba(c)||Aa(c))&&(c=zc(c)),d[a]=f,f.setDisposable(c.subscribe(new rd(e,a)))}(f);return new xb(d)},b}(fc),rd=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 jb(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=ma(this._s.cb).apply(null,b);if(f===la)return this._s.o.onError(f.e);this._s.o.onNext(f)}else this._s.done.filter(e(this._i)).every(ea)&&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(ea)&&this._s.o.onCompleted()},b}(_b);$b.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=ka(b[a-1])?b.pop():L,e=this;return b.unshift(e),new qd(b,d)},$b.asObservable=function(){return new Vd(N(this),this)},$b.bufferWithCount=$b.bufferCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).flatMap(O).filter(P)};var sd=function(a){function b(b){this.source=b,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new td(a))},b}(fc),td=function(a){function b(b){this._o=b,a.call(this)}return jb(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}(_b);$b.dematerialize=function(){return new sd(this)};var ud=function(a){function b(b,c,d){this.source=b,this.keyFn=c,this.comparer=d,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new vd(a,this.keyFn,this.comparer))},b}(fc),vd=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 jb(b,a),b.prototype.next=function(a){var b,c=a;return ka(this.keyFn)&&(c=ma(this.keyFn)(a),c===la)?this.o.onError(c.e):this.hasCurrentKey&&(b=ma(this.comparer)(this.currentKey,c),b===la)?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}(_b);$b.distinctUntilChanged=function(a,b){return b||(b=ga),new ud(this,a,b)};var wd=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||ka(b._oN)?Zb(b._oN||da,b._oE||da,b._oC||da):b._oN,this.isStopped=!1,_b.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this))},jb(c,_b),c.prototype.next=function(a){var b=ma(this.t.onNext).call(this.t,a);b===la&&this.o.onError(b.e),this.o.onNext(a)},c.prototype.error=function(a){var b=ma(this.t.onError).call(this.t,a);return b===la?this.o.onError(b.e):void this.o.onError(a)},c.prototype.completed=function(){var a=ma(this.t.onCompleted).call(this.t);return a===la?this.o.onError(a.e):void this.o.onCompleted()},b}(fc);$b["do"]=$b.tap=$b.doAction=function(a,b,c){return new wd(this,a,b,c)},$b.doOnNext=$b.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},$b.doOnError=$b.tapOnError=function(a,b){return this.tap(da,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},$b.doOnCompleted=$b.tapOnCompleted=function(a,b){return this.tap(da,null,"undefined"!=typeof b?function(){a.call(b)}:a)};var xd=function(a){function b(b,c,d){this.source=b,this._fn=Ca(c,d,0),a.call(this)}function c(a,b){this.isDisposed=!1,this._s=a,this._fn=b}return jb(b,a),b.prototype.subscribeCore=function(a){var b=ma(this.source.subscribe).call(this.source,a);return b===la&&(this._fn(),e(b.e)),new c(b,this._fn)},c.prototype.dispose=function(){if(!this.isDisposed){var a=ma(this._s.dispose).call(this._s);this._fn(),a===la&&e(a.e)}},b}(fc);$b["finally"]=function(a,b){return new xd(this,a,b)};var yd=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.isStopped=!1}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},c.prototype.onNext=da,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}(fc);$b.ignoreElements=function(){return new yd(this)};var zd=function(a){function b(b,c){this.source=b,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Ad(a))},b}(fc),Ad=function(a){function b(b){this._o=b,a.call(this)}return jb(b,a),b.prototype.next=function(a){this._o.onNext(Vb(a))},b.prototype.error=function(a){this._o.onNext(Wb(a)),this._o.onCompleted()},b.prototype.completed=function(){this._o.onNext(Xb()),this._o.onCompleted()},b}(_b);$b.materialize=function(){return new zd(this)},$b.repeat=function(a){return lc(this,a).concat()},$b.retry=function(a){return lc(this,a).catchError()};var Bd=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 jb(c,a),c.prototype.subscribeCore=function(a){var c,d=new Yd,e=new Yd,f=this._notifier(d),g=f.subscribe(e),h=this.source["@@iterator"](),i={isDisposed:!1},j=new vb,k=Ib.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;ja(k)&&(k=rc(k));var l=new ub,m=new ub;j.setDisposable(new wb(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 xb([g,j,k,b(i)])},c}(fc);$b.retryWhen=function(a){return new Bd(Q(this),a)};var Cd=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 jb(c,a),c.prototype.subscribeCore=function(a){var c,d=new Yd,e=new Yd,f=this._notifier(d),g=f.subscribe(e),h=this.source["@@iterator"](),i={isDisposed:!1},j=new vb,k=Ib.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;ja(k)&&(k=rc(k));var l=new ub,m=new ub;j.setDisposable(new wb(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 xb([g,j,k,b(i)])},c}(fc);$b.repeatWhen=function(a){return new Cd(Q(this),a)};var Dd=function(a){function b(b,c,d,e){this.source=b,this.accumulator=c,this.hasSeed=d,this.seed=e,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Ed(a,this))},b}(fc),Ed=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 jb(b,a),b.prototype.next=function(a){return!this._hv&&(this._hv=!0),this._ha?this._a=ma(this._fn)(this._a,a,this._i,this._p):(this._a=this._hs?ma(this._fn)(this._s,a,this._i,this._p):a,this._ha=!0),this._a===la?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}(_b);$b.scan=function(){var a,b=!1,c=arguments[0];return 2===arguments.length&&(b=!0,a=arguments[1]),new Dd(this,c,b,a)};var Fd=function(a){function b(b,c){this.source=b,this._c=c,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Gd(a,this._c))},b}(fc),Gd=function(a){function b(b,c){this._o=b,this._c=c,this._q=[],a.call(this)}return jb(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}(_b);$b.skipLast=function(a){if(0>a)throw new ua;return new Fd(this,a)},$b.startWith=function(){var a,b=0;arguments.length&&Cb(arguments[0])?(a=arguments[0],b=1):a=Gb;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return Vc.apply(null,[Bc(c,a),this])};var Hd=function(a){function b(b,c){this._o=b,this._c=c,this._q=[],a.call(this)}return jb(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}(_b);$b.takeLast=function(a){if(0>a)throw new ua;var b=this;return new Vd(function(c){return b.subscribe(new Hd(c,a))},b)};var Id=function(a){function b(b,c){this._o=b,this._c=c,this._q=[],a.call(this)}return jb(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(){this._o.onNext(this._q),this._o.onCompleted()},b}(_b);$b.takeLastBuffer=function(a){if(0>a)throw new ua;var b=this;return new Vd(function(c){return b.subscribe(new Id(c,a))},b)},$b.windowWithCount=$b.windowCount=function(a,b){var c=this;if(+a||(a=0),Math.abs(a)===1/0&&(a=0),0>=a)throw new ua;if(null==b&&(b=a),+b||(b=0),Math.abs(b)===1/0&&(b=0),0>=b)throw new ua;return new Vd(function(d){function e(){var a=new Yd;i.push(a),d.onNext(lb(a,g))}var f=new ub,g=new yb(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g},c)},$b.flatMapConcat=$b.concatMap=function(a,b,c){return new gc(this,a,b,c).merge(1)},$b.concatMapObserver=$b.selectConcatObserver=function(a,b,c,d){var e=this,f=Ca(a,d,2),g=Ca(b,d,1),h=Ca(c,d,0);return new Vd(function(a){var b=0;return e.subscribe(function(c){var d;try{d=f(c,b++)}catch(e){return void a.onError(e)}ja(d)&&(d=rc(d)),a.onNext(d)},function(b){var c;try{c=g(b)}catch(d){return void a.onError(d)}ja(c)&&(c=rc(c)),a.onNext(c),a.onCompleted()},function(){var b;try{b=h()}catch(c){return void a.onError(c)}ja(b)&&(b=rc(b)),a.onNext(b),a.onCompleted()})},this).concatAll()};var Jd=function(a){function b(b,c){this._o=b,this._d=c,this._f=!1,a.call(this)}return jb(b,a),b.prototype.next=function(a){this._f=!0,this._o.onNext(a)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){!this._f&&this._o.onNext(this._d),this._o.onCompleted()},b}(_b);$b.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new Vd(function(a){return c.subscribe(new Jd(a,b));
},c)},S.prototype.push=function(a){var b=-1===R(this.set,a,this.comparer);return b&&this.set.push(a),b};var Kd=function(a){function b(b,c,d){this.source=b,this._keyFn=c,this._cmpFn=d,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Ld(a,this._keyFn,this._cmpFn))},b}(fc),Ld=function(a){function b(b,c,d){this._o=b,this._keyFn=c,this._h=new S(d),a.call(this)}return jb(b,a),b.prototype.next=function(a){var b=a;return ka(this._keyFn)&&(b=ma(this._keyFn)(a),b===la)?this._o.onError(b.e):void(this._h.push(b)&&this._o.onNext(a))},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(_b);$b.distinct=function(a,b){return b||(b=ga),new Kd(this,a,b)};var Md=function(a){function b(b,c,d){this.source=b,this.selector=Ca(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,_b.call(this)}return jb(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))},jb(d,_b),d.prototype.next=function(a){var b=ma(this.selector)(a,this.i++,this.source);return b===la?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}(fc);$b.map=$b.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)},$b.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(T(b,a))},$b.flatMapObserver=$b.selectManyObserver=function(a,b,c,d){var e=this;return new Vd(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}ja(c)&&(c=rc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}ja(c)&&(c=rc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}ja(a)&&(a=rc(a)),f.onNext(a),f.onCompleted()})},e).mergeAll()},$b.flatMap=$b.selectMany=$b.mergeMap=function(a,b,c){return new gc(this,a,b,c).mergeAll()},$b.flatMapLatest=$b.switchMap=function(a,b,c){return new gc(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,_b.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this._count))},jb(c,_b),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}(fc);$b.skip=function(a){if(0>a)throw new ua;return new Nd(this,a)};var Od=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Pd(a,this))},b}(fc),Pd=function(a){function b(b,c){this._o=b,this._p=c,this._i=0,this._r=!1,a.call(this)}return jb(b,a),b.prototype.next=function(a){if(!this._r){var b=ma(this._p._fn)(a,this._i++,this._p);if(b===la)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}(_b);$b.skipWhile=function(a,b){var c=Ca(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,_b.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this._count))},jb(c,_b),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}(fc);$b.take=function(a,b){if(0>a)throw new ua;return 0===a?wc(b):new Qd(this,a)};var Rd=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Sd(a,this))},b}(fc),Sd=function(a){function b(b,c){this._o=b,this._p=c,this._i=0,this._r=!0,a.call(this)}return jb(b,a),b.prototype.next=function(a){return this._r&&(this._r=ma(this._p._fn)(a,this._i++,this._p),this._r===la)?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}(_b);$b.takeWhile=function(a,b){var c=Ca(a,b,3);return new Rd(this,c)};var Td=function(a){function b(b,c,d){this.source=b,this.predicate=Ca(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,_b.call(this)}return jb(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)},jb(d,_b),d.prototype.next=function(a){var b=ma(this.predicate)(a,this.i++,this.source);return b===la?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}(fc);$b.filter=$b.where=function(a,b){return this instanceof Td?this.internalFilter(a,b):new Td(this,a,b)};var Ud=function(a){function b(b,c){this._o=b,this._xform=c,a.call(this)}return jb(b,a),b.prototype.next=function(a){var b=ma(this._xform["@@transducer/step"]).call(this._xform,this._o,a);b===la&&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}(_b);$b.transduce=function(a){var b=this;return new Vd(function(c){var d=a(U(c));return b.subscribe(new Ud(c,d))},b)};var Vd=ca.AnonymousObservable=function(a){function b(a){return a&&ka(a.dispose)?a:ka(a)?pb(a):qb}function c(a,c){var d=c[0],f=c[1],g=ma(f.__subscribe).call(f,d);g!==la||d.fail(la.e)||e(la.e),d.setDisposable(b(g))}function d(b,c){this.source=c,this.__subscribe=b,a.call(this)}return jb(d,a),d.prototype._subscribe=function(a){var b=new Wd(a),d=[b,this];return Ib.scheduleRequired()?Ib.schedule(d,c):c(null,d),b},d}(ec),Wd=function(a){function b(b){a.call(this),this.observer=b,this.m=new ub}jb(b,a);var c=b.prototype;return c.next=function(a){var b=ma(this.observer.onNext).call(this.observer,a);b===la&&(this.dispose(),e(b.e))},c.error=function(a){var b=ma(this.observer.onError).call(this.observer,a);this.dispose(),b===la&&e(b.e)},c.completed=function(){var a=ma(this.observer.onCompleted).call(this.observer);this.dispose(),a===la&&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}(_b),Xd=function(a,b){this._s=a,this._o=b};Xd.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 Yd=ca.Subject=function(a){function b(){a.call(this),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return jb(b,a),kb(b.prototype,Yb.prototype,{_subscribe:function(a){return sb(this),this.isStopped?this.hasError?(a.onError(this.error),qb):(a.onCompleted(),qb):(this.observers.push(a),new Xd(this,a))},hasObservers:function(){return sb(this),this.observers.length>0},onCompleted:function(){if(sb(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(sb(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(sb(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 Zd(a,b)},b}(ec),Zd=(ca.AsyncSubject=function(a){function b(){a.call(this),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return jb(b,a),kb(b.prototype,Yb.prototype,{_subscribe:function(a){return sb(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),qb):(this.observers.push(a),new Xd(this,a))},hasObservers:function(){return sb(this),this.observers.length>0},onCompleted:function(){var a,b;if(sb(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(sb(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){sb(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.error=null,this.value=null}}),b}(ec),ca.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this)}return jb(b,a),kb(b.prototype,Yb.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}(ec));"function"==typeof define&&"object"==typeof define.amd&&define.amd?(ba.Rx=ca,define(function(){return ca})):W&&X?_?(X.exports=ca).Rx=ca:W.Rx=ca:ba.Rx=ca;var $d=j()}).call(this);
//# sourceMappingURL=rx.map