work.suroh.tk/node_modules/rx/dist/rx.coincidence.min.js

3 lines
6.8 KiB
JavaScript
Raw Normal View History

2019-12-02 12:22:45 +00:00
/* 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}var c={"function":!0,object:!0},d=c[typeof exports]&&exports&&!exports.nodeType?exports:null,e=c[typeof module]&&module&&!module.nodeType?module:null,f=b(d&&e&&"object"==typeof global&&global),g=b(c[typeof self]&&self),h=b(c[typeof window]&&window),i=(e&&e.exports===d?d:null,b(c[typeof this]&&this)),j=f||h!==(i&&i.window)&&h||g||i||Function("return this")();"function"==typeof define&&define.amd?define(["./rx"],function(b,c){return a(j,c,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(j,module.exports,require("./rx")):j.Rx=a(j,{},j.Rx)}).call(this,function(a,b,c,d){function e(a){return function(){try{return a.apply(this,arguments)}catch(b){return D.e=b,D}}}function f(a){return a.toArray()}function g(a,b){return a.groupJoin(this,b,t,function(a,b){return b})}function h(a){var b=this;return new v(function(c){var d=new r,e=new m,f=new o(e);return c.onNext(w(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),A(a)&&(a=C(a)),e.add(a.subscribe(function(a){d.onCompleted(),d=new r,c.onNext(w(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f},b)}function i(a){var b=this;return new v(function(c){function d(){var b;try{b=a()}catch(f){return void c.onError(f)}A(b)&&(b=C(b));var i=new p;e.setDisposable(i),i.setDisposable(b.take(1).subscribe(z,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new r,c.onNext(w(h,g)),d()}))}var e=new q,f=new m(e),g=new o(f),h=new r;return c.onNext(w(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)}var j=c.Observable,k=c.ObservableBase,l=c.internals.AbstractObserver,m=c.CompositeDisposable,n=c.BinaryDisposable,o=c.RefCountDisposable,p=c.SingleAssignmentDisposable,q=c.SerialDisposable,r=c.Subject,s=j.prototype,t=j.empty,u=j.never,v=c.AnonymousObservable,w=c.internals.addRef,x=c.internals.inherits,y=c.internals.bindCallback,z=c.helpers.noop,A=c.helpers.isPromise,B=c.helpers.isFunction,C=j.fromPromise,D={e:{}},E=c.internals.tryCatch=function(a){if(!B(a))throw new TypeError("fn must be a function");return e(a)},F=a.Map||function(){function a(){this.size=0,this._values=[],this._keys=[]}return a.prototype["delete"]=function(a){var b=this._keys.indexOf(a);return-1===b?!1:(this._values.splice(b,1),this._keys.splice(b,1),this.size--,!0)},a.prototype.get=function(a){var b=this._keys.indexOf(a);return-1===b?d:this._values[b]},a.prototype.set=function(a,b){var c=this._keys.indexOf(a);return-1===c?(this._keys.push(a),this._values.push(b),this.size++):this._values[c]=b,this},a.prototype.forEach=function(a,b){for(var c=0;c<this.size;c++)a.call(b,this._values[c],this._keys[c])},a}();s.join=function(a,b,c,d){var e=this;return new v(function(f){var g=new m,h=!1,i=!1,j=0,k=0,l=new F,n=new F,o=function(a){f.onError(a)};return g.add(e.subscribe(function(a){var c=j++,e=new p;l.set(c,a),g.add(e);var i=E(b)(a);return i===D?f.onError(i.e):(e.setDisposable(i.take(1).subscribe(z,o,function(){l["delete"](c)&&0===l.size&&h&&f.onCompleted(),g.remove(e)})),void n.forEach(function(b){var c=E(d)(a,b);return c===D?f.onError(c.e):void f.onNext(c)}))},o,function(){h=!0,(i||0===l.size)&&f.onCompleted()})),g.add(a.subscribe(function(a){var b=k++,e=new p;n.set(b,a),g.add(e);var h=E(c)(a);return h===D?f.onError(h.e):(e.setDisposable(h.take(1).subscribe(z,o,function(){n["delete"](b)&&0===n.size&&i&&f.onCompleted(),g.remove(e)})),void l.forEach(function(b){var c=E(d)(b,a);return c===D?f.onError(c.e):void f.onNext(c)}))},o,function(){i=!0,(h||0===n.size)&&f.onCompleted()})),g},e)},s.groupJoin=function(a,b,c,d){var e=this;return new v(function(f){function g(a){}var h=new m,i=new o(h),j=new F,k=new F,l=0,n=0,g=function(a){return function(b){b.onError(a)}};return h.add(e.subscribe(function(a){var c=new r,e=l++;j.set(e,c);var m=E(d)(a,w(c,i));if(m===D)return j.forEach(g(m.e)),f.onError(m.e);f.onNext(m),k.forEach(function(a){c.onNe
//# sourceMappingURL=rx.coincidence.map