@testim/testim-cli
Version:
Command line interface for running Testing on you CI
3 lines • 116 kB
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){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function c(a,b){if(Ma&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(Qa)){for(var c=[],e=b;e;e=e.source)e.stack&&c.unshift(e.stack);c.unshift(a.stack);var f=c.join("\n"+Qa+"\n");a.stack=d(f)}}function d(a){for(var b=a.split("\n"),c=[],d=0,g=b.length;g>d;d++){var h=b[d];e(h)||f(h)||!h||c.push(h)}return c.join("\n")}function e(a){var b=h(a);if(!b)return!1;var c=b[0],d=b[1];return c===Oa&&d>=Pa&&Nd>=d}function f(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function g(){if(Ma)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=h(c);if(!d)return;return Oa=d[0],d[1]}}function h(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function i(a){var b=[];if(!xb(a))return b;wb.nonEnumArgs&&a.length&&yb(a)&&(a=Bb.call(a));var c=wb.enumPrototypes&&"function"==typeof a,d=wb.enumErrorProps&&(a===rb||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(wb.nonEnumShadows&&a!==sb){var f=a.constructor,g=-1,h=db;if(a===(f&&f.prototype))var i=a===tb?nb:a===rb?ib:ob.call(a),j=vb[i];for(;++g<h;)e=cb[g],j&&j[e]||!pb.call(a,e)||b.push(e)}return b}function j(a,b,c){for(var d=-1,e=c(a),f=e.length;++d<f;){var g=e[d];if(b(a[g],g,a)===!1)break}return a}function k(a,b){return j(a,b,i)}function l(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function m(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,f=typeof b;if(a===a&&(null==a||null==b||"function"!=e&&"object"!=e&&"function"!=f&&"object"!=f))return!1;var g=ob.call(a),h=ob.call(b);if(g==eb&&(g=lb),h==eb&&(h=lb),g!=h)return!1;switch(g){case gb:case hb:return+a==+b;case kb:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case mb:case nb:return a==String(b)}var i=g==fb;if(!i){if(g!=lb||!wb.nodeClass&&(l(a)||l(b)))return!1;var j=!wb.argsObject&&yb(a)?Object:a.constructor,n=!wb.argsObject&&yb(b)?Object:b.constructor;if(!(j==n||pb.call(a,"constructor")&&pb.call(b,"constructor")||La(j)&&j instanceof j&&La(n)&&n instanceof n||!("constructor"in a&&"constructor"in b)))return!1}c||(c=[]),d||(d=[]);for(var o=c.length;o--;)if(c[o]==a)return d[o]==b;var p=0,q=!0;if(c.push(a),d.push(b),i){if(o=a.length,p=b.length,q=p==o)for(;p--;){var r=b[p];if(!(q=m(a[p],r,c,d)))break}}else k(b,function(b,e,f){return pb.call(f,e)?(p++,q=pb.call(a,e)&&m(a[e],b,c,d)):void 0}),q&&k(a,function(a,b,c){return pb.call(c,b)?q=--p>-1:void 0});return c.pop(),d.pop(),q}function n(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function o(){try{return zb.apply(this,arguments)}catch(a){return Fb.e=a,Fb}}function p(a){if(!La(a))throw new TypeError("fn must be a function");return zb=a,o}function q(a){throw a}function r(a,b){this.id=a,this.value=b}function t(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function u(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function v(a){this._s=s}function w(a){this._s=s,this._l=s.length,this._i=0}function x(a){this._a=a}function y(a){this._a=a,this._l=C(a),this._i=0}function z(a){return"number"==typeof a&&xa.isFinite(a)}function A(b){var c,d=b[Ya];if(!d&&"string"==typeof b)return c=new v(b),c[Ya]();if(!d&&b.length!==a)return c=new x(b),c[Ya]();if(!d)throw new TypeError("Object is not iterable");return b[Ya]()}function B(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function C(a){var b=+a.length;return isNaN(b)?0:0!==b&&z(b)?(b=B(b)*Math.floor(Math.abs(b)),0>=b?0:b>Hc?Hc:b):b}function D(a,b){this.observer=a,this.parent=b}function E(a,b){return Vb(a)||(a=$b),new Jc(b,a)}function F(a,b){this.observer=a,this.parent=b}function G(a,b){this.observer=a,this.parent=b}function H(a,b){return new Hd(function(c){var d=new Pb,e=new Qb;return e.setDisposable(d),d.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){try{var d=b(a)}catch(f){return c.onError(f)}Ja(d)&&(d=Ac(d));var g=new Pb;e.setDisposable(g),g.setDisposable(d.subscribe(c))},function(a){c.onCompleted(a)})),e},a)}function I(){return!1}function J(a,b){var c=this;return new Hd(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g=a[e++],h=p(b)(c,g);if(h===Fb)return d.onError(h.e);d.onNext(h)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function I(){return!1}function K(){return[]}function I(){return!1}function L(){return[]}function M(a,b){this.observer=a,this.accumulator=b.accumulator,this.hasSeed=b.hasSeed,this.seed=b.seed,this.hasAccumulation=!1,this.accumulation=null,this.hasValue=!1,this.isStopped=!1}function N(a,b,c){var d=bb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Ja(e)&&(e=Ac(e)),(_a(e)||$a(e))&&(e=Ic(e)),e}).concatAll()}function O(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function P(a){this.comparer=a,this.set=[]}function Q(a,b,c){var d=bb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Ja(e)&&(e=Ac(e)),(_a(e)||$a(e))&&(e=Ic(e)),e}).mergeAll()}function R(a,b,c){return new Hd(function(d){var e=!1,f=null,g=[];return a.subscribe(function(a){var h,i;try{i=b(a)}catch(j){return void d.onError(j)}if(h=0,e)try{h=c(i,f)}catch(k){return void d.onError(k)}else e=!0,f=i;h>0&&(f=i,g=[]),h>=0&&g.push(a)},function(a){d.onError(a)},function(){d.onNext(g),d.onCompleted()})},a)}function S(a){if(0===a.length)throw new Ra;return a[0]}function T(a,b,c,d){if(0>b)throw new Ta;return new Hd(function(e){var f=b;return a.subscribe(function(a){0===f--&&(e.onNext(a),e.onCompleted())},function(a){e.onError(a)},function(){c?(e.onNext(d),e.onCompleted()):e.onError(new Ta)})},a)}function U(a,b,c){return new Hd(function(d){var e=c,f=!1;return a.subscribe(function(a){f?d.onError(new Error("Sequence contains more than one element")):(e=a,f=!0)},function(a){d.onError(a)},function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Ra)})},a)}function V(a,b,c){return new Hd(function(d){return a.subscribe(function(a){d.onNext(a),d.onCompleted()},function(a){d.onError(a)},function(){b?(d.onNext(c),d.onCompleted()):d.onError(new Ra)})},a)}function W(a,b,c){return new Hd(function(d){var e=c,f=!1;return a.subscribe(function(a){e=a,f=!0},function(a){d.onError(a)},function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Ra)})},a)}function X(b,c,d,e){var f=bb(c,d,3);return new Hd(function(c){var d=0;return b.subscribe(function(a){var g;try{g=f(a,d,b)}catch(h){return void c.onError(h)}g?(c.onNext(e?d:a),c.onCompleted()):d++},function(a){c.onError(a)},function(){c.onNext(e?-1:a),c.onCompleted()})},b)}function Y(a,b){return Array.isArray(a)?Z.call(b,a):ba(a)?nd(a.call(b)):ca(a)?nd(a):aa(a)?$(a):Ja(a)?_(a):typeof a===ld?a:xb(a)||Array.isArray(a)?Z.call(b,a):a}function Z(a){var b=this;return function(c){function d(a,d){if(!e)try{if(a=Y(a,b),typeof a!==ld)return h[d]=a,--g||c(null,h);a.call(b,function(a,b){if(!e){if(a)return e=!0,c(a);h[d]=b,--g||c(null,h)}})}catch(f){e=!0,c(f)}}var e,f=Object.keys(a),g=f.length,h=new a.constructor;if(!g)return void cc.schedule(function(){c(null,h)});for(var i=0,j=f.length;j>i;i++)d(a[f[i]],f[i])}}function $(a){return function(b){var c,d=!1;a.subscribe(function(a){c=a,d=!0},b,function(){d&&b(null,c)})}}function _(a){return function(b){a.then(function(a){b(null,a)},b)}}function aa(a){return a&&typeof a.subscribe===ld}function ba(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function ca(a){return a&&typeof a.next===ld&&typeof a[md]===ld}function da(a){a&&cc.schedule(function(){throw a})}function ea(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),Lb(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function fa(a,b,c){var d=new Ib,e=Object.prototype.toString;if("[object NodeList]"===e.call(a)||"[object HTMLCollection]"===e.call(a))for(var f=0,g=a.length;g>f;f++)d.add(fa(a.item(f),b,c));else a&&d.add(ea(a,b,c));return d}function ga(a,b,c){return new Hd(function(d){function e(a,b){if(j[b]=a,g[b]=!0,h||(h=g.every(Ea))){if(f)return d.onError(f);var e=p(c).apply(null,j);if(e===Fb)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 Ib(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 ha(a,b){return a.groupJoin(this,b,Ec,function(a,b){return b})}function ia(a){var b=this;return new Hd(function(c){var d=new Kd,e=new Ib,f=new Rb(e);return c.onNext(Eb(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),Ja(a)&&(a=Ac(a)),e.add(a.subscribe(function(a){d.onCompleted(),d=new Kd,c.onNext(Eb(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f},b)}function ja(a){var b=this;return new Hd(function(c){function d(){var b;try{b=a()}catch(f){return void c.onError(f)}Ja(b)&&(b=Ac(b));var i=new Pb;e.setDisposable(i),i.setDisposable(b.take(1).subscribe(Da,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new Kd,c.onNext(Eb(h,g)),d()}))}var e=new Qb,f=new Ib(e),g=new Rb(f),h=new Kd;return c.onNext(Eb(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d(),g},b)}function ka(a,b){return new Bd(a,b)}function la(a){this.patterns=a}function ma(a,b){this.expression=a,this.selector=b}function na(a,b,c){var d=a.get(b);if(!d){var e=new Fd(b,c);return a.set(b,e),e}return d}function oa(a,b,c){this.joinObserverArray=a,this.onNext=b,this.onCompleted=c,this.joinObservers=new Ed;for(var d=0,e=this.joinObserverArray.length;e>d;d++){var f=this.joinObserverArray[d];this.joinObservers.set(f,f)}}function pa(a,b){return new Hd(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function qa(a,b,c){return new Hd(function(d){var e=a,f=Ub(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function ra(a,b){return new Hd(function(c){return b.scheduleWithRelative(Ub(a),function(){c.onNext(0),c.onCompleted()})})}function sa(a,b,c){return a===b?new Hd(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):Cc(function(){return qa(c.now()+a,b,c)})}function ta(a,b,c){return new Hd(function(d){var e,f=!1,g=new Qb,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new Pb,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new Ib(e,g)},a)}function ua(a,b,c){return Cc(function(){return ta(a,b-c.now(),c)})}function va(a,b){return new Hd(function(c){function d(){g&&(g=!1,c.onNext(e)),f&&c.onCompleted()}var e,f=!1,g=!1,h=new Pb;return h.setDisposable(a.subscribe(function(a){g=!0,e=a},function(a){c.onError(a)},function(){f=!0,h.dispose()})),new Ib(h,b.subscribe(d,function(a){c.onError(a)},d))},a)}var wa={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},xa=wa[typeof window]&&window||this,ya=wa[typeof exports]&&exports&&!exports.nodeType&&exports,za=wa[typeof module]&&module&&!module.nodeType&&module,Aa=za&&za.exports===ya&&ya,Ba=wa[typeof global]&&global;!Ba||Ba.global!==Ba&&Ba.window!==Ba||(xa=Ba);var Ca={internals:{},config:{Promise:xa.Promise},helpers:{}},Da=Ca.helpers.noop=function(){},Ea=(Ca.helpers.notDefined=function(a){return"undefined"==typeof a},Ca.helpers.identity=function(a){return a}),Fa=(Ca.helpers.pluck=function(a){return function(b){return b[a]}},Ca.helpers.just=function(a){return function(){return a}},Ca.helpers.defaultNow=Date.now),Ga=Ca.helpers.defaultComparer=function(a,b){return Ab(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.asArray=function(){return Array.prototype.slice.call(arguments)},Ca.helpers.not=function(a){return!a}),La=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]"==ob.call(a)}),a}();Ca.config.longStackSupport=!1;var Ma=!1;try{throw new Error}catch(Na){Ma=!!Na.stack}var Oa,Pa=g(),Qa="From previous event:",Ra=Ca.EmptyError=function(){this.message="Sequence contains no elements.",Error.call(this)};Ra.prototype=Error.prototype;var Sa=Ca.ObjectDisposedError=function(){this.message="Object has been disposed",Error.call(this)};Sa.prototype=Error.prototype;var Ta=Ca.ArgumentOutOfRangeError=function(){this.message="Argument out of range",Error.call(this)};Ta.prototype=Error.prototype;var Ua=Ca.NotSupportedError=function(a){this.message=a||"This operation is not supported",Error.call(this)};Ua.prototype=Error.prototype;var Va=Ca.NotImplementedError=function(a){this.message=a||"This operation is not implemented",Error.call(this)};Va.prototype=Error.prototype;var Wa=Ca.helpers.notImplemented=function(){throw new Va},Xa=Ca.helpers.notSupported=function(){throw new Ua},Ya="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";xa.Set&&"function"==typeof(new xa.Set)["@@iterator"]&&(Ya="@@iterator");var Za=Ca.doneEnumerator={done:!0,value:a},$a=Ca.helpers.isIterable=function(b){return b[Ya]!==a},_a=Ca.helpers.isArrayLike=function(b){return b&&b.length!==a};Ca.helpers.iterator=Ya;var ab,bb=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)}},cb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],db=cb.length,eb="[object Arguments]",fb="[object Array]",gb="[object Boolean]",hb="[object Date]",ib="[object Error]",jb="[object Function]",kb="[object Number]",lb="[object Object]",mb="[object RegExp]",nb="[object String]",ob=Object.prototype.toString,pb=Object.prototype.hasOwnProperty,qb=ob.call(arguments)==eb,rb=Error.prototype,sb=Object.prototype,tb=String.prototype,ub=sb.propertyIsEnumerable;try{ab=!(ob.call(document)==lb&&!({toString:0}+""))}catch(Na){ab=!0}var vb={};vb[fb]=vb[hb]=vb[kb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},vb[gb]=vb[nb]={constructor:!0,toString:!0,valueOf:!0},vb[ib]=vb[jb]=vb[mb]={constructor:!0,toString:!0},vb[lb]={constructor:!0};var wb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);wb.enumErrorProps=ub.call(rb,"message")||ub.call(rb,"name"),wb.enumPrototypes=ub.call(a,"prototype"),wb.nonEnumArgs=0!=c,wb.nonEnumShadows=!/valueOf/.test(b)}(1);var xb=Ca.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},yb=function(a){return a&&"object"==typeof a?ob.call(a)==eb:!1};qb||(yb=function(a){return a&&"object"==typeof a?pb.call(a,"callee"):!1});var zb,Ab=Ca.internals.isEqual=function(a,b){return m(a,b,[],[])},Bb=({}.hasOwnProperty,Array.prototype.slice),Cb=this.inherits=Ca.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},Db=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]}},Eb=Ca.internals.addRef=function(a,b){return new Hd(function(c){return new Ib(b.getDisposable(),a.subscribe(c))})},Fb={e:{}};r.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Gb=Ca.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Hb=Gb.prototype;Hb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Hb.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)}}},Hb.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)}}},Hb.peek=function(){return this.items[0].value},Hb.removeAt=function(b){this.items[b]=this.items[--this.length],this.items[this.length]=a,this.heapify()},Hb.dequeue=function(){var a=this.peek();return this.removeAt(0),a},Hb.enqueue=function(a){var b=this.length++;this.items[b]=new r(Gb.count++,a),this.percolate(b)},Hb.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},Gb.count=0;var Ib=Ca.CompositeDisposable=function(){var a,b,c=[];if(Array.isArray(arguments[0]))c=arguments[0],b=c.length;else for(b=arguments.length,c=new Array(b),a=0;b>a;a++)c[a]=arguments[a];for(a=0;b>a;a++)if(!Nb(c[a]))throw new TypeError("Not a disposable");this.disposables=c,this.isDisposed=!1,this.length=c.length},Jb=Ib.prototype;Jb.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},Jb.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},Jb.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 Kb=Ca.Disposable=function(a){this.isDisposed=!1,this.action=a||Da};Kb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Lb=Kb.create=function(a){return new Kb(a)},Mb=Kb.empty={dispose:Da},Nb=Kb.isDisposable=function(a){return a&&La(a.dispose)},Ob=Kb.checkDisposed=function(a){if(a.isDisposed)throw new Sa},Pb=Ca.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null};Pb.prototype.getDisposable=function(){return this.current},Pb.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()},Pb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var Qb=Ca.SerialDisposable=function(){this.isDisposed=!1,this.current=null};Qb.prototype.getDisposable=function(){return this.current},Qb.prototype.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},Qb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var Rb=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?Mb:new a(this)},b}();t.prototype.dispose=function(){this.scheduler.scheduleWithState(this,u)};var Sb=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 Pb};Sb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Sb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Sb.prototype.isCancelled=function(){return this.disposable.isDisposed},Sb.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Tb=Ca.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),Mb}a.isScheduler=function(b){return b instanceof a};var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=Fa,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Ub=Tb.normalize,Vb=Tb.isScheduler;!function(a){function b(a,b){function c(b){e(b,function(b){var d=!1,e=!1,g=a.scheduleWithState(b,function(a,b){return d?f.remove(g):e=!0,c(b),Mb});e||(f.add(g),d=!0)})}var d=b[0],e=b[1],f=new Ib;return c(d),f}function c(a,b,c){function d(b){f(b,function(b,e){var f=!1,h=!1,i=a[c](b,e,function(a,b){return f?g.remove(i):h=!0,d(b),Mb});h||(g.add(i),f=!0)})}var e=b[0],f=b[1],g=new Ib;return d(e),g}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,d)},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState([a,c],b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative([a,d],b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute([a,d],b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(Tb.prototype),function(a){Tb.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Tb.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof xa.setInterval)throw new Ua;b=Ub(b);var d=a,e=xa.setInterval(function(){d=c(d)},b);return Lb(function(){xa.clearInterval(e)})}}(Tb.prototype),function(a){a.catchError=a["catch"]=function(a){return new dc(this,a)}}(Tb.prototype);var Wb,Xb,Yb=Ca.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new Pb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),Zb=Tb.immediate=function(){function a(a,b){return b(this,a)}return new Tb(Fa,a,Xa,Xa)}(),$b=Tb.currentThread=function(){function a(){for(;c.length>0;){var a=c.dequeue();!a.isCancelled()&&a.invoke()}}function b(b,d){var e=new Sb(this,b,d,this.now());if(c)c.enqueue(e);else{c=new Gb(4),c.enqueue(e);var f=p(a)();if(c=null,f===Fb)return q(f.e)}return e.disposable}var c,d=new Tb(Fa,b,Xa,Xa);return d.scheduleRequired=function(){return!c},d}(),_b=function(){var a,b=Da;if(xa.setTimeout)a=xa.setTimeout,b=xa.clearTimeout;else{if(!xa.WScript)throw new Ua;a=function(a,b){xa.WScript.Sleep(b),a()}}return{setTimeout:a,clearTimeout:b}}(),ac=_b.setTimeout,bc=_b.clearTimeout;!function(){function a(b){if(f)ac(function(){a(b)},0);else{var c=e[b];if(c){f=!0;var d=p(c)();if(Xb(b),f=!1,d===Fb)return q(d.e)}}}function b(){if(!xa.postMessage||xa.importScripts)return!1;var a=!1,b=xa.onmessage;return xa.onmessage=function(){a=!0},xa.postMessage("","*"),xa.onmessage=b,a}function c(b){"string"==typeof b.data&&b.data.substring(0,i.length)===i&&a(b.data.substring(i.length))}var d=1,e={},f=!1;Xb=function(a){delete e[a]};var g=RegExp("^"+String(ob).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),h="function"==typeof(h=Ba&&Aa&&Ba.setImmediate)&&!g.test(h)&&h;if(La(h))Wb=function(b){var c=d++;return e[c]=b,h(function(){a(c)}),c};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Wb=function(b){var c=d++;return e[c]=b,process.nextTick(function(){a(c)}),c};else if(b()){var i="ms.rx.schedule"+Math.random();xa.addEventListener?xa.addEventListener("message",c,!1):xa.attachEvent?xa.attachEvent("onmessage",c):xa.onmessage=c,Wb=function(a){var b=d++;return e[b]=a,xa.postMessage(i+currentId,"*"),b}}else if(xa.MessageChannel){var j=new xa.MessageChannel;j.port1.onmessage=function(b){a(b.data)},Wb=function(a){var b=d++;return e[b]=a,j.port2.postMessage(b),b}}else Wb="document"in xa&&"onreadystatechange"in xa.document.createElement("script")?function(b){var c=xa.document.createElement("script"),f=d++;return e[f]=b,c.onreadystatechange=function(){a(f),c.onreadystatechange=null,c.parentNode.removeChild(c),c=null},xa.document.documentElement.appendChild(c),f}:function(b){var c=d++;return e[c]=b,ac(function(){a(c)},0),c}}();var cc=Tb.timeout=Tb["default"]=function(){function a(a,b){var c=this,d=new Pb,e=Wb(function(){!d.isDisposed&&d.setDisposable(b(c,a))});return new Ib(d,Lb(function(){Xb(e)}))}function b(a,b,c){var d=this,e=Tb.normalize(b),f=new Pb;if(0===e)return d.scheduleWithState(a,c);var g=ac(function(){!f.isDisposed&&f.setDisposable(c(d,a))},e);return new Ib(f,Lb(function(){bc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Tb(Fa,a,b,c)}(),dc=function(a){function b(a,b){return this._scheduler.scheduleWithState(a,this._wrap(b))}function c(a,b,c){return this._scheduler.scheduleWithRelativeAndState(a,b,this._wrap(c))}function d(a,b,c){return this._scheduler.scheduleWithAbsoluteAndState(a,b,this._wrap(c))}function e(e,f){this._scheduler=e,this._handler=f,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this,this._scheduler.now.bind(this._scheduler),b,c,d)}return Cb(e,a),e.prototype._clone=function(a){return new e(a,this._handler)},e.prototype._wrap=function(a){var b=this;return function(c,d){try{return a(b._getRecursiveWrapper(c),d)}catch(e){if(!b._handler(e))throw e;return Mb}}},e.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},e.prototype.schedulePeriodicWithState=function(a,b,c){var d=this,e=!1,f=new Pb;return f.setDisposable(this._scheduler.schedulePeriodicWithState(a,b,function(a){if(e)return null;try{return c(a)}catch(b){if(e=!0,!d._handler(b))throw b;return f.dispose(),null}})),f},e}(Tb),ec=Ca.Notification=function(){function a(a,b,c,d,e,f){this.kind=a,this.value=b,this.exception=c,this._accept=d,this._acceptObservable=e,this.toString=f}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return Vb(a)||(a=Zb),new Hd(function(c){return a.scheduleWithState(b,function(a,b){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),fc=ec.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){return new ec("N",d,null,a,b,c)}}(),gc=ec.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){return new ec("E",null,d,a,b,c)}}(),hc=ec.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){return new ec("C",null,null,a,b,c)}}(),ic=Ca.Observer=function(){};ic.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},ic.prototype.asObserver=function(){return new mc(this.onNext.bind(this),this.onError.bind(this),this.onCompleted.bind(this))},ic.prototype.checked=function(){return new nc(this)};var jc=ic.create=function(a,b,c){return a||(a=Da),b||(b=Ia),c||(c=Da),new mc(a,b,c)};ic.fromNotifier=function(a,b){return new mc(function(c){return a.call(b,fc(c))},function(c){return a.call(b,gc(c))},function(){return a.call(b,hc())})},ic.prototype.notifyOn=function(a){return new pc(a,this)},ic.prototype.makeSafe=function(a){return new AnonymousSafeObserver(this._onNext,this._onError,this._onCompleted,a)};var kc,lc=Ca.internals.AbstractObserver=function(a){function b(){this.isStopped=!1,a.call(this)}return Cb(b,a),b.prototype.next=Wa,b.prototype.error=Wa,b.prototype.completed=Wa,b.prototype.onNext=function(a){this.isStopped||this.next(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.error(a))},b.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}(ic),mc=Ca.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return Cb(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}(lc),nc=function(a){function b(b){a.call(this),this._observer=b,this._state=0}Cb(b,a);var c=b.prototype;return c.onNext=function(a){this.checkAccess();var b=p(this._observer.onNext).call(this._observer,a);this._state=0,b===Fb&&q(b.e)},c.onError=function(a){this.checkAccess();var b=p(this._observer.onError).call(this._observer,a);this._state=2,b===Fb&&q(b.e)},c.onCompleted=function(){this.checkAccess();var a=p(this._observer.onCompleted).call(this._observer);this._state=2,a===Fb&&q(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}(ic),oc=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 Qb}return Cb(b,a),b.prototype.next=function(a){var b=this;this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},b.prototype.ensureActive=function(){var a=!1,b=this;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(lc),pc=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return Cb(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}(oc),qc=Ca.Observable=function(){function a(a){if(Ca.config.longStackSupport&&Ma){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var d=this;this._subscribe=function(b){var e=b.onError.bind(b);return b.onError=function(a){c(a,d),e(a)},a.call(d,b)}}else this._subscribe=a}return kc=a.prototype,kc.subscribe=kc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:jc(a,b,c))},kc.subscribeOnNext=function(a,b){return this._subscribe(jc("undefined"!=typeof b?function(c){a.call(b,c)}:a))},kc.subscribeOnError=function(a,b){return this._subscribe(jc(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},kc.subscribeOnCompleted=function(a,b){return this._subscribe(jc(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),rc=Ca.ObservableBase=function(a){function b(a){return a&&La(a.dispose)?a:La(a)?Lb(a):Mb}function c(a,c){var d=c[0],e=c[1],f=p(e.subscribeCore).call(e,d);return f!==Fb||d.fail(Fb.e)?void d.setDisposable(b(f)):q(Fb.e)}function d(a){var b=new Id(a),d=[b,this];return $b.scheduleRequired()?$b.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return Cb(e,a),e.prototype.subscribeCore=Wa,e}(qc),sc=Ca.internals.Enumerable=function(){},tc=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b,c){this.o=a,this.s=b,this.e=c,this.isStopped=!1}return Cb(b,a),b.prototype.subscribeCore=function(a){var b,d=new Qb,e=Zb.scheduleRecursiveWithState(this.sources[Ya](),function(e,f){if(!b){var g=p(e.next).call(e);if(g===Fb)return a.onError(g.e);if(g.done)return a.onCompleted();var h=g.value;Ja(h)&&(h=Ac(h));var i=new Pb;d.setDisposable(i),i.setDisposable(h.subscribe(new c(a,f,e)))}});return new Ib(d,e,Lb(function(){b=!0}))},c.prototype.onNext=function(a){this.isStopped||this.o.onNext(a)},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.s(this.e))},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(rc);sc.prototype.concat=function(){return new tc(this)};var uc=function(a){function b(b){this.sources=b,a.call(this)}return Cb(b,a),b.prototype.subscribeCore=function(a){var b,c=this.sources[Ya](),d=new Qb,e=Zb.scheduleRecursiveWithState(null,function(e,f){if(!b){var g=p(c.next).call(c);if(g===Fb)return a.onError(g.e);if(g.done)return null!==e?a.onError(e):a.onCompleted();var h=g.value;Ja(h)&&(h=Ac(h));var i=new Pb;d.setDisposable(i),i.setDisposable(h.subscribe(function(b){a.onNext(b)},f,function(){a.onCompleted()}))}});return new Ib(d,e,Lb(function(){b=!0}))},b}(rc);sc.prototype.catchError=function(){return new uc(this)},sc.prototype.catchErrorWhen=function(a){var b=this;return new Hd(function(c){var d,e,f=new Kd,g=new Kd,h=a(f),i=h.subscribe(g),j=b[Ya](),k=new Qb,l=Zb.scheduleRecursive(function(a){if(!d){var b=p(j.next).call(j);if(b===Fb)return c.onError(b.e);if(b.done)return void(e?c.onError(e):c.onCompleted());var h=b.value;Ja(h)&&(h=Ac(h));var i=new Pb,l=new Pb;k.setDisposable(new Ib(l,i)),i.setDisposable(h.subscribe(function(a){c.onNext(a)},function(b){l.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new Ib(i,k,l,Lb(function(){d=!0}))})};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 Cb(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}(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?bb(b,c,3):null}function c(a){this.i=-1,this.s=a.s,this.l=this.s.length,this.fn=a.fn}return Cb(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}(sc),yc=sc.of=function(a,b,c){return new xc(a,b,c)};kc.observeOn=function(a){var b=this;return new Hd(function(c){return b.subscribe(new pc(a,c))},b)},kc.subscribeOn=function(a){var b=this;return new Hd(function(c){var d=new Pb,e=new Qb;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new t(a,b.subscribe(c)))})),e},b)};var zc=function(a){function b(b){this.p=b,a.call(this)}return Cb(b,a),b.prototype.subscribeCore=function(a){return this.p.then(function(b){a.onNext(b),a.onCompleted()},function(b){a.onError(b)}),Mb},b}(rc),Ac=qc.fromPromise=function(a){return new zc(a)};kc.toPromise=function(a){if(a||(a=Ca.config.Promise),!a)throw new Ua("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})};var Bc=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.a=[],this.isStopped=!1}return Cb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},c.prototype.onNext=function(a){this.isStopped||this.a.push(a)},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.onNext(this.a),this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(rc);kc.toArray=function(){return new Bc(this)},qc.create=qc.createWithDisposable=function(a,b){return new Hd(a,b)};var Cc=qc.defer=function(a){return new Hd(function(b){var c;try{c=a()}catch(d){return Tc(d).subscribe(b)}return Ja(c)&&(c=Ac(c)),c.subscribe(b)})},Dc=function(a){function b(b){this.scheduler=b,a.call(this)}function c(a,b){this.observer=a,this.parent=b}function d(a,b){b.onCompleted()}return Cb(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.parent.scheduler.scheduleWithState(this.observer,d)},b}(rc),Ec=qc.empty=function(a){return Vb(a)||(a=Zb),new Dc(a)},Fc=function(a){function b(b,c,d){this.iterable=b,this.mapper=c,this.scheduler=d,a.call(this)}return Cb(b,a),b.prototype.subscribeCore=function(a){var b=new Gc(a,this);return b.run()},b}(rc),Gc=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,b){try{var f=c.next()}catch(g){return d.onError(g)}if(f.done)return d.onCompleted();var h=f.value;if(e)try{h=e(h,a)}catch(g){return d.onError(g)}d.onNext(h),b(a+1)}var b=Object(this.parent.iterable),c=A(b),d=this.observer,e=this.parent.mapper;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}(),Hc=Math.pow(2,53)-1;v.prototype[Ya]=function(){return new w(this._s)},w.prototype[Ya]=function(){return this},w.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:Za},x.prototype[Ya]=function(){return new y(this._a)},y.prototype[Ya]=function(){return this},y.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:Za};var Ic=qc.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!La(b))throw new Error("mapFn when provided must be a function");if(b)var e=bb(b,c,2);return Vb(d)||(d=$b),new Fc(a,e,d)},Jc=function(a){function b(b,c){this.args=b,this.scheduler=c,a.call(this)}return Cb(b,a),b.prototype.subscribeCore=function(a){var b=new D(a,this);return b.run()},b}(rc);D.prototype.run=function(){function a(a,e){d>a?(b.onNext(c[a]),e(a+1)):b.onCompleted()}var b=this.observer,c=this.parent.args,d=c.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)};var Kc=qc.fromArray=function(a,b){return Vb(b)||(b=$b),new Jc(a,b)};qc.generate=function(a,b,c,d,e){return Vb(e)||(e=$b),new Hd(function(f){var g=!0;return e.scheduleRecursiveWithState(a,function(a,e){var h,i;try{g?g=!1:a=c(a),h=b(a),h&&(i=d(a))}catch(j){return f.onError(j)}h?(f.onNext(i),e(a)):f.onCompleted()})})},qc.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new Jc(b,$b)},qc.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)},qc.ofArrayChanges=function(a){if(!Array.isArray(a))throw new TypeError("Array.observe only accepts arrays.");if("function"!=typeof Array.observe&&"function"!=typeof Array.unobserve)throw new TypeError("Array.observe is not supported on your platform");return new Hd(function(b){function c(a){for(var c=0,d=a.length;d>c;c++)b.onNext(a[c])}return Array.observe(a,c),function(){Array.unobserve(a,c)}})},qc.ofObjectChanges=function(a){if(null==a)throw new TypeError("object must not be null or undefined.");if("function"!=typeof Object.observe&&"function"!=typeof Object.unobserve)throw new TypeError("Object.observe is not supported on your platform");return new Hd(function(b){function c(a){for(var c=0,d=a.length;d>c;c++)b.onNext(a[c])}return Object.observe(a,c),function(){Object.unobserve(a,c)}})};var Lc=function(a){function b(){a.call(this)}return Cb(b,a),b.prototype.subscribeCore=function(a){return Mb},b}(rc),Mc=qc.never=function(){return new Lc},Nc=function(a){function b(b,c){this.obj=b,this.keys=Object.keys(b),this.scheduler=c,a.call(this)}return Cb(b,a),b.prototype.subscribeCore=function(a){var b=new F(a,this);return b.run()},b}(rc);F.prototype.run=function(){function a(a,f){if(e>a){var g=d[a];b.onNext([g,c[g]]),f(a+1)}else b.onCompleted()}var b=this.observer,c=this.parent.obj,d=this.parent.keys,e=d.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},qc.pairs=function(a,b){return b||(b=$b),new Nc(a,b)};var Oc=function(a){function b(b,c,d){this.start=b,this.rangeCount=c,this.scheduler=d,a.call(this)}return Cb(b,a),b.prototype.subscribeCore=function(a){var b=new Pc(a,this);return b.run()},b}(rc),Pc=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,e){c>a?(d.onNext(b+a),e(a+1)):d.onCompleted()}var b=this.parent.start,c=this.parent.rangeCount,d=this.observer;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}();qc.range=function(a,b,c){return Vb(c)||(c=$b),new Oc(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 Cb(b,a),b.prototype.subscribeCore=function(a){var b=new G(a,this);return b.run()},b}(rc);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.scheduleRecursiveWithState(this.parent.repeatCount,a)},qc.repeat=function(a,b,c){return Vb(c)||(c=$b),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){this.observer=a,this.parent=b}function d(a,b){var c=b[0],d=b[1];d.onNext(c),d.onCompleted()}return Cb(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.parent.scheduler.scheduleWithState([this.parent.value,this.observer],d)},b}(rc),Sc=(qc["return"]=qc.just=qc.returnValue=function(a,b){return Vb(b)||(b=Zb),new Rc(a,b)},function(a){function b(b,c){this.error=b,this.scheduler=c,a.call(this)}function c(a,b){this.o=a,this.p=b}function d(a,b){var c=b[0],d=b[1];d.onError(c)}return Cb(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.p.scheduler.scheduleWithState([this.p.error,this.o],d)},b}(rc)),Tc=qc["throw"]=qc.throwError=qc.throwException=function(a,b){return Vb(b)||(b=Zb),new Sc(a,b)};qc.using=function(a,b){return new Hd(function(c){var d,e,f=Mb;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new Ib(Tc(g).subscribe(c),f)}return new Ib(e.subscribe(c),f)})},kc.amb=function(a){var b=this;return new Hd(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Pb,j=new Pb;return Ja(a)&&(a=Ac(a)),i.setDisposable(b.subscribe(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()})),j.setDisposable(a.subscribe(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()})),new Ib(i,j)})},qc.amb=function(){function a(a,b){return a.amb(b)}var b=Mc(),c=[];if(Array.isArray(arguments[0]))c=arguments[0];else for(var d=0,e=arguments.length;e>d;d++)c.push(arguments[d]);for(var d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},kc["catch"]=kc.catchError=kc.catchException=function(a){return"function"==typeof a?H(this,a):Uc([this,a])};var Uc=qc.catchError=qc["catch"]=qc.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return yc(a).catchError()};kc.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),Vc.apply(this,b)};var Vc=qc.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.pop();return Array.isArray(b[0])&&(b=b[0]),new Hd(function(a){function c(b){if(h[b]=!0,i||(i=h.every(Ea))){try{var c=d.apply(null,k)}catch(e){return a.onError(e)}a.onNext(c)}else j.filter(function(a,c){return c!==b}).every(Ea)&&a.onCompleted()}function e(b){j[b]=!0,j.every(Ea)&&a.onCompleted()}for(var f=b.length,g=function(){return!1},h=n(f,g),i=!1,j=n(f,g),k=new Array(f),l=new Array(f),m=0;f>m;m++)!function(d){var f=b[d],g=new Pb;Ja(f)&&(f=Ac(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(b){a.onError(b)},function(){e(d)})),l[d]=g}(m);return new Ib(l)},this)};kc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Xc.apply(null,a)};var Wc=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){this.sources=a,this.o=b}return Cb(b,a),b.prototype.subscribeCore=function(a){var b=new c(this.sources,a);return b.run()},c.prototype.run=function(){var a,b=new Qb,c=this.sources,d=c.length,e=this.o,f=Zb.scheduleRecursiveWithState(0,function(f,g){if(!a){if(f===d)return e.onCompleted();var h=c[f];Ja(h)&&(h=Ac(h));var i=new Pb;b.setDisposable(i),i.setDisposable(h.subscribe(function(a){e.onNext(a)},function(a){e.onError(a)},function(){g(f+1)}))}});return new Ib(b,f,Lb(function(){a=!0}))},b}(rc),Xc=qc.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 Wc(a)};kc.concatAll=kc.concatObservable=function(){return this.merge(1)};var Yc=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return Cb(b,a),b.prototype.subscribeCore=function(a){var b=new Ib;return b.add(this.source.subscribe(new Zc(a,this.maxConcurrent,b))),b},b}(rc),Zc=function(){function a(a,b,c){this.o=a,this.max=b,this.g=c,this.done=!1,this.q=[],this.activeCount=0,this.isStopped=!1}function b(a,b){this.parent=a,this.sad=b,this.isStopped=!1}return a.prototype.handleSubscribe=function(a){var c=new Pb;this.g.add(c),Ja(a)&&(a=Ac(a)),c.setDisposable(a.subscribe(new b(this,c)))},a.prototype.onNext=function(a){this.isStopped||(this.activeCount<this.max?(this.activeCount++,this.handleSubscribe(a)):this.q.push(a))},a.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},a.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,0===this.activeCount&&this.o.onCompleted())},a.prototype.dispose=function(){this.isStopped=!0},a.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},b.prototype.onCompleted=function(){if(!this.isStopped){this.isStopped=!0;var a=this.parent;a.g.remove(this.sad),a.q.length>0?a.handleSubscribe(a.q.shift()):(a.activeCount--,a.done&&0===a.activeCount&&a.o.onCompleted())}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();kc.merge=function(a){return"number"!=typeof a?$c(this,a):new Yc(this,a)};var $c=qc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(Vb(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=Zb,b=0;d>b;b++)c.push(arguments[b]);else for(a=Zb,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),E(a,c).mergeAll()},_c=function(a){function b(b){this.source=b,a.call(this)}function c(a,b){this.o=a,this.g=b,this.isStopped=!1,this.done=!1}function d(a,b,c){this.parent=a,this.g=b,this.sad=c,this.isStopped=!1}return Cb(b,a),b.prototype.subscribeCore=function(a){var b=new Ib,d=new Pb;return b.add(d),d.setDisposable(this.source.subscribe(new c(a,b))),b},c.prototype.onNext=function(a){if(!this.isStopped){var b=new Pb;this.g.add(b),Ja(a)&&(a=Ac(a)),b.setDisposable(a.subscribe(new d(this,this.g,b)))}},c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,1===this.g.length&&this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},d.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},d.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},d.prototype.onCompleted=function(){if(!this.isStopped){var a=this.parent;this.isStopped=!0,a.g.remove(this.sad),a