mirror of
https://github.com/biobulkbende/biobulkbende.org.git
synced 2025-10-12 07:34:58 +00:00
structure, layout and automation
This commit is contained in:
71
node_modules/rxjs/_esm5/observable/ArrayLikeObservable.js
generated
vendored
Normal file
71
node_modules/rxjs/_esm5/observable/ArrayLikeObservable.js
generated
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
/** PURE_IMPORTS_START .._Observable,._ScalarObservable,._EmptyObservable PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
import { ScalarObservable } from './ScalarObservable';
|
||||
import { EmptyObservable } from './EmptyObservable';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var ArrayLikeObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(ArrayLikeObservable, _super);
|
||||
function ArrayLikeObservable(arrayLike, scheduler) {
|
||||
_super.call(this);
|
||||
this.arrayLike = arrayLike;
|
||||
this.scheduler = scheduler;
|
||||
if (!scheduler && arrayLike.length === 1) {
|
||||
this._isScalar = true;
|
||||
this.value = arrayLike[0];
|
||||
}
|
||||
}
|
||||
ArrayLikeObservable.create = function (arrayLike, scheduler) {
|
||||
var length = arrayLike.length;
|
||||
if (length === 0) {
|
||||
return new EmptyObservable();
|
||||
}
|
||||
else if (length === 1) {
|
||||
return new ScalarObservable(arrayLike[0], scheduler);
|
||||
}
|
||||
else {
|
||||
return new ArrayLikeObservable(arrayLike, scheduler);
|
||||
}
|
||||
};
|
||||
ArrayLikeObservable.dispatch = function (state) {
|
||||
var arrayLike = state.arrayLike, index = state.index, length = state.length, subscriber = state.subscriber;
|
||||
if (subscriber.closed) {
|
||||
return;
|
||||
}
|
||||
if (index >= length) {
|
||||
subscriber.complete();
|
||||
return;
|
||||
}
|
||||
subscriber.next(arrayLike[index]);
|
||||
state.index = index + 1;
|
||||
this.schedule(state);
|
||||
};
|
||||
/** @deprecated internal use only */ ArrayLikeObservable.prototype._subscribe = function (subscriber) {
|
||||
var index = 0;
|
||||
var _a = this, arrayLike = _a.arrayLike, scheduler = _a.scheduler;
|
||||
var length = arrayLike.length;
|
||||
if (scheduler) {
|
||||
return scheduler.schedule(ArrayLikeObservable.dispatch, 0, {
|
||||
arrayLike: arrayLike, index: index, length: length, subscriber: subscriber
|
||||
});
|
||||
}
|
||||
else {
|
||||
for (var i = 0; i < length && !subscriber.closed; i++) {
|
||||
subscriber.next(arrayLike[i]);
|
||||
}
|
||||
subscriber.complete();
|
||||
}
|
||||
};
|
||||
return ArrayLikeObservable;
|
||||
}(Observable));
|
||||
//# sourceMappingURL=ArrayLikeObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/ArrayLikeObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/ArrayLikeObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"ArrayLikeObservable.js","sourceRoot":"","sources":["../../src/observable/ArrayLikeObservable.ts"],"names":[],"mappings":";;;;;OACO,EAAE,UAAU,EAAE,MAAM,eAAe;OACnC,EAAE,gBAAgB,EAAE,MAAM,oBAAoB;OAC9C,EAAE,eAAe,EAAE,MAAM,mBAAmB;AAInD;;;;GAIG;AACH;IAA4C,uCAAa;IAmCvD,6BAAoB,SAAuB,EAAU,SAAsB;QACzE,iBAAO,CAAC;QADU,cAAS,GAAT,SAAS,CAAc;QAAU,cAAS,GAAT,SAAS,CAAa;QAEzE,EAAE,CAAC,CAAC,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YACzC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,IAAI,CAAC,KAAK,GA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EhC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;YACd,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,EAAE;gBACzD,oBAAS,EAAE,YAAK,EAAE,cAAM,EAAE,sBAAU;aACrC,CAAC,CAAC;QACL,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACtD,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;YAChC,CAAC;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC;IACH,CAAC;IACH,0BAAC;AAAD,CAAC,AA3DD,CAA4C,UAAU,GA2DrD"}
|
123
node_modules/rxjs/_esm5/observable/ArrayObservable.js
generated
vendored
Normal file
123
node_modules/rxjs/_esm5/observable/ArrayObservable.js
generated
vendored
Normal file
@ -0,0 +1,123 @@
|
||||
/** PURE_IMPORTS_START .._Observable,._ScalarObservable,._EmptyObservable,.._util_isScheduler PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
import { ScalarObservable } from './ScalarObservable';
|
||||
import { EmptyObservable } from './EmptyObservable';
|
||||
import { isScheduler } from '../util/isScheduler';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var ArrayObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(ArrayObservable, _super);
|
||||
function ArrayObservable(array, scheduler) {
|
||||
_super.call(this);
|
||||
this.array = array;
|
||||
this.scheduler = scheduler;
|
||||
if (!scheduler && array.length === 1) {
|
||||
this._isScalar = true;
|
||||
this.value = array[0];
|
||||
}
|
||||
}
|
||||
ArrayObservable.create = function (array, scheduler) {
|
||||
return new ArrayObservable(array, scheduler);
|
||||
};
|
||||
/**
|
||||
* Creates an Observable that emits some values you specify as arguments,
|
||||
* immediately one after the other, and then emits a complete notification.
|
||||
*
|
||||
* <span class="informal">Emits the arguments you provide, then completes.
|
||||
* </span>
|
||||
*
|
||||
* <img src="./img/of.png" width="100%">
|
||||
*
|
||||
* This static operator is useful for creating a simple Observable that only
|
||||
* emits the arguments given, and the complete notification thereafter. It can
|
||||
* be used for composing with other Observables, such as with {@link concat}.
|
||||
* By default, it uses a `null` IScheduler, which means the `next`
|
||||
* notifications are sent synchronously, although with a different IScheduler
|
||||
* it is possible to determine when those notifications will be delivered.
|
||||
*
|
||||
* @example <caption>Emit 10, 20, 30, then 'a', 'b', 'c', then start ticking every second.</caption>
|
||||
* var numbers = Rx.Observable.of(10, 20, 30);
|
||||
* var letters = Rx.Observable.of('a', 'b', 'c');
|
||||
* var interval = Rx.Observable.interval(1000);
|
||||
* var result = numbers.concat(letters).concat(interval);
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link create}
|
||||
* @see {@link empty}
|
||||
* @see {@link never}
|
||||
* @see {@link throw}
|
||||
*
|
||||
* @param {...T} values Arguments that represent `next` values to be emitted.
|
||||
* @param {Scheduler} [scheduler] A {@link IScheduler} to use for scheduling
|
||||
* the emissions of the `next` notifications.
|
||||
* @return {Observable<T>} An Observable that emits each given input value.
|
||||
* @static true
|
||||
* @name of
|
||||
* @owner Observable
|
||||
*/
|
||||
ArrayObservable.of = function () {
|
||||
var array = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
array[_i - 0] = arguments[_i];
|
||||
}
|
||||
var scheduler = array[array.length - 1];
|
||||
if (isScheduler(scheduler)) {
|
||||
array.pop();
|
||||
}
|
||||
else {
|
||||
scheduler = null;
|
||||
}
|
||||
var len = array.length;
|
||||
if (len > 1) {
|
||||
return new ArrayObservable(array, scheduler);
|
||||
}
|
||||
else if (len === 1) {
|
||||
return new ScalarObservable(array[0], scheduler);
|
||||
}
|
||||
else {
|
||||
return new EmptyObservable(scheduler);
|
||||
}
|
||||
};
|
||||
ArrayObservable.dispatch = function (state) {
|
||||
var array = state.array, index = state.index, count = state.count, subscriber = state.subscriber;
|
||||
if (index >= count) {
|
||||
subscriber.complete();
|
||||
return;
|
||||
}
|
||||
subscriber.next(array[index]);
|
||||
if (subscriber.closed) {
|
||||
return;
|
||||
}
|
||||
state.index = index + 1;
|
||||
this.schedule(state);
|
||||
};
|
||||
/** @deprecated internal use only */ ArrayObservable.prototype._subscribe = function (subscriber) {
|
||||
var index = 0;
|
||||
var array = this.array;
|
||||
var count = array.length;
|
||||
var scheduler = this.scheduler;
|
||||
if (scheduler) {
|
||||
return scheduler.schedule(ArrayObservable.dispatch, 0, {
|
||||
array: array, index: index, count: count, subscriber: subscriber
|
||||
});
|
||||
}
|
||||
else {
|
||||
for (var i = 0; i < count && !subscriber.closed; i++) {
|
||||
subscriber.next(array[i]);
|
||||
}
|
||||
subscriber.complete();
|
||||
}
|
||||
};
|
||||
return ArrayObservable;
|
||||
}(Observable));
|
||||
//# sourceMappingURL=ArrayObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/ArrayObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/ArrayObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"ArrayObservable.js","sourceRoot":"","sources":["../../src/observable/ArrayObservable.ts"],"names":[],"mappings":";;;;;OACO,EAAE,UAAU,EAAE,MAAM,eAAe;OACnC,EAAE,gBAAgB,EAAE,MAAM,oBAAoB;OAC9C,EAAE,eAAe,EAAE,MAAM,mBAAmB;OAE5C,EAAE,WAAW,EAAE,MAAM,qBAA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AAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5B,CAAC;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AAnHD,CAAwC,UAAU,GAmHjD"}
|
267
node_modules/rxjs/_esm5/observable/BoundCallbackObservable.js
generated
vendored
Normal file
267
node_modules/rxjs/_esm5/observable/BoundCallbackObservable.js
generated
vendored
Normal file
@ -0,0 +1,267 @@
|
||||
/** PURE_IMPORTS_START .._Observable,.._util_tryCatch,.._util_errorObject,.._AsyncSubject PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
import { tryCatch } from '../util/tryCatch';
|
||||
import { errorObject } from '../util/errorObject';
|
||||
import { AsyncSubject } from '../AsyncSubject';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var BoundCallbackObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(BoundCallbackObservable, _super);
|
||||
function BoundCallbackObservable(callbackFunc, selector, args, context, scheduler) {
|
||||
_super.call(this);
|
||||
this.callbackFunc = callbackFunc;
|
||||
this.selector = selector;
|
||||
this.args = args;
|
||||
this.context = context;
|
||||
this.scheduler = scheduler;
|
||||
}
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Converts a callback API to a function that returns an Observable.
|
||||
*
|
||||
* <span class="informal">Give it a function `f` of type `f(x, callback)` and
|
||||
* it will return a function `g` that when called as `g(x)` will output an
|
||||
* Observable.</span>
|
||||
*
|
||||
* `bindCallback` is not an operator because its input and output are not
|
||||
* Observables. The input is a function `func` with some parameters, the
|
||||
* last parameter must be a callback function that `func` calls when it is
|
||||
* done.
|
||||
*
|
||||
* The output of `bindCallback` is a function that takes the same parameters
|
||||
* as `func`, except the last one (the callback). When the output function
|
||||
* is called with arguments it will return an Observable. If function `func`
|
||||
* calls its callback with one argument the Observable will emit that value.
|
||||
* If on the other hand the callback is called with multiple values the resulting
|
||||
* Observable will emit an array with said values as arguments.
|
||||
*
|
||||
* It is very important to remember that input function `func` is not called
|
||||
* when the output function is, but rather when the Observable returned by the output
|
||||
* function is subscribed. This means if `func` makes an AJAX request, that request
|
||||
* will be made every time someone subscribes to the resulting Observable, but not before.
|
||||
*
|
||||
* Optionally, a selector function can be passed to `bindObservable`. The selector function
|
||||
* takes the same arguments as the callback and returns the value that will be emitted by the Observable.
|
||||
* Even though by default multiple arguments passed to callback appear in the stream as an array
|
||||
* the selector function will be called with arguments directly, just as the callback would.
|
||||
* This means you can imagine the default selector (when one is not provided explicitly)
|
||||
* as a function that aggregates all its arguments into an array, or simply returns first argument
|
||||
* if there is only one.
|
||||
*
|
||||
* The last optional parameter - {@link Scheduler} - can be used to control when the call
|
||||
* to `func` happens after someone subscribes to Observable, as well as when results
|
||||
* passed to callback will be emitted. By default, the subscription to an Observable calls `func`
|
||||
* synchronously, but using `Scheduler.async` as the last parameter will defer the call to `func`,
|
||||
* just like wrapping the call in `setTimeout` with a timeout of `0` would. If you use the async Scheduler
|
||||
* and call `subscribe` on the output Observable all function calls that are currently executing
|
||||
* will end before `func` is invoked.
|
||||
*
|
||||
* By default results passed to the callback are emitted immediately after `func` invokes the callback.
|
||||
* In particular, if the callback is called synchronously the subscription of the resulting Observable
|
||||
* will call the `next` function synchronously as well. If you want to defer that call,
|
||||
* you may use `Scheduler.async` just as before. This means that by using `Scheduler.async` you can
|
||||
* ensure that `func` always calls its callback asynchronously, thus avoiding terrifying Zalgo.
|
||||
*
|
||||
* Note that the Observable created by the output function will always emit a single value
|
||||
* and then complete immediately. If `func` calls the callback multiple times, values from subsequent
|
||||
* calls will not appear in the stream. If you need to listen for multiple calls,
|
||||
* you probably want to use {@link fromEvent} or {@link fromEventPattern} instead.
|
||||
*
|
||||
* If `func` depends on some context (`this` property) and is not already bound the context of `func`
|
||||
* will be the context that the output function has at call time. In particular, if `func`
|
||||
* is called as a method of some objec and if `func` is not already bound, in order to preserve the context
|
||||
* it is recommended that the context of the output function is set to that object as well.
|
||||
*
|
||||
* If the input function calls its callback in the "node style" (i.e. first argument to callback is
|
||||
* optional error parameter signaling whether the call failed or not), {@link bindNodeCallback}
|
||||
* provides convenient error handling and probably is a better choice.
|
||||
* `bindCallback` will treat such functions the same as any other and error parameters
|
||||
* (whether passed or not) will always be interpreted as regular callback argument.
|
||||
*
|
||||
*
|
||||
* @example <caption>Convert jQuery's getJSON to an Observable API</caption>
|
||||
* // Suppose we have jQuery.getJSON('/my/url', callback)
|
||||
* var getJSONAsObservable = Rx.Observable.bindCallback(jQuery.getJSON);
|
||||
* var result = getJSONAsObservable('/my/url');
|
||||
* result.subscribe(x => console.log(x), e => console.error(e));
|
||||
*
|
||||
*
|
||||
* @example <caption>Receive an array of arguments passed to a callback</caption>
|
||||
* someFunction((a, b, c) => {
|
||||
* console.log(a); // 5
|
||||
* console.log(b); // 'some string'
|
||||
* console.log(c); // {someProperty: 'someValue'}
|
||||
* });
|
||||
*
|
||||
* const boundSomeFunction = Rx.Observable.bindCallback(someFunction);
|
||||
* boundSomeFunction().subscribe(values => {
|
||||
* console.log(values) // [5, 'some string', {someProperty: 'someValue'}]
|
||||
* });
|
||||
*
|
||||
*
|
||||
* @example <caption>Use bindCallback with a selector function</caption>
|
||||
* someFunction((a, b, c) => {
|
||||
* console.log(a); // 'a'
|
||||
* console.log(b); // 'b'
|
||||
* console.log(c); // 'c'
|
||||
* });
|
||||
*
|
||||
* const boundSomeFunction = Rx.Observable.bindCallback(someFunction, (a, b, c) => a + b + c);
|
||||
* boundSomeFunction().subscribe(value => {
|
||||
* console.log(value) // 'abc'
|
||||
* });
|
||||
*
|
||||
*
|
||||
* @example <caption>Compare behaviour with and without async Scheduler</caption>
|
||||
* function iCallMyCallbackSynchronously(cb) {
|
||||
* cb();
|
||||
* }
|
||||
*
|
||||
* const boundSyncFn = Rx.Observable.bindCallback(iCallMyCallbackSynchronously);
|
||||
* const boundAsyncFn = Rx.Observable.bindCallback(iCallMyCallbackSynchronously, null, Rx.Scheduler.async);
|
||||
*
|
||||
* boundSyncFn().subscribe(() => console.log('I was sync!'));
|
||||
* boundAsyncFn().subscribe(() => console.log('I was async!'));
|
||||
* console.log('This happened...');
|
||||
*
|
||||
* // Logs:
|
||||
* // I was sync!
|
||||
* // This happened...
|
||||
* // I was async!
|
||||
*
|
||||
*
|
||||
* @example <caption>Use bindCallback on an object method</caption>
|
||||
* const boundMethod = Rx.Observable.bindCallback(someObject.methodWithCallback);
|
||||
* boundMethod.call(someObject) // make sure methodWithCallback has access to someObject
|
||||
* .subscribe(subscriber);
|
||||
*
|
||||
*
|
||||
* @see {@link bindNodeCallback}
|
||||
* @see {@link from}
|
||||
* @see {@link fromPromise}
|
||||
*
|
||||
* @param {function} func A function with a callback as the last parameter.
|
||||
* @param {function} [selector] A function which takes the arguments from the
|
||||
* callback and maps them to a value that is emitted on the output Observable.
|
||||
* @param {Scheduler} [scheduler] The scheduler on which to schedule the
|
||||
* callbacks.
|
||||
* @return {function(...params: *): Observable} A function which returns the
|
||||
* Observable that delivers the same values the callback would deliver.
|
||||
* @static true
|
||||
* @name bindCallback
|
||||
* @owner Observable
|
||||
*/
|
||||
BoundCallbackObservable.create = function (func, selector, scheduler) {
|
||||
if (selector === void 0) {
|
||||
selector = undefined;
|
||||
}
|
||||
return function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i - 0] = arguments[_i];
|
||||
}
|
||||
return new BoundCallbackObservable(func, selector, args, this, scheduler);
|
||||
};
|
||||
};
|
||||
/** @deprecated internal use only */ BoundCallbackObservable.prototype._subscribe = function (subscriber) {
|
||||
var callbackFunc = this.callbackFunc;
|
||||
var args = this.args;
|
||||
var scheduler = this.scheduler;
|
||||
var subject = this.subject;
|
||||
if (!scheduler) {
|
||||
if (!subject) {
|
||||
subject = this.subject = new AsyncSubject();
|
||||
var handler = function handlerFn() {
|
||||
var innerArgs = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
innerArgs[_i - 0] = arguments[_i];
|
||||
}
|
||||
var source = handlerFn.source;
|
||||
var selector = source.selector, subject = source.subject;
|
||||
if (selector) {
|
||||
var result_1 = tryCatch(selector).apply(this, innerArgs);
|
||||
if (result_1 === errorObject) {
|
||||
subject.error(errorObject.e);
|
||||
}
|
||||
else {
|
||||
subject.next(result_1);
|
||||
subject.complete();
|
||||
}
|
||||
}
|
||||
else {
|
||||
subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
|
||||
subject.complete();
|
||||
}
|
||||
};
|
||||
// use named function instance to avoid closure.
|
||||
handler.source = this;
|
||||
var result = tryCatch(callbackFunc).apply(this.context, args.concat(handler));
|
||||
if (result === errorObject) {
|
||||
subject.error(errorObject.e);
|
||||
}
|
||||
}
|
||||
return subject.subscribe(subscriber);
|
||||
}
|
||||
else {
|
||||
return scheduler.schedule(BoundCallbackObservable.dispatch, 0, { source: this, subscriber: subscriber, context: this.context });
|
||||
}
|
||||
};
|
||||
BoundCallbackObservable.dispatch = function (state) {
|
||||
var self = this;
|
||||
var source = state.source, subscriber = state.subscriber, context = state.context;
|
||||
var callbackFunc = source.callbackFunc, args = source.args, scheduler = source.scheduler;
|
||||
var subject = source.subject;
|
||||
if (!subject) {
|
||||
subject = source.subject = new AsyncSubject();
|
||||
var handler = function handlerFn() {
|
||||
var innerArgs = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
innerArgs[_i - 0] = arguments[_i];
|
||||
}
|
||||
var source = handlerFn.source;
|
||||
var selector = source.selector, subject = source.subject;
|
||||
if (selector) {
|
||||
var result_2 = tryCatch(selector).apply(this, innerArgs);
|
||||
if (result_2 === errorObject) {
|
||||
self.add(scheduler.schedule(dispatchError, 0, { err: errorObject.e, subject: subject }));
|
||||
}
|
||||
else {
|
||||
self.add(scheduler.schedule(dispatchNext, 0, { value: result_2, subject: subject }));
|
||||
}
|
||||
}
|
||||
else {
|
||||
var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
|
||||
self.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
|
||||
}
|
||||
};
|
||||
// use named function to pass values in without closure
|
||||
handler.source = source;
|
||||
var result = tryCatch(callbackFunc).apply(context, args.concat(handler));
|
||||
if (result === errorObject) {
|
||||
subject.error(errorObject.e);
|
||||
}
|
||||
}
|
||||
self.add(subject.subscribe(subscriber));
|
||||
};
|
||||
return BoundCallbackObservable;
|
||||
}(Observable));
|
||||
function dispatchNext(arg) {
|
||||
var value = arg.value, subject = arg.subject;
|
||||
subject.next(value);
|
||||
subject.complete();
|
||||
}
|
||||
function dispatchError(arg) {
|
||||
var err = arg.err, subject = arg.subject;
|
||||
subject.error(err);
|
||||
}
|
||||
//# sourceMappingURL=BoundCallbackObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/BoundCallbackObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/BoundCallbackObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"BoundCallbackObservable.js","sourceRoot":"","sources":["../../src/observable/BoundCallbackObservable.ts"],"names":[],"mappings":";;;;;OAAO,EAAE,UAAU,EAAE,MAAM,eAAe;OAInC,EAAE,QAAQ,EAAE,MAAM,kBAAkB;OACpC,EAAE,WAAW,EAAE,MAAM,qBAAqB;OAC1C,EAAE,YAAY,EAAE,MAAM,iBAAiB;AAE9C;;;;GAIG;AACH;IAAgD,2CAAa;IAsK3D,iCAAoB,YAAsB,EACtB,QAAkB,EAClB,IAAW,EACX,OAAY,EACZ,SAAqB;QACvC,iBAAO,CAAC;QALU,iBAAY,GAAZ,YAAY,CAAU;QACt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AG,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;oBAC/D,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,EAAE,EAAE,YAAK,EAAE,gBAAO,EAAE,CAAC,CAAC,CAAC;gBACpE,CAAC;YACH,CAAC,CAAC;YACF,uDAAuD;YACjD,OAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;YAE/B,IAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;YAC3E,EAAE,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC;gBAC3B,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC/B,CAAC;QACH,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IAC1C,CAAC;IACH,8BAAC;AAAD,CAAC,AAxPD,CAAgD,UAAU,GAwPzD;AAMD,sBAAyB,GAAuB;IACtC,qBAAK,EAAE,qBAAO,CAAS;IAC/B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpB,OAAO,CAAC,QAAQ,EAAE,CAAC;AACrB,CAAC;AAMD,uBAA0B,GAAwB;IACxC,iBAAG,EAAE,qBAAO,CAAS;IAC7B,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC"}
|
266
node_modules/rxjs/_esm5/observable/BoundNodeCallbackObservable.js
generated
vendored
Normal file
266
node_modules/rxjs/_esm5/observable/BoundNodeCallbackObservable.js
generated
vendored
Normal file
@ -0,0 +1,266 @@
|
||||
/** PURE_IMPORTS_START .._Observable,.._util_tryCatch,.._util_errorObject,.._AsyncSubject PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
import { tryCatch } from '../util/tryCatch';
|
||||
import { errorObject } from '../util/errorObject';
|
||||
import { AsyncSubject } from '../AsyncSubject';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var BoundNodeCallbackObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(BoundNodeCallbackObservable, _super);
|
||||
function BoundNodeCallbackObservable(callbackFunc, selector, args, context, scheduler) {
|
||||
_super.call(this);
|
||||
this.callbackFunc = callbackFunc;
|
||||
this.selector = selector;
|
||||
this.args = args;
|
||||
this.context = context;
|
||||
this.scheduler = scheduler;
|
||||
}
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Converts a Node.js-style callback API to a function that returns an
|
||||
* Observable.
|
||||
*
|
||||
* <span class="informal">It's just like {@link bindCallback}, but the
|
||||
* callback is expected to be of type `callback(error, result)`.</span>
|
||||
*
|
||||
* `bindNodeCallback` is not an operator because its input and output are not
|
||||
* Observables. The input is a function `func` with some parameters, but the
|
||||
* last parameter must be a callback function that `func` calls when it is
|
||||
* done. The callback function is expected to follow Node.js conventions,
|
||||
* where the first argument to the callback is an error object, signaling
|
||||
* whether call was successful. If that object is passed to callback, it means
|
||||
* something went wrong.
|
||||
*
|
||||
* The output of `bindNodeCallback` is a function that takes the same
|
||||
* parameters as `func`, except the last one (the callback). When the output
|
||||
* function is called with arguments, it will return an Observable.
|
||||
* If `func` calls its callback with error parameter present, Observable will
|
||||
* error with that value as well. If error parameter is not passed, Observable will emit
|
||||
* second parameter. If there are more parameters (third and so on),
|
||||
* Observable will emit an array with all arguments, except first error argument.
|
||||
*
|
||||
* Optionally `bindNodeCallback` accepts selector function, which allows you to
|
||||
* make resulting Observable emit value computed by selector, instead of regular
|
||||
* callback arguments. It works similarly to {@link bindCallback} selector, but
|
||||
* Node.js-style error argument will never be passed to that function.
|
||||
*
|
||||
* Note that `func` will not be called at the same time output function is,
|
||||
* but rather whenever resulting Observable is subscribed. By default call to
|
||||
* `func` will happen synchronously after subscription, but that can be changed
|
||||
* with proper {@link Scheduler} provided as optional third parameter. Scheduler
|
||||
* can also control when values from callback will be emitted by Observable.
|
||||
* To find out more, check out documentation for {@link bindCallback}, where
|
||||
* Scheduler works exactly the same.
|
||||
*
|
||||
* As in {@link bindCallback}, context (`this` property) of input function will be set to context
|
||||
* of returned function, when it is called.
|
||||
*
|
||||
* After Observable emits value, it will complete immediately. This means
|
||||
* even if `func` calls callback again, values from second and consecutive
|
||||
* calls will never appear on the stream. If you need to handle functions
|
||||
* that call callbacks multiple times, check out {@link fromEvent} or
|
||||
* {@link fromEventPattern} instead.
|
||||
*
|
||||
* Note that `bindNodeCallback` can be used in non-Node.js environments as well.
|
||||
* "Node.js-style" callbacks are just a convention, so if you write for
|
||||
* browsers or any other environment and API you use implements that callback style,
|
||||
* `bindNodeCallback` can be safely used on that API functions as well.
|
||||
*
|
||||
* Remember that Error object passed to callback does not have to be an instance
|
||||
* of JavaScript built-in `Error` object. In fact, it does not even have to an object.
|
||||
* Error parameter of callback function is interpreted as "present", when value
|
||||
* of that parameter is truthy. It could be, for example, non-zero number, non-empty
|
||||
* string or boolean `true`. In all of these cases resulting Observable would error
|
||||
* with that value. This means usually regular style callbacks will fail very often when
|
||||
* `bindNodeCallback` is used. If your Observable errors much more often then you
|
||||
* would expect, check if callback really is called in Node.js-style and, if not,
|
||||
* switch to {@link bindCallback} instead.
|
||||
*
|
||||
* Note that even if error parameter is technically present in callback, but its value
|
||||
* is falsy, it still won't appear in array emitted by Observable or in selector function.
|
||||
*
|
||||
*
|
||||
* @example <caption>Read a file from the filesystem and get the data as an Observable</caption>
|
||||
* import * as fs from 'fs';
|
||||
* var readFileAsObservable = Rx.Observable.bindNodeCallback(fs.readFile);
|
||||
* var result = readFileAsObservable('./roadNames.txt', 'utf8');
|
||||
* result.subscribe(x => console.log(x), e => console.error(e));
|
||||
*
|
||||
*
|
||||
* @example <caption>Use on function calling callback with multiple arguments</caption>
|
||||
* someFunction((err, a, b) => {
|
||||
* console.log(err); // null
|
||||
* console.log(a); // 5
|
||||
* console.log(b); // "some string"
|
||||
* });
|
||||
* var boundSomeFunction = Rx.Observable.bindNodeCallback(someFunction);
|
||||
* boundSomeFunction()
|
||||
* .subscribe(value => {
|
||||
* console.log(value); // [5, "some string"]
|
||||
* });
|
||||
*
|
||||
*
|
||||
* @example <caption>Use with selector function</caption>
|
||||
* someFunction((err, a, b) => {
|
||||
* console.log(err); // undefined
|
||||
* console.log(a); // "abc"
|
||||
* console.log(b); // "DEF"
|
||||
* });
|
||||
* var boundSomeFunction = Rx.Observable.bindNodeCallback(someFunction, (a, b) => a + b);
|
||||
* boundSomeFunction()
|
||||
* .subscribe(value => {
|
||||
* console.log(value); // "abcDEF"
|
||||
* });
|
||||
*
|
||||
*
|
||||
* @example <caption>Use on function calling callback in regular style</caption>
|
||||
* someFunction(a => {
|
||||
* console.log(a); // 5
|
||||
* });
|
||||
* var boundSomeFunction = Rx.Observable.bindNodeCallback(someFunction);
|
||||
* boundSomeFunction()
|
||||
* .subscribe(
|
||||
* value => {} // never gets called
|
||||
* err => console.log(err) // 5
|
||||
*);
|
||||
*
|
||||
*
|
||||
* @see {@link bindCallback}
|
||||
* @see {@link from}
|
||||
* @see {@link fromPromise}
|
||||
*
|
||||
* @param {function} func Function with a Node.js-style callback as the last parameter.
|
||||
* @param {function} [selector] A function which takes the arguments from the
|
||||
* callback and maps those to a value to emit on the output Observable.
|
||||
* @param {Scheduler} [scheduler] The scheduler on which to schedule the
|
||||
* callbacks.
|
||||
* @return {function(...params: *): Observable} A function which returns the
|
||||
* Observable that delivers the same values the Node.js callback would
|
||||
* deliver.
|
||||
* @static true
|
||||
* @name bindNodeCallback
|
||||
* @owner Observable
|
||||
*/
|
||||
BoundNodeCallbackObservable.create = function (func, selector, scheduler) {
|
||||
if (selector === void 0) {
|
||||
selector = undefined;
|
||||
}
|
||||
return function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i - 0] = arguments[_i];
|
||||
}
|
||||
return new BoundNodeCallbackObservable(func, selector, args, this, scheduler);
|
||||
};
|
||||
};
|
||||
/** @deprecated internal use only */ BoundNodeCallbackObservable.prototype._subscribe = function (subscriber) {
|
||||
var callbackFunc = this.callbackFunc;
|
||||
var args = this.args;
|
||||
var scheduler = this.scheduler;
|
||||
var subject = this.subject;
|
||||
if (!scheduler) {
|
||||
if (!subject) {
|
||||
subject = this.subject = new AsyncSubject();
|
||||
var handler = function handlerFn() {
|
||||
var innerArgs = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
innerArgs[_i - 0] = arguments[_i];
|
||||
}
|
||||
var source = handlerFn.source;
|
||||
var selector = source.selector, subject = source.subject;
|
||||
var err = innerArgs.shift();
|
||||
if (err) {
|
||||
subject.error(err);
|
||||
}
|
||||
else if (selector) {
|
||||
var result_1 = tryCatch(selector).apply(this, innerArgs);
|
||||
if (result_1 === errorObject) {
|
||||
subject.error(errorObject.e);
|
||||
}
|
||||
else {
|
||||
subject.next(result_1);
|
||||
subject.complete();
|
||||
}
|
||||
}
|
||||
else {
|
||||
subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
|
||||
subject.complete();
|
||||
}
|
||||
};
|
||||
// use named function instance to avoid closure.
|
||||
handler.source = this;
|
||||
var result = tryCatch(callbackFunc).apply(this.context, args.concat(handler));
|
||||
if (result === errorObject) {
|
||||
subject.error(errorObject.e);
|
||||
}
|
||||
}
|
||||
return subject.subscribe(subscriber);
|
||||
}
|
||||
else {
|
||||
return scheduler.schedule(dispatch, 0, { source: this, subscriber: subscriber, context: this.context });
|
||||
}
|
||||
};
|
||||
return BoundNodeCallbackObservable;
|
||||
}(Observable));
|
||||
function dispatch(state) {
|
||||
var self = this;
|
||||
var source = state.source, subscriber = state.subscriber, context = state.context;
|
||||
// XXX: cast to `any` to access to the private field in `source`.
|
||||
var _a = source, callbackFunc = _a.callbackFunc, args = _a.args, scheduler = _a.scheduler;
|
||||
var subject = source.subject;
|
||||
if (!subject) {
|
||||
subject = source.subject = new AsyncSubject();
|
||||
var handler = function handlerFn() {
|
||||
var innerArgs = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
innerArgs[_i - 0] = arguments[_i];
|
||||
}
|
||||
var source = handlerFn.source;
|
||||
var selector = source.selector, subject = source.subject;
|
||||
var err = innerArgs.shift();
|
||||
if (err) {
|
||||
self.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
|
||||
}
|
||||
else if (selector) {
|
||||
var result_2 = tryCatch(selector).apply(this, innerArgs);
|
||||
if (result_2 === errorObject) {
|
||||
self.add(scheduler.schedule(dispatchError, 0, { err: errorObject.e, subject: subject }));
|
||||
}
|
||||
else {
|
||||
self.add(scheduler.schedule(dispatchNext, 0, { value: result_2, subject: subject }));
|
||||
}
|
||||
}
|
||||
else {
|
||||
var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
|
||||
self.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
|
||||
}
|
||||
};
|
||||
// use named function to pass values in without closure
|
||||
handler.source = source;
|
||||
var result = tryCatch(callbackFunc).apply(context, args.concat(handler));
|
||||
if (result === errorObject) {
|
||||
self.add(scheduler.schedule(dispatchError, 0, { err: errorObject.e, subject: subject }));
|
||||
}
|
||||
}
|
||||
self.add(subject.subscribe(subscriber));
|
||||
}
|
||||
function dispatchNext(arg) {
|
||||
var value = arg.value, subject = arg.subject;
|
||||
subject.next(value);
|
||||
subject.complete();
|
||||
}
|
||||
function dispatchError(arg) {
|
||||
var err = arg.err, subject = arg.subject;
|
||||
subject.error(err);
|
||||
}
|
||||
//# sourceMappingURL=BoundNodeCallbackObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/BoundNodeCallbackObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/BoundNodeCallbackObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"BoundNodeCallbackObservable.js","sourceRoot":"","sources":["../../src/observable/BoundNodeCallbackObservable.ts"],"names":[],"mappings":";;;;;OAAO,EAAE,UAAU,EAAE,MAAM,eAAe;OAKnC,EAAE,QAAQ,EAAE,MAAM,kBAAkB;OACpC,EAAE,WAAW,EAAE,MAAM,qBAAqB;OAC1C,EAAE,YAAY,EAAE,MAAM,iBAAiB;AAE9C;;;;GAIG;AACH;IAAoD,+CAAa;IAoJ/D,qCAAoB,YAAsB,EACtB,QAAkB,EAClB,IAAW,EACX,OAAY,EACb,SAAqB;QACtC,iBAAO,CAAC;QALU,iBAAY,GAAZ,YAAY,CAAU;QACtB,aAAQ,GAAR,QAAQ,CAAU;QAClB,SAAI,GAAJ,IAAI,CAAO;QACX,YAAO,GAAP,OAAO,CAAK;QACb,cAAS,GAAT,SAAS,CAAY;IAExC,CAAC;IA7ID,mCAAmC;IAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4HG;IACI,kCAAM,GAAb,UAAiB,IAAc,EACd,QAAqC,EACrC,SAAsB;QADtB,wBAAqC,GAArC,oBAAqC;QAEpD,MAAM,CAAC;YAAoB,cAAc;iBAAd,WAAc,CAAd,sBAAc,CAAd,IAAc;gBAAd,6BAAc;;YACvC,MAAM,CAAC,IAAI,2BAA2B,CAAI,IAAI,EAAO,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;QACxF,CAAC,CAAC;IACJ,CAAC;IAUD,oCAAoC,CAAC,gDAAU,GAAV,UAAW,UAA+B;QAC7E,IAAM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AAC,CAAC;QACF,uDAAuD;QACjD,OAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;QAE/B,IAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3E,EAAE,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC;YAC3B,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC,EAAE,gBAAO,EAAE,CAAC,CAAC,CAAC;QAClF,CAAC;IACH,CAAC;IAED,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;AAC1C,CAAC;AAMD,sBAAyB,GAAuB;IACtC,qBAAK,EAAE,qBAAO,CAAS;IAC/B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpB,OAAO,CAAC,QAAQ,EAAE,CAAC;AACrB,CAAC;AAMD,uBAA0B,GAAwB;IACxC,iBAAG,EAAE,qBAAO,CAAS;IAC7B,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC"}
|
172
node_modules/rxjs/_esm5/observable/ConnectableObservable.js
generated
vendored
Normal file
172
node_modules/rxjs/_esm5/observable/ConnectableObservable.js
generated
vendored
Normal file
@ -0,0 +1,172 @@
|
||||
/** PURE_IMPORTS_START .._Subject,.._Observable,.._Subscriber,.._Subscription,.._operators_refCount PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { SubjectSubscriber } from '../Subject';
|
||||
import { Observable } from '../Observable';
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { Subscription } from '../Subscription';
|
||||
import { refCount as higherOrderRefCount } from '../operators/refCount';
|
||||
/**
|
||||
* @class ConnectableObservable<T>
|
||||
*/
|
||||
export var ConnectableObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(ConnectableObservable, _super);
|
||||
function ConnectableObservable(/** @deprecated internal use only */ source,
|
||||
/** @deprecated internal use only */ subjectFactory) {
|
||||
_super.call(this);
|
||||
this.source = source;
|
||||
this.subjectFactory = subjectFactory;
|
||||
/** @deprecated internal use only */ this._refCount = 0;
|
||||
this._isComplete = false;
|
||||
}
|
||||
/** @deprecated internal use only */ ConnectableObservable.prototype._subscribe = function (subscriber) {
|
||||
return this.getSubject().subscribe(subscriber);
|
||||
};
|
||||
/** @deprecated internal use only */ ConnectableObservable.prototype.getSubject = function () {
|
||||
var subject = this._subject;
|
||||
if (!subject || subject.isStopped) {
|
||||
this._subject = this.subjectFactory();
|
||||
}
|
||||
return this._subject;
|
||||
};
|
||||
ConnectableObservable.prototype.connect = function () {
|
||||
var connection = this._connection;
|
||||
if (!connection) {
|
||||
this._isComplete = false;
|
||||
connection = this._connection = new Subscription();
|
||||
connection.add(this.source
|
||||
.subscribe(new ConnectableSubscriber(this.getSubject(), this)));
|
||||
if (connection.closed) {
|
||||
this._connection = null;
|
||||
connection = Subscription.EMPTY;
|
||||
}
|
||||
else {
|
||||
this._connection = connection;
|
||||
}
|
||||
}
|
||||
return connection;
|
||||
};
|
||||
ConnectableObservable.prototype.refCount = function () {
|
||||
return higherOrderRefCount()(this);
|
||||
};
|
||||
return ConnectableObservable;
|
||||
}(Observable));
|
||||
var connectableProto = ConnectableObservable.prototype;
|
||||
export var connectableObservableDescriptor = {
|
||||
operator: { value: null },
|
||||
_refCount: { value: 0, writable: true },
|
||||
_subject: { value: null, writable: true },
|
||||
_connection: { value: null, writable: true },
|
||||
_subscribe: { value: connectableProto._subscribe },
|
||||
_isComplete: { value: connectableProto._isComplete, writable: true },
|
||||
getSubject: { value: connectableProto.getSubject },
|
||||
connect: { value: connectableProto.connect },
|
||||
refCount: { value: connectableProto.refCount }
|
||||
};
|
||||
var ConnectableSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(ConnectableSubscriber, _super);
|
||||
function ConnectableSubscriber(destination, connectable) {
|
||||
_super.call(this, destination);
|
||||
this.connectable = connectable;
|
||||
}
|
||||
ConnectableSubscriber.prototype._error = function (err) {
|
||||
this._unsubscribe();
|
||||
_super.prototype._error.call(this, err);
|
||||
};
|
||||
ConnectableSubscriber.prototype._complete = function () {
|
||||
this.connectable._isComplete = true;
|
||||
this._unsubscribe();
|
||||
_super.prototype._complete.call(this);
|
||||
};
|
||||
/** @deprecated internal use only */ ConnectableSubscriber.prototype._unsubscribe = function () {
|
||||
var connectable = this.connectable;
|
||||
if (connectable) {
|
||||
this.connectable = null;
|
||||
var connection = connectable._connection;
|
||||
connectable._refCount = 0;
|
||||
connectable._subject = null;
|
||||
connectable._connection = null;
|
||||
if (connection) {
|
||||
connection.unsubscribe();
|
||||
}
|
||||
}
|
||||
};
|
||||
return ConnectableSubscriber;
|
||||
}(SubjectSubscriber));
|
||||
var RefCountOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function RefCountOperator(connectable) {
|
||||
this.connectable = connectable;
|
||||
}
|
||||
RefCountOperator.prototype.call = function (subscriber, source) {
|
||||
var connectable = this.connectable;
|
||||
connectable._refCount++;
|
||||
var refCounter = new RefCountSubscriber(subscriber, connectable);
|
||||
var subscription = source.subscribe(refCounter);
|
||||
if (!refCounter.closed) {
|
||||
refCounter.connection = connectable.connect();
|
||||
}
|
||||
return subscription;
|
||||
};
|
||||
return RefCountOperator;
|
||||
}());
|
||||
var RefCountSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(RefCountSubscriber, _super);
|
||||
function RefCountSubscriber(destination, connectable) {
|
||||
_super.call(this, destination);
|
||||
this.connectable = connectable;
|
||||
}
|
||||
/** @deprecated internal use only */ RefCountSubscriber.prototype._unsubscribe = function () {
|
||||
var connectable = this.connectable;
|
||||
if (!connectable) {
|
||||
this.connection = null;
|
||||
return;
|
||||
}
|
||||
this.connectable = null;
|
||||
var refCount = connectable._refCount;
|
||||
if (refCount <= 0) {
|
||||
this.connection = null;
|
||||
return;
|
||||
}
|
||||
connectable._refCount = refCount - 1;
|
||||
if (refCount > 1) {
|
||||
this.connection = null;
|
||||
return;
|
||||
}
|
||||
///
|
||||
// Compare the local RefCountSubscriber's connection Subscription to the
|
||||
// connection Subscription on the shared ConnectableObservable. In cases
|
||||
// where the ConnectableObservable source synchronously emits values, and
|
||||
// the RefCountSubscriber's downstream Observers synchronously unsubscribe,
|
||||
// execution continues to here before the RefCountOperator has a chance to
|
||||
// supply the RefCountSubscriber with the shared connection Subscription.
|
||||
// For example:
|
||||
// ```
|
||||
// Observable.range(0, 10)
|
||||
// .publish()
|
||||
// .refCount()
|
||||
// .take(5)
|
||||
// .subscribe();
|
||||
// ```
|
||||
// In order to account for this case, RefCountSubscriber should only dispose
|
||||
// the ConnectableObservable's shared connection Subscription if the
|
||||
// connection Subscription exists, *and* either:
|
||||
// a. RefCountSubscriber doesn't have a reference to the shared connection
|
||||
// Subscription yet, or,
|
||||
// b. RefCountSubscriber's connection Subscription reference is identical
|
||||
// to the shared connection Subscription
|
||||
///
|
||||
var connection = this.connection;
|
||||
var sharedConnection = connectable._connection;
|
||||
this.connection = null;
|
||||
if (sharedConnection && (!connection || sharedConnection === connection)) {
|
||||
sharedConnection.unsubscribe();
|
||||
}
|
||||
};
|
||||
return RefCountSubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=ConnectableObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/ConnectableObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/ConnectableObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"ConnectableObservable.js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QAChD,4EAA4E;QAC5E,6BAA6B;QAC7B,2EAA2E;QAC3E,6CAA6C;QAC7C,GAAG;QACK,gCAAU,CAAU;QAC5B,IAAM,gBAAgB,GAAU,WAAY,CAAC,WAAW,CAAC;QACzD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QAEvB,EAAE,CAAC,CAAC,gBAAgB,IAAI,CAAC,CAAC,UAAU,IAAI,gBAAgB,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC;YACzE,gBAAgB,CAAC,WAAW,EAAE,CAAC;QACjC,CAAC;IACH,CAAC;IACH,yBAAC;AAAD,CAAC,AA7DD,CAAoC,UAAU,GA6D7C"}
|
100
node_modules/rxjs/_esm5/observable/DeferObservable.js
generated
vendored
Normal file
100
node_modules/rxjs/_esm5/observable/DeferObservable.js
generated
vendored
Normal file
@ -0,0 +1,100 @@
|
||||
/** PURE_IMPORTS_START .._Observable,.._util_subscribeToResult,.._OuterSubscriber PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var DeferObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(DeferObservable, _super);
|
||||
function DeferObservable(observableFactory) {
|
||||
_super.call(this);
|
||||
this.observableFactory = observableFactory;
|
||||
}
|
||||
/**
|
||||
* Creates an Observable that, on subscribe, calls an Observable factory to
|
||||
* make an Observable for each new Observer.
|
||||
*
|
||||
* <span class="informal">Creates the Observable lazily, that is, only when it
|
||||
* is subscribed.
|
||||
* </span>
|
||||
*
|
||||
* <img src="./img/defer.png" width="100%">
|
||||
*
|
||||
* `defer` allows you to create the Observable only when the Observer
|
||||
* subscribes, and create a fresh Observable for each Observer. It waits until
|
||||
* an Observer subscribes to it, and then it generates an Observable,
|
||||
* typically with an Observable factory function. It does this afresh for each
|
||||
* subscriber, so although each subscriber may think it is subscribing to the
|
||||
* same Observable, in fact each subscriber gets its own individual
|
||||
* Observable.
|
||||
*
|
||||
* @example <caption>Subscribe to either an Observable of clicks or an Observable of interval, at random</caption>
|
||||
* var clicksOrInterval = Rx.Observable.defer(function () {
|
||||
* if (Math.random() > 0.5) {
|
||||
* return Rx.Observable.fromEvent(document, 'click');
|
||||
* } else {
|
||||
* return Rx.Observable.interval(1000);
|
||||
* }
|
||||
* });
|
||||
* clicksOrInterval.subscribe(x => console.log(x));
|
||||
*
|
||||
* // Results in the following behavior:
|
||||
* // If the result of Math.random() is greater than 0.5 it will listen
|
||||
* // for clicks anywhere on the "document"; when document is clicked it
|
||||
* // will log a MouseEvent object to the console. If the result is less
|
||||
* // than 0.5 it will emit ascending numbers, one every second(1000ms).
|
||||
*
|
||||
* @see {@link create}
|
||||
*
|
||||
* @param {function(): SubscribableOrPromise} observableFactory The Observable
|
||||
* factory function to invoke for each Observer that subscribes to the output
|
||||
* Observable. May also return a Promise, which will be converted on the fly
|
||||
* to an Observable.
|
||||
* @return {Observable} An Observable whose Observers' subscriptions trigger
|
||||
* an invocation of the given Observable factory function.
|
||||
* @static true
|
||||
* @name defer
|
||||
* @owner Observable
|
||||
*/
|
||||
DeferObservable.create = function (observableFactory) {
|
||||
return new DeferObservable(observableFactory);
|
||||
};
|
||||
/** @deprecated internal use only */ DeferObservable.prototype._subscribe = function (subscriber) {
|
||||
return new DeferSubscriber(subscriber, this.observableFactory);
|
||||
};
|
||||
return DeferObservable;
|
||||
}(Observable));
|
||||
var DeferSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(DeferSubscriber, _super);
|
||||
function DeferSubscriber(destination, factory) {
|
||||
_super.call(this, destination);
|
||||
this.factory = factory;
|
||||
this.tryDefer();
|
||||
}
|
||||
DeferSubscriber.prototype.tryDefer = function () {
|
||||
try {
|
||||
this._callFactory();
|
||||
}
|
||||
catch (err) {
|
||||
this._error(err);
|
||||
}
|
||||
};
|
||||
DeferSubscriber.prototype._callFactory = function () {
|
||||
var result = this.factory();
|
||||
if (result) {
|
||||
this.add(subscribeToResult(this, result));
|
||||
}
|
||||
};
|
||||
return DeferSubscriber;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=DeferObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/DeferObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/DeferObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"DeferObservable.js","sourceRoot":"","sources":["../../src/observable/DeferObservable.ts"],"names":[],"mappings":";;;;;OAAO,EAAE,UAAU,EAAyB,MAAM,eAAe;OAI1D,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;OACtD,EAAE,eAAe,EAAE,MAAM,oBAAoB;AACpD;;;;GAIG;AACH;IAAwC,mCAAa;IAoDnD,yBAAoB,iBAAwD;QAC1E,iBAAO,CAAC;QADU,sBAAiB,GAAjB,iBAAiB,CAAuC;IAE5E,CAAC;IApDD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6CG;IACI,sBAAM,GAAb,UAAiB,iBAAwD;QACvE,MAAM,CAAC,IAAI,eAAe,CAAC,iBAAiB,CAAC,CAAC;IAChD,CAAC;IAMD,oCAAoC,CAAC,oCAAU,GAAV,UAAW,UAAyB;QACvE,MAAM,CAAC,IAAI,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;IACjE,CAAC;IACH,sBAAC;AAAD,CAAC,AA3DD,CAAwC,UAAU,GA2DjD;AAED;IAAiC,mCAAqB;IACpD,yBAAY,WAA0B,EAClB,OAA8C;QAChE,kBAAM,WAAW,CAAC,CAAC;QADD,YAAO,GAAP,OAAO,CAAuC;QAEhE,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;IAEO,kCAAQ,GAAhB;QACE,IAAI,CAAC;YACH,IAAI,CAAC,YAAY,EAAE,CAAC;QACtB,CAAE;QAAA,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACb,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IAEO,sCAAY,GAApB;QACE,IAAM,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC9B,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YACX,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AArBD,CAAiC,eAAe,GAqB/C"}
|
82
node_modules/rxjs/_esm5/observable/EmptyObservable.js
generated
vendored
Normal file
82
node_modules/rxjs/_esm5/observable/EmptyObservable.js
generated
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
/** PURE_IMPORTS_START .._Observable PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var EmptyObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(EmptyObservable, _super);
|
||||
function EmptyObservable(scheduler) {
|
||||
_super.call(this);
|
||||
this.scheduler = scheduler;
|
||||
}
|
||||
/**
|
||||
* Creates an Observable that emits no items to the Observer and immediately
|
||||
* emits a complete notification.
|
||||
*
|
||||
* <span class="informal">Just emits 'complete', and nothing else.
|
||||
* </span>
|
||||
*
|
||||
* <img src="./img/empty.png" width="100%">
|
||||
*
|
||||
* This static operator is useful for creating a simple Observable that only
|
||||
* emits the complete notification. It can be used for composing with other
|
||||
* Observables, such as in a {@link mergeMap}.
|
||||
*
|
||||
* @example <caption>Emit the number 7, then complete.</caption>
|
||||
* var result = Rx.Observable.empty().startWith(7);
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* @example <caption>Map and flatten only odd numbers to the sequence 'a', 'b', 'c'</caption>
|
||||
* var interval = Rx.Observable.interval(1000);
|
||||
* var result = interval.mergeMap(x =>
|
||||
* x % 2 === 1 ? Rx.Observable.of('a', 'b', 'c') : Rx.Observable.empty()
|
||||
* );
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* // Results in the following to the console:
|
||||
* // x is equal to the count on the interval eg(0,1,2,3,...)
|
||||
* // x will occur every 1000ms
|
||||
* // if x % 2 is equal to 1 print abc
|
||||
* // if x % 2 is not equal to 1 nothing will be output
|
||||
*
|
||||
* @see {@link create}
|
||||
* @see {@link never}
|
||||
* @see {@link of}
|
||||
* @see {@link throw}
|
||||
*
|
||||
* @param {Scheduler} [scheduler] A {@link IScheduler} to use for scheduling
|
||||
* the emission of the complete notification.
|
||||
* @return {Observable} An "empty" Observable: emits only the complete
|
||||
* notification.
|
||||
* @static true
|
||||
* @name empty
|
||||
* @owner Observable
|
||||
*/
|
||||
EmptyObservable.create = function (scheduler) {
|
||||
return new EmptyObservable(scheduler);
|
||||
};
|
||||
EmptyObservable.dispatch = function (arg) {
|
||||
var subscriber = arg.subscriber;
|
||||
subscriber.complete();
|
||||
};
|
||||
/** @deprecated internal use only */ EmptyObservable.prototype._subscribe = function (subscriber) {
|
||||
var scheduler = this.scheduler;
|
||||
if (scheduler) {
|
||||
return scheduler.schedule(EmptyObservable.dispatch, 0, { subscriber: subscriber });
|
||||
}
|
||||
else {
|
||||
subscriber.complete();
|
||||
}
|
||||
};
|
||||
return EmptyObservable;
|
||||
}(Observable));
|
||||
//# sourceMappingURL=EmptyObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/EmptyObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/EmptyObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"EmptyObservable.js","sourceRoot":"","sources":["../../src/observable/EmptyObservable.ts"],"names":[],"mappings":";;;;;OAEO,EAAE,UAAU,EAAE,MAAM,eAAe;AAO1C;;;;GAIG;AACH;IAAwC,mCAAa;IAsDnD,yBAAoB,SAAsB;QACxC,iBAAO,CAAC;QADU,cAAS,GAAT,SAAS,CAAa;IAE1C,CAAC;IAtDD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACI,sBAAM,GAAb,UAAiB,SAAsB;QACrC,MAAM,CAAC,IAAI,eAAe,CAAI,SAAS,CAAC,CAAC;IAC3C,CAAC;IAEM,wBAAQ,GAAf,UAAmB,GAAmB;QAC5B,+BAAU,CAAS;QAC3B,UAAU,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;IAMD,oCAAoC,CAAC,oCAAU,GAAV,UAAW,UAAyB;QAEvE,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAEjC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;YACd,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,sBAAU,EAAE,CAAC,CAAC;QACzE,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AApED,CAAwC,UAAU,GAoEjD"}
|
84
node_modules/rxjs/_esm5/observable/ErrorObservable.js
generated
vendored
Normal file
84
node_modules/rxjs/_esm5/observable/ErrorObservable.js
generated
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
/** PURE_IMPORTS_START .._Observable PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var ErrorObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(ErrorObservable, _super);
|
||||
function ErrorObservable(error, scheduler) {
|
||||
_super.call(this);
|
||||
this.error = error;
|
||||
this.scheduler = scheduler;
|
||||
}
|
||||
/**
|
||||
* Creates an Observable that emits no items to the Observer and immediately
|
||||
* emits an error notification.
|
||||
*
|
||||
* <span class="informal">Just emits 'error', and nothing else.
|
||||
* </span>
|
||||
*
|
||||
* <img src="./img/throw.png" width="100%">
|
||||
*
|
||||
* This static operator is useful for creating a simple Observable that only
|
||||
* emits the error notification. It can be used for composing with other
|
||||
* Observables, such as in a {@link mergeMap}.
|
||||
*
|
||||
* @example <caption>Emit the number 7, then emit an error.</caption>
|
||||
* var result = Rx.Observable.throw(new Error('oops!')).startWith(7);
|
||||
* result.subscribe(x => console.log(x), e => console.error(e));
|
||||
*
|
||||
* @example <caption>Map and flatten numbers to the sequence 'a', 'b', 'c', but throw an error for 13</caption>
|
||||
* var interval = Rx.Observable.interval(1000);
|
||||
* var result = interval.mergeMap(x =>
|
||||
* x === 13 ?
|
||||
* Rx.Observable.throw('Thirteens are bad') :
|
||||
* Rx.Observable.of('a', 'b', 'c')
|
||||
* );
|
||||
* result.subscribe(x => console.log(x), e => console.error(e));
|
||||
*
|
||||
* @see {@link create}
|
||||
* @see {@link empty}
|
||||
* @see {@link never}
|
||||
* @see {@link of}
|
||||
*
|
||||
* @param {any} error The particular Error to pass to the error notification.
|
||||
* @param {Scheduler} [scheduler] A {@link IScheduler} to use for scheduling
|
||||
* the emission of the error notification.
|
||||
* @return {Observable} An error Observable: emits only the error notification
|
||||
* using the given error argument.
|
||||
* @static true
|
||||
* @name throw
|
||||
* @owner Observable
|
||||
*/
|
||||
ErrorObservable.create = function (error, scheduler) {
|
||||
return new ErrorObservable(error, scheduler);
|
||||
};
|
||||
ErrorObservable.dispatch = function (arg) {
|
||||
var error = arg.error, subscriber = arg.subscriber;
|
||||
subscriber.error(error);
|
||||
};
|
||||
/** @deprecated internal use only */ ErrorObservable.prototype._subscribe = function (subscriber) {
|
||||
var error = this.error;
|
||||
var scheduler = this.scheduler;
|
||||
subscriber.syncErrorThrowable = true;
|
||||
if (scheduler) {
|
||||
return scheduler.schedule(ErrorObservable.dispatch, 0, {
|
||||
error: error, subscriber: subscriber
|
||||
});
|
||||
}
|
||||
else {
|
||||
subscriber.error(error);
|
||||
}
|
||||
};
|
||||
return ErrorObservable;
|
||||
}(Observable));
|
||||
//# sourceMappingURL=ErrorObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/ErrorObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/ErrorObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"ErrorObservable.js","sourceRoot":"","sources":["../../src/observable/ErrorObservable.ts"],"names":[],"mappings":";;;;;OACO,EAAE,UAAU,EAAE,MAAM,eAAe;AAS1C;;;;GAIG;AACH;IAAqC,mCAAe;IAmDlD,yBAAmB,KAAU,EAAU,SAAsB;QAC3D,iBAAO,CAAC;QADS,UAAK,GAAL,KAAK,CAAK;QAAU,cAAS,GAAT,SAAS,CAAa;IAE7D,CAAC;IAnDD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACI,sBAAM,GAAb,UAAc,KAAU,EAAE,SAAsB;QAC9C,MAAM,CAAC,IAAI,eAAe,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAC/C,CAAC;IAEM,wBAAQ,GAAf,UAAgB,GAAgB;QACtB,qBAAK,EAAE,2BAAU,CAAS;QAClC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAMD,oCAAoC,CAAC,oCAAU,GAAV,UAAW,UAA2B;QACzE,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAEjC,UAAU,CAAC,kBAAkB,GAAG,IAAI,CAAC;QAErC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;YACd,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,EAAE;gBACrD,YAAK,EAAE,sBAAU;aAClB,CAAC,CAAC;QACL,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AArED,CAAqC,UAAU,GAqE9C"}
|
203
node_modules/rxjs/_esm5/observable/ForkJoinObservable.js
generated
vendored
Normal file
203
node_modules/rxjs/_esm5/observable/ForkJoinObservable.js
generated
vendored
Normal file
@ -0,0 +1,203 @@
|
||||
/** PURE_IMPORTS_START .._Observable,._EmptyObservable,.._util_isArray,.._util_subscribeToResult,.._OuterSubscriber PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
import { EmptyObservable } from './EmptyObservable';
|
||||
import { isArray } from '../util/isArray';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var ForkJoinObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(ForkJoinObservable, _super);
|
||||
function ForkJoinObservable(sources, resultSelector) {
|
||||
_super.call(this);
|
||||
this.sources = sources;
|
||||
this.resultSelector = resultSelector;
|
||||
}
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Joins last values emitted by passed Observables.
|
||||
*
|
||||
* <span class="informal">Wait for Observables to complete and then combine last values they emitted.</span>
|
||||
*
|
||||
* <img src="./img/forkJoin.png" width="100%">
|
||||
*
|
||||
* `forkJoin` is an operator that takes any number of Observables which can be passed either as an array
|
||||
* or directly as arguments. If no input Observables are provided, resulting stream will complete
|
||||
* immediately.
|
||||
*
|
||||
* `forkJoin` will wait for all passed Observables to complete and then it will emit an array with last
|
||||
* values from corresponding Observables. So if you pass `n` Observables to the operator, resulting
|
||||
* array will have `n` values, where first value is the last thing emitted by the first Observable,
|
||||
* second value is the last thing emitted by the second Observable and so on. That means `forkJoin` will
|
||||
* not emit more than once and it will complete after that. If you need to emit combined values not only
|
||||
* at the end of lifecycle of passed Observables, but also throughout it, try out {@link combineLatest}
|
||||
* or {@link zip} instead.
|
||||
*
|
||||
* In order for resulting array to have the same length as the number of input Observables, whenever any of
|
||||
* that Observables completes without emitting any value, `forkJoin` will complete at that moment as well
|
||||
* and it will not emit anything either, even if it already has some last values from other Observables.
|
||||
* Conversely, if there is an Observable that never completes, `forkJoin` will never complete as well,
|
||||
* unless at any point some other Observable completes without emitting value, which brings us back to
|
||||
* the previous case. Overall, in order for `forkJoin` to emit a value, all Observables passed as arguments
|
||||
* have to emit something at least once and complete.
|
||||
*
|
||||
* If any input Observable errors at some point, `forkJoin` will error as well and all other Observables
|
||||
* will be immediately unsubscribed.
|
||||
*
|
||||
* Optionally `forkJoin` accepts project function, that will be called with values which normally
|
||||
* would land in emitted array. Whatever is returned by project function, will appear in output
|
||||
* Observable instead. This means that default project can be thought of as a function that takes
|
||||
* all its arguments and puts them into an array. Note that project function will be called only
|
||||
* when output Observable is supposed to emit a result.
|
||||
*
|
||||
* @example <caption>Use forkJoin with operator emitting immediately</caption>
|
||||
* const observable = Rx.Observable.forkJoin(
|
||||
* Rx.Observable.of(1, 2, 3, 4),
|
||||
* Rx.Observable.of(5, 6, 7, 8)
|
||||
* );
|
||||
* observable.subscribe(
|
||||
* value => console.log(value),
|
||||
* err => {},
|
||||
* () => console.log('This is how it ends!')
|
||||
* );
|
||||
*
|
||||
* // Logs:
|
||||
* // [4, 8]
|
||||
* // "This is how it ends!"
|
||||
*
|
||||
*
|
||||
* @example <caption>Use forkJoin with operator emitting after some time</caption>
|
||||
* const observable = Rx.Observable.forkJoin(
|
||||
* Rx.Observable.interval(1000).take(3), // emit 0, 1, 2 every second and complete
|
||||
* Rx.Observable.interval(500).take(4) // emit 0, 1, 2, 3 every half a second and complete
|
||||
* );
|
||||
* observable.subscribe(
|
||||
* value => console.log(value),
|
||||
* err => {},
|
||||
* () => console.log('This is how it ends!')
|
||||
* );
|
||||
*
|
||||
* // Logs:
|
||||
* // [2, 3] after 3 seconds
|
||||
* // "This is how it ends!" immediately after
|
||||
*
|
||||
*
|
||||
* @example <caption>Use forkJoin with project function</caption>
|
||||
* const observable = Rx.Observable.forkJoin(
|
||||
* Rx.Observable.interval(1000).take(3), // emit 0, 1, 2 every second and complete
|
||||
* Rx.Observable.interval(500).take(4), // emit 0, 1, 2, 3 every half a second and complete
|
||||
* (n, m) => n + m
|
||||
* );
|
||||
* observable.subscribe(
|
||||
* value => console.log(value),
|
||||
* err => {},
|
||||
* () => console.log('This is how it ends!')
|
||||
* );
|
||||
*
|
||||
* // Logs:
|
||||
* // 5 after 3 seconds
|
||||
* // "This is how it ends!" immediately after
|
||||
*
|
||||
* @see {@link combineLatest}
|
||||
* @see {@link zip}
|
||||
*
|
||||
* @param {...SubscribableOrPromise} sources Any number of Observables provided either as an array or as an arguments
|
||||
* passed directly to the operator.
|
||||
* @param {function} [project] Function that takes values emitted by input Observables and returns value
|
||||
* that will appear in resulting Observable instead of default array.
|
||||
* @return {Observable} Observable emitting either an array of last values emitted by passed Observables
|
||||
* or value from project function.
|
||||
* @static true
|
||||
* @name forkJoin
|
||||
* @owner Observable
|
||||
*/
|
||||
ForkJoinObservable.create = function () {
|
||||
var sources = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
sources[_i - 0] = arguments[_i];
|
||||
}
|
||||
if (sources === null || arguments.length === 0) {
|
||||
return new EmptyObservable();
|
||||
}
|
||||
var resultSelector = null;
|
||||
if (typeof sources[sources.length - 1] === 'function') {
|
||||
resultSelector = sources.pop();
|
||||
}
|
||||
// if the first and only other argument besides the resultSelector is an array
|
||||
// assume it's been called with `forkJoin([obs1, obs2, obs3], resultSelector)`
|
||||
if (sources.length === 1 && isArray(sources[0])) {
|
||||
sources = sources[0];
|
||||
}
|
||||
if (sources.length === 0) {
|
||||
return new EmptyObservable();
|
||||
}
|
||||
return new ForkJoinObservable(sources, resultSelector);
|
||||
};
|
||||
/** @deprecated internal use only */ ForkJoinObservable.prototype._subscribe = function (subscriber) {
|
||||
return new ForkJoinSubscriber(subscriber, this.sources, this.resultSelector);
|
||||
};
|
||||
return ForkJoinObservable;
|
||||
}(Observable));
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var ForkJoinSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(ForkJoinSubscriber, _super);
|
||||
function ForkJoinSubscriber(destination, sources, resultSelector) {
|
||||
_super.call(this, destination);
|
||||
this.sources = sources;
|
||||
this.resultSelector = resultSelector;
|
||||
this.completed = 0;
|
||||
this.haveValues = 0;
|
||||
var len = sources.length;
|
||||
this.total = len;
|
||||
this.values = new Array(len);
|
||||
for (var i = 0; i < len; i++) {
|
||||
var source = sources[i];
|
||||
var innerSubscription = subscribeToResult(this, source, null, i);
|
||||
if (innerSubscription) {
|
||||
innerSubscription.outerIndex = i;
|
||||
this.add(innerSubscription);
|
||||
}
|
||||
}
|
||||
}
|
||||
ForkJoinSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
this.values[outerIndex] = innerValue;
|
||||
if (!innerSub._hasValue) {
|
||||
innerSub._hasValue = true;
|
||||
this.haveValues++;
|
||||
}
|
||||
};
|
||||
ForkJoinSubscriber.prototype.notifyComplete = function (innerSub) {
|
||||
var destination = this.destination;
|
||||
var _a = this, haveValues = _a.haveValues, resultSelector = _a.resultSelector, values = _a.values;
|
||||
var len = values.length;
|
||||
if (!innerSub._hasValue) {
|
||||
destination.complete();
|
||||
return;
|
||||
}
|
||||
this.completed++;
|
||||
if (this.completed !== len) {
|
||||
return;
|
||||
}
|
||||
if (haveValues === len) {
|
||||
var value = resultSelector ? resultSelector.apply(this, values) : values;
|
||||
destination.next(value);
|
||||
}
|
||||
destination.complete();
|
||||
};
|
||||
return ForkJoinSubscriber;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=ForkJoinObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/ForkJoinObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/ForkJoinObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"ForkJoinObservable.js","sourceRoot":"","sources":["../../src/observable/ForkJoinObservable.ts"],"names":[],"mappings":";;;;;OAAO,EAAE,UAAU,EAAyB,MAAM,eAAe;OAG1D,EAAE,eAAe,EAAE,MAAM,mBAAmB;OAC5C,EAAE,OAAO,EAAE,MAAM,iBAAiB;OAElC,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;OACtD,EAAE,eAAe,EAAE,MAAM,oBAAoB;AAGpD;;;;GAIG;AACH;IAA2C,sCAA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YACjC,IAAI,CAAC,UAAU,EAAE,CAAC;QACpB,CAAC;IACH,CAAC;IAED,2CAAc,GAAd,UAAe,QAA+B;QAC5C,IAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACrC,IAAA,SAAmD,EAA3C,0BAAU,EAAE,kCAAc,EAAE,kBAAM,CAAU;QACpD,IAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;QAE1B,EAAE,CAAC,CAAC,CAAO,QAAS,CAAC,SAAS,CAAC,CAAC,CAAC;YAC/B,WAAW,CAAC,QAAQ,EAAE,CAAC;YACvB,MAAM,CAAC;QACT,CAAC;QAED,IAAI,CAAC,SAAS,EAAE,CAAC;QAEjB,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,GAAG,CAAC,CAAC,CAAC;YAC3B,MAAM,CAAC;QACT,CAAC;QAED,EAAE,CAAC,CAAC,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC;YACvB,IAAM,KAAK,GAAG,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;YAC3E,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;QAED,WAAW,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;IACH,yBAAC;AAAD,CAAC,AA3DD,CAAoC,eAAe,GA2DlD"}
|
217
node_modules/rxjs/_esm5/observable/FromEventObservable.js
generated
vendored
Normal file
217
node_modules/rxjs/_esm5/observable/FromEventObservable.js
generated
vendored
Normal file
@ -0,0 +1,217 @@
|
||||
/** PURE_IMPORTS_START .._Observable,.._util_tryCatch,.._util_isFunction,.._util_errorObject,.._Subscription PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
import { tryCatch } from '../util/tryCatch';
|
||||
import { isFunction } from '../util/isFunction';
|
||||
import { errorObject } from '../util/errorObject';
|
||||
import { Subscription } from '../Subscription';
|
||||
var toString = Object.prototype.toString;
|
||||
function isNodeStyleEventEmitter(sourceObj) {
|
||||
return !!sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';
|
||||
}
|
||||
function isJQueryStyleEventEmitter(sourceObj) {
|
||||
return !!sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';
|
||||
}
|
||||
function isNodeList(sourceObj) {
|
||||
return !!sourceObj && toString.call(sourceObj) === '[object NodeList]';
|
||||
}
|
||||
function isHTMLCollection(sourceObj) {
|
||||
return !!sourceObj && toString.call(sourceObj) === '[object HTMLCollection]';
|
||||
}
|
||||
function isEventTarget(sourceObj) {
|
||||
return !!sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';
|
||||
}
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var FromEventObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(FromEventObservable, _super);
|
||||
function FromEventObservable(sourceObj, eventName, selector, options) {
|
||||
_super.call(this);
|
||||
this.sourceObj = sourceObj;
|
||||
this.eventName = eventName;
|
||||
this.selector = selector;
|
||||
this.options = options;
|
||||
}
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Creates an Observable that emits events of a specific type coming from the
|
||||
* given event target.
|
||||
*
|
||||
* <span class="informal">Creates an Observable from DOM events, or Node.js
|
||||
* EventEmitter events or others.</span>
|
||||
*
|
||||
* <img src="./img/fromEvent.png" width="100%">
|
||||
*
|
||||
* `fromEvent` accepts as a first argument event target, which is an object with methods
|
||||
* for registering event handler functions. As a second argument it takes string that indicates
|
||||
* type of event we want to listen for. `fromEvent` supports selected types of event targets,
|
||||
* which are described in detail below. If your event target does not match any of the ones listed,
|
||||
* you should use {@link fromEventPattern}, which can be used on arbitrary APIs.
|
||||
* When it comes to APIs supported by `fromEvent`, their methods for adding and removing event
|
||||
* handler functions have different names, but they all accept a string describing event type
|
||||
* and function itself, which will be called whenever said event happens.
|
||||
*
|
||||
* Every time resulting Observable is subscribed, event handler function will be registered
|
||||
* to event target on given event type. When that event fires, value
|
||||
* passed as a first argument to registered function will be emitted by output Observable.
|
||||
* When Observable is unsubscribed, function will be unregistered from event target.
|
||||
*
|
||||
* Note that if event target calls registered function with more than one argument, second
|
||||
* and following arguments will not appear in resulting stream. In order to get access to them,
|
||||
* you can pass to `fromEvent` optional project function, which will be called with all arguments
|
||||
* passed to event handler. Output Observable will then emit value returned by project function,
|
||||
* instead of the usual value.
|
||||
*
|
||||
* Remember that event targets listed below are checked via duck typing. It means that
|
||||
* no matter what kind of object you have and no matter what environment you work in,
|
||||
* you can safely use `fromEvent` on that object if it exposes described methods (provided
|
||||
* of course they behave as was described above). So for example if Node.js library exposes
|
||||
* event target which has the same method names as DOM EventTarget, `fromEvent` is still
|
||||
* a good choice.
|
||||
*
|
||||
* If the API you use is more callback then event handler oriented (subscribed
|
||||
* callback function fires only once and thus there is no need to manually
|
||||
* unregister it), you should use {@link bindCallback} or {@link bindNodeCallback}
|
||||
* instead.
|
||||
*
|
||||
* `fromEvent` supports following types of event targets:
|
||||
*
|
||||
* **DOM EventTarget**
|
||||
*
|
||||
* This is an object with `addEventListener` and `removeEventListener` methods.
|
||||
*
|
||||
* In the browser, `addEventListener` accepts - apart from event type string and event
|
||||
* handler function arguments - optional third parameter, which is either an object or boolean,
|
||||
* both used for additional configuration how and when passed function will be called. When
|
||||
* `fromEvent` is used with event target of that type, you can provide this values
|
||||
* as third parameter as well.
|
||||
*
|
||||
* **Node.js EventEmitter**
|
||||
*
|
||||
* An object with `addListener` and `removeListener` methods.
|
||||
*
|
||||
* **JQuery-style event target**
|
||||
*
|
||||
* An object with `on` and `off` methods
|
||||
*
|
||||
* **DOM NodeList**
|
||||
*
|
||||
* List of DOM Nodes, returned for example by `document.querySelectorAll` or `Node.childNodes`.
|
||||
*
|
||||
* Although this collection is not event target in itself, `fromEvent` will iterate over all Nodes
|
||||
* it contains and install event handler function in every of them. When returned Observable
|
||||
* is unsubscribed, function will be removed from all Nodes.
|
||||
*
|
||||
* **DOM HtmlCollection**
|
||||
*
|
||||
* Just as in case of NodeList it is a collection of DOM nodes. Here as well event handler function is
|
||||
* installed and removed in each of elements.
|
||||
*
|
||||
*
|
||||
* @example <caption>Emits clicks happening on the DOM document</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* clicks.subscribe(x => console.log(x));
|
||||
*
|
||||
* // Results in:
|
||||
* // MouseEvent object logged to console every time a click
|
||||
* // occurs on the document.
|
||||
*
|
||||
*
|
||||
* @example <caption>Use addEventListener with capture option</caption>
|
||||
* var clicksInDocument = Rx.Observable.fromEvent(document, 'click', true); // note optional configuration parameter
|
||||
* // which will be passed to addEventListener
|
||||
* var clicksInDiv = Rx.Observable.fromEvent(someDivInDocument, 'click');
|
||||
*
|
||||
* clicksInDocument.subscribe(() => console.log('document'));
|
||||
* clicksInDiv.subscribe(() => console.log('div'));
|
||||
*
|
||||
* // By default events bubble UP in DOM tree, so normally
|
||||
* // when we would click on div in document
|
||||
* // "div" would be logged first and then "document".
|
||||
* // Since we specified optional `capture` option, document
|
||||
* // will catch event when it goes DOWN DOM tree, so console
|
||||
* // will log "document" and then "div".
|
||||
*
|
||||
* @see {@link bindCallback}
|
||||
* @see {@link bindNodeCallback}
|
||||
* @see {@link fromEventPattern}
|
||||
*
|
||||
* @param {EventTargetLike} target The DOM EventTarget, Node.js
|
||||
* EventEmitter, JQuery-like event target, NodeList or HTMLCollection to attach the event handler to.
|
||||
* @param {string} eventName The event name of interest, being emitted by the
|
||||
* `target`.
|
||||
* @param {EventListenerOptions} [options] Options to pass through to addEventListener
|
||||
* @param {SelectorMethodSignature<T>} [selector] An optional function to
|
||||
* post-process results. It takes the arguments from the event handler and
|
||||
* should return a single value.
|
||||
* @return {Observable<T>}
|
||||
* @static true
|
||||
* @name fromEvent
|
||||
* @owner Observable
|
||||
*/
|
||||
FromEventObservable.create = function (target, eventName, options, selector) {
|
||||
if (isFunction(options)) {
|
||||
selector = options;
|
||||
options = undefined;
|
||||
}
|
||||
return new FromEventObservable(target, eventName, selector, options);
|
||||
};
|
||||
FromEventObservable.setupSubscription = function (sourceObj, eventName, handler, subscriber, options) {
|
||||
var unsubscribe;
|
||||
if (isNodeList(sourceObj) || isHTMLCollection(sourceObj)) {
|
||||
for (var i = 0, len = sourceObj.length; i < len; i++) {
|
||||
FromEventObservable.setupSubscription(sourceObj[i], eventName, handler, subscriber, options);
|
||||
}
|
||||
}
|
||||
else if (isEventTarget(sourceObj)) {
|
||||
var source_1 = sourceObj;
|
||||
sourceObj.addEventListener(eventName, handler, options);
|
||||
unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); };
|
||||
}
|
||||
else if (isJQueryStyleEventEmitter(sourceObj)) {
|
||||
var source_2 = sourceObj;
|
||||
sourceObj.on(eventName, handler);
|
||||
unsubscribe = function () { return source_2.off(eventName, handler); };
|
||||
}
|
||||
else if (isNodeStyleEventEmitter(sourceObj)) {
|
||||
var source_3 = sourceObj;
|
||||
sourceObj.addListener(eventName, handler);
|
||||
unsubscribe = function () { return source_3.removeListener(eventName, handler); };
|
||||
}
|
||||
else {
|
||||
throw new TypeError('Invalid event target');
|
||||
}
|
||||
subscriber.add(new Subscription(unsubscribe));
|
||||
};
|
||||
/** @deprecated internal use only */ FromEventObservable.prototype._subscribe = function (subscriber) {
|
||||
var sourceObj = this.sourceObj;
|
||||
var eventName = this.eventName;
|
||||
var options = this.options;
|
||||
var selector = this.selector;
|
||||
var handler = selector ? function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i - 0] = arguments[_i];
|
||||
}
|
||||
var result = tryCatch(selector).apply(void 0, args);
|
||||
if (result === errorObject) {
|
||||
subscriber.error(errorObject.e);
|
||||
}
|
||||
else {
|
||||
subscriber.next(result);
|
||||
}
|
||||
} : function (e) { return subscriber.next(e); };
|
||||
FromEventObservable.setupSubscription(sourceObj, eventName, handler, subscriber, options);
|
||||
};
|
||||
return FromEventObservable;
|
||||
}(Observable));
|
||||
//# sourceMappingURL=FromEventObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/FromEventObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/FromEventObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"FromEventObservable.js","sourceRoot":"","sources":["../../src/observable/FromEventObservable.ts"],"names":[],"mappings":";;;;;OAAO,EAAE,UAAU,EAAE,MAAM,eAAe;OACnC,EAAE,QAAQ,EAAE,MAAM,kBAAkB;OACpC,EAAE,UAAU,EAAE,MAAM,oBAAoB;OACxC,EAAE,WAAW,EAAE,MAAM,qBAAqB;OAC1C,EAAE,YAAY,EAAE,MAAM,iBAAiB;AAG9C,IAAM,QAAQ,GAAa,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AASrD,iCAAiC,SAAc;IAC7C,MAAM,CAAC,CAAC,CAAC,SAAS,IAAI,OAAO,SAAS,CAAC,WAAW,KAAK,UAAU,IAAI,OAAO,SAAS,CAAC,cAAc,KAAK,UAAU,CAAC;AACtH,CAAC;AAMD,mCAAmC,SAAc;IAC/C,MAAM,CAAC,CAAC,CAAC,SAAS,IAAI,OAAO,SAAS,CAAC,EAAE,KAAK,UAAU,IAAI,OAAO,SAAS,CAAC,GAAG,KAAK,UAAU,CAAC;AAClG,CAAC;AAED,oBAAoB,SAAc;IAChC,MAAM,CAAC,CAAC,CAAC,SAAS,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,mBAAmB,CAAC;AACzE,CAAC;AAED,0BAA0B,SAAc;IACtC,MAAM,CAAC,CAAC,CAAC,SAAS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AC;QAED,UAAU,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC;IAChD,CAAC;IAED,oCAAoC,CAAC,wCAAU,GAAV,UAAW,UAAyB;QACvE,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,OAAO,GAAG,QAAQ,GAAG;YAAC,cAAc;iBAAd,WAAc,CAAd,sBAAc,CAAd,IAAc;gBAAd,6BAAc;;YACtC,IAAI,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,eAAI,IAAI,CAAC,CAAC;YACzC,EAAE,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC;gBAC3B,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAClC,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC,GAAG,UAAC,CAAM,IAAK,OAAA,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAlB,CAAkB,CAAC;QAEnC,mBAAmB,CAAC,iBAAiB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC5F,CAAC;IACH,0BAAC;AAAD,CAAC,AA5LD,CAA4C,UAAU,GA4LrD"}
|
114
node_modules/rxjs/_esm5/observable/FromEventPatternObservable.js
generated
vendored
Normal file
114
node_modules/rxjs/_esm5/observable/FromEventPatternObservable.js
generated
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
/** PURE_IMPORTS_START .._util_isFunction,.._Observable,.._Subscription PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { isFunction } from '../util/isFunction';
|
||||
import { Observable } from '../Observable';
|
||||
import { Subscription } from '../Subscription';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var FromEventPatternObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(FromEventPatternObservable, _super);
|
||||
function FromEventPatternObservable(addHandler, removeHandler, selector) {
|
||||
_super.call(this);
|
||||
this.addHandler = addHandler;
|
||||
this.removeHandler = removeHandler;
|
||||
this.selector = selector;
|
||||
}
|
||||
/**
|
||||
* Creates an Observable from an API based on addHandler/removeHandler
|
||||
* functions.
|
||||
*
|
||||
* <span class="informal">Converts any addHandler/removeHandler API to an
|
||||
* Observable.</span>
|
||||
*
|
||||
* <img src="./img/fromEventPattern.png" width="100%">
|
||||
*
|
||||
* Creates an Observable by using the `addHandler` and `removeHandler`
|
||||
* functions to add and remove the handlers, with an optional selector
|
||||
* function to project the event arguments to a result. The `addHandler` is
|
||||
* called when the output Observable is subscribed, and `removeHandler` is
|
||||
* called when the Subscription is unsubscribed.
|
||||
*
|
||||
* @example <caption>Emits clicks happening on the DOM document</caption>
|
||||
* function addClickHandler(handler) {
|
||||
* document.addEventListener('click', handler);
|
||||
* }
|
||||
*
|
||||
* function removeClickHandler(handler) {
|
||||
* document.removeEventListener('click', handler);
|
||||
* }
|
||||
*
|
||||
* var clicks = Rx.Observable.fromEventPattern(
|
||||
* addClickHandler,
|
||||
* removeClickHandler
|
||||
* );
|
||||
* clicks.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link from}
|
||||
* @see {@link fromEvent}
|
||||
*
|
||||
* @param {function(handler: Function): any} addHandler A function that takes
|
||||
* a `handler` function as argument and attaches it somehow to the actual
|
||||
* source of events.
|
||||
* @param {function(handler: Function, signal?: any): void} [removeHandler] An optional function that
|
||||
* takes a `handler` function as argument and removes it in case it was
|
||||
* previously attached using `addHandler`. if addHandler returns signal to teardown when remove,
|
||||
* removeHandler function will forward it.
|
||||
* @param {function(...args: any): T} [selector] An optional function to
|
||||
* post-process results. It takes the arguments from the event handler and
|
||||
* should return a single value.
|
||||
* @return {Observable<T>}
|
||||
* @static true
|
||||
* @name fromEventPattern
|
||||
* @owner Observable
|
||||
*/
|
||||
FromEventPatternObservable.create = function (addHandler, removeHandler, selector) {
|
||||
return new FromEventPatternObservable(addHandler, removeHandler, selector);
|
||||
};
|
||||
/** @deprecated internal use only */ FromEventPatternObservable.prototype._subscribe = function (subscriber) {
|
||||
var _this = this;
|
||||
var removeHandler = this.removeHandler;
|
||||
var handler = !!this.selector ? function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i - 0] = arguments[_i];
|
||||
}
|
||||
_this._callSelector(subscriber, args);
|
||||
} : function (e) { subscriber.next(e); };
|
||||
var retValue = this._callAddHandler(handler, subscriber);
|
||||
if (!isFunction(removeHandler)) {
|
||||
return;
|
||||
}
|
||||
subscriber.add(new Subscription(function () {
|
||||
//TODO: determine whether or not to forward to error handler
|
||||
removeHandler(handler, retValue);
|
||||
}));
|
||||
};
|
||||
FromEventPatternObservable.prototype._callSelector = function (subscriber, args) {
|
||||
try {
|
||||
var result = this.selector.apply(this, args);
|
||||
subscriber.next(result);
|
||||
}
|
||||
catch (e) {
|
||||
subscriber.error(e);
|
||||
}
|
||||
};
|
||||
FromEventPatternObservable.prototype._callAddHandler = function (handler, errorSubscriber) {
|
||||
try {
|
||||
return this.addHandler(handler) || null;
|
||||
}
|
||||
catch (e) {
|
||||
errorSubscriber.error(e);
|
||||
}
|
||||
};
|
||||
return FromEventPatternObservable;
|
||||
}(Observable));
|
||||
//# sourceMappingURL=FromEventPatternObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/FromEventPatternObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/FromEventPatternObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"FromEventPatternObservable.js","sourceRoot":"","sources":["../../src/observable/FromEventPatternObservable.ts"],"names":[],"mappings":";;;;;OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB;OACxC,EAAE,UAAU,EAAE,MAAM,eAAe;OACnC,EAAE,YAAY,EAAE,MAAM,iBAAiB;AAG9C;;;;GAIG;AACH;IAAmD,8CAAa;IAwD9D,oCAAoB,UAAsC,EACtC,aAAyD,EACzD,QAAqC;QACvD,iBAAO,CAAC;QAHU,eAAU,GAAV,UAAU,CAA4B;QACtC,kBAAa,GAAb,aAAa,CAA4C;QACzD,aAAQ,GAAR,QAAQ,CAA6B;IAEzD,CAAC;IA1DD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+CG;IACI,iCAAM,GAAb,UAAiB,UAAsC,EACtC,aAAyD,EACzD,QAAqC;QACpD,MAAM,CAAC,IAAI,0BAA0B,CAAC,UAAU,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAC;IAC7E,CAAC;IAQD,oCAAoC,CAAC,+CAAU,GAAV,UAAW,UAAyB;QAApC,iBAiBpC;QAhBC,IAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QAEzC,IAAM,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG;YAAC,cAAmB;iBAAnB,WAAmB,CAAnB,sBAAmB,CAAnB,IAAmB;gBAAnB,6BAAmB;;YACpD,KAAI,CAAC,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACvC,CAAC,GAAG,UAAS,CAAM,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAE7C,IAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAE3D,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;YAC/B,MAAM,CAAC;QACT,CAAC;QAED,UAAU,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC;YAC9B,4DAA4D;YAC5D,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAE;QACpC,CAAC,CAAC,CAAC,CAAC;IACN,CAAC;IAEO,kDAAa,GAArB,UAAsB,UAAyB,EAAE,IAAgB;QAC/D,IAAI,CAAC;YACH,IAAM,MAAM,GAAM,IAAI,CAAC,QAAQ,OAAb,IAAI,EAAa,IAAI,CAAC,CAAC;YACzC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC1B,CACA;QAAA,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACT,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;IAEO,oDAAe,GAAvB,UAAwB,OAAyB,EAAE,eAA8B;QAC/E,IAAI,CAAC;YACH,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC;QAC1C,CACA;QAAA,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACT,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IACH,iCAAC;AAAD,CAAC,AAnGD,CAAmD,UAAU,GAmG5D"}
|
123
node_modules/rxjs/_esm5/observable/FromObservable.js
generated
vendored
Normal file
123
node_modules/rxjs/_esm5/observable/FromObservable.js
generated
vendored
Normal file
@ -0,0 +1,123 @@
|
||||
/** PURE_IMPORTS_START .._util_isArray,.._util_isArrayLike,.._util_isPromise,._PromiseObservable,._IteratorObservable,._ArrayObservable,._ArrayLikeObservable,.._symbol_iterator,.._Observable,.._operators_observeOn,.._symbol_observable PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { isArray } from '../util/isArray';
|
||||
import { isArrayLike } from '../util/isArrayLike';
|
||||
import { isPromise } from '../util/isPromise';
|
||||
import { PromiseObservable } from './PromiseObservable';
|
||||
import { IteratorObservable } from './IteratorObservable';
|
||||
import { ArrayObservable } from './ArrayObservable';
|
||||
import { ArrayLikeObservable } from './ArrayLikeObservable';
|
||||
import { iterator as Symbol_iterator } from '../symbol/iterator';
|
||||
import { Observable } from '../Observable';
|
||||
import { ObserveOnSubscriber } from '../operators/observeOn';
|
||||
import { observable as Symbol_observable } from '../symbol/observable';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var FromObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(FromObservable, _super);
|
||||
function FromObservable(ish, scheduler) {
|
||||
_super.call(this, null);
|
||||
this.ish = ish;
|
||||
this.scheduler = scheduler;
|
||||
}
|
||||
/**
|
||||
* Creates an Observable from an Array, an array-like object, a Promise, an
|
||||
* iterable object, or an Observable-like object.
|
||||
*
|
||||
* <span class="informal">Converts almost anything to an Observable.</span>
|
||||
*
|
||||
* <img src="./img/from.png" width="100%">
|
||||
*
|
||||
* Convert various other objects and data types into Observables. `from`
|
||||
* converts a Promise or an array-like or an
|
||||
* [iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#iterable)
|
||||
* object into an Observable that emits the items in that promise or array or
|
||||
* iterable. A String, in this context, is treated as an array of characters.
|
||||
* Observable-like objects (contains a function named with the ES2015 Symbol
|
||||
* for Observable) can also be converted through this operator.
|
||||
*
|
||||
* @example <caption>Converts an array to an Observable</caption>
|
||||
* var array = [10, 20, 30];
|
||||
* var result = Rx.Observable.from(array);
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* // Results in the following:
|
||||
* // 10 20 30
|
||||
*
|
||||
* @example <caption>Convert an infinite iterable (from a generator) to an Observable</caption>
|
||||
* function* generateDoubles(seed) {
|
||||
* var i = seed;
|
||||
* while (true) {
|
||||
* yield i;
|
||||
* i = 2 * i; // double it
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* var iterator = generateDoubles(3);
|
||||
* var result = Rx.Observable.from(iterator).take(10);
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* // Results in the following:
|
||||
* // 3 6 12 24 48 96 192 384 768 1536
|
||||
*
|
||||
* @see {@link create}
|
||||
* @see {@link fromEvent}
|
||||
* @see {@link fromEventPattern}
|
||||
* @see {@link fromPromise}
|
||||
*
|
||||
* @param {ObservableInput<T>} ish A subscribable object, a Promise, an
|
||||
* Observable-like, an Array, an iterable or an array-like object to be
|
||||
* converted.
|
||||
* @param {Scheduler} [scheduler] The scheduler on which to schedule the
|
||||
* emissions of values.
|
||||
* @return {Observable<T>} The Observable whose values are originally from the
|
||||
* input object that was converted.
|
||||
* @static true
|
||||
* @name from
|
||||
* @owner Observable
|
||||
*/
|
||||
FromObservable.create = function (ish, scheduler) {
|
||||
if (ish != null) {
|
||||
if (typeof ish[Symbol_observable] === 'function') {
|
||||
if (ish instanceof Observable && !scheduler) {
|
||||
return ish;
|
||||
}
|
||||
return new FromObservable(ish, scheduler);
|
||||
}
|
||||
else if (isArray(ish)) {
|
||||
return new ArrayObservable(ish, scheduler);
|
||||
}
|
||||
else if (isPromise(ish)) {
|
||||
return new PromiseObservable(ish, scheduler);
|
||||
}
|
||||
else if (typeof ish[Symbol_iterator] === 'function' || typeof ish === 'string') {
|
||||
return new IteratorObservable(ish, scheduler);
|
||||
}
|
||||
else if (isArrayLike(ish)) {
|
||||
return new ArrayLikeObservable(ish, scheduler);
|
||||
}
|
||||
}
|
||||
throw new TypeError((ish !== null && typeof ish || ish) + ' is not observable');
|
||||
};
|
||||
/** @deprecated internal use only */ FromObservable.prototype._subscribe = function (subscriber) {
|
||||
var ish = this.ish;
|
||||
var scheduler = this.scheduler;
|
||||
if (scheduler == null) {
|
||||
return ish[Symbol_observable]().subscribe(subscriber);
|
||||
}
|
||||
else {
|
||||
return ish[Symbol_observable]().subscribe(new ObserveOnSubscriber(subscriber, scheduler, 0));
|
||||
}
|
||||
};
|
||||
return FromObservable;
|
||||
}(Observable));
|
||||
//# sourceMappingURL=FromObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/FromObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/FromObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"FromObservable.js","sourceRoot":"","sources":["../../src/observable/FromObservable.ts"],"names":[],"mappings":";;;;;OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB;OAClC,EAAE,WAAW,EAAE,MAAM,qBAAqB;OAC1C,EAAE,SAAS,EAAE,MAAM,mBAAmB;OACtC,EAAE,iBAAiB,EAAE,MAAM,qBAAqB;OAChD,EAAE,kBAAkB,EAAE,MAAK,sBAAsB;OACjD,EAAE,eAAe,EAAE,MAAM,mBAAmB;OAC5C,EAAE,mBAAmB,EAAE,MAAM,uBAAuB;OAGpD,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,oBAAoB;OACzD,EAAE,UAAU,EAAmB,MAAM,eAAe;OAEpD,EAAE,mBAAmB,EAAE,MAAM,wBAAwB;OACrD,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,sBAAsB;AAEtE;;;;GAIG;AACH;IAAuC,kCAAa;IAClD,wBAAoB,GAAuB,EAAU,SAAsB;QACzE,kBAAM,IAAI,CAAC,CAAC;QADM,QAAG,GAAH,GAAG,CAAoB;QAAU,cAAS,GAAT,SAAS,CAAa;IAE3E,CAAC;IAKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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IAED,oCAAoC,CAAC,mCAAU,GAAV,UAAW,UAAyB;QACvE,IAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;QACrB,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,EAAE,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACxD,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,mBAAmB,CAAC,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/F,CAAC;IACH,CAAC;IACH,qBAAC;AAAD,CAAC,AA9FD,CAAuC,UAAU,GA8FhD"}
|
137
node_modules/rxjs/_esm5/observable/GenerateObservable.js
generated
vendored
Normal file
137
node_modules/rxjs/_esm5/observable/GenerateObservable.js
generated
vendored
Normal file
@ -0,0 +1,137 @@
|
||||
/** PURE_IMPORTS_START .._Observable,.._util_isScheduler PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
import { isScheduler } from '../util/isScheduler';
|
||||
var selfSelector = function (value) { return value; };
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var GenerateObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(GenerateObservable, _super);
|
||||
function GenerateObservable(initialState, condition, iterate, resultSelector, scheduler) {
|
||||
_super.call(this);
|
||||
this.initialState = initialState;
|
||||
this.condition = condition;
|
||||
this.iterate = iterate;
|
||||
this.resultSelector = resultSelector;
|
||||
this.scheduler = scheduler;
|
||||
}
|
||||
GenerateObservable.create = function (initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) {
|
||||
if (arguments.length == 1) {
|
||||
return new GenerateObservable(initialStateOrOptions.initialState, initialStateOrOptions.condition, initialStateOrOptions.iterate, initialStateOrOptions.resultSelector || selfSelector, initialStateOrOptions.scheduler);
|
||||
}
|
||||
if (resultSelectorOrObservable === undefined || isScheduler(resultSelectorOrObservable)) {
|
||||
return new GenerateObservable(initialStateOrOptions, condition, iterate, selfSelector, resultSelectorOrObservable);
|
||||
}
|
||||
return new GenerateObservable(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler);
|
||||
};
|
||||
/** @deprecated internal use only */ GenerateObservable.prototype._subscribe = function (subscriber) {
|
||||
var state = this.initialState;
|
||||
if (this.scheduler) {
|
||||
return this.scheduler.schedule(GenerateObservable.dispatch, 0, {
|
||||
subscriber: subscriber,
|
||||
iterate: this.iterate,
|
||||
condition: this.condition,
|
||||
resultSelector: this.resultSelector,
|
||||
state: state
|
||||
});
|
||||
}
|
||||
var _a = this, condition = _a.condition, resultSelector = _a.resultSelector, iterate = _a.iterate;
|
||||
do {
|
||||
if (condition) {
|
||||
var conditionResult = void 0;
|
||||
try {
|
||||
conditionResult = condition(state);
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
return;
|
||||
}
|
||||
if (!conditionResult) {
|
||||
subscriber.complete();
|
||||
break;
|
||||
}
|
||||
}
|
||||
var value = void 0;
|
||||
try {
|
||||
value = resultSelector(state);
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
return;
|
||||
}
|
||||
subscriber.next(value);
|
||||
if (subscriber.closed) {
|
||||
break;
|
||||
}
|
||||
try {
|
||||
state = iterate(state);
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
return;
|
||||
}
|
||||
} while (true);
|
||||
};
|
||||
GenerateObservable.dispatch = function (state) {
|
||||
var subscriber = state.subscriber, condition = state.condition;
|
||||
if (subscriber.closed) {
|
||||
return;
|
||||
}
|
||||
if (state.needIterate) {
|
||||
try {
|
||||
state.state = state.iterate(state.state);
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
state.needIterate = true;
|
||||
}
|
||||
if (condition) {
|
||||
var conditionResult = void 0;
|
||||
try {
|
||||
conditionResult = condition(state.state);
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
return;
|
||||
}
|
||||
if (!conditionResult) {
|
||||
subscriber.complete();
|
||||
return;
|
||||
}
|
||||
if (subscriber.closed) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
var value;
|
||||
try {
|
||||
value = state.resultSelector(state.state);
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
return;
|
||||
}
|
||||
if (subscriber.closed) {
|
||||
return;
|
||||
}
|
||||
subscriber.next(value);
|
||||
if (subscriber.closed) {
|
||||
return;
|
||||
}
|
||||
return this.schedule(state);
|
||||
};
|
||||
return GenerateObservable;
|
||||
}(Observable));
|
||||
//# sourceMappingURL=GenerateObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/GenerateObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/GenerateObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"GenerateObservable.js","sourceRoot":"","sources":["../../src/observable/GenerateObservable.ts"],"names":[],"mappings":";;;;;OAEO,EAAE,UAAU,EAAE,MAAM,eAAe;OAGnC,EAAE,WAAW,EAAE,MAAM,qBAAqB;AAEjD,IAAM,YAAY,GAAG,UAAI,KAAQ,IAAK,OAAA,KAAK,EAAL,CAAK,CAAC;AA4C5C;;;;GAIG;AACH;IAA8C,sCAAa;IACzD,4BAAoB,YAAe,EACf,SAA2B,EAC3B,OAAuB,EACvB,cAAgC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CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACtB,MAAM,CAAC;QACT,CAAC;QACD,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC;QACT,CAAC;QACD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC;QACT,CAAC;QACD,MAAM,CAAqC,IAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACnE,CAAC;IACH,yBAAC;AAAD,CAAC,AA9OD,CAA8C,UAAU,GA8OvD"}
|
62
node_modules/rxjs/_esm5/observable/IfObservable.js
generated
vendored
Normal file
62
node_modules/rxjs/_esm5/observable/IfObservable.js
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
/** PURE_IMPORTS_START .._Observable,.._util_subscribeToResult,.._OuterSubscriber PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var IfObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(IfObservable, _super);
|
||||
function IfObservable(condition, thenSource, elseSource) {
|
||||
_super.call(this);
|
||||
this.condition = condition;
|
||||
this.thenSource = thenSource;
|
||||
this.elseSource = elseSource;
|
||||
}
|
||||
IfObservable.create = function (condition, thenSource, elseSource) {
|
||||
return new IfObservable(condition, thenSource, elseSource);
|
||||
};
|
||||
/** @deprecated internal use only */ IfObservable.prototype._subscribe = function (subscriber) {
|
||||
var _a = this, condition = _a.condition, thenSource = _a.thenSource, elseSource = _a.elseSource;
|
||||
return new IfSubscriber(subscriber, condition, thenSource, elseSource);
|
||||
};
|
||||
return IfObservable;
|
||||
}(Observable));
|
||||
var IfSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(IfSubscriber, _super);
|
||||
function IfSubscriber(destination, condition, thenSource, elseSource) {
|
||||
_super.call(this, destination);
|
||||
this.condition = condition;
|
||||
this.thenSource = thenSource;
|
||||
this.elseSource = elseSource;
|
||||
this.tryIf();
|
||||
}
|
||||
IfSubscriber.prototype.tryIf = function () {
|
||||
var _a = this, condition = _a.condition, thenSource = _a.thenSource, elseSource = _a.elseSource;
|
||||
var result;
|
||||
try {
|
||||
result = condition();
|
||||
var source = result ? thenSource : elseSource;
|
||||
if (source) {
|
||||
this.add(subscribeToResult(this, source));
|
||||
}
|
||||
else {
|
||||
this._complete();
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
this._error(err);
|
||||
}
|
||||
};
|
||||
return IfSubscriber;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=IfObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/IfObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/IfObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"IfObservable.js","sourceRoot":"","sources":["../../src/observable/IfObservable.ts"],"names":[],"mappings":";;;;;OAAO,EAAE,UAAU,EAAyB,MAAM,eAAe;OAI1D,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;OACtD,EAAE,eAAe,EAAE,MAAM,oBAAoB;AACpD;;;;GAIG;AACH;IAAwC,gCAAa;IAQnD,sBAAoB,SAA+B,EAC/B,UAA4C,EAC5C,UAA4C;QAC9D,iBAAO,CAAC;QAHU,cAAS,GAAT,SAAS,CAAsB;QAC/B,eAAU,GAAV,UAA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CAAC;YACb,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IACH,mBAAC;AAAD,CAAC,AA1BD,CAAiC,eAAe,GA0B/C"}
|
97
node_modules/rxjs/_esm5/observable/IntervalObservable.js
generated
vendored
Normal file
97
node_modules/rxjs/_esm5/observable/IntervalObservable.js
generated
vendored
Normal file
@ -0,0 +1,97 @@
|
||||
/** PURE_IMPORTS_START .._util_isNumeric,.._Observable,.._scheduler_async PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { isNumeric } from '../util/isNumeric';
|
||||
import { Observable } from '../Observable';
|
||||
import { async } from '../scheduler/async';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var IntervalObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(IntervalObservable, _super);
|
||||
function IntervalObservable(period, scheduler) {
|
||||
if (period === void 0) {
|
||||
period = 0;
|
||||
}
|
||||
if (scheduler === void 0) {
|
||||
scheduler = async;
|
||||
}
|
||||
_super.call(this);
|
||||
this.period = period;
|
||||
this.scheduler = scheduler;
|
||||
if (!isNumeric(period) || period < 0) {
|
||||
this.period = 0;
|
||||
}
|
||||
if (!scheduler || typeof scheduler.schedule !== 'function') {
|
||||
this.scheduler = async;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Creates an Observable that emits sequential numbers every specified
|
||||
* interval of time, on a specified IScheduler.
|
||||
*
|
||||
* <span class="informal">Emits incremental numbers periodically in time.
|
||||
* </span>
|
||||
*
|
||||
* <img src="./img/interval.png" width="100%">
|
||||
*
|
||||
* `interval` returns an Observable that emits an infinite sequence of
|
||||
* ascending integers, with a constant interval of time of your choosing
|
||||
* between those emissions. The first emission is not sent immediately, but
|
||||
* only after the first period has passed. By default, this operator uses the
|
||||
* `async` IScheduler to provide a notion of time, but you may pass any
|
||||
* IScheduler to it.
|
||||
*
|
||||
* @example <caption>Emits ascending numbers, one every second (1000ms)</caption>
|
||||
* var numbers = Rx.Observable.interval(1000);
|
||||
* numbers.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link timer}
|
||||
* @see {@link delay}
|
||||
*
|
||||
* @param {number} [period=0] The interval size in milliseconds (by default)
|
||||
* or the time unit determined by the scheduler's clock.
|
||||
* @param {Scheduler} [scheduler=async] The IScheduler to use for scheduling
|
||||
* the emission of values, and providing a notion of "time".
|
||||
* @return {Observable} An Observable that emits a sequential number each time
|
||||
* interval.
|
||||
* @static true
|
||||
* @name interval
|
||||
* @owner Observable
|
||||
*/
|
||||
IntervalObservable.create = function (period, scheduler) {
|
||||
if (period === void 0) {
|
||||
period = 0;
|
||||
}
|
||||
if (scheduler === void 0) {
|
||||
scheduler = async;
|
||||
}
|
||||
return new IntervalObservable(period, scheduler);
|
||||
};
|
||||
IntervalObservable.dispatch = function (state) {
|
||||
var index = state.index, subscriber = state.subscriber, period = state.period;
|
||||
subscriber.next(index);
|
||||
if (subscriber.closed) {
|
||||
return;
|
||||
}
|
||||
state.index += 1;
|
||||
this.schedule(state, period);
|
||||
};
|
||||
/** @deprecated internal use only */ IntervalObservable.prototype._subscribe = function (subscriber) {
|
||||
var index = 0;
|
||||
var period = this.period;
|
||||
var scheduler = this.scheduler;
|
||||
subscriber.add(scheduler.schedule(IntervalObservable.dispatch, period, {
|
||||
index: index, subscriber: subscriber, period: period
|
||||
}));
|
||||
};
|
||||
return IntervalObservable;
|
||||
}(Observable));
|
||||
//# sourceMappingURL=IntervalObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/IntervalObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/IntervalObservable.js.map
generated
vendored
Normal file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AAC,CAAC;QAEV,IAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IAaD,oCAAoC,CAAC,uCAAU,GAAV,UAAW,UAA8B;QAC5E,IAAM,KAAK,GAAG,CAAC,CAAC;QAChB,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAEjC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE;YACrE,YAAK,EAAE,sBAAU,EAAE,cAAM;SAC1B,CAAC,CAAC,CAAC;IACN,CAAC;IACH,yBAAC;AAAD,CAAC,AAzED,CAAwC,UAAU,GAyEjD"}
|
172
node_modules/rxjs/_esm5/observable/IteratorObservable.js
generated
vendored
Normal file
172
node_modules/rxjs/_esm5/observable/IteratorObservable.js
generated
vendored
Normal file
@ -0,0 +1,172 @@
|
||||
/** PURE_IMPORTS_START .._util_root,.._Observable,.._symbol_iterator PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { root } from '../util/root';
|
||||
import { Observable } from '../Observable';
|
||||
import { iterator as Symbol_iterator } from '../symbol/iterator';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var IteratorObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(IteratorObservable, _super);
|
||||
function IteratorObservable(iterator, scheduler) {
|
||||
_super.call(this);
|
||||
this.scheduler = scheduler;
|
||||
if (iterator == null) {
|
||||
throw new Error('iterator cannot be null.');
|
||||
}
|
||||
this.iterator = getIterator(iterator);
|
||||
}
|
||||
IteratorObservable.create = function (iterator, scheduler) {
|
||||
return new IteratorObservable(iterator, scheduler);
|
||||
};
|
||||
IteratorObservable.dispatch = function (state) {
|
||||
var index = state.index, hasError = state.hasError, iterator = state.iterator, subscriber = state.subscriber;
|
||||
if (hasError) {
|
||||
subscriber.error(state.error);
|
||||
return;
|
||||
}
|
||||
var result = iterator.next();
|
||||
if (result.done) {
|
||||
subscriber.complete();
|
||||
return;
|
||||
}
|
||||
subscriber.next(result.value);
|
||||
state.index = index + 1;
|
||||
if (subscriber.closed) {
|
||||
if (typeof iterator.return === 'function') {
|
||||
iterator.return();
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.schedule(state);
|
||||
};
|
||||
/** @deprecated internal use only */ IteratorObservable.prototype._subscribe = function (subscriber) {
|
||||
var index = 0;
|
||||
var _a = this, iterator = _a.iterator, scheduler = _a.scheduler;
|
||||
if (scheduler) {
|
||||
return scheduler.schedule(IteratorObservable.dispatch, 0, {
|
||||
index: index, iterator: iterator, subscriber: subscriber
|
||||
});
|
||||
}
|
||||
else {
|
||||
do {
|
||||
var result = iterator.next();
|
||||
if (result.done) {
|
||||
subscriber.complete();
|
||||
break;
|
||||
}
|
||||
else {
|
||||
subscriber.next(result.value);
|
||||
}
|
||||
if (subscriber.closed) {
|
||||
if (typeof iterator.return === 'function') {
|
||||
iterator.return();
|
||||
}
|
||||
break;
|
||||
}
|
||||
} while (true);
|
||||
}
|
||||
};
|
||||
return IteratorObservable;
|
||||
}(Observable));
|
||||
var StringIterator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function StringIterator(str, idx, len) {
|
||||
if (idx === void 0) {
|
||||
idx = 0;
|
||||
}
|
||||
if (len === void 0) {
|
||||
len = str.length;
|
||||
}
|
||||
this.str = str;
|
||||
this.idx = idx;
|
||||
this.len = len;
|
||||
}
|
||||
StringIterator.prototype[Symbol_iterator] = function () { return (this); };
|
||||
StringIterator.prototype.next = function () {
|
||||
return this.idx < this.len ? {
|
||||
done: false,
|
||||
value: this.str.charAt(this.idx++)
|
||||
} : {
|
||||
done: true,
|
||||
value: undefined
|
||||
};
|
||||
};
|
||||
return StringIterator;
|
||||
}());
|
||||
var ArrayIterator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function ArrayIterator(arr, idx, len) {
|
||||
if (idx === void 0) {
|
||||
idx = 0;
|
||||
}
|
||||
if (len === void 0) {
|
||||
len = toLength(arr);
|
||||
}
|
||||
this.arr = arr;
|
||||
this.idx = idx;
|
||||
this.len = len;
|
||||
}
|
||||
ArrayIterator.prototype[Symbol_iterator] = function () { return this; };
|
||||
ArrayIterator.prototype.next = function () {
|
||||
return this.idx < this.len ? {
|
||||
done: false,
|
||||
value: this.arr[this.idx++]
|
||||
} : {
|
||||
done: true,
|
||||
value: undefined
|
||||
};
|
||||
};
|
||||
return ArrayIterator;
|
||||
}());
|
||||
function getIterator(obj) {
|
||||
var i = obj[Symbol_iterator];
|
||||
if (!i && typeof obj === 'string') {
|
||||
return new StringIterator(obj);
|
||||
}
|
||||
if (!i && obj.length !== undefined) {
|
||||
return new ArrayIterator(obj);
|
||||
}
|
||||
if (!i) {
|
||||
throw new TypeError('object is not iterable');
|
||||
}
|
||||
return obj[Symbol_iterator]();
|
||||
}
|
||||
var maxSafeInteger = /*@__PURE__*/ Math.pow(2, 53) - 1;
|
||||
function toLength(o) {
|
||||
var len = +o.length;
|
||||
if (isNaN(len)) {
|
||||
return 0;
|
||||
}
|
||||
if (len === 0 || !numberIsFinite(len)) {
|
||||
return len;
|
||||
}
|
||||
len = sign(len) * Math.floor(Math.abs(len));
|
||||
if (len <= 0) {
|
||||
return 0;
|
||||
}
|
||||
if (len > maxSafeInteger) {
|
||||
return maxSafeInteger;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
function numberIsFinite(value) {
|
||||
return typeof value === 'number' && root.isFinite(value);
|
||||
}
|
||||
function sign(value) {
|
||||
var valueAsNumber = +value;
|
||||
if (valueAsNumber === 0) {
|
||||
return valueAsNumber;
|
||||
}
|
||||
if (isNaN(valueAsNumber)) {
|
||||
return valueAsNumber;
|
||||
}
|
||||
return valueAsNumber < 0 ? -1 : 1;
|
||||
}
|
||||
//# sourceMappingURL=IteratorObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/IteratorObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/IteratorObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"IteratorObservable.js","sourceRoot":"","sources":["../../src/observable/IteratorObservable.ts"],"names":[],"mappings":";;;;;OAAO,EAAE,IAAI,EAAE,MAAM,cAAc;OAE5B,EAAE,UAAU,EAAE,MAAM,eAAe;OACnC,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,oBAAoB;AAIhE;;;;GAIG;AACH;IAA2C,sCAAa;IAmCtD,4BAAY,QAAa,EAAU,SAAsB;QACvD,iBAAO,CAAC;QADyB,cAAS,GAAT,SAAS,CAAa;QAGvD,EAAE,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC9C,CAAC;QAED,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC;IAxCM,yBAAM,GAAb,UAAiB,QAAa,EAAE,SAAsB;QACpD,MAAM,CAAC,IAAI,kBAAkB,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC;IAEM,2BAAQ,GAAf,UAAgB,KAAU;QAEhB,uBAAK,EAAE,yBAAQ,EAAE,yBAAQ,EAAE,6BAAU,CAAW;QAExD,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;YACb,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC9B,MAAM,CAAC;QACT,CAAC;QAED,IAAI,MAAM,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC7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,CAAC;IACf,CAAC;IACD,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5C,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACX,MAAM,CAAC,CAAC,CAAC;IACb,CAAC;IACD,EAAE,CAAC,CAAC,GAAG,GAAG,cAAc,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,cAAc,CAAC;IAC1B,CAAC;IACD,MAAM,CAAC,GAAG,CAAC;AACb,CAAC;AAED,wBAAwB,KAAU;IAChC,MAAM,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC3D,CAAC;AAED,cAAc,KAAU;IACtB,IAAI,aAAa,GAAG,CAAC,KAAK,CAAC;IAC3B,EAAE,CAAC,CAAC,aAAa,KAAK,CAAC,CAAC,CAAC,CAAC;QACxB,MAAM,CAAC,aAAa,CAAC;IACvB,CAAC;IACD,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,CAAC,aAAa,CAAC;IACvB,CAAC;IACD,MAAM,CAAC,aAAa,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC"}
|
60
node_modules/rxjs/_esm5/observable/NeverObservable.js
generated
vendored
Normal file
60
node_modules/rxjs/_esm5/observable/NeverObservable.js
generated
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
/** PURE_IMPORTS_START .._Observable,.._util_noop PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
import { noop } from '../util/noop';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var NeverObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(NeverObservable, _super);
|
||||
function NeverObservable() {
|
||||
_super.call(this);
|
||||
}
|
||||
/**
|
||||
* Creates an Observable that emits no items to the Observer.
|
||||
*
|
||||
* <span class="informal">An Observable that never emits anything.</span>
|
||||
*
|
||||
* <img src="./img/never.png" width="100%">
|
||||
*
|
||||
* This static operator is useful for creating a simple Observable that emits
|
||||
* neither values nor errors nor the completion notification. It can be used
|
||||
* for testing purposes or for composing with other Observables. Please note
|
||||
* that by never emitting a complete notification, this Observable keeps the
|
||||
* subscription from being disposed automatically. Subscriptions need to be
|
||||
* manually disposed.
|
||||
*
|
||||
* @example <caption>Emit the number 7, then never emit anything else (not even complete).</caption>
|
||||
* function info() {
|
||||
* console.log('Will not be called');
|
||||
* }
|
||||
* var result = Rx.Observable.never().startWith(7);
|
||||
* result.subscribe(x => console.log(x), info, info);
|
||||
*
|
||||
* @see {@link create}
|
||||
* @see {@link empty}
|
||||
* @see {@link of}
|
||||
* @see {@link throw}
|
||||
*
|
||||
* @return {Observable} A "never" Observable: never emits anything.
|
||||
* @static true
|
||||
* @name never
|
||||
* @owner Observable
|
||||
*/
|
||||
NeverObservable.create = function () {
|
||||
return new NeverObservable();
|
||||
};
|
||||
/** @deprecated internal use only */ NeverObservable.prototype._subscribe = function (subscriber) {
|
||||
noop();
|
||||
};
|
||||
return NeverObservable;
|
||||
}(Observable));
|
||||
//# sourceMappingURL=NeverObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/NeverObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/NeverObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"NeverObservable.js","sourceRoot":"","sources":["../../src/observable/NeverObservable.ts"],"names":[],"mappings":";;;;;OAAO,EAAE,UAAU,EAAE,MAAM,eAAe;OAEnC,EAAE,IAAI,EAAE,MAAM,cAAc;AAEnC;;;;GAIG;AACH;IAAwC,mCAAa;IAoCnD;QACE,iBAAO,CAAC;IACV,CAAC;IArCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACI,sBAAM,GAAb;QACE,MAAM,CAAC,IAAI,eAAe,EAAK,CAAC;IAClC,CAAC;IAMD,oCAAoC,CAAC,oCAAU,GAAV,UAAW,UAAyB;QACvE,IAAI,EAAE,CAAC;IACT,CAAC;IACH,sBAAC;AAAD,CAAC,AA3CD,CAAwC,UAAU,GA2CjD"}
|
86
node_modules/rxjs/_esm5/observable/PairsObservable.js
generated
vendored
Normal file
86
node_modules/rxjs/_esm5/observable/PairsObservable.js
generated
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
/** PURE_IMPORTS_START .._Observable PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
function dispatch(state) {
|
||||
var obj = state.obj, keys = state.keys, length = state.length, index = state.index, subscriber = state.subscriber;
|
||||
if (index === length) {
|
||||
subscriber.complete();
|
||||
return;
|
||||
}
|
||||
var key = keys[index];
|
||||
subscriber.next([key, obj[key]]);
|
||||
state.index = index + 1;
|
||||
this.schedule(state);
|
||||
}
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var PairsObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(PairsObservable, _super);
|
||||
function PairsObservable(obj, scheduler) {
|
||||
_super.call(this);
|
||||
this.obj = obj;
|
||||
this.scheduler = scheduler;
|
||||
this.keys = Object.keys(obj);
|
||||
}
|
||||
/**
|
||||
* Convert an object into an observable sequence of [key, value] pairs
|
||||
* using an optional IScheduler to enumerate the object.
|
||||
*
|
||||
* @example <caption>Converts a javascript object to an Observable</caption>
|
||||
* var obj = {
|
||||
* foo: 42,
|
||||
* bar: 56,
|
||||
* baz: 78
|
||||
* };
|
||||
*
|
||||
* var source = Rx.Observable.pairs(obj);
|
||||
*
|
||||
* var subscription = source.subscribe(
|
||||
* function (x) {
|
||||
* console.log('Next: %s', x);
|
||||
* },
|
||||
* function (err) {
|
||||
* console.log('Error: %s', err);
|
||||
* },
|
||||
* function () {
|
||||
* console.log('Completed');
|
||||
* });
|
||||
*
|
||||
* @param {Object} obj The object to inspect and turn into an
|
||||
* Observable sequence.
|
||||
* @param {Scheduler} [scheduler] An optional IScheduler to run the
|
||||
* enumeration of the input sequence on.
|
||||
* @returns {(Observable<Array<string | T>>)} An observable sequence of
|
||||
* [key, value] pairs from the object.
|
||||
*/
|
||||
PairsObservable.create = function (obj, scheduler) {
|
||||
return new PairsObservable(obj, scheduler);
|
||||
};
|
||||
/** @deprecated internal use only */ PairsObservable.prototype._subscribe = function (subscriber) {
|
||||
var _a = this, keys = _a.keys, scheduler = _a.scheduler;
|
||||
var length = keys.length;
|
||||
if (scheduler) {
|
||||
return scheduler.schedule(dispatch, 0, {
|
||||
obj: this.obj, keys: keys, length: length, index: 0, subscriber: subscriber
|
||||
});
|
||||
}
|
||||
else {
|
||||
for (var idx = 0; idx < length; idx++) {
|
||||
var key = keys[idx];
|
||||
subscriber.next([key, this.obj[key]]);
|
||||
}
|
||||
subscriber.complete();
|
||||
}
|
||||
};
|
||||
return PairsObservable;
|
||||
}(Observable));
|
||||
//# sourceMappingURL=PairsObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/PairsObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/PairsObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"P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QAAQ,EAAE,CAAC,EAAE;gBACrC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,UAAI,EAAE,cAAM,EAAE,KAAK,EAAE,CAAC,EAAE,sBAAU;aAClD,CAAC,CAAC;QACL,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,GAAG,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC;gBACtC,IAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;gBACtB,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACxC,CAAC;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AA3DD,CAAwC,UAAU,GA2DjD"}
|
122
node_modules/rxjs/_esm5/observable/PromiseObservable.js
generated
vendored
Normal file
122
node_modules/rxjs/_esm5/observable/PromiseObservable.js
generated
vendored
Normal file
@ -0,0 +1,122 @@
|
||||
/** PURE_IMPORTS_START .._util_root,.._Observable PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { root } from '../util/root';
|
||||
import { Observable } from '../Observable';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var PromiseObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(PromiseObservable, _super);
|
||||
function PromiseObservable(promise, scheduler) {
|
||||
_super.call(this);
|
||||
this.promise = promise;
|
||||
this.scheduler = scheduler;
|
||||
}
|
||||
/**
|
||||
* Converts a Promise to an Observable.
|
||||
*
|
||||
* <span class="informal">Returns an Observable that just emits the Promise's
|
||||
* resolved value, then completes.</span>
|
||||
*
|
||||
* Converts an ES2015 Promise or a Promises/A+ spec compliant Promise to an
|
||||
* Observable. If the Promise resolves with a value, the output Observable
|
||||
* emits that resolved value as a `next`, and then completes. If the Promise
|
||||
* is rejected, then the output Observable emits the corresponding Error.
|
||||
*
|
||||
* @example <caption>Convert the Promise returned by Fetch to an Observable</caption>
|
||||
* var result = Rx.Observable.fromPromise(fetch('http://myserver.com/'));
|
||||
* result.subscribe(x => console.log(x), e => console.error(e));
|
||||
*
|
||||
* @see {@link bindCallback}
|
||||
* @see {@link from}
|
||||
*
|
||||
* @param {PromiseLike<T>} promise The promise to be converted.
|
||||
* @param {Scheduler} [scheduler] An optional IScheduler to use for scheduling
|
||||
* the delivery of the resolved value (or the rejection).
|
||||
* @return {Observable<T>} An Observable which wraps the Promise.
|
||||
* @static true
|
||||
* @name fromPromise
|
||||
* @owner Observable
|
||||
*/
|
||||
PromiseObservable.create = function (promise, scheduler) {
|
||||
return new PromiseObservable(promise, scheduler);
|
||||
};
|
||||
/** @deprecated internal use only */ PromiseObservable.prototype._subscribe = function (subscriber) {
|
||||
var _this = this;
|
||||
var promise = this.promise;
|
||||
var scheduler = this.scheduler;
|
||||
if (scheduler == null) {
|
||||
if (this._isScalar) {
|
||||
if (!subscriber.closed) {
|
||||
subscriber.next(this.value);
|
||||
subscriber.complete();
|
||||
}
|
||||
}
|
||||
else {
|
||||
promise.then(function (value) {
|
||||
_this.value = value;
|
||||
_this._isScalar = true;
|
||||
if (!subscriber.closed) {
|
||||
subscriber.next(value);
|
||||
subscriber.complete();
|
||||
}
|
||||
}, function (err) {
|
||||
if (!subscriber.closed) {
|
||||
subscriber.error(err);
|
||||
}
|
||||
})
|
||||
.then(null, function (err) {
|
||||
// escape the promise trap, throw unhandled errors
|
||||
root.setTimeout(function () { throw err; });
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (this._isScalar) {
|
||||
if (!subscriber.closed) {
|
||||
return scheduler.schedule(dispatchNext, 0, { value: this.value, subscriber: subscriber });
|
||||
}
|
||||
}
|
||||
else {
|
||||
promise.then(function (value) {
|
||||
_this.value = value;
|
||||
_this._isScalar = true;
|
||||
if (!subscriber.closed) {
|
||||
subscriber.add(scheduler.schedule(dispatchNext, 0, { value: value, subscriber: subscriber }));
|
||||
}
|
||||
}, function (err) {
|
||||
if (!subscriber.closed) {
|
||||
subscriber.add(scheduler.schedule(dispatchError, 0, { err: err, subscriber: subscriber }));
|
||||
}
|
||||
})
|
||||
.then(null, function (err) {
|
||||
// escape the promise trap, throw unhandled errors
|
||||
root.setTimeout(function () { throw err; });
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
return PromiseObservable;
|
||||
}(Observable));
|
||||
function dispatchNext(arg) {
|
||||
var value = arg.value, subscriber = arg.subscriber;
|
||||
if (!subscriber.closed) {
|
||||
subscriber.next(value);
|
||||
subscriber.complete();
|
||||
}
|
||||
}
|
||||
function dispatchError(arg) {
|
||||
var err = arg.err, subscriber = arg.subscriber;
|
||||
if (!subscriber.closed) {
|
||||
subscriber.error(err);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=PromiseObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/PromiseObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/PromiseObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"PromiseObservable.js","sourceRoot":"","sources":["../../src/observable/PromiseObservable.ts"],"names":[],"mappings":";;;;;OAAO,EAAE,IAAI,EAAE,MAAM,cAAc;OAE5B,EAAE,UAAU,EAAE,MAAM,eAAe;AAI1C;;;;GAIG;AACH;IAA0C,qCAAa;IAkCrD,2BAAoB,OAAuB,EAAU,SAAsB;QACzE,iBAAO,CAAC;QADU,YAAO,GAAP,OAAO,CAAgB;QAAU,cAAS,GAAT,SAAS,CAAa;IAE3E,CAAC;IAhCD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AAC,AA/FD,CAA0C,UAAU,GA+FnD;AAMD,sBAAyB,GAAuB;IACtC,qBAAK,EAAE,2BAAU,CAAS;IAClC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;QACvB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;AACH,CAAC;AAMD,uBAA0B,GAAwB;IACxC,iBAAG,EAAE,2BAAU,CAAS;IAChC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;QACvB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;AACH,CAAC"}
|
101
node_modules/rxjs/_esm5/observable/RangeObservable.js
generated
vendored
Normal file
101
node_modules/rxjs/_esm5/observable/RangeObservable.js
generated
vendored
Normal file
@ -0,0 +1,101 @@
|
||||
/** PURE_IMPORTS_START .._Observable PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var RangeObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(RangeObservable, _super);
|
||||
function RangeObservable(start, count, scheduler) {
|
||||
_super.call(this);
|
||||
this.start = start;
|
||||
this._count = count;
|
||||
this.scheduler = scheduler;
|
||||
}
|
||||
/**
|
||||
* Creates an Observable that emits a sequence of numbers within a specified
|
||||
* range.
|
||||
*
|
||||
* <span class="informal">Emits a sequence of numbers in a range.</span>
|
||||
*
|
||||
* <img src="./img/range.png" width="100%">
|
||||
*
|
||||
* `range` operator emits a range of sequential integers, in order, where you
|
||||
* select the `start` of the range and its `length`. By default, uses no
|
||||
* IScheduler and just delivers the notifications synchronously, but may use
|
||||
* an optional IScheduler to regulate those deliveries.
|
||||
*
|
||||
* @example <caption>Emits the numbers 1 to 10</caption>
|
||||
* var numbers = Rx.Observable.range(1, 10);
|
||||
* numbers.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link timer}
|
||||
* @see {@link interval}
|
||||
*
|
||||
* @param {number} [start=0] The value of the first integer in the sequence.
|
||||
* @param {number} [count=0] The number of sequential integers to generate.
|
||||
* @param {Scheduler} [scheduler] A {@link IScheduler} to use for scheduling
|
||||
* the emissions of the notifications.
|
||||
* @return {Observable} An Observable of numbers that emits a finite range of
|
||||
* sequential integers.
|
||||
* @static true
|
||||
* @name range
|
||||
* @owner Observable
|
||||
*/
|
||||
RangeObservable.create = function (start, count, scheduler) {
|
||||
if (start === void 0) {
|
||||
start = 0;
|
||||
}
|
||||
if (count === void 0) {
|
||||
count = 0;
|
||||
}
|
||||
return new RangeObservable(start, count, scheduler);
|
||||
};
|
||||
RangeObservable.dispatch = function (state) {
|
||||
var start = state.start, index = state.index, count = state.count, subscriber = state.subscriber;
|
||||
if (index >= count) {
|
||||
subscriber.complete();
|
||||
return;
|
||||
}
|
||||
subscriber.next(start);
|
||||
if (subscriber.closed) {
|
||||
return;
|
||||
}
|
||||
state.index = index + 1;
|
||||
state.start = start + 1;
|
||||
this.schedule(state);
|
||||
};
|
||||
/** @deprecated internal use only */ RangeObservable.prototype._subscribe = function (subscriber) {
|
||||
var index = 0;
|
||||
var start = this.start;
|
||||
var count = this._count;
|
||||
var scheduler = this.scheduler;
|
||||
if (scheduler) {
|
||||
return scheduler.schedule(RangeObservable.dispatch, 0, {
|
||||
index: index, count: count, start: start, subscriber: subscriber
|
||||
});
|
||||
}
|
||||
else {
|
||||
do {
|
||||
if (index++ >= count) {
|
||||
subscriber.complete();
|
||||
break;
|
||||
}
|
||||
subscriber.next(start++);
|
||||
if (subscriber.closed) {
|
||||
break;
|
||||
}
|
||||
} while (true);
|
||||
}
|
||||
};
|
||||
return RangeObservable;
|
||||
}(Observable));
|
||||
//# sourceMappingURL=RangeObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/RangeObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/RangeObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"RangeObservable.js","sourceRoot":"","sources":["../../src/observable/RangeObservable.ts"],"names":[],"mappings":";;;;;OACO,EAAE,UAAU,EAAE,MAAM,eAAe;AAI1C;;;;GAIG;AACH;IAAqC,mCAAkB;IA+DrD,yBAAY,KAAa,EACb,KAAa,EACb,SAAsB;QAChC,iBAAO,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IApED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACI,sBAAM,GAAb,UAAc,KAAiB,EACjB,KAAiB,EACjB,SAAsB;QAFtB,qBAAiB,GAAjB,SAAiB;QACjB,qBAAiB,GAAjB,SAAiB;QAE7B,MAAM,CAAC,IAAI,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IACtD,CAAC;IAEM,wBAAQ,GAAf,UAAgB,KAAU;QAEhB,uBAAK,EAAE,mBAAK,EAAE,mBAAK,EAAE,6BAAU,CAAW;QAElD,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;YACnB,UAAU,CAAC,QAAQ,EAAE,CAAC;YACtB,MAAM,CAAC;QACT,CAAC;QAED,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAEvB,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC;QACT,CAAC;QAED,KAAK,CAAC,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC;QACxB,KAAK,CAAC,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC;QAEjB,IAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAeD,oCAAoC,CAAC,oCAAU,GAAV,UAAW,UAA8B;QAC5E,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACvB,IAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAEjC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;YACd,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,EAAE;gBACrD,YAAK,EAAE,YAAK,EAAE,YAAK,EAAE,sBAAU;aAChC,CAAC,CAAC;QACL,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,GAAG,CAAC;gBACF,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,KAAK,CAAC,CAAC,CAAC;oBACrB,UAAU,CAAC,QAAQ,EAAE,CAAC;oBACtB,KAAK,CAAC;gBACR,CAAC;gBACD,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;gBACzB,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;oBACtB,KAAK,CAAC;gBACR,CAAC;YACH,CAAC,QAAQ,IAAI,EAAE;QACjB,CAAC;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AA/FD,CAAqC,UAAU,GA+F9C"}
|
59
node_modules/rxjs/_esm5/observable/ScalarObservable.js
generated
vendored
Normal file
59
node_modules/rxjs/_esm5/observable/ScalarObservable.js
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
/** PURE_IMPORTS_START .._Observable PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var ScalarObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(ScalarObservable, _super);
|
||||
function ScalarObservable(value, scheduler) {
|
||||
_super.call(this);
|
||||
this.value = value;
|
||||
this.scheduler = scheduler;
|
||||
this._isScalar = true;
|
||||
if (scheduler) {
|
||||
this._isScalar = false;
|
||||
}
|
||||
}
|
||||
ScalarObservable.create = function (value, scheduler) {
|
||||
return new ScalarObservable(value, scheduler);
|
||||
};
|
||||
ScalarObservable.dispatch = function (state) {
|
||||
var done = state.done, value = state.value, subscriber = state.subscriber;
|
||||
if (done) {
|
||||
subscriber.complete();
|
||||
return;
|
||||
}
|
||||
subscriber.next(value);
|
||||
if (subscriber.closed) {
|
||||
return;
|
||||
}
|
||||
state.done = true;
|
||||
this.schedule(state);
|
||||
};
|
||||
/** @deprecated internal use only */ ScalarObservable.prototype._subscribe = function (subscriber) {
|
||||
var value = this.value;
|
||||
var scheduler = this.scheduler;
|
||||
if (scheduler) {
|
||||
return scheduler.schedule(ScalarObservable.dispatch, 0, {
|
||||
done: false, value: value, subscriber: subscriber
|
||||
});
|
||||
}
|
||||
else {
|
||||
subscriber.next(value);
|
||||
if (!subscriber.closed) {
|
||||
subscriber.complete();
|
||||
}
|
||||
}
|
||||
};
|
||||
return ScalarObservable;
|
||||
}(Observable));
|
||||
//# sourceMappingURL=ScalarObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/ScalarObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/ScalarObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
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,EAAE,CAAC,EAAE;gBACtD,IAAI,EAAE,KAAK,EAAE,YAAK,EAAE,sBAAU;aAC/B,CAAC,CAAC;QACL,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACvB,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;gBACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC;QACH,CAAC;IACH,CAAC;IACH,uBAAC;AAAD,CAAC,AA9CD,CAAyC,UAAU,GA8ClD"}
|
60
node_modules/rxjs/_esm5/observable/SubscribeOnObservable.js
generated
vendored
Normal file
60
node_modules/rxjs/_esm5/observable/SubscribeOnObservable.js
generated
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
/** PURE_IMPORTS_START .._Observable,.._scheduler_asap,.._util_isNumeric PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
import { asap } from '../scheduler/asap';
|
||||
import { isNumeric } from '../util/isNumeric';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var SubscribeOnObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(SubscribeOnObservable, _super);
|
||||
function SubscribeOnObservable(source, delayTime, scheduler) {
|
||||
if (delayTime === void 0) {
|
||||
delayTime = 0;
|
||||
}
|
||||
if (scheduler === void 0) {
|
||||
scheduler = asap;
|
||||
}
|
||||
_super.call(this);
|
||||
this.source = source;
|
||||
this.delayTime = delayTime;
|
||||
this.scheduler = scheduler;
|
||||
if (!isNumeric(delayTime) || delayTime < 0) {
|
||||
this.delayTime = 0;
|
||||
}
|
||||
if (!scheduler || typeof scheduler.schedule !== 'function') {
|
||||
this.scheduler = asap;
|
||||
}
|
||||
}
|
||||
SubscribeOnObservable.create = function (source, delay, scheduler) {
|
||||
if (delay === void 0) {
|
||||
delay = 0;
|
||||
}
|
||||
if (scheduler === void 0) {
|
||||
scheduler = asap;
|
||||
}
|
||||
return new SubscribeOnObservable(source, delay, scheduler);
|
||||
};
|
||||
SubscribeOnObservable.dispatch = function (arg) {
|
||||
var source = arg.source, subscriber = arg.subscriber;
|
||||
return this.add(source.subscribe(subscriber));
|
||||
};
|
||||
/** @deprecated internal use only */ SubscribeOnObservable.prototype._subscribe = function (subscriber) {
|
||||
var delay = this.delayTime;
|
||||
var source = this.source;
|
||||
var scheduler = this.scheduler;
|
||||
return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {
|
||||
source: source, subscriber: subscriber
|
||||
});
|
||||
};
|
||||
return SubscribeOnObservable;
|
||||
}(Observable));
|
||||
//# sourceMappingURL=SubscribeOnObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/SubscribeOnObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/SubscribeOnObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"SubscribeOnObservable.js","sourceRoot":"","sources":["../../src/observable/SubscribeOnObservable.ts"],"names":[],"mappings":";;;;;OAIO,EAAE,UAAU,EAAE,MAAM,eAAe;OACnC,EAAE,IAAI,EAAE,MAAM,mBAAmB;OACjC,EAAE,SAAS,EAAE,MAAM,mBAAmB;AAO7C;;;;GAIG;AACH;IAA8C,yCAAa;IAUzD,+BAAmB,MAAqB,EACpB,SAAqB,EACrB,SAA4B;QADpC,yBAA6B,GAA7B,aAA6B;QAC7B,yBAAoC,GAApC,gBAAoC;QAC9C,iBAAO,CAAC;QAHS,WAAM,GAAN,MAAM,CAAe;QACpB,cAAS,GAAT,SAAS,CAAY;QACrB,cAAS,GAAT,SAAS,CAAmB;QAE9C,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC;YAC3C,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACrB,CAAC;QACD,EAAE,CAAC,CAAC,CAAC,SAAS,IAAI,OAAO,SAAS,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC;YAC3D,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACxB,CAAC;IACH,CAAC;IAnBM,4BAAM,GAAb,UAAiB,MAAqB,EAAE,KAAiB,EAAE,SAA4B;QAA/C,qBAAiB,GAAjB,SAAiB;QAAE,yBAA4B,GAA5B,gBAA4B;QACrF,MAAM,CAAC,IAAI,qBAAqB,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAC7D,CAAC;IAEM,8BAAQ,GAAf,UAAoC,GAAmB;QAC7C,uBAAM,EAAE,2BAAU,CAAS;QACnC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IAChD,CAAC;IAcD,oCAAoC,CAAC,0CAAU,GAAV,UAAW,UAAyB;QACvE,IAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC;QAC7B,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAEjC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,qBAAqB,CAAC,QAAQ,EAAE,KAAK,EAAE;YAC/D,cAAM,EAAE,sBAAU;SACnB,CAAC,CAAC;IACL,CAAC;IACH,4BAAC;AAAD,CAAC,AA/BD,CAA8C,UAAU,GA+BvD"}
|
112
node_modules/rxjs/_esm5/observable/TimerObservable.js
generated
vendored
Normal file
112
node_modules/rxjs/_esm5/observable/TimerObservable.js
generated
vendored
Normal file
@ -0,0 +1,112 @@
|
||||
/** PURE_IMPORTS_START .._util_isNumeric,.._Observable,.._scheduler_async,.._util_isScheduler,.._util_isDate PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { isNumeric } from '../util/isNumeric';
|
||||
import { Observable } from '../Observable';
|
||||
import { async } from '../scheduler/async';
|
||||
import { isScheduler } from '../util/isScheduler';
|
||||
import { isDate } from '../util/isDate';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var TimerObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(TimerObservable, _super);
|
||||
function TimerObservable(dueTime, period, scheduler) {
|
||||
if (dueTime === void 0) {
|
||||
dueTime = 0;
|
||||
}
|
||||
_super.call(this);
|
||||
this.period = -1;
|
||||
this.dueTime = 0;
|
||||
if (isNumeric(period)) {
|
||||
this.period = Number(period) < 1 && 1 || Number(period);
|
||||
}
|
||||
else if (isScheduler(period)) {
|
||||
scheduler = period;
|
||||
}
|
||||
if (!isScheduler(scheduler)) {
|
||||
scheduler = async;
|
||||
}
|
||||
this.scheduler = scheduler;
|
||||
this.dueTime = isDate(dueTime) ?
|
||||
(+dueTime - this.scheduler.now()) :
|
||||
dueTime;
|
||||
}
|
||||
/**
|
||||
* Creates an Observable that starts emitting after an `initialDelay` and
|
||||
* emits ever increasing numbers after each `period` of time thereafter.
|
||||
*
|
||||
* <span class="informal">Its like {@link interval}, but you can specify when
|
||||
* should the emissions start.</span>
|
||||
*
|
||||
* <img src="./img/timer.png" width="100%">
|
||||
*
|
||||
* `timer` returns an Observable that emits an infinite sequence of ascending
|
||||
* integers, with a constant interval of time, `period` of your choosing
|
||||
* between those emissions. The first emission happens after the specified
|
||||
* `initialDelay`. The initial delay may be a {@link Date}. By default, this
|
||||
* operator uses the `async` IScheduler to provide a notion of time, but you
|
||||
* may pass any IScheduler to it. If `period` is not specified, the output
|
||||
* Observable emits only one value, `0`. Otherwise, it emits an infinite
|
||||
* sequence.
|
||||
*
|
||||
* @example <caption>Emits ascending numbers, one every second (1000ms), starting after 3 seconds</caption>
|
||||
* var numbers = Rx.Observable.timer(3000, 1000);
|
||||
* numbers.subscribe(x => console.log(x));
|
||||
*
|
||||
* @example <caption>Emits one number after five seconds</caption>
|
||||
* var numbers = Rx.Observable.timer(5000);
|
||||
* numbers.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link interval}
|
||||
* @see {@link delay}
|
||||
*
|
||||
* @param {number|Date} initialDelay The initial delay time to wait before
|
||||
* emitting the first value of `0`.
|
||||
* @param {number} [period] The period of time between emissions of the
|
||||
* subsequent numbers.
|
||||
* @param {Scheduler} [scheduler=async] The IScheduler to use for scheduling
|
||||
* the emission of values, and providing a notion of "time".
|
||||
* @return {Observable} An Observable that emits a `0` after the
|
||||
* `initialDelay` and ever increasing numbers after each `period` of time
|
||||
* thereafter.
|
||||
* @static true
|
||||
* @name timer
|
||||
* @owner Observable
|
||||
*/
|
||||
TimerObservable.create = function (initialDelay, period, scheduler) {
|
||||
if (initialDelay === void 0) {
|
||||
initialDelay = 0;
|
||||
}
|
||||
return new TimerObservable(initialDelay, period, scheduler);
|
||||
};
|
||||
TimerObservable.dispatch = function (state) {
|
||||
var index = state.index, period = state.period, subscriber = state.subscriber;
|
||||
var action = this;
|
||||
subscriber.next(index);
|
||||
if (subscriber.closed) {
|
||||
return;
|
||||
}
|
||||
else if (period === -1) {
|
||||
return subscriber.complete();
|
||||
}
|
||||
state.index = index + 1;
|
||||
action.schedule(state, period);
|
||||
};
|
||||
/** @deprecated internal use only */ TimerObservable.prototype._subscribe = function (subscriber) {
|
||||
var index = 0;
|
||||
var _a = this, period = _a.period, dueTime = _a.dueTime, scheduler = _a.scheduler;
|
||||
return scheduler.schedule(TimerObservable.dispatch, dueTime, {
|
||||
index: index, period: period, subscriber: subscriber
|
||||
});
|
||||
};
|
||||
return TimerObservable;
|
||||
}(Observable));
|
||||
//# sourceMappingURL=TimerObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/TimerObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/TimerObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"TimerObservable.js","sourceRoot":"","sources":["../../src/observable/TimerObservable.ts"],"names":[],"mappings":";;;;;OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB;OAEtC,EAAE,UAAU,EAAE,MAAM,eAAe;OACnC,EAAE,KAAK,EAAE,MAAM,oBAAoB;OACnC,EAAE,WAAW,EAAE,MAAM,qBAAqB;OAC1C,EAAE,MAAM,EAAE,MAAM,gBAAgB;AAIvC;;;;GAIG;AACH;IAAqC,mCAAkB;IAuErD,yBAAY,OAA0B,EAC1B,MAA4B,EAC5B,SAAsB;QAFtB,uBAA0B,GAA1B,WAA0B;QAGpC,iBAAO,CAAC;QAPF,WAAM,GAAW,CAAC,CAAC,CAAC;QACpB,YAAO,GAAW,CAAC,CAAC;QAQ1B,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;QAC1D,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC/B,SAAS,GAAgB,MAAM,CAAC;QAClC,CAAC;QAED,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YAC5B,SAAS,GAAG,KAAK,CAAC;QACpB,CAAC;QAED,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,C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AAD,CAAC,AApGD,CAAqC,UAAU,GAoG9C"}
|
62
node_modules/rxjs/_esm5/observable/UsingObservable.js
generated
vendored
Normal file
62
node_modules/rxjs/_esm5/observable/UsingObservable.js
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
/** PURE_IMPORTS_START .._Observable,.._util_subscribeToResult,.._OuterSubscriber PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Observable } from '../Observable';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var UsingObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(UsingObservable, _super);
|
||||
function UsingObservable(resourceFactory, observableFactory) {
|
||||
_super.call(this);
|
||||
this.resourceFactory = resourceFactory;
|
||||
this.observableFactory = observableFactory;
|
||||
}
|
||||
UsingObservable.create = function (resourceFactory, observableFactory) {
|
||||
return new UsingObservable(resourceFactory, observableFactory);
|
||||
};
|
||||
/** @deprecated internal use only */ UsingObservable.prototype._subscribe = function (subscriber) {
|
||||
var _a = this, resourceFactory = _a.resourceFactory, observableFactory = _a.observableFactory;
|
||||
var resource;
|
||||
try {
|
||||
resource = resourceFactory();
|
||||
return new UsingSubscriber(subscriber, resource, observableFactory);
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
}
|
||||
};
|
||||
return UsingObservable;
|
||||
}(Observable));
|
||||
var UsingSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(UsingSubscriber, _super);
|
||||
function UsingSubscriber(destination, resource, observableFactory) {
|
||||
_super.call(this, destination);
|
||||
this.resource = resource;
|
||||
this.observableFactory = observableFactory;
|
||||
destination.add(resource);
|
||||
this.tryUse();
|
||||
}
|
||||
UsingSubscriber.prototype.tryUse = function () {
|
||||
try {
|
||||
var source = this.observableFactory.call(this, this.resource);
|
||||
if (source) {
|
||||
this.add(subscribeToResult(this, source));
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
this._error(err);
|
||||
}
|
||||
};
|
||||
return UsingSubscriber;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=UsingObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/UsingObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/UsingObservable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"UsingObservable.js","sourceRoot":"","sources":["../../src/observable/UsingObservable.ts"],"names":[],"mappings":";;;;;OAAO,EAAE,UAAU,EAAyB,MAAM,eAAe;OAI1D,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;OACtD,EAAE,eAAe,EAAE,MAAM,oBAAoB;AACpD;;;;GAIG;AACH;IAAwC,mCAAa;IAOnD,yBAAoB,eAAmD,EACnD,iBAAuF;QACzG,iBAAO,CAAC;QAFU,oBAAe,GAAf,eAAe,CAAoC;QACnD,sBAAiB,GAAjB,iBAAiB,CAAsE;IAE3G,CAAC;IARM,sBAAM,GAAb,UAAiB,eAAmD,EACnD,iBAAuF;QACtG,MAAM,CAAC,IAAI,eAAe,CAAI,eAAe,EAAE,iBAAiB,CAAC,CAAC;IACpE,CAAC;IAOD,oCAAoC,CAAC,oCAAU,GAAV,UAAW,UAAyB;QACvE,IAAA,SAAmD,EAA3C,oCAAe,EAAE,wCAAiB,CAAU;QAEpD,IAAI,QAA+B,CAAC;QAEpC,IAAI,CAAC;YACH,QAAQ,GAA0B,eAAe,EAAE,CAAC;YACpD,MAAM,CAAC,IAAI,eAAe,CAAC,UAAU,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC;QACtE,CAAE;QAAA,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACb,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AAxBD,CAAwC,UAAU,GAwBjD;AAED;IAAiC,mCAAqB;IACpD,yBAAY,WAA0B,EAClB,QAA+B,EAC/B,iBAAuF;QACzG,kBAAM,WAAW,CAAC,CAAC;QAFD,aAAQ,GAAR,QAAQ,CAAuB;QAC/B,sBAAiB,GAAjB,iBAAiB,CAAsE;QAEzG,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC1B,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAEO,gCAAM,GAAd;QACE,IAAI,CAAC;YACH,IAAM,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YAChE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;gBACX,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;YAC5C,CAAC;QACH,CAAE;QAAA,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACb,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AAnBD,CAAiC,eAAe,GAmB/C"}
|
4
node_modules/rxjs/_esm5/observable/bindCallback.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/bindCallback.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._BoundCallbackObservable PURE_IMPORTS_END */
|
||||
import { BoundCallbackObservable } from './BoundCallbackObservable';
|
||||
export var bindCallback = BoundCallbackObservable.create;
|
||||
//# sourceMappingURL=bindCallback.js.map
|
1
node_modules/rxjs/_esm5/observable/bindCallback.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/bindCallback.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"bindCallback.js","sourceRoot":"","sources":["../../src/observable/bindCallback.ts"],"names":[],"mappings":"OAAO,EAAG,uBAAuB,EAAG,MAAM,2BAA2B;AAErE,OAAO,IAAM,YAAY,GAAG,uBAAuB,CAAC,MAAM,CAAC"}
|
4
node_modules/rxjs/_esm5/observable/bindNodeCallback.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/bindNodeCallback.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._BoundNodeCallbackObservable PURE_IMPORTS_END */
|
||||
import { BoundNodeCallbackObservable } from './BoundNodeCallbackObservable';
|
||||
export var bindNodeCallback = BoundNodeCallbackObservable.create;
|
||||
//# sourceMappingURL=bindNodeCallback.js.map
|
1
node_modules/rxjs/_esm5/observable/bindNodeCallback.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/bindNodeCallback.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"bindNodeCallback.js","sourceRoot":"","sources":["../../src/observable/bindNodeCallback.ts"],"names":[],"mappings":"OAAO,EAAG,2BAA2B,EAAG,MAAM,+BAA+B;AAE7E,OAAO,IAAM,gBAAgB,GAAG,2BAA2B,CAAC,MAAM,CAAC"}
|
135
node_modules/rxjs/_esm5/observable/combineLatest.js
generated
vendored
Normal file
135
node_modules/rxjs/_esm5/observable/combineLatest.js
generated
vendored
Normal file
@ -0,0 +1,135 @@
|
||||
/** PURE_IMPORTS_START .._util_isScheduler,.._util_isArray,._ArrayObservable,.._operators_combineLatest PURE_IMPORTS_END */
|
||||
import { isScheduler } from '../util/isScheduler';
|
||||
import { isArray } from '../util/isArray';
|
||||
import { ArrayObservable } from './ArrayObservable';
|
||||
import { CombineLatestOperator } from '../operators/combineLatest';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Combines multiple Observables to create an Observable whose values are
|
||||
* calculated from the latest values of each of its input Observables.
|
||||
*
|
||||
* <span class="informal">Whenever any input Observable emits a value, it
|
||||
* computes a formula using the latest values from all the inputs, then emits
|
||||
* the output of that formula.</span>
|
||||
*
|
||||
* <img src="./img/combineLatest.png" width="100%">
|
||||
*
|
||||
* `combineLatest` combines the values from all the Observables passed as
|
||||
* arguments. This is done by subscribing to each Observable in order and,
|
||||
* whenever any Observable emits, collecting an array of the most recent
|
||||
* values from each Observable. So if you pass `n` Observables to operator,
|
||||
* returned Observable will always emit an array of `n` values, in order
|
||||
* corresponding to order of passed Observables (value from the first Observable
|
||||
* on the first place and so on).
|
||||
*
|
||||
* Static version of `combineLatest` accepts either an array of Observables
|
||||
* or each Observable can be put directly as an argument. Note that array of
|
||||
* Observables is good choice, if you don't know beforehand how many Observables
|
||||
* you will combine. Passing empty array will result in Observable that
|
||||
* completes immediately.
|
||||
*
|
||||
* To ensure output array has always the same length, `combineLatest` will
|
||||
* actually wait for all input Observables to emit at least once,
|
||||
* before it starts emitting results. This means if some Observable emits
|
||||
* values before other Observables started emitting, all that values but last
|
||||
* will be lost. On the other hand, is some Observable does not emit value but
|
||||
* completes, resulting Observable will complete at the same moment without
|
||||
* emitting anything, since it will be now impossible to include value from
|
||||
* completed Observable in resulting array. Also, if some input Observable does
|
||||
* not emit any value and never completes, `combineLatest` will also never emit
|
||||
* and never complete, since, again, it will wait for all streams to emit some
|
||||
* value.
|
||||
*
|
||||
* If at least one Observable was passed to `combineLatest` and all passed Observables
|
||||
* emitted something, resulting Observable will complete when all combined
|
||||
* streams complete. So even if some Observable completes, result of
|
||||
* `combineLatest` will still emit values when other Observables do. In case
|
||||
* of completed Observable, its value from now on will always be the last
|
||||
* emitted value. On the other hand, if any Observable errors, `combineLatest`
|
||||
* will error immediately as well, and all other Observables will be unsubscribed.
|
||||
*
|
||||
* `combineLatest` accepts as optional parameter `project` function, which takes
|
||||
* as arguments all values that would normally be emitted by resulting Observable.
|
||||
* `project` can return any kind of value, which will be then emitted by Observable
|
||||
* instead of default array. Note that `project` does not take as argument that array
|
||||
* of values, but values themselves. That means default `project` can be imagined
|
||||
* as function that takes all its arguments and puts them into an array.
|
||||
*
|
||||
*
|
||||
* @example <caption>Combine two timer Observables</caption>
|
||||
* const firstTimer = Rx.Observable.timer(0, 1000); // emit 0, 1, 2... after every second, starting from now
|
||||
* const secondTimer = Rx.Observable.timer(500, 1000); // emit 0, 1, 2... after every second, starting 0,5s from now
|
||||
* const combinedTimers = Rx.Observable.combineLatest(firstTimer, secondTimer);
|
||||
* combinedTimers.subscribe(value => console.log(value));
|
||||
* // Logs
|
||||
* // [0, 0] after 0.5s
|
||||
* // [1, 0] after 1s
|
||||
* // [1, 1] after 1.5s
|
||||
* // [2, 1] after 2s
|
||||
*
|
||||
*
|
||||
* @example <caption>Combine an array of Observables</caption>
|
||||
* const observables = [1, 5, 10].map(
|
||||
* n => Rx.Observable.of(n).delay(n * 1000).startWith(0) // emit 0 and then emit n after n seconds
|
||||
* );
|
||||
* const combined = Rx.Observable.combineLatest(observables);
|
||||
* combined.subscribe(value => console.log(value));
|
||||
* // Logs
|
||||
* // [0, 0, 0] immediately
|
||||
* // [1, 0, 0] after 1s
|
||||
* // [1, 5, 0] after 5s
|
||||
* // [1, 5, 10] after 10s
|
||||
*
|
||||
*
|
||||
* @example <caption>Use project function to dynamically calculate the Body-Mass Index</caption>
|
||||
* var weight = Rx.Observable.of(70, 72, 76, 79, 75);
|
||||
* var height = Rx.Observable.of(1.76, 1.77, 1.78);
|
||||
* var bmi = Rx.Observable.combineLatest(weight, height, (w, h) => w / (h * h));
|
||||
* bmi.subscribe(x => console.log('BMI is ' + x));
|
||||
*
|
||||
* // With output to console:
|
||||
* // BMI is 24.212293388429753
|
||||
* // BMI is 23.93948099205209
|
||||
* // BMI is 23.671253629592222
|
||||
*
|
||||
*
|
||||
* @see {@link combineAll}
|
||||
* @see {@link merge}
|
||||
* @see {@link withLatestFrom}
|
||||
*
|
||||
* @param {ObservableInput} observable1 An input Observable to combine with other Observables.
|
||||
* @param {ObservableInput} observable2 An input Observable to combine with other Observables.
|
||||
* More than one input Observables may be given as arguments
|
||||
* or an array of Observables may be given as the first argument.
|
||||
* @param {function} [project] An optional function to project the values from
|
||||
* the combined latest values into a new value on the output Observable.
|
||||
* @param {Scheduler} [scheduler=null] The IScheduler to use for subscribing to
|
||||
* each input Observable.
|
||||
* @return {Observable} An Observable of projected values from the most recent
|
||||
* values from each input Observable, or an array of the most recent values from
|
||||
* each input Observable.
|
||||
* @static true
|
||||
* @name combineLatest
|
||||
* @owner Observable
|
||||
*/
|
||||
export function combineLatest() {
|
||||
var observables = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
observables[_i - 0] = arguments[_i];
|
||||
}
|
||||
var project = null;
|
||||
var scheduler = null;
|
||||
if (isScheduler(observables[observables.length - 1])) {
|
||||
scheduler = observables.pop();
|
||||
}
|
||||
if (typeof observables[observables.length - 1] === 'function') {
|
||||
project = observables.pop();
|
||||
}
|
||||
// if the first and only other argument besides the resultSelector is an array
|
||||
// assume it's been called with `combineLatest([obs1, obs2, obs3], project)`
|
||||
if (observables.length === 1 && isArray(observables[0])) {
|
||||
observables = observables[0];
|
||||
}
|
||||
return new ArrayObservable(observables, scheduler).lift(new CombineLatestOperator(project));
|
||||
}
|
||||
//# sourceMappingURL=combineLatest.js.map
|
1
node_modules/rxjs/_esm5/observable/combineLatest.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/combineLatest.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"combineLatest.js","sourceRoot":"","sources":["../../src/observable/combineLatest.ts"],"names":[],"mappings":"OAEO,EAAG,WAAW,EAAG,MAAM,qBAAqB;OAC5C,EAAG,OAAO,EAAG,MAAM,iBAAiB;OACpC,EAAG,eAAe,EAAG,MAAM,mBAAmB;OAC9C,EAAG,qBAAqB,EAAG,MAAM,4BAA4B;AAuBpE,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2GG;AACH;IAAoC,qBAG2B;SAH3B,WAG2B,CAH3B,sBAG2B,CAH3B,IAG2B;QAH3B,oCAG2B;;IAC7D,IAAI,OAAO,GAAkC,IAAI,CAAC;IAClD,IAAI,SAAS,GAAe,IAAI,CAAC;IAEjC,EAAE,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrD,SAAS,GAAe,WAAW,CAAC,GAAG,EAAE,CAAC;IAC5C,CAAC;IAED,EAAE,CAAC,CAAC,OAAO,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC;QAC9D,OAAO,GAAiC,WAAW,CAAC,GAAG,EAAE,CAAC;IAC5D,CAAC;IAED,8EAA8E;IAC9E,4EAA4E;IAC5E,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxD,WAAW,GAA2B,WAAW,CAAC,CAAC,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,CAAC,IAAI,eAAe,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,qBAAqB,CAAO,OAAO,CAAC,CAAC,CAAC;AACpG,CAAC"}
|
110
node_modules/rxjs/_esm5/observable/concat.js
generated
vendored
Normal file
110
node_modules/rxjs/_esm5/observable/concat.js
generated
vendored
Normal file
@ -0,0 +1,110 @@
|
||||
/** PURE_IMPORTS_START .._util_isScheduler,._of,._from,.._operators_concatAll PURE_IMPORTS_END */
|
||||
import { isScheduler } from '../util/isScheduler';
|
||||
import { of } from './of';
|
||||
import { from } from './from';
|
||||
import { concatAll } from '../operators/concatAll';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Creates an output Observable which sequentially emits all values from given
|
||||
* Observable and then moves on to the next.
|
||||
*
|
||||
* <span class="informal">Concatenates multiple Observables together by
|
||||
* sequentially emitting their values, one Observable after the other.</span>
|
||||
*
|
||||
* <img src="./img/concat.png" width="100%">
|
||||
*
|
||||
* `concat` joins multiple Observables together, by subscribing to them one at a time and
|
||||
* merging their results into the output Observable. You can pass either an array of
|
||||
* Observables, or put them directly as arguments. Passing an empty array will result
|
||||
* in Observable that completes immediately.
|
||||
*
|
||||
* `concat` will subscribe to first input Observable and emit all its values, without
|
||||
* changing or affecting them in any way. When that Observable completes, it will
|
||||
* subscribe to then next Observable passed and, again, emit its values. This will be
|
||||
* repeated, until the operator runs out of Observables. When last input Observable completes,
|
||||
* `concat` will complete as well. At any given moment only one Observable passed to operator
|
||||
* emits values. If you would like to emit values from passed Observables concurrently, check out
|
||||
* {@link merge} instead, especially with optional `concurrent` parameter. As a matter of fact,
|
||||
* `concat` is an equivalent of `merge` operator with `concurrent` parameter set to `1`.
|
||||
*
|
||||
* Note that if some input Observable never completes, `concat` will also never complete
|
||||
* and Observables following the one that did not complete will never be subscribed. On the other
|
||||
* hand, if some Observable simply completes immediately after it is subscribed, it will be
|
||||
* invisible for `concat`, which will just move on to the next Observable.
|
||||
*
|
||||
* If any Observable in chain errors, instead of passing control to the next Observable,
|
||||
* `concat` will error immediately as well. Observables that would be subscribed after
|
||||
* the one that emitted error, never will.
|
||||
*
|
||||
* If you pass to `concat` the same Observable many times, its stream of values
|
||||
* will be "replayed" on every subscription, which means you can repeat given Observable
|
||||
* as many times as you like. If passing the same Observable to `concat` 1000 times becomes tedious,
|
||||
* you can always use {@link repeat}.
|
||||
*
|
||||
* @example <caption>Concatenate a timer counting from 0 to 3 with a synchronous sequence from 1 to 10</caption>
|
||||
* var timer = Rx.Observable.interval(1000).take(4);
|
||||
* var sequence = Rx.Observable.range(1, 10);
|
||||
* var result = Rx.Observable.concat(timer, sequence);
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* // results in:
|
||||
* // 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 -immediate-> 1 ... 10
|
||||
*
|
||||
*
|
||||
* @example <caption>Concatenate an array of 3 Observables</caption>
|
||||
* var timer1 = Rx.Observable.interval(1000).take(10);
|
||||
* var timer2 = Rx.Observable.interval(2000).take(6);
|
||||
* var timer3 = Rx.Observable.interval(500).take(10);
|
||||
* var result = Rx.Observable.concat([timer1, timer2, timer3]); // note that array is passed
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* // results in the following:
|
||||
* // (Prints to console sequentially)
|
||||
* // -1000ms-> 0 -1000ms-> 1 -1000ms-> ... 9
|
||||
* // -2000ms-> 0 -2000ms-> 1 -2000ms-> ... 5
|
||||
* // -500ms-> 0 -500ms-> 1 -500ms-> ... 9
|
||||
*
|
||||
*
|
||||
* @example <caption>Concatenate the same Observable to repeat it</caption>
|
||||
* const timer = Rx.Observable.interval(1000).take(2);
|
||||
*
|
||||
* Rx.Observable.concat(timer, timer) // concating the same Observable!
|
||||
* .subscribe(
|
||||
* value => console.log(value),
|
||||
* err => {},
|
||||
* () => console.log('...and it is done!')
|
||||
* );
|
||||
*
|
||||
* // Logs:
|
||||
* // 0 after 1s
|
||||
* // 1 after 2s
|
||||
* // 0 after 3s
|
||||
* // 1 after 4s
|
||||
* // "...and it is done!" also after 4s
|
||||
*
|
||||
* @see {@link concatAll}
|
||||
* @see {@link concatMap}
|
||||
* @see {@link concatMapTo}
|
||||
*
|
||||
* @param {ObservableInput} input1 An input Observable to concatenate with others.
|
||||
* @param {ObservableInput} input2 An input Observable to concatenate with others.
|
||||
* More than one input Observables may be given as argument.
|
||||
* @param {Scheduler} [scheduler=null] An optional IScheduler to schedule each
|
||||
* Observable subscription on.
|
||||
* @return {Observable} All values of each passed Observable merged into a
|
||||
* single Observable, in order, in serial fashion.
|
||||
* @static true
|
||||
* @name concat
|
||||
* @owner Observable
|
||||
*/
|
||||
export function concat() {
|
||||
var observables = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
observables[_i - 0] = arguments[_i];
|
||||
}
|
||||
if (observables.length === 1 || (observables.length === 2 && isScheduler(observables[1]))) {
|
||||
return from(observables[0]);
|
||||
}
|
||||
return concatAll()(of.apply(void 0, observables));
|
||||
}
|
||||
//# sourceMappingURL=concat.js.map
|
1
node_modules/rxjs/_esm5/observable/concat.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/concat.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"concat.js","sourceRoot":"","sources":["../../src/observable/concat.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE,MAAM,qBAAqB;OAC1C,EAAE,EAAE,EAAE,MAAM,MAAM;OAClB,EAAE,IAAI,EAAE,MAAM,QAAQ;OACtB,EAAE,SAAS,EAAE,MAAM,wBAAwB;AAWlD,mCAAmC;AACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4FG;AACH;IAA6B,qBAAwD;SAAxD,WAAwD,CAAxD,sBAAwD,CAAxD,IAAwD;QAAxD,oCAAwD;;IACnF,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1F,MAAM,CAAC,IAAI,CAAM,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC;IACD,MAAM,CAAC,SAAS,EAAE,CAAC,EAAE,eAAI,WAAW,CAAC,CAAkB,CAAC;AAC1D,CAAC"}
|
4
node_modules/rxjs/_esm5/observable/defer.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/defer.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._DeferObservable PURE_IMPORTS_END */
|
||||
import { DeferObservable } from './DeferObservable';
|
||||
export var defer = DeferObservable.create;
|
||||
//# sourceMappingURL=defer.js.map
|
1
node_modules/rxjs/_esm5/observable/defer.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/defer.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"defer.js","sourceRoot":"","sources":["../../src/observable/defer.ts"],"names":[],"mappings":"OAAO,EAAG,eAAe,EAAG,MAAM,mBAAmB;AAErD,OAAO,IAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC"}
|
419
node_modules/rxjs/_esm5/observable/dom/AjaxObservable.js
generated
vendored
Normal file
419
node_modules/rxjs/_esm5/observable/dom/AjaxObservable.js
generated
vendored
Normal file
@ -0,0 +1,419 @@
|
||||
/** PURE_IMPORTS_START .._.._util_root,.._.._util_tryCatch,.._.._util_errorObject,.._.._Observable,.._.._Subscriber,.._.._operators_map PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { root } from '../../util/root';
|
||||
import { tryCatch } from '../../util/tryCatch';
|
||||
import { errorObject } from '../../util/errorObject';
|
||||
import { Observable } from '../../Observable';
|
||||
import { Subscriber } from '../../Subscriber';
|
||||
import { map } from '../../operators/map';
|
||||
function getCORSRequest() {
|
||||
if (root.XMLHttpRequest) {
|
||||
return new root.XMLHttpRequest();
|
||||
}
|
||||
else if (!!root.XDomainRequest) {
|
||||
return new root.XDomainRequest();
|
||||
}
|
||||
else {
|
||||
throw new Error('CORS is not supported by your browser');
|
||||
}
|
||||
}
|
||||
function getXMLHttpRequest() {
|
||||
if (root.XMLHttpRequest) {
|
||||
return new root.XMLHttpRequest();
|
||||
}
|
||||
else {
|
||||
var progId = void 0;
|
||||
try {
|
||||
var progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'];
|
||||
for (var i = 0; i < 3; i++) {
|
||||
try {
|
||||
progId = progIds[i];
|
||||
if (new root.ActiveXObject(progId)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
}
|
||||
return new root.ActiveXObject(progId);
|
||||
}
|
||||
catch (e) {
|
||||
throw new Error('XMLHttpRequest is not supported by your browser');
|
||||
}
|
||||
}
|
||||
}
|
||||
export function ajaxGet(url, headers) {
|
||||
if (headers === void 0) {
|
||||
headers = null;
|
||||
}
|
||||
return new AjaxObservable({ method: 'GET', url: url, headers: headers });
|
||||
}
|
||||
;
|
||||
export function ajaxPost(url, body, headers) {
|
||||
return new AjaxObservable({ method: 'POST', url: url, body: body, headers: headers });
|
||||
}
|
||||
;
|
||||
export function ajaxDelete(url, headers) {
|
||||
return new AjaxObservable({ method: 'DELETE', url: url, headers: headers });
|
||||
}
|
||||
;
|
||||
export function ajaxPut(url, body, headers) {
|
||||
return new AjaxObservable({ method: 'PUT', url: url, body: body, headers: headers });
|
||||
}
|
||||
;
|
||||
export function ajaxPatch(url, body, headers) {
|
||||
return new AjaxObservable({ method: 'PATCH', url: url, body: body, headers: headers });
|
||||
}
|
||||
;
|
||||
var mapResponse = /*@__PURE__*/ map(function (x, index) { return x.response; });
|
||||
export function ajaxGetJSON(url, headers) {
|
||||
return mapResponse(new AjaxObservable({
|
||||
method: 'GET',
|
||||
url: url,
|
||||
responseType: 'json',
|
||||
headers: headers
|
||||
}));
|
||||
}
|
||||
;
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var AjaxObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(AjaxObservable, _super);
|
||||
function AjaxObservable(urlOrRequest) {
|
||||
_super.call(this);
|
||||
var request = {
|
||||
async: true,
|
||||
createXHR: function () {
|
||||
return this.crossDomain ? getCORSRequest.call(this) : getXMLHttpRequest();
|
||||
},
|
||||
crossDomain: false,
|
||||
withCredentials: false,
|
||||
headers: {},
|
||||
method: 'GET',
|
||||
responseType: 'json',
|
||||
timeout: 0
|
||||
};
|
||||
if (typeof urlOrRequest === 'string') {
|
||||
request.url = urlOrRequest;
|
||||
}
|
||||
else {
|
||||
for (var prop in urlOrRequest) {
|
||||
if (urlOrRequest.hasOwnProperty(prop)) {
|
||||
request[prop] = urlOrRequest[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
this.request = request;
|
||||
}
|
||||
/** @deprecated internal use only */ AjaxObservable.prototype._subscribe = function (subscriber) {
|
||||
return new AjaxSubscriber(subscriber, this.request);
|
||||
};
|
||||
/**
|
||||
* Creates an observable for an Ajax request with either a request object with
|
||||
* url, headers, etc or a string for a URL.
|
||||
*
|
||||
* @example
|
||||
* source = Rx.Observable.ajax('/products');
|
||||
* source = Rx.Observable.ajax({ url: 'products', method: 'GET' });
|
||||
*
|
||||
* @param {string|Object} request Can be one of the following:
|
||||
* A string of the URL to make the Ajax call.
|
||||
* An object with the following properties
|
||||
* - url: URL of the request
|
||||
* - body: The body of the request
|
||||
* - method: Method of the request, such as GET, POST, PUT, PATCH, DELETE
|
||||
* - async: Whether the request is async
|
||||
* - headers: Optional headers
|
||||
* - crossDomain: true if a cross domain request, else false
|
||||
* - createXHR: a function to override if you need to use an alternate
|
||||
* XMLHttpRequest implementation.
|
||||
* - resultSelector: a function to use to alter the output value type of
|
||||
* the Observable. Gets {@link AjaxResponse} as an argument.
|
||||
* @return {Observable} An observable sequence containing the XMLHttpRequest.
|
||||
* @static true
|
||||
* @name ajax
|
||||
* @owner Observable
|
||||
*/
|
||||
AjaxObservable.create = (function () {
|
||||
var create = function (urlOrRequest) {
|
||||
return new AjaxObservable(urlOrRequest);
|
||||
};
|
||||
create.get = ajaxGet;
|
||||
create.post = ajaxPost;
|
||||
create.delete = ajaxDelete;
|
||||
create.put = ajaxPut;
|
||||
create.patch = ajaxPatch;
|
||||
create.getJSON = ajaxGetJSON;
|
||||
return create;
|
||||
})();
|
||||
return AjaxObservable;
|
||||
}(Observable));
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
export var AjaxSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(AjaxSubscriber, _super);
|
||||
function AjaxSubscriber(destination, request) {
|
||||
_super.call(this, destination);
|
||||
this.request = request;
|
||||
this.done = false;
|
||||
var headers = request.headers = request.headers || {};
|
||||
// force CORS if requested
|
||||
if (!request.crossDomain && !headers['X-Requested-With']) {
|
||||
headers['X-Requested-With'] = 'XMLHttpRequest';
|
||||
}
|
||||
// ensure content type is set
|
||||
if (!('Content-Type' in headers) && !(root.FormData && request.body instanceof root.FormData) && typeof request.body !== 'undefined') {
|
||||
headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
|
||||
}
|
||||
// properly serialize body
|
||||
request.body = this.serializeBody(request.body, request.headers['Content-Type']);
|
||||
this.send();
|
||||
}
|
||||
AjaxSubscriber.prototype.next = function (e) {
|
||||
this.done = true;
|
||||
var _a = this, xhr = _a.xhr, request = _a.request, destination = _a.destination;
|
||||
var response = new AjaxResponse(e, xhr, request);
|
||||
destination.next(response);
|
||||
};
|
||||
AjaxSubscriber.prototype.send = function () {
|
||||
var _a = this, request = _a.request, _b = _a.request, user = _b.user, method = _b.method, url = _b.url, async = _b.async, password = _b.password, headers = _b.headers, body = _b.body;
|
||||
var createXHR = request.createXHR;
|
||||
var xhr = tryCatch(createXHR).call(request);
|
||||
if (xhr === errorObject) {
|
||||
this.error(errorObject.e);
|
||||
}
|
||||
else {
|
||||
this.xhr = xhr;
|
||||
// set up the events before open XHR
|
||||
// https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest
|
||||
// You need to add the event listeners before calling open() on the request.
|
||||
// Otherwise the progress events will not fire.
|
||||
this.setupEvents(xhr, request);
|
||||
// open XHR
|
||||
var result = void 0;
|
||||
if (user) {
|
||||
result = tryCatch(xhr.open).call(xhr, method, url, async, user, password);
|
||||
}
|
||||
else {
|
||||
result = tryCatch(xhr.open).call(xhr, method, url, async);
|
||||
}
|
||||
if (result === errorObject) {
|
||||
this.error(errorObject.e);
|
||||
return null;
|
||||
}
|
||||
// timeout, responseType and withCredentials can be set once the XHR is open
|
||||
if (async) {
|
||||
xhr.timeout = request.timeout;
|
||||
xhr.responseType = request.responseType;
|
||||
}
|
||||
if ('withCredentials' in xhr) {
|
||||
xhr.withCredentials = !!request.withCredentials;
|
||||
}
|
||||
// set headers
|
||||
this.setHeaders(xhr, headers);
|
||||
// finally send the request
|
||||
result = body ? tryCatch(xhr.send).call(xhr, body) : tryCatch(xhr.send).call(xhr);
|
||||
if (result === errorObject) {
|
||||
this.error(errorObject.e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return xhr;
|
||||
};
|
||||
AjaxSubscriber.prototype.serializeBody = function (body, contentType) {
|
||||
if (!body || typeof body === 'string') {
|
||||
return body;
|
||||
}
|
||||
else if (root.FormData && body instanceof root.FormData) {
|
||||
return body;
|
||||
}
|
||||
if (contentType) {
|
||||
var splitIndex = contentType.indexOf(';');
|
||||
if (splitIndex !== -1) {
|
||||
contentType = contentType.substring(0, splitIndex);
|
||||
}
|
||||
}
|
||||
switch (contentType) {
|
||||
case 'application/x-www-form-urlencoded':
|
||||
return Object.keys(body).map(function (key) { return (encodeURIComponent(key) + "=" + encodeURIComponent(body[key])); }).join('&');
|
||||
case 'application/json':
|
||||
return JSON.stringify(body);
|
||||
default:
|
||||
return body;
|
||||
}
|
||||
};
|
||||
AjaxSubscriber.prototype.setHeaders = function (xhr, headers) {
|
||||
for (var key in headers) {
|
||||
if (headers.hasOwnProperty(key)) {
|
||||
xhr.setRequestHeader(key, headers[key]);
|
||||
}
|
||||
}
|
||||
};
|
||||
AjaxSubscriber.prototype.setupEvents = function (xhr, request) {
|
||||
var progressSubscriber = request.progressSubscriber;
|
||||
function xhrTimeout(e) {
|
||||
var _a = xhrTimeout, subscriber = _a.subscriber, progressSubscriber = _a.progressSubscriber, request = _a.request;
|
||||
if (progressSubscriber) {
|
||||
progressSubscriber.error(e);
|
||||
}
|
||||
subscriber.error(new AjaxTimeoutError(this, request)); //TODO: Make betterer.
|
||||
}
|
||||
;
|
||||
xhr.ontimeout = xhrTimeout;
|
||||
xhrTimeout.request = request;
|
||||
xhrTimeout.subscriber = this;
|
||||
xhrTimeout.progressSubscriber = progressSubscriber;
|
||||
if (xhr.upload && 'withCredentials' in xhr) {
|
||||
if (progressSubscriber) {
|
||||
var xhrProgress_1;
|
||||
xhrProgress_1 = function (e) {
|
||||
var progressSubscriber = xhrProgress_1.progressSubscriber;
|
||||
progressSubscriber.next(e);
|
||||
};
|
||||
if (root.XDomainRequest) {
|
||||
xhr.onprogress = xhrProgress_1;
|
||||
}
|
||||
else {
|
||||
xhr.upload.onprogress = xhrProgress_1;
|
||||
}
|
||||
xhrProgress_1.progressSubscriber = progressSubscriber;
|
||||
}
|
||||
var xhrError_1;
|
||||
xhrError_1 = function (e) {
|
||||
var _a = xhrError_1, progressSubscriber = _a.progressSubscriber, subscriber = _a.subscriber, request = _a.request;
|
||||
if (progressSubscriber) {
|
||||
progressSubscriber.error(e);
|
||||
}
|
||||
subscriber.error(new AjaxError('ajax error', this, request));
|
||||
};
|
||||
xhr.onerror = xhrError_1;
|
||||
xhrError_1.request = request;
|
||||
xhrError_1.subscriber = this;
|
||||
xhrError_1.progressSubscriber = progressSubscriber;
|
||||
}
|
||||
function xhrReadyStateChange(e) {
|
||||
var _a = xhrReadyStateChange, subscriber = _a.subscriber, progressSubscriber = _a.progressSubscriber, request = _a.request;
|
||||
if (this.readyState === 4) {
|
||||
// normalize IE9 bug (http://bugs.jquery.com/ticket/1450)
|
||||
var status_1 = this.status === 1223 ? 204 : this.status;
|
||||
var response = (this.responseType === 'text' ? (this.response || this.responseText) : this.response);
|
||||
// fix status code when it is 0 (0 status is undocumented).
|
||||
// Occurs when accessing file resources or on Android 4.1 stock browser
|
||||
// while retrieving files from application cache.
|
||||
if (status_1 === 0) {
|
||||
status_1 = response ? 200 : 0;
|
||||
}
|
||||
if (200 <= status_1 && status_1 < 300) {
|
||||
if (progressSubscriber) {
|
||||
progressSubscriber.complete();
|
||||
}
|
||||
subscriber.next(e);
|
||||
subscriber.complete();
|
||||
}
|
||||
else {
|
||||
if (progressSubscriber) {
|
||||
progressSubscriber.error(e);
|
||||
}
|
||||
subscriber.error(new AjaxError('ajax error ' + status_1, this, request));
|
||||
}
|
||||
}
|
||||
}
|
||||
;
|
||||
xhr.onreadystatechange = xhrReadyStateChange;
|
||||
xhrReadyStateChange.subscriber = this;
|
||||
xhrReadyStateChange.progressSubscriber = progressSubscriber;
|
||||
xhrReadyStateChange.request = request;
|
||||
};
|
||||
AjaxSubscriber.prototype.unsubscribe = function () {
|
||||
var _a = this, done = _a.done, xhr = _a.xhr;
|
||||
if (!done && xhr && xhr.readyState !== 4 && typeof xhr.abort === 'function') {
|
||||
xhr.abort();
|
||||
}
|
||||
_super.prototype.unsubscribe.call(this);
|
||||
};
|
||||
return AjaxSubscriber;
|
||||
}(Subscriber));
|
||||
/**
|
||||
* A normalized AJAX response.
|
||||
*
|
||||
* @see {@link ajax}
|
||||
*
|
||||
* @class AjaxResponse
|
||||
*/
|
||||
export var AjaxResponse = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function AjaxResponse(originalEvent, xhr, request) {
|
||||
this.originalEvent = originalEvent;
|
||||
this.xhr = xhr;
|
||||
this.request = request;
|
||||
this.status = xhr.status;
|
||||
this.responseType = xhr.responseType || request.responseType;
|
||||
this.response = parseXhrResponse(this.responseType, xhr);
|
||||
}
|
||||
return AjaxResponse;
|
||||
}());
|
||||
/**
|
||||
* A normalized AJAX error.
|
||||
*
|
||||
* @see {@link ajax}
|
||||
*
|
||||
* @class AjaxError
|
||||
*/
|
||||
export var AjaxError = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(AjaxError, _super);
|
||||
function AjaxError(message, xhr, request) {
|
||||
_super.call(this, message);
|
||||
this.message = message;
|
||||
this.xhr = xhr;
|
||||
this.request = request;
|
||||
this.status = xhr.status;
|
||||
this.responseType = xhr.responseType || request.responseType;
|
||||
this.response = parseXhrResponse(this.responseType, xhr);
|
||||
}
|
||||
return AjaxError;
|
||||
}(Error));
|
||||
function parseXhrResponse(responseType, xhr) {
|
||||
switch (responseType) {
|
||||
case 'json':
|
||||
if ('response' in xhr) {
|
||||
//IE does not support json as responseType, parse it internally
|
||||
return xhr.responseType ? xhr.response : JSON.parse(xhr.response || xhr.responseText || 'null');
|
||||
}
|
||||
else {
|
||||
// HACK(benlesh): TypeScript shennanigans
|
||||
// tslint:disable-next-line:no-any latest TS seems to think xhr is "never" here.
|
||||
return JSON.parse(xhr.responseText || 'null');
|
||||
}
|
||||
case 'xml':
|
||||
return xhr.responseXML;
|
||||
case 'text':
|
||||
default:
|
||||
// HACK(benlesh): TypeScript shennanigans
|
||||
// tslint:disable-next-line:no-any latest TS seems to think xhr is "never" here.
|
||||
return ('response' in xhr) ? xhr.response : xhr.responseText;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @see {@link ajax}
|
||||
*
|
||||
* @class AjaxTimeoutError
|
||||
*/
|
||||
export var AjaxTimeoutError = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(AjaxTimeoutError, _super);
|
||||
function AjaxTimeoutError(xhr, request) {
|
||||
_super.call(this, 'ajax timeout', xhr, request);
|
||||
}
|
||||
return AjaxTimeoutError;
|
||||
}(AjaxError));
|
||||
//# sourceMappingURL=AjaxObservable.js.map
|
1
node_modules/rxjs/_esm5/observable/dom/AjaxObservable.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/dom/AjaxObservable.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
251
node_modules/rxjs/_esm5/observable/dom/WebSocketSubject.js
generated
vendored
Normal file
251
node_modules/rxjs/_esm5/observable/dom/WebSocketSubject.js
generated
vendored
Normal file
@ -0,0 +1,251 @@
|
||||
/** PURE_IMPORTS_START .._.._Subject,.._.._Subscriber,.._.._Observable,.._.._Subscription,.._.._util_root,.._.._ReplaySubject,.._.._util_tryCatch,.._.._util_errorObject,.._.._util_assign PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subject, AnonymousSubject } from '../../Subject';
|
||||
import { Subscriber } from '../../Subscriber';
|
||||
import { Observable } from '../../Observable';
|
||||
import { Subscription } from '../../Subscription';
|
||||
import { root } from '../../util/root';
|
||||
import { ReplaySubject } from '../../ReplaySubject';
|
||||
import { tryCatch } from '../../util/tryCatch';
|
||||
import { errorObject } from '../../util/errorObject';
|
||||
import { assign } from '../../util/assign';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @extends {Ignored}
|
||||
* @hide true
|
||||
*/
|
||||
export var WebSocketSubject = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(WebSocketSubject, _super);
|
||||
function WebSocketSubject(urlConfigOrSource, destination) {
|
||||
if (urlConfigOrSource instanceof Observable) {
|
||||
_super.call(this, destination, urlConfigOrSource);
|
||||
}
|
||||
else {
|
||||
_super.call(this);
|
||||
this.WebSocketCtor = root.WebSocket;
|
||||
this._output = new Subject();
|
||||
if (typeof urlConfigOrSource === 'string') {
|
||||
this.url = urlConfigOrSource;
|
||||
}
|
||||
else {
|
||||
// WARNING: config object could override important members here.
|
||||
assign(this, urlConfigOrSource);
|
||||
}
|
||||
if (!this.WebSocketCtor) {
|
||||
throw new Error('no WebSocket constructor can be found');
|
||||
}
|
||||
this.destination = new ReplaySubject();
|
||||
}
|
||||
}
|
||||
WebSocketSubject.prototype.resultSelector = function (e) {
|
||||
return JSON.parse(e.data);
|
||||
};
|
||||
/**
|
||||
* Wrapper around the w3c-compatible WebSocket object provided by the browser.
|
||||
*
|
||||
* @example <caption>Wraps browser WebSocket</caption>
|
||||
*
|
||||
* let socket$ = Observable.webSocket('ws://localhost:8081');
|
||||
*
|
||||
* socket$.subscribe(
|
||||
* (msg) => console.log('message received: ' + msg),
|
||||
* (err) => console.log(err),
|
||||
* () => console.log('complete')
|
||||
* );
|
||||
*
|
||||
* socket$.next(JSON.stringify({ op: 'hello' }));
|
||||
*
|
||||
* @example <caption>Wraps WebSocket from nodejs-websocket (using node.js)</caption>
|
||||
*
|
||||
* import { w3cwebsocket } from 'websocket';
|
||||
*
|
||||
* let socket$ = Observable.webSocket({
|
||||
* url: 'ws://localhost:8081',
|
||||
* WebSocketCtor: w3cwebsocket
|
||||
* });
|
||||
*
|
||||
* socket$.subscribe(
|
||||
* (msg) => console.log('message received: ' + msg),
|
||||
* (err) => console.log(err),
|
||||
* () => console.log('complete')
|
||||
* );
|
||||
*
|
||||
* socket$.next(JSON.stringify({ op: 'hello' }));
|
||||
*
|
||||
* @param {string | WebSocketSubjectConfig} urlConfigOrSource the source of the websocket as an url or a structure defining the websocket object
|
||||
* @return {WebSocketSubject}
|
||||
* @static true
|
||||
* @name webSocket
|
||||
* @owner Observable
|
||||
*/
|
||||
WebSocketSubject.create = function (urlConfigOrSource) {
|
||||
return new WebSocketSubject(urlConfigOrSource);
|
||||
};
|
||||
WebSocketSubject.prototype.lift = function (operator) {
|
||||
var sock = new WebSocketSubject(this, this.destination);
|
||||
sock.operator = operator;
|
||||
return sock;
|
||||
};
|
||||
WebSocketSubject.prototype._resetState = function () {
|
||||
this.socket = null;
|
||||
if (!this.source) {
|
||||
this.destination = new ReplaySubject();
|
||||
}
|
||||
this._output = new Subject();
|
||||
};
|
||||
// TODO: factor this out to be a proper Operator/Subscriber implementation and eliminate closures
|
||||
WebSocketSubject.prototype.multiplex = function (subMsg, unsubMsg, messageFilter) {
|
||||
var self = this;
|
||||
return new Observable(function (observer) {
|
||||
var result = tryCatch(subMsg)();
|
||||
if (result === errorObject) {
|
||||
observer.error(errorObject.e);
|
||||
}
|
||||
else {
|
||||
self.next(result);
|
||||
}
|
||||
var subscription = self.subscribe(function (x) {
|
||||
var result = tryCatch(messageFilter)(x);
|
||||
if (result === errorObject) {
|
||||
observer.error(errorObject.e);
|
||||
}
|
||||
else if (result) {
|
||||
observer.next(x);
|
||||
}
|
||||
}, function (err) { return observer.error(err); }, function () { return observer.complete(); });
|
||||
return function () {
|
||||
var result = tryCatch(unsubMsg)();
|
||||
if (result === errorObject) {
|
||||
observer.error(errorObject.e);
|
||||
}
|
||||
else {
|
||||
self.next(result);
|
||||
}
|
||||
subscription.unsubscribe();
|
||||
};
|
||||
});
|
||||
};
|
||||
WebSocketSubject.prototype._connectSocket = function () {
|
||||
var _this = this;
|
||||
var WebSocketCtor = this.WebSocketCtor;
|
||||
var observer = this._output;
|
||||
var socket = null;
|
||||
try {
|
||||
socket = this.protocol ?
|
||||
new WebSocketCtor(this.url, this.protocol) :
|
||||
new WebSocketCtor(this.url);
|
||||
this.socket = socket;
|
||||
if (this.binaryType) {
|
||||
this.socket.binaryType = this.binaryType;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
observer.error(e);
|
||||
return;
|
||||
}
|
||||
var subscription = new Subscription(function () {
|
||||
_this.socket = null;
|
||||
if (socket && socket.readyState === 1) {
|
||||
socket.close();
|
||||
}
|
||||
});
|
||||
socket.onopen = function (e) {
|
||||
var openObserver = _this.openObserver;
|
||||
if (openObserver) {
|
||||
openObserver.next(e);
|
||||
}
|
||||
var queue = _this.destination;
|
||||
_this.destination = Subscriber.create(function (x) { return socket.readyState === 1 && socket.send(x); }, function (e) {
|
||||
var closingObserver = _this.closingObserver;
|
||||
if (closingObserver) {
|
||||
closingObserver.next(undefined);
|
||||
}
|
||||
if (e && e.code) {
|
||||
socket.close(e.code, e.reason);
|
||||
}
|
||||
else {
|
||||
observer.error(new TypeError('WebSocketSubject.error must be called with an object with an error code, ' +
|
||||
'and an optional reason: { code: number, reason: string }'));
|
||||
}
|
||||
_this._resetState();
|
||||
}, function () {
|
||||
var closingObserver = _this.closingObserver;
|
||||
if (closingObserver) {
|
||||
closingObserver.next(undefined);
|
||||
}
|
||||
socket.close();
|
||||
_this._resetState();
|
||||
});
|
||||
if (queue && queue instanceof ReplaySubject) {
|
||||
subscription.add(queue.subscribe(_this.destination));
|
||||
}
|
||||
};
|
||||
socket.onerror = function (e) {
|
||||
_this._resetState();
|
||||
observer.error(e);
|
||||
};
|
||||
socket.onclose = function (e) {
|
||||
_this._resetState();
|
||||
var closeObserver = _this.closeObserver;
|
||||
if (closeObserver) {
|
||||
closeObserver.next(e);
|
||||
}
|
||||
if (e.wasClean) {
|
||||
observer.complete();
|
||||
}
|
||||
else {
|
||||
observer.error(e);
|
||||
}
|
||||
};
|
||||
socket.onmessage = function (e) {
|
||||
var result = tryCatch(_this.resultSelector)(e);
|
||||
if (result === errorObject) {
|
||||
observer.error(errorObject.e);
|
||||
}
|
||||
else {
|
||||
observer.next(result);
|
||||
}
|
||||
};
|
||||
};
|
||||
/** @deprecated internal use only */ WebSocketSubject.prototype._subscribe = function (subscriber) {
|
||||
var _this = this;
|
||||
var source = this.source;
|
||||
if (source) {
|
||||
return source.subscribe(subscriber);
|
||||
}
|
||||
if (!this.socket) {
|
||||
this._connectSocket();
|
||||
}
|
||||
var subscription = new Subscription();
|
||||
subscription.add(this._output.subscribe(subscriber));
|
||||
subscription.add(function () {
|
||||
var socket = _this.socket;
|
||||
if (_this._output.observers.length === 0) {
|
||||
if (socket && socket.readyState === 1) {
|
||||
socket.close();
|
||||
}
|
||||
_this._resetState();
|
||||
}
|
||||
});
|
||||
return subscription;
|
||||
};
|
||||
WebSocketSubject.prototype.unsubscribe = function () {
|
||||
var _a = this, source = _a.source, socket = _a.socket;
|
||||
if (socket && socket.readyState === 1) {
|
||||
socket.close();
|
||||
this._resetState();
|
||||
}
|
||||
_super.prototype.unsubscribe.call(this);
|
||||
if (!source) {
|
||||
this.destination = new ReplaySubject();
|
||||
}
|
||||
};
|
||||
return WebSocketSubject;
|
||||
}(AnonymousSubject));
|
||||
//# sourceMappingURL=WebSocketSubject.js.map
|
1
node_modules/rxjs/_esm5/observable/dom/WebSocketSubject.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/dom/WebSocketSubject.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
4
node_modules/rxjs/_esm5/observable/dom/ajax.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/dom/ajax.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._AjaxObservable PURE_IMPORTS_END */
|
||||
import { AjaxObservable } from './AjaxObservable';
|
||||
export var ajax = AjaxObservable.create;
|
||||
//# sourceMappingURL=ajax.js.map
|
1
node_modules/rxjs/_esm5/observable/dom/ajax.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/dom/ajax.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"ajax.js","sourceRoot":"","sources":["../../../src/observable/dom/ajax.ts"],"names":[],"mappings":"OAAO,EAAG,cAAc,EAAuB,MAAM,kBAAkB;AAEvE,OAAO,IAAM,IAAI,GAAuB,cAAc,CAAC,MAAM,CAAC"}
|
4
node_modules/rxjs/_esm5/observable/dom/webSocket.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/dom/webSocket.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._WebSocketSubject PURE_IMPORTS_END */
|
||||
import { WebSocketSubject } from './WebSocketSubject';
|
||||
export var webSocket = WebSocketSubject.create;
|
||||
//# sourceMappingURL=webSocket.js.map
|
1
node_modules/rxjs/_esm5/observable/dom/webSocket.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/dom/webSocket.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"webSocket.js","sourceRoot":"","sources":["../../../src/observable/dom/webSocket.ts"],"names":[],"mappings":"OAAO,EAAG,gBAAgB,EAAG,MAAM,oBAAoB;AAEvD,OAAO,IAAM,SAAS,GAAG,gBAAgB,CAAC,MAAM,CAAC"}
|
4
node_modules/rxjs/_esm5/observable/empty.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/empty.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._EmptyObservable PURE_IMPORTS_END */
|
||||
import { EmptyObservable } from './EmptyObservable';
|
||||
export var empty = EmptyObservable.create;
|
||||
//# sourceMappingURL=empty.js.map
|
1
node_modules/rxjs/_esm5/observable/empty.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/empty.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"empty.js","sourceRoot":"","sources":["../../src/observable/empty.ts"],"names":[],"mappings":"OAAO,EAAG,eAAe,EAAG,MAAM,mBAAmB;AAErD,OAAO,IAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC"}
|
4
node_modules/rxjs/_esm5/observable/forkJoin.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/forkJoin.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._ForkJoinObservable PURE_IMPORTS_END */
|
||||
import { ForkJoinObservable } from './ForkJoinObservable';
|
||||
export var forkJoin = ForkJoinObservable.create;
|
||||
//# sourceMappingURL=forkJoin.js.map
|
1
node_modules/rxjs/_esm5/observable/forkJoin.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/forkJoin.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"forkJoin.js","sourceRoot":"","sources":["../../src/observable/forkJoin.ts"],"names":[],"mappings":"OAAO,EAAG,kBAAkB,EAAG,MAAM,sBAAsB;AAE3D,OAAO,IAAM,QAAQ,GAAG,kBAAkB,CAAC,MAAM,CAAC"}
|
4
node_modules/rxjs/_esm5/observable/from.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/from.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._FromObservable PURE_IMPORTS_END */
|
||||
import { FromObservable } from './FromObservable';
|
||||
export var from = FromObservable.create;
|
||||
//# sourceMappingURL=from.js.map
|
1
node_modules/rxjs/_esm5/observable/from.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/from.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"from.js","sourceRoot":"","sources":["../../src/observable/from.ts"],"names":[],"mappings":"OAAO,EAAG,cAAc,EAAG,MAAM,kBAAkB;AAEnD,OAAO,IAAM,IAAI,GAAG,cAAc,CAAC,MAAM,CAAC"}
|
4
node_modules/rxjs/_esm5/observable/fromEvent.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/fromEvent.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._FromEventObservable PURE_IMPORTS_END */
|
||||
import { FromEventObservable } from './FromEventObservable';
|
||||
export var fromEvent = FromEventObservable.create;
|
||||
//# sourceMappingURL=fromEvent.js.map
|
1
node_modules/rxjs/_esm5/observable/fromEvent.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/fromEvent.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"fromEvent.js","sourceRoot":"","sources":["../../src/observable/fromEvent.ts"],"names":[],"mappings":"OAAO,EAAG,mBAAmB,EAAG,MAAM,uBAAuB;AAE7D,OAAO,IAAM,SAAS,GAAG,mBAAmB,CAAC,MAAM,CAAC"}
|
4
node_modules/rxjs/_esm5/observable/fromEventPattern.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/fromEventPattern.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._FromEventPatternObservable PURE_IMPORTS_END */
|
||||
import { FromEventPatternObservable } from './FromEventPatternObservable';
|
||||
export var fromEventPattern = FromEventPatternObservable.create;
|
||||
//# sourceMappingURL=fromEventPattern.js.map
|
1
node_modules/rxjs/_esm5/observable/fromEventPattern.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/fromEventPattern.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"fromEventPattern.js","sourceRoot":"","sources":["../../src/observable/fromEventPattern.ts"],"names":[],"mappings":"OAAO,EAAG,0BAA0B,EAAG,MAAM,8BAA8B;AAE3E,OAAO,IAAM,gBAAgB,GAAG,0BAA0B,CAAC,MAAM,CAAC"}
|
4
node_modules/rxjs/_esm5/observable/fromPromise.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/fromPromise.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._PromiseObservable PURE_IMPORTS_END */
|
||||
import { PromiseObservable } from './PromiseObservable';
|
||||
export var fromPromise = PromiseObservable.create;
|
||||
//# sourceMappingURL=fromPromise.js.map
|
1
node_modules/rxjs/_esm5/observable/fromPromise.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/fromPromise.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"fromPromise.js","sourceRoot":"","sources":["../../src/observable/fromPromise.ts"],"names":[],"mappings":"OAAO,EAAG,iBAAiB,EAAG,MAAM,qBAAqB;AAEzD,OAAO,IAAM,WAAW,GAAG,iBAAiB,CAAC,MAAM,CAAC"}
|
4
node_modules/rxjs/_esm5/observable/generate.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/generate.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._GenerateObservable PURE_IMPORTS_END */
|
||||
import { GenerateObservable } from './GenerateObservable';
|
||||
export var generate = GenerateObservable.create;
|
||||
//# sourceMappingURL=generate.js.map
|
1
node_modules/rxjs/_esm5/observable/generate.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/generate.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/observable/generate.ts"],"names":[],"mappings":"OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB;AAEzD,OAAO,IAAM,QAAQ,GAAG,kBAAkB,CAAC,MAAM,CAAC"}
|
4
node_modules/rxjs/_esm5/observable/if.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/if.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._IfObservable PURE_IMPORTS_END */
|
||||
import { IfObservable } from './IfObservable';
|
||||
export var _if = IfObservable.create;
|
||||
//# sourceMappingURL=if.js.map
|
1
node_modules/rxjs/_esm5/observable/if.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/if.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"if.js","sourceRoot":"","sources":["../../src/observable/if.ts"],"names":[],"mappings":"OAAO,EAAG,YAAY,EAAG,MAAM,gBAAgB;AAE/C,OAAO,IAAM,GAAG,GAAG,YAAY,CAAC,MAAM,CAAC"}
|
4
node_modules/rxjs/_esm5/observable/interval.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/interval.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._IntervalObservable PURE_IMPORTS_END */
|
||||
import { IntervalObservable } from './IntervalObservable';
|
||||
export var interval = IntervalObservable.create;
|
||||
//# sourceMappingURL=interval.js.map
|
1
node_modules/rxjs/_esm5/observable/interval.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/interval.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"interval.js","sourceRoot":"","sources":["../../src/observable/interval.ts"],"names":[],"mappings":"OAAO,EAAG,kBAAkB,EAAG,MAAM,sBAAsB;AAE3D,OAAO,IAAM,QAAQ,GAAG,kBAAkB,CAAC,MAAM,CAAC"}
|
89
node_modules/rxjs/_esm5/observable/merge.js
generated
vendored
Normal file
89
node_modules/rxjs/_esm5/observable/merge.js
generated
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
/** PURE_IMPORTS_START .._Observable,._ArrayObservable,.._util_isScheduler,.._operators_mergeAll PURE_IMPORTS_END */
|
||||
import { Observable } from '../Observable';
|
||||
import { ArrayObservable } from './ArrayObservable';
|
||||
import { isScheduler } from '../util/isScheduler';
|
||||
import { mergeAll } from '../operators/mergeAll';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Creates an output Observable which concurrently emits all values from every
|
||||
* given input Observable.
|
||||
*
|
||||
* <span class="informal">Flattens multiple Observables together by blending
|
||||
* their values into one Observable.</span>
|
||||
*
|
||||
* <img src="./img/merge.png" width="100%">
|
||||
*
|
||||
* `merge` subscribes to each given input Observable (as arguments), and simply
|
||||
* forwards (without doing any transformation) all the values from all the input
|
||||
* Observables to the output Observable. The output Observable only completes
|
||||
* once all input Observables have completed. Any error delivered by an input
|
||||
* Observable will be immediately emitted on the output Observable.
|
||||
*
|
||||
* @example <caption>Merge together two Observables: 1s interval and clicks</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var timer = Rx.Observable.interval(1000);
|
||||
* var clicksOrTimer = Rx.Observable.merge(clicks, timer);
|
||||
* clicksOrTimer.subscribe(x => console.log(x));
|
||||
*
|
||||
* // Results in the following:
|
||||
* // timer will emit ascending values, one every second(1000ms) to console
|
||||
* // clicks logs MouseEvents to console everytime the "document" is clicked
|
||||
* // Since the two streams are merged you see these happening
|
||||
* // as they occur.
|
||||
*
|
||||
* @example <caption>Merge together 3 Observables, but only 2 run concurrently</caption>
|
||||
* var timer1 = Rx.Observable.interval(1000).take(10);
|
||||
* var timer2 = Rx.Observable.interval(2000).take(6);
|
||||
* var timer3 = Rx.Observable.interval(500).take(10);
|
||||
* var concurrent = 2; // the argument
|
||||
* var merged = Rx.Observable.merge(timer1, timer2, timer3, concurrent);
|
||||
* merged.subscribe(x => console.log(x));
|
||||
*
|
||||
* // Results in the following:
|
||||
* // - First timer1 and timer2 will run concurrently
|
||||
* // - timer1 will emit a value every 1000ms for 10 iterations
|
||||
* // - timer2 will emit a value every 2000ms for 6 iterations
|
||||
* // - after timer1 hits it's max iteration, timer2 will
|
||||
* // continue, and timer3 will start to run concurrently with timer2
|
||||
* // - when timer2 hits it's max iteration it terminates, and
|
||||
* // timer3 will continue to emit a value every 500ms until it is complete
|
||||
*
|
||||
* @see {@link mergeAll}
|
||||
* @see {@link mergeMap}
|
||||
* @see {@link mergeMapTo}
|
||||
* @see {@link mergeScan}
|
||||
*
|
||||
* @param {...ObservableInput} observables Input Observables to merge together.
|
||||
* @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input
|
||||
* Observables being subscribed to concurrently.
|
||||
* @param {Scheduler} [scheduler=null] The IScheduler to use for managing
|
||||
* concurrency of input Observables.
|
||||
* @return {Observable} an Observable that emits items that are the result of
|
||||
* every input Observable.
|
||||
* @static true
|
||||
* @name merge
|
||||
* @owner Observable
|
||||
*/
|
||||
export function merge() {
|
||||
var observables = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
observables[_i - 0] = arguments[_i];
|
||||
}
|
||||
var concurrent = Number.POSITIVE_INFINITY;
|
||||
var scheduler = null;
|
||||
var last = observables[observables.length - 1];
|
||||
if (isScheduler(last)) {
|
||||
scheduler = observables.pop();
|
||||
if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {
|
||||
concurrent = observables.pop();
|
||||
}
|
||||
}
|
||||
else if (typeof last === 'number') {
|
||||
concurrent = observables.pop();
|
||||
}
|
||||
if (scheduler === null && observables.length === 1 && observables[0] instanceof Observable) {
|
||||
return observables[0];
|
||||
}
|
||||
return mergeAll(concurrent)(new ArrayObservable(observables, scheduler));
|
||||
}
|
||||
//# sourceMappingURL=merge.js.map
|
1
node_modules/rxjs/_esm5/observable/merge.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/merge.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../src/observable/merge.ts"],"names":[],"mappings":"OAAO,EAAE,UAAU,EAAmB,MAAM,eAAe;OAEpD,EAAE,eAAe,EAAE,MAAM,mBAAmB;OAC5C,EAAE,WAAW,EAAE,MAAM,qBAAqB;OAC1C,EAAE,QAAQ,EAAE,MAAM,uBAAuB;AAiBhD,mCAAmC;AACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH;IAA4B,qBAAiE;SAAjE,WAAiE,CAAjE,sBAAiE,CAAjE,IAAiE;QAAjE,oCAAiE;;IAC5F,IAAI,UAAU,GAAG,MAAM,CAAC,iBAAiB,CAAC;IAC1C,IAAI,SAAS,GAAe,IAAI,CAAC;IAChC,IAAI,IAAI,GAAQ,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACpD,EAAE,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,SAAS,GAAe,WAAW,CAAC,GAAG,EAAE,CAAC;QAC1C,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC;YACtF,UAAU,GAAW,WAAW,CAAC,GAAG,EAAE,CAAC;QACzC,CAAC;IACH,CAAC;IAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QACpC,UAAU,GAAW,WAAW,CAAC,GAAG,EAAE,CAAC;IACzC,CAAC;IAED,EAAE,CAAC,CAAC,SAAS,KAAK,IAAI,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,YAAY,UAAU,CAAC,CAAC,CAAC;QAC3F,MAAM,CAAgB,WAAW,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,IAAI,eAAe,CAAM,WAAW,EAAE,SAAS,CAAC,CAAkB,CAAC;AACjG,CAAC"}
|
4
node_modules/rxjs/_esm5/observable/never.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/never.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._NeverObservable PURE_IMPORTS_END */
|
||||
import { NeverObservable } from './NeverObservable';
|
||||
export var never = NeverObservable.create;
|
||||
//# sourceMappingURL=never.js.map
|
1
node_modules/rxjs/_esm5/observable/never.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/never.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"never.js","sourceRoot":"","sources":["../../src/observable/never.ts"],"names":[],"mappings":"OAAO,EAAG,eAAe,EAAG,MAAM,mBAAmB;AAErD,OAAO,IAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC"}
|
4
node_modules/rxjs/_esm5/observable/of.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/of.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._ArrayObservable PURE_IMPORTS_END */
|
||||
import { ArrayObservable } from './ArrayObservable';
|
||||
export var of = ArrayObservable.of;
|
||||
//# sourceMappingURL=of.js.map
|
1
node_modules/rxjs/_esm5/observable/of.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/of.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"of.js","sourceRoot":"","sources":["../../src/observable/of.ts"],"names":[],"mappings":"OAAO,EAAG,eAAe,EAAG,MAAM,mBAAmB;AAErD,OAAO,IAAM,EAAE,GAAG,eAAe,CAAC,EAAE,CAAC"}
|
4
node_modules/rxjs/_esm5/observable/onErrorResumeNext.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/onErrorResumeNext.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START .._operators_onErrorResumeNext PURE_IMPORTS_END */
|
||||
import { onErrorResumeNextStatic } from '../operators/onErrorResumeNext';
|
||||
export var onErrorResumeNext = onErrorResumeNextStatic;
|
||||
//# sourceMappingURL=onErrorResumeNext.js.map
|
1
node_modules/rxjs/_esm5/observable/onErrorResumeNext.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/onErrorResumeNext.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"onErrorResumeNext.js","sourceRoot":"","sources":["../../src/observable/onErrorResumeNext.ts"],"names":[],"mappings":"OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC;AAExE,OAAO,IAAM,iBAAiB,GAAG,uBAAuB,CAAC"}
|
4
node_modules/rxjs/_esm5/observable/pairs.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/pairs.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._PairsObservable PURE_IMPORTS_END */
|
||||
import { PairsObservable } from './PairsObservable';
|
||||
export var pairs = PairsObservable.create;
|
||||
//# sourceMappingURL=pairs.js.map
|
1
node_modules/rxjs/_esm5/observable/pairs.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/pairs.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"pairs.js","sourceRoot":"","sources":["../../src/observable/pairs.ts"],"names":[],"mappings":"OAAO,EAAG,eAAe,EAAG,MAAM,mBAAmB;AAErD,OAAO,IAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC"}
|
88
node_modules/rxjs/_esm5/observable/race.js
generated
vendored
Normal file
88
node_modules/rxjs/_esm5/observable/race.js
generated
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
/** PURE_IMPORTS_START .._util_isArray,.._observable_ArrayObservable,.._OuterSubscriber,.._util_subscribeToResult PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { isArray } from '../util/isArray';
|
||||
import { ArrayObservable } from '../observable/ArrayObservable';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
export function race() {
|
||||
var observables = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
observables[_i - 0] = arguments[_i];
|
||||
}
|
||||
// if the only argument is an array, it was most likely called with
|
||||
// `race([obs1, obs2, ...])`
|
||||
if (observables.length === 1) {
|
||||
if (isArray(observables[0])) {
|
||||
observables = observables[0];
|
||||
}
|
||||
else {
|
||||
return observables[0];
|
||||
}
|
||||
}
|
||||
return new ArrayObservable(observables).lift(new RaceOperator());
|
||||
}
|
||||
export var RaceOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function RaceOperator() {
|
||||
}
|
||||
RaceOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new RaceSubscriber(subscriber));
|
||||
};
|
||||
return RaceOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
export var RaceSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(RaceSubscriber, _super);
|
||||
function RaceSubscriber(destination) {
|
||||
_super.call(this, destination);
|
||||
this.hasFirst = false;
|
||||
this.observables = [];
|
||||
this.subscriptions = [];
|
||||
}
|
||||
RaceSubscriber.prototype._next = function (observable) {
|
||||
this.observables.push(observable);
|
||||
};
|
||||
RaceSubscriber.prototype._complete = function () {
|
||||
var observables = this.observables;
|
||||
var len = observables.length;
|
||||
if (len === 0) {
|
||||
this.destination.complete();
|
||||
}
|
||||
else {
|
||||
for (var i = 0; i < len && !this.hasFirst; i++) {
|
||||
var observable = observables[i];
|
||||
var subscription = subscribeToResult(this, observable, observable, i);
|
||||
if (this.subscriptions) {
|
||||
this.subscriptions.push(subscription);
|
||||
}
|
||||
this.add(subscription);
|
||||
}
|
||||
this.observables = null;
|
||||
}
|
||||
};
|
||||
RaceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
if (!this.hasFirst) {
|
||||
this.hasFirst = true;
|
||||
for (var i = 0; i < this.subscriptions.length; i++) {
|
||||
if (i !== outerIndex) {
|
||||
var subscription = this.subscriptions[i];
|
||||
subscription.unsubscribe();
|
||||
this.remove(subscription);
|
||||
}
|
||||
}
|
||||
this.subscriptions = null;
|
||||
}
|
||||
this.destination.next(innerValue);
|
||||
};
|
||||
return RaceSubscriber;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=race.js.map
|
1
node_modules/rxjs/_esm5/observable/race.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/race.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"race.js","sourceRoot":"","sources":["../../src/observable/race.ts"],"names":[],"mappings":";;;;;OACO,EAAE,OAAO,EAAE,MAAM,iBAAiB;OAClC,EAAE,eAAe,EAAE,MAAM,+BAA+B;OAIxD,EAAE,e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AC;YACH,CAAC;YAED,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC5B,CAAC;QAED,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IACH,qBAAC;AAAD,CAAC,AArDD,CAAuC,eAAe,GAqDrD"}
|
4
node_modules/rxjs/_esm5/observable/range.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/range.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._RangeObservable PURE_IMPORTS_END */
|
||||
import { RangeObservable } from './RangeObservable';
|
||||
export var range = RangeObservable.create;
|
||||
//# sourceMappingURL=range.js.map
|
1
node_modules/rxjs/_esm5/observable/range.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/range.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"range.js","sourceRoot":"","sources":["../../src/observable/range.ts"],"names":[],"mappings":"OAAO,EAAG,eAAe,EAAG,MAAM,mBAAmB;AAErD,OAAO,IAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC"}
|
4
node_modules/rxjs/_esm5/observable/throw.js
generated
vendored
Normal file
4
node_modules/rxjs/_esm5/observable/throw.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START ._ErrorObservable PURE_IMPORTS_END */
|
||||
import { ErrorObservable } from './ErrorObservable';
|
||||
export var _throw = ErrorObservable.create;
|
||||
//# sourceMappingURL=throw.js.map
|
1
node_modules/rxjs/_esm5/observable/throw.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/observable/throw.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"throw.js","sourceRoot":"","sources":["../../src/observable/throw.ts"],"names":[],"mappings":"OAAO,EAAG,eAAe,EAAG,MAAM,mBAAmB;AAErD,OAAO,IAAM,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC"}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user