Opal-Estate-Pro/node_modules/rx/dist/rx.core.binding.min.js

3 lines
9.7 KiB
JavaScript
Raw Normal View History

2019-09-13 06:27:52 +02: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.core"],function(b,c){return a(j,c,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(j,module.exports,require("./rx.core")):j.Rx=a(j,{},j.Rx)}).call(this,function(a,b,c,d){function e(a){for(var b=a.length,c=new Array(b),d=0;b>d;d++)c[d]=a[d];return c}function f(a){return function(){try{return a.apply(this,arguments)}catch(b){return v.e=b,v}}}function g(a){throw a}var h=c.Observable,i=h.prototype,j=(c.AnonymousObservable,c.ObservableBase),k=c.Observer,l=c.internals.AbstractObserver,m=c.Disposable.create,n=c.Disposable.empty,o=(c.CompositeDisposable,c.BinaryDisposable),p=c.SerialDisposable,q=c.Scheduler.currentThread,r=c.helpers.isFunction,s=c.internals.inherits,t=c.internals.addProperties,u=c.Disposable.checkDisposed,v={e:{}},w=c.internals.tryCatch=function(a){if(!r(a))throw new TypeError("fn must be a function");return f(a)},x=function(a){function b(b,c,d){this.source=b,this._fn1=c,this._fn2=d,a.call(this)}return s(b,a),b.prototype.subscribeCore=function(a){var b=this.source.multicast(this._fn1());return new o(this._fn2(b).subscribe(a),b.connect())},b}(j);i.multicast=function(a,b){return r(a)?new x(this,a,b):new G(this,a)},i.publish=function(a){return a&&r(a)?this.multicast(function(){return new A},a):this.multicast(new A)},i.share=function(){return this.publish().refCount()},i.publishLast=function(a){return a&&r(a)?this.multicast(function(){return new C},a):this.multicast(new C)},i.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new D(b)},a):this.multicast(new D(a))},i.shareValue=function(a){return this.publishValue(a).refCount()},i.replay=function(a,b,c,d){return a&&r(a)?this.multicast(function(){return new E(b,c,d)},a):this.multicast(new E(b,c,d))},i.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var y=c.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 p}function c(a,b){return function(){a.onNext(b)}}function d(a,b){return function(){a.onError(b)}}function e(a){return function(){a.onCompleted()}}function f(a,b){var c;if(!(a.queue.length>0))return void(a.isAcquired=!1);c=a.queue.shift();var d=w(c)();return d===v?(a.queue=[],a.hasFaulted=!0,g(d.e)):void b(a)}return s(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(e(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,f))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(l),z=function(a,b){this._s=a,this._o=b};z.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 A=c.Subject=function(a){function b(){a.call(this),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return s(b,a),t(b.prototype,k.prototype,{_subscribe:function(a){return u(this),this.isStopped?this.hasError?(a.onError(this.error),n):(a.onCompleted(),n):(this.observers.push(a),new z(this,a))},hasObservers:function(){return u(this),this.observers.length>0},onCompleted:function(){if(u(this),!this.isStopped){this.isStopped=!0;for(var a=0,b=e(this.observers),c=b.length;c>a;a++)b[a].onCompleted();this.observers.length=0}},onError:function(a){if(u(this),!this.isStopped){this.isStopp
//# sourceMappingURL=rx.core.binding.map