Bones/node_modules/rx/dist/rx.lite.compat.min.js

4 lines
57 KiB
JavaScript
Raw Normal View History

2017-05-17 13:45:25 -04:00
/* 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(eb)}function c(a,b){if(fb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(jb)){for(var c=[],e=b;e;e=e.source)e.stack&&c.unshift(e.stack);c.unshift(a.stack);var f=c.join("\n"+jb+"\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===hb&&d>=ib&&_c>=d}function f(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function g(){if(fb)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 hb=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(!Lb(a))return b;Kb.nonEnumArgs&&a.length&&Mb(a)&&(a=Ob.call(a));var c=Kb.enumPrototypes&&"function"==typeof a,d=Kb.enumErrorProps&&(a===Fb||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Kb.nonEnumShadows&&a!==Gb){var f=a.constructor,g=-1,h=rb;if(a===(f&&f.prototype))var i=a===Hb?Bb:a===Fb?wb:Cb.call(a),j=Jb[i];for(;++g<h;)e=qb[g],j&&j[e]||!Db.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=Cb.call(a),h=Cb.call(b);if(g==sb&&(g=zb),h==sb&&(h=zb),g!=h)return!1;switch(g){case ub:case vb:return+a==+b;case yb:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case Ab:case Bb:return a==String(b)}var i=g==tb;if(!i){if(g!=zb||!Kb.nodeClass&&(l(a)||l(b)))return!1;var j=!Kb.argsObject&&Mb(a)?Object:a.constructor,n=!Kb.argsObject&&Mb(b)?Object:b.constructor;if(!(j==n||Db.call(a,"constructor")&&Db.call(b,"constructor")||cb(j)&&j instanceof j&&cb(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 Db.call(f,e)?(p++,q=Db.call(a,e)&&m(a[e],b,c,d)):void 0}),q&&k(a,function(a,b,c){return Db.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]:Ob.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(){this._s=s}function r(){this._s=s,this._l=s.length,this._i=0}function t(a){this._a=a}function u(a){this._a=a,this._l=y(a),this._i=0}function v(a){return"number"==typeof a&&Q.isFinite(a)}function w(b){var c,d=b[kb];if(!d&&"string"==typeof b)return c=new q(b),c[kb]();if(!d&&b.length!==a)return c=new t(b),c[kb]();if(!d)throw new TypeError("Object is not iterable");return b[kb]()}function x(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function y(a){var b=+a.length;return isNaN(b)?0:0!==b&&v(b)?(b=x(b)*Math.floor(Math.abs(b)),0>=b?0:b>Cc?Cc:b):b}function z(a,b){return X(a)||(a=fc),new Tc(function(c){var d=0,e=b.length;return a.scheduleRecursive(function(a){e>d?(c.onNext(b[d++]),a()):c.onCompleted()})})}function A(a,b){return new Tc(function(c){var d=new $b,e=new _b;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)}bb(f)&&(f=Mc(f)),d=new $b,e.setDisposable(d),d.setDisposable(f.subscribe(c))},c.onCompleted.bind(c))),e},a)}function B(a,b){var c=this;return new Tc(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return void d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.
};var Hc=yc.catchError=yc["catch"]=function(){return tc(n(arguments,0)).catchError()};yc.catchException=function(){return Hc.apply(null,arguments)},rc.combineLatest=function(){var a=Ob.call(arguments);return Array.isArray(a[0])?a[0].unshift(this):a.unshift(this),Ic.apply(this,a)};var Ic=yc.combineLatest=function(){var a=Ob.call(arguments),b=a.pop();return Array.isArray(a[0])&&(a=a[0]),new Tc(function(c){function d(a){var d;if(h[a]=!0,i||(i=h.every(Y))){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(Y)&&c.onCompleted()}function e(a){j[a]=!0,j.every(Y)&&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 $b;bb(f)&&(f=Mc(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 Vb(l)},this)};rc.concat=function(){var a=Ob.call(arguments,0);return a.unshift(this),Jc.apply(this,a)};var Jc=yc.concat=function(){return tc(n(arguments,0)).concat()};rc.concatAll=function(){return this.merge(1)},rc.concatObservable=function(){return this.merge(1)},rc.merge=function(a){if("number"!=typeof a)return Kc(this,a);var b=this;return new Tc(function(c){function d(a){var b=new $b;f.add(b),bb(a)&&(a=Mc(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 Vb,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 Kc=yc.merge=function(){var a,b;return arguments[0]?X(arguments[0])?(a=arguments[0],b=Ob.call(arguments,1)):(a=ec,b=Ob.call(arguments,0)):(a=ec,b=Ob.call(arguments,1)),Array.isArray(b[0])&&(b=b[0]),z(a,b).mergeAll()};rc.mergeAll=function(){var a=this;return new Tc(function(b){var c=new Vb,d=!1,e=new $b;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new $b;c.add(e),bb(a)&&(a=Mc(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)},rc.mergeObservable=function(){return this.mergeAll.apply(this,arguments)},rc.skipUntil=function(a){var b=this;return new Tc(function(c){var d=!1,e=new Vb(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));bb(a)&&(a=Mc(a));var f=new $b;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)},rc["switch"]=rc.switchLatest=function(){var a=this;return new Tc(function(b){var c=!1,d=new _b,e=!1,f=0,g=a.subscribe(function(a){var g=new $b,h=++f;c=!0,d.setDisposable(g),bb(a)&&(a=Mc(a)),g.setDisposable(a.subscribe(function(a){f===h&&b.onNext(a)},function(a){f===h&&b.onError(a)},function(){f===h&&(c=!1,e&&b.onCompleted())}))},b.onError.bind(b),function(){e=!0,!c&&b.onCompleted()});return new Vb(g,d)},a)},rc.takeUntil=function(a){var b=this;return new Tc(function(c){return bb(a)&&(a=Mc(a)),new Vb(b.subscribe(c),a.subscribe(function(){c.onCompleted()},function(a){c.onError(a)},W))},b)},rc.withLatestFrom=function(){var a=this,b=Ob.call(arguments),c=b.pop();if("undefined"==typeof a)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof c)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(b[0])&&(b=b[0]),new Tc(function(d){for(var e=function(){return!1},f=b.length,g=o(f,e),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(a){var c=b[a],e=new $b;bb(c)&&(c=Mc(c)),e.setDisposable(c.subscribe(function(b){i[a]=b,g[a]=!0,h=g.every(Y)},d.onError.bind(d),function(){})),j[a]=e}(k);var l=new $b;return l.setDisposable(a.subscribe(function(a){var b,e=[a].concat(i);if(h){try{b=c.apply(null,e)}catch(f){return void d.onError(f)}d.onNext(b)}},d.onError.bind(d),function(){d.onCompleted()})),j[f]=l,new Vb(
//# sourceMappingURL=rx.lite.compat.map