Every new change

This commit is contained in:
Luca Schwan
2020-03-25 11:05:34 +01:00
parent ff8491e75f
commit b4d041c5de
7164 changed files with 499221 additions and 135 deletions

19
node_modules/rxjs/internal/AsyncSubject.d.ts generated vendored Normal file
View File

@ -0,0 +1,19 @@
import { Subject } from './Subject';
import { Subscriber } from './Subscriber';
import { Subscription } from './Subscription';
/**
* A variant of Subject that only emits a value when it completes. It will emit
* its latest value to all its observers on completion.
*
* @class AsyncSubject<T>
*/
export declare class AsyncSubject<T> extends Subject<T> {
private value;
private hasNext;
private hasCompleted;
/** @deprecated This is an internal implementation detail, do not use. */
_subscribe(subscriber: Subscriber<any>): Subscription;
next(value: T): void;
error(error: any): void;
complete(): void;
}

60
node_modules/rxjs/internal/AsyncSubject.js generated vendored Normal file
View File

@ -0,0 +1,60 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Subject_1 = require("./Subject");
var Subscription_1 = require("./Subscription");
var AsyncSubject = (function (_super) {
__extends(AsyncSubject, _super);
function AsyncSubject() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.value = null;
_this.hasNext = false;
_this.hasCompleted = false;
return _this;
}
AsyncSubject.prototype._subscribe = function (subscriber) {
if (this.hasError) {
subscriber.error(this.thrownError);
return Subscription_1.Subscription.EMPTY;
}
else if (this.hasCompleted && this.hasNext) {
subscriber.next(this.value);
subscriber.complete();
return Subscription_1.Subscription.EMPTY;
}
return _super.prototype._subscribe.call(this, subscriber);
};
AsyncSubject.prototype.next = function (value) {
if (!this.hasCompleted) {
this.value = value;
this.hasNext = true;
}
};
AsyncSubject.prototype.error = function (error) {
if (!this.hasCompleted) {
_super.prototype.error.call(this, error);
}
};
AsyncSubject.prototype.complete = function () {
this.hasCompleted = true;
if (this.hasNext) {
_super.prototype.next.call(this, this.value);
}
_super.prototype.complete.call(this);
};
return AsyncSubject;
}(Subject_1.Subject));
exports.AsyncSubject = AsyncSubject;
//# sourceMappingURL=AsyncSubject.js.map

1
node_modules/rxjs/internal/AsyncSubject.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"AsyncSubject.js","sources":["../src/internal/AsyncSubject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAoC;AAEpC,+CAA8C;AAQ9C;IAAqC,gCAAU;IAA/C;QAAA,qEAsCC;QArCS,WAAK,GAAM,IAAI,CAAC;QAChB,aAAO,GAAY,KAAK,CAAC;QACzB,kBAAY,GAAY,KAAK,CAAC;;IAmCxC,CAAC;IAhCC,iCAAU,GAAV,UAAW,UAA2B;QACpC,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACnC,OAAO,2BAAY,CAAC,KAAK,CAAC;SAC3B;aAAM,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,OAAO,EAAE;YAC5C,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC5B,UAAU,CAAC,QAAQ,EAAE,CAAC;YACtB,OAAO,2BAAY,CAAC,KAAK,CAAC;SAC3B;QACD,OAAO,iBAAM,UAAU,YAAC,UAAU,CAAC,CAAC;IACtC,CAAC;IAED,2BAAI,GAAJ,UAAK,KAAQ;QACX,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACtB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;SACrB;IACH,CAAC;IAED,4BAAK,GAAL,UAAM,KAAU;QACd,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACtB,iBAAM,KAAK,YAAC,KAAK,CAAC,CAAC;SACpB;IACH,CAAC;IAED,+BAAQ,GAAR;QACE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,iBAAM,IAAI,YAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACxB;QACD,iBAAM,QAAQ,WAAE,CAAC;IACnB,CAAC;IACH,mBAAC;AAAD,CAAC,AAtCD,CAAqC,iBAAO,GAsC3C;AAtCY,oCAAY"}

18
node_modules/rxjs/internal/BehaviorSubject.d.ts generated vendored Normal file
View File

@ -0,0 +1,18 @@
import { Subject } from './Subject';
import { Subscriber } from './Subscriber';
import { Subscription } from './Subscription';
/**
* A variant of Subject that requires an initial value and emits its current
* value whenever it is subscribed to.
*
* @class BehaviorSubject<T>
*/
export declare class BehaviorSubject<T> extends Subject<T> {
private _value;
constructor(_value: T);
readonly value: T;
/** @deprecated This is an internal implementation detail, do not use. */
_subscribe(subscriber: Subscriber<T>): Subscription;
getValue(): T;
next(value: T): void;
}

56
node_modules/rxjs/internal/BehaviorSubject.js generated vendored Normal file
View File

@ -0,0 +1,56 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Subject_1 = require("./Subject");
var ObjectUnsubscribedError_1 = require("./util/ObjectUnsubscribedError");
var BehaviorSubject = (function (_super) {
__extends(BehaviorSubject, _super);
function BehaviorSubject(_value) {
var _this = _super.call(this) || this;
_this._value = _value;
return _this;
}
Object.defineProperty(BehaviorSubject.prototype, "value", {
get: function () {
return this.getValue();
},
enumerable: true,
configurable: true
});
BehaviorSubject.prototype._subscribe = function (subscriber) {
var subscription = _super.prototype._subscribe.call(this, subscriber);
if (subscription && !subscription.closed) {
subscriber.next(this._value);
}
return subscription;
};
BehaviorSubject.prototype.getValue = function () {
if (this.hasError) {
throw this.thrownError;
}
else if (this.closed) {
throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();
}
else {
return this._value;
}
};
BehaviorSubject.prototype.next = function (value) {
_super.prototype.next.call(this, this._value = value);
};
return BehaviorSubject;
}(Subject_1.Subject));
exports.BehaviorSubject = BehaviorSubject;
//# sourceMappingURL=BehaviorSubject.js.map

1
node_modules/rxjs/internal/BehaviorSubject.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"BehaviorSubject.js","sources":["../src/internal/BehaviorSubject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAoC;AAIpC,0EAAyE;AAQzE;IAAwC,mCAAU;IAEhD,yBAAoB,MAAS;QAA7B,YACE,iBAAO,SACR;QAFmB,YAAM,GAAN,MAAM,CAAG;;IAE7B,CAAC;IAED,sBAAI,kCAAK;aAAT;YACE,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;QACzB,CAAC;;;OAAA;IAGD,oCAAU,GAAV,UAAW,UAAyB;QAClC,IAAM,YAAY,GAAG,iBAAM,UAAU,YAAC,UAAU,CAAC,CAAC;QAClD,IAAI,YAAY,IAAI,CAAoB,YAAa,CAAC,MAAM,EAAE;YAC5D,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAC9B;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,kCAAQ,GAAR;QACE,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,MAAM,IAAI,CAAC,WAAW,CAAC;SACxB;aAAM,IAAI,IAAI,CAAC,MAAM,EAAE;YACtB,MAAM,IAAI,iDAAuB,EAAE,CAAC;SACrC;aAAM;YACL,OAAO,IAAI,CAAC,MAAM,CAAC;SACpB;IACH,CAAC;IAED,8BAAI,GAAJ,UAAK,KAAQ;QACX,iBAAM,IAAI,YAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;IAClC,CAAC;IACH,sBAAC;AAAD,CAAC,AAhCD,CAAwC,iBAAO,GAgC9C;AAhCY,0CAAe"}

17
node_modules/rxjs/internal/InnerSubscriber.d.ts generated vendored Normal file
View File

@ -0,0 +1,17 @@
import { Subscriber } from './Subscriber';
import { OuterSubscriber } from './OuterSubscriber';
/**
* We need this JSDoc comment for affecting ESDoc.
* @ignore
* @extends {Ignored}
*/
export declare class InnerSubscriber<T, R> extends Subscriber<R> {
private parent;
outerValue: T;
outerIndex: number;
private index;
constructor(parent: OuterSubscriber<T, R>, outerValue: T, outerIndex: number);
protected _next(value: R): void;
protected _error(error: any): void;
protected _complete(): void;
}

41
node_modules/rxjs/internal/InnerSubscriber.js generated vendored Normal file
View File

@ -0,0 +1,41 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Subscriber_1 = require("./Subscriber");
var InnerSubscriber = (function (_super) {
__extends(InnerSubscriber, _super);
function InnerSubscriber(parent, outerValue, outerIndex) {
var _this = _super.call(this) || this;
_this.parent = parent;
_this.outerValue = outerValue;
_this.outerIndex = outerIndex;
_this.index = 0;
return _this;
}
InnerSubscriber.prototype._next = function (value) {
this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
};
InnerSubscriber.prototype._error = function (error) {
this.parent.notifyError(error, this);
this.unsubscribe();
};
InnerSubscriber.prototype._complete = function () {
this.parent.notifyComplete(this);
this.unsubscribe();
};
return InnerSubscriber;
}(Subscriber_1.Subscriber));
exports.InnerSubscriber = InnerSubscriber;
//# sourceMappingURL=InnerSubscriber.js.map

1
node_modules/rxjs/internal/InnerSubscriber.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"InnerSubscriber.js","sources":["../src/internal/InnerSubscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA0C;AAQ1C;IAA2C,mCAAa;IAGtD,yBAAoB,MAA6B,EAAS,UAAa,EAAS,UAAkB;QAAlG,YACE,iBAAO,SACR;QAFmB,YAAM,GAAN,MAAM,CAAuB;QAAS,gBAAU,GAAV,UAAU,CAAG;QAAS,gBAAU,GAAV,UAAU,CAAQ;QAF1F,WAAK,GAAG,CAAC,CAAC;;IAIlB,CAAC;IAES,+BAAK,GAAf,UAAgB,KAAQ;QACtB,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,CAAC;IACtF,CAAC;IAES,gCAAM,GAAhB,UAAiB,KAAU;QACzB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAES,mCAAS,GAAnB;QACE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IACH,sBAAC;AAAD,CAAC,AApBD,CAA2C,uBAAU,GAoBpD;AApBY,0CAAe"}

88
node_modules/rxjs/internal/Notification.d.ts generated vendored Normal file
View File

@ -0,0 +1,88 @@
import { PartialObserver } from './types';
import { Observable } from './Observable';
/**
* @deprecated NotificationKind is deprecated as const enums are not compatible with isolated modules. Use a string literal instead.
*/
export declare enum NotificationKind {
NEXT = "N",
ERROR = "E",
COMPLETE = "C"
}
/**
* Represents a push-based event or value that an {@link Observable} can emit.
* This class is particularly useful for operators that manage notifications,
* like {@link materialize}, {@link dematerialize}, {@link observeOn}, and
* others. Besides wrapping the actual delivered value, it also annotates it
* with metadata of, for instance, what type of push message it is (`next`,
* `error`, or `complete`).
*
* @see {@link materialize}
* @see {@link dematerialize}
* @see {@link observeOn}
*
* @class Notification<T>
*/
export declare class Notification<T> {
kind: 'N' | 'E' | 'C';
value?: T;
error?: any;
hasValue: boolean;
constructor(kind: 'N' | 'E' | 'C', value?: T, error?: any);
/**
* Delivers to the given `observer` the value wrapped by this Notification.
* @param {Observer} observer
* @return
*/
observe(observer: PartialObserver<T>): any;
/**
* Given some {@link Observer} callbacks, deliver the value represented by the
* current Notification to the correctly corresponding callback.
* @param {function(value: T): void} next An Observer `next` callback.
* @param {function(err: any): void} [error] An Observer `error` callback.
* @param {function(): void} [complete] An Observer `complete` callback.
* @return {any}
*/
do(next: (value: T) => void, error?: (err: any) => void, complete?: () => void): any;
/**
* Takes an Observer or its individual callback functions, and calls `observe`
* or `do` methods accordingly.
* @param {Observer|function(value: T): void} nextOrObserver An Observer or
* the `next` callback.
* @param {function(err: any): void} [error] An Observer `error` callback.
* @param {function(): void} [complete] An Observer `complete` callback.
* @return {any}
*/
accept(nextOrObserver: PartialObserver<T> | ((value: T) => void), error?: (err: any) => void, complete?: () => void): any;
/**
* Returns a simple Observable that just delivers the notification represented
* by this Notification instance.
* @return {any}
*/
toObservable(): Observable<T>;
private static completeNotification;
private static undefinedValueNotification;
/**
* A shortcut to create a Notification instance of the type `next` from a
* given value.
* @param {T} value The `next` value.
* @return {Notification<T>} The "next" Notification representing the
* argument.
* @nocollapse
*/
static createNext<T>(value: T): Notification<T>;
/**
* A shortcut to create a Notification instance of the type `error` from a
* given error.
* @param {any} [err] The `error` error.
* @return {Notification<T>} The "error" Notification representing the
* argument.
* @nocollapse
*/
static createError<T>(err?: any): Notification<T>;
/**
* A shortcut to create a Notification instance of the type `complete`.
* @return {Notification<any>} The valueless "complete" Notification.
* @nocollapse
*/
static createComplete(): Notification<any>;
}

77
node_modules/rxjs/internal/Notification.js generated vendored Normal file
View File

@ -0,0 +1,77 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var empty_1 = require("./observable/empty");
var of_1 = require("./observable/of");
var throwError_1 = require("./observable/throwError");
var NotificationKind;
(function (NotificationKind) {
NotificationKind["NEXT"] = "N";
NotificationKind["ERROR"] = "E";
NotificationKind["COMPLETE"] = "C";
})(NotificationKind = exports.NotificationKind || (exports.NotificationKind = {}));
var Notification = (function () {
function Notification(kind, value, error) {
this.kind = kind;
this.value = value;
this.error = error;
this.hasValue = kind === 'N';
}
Notification.prototype.observe = function (observer) {
switch (this.kind) {
case 'N':
return observer.next && observer.next(this.value);
case 'E':
return observer.error && observer.error(this.error);
case 'C':
return observer.complete && observer.complete();
}
};
Notification.prototype.do = function (next, error, complete) {
var kind = this.kind;
switch (kind) {
case 'N':
return next && next(this.value);
case 'E':
return error && error(this.error);
case 'C':
return complete && complete();
}
};
Notification.prototype.accept = function (nextOrObserver, error, complete) {
if (nextOrObserver && typeof nextOrObserver.next === 'function') {
return this.observe(nextOrObserver);
}
else {
return this.do(nextOrObserver, error, complete);
}
};
Notification.prototype.toObservable = function () {
var kind = this.kind;
switch (kind) {
case 'N':
return of_1.of(this.value);
case 'E':
return throwError_1.throwError(this.error);
case 'C':
return empty_1.empty();
}
throw new Error('unexpected notification kind value');
};
Notification.createNext = function (value) {
if (typeof value !== 'undefined') {
return new Notification('N', value);
}
return Notification.undefinedValueNotification;
};
Notification.createError = function (err) {
return new Notification('E', undefined, err);
};
Notification.createComplete = function () {
return Notification.completeNotification;
};
Notification.completeNotification = new Notification('C');
Notification.undefinedValueNotification = new Notification('N', undefined);
return Notification;
}());
exports.Notification = Notification;
//# sourceMappingURL=Notification.js.map

1
node_modules/rxjs/internal/Notification.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"Notification.js","sources":["../src/internal/Notification.ts"],"names":[],"mappings":";;AAEA,4CAA2C;AAC3C,sCAAqC;AACrC,sDAAqD;AAOrD,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,8BAAU,CAAA;IACV,+BAAW,CAAA;IACX,kCAAc,CAAA;AAChB,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAgBD;IAGE,sBAAmB,IAAqB,EAAS,KAAS,EAAS,KAAW;QAA3D,SAAI,GAAJ,IAAI,CAAiB;QAAS,UAAK,GAAL,KAAK,CAAI;QAAS,UAAK,GAAL,KAAK,CAAM;QAC5E,IAAI,CAAC,QAAQ,GAAG,IAAI,KAAK,GAAG,CAAC;IAC/B,CAAC;IAOD,8BAAO,GAAP,UAAQ,QAA4B;QAClC,QAAQ,IAAI,CAAC,IAAI,EAAE;YACjB,KAAK,GAAG;gBACN,OAAO,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACpD,KAAK,GAAG;gBACN,OAAO,QAAQ,CAAC,KAAK,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACtD,KAAK,GAAG;gBACN,OAAO,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC;SACnD;IACH,CAAC;IAUD,yBAAE,GAAF,UAAG,IAAwB,EAAE,KAA0B,EAAE,QAAqB;QAC5E,IAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACvB,QAAQ,IAAI,EAAE;YACZ,KAAK,GAAG;gBACN,OAAO,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAClC,KAAK,GAAG;gBACN,OAAO,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACpC,KAAK,GA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C;CAAA,AApHD,IAoHC;AApHY,oCAAY"}

91
node_modules/rxjs/internal/Observable.d.ts generated vendored Normal file
View File

@ -0,0 +1,91 @@
import { Operator } from './Operator';
import { Subscriber } from './Subscriber';
import { Subscription } from './Subscription';
import { TeardownLogic, OperatorFunction, PartialObserver, Subscribable } from './types';
import { iif } from './observable/iif';
import { throwError } from './observable/throwError';
/**
* A representation of any set of values over any amount of time. This is the most basic building block
* of RxJS.
*
* @class Observable<T>
*/
export declare class Observable<T> implements Subscribable<T> {
/** Internal implementation detail, do not use directly. */
_isScalar: boolean;
/** @deprecated This is an internal implementation detail, do not use. */
source: Observable<any>;
/** @deprecated This is an internal implementation detail, do not use. */
operator: Operator<any, T>;
/**
* @constructor
* @param {Function} subscribe the function that is called when the Observable is
* initially subscribed to. This function is given a Subscriber, to which new values
* can be `next`ed, or an `error` method can be called to raise an error, or
* `complete` can be called to notify of a successful completion.
*/
constructor(subscribe?: (this: Observable<T>, subscriber: Subscriber<T>) => TeardownLogic);
/**
* Creates a new cold Observable by calling the Observable constructor
* @static true
* @owner Observable
* @method create
* @param {Function} subscribe? the subscriber function to be passed to the Observable constructor
* @return {Observable} a new cold observable
* @nocollapse
* @deprecated use new Observable() instead
*/
static create: Function;
/**
* Creates a new Observable, with this Observable as the source, and the passed
* operator defined as the new observable's operator.
* @method lift
* @param {Operator} operator the operator defining the operation to take on the observable
* @return {Observable} a new observable with the Operator applied
*/
lift<R>(operator: Operator<T, R>): Observable<R>;
subscribe(observer?: PartialObserver<T>): Subscription;
/** @deprecated Use an observer instead of a complete callback */
subscribe(next: null | undefined, error: null | undefined, complete: () => void): Subscription;
/** @deprecated Use an observer instead of an error callback */
subscribe(next: null | undefined, error: (error: any) => void, complete?: () => void): Subscription;
/** @deprecated Use an observer instead of a complete callback */
subscribe(next: (value: T) => void, error: null | undefined, complete: () => void): Subscription;
subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): Subscription;
/** @deprecated This is an internal implementation detail, do not use. */
_trySubscribe(sink: Subscriber<T>): TeardownLogic;
/**
* @method forEach
* @param {Function} next a handler for each value emitted by the observable
* @param {PromiseConstructor} [promiseCtor] a constructor function used to instantiate the Promise
* @return {Promise} a promise that either resolves on observable completion or
* rejects with the handled error
*/
forEach(next: (value: T) => void, promiseCtor?: PromiseConstructorLike): Promise<void>;
/** @internal This is an internal implementation detail, do not use. */
_subscribe(subscriber: Subscriber<any>): TeardownLogic;
/**
* @nocollapse
* @deprecated In favor of iif creation function: import { iif } from 'rxjs';
*/
static if: typeof iif;
/**
* @nocollapse
* @deprecated In favor of throwError creation function: import { throwError } from 'rxjs';
*/
static throw: typeof throwError;
pipe(): Observable<T>;
pipe<A>(op1: OperatorFunction<T, A>): Observable<A>;
pipe<A, B>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>): Observable<B>;
pipe<A, B, C>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>): Observable<C>;
pipe<A, B, C, D>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>): Observable<D>;
pipe<A, B, C, D, E>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>, op5: OperatorFunction<D, E>): Observable<E>;
pipe<A, B, C, D, E, F>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>, op5: OperatorFunction<D, E>, op6: OperatorFunction<E, F>): Observable<F>;
pipe<A, B, C, D, E, F, G>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>, op5: OperatorFunction<D, E>, op6: OperatorFunction<E, F>, op7: OperatorFunction<F, G>): Observable<G>;
pipe<A, B, C, D, E, F, G, H>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>, op5: OperatorFunction<D, E>, op6: OperatorFunction<E, F>, op7: OperatorFunction<F, G>, op8: OperatorFunction<G, H>): Observable<H>;
pipe<A, B, C, D, E, F, G, H, I>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>, op5: OperatorFunction<D, E>, op6: OperatorFunction<E, F>, op7: OperatorFunction<F, G>, op8: OperatorFunction<G, H>, op9: OperatorFunction<H, I>): Observable<I>;
pipe<A, B, C, D, E, F, G, H, I>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>, op5: OperatorFunction<D, E>, op6: OperatorFunction<E, F>, op7: OperatorFunction<F, G>, op8: OperatorFunction<G, H>, op9: OperatorFunction<H, I>, ...operations: OperatorFunction<any, any>[]): Observable<{}>;
toPromise<T>(this: Observable<T>): Promise<T>;
toPromise<T>(this: Observable<T>, PromiseCtor: typeof Promise): Promise<T>;
toPromise<T>(this: Observable<T>, PromiseCtor: PromiseConstructorLike): Promise<T>;
}

117
node_modules/rxjs/internal/Observable.js generated vendored Normal file
View File

@ -0,0 +1,117 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var canReportError_1 = require("./util/canReportError");
var toSubscriber_1 = require("./util/toSubscriber");
var observable_1 = require("./symbol/observable");
var pipe_1 = require("./util/pipe");
var config_1 = require("./config");
var Observable = (function () {
function Observable(subscribe) {
this._isScalar = false;
if (subscribe) {
this._subscribe = subscribe;
}
}
Observable.prototype.lift = function (operator) {
var observable = new Observable();
observable.source = this;
observable.operator = operator;
return observable;
};
Observable.prototype.subscribe = function (observerOrNext, error, complete) {
var operator = this.operator;
var sink = toSubscriber_1.toSubscriber(observerOrNext, error, complete);
if (operator) {
sink.add(operator.call(sink, this.source));
}
else {
sink.add(this.source || (config_1.config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
this._subscribe(sink) :
this._trySubscribe(sink));
}
if (config_1.config.useDeprecatedSynchronousErrorHandling) {
if (sink.syncErrorThrowable) {
sink.syncErrorThrowable = false;
if (sink.syncErrorThrown) {
throw sink.syncErrorValue;
}
}
}
return sink;
};
Observable.prototype._trySubscribe = function (sink) {
try {
return this._subscribe(sink);
}
catch (err) {
if (config_1.config.useDeprecatedSynchronousErrorHandling) {
sink.syncErrorThrown = true;
sink.syncErrorValue = err;
}
if (canReportError_1.canReportError(sink)) {
sink.error(err);
}
else {
console.warn(err);
}
}
};
Observable.prototype.forEach = function (next, promiseCtor) {
var _this = this;
promiseCtor = getPromiseCtor(promiseCtor);
return new promiseCtor(function (resolve, reject) {
var subscription;
subscription = _this.subscribe(function (value) {
try {
next(value);
}
catch (err) {
reject(err);
if (subscription) {
subscription.unsubscribe();
}
}
}, reject, resolve);
});
};
Observable.prototype._subscribe = function (subscriber) {
var source = this.source;
return source && source.subscribe(subscriber);
};
Observable.prototype[observable_1.observable] = function () {
return this;
};
Observable.prototype.pipe = function () {
var operations = [];
for (var _i = 0; _i < arguments.length; _i++) {
operations[_i] = arguments[_i];
}
if (operations.length === 0) {
return this;
}
return pipe_1.pipeFromArray(operations)(this);
};
Observable.prototype.toPromise = function (promiseCtor) {
var _this = this;
promiseCtor = getPromiseCtor(promiseCtor);
return new promiseCtor(function (resolve, reject) {
var value;
_this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });
});
};
Observable.create = function (subscribe) {
return new Observable(subscribe);
};
return Observable;
}());
exports.Observable = Observable;
function getPromiseCtor(promiseCtor) {
if (!promiseCtor) {
promiseCtor = config_1.config.Promise || Promise;
}
if (!promiseCtor) {
throw new Error('no Promise impl found');
}
return promiseCtor;
}
//# sourceMappingURL=Observable.js.map

1
node_modules/rxjs/internal/Observable.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"Observable.js","sources":["../src/internal/Observable.ts"],"names":[],"mappings":";;AAIA,wDAAuD;AACvD,oDAAmD;AAGnD,kDAAsE;AACtE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AAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAW,CAAC;SACpB;QAED,OAAO,oBAAa,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAQD,8BAAS,GAAT,UAAU,WAAoC;QAA9C,iBAOC;QANC,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;QAE1C,OAAO,IAAI,WAAW,CAAC,UAAC,OAAO,EAAE,MAAM;YACrC,IAAI,KAAU,CAAC;YACf,KAAI,CAAC,SAAS,CAAC,UAAC,CAAI,IAAK,OAAA,KAAK,GAAG,CAAC,EAAT,CAAS,EAAE,UAAC,GAAQ,IAAK,OAAA,MAAM,CAAC,GAAG,CAAC,EAAX,CAAW,EAAE,cAAM,OAAA,OAAO,CAAC,KAAK,CAAC,EAAd,CAAc,CAAC,CAAC;QACvF,CAAC,CAAe,CAAC;IACnB,CAAC;IAnTM,iBAAM,GAAa,UAAI,SAAwD;QACpF,OAAO,IAAI,UAAU,CAAI,SAAS,CAAC,CAAC;IACtC,CAAC,CAAA;IAkTH,iBAAC;CAAA,AAxVD,IAwVC;AAxVY,gCAAU;AAiWvB,SAAS,cAAc,CAAC,WAA+C;IACrE,IAAI,CAAC,WAAW,EAAE;QAChB,WAAW,GAAG,eAAM,CAAC,OAAO,IAAI,OAAO,CAAC;KACzC;IAED,IAAI,CAAC,WAAW,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;KAC1C;IAED,OAAO,WAAW,CAAC;AACrB,CAAC"}

