4 lines
51 KiB
JavaScript
4 lines
51 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(){if(this.isDisposed)throw new Error(Y)}function c(a,b){if(Z&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(bb)){for(var c=[],e=b;e;e=e.source)e.stack&&c.unshift(e.stack);c.unshift(a.stack);var f=c.join("\n"+bb+"\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===_&&d>=ab&&Pc>=d}function f(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function g(){if(Z)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 _=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(!Db(a))return b;Cb.nonEnumArgs&&a.length&&Eb(a)&&(a=Gb.call(a));var c=Cb.enumPrototypes&&"function"==typeof a,d=Cb.enumErrorProps&&(a===xb||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Cb.nonEnumShadows&&a!==yb){var f=a.constructor,g=-1,h=jb;if(a===(f&&f.prototype))var i=a===zb?tb:a===xb?ob:ub.call(a),j=Bb[i];for(;++g<h;)e=ib[g],j&&j[e]||!vb.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=ub.call(a),h=ub.call(b);if(g==kb&&(g=rb),h==kb&&(h=rb),g!=h)return!1;switch(g){case mb:case nb:return+a==+b;case qb:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case sb:case tb:return a==String(b)}var i=g==lb;if(!i){if(g!=rb||!Cb.nodeClass&&(l(a)||l(b)))return!1;var j=!Cb.argsObject&&Eb(a)?Object:a.constructor,n=!Cb.argsObject&&Eb(b)?Object:b.constructor;if(!(j==n||vb.call(a,"constructor")&&vb.call(b,"constructor")||W(j)&&j instanceof j&&W(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 vb.call(f,e)?(p++,q=vb.call(a,e)&&m(a[e],b,c,d)):void 0}),q&&k(a,function(a,b,c){return vb.call(c,b)?q=--p>-1:void 0});return c.pop(),d.pop(),q}function n(a,b){return 1===a.length&&Array.isArray(a[b])?a[b]:Gb.call(a)}function o(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function p(a,b){this.id=a,this.value=b}function q(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function r(){this._s=s}function t(){this._s=s,this._l=s.length,this._i=0}function u(a){this._a=a}function v(a){this._a=a,this._l=z(a),this._i=0}function w(a){return"number"==typeof a&&I.isFinite(a)}function x(b){var c,d=b[cb];if(!d&&"string"==typeof b)return c=new r(b),c[cb]();if(!d&&b.length!==a)return c=new u(b),c[cb]();if(!d)throw new TypeError("Object is not iterable");return b[cb]()}function y(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function z(a){var b=+a.length;return isNaN(b)?0:0!==b&&w(b)?(b=y(b)*Math.floor(Math.abs(b)),0>=b?0:b>zc?zc:b):b}function A(a,b){return P(a)||(a=_b),new Kc(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function B(a,b){return new Kc(function(c){var d=new Tb,e=new Ub;return e.setDisposable(d),d.setDisposable(a.subscribe(c.onNext.bind(c),function(a){var d,f;try{f=b(a)}catch(g){return void c.onError(g)}V(f)&&(f=wc(f)),d=new Tb,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e},a)}function C(a,b){var c=this;return new Kc(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void
|
||
|
return b.scheduleRecursive(function(b){if(f>d){var g=e[d++];c.onNext([g,a[g]]),b()}else c.onCompleted()})})},vc.range=function(a,b,c){return P(c)||(c=_b),new Kc(function(d){return c.scheduleRecursiveWithState(0,function(c,e){b>c?(d.onNext(a+c),e(c+1)):d.onCompleted()})})},vc.repeat=function(a,b,c){return P(c)||(c=_b),Dc(a,c).repeat(null==b?-1:b)};var Dc=vc["return"]=vc.just=function(a,b){return P(b)||(b=$b),new Kc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};vc.returnValue=function(){return Dc.apply(null,arguments)};var Ec=vc["throw"]=vc.throwError=function(a,b){return P(b)||(b=$b),new Kc(function(c){return b.schedule(function(){c.onError(a)})})};vc.throwException=function(){return vc.throwError.apply(null,arguments)},vc.using=function(a,b){return new Kc(function(c){var d,e,f=Sb;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new Ob(Ec(g).subscribe(c),f)}return new Ob(e.subscribe(c),f)})},pc.amb=function(a){var b=this;return new Kc(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Tb,j=new Tb;return V(a)&&(a=wc(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 Ob(i,j)})},vc.amb=function(){function a(a,b){return a.amb(b)}for(var b=Cc(),c=n(arguments,0),d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},pc["catch"]=pc.catchError=function(a){return"function"==typeof a?B(this,a):Fc([this,a])},pc.catchException=function(a){return this.catchError(a)};var Fc=vc.catchError=vc["catch"]=function(){return mc(n(arguments,0)).catchError()};vc.catchException=function(){return Fc.apply(null,arguments)},pc.combineLatest=function(){var a=Gb.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),Gc.apply(this,a)};var Gc=vc.combineLatest=function(){var a=Gb.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new Kc(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(Q))){try{d=b.apply(null,k)}catch(e){return void c.onError(e)}c.onNext(d)}else j.filter(function(b,c){return c!==a}).every(Q)&&c.onCompleted()}function e(a){j[a]=!0,j.every(Q)&&c.onCompleted()}for(var f=function(){return!1},g=a.length,h=o(g,f),i=!1,j=o(g,f),k=new Array(g),l=new Array(g),m=0;g>m;m++)!function(b){var f=a[b],g=new Tb;V(f)&&(f=wc(f)),g.setDisposable(f.subscribe(function(a){k[b]=a,d(b)},function(a){c.onError(a)},function(){e(b)})),l[b]=g}(m);return new Ob(l)},this)};pc.concat=function(){var a=Gb.call(arguments,0);return a.unshift(this),Hc.apply(this,a)};var Hc=vc.concat=function(){return mc(n(arguments,0)).concat()};pc.concatAll=function(){return this.merge(1)},pc.concatObservable=function(){return this.merge(1)},pc.merge=function(a){if("number"!=typeof a)return Ic(this,a);var b=this;return new Kc(function(c){function d(a){var b=new Tb;f.add(b),V(a)&&(a=wc(a)),b.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){c.onError(a)},function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Ob,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},function(a){c.onError(a)},function(){g=!0,0===e&&c.onCompleted()})),f},b)};var Ic=vc.merge=function(){var a,b;return arguments[0]?P(arguments[0])?(a=arguments[0],b=Gb.call(arguments,1)):(a=$b,b=Gb.call(arguments,0)):(a=$b,b=Gb.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),A(a,b).mergeAll()};pc.mergeAll=function(){var a=this;return new Kc(function(b){var c=new Ob,d=!1,e=new Tb;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Tb;c.add(e),V(a)&&(a=wc(a)),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},function(a){b.onError(a)},function(){d=!0,1===c.length&&b.onCompleted()})),c},a)},pc.mergeObservable=function(){return this.mergeAll.apply(this,arguments)},pc.onErrorResumeNext=function(a){if(!a)throw new Error("Sec
|
||
|
//# sourceMappingURL=rx.compat.map
|