Files
jobslink-user-clent/lib/Rx.js

1 line
136 KiB
JavaScript
Raw Normal View History

2024-02-02 14:44:30 +08:00
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.Rx=t.Rx||{})}(this,function(t){"use strict";var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};function e(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var i="undefined"!=typeof window&&window,n="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,s="undefined"!=typeof global&&global,c=i||s||n;function a(t){return"function"==typeof t}!function(){if(!c)throw new Error("RxJS could not find any global context (window, self, global)")}();var l=Array.isArray||function(t){return t&&"number"==typeof t.length};function p(t){return null!=t&&"object"==typeof t}var o,f={e:{}};function u(){try{return o.apply(this,arguments)}catch(t){return f.e=t,f}}function d(t){return o=t,u}var h,b=(e(y,h=Error),y);function y(t){h.call(this),this.errors=t;var e=Error.call(this,t?t.length+" errors occurred during unsubscription:\n "+t.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"");this.name=e.name="UnsubscriptionError",this.stack=e.stack,this.message=e.message}var v,m=(w.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var i=this._parent,r=this._parents,n=this._unsubscribe,s=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var o=-1,c=r?r.length:0;i;)i.remove(this),i=++o<c&&r[o]||null;if(a(n)&&d(n).call(this)===f&&(e=!0,t=t||(f.e instanceof b?x(f.e.errors):[f.e])),l(s))for(o=-1,c=s.length;++o<c;){var u=s[o];if(p(u)&&d(u.unsubscribe).call(u)===f){e=!0,t=t||[];var h=f.e;h instanceof b?t=t.concat(x(h.errors)):t.push(h)}}if(e)throw new b(t)}},w.prototype.add=function(t){if(!t||t===w.EMPTY)return w.EMPTY;if(t===this)return this;var e=t;switch(typeof t){case"function":e=new w(t);case"object":if(e.closed||"function"!=typeof e.unsubscribe)return e;if(this.closed)return e.unsubscribe(),e;if("function"!=typeof e._addParent){var i=e;(e=new w)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(e),e._addParent(this),e},w.prototype.remove=function(t){var e=this._subscriptions;if(e){var i=e.indexOf(t);-1!==i&&e.splice(i,1)}},w.prototype._addParent=function(t){var e=this._parent,i=this._parents;e&&e!==t?i?-1===i.indexOf(t)&&i.push(t):this._parents=[t]:this._parent=t},w.EMPTY=((v=new w).closed=!0,v),w);function w(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}function x(t){return t.reduce(function(t,e){return t.concat(e instanceof b?e.errors:e)},[])}var _,g={closed:!0,next:function(t){},error:function(t){throw t},complete:function(){}},S=c.Symbol,T="function"==typeof S&&"function"==typeof S.for?S.for("rxSubscriber"):"@@rxSubscriber",I=(e(N,_=m),N.prototype[T]=function(){return this},N.create=function(t,e,i){var r=new N(t,e,i);return r.syncErrorThrowable=!1,r},N.prototype.next=function(t){this.isStopped||this._next(t)},N.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},N.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},N.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,_.prototype.unsubscribe.call(this))},N.prototype._next=function(t){this.destination.next(t)},N.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},N.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},N.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},N);function N(t,e,i){switch(_.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case