2
node_modules/rxjs/internal/Observer.d.ts generated vendored Normal file
View File

@ -0,0 +1,2 @@
import { Observer } from './types';
export declare const empty: Observer<any>;

18
node_modules/rxjs/internal/Observer.js generated vendored Normal file
View File

@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var config_1 = require("./config");
var hostReportError_1 = require("./util/hostReportError");
exports.empty = {
closed: true,
next: function (value) { },
error: function (err) {
if (config_1.config.useDeprecatedSynchronousErrorHandling) {
throw err;
}
else {
hostReportError_1.hostReportError(err);
}
},
complete: function () { }
};
//# sourceMappingURL=Observer.js.map

1
node_modules/rxjs/internal/Observer.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"Observer.js","sources":["../src/internal/Observer.ts"],"names":[],"mappings":";;AACA,mCAAkC;AAClC,0DAAyD;AAE5C,QAAA,KAAK,GAAkB;IAClC,MAAM,EAAE,IAAI;IACZ,IAAI,EAAJ,UAAK,KAAU,IAAoB,CAAC;IACpC,KAAK,EAAL,UAAM,GAAQ;QACZ,IAAI,eAAM,CAAC,qCAAqC,EAAE;YAChD,MAAM,GAAG,CAAC;SACX;aAAM;YACL,iCAAe,CAAC,GAAG,CAAC,CAAC;SACtB;IACH,CAAC;IACD,QAAQ,EAAR,cAA4B,CAAC;CAC9B,CAAC"}

5
node_modules/rxjs/internal/Operator.d.ts generated vendored Normal file
View File

@ -0,0 +1,5 @@
import { Subscriber } from './Subscriber';
import { TeardownLogic } from './types';
export interface Operator<T, R> {
call(subscriber: Subscriber<R>, source: any): TeardownLogic;
}

3
node_modules/rxjs/internal/Operator.js generated vendored Normal file
View File

@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=Operator.js.map

1
node_modules/rxjs/internal/Operator.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"Operator.js","sources":["../src/internal/Operator.ts"],"names":[],"mappings":""}

12
node_modules/rxjs/internal/OuterSubscriber.d.ts generated vendored Normal file
View File

@ -0,0 +1,12 @@
import { Subscriber } from './Subscriber';
import { InnerSubscriber } from './InnerSubscriber';
/**
* We need this JSDoc comment for affecting ESDoc.
* @ignore
* @extends {Ignored}
*/
export declare class OuterSubscriber<T, R> extends Subscriber<T> {
notifyNext(outerValue: T, innerValue: R, outerIndex: number, innerIndex: number, innerSub: InnerSubscriber<T, R>): void;
notifyError(error: any, innerSub: InnerSubscriber<T, R>): void;
notifyComplete(innerSub: InnerSubscriber<T, R>): void;
}

34
node_modules/rxjs/internal/OuterSubscriber.js generated vendored Normal file
View File

@ -0,0 +1,34 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Subscriber_1 = require("./Subscriber");
var OuterSubscriber = (function (_super) {
__extends(OuterSubscriber, _super);
function OuterSubscriber() {
return _super !== null && _super.apply(this, arguments) || this;
}
OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
this.destination.next(innerValue);
};
OuterSubscriber.prototype.notifyError = function (error, innerSub) {
this.destination.error(error);
};
OuterSubscriber.prototype.notifyComplete = function (innerSub) {
this.destination.complete();
};
return OuterSubscriber;
}(Subscriber_1.Subscriber));
exports.OuterSubscriber = OuterSubscriber;
//# sourceMappingURL=OuterSubscriber.js.map

1
node_modules/rxjs/internal/OuterSubscriber.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"OuterSubscriber.js","sources":["../src/internal/OuterSubscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA0C;AAQ1C;IAA2C,mCAAa;IAAxD;;IAcA,CAAC;IAbC,oCAAU,GAAV,UAAW,UAAa,EAAE,UAAa,EAC5B,UAAkB,EAAE,UAAkB,EACtC,QAA+B;QACxC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAED,qCAAW,GAAX,UAAY,KAAU,EAAE,QAA+B;QACrD,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IAED,wCAAc,GAAd,UAAe,QAA+B;QAC5C,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;IAC9B,CAAC;IACH,sBAAC;AAAD,CAAC,AAdD,CAA2C,uBAAU,GAcpD;AAdY,0CAAe"}

25
node_modules/rxjs/internal/ReplaySubject.d.ts generated vendored Normal file
View File

@ -0,0 +1,25 @@
import { Subject } from './Subject';
import { SchedulerLike } from './types';
import { Subscriber } from './Subscriber';
import { Subscription } from './Subscription';
/**
* A variant of Subject that "replays" or emits old values to new subscribers.
* It buffers a set number of values and will emit those values immediately to
* any new subscribers in addition to emitting new values to existing subscribers.
*
* @class ReplaySubject<T>
*/
export declare class ReplaySubject<T> extends Subject<T> {
private scheduler?;
private _events;
private _bufferSize;
private _windowTime;
private _infiniteTimeWindow;
constructor(bufferSize?: number, windowTime?: number, scheduler?: SchedulerLike);
private nextInfiniteTimeWindow;
private nextTimeWindow;
/** @deprecated This is an internal implementation detail, do not use. */
_subscribe(subscriber: Subscriber<T>): Subscription;
_getNow(): number;
private _trimBufferThenGetEvents;
}

126
node_modules/rxjs/internal/ReplaySubject.js generated vendored Normal file
View File

@ -0,0 +1,126 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Subject_1 = require("./Subject");
var queue_1 = require("./scheduler/queue");
var Subscription_1 = require("./Subscription");
var observeOn_1 = require("./operators/observeOn");
var ObjectUnsubscribedError_1 = require("./util/ObjectUnsubscribedError");
var SubjectSubscription_1 = require("./SubjectSubscription");
var ReplaySubject = (function (_super) {
__extends(ReplaySubject, _super);
function ReplaySubject(bufferSize, windowTime, scheduler) {
if (bufferSize === void 0) { bufferSize = Number.POSITIVE_INFINITY; }
if (windowTime === void 0) { windowTime = Number.POSITIVE_INFINITY; }
var _this = _super.call(this) || this;
_this.scheduler = scheduler;
_this._events = [];
_this._infiniteTimeWindow = false;
_this._bufferSize = bufferSize < 1 ? 1 : bufferSize;
_this._windowTime = windowTime < 1 ? 1 : windowTime;
if (windowTime === Number.POSITIVE_INFINITY) {
_this._infiniteTimeWindow = true;
_this.next = _this.nextInfiniteTimeWindow;
}
else {
_this.next = _this.nextTimeWindow;
}
return _this;
}
ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) {
var _events = this._events;
_events.push(value);
if (_events.length > this._bufferSize) {
_events.shift();
}
_super.prototype.next.call(this, value);
};
ReplaySubject.prototype.nextTimeWindow = function (value) {
this._events.push(new ReplayEvent(this._getNow(), value));
this._trimBufferThenGetEvents();
_super.prototype.next.call(this, value);
};
ReplaySubject.prototype._subscribe = function (subscriber) {
var _infiniteTimeWindow = this._infiniteTimeWindow;
var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();
var scheduler = this.scheduler;
var len = _events.length;
var subscription;
if (this.closed) {
throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();
}
else if (this.isStopped || this.hasError) {
subscription = Subscription_1.Subscription.EMPTY;
}
else {
this.observers.push(subscriber);
subscription = new SubjectSubscription_1.SubjectSubscription(this, subscriber);
}
if (scheduler) {
subscriber.add(subscriber = new observeOn_1.ObserveOnSubscriber(subscriber, scheduler));
}
if (_infiniteTimeWindow) {
for (var i = 0; i < len && !subscriber.closed; i++) {
subscriber.next(_events[i]);
}
}
else {
for (var i = 0; i < len && !subscriber.closed; i++) {
subscriber.next(_events[i].value);
}
}
if (this.hasError) {
subscriber.error(this.thrownError);
}
else if (this.isStopped) {
subscriber.complete();
}
return subscription;
};
ReplaySubject.prototype._getNow = function () {
return (this.scheduler || queue_1.queue).now();
};
ReplaySubject.prototype._trimBufferThenGetEvents = function () {
var now = this._getNow();
var _bufferSize = this._bufferSize;
var _windowTime = this._windowTime;
var _events = this._events;
var eventsCount = _events.length;
var spliceCount = 0;
while (spliceCount < eventsCount) {
if ((now - _events[spliceCount].time) < _windowTime) {
break;
}
spliceCount++;
}
if (eventsCount > _bufferSize) {
spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);
}
if (spliceCount > 0) {
_events.splice(0, spliceCount);
}
return _events;
};
return ReplaySubject;
}(Subject_1.Subject));
exports.ReplaySubject = ReplaySubject;
var ReplayEvent = (function () {
function ReplayEvent(time, value) {
this.time = time;
this.value = value;
}
return ReplayEvent;
}());
//# sourceMappingURL=ReplaySubject.js.map

1
node_modules/rxjs/internal/ReplaySubject.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"ReplaySubject.js","sources":["../src/internal/ReplaySubject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAoC;AAEpC,2CAA0C;AAE1C,+CAA8C;AAC9C,mDAA4D;AAC5D,0EAAyE;AACzE,6DAA4D;AAQ5D;IAAsC,iCAAU;IAM9C,uBAAY,UAA6C,EAC7C,UAA6C,EACrC,SAAyB;QAFjC,2BAAA,EAAA,aAAqB,MAAM,CAAC,iBAAiB;QAC7C,2BAAA,EAAA,aAAqB,MAAM,CAAC,iBAAiB;QADzD,YAGE,iBAAO,SAUR;QAXmB,eAAS,GAAT,SAAS,CAAgB;QAPrC,aAAO,GAA2B,EAAE,CAAC;QAGrC,yBAAmB,GAAY,KAAK,CAAC;QAM3C,KAAI,CAAC,WAAW,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;QACnD,KAAI,CAAC,WAAW,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;QAEnD,IAAI,UAAU,KAAK,MAAM,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M,OAAO,GAAqB,IAAI,CAAC,OAAO,CAAC;QAE/C,IAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;QACnC,IAAI,WAAW,GAAG,CAAC,CAAC;QAKpB,OAAO,WAAW,GAAG,WAAW,EAAE;YAChC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,WAAW,EAAE;gBACnD,MAAM;aACP;YACD,WAAW,EAAE,CAAC;SACf;QAED,IAAI,WAAW,GAAG,WAAW,EAAE;YAC7B,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAAC,CAAC;SAChE;QAED,IAAI,WAAW,GAAG,CAAC,EAAE;YACnB,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;SAChC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAEH,oBAAC;AAAD,CAAC,AAnHD,CAAsC,iBAAO,GAmH5C;AAnHY,sCAAa;AAqH1B;IACE,qBAAmB,IAAY,EAAS,KAAQ;QAA7B,SAAI,GAAJ,IAAI,CAAQ;QAAS,UAAK,GAAL,KAAK,CAAG;IAChD,CAAC;IACH,kBAAC;AAAD,CAAC,AAHD,IAGC"}

195
node_modules/rxjs/internal/Rx.d.ts generated vendored Normal file
View File

@ -0,0 +1,195 @@
export { Subject, AnonymousSubject } from './Subject';
export { Observable } from './Observable';
export { config } from './config';
import 'rxjs-compat/add/observable/bindCallback';
import 'rxjs-compat/add/observable/bindNodeCallback';
import 'rxjs-compat/add/observable/combineLatest';
import 'rxjs-compat/add/observable/concat';
import 'rxjs-compat/add/observable/defer';
import 'rxjs-compat/add/observable/empty';
import 'rxjs-compat/add/observable/forkJoin';
import 'rxjs-compat/add/observable/from';
import 'rxjs-compat/add/observable/fromEvent';
import 'rxjs-compat/add/observable/fromEventPattern';
import 'rxjs-compat/add/observable/fromPromise';
import 'rxjs-compat/add/observable/generate';
import 'rxjs-compat/add/observable/if';
import 'rxjs-compat/add/observable/interval';
import 'rxjs-compat/add/observable/merge';
import 'rxjs-compat/add/observable/race';
import 'rxjs-compat/add/observable/never';
import 'rxjs-compat/add/observable/of';
import 'rxjs-compat/add/observable/onErrorResumeNext';
import 'rxjs-compat/add/observable/pairs';
import 'rxjs-compat/add/observable/range';
import 'rxjs-compat/add/observable/using';
import 'rxjs-compat/add/observable/throw';
import 'rxjs-compat/add/observable/timer';
import 'rxjs-compat/add/observable/zip';
import 'rxjs-compat/add/observable/dom/ajax';
import 'rxjs-compat/add/observable/dom/webSocket';
import 'rxjs-compat/add/operator/buffer';
import 'rxjs-compat/add/operator/bufferCount';
import 'rxjs-compat/add/operator/bufferTime';
import 'rxjs-compat/add/operator/bufferToggle';
import 'rxjs-compat/add/operator/bufferWhen';
import 'rxjs-compat/add/operator/catch';
import 'rxjs-compat/add/operator/combineAll';
import 'rxjs-compat/add/operator/combineLatest';
import 'rxjs-compat/add/operator/concat';
import 'rxjs-compat/add/operator/concatAll';
import 'rxjs-compat/add/operator/concatMap';
import 'rxjs-compat/add/operator/concatMapTo';
import 'rxjs-compat/add/operator/count';
import 'rxjs-compat/add/operator/dematerialize';
import 'rxjs-compat/add/operator/debounce';
import 'rxjs-compat/add/operator/debounceTime';
import 'rxjs-compat/add/operator/defaultIfEmpty';
import 'rxjs-compat/add/operator/delay';
import 'rxjs-compat/add/operator/delayWhen';
import 'rxjs-compat/add/operator/distinct';
import 'rxjs-compat/add/operator/distinctUntilChanged';
import 'rxjs-compat/add/operator/distinctUntilKeyChanged';
import 'rxjs-compat/add/operator/do';
import 'rxjs-compat/add/operator/exhaust';
import 'rxjs-compat/add/operator/exhaustMap';
import 'rxjs-compat/add/operator/expand';
import 'rxjs-compat/add/operator/elementAt';
import 'rxjs-compat/add/operator/filter';
import 'rxjs-compat/add/operator/finally';
import 'rxjs-compat/add/operator/find';
import 'rxjs-compat/add/operator/findIndex';
import 'rxjs-compat/add/operator/first';
import 'rxjs-compat/add/operator/groupBy';
import 'rxjs-compat/add/operator/ignoreElements';
import 'rxjs-compat/add/operator/isEmpty';
import 'rxjs-compat/add/operator/audit';
import 'rxjs-compat/add/operator/auditTime';
import 'rxjs-compat/add/operator/last';
import 'rxjs-compat/add/operator/let';
import 'rxjs-compat/add/operator/every';
import 'rxjs-compat/add/operator/map';
import 'rxjs-compat/add/operator/mapTo';
import 'rxjs-compat/add/operator/materialize';
import 'rxjs-compat/add/operator/max';
import 'rxjs-compat/add/operator/merge';
import 'rxjs-compat/add/operator/mergeAll';
import 'rxjs-compat/add/operator/mergeMap';
import 'rxjs-compat/add/operator/mergeMapTo';
import 'rxjs-compat/add/operator/mergeScan';
import 'rxjs-compat/add/operator/min';
import 'rxjs-compat/add/operator/multicast';
import 'rxjs-compat/add/operator/observeOn';
import 'rxjs-compat/add/operator/onErrorResumeNext';
import 'rxjs-compat/add/operator/pairwise';
import 'rxjs-compat/add/operator/partition';
import 'rxjs-compat/add/operator/pluck';
import 'rxjs-compat/add/operator/publish';
import 'rxjs-compat/add/operator/publishBehavior';
import 'rxjs-compat/add/operator/publishReplay';
import 'rxjs-compat/add/operator/publishLast';
import 'rxjs-compat/add/operator/race';
import 'rxjs-compat/add/operator/reduce';
import 'rxjs-compat/add/operator/repeat';
import 'rxjs-compat/add/operator/repeatWhen';
import 'rxjs-compat/add/operator/retry';
import 'rxjs-compat/add/operator/retryWhen';
import 'rxjs-compat/add/operator/sample';
import 'rxjs-compat/add/operator/sampleTime';
import 'rxjs-compat/add/operator/scan';
import 'rxjs-compat/add/operator/sequenceEqual';
import 'rxjs-compat/add/operator/share';
import 'rxjs-compat/add/operator/shareReplay';
import 'rxjs-compat/add/operator/single';
import 'rxjs-compat/add/operator/skip';
import 'rxjs-compat/add/operator/skipLast';
import 'rxjs-compat/add/operator/skipUntil';
import 'rxjs-compat/add/operator/skipWhile';
import 'rxjs-compat/add/operator/startWith';
import 'rxjs-compat/add/operator/subscribeOn';
import 'rxjs-compat/add/operator/switch';
import 'rxjs-compat/add/operator/switchMap';
import 'rxjs-compat/add/operator/switchMapTo';
import 'rxjs-compat/add/operator/take';
import 'rxjs-compat/add/operator/takeLast';
import 'rxjs-compat/add/operator/takeUntil';
import 'rxjs-compat/add/operator/takeWhile';
import 'rxjs-compat/add/operator/throttle';
import 'rxjs-compat/add/operator/throttleTime';
import 'rxjs-compat/add/operator/timeInterval';
import 'rxjs-compat/add/operator/timeout';
import 'rxjs-compat/add/operator/timeoutWith';
import 'rxjs-compat/add/operator/timestamp';
import 'rxjs-compat/add/operator/toArray';
import 'rxjs-compat/add/operator/toPromise';
import 'rxjs-compat/add/operator/window';
import 'rxjs-compat/add/operator/windowCount';
import 'rxjs-compat/add/operator/windowTime';
import 'rxjs-compat/add/operator/windowToggle';
import 'rxjs-compat/add/operator/windowWhen';
import 'rxjs-compat/add/operator/withLatestFrom';
import 'rxjs-compat/add/operator/zip';
import 'rxjs-compat/add/operator/zipAll';
export { Operator } from './Operator';
export { Observer } from './types';
export { Subscription } from './Subscription';
export { Subscriber } from './Subscriber';
export { AsyncSubject } from './AsyncSubject';
export { ReplaySubject } from './ReplaySubject';
export { BehaviorSubject } from './BehaviorSubject';
export { ConnectableObservable } from './observable/ConnectableObservable';
export { Notification, NotificationKind } from './Notification';
export { EmptyError } from './util/EmptyError';
export { ArgumentOutOfRangeError } from './util/ArgumentOutOfRangeError';
export { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';
export { TimeoutError } from './util/TimeoutError';
export { UnsubscriptionError } from './util/UnsubscriptionError';
export { TimeInterval } from './operators/timeInterval';
export { Timestamp } from './operators/timestamp';
export { TestScheduler } from './testing/TestScheduler';
export { VirtualTimeScheduler } from './scheduler/VirtualTimeScheduler';
export { AjaxRequest, AjaxResponse, AjaxError, AjaxTimeoutError } from './observable/dom/AjaxObservable';
export { pipe } from './util/pipe';
import { AsapScheduler } from './scheduler/AsapScheduler';
import { AsyncScheduler } from './scheduler/AsyncScheduler';
import { QueueScheduler } from './scheduler/QueueScheduler';
import { AnimationFrameScheduler } from './scheduler/AnimationFrameScheduler';
import * as _operators from './operators/index';
export declare const operators: typeof _operators;
/**
* @typedef {Object} Rx.Scheduler
* @property {SchedulerLike} asap Schedules on the micro task queue, which is the same
* queue used for promises. Basically after the current job, but before the next job.
* Use this for asynchronous conversions.
* @property {SchedulerLike} queue Schedules on a queue in the current event frame
* (trampoline scheduler). Use this for iteration operations.
* @property {SchedulerLike} animationFrame Schedules work with `requestAnimationFrame`.
* Use this for synchronizing with the platform's painting.
* @property {SchedulerLike} async Schedules work with `setInterval`. Use this for
* time-based operations.
*/
declare let Scheduler: {
asap: AsapScheduler;
queue: QueueScheduler;
animationFrame: AnimationFrameScheduler;
async: AsyncScheduler;
};
/**
* @typedef {Object} Rx.Symbol
* @property {Symbol|string} rxSubscriber A symbol to use as a property name to
* retrieve an "Rx safe" Observer from an object. "Rx safety" can be defined as
* an object that has all of the traits of an Rx Subscriber, including the
* ability to add and remove subscriptions to the subscription chain and
* guarantees involving event triggering (can't "next" after unsubscription,
* etc).
* @property {Symbol|string} observable A symbol to use as a property name to
* retrieve an Observable as defined by the [ECMAScript "Observable" spec](https://github.com/zenparsing/es-observable).
* @property {Symbol|string} iterator The ES6 symbol to use as a property name
* to retrieve an iterator from an object.
*/
declare let Symbol: {
rxSubscriber: string | symbol;
observable: string | symbol;
iterator: symbol;
};
export { Scheduler, Symbol };

200
node_modules/rxjs/internal/Rx.js generated vendored Normal file
View File

@ -0,0 +1,200 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Subject_1 = require("./Subject");
exports.Subject = Subject_1.Subject;
exports.AnonymousSubject = Subject_1.AnonymousSubject;
var Observable_1 = require("./Observable");
exports.Observable = Observable_1.Observable;
var config_1 = require("./config");
exports.config = config_1.config;
require("rxjs-compat/add/observable/bindCallback");
require("rxjs-compat/add/observable/bindNodeCallback");
require("rxjs-compat/add/observable/combineLatest");
require("rxjs-compat/add/observable/concat");
require("rxjs-compat/add/observable/defer");
require("rxjs-compat/add/observable/empty");
require("rxjs-compat/add/observable/forkJoin");
require("rxjs-compat/add/observable/from");
require("rxjs-compat/add/observable/fromEvent");
require("rxjs-compat/add/observable/fromEventPattern");
require("rxjs-compat/add/observable/fromPromise");
require("rxjs-compat/add/observable/generate");
require("rxjs-compat/add/observable/if");
require("rxjs-compat/add/observable/interval");
require("rxjs-compat/add/observable/merge");
require("rxjs-compat/add/observable/race");
require("rxjs-compat/add/observable/never");
require("rxjs-compat/add/observable/of");
require("rxjs-compat/add/observable/onErrorResumeNext");
require("rxjs-compat/add/observable/pairs");
require("rxjs-compat/add/observable/range");
require("rxjs-compat/add/observable/using");
require("rxjs-compat/add/observable/throw");
require("rxjs-compat/add/observable/timer");
require("rxjs-compat/add/observable/zip");
require("rxjs-compat/add/observable/dom/ajax");
require("rxjs-compat/add/observable/dom/webSocket");
require("rxjs-compat/add/operator/buffer");
require("rxjs-compat/add/operator/bufferCount");
require("rxjs-compat/add/operator/bufferTime");
require("rxjs-compat/add/operator/bufferToggle");
require("rxjs-compat/add/operator/bufferWhen");
require("rxjs-compat/add/operator/catch");
require("rxjs-compat/add/operator/combineAll");
require("rxjs-compat/add/operator/combineLatest");
require("rxjs-compat/add/operator/concat");
require("rxjs-compat/add/operator/concatAll");
require("rxjs-compat/add/operator/concatMap");
require("rxjs-compat/add/operator/concatMapTo");
require("rxjs-compat/add/operator/count");
require("rxjs-compat/add/operator/dematerialize");
require("rxjs-compat/add/operator/debounce");
require("rxjs-compat/add/operator/debounceTime");
require("rxjs-compat/add/operator/defaultIfEmpty");
require("rxjs-compat/add/operator/delay");
require("rxjs-compat/add/operator/delayWhen");
require("rxjs-compat/add/operator/distinct");
require("rxjs-compat/add/operator/distinctUntilChanged");
require("rxjs-compat/add/operator/distinctUntilKeyChanged");
require("rxjs-compat/add/operator/do");
require("rxjs-compat/add/operator/exhaust");
require("rxjs-compat/add/operator/exhaustMap");
require("rxjs-compat/add/operator/expand");
require("rxjs-compat/add/operator/elementAt");
require("rxjs-compat/add/operator/filter");
require("rxjs-compat/add/operator/finally");
require("rxjs-compat/add/operator/find");
require("rxjs-compat/add/operator/findIndex");
require("rxjs-compat/add/operator/first");
require("rxjs-compat/add/operator/groupBy");
require("rxjs-compat/add/operator/ignoreElements");
require("rxjs-compat/add/operator/isEmpty");
require("rxjs-compat/add/operator/audit");
require("rxjs-compat/add/operator/auditTime");
require("rxjs-compat/add/operator/last");
require("rxjs-compat/add/operator/let");
require("rxjs-compat/add/operator/every");
require("rxjs-compat/add/operator/map");
require("rxjs-compat/add/operator/mapTo");
require("rxjs-compat/add/operator/materialize");
require("rxjs-compat/add/operator/max");
require("rxjs-compat/add/operator/merge");
require("rxjs-compat/add/operator/mergeAll");
require("rxjs-compat/add/operator/mergeMap");
require("rxjs-compat/add/operator/mergeMapTo");
require("rxjs-compat/add/operator/mergeScan");
require("rxjs-compat/add/operator/min");
require("rxjs-compat/add/operator/multicast");
require("rxjs-compat/add/operator/observeOn");
require("rxjs-compat/add/operator/onErrorResumeNext");
require("rxjs-compat/add/operator/pairwise");
require("rxjs-compat/add/operator/partition");
require("rxjs-compat/add/operator/pluck");
require("rxjs-compat/add/operator/publish");
require("rxjs-compat/add/operator/publishBehavior");
require("rxjs-compat/add/operator/publishReplay");
require("rxjs-compat/add/operator/publishLast");
require("rxjs-compat/add/operator/race");
require("rxjs-compat/add/operator/reduce");
require("rxjs-compat/add/operator/repeat");
require("rxjs-compat/add/operator/repeatWhen");
require("rxjs-compat/add/operator/retry");
require("rxjs-compat/add/operator/retryWhen");
require("rxjs-compat/add/operator/sample");
require("rxjs-compat/add/operator/sampleTime");
require("rxjs-compat/add/operator/scan");
require("rxjs-compat/add/operator/sequenceEqual");
require("rxjs-compat/add/operator/share");
require("rxjs-compat/add/operator/shareReplay");
require("rxjs-compat/add/operator/single");
require("rxjs-compat/add/operator/skip");
require("rxjs-compat/add/operator/skipLast");
require("rxjs-compat/add/operator/skipUntil");
require("rxjs-compat/add/operator/skipWhile");
require("rxjs-compat/add/operator/startWith");
require("rxjs-compat/add/operator/subscribeOn");
require("rxjs-compat/add/operator/switch");
require("rxjs-compat/add/operator/switchMap");
require("rxjs-compat/add/operator/switchMapTo");
require("rxjs-compat/add/operator/take");
require("rxjs-compat/add/operator/takeLast");
require("rxjs-compat/add/operator/takeUntil");
require("rxjs-compat/add/operator/takeWhile");
require("rxjs-compat/add/operator/throttle");
require("rxjs-compat/add/operator/throttleTime");
require("rxjs-compat/add/operator/timeInterval");
require("rxjs-compat/add/operator/timeout");
require("rxjs-compat/add/operator/timeoutWith");
require("rxjs-compat/add/operator/timestamp");
require("rxjs-compat/add/operator/toArray");
require("rxjs-compat/add/operator/toPromise");
require("rxjs-compat/add/operator/window");
require("rxjs-compat/add/operator/windowCount");
require("rxjs-compat/add/operator/windowTime");
require("rxjs-compat/add/operator/windowToggle");
require("rxjs-compat/add/operator/windowWhen");
require("rxjs-compat/add/operator/withLatestFrom");
require("rxjs-compat/add/operator/zip");
require("rxjs-compat/add/operator/zipAll");
var Subscription_1 = require("./Subscription");
exports.Subscription = Subscription_1.Subscription;
var Subscriber_1 = require("./Subscriber");
exports.Subscriber = Subscriber_1.Subscriber;
var AsyncSubject_1 = require("./AsyncSubject");
exports.AsyncSubject = AsyncSubject_1.AsyncSubject;
var ReplaySubject_1 = require("./ReplaySubject");
exports.ReplaySubject = ReplaySubject_1.ReplaySubject;
var BehaviorSubject_1 = require("./BehaviorSubject");
exports.BehaviorSubject = BehaviorSubject_1.BehaviorSubject;
var ConnectableObservable_1 = require("./observable/ConnectableObservable");
exports.ConnectableObservable = ConnectableObservable_1.ConnectableObservable;
var Notification_1 = require("./Notification");
exports.Notification = Notification_1.Notification;
exports.NotificationKind = Notification_1.NotificationKind;
var EmptyError_1 = require("./util/EmptyError");
exports.EmptyError = EmptyError_1.EmptyError;
var ArgumentOutOfRangeError_1 = require("./util/ArgumentOutOfRangeError");
exports.ArgumentOutOfRangeError = ArgumentOutOfRangeError_1.ArgumentOutOfRangeError;
var ObjectUnsubscribedError_1 = require("./util/ObjectUnsubscribedError");
exports.ObjectUnsubscribedError = ObjectUnsubscribedError_1.ObjectUnsubscribedError;
var TimeoutError_1 = require("./util/TimeoutError");
exports.TimeoutError = TimeoutError_1.TimeoutError;
var UnsubscriptionError_1 = require("./util/UnsubscriptionError");
exports.UnsubscriptionError = UnsubscriptionError_1.UnsubscriptionError;
var timeInterval_1 = require("./operators/timeInterval");
exports.TimeInterval = timeInterval_1.TimeInterval;
var timestamp_1 = require("./operators/timestamp");
exports.Timestamp = timestamp_1.Timestamp;
var TestScheduler_1 = require("./testing/TestScheduler");
exports.TestScheduler = TestScheduler_1.TestScheduler;
var VirtualTimeScheduler_1 = require("./scheduler/VirtualTimeScheduler");
exports.VirtualTimeScheduler = VirtualTimeScheduler_1.VirtualTimeScheduler;
var AjaxObservable_1 = require("./observable/dom/AjaxObservable");
exports.AjaxResponse = AjaxObservable_1.AjaxResponse;
exports.AjaxError = AjaxObservable_1.AjaxError;
exports.AjaxTimeoutError = AjaxObservable_1.AjaxTimeoutError;
var pipe_1 = require("./util/pipe");
exports.pipe = pipe_1.pipe;
var asap_1 = require("./scheduler/asap");
var async_1 = require("./scheduler/async");
var queue_1 = require("./scheduler/queue");
var animationFrame_1 = require("./scheduler/animationFrame");
var rxSubscriber_1 = require("./symbol/rxSubscriber");
var iterator_1 = require("./symbol/iterator");
var observable_1 = require("./symbol/observable");
var _operators = require("./operators/index");
exports.operators = _operators;
var Scheduler = {
asap: asap_1.asap,
queue: queue_1.queue,
animationFrame: animationFrame_1.animationFrame,
async: async_1.async
};
exports.Scheduler = Scheduler;
var Symbol = {
rxSubscriber: rxSubscriber_1.rxSubscriber,
observable: observable_1.observable,
iterator: iterator_1.iterator
};
exports.Symbol = Symbol;
//# sourceMappingURL=Rx.js.map

1
node_modules/rxjs/internal/Rx.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"Rx.js","sources":["../src/internal/Rx.ts"],"names":[],"mappings":";;AAIA,qCAAoD;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/D,4DAAA,uBAAuB,CAAA;AAC/B,0EAAuE;AAA/D,4DAAA,uBAAuB,CAAA;AAC/B,oDAAiD;AAAzC,sCAAA,YAAY,CAAA;AACpB,kEAA+D;AAAvD,oDAAA,mBAAmB,CAAA;AAC3B,yDAAsD;AAA9C,sCAAA,YAAY,CAAA;AACpB,mDAAgD;AAAxC,gCAAA,SAAS,CAAA;AACjB,yDAAsD;AAA9C,wCAAA,aAAa,CAAA;AACrB,yEAAsE;AAA9D,sDAAA,oBAAoB,CAAA;AAC5B,kEAAuG;AAAlF,wCAAA,YAAY,CAAA;AAAE,qCAAA,SAAS,CAAA;AAAE,4CAAA,gBAAgB,CAAA;AAC9D,oCAAmC;AAA1B,sBAAA,IAAI,CAAA;AAEb,yCAAwC;AACxC,2CAA0C;AAC1C,2CAA0C;AAC1C,6DAA4D;AAK5D,sDAAqD;AACrD,8CAA6C;AAC7C,kDAAiD;AAEjD,8CAAgD;AAEnC,QAAA,SAAS,GAAG,UAAU,CAAC;AAgBpC,IAAI,SAAS,GAAG;IACd,IAAI,aAAA;IACJ,KAAK,eAAA;IACL,cAAc,iCAAA;IACd,KAAK,eAAA;CACN,CAAC;AAsBE,8BAAS;AAPb,IAAI,MAAM,GAAG;IACX,YAAY,6BAAA;IACZ,UAAU,yBAAA;IACV,QAAQ,qBAAA;CACT,CAAC;AAIE,wBAAM"}

59
node_modules/rxjs/internal/Scheduler.d.ts generated vendored Normal file
View File

@ -0,0 +1,59 @@
import { Action } from './scheduler/Action';
import { Subscription } from './Subscription';
import { SchedulerLike, SchedulerAction } from './types';
/**
* An execution context and a data structure to order tasks and schedule their
* execution. Provides a notion of (potentially virtual) time, through the
* `now()` getter method.
*
* Each unit of work in a Scheduler is called an `Action`.
*
* ```ts
* class Scheduler {
* now(): number;
* schedule(work, delay?, state?): Subscription;
* }
* ```
*
* @class Scheduler
* @deprecated Scheduler is an internal implementation detail of RxJS, and
* should not be used directly. Rather, create your own class and implement
* {@link SchedulerLike}
*/
export declare class Scheduler implements SchedulerLike {
private SchedulerAction;
/**
* Note: the extra arrow function wrapper is to make testing by overriding
* Date.now easier.
* @nocollapse
*/
static now: () => number;
constructor(SchedulerAction: typeof Action, now?: () => number);
/**
* A getter method that returns a number representing the current time
* (at the time this function was called) according to the scheduler's own
* internal clock.
* @return {number} A number that represents the current time. May or may not
* have a relation to wall-clock time. May or may not refer to a time unit
* (e.g. milliseconds).
*/
now: () => number;
/**
* Schedules a function, `work`, for execution. May happen at some point in
* the future, according to the `delay` parameter, if specified. May be passed
* some context object, `state`, which will be passed to the `work` function.
*
* The given arguments will be processed an stored as an Action object in a
* queue of actions.
*
* @param {function(state: ?T): ?Subscription} work A function representing a
* task, or some unit of work to be executed by the Scheduler.
* @param {number} [delay] Time to wait before executing the work, where the
* time unit is implicit and defined by the Scheduler itself.
* @param {T} [state] Some contextual data that the `work` function uses when
* called by the Scheduler.
* @return {Subscription} A subscription in order to be able to unsubscribe
* the scheduled work.
*/
schedule<T>(work: (this: SchedulerAction<T>, state?: T) => void, delay?: number, state?: T): Subscription;
}

17
node_modules/rxjs/internal/Scheduler.js generated vendored Normal file
View File

@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Scheduler = (function () {
function Scheduler(SchedulerAction, now) {
if (now === void 0) { now = Scheduler.now; }
this.SchedulerAction = SchedulerAction;
this.now = now;
}
Scheduler.prototype.schedule = function (work, delay, state) {
if (delay === void 0) { delay = 0; }
return new this.SchedulerAction(this, work).schedule(state, delay);
};
Scheduler.now = function () { return Date.now(); };
return Scheduler;
}());
exports.Scheduler = Scheduler;
//# sourceMappingURL=Scheduler.js.map

1
node_modules/rxjs/internal/Scheduler.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"Scheduler.js","sources":["../src/internal/Scheduler.ts"],"names":[],"mappings":";;AAuBA;IASE,mBAAoB,eAA8B,EACtC,GAAiC;QAAjC,oBAAA,EAAA,MAAoB,SAAS,CAAC,GAAG;QADzB,oBAAe,GAAf,eAAe,CAAe;QAEhD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IA6BM,4BAAQ,GAAf,UAAmB,IAAmD,EAAE,KAAiB,EAAE,KAAS;QAA5B,sBAAA,EAAA,SAAiB;QACvF,OAAO,IAAI,IAAI,CAAC,eAAe,CAAI,IAAI,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACxE,CAAC;IApCa,aAAG,GAAiB,cAAM,OAAA,IAAI,CAAC,GAAG,EAAE,EAAV,CAAU,CAAC;IAqCrD,gBAAC;CAAA,AA5CD,IA4CC;AA5CY,8BAAS"}

61
node_modules/rxjs/internal/Subject.d.ts generated vendored Normal file
View File

@ -0,0 +1,61 @@
import { Operator } from './Operator';
import { Observable } from './Observable';
import { Subscriber } from './Subscriber';
import { Subscription } from './Subscription';
import { Observer, SubscriptionLike, TeardownLogic } from './types';
/**
* @class SubjectSubscriber<T>
*/
export declare class SubjectSubscriber<T> extends Subscriber<T> {
protected destination: Subject<T>;
constructor(destination: Subject<T>);
}
/**
* A Subject is a special type of Observable that allows values to be
* multicasted to many Observers. Subjects are like EventEmitters.
*
* Every Subject is an Observable and an Observer. You can subscribe to a
* Subject, and you can call next to feed values as well as error and complete.
*
* @class Subject<T>
*/
export declare class Subject<T> extends Observable<T> implements SubscriptionLike {
observers: Observer<T>[];
closed: boolean;
isStopped: boolean;
hasError: boolean;
thrownError: any;
constructor();
/**@nocollapse
* @deprecated use new Subject() instead
*/
static create: Function;
lift<R>(operator: Operator<T, R>): Observable<R>;
next(value?: T): void;
error(err: any): void;
complete(): void;
unsubscribe(): void;
/** @deprecated This is an internal implementation detail, do not use. */
_trySubscribe(subscriber: Subscriber<T>): TeardownLogic;
/** @deprecated This is an internal implementation detail, do not use. */
_subscribe(subscriber: Subscriber<T>): Subscription;
/**
* Creates a new Observable with this Subject as the source. You can do this
* to create customize Observer-side logic of the Subject and conceal it from
* code that uses the Observable.
* @return {Observable} Observable that the Subject casts to
*/
asObservable(): Observable<T>;
}
/**
* @class AnonymousSubject<T>
*/
export declare class AnonymousSubject<T> extends Subject<T> {
protected destination?: Observer<T>;
constructor(destination?: Observer<T>, source?: Observable<T>);
next(value: T): void;
error(err: any): void;
complete(): void;
/** @deprecated This is an internal implementation detail, do not use. */
_subscribe(subscriber: Subscriber<T>): Subscription;
}

171
node_modules/rxjs/internal/Subject.js generated vendored Normal file
View File

@ -0,0 +1,171 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("./Observable");
var Subscriber_1 = require("./Subscriber");
var Subscription_1 = require("./Subscription");
var ObjectUnsubscribedError_1 = require("./util/ObjectUnsubscribedError");
var SubjectSubscription_1 = require("./SubjectSubscription");
var rxSubscriber_1 = require("../internal/symbol/rxSubscriber");
var SubjectSubscriber = (function (_super) {
__extends(SubjectSubscriber, _super);
function SubjectSubscriber(destination) {
var _this = _super.call(this, destination) || this;
_this.destination = destination;
return _this;
}
return SubjectSubscriber;
}(Subscriber_1.Subscriber));
exports.SubjectSubscriber = SubjectSubscriber;
var Subject = (function (_super) {
__extends(Subject, _super);
function Subject() {
var _this = _super.call(this) || this;
_this.observers = [];
_this.closed = false;
_this.isStopped = false;
_this.hasError = false;
_this.thrownError = null;
return _this;
}
Subject.prototype[rxSubscriber_1.rxSubscriber] = function () {
return new SubjectSubscriber(this);
};
Subject.prototype.lift = function (operator) {
var subject = new AnonymousSubject(this, this);
subject.operator = operator;
return subject;
};
Subject.prototype.next = function (value) {
if (this.closed) {
throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();
}
if (!this.isStopped) {
var observers = this.observers;
var len = observers.length;
var copy = observers.slice();
for (var i = 0; i < len; i++) {
copy[i].next(value);
}
}
};
Subject.prototype.error = function (err) {
if (this.closed) {
throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();
}
this.hasError = true;
this.thrownError = err;
this.isStopped = true;
var observers = this.observers;
var len = observers.length;
var copy = observers.slice();
for (var i = 0; i < len; i++) {
copy[i].error(err);
}
this.observers.length = 0;
};
Subject.prototype.complete = function () {
if (this.closed) {
throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();
}
this.isStopped = true;
var observers = this.observers;
var len = observers.length;
var copy = observers.slice();
for (var i = 0; i < len; i++) {
copy[i].complete();
}
this.observers.length = 0;
};
Subject.prototype.unsubscribe = function () {
this.isStopped = true;
this.closed = true;
this.observers = null;
};
Subject.prototype._trySubscribe = function (subscriber) {
if (this.closed) {
throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();
}
else {
return _super.prototype._trySubscribe.call(this, subscriber);
}
};
Subject.prototype._subscribe = function (subscriber) {
if (this.closed) {
throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();
}
else if (this.hasError) {
subscriber.error(this.thrownError);
return Subscription_1.Subscription.EMPTY;
}
else if (this.isStopped) {
subscriber.complete();
return Subscription_1.Subscription.EMPTY;
}
else {
this.observers.push(subscriber);
return new SubjectSubscription_1.SubjectSubscription(this, subscriber);
}
};
Subject.prototype.asObservable = function () {
var observable = new Observable_1.Observable();
observable.source = this;
return observable;
};
Subject.create = function (destination, source) {
return new AnonymousSubject(destination, source);
};
return Subject;
}(Observable_1.Observable));
exports.Subject = Subject;
var AnonymousSubject = (function (_super) {
__extends(AnonymousSubject, _super);
function AnonymousSubject(destination, source) {
var _this = _super.call(this) || this;
_this.destination = destination;
_this.source = source;
return _this;
}
AnonymousSubject.prototype.next = function (value) {
var destination = this.destination;
if (destination && destination.next) {
destination.next(value);
}
};
AnonymousSubject.prototype.error = function (err) {
var destination = this.destination;
if (destination && destination.error) {
this.destination.error(err);
}
};
AnonymousSubject.prototype.complete = function () {
var destination = this.destination;
if (destination && destination.complete) {
this.destination.complete();
}
};
AnonymousSubject.prototype._subscribe = function (subscriber) {
var source = this.source;
if (source) {
return this.source.subscribe(subscriber);
}
else {
return Subscription_1.Subscription.EMPTY;
}
};
return AnonymousSubject;
}(Subject));
exports.AnonymousSubject = AnonymousSubject;
//# sourceMappingURL=Subject.js.map

1
node_modules/rxjs/internal/Subject.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"Subject.js","sources":["../src/internal/Subject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,2CAA0C;AAC1C,2CAA0C;AAC1C,+CAA8C;AAE9C,0EAAyE;AACzE,6DAA4D;AAC5D,gEAAqF;AAKrF;IAA0C,qCAAa;IACrD,2BAAsB,WAAuB;QAA7C,YACE,kBAAM,WAAW,CAAC,SACnB;QAFqB,iBAAW,GAAX,WAAW,CAAY;;IAE7C,CAAC;IACH,wBAAC;AAAD,CAAC,AAJD,CAA0C,uBAAU,GAInD;AAJY,8CAAiB;AAe9B;IAAgC,2BAAa;IAgB3C;QAAA,YACE,iBAAO,SACR;QAZD,eAAS,GAAkB,EAAE,CAAC;QAE9B,YAAM,GAAG,KAAK,CAAC;QAEf,eAAS,GAAG,KAAK,CAAC;QAElB,cAAQ,GAAG,KAAK,CAAC;QAEjB,iBAAW,GAAQ,IAAI,CAAC;;IAIxB,CAAC;IAhBD,kBAAC,2BAAkB,CAAC,GAApB;QACE,OAAO,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;IAuBD,sBAAI,GAAJ,UAAQ,QAAwB;QAC9B,IAAM,OAAO,GAAG,IAAI,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACjD,OAAO,CAAC,QAAQ,GAAQ,QAAQ,CAAC;QACjC,OAAY,OAAO,CAAC;IACtB,CAA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node_modules/rxjs/internal/SubjectSubscription.d.ts generated vendored Normal file
View File

@ -0,0 +1,15 @@
import { Subject } from './Subject';
import { Observer } from './types';
import { Subscription } from './Subscription';
/**
* We need this JSDoc comment for affecting ESDoc.
* @ignore
* @extends {Ignored}
*/
export declare class SubjectSubscription<T> extends Subscription {
subject: Subject<T>;
subscriber: Observer<T>;
closed: boolean;
constructor(subject: Subject<T>, subscriber: Observer<T>);
unsubscribe(): void;
}

45
node_modules/rxjs/internal/SubjectSubscription.js generated vendored Normal file
View File

@ -0,0 +1,45 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Subscription_1 = require("./Subscription");
var SubjectSubscription = (function (_super) {
__extends(SubjectSubscription, _super);
function SubjectSubscription(subject, subscriber) {
var _this = _super.call(this) || this;
_this.subject = subject;
_this.subscriber = subscriber;
_this.closed = false;
return _this;
}
SubjectSubscription.prototype.unsubscribe = function () {
if (this.closed) {
return;
}
this.closed = true;
var subject = this.subject;
var observers = subject.observers;
this.subject = null;
if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {
return;
}
var subscriberIndex = observers.indexOf(this.subscriber);
if (subscriberIndex !== -1) {
observers.splice(subscriberIndex, 1);
}
};
return SubjectSubscription;
}(Subscription_1.Subscription));
exports.SubjectSubscription = SubjectSubscription;
//# sourceMappingURL=SubjectSubscription.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"SubjectSubscription.js","sources":["../src/internal/SubjectSubscription.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,+CAA8C;AAO9C;IAA4C,uCAAY;IAGtD,6BAAmB,OAAmB,EAAS,UAAuB;QAAtE,YACE,iBAAO,SACR;QAFkB,aAAO,GAAP,OAAO,CAAY;QAAS,gBAAU,GAAV,UAAU,CAAa;QAFtE,YAAM,GAAY,KAAK,CAAC;;IAIxB,CAAC;IAED,yCAAW,GAAX;QACE,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO;SACR;QAED,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QAEnB,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QAEpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,EAAE;YAC/E,OAAO;SACR;QAED,IAAM,eAAe,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAE3D,IAAI,eAAe,KAAK,CAAC,CAAC,EAAE;YAC1B,SAAS,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC;SACtC;IACH,CAAC;IACH,0BAAC;AAAD,CAAC,AA7BD,CAA4C,2BAAY,GA6BvD;AA7BY,kDAAmB"}

87
node_modules/rxjs/internal/Subscriber.d.ts generated vendored Normal file
View File

@ -0,0 +1,87 @@
import { Observer, PartialObserver } from './types';
import { Subscription } from './Subscription';
/**
* Implements the {@link Observer} interface and extends the
* {@link Subscription} class. While the {@link Observer} is the public API for
* consuming the values of an {@link Observable}, all Observers get converted to
* a Subscriber, in order to provide Subscription-like capabilities such as
* `unsubscribe`. Subscriber is a common type in RxJS, and crucial for
* implementing operators, but it is rarely used as a public API.
*
* @class Subscriber<T>
*/
export declare class Subscriber<T> extends Subscription implements Observer<T> {
/**
* A static factory for a Subscriber, given a (potentially partial) definition
* of an Observer.
* @param {function(x: ?T): void} [next] The `next` callback of an Observer.
* @param {function(e: ?any): void} [error] The `error` callback of an
* Observer.
* @param {function(): void} [complete] The `complete` callback of an
* Observer.
* @return {Subscriber<T>} A Subscriber wrapping the (partially defined)
* Observer represented by the given arguments.
* @nocollapse
*/
static create<T>(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber<T>;
/** @internal */ syncErrorValue: any;
/** @internal */ syncErrorThrown: boolean;
/** @internal */ syncErrorThrowable: boolean;
protected isStopped: boolean;
protected destination: PartialObserver<any> | Subscriber<any>;
/**
* @param {Observer|function(value: T): void} [destinationOrNext] A partially
* defined Observer or a `next` callback function.
* @param {function(e: ?any): void} [error] The `error` callback of an
* Observer.
* @param {function(): void} [complete] The `complete` callback of an
* Observer.
*/
constructor(destinationOrNext?: PartialObserver<any> | ((value: T) => void), error?: (e?: any) => void, complete?: () => void);
/**
* The {@link Observer} callback to receive notifications of type `next` from
* the Observable, with a value. The Observable may call this method 0 or more
* times.
* @param {T} [value] The `next` value.
* @return {void}
*/
next(value?: T): void;
/**
* The {@link Observer} callback to receive notifications of type `error` from
* the Observable, with an attached `Error`. Notifies the Observer that
* the Observable has experienced an error condition.
* @param {any} [err] The `error` exception.
* @return {void}
*/
error(err?: any): void;
/**
* The {@link Observer} callback to receive a valueless notification of type
* `complete` from the Observable. Notifies the Observer that the Observable
* has finished sending push-based notifications.
* @return {void}
*/
complete(): void;
unsubscribe(): void;
protected _next(value: T): void;
protected _error(err: any): void;
protected _complete(): void;
/** @deprecated This is an internal implementation detail, do not use. */
_unsubscribeAndRecycle(): Subscriber<T>;
}
/**
* We need this JSDoc comment for affecting ESDoc.
* @ignore
* @extends {Ignored}
*/
export declare class SafeSubscriber<T> extends Subscriber<T> {
private _parentSubscriber;
private _context;
constructor(_parentSubscriber: Subscriber<T>, observerOrNext?: PartialObserver<T> | ((value: T) => void), error?: (e?: any) => void, complete?: () => void);
next(value?: T): void;
error(err?: any): void;
complete(): void;
private __tryOrUnsub;
private __tryOrSetError;
/** @internal This is an internal implementation detail, do not use. */
_unsubscribe(): void;
}

246
node_modules/rxjs/internal/Subscriber.js generated vendored Normal file
View File

@ -0,0 +1,246 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var isFunction_1 = require("./util/isFunction");
var Observer_1 = require("./Observer");
var Subscription_1 = require("./Subscription");
var rxSubscriber_1 = require("../internal/symbol/rxSubscriber");
var config_1 = require("./config");
var hostReportError_1 = require("./util/hostReportError");
var Subscriber = (function (_super) {
__extends(Subscriber, _super);
function Subscriber(destinationOrNext, error, complete) {
var _this = _super.call(this) || this;
_this.syncErrorValue = null;
_this.syncErrorThrown = false;
_this.syncErrorThrowable = false;
_this.isStopped = false;
switch (arguments.length) {
case 0:
_this.destination = Observer_1.empty;
break;
case 1:
if (!destinationOrNext) {
_this.destination = Observer_1.empty;
break;
}
if (typeof destinationOrNext === 'object') {
if (destinationOrNext instanceof Subscriber) {
_this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;
_this.destination = destinationOrNext;
destinationOrNext.add(_this);
}
else {
_this.syncErrorThrowable = true;
_this.destination = new SafeSubscriber(_this, destinationOrNext);
}
break;
}
default:
_this.syncErrorThrowable = true;
_this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);
break;
}
return _this;
}
Subscriber.prototype[rxSubscriber_1.rxSubscriber] = function () { return this; };
Subscriber.create = function (next, error, complete) {
var subscriber = new Subscriber(next, error, complete);
subscriber.syncErrorThrowable = false;
return subscriber;
};
Subscriber.prototype.next = function (value) {
if (!this.isStopped) {
this._next(value);
}
};
Subscriber.prototype.error = function (err) {
if (!this.isStopped) {
this.isStopped = true;
this._error(err);
}
};
Subscriber.prototype.complete = function () {
if (!this.isStopped) {
this.isStopped = true;
this._complete();
}
};
Subscriber.prototype.unsubscribe = function () {
if (this.closed) {
return;
}
this.isStopped = true;
_super.prototype.unsubscribe.call(this);
};
Subscriber.prototype._next = function (value) {
this.destination.next(value);
};
Subscriber.prototype._error = function (err) {
this.destination.error(err);
this.unsubscribe();
};
Subscriber.prototype._complete = function () {
this.destination.complete();
this.unsubscribe();
};
Subscriber.prototype._unsubscribeAndRecycle = function () {
var _parentOrParents = this._parentOrParents;
this._parentOrParents = null;
this.unsubscribe();
this.closed = false;
this.isStopped = false;
this._parentOrParents = _parentOrParents;
return this;
};
return Subscriber;
}(Subscription_1.Subscription));
exports.Subscriber = Subscriber;
var SafeSubscriber = (function (_super) {
__extends(SafeSubscriber, _super);
function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {
var _this = _super.call(this) || this;
_this._parentSubscriber = _parentSubscriber;
var next;
var context = _this;
if (isFunction_1.isFunction(observerOrNext)) {
next = observerOrNext;
}
else if (observerOrNext) {
next = observerOrNext.next;
error = observerOrNext.error;
complete = observerOrNext.complete;
if (observerOrNext !== Observer_1.empty) {
context = Object.create(observerOrNext);
if (isFunction_1.isFunction(context.unsubscribe)) {
_this.add(context.unsubscribe.bind(context));
}
context.unsubscribe = _this.unsubscribe.bind(_this);
}
}
_this._context = context;
_this._next = next;
_this._error = error;
_this._complete = complete;
return _this;
}
SafeSubscriber.prototype.next = function (value) {
if (!this.isStopped && this._next) {
var _parentSubscriber = this._parentSubscriber;
if (!config_1.config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
this.__tryOrUnsub(this._next, value);
}
else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {
this.unsubscribe();
}
}
};
SafeSubscriber.prototype.error = function (err) {
if (!this.isStopped) {
var _parentSubscriber = this._parentSubscriber;
var useDeprecatedSynchronousErrorHandling = config_1.config.useDeprecatedSynchronousErrorHandling;
if (this._error) {
if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
this.__tryOrUnsub(this._error, err);
this.unsubscribe();
}
else {
this.__tryOrSetError(_parentSubscriber, this._error, err);
this.unsubscribe();
}
}
else if (!_parentSubscriber.syncErrorThrowable) {
this.unsubscribe();
if (useDeprecatedSynchronousErrorHandling) {
throw err;
}
hostReportError_1.hostReportError(err);
}
else {
if (useDeprecatedSynchronousErrorHandling) {
_parentSubscriber.syncErrorValue = err;
_parentSubscriber.syncErrorThrown = true;
}
else {
hostReportError_1.hostReportError(err);
}
this.unsubscribe();
}
}
};
SafeSubscriber.prototype.complete = function () {
var _this = this;
if (!this.isStopped) {
var _parentSubscriber = this._parentSubscriber;
if (this._complete) {
var wrappedComplete = function () { return _this._complete.call(_this._context); };
if (!config_1.config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
this.__tryOrUnsub(wrappedComplete);
this.unsubscribe();
}
else {
this.__tryOrSetError(_parentSubscriber, wrappedComplete);
this.unsubscribe();
}
}
else {
this.unsubscribe();
}
}
};
SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {
try {
fn.call(this._context, value);
}
catch (err) {
this.unsubscribe();
if (config_1.config.useDeprecatedSynchronousErrorHandling) {
throw err;
}
else {
hostReportError_1.hostReportError(err);
}
}
};
SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {
if (!config_1.config.useDeprecatedSynchronousErrorHandling) {
throw new Error('bad call');
}
try {
fn.call(this._context, value);
}
catch (err) {
if (config_1.config.useDeprecatedSynchronousErrorHandling) {
parent.syncErrorValue = err;
parent.syncErrorThrown = true;
return true;
}
else {
hostReportError_1.hostReportError(err);
return true;
}
}
return false;
};
SafeSubscriber.prototype._unsubscribe = function () {
var _parentSubscriber = this._parentSubscriber;
this._context = null;
this._parentSubscriber = null;
_parentSubscriber.unsubscribe();
};
return SafeSubscriber;
}(Subscriber));
exports.SafeSubscriber = SafeSubscriber;
//# sourceMappingURL=Subscriber.js.map

1
node_modules/rxjs/internal/Subscriber.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

66
node_modules/rxjs/internal/Subscription.d.ts generated vendored Normal file
View File

@ -0,0 +1,66 @@
import { SubscriptionLike, TeardownLogic } from './types';
/**
* Represents a disposable resource, such as the execution of an Observable. A
* Subscription has one important method, `unsubscribe`, that takes no argument
* and just disposes the resource held by the subscription.
*
* Additionally, subscriptions may be grouped together through the `add()`
* method, which will attach a child Subscription to the current Subscription.
* When a Subscription is unsubscribed, all its children (and its grandchildren)
* will be unsubscribed as well.
*
* @class Subscription
*/
export declare class Subscription implements SubscriptionLike {
/** @nocollapse */
static EMPTY: Subscription;
/**
* A flag to indicate whether this Subscription has already been unsubscribed.
* @type {boolean}
*/
closed: boolean;
/** @internal */
protected _parentOrParents: Subscription | Subscription[];
/** @internal */
private _subscriptions;
/**
* @param {function(): void} [unsubscribe] A function describing how to
* perform the disposal of resources when the `unsubscribe` method is called.
*/
constructor(unsubscribe?: () => void);
/**
* Disposes the resources held by the subscription. May, for instance, cancel
* an ongoing Observable execution or cancel any other type of work that
* started when the Subscription was created.
* @return {void}
*/
unsubscribe(): void;
/**
* Adds a tear down to be called during the unsubscribe() of this
* Subscription. Can also be used to add a child subscription.
*
* If the tear down being added is a subscription that is already
* unsubscribed, is the same reference `add` is being called on, or is
* `Subscription.EMPTY`, it will not be added.
*
* If this subscription is already in an `closed` state, the passed
* tear down logic will be executed immediately.
*
* When a parent subscription is unsubscribed, any child subscriptions that were added to it are also unsubscribed.
*
* @param {TeardownLogic} teardown The additional logic to execute on
* teardown.
* @return {Subscription} Returns the Subscription used or created to be
* added to the inner subscriptions list. This Subscription can be used with
* `remove()` to remove the passed teardown logic from the inner subscriptions
* list.
*/
add(teardown: TeardownLogic): Subscription;
/**
* Removes a Subscription from the internal list of subscriptions that will
* unsubscribe during the unsubscribe process of this Subscription.
* @param {Subscription} subscription The subscription to remove.
* @return {void}
*/
remove(subscription: Subscription): void;
}

137
node_modules/rxjs/internal/Subscription.js generated vendored Normal file
View File

@ -0,0 +1,137 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var isArray_1 = require("./util/isArray");
var isObject_1 = require("./util/isObject");
var isFunction_1 = require("./util/isFunction");
var UnsubscriptionError_1 = require("./util/UnsubscriptionError");
var Subscription = (function () {
function Subscription(unsubscribe) {
this.closed = false;
this._parentOrParents = null;
this._subscriptions = null;
if (unsubscribe) {
this._unsubscribe = unsubscribe;
}
}
Subscription.prototype.unsubscribe = function () {
var errors;
if (this.closed) {
return;
}
var _a = this, _parentOrParents = _a._parentOrParents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
this.closed = true;
this._parentOrParents = null;
this._subscriptions = null;
if (_parentOrParents instanceof Subscription) {
_parentOrParents.remove(this);
}
else if (_parentOrParents !== null) {
for (var index = 0; index < _parentOrParents.length; ++index) {
var parent_1 = _parentOrParents[index];
parent_1.remove(this);
}
}
if (isFunction_1.isFunction(_unsubscribe)) {
try {
_unsubscribe.call(this);
}
catch (e) {
errors = e instanceof UnsubscriptionError_1.UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e];
}
}
if (isArray_1.isArray(_subscriptions)) {
var index = -1;
var len = _subscriptions.length;
while (++index < len) {
var sub = _subscriptions[index];
if (isObject_1.isObject(sub)) {
try {
sub.unsubscribe();
}
catch (e) {
errors = errors || [];
if (e instanceof UnsubscriptionError_1.UnsubscriptionError) {
errors = errors.concat(flattenUnsubscriptionErrors(e.errors));
}
else {
errors.push(e);
}
}
}
}
}
if (errors) {
throw new UnsubscriptionError_1.UnsubscriptionError(errors);
}
};
Subscription.prototype.add = function (teardown) {
var subscription = teardown;
if (!teardown) {
return Subscription.EMPTY;
}
switch (typeof teardown) {
case 'function':
subscription = new Subscription(teardown);
case 'object':
if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {
return subscription;
}
else if (this.closed) {
subscription.unsubscribe();
return subscription;
}
else if (!(subscription instanceof Subscription)) {
var tmp = subscription;
subscription = new Subscription();
subscription._subscriptions = [tmp];
}
break;
default: {
throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
}
}
var _parentOrParents = subscription._parentOrParents;
if (_parentOrParents === null) {
subscription._parentOrParents = this;
}
else if (_parentOrParents instanceof Subscription) {
if (_parentOrParents === this) {
return subscription;
}
subscription._parentOrParents = [_parentOrParents, this];
}
else if (_parentOrParents.indexOf(this) === -1) {
_parentOrParents.push(this);
}
else {
return subscription;
}
var subscriptions = this._subscriptions;
if (subscriptions === null) {
this._subscriptions = [subscription];
}
else {
subscriptions.push(subscription);
}
return subscription;
};
Subscription.prototype.remove = function (subscription) {
var subscriptions = this._subscriptions;
if (subscriptions) {
var subscriptionIndex = subscriptions.indexOf(subscription);
if (subscriptionIndex !== -1) {
subscriptions.splice(subscriptionIndex, 1);
}
}
};
Subscription.EMPTY = (function (empty) {
empty.closed = true;
return empty;
}(new Subscription()));
return Subscription;
}());
exports.Subscription = Subscription;
function flattenUnsubscriptionErrors(errors) {
return errors.reduce(function (errs, err) { return errs.concat((err instanceof UnsubscriptionError_1.UnsubscriptionError) ? err.errors : err); }, []);
}
//# sourceMappingURL=Subscription.js.map

1
node_modules/rxjs/internal/Subscription.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"Subscription.js","sources":["../src/internal/Subscription.ts"],"names":[],"mappings":";;AAAA,0CAAyC;AACzC,4CAA2C;AAC3C,gDAA+C;AAC/C,kEAAiE;AAejE;IAsBE,sBAAY,WAAwB;QAX7B,WAAM,GAAY,KAAK,CAAC;QAGrB,qBAAgB,GAAkC,IAAI,CAAC;QAEzD,mBAAc,GAAuB,IAAI,CAAC;QAOhD,IAAI,WAAW,EAAE;YACR,IAAK,CAAC,YAAY,GAAG,WAAW,CAAC;SACzC;IACH,CAAC;IAQD,kCAAW,GAAX;QACE,IAAI,MAAa,CAAC;QAElB,IAAI,IAAI,CAAC,MAA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AM,CAAC,MAAM,CAAC,UAAC,IAAI,EAAE,GAAG,IAAK,OAAA,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,YAAY,yCAAmB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAApE,CAAoE,EAAE,EAAE,CAAC,CAAC;AAC/G,CAAC"}

20
node_modules/rxjs/internal/config.d.ts generated vendored Normal file
View File

@ -0,0 +1,20 @@
/**
* The global configuration object for RxJS, used to configure things
* like what Promise contructor should used to create Promises
*/
export declare const config: {
/**
* The promise constructor used by default for methods such as
* {@link toPromise} and {@link forEach}
*/
Promise: PromiseConstructorLike;
/**
* If true, turns on synchronous error rethrowing, which is a deprecated behavior
* in v6 and higher. This behavior enables bad patterns like wrapping a subscribe
* call in a try/catch block. It also enables producer interference, a nasty bug
* where a multicast can be broken for all observers by a downstream consumer with
* an unhandled error. DO NOT USE THIS FLAG UNLESS IT'S NEEDED TO BY TIME
* FOR MIGRATION REASONS.
*/
useDeprecatedSynchronousErrorHandling: boolean;
};

20
node_modules/rxjs/internal/config.js generated vendored Normal file
View File

@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var _enable_super_gross_mode_that_will_cause_bad_things = false;
exports.config = {
Promise: undefined,
set useDeprecatedSynchronousErrorHandling(value) {
if (value) {
var error = new Error();
console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack);
}
else if (_enable_super_gross_mode_that_will_cause_bad_things) {
console.log('RxJS: Back to a better error behavior. Thank you. <3');
}
_enable_super_gross_mode_that_will_cause_bad_things = value;
},
get useDeprecatedSynchronousErrorHandling() {
return _enable_super_gross_mode_that_will_cause_bad_things;
},
};
//# sourceMappingURL=config.js.map

1
node_modules/rxjs/internal/config.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"config.js","sources":["../src/internal/config.ts"],"names":[],"mappings":";;AAAA,IAAI,mDAAmD,GAAG,KAAK,CAAC;AAMnD,QAAA,MAAM,GAAG;IAKpB,OAAO,EAAE,SAAmC;IAU5C,IAAI,qCAAqC,CAAC,KAAc;QACtD,IAAI,KAAK,EAAE;YACT,IAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;YAC1B,OAAO,CAAC,IAAI,CAAC,+FAA+F,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;SAC7H;aAAM,IAAI,mDAAmD,EAAE;YAC9D,OAAO,CAAC,GAAG,CAAC,sDAAsD,CAAC,CAAC;SACrE;QACD,mDAAmD,GAAG,KAAK,CAAC;IAC9D,CAAC;IAED,IAAI,qCAAqC;QACvC,OAAO,mDAAmD,CAAC;IAC7D,CAAC;CACF,CAAC"}

View File

@ -0,0 +1,23 @@
import { Subject } from '../Subject';
import { Observable } from '../Observable';
import { Subscriber } from '../Subscriber';
import { Subscription } from '../Subscription';
/**
* @class ConnectableObservable<T>
*/
export declare class ConnectableObservable<T> extends Observable<T> {
source: Observable<T>;
protected subjectFactory: () => Subject<T>;
protected _subject: Subject<T>;
protected _refCount: number;
protected _connection: Subscription;
/** @internal */
_isComplete: boolean;
constructor(source: Observable<T>, subjectFactory: () => Subject<T>);
/** @deprecated This is an internal implementation detail, do not use. */
_subscribe(subscriber: Subscriber<T>): Subscription;
protected getSubject(): Subject<T>;
connect(): Subscription;
refCount(): Observable<T>;
}
export declare const connectableObservableDescriptor: PropertyDescriptorMap;

View File

@ -0,0 +1,155 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Subject_1 = require("../Subject");
var Observable_1 = require("../Observable");
var Subscriber_1 = require("../Subscriber");
var Subscription_1 = require("../Subscription");
var refCount_1 = require("../operators/refCount");
var ConnectableObservable = (function (_super) {
__extends(ConnectableObservable, _super);
function ConnectableObservable(source, subjectFactory) {
var _this = _super.call(this) || this;
_this.source = source;
_this.subjectFactory = subjectFactory;
_this._refCount = 0;
_this._isComplete = false;
return _this;
}
ConnectableObservable.prototype._subscribe = function (subscriber) {
return this.getSubject().subscribe(subscriber);
};
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_1.Subscription();
connection.add(this.source
.subscribe(new ConnectableSubscriber(this.getSubject(), this)));
if (connection.closed) {
this._connection = null;
connection = Subscription_1.Subscription.EMPTY;
}
}
return connection;
};
ConnectableObservable.prototype.refCount = function () {
return refCount_1.refCount()(this);
};
return ConnectableObservable;
}(Observable_1.Observable));
exports.ConnectableObservable = ConnectableObservable;
exports.connectableObservableDescriptor = (function () {
var connectableProto = ConnectableObservable.prototype;
return {
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 = (function (_super) {
__extends(ConnectableSubscriber, _super);
function ConnectableSubscriber(destination, connectable) {
var _this = _super.call(this, destination) || this;
_this.connectable = connectable;
return _this;
}
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);
};
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;
}(Subject_1.SubjectSubscriber));
var RefCountOperator = (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 = (function (_super) {
__extends(RefCountSubscriber, _super);
function RefCountSubscriber(destination, connectable) {
var _this = _super.call(this, destination) || this;
_this.connectable = connectable;
return _this;
}
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;
}
var connection = this.connection;
var sharedConnection = connectable._connection;
this.connection = null;
if (sharedConnection && (!connection || sharedConnection === connection)) {
sharedConnection.unsubscribe();
}
};
return RefCountSubscriber;
}(Subscriber_1.Subscriber));
//# sourceMappingURL=ConnectableObservable.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"ConnectableObservable.js","sources":["../../src/internal/observable/ConnectableObservable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAAwD;AAExD,4CAA2C;AAC3C,4CAA2C;AAC3C,gDAA+C;AAE/C,kDAAwE;AAKxE;IAA8C,yCAAa;IAQzD,+BAAmB,MAAqB,EAClB,cAAgC;QADtD,YAEE,iBAAO,SACR;QAHkB,YAAM,GAAN,MAAM,CAAe;QAClB,oBAAc,GAAd,cAAc,CAAkB;QAN5C,eAAS,GAAW,CAAC,CAAC;QAGhC,iBAAW,GAAG,KAAK,CAAC;;IAKpB,CAAC;IAGD,0CAAU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YAChB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;YACvB,OAAO;SACR;QAyBO,IAAA,4BAAU,CAAU;QAC5B,IAAM,gBAAgB,GAAU,WAAY,CAAC,WAAW,CAAC;QACzD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QAEvB,IAAI,gBAAgB,IAAI,CAAC,CAAC,UAAU,IAAI,gBAAgB,KAAK,UAAU,CAAC,EAAE;YACxE,gBAAgB,CAAC,WAAW,EAAE,CAAC;SAChC;IACH,CAAC;IACH,yBAAC;AAAD,CAAC,AA7DD,CAAoC,uBAAU,GA6D7C"}

View File

@ -0,0 +1,25 @@
import { SchedulerLike, SchedulerAction } from '../types';
import { Subscriber } from '../Subscriber';
import { Subscription } from '../Subscription';
import { Observable } from '../Observable';
export interface DispatchArg<T> {
source: Observable<T>;
subscriber: Subscriber<T>;
}
/**
* We need this JSDoc comment for affecting ESDoc.
* @extends {Ignored}
* @hide true
*/
export declare class SubscribeOnObservable<T> extends Observable<T> {
source: Observable<T>;
private delayTime;
private scheduler;
/** @nocollapse */
static create<T>(source: Observable<T>, delay?: number, scheduler?: SchedulerLike): Observable<T>;
/** @nocollapse */
static dispatch<T>(this: SchedulerAction<T>, arg: DispatchArg<T>): Subscription;
constructor(source: Observable<T>, delayTime?: number, scheduler?: SchedulerLike);
/** @deprecated This is an internal implementation detail, do not use. */
_subscribe(subscriber: Subscriber<T>): Subscription;
}

View File

@ -0,0 +1,56 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("../Observable");
var asap_1 = require("../scheduler/asap");
var isNumeric_1 = require("../util/isNumeric");
var SubscribeOnObservable = (function (_super) {
__extends(SubscribeOnObservable, _super);
function SubscribeOnObservable(source, delayTime, scheduler) {
if (delayTime === void 0) { delayTime = 0; }
if (scheduler === void 0) { scheduler = asap_1.asap; }
var _this = _super.call(this) || this;
_this.source = source;
_this.delayTime = delayTime;
_this.scheduler = scheduler;
if (!isNumeric_1.isNumeric(delayTime) || delayTime < 0) {
_this.delayTime = 0;
}
if (!scheduler || typeof scheduler.schedule !== 'function') {
_this.scheduler = asap_1.asap;
}
return _this;
}
SubscribeOnObservable.create = function (source, delay, scheduler) {
if (delay === void 0) { delay = 0; }
if (scheduler === void 0) { scheduler = asap_1.asap; }
return new SubscribeOnObservable(source, delay, scheduler);
};
SubscribeOnObservable.dispatch = function (arg) {
var source = arg.source, subscriber = arg.subscriber;
return this.add(source.subscribe(subscriber));
};
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_1.Observable));
exports.SubscribeOnObservable = SubscribeOnObservable;
//# sourceMappingURL=SubscribeOnObservable.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"SubscribeOnObservable.js","sources":["../../src/internal/observable/SubscribeOnObservable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAGA,4CAA2C;AAC3C,0CAAyC;AACzC,+CAA8C;AAY9C;IAA8C,yCAAa;IAYzD,+BAAmB,MAAqB,EACpB,SAAqB,EACrB,SAA+B;QAD/B,0BAAA,EAAA,aAAqB;QACrB,0BAAA,EAAA,YAA2B,WAAI;QAFnD,YAGE,iBAAO,SAOR;QAVkB,YAAM,GAAN,MAAM,CAAe;QACpB,eAAS,GAAT,SAAS,CAAY;QACrB,eAAS,GAAT,SAAS,CAAsB;QAEjD,IAAI,CAAC,qBAAS,CAAC,SAAS,CAAC,IAAI,SAAS,GAAG,CAAC,EAAE;YAC1C,KAAI,CAAC,SAAS,GAAG,CAAC,CAAC;SACpB;QACD,IAAI,CAAC,SAAS,IAAI,OAAO,SAAS,CAAC,QAAQ,KAAK,UAAU,EAAE;YAC1D,KAAI,CAAC,SAAS,GAAG,WAAI,CAAC;SACvB;;IACH,CAAC;IApBM,4BAAM,GAAb,UAAiB,MAAqB,EAAE,KAAiB,EAAE,SAA+B;QAAlD,sBAAA,EAAA,SAAiB;QAAE,0BAAA,EAAA,YAA2B,WAAI;QACxF,OAAO,IAAI,qBAAqB,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAC7D,CAAC;IAGM,8BAAQ,GAAf,UAA6C,GAAmB;QACtD,IAAA,mBAAM,EAAE,2BAAU,CAAS;QACnC,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IAChD,CAAC;IAeD,0CAAU,GAAV,UAAW,UAAyB;QAClC,IAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC;QAC7B,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAEjC,OAAO,SAAS,CAAC,QAAQ,CAAmB,qBAAqB,CAAC,QAAQ,EAAE,KAAK,EAAE;YACjF,MAAM,QAAA,EAAE,UAAU,YAAA;SACnB,CAAC,CAAC;IACL,CAAC;IACH,4BAAC;AAAD,CAAC,AAlCD,CAA8C,uBAAU,GAkCvD;AAlCY,sDAAqB"}

View File

@ -0,0 +1,37 @@
import { SchedulerLike } from '../types';
import { Observable } from '../Observable';
/** @deprecated resultSelector is no longer supported, use a mapping function. */
export declare function bindCallback(callbackFunc: Function, resultSelector: Function, scheduler?: SchedulerLike): (...args: any[]) => Observable<any>;
export declare function bindCallback<R1, R2, R3, R4>(callbackFunc: (callback: (res1: R1, res2: R2, res3: R3, res4: R4, ...args: any[]) => any) => any, scheduler?: SchedulerLike): () => Observable<any[]>;
export declare function bindCallback<R1, R2, R3>(callbackFunc: (callback: (res1: R1, res2: R2, res3: R3) => any) => any, scheduler?: SchedulerLike): () => Observable<[R1, R2, R3]>;
export declare function bindCallback<R1, R2>(callbackFunc: (callback: (res1: R1, res2: R2) => any) => any, scheduler?: SchedulerLike): () => Observable<[R1, R2]>;
export declare function bindCallback<R1>(callbackFunc: (callback: (res1: R1) => any) => any, scheduler?: SchedulerLike): () => Observable<R1>;
export declare function bindCallback(callbackFunc: (callback: () => any) => any, scheduler?: SchedulerLike): () => Observable<void>;
export declare function bindCallback<A1, R1, R2, R3, R4>(callbackFunc: (arg1: A1, callback: (res1: R1, res2: R2, res3: R3, res4: R4, ...args: any[]) => any) => any, scheduler?: SchedulerLike): (arg1: A1) => Observable<any[]>;
export declare function bindCallback<A1, R1, R2, R3>(callbackFunc: (arg1: A1, callback: (res1: R1, res2: R2, res3: R3) => any) => any, scheduler?: SchedulerLike): (arg1: A1) => Observable<[R1, R2, R3]>;
export declare function bindCallback<A1, R1, R2>(callbackFunc: (arg1: A1, callback: (res1: R1, res2: R2) => any) => any, scheduler?: SchedulerLike): (arg1: A1) => Observable<[R1, R2]>;
export declare function bindCallback<A1, R1>(callbackFunc: (arg1: A1, callback: (res1: R1) => any) => any, scheduler?: SchedulerLike): (arg1: A1) => Observable<R1>;
export declare function bindCallback<A1>(callbackFunc: (arg1: A1, callback: () => any) => any, scheduler?: SchedulerLike): (arg1: A1) => Observable<void>;
export declare function bindCallback<A1, A2, R1, R2, R3, R4>(callbackFunc: (arg1: A1, arg2: A2, callback: (res1: R1, res2: R2, res3: R3, res4: R4, ...args: any[]) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2) => Observable<any[]>;
export declare function bindCallback<A1, A2, R1, R2, R3>(callbackFunc: (arg1: A1, arg2: A2, callback: (res1: R1, res2: R2, res3: R3) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2) => Observable<[R1, R2, R3]>;
export declare function bindCallback<A1, A2, R1, R2>(callbackFunc: (arg1: A1, arg2: A2, callback: (res1: R1, res2: R2) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2) => Observable<[R1, R2]>;
export declare function bindCallback<A1, A2, R1>(callbackFunc: (arg1: A1, arg2: A2, callback: (res1: R1) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2) => Observable<R1>;
export declare function bindCallback<A1, A2>(callbackFunc: (arg1: A1, arg2: A2, callback: () => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2) => Observable<void>;
export declare function bindCallback<A1, A2, A3, R1, R2, R3, R4>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, callback: (res1: R1, res2: R2, res3: R3, res4: R4, ...args: any[]) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3) => Observable<any[]>;
export declare function bindCallback<A1, A2, A3, R1, R2, R3>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, callback: (res1: R1, res2: R2, res3: R3) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3) => Observable<[R1, R2, R3]>;
export declare function bindCallback<A1, A2, A3, R1, R2>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, callback: (res1: R1, res2: R2) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3) => Observable<[R1, R2]>;
export declare function bindCallback<A1, A2, A3, R1>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, callback: (res1: R1) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3) => Observable<R1>;
export declare function bindCallback<A1, A2, A3>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, callback: () => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3) => Observable<void>;
export declare function bindCallback<A1, A2, A3, A4, R1, R2, R3, R4>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: (res1: R1, res2: R2, res3: R3, res4: R4, ...args: any[]) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Observable<any[]>;
export declare function bindCallback<A1, A2, A3, A4, R1, R2, R3>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: (res1: R1, res2: R2, res3: R3) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Observable<[R1, R2, R3]>;
export declare function bindCallback<A1, A2, A3, A4, R1, R2>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: (res1: R1, res2: R2) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Observable<[R1, R2]>;
export declare function bindCallback<A1, A2, A3, A4, R1>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: (res1: R1) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Observable<R1>;
export declare function bindCallback<A1, A2, A3, A4>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: () => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Observable<void>;
export declare function bindCallback<A1, A2, A3, A4, A5, R1, R2, R3, R4>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: (res1: R1, res2: R2, res3: R3, res4: R4, ...args: any[]) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Observable<any[]>;
export declare function bindCallback<A1, A2, A3, A4, A5, R1, R2, R3>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: (res1: R1, res2: R2, res3: R3) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Observable<[R1, R2, R3]>;
export declare function bindCallback<A1, A2, A3, A4, A5, R1, R2>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: (res1: R1, res2: R2) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Observable<[R1, R2]>;
export declare function bindCallback<A1, A2, A3, A4, A5, R1>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: (res1: R1) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Observable<R1>;
export declare function bindCallback<A1, A2, A3, A4, A5>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: () => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Observable<void>;
export declare function bindCallback<A, R>(callbackFunc: (...args: Array<A | ((result: R) => any)>) => any, scheduler?: SchedulerLike): (...args: A[]) => Observable<R>;
export declare function bindCallback<A, R>(callbackFunc: (...args: Array<A | ((...results: R[]) => any)>) => any, scheduler?: SchedulerLike): (...args: A[]) => Observable<R[]>;
export declare function bindCallback(callbackFunc: Function, scheduler?: SchedulerLike): (...args: any[]) => Observable<any>;

107
node_modules/rxjs/internal/observable/bindCallback.js generated vendored Normal file
View File

@ -0,0 +1,107 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("../Observable");
var AsyncSubject_1 = require("../AsyncSubject");
var map_1 = require("../operators/map");
var canReportError_1 = require("../util/canReportError");
var isArray_1 = require("../util/isArray");
var isScheduler_1 = require("../util/isScheduler");
function bindCallback(callbackFunc, resultSelector, scheduler) {
if (resultSelector) {
if (isScheduler_1.isScheduler(resultSelector)) {
scheduler = resultSelector;
}
else {
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return bindCallback(callbackFunc, scheduler).apply(void 0, args).pipe(map_1.map(function (args) { return isArray_1.isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
};
}
}
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var context = this;
var subject;
var params = {
context: context,
subject: subject,
callbackFunc: callbackFunc,
scheduler: scheduler,
};
return new Observable_1.Observable(function (subscriber) {
if (!scheduler) {
if (!subject) {
subject = new AsyncSubject_1.AsyncSubject();
var handler = function () {
var innerArgs = [];
for (var _i = 0; _i < arguments.length; _i++) {
innerArgs[_i] = arguments[_i];
}
subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
subject.complete();
};
try {
callbackFunc.apply(context, args.concat([handler]));
}
catch (err) {
if (canReportError_1.canReportError(subject)) {
subject.error(err);
}
else {
console.warn(err);
}
}
}
return subject.subscribe(subscriber);
}
else {
var state = {
args: args, subscriber: subscriber, params: params,
};
return scheduler.schedule(dispatch, 0, state);
}
});
};
}
exports.bindCallback = bindCallback;
function dispatch(state) {
var _this = this;
var self = this;
var args = state.args, subscriber = state.subscriber, params = state.params;
var callbackFunc = params.callbackFunc, context = params.context, scheduler = params.scheduler;
var subject = params.subject;
if (!subject) {
subject = params.subject = new AsyncSubject_1.AsyncSubject();
var handler = function () {
var innerArgs = [];
for (var _i = 0; _i < arguments.length; _i++) {
innerArgs[_i] = arguments[_i];
}
var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
_this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
};
try {
callbackFunc.apply(context, args.concat([handler]));
}
catch (err) {
subject.error(err);
}
}
this.add(subject.subscribe(subscriber));
}
function dispatchNext(state) {
var value = state.value, subject = state.subject;
subject.next(value);
subject.complete();
}
function dispatchError(state) {
var err = state.err, subject = state.subject;
subject.error(err);
}
//# sourceMappingURL=bindCallback.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"bindCallback.js","sources":["../../src/internal/observable/bindCallback.ts"],"names":[],"mappings":";;AACA,4CAA2C;AAC3C,gDAA+C;AAE/C,wCAAuC;AACvC,yD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AAe,YAAY,EAAE,CAAC,EAAE,EAAE,KAAK,OAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC,CAAC;QAClF,CAAC,CAAC;QAEF,IAAI;YACF,YAAY,CAAC,KAAK,CAAC,OAAO,EAAM,IAAI,SAAE,OAAO,GAAE,CAAC;SACjD;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACpB;KACF;IAED,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;AAC1C,CAAC;AAOD,SAAS,YAAY,CAAyC,KAAmB;IACvE,IAAA,mBAAK,EAAE,uBAAO,CAAW;IACjC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpB,OAAO,CAAC,QAAQ,EAAE,CAAC;AACrB,CAAC;AAOD,SAAS,aAAa,CAA0C,KAAoB;IAC1E,IAAA,eAAG,EAAE,uBAAO,CAAW;IAC/B,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC"}

View File

@ -0,0 +1,35 @@
import { Observable } from '../Observable';
import { SchedulerLike } from '../types';
/** @deprecated resultSelector is deprecated, pipe to map instead */
export declare function bindNodeCallback(callbackFunc: Function, resultSelector: Function, scheduler?: SchedulerLike): (...args: any[]) => Observable<any>;
export declare function bindNodeCallback<R1, R2, R3, R4>(callbackFunc: (callback: (err: any, res1: R1, res2: R2, res3: R3, res4: R4, ...args: any[]) => any) => any, scheduler?: SchedulerLike): (...args: any[]) => Observable<any[]>;
export declare function bindNodeCallback<R1, R2, R3>(callbackFunc: (callback: (err: any, res1: R1, res2: R2, res3: R3) => any) => any, scheduler?: SchedulerLike): () => Observable<[R1, R2, R3]>;
export declare function bindNodeCallback<R1, R2>(callbackFunc: (callback: (err: any, res1: R1, res2: R2) => any) => any, scheduler?: SchedulerLike): () => Observable<[R1, R2]>;
export declare function bindNodeCallback<R1>(callbackFunc: (callback: (err: any, res1: R1) => any) => any, scheduler?: SchedulerLike): () => Observable<R1>;
export declare function bindNodeCallback(callbackFunc: (callback: (err: any) => any) => any, scheduler?: SchedulerLike): () => Observable<void>;
export declare function bindNodeCallback<A1, R1, R2, R3, R4>(callbackFunc: (arg1: A1, callback: (err: any, res1: R1, res2: R2, res3: R3, res4: R4, ...args: any[]) => any) => any, scheduler?: SchedulerLike): (...args: any[]) => Observable<any[]>;
export declare function bindNodeCallback<A1, R1, R2, R3>(callbackFunc: (arg1: A1, callback: (err: any, res1: R1, res2: R2, res3: R3) => any) => any, scheduler?: SchedulerLike): (arg1: A1) => Observable<[R1, R2, R3]>;
export declare function bindNodeCallback<A1, R1, R2>(callbackFunc: (arg1: A1, callback: (err: any, res1: R1, res2: R2) => any) => any, scheduler?: SchedulerLike): (arg1: A1) => Observable<[R1, R2]>;
export declare function bindNodeCallback<A1, R1>(callbackFunc: (arg1: A1, callback: (err: any, res1: R1) => any) => any, scheduler?: SchedulerLike): (arg1: A1) => Observable<R1>;
export declare function bindNodeCallback<A1>(callbackFunc: (arg1: A1, callback: (err: any) => any) => any, scheduler?: SchedulerLike): (arg1: A1) => Observable<void>;
export declare function bindNodeCallback<A1, A2, R1, R2, R3, R4>(callbackFunc: (arg1: A1, arg2: A2, callback: (err: any, res1: R1, res2: R2, res3: R3, res4: R4, ...args: any[]) => any) => any, scheduler?: SchedulerLike): (...args: any[]) => Observable<any[]>;
export declare function bindNodeCallback<A1, A2, R1, R2, R3>(callbackFunc: (arg1: A1, arg2: A2, callback: (err: any, res1: R1, res2: R2, res3: R3) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2) => Observable<[R1, R2, R3]>;
export declare function bindNodeCallback<A1, A2, R1, R2>(callbackFunc: (arg1: A1, arg2: A2, callback: (err: any, res1: R1, res2: R2) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2) => Observable<[R1, R2]>;
export declare function bindNodeCallback<A1, A2, R1>(callbackFunc: (arg1: A1, arg2: A2, callback: (err: any, res1: R1) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2) => Observable<R1>;
export declare function bindNodeCallback<A1, A2>(callbackFunc: (arg1: A1, arg2: A2, callback: (err: any) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2) => Observable<void>;
export declare function bindNodeCallback<A1, A2, A3, R1, R2, R3, R4>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, callback: (err: any, res1: R1, res2: R2, res3: R3, res4: R4, ...args: any[]) => any) => any, scheduler?: SchedulerLike): (...args: any[]) => Observable<any[]>;
export declare function bindNodeCallback<A1, A2, A3, R1, R2, R3>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, callback: (err: any, res1: R1, res2: R2, res3: R3) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3) => Observable<[R1, R2, R3]>;
export declare function bindNodeCallback<A1, A2, A3, R1, R2>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, callback: (err: any, res1: R1, res2: R2) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3) => Observable<[R1, R2]>;
export declare function bindNodeCallback<A1, A2, A3, R1>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, callback: (err: any, res1: R1) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3) => Observable<R1>;
export declare function bindNodeCallback<A1, A2, A3>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, callback: (err: any) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3) => Observable<void>;
export declare function bindNodeCallback<A1, A2, A3, A4, R1, R2, R3, R4>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: (err: any, res1: R1, res2: R2, res3: R3, res4: R4, ...args: any[]) => any) => any, scheduler?: SchedulerLike): (...args: any[]) => Observable<any[]>;
export declare function bindNodeCallback<A1, A2, A3, A4, R1, R2, R3>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: (err: any, res1: R1, res2: R2, res3: R3) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Observable<[R1, R2, R3]>;
export declare function bindNodeCallback<A1, A2, A3, A4, R1, R2>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: (err: any, res1: R1, res2: R2) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Observable<[R1, R2]>;
export declare function bindNodeCallback<A1, A2, A3, A4, R1>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: (err: any, res1: R1) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Observable<R1>;
export declare function bindNodeCallback<A1, A2, A3, A4>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: (err: any) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Observable<void>;
export declare function bindNodeCallback<A1, A2, A3, A4, A5, R1, R2, R3, R4>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: (err: any, res1: R1, res2: R2, res3: R3, res4: R4, ...args: any[]) => any) => any, scheduler?: SchedulerLike): (...args: any[]) => Observable<any[]>;
export declare function bindNodeCallback<A1, A2, A3, A4, A5, R1, R2, R3>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: (err: any, res1: R1, res2: R2, res3: R3) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Observable<[R1, R2, R3]>;
export declare function bindNodeCallback<A1, A2, A3, A4, A5, R1, R2>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: (err: any, res1: R1, res2: R2) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Observable<[R1, R2]>;
export declare function bindNodeCallback<A1, A2, A3, A4, A5, R1>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: (err: any, res1: R1) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Observable<R1>;
export declare function bindNodeCallback<A1, A2, A3, A4, A5>(callbackFunc: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: (err: any) => any) => any, scheduler?: SchedulerLike): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Observable<void>;
export declare function bindNodeCallback(callbackFunc: Function, scheduler?: SchedulerLike): (...args: any[]) => Observable<any[]>;

View File

@ -0,0 +1,115 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("../Observable");
var AsyncSubject_1 = require("../AsyncSubject");
var map_1 = require("../operators/map");
var canReportError_1 = require("../util/canReportError");
var isScheduler_1 = require("../util/isScheduler");
var isArray_1 = require("../util/isArray");
function bindNodeCallback(callbackFunc, resultSelector, scheduler) {
if (resultSelector) {
if (isScheduler_1.isScheduler(resultSelector)) {
scheduler = resultSelector;
}
else {
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return bindNodeCallback(callbackFunc, scheduler).apply(void 0, args).pipe(map_1.map(function (args) { return isArray_1.isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
};
}
}
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var params = {
subject: undefined,
args: args,
callbackFunc: callbackFunc,
scheduler: scheduler,
context: this,
};
return new Observable_1.Observable(function (subscriber) {
var context = params.context;
var subject = params.subject;
if (!scheduler) {
if (!subject) {
subject = params.subject = new AsyncSubject_1.AsyncSubject();
var handler = function () {
var innerArgs = [];
for (var _i = 0; _i < arguments.length; _i++) {
innerArgs[_i] = arguments[_i];
}
var err = innerArgs.shift();
if (err) {
subject.error(err);
return;
}
subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
subject.complete();
};
try {
callbackFunc.apply(context, args.concat([handler]));
}
catch (err) {
if (canReportError_1.canReportError(subject)) {
subject.error(err);
}
else {
console.warn(err);
}
}
}
return subject.subscribe(subscriber);
}
else {
return scheduler.schedule(dispatch, 0, { params: params, subscriber: subscriber, context: context });
}
});
};
}
exports.bindNodeCallback = bindNodeCallback;
function dispatch(state) {
var _this = this;
var params = state.params, subscriber = state.subscriber, context = state.context;
var callbackFunc = params.callbackFunc, args = params.args, scheduler = params.scheduler;
var subject = params.subject;
if (!subject) {
subject = params.subject = new AsyncSubject_1.AsyncSubject();
var handler = function () {
var innerArgs = [];
for (var _i = 0; _i < arguments.length; _i++) {
innerArgs[_i] = arguments[_i];
}
var err = innerArgs.shift();
if (err) {
_this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
}
else {
var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
_this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
}
};
try {
callbackFunc.apply(context, args.concat([handler]));
}
catch (err) {
this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
}
}
this.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=bindNodeCallback.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"bindNodeCallback.js","sources":["../../src/internal/observable/bindNodeCallback.ts"],"names":[],"mappings":";;AAAA,4CAA2C;AAC3C,gDAA+C;AAG/C,wCAAuC;AACvC,yDAAwD;AACxD,mDAAkD;AAClD,2CAA0C;AAoJ1C,SAAgB,gBAAgB,CAC9B,YAAsB,EACtB,cAAsC,EACtC,SAAyB;IAGzB,IAAI,cAAc,EAAE;QAClB,IAAI,yBAAW,CAAC,cAAc,CAAC,EAAE;YAC/B,SAAS,G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C,CAAC;aACvF;iBAAM;gBACL,IAAM,KAAK,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;gBAC/D,KAAI,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAqB,YAAY,EAAE,CAAC,EAAE,EAAE,KAAK,OAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC,CAAC;aACvF;QACH,CAAC,CAAC;QAEF,IAAI;YACF,YAAY,CAAC,KAAK,CAAC,OAAO,EAAM,IAAI,SAAE,OAAO,GAAE,CAAC;SACjD;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAsB,aAAa,EAAE,CAAC,EAAE,EAAE,GAAG,KAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC,CAAC;SACvF;KACF;IAED,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;AAC1C,CAAC;AAOD,SAAS,YAAY,CAAI,GAAuB;IACtC,IAAA,iBAAK,EAAE,qBAAO,CAAS;IAC/B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpB,OAAO,CAAC,QAAQ,EAAE,CAAC;AACrB,CAAC;AAOD,SAAS,aAAa,CAAI,GAAwB;IACxC,IAAA,aAAG,EAAE,qBAAO,CAAS;IAC7B,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC"}

View File

@ -0,0 +1,100 @@
import { Observable } from '../Observable';
import { ObservableInput, SchedulerLike, ObservedValueOf } from '../types';
import { Subscriber } from '../Subscriber';
import { OuterSubscriber } from '../OuterSubscriber';
import { Operator } from '../Operator';
import { InnerSubscriber } from '../InnerSubscriber';
/** @deprecated resultSelector no longer supported, pipe to map instead */
export declare function combineLatest<O1 extends ObservableInput<any>, R>(sources: [O1], resultSelector: (v1: ObservedValueOf<O1>) => R, scheduler?: SchedulerLike): Observable<R>;
/** @deprecated resultSelector no longer supported, pipe to map instead */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, R>(sources: [O1, O2], resultSelector: (v1: ObservedValueOf<O1>, v2: ObservedValueOf<O2>) => R, scheduler?: SchedulerLike): Observable<R>;
/** @deprecated resultSelector no longer supported, pipe to map instead */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, R>(sources: [O1, O2, O3], resultSelector: (v1: ObservedValueOf<O1>, v2: ObservedValueOf<O2>, v3: ObservedValueOf<O3>) => R, scheduler?: SchedulerLike): Observable<R>;
/** @deprecated resultSelector no longer supported, pipe to map instead */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>, R>(sources: [O1, O2, O3, O4], resultSelector: (v1: ObservedValueOf<O1>, v2: ObservedValueOf<O2>, v3: ObservedValueOf<O3>, v4: ObservedValueOf<O4>) => R, scheduler?: SchedulerLike): Observable<R>;
/** @deprecated resultSelector no longer supported, pipe to map instead */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>, O5 extends ObservableInput<any>, R>(sources: [O1, O2, O3, O4, O5], resultSelector: (v1: ObservedValueOf<O1>, v2: ObservedValueOf<O2>, v3: ObservedValueOf<O3>, v4: ObservedValueOf<O4>, v5: ObservedValueOf<O5>) => R, scheduler?: SchedulerLike): Observable<R>;
/** @deprecated resultSelector no longer supported, pipe to map instead */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>, O5 extends ObservableInput<any>, O6 extends ObservableInput<any>, R>(sources: [O1, O2, O3, O4, O5, O6], resultSelector: (v1: ObservedValueOf<O1>, v2: ObservedValueOf<O2>, v3: ObservedValueOf<O3>, v4: ObservedValueOf<O4>, v5: ObservedValueOf<O5>, v6: ObservedValueOf<O6>) => R, scheduler?: SchedulerLike): Observable<R>;
/** @deprecated resultSelector no longer supported, pipe to map instead */
export declare function combineLatest<O extends ObservableInput<any>, R>(sources: O[], resultSelector: (...args: ObservedValueOf<O>[]) => R, scheduler?: SchedulerLike): Observable<R>;
/** @deprecated resultSelector no longer supported, pipe to map instead */
export declare function combineLatest<O1 extends ObservableInput<any>, R>(v1: O1, resultSelector: (v1: ObservedValueOf<O1>) => R, scheduler?: SchedulerLike): Observable<R>;
/** @deprecated resultSelector no longer supported, pipe to map instead */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, R>(v1: O1, v2: O2, resultSelector: (v1: ObservedValueOf<O1>, v2: ObservedValueOf<O2>) => R, scheduler?: SchedulerLike): Observable<R>;
/** @deprecated resultSelector no longer supported, pipe to map instead */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, R>(v1: O1, v2: O2, v3: O3, resultSelector: (v1: ObservedValueOf<O1>, v2: ObservedValueOf<O2>, v3: ObservedValueOf<O3>) => R, scheduler?: SchedulerLike): Observable<R>;
/** @deprecated resultSelector no longer supported, pipe to map instead */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>, R>(v1: O1, v2: O2, v3: O3, v4: O4, resultSelector: (v1: ObservedValueOf<O1>, v2: ObservedValueOf<O2>, v3: ObservedValueOf<O3>, v4: ObservedValueOf<O4>) => R, scheduler?: SchedulerLike): Observable<R>;
/** @deprecated resultSelector no longer supported, pipe to map instead */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>, O5 extends ObservableInput<any>, R>(v1: O1, v2: O2, v3: O3, v4: O4, v5: O5, resultSelector: (v1: ObservedValueOf<O1>, v2: ObservedValueOf<O2>, v3: ObservedValueOf<O3>, v4: ObservedValueOf<O4>, v5: ObservedValueOf<O5>) => R, scheduler?: SchedulerLike): Observable<R>;
/** @deprecated resultSelector no longer supported, pipe to map instead */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>, O5 extends ObservableInput<any>, O6 extends ObservableInput<any>, R>(v1: O1, v2: O2, v3: O3, v4: O4, v5: O5, v6: O6, resultSelector: (v1: ObservedValueOf<O1>, v2: ObservedValueOf<O2>, v3: ObservedValueOf<O3>, v4: ObservedValueOf<O4>, v5: ObservedValueOf<O5>, v6: ObservedValueOf<O6>) => R, scheduler?: SchedulerLike): Observable<R>;
/** @deprecated Passing a scheduler here is deprecated, use {@link subscribeOn} and/or {@link observeOn} instead */
export declare function combineLatest<O1 extends ObservableInput<any>>(sources: [O1], scheduler: SchedulerLike): Observable<[ObservedValueOf<O1>]>;
/** @deprecated Passing a scheduler here is deprecated, use {@link subscribeOn} and/or {@link observeOn} instead */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>>(sources: [O1, O2], scheduler: SchedulerLike): Observable<[ObservedValueOf<O1>, ObservedValueOf<O2>]>;
/** @deprecated Passing a scheduler here is deprecated, use {@link subscribeOn} and/or {@link observeOn} instead */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>>(sources: [O1, O2, O3], scheduler: SchedulerLike): Observable<[ObservedValueOf<O1>, ObservedValueOf<O2>, ObservedValueOf<O3>]>;
/** @deprecated Passing a scheduler here is deprecated, use {@link subscribeOn} and/or {@link observeOn} instead */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>>(sources: [O1, O2, O3, O4], scheduler: SchedulerLike): Observable<[ObservedValueOf<O1>, ObservedValueOf<O2>, ObservedValueOf<O3>, ObservedValueOf<O4>]>;
/** @deprecated Passing a scheduler here is deprecated, use {@link subscribeOn} and/or {@link observeOn} instead */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>, O5 extends ObservableInput<any>>(sources: [O1, O2, O3, O4, O5], scheduler: SchedulerLike): Observable<[ObservedValueOf<O1>, ObservedValueOf<O2>, ObservedValueOf<O3>, ObservedValueOf<O4>, ObservedValueOf<O5>]>;
/** @deprecated Passing a scheduler here is deprecated, use {@link subscribeOn} and/or {@link observeOn} instead */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>, O5 extends ObservableInput<any>, O6 extends ObservableInput<any>>(sources: [O1, O2, O3, O4, O5, O6], scheduler: SchedulerLike): Observable<[ObservedValueOf<O1>, ObservedValueOf<O2>, ObservedValueOf<O3>, ObservedValueOf<O4>, ObservedValueOf<O5>, ObservedValueOf<O6>]>;
/** @deprecated Passing a scheduler here is deprecated, use {@link subscribeOn} and/or {@link observeOn} instead */
export declare function combineLatest<O extends ObservableInput<any>>(sources: O[], scheduler: SchedulerLike): Observable<ObservedValueOf<O>[]>;
export declare function combineLatest<O1 extends ObservableInput<any>>(sources: [O1]): Observable<[ObservedValueOf<O1>]>;
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>>(sources: [O1, O2]): Observable<[ObservedValueOf<O1>, ObservedValueOf<O2>]>;
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>>(sources: [O1, O2, O3]): Observable<[ObservedValueOf<O1>, ObservedValueOf<O2>, ObservedValueOf<O3>]>;
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>>(sources: [O1, O2, O3, O4]): Observable<[ObservedValueOf<O1>, ObservedValueOf<O2>, ObservedValueOf<O3>, ObservedValueOf<O4>]>;
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>, O5 extends ObservableInput<any>>(sources: [O1, O2, O3, O4, O5]): Observable<[ObservedValueOf<O1>, ObservedValueOf<O2>, ObservedValueOf<O3>, ObservedValueOf<O4>, ObservedValueOf<O5>]>;
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>, O5 extends ObservableInput<any>, O6 extends ObservableInput<any>>(sources: [O1, O2, O3, O4, O5, O6]): Observable<[ObservedValueOf<O1>, ObservedValueOf<O2>, ObservedValueOf<O3>, ObservedValueOf<O4>, ObservedValueOf<O5>, ObservedValueOf<O6>]>;
export declare function combineLatest<O extends ObservableInput<any>>(sources: O[]): Observable<ObservedValueOf<O>[]>;
/** @deprecated Pass arguments in a single array instead `combineLatest([a, b, c])` */
export declare function combineLatest<O1 extends ObservableInput<any>>(v1: O1, scheduler?: SchedulerLike): Observable<[ObservedValueOf<O1>]>;
/** @deprecated Pass arguments in a single array instead `combineLatest([a, b, c])` */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>>(v1: O1, v2: O2, scheduler?: SchedulerLike): Observable<[ObservedValueOf<O1>, ObservedValueOf<O2>]>;
/** @deprecated Pass arguments in a single array instead `combineLatest([a, b, c])` */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>>(v1: O1, v2: O2, v3: O3, scheduler?: SchedulerLike): Observable<[ObservedValueOf<O1>, ObservedValueOf<O2>, ObservedValueOf<O3>]>;
/** @deprecated Pass arguments in a single array instead `combineLatest([a, b, c])` */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>>(v1: O1, v2: O2, v3: O3, v4: O4, scheduler?: SchedulerLike): Observable<[ObservedValueOf<O1>, ObservedValueOf<O2>, ObservedValueOf<O3>, ObservedValueOf<O4>]>;
/** @deprecated Pass arguments in a single array instead `combineLatest([a, b, c])` */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>, O5 extends ObservableInput<any>>(v1: O1, v2: O2, v3: O3, v4: O4, v5: O5, scheduler?: SchedulerLike): Observable<[ObservedValueOf<O1>, ObservedValueOf<O2>, ObservedValueOf<O3>, ObservedValueOf<O4>, ObservedValueOf<O5>]>;
/** @deprecated Pass arguments in a single array instead `combineLatest([a, b, c])` */
export declare function combineLatest<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>, O5 extends ObservableInput<any>, O6 extends ObservableInput<any>>(v1: O1, v2: O2, v3: O3, v4: O4, v5: O5, v6: O6, scheduler?: SchedulerLike): Observable<[ObservedValueOf<O1>, ObservedValueOf<O2>, ObservedValueOf<O3>, ObservedValueOf<O4>, ObservedValueOf<O5>, ObservedValueOf<O6>]>;
/** @deprecated Pass arguments in a single array instead `combineLatest([a, b, c])` */
export declare function combineLatest<O extends ObservableInput<any>>(...observables: O[]): Observable<any[]>;
/** @deprecated Pass arguments in a single array instead `combineLatest([a, b, c])` */
export declare function combineLatest<O extends ObservableInput<any>, R>(...observables: Array<ObservableInput<any> | ((...values: Array<any>) => R)>): Observable<R>;
/** @deprecated resultSelector no longer supported, pipe to map instead */
export declare function combineLatest<O extends ObservableInput<any>, R>(array: O[], resultSelector: (...values: ObservedValueOf<O>[]) => R, scheduler?: SchedulerLike): Observable<R>;
/** @deprecated Passing a scheduler here is deprecated, use {@link subscribeOn} and/or {@link observeOn} instead */
export declare function combineLatest<O extends ObservableInput<any>>(...observables: Array<O | SchedulerLike>): Observable<any[]>;
/** @deprecated Passing a scheduler here is deprecated, use {@link subscribeOn} and/or {@link observeOn} instead */
export declare function combineLatest<O extends ObservableInput<any>, R>(...observables: Array<O | ((...values: ObservedValueOf<O>[]) => R) | SchedulerLike>): Observable<R>;
/** @deprecated Passing a scheduler here is deprecated, use {@link subscribeOn} and/or {@link observeOn} instead */
export declare function combineLatest<R>(...observables: Array<ObservableInput<any> | ((...values: Array<any>) => R) | SchedulerLike>): Observable<R>;
export declare class CombineLatestOperator<T, R> implements Operator<T, R> {
private resultSelector?;
constructor(resultSelector?: (...values: Array<any>) => R);
call(subscriber: Subscriber<R>, source: any): any;
}
/**
* We need this JSDoc comment for affecting ESDoc.
* @ignore
* @extends {Ignored}
*/
export declare class CombineLatestSubscriber<T, R> extends OuterSubscriber<T, R> {
private resultSelector?;
private active;
private values;
private observables;
private toRespond;
constructor(destination: Subscriber<R>, resultSelector?: (...values: Array<any>) => R);
protected _next(observable: any): void;
protected _complete(): void;
notifyComplete(unused: Subscriber<R>): void;
notifyNext(outerValue: T, innerValue: R, outerIndex: number, innerIndex: number, innerSub: InnerSubscriber<T, R>): void;
private _tryResultSelector;
}

115
node_modules/rxjs/internal/observable/combineLatest.js generated vendored Normal file
View File

@ -0,0 +1,115 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var isScheduler_1 = require("../util/isScheduler");
var isArray_1 = require("../util/isArray");
var OuterSubscriber_1 = require("../OuterSubscriber");
var subscribeToResult_1 = require("../util/subscribeToResult");
var fromArray_1 = require("./fromArray");
var NONE = {};
function combineLatest() {
var observables = [];
for (var _i = 0; _i < arguments.length; _i++) {
observables[_i] = arguments[_i];
}
var resultSelector = null;
var scheduler = null;
if (isScheduler_1.isScheduler(observables[observables.length - 1])) {
scheduler = observables.pop();
}
if (typeof observables[observables.length - 1] === 'function') {
resultSelector = observables.pop();
}
if (observables.length === 1 && isArray_1.isArray(observables[0])) {
observables = observables[0];
}
return fromArray_1.fromArray(observables, scheduler).lift(new CombineLatestOperator(resultSelector));
}
exports.combineLatest = combineLatest;
var CombineLatestOperator = (function () {
function CombineLatestOperator(resultSelector) {
this.resultSelector = resultSelector;
}
CombineLatestOperator.prototype.call = function (subscriber, source) {
return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));
};
return CombineLatestOperator;
}());
exports.CombineLatestOperator = CombineLatestOperator;
var CombineLatestSubscriber = (function (_super) {
__extends(CombineLatestSubscriber, _super);
function CombineLatestSubscriber(destination, resultSelector) {
var _this = _super.call(this, destination) || this;
_this.resultSelector = resultSelector;
_this.active = 0;
_this.values = [];
_this.observables = [];
return _this;
}
CombineLatestSubscriber.prototype._next = function (observable) {
this.values.push(NONE);
this.observables.push(observable);
};
CombineLatestSubscriber.prototype._complete = function () {
var observables = this.observables;
var len = observables.length;
if (len === 0) {
this.destination.complete();
}
else {
this.active = len;
this.toRespond = len;
for (var i = 0; i < len; i++) {
var observable = observables[i];
this.add(subscribeToResult_1.subscribeToResult(this, observable, observable, i));
}
}
};
CombineLatestSubscriber.prototype.notifyComplete = function (unused) {
if ((this.active -= 1) === 0) {
this.destination.complete();
}
};
CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
var values = this.values;
var oldVal = values[outerIndex];
var toRespond = !this.toRespond
? 0
: oldVal === NONE ? --this.toRespond : this.toRespond;
values[outerIndex] = innerValue;
if (toRespond === 0) {
if (this.resultSelector) {
this._tryResultSelector(values);
}
else {
this.destination.next(values.slice());
}
}
};
CombineLatestSubscriber.prototype._tryResultSelector = function (values) {
var result;
try {
result = this.resultSelector.apply(this, values);
}
catch (err) {
this.destination.error(err);
return;
}
this.destination.next(result);
};
return CombineLatestSubscriber;
}(OuterSubscriber_1.OuterSubscriber));
exports.CombineLatestSubscriber = CombineLatestSubscriber;
//# sourceMappingURL=combineLatest.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"combineLatest.js","sources":["../../src/internal/observable/combineLatest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,mDAAmD;AACnD,2CAA2C;AAE3C,sDAAqD;AAGrD,+DAA8D;AAC9D,yCAAwC;AAExC,IAAM,IAAI,GAAG,EAAE,CAAC;AAsNhB,SAAgB,aAAa;IAC3B,qBAAgF;SAAhF,UAAgF,EAAhF,qBAAgF,EAAhF,IAAgF;QAAhF,gCAAgF;;IAEhF,IAAI,cAAc,GAAkC,IAAI,CAAC;IACzD,IAAI,SAAS,GAAkB,IAAI,CAAC;IAEpC,IAAI,yBAAW,CAAC,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE;QACpD,SAAS,GAAG,WAAW,CAAC,GAAG,EAAmB,CAAC;KAChD;IAED,IAAI,OAAO,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,UAAU,EAAE;QAC7D,cAAc,GAAG,WAAW,CAAC,GAAG,EAAkC,CAAC;KACpE;IAID,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,iBAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE;QACvD,WAAW,GAAG,WAAW,CAAC,CAAC,CAAQ,CAAC;KACrC;IAED,OAAO,qBAAS,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,qBAAqB,CAAwB,cAAc,CAAC,CAAC,CAAC;AAClH,CAAC;AArBD,sCAqBC;AAED;IACE,+BAAoB,cAA6C;QAA7C,mBAAc,GAAd,cAAc,CAA+B;IACjE,CAAC;IAED,oCAAI,GAAJ,UAAK,UAAyB,EAAE,MAAW;QACzC,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,uBAAuB,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;IACxF,CAAC;IACH,4B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kB,EAAE,UAAkB,EACtC,QAA+B;QACxC,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;QAClC,IAAM,SAAS,GAAG,CAAC,IAAI,CAAC,SAAS;YAC/B,CAAC,CAAC,CAAC;YACH,CAAC,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;QACxD,MAAM,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;QAEhC,IAAI,SAAS,KAAK,CAAC,EAAE;YACnB,IAAI,IAAI,CAAC,cAAc,EAAE;gBACvB,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;aACjC;iBAAM;gBACL,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;aACvC;SACF;IACH,CAAC;IAEO,oDAAkB,GAA1B,UAA2B,MAAa;QACtC,IAAI,MAAW,CAAC;QAChB,IAAI;YACF,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;SAClD;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC5B,OAAO;SACR;QACD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IACH,8BAAC;AAAD,CAAC,AAjED,CAAmD,iCAAe,GAiEjE;AAjEY,0DAAuB"}

26
node_modules/rxjs/internal/observable/concat.d.ts generated vendored Normal file
View File

@ -0,0 +1,26 @@
import { Observable } from '../Observable';
import { ObservableInput, SchedulerLike, ObservedValueOf } from '../types';
/** @deprecated Use {@link scheduled} and {@link concatAll} (e.g. `scheduled([o1, o2, o3], scheduler).pipe(concatAll())`) */
export declare function concat<O1 extends ObservableInput<any>>(v1: O1, scheduler: SchedulerLike): Observable<ObservedValueOf<O1>>;
/** @deprecated Use {@link scheduled} and {@link concatAll} (e.g. `scheduled([o1, o2, o3], scheduler).pipe(concatAll())`) */
export declare function concat<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>>(v1: O1, v2: O2, scheduler: SchedulerLike): Observable<ObservedValueOf<O1> | ObservedValueOf<O2>>;
/** @deprecated Use {@link scheduled} and {@link concatAll} (e.g. `scheduled([o1, o2, o3], scheduler).pipe(concatAll())`) */
export declare function concat<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>>(v1: O1, v2: O2, v3: O3, scheduler: SchedulerLike): Observable<ObservedValueOf<O1> | ObservedValueOf<O2> | ObservedValueOf<O3>>;
/** @deprecated Use {@link scheduled} and {@link concatAll} (e.g. `scheduled([o1, o2, o3], scheduler).pipe(concatAll())`) */
export declare function concat<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>>(v1: O1, v2: O2, v3: O3, v4: O4, scheduler: SchedulerLike): Observable<ObservedValueOf<O1> | ObservedValueOf<O2> | ObservedValueOf<O3> | ObservedValueOf<O4>>;
/** @deprecated Use {@link scheduled} and {@link concatAll} (e.g. `scheduled([o1, o2, o3], scheduler).pipe(concatAll())`) */
export declare function concat<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>, O5 extends ObservableInput<any>>(v1: O1, v2: O2, v3: O3, v4: O4, v5: O5, scheduler: SchedulerLike): Observable<ObservedValueOf<O1> | ObservedValueOf<O2> | ObservedValueOf<O3> | ObservedValueOf<O4> | ObservedValueOf<O5>>;
/** @deprecated Use {@link scheduled} and {@link concatAll} (e.g. `scheduled([o1, o2, o3], scheduler).pipe(concatAll())`) */
export declare function concat<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>, O5 extends ObservableInput<any>, O6 extends ObservableInput<any>>(v1: O1, v2: O2, v3: O3, v4: O4, v5: O5, v6: O6, scheduler: SchedulerLike): Observable<ObservedValueOf<O1> | ObservedValueOf<O2> | ObservedValueOf<O3> | ObservedValueOf<O4> | ObservedValueOf<O5> | ObservedValueOf<O6>>;
export declare function concat<O1 extends ObservableInput<any>>(v1: O1): Observable<ObservedValueOf<O1>>;
export declare function concat<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>>(v1: O1, v2: O2): Observable<ObservedValueOf<O1> | ObservedValueOf<O2>>;
export declare function concat<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>>(v1: O1, v2: O2, v3: O3): Observable<ObservedValueOf<O1> | ObservedValueOf<O2> | ObservedValueOf<O3>>;
export declare function concat<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>>(v1: O1, v2: O2, v3: O3, v4: O4): Observable<ObservedValueOf<O1> | ObservedValueOf<O2> | ObservedValueOf<O3> | ObservedValueOf<O4>>;
export declare function concat<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>, O5 extends ObservableInput<any>>(v1: O1, v2: O2, v3: O3, v4: O4, v5: O5): Observable<ObservedValueOf<O1> | ObservedValueOf<O2> | ObservedValueOf<O3> | ObservedValueOf<O4> | ObservedValueOf<O5>>;
export declare function concat<O1 extends ObservableInput<any>, O2 extends ObservableInput<any>, O3 extends ObservableInput<any>, O4 extends ObservableInput<any>, O5 extends ObservableInput<any>, O6 extends ObservableInput<any>>(v1: O1, v2: O2, v3: O3, v4: O4, v5: O5, v6: O6): Observable<ObservedValueOf<O1> | ObservedValueOf<O2> | ObservedValueOf<O3> | ObservedValueOf<O4> | ObservedValueOf<O5> | ObservedValueOf<O6>>;
export declare function concat<O extends ObservableInput<any>>(...observables: O[]): Observable<ObservedValueOf<O>>;
/** @deprecated Use {@link scheduled} and {@link concatAll} (e.g. `scheduled([o1, o2, o3], scheduler).pipe(concatAll())`) */
export declare function concat<O extends ObservableInput<any>>(...observables: (O | SchedulerLike)[]): Observable<ObservedValueOf<O>>;
export declare function concat<R>(...observables: ObservableInput<any>[]): Observable<R>;
/** @deprecated Use {@link scheduled} and {@link concatAll} (e.g. `scheduled([o1, o2, o3], scheduler).pipe(concatAll())`) */
export declare function concat<R>(...observables: (ObservableInput<any> | SchedulerLike)[]): Observable<R>;

13
node_modules/rxjs/internal/observable/concat.js generated vendored Normal file
View File

@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var of_1 = require("./of");
var concatAll_1 = require("../operators/concatAll");
function concat() {
var observables = [];
for (var _i = 0; _i < arguments.length; _i++) {
observables[_i] = arguments[_i];
}
return concatAll_1.concatAll()(of_1.of.apply(void 0, observables));
}
exports.concat = concat;
//# sourceMappingURL=concat.js.map

1
node_modules/rxjs/internal/observable/concat.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"concat.js","sources":["../../src/internal/observable/concat.ts"],"names":[],"mappings":";;AAGA,2BAA0B;AAE1B,oDAAmD;AA2InD,SAAgB,MAAM;IAAoC,qBAAwC;SAAxC,UAAwC,EAAxC,qBAAwC,EAAxC,IAAwC;QAAxC,gCAAwC;;IAChG,OAAO,qBAAS,EAAK,CAAC,OAAE,eAAI,WAAW,EAAE,CAAC;AAC5C,CAAC;AAFD,wBAEC"}

52
node_modules/rxjs/internal/observable/defer.d.ts generated vendored Normal file
View File

@ -0,0 +1,52 @@
import { Observable } from '../Observable';
import { ObservedValueOf, ObservableInput } from '../types';
/**
* 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>
*
* ![](defer.png)
*
* `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
* ### Subscribe to either an Observable of clicks or an Observable of interval, at random
* ```ts
* import { defer, fromEvent, interval } from 'rxjs';
*
* const clicksOrInterval = defer(function () {
* return Math.random() > 0.5
* ? fromEvent(document, 'click')
* : 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 Observable}
*
* @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
*/
export declare function defer<R extends ObservableInput<any> | void>(observableFactory: () => R): Observable<ObservedValueOf<R>>;

21
node_modules/rxjs/internal/observable/defer.js generated vendored Normal file
View File

@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("../Observable");
var from_1 = require("./from");
var empty_1 = require("./empty");
function defer(observableFactory) {
return new Observable_1.Observable(function (subscriber) {
var input;
try {
input = observableFactory();
}
catch (err) {
subscriber.error(err);
return undefined;
}
var source = input ? from_1.from(input) : empty_1.empty();
return source.subscribe(subscriber);
});
}
exports.defer = defer;
//# sourceMappingURL=defer.js.map

1
node_modules/rxjs/internal/observable/defer.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"defer.js","sources":["../../src/internal/observable/defer.ts"],"names":[],"mappings":";;AAAA,4CAA2C;AAE3C,+BAA8B;AAC9B,iCAAgC;AAmDhC,SAAgB,KAAK,CAAwC,iBAA0B;IACrF,OAAO,IAAI,uBAAU,CAAqB,UAAA,UAAU;QAClD,IAAI,KAAe,CAAC;QACpB,IAAI;YACF,KAAK,GAAG,iBAAiB,EAAE,CAAC;SAC7B;QAAC,OAAO,GAAG,EAAE;YACZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACtB,OAAO,SAAS,CAAC;SAClB;QACD,IAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,WAAI,CAAC,KAA4C,CAAC,CAAC,CAAC,CAAC,aAAK,EAAE,CAAC;QACpF,OAAO,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC;AAZD,sBAYC"}

View File

@ -0,0 +1,151 @@
import { Observable } from '../../Observable';
import { Subscriber } from '../../Subscriber';
import { TeardownLogic } from '../../types';
export interface AjaxRequest {
url?: string;
body?: any;
user?: string;
async?: boolean;
method?: string;
headers?: Object;
timeout?: number;
password?: string;
hasContent?: boolean;
crossDomain?: boolean;
withCredentials?: boolean;
createXHR?: () => XMLHttpRequest;
progressSubscriber?: Subscriber<any>;
responseType?: string;
}
export interface AjaxCreationMethod {
(urlOrRequest: string | AjaxRequest): Observable<AjaxResponse>;
get(url: string, headers?: Object): Observable<AjaxResponse>;
post(url: string, body?: any, headers?: Object): Observable<AjaxResponse>;
put(url: string, body?: any, headers?: Object): Observable<AjaxResponse>;
patch(url: string, body?: any, headers?: Object): Observable<AjaxResponse>;
delete(url: string, headers?: Object): Observable<AjaxResponse>;
getJSON<T>(url: string, headers?: Object): Observable<T>;
}
export declare function ajaxGet(url: string, headers?: Object): AjaxObservable<AjaxResponse>;
export declare function ajaxPost(url: string, body?: any, headers?: Object): Observable<AjaxResponse>;
export declare function ajaxDelete(url: string, headers?: Object): Observable<AjaxResponse>;
export declare function ajaxPut(url: string, body?: any, headers?: Object): Observable<AjaxResponse>;
export declare function ajaxPatch(url: string, body?: any, headers?: Object): Observable<AjaxResponse>;
export declare function ajaxGetJSON<T>(url: string, headers?: Object): Observable<T>;
/**
* We need this JSDoc comment for affecting ESDoc.
* @extends {Ignored}
* @hide true
*/
export declare class AjaxObservable<T> extends Observable<T> {
/**
* Creates an observable for an Ajax request with either a request object with
* url, headers, etc or a string for a URL.
*
* ## Example
* ```ts
* import { ajax } from 'rxjs/ajax';
*
* const source1 = ajax('/products');
* const source2 = 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
* @nocollapse
*/
static create: AjaxCreationMethod;
private request;
constructor(urlOrRequest: string | AjaxRequest);
/** @deprecated This is an internal implementation detail, do not use. */
_subscribe(subscriber: Subscriber<T>): TeardownLogic;
}
/**
* We need this JSDoc comment for affecting ESDoc.
* @ignore
* @extends {Ignored}
*/
export declare class AjaxSubscriber<T> extends Subscriber<Event> {
request: AjaxRequest;
private xhr;
private done;
constructor(destination: Subscriber<T>, request: AjaxRequest);
next(e: Event): void;
private send;
private serializeBody;
private setHeaders;
private getHeader;
private setupEvents;
unsubscribe(): void;
}
/**
* A normalized AJAX response.
*
* @see {@link ajax}
*
* @class AjaxResponse
*/
export declare class AjaxResponse {
originalEvent: Event;
xhr: XMLHttpRequest;
request: AjaxRequest;
/** @type {number} The HTTP status code */
status: number;
/** @type {string|ArrayBuffer|Document|object|any} The response data */
response: any;
/** @type {string} The raw responseText */
responseText: string;
/** @type {string} The responseType (e.g. 'json', 'arraybuffer', or 'xml') */
responseType: string;
constructor(originalEvent: Event, xhr: XMLHttpRequest, request: AjaxRequest);
}
export declare type AjaxErrorNames = 'AjaxError' | 'AjaxTimeoutError';
/**
* A normalized AJAX error.
*
* @see {@link ajax}
*
* @class AjaxError
*/
export interface AjaxError extends Error {
/** @type {XMLHttpRequest} The XHR instance associated with the error */
xhr: XMLHttpRequest;
/** @type {AjaxRequest} The AjaxRequest associated with the error */
request: AjaxRequest;
/** @type {number} The HTTP status code */
status: number;
/** @type {string} The responseType (e.g. 'json', 'arraybuffer', or 'xml') */
responseType: string;
/** @type {string|ArrayBuffer|Document|object|any} The response data */
response: any;
}
export interface AjaxErrorCtor {
new (message: string, xhr: XMLHttpRequest, request: AjaxRequest): AjaxError;
}
export declare const AjaxError: AjaxErrorCtor;
export interface AjaxTimeoutError extends AjaxError {
}
export interface AjaxTimeoutErrorCtor {
new (xhr: XMLHttpRequest, request: AjaxRequest): AjaxTimeoutError;
}
/**
* @see {@link ajax}
*
* @class AjaxTimeoutError
*/
export declare const AjaxTimeoutError: AjaxTimeoutErrorCtor;

View File

@ -0,0 +1,391 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var root_1 = require("../../util/root");
var Observable_1 = require("../../Observable");
var Subscriber_1 = require("../../Subscriber");
var map_1 = require("../../operators/map");
function getCORSRequest() {
if (root_1.root.XMLHttpRequest) {
return new root_1.root.XMLHttpRequest();
}
else if (!!root_1.root.XDomainRequest) {
return new root_1.root.XDomainRequest();
}
else {
throw new Error('CORS is not supported by your browser');
}
}
function getXMLHttpRequest() {
if (root_1.root.XMLHttpRequest) {
return new root_1.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_1.root.ActiveXObject(progId)) {
break;
}
}
catch (e) {
}
}
return new root_1.root.ActiveXObject(progId);
}
catch (e) {
throw new Error('XMLHttpRequest is not supported by your browser');
}
}
}
function ajaxGet(url, headers) {
if (headers === void 0) { headers = null; }
return new AjaxObservable({ method: 'GET', url: url, headers: headers });
}
exports.ajaxGet = ajaxGet;
function ajaxPost(url, body, headers) {
return new AjaxObservable({ method: 'POST', url: url, body: body, headers: headers });
}
exports.ajaxPost = ajaxPost;
function ajaxDelete(url, headers) {
return new AjaxObservable({ method: 'DELETE', url: url, headers: headers });
}
exports.ajaxDelete = ajaxDelete;
function ajaxPut(url, body, headers) {
return new AjaxObservable({ method: 'PUT', url: url, body: body, headers: headers });
}
exports.ajaxPut = ajaxPut;
function ajaxPatch(url, body, headers) {
return new AjaxObservable({ method: 'PATCH', url: url, body: body, headers: headers });
}
exports.ajaxPatch = ajaxPatch;
var mapResponse = map_1.map(function (x, index) { return x.response; });
function ajaxGetJSON(url, headers) {
return mapResponse(new AjaxObservable({
method: 'GET',
url: url,
responseType: 'json',
headers: headers
}));
}
exports.ajaxGetJSON = ajaxGetJSON;
var AjaxObservable = (function (_super) {
__extends(AjaxObservable, _super);
function AjaxObservable(urlOrRequest) {
var _this = _super.call(this) || this;
var request = {
async: true,
createXHR: function () {
return this.crossDomain ? getCORSRequest() : getXMLHttpRequest();
},
crossDomain: true,
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;
return _this;
}
AjaxObservable.prototype._subscribe = function (subscriber) {
return new AjaxSubscriber(subscriber, this.request);
};
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_1.Observable));
exports.AjaxObservable = AjaxObservable;
var AjaxSubscriber = (function (_super) {
__extends(AjaxSubscriber, _super);
function AjaxSubscriber(destination, request) {
var _this = _super.call(this, destination) || this;
_this.request = request;
_this.done = false;
var headers = request.headers = request.headers || {};
if (!request.crossDomain && !_this.getHeader(headers, 'X-Requested-With')) {
headers['X-Requested-With'] = 'XMLHttpRequest';
}
var contentTypeHeader = _this.getHeader(headers, 'Content-Type');
if (!contentTypeHeader && !(root_1.root.FormData && request.body instanceof root_1.root.FormData) && typeof request.body !== 'undefined') {
headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
}
request.body = _this.serializeBody(request.body, _this.getHeader(request.headers, 'Content-Type'));
_this.send();
return _this;
}
AjaxSubscriber.prototype.next = function (e) {
this.done = true;
var _a = this, xhr = _a.xhr, request = _a.request, destination = _a.destination;
var result;
try {
result = new AjaxResponse(e, xhr, request);
}
catch (err) {
return destination.error(err);
}
destination.next(result);
};
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;
try {
var xhr = this.xhr = request.createXHR();
this.setupEvents(xhr, request);
if (user) {
xhr.open(method, url, async, user, password);
}
else {
xhr.open(method, url, async);
}
if (async) {
xhr.timeout = request.timeout;
xhr.responseType = request.responseType;
}
if ('withCredentials' in xhr) {
xhr.withCredentials = !!request.withCredentials;
}
this.setHeaders(xhr, headers);
if (body) {
xhr.send(body);
}
else {
xhr.send();
}
}
catch (err) {
this.error(err);
}
};
AjaxSubscriber.prototype.serializeBody = function (body, contentType) {
if (!body || typeof body === 'string') {
return body;
}
else if (root_1.root.FormData && body instanceof root_1.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.getHeader = function (headers, headerName) {
for (var key in headers) {
if (key.toLowerCase() === headerName.toLowerCase()) {
return headers[key];
}
}
return undefined;
};
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);
}
var error;
try {
error = new exports.AjaxTimeoutError(this, request);
}
catch (err) {
error = err;
}
subscriber.error(error);
}
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_1.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);
}
var error;
try {
error = new exports.AjaxError('ajax error', this, request);
}
catch (err) {
error = err;
}
subscriber.error(error);
};
xhr.onerror = xhrError_1;
xhrError_1.request = request;
xhrError_1.subscriber = this;
xhrError_1.progressSubscriber = progressSubscriber;
}
function xhrReadyStateChange(e) {
return;
}
xhr.onreadystatechange = xhrReadyStateChange;
xhrReadyStateChange.subscriber = this;
xhrReadyStateChange.progressSubscriber = progressSubscriber;
xhrReadyStateChange.request = request;
function xhrLoad(e) {
var _a = xhrLoad, subscriber = _a.subscriber, progressSubscriber = _a.progressSubscriber, request = _a.request;
if (this.readyState === 4) {
var status_1 = this.status === 1223 ? 204 : this.status;
var response = (this.responseType === 'text' ? (this.response || this.responseText) : this.response);
if (status_1 === 0) {
status_1 = response ? 200 : 0;
}
if (status_1 < 400) {
if (progressSubscriber) {
progressSubscriber.complete();
}
subscriber.next(e);
subscriber.complete();
}
else {
if (progressSubscriber) {
progressSubscriber.error(e);
}
var error = void 0;
try {
error = new exports.AjaxError('ajax error ' + status_1, this, request);
}
catch (err) {
error = err;
}
subscriber.error(error);
}
}
}
xhr.onload = xhrLoad;
xhrLoad.subscriber = this;
xhrLoad.progressSubscriber = progressSubscriber;
xhrLoad.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_1.Subscriber));
exports.AjaxSubscriber = AjaxSubscriber;
var AjaxResponse = (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;
}());
exports.AjaxResponse = AjaxResponse;
var AjaxErrorImpl = (function () {
function AjaxErrorImpl(message, xhr, request) {
Error.call(this);
this.message = message;
this.name = 'AjaxError';
this.xhr = xhr;
this.request = request;
this.status = xhr.status;
this.responseType = xhr.responseType || request.responseType;
this.response = parseXhrResponse(this.responseType, xhr);
return this;
}
AjaxErrorImpl.prototype = Object.create(Error.prototype);
return AjaxErrorImpl;
})();
exports.AjaxError = AjaxErrorImpl;
function parseJson(xhr) {
if ('response' in xhr) {
return xhr.responseType ? xhr.response : JSON.parse(xhr.response || xhr.responseText || 'null');
}
else {
return JSON.parse(xhr.responseText || 'null');
}
}
function parseXhrResponse(responseType, xhr) {
switch (responseType) {
case 'json':
return parseJson(xhr);
case 'xml':
return xhr.responseXML;
case 'text':
default:
return ('response' in xhr) ? xhr.response : xhr.responseText;
}
}
function AjaxTimeoutErrorImpl(xhr, request) {
exports.AjaxError.call(this, 'ajax timeout', xhr, request);
this.name = 'AjaxTimeoutError';
return this;
}
exports.AjaxTimeoutError = AjaxTimeoutErrorImpl;
//# sourceMappingURL=AjaxObservable.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,170 @@
import { Subject, AnonymousSubject } from '../../Subject';
import { Subscriber } from '../../Subscriber';
import { Observable } from '../../Observable';
import { Subscription } from '../../Subscription';
import { Operator } from '../../Operator';
import { Observer, NextObserver } from '../../types';
/**
* WebSocketSubjectConfig is a plain Object that allows us to make our
* webSocket configurable.
*
* <span class="informal">Provides flexibility to {@link webSocket}</span>
*
* It defines a set of properties to provide custom behavior in specific
* moments of the socket's lifecycle. When the connection opens we can
* use `openObserver`, when the connection is closed `closeObserver`, if we
* are interested in listening for data comming from server: `deserializer`,
* which allows us to customize the deserialization strategy of data before passing it
* to the socket client. By default `deserializer` is going to apply `JSON.parse` to each message comming
* from the Server.
*
* ## Example
* **deserializer**, the default for this property is `JSON.parse` but since there are just two options
* for incomming data, either be text or binarydata. We can apply a custom deserialization strategy
* or just simply skip the default behaviour.
* ```ts
* import { webSocket } from 'rxjs/webSocket';
*
* const wsSubject = webSocket({
* url: 'ws://localhost:8081',
* //Apply any transformation of your choice.
* deserializer: ({data}) => data
* });
*
* wsSubject.subscribe(console.log);
*
* // Let's suppose we have this on the Server: ws.send("This is a msg from the server")
* //output
* //
* // This is a msg from the server
* ```
*
* **serializer** allows us tom apply custom serialization strategy but for the outgoing messages
* ```ts
* import { webSocket } from 'rxjs/webSocket';
*
* const wsSubject = webSocket({
* url: 'ws://localhost:8081',
* //Apply any transformation of your choice.
* serializer: msg => JSON.stringify({channel: "webDevelopment", msg: msg})
* });
*
* wsSubject.subscribe(() => subject.next("msg to the server"));
*
* // Let's suppose we have this on the Server: ws.send("This is a msg from the server")
* //output
* //
* // {"channel":"webDevelopment","msg":"msg to the server"}
* ```
*
* **closeObserver** allows us to set a custom error when an error raise up.
* ```ts
* import { webSocket } from 'rxjs/webSocket';
*
* const wsSubject = webSocket({
* url: 'ws://localhost:8081',
* closeObserver: {
next(closeEvent) {
const customError = { code: 6666, reason: "Custom evil reason" }
console.log(`code: ${customError.code}, reason: ${customError.reason}`);
}
}
* });
*
* //output
* // code: 6666, reason: Custom evil reason
* ```
*
* **openObserver**, Let's say we need to make some kind of init task before sending/receiving msgs to the
* webSocket or sending notification that the connection was successful, this is when
* openObserver is usefull for.
* ```ts
* import { webSocket } from 'rxjs/webSocket';
*
* const wsSubject = webSocket({
* url: 'ws://localhost:8081',
* openObserver: {
* next: () => {
* console.log('connetion ok');
* }
* },
* });
*
* //output
* // connetion ok`
* ```
* */
export interface WebSocketSubjectConfig<T> {
/** The url of the socket server to connect to */
url: string;
/** The protocol to use to connect */
protocol?: string | Array<string>;
/** @deprecated use {@link deserializer} */
resultSelector?: (e: MessageEvent) => T;
/**
* A serializer used to create messages from passed values before the
* messages are sent to the server. Defaults to JSON.stringify.
*/
serializer?: (value: T) => WebSocketMessage;
/**
* A deserializer used for messages arriving on the socket from the
* server. Defaults to JSON.parse.
*/
deserializer?: (e: MessageEvent) => T;
/**
* An Observer that watches when open events occur on the underlying web socket.
*/
openObserver?: NextObserver<Event>;
/**
* An Observer than watches when close events occur on the underlying webSocket
*/
closeObserver?: NextObserver<CloseEvent>;
/**
* An Observer that watches when a close is about to occur due to
* unsubscription.
*/
closingObserver?: NextObserver<void>;
/**
* A WebSocket constructor to use. This is useful for situations like using a
* WebSocket impl in Node (WebSocket is a DOM API), or for mocking a WebSocket
* for testing purposes
*/
WebSocketCtor?: {
new (url: string, protocols?: string | string[]): WebSocket;
};
/** Sets the `binaryType` property of the underlying WebSocket. */
binaryType?: 'blob' | 'arraybuffer';
}
export declare type WebSocketMessage = string | ArrayBuffer | Blob | ArrayBufferView;
export declare class WebSocketSubject<T> extends AnonymousSubject<T> {
private _config;
/** @deprecated This is an internal implementation detail, do not use. */
_output: Subject<T>;
private _socket;
constructor(urlConfigOrSource: string | WebSocketSubjectConfig<T> | Observable<T>, destination?: Observer<T>);
lift<R>(operator: Operator<T, R>): WebSocketSubject<R>;
private _resetState;
/**
* Creates an {@link Observable}, that when subscribed to, sends a message,
* defined by the `subMsg` function, to the server over the socket to begin a
* subscription to data over that socket. Once data arrives, the
* `messageFilter` argument will be used to select the appropriate data for
* the resulting Observable. When teardown occurs, either due to
* unsubscription, completion or error, a message defined by the `unsubMsg`
* argument will be send to the server over the WebSocketSubject.
*
* @param subMsg A function to generate the subscription message to be sent to
* the server. This will still be processed by the serializer in the
* WebSocketSubject's config. (Which defaults to JSON serialization)
* @param unsubMsg A function to generate the unsubscription message to be
* sent to the server at teardown. This will still be processed by the
* serializer in the WebSocketSubject's config.
* @param messageFilter A predicate for selecting the appropriate messages
* from the server for the output stream.
*/
multiplex(subMsg: () => any, unsubMsg: () => any, messageFilter: (value: T) => boolean): Observable<any>;
private _connectSocket;
/** @deprecated This is an internal implementation detail, do not use. */
_subscribe(subscriber: Subscriber<T>): Subscription;
unsubscribe(): void;
}

View File

@ -0,0 +1,241 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
var Subject_1 = require("../../Subject");
var Subscriber_1 = require("../../Subscriber");
var Observable_1 = require("../../Observable");
var Subscription_1 = require("../../Subscription");
var ReplaySubject_1 = require("../../ReplaySubject");
var DEFAULT_WEBSOCKET_CONFIG = {
url: '',
deserializer: function (e) { return JSON.parse(e.data); },
serializer: function (value) { return JSON.stringify(value); },
};
var WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }';
var WebSocketSubject = (function (_super) {
__extends(WebSocketSubject, _super);
function WebSocketSubject(urlConfigOrSource, destination) {
var _this = _super.call(this) || this;
if (urlConfigOrSource instanceof Observable_1.Observable) {
_this.destination = destination;
_this.source = urlConfigOrSource;
}
else {
var config = _this._config = __assign({}, DEFAULT_WEBSOCKET_CONFIG);
_this._output = new Subject_1.Subject();
if (typeof urlConfigOrSource === 'string') {
config.url = urlConfigOrSource;
}
else {
for (var key in urlConfigOrSource) {
if (urlConfigOrSource.hasOwnProperty(key)) {
config[key] = urlConfigOrSource[key];
}
}
}
if (!config.WebSocketCtor && WebSocket) {
config.WebSocketCtor = WebSocket;
}
else if (!config.WebSocketCtor) {
throw new Error('no WebSocket constructor can be found');
}
_this.destination = new ReplaySubject_1.ReplaySubject();
}
return _this;
}
WebSocketSubject.prototype.lift = function (operator) {
var sock = new WebSocketSubject(this._config, this.destination);
sock.operator = operator;
sock.source = this;
return sock;
};
WebSocketSubject.prototype._resetState = function () {
this._socket = null;
if (!this.source) {
this.destination = new ReplaySubject_1.ReplaySubject();
}
this._output = new Subject_1.Subject();
};
WebSocketSubject.prototype.multiplex = function (subMsg, unsubMsg, messageFilter) {
var self = this;
return new Observable_1.Observable(function (observer) {
try {
self.next(subMsg());
}
catch (err) {
observer.error(err);
}
var subscription = self.subscribe(function (x) {
try {
if (messageFilter(x)) {
observer.next(x);
}
}
catch (err) {
observer.error(err);
}
}, function (err) { return observer.error(err); }, function () { return observer.complete(); });
return function () {
try {
self.next(unsubMsg());
}
catch (err) {
observer.error(err);
}
subscription.unsubscribe();
};
});
};
WebSocketSubject.prototype._connectSocket = function () {
var _this = this;
var _a = this._config, WebSocketCtor = _a.WebSocketCtor, protocol = _a.protocol, url = _a.url, binaryType = _a.binaryType;
var observer = this._output;
var socket = null;
try {
socket = protocol ?
new WebSocketCtor(url, protocol) :
new WebSocketCtor(url);
this._socket = socket;
if (binaryType) {
this._socket.binaryType = binaryType;
}
}
catch (e) {
observer.error(e);
return;
}
var subscription = new Subscription_1.Subscription(function () {
_this._socket = null;
if (socket && socket.readyState === 1) {
socket.close();
}
});
socket.onopen = function (e) {
var _socket = _this._socket;
if (!_socket) {
socket.close();
_this._resetState();
return;
}
var openObserver = _this._config.openObserver;
if (openObserver) {
openObserver.next(e);
}
var queue = _this.destination;
_this.destination = Subscriber_1.Subscriber.create(function (x) {
if (socket.readyState === 1) {
try {
var serializer = _this._config.serializer;
socket.send(serializer(x));
}
catch (e) {
_this.destination.error(e);
}
}
}, function (e) {
var closingObserver = _this._config.closingObserver;
if (closingObserver) {
closingObserver.next(undefined);
}
if (e && e.code) {
socket.close(e.code, e.reason);
}
else {
observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT));
}
_this._resetState();
}, function () {
var closingObserver = _this._config.closingObserver;
if (closingObserver) {
closingObserver.next(undefined);
}
socket.close();
_this._resetState();
});
if (queue && queue instanceof ReplaySubject_1.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._config.closeObserver;
if (closeObserver) {
closeObserver.next(e);
}
if (e.wasClean) {
observer.complete();
}
else {
observer.error(e);
}
};
socket.onmessage = function (e) {
try {
var deserializer = _this._config.deserializer;
observer.next(deserializer(e));
}
catch (err) {
observer.error(err);
}
};
};
WebSocketSubject.prototype._subscribe = function (subscriber) {
var _this = this;
var source = this.source;
if (source) {
return source.subscribe(subscriber);
}
if (!this._socket) {
this._connectSocket();
}
this._output.subscribe(subscriber);
subscriber.add(function () {
var _socket = _this._socket;
if (_this._output.observers.length === 0) {
if (_socket && _socket.readyState === 1) {
_socket.close();
}
_this._resetState();
}
});
return subscriber;
};
WebSocketSubject.prototype.unsubscribe = function () {
var _socket = this._socket;
if (_socket && _socket.readyState === 1) {
_socket.close();
}
this._resetState();
_super.prototype.unsubscribe.call(this);
};
return WebSocketSubject;
}(Subject_1.AnonymousSubject));
exports.WebSocketSubject = WebSocketSubject;
//# sourceMappingURL=WebSocketSubject.js.map

File diff suppressed because one or more lines are too long

82
node_modules/rxjs/internal/observable/dom/ajax.d.ts generated vendored Normal file
View File

@ -0,0 +1,82 @@
import { AjaxCreationMethod } from './AjaxObservable';
/**
* There is an ajax operator on the Rx object.
*
* It creates an observable for an Ajax request with either a request object with
* url, headers, etc or a string for a URL.
*
*
* ## Using ajax() to fetch the response object that is being returned from API.
* ```ts
* import { ajax } from 'rxjs/ajax';
* import { map, catchError } from 'rxjs/operators';
* import { of } from 'rxjs';
*
* const obs$ = ajax(`https://api.github.com/users?per_page=5`).pipe(
* map(userResponse => console.log('users: ', userResponse)),
* catchError(error => {
* console.log('error: ', error);
* return of(error);
* })
* );
*
* ```
*
* ## Using ajax.getJSON() to fetch data from API.
* ```ts
* import { ajax } from 'rxjs/ajax';
* import { map, catchError } from 'rxjs/operators';
* import { of } from 'rxjs';
*
* const obs$ = ajax.getJSON(`https://api.github.com/users?per_page=5`).pipe(
* map(userResponse => console.log('users: ', userResponse)),
* catchError(error => {
* console.log('error: ', error);
* return of(error);
* })
* );
*
* ```
*
* ## Using ajax() with object as argument and method POST with a two seconds delay.
* ```ts
* import { ajax } from 'rxjs/ajax';
* import { of } from 'rxjs';
*
* const users = ajax({
* url: 'https://httpbin.org/delay/2',
* method: 'POST',
* headers: {
* 'Content-Type': 'application/json',
* 'rxjs-custom-header': 'Rxjs'
* },
* body: {
* rxjs: 'Hello World!'
* }
* }).pipe(
* map(response => console.log('response: ', response)),
* catchError(error => {
* console.log('error: ', error);
* return of(error);
* })
* );
*
* ```
*
* ## Using ajax() to fetch. An error object that is being returned from the request.
* ```ts
* import { ajax } from 'rxjs/ajax';
* import { map, catchError } from 'rxjs/operators';
* import { of } from 'rxjs';
*
* const obs$ = ajax(`https://api.github.com/404`).pipe(
* map(userResponse => console.log('users: ', userResponse)),
* catchError(error => {
* console.log('error: ', error);
* return of(error);
* })
* );
*
* ```
*/
export declare const ajax: AjaxCreationMethod;

5
node_modules/rxjs/internal/observable/dom/ajax.js generated vendored Normal file
View File

@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var AjaxObservable_1 = require("./AjaxObservable");
exports.ajax = (function () { return AjaxObservable_1.AjaxObservable.create; })();
//# sourceMappingURL=ajax.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"ajax.js","sources":["../../../src/internal/observable/dom/ajax.ts"],"names":[],"mappings":";;AAAA,mDAAwE;AAiF3D,QAAA,IAAI,GAAuB,CAAC,cAAM,OAAA,+BAAc,CAAC,MAAM,EAArB,CAAqB,CAAC,EAAE,CAAC"}

52
node_modules/rxjs/internal/observable/dom/fetch.d.ts generated vendored Normal file
View File

@ -0,0 +1,52 @@
import { Observable } from '../../Observable';
/**
* Uses [the Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) to
* make an HTTP request.
*
* **WARNING** Parts of the fetch API are still experimental. `AbortController` is
* required for this implementation to work and use cancellation appropriately.
*
* Will automatically set up an internal [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController)
* in order to teardown the internal `fetch` when the subscription tears down.
*
* If a `signal` is provided via the `init` argument, it will behave like it usually does with
* `fetch`. If the provided `signal` aborts, the error that `fetch` normally rejects with
* in that scenario will be emitted as an error from the observable.
*
* ### Basic Use
*
* ```ts
* import { of } from 'rxjs';
* import { fromFetch } from 'rxjs/fetch';
* import { switchMap, catchError } from 'rxjs/operators';
*
* const data$ = fromFetch('https://api.github.com/users?per_page=5').pipe(
* switchMap(response => {
* if (response.ok) {
* // OK return data
* return response.json();
* } else {
* // Server is returning a status requiring the client to try something else.
* return of({ error: true, message: `Error ${response.status}` });
* }
* }),
* catchError(err => {
* // Network or other error, handle appropriately
* console.error(err);
* return of({ error: true, message: err.message })
* })
* );
*
* data$.subscribe({
* next: result => console.log(result),
* complete: () => console.log('done')
* })
* ```
*
* @param input The resource you would like to fetch. Can be a url or a request object.
* @param init A configuration object for the fetch.
* [See MDN for more details](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)
* @returns An Observable, that when subscribed to performs an HTTP request using the native `fetch`
* function. The {@link Subscription} is tied to an `AbortController` for the the fetch.
*/
export declare function fromFetch(input: string | Request, init?: RequestInit): Observable<Response>;

60
node_modules/rxjs/internal/observable/dom/fetch.js generated vendored Normal file
View File

@ -0,0 +1,60 @@
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("../../Observable");
function fromFetch(input, init) {
return new Observable_1.Observable(function (subscriber) {
var controller = new AbortController();
var signal = controller.signal;
var outerSignalHandler;
var abortable = true;
var unsubscribed = false;
if (init) {
if (init.signal) {
if (init.signal.aborted) {
controller.abort();
}
else {
outerSignalHandler = function () {
if (!signal.aborted) {
controller.abort();
}
};
init.signal.addEventListener('abort', outerSignalHandler);
}
}
init = __assign({}, init, { signal: signal });
}
else {
init = { signal: signal };
}
fetch(input, init).then(function (response) {
abortable = false;
subscriber.next(response);
subscriber.complete();
}).catch(function (err) {
abortable = false;
if (!unsubscribed) {
subscriber.error(err);
}
});
return function () {
unsubscribed = true;
if (abortable) {
controller.abort();
}
};
});
}
exports.fromFetch = fromFetch;
//# sourceMappingURL=fetch.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"fetch.js","sources":["../../../src/internal/observable/dom/fetch.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAA8C;AAoD9C,SAAgB,SAAS,CAAC,KAAuB,EAAE,IAAkB;IACnE,OAAO,IAAI,uBAAU,CAAW,UAAA,UAAU;QACxC,IAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;QACzC,IAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;QACjC,IAAI,kBAA8B,CAAC;QACnC,IAAI,SAAS,GAAG,IAAI,CAAC;QACrB,IAAI,YAAY,GAAG,KAAK,CAAC;QAEzB,IAAI,IAAI,EAAE;YAER,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;oBACvB,UAAU,CAAC,KAAK,EAAE,CAAC;iBACpB;qBAAM;oBACL,kBAAkB,GAAG;wBACnB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;4BACnB,UAAU,CAAC,KAAK,EAAE,CAAC;yBACpB;oBACH,CAAC,CAAC;oBACF,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;iBAC3D;aACF;YACD,IAAI,gBAAQ,IAAI,IAAE,MAAM,QAAA,GAAE,CAAC;SAC5B;aAAM;YACL,IAAI,GAAG,EAAE,MAAM,QAAA,EAAE,CAAC;SACnB;QAED,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,UAAA,QAAQ;YAC9B,SAAS,GAAG,KAAK,CAAC;YAClB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC1B,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC,KAAK,CAAC,UAAA,GAAG;YACV,SAAS,GAAG,KAAK,CAAC;YAClB,IAAI,CAAC,YAAY,EAAE;gBAEjB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACvB;QACH,CAAC,CAAC,CAAC;QAEH,OAAO;YACL,YAAY,GAAG,IAAI,CAAC;YACpB,IAAI,SAAS,EAAE;gBACb,UAAU,CAAC,KAAK,EAAE,CAAC;aACpB;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA9CD,8BA8CC"}

View File

@ -0,0 +1,153 @@
import { WebSocketSubject, WebSocketSubjectConfig } from './WebSocketSubject';
/**
* Wrapper around the w3c-compatible WebSocket object provided by the browser.
*
* <span class="informal">{@link Subject} that communicates with a server via WebSocket</span>
*
* `webSocket` is a factory function that produces a `WebSocketSubject`,
* which can be used to make WebSocket connection with an arbitrary endpoint.
* `webSocket` accepts as an argument either a string with url of WebSocket endpoint, or an
* {@link WebSocketSubjectConfig} object for providing additional configuration, as
* well as Observers for tracking lifecycle of WebSocket connection.
*
* When `WebSocketSubject` is subscribed, it attempts to make a socket connection,
* unless there is one made already. This means that many subscribers will always listen
* on the same socket, thus saving resources. If however, two instances are made of `WebSocketSubject`,
* even if these two were provided with the same url, they will attempt to make separate
* connections. When consumer of a `WebSocketSubject` unsubscribes, socket connection is closed,
* only if there are no more subscribers still listening. If after some time a consumer starts
* subscribing again, connection is reestablished.
*
* Once connection is made, whenever a new message comes from the server, `WebSocketSubject` will emit that
* message as a value in the stream. By default, a message from the socket is parsed via `JSON.parse`. If you
* want to customize how deserialization is handled (if at all), you can provide custom `resultSelector`
* function in {@link WebSocketSubject}. When connection closes, stream will complete, provided it happened without
* any errors. If at any point (starting, maintaining or closing a connection) there is an error,
* stream will also error with whatever WebSocket API has thrown.
*
* By virtue of being a {@link Subject}, `WebSocketSubject` allows for receiving and sending messages from the server. In order
* to communicate with a connected endpoint, use `next`, `error` and `complete` methods. `next` sends a value to the server, so bear in mind
* that this value will not be serialized beforehand. Because of This, `JSON.stringify` will have to be called on a value by hand,
* before calling `next` with a result. Note also that if at the moment of nexting value
* there is no socket connection (for example no one is subscribing), those values will be buffered, and sent when connection
* is finally established. `complete` method closes socket connection. `error` does the same,
* as well as notifying the server that something went wrong via status code and string with details of what happened.
* Since status code is required in WebSocket API, `WebSocketSubject` does not allow, like regular `Subject`,
* arbitrary values being passed to the `error` method. It needs to be called with an object that has `code`
* property with status code number and optional `reason` property with string describing details
* of an error.
*
* Calling `next` does not affect subscribers of `WebSocketSubject` - they have no
* information that something was sent to the server (unless of course the server
* responds somehow to a message). On the other hand, since calling `complete` triggers
* an attempt to close socket connection. If that connection is closed without any errors, stream will
* complete, thus notifying all subscribers. And since calling `error` closes
* socket connection as well, just with a different status code for the server, if closing itself proceeds
* without errors, subscribed Observable will not error, as one might expect, but complete as usual. In both cases
* (calling `complete` or `error`), if process of closing socket connection results in some errors, *then* stream
* will error.
*
* **Multiplexing**
*
* `WebSocketSubject` has an additional operator, not found in other Subjects. It is called `multiplex` and it is
* used to simulate opening several socket connections, while in reality maintaining only one.
* For example, an application has both chat panel and real-time notifications about sport news. Since these are two distinct functions,
* it would make sense to have two separate connections for each. Perhaps there could even be two separate services with WebSocket
* endpoints, running on separate machines with only GUI combining them together. Having a socket connection
* for each functionality could become too resource expensive. It is a common pattern to have single
* WebSocket endpoint that acts as a gateway for the other services (in this case chat and sport news services).
* Even though there is a single connection in a client app, having the ability to manipulate streams as if it
* were two separate sockets is desirable. This eliminates manually registering and unregistering in a gateway for
* given service and filter out messages of interest. This is exactly what `multiplex` method is for.
*
* Method accepts three parameters. First two are functions returning subscription and unsubscription messages
* respectively. These are messages that will be sent to the server, whenever consumer of resulting Observable
* subscribes and unsubscribes. Server can use them to verify that some kind of messages should start or stop
* being forwarded to the client. In case of the above example application, after getting subscription message with proper identifier,
* gateway server can decide that it should connect to real sport news service and start forwarding messages from it.
* Note that both messages will be sent as returned by the functions, they are by default serialized using JSON.stringify, just
* as messages pushed via `next`. Also bear in mind that these messages will be sent on *every* subscription and
* unsubscription. This is potentially dangerous, because one consumer of an Observable may unsubscribe and the server
* might stop sending messages, since it got unsubscription message. This needs to be handled
* on the server or using {@link publish} on a Observable returned from 'multiplex'.
*
* Last argument to `multiplex` is a `messageFilter` function which should return a boolean. It is used to filter out messages
* sent by the server to only those that belong to simulated WebSocket stream. For example, server might mark these
* messages with some kind of string identifier on a message object and `messageFilter` would return `true`
* if there is such identifier on an object emitted by the socket. Messages which returns `false` in `messageFilter` are simply skipped,
* and are not passed down the stream.
*
* Return value of `multiplex` is an Observable with messages incoming from emulated socket connection. Note that this
* is not a `WebSocketSubject`, so calling `next` or `multiplex` again will fail. For pushing values to the
* server, use root `WebSocketSubject`.
*
* ### Examples
* #### Listening for messages from the server
* ```ts
* import { webSocket } from "rxjs/webSocket";
* const subject = webSocket("ws://localhost:8081");
*
* subject.subscribe(
* msg => console.log('message received: ' + msg), // Called whenever there is a message from the server.
* err => console.log(err), // Called if at any point WebSocket API signals some kind of error.
* () => console.log('complete') // Called when connection is closed (for whatever reason).
* );
* ```
*
* #### Pushing messages to the server
* ```ts
* import { webSocket } from "rxjs/webSocket";
* const subject = webSocket('ws://localhost:8081');
*
* subject.subscribe();
* // Note that at least one consumer has to subscribe to the created subject - otherwise "nexted" values will be just buffered and not sent,
* // since no connection was established!
*
* subject.next({message: 'some message'});
* // This will send a message to the server once a connection is made. Remember value is serialized with JSON.stringify by default!
*
* subject.complete(); // Closes the connection.
*
* subject.error({code: 4000, reason: 'I think our app just broke!'});
* // Also closes the connection, but let's the server know that this closing is caused by some error.
* ```
*
* #### Multiplexing WebSocket
* ```ts
* import { webSocket } from "rxjs/webSocket";
* const subject = webSocket('ws://localhost:8081');
*
* const observableA = subject.multiplex(
* () => ({subscribe: 'A'}), // When server gets this message, it will start sending messages for 'A'...
* () => ({unsubscribe: 'A'}), // ...and when gets this one, it will stop.
* message => message.type === 'A' // If the function returns `true` message is passed down the stream. Skipped if the function returns false.
* );
*
* const observableB = subject.multiplex( // And the same goes for 'B'.
* () => ({subscribe: 'B'}),
* () => ({unsubscribe: 'B'}),
* message => message.type === 'B'
* );
*
* const subA = observableA.subscribe(messageForA => console.log(messageForA));
* // At this moment WebSocket connection is established. Server gets '{"subscribe": "A"}' message and starts sending messages for 'A',
* // which we log here.
*
* const subB = observableB.subscribe(messageForB => console.log(messageForB));
* // Since we already have a connection, we just send '{"subscribe": "B"}' message to the server. It starts sending messages for 'B',
* // which we log here.
*
* subB.unsubscribe();
* // Message '{"unsubscribe": "B"}' is sent to the server, which stops sending 'B' messages.
*
* subA.unsubscribe();
* // Message '{"unsubscribe": "A"}' makes the server stop sending messages for 'A'. Since there is no more subscribers to root Subject,
* // socket connection closes.
* ```
*
*
* @param {string|WebSocketSubjectConfig} urlConfigOrSource The WebSocket endpoint as an url or an object with
* configuration and additional Observers.
* @return {WebSocketSubject} Subject which allows to both send and receive messages via WebSocket connection.
*/
export declare function webSocket<T>(urlConfigOrSource: string | WebSocketSubjectConfig<T>): WebSocketSubject<T>;

View File

@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var WebSocketSubject_1 = require("./WebSocketSubject");
function webSocket(urlConfigOrSource) {
return new WebSocketSubject_1.WebSocketSubject(urlConfigOrSource);
}
exports.webSocket = webSocket;
//# sourceMappingURL=webSocket.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"webSocket.js","sources":["../../../src/internal/observable/dom/webSocket.ts"],"names":[],"mappings":";;AAAA,uDAA8E;AAyJ9E,SAAgB,SAAS,CAAI,iBAAqD;IAChF,OAAO,IAAI,mCAAgB,CAAI,iBAAiB,CAAC,CAAC;AACpD,CAAC;AAFD,8BAEC"}

60
node_modules/rxjs/internal/observable/empty.d.ts generated vendored Normal file
View File

@ -0,0 +1,60 @@
import { Observable } from '../Observable';
import { SchedulerLike } from '../types';
/**
* The same Observable instance returned by any call to {@link empty} without a
* `scheduler`. It is preferrable to use this over `empty()`.
*/
export declare const EMPTY: Observable<never>;
/**
* 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>
*
* ![](empty.png)
*
* 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}.
*
* ## Examples
* ### Emit the number 7, then complete
* ```ts
* import { empty } from 'rxjs';
* import { startWith } from 'rxjs/operators';
*
* const result = empty().pipe(startWith(7));
* result.subscribe(x => console.log(x));
* ```
*
* ### Map and flatten only odd numbers to the sequence 'a', 'b', 'c'
* ```ts
* import { empty, interval, of } from 'rxjs';
* import { mergeMap } from 'rxjs/operators';
*
* const interval$ = interval(1000);
* const result = interval$.pipe(
* mergeMap(x => x % 2 === 1 ? of('a', 'b', 'c') : 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 Observable}
* @see {@link never}
* @see {@link of}
* @see {@link throwError}
*
* @param scheduler A {@link SchedulerLike} to use for scheduling
* the emission of the complete notification.
* @return An "empty" Observable: emits only the complete
* notification.
* @deprecated Deprecated in favor of using {@link EMPTY} constant, or {@link scheduled} (e.g. `scheduled([], scheduler)`)
*/
export declare function empty(scheduler?: SchedulerLike): Observable<never>;

12
node_modules/rxjs/internal/observable/empty.js generated vendored Normal file
View File

@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("../Observable");
exports.EMPTY = new Observable_1.Observable(function (subscriber) { return subscriber.complete(); });
function empty(scheduler) {
return scheduler ? emptyScheduled(scheduler) : exports.EMPTY;
}
exports.empty = empty;
function emptyScheduled(scheduler) {
return new Observable_1.Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });
}
//# sourceMappingURL=empty.js.map

1
node_modules/rxjs/internal/observable/empty.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"empty.js","sources":["../../src/internal/observable/empty.ts"],"names":[],"mappings":";;AAAA,4CAA2C;AAO9B,QAAA,KAAK,GAAG,IAAI,uBAAU,CAAQ,UAAA,UAAU,IAAI,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,CAAC,CAAC;AAsDhF,SAAgB,KAAK,CAAC,SAAyB;IAC7C,OAAO,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,aAAK,CAAC;AACvD,CAAC;AAFD,sBAEC;AAED,SAAS,cAAc,CAAC,SAAwB;IAC9C,OAAO,IAAI,uBAAU,CAAQ,UAAA,UAAU,IAAI,OAAA,SAAS,CAAC,QAAQ,CAAC,cAAM,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,CAAC,EAA/C,CAA+C,CAAC,CAAC;AAC9F,CAAC"}

29
node_modules/rxjs/internal/observable/forkJoin.d.ts generated vendored Normal file
View File

@ -0,0 +1,29 @@
import { Observable } from '../Observable';
import { ObservableInput, ObservedValuesFromArray, ObservedValueOf, SubscribableOrPromise } from '../types';
/** @deprecated Use the version that takes an array of Observables instead */
export declare function forkJoin<T>(v1: SubscribableOrPromise<T>): Observable<[T]>;
/** @deprecated Use the version that takes an array of Observables instead */
export declare function forkJoin<T, T2>(v1: ObservableInput<T>, v2: ObservableInput<T2>): Observable<[T, T2]>;
/** @deprecated Use the version that takes an array of Observables instead */
export declare function forkJoin<T, T2, T3>(v1: ObservableInput<T>, v2: ObservableInput<T2>, v3: ObservableInput<T3>): Observable<[T, T2, T3]>;
/** @deprecated Use the version that takes an array of Observables instead */
export declare function forkJoin<T, T2, T3, T4>(v1: ObservableInput<T>, v2: ObservableInput<T2>, v3: ObservableInput<T3>, v4: ObservableInput<T4>): Observable<[T, T2, T3, T4]>;
/** @deprecated Use the version that takes an array of Observables instead */
export declare function forkJoin<T, T2, T3, T4, T5>(v1: ObservableInput<T>, v2: ObservableInput<T2>, v3: ObservableInput<T3>, v4: ObservableInput<T4>, v5: ObservableInput<T5>): Observable<[T, T2, T3, T4, T5]>;
/** @deprecated Use the version that takes an array of Observables instead */
export declare function forkJoin<T, T2, T3, T4, T5, T6>(v1: ObservableInput<T>, v2: ObservableInput<T2>, v3: ObservableInput<T3>, v4: ObservableInput<T4>, v5: ObservableInput<T5>, v6: ObservableInput<T6>): Observable<[T, T2, T3, T4, T5, T6]>;
export declare function forkJoin<A>(sources: [ObservableInput<A>]): Observable<[A]>;
export declare function forkJoin<A, B>(sources: [ObservableInput<A>, ObservableInput<B>]): Observable<[A, B]>;
export declare function forkJoin<A, B, C>(sources: [ObservableInput<A>, ObservableInput<B>, ObservableInput<C>]): Observable<[A, B, C]>;
export declare function forkJoin<A, B, C, D>(sources: [ObservableInput<A>, ObservableInput<B>, ObservableInput<C>, ObservableInput<D>]): Observable<[A, B, C, D]>;
export declare function forkJoin<A, B, C, D, E>(sources: [ObservableInput<A>, ObservableInput<B>, ObservableInput<C>, ObservableInput<D>, ObservableInput<E>]): Observable<[A, B, C, D, E]>;
export declare function forkJoin<A, B, C, D, E, F>(sources: [ObservableInput<A>, ObservableInput<B>, ObservableInput<C>, ObservableInput<D>, ObservableInput<E>, ObservableInput<F>]): Observable<[A, B, C, D, E, F]>;
export declare function forkJoin<A extends ObservableInput<any>[]>(sources: A): Observable<ObservedValuesFromArray<A>[]>;
export declare function forkJoin(sourcesObject: {}): Observable<never>;
export declare function forkJoin<T, K extends keyof T>(sourcesObject: T): Observable<{
[K in keyof T]: ObservedValueOf<T[K]>;
}>;
/** @deprecated resultSelector is deprecated, pipe to map instead */
export declare function forkJoin(...args: Array<ObservableInput<any> | Function>): Observable<any>;
/** @deprecated Use the version that takes an array of Observables instead */
export declare function forkJoin<T>(...sources: ObservableInput<T>[]): Observable<T[]>;

71
node_modules/rxjs/internal/observable/forkJoin.js generated vendored Normal file
View File

@ -0,0 +1,71 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("../Observable");
var isArray_1 = require("../util/isArray");
var map_1 = require("../operators/map");
var isObject_1 = require("../util/isObject");
var from_1 = require("./from");
function forkJoin() {
var sources = [];
for (var _i = 0; _i < arguments.length; _i++) {
sources[_i] = arguments[_i];
}
if (sources.length === 1) {
var first_1 = sources[0];
if (isArray_1.isArray(first_1)) {
return forkJoinInternal(first_1, null);
}
if (isObject_1.isObject(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) {
var keys = Object.keys(first_1);
return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys);
}
}
if (typeof sources[sources.length - 1] === 'function') {
var resultSelector_1 = sources.pop();
sources = (sources.length === 1 && isArray_1.isArray(sources[0])) ? sources[0] : sources;
return forkJoinInternal(sources, null).pipe(map_1.map(function (args) { return resultSelector_1.apply(void 0, args); }));
}
return forkJoinInternal(sources, null);
}
exports.forkJoin = forkJoin;
function forkJoinInternal(sources, keys) {
return new Observable_1.Observable(function (subscriber) {
var len = sources.length;
if (len === 0) {
subscriber.complete();
return;
}
var values = new Array(len);
var completed = 0;
var emitted = 0;
var _loop_1 = function (i) {
var source = from_1.from(sources[i]);
var hasValue = false;
subscriber.add(source.subscribe({
next: function (value) {
if (!hasValue) {
hasValue = true;
emitted++;
}
values[i] = value;
},
error: function (err) { return subscriber.error(err); },
complete: function () {
completed++;
if (completed === len || !hasValue) {
if (emitted === len) {
subscriber.next(keys ?
keys.reduce(function (result, key, i) { return (result[key] = values[i], result); }, {}) :
values);
}
subscriber.complete();
}
}
}));
};
for (var i = 0; i < len; i++) {
_loop_1(i);
}
});
}
//# sourceMappingURL=forkJoin.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"forkJoin.js","sources":["../../src/internal/observable/forkJoin.ts"],"names":[],"mappings":";;AAAA,4CAA2C;AAE3C,2CAA0C;AAC1C,wCAAuC;AACvC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X;wBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;gBACH,CAAC;aACF,CAAC,CAAC,CAAC;QACN,CAAC;QAxBD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;oBAAnB,CAAC;SAwBT;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}

5
node_modules/rxjs/internal/observable/from.d.ts generated vendored Normal file
View File

@ -0,0 +1,5 @@
import { Observable } from '../Observable';
import { ObservableInput, SchedulerLike, ObservedValueOf } from '../types';
export declare function from<O extends ObservableInput<any>>(input: O): Observable<ObservedValueOf<O>>;
/** @deprecated use {@link scheduled} instead. */
export declare function from<O extends ObservableInput<any>>(input: O, scheduler: SchedulerLike): Observable<ObservedValueOf<O>>;

18
node_modules/rxjs/internal/observable/from.js generated vendored Normal file
View File

@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("../Observable");
var subscribeTo_1 = require("../util/subscribeTo");
var scheduled_1 = require("../scheduled/scheduled");
function from(input, scheduler) {
if (!scheduler) {
if (input instanceof Observable_1.Observable) {
return input;
}
return new Observable_1.Observable(subscribeTo_1.subscribeTo(input));
}
else {
return scheduled_1.scheduled(input, scheduler);
}
}
exports.from = from;
//# sourceMappingURL=from.js.map

1
node_modules/rxjs/internal/observable/from.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"from.js","sources":["../../src/internal/observable/from.ts"],"names":[],"mappings":";;AAAA,4CAA2C;AAC3C,mDAAkD;AAElD,oDAAmD;AAyGnD,SAAgB,IAAI,CAAI,KAAyB,EAAE,SAAyB;IAC1E,IAAI,CAAC,SAAS,EAAE;QACd,IAAI,KAAK,YAAY,uBAAU,EAAE;YAC/B,OAAO,KAAK,CAAC;SACd;QACD,OAAO,IAAI,uBAAU,CAAI,yBAAW,CAAC,KAAK,CAAC,CAAC,CAAC;KAC9C;SAAM;QACL,OAAO,qBAAS,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;KACpC;AACH,CAAC;AATD,oBASC"}

3
node_modules/rxjs/internal/observable/fromArray.d.ts generated vendored Normal file
View File

@ -0,0 +1,3 @@
import { Observable } from '../Observable';
import { SchedulerLike } from '../types';
export declare function fromArray<T>(input: ArrayLike<T>, scheduler?: SchedulerLike): Observable<T>;

15
node_modules/rxjs/internal/observable/fromArray.js generated vendored Normal file
View File

@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("../Observable");
var subscribeToArray_1 = require("../util/subscribeToArray");
var scheduleArray_1 = require("../scheduled/scheduleArray");
function fromArray(input, scheduler) {
if (!scheduler) {
return new Observable_1.Observable(subscribeToArray_1.subscribeToArray(input));
}
else {
return scheduleArray_1.scheduleArray(input, scheduler);
}
}
exports.fromArray = fromArray;
//# sourceMappingURL=fromArray.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"fromArray.js","sources":["../../src/internal/observable/fromArray.ts"],"names":[],"mappings":";;AAAA,4CAA2C;AAE3C,6DAA4D;AAC5D,4DAA2D;AAE3D,SAAgB,SAAS,CAAI,KAAmB,EAAE,SAAyB;IACzE,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,IAAI,uBAAU,CAAI,mCAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;KACnD;SAAM;QACL,OAAO,6BAAa,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;KACxC;AACH,CAAC;AAND,8BAMC"}

35
node_modules/rxjs/internal/observable/fromEvent.d.ts generated vendored Normal file
View File

@ -0,0 +1,35 @@
import { Observable } from '../Observable';
export interface NodeStyleEventEmitter {
addListener: (eventName: string | symbol, handler: NodeEventHandler) => this;
removeListener: (eventName: string | symbol, handler: NodeEventHandler) => this;
}
export declare type NodeEventHandler = (...args: any[]) => void;
export interface NodeCompatibleEventEmitter {
addListener: (eventName: string, handler: NodeEventHandler) => void | {};
removeListener: (eventName: string, handler: NodeEventHandler) => void | {};
}
export interface JQueryStyleEventEmitter {
on: (eventName: string, handler: Function) => void;
off: (eventName: string, handler: Function) => void;
}
export interface HasEventTargetAddRemove<E> {
addEventListener(type: string, listener: ((evt: E) => void) | null, options?: boolean | AddEventListenerOptions): void;
removeEventListener(type: string, listener?: ((evt: E) => void) | null, options?: EventListenerOptions | boolean): void;
}
export declare type EventTargetLike<T> = HasEventTargetAddRemove<T> | NodeStyleEventEmitter | NodeCompatibleEventEmitter | JQueryStyleEventEmitter;
export declare type FromEventTarget<T> = EventTargetLike<T> | ArrayLike<EventTargetLike<T>>;
export interface EventListenerOptions {
capture?: boolean;
passive?: boolean;
once?: boolean;
}
export interface AddEventListenerOptions extends EventListenerOptions {
once?: boolean;
passive?: boolean;
}
export declare function fromEvent<T>(target: FromEventTarget<T>, eventName: string): Observable<T>;
/** @deprecated resultSelector no longer supported, pipe to map instead */
export declare function fromEvent<T>(target: FromEventTarget<T>, eventName: string, resultSelector: (...args: any[]) => T): Observable<T>;
export declare function fromEvent<T>(target: FromEventTarget<T>, eventName: string, options: EventListenerOptions): Observable<T>;
/** @deprecated resultSelector no longer supported, pipe to map instead */
export declare function fromEvent<T>(target: FromEventTarget<T>, eventName: string, options: EventListenerOptions, resultSelector: (...args: any[]) => T): Observable<T>;

65
node_modules/rxjs/internal/observable/fromEvent.js generated vendored Normal file
View File

@ -0,0 +1,65 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("../Observable");
var isArray_1 = require("../util/isArray");
var isFunction_1 = require("../util/isFunction");
var map_1 = require("../operators/map");
var toString = (function () { return Object.prototype.toString; })();
function fromEvent(target, eventName, options, resultSelector) {
if (isFunction_1.isFunction(options)) {
resultSelector = options;
options = undefined;
}
if (resultSelector) {
return fromEvent(target, eventName, options).pipe(map_1.map(function (args) { return isArray_1.isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
}
return new Observable_1.Observable(function (subscriber) {
function handler(e) {
if (arguments.length > 1) {
subscriber.next(Array.prototype.slice.call(arguments));
}
else {
subscriber.next(e);
}
}
setupSubscription(target, eventName, handler, subscriber, options);
});
}
exports.fromEvent = fromEvent;
function setupSubscription(sourceObj, eventName, handler, subscriber, options) {
var unsubscribe;
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 if (sourceObj && sourceObj.length) {
for (var i = 0, len = sourceObj.length; i < len; i++) {
setupSubscription(sourceObj[i], eventName, handler, subscriber, options);
}
}
else {
throw new TypeError('Invalid event target');
}
subscriber.add(unsubscribe);
}
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 isEventTarget(sourceObj) {
return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';
}
//# sourceMappingURL=fromEvent.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"fromEvent.js","sources":["../../src/internal/observable/fromEvent.ts"],"names":[],"mappings":";;AAAA,4CAA2C;AAC3C,2CAA0C;AAC1C,iDAAgD;AAEhD,wCAAuC;AAEvC,IAAM,QAAQ,GAAa,CAAC,cAAM,OAAA,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAzB,CAAyB,CAAC,EAAE,CAAC;AA0K/D,SAAgB,SAAS,CACvB,MAA0B,EAC1B,SAAiB,EACjB,OAAwD,EACxD,cAAwC;IAGxC,IAAI,uBAAU,CAAC,OAAO,CAAC,EAAE;QAEvB,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AAK,UAAU,IAAI,OAAO,SAAS,CAAC,mBAAmB,KAAK,UAAU,CAAC;AAC9H,CAAC"}

View File

@ -0,0 +1,5 @@
import { Observable } from '../Observable';
import { NodeEventHandler } from './fromEvent';
export declare function fromEventPattern<T>(addHandler: (handler: NodeEventHandler) => any, removeHandler?: (handler: NodeEventHandler, signal?: any) => void): Observable<T>;
/** @deprecated resultSelector no longer supported, pipe to map instead */
export declare function fromEventPattern<T>(addHandler: (handler: NodeEventHandler) => any, removeHandler?: (handler: NodeEventHandler, signal?: any) => void, resultSelector?: (...args: any[]) => T): Observable<T>;

Some files were not shown because too many files have changed in this diff Show More