Socket
Socket
Sign inDemoInstall

rxjs

Package Overview
Dependencies
1
Maintainers
3
Versions
165
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.0.0-alpha.7 to 8.0.0-alpha.8

44

dist/cjs/index.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -13,10 +17,8 @@ if (k2 === undefined) k2 = k;

Object.defineProperty(exports, "__esModule", { value: true });
exports.onErrorResumeNext = exports.of = exports.merge = exports.interval = exports.iif = exports.generate = exports.fromEventPattern = exports.fromEvent = exports.from = exports.forkJoin = exports.defer = exports.connectable = exports.concat = exports.combineLatest = exports.bindNodeCallback = exports.bindCallback = exports.UnsubscriptionError = exports.TimeoutError = exports.SequenceError = exports.ObjectUnsubscribedError = exports.NotFoundError = exports.EmptyError = exports.ArgumentOutOfRangeError = exports.firstValueFrom = exports.lastValueFrom = exports.isObservable = exports.identity = exports.noop = exports.pipe = exports.Subscriber = exports.Subscription = exports.Scheduler = exports.VirtualAction = exports.VirtualTimeScheduler = exports.animationFrameScheduler = exports.animationFrame = exports.queueScheduler = exports.queue = exports.asyncScheduler = exports.async = exports.asapScheduler = exports.asap = exports.AsyncSubject = exports.ReplaySubject = exports.BehaviorSubject = exports.Subject = exports.animationFrames = exports.observable = exports.ConnectableObservable = exports.Observable = void 0;
exports.first = exports.findIndex = exports.find = exports.finalize = exports.filter = exports.expand = exports.exhaustMap = exports.exhaustAll = exports.exhaust = exports.every = exports.endWith = exports.elementAt = exports.distinctUntilKeyChanged = exports.distinctUntilChanged = exports.distinct = exports.dematerialize = exports.delayWhen = exports.delay = exports.defaultIfEmpty = exports.debounceTime = exports.debounce = exports.count = exports.connect = exports.concatWith = exports.concatMapTo = exports.concatMap = exports.concatAll = exports.combineLatestWith = exports.combineLatestAll = exports.combineAll = exports.catchError = exports.bufferWhen = exports.bufferToggle = exports.bufferTime = exports.bufferCount = exports.buffer = exports.auditTime = exports.audit = exports.config = exports.NEVER = exports.EMPTY = exports.scheduled = exports.zip = exports.using = exports.timer = exports.throwError = exports.range = exports.race = exports.partition = exports.pairs = void 0;
exports.takeLast = exports.take = exports.switchScan = exports.switchMapTo = exports.switchMap = exports.switchAll = exports.subscribeOn = exports.startWith = exports.skipWhile = exports.skipUntil = exports.skipLast = exports.skip = exports.single = exports.shareReplay = exports.share = exports.sequenceEqual = exports.scan = exports.sampleTime = exports.sample = exports.refCount = exports.retryWhen = exports.retry = exports.repeatWhen = exports.repeat = exports.reduce = exports.raceWith = exports.publishReplay = exports.publishLast = exports.publishBehavior = exports.publish = exports.pluck = exports.pairwise = exports.onErrorResumeNextWith = exports.observeOn = exports.multicast = exports.min = exports.mergeWith = exports.mergeScan = exports.mergeMapTo = exports.mergeMap = exports.flatMap = exports.mergeAll = exports.max = exports.materialize = exports.mapTo = exports.map = exports.last = exports.isEmpty = exports.ignoreElements = exports.groupBy = void 0;
exports.zipWith = exports.zipAll = exports.withLatestFrom = exports.windowWhen = exports.windowToggle = exports.windowTime = exports.windowCount = exports.window = exports.toArray = exports.timestamp = exports.timeoutWith = exports.timeout = exports.timeInterval = exports.throwIfEmpty = exports.throttleTime = exports.throttle = exports.tap = exports.takeWhile = exports.takeUntil = void 0;
exports.using = exports.timer = exports.throwError = exports.range = exports.race = exports.partition = exports.onErrorResumeNext = exports.of = exports.merge = exports.interval = exports.iif = exports.generate = exports.fromEventPattern = exports.fromEvent = exports.from = exports.forkJoin = exports.defer = exports.connectable = exports.concat = exports.combineLatest = exports.bindNodeCallback = exports.bindCallback = exports.UnsubscriptionError = exports.TimeoutError = exports.SequenceError = exports.NotFoundError = exports.EmptyError = exports.ArgumentOutOfRangeError = exports.firstValueFrom = exports.lastValueFrom = exports.isObservable = exports.identity = exports.noop = exports.pipe = exports.Subscriber = exports.Subscription = exports.Scheduler = exports.VirtualAction = exports.VirtualTimeScheduler = exports.animationFrameScheduler = exports.queueScheduler = exports.asyncScheduler = exports.asapScheduler = exports.AsyncSubject = exports.ReplaySubject = exports.BehaviorSubject = exports.Subject = exports.animationFrames = exports.observable = exports.Observable = void 0;
exports.mergeAll = exports.max = exports.materialize = exports.mapTo = exports.map = exports.last = exports.isEmpty = exports.ignoreElements = exports.groupBy = exports.first = exports.findIndex = exports.find = exports.finalize = exports.filter = exports.expand = exports.exhaustMap = exports.exhaustAll = exports.every = exports.endWith = exports.elementAt = exports.distinctUntilKeyChanged = exports.distinctUntilChanged = exports.distinct = exports.dematerialize = exports.delayWhen = exports.delay = exports.defaultIfEmpty = exports.debounceTime = exports.debounce = exports.count = exports.connect = exports.concatWith = exports.concatMapTo = exports.concatMap = exports.concatAll = exports.combineLatestWith = exports.combineLatestAll = exports.catchError = exports.bufferWhen = exports.bufferToggle = exports.bufferTime = exports.bufferCount = exports.buffer = exports.auditTime = exports.audit = exports.config = exports.NEVER = exports.EMPTY = exports.scheduled = exports.zip = void 0;
exports.withLatestFrom = exports.windowWhen = exports.windowToggle = exports.windowTime = exports.windowCount = exports.window = exports.toArray = exports.timestamp = exports.timeoutWith = exports.timeout = exports.timeInterval = exports.throwIfEmpty = exports.throttleTime = exports.throttle = exports.tap = exports.takeWhile = exports.takeUntil = exports.takeLast = exports.take = exports.switchScan = exports.switchMapTo = exports.switchMap = exports.switchAll = exports.subscribeOn = exports.startWith = exports.skipWhile = exports.skipUntil = exports.skipLast = exports.skip = exports.single = exports.shareReplay = exports.share = exports.sequenceEqual = exports.scan = exports.sampleTime = exports.sample = exports.retryWhen = exports.retry = exports.repeatWhen = exports.repeat = exports.reduce = exports.raceWith = exports.pairwise = exports.onErrorResumeNextWith = exports.observeOn = exports.min = exports.mergeWith = exports.mergeScan = exports.mergeMapTo = exports.mergeMap = void 0;
exports.zipWith = exports.zipAll = void 0;
var Observable_1 = require("./internal/Observable");
Object.defineProperty(exports, "Observable", { enumerable: true, get: function () { return Observable_1.Observable; } });
var ConnectableObservable_1 = require("./internal/observable/ConnectableObservable");
Object.defineProperty(exports, "ConnectableObservable", { enumerable: true, get: function () { return ConnectableObservable_1.ConnectableObservable; } });
var observable_1 = require("./internal/symbol/observable");

@@ -35,12 +37,8 @@ Object.defineProperty(exports, "observable", { enumerable: true, get: function () { return observable_1.observable; } });

var asap_1 = require("./internal/scheduler/asap");
Object.defineProperty(exports, "asap", { enumerable: true, get: function () { return asap_1.asap; } });
Object.defineProperty(exports, "asapScheduler", { enumerable: true, get: function () { return asap_1.asapScheduler; } });
var async_1 = require("./internal/scheduler/async");
Object.defineProperty(exports, "async", { enumerable: true, get: function () { return async_1.async; } });
Object.defineProperty(exports, "asyncScheduler", { enumerable: true, get: function () { return async_1.asyncScheduler; } });
var queue_1 = require("./internal/scheduler/queue");
Object.defineProperty(exports, "queue", { enumerable: true, get: function () { return queue_1.queue; } });
Object.defineProperty(exports, "queueScheduler", { enumerable: true, get: function () { return queue_1.queueScheduler; } });
var animationFrame_1 = require("./internal/scheduler/animationFrame");
Object.defineProperty(exports, "animationFrame", { enumerable: true, get: function () { return animationFrame_1.animationFrame; } });
Object.defineProperty(exports, "animationFrameScheduler", { enumerable: true, get: function () { return animationFrame_1.animationFrameScheduler; } });

@@ -74,4 +72,2 @@ var VirtualTimeScheduler_1 = require("./internal/scheduler/VirtualTimeScheduler");

Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return NotFoundError_1.NotFoundError; } });
var ObjectUnsubscribedError_1 = require("./internal/util/ObjectUnsubscribedError");
Object.defineProperty(exports, "ObjectUnsubscribedError", { enumerable: true, get: function () { return ObjectUnsubscribedError_1.ObjectUnsubscribedError; } });
var SequenceError_1 = require("./internal/util/SequenceError");

@@ -115,4 +111,2 @@ Object.defineProperty(exports, "SequenceError", { enumerable: true, get: function () { return SequenceError_1.SequenceError; } });

Object.defineProperty(exports, "onErrorResumeNext", { enumerable: true, get: function () { return onErrorResumeNext_1.onErrorResumeNext; } });
var pairs_1 = require("./internal/observable/pairs");
Object.defineProperty(exports, "pairs", { enumerable: true, get: function () { return pairs_1.pairs; } });
var partition_1 = require("./internal/observable/partition");

@@ -157,4 +151,2 @@ Object.defineProperty(exports, "partition", { enumerable: true, get: function () { return partition_1.partition; } });

Object.defineProperty(exports, "catchError", { enumerable: true, get: function () { return catchError_1.catchError; } });
var combineAll_1 = require("./internal/operators/combineAll");
Object.defineProperty(exports, "combineAll", { enumerable: true, get: function () { return combineAll_1.combineAll; } });
var combineLatestAll_1 = require("./internal/operators/combineLatestAll");

@@ -200,4 +192,2 @@ Object.defineProperty(exports, "combineLatestAll", { enumerable: true, get: function () { return combineLatestAll_1.combineLatestAll; } });

Object.defineProperty(exports, "every", { enumerable: true, get: function () { return every_1.every; } });
var exhaust_1 = require("./internal/operators/exhaust");
Object.defineProperty(exports, "exhaust", { enumerable: true, get: function () { return exhaust_1.exhaust; } });
var exhaustAll_1 = require("./internal/operators/exhaustAll");

@@ -237,4 +227,2 @@ Object.defineProperty(exports, "exhaustAll", { enumerable: true, get: function () { return exhaustAll_1.exhaustAll; } });

Object.defineProperty(exports, "mergeAll", { enumerable: true, get: function () { return mergeAll_1.mergeAll; } });
var flatMap_1 = require("./internal/operators/flatMap");
Object.defineProperty(exports, "flatMap", { enumerable: true, get: function () { return flatMap_1.flatMap; } });
var mergeMap_1 = require("./internal/operators/mergeMap");

@@ -250,4 +238,2 @@ Object.defineProperty(exports, "mergeMap", { enumerable: true, get: function () { return mergeMap_1.mergeMap; } });

Object.defineProperty(exports, "min", { enumerable: true, get: function () { return min_1.min; } });
var multicast_1 = require("./internal/operators/multicast");
Object.defineProperty(exports, "multicast", { enumerable: true, get: function () { return multicast_1.multicast; } });
var observeOn_1 = require("./internal/operators/observeOn");

@@ -259,12 +245,2 @@ Object.defineProperty(exports, "observeOn", { enumerable: true, get: function () { return observeOn_1.observeOn; } });

Object.defineProperty(exports, "pairwise", { enumerable: true, get: function () { return pairwise_1.pairwise; } });
var pluck_1 = require("./internal/operators/pluck");
Object.defineProperty(exports, "pluck", { enumerable: true, get: function () { return pluck_1.pluck; } });
var publish_1 = require("./internal/operators/publish");
Object.defineProperty(exports, "publish", { enumerable: true, get: function () { return publish_1.publish; } });
var publishBehavior_1 = require("./internal/operators/publishBehavior");
Object.defineProperty(exports, "publishBehavior", { enumerable: true, get: function () { return publishBehavior_1.publishBehavior; } });
var publishLast_1 = require("./internal/operators/publishLast");
Object.defineProperty(exports, "publishLast", { enumerable: true, get: function () { return publishLast_1.publishLast; } });
var publishReplay_1 = require("./internal/operators/publishReplay");
Object.defineProperty(exports, "publishReplay", { enumerable: true, get: function () { return publishReplay_1.publishReplay; } });
var raceWith_1 = require("./internal/operators/raceWith");

@@ -282,4 +258,2 @@ Object.defineProperty(exports, "raceWith", { enumerable: true, get: function () { return raceWith_1.raceWith; } });

Object.defineProperty(exports, "retryWhen", { enumerable: true, get: function () { return retryWhen_1.retryWhen; } });
var refCount_1 = require("./internal/operators/refCount");
Object.defineProperty(exports, "refCount", { enumerable: true, get: function () { return refCount_1.refCount; } });
var sample_1 = require("./internal/operators/sample");

@@ -286,0 +260,0 @@ Object.defineProperty(exports, "sample", { enumerable: true, get: function () { return sample_1.sample; } });

@@ -20,19 +20,19 @@ "use strict";

function ajaxGet(url, headers) {
return exports.ajax({ method: 'GET', url: url, headers: headers });
return (0, exports.ajax)({ method: 'GET', url: url, headers: headers });
}
function ajaxPost(url, body, headers) {
return exports.ajax({ method: 'POST', url: url, body: body, headers: headers });
return (0, exports.ajax)({ method: 'POST', url: url, body: body, headers: headers });
}
function ajaxDelete(url, headers) {
return exports.ajax({ method: 'DELETE', url: url, headers: headers });
return (0, exports.ajax)({ method: 'DELETE', url: url, headers: headers });
}
function ajaxPut(url, body, headers) {
return exports.ajax({ method: 'PUT', url: url, body: body, headers: headers });
return (0, exports.ajax)({ method: 'PUT', url: url, body: body, headers: headers });
}
function ajaxPatch(url, body, headers) {
return exports.ajax({ method: 'PATCH', url: url, body: body, headers: headers });
return (0, exports.ajax)({ method: 'PATCH', url: url, body: body, headers: headers });
}
var mapResponse = map_1.map(function (x) { return x.response; });
var mapResponse = (0, map_1.map)(function (x) { return x.response; });
function ajaxGetJSON(url, headers) {
return mapResponse(exports.ajax({
return mapResponse((0, exports.ajax)({
method: 'GET',

@@ -104,3 +104,3 @@ url: url,

if ((withCredentials || !crossDomain) && xsrfCookieName && xsrfHeaderName) {
var xsrfCookie = (_b = (_a = document === null || document === void 0 ? void 0 : document.cookie.match(new RegExp("(^|;\\s*)(" + xsrfCookieName + ")=([^;]*)"))) === null || _a === void 0 ? void 0 : _a.pop()) !== null && _b !== void 0 ? _b : '';
var xsrfCookie = (_b = (_a = document === null || document === void 0 ? void 0 : document.cookie.match(new RegExp("(^|;\\s*)(".concat(xsrfCookieName, ")=([^;]*)")))) === null || _a === void 0 ? void 0 : _a.pop()) !== null && _b !== void 0 ? _b : '';
if (xsrfCookie) {

@@ -111,5 +111,3 @@ headers[xsrfHeaderName] = xsrfCookie;

var body = extractContentTypeAndMaybeSerializeBody(configuredBody, headers);
var _request = __assign(__assign({}, config), { url: url,
headers: headers,
body: body });
var _request = __assign(__assign({}, config), { url: url, headers: headers, body: body });
var xhr;

@@ -130,3 +128,3 @@ xhr = init.createXHR ? init.createXHR() : new XMLHttpRequest();

var createResponse_1 = function (direction, event) {
return new AjaxResponse_1.AjaxResponse(event, xhr, _request, direction + "_" + event.type);
return new AjaxResponse_1.AjaxResponse(event, xhr, _request, "".concat(direction, "_").concat(event.type));
};

@@ -161,11 +159,3 @@ var addProgressEvent_1 = function (target, type, direction) {

(_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.complete) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1);
var response = void 0;
try {
response = createResponse_1(DOWNLOAD, event);
}
catch (err) {
destination.error(err);
return;
}
destination.next(response);
destination.next(createResponse_1(DOWNLOAD, event));
destination.complete();

@@ -235,3 +225,3 @@ }

function toStringCheck(obj, name) {
return _toString.call(obj) === "[object " + name + "]";
return _toString.call(obj) === "[object ".concat(name, "]");
}

@@ -238,0 +228,0 @@ function isArrayBuffer(body) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AjaxResponse = void 0;
var getXHRResponse_1 = require("./getXHRResponse");
var AjaxResponse = (function () {

@@ -24,3 +23,3 @@ function AjaxResponse(originalEvent, xhr, request, type) {

: {};
this.response = getXHRResponse_1.getXHRResponse(xhr);
this.response = xhr.response;
var loaded = originalEvent.loaded, total = originalEvent.total;

@@ -27,0 +26,0 @@ this.loaded = loaded;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AjaxTimeoutError = exports.AjaxError = void 0;
var getXHRResponse_1 = require("./getXHRResponse");
var createErrorClass_1 = require("../util/createErrorClass");
exports.AjaxError = createErrorClass_1.createErrorClass(function (_super) {
exports.AjaxError = (0, createErrorClass_1.createErrorClass)(function (_super) {
return function AjaxErrorImpl(message, xhr, request) {

@@ -14,10 +13,3 @@ this.message = message;

this.responseType = xhr.responseType;
var response;
try {
response = getXHRResponse_1.getXHRResponse(xhr);
}
catch (err) {
response = xhr.responseText;
}
this.response = response;
this.response = xhr.response;
};

@@ -24,0 +16,0 @@ });

@@ -30,7 +30,7 @@ "use strict";

AsyncSubject.prototype._checkFinalizedStatuses = function (subscriber) {
var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, isStopped = _a.isStopped, _isComplete = _a._isComplete;
var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, _closed = _a._closed, _isComplete = _a._isComplete;
if (hasError) {
subscriber.error(thrownError);
}
else if (isStopped || _isComplete) {
else if (_closed || _isComplete) {
_hasValue && subscriber.next(_value);

@@ -41,3 +41,3 @@ subscriber.complete();

AsyncSubject.prototype.next = function (value) {
if (!this.isStopped) {
if (!this._closed) {
this._value = value;

@@ -44,0 +44,0 @@ this._hasValue = true;

@@ -44,3 +44,2 @@ "use strict";

}
this._throwIfClosed();
return _value;

@@ -47,0 +46,0 @@ };

@@ -13,19 +13,5 @@ "use strict";

}
Observable.prototype.lift = function (operator) {
var observable = new Observable();
observable.source = this;
observable.operator = operator;
return observable;
};
Observable.prototype.subscribe = function (observerOrNext) {
var subscriber = Subscriber_1.isSubscriber(observerOrNext) ? observerOrNext : new Subscriber_1.Subscriber(observerOrNext);
var _a = this, operator = _a.operator, source = _a.source;
subscriber.add(operator
?
operator.call(subscriber, source)
: source
?
this._subscribe(subscriber)
:
this._trySubscribe(subscriber));
var subscriber = observerOrNext instanceof Subscriber_1.Subscriber ? observerOrNext : new Subscriber_1.Subscriber(observerOrNext);
subscriber.add(this._trySubscribe(subscriber));
return subscriber;

@@ -60,5 +46,4 @@ };

};
Observable.prototype._subscribe = function (subscriber) {
var _a;
return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);
Observable.prototype._subscribe = function (_subscriber) {
return;
};

@@ -73,3 +58,3 @@ Observable.prototype[observable_1.observable] = function () {

}
return pipe_1.pipeFromArray(operations)(this);
return (0, pipe_1.pipeFromArray)(operations)(this);
};

@@ -76,0 +61,0 @@ return Observable;

@@ -6,5 +6,5 @@ "use strict";

function bindCallback(callbackFunc, resultSelector, scheduler) {
return bindCallbackInternals_1.bindCallbackInternals(false, callbackFunc, resultSelector, scheduler);
return (0, bindCallbackInternals_1.bindCallbackInternals)(false, callbackFunc, resultSelector, scheduler);
}
exports.bindCallback = bindCallback;
//# sourceMappingURL=bindCallback.js.map

@@ -18,6 +18,10 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};

@@ -34,3 +38,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

if (resultSelector) {
if (isScheduler_1.isScheduler(resultSelector)) {
if ((0, isScheduler_1.isScheduler)(resultSelector)) {
scheduler = resultSelector;

@@ -46,3 +50,3 @@ }

.apply(this, args)
.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector));
.pipe((0, mapOneOrManyArgs_1.mapOneOrManyArgs)(resultSelector));
};

@@ -59,3 +63,3 @@ }

.apply(this, args)
.pipe(subscribeOn_1.subscribeOn(scheduler), observeOn_1.observeOn(scheduler));
.pipe((0, subscribeOn_1.subscribeOn)(scheduler), (0, observeOn_1.observeOn)(scheduler));
};

@@ -77,3 +81,3 @@ }

var isComplete_1 = false;
callbackFunc.apply(_this, __spreadArray(__spreadArray([], __read(args)), [
callbackFunc.apply(_this, __spreadArray(__spreadArray([], __read(args), false), [
function () {

@@ -97,3 +101,3 @@ var results = [];

},
]));
], false));
if (isComplete_1) {

@@ -100,0 +104,0 @@ subject.complete();

@@ -6,5 +6,5 @@ "use strict";

function bindNodeCallback(callbackFunc, resultSelector, scheduler) {
return bindCallbackInternals_1.bindCallbackInternals(true, callbackFunc, resultSelector, scheduler);
return (0, bindCallbackInternals_1.bindCallbackInternals)(true, callbackFunc, resultSelector, scheduler);
}
exports.bindNodeCallback = bindNodeCallback;
//# sourceMappingURL=bindNodeCallback.js.map
"use strict";
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -6,71 +31,54 @@ exports.combineLatestInit = exports.combineLatest = void 0;

var argsArgArrayOrObject_1 = require("../util/argsArgArrayOrObject");
var from_1 = require("./from");
var identity_1 = require("../util/identity");
var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs");
var args_1 = require("../util/args");
var createObject_1 = require("../util/createObject");
var OperatorSubscriber_1 = require("../operators/OperatorSubscriber");
var executeSchedule_1 = require("../util/executeSchedule");
function combineLatest() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
var empty_1 = require("./empty");
var from_1 = require("./from");
function combineLatest(sources, resultSelector) {
var parts = (0, argsArgArrayOrObject_1.arrayOrObject)(sources);
if (!parts) {
throw new TypeError('sources must be an array or object');
}
var scheduler = args_1.popScheduler(args);
var resultSelector = args_1.popResultSelector(args);
var _a = argsArgArrayOrObject_1.argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys;
var observables = parts.args, keys = parts.keys;
if (observables.length === 0) {
return from_1.from([], scheduler);
return empty_1.EMPTY;
}
var result = new Observable_1.Observable(combineLatestInit(observables, scheduler, keys
?
function (values) { return createObject_1.createObject(keys, values); }
:
identity_1.identity));
return resultSelector ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : result;
return new Observable_1.Observable(combineLatestInit(observables, keys
? function (values) { return (0, createObject_1.createObject)(keys, values); }
: resultSelector
? function (values) { return resultSelector.apply(void 0, __spreadArray([], __read(values), false)); }
: identity_1.identity));
}
exports.combineLatest = combineLatest;
function combineLatestInit(observables, scheduler, valueTransform) {
function combineLatestInit(observables, valueTransform) {
if (valueTransform === void 0) { valueTransform = identity_1.identity; }
return function (subscriber) {
maybeSchedule(scheduler, function () {
var length = observables.length;
var values = new Array(length);
var active = length;
var remainingFirstValues = length;
var _loop_1 = function (i) {
maybeSchedule(scheduler, function () {
var source = from_1.from(observables[i], scheduler);
var hasFirstValue = false;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
values[i] = value;
if (!hasFirstValue) {
hasFirstValue = true;
remainingFirstValues--;
}
if (!remainingFirstValues) {
subscriber.next(valueTransform(values.slice()));
}
}, function () {
if (!--active) {
subscriber.complete();
}
}));
}, subscriber);
};
for (var i = 0; i < length; i++) {
_loop_1(i);
}
}, subscriber);
var length = observables.length;
var values = new Array(length);
var active = length;
var remainingFirstValues = length;
var _loop_1 = function (i) {
var source = (0, from_1.from)(observables[i]);
var hasFirstValue = false;
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
values[i] = value;
if (!hasFirstValue) {
hasFirstValue = true;
remainingFirstValues--;
}
if (!remainingFirstValues) {
subscriber.next(valueTransform(Array.from(values)));
}
}, function () {
if (!--active) {
subscriber.complete();
}
}));
};
for (var i = 0; i < length; i++) {
_loop_1(i);
}
};
}
exports.combineLatestInit = combineLatestInit;
function maybeSchedule(scheduler, execute, subscription) {
if (scheduler) {
executeSchedule_1.executeSchedule(subscription, scheduler, execute);
}
else {
execute();
}
}
//# sourceMappingURL=combineLatest.js.map

@@ -6,2 +6,3 @@ "use strict";

var args_1 = require("../util/args");
var scheduled_1 = require("../scheduled/scheduled");
var from_1 = require("./from");

@@ -13,5 +14,6 @@ function concat() {

}
return concatAll_1.concatAll()(from_1.from(args, args_1.popScheduler(args)));
var scheduler = (0, args_1.popScheduler)(args);
return (0, concatAll_1.concatAll)()(scheduler ? (0, scheduled_1.scheduled)(args, scheduler) : (0, from_1.from)(args));
}
exports.concat = concat;
//# sourceMappingURL=concat.js.map

@@ -21,3 +21,3 @@ "use strict";

if (!connection || connection.closed) {
connection = defer_1.defer(function () { return source; }).subscribe(subject);
connection = (0, defer_1.defer)(function () { return source; }).subscribe(subject);
if (resetOnDisconnect) {

@@ -24,0 +24,0 @@ connection.add(function () { return (subject = connector()); });

@@ -5,6 +5,6 @@ "use strict";

var Observable_1 = require("../Observable");
var innerFrom_1 = require("./innerFrom");
var from_1 = require("./from");
function defer(observableFactory) {
return new Observable_1.Observable(function (subscriber) {
innerFrom_1.innerFrom(observableFactory()).subscribe(subscriber);
(0, from_1.from)(observableFactory()).subscribe(subscriber);
});

@@ -11,0 +11,0 @@ }

@@ -28,3 +28,3 @@ "use strict";

var Observable_1 = require("../../Observable");
var innerFrom_1 = require("../../observable/innerFrom");
var from_1 = require("../from");
function fromFetch(input, initWithSelector) {

@@ -60,3 +60,3 @@ if (initWithSelector === void 0) { initWithSelector = {}; }

if (selector) {
innerFrom_1.innerFrom(selector(response)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, function () {
(0, from_1.from)(selector(response)).subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, undefined, function () {
abortable = false;

@@ -63,0 +63,0 @@ subscriber.complete();

@@ -48,3 +48,3 @@ "use strict";

_this.destination = destination;
_this.source = urlConfigOrSource;
_this._source = urlConfigOrSource;
}

@@ -74,11 +74,5 @@ else {

}
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) {
if (!this._source) {
this.destination = new ReplaySubject_1.ReplaySubject();

@@ -225,5 +219,5 @@ }

var _this = this;
var source = this.source;
if (source) {
return source.subscribe(subscriber);
var _source = this._source;
if (_source) {
return _source.subscribe(subscriber);
}

@@ -230,0 +224,0 @@ if (!this._socket) {

@@ -6,3 +6,3 @@ "use strict";

var argsArgArrayOrObject_1 = require("../util/argsArgArrayOrObject");
var innerFrom_1 = require("./innerFrom");
var from_1 = require("./from");
var args_1 = require("../util/args");

@@ -17,4 +17,4 @@ var OperatorSubscriber_1 = require("../operators/OperatorSubscriber");

}
var resultSelector = args_1.popResultSelector(args);
var _a = argsArgArrayOrObject_1.argsArgArrayOrObject(args), sources = _a.args, keys = _a.keys;
var resultSelector = (0, args_1.popResultSelector)(args);
var _a = (0, argsArgArrayOrObject_1.argsArgArrayOrObject)(args), sources = _a.args, keys = _a.keys;
var result = new Observable_1.Observable(function (subscriber) {

@@ -31,3 +31,3 @@ var length = sources.length;

var hasValue = false;
innerFrom_1.innerFrom(sources[sourceIndex]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
(0, from_1.from)(sources[sourceIndex]).subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
if (!hasValue) {

@@ -41,3 +41,3 @@ hasValue = true;

if (!remainingEmissions) {
subscriber.next(keys ? createObject_1.createObject(keys, values) : values);
subscriber.next(keys ? (0, createObject_1.createObject)(keys, values) : values);
}

@@ -52,5 +52,5 @@ subscriber.complete();

});
return resultSelector ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : result;
return resultSelector ? result.pipe((0, mapOneOrManyArgs_1.mapOneOrManyArgs)(resultSelector)) : result;
}
exports.forkJoin = forkJoin;
//# sourceMappingURL=forkJoin.js.map
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __asyncValues = (this && this.__asyncValues) || function (o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.from = void 0;
var scheduled_1 = require("../scheduled/scheduled");
var innerFrom_1 = require("./innerFrom");
function from(input, scheduler) {
return scheduler ? scheduled_1.scheduled(input, scheduler) : innerFrom_1.innerFrom(input);
exports.subscribeToArray = exports.fromArrayLike = exports.from = void 0;
var isArrayLike_1 = require("../util/isArrayLike");
var isPromise_1 = require("../util/isPromise");
var Observable_1 = require("../Observable");
var isInteropObservable_1 = require("../util/isInteropObservable");
var isAsyncIterable_1 = require("../util/isAsyncIterable");
var throwUnobservableError_1 = require("../util/throwUnobservableError");
var isIterable_1 = require("../util/isIterable");
var isReadableStreamLike_1 = require("../util/isReadableStreamLike");
var isFunction_1 = require("../util/isFunction");
var reportUnhandledError_1 = require("../util/reportUnhandledError");
var observable_1 = require("../symbol/observable");
function from(input) {
if (input instanceof Observable_1.Observable) {
return input;
}
if (input != null) {
if ((0, isInteropObservable_1.isInteropObservable)(input)) {
return fromInteropObservable(input);
}
if ((0, isArrayLike_1.isArrayLike)(input)) {
return fromArrayLike(input);
}
if ((0, isPromise_1.isPromise)(input)) {
return fromPromise(input);
}
if ((0, isAsyncIterable_1.isAsyncIterable)(input)) {
return fromAsyncIterable(input);
}
if ((0, isIterable_1.isIterable)(input)) {
return fromIterable(input);
}
if ((0, isReadableStreamLike_1.isReadableStreamLike)(input)) {
return fromReadableStreamLike(input);
}
}
throw (0, throwUnobservableError_1.createInvalidObservableTypeError)(input);
}
exports.from = from;
function fromInteropObservable(obj) {
return new Observable_1.Observable(function (subscriber) {
var obs = obj[observable_1.observable]();
if ((0, isFunction_1.isFunction)(obs.subscribe)) {
return obs.subscribe(subscriber);
}
throw new TypeError('Provided object does not correctly implement Symbol.observable');
});
}
function fromArrayLike(array) {
return new Observable_1.Observable(function (subscriber) {
subscribeToArray(array, subscriber);
});
}
exports.fromArrayLike = fromArrayLike;
function fromPromise(promise) {
return new Observable_1.Observable(function (subscriber) {
promise
.then(function (value) {
if (!subscriber.closed) {
subscriber.next(value);
subscriber.complete();
}
}, function (err) { return subscriber.error(err); })
.then(null, reportUnhandledError_1.reportUnhandledError);
});
}
function fromIterable(iterable) {
return new Observable_1.Observable(function (subscriber) {
var e_1, _a;
try {
for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) {
var value = iterable_1_1.value;
subscriber.next(value);
if (subscriber.closed) {
return;
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1);
}
finally { if (e_1) throw e_1.error; }
}
subscriber.complete();
});
}
function fromAsyncIterable(asyncIterable) {
return new Observable_1.Observable(function (subscriber) {
process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); });
});
}
function fromReadableStreamLike(readableStream) {
return fromAsyncIterable((0, isReadableStreamLike_1.readableStreamLikeToAsyncGenerator)(readableStream));
}
function process(asyncIterable, subscriber) {
var _a, asyncIterable_1, asyncIterable_1_1;
var _b, e_2, _c, _d;
return __awaiter(this, void 0, void 0, function () {
var value, e_2_1;
return __generator(this, function (_e) {
switch (_e.label) {
case 0:
_e.trys.push([0, 5, 6, 11]);
_a = true, asyncIterable_1 = __asyncValues(asyncIterable);
_e.label = 1;
case 1: return [4, asyncIterable_1.next()];
case 2:
if (!(asyncIterable_1_1 = _e.sent(), _b = asyncIterable_1_1.done, !_b)) return [3, 4];
_d = asyncIterable_1_1.value;
_a = false;
try {
value = _d;
subscriber.next(value);
if (subscriber.closed) {
return [2];
}
}
finally {
_a = true;
}
_e.label = 3;
case 3: return [3, 1];
case 4: return [3, 11];
case 5:
e_2_1 = _e.sent();
e_2 = { error: e_2_1 };
return [3, 11];
case 6:
_e.trys.push([6, , 9, 10]);
if (!(!_a && !_b && (_c = asyncIterable_1.return))) return [3, 8];
return [4, _c.call(asyncIterable_1)];
case 7:
_e.sent();
_e.label = 8;
case 8: return [3, 10];
case 9:
if (e_2) throw e_2.error;
return [7];
case 10: return [7];
case 11:
subscriber.complete();
return [2];
}
});
});
}
function subscribeToArray(array, subscriber) {
var length = array.length;
for (var i = 0; i < length && !subscriber.closed; i++) {
subscriber.next(array[i]);
}
subscriber.complete();
}
exports.subscribeToArray = subscribeToArray;
//# sourceMappingURL=from.js.map

@@ -20,5 +20,3 @@ "use strict";

exports.fromEvent = void 0;
var innerFrom_1 = require("../observable/innerFrom");
var Observable_1 = require("../Observable");
var mergeMap_1 = require("../operators/mergeMap");
var isArrayLike_1 = require("../util/isArrayLike");

@@ -31,3 +29,3 @@ var isFunction_1 = require("../util/isFunction");

function fromEvent(target, eventName, options, resultSelector) {
if (isFunction_1.isFunction(options)) {
if ((0, isFunction_1.isFunction)(options)) {
resultSelector = options;

@@ -37,18 +35,6 @@ options = undefined;

if (resultSelector) {
return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector));
return fromEvent(target, eventName, options).pipe((0, mapOneOrManyArgs_1.mapOneOrManyArgs)(resultSelector));
}
var _a = __read(isEventTarget(target)
? eventTargetMethods.map(function (methodName) { return function (handler) { return target[methodName](eventName, handler, options); }; })
:
isNodeStyleEventEmitter(target)
? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))
: isJQueryStyleEventEmitter(target)
? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))
: [], 2), add = _a[0], remove = _a[1];
if (!add) {
if (isArrayLike_1.isArrayLike(target)) {
return mergeMap_1.mergeMap(function (subTarget) { return fromEvent(subTarget, eventName, options); })(innerFrom_1.innerFrom(target));
}
}
if (!add) {
var isValidTarget = isNodeStyleEventEmitter(target) || isJQueryStyleEventEmitter(target) || isEventTarget(target);
if (!isValidTarget && !(0, isArrayLike_1.isArrayLike)(target)) {
throw new TypeError('Invalid event target');

@@ -64,19 +50,41 @@ }

};
add(handler);
return function () { return remove(handler); };
if (isValidTarget) {
doSubscribe(handler, subscriber, target, eventName, options);
}
else {
for (var i = 0; i < target.length && !subscriber.closed; i++) {
var subTarget = target[i];
doSubscribe(handler, subscriber, subTarget, eventName, options);
}
}
});
}
exports.fromEvent = fromEvent;
function toCommonHandlerRegistry(target, eventName) {
return function (methodName) { return function (handler) { return target[methodName](eventName, handler); }; };
function doSubscribe(handler, subscriber, subTarget, eventName, options) {
var _a = __read(getRegistryMethodNames(subTarget), 2), addMethod = _a[0], removeMethod = _a[1];
if (!addMethod || !removeMethod) {
throw new TypeError('Invalid event target');
}
subTarget[addMethod](eventName, handler, options);
subscriber.add(function () { return subTarget[removeMethod](eventName, handler, options); });
}
function getRegistryMethodNames(target) {
return isEventTarget(target)
? eventTargetMethods
:
isNodeStyleEventEmitter(target)
? nodeEventEmitterMethods
: isJQueryStyleEventEmitter(target)
? jqueryMethods
: [];
}
function isNodeStyleEventEmitter(target) {
return isFunction_1.isFunction(target.addListener) && isFunction_1.isFunction(target.removeListener);
return (0, isFunction_1.isFunction)(target.addListener) && (0, isFunction_1.isFunction)(target.removeListener);
}
function isJQueryStyleEventEmitter(target) {
return isFunction_1.isFunction(target.on) && isFunction_1.isFunction(target.off);
return (0, isFunction_1.isFunction)(target.on) && (0, isFunction_1.isFunction)(target.off);
}
function isEventTarget(target) {
return isFunction_1.isFunction(target.addEventListener) && isFunction_1.isFunction(target.removeEventListener);
return (0, isFunction_1.isFunction)(target.addEventListener) && (0, isFunction_1.isFunction)(target.removeEventListener);
}
//# sourceMappingURL=fromEvent.js.map

@@ -9,3 +9,3 @@ "use strict";

if (resultSelector) {
return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector));
return fromEventPattern(addHandler, removeHandler).pipe((0, mapOneOrManyArgs_1.mapOneOrManyArgs)(resultSelector));
}

@@ -21,3 +21,3 @@ return new Observable_1.Observable(function (subscriber) {

var retValue = addHandler(handler);
return isFunction_1.isFunction(removeHandler) ? function () { return removeHandler(handler, retValue); } : undefined;
return (0, isFunction_1.isFunction)(removeHandler) ? function () { return removeHandler(handler, retValue); } : undefined;
});

@@ -24,0 +24,0 @@ }

@@ -8,3 +8,3 @@ "use strict";

if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;

@@ -45,3 +45,3 @@ if (y = 0, t) op = [op[0] & 2, t.value];

initialState = initialStateOrOptions;
if (!resultSelectorOrScheduler || isScheduler_1.isScheduler(resultSelectorOrScheduler)) {
if (!resultSelectorOrScheduler || (0, isScheduler_1.isScheduler)(resultSelectorOrScheduler)) {
resultSelector = identity_1.identity;

@@ -74,5 +74,5 @@ scheduler = resultSelectorOrScheduler;

}
return defer_1.defer((scheduler
return (0, defer_1.defer)((scheduler
?
function () { return scheduleIterable_1.scheduleIterable(gen(), scheduler); }
function () { return (0, scheduleIterable_1.scheduleIterable)(gen(), scheduler); }
:

@@ -79,0 +79,0 @@ gen));

@@ -6,5 +6,5 @@ "use strict";

function iif(condition, trueResult, falseResult) {
return defer_1.defer(function () { return (condition() ? trueResult : falseResult); });
return (0, defer_1.defer)(function () { return (condition() ? trueResult : falseResult); });
}
exports.iif = iif;
//# sourceMappingURL=iif.js.map

@@ -12,5 +12,5 @@ "use strict";

}
return timer_1.timer(period, period, scheduler);
return (0, timer_1.timer)(period, period, scheduler);
}
exports.interval = interval;
//# sourceMappingURL=interval.js.map

@@ -5,5 +5,5 @@ "use strict";

var mergeAll_1 = require("../operators/mergeAll");
var innerFrom_1 = require("./innerFrom");
var empty_1 = require("./empty");
var args_1 = require("../util/args");
var scheduled_1 = require("../scheduled/scheduled");
var from_1 = require("./from");

@@ -15,4 +15,4 @@ function merge() {

}
var scheduler = args_1.popScheduler(args);
var concurrent = args_1.popNumber(args, Infinity);
var scheduler = (0, args_1.popScheduler)(args);
var concurrent = (0, args_1.popNumber)(args, Infinity);
var sources = args;

@@ -24,7 +24,7 @@ return !sources.length

?
innerFrom_1.innerFrom(sources[0])
(0, from_1.from)(sources[0])
:
mergeAll_1.mergeAll(concurrent)(from_1.from(sources, scheduler));
(0, mergeAll_1.mergeAll)(concurrent)(scheduler ? (0, scheduled_1.scheduled)(sources, scheduler) : (0, from_1.from)(sources));
}
exports.merge = merge;
//# sourceMappingURL=merge.js.map

@@ -5,2 +5,3 @@ "use strict";

var args_1 = require("../util/args");
var scheduled_1 = require("../scheduled/scheduled");
var from_1 = require("./from");

@@ -12,6 +13,6 @@ function of() {

}
var scheduler = args_1.popScheduler(args);
return from_1.from(args, scheduler);
var scheduler = (0, args_1.popScheduler)(args);
return scheduler ? (0, scheduled_1.scheduled)(args, scheduler) : (0, from_1.fromArrayLike)(args);
}
exports.of = of;
//# sourceMappingURL=of.js.map

@@ -8,3 +8,3 @@ "use strict";

var noop_1 = require("../util/noop");
var innerFrom_1 = require("./innerFrom");
var from_1 = require("./from");
function onErrorResumeNext() {

@@ -15,3 +15,3 @@ var sources = [];

}
var nextSources = argsOrArgArray_1.argsOrArgArray(sources);
var nextSources = (0, argsOrArgArray_1.argsOrArgArray)(sources);
return new Observable_1.Observable(function (subscriber) {

@@ -23,3 +23,3 @@ var sourceIndex = 0;

try {
nextSource = innerFrom_1.innerFrom(nextSources[sourceIndex++]);
nextSource = (0, from_1.from)(nextSources[sourceIndex++]);
}

@@ -26,0 +26,0 @@ catch (err) {

@@ -6,7 +6,7 @@ "use strict";

var filter_1 = require("../operators/filter");
var innerFrom_1 = require("./innerFrom");
var from_1 = require("./from");
function partition(source, predicate, thisArg) {
return [filter_1.filter(predicate, thisArg)(innerFrom_1.innerFrom(source)), filter_1.filter(not_1.not(predicate, thisArg))(innerFrom_1.innerFrom(source))];
return [(0, filter_1.filter)(predicate, thisArg)((0, from_1.from)(source)), (0, filter_1.filter)((0, not_1.not)(predicate, thisArg))((0, from_1.from)(source))];
}
exports.partition = partition;
//# sourceMappingURL=partition.js.map

@@ -5,3 +5,3 @@ "use strict";

var Observable_1 = require("../Observable");
var innerFrom_1 = require("./innerFrom");
var from_1 = require("./from");
var argsOrArgArray_1 = require("../util/argsOrArgArray");

@@ -14,4 +14,4 @@ var OperatorSubscriber_1 = require("../operators/OperatorSubscriber");

}
sources = argsOrArgArray_1.argsOrArgArray(sources);
return sources.length === 1 ? innerFrom_1.innerFrom(sources[0]) : new Observable_1.Observable(raceInit(sources));
sources = (0, argsOrArgArray_1.argsOrArgArray)(sources);
return sources.length === 1 ? (0, from_1.from)(sources[0]) : new Observable_1.Observable(raceInit(sources));
}

@@ -23,3 +23,3 @@ exports.race = race;

var _loop_1 = function (i) {
subscriptions.push(innerFrom_1.innerFrom(sources[i]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
subscriptions.push((0, from_1.from)(sources[i]).subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
if (subscriptions) {

@@ -26,0 +26,0 @@ for (var s = 0; s < subscriptions.length; s++) {

@@ -5,9 +5,8 @@ "use strict";

var Observable_1 = require("../Observable");
var isFunction_1 = require("../util/isFunction");
function throwError(errorOrErrorFactory, scheduler) {
var errorFactory = isFunction_1.isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function () { return errorOrErrorFactory; };
var init = function (subscriber) { return subscriber.error(errorFactory()); };
return new Observable_1.Observable(scheduler ? function (subscriber) { return scheduler.schedule(init, 0, subscriber); } : init);
function throwError(errorFactory) {
return new Observable_1.Observable(function (subscriber) {
subscriber.error(errorFactory());
});
}
exports.throwError = throwError;
//# sourceMappingURL=throwError.js.map

@@ -10,6 +10,6 @@ "use strict";

if (dueTime === void 0) { dueTime = 0; }
if (scheduler === void 0) { scheduler = async_1.async; }
if (scheduler === void 0) { scheduler = async_1.asyncScheduler; }
var intervalDuration = -1;
if (intervalOrScheduler != null) {
if (isScheduler_1.isScheduler(intervalOrScheduler)) {
if ((0, isScheduler_1.isScheduler)(intervalOrScheduler)) {
scheduler = intervalOrScheduler;

@@ -22,3 +22,3 @@ }

return new Observable_1.Observable(function (subscriber) {
var due = isDate_1.isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;
var due = (0, isDate_1.isValidDate)(dueTime) ? +dueTime - scheduler.now() : dueTime;
if (due < 0) {

@@ -25,0 +25,0 @@ due = 0;

@@ -5,3 +5,3 @@ "use strict";

var Observable_1 = require("../Observable");
var innerFrom_1 = require("./innerFrom");
var from_1 = require("./from");
var empty_1 = require("./empty");

@@ -12,3 +12,3 @@ function using(resourceFactory, observableFactory) {

var result = observableFactory(resource);
var source = result ? innerFrom_1.innerFrom(result) : empty_1.EMPTY;
var source = result ? (0, from_1.from)(result) : empty_1.EMPTY;
source.subscribe(subscriber);

@@ -15,0 +15,0 @@ return function () {

@@ -18,6 +18,10 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};

@@ -27,3 +31,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

var Observable_1 = require("../Observable");
var innerFrom_1 = require("./innerFrom");
var from_1 = require("./from");
var argsOrArgArray_1 = require("../util/argsOrArgArray");

@@ -38,4 +42,4 @@ var empty_1 = require("./empty");

}
var resultSelector = args_1.popResultSelector(args);
var sources = argsOrArgArray_1.argsOrArgArray(args);
var resultSelector = (0, args_1.popResultSelector)(args);
var sources = (0, argsOrArgArray_1.argsOrArgArray)(args);
return sources.length

@@ -49,7 +53,7 @@ ? new Observable_1.Observable(function (subscriber) {

var _loop_1 = function (sourceIndex) {
innerFrom_1.innerFrom(sources[sourceIndex]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
(0, from_1.from)(sources[sourceIndex]).subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
buffers[sourceIndex].push(value);
if (buffers.every(function (buffer) { return buffer.length; })) {
var result = buffers.map(function (buffer) { return buffer.shift(); });
subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result))) : result);
subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result), false)) : result);
if (buffers.some(function (buffer, i) { return !buffer.length && completed[i]; })) {

@@ -56,0 +60,0 @@ subscriber.complete();

@@ -5,6 +5,6 @@ "use strict";

var lift_1 = require("../util/lift");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var OperatorSubscriber_1 = require("./OperatorSubscriber");
function audit(durationSelector) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var hasValue = false;

@@ -29,7 +29,7 @@ var lastValue = null;

};
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
hasValue = true;
lastValue = value;
if (!durationSubscriber) {
innerFrom_1.innerFrom(durationSelector(value)).subscribe((durationSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, endDuration, cleanupDuration)));
(0, from_1.from)(durationSelector(value)).subscribe((durationSubscriber = (0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, endDuration, cleanupDuration)));
}

@@ -36,0 +36,0 @@ }, function () {

@@ -9,5 +9,5 @@ "use strict";

if (scheduler === void 0) { scheduler = async_1.asyncScheduler; }
return audit_1.audit(function () { return timer_1.timer(duration, scheduler); });
return (0, audit_1.audit)(function () { return (0, timer_1.timer)(duration, scheduler); });
}
exports.auditTime = auditTime;
//# sourceMappingURL=auditTime.js.map

@@ -7,11 +7,7 @@ "use strict";

var OperatorSubscriber_1 = require("./OperatorSubscriber");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
function buffer(closingNotifier) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var currentBuffer = [];
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return currentBuffer.push(value); }, function () {
subscriber.next(currentBuffer);
subscriber.complete();
}));
innerFrom_1.innerFrom(closingNotifier).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () {
(0, from_1.from)(closingNotifier).subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function () {
var b = currentBuffer;

@@ -21,2 +17,6 @@ currentBuffer = [];

}, noop_1.noop));
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) { return currentBuffer.push(value); }, function () {
subscriber.next(currentBuffer);
subscriber.complete();
}));
return function () {

@@ -23,0 +23,0 @@ currentBuffer = null;

@@ -21,6 +21,6 @@ "use strict";

startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize;
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var buffers = [];
var count = 0;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
var e_1, _a, e_2, _b;

@@ -52,3 +52,3 @@ var toEmit = null;

var buffer = toEmit_1_1.value;
arrRemove_1.arrRemove(buffers, buffer);
(0, arrRemove_1.arrRemove)(buffers, buffer);
subscriber.next(buffer);

@@ -55,0 +55,0 @@ }

@@ -28,6 +28,6 @@ "use strict";

}
var scheduler = (_a = args_1.popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : async_1.asyncScheduler;
var scheduler = (_a = (0, args_1.popScheduler)(otherArgs)) !== null && _a !== void 0 ? _a : async_1.asyncScheduler;
var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null;
var maxBufferSize = otherArgs[1] || Infinity;
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var bufferRecords = [];

@@ -38,3 +38,3 @@ var restartOnEmit = false;

subs.unsubscribe();
arrRemove_1.arrRemove(bufferRecords, record);
(0, arrRemove_1.arrRemove)(bufferRecords, record);
subscriber.next(buffer);

@@ -53,7 +53,7 @@ restartOnEmit && startBuffer();

bufferRecords.push(record_1);
executeSchedule_1.executeSchedule(subs, scheduler, function () { return emit(record_1); }, bufferTimeSpan);
(0, executeSchedule_1.executeSchedule)(subs, scheduler, function () { return emit(record_1); }, bufferTimeSpan);
}
};
if (bufferCreationInterval !== null && bufferCreationInterval >= 0) {
executeSchedule_1.executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true);
(0, executeSchedule_1.executeSchedule)(subscriber, scheduler, startBuffer, bufferCreationInterval, true);
}

@@ -64,3 +64,3 @@ else {

startBuffer();
var bufferTimeSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
var bufferTimeSubscriber = (0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
var e_1, _a;

@@ -67,0 +67,0 @@ var recordsCopy = bufferRecords.slice();

@@ -17,3 +17,3 @@ "use strict";

var lift_1 = require("../util/lift");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var OperatorSubscriber_1 = require("./OperatorSubscriber");

@@ -23,5 +23,5 @@ var noop_1 = require("../util/noop");

function bufferToggle(openings, closingSelector) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var buffers = [];
innerFrom_1.innerFrom(openings).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (openValue) {
(0, from_1.from)(openings).subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (openValue) {
var buffer = [];

@@ -31,9 +31,9 @@ buffers.push(buffer);

var emitBuffer = function () {
arrRemove_1.arrRemove(buffers, buffer);
(0, arrRemove_1.arrRemove)(buffers, buffer);
subscriber.next(buffer);
closingSubscription.unsubscribe();
};
closingSubscription.add(innerFrom_1.innerFrom(closingSelector(openValue)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, emitBuffer, noop_1.noop)));
closingSubscription.add((0, from_1.from)(closingSelector(openValue)).subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, emitBuffer, noop_1.noop)));
}, noop_1.noop));
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
var e_1, _a;

@@ -40,0 +40,0 @@ try {

@@ -7,5 +7,5 @@ "use strict";

var OperatorSubscriber_1 = require("./OperatorSubscriber");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
function bufferWhen(closingSelector) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var buffer = null;

@@ -18,6 +18,6 @@ var closingSubscriber = null;

b && subscriber.next(b);
innerFrom_1.innerFrom(closingSelector()).subscribe((closingSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, openBuffer, noop_1.noop)));
(0, from_1.from)(closingSelector()).subscribe((closingSubscriber = (0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, openBuffer, noop_1.noop)));
};
openBuffer();
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); }, function () {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) { return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); }, function () {
buffer && subscriber.next(buffer);

@@ -24,0 +24,0 @@ subscriber.complete();

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.catchError = void 0;
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var OperatorSubscriber_1 = require("./OperatorSubscriber");
var lift_1 = require("../util/lift");
function catchError(selector) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var innerSub = null;
var syncUnsub = false;
var handledResult;
innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, undefined, function (err) {
handledResult = innerFrom_1.innerFrom(selector(err, catchError(selector)(source)));
innerSub = source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, undefined, undefined, function (err) {
handledResult = (0, from_1.from)(selector(err, catchError(selector)(source)));
if (innerSub) {

@@ -15,0 +15,0 @@ innerSub.unsubscribe();

@@ -7,5 +7,5 @@ "use strict";

function combineLatestAll(project) {
return joinAllInternals_1.joinAllInternals(combineLatest_1.combineLatest, project);
return (0, joinAllInternals_1.joinAllInternals)(combineLatest_1.combineLatest, project);
}
exports.combineLatestAll = combineLatestAll;
//# sourceMappingURL=combineLatestAll.js.map

@@ -18,10 +18,15 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.combineLatestWith = void 0;
var combineLatest_1 = require("./combineLatest");
var combineLatest_1 = require("../observable/combineLatest");
var lift_1 = require("../util/lift");
function combineLatestWith() {

@@ -32,5 +37,5 @@ var otherSources = [];

}
return combineLatest_1.combineLatest.apply(void 0, __spreadArray([], __read(otherSources)));
return (0, lift_1.operate)(function (source, subscriber) { return (0, combineLatest_1.combineLatestInit)(__spreadArray([source], __read(otherSources), false))(subscriber); });
}
exports.combineLatestWith = combineLatestWith;
//# sourceMappingURL=combineLatestWith.js.map

@@ -6,5 +6,5 @@ "use strict";

function concatAll() {
return mergeAll_1.mergeAll(1);
return (0, mergeAll_1.mergeAll)(1);
}
exports.concatAll = concatAll;
//# sourceMappingURL=concatAll.js.map

@@ -5,7 +5,6 @@ "use strict";

var mergeMap_1 = require("./mergeMap");
var isFunction_1 = require("../util/isFunction");
function concatMap(project, resultSelector) {
return isFunction_1.isFunction(resultSelector) ? mergeMap_1.mergeMap(project, resultSelector, 1) : mergeMap_1.mergeMap(project, 1);
function concatMap(project) {
return (0, mergeMap_1.mergeMap)(project, 1);
}
exports.concatMap = concatMap;
//# sourceMappingURL=concatMap.js.map

@@ -5,7 +5,6 @@ "use strict";

var concatMap_1 = require("./concatMap");
var isFunction_1 = require("../util/isFunction");
function concatMapTo(innerObservable, resultSelector) {
return isFunction_1.isFunction(resultSelector) ? concatMap_1.concatMap(function () { return innerObservable; }, resultSelector) : concatMap_1.concatMap(function () { return innerObservable; });
function concatMapTo(innerObservable) {
return (0, concatMap_1.concatMap)(function () { return innerObservable; });
}
exports.concatMapTo = concatMapTo;
//# sourceMappingURL=concatMapTo.js.map

@@ -18,10 +18,16 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.concatWith = void 0;
var concat_1 = require("./concat");
var from_1 = require("../observable/from");
var concatAll_1 = require("../operators/concatAll");
var lift_1 = require("../util/lift");
function concatWith() {

@@ -32,5 +38,7 @@ var otherSources = [];

}
return concat_1.concat.apply(void 0, __spreadArray([], __read(otherSources)));
return (0, lift_1.operate)(function (source, subscriber) {
(0, concatAll_1.concatAll)()((0, from_1.from)(__spreadArray([source], __read(otherSources), false))).subscribe(subscriber);
});
}
exports.concatWith = concatWith;
//# sourceMappingURL=concatWith.js.map

@@ -5,3 +5,3 @@ "use strict";

var Subject_1 = require("../Subject");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var lift_1 = require("../util/lift");

@@ -15,5 +15,5 @@ var fromSubscribable_1 = require("../observable/fromSubscribable");

var connector = config.connector;
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var subject = connector();
innerFrom_1.innerFrom(selector(fromSubscribable_1.fromSubscribable(subject))).subscribe(subscriber);
(0, from_1.from)(selector((0, fromSubscribable_1.fromSubscribable)(subject))).subscribe(subscriber);
subscriber.add(source.subscribe(subject));

@@ -20,0 +20,0 @@ });

@@ -6,5 +6,5 @@ "use strict";

function count(predicate) {
return reduce_1.reduce(function (total, value, i) { return (!predicate || predicate(value, i) ? total + 1 : total); }, 0);
return (0, reduce_1.reduce)(function (total, value, i) { return (!predicate || predicate(value, i) ? total + 1 : total); }, 0);
}
exports.count = count;
//# sourceMappingURL=count.js.map

@@ -7,5 +7,5 @@ "use strict";

var OperatorSubscriber_1 = require("./OperatorSubscriber");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
function debounce(durationSelector) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var hasValue = false;

@@ -24,8 +24,8 @@ var lastValue = null;

};
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();
hasValue = true;
lastValue = value;
durationSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, emit, noop_1.noop);
innerFrom_1.innerFrom(durationSelector(value)).subscribe(durationSubscriber);
durationSubscriber = (0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, emit, noop_1.noop);
(0, from_1.from)(durationSelector(value)).subscribe(durationSubscriber);
}, function () {

@@ -32,0 +32,0 @@ emit();

@@ -9,10 +9,13 @@ "use strict";

if (scheduler === void 0) { scheduler = async_1.asyncScheduler; }
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var activeTask = null;
var lastValue = null;
var lastTime = null;
var scheduling = false;
var emit = function () {
if (activeTask) {
activeTask.unsubscribe();
activeTask = null;
if (scheduling || activeTask) {
if (activeTask) {
activeTask.unsubscribe();
activeTask = null;
}
var value = lastValue;

@@ -33,7 +36,9 @@ lastValue = null;

}
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
lastValue = value;
lastTime = scheduler.now();
if (!activeTask) {
scheduling = true;
activeTask = scheduler.schedule(emitWhenIdle, dueTime);
scheduling = false;
subscriber.add(activeTask);

@@ -40,0 +45,0 @@ }

@@ -7,5 +7,5 @@ "use strict";

function defaultIfEmpty(defaultValue) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var hasValue = false;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
hasValue = true;

@@ -12,0 +12,0 @@ subscriber.next(value);

@@ -9,6 +9,6 @@ "use strict";

if (scheduler === void 0) { scheduler = async_1.asyncScheduler; }
var duration = timer_1.timer(due, scheduler);
return delayWhen_1.delayWhen(function () { return duration; });
var duration = (0, timer_1.timer)(due, scheduler);
return (0, delayWhen_1.delayWhen)(function () { return duration; });
}
exports.delay = delay;
//# sourceMappingURL=delay.js.map

@@ -9,12 +9,12 @@ "use strict";

var mergeMap_1 = require("./mergeMap");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
function delayWhen(delayDurationSelector, subscriptionDelay) {
if (subscriptionDelay) {
return function (source) {
return concat_1.concat(subscriptionDelay.pipe(take_1.take(1), ignoreElements_1.ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));
return (0, concat_1.concat)(subscriptionDelay.pipe((0, take_1.take)(1), (0, ignoreElements_1.ignoreElements)()), source.pipe(delayWhen(delayDurationSelector)));
};
}
return mergeMap_1.mergeMap(function (value, index) { return innerFrom_1.innerFrom(delayDurationSelector(value, index)).pipe(take_1.take(1), mapTo_1.mapTo(value)); });
return (0, mergeMap_1.mergeMap)(function (value, index) { return (0, from_1.from)(delayDurationSelector(value, index)).pipe((0, take_1.take)(1), (0, mapTo_1.mapTo)(value)); });
}
exports.delayWhen = delayWhen;
//# sourceMappingURL=delayWhen.js.map

@@ -8,4 +8,4 @@ "use strict";

function dematerialize() {
return lift_1.operate(function (source, subscriber) {
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (notification) { return Notification_1.observeNotification(notification, subscriber); }));
return (0, lift_1.operate)(function (source, subscriber) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (notification) { return (0, Notification_1.observeNotification)(notification, subscriber); }));
});

@@ -12,0 +12,0 @@ }

@@ -7,7 +7,7 @@ "use strict";

var noop_1 = require("../util/noop");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
function distinct(keySelector, flushes) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var distinctKeys = new Set();
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
var key = keySelector ? keySelector(value) : value;

@@ -19,3 +19,3 @@ if (!distinctKeys.has(key)) {

}));
flushes && innerFrom_1.innerFrom(flushes).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { return distinctKeys.clear(); }, noop_1.noop));
flushes && (0, from_1.from)(flushes).subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function () { return distinctKeys.clear(); }, noop_1.noop));
});

@@ -22,0 +22,0 @@ }

@@ -10,6 +10,6 @@ "use strict";

comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var previousKey;
var first = true;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
var currentKey = keySelector(value);

@@ -16,0 +16,0 @@ if (first || !comparator(previousKey, currentKey)) {

@@ -6,5 +6,5 @@ "use strict";

function distinctUntilKeyChanged(key, compare) {
return distinctUntilChanged_1.distinctUntilChanged(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });
return (0, distinctUntilChanged_1.distinctUntilChanged)(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });
}
exports.distinctUntilKeyChanged = distinctUntilKeyChanged;
//# sourceMappingURL=distinctUntilKeyChanged.js.map

@@ -15,3 +15,3 @@ "use strict";

return function (source) {
return source.pipe(filter_1.filter(function (v, i) { return i === index; }), take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function () { return new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError(); }));
return source.pipe((0, filter_1.filter)(function (v, i) { return i === index; }), (0, take_1.take)(1), hasDefaultValue ? (0, defaultIfEmpty_1.defaultIfEmpty)(defaultValue) : (0, throwIfEmpty_1.throwIfEmpty)(function () { return new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError(); }));
};

@@ -18,0 +18,0 @@ }

"use strict";
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.endWith = void 0;
var concat_1 = require("../observable/concat");
var of_1 = require("../observable/of");
var from_1 = require("../observable/from");
var lift_1 = require("../util/lift");
var OperatorSubscriber_1 = require("../operators/OperatorSubscriber");
function endWith() {

@@ -32,5 +12,9 @@ var values = [];

}
return function (source) { return concat_1.concat(source, of_1.of.apply(void 0, __spreadArray([], __read(values)))); };
return (0, lift_1.operate)(function (source, subscriber) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, undefined, function () {
(0, from_1.subscribeToArray)(values, subscriber);
}));
});
}
exports.endWith = endWith;
//# sourceMappingURL=endWith.js.map

@@ -7,5 +7,5 @@ "use strict";

function every(predicate, thisArg) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var index = 0;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
if (!predicate.call(thisArg, value, index++, source)) {

@@ -12,0 +12,0 @@ subscriber.next(false);

@@ -7,5 +7,5 @@ "use strict";

function exhaustAll() {
return exhaustMap_1.exhaustMap(identity_1.identity);
return (0, exhaustMap_1.exhaustMap)(identity_1.identity);
}
exports.exhaustAll = exhaustAll;
//# sourceMappingURL=exhaustAll.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.exhaustMap = void 0;
var map_1 = require("./map");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var lift_1 = require("../util/lift");
var OperatorSubscriber_1 = require("./OperatorSubscriber");
function exhaustMap(project, resultSelector) {
if (resultSelector) {
return function (source) {
return source.pipe(exhaustMap(function (a, i) { return innerFrom_1.innerFrom(project(a, i)).pipe(map_1.map(function (b, ii) { return resultSelector(a, b, i, ii); })); }));
};
}
return lift_1.operate(function (source, subscriber) {
function exhaustMap(project) {
return (0, lift_1.operate)(function (source, subscriber) {
var index = 0;
var innerSub = null;
var isComplete = false;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (outerValue) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (outerValue) {
if (!innerSub) {
innerSub = OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, function () {
innerSub = (0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, undefined, function () {
innerSub = null;
isComplete && subscriber.complete();
});
innerFrom_1.innerFrom(project(outerValue, index++)).subscribe(innerSub);
(0, from_1.from)(project(outerValue, index++)).subscribe(innerSub);
}

@@ -26,0 +20,0 @@ }, function () {

@@ -9,4 +9,4 @@ "use strict";

concurrent = (concurrent || 0) < 1 ? Infinity : concurrent;
return lift_1.operate(function (source, subscriber) {
return mergeInternals_1.mergeInternals(source, subscriber, project, concurrent, undefined, true, scheduler);
return (0, lift_1.operate)(function (source, subscriber) {
return (0, mergeInternals_1.mergeInternals)(source, subscriber, project, concurrent, undefined, true, scheduler);
});

@@ -13,0 +13,0 @@ }

@@ -7,5 +7,5 @@ "use strict";

function filter(predicate, thisArg) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var index = 0;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); }));
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); }));
});

@@ -12,0 +12,0 @@ }

@@ -6,3 +6,3 @@ "use strict";

function finalize(callback) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
source.subscribe(subscriber);

@@ -9,0 +9,0 @@ subscriber.add(callback);

@@ -6,13 +6,13 @@ "use strict";

var OperatorSubscriber_1 = require("./OperatorSubscriber");
function find(predicate, thisArg) {
return lift_1.operate(createFind(predicate, thisArg, 'value'));
function find(predicate) {
return (0, lift_1.operate)(createFind(predicate, 'value'));
}
exports.find = find;
function createFind(predicate, thisArg, emit) {
function createFind(predicate, emit) {
var findIndex = emit === 'index';
return function (source, subscriber) {
var index = 0;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
var i = index++;
if (predicate.call(thisArg, value, i, source)) {
if (predicate(value, i, source)) {
subscriber.next(findIndex ? i : value);

@@ -19,0 +19,0 @@ subscriber.complete();

@@ -6,6 +6,6 @@ "use strict";

var find_1 = require("./find");
function findIndex(predicate, thisArg) {
return lift_1.operate(find_1.createFind(predicate, thisArg, 'index'));
function findIndex(predicate) {
return (0, lift_1.operate)((0, find_1.createFind)(predicate, 'index'));
}
exports.findIndex = findIndex;
//# sourceMappingURL=findIndex.js.map

@@ -13,3 +13,3 @@ "use strict";

return function (source) {
return source.pipe(predicate ? filter_1.filter(function (v, i) { return predicate(v, i, source); }) : identity_1.identity, take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function () { return new EmptyError_1.EmptyError(); }));
return source.pipe(predicate ? (0, filter_1.filter)(function (v, i) { return predicate(v, i, source); }) : identity_1.identity, (0, take_1.take)(1), hasDefaultValue ? (0, defaultIfEmpty_1.defaultIfEmpty)(defaultValue) : (0, throwIfEmpty_1.throwIfEmpty)(function () { return new EmptyError_1.EmptyError(); }));
};

@@ -16,0 +16,0 @@ }

@@ -5,3 +5,3 @@ "use strict";

var Observable_1 = require("../Observable");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var Subject_1 = require("../Subject");

@@ -11,3 +11,3 @@ var lift_1 = require("../util/lift");

function groupBy(keySelector, elementOrOptions, duration, connector) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var element;

@@ -37,7 +37,7 @@ if (!elementOrOptions || typeof elementOrOptions === 'function') {

if (duration) {
var durationSubscriber_1 = OperatorSubscriber_1.createOperatorSubscriber(group_1, function () {
var durationSubscriber_1 = (0, OperatorSubscriber_1.createOperatorSubscriber)(group_1, function () {
group_1.complete();
durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe();
}, undefined, undefined, function () { return groups.delete(key_1); });
groupBySourceSubscriber.add(innerFrom_1.innerFrom(duration(grouped)).subscribe(durationSubscriber_1));
groupBySourceSubscriber.add((0, from_1.from)(duration(grouped)).subscribe(durationSubscriber_1));
}

@@ -44,0 +44,0 @@ }

@@ -8,4 +8,4 @@ "use strict";

function ignoreElements() {
return lift_1.operate(function (source, subscriber) {
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, noop_1.noop));
return (0, lift_1.operate)(function (source, subscriber) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, noop_1.noop));
});

@@ -12,0 +12,0 @@ }

@@ -7,4 +7,4 @@ "use strict";

function isEmpty() {
return lift_1.operate(function (source, subscriber) {
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () {
return (0, lift_1.operate)(function (source, subscriber) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function () {
subscriber.next(false);

@@ -11,0 +11,0 @@ subscriber.complete();

@@ -10,5 +10,5 @@ "use strict";

function joinAllInternals(joinFn, project) {
return pipe_1.pipe(toArray_1.toArray(), mergeMap_1.mergeMap(function (sources) { return joinFn(sources); }), project ? mapOneOrManyArgs_1.mapOneOrManyArgs(project) : identity_1.identity);
return (0, pipe_1.pipe)((0, toArray_1.toArray)(), (0, mergeMap_1.mergeMap)(function (sources) { return joinFn(sources); }), project ? (0, mapOneOrManyArgs_1.mapOneOrManyArgs)(project) : identity_1.identity);
}
exports.joinAllInternals = joinAllInternals;
//# sourceMappingURL=joinAllInternals.js.map

@@ -13,3 +13,3 @@ "use strict";

return function (source) {
return source.pipe(predicate ? filter_1.filter(function (v, i) { return predicate(v, i, source); }) : identity_1.identity, takeLast_1.takeLast(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function () { return new EmptyError_1.EmptyError(); }));
return source.pipe(predicate ? (0, filter_1.filter)(function (v, i) { return predicate(v, i, source); }) : identity_1.identity, (0, takeLast_1.takeLast)(1), hasDefaultValue ? (0, defaultIfEmpty_1.defaultIfEmpty)(defaultValue) : (0, throwIfEmpty_1.throwIfEmpty)(function () { return new EmptyError_1.EmptyError(); }));
};

@@ -16,0 +16,0 @@ }

@@ -6,7 +6,7 @@ "use strict";

var OperatorSubscriber_1 = require("./OperatorSubscriber");
function map(project, thisArg) {
return lift_1.operate(function (source, subscriber) {
function map(project) {
return (0, lift_1.operate)(function (source, subscriber) {
var index = 0;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
subscriber.next(project.call(thisArg, value, index++));
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
subscriber.next(project(value, index++));
}));

@@ -13,0 +13,0 @@ });

@@ -6,5 +6,5 @@ "use strict";

function mapTo(value) {
return map_1.map(function () { return value; });
return (0, map_1.map)(function () { return value; });
}
exports.mapTo = mapTo;
//# sourceMappingURL=mapTo.js.map

@@ -8,5 +8,5 @@ "use strict";

function materialize() {
return lift_1.operate(function (source, subscriber) {
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
subscriber.next(NotificationFactories_1.nextNotification(value));
return (0, lift_1.operate)(function (source, subscriber) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
subscriber.next((0, NotificationFactories_1.nextNotification)(value));
}, function () {

@@ -16,3 +16,3 @@ subscriber.next(NotificationFactories_1.COMPLETE_NOTIFICATION);

}, function (error) {
subscriber.next(NotificationFactories_1.errorNotification(error));
subscriber.next((0, NotificationFactories_1.errorNotification)(error));
subscriber.complete();

@@ -19,0 +19,0 @@ }));

@@ -7,5 +7,5 @@ "use strict";

function max(comparer) {
return reduce_1.reduce(isFunction_1.isFunction(comparer) ? function (x, y) { return (comparer(x, y) > 0 ? x : y); } : function (x, y) { return (x > y ? x : y); });
return (0, reduce_1.reduce)((0, isFunction_1.isFunction)(comparer) ? function (x, y) { return (comparer(x, y) > 0 ? x : y); } : function (x, y) { return (x > y ? x : y); });
}
exports.max = max;
//# sourceMappingURL=max.js.map

@@ -8,5 +8,5 @@ "use strict";

if (concurrent === void 0) { concurrent = Infinity; }
return mergeMap_1.mergeMap(identity_1.identity, concurrent);
return (0, mergeMap_1.mergeMap)(identity_1.identity, concurrent);
}
exports.mergeAll = mergeAll;
//# sourceMappingURL=mergeAll.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mergeInternals = void 0;
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var executeSchedule_1 = require("../util/executeSchedule");

@@ -22,3 +22,3 @@ var OperatorSubscriber_1 = require("./OperatorSubscriber");

var innerComplete = false;
innerFrom_1.innerFrom(project(value, index++)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (innerValue) {
(0, from_1.from)(project(value, index++)).subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (innerValue) {
onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);

@@ -40,3 +40,3 @@ if (expand) {

if (innerSubScheduler) {
executeSchedule_1.executeSchedule(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); });
(0, executeSchedule_1.executeSchedule)(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); });
}

@@ -58,3 +58,3 @@ else {

};
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, outerNext, function () {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, outerNext, function () {
isComplete = true;

@@ -61,0 +61,0 @@ checkComplete();

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mergeMap = void 0;
var map_1 = require("./map");
var innerFrom_1 = require("../observable/innerFrom");
var lift_1 = require("../util/lift");
var mergeInternals_1 = require("./mergeInternals");
var isFunction_1 = require("../util/isFunction");
function mergeMap(project, resultSelector, concurrent) {
function mergeMap(project, concurrent) {
if (concurrent === void 0) { concurrent = Infinity; }
if (isFunction_1.isFunction(resultSelector)) {
return mergeMap(function (a, i) { return map_1.map(function (b, ii) { return resultSelector(a, b, i, ii); })(innerFrom_1.innerFrom(project(a, i))); }, concurrent);
}
else if (typeof resultSelector === 'number') {
concurrent = resultSelector;
}
return lift_1.operate(function (source, subscriber) { return mergeInternals_1.mergeInternals(source, subscriber, project, concurrent); });
return (0, lift_1.operate)(function (source, subscriber) { return (0, mergeInternals_1.mergeInternals)(source, subscriber, project, concurrent); });
}
exports.mergeMap = mergeMap;
//# sourceMappingURL=mergeMap.js.map

@@ -5,14 +5,6 @@ "use strict";

var mergeMap_1 = require("./mergeMap");
var isFunction_1 = require("../util/isFunction");
function mergeMapTo(innerObservable, resultSelector, concurrent) {
if (concurrent === void 0) { concurrent = Infinity; }
if (isFunction_1.isFunction(resultSelector)) {
return mergeMap_1.mergeMap(function () { return innerObservable; }, resultSelector, concurrent);
}
if (typeof resultSelector === 'number') {
concurrent = resultSelector;
}
return mergeMap_1.mergeMap(function () { return innerObservable; }, concurrent);
function mergeMapTo(innerObservable, concurrent) {
return (0, mergeMap_1.mergeMap)(function () { return innerObservable; }, concurrent);
}
exports.mergeMapTo = mergeMapTo;
//# sourceMappingURL=mergeMapTo.js.map

@@ -8,5 +8,5 @@ "use strict";

if (concurrent === void 0) { concurrent = Infinity; }
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var state = seed;
return mergeInternals_1.mergeInternals(source, subscriber, function (value, index) { return accumulator(state, value, index); }, concurrent, function (value) {
return (0, mergeInternals_1.mergeInternals)(source, subscriber, function (value, index) { return accumulator(state, value, index); }, concurrent, function (value) {
state = value;

@@ -13,0 +13,0 @@ }, false, undefined, function () { return (state = null); });

@@ -18,10 +18,16 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.mergeWith = void 0;
var merge_1 = require("./merge");
var from_1 = require("../observable/from");
var mergeAll_1 = require("../operators/mergeAll");
var lift_1 = require("../util/lift");
function mergeWith() {

@@ -32,5 +38,7 @@ var otherSources = [];

}
return merge_1.merge.apply(void 0, __spreadArray([], __read(otherSources)));
return (0, lift_1.operate)(function (source, subscriber) {
(0, mergeAll_1.mergeAll)()((0, from_1.from)(__spreadArray([source], __read(otherSources), false))).subscribe(subscriber);
});
}
exports.mergeWith = mergeWith;
//# sourceMappingURL=mergeWith.js.map

@@ -7,5 +7,5 @@ "use strict";

function min(comparer) {
return reduce_1.reduce(isFunction_1.isFunction(comparer) ? function (x, y) { return (comparer(x, y) < 0 ? x : y); } : function (x, y) { return (x < y ? x : y); });
return (0, reduce_1.reduce)((0, isFunction_1.isFunction)(comparer) ? function (x, y) { return (comparer(x, y) < 0 ? x : y); } : function (x, y) { return (x < y ? x : y); });
}
exports.min = min;
//# sourceMappingURL=min.js.map

@@ -9,4 +9,4 @@ "use strict";

if (delay === void 0) { delay = 0; }
return lift_1.operate(function (source, subscriber) {
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return executeSchedule_1.executeSchedule(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return executeSchedule_1.executeSchedule(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return executeSchedule_1.executeSchedule(subscriber, scheduler, function () { return subscriber.error(err); }, delay); }));
return (0, lift_1.operate)(function (source, subscriber) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) { return (0, executeSchedule_1.executeSchedule)(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return (0, executeSchedule_1.executeSchedule)(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return (0, executeSchedule_1.executeSchedule)(subscriber, scheduler, function () { return subscriber.error(err); }, delay); }));
});

@@ -13,0 +13,0 @@ }

@@ -18,9 +18,13 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.onErrorResumeNext = exports.onErrorResumeNextWith = void 0;
exports.onErrorResumeNextWith = void 0;
var argsOrArgArray_1 = require("../util/argsOrArgArray");

@@ -33,7 +37,6 @@ var onErrorResumeNext_1 = require("../observable/onErrorResumeNext");

}
var nextSources = argsOrArgArray_1.argsOrArgArray(sources);
return function (source) { return onErrorResumeNext_1.onErrorResumeNext.apply(void 0, __spreadArray([source], __read(nextSources))); };
var nextSources = (0, argsOrArgArray_1.argsOrArgArray)(sources);
return function (source) { return onErrorResumeNext_1.onErrorResumeNext.apply(void 0, __spreadArray([source], __read(nextSources), false)); };
}
exports.onErrorResumeNextWith = onErrorResumeNextWith;
exports.onErrorResumeNext = onErrorResumeNextWith;
//# sourceMappingURL=onErrorResumeNextWith.js.map

@@ -7,6 +7,6 @@ "use strict";

function pairwise() {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var prev;
var hasPrev = false;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
var p = prev;

@@ -13,0 +13,0 @@ prev = value;

@@ -8,3 +8,3 @@ "use strict";

return function (source) {
return [filter_1.filter(predicate, thisArg)(source), filter_1.filter(not_1.not(predicate, thisArg))(source)];
return [(0, filter_1.filter)(predicate, thisArg)(source), (0, filter_1.filter)((0, not_1.not)(predicate, thisArg))(source)];
};

@@ -11,0 +11,0 @@ }

@@ -18,6 +18,10 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};

@@ -36,4 +40,4 @@ Object.defineProperty(exports, "__esModule", { value: true });

? identity_1.identity
: lift_1.operate(function (source, subscriber) {
race_1.raceInit(__spreadArray([source], __read(otherSources)))(subscriber);
: (0, lift_1.operate)(function (source, subscriber) {
(0, race_1.raceInit)(__spreadArray([source], __read(otherSources), false))(subscriber);
});

@@ -40,0 +44,0 @@ }

@@ -7,5 +7,5 @@ "use strict";

function reduce(accumulator, seed) {
return lift_1.operate(scanInternals_1.scanInternals(accumulator, seed, arguments.length >= 2, false, true));
return (0, lift_1.operate)((0, scanInternals_1.scanInternals)(accumulator, seed, arguments.length >= 2, false, true));
}
exports.reduce = reduce;
//# sourceMappingURL=reduce.js.map

@@ -7,3 +7,3 @@ "use strict";

var OperatorSubscriber_1 = require("./OperatorSubscriber");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var timer_1 = require("../observable/timer");

@@ -24,3 +24,3 @@ function repeat(countOrConfig) {

? function () { return empty_1.EMPTY; }
: lift_1.operate(function (source, subscriber) {
: (0, lift_1.operate)(function (source, subscriber) {
var soFar = 0;

@@ -32,4 +32,4 @@ var sourceSub;

if (delay != null) {
var notifier = typeof delay === 'number' ? timer_1.timer(delay) : innerFrom_1.innerFrom(delay(soFar));
var notifierSubscriber_1 = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () {
var notifier = typeof delay === 'number' ? (0, timer_1.timer)(delay) : (0, from_1.from)(delay(soFar));
var notifierSubscriber_1 = (0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function () {
notifierSubscriber_1.unsubscribe();

@@ -46,3 +46,3 @@ subscribeToSource();

var syncUnsub = false;
sourceSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, function () {
sourceSub = source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, undefined, function () {
if (++soFar < count) {

@@ -49,0 +49,0 @@ if (sourceSub) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.repeatWhen = void 0;
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var Subject_1 = require("../Subject");

@@ -9,3 +9,3 @@ var lift_1 = require("../util/lift");

function repeatWhen(notifier) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var innerSub;

@@ -20,3 +20,3 @@ var syncResub = false;

completions$ = new Subject_1.Subject();
innerFrom_1.innerFrom(notifier(completions$)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () {
(0, from_1.from)(notifier(completions$)).subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function () {
if (innerSub) {

@@ -37,3 +37,3 @@ subscribeForRepeatWhen();

isMainComplete = false;
innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, function () {
innerSub = source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, undefined, function () {
isMainComplete = true;

@@ -40,0 +40,0 @@ !checkComplete() && getCompletionSubject().next();

@@ -8,3 +8,3 @@ "use strict";

var timer_1 = require("../observable/timer");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
function retry(configOrCount) {

@@ -24,3 +24,3 @@ if (configOrCount === void 0) { configOrCount = Infinity; }

? identity_1.identity
: lift_1.operate(function (source, subscriber) {
: (0, lift_1.operate)(function (source, subscriber) {
var soFar = 0;

@@ -30,3 +30,3 @@ var innerSub;

var syncUnsub = false;
innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
innerSub = source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
if (resetOnSuccess) {

@@ -49,4 +49,4 @@ soFar = 0;

if (delay != null) {
var notifier = typeof delay === 'number' ? timer_1.timer(delay) : innerFrom_1.innerFrom(delay(err, soFar));
var notifierSubscriber_1 = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () {
var notifier = typeof delay === 'number' ? (0, timer_1.timer)(delay) : (0, from_1.from)(delay(err, soFar));
var notifierSubscriber_1 = (0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function () {
notifierSubscriber_1.unsubscribe();

@@ -53,0 +53,0 @@ resub_1();

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.retryWhen = void 0;
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var Subject_1 = require("../Subject");

@@ -9,3 +9,3 @@ var lift_1 = require("../util/lift");

function retryWhen(notifier) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var innerSub;

@@ -15,6 +15,6 @@ var syncResub = false;

var subscribeForRetryWhen = function () {
innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, undefined, function (err) {
innerSub = source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, undefined, undefined, function (err) {
if (!errors$) {
errors$ = new Subject_1.Subject();
innerFrom_1.innerFrom(notifier(errors$)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () {
(0, from_1.from)(notifier(errors$)).subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function () {
return innerSub ? subscribeForRetryWhen() : (syncResub = true);

@@ -21,0 +21,0 @@ }));

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sample = void 0;
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var lift_1 = require("../util/lift");

@@ -9,10 +9,10 @@ var noop_1 = require("../util/noop");

function sample(notifier) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var hasValue = false;
var lastValue = null;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
hasValue = true;
lastValue = value;
}));
innerFrom_1.innerFrom(notifier).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () {
(0, from_1.from)(notifier).subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function () {
if (hasValue) {

@@ -19,0 +19,0 @@ hasValue = false;

@@ -9,5 +9,5 @@ "use strict";

if (scheduler === void 0) { scheduler = async_1.asyncScheduler; }
return sample_1.sample(interval_1.interval(period, scheduler));
return (0, sample_1.sample)((0, interval_1.interval)(period, scheduler));
}
exports.sampleTime = sampleTime;
//# sourceMappingURL=sampleTime.js.map

@@ -7,5 +7,5 @@ "use strict";

function scan(accumulator, seed) {
return lift_1.operate(scanInternals_1.scanInternals(accumulator, seed, arguments.length >= 2, true));
return (0, lift_1.operate)((0, scanInternals_1.scanInternals)(accumulator, seed, arguments.length >= 2, true));
}
exports.scan = scan;
//# sourceMappingURL=scan.js.map

@@ -10,3 +10,3 @@ "use strict";

var index = 0;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
var i = index++;

@@ -13,0 +13,0 @@ state = hasState

@@ -6,6 +6,6 @@ "use strict";

var OperatorSubscriber_1 = require("./OperatorSubscriber");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
function sequenceEqual(compareTo, comparator) {
if (comparator === void 0) { comparator = function (a, b) { return a === b; }; }
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var aState = createState();

@@ -18,3 +18,3 @@ var bState = createState();

var createSubscriber = function (selfState, otherState) {
var sequenceEqualSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (a) {
var sequenceEqualSubscriber = (0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (a) {
var buffer = otherState.buffer, complete = otherState.complete;

@@ -36,3 +36,3 @@ if (buffer.length === 0) {

source.subscribe(createSubscriber(aState, bState));
innerFrom_1.innerFrom(compareTo).subscribe(createSubscriber(bState, aState));
(0, from_1.from)(compareTo).subscribe(createSubscriber(bState, aState));
});

@@ -39,0 +39,0 @@ }

@@ -18,10 +18,14 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.share = void 0;
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var Subject_1 = require("../Subject");

@@ -54,3 +58,3 @@ var Subscriber_1 = require("../Subscriber");

};
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
refCount++;

@@ -85,3 +89,3 @@ if (!hasErrored && !hasCompleted) {

});
innerFrom_1.innerFrom(source).subscribe(connection);
(0, from_1.from)(source).subscribe(connection);
}

@@ -110,4 +114,4 @@ })(wrapperSource);

});
return innerFrom_1.innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber);
return (0, from_1.from)(on.apply(void 0, __spreadArray([], __read(args), false))).subscribe(onSubscriber);
}
//# sourceMappingURL=share.js.map

@@ -16,3 +16,3 @@ "use strict";

}
return share_1.share({
return (0, share_1.share)({
connector: function () { return new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, scheduler); },

@@ -19,0 +19,0 @@ resetOnError: true,

@@ -10,3 +10,3 @@ "use strict";

function single(predicate) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var hasValue = false;

@@ -16,3 +16,3 @@ var singleValue;

var index = 0;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
seenValue = true;

@@ -19,0 +19,0 @@ if (!predicate || predicate(value, index++, source)) {

@@ -6,5 +6,5 @@ "use strict";

function skip(count) {
return filter_1.filter(function (_, index) { return count <= index; });
return (0, filter_1.filter)(function (_, index) { return count <= index; });
}
exports.skip = skip;
//# sourceMappingURL=skip.js.map

@@ -11,6 +11,6 @@ "use strict";

identity_1.identity
: lift_1.operate(function (source, subscriber) {
: (0, lift_1.operate)(function (source, subscriber) {
var ring = new Array(skipCount);
var seen = 0;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
var valueIndex = seen++;

@@ -17,0 +17,0 @@ if (valueIndex < skipCount) {

@@ -6,13 +6,13 @@ "use strict";

var OperatorSubscriber_1 = require("./OperatorSubscriber");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var noop_1 = require("../util/noop");
function skipUntil(notifier) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var taking = false;
var skipSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () {
var skipSubscriber = (0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function () {
skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe();
taking = true;
}, noop_1.noop);
innerFrom_1.innerFrom(notifier).subscribe(skipSubscriber);
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return taking && subscriber.next(value); }));
(0, from_1.from)(notifier).subscribe(skipSubscriber);
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) { return taking && subscriber.next(value); }));
});

@@ -19,0 +19,0 @@ }

@@ -7,6 +7,6 @@ "use strict";

function skipWhile(predicate) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var taking = false;
var index = 0;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); }));
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) { return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); }));
});

@@ -13,0 +13,0 @@ }

@@ -12,5 +12,5 @@ "use strict";

}
var scheduler = args_1.popScheduler(values);
return lift_1.operate(function (source, subscriber) {
(scheduler ? concat_1.concat(values, source, scheduler) : concat_1.concat(values, source)).subscribe(subscriber);
var scheduler = (0, args_1.popScheduler)(values);
return (0, lift_1.operate)(function (source, subscriber) {
(scheduler ? (0, concat_1.concat)(values, source, scheduler) : (0, concat_1.concat)(values, source)).subscribe(subscriber);
});

@@ -17,0 +17,0 @@ }

@@ -7,3 +7,3 @@ "use strict";

if (delay === void 0) { delay = 0; }
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
subscriber.add(scheduler.schedule(function () { return source.subscribe(subscriber); }, delay));

@@ -10,0 +10,0 @@ });

@@ -7,5 +7,5 @@ "use strict";

function switchAll() {
return switchMap_1.switchMap(identity_1.identity);
return (0, switchMap_1.switchMap)(identity_1.identity);
}
exports.switchAll = switchAll;
//# sourceMappingURL=switchAll.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.switchMap = void 0;
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var lift_1 = require("../util/lift");
var OperatorSubscriber_1 = require("./OperatorSubscriber");
function switchMap(project, resultSelector) {
return lift_1.operate(function (source, subscriber) {
function switchMap(project) {
return (0, lift_1.operate)(function (source, subscriber) {
var innerSubscriber = null;

@@ -13,7 +13,6 @@ var index = 0;

var checkComplete = function () { return isComplete && !innerSubscriber && subscriber.complete(); };
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();
var innerIndex = 0;
var outerIndex = index++;
innerFrom_1.innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (innerValue) { return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); }, function () {
(0, from_1.from)(project(value, outerIndex)).subscribe((innerSubscriber = (0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, undefined, function () {
innerSubscriber = null;

@@ -20,0 +19,0 @@ checkComplete();

@@ -5,7 +5,6 @@ "use strict";

var switchMap_1 = require("./switchMap");
var isFunction_1 = require("../util/isFunction");
function switchMapTo(innerObservable, resultSelector) {
return isFunction_1.isFunction(resultSelector) ? switchMap_1.switchMap(function () { return innerObservable; }, resultSelector) : switchMap_1.switchMap(function () { return innerObservable; });
function switchMapTo(innerObservable) {
return (0, switchMap_1.switchMap)(function () { return innerObservable; });
}
exports.switchMapTo = switchMapTo;
//# sourceMappingURL=switchMapTo.js.map

@@ -6,6 +6,10 @@ "use strict";

var lift_1 = require("../util/lift");
var OperatorSubscriber_1 = require("./OperatorSubscriber");
function switchScan(accumulator, seed) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var state = seed;
switchMap_1.switchMap(function (value, index) { return accumulator(state, value, index); }, function (_, innerValue) { return ((state = innerValue), innerValue); })(source).subscribe(subscriber);
(0, switchMap_1.switchMap)(function (value, index) { return accumulator(state, value, index); })(source).subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (innerValue) {
state = innerValue;
subscriber.next(innerValue);
}));
return function () {

@@ -12,0 +16,0 @@ state = null;

@@ -11,12 +11,15 @@ "use strict";

function () { return empty_1.EMPTY; }
: lift_1.operate(function (source, subscriber) {
: (0, lift_1.operate)(function (source, subscriber) {
var seen = 0;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
if (++seen <= count) {
var operatorSubscriber = (0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
if (++seen < count) {
subscriber.next(value);
if (count <= seen) {
subscriber.complete();
}
}
}));
else {
operatorSubscriber.unsubscribe();
subscriber.next(value);
subscriber.complete();
}
});
source.subscribe(operatorSubscriber);
});

@@ -23,0 +26,0 @@ }

"use strict";
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -21,25 +10,16 @@ exports.takeLast = void 0;

? function () { return empty_1.EMPTY; }
: lift_1.operate(function (source, subscriber) {
var buffer = [];
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
buffer.push(value);
count < buffer.length && buffer.shift();
: (0, lift_1.operate)(function (source, subscriber) {
var ring = new Array(count);
var counter = 0;
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
ring[counter++ % count] = value;
}, function () {
var e_1, _a;
try {
for (var buffer_1 = __values(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) {
var value = buffer_1_1.value;
subscriber.next(value);
}
var start = count <= counter ? counter : 0;
var total = Math.min(count, counter);
for (var n = 0; n < total; n++) {
subscriber.next(ring[(start + n) % count]);
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1);
}
finally { if (e_1) throw e_1.error; }
}
subscriber.complete();
}, undefined, function () {
buffer = null;
ring = null;
}));

@@ -46,0 +26,0 @@ });

@@ -6,7 +6,7 @@ "use strict";

var OperatorSubscriber_1 = require("./OperatorSubscriber");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var noop_1 = require("../util/noop");
function takeUntil(notifier) {
return lift_1.operate(function (source, subscriber) {
innerFrom_1.innerFrom(notifier).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { return subscriber.complete(); }, noop_1.noop));
return (0, lift_1.operate)(function (source, subscriber) {
(0, from_1.from)(notifier).subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function () { return subscriber.complete(); }, noop_1.noop));
!subscriber.closed && source.subscribe(subscriber);

@@ -13,0 +13,0 @@ });

@@ -8,9 +8,17 @@ "use strict";

if (inclusive === void 0) { inclusive = false; }
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var index = 0;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
var result = predicate(value, index++);
(result || inclusive) && subscriber.next(value);
!result && subscriber.complete();
}));
var operatorSubscriber = (0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
if (predicate(value, index++)) {
subscriber.next(value);
}
else {
operatorSubscriber.unsubscribe();
if (inclusive) {
subscriber.next(value);
}
subscriber.complete();
}
});
source.subscribe(operatorSubscriber);
});

@@ -17,0 +25,0 @@ }

@@ -9,9 +9,9 @@ "use strict";

function tap(observerOrNext) {
var tapObserver = isFunction_1.isFunction(observerOrNext) ? { next: observerOrNext } : observerOrNext;
var tapObserver = (0, isFunction_1.isFunction)(observerOrNext) ? { next: observerOrNext } : observerOrNext;
return tapObserver
? lift_1.operate(function (source, subscriber) {
? (0, lift_1.operate)(function (source, subscriber) {
var _a;
(_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);
var isUnsub = true;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
var _a;

@@ -18,0 +18,0 @@ (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);

@@ -6,3 +6,3 @@ "use strict";

var OperatorSubscriber_1 = require("./OperatorSubscriber");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
exports.defaultThrottleConfig = {

@@ -14,3 +14,3 @@ leading: true,

if (config === void 0) { config = exports.defaultThrottleConfig; }
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var leading = config.leading, trailing = config.trailing;

@@ -34,3 +34,3 @@ var hasValue = false;

var startThrottle = function (value) {
return (throttled = innerFrom_1.innerFrom(durationSelector(value)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling)));
return (throttled = (0, from_1.from)(durationSelector(value)).subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, endThrottling, cleanupThrottling)));
};

@@ -46,3 +46,3 @@ var send = function () {

};
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
hasValue = true;

@@ -49,0 +49,0 @@ sendValue = value;

@@ -10,6 +10,6 @@ "use strict";

if (config === void 0) { config = throttle_1.defaultThrottleConfig; }
var duration$ = timer_1.timer(duration, scheduler);
return throttle_1.throttle(function () { return duration$; }, config);
var duration$ = (0, timer_1.timer)(duration, scheduler);
return (0, throttle_1.throttle)(function () { return duration$; }, config);
}
exports.throttleTime = throttleTime;
//# sourceMappingURL=throttleTime.js.map

@@ -9,5 +9,5 @@ "use strict";

if (errorFactory === void 0) { errorFactory = defaultErrorFactory; }
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var hasValue = false;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
hasValue = true;

@@ -14,0 +14,0 @@ subscriber.next(value);

@@ -9,5 +9,5 @@ "use strict";

if (scheduler === void 0) { scheduler = async_1.asyncScheduler; }
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var last = scheduler.now();
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
var now = scheduler.now();

@@ -14,0 +14,0 @@ var interval = now - last;

@@ -7,7 +7,7 @@ "use strict";

var lift_1 = require("../util/lift");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var createErrorClass_1 = require("../util/createErrorClass");
var OperatorSubscriber_1 = require("./OperatorSubscriber");
var executeSchedule_1 = require("../util/executeSchedule");
exports.TimeoutError = createErrorClass_1.createErrorClass(function (_super) {
exports.TimeoutError = (0, createErrorClass_1.createErrorClass)(function (_super) {
return function TimeoutErrorImpl(info) {

@@ -22,7 +22,7 @@ if (info === void 0) { info = null; }

function timeout(config, schedulerArg) {
var _a = (isDate_1.isValidDate(config) ? { first: config } : typeof config === 'number' ? { each: config } : config), first = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : async_1.asyncScheduler : _c, _d = _a.meta, meta = _d === void 0 ? null : _d;
var _a = ((0, isDate_1.isValidDate)(config) ? { first: config } : typeof config === 'number' ? { each: config } : config), first = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : async_1.asyncScheduler : _c, _d = _a.meta, meta = _d === void 0 ? null : _d;
if (first == null && each == null) {
throw new TypeError('No timeout provided.');
}
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var originalSourceSubscription;

@@ -33,6 +33,6 @@ var timerSubscription;

var startTimer = function (delay) {
timerSubscription = executeSchedule_1.executeSchedule(subscriber, scheduler, function () {
timerSubscription = (0, executeSchedule_1.executeSchedule)(subscriber, scheduler, function () {
try {
originalSourceSubscription.unsubscribe();
innerFrom_1.innerFrom(_with({
(0, from_1.from)(_with({
meta: meta,

@@ -48,3 +48,3 @@ lastValue: lastValue,

};
originalSourceSubscription = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
originalSourceSubscription = source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe();

@@ -51,0 +51,0 @@ seen++;

@@ -11,4 +11,4 @@ "use strict";

var _with;
scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async_1.async;
if (isDate_1.isValidDate(due)) {
scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async_1.asyncScheduler;
if ((0, isDate_1.isValidDate)(due)) {
first = due;

@@ -28,3 +28,3 @@ }

}
return timeout_1.timeout({
return (0, timeout_1.timeout)({
first: first,

@@ -31,0 +31,0 @@ each: each,

@@ -8,5 +8,5 @@ "use strict";

if (timestampProvider === void 0) { timestampProvider = dateTimestampProvider_1.dateTimestampProvider; }
return map_1.map(function (value) { return ({ value: value, timestamp: timestampProvider.now() }); });
return (0, map_1.map)(function (value) { return ({ value: value, timestamp: timestampProvider.now() }); });
}
exports.timestamp = timestamp;
//# sourceMappingURL=timestamp.js.map

@@ -8,4 +8,4 @@ "use strict";

function toArray() {
return lift_1.operate(function (source, subscriber) {
reduce_1.reduce(arrReducer, [])(source).subscribe(subscriber);
return (0, lift_1.operate)(function (source, subscriber) {
(0, reduce_1.reduce)(arrReducer, [])(source).subscribe(subscriber);
});

@@ -12,0 +12,0 @@ }

@@ -8,5 +8,5 @@ "use strict";

var noop_1 = require("../util/noop");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
function window(windowBoundaries) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var windowSubject = new Subject_1.Subject();

@@ -18,7 +18,7 @@ subscriber.next(windowSubject.asObservable());

};
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); }, function () {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) { return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); }, function () {
windowSubject.complete();
subscriber.complete();
}, errorHandler));
innerFrom_1.innerFrom(windowBoundaries).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () {
(0, from_1.from)(windowBoundaries).subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function () {
windowSubject.complete();

@@ -25,0 +25,0 @@ subscriber.next((windowSubject = new Subject_1.Subject()));

@@ -21,3 +21,3 @@ "use strict";

var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize;
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var windows = [new Subject_1.Subject()];

@@ -27,3 +27,3 @@ var starts = [];

subscriber.next(windows[0].asObservable());
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
var e_1, _a;

@@ -30,0 +30,0 @@ try {

@@ -18,6 +18,6 @@ "use strict";

}
var scheduler = (_a = args_1.popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : async_1.asyncScheduler;
var scheduler = (_a = (0, args_1.popScheduler)(otherArgs)) !== null && _a !== void 0 ? _a : async_1.asyncScheduler;
var windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null;
var maxWindowSize = otherArgs[1] || Infinity;
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var windowRecords = [];

@@ -29,3 +29,3 @@ var restartOnClose = false;

subs.unsubscribe();
arrRemove_1.arrRemove(windowRecords, record);
(0, arrRemove_1.arrRemove)(windowRecords, record);
restartOnClose && startWindow();

@@ -45,7 +45,7 @@ };

subscriber.next(window_1.asObservable());
executeSchedule_1.executeSchedule(subs, scheduler, function () { return closeWindow(record_1); }, windowTimeSpan);
(0, executeSchedule_1.executeSchedule)(subs, scheduler, function () { return closeWindow(record_1); }, windowTimeSpan);
}
};
if (windowCreationInterval !== null && windowCreationInterval >= 0) {
executeSchedule_1.executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true);
(0, executeSchedule_1.executeSchedule)(subscriber, scheduler, startWindow, windowCreationInterval, true);
}

@@ -65,3 +65,3 @@ else {

};
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
loop(function (record) {

@@ -68,0 +68,0 @@ record.window.next(value);

@@ -18,3 +18,3 @@ "use strict";

var lift_1 = require("../util/lift");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var OperatorSubscriber_1 = require("./OperatorSubscriber");

@@ -24,3 +24,3 @@ var noop_1 = require("../util/noop");

function windowToggle(openings, closingSelector) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var windows = [];

@@ -33,3 +33,3 @@ var handleError = function (err) {

};
innerFrom_1.innerFrom(openings).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (openValue) {
(0, from_1.from)(openings).subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (openValue) {
var window = new Subject_1.Subject();

@@ -39,3 +39,3 @@ windows.push(window);

var closeWindow = function () {
arrRemove_1.arrRemove(windows, window);
(0, arrRemove_1.arrRemove)(windows, window);
window.complete();

@@ -46,3 +46,3 @@ closingSubscription.unsubscribe();

try {
closingNotifier = innerFrom_1.innerFrom(closingSelector(openValue));
closingNotifier = (0, from_1.from)(closingSelector(openValue));
}

@@ -53,6 +53,6 @@ catch (err) {

}
subscriber.next(window.asObservable());
closingSubscription.add(closingNotifier.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, closeWindow, noop_1.noop, handleError)));
subscriber.next(window);
closingSubscription.add(closingNotifier.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, closeWindow, noop_1.noop, handleError)));
}, noop_1.noop));
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
var e_1, _a;

@@ -59,0 +59,0 @@ var windowsCopy = windows.slice();

@@ -7,5 +7,6 @@ "use strict";

var OperatorSubscriber_1 = require("./OperatorSubscriber");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var noop_1 = require("../util/noop");
function windowWhen(closingSelector) {
return lift_1.operate(function (source, subscriber) {
return (0, lift_1.operate)(function (source, subscriber) {
var window;

@@ -24,3 +25,3 @@ var closingSubscriber;

try {
closingNotifier = innerFrom_1.innerFrom(closingSelector());
closingNotifier = (0, from_1.from)(closingSelector());
}

@@ -31,6 +32,6 @@ catch (err) {

}
closingNotifier.subscribe((closingSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, openWindow, openWindow, handleError)));
closingNotifier.subscribe((closingSubscriber = (0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, openWindow, noop_1.noop, handleError)));
};
openWindow();
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return window.next(value); }, function () {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) { return window.next(value); }, function () {
window.complete();

@@ -37,0 +38,0 @@ subscriber.complete();

@@ -18,6 +18,10 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};

@@ -28,3 +32,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

var OperatorSubscriber_1 = require("./OperatorSubscriber");
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var identity_1 = require("../util/identity");

@@ -38,4 +42,4 @@ var noop_1 = require("../util/noop");

}
var project = args_1.popResultSelector(inputs);
return lift_1.operate(function (source, subscriber) {
var project = (0, args_1.popResultSelector)(inputs);
return (0, lift_1.operate)(function (source, subscriber) {
var len = inputs.length;

@@ -46,3 +50,3 @@ var otherValues = new Array(len);

var _loop_1 = function (i) {
innerFrom_1.innerFrom(inputs[i]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
(0, from_1.from)(inputs[i]).subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
otherValues[i] = value;

@@ -58,6 +62,6 @@ if (!ready && !hasValue[i]) {

}
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
source.subscribe((0, OperatorSubscriber_1.createOperatorSubscriber)(subscriber, function (value) {
if (ready) {
var values = __spreadArray([value], __read(otherValues));
subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values))) : values);
var values = __spreadArray([value], __read(otherValues), false);
subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values), false)) : values);
}

@@ -64,0 +68,0 @@ }));

@@ -7,5 +7,5 @@ "use strict";

function zipAll(project) {
return joinAllInternals_1.joinAllInternals(zip_1.zip, project);
return (0, joinAllInternals_1.joinAllInternals)(zip_1.zip, project);
}
exports.zipAll = zipAll;
//# sourceMappingURL=zipAll.js.map

@@ -18,10 +18,15 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.zipWith = void 0;
var zip_1 = require("./zip");
var lift_1 = require("../util/lift");
var zip_1 = require("../observable/zip");
function zipWith() {

@@ -32,5 +37,7 @@ var otherInputs = [];

}
return zip_1.zip.apply(void 0, __spreadArray([], __read(otherInputs)));
return (0, lift_1.operate)(function (source, subscriber) {
zip_1.zip.apply(void 0, __spreadArray([source], __read(otherInputs), false)).subscribe(subscriber);
});
}
exports.zipWith = zipWith;
//# sourceMappingURL=zipWith.js.map

@@ -39,4 +39,4 @@ "use strict";

ReplaySubject.prototype.next = function (value) {
var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime;
if (!isStopped) {
var _a = this, _closed = _a._closed, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime;
if (!_closed) {
_buffer.push(value);

@@ -49,3 +49,2 @@ !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);

ReplaySubject.prototype._subscribe = function (subscriber) {
this._throwIfClosed();
this._trimBuffer();

@@ -52,0 +51,0 @@ var subscription = this._innerSubscribe(subscriber);

@@ -11,5 +11,5 @@ "use strict";

return new Observable_1.Observable(function (subscriber) {
executeSchedule_1.executeSchedule(subscriber, scheduler, function () {
(0, executeSchedule_1.executeSchedule)(subscriber, scheduler, function () {
var iterator = input[Symbol.asyncIterator]();
executeSchedule_1.executeSchedule(subscriber, scheduler, function () {
(0, executeSchedule_1.executeSchedule)(subscriber, scheduler, function () {
iterator.next().then(function (result) {

@@ -16,0 +16,0 @@ if (result.done) {

@@ -19,24 +19,24 @@ "use strict";

if (input != null) {
if (isInteropObservable_1.isInteropObservable(input)) {
return scheduleObservable_1.scheduleObservable(input, scheduler);
if ((0, isInteropObservable_1.isInteropObservable)(input)) {
return (0, scheduleObservable_1.scheduleObservable)(input, scheduler);
}
if (isArrayLike_1.isArrayLike(input)) {
return scheduleArray_1.scheduleArray(input, scheduler);
if ((0, isArrayLike_1.isArrayLike)(input)) {
return (0, scheduleArray_1.scheduleArray)(input, scheduler);
}
if (isPromise_1.isPromise(input)) {
return schedulePromise_1.schedulePromise(input, scheduler);
if ((0, isPromise_1.isPromise)(input)) {
return (0, schedulePromise_1.schedulePromise)(input, scheduler);
}
if (isAsyncIterable_1.isAsyncIterable(input)) {
return scheduleAsyncIterable_1.scheduleAsyncIterable(input, scheduler);
if ((0, isAsyncIterable_1.isAsyncIterable)(input)) {
return (0, scheduleAsyncIterable_1.scheduleAsyncIterable)(input, scheduler);
}
if (isIterable_1.isIterable(input)) {
return scheduleIterable_1.scheduleIterable(input, scheduler);
if ((0, isIterable_1.isIterable)(input)) {
return (0, scheduleIterable_1.scheduleIterable)(input, scheduler);
}
if (isReadableStreamLike_1.isReadableStreamLike(input)) {
return scheduleReadableStreamLike_1.scheduleReadableStreamLike(input, scheduler);
if ((0, isReadableStreamLike_1.isReadableStreamLike)(input)) {
return (0, scheduleReadableStreamLike_1.scheduleReadableStreamLike)(input, scheduler);
}
}
throw throwUnobservableError_1.createInvalidObservableTypeError(input);
throw (0, throwUnobservableError_1.createInvalidObservableTypeError)(input);
}
exports.scheduled = scheduled;
//# sourceMappingURL=scheduled.js.map

@@ -11,5 +11,5 @@ "use strict";

var iterator;
executeSchedule_1.executeSchedule(subscriber, scheduler, function () {
(0, executeSchedule_1.executeSchedule)(subscriber, scheduler, function () {
iterator = input[iterator_1.iterator]();
executeSchedule_1.executeSchedule(subscriber, scheduler, function () {
(0, executeSchedule_1.executeSchedule)(subscriber, scheduler, function () {
var _a;

@@ -33,3 +33,3 @@ var value;

});
return function () { return isFunction_1.isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); };
return function () { return (0, isFunction_1.isFunction)(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); };
});

@@ -36,0 +36,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.scheduleObservable = void 0;
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var observeOn_1 = require("../operators/observeOn");
var subscribeOn_1 = require("../operators/subscribeOn");
function scheduleObservable(input, scheduler) {
return innerFrom_1.innerFrom(input).pipe(subscribeOn_1.subscribeOn(scheduler), observeOn_1.observeOn(scheduler));
return (0, from_1.from)(input).pipe((0, subscribeOn_1.subscribeOn)(scheduler), (0, observeOn_1.observeOn)(scheduler));
}
exports.scheduleObservable = scheduleObservable;
//# sourceMappingURL=scheduleObservable.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.schedulePromise = void 0;
var innerFrom_1 = require("../observable/innerFrom");
var from_1 = require("../observable/from");
var observeOn_1 = require("../operators/observeOn");
var subscribeOn_1 = require("../operators/subscribeOn");
function schedulePromise(input, scheduler) {
return innerFrom_1.innerFrom(input).pipe(subscribeOn_1.subscribeOn(scheduler), observeOn_1.observeOn(scheduler));
return (0, from_1.from)(input).pipe((0, subscribeOn_1.subscribeOn)(scheduler), (0, observeOn_1.observeOn)(scheduler));
}
exports.schedulePromise = schedulePromise;
//# sourceMappingURL=schedulePromise.js.map

@@ -7,5 +7,5 @@ "use strict";

function scheduleReadableStreamLike(input, scheduler) {
return scheduleAsyncIterable_1.scheduleAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(input), scheduler);
return (0, scheduleAsyncIterable_1.scheduleAsyncIterable)((0, isReadableStreamLike_1.readableStreamLikeToAsyncGenerator)(input), scheduler);
}
exports.scheduleReadableStreamLike = scheduleReadableStreamLike;
//# sourceMappingURL=scheduleReadableStreamLike.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.animationFrame = exports.animationFrameScheduler = void 0;
exports.animationFrameScheduler = void 0;
var AnimationFrameAction_1 = require("./AnimationFrameAction");
var AnimationFrameScheduler_1 = require("./AnimationFrameScheduler");
exports.animationFrameScheduler = new AnimationFrameScheduler_1.AnimationFrameScheduler(AnimationFrameAction_1.AnimationFrameAction);
exports.animationFrame = exports.animationFrameScheduler;
//# sourceMappingURL=animationFrame.js.map

@@ -18,6 +18,10 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};

@@ -48,3 +52,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

var delegate = exports.animationFrameProvider.delegate;
return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args)));
return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args), false));
},

@@ -57,3 +61,3 @@ cancelAnimationFrame: function () {

var delegate = exports.animationFrameProvider.delegate;
return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args)));
return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args), false));
},

@@ -60,0 +64,0 @@ delegate: undefined,

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.asap = exports.asapScheduler = void 0;
exports.asapScheduler = void 0;
var AsapAction_1 = require("./AsapAction");
var AsapScheduler_1 = require("./AsapScheduler");
exports.asapScheduler = new AsapScheduler_1.AsapScheduler(AsapAction_1.AsapAction);
exports.asap = exports.asapScheduler;
//# sourceMappingURL=asap.js.map

@@ -46,3 +46,5 @@ "use strict";

immediateProvider_1.immediateProvider.clearImmediate(id);
scheduler._scheduled = undefined;
if (scheduler._scheduled === id) {
scheduler._scheduled = undefined;
}
}

@@ -49,0 +51,0 @@ return undefined;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.async = exports.asyncScheduler = void 0;
exports.asyncScheduler = void 0;
var AsyncAction_1 = require("./AsyncAction");
var AsyncScheduler_1 = require("./AsyncScheduler");
exports.asyncScheduler = new AsyncScheduler_1.AsyncScheduler(AsyncAction_1.AsyncAction);
exports.async = exports.asyncScheduler;
//# sourceMappingURL=async.js.map

@@ -96,3 +96,3 @@ "use strict";

this.pending = false;
arrRemove_1.arrRemove(actions, this);
(0, arrRemove_1.arrRemove)(actions, this);
if (id != null) {

@@ -99,0 +99,0 @@ this.id = this.recycleAsyncId(scheduler, id, null);

@@ -18,6 +18,10 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};

@@ -35,3 +39,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

var delegate = exports.immediateProvider.delegate;
return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args)));
return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args), false));
},

@@ -38,0 +42,0 @@ clearImmediate: function (handle) {

@@ -18,6 +18,10 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};

@@ -34,5 +38,5 @@ Object.defineProperty(exports, "__esModule", { value: true });

if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {
return delegate.setInterval.apply(delegate, __spreadArray([handler, timeout], __read(args)));
return delegate.setInterval.apply(delegate, __spreadArray([handler, timeout], __read(args), false));
}
return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args)));
return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args), false));
},

@@ -39,0 +43,0 @@ clearInterval: function (handle) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.queue = exports.queueScheduler = void 0;
exports.queueScheduler = void 0;
var QueueAction_1 = require("./QueueAction");
var QueueScheduler_1 = require("./QueueScheduler");
exports.queueScheduler = new QueueScheduler_1.QueueScheduler(QueueAction_1.QueueAction);
exports.queue = exports.queueScheduler;
//# sourceMappingURL=queue.js.map

@@ -18,6 +18,10 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};

@@ -34,5 +38,5 @@ Object.defineProperty(exports, "__esModule", { value: true });

if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {
return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args)));
return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args), false));
}
return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));
return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args), false));
},

@@ -39,0 +43,0 @@ clearTimeout: function (handle) {

@@ -17,13 +17,2 @@ "use strict";

})();
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -33,4 +22,2 @@ exports.AnonymousSubject = exports.Subject = void 0;

var Subscription_1 = require("./Subscription");
var ObjectUnsubscribedError_1 = require("./util/ObjectUnsubscribedError");
var arrRemove_1 = require("./util/arrRemove");
var Subject = (function (_super) {

@@ -40,6 +27,5 @@ __extends(Subject, _super);

var _this = _super.call(this) || this;
_this.closed = false;
_this.currentObservers = null;
_this.observers = [];
_this.isStopped = false;
_this._closed = false;
_this._observerCounter = 0;
_this.currentObservers = new Map();
_this.hasError = false;

@@ -49,63 +35,60 @@ _this.thrownError = null;

}
Subject.prototype.lift = function (operator) {
var subject = new AnonymousSubject(this, this);
subject.operator = operator;
return subject;
Object.defineProperty(Subject.prototype, "closed", {
get: function () {
return this._closed;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Subject.prototype, "observers", {
get: function () {
var _a;
return ((_a = this.observerSnapshot) !== null && _a !== void 0 ? _a : (this.observerSnapshot = Array.from(this.currentObservers.values())));
},
enumerable: false,
configurable: true
});
Subject.prototype._clearObservers = function () {
this.currentObservers.clear();
this.observerSnapshot = undefined;
};
Subject.prototype._throwIfClosed = function () {
if (this.closed) {
throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();
}
};
Subject.prototype.next = function (value) {
var e_1, _a;
this._throwIfClosed();
if (!this.isStopped) {
if (!this.currentObservers) {
this.currentObservers = Array.from(this.observers);
if (!this._closed) {
var observers = this.observers;
var len = observers.length;
for (var i = 0; i < len; i++) {
observers[i].next(value);
}
try {
for (var _b = __values(this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) {
var observer = _c.value;
observer.next(value);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
}
};
Subject.prototype.error = function (err) {
this._throwIfClosed();
if (!this.isStopped) {
this.hasError = this.isStopped = true;
if (!this._closed) {
this.hasError = this._closed = true;
this.thrownError = err;
var observers = this.observers;
while (observers.length) {
observers.shift().error(err);
var len = observers.length;
for (var i = 0; i < len; i++) {
observers[i].error(err);
}
this._clearObservers();
}
};
Subject.prototype.complete = function () {
this._throwIfClosed();
if (!this.isStopped) {
this.isStopped = true;
if (!this._closed) {
this._closed = true;
var observers = this.observers;
while (observers.length) {
observers.shift().complete();
var len = observers.length;
for (var i = 0; i < len; i++) {
observers[i].complete();
}
this._clearObservers();
}
};
Subject.prototype.unsubscribe = function () {
this.isStopped = this.closed = true;
this.observers = this.currentObservers = null;
this._closed = true;
this._clearObservers();
};
Object.defineProperty(Subject.prototype, "observed", {
get: function () {
var _a;
return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;
return this.currentObservers.size > 0;
},

@@ -115,8 +98,3 @@ enumerable: false,

});
Subject.prototype._trySubscribe = function (subscriber) {
this._throwIfClosed();
return _super.prototype._trySubscribe.call(this, subscriber);
};
Subject.prototype._subscribe = function (subscriber) {
this._throwIfClosed();
this._checkFinalizedStatuses(subscriber);

@@ -127,19 +105,21 @@ return this._innerSubscribe(subscriber);

var _this = this;
var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;
if (hasError || isStopped) {
return Subscription_1.EMPTY_SUBSCRIPTION;
if (this.hasError || this._closed) {
return Subscription_1.Subscription.EMPTY;
}
this.currentObservers = null;
observers.push(subscriber);
return new Subscription_1.Subscription(function () {
_this.currentObservers = null;
arrRemove_1.arrRemove(observers, subscriber);
var currentObservers = this.currentObservers;
var observerId = this._observerCounter++;
currentObservers.set(observerId, subscriber);
this.observerSnapshot = undefined;
subscriber.add(function () {
currentObservers.delete(observerId);
_this.observerSnapshot = undefined;
});
return subscriber;
};
Subject.prototype._checkFinalizedStatuses = function (subscriber) {
var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;
var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _closed = _a._closed;
if (hasError) {
subscriber.error(thrownError);
}
else if (isStopped) {
else if (_closed) {
subscriber.complete();

@@ -149,5 +129,4 @@ }

Subject.prototype.asObservable = function () {
var observable = new Observable_1.Observable();
observable.source = this;
return observable;
var _this = this;
return new Observable_1.Observable(function (subscriber) { return _this.subscribe(subscriber); });
};

@@ -162,6 +141,6 @@ Subject.create = function (destination, source) {

__extends(AnonymousSubject, _super);
function AnonymousSubject(destination, source) {
function AnonymousSubject(destination, _source) {
var _this = _super.call(this) || this;
_this.destination = destination;
_this.source = source;
_this._source = _source;
return _this;

@@ -183,3 +162,3 @@ }

var _a, _b;
return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : Subscription_1.EMPTY_SUBSCRIPTION;
return (_b = (_a = this._source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : Subscription_1.Subscription.EMPTY;
};

@@ -186,0 +165,0 @@ return AnonymousSubject;

@@ -18,3 +18,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.isSubscriber = exports.EMPTY_OBSERVER = exports.Subscriber = void 0;
exports.Subscriber = void 0;
var isFunction_1 = require("./util/isFunction");

@@ -24,3 +24,2 @@ var Subscription_1 = require("./Subscription");

var reportUnhandledError_1 = require("./util/reportUnhandledError");
var noop_1 = require("./util/noop");
var NotificationFactories_1 = require("./NotificationFactories");

@@ -33,4 +32,4 @@ var timeoutProvider_1 = require("./scheduler/timeoutProvider");

_this.isStopped = false;
_this.destination = isSubscriber(destination) ? destination : createSafeObserver(destination);
if (Subscription_1.isSubscription(destination)) {
_this.destination = destination instanceof Subscriber ? destination : createSafeObserver(destination);
if (hasAddAndUnsubscribe(destination)) {
destination.add(_this);

@@ -42,3 +41,3 @@ }

if (this.isStopped) {
handleStoppedNotification(NotificationFactories_1.nextNotification(value), this);
handleStoppedNotification((0, NotificationFactories_1.nextNotification)(value), this);
}

@@ -51,3 +50,3 @@ else {

if (this.isStopped) {
handleStoppedNotification(NotificationFactories_1.errorNotification(err), this);
handleStoppedNotification((0, NotificationFactories_1.errorNotification)(err), this);
}

@@ -108,3 +107,3 @@ else {

catch (error) {
reportUnhandledError_1.reportUnhandledError(error);
(0, reportUnhandledError_1.reportUnhandledError)(error);
}

@@ -120,7 +119,7 @@ }

catch (error) {
reportUnhandledError_1.reportUnhandledError(error);
(0, reportUnhandledError_1.reportUnhandledError)(error);
}
}
else {
reportUnhandledError_1.reportUnhandledError(err);
(0, reportUnhandledError_1.reportUnhandledError)(err);
}

@@ -135,3 +134,3 @@ };

catch (error) {
reportUnhandledError_1.reportUnhandledError(error);
(0, reportUnhandledError_1.reportUnhandledError)(error);
}

@@ -143,7 +142,4 @@ }

function createSafeObserver(observerOrNext) {
return new ConsumerObserver(!observerOrNext || isFunction_1.isFunction(observerOrNext) ? { next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined } : observerOrNext);
return new ConsumerObserver(!observerOrNext || (0, isFunction_1.isFunction)(observerOrNext) ? { next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined } : observerOrNext);
}
function defaultErrorHandler(err) {
throw err;
}
function handleStoppedNotification(notification, subscriber) {

@@ -153,15 +149,5 @@ var onStoppedNotification = config_1.config.onStoppedNotification;

}
exports.EMPTY_OBSERVER = {
closed: true,
next: noop_1.noop,
error: defaultErrorHandler,
complete: noop_1.noop,
};
function isObserver(value) {
return value && isFunction_1.isFunction(value.next) && isFunction_1.isFunction(value.error) && isFunction_1.isFunction(value.complete);
function hasAddAndUnsubscribe(value) {
return value && (0, isFunction_1.isFunction)(value.unsubscribe) && (0, isFunction_1.isFunction)(value.add);
}
function isSubscriber(value) {
return (value && value instanceof Subscriber) || (isObserver(value) && Subscription_1.isSubscription(value));
}
exports.isSubscriber = isSubscriber;
//# sourceMappingURL=Subscriber.js.map

@@ -29,12 +29,15 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSubscription = exports.EMPTY_SUBSCRIPTION = exports.Subscription = void 0;
exports.Subscription = void 0;
var isFunction_1 = require("./util/isFunction");
var UnsubscriptionError_1 = require("./util/UnsubscriptionError");
var arrRemove_1 = require("./util/arrRemove");
var Subscription = (function () {

@@ -44,34 +47,11 @@ function Subscription(initialTeardown) {

this.closed = false;
this._parentage = null;
this._finalizers = null;
}
Subscription.prototype.unsubscribe = function () {
var e_1, _a, e_2, _b;
var e_1, _a;
var errors;
if (!this.closed) {
this.closed = true;
var _parentage = this._parentage;
if (_parentage) {
this._parentage = null;
if (Array.isArray(_parentage)) {
try {
for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {
var parent_1 = _parentage_1_1.value;
parent_1.remove(this);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);
}
finally { if (e_1) throw e_1.error; }
}
}
else {
_parentage.remove(this);
}
}
var initialFinalizer = this.initialTeardown;
if (isFunction_1.isFunction(initialFinalizer)) {
if ((0, isFunction_1.isFunction)(initialFinalizer)) {
try {

@@ -96,3 +76,3 @@ initialFinalizer();

if (err instanceof UnsubscriptionError_1.UnsubscriptionError) {
errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));
errors.push.apply(errors, __spreadArray([], __read(err.errors), false));
}

@@ -105,8 +85,8 @@ else {

}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);
if (_finalizers_1_1 && !_finalizers_1_1.done && (_a = _finalizers_1.return)) _a.call(_finalizers_1);
}
finally { if (e_2) throw e_2.error; }
finally { if (e_1) throw e_1.error; }
}

@@ -120,2 +100,3 @@ }

Subscription.prototype.add = function (teardown) {
var _this = this;
var _a;

@@ -127,35 +108,15 @@ if (teardown && teardown !== this) {

else {
if (teardown instanceof Subscription) {
if (teardown.closed || teardown._hasParent(this)) {
return;
}
teardown._addParent(this);
if (teardown && 'add' in teardown) {
teardown.add(function () {
_this.remove(teardown);
});
}
(this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : new Set()).add(teardown);
(_a = this._finalizers) !== null && _a !== void 0 ? _a : (this._finalizers = new Set());
this._finalizers.add(teardown);
}
}
};
Subscription.prototype._hasParent = function (parent) {
var _parentage = this._parentage;
return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));
};
Subscription.prototype._addParent = function (parent) {
var _parentage = this._parentage;
this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
};
Subscription.prototype._removeParent = function (parent) {
var _parentage = this._parentage;
if (_parentage === parent) {
this._parentage = null;
}
else if (Array.isArray(_parentage)) {
arrRemove_1.arrRemove(_parentage, parent);
}
};
Subscription.prototype.remove = function (teardown) {
var _a;
(_a = this._finalizers) === null || _a === void 0 ? void 0 : _a.delete(teardown);
if (teardown instanceof Subscription) {
teardown._removeParent(this);
}
};

@@ -170,10 +131,4 @@ Subscription.EMPTY = (function () {

exports.Subscription = Subscription;
exports.EMPTY_SUBSCRIPTION = Subscription.EMPTY;
function isSubscription(value) {
return (value instanceof Subscription ||
(value && 'closed' in value && isFunction_1.isFunction(value.remove) && isFunction_1.isFunction(value.add) && isFunction_1.isFunction(value.unsubscribe)));
}
exports.isSubscription = isSubscription;
function execFinalizer(finalizer) {
if (isFunction_1.isFunction(finalizer)) {
if ((0, isFunction_1.isFunction)(finalizer)) {
finalizer();

@@ -180,0 +135,0 @@ }

@@ -48,3 +48,3 @@ "use strict";

var _a = state, notification = _a.message.notification, destination = _a.subscriber;
Notification_1.observeNotification(notification, destination);
(0, Notification_1.observeNotification)(notification, destination);
}, message.frame, { message: message, subscriber: subscriber }));

@@ -56,3 +56,3 @@ }

exports.ColdObservable = ColdObservable;
applyMixins_1.applyMixins(ColdObservable, [SubscriptionLoggable_1.SubscriptionLoggable]);
(0, applyMixins_1.applyMixins)(ColdObservable, [SubscriptionLoggable_1.SubscriptionLoggable]);
//# sourceMappingURL=ColdObservable.js.map

@@ -50,3 +50,3 @@ "use strict";

subject.scheduler.schedule(function () {
Notification_1.observeNotification(notification, subject);
(0, Notification_1.observeNotification)(notification, subject);
}, frame);

@@ -62,3 +62,3 @@ })();

exports.HotObservable = HotObservable;
applyMixins_1.applyMixins(HotObservable, [SubscriptionLoggable_1.SubscriptionLoggable]);
(0, applyMixins_1.applyMixins)(HotObservable, [SubscriptionLoggable_1.SubscriptionLoggable]);
//# sourceMappingURL=HotObservable.js.map

@@ -33,6 +33,10 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};

@@ -109,6 +113,6 @@ var __values = (this && this.__values) || function(o) {

next: function (value) {
messages.push({ frame: _this.frame - outerFrame, notification: NotificationFactories_1.nextNotification(value) });
messages.push({ frame: _this.frame - outerFrame, notification: (0, NotificationFactories_1.nextNotification)(value) });
},
error: function (error) {
messages.push({ frame: _this.frame - outerFrame, notification: NotificationFactories_1.errorNotification(error) });
messages.push({ frame: _this.frame - outerFrame, notification: (0, NotificationFactories_1.errorNotification)(error) });
},

@@ -134,6 +138,6 @@ complete: function () {

var value = x instanceof Observable_1.Observable ? _this.materializeInnerObservable(x, _this.frame) : x;
actual.push({ frame: _this.frame, notification: NotificationFactories_1.nextNotification(value) });
actual.push({ frame: _this.frame, notification: (0, NotificationFactories_1.nextNotification)(value) });
},
error: function (error) {
actual.push({ frame: _this.frame, notification: NotificationFactories_1.errorNotification(error) });
actual.push({ frame: _this.frame, notification: (0, NotificationFactories_1.errorNotification)(error) });
},

@@ -162,6 +166,6 @@ complete: function () {

var value = x instanceof Observable_1.Observable ? _this.materializeInnerObservable(x, _this.frame) : x;
flushTest.expected.push({ frame: _this.frame, notification: NotificationFactories_1.nextNotification(value) });
flushTest.expected.push({ frame: _this.frame, notification: (0, NotificationFactories_1.nextNotification)(value) });
},
error: function (error) {
flushTest.expected.push({ frame: _this.frame, notification: NotificationFactories_1.errorNotification(error) });
flushTest.expected.push({ frame: _this.frame, notification: (0, NotificationFactories_1.errorNotification)(error) });
},

@@ -211,3 +215,3 @@ complete: function () {

}
var characters = __spreadArray([], __read(marbles));
var characters = __spreadArray([], __read(marbles), false);
var len = characters.length;

@@ -306,3 +310,3 @@ var groupStart = -1;

}
var characters = __spreadArray([], __read(marbles));
var characters = __spreadArray([], __read(marbles), false);
var len = characters.length;

@@ -353,3 +357,3 @@ var testMessages = [];

case '#':
notification = NotificationFactories_1.errorNotification(errorValue || 'error');
notification = (0, NotificationFactories_1.errorNotification)(errorValue || 'error');
advanceFrameBy(1);

@@ -385,3 +389,3 @@ break;

}
notification = NotificationFactories_1.nextNotification(getValue(c));
notification = (0, NotificationFactories_1.nextNotification)(getValue(c));
advanceFrameBy(1);

@@ -388,0 +392,0 @@ break;

@@ -10,7 +10,7 @@ "use strict";

function popResultSelector(args) {
return isFunction_1.isFunction(last(args)) ? args.pop() : undefined;
return (0, isFunction_1.isFunction)(last(args)) ? args.pop() : undefined;
}
exports.popResultSelector = popResultSelector;
function popScheduler(args) {
return isScheduler_1.isScheduler(last(args)) ? args.pop() : undefined;
return (0, isScheduler_1.isScheduler)(last(args)) ? args.pop() : undefined;
}

@@ -17,0 +17,0 @@ exports.popScheduler = popScheduler;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.argsArgArrayOrObject = void 0;
exports.arrayOrObject = exports.argsArgArrayOrObject = void 0;
var isArray = Array.isArray;

@@ -8,13 +8,7 @@ var getPrototypeOf = Object.getPrototypeOf, objectProto = Object.prototype, getKeys = Object.keys;

if (args.length === 1) {
var first_1 = args[0];
if (isArray(first_1)) {
return { args: first_1, keys: null };
var first = args[0];
var result = arrayOrObject(first);
if (result) {
return result;
}
if (isPOJO(first_1)) {
var keys = getKeys(first_1);
return {
args: keys.map(function (key) { return first_1[key]; }),
keys: keys,
};
}
}

@@ -24,2 +18,16 @@ return { args: args, keys: null };

exports.argsArgArrayOrObject = argsArgArrayOrObject;
function arrayOrObject(first) {
if (isArray(first)) {
return { args: first, keys: null };
}
if (isPOJO(first)) {
var keys = getKeys(first);
return {
args: keys.map(function (key) { return first[key]; }),
keys: keys,
};
}
return null;
}
exports.arrayOrObject = arrayOrObject;
function isPOJO(obj) {

@@ -26,0 +34,0 @@ return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto;

@@ -5,3 +5,3 @@ "use strict";

var createErrorClass_1 = require("./createErrorClass");
exports.ArgumentOutOfRangeError = createErrorClass_1.createErrorClass(function (_super) {
exports.ArgumentOutOfRangeError = (0, createErrorClass_1.createErrorClass)(function (_super) {
return function ArgumentOutOfRangeErrorImpl() {

@@ -8,0 +8,0 @@ _super(this);

@@ -5,3 +5,3 @@ "use strict";

var createErrorClass_1 = require("./createErrorClass");
exports.EmptyError = createErrorClass_1.createErrorClass(function (_super) { return function EmptyErrorImpl() {
exports.EmptyError = (0, createErrorClass_1.createErrorClass)(function (_super) { return function EmptyErrorImpl() {
_super(this);

@@ -8,0 +8,0 @@ this.name = 'EmptyError';

@@ -6,5 +6,5 @@ "use strict";

function isAsyncIterable(obj) {
return Symbol.asyncIterator && isFunction_1.isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);
return Symbol.asyncIterator && (0, isFunction_1.isFunction)(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);
}
exports.isAsyncIterable = isAsyncIterable;
//# sourceMappingURL=isAsyncIterable.js.map

@@ -7,5 +7,5 @@ "use strict";

function isInteropObservable(input) {
return isFunction_1.isFunction(input[observable_1.observable]);
return (0, isFunction_1.isFunction)(input[observable_1.observable]);
}
exports.isInteropObservable = isInteropObservable;
//# sourceMappingURL=isInteropObservable.js.map

@@ -7,5 +7,5 @@ "use strict";

function isIterable(input) {
return isFunction_1.isFunction(input === null || input === void 0 ? void 0 : input[iterator_1.iterator]);
return (0, isFunction_1.isFunction)(input === null || input === void 0 ? void 0 : input[iterator_1.iterator]);
}
exports.isIterable = isIterable;
//# sourceMappingURL=isIterable.js.map

@@ -7,5 +7,5 @@ "use strict";

function isObservable(obj) {
return !!obj && (obj instanceof Observable_1.Observable || (isFunction_1.isFunction(obj.lift) && isFunction_1.isFunction(obj.subscribe)));
return !!obj && (obj instanceof Observable_1.Observable || ((0, isFunction_1.isFunction)(obj.lift) && (0, isFunction_1.isFunction)(obj.subscribe)));
}
exports.isObservable = isObservable;
//# sourceMappingURL=isObservable.js.map

@@ -6,5 +6,5 @@ "use strict";

function isPromise(value) {
return isFunction_1.isFunction(value === null || value === void 0 ? void 0 : value.then);
return (0, isFunction_1.isFunction)(value === null || value === void 0 ? void 0 : value.then);
}
exports.isPromise = isPromise;
//# sourceMappingURL=isPromise.js.map

@@ -8,3 +8,3 @@ "use strict";

if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;

@@ -80,5 +80,5 @@ if (y = 0, t) op = [op[0] & 2, t.value];

function isReadableStreamLike(obj) {
return isFunction_1.isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);
return (0, isFunction_1.isFunction)(obj === null || obj === void 0 ? void 0 : obj.getReader);
}
exports.isReadableStreamLike = isReadableStreamLike;
//# sourceMappingURL=isReadableStreamLike.js.map

@@ -6,5 +6,5 @@ "use strict";

function isScheduler(value) {
return value && isFunction_1.isFunction(value.schedule);
return value && (0, isFunction_1.isFunction)(value.schedule);
}
exports.isScheduler = isScheduler;
//# sourceMappingURL=isScheduler.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.operate = exports.hasLift = void 0;
var isFunction_1 = require("./isFunction");
function hasLift(source) {
return isFunction_1.isFunction(source === null || source === void 0 ? void 0 : source.lift);
}
exports.hasLift = hasLift;
exports.operate = void 0;
var Observable_1 = require("../Observable");
function operate(init) {
return function (source) {
if (hasLift(source)) {
return source.lift(function (liftedSource) {
try {
return init(liftedSource, this);
}
catch (err) {
this.error(err);
}
});
}
throw new TypeError('Unable to lift unknown Observable type');
};
return function (source) { return new Observable_1.Observable(function (subscriber) { return init(source, subscriber); }); };
}
exports.operate = operate;
//# sourceMappingURL=lift.js.map

@@ -18,6 +18,10 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};

@@ -29,8 +33,8 @@ Object.defineProperty(exports, "__esModule", { value: true });

function callOrApply(fn, args) {
return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args);
return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args), false)) : fn(args);
}
function mapOneOrManyArgs(fn) {
return map_1.map(function (args) { return callOrApply(fn, args); });
return (0, map_1.map)(function (args) { return callOrApply(fn, args); });
}
exports.mapOneOrManyArgs = mapOneOrManyArgs;
//# sourceMappingURL=mapOneOrManyArgs.js.map

@@ -5,3 +5,3 @@ "use strict";

var createErrorClass_1 = require("./createErrorClass");
exports.NotFoundError = createErrorClass_1.createErrorClass(function (_super) {
exports.NotFoundError = (0, createErrorClass_1.createErrorClass)(function (_super) {
return function NotFoundErrorImpl(message) {

@@ -8,0 +8,0 @@ _super(this);

@@ -5,3 +5,3 @@ "use strict";

var createErrorClass_1 = require("./createErrorClass");
exports.SequenceError = createErrorClass_1.createErrorClass(function (_super) {
exports.SequenceError = (0, createErrorClass_1.createErrorClass)(function (_super) {
return function SequenceErrorImpl(message) {

@@ -8,0 +8,0 @@ _super(this);

@@ -5,5 +5,5 @@ "use strict";

function createInvalidObservableTypeError(input) {
return new TypeError("You provided " + (input !== null && typeof input === 'object' ? 'an invalid object' : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
return new TypeError("You provided ".concat(input !== null && typeof input === 'object' ? 'an invalid object' : "'".concat(input, "'"), " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."));
}
exports.createInvalidObservableTypeError = createInvalidObservableTypeError;
//# sourceMappingURL=throwUnobservableError.js.map

@@ -5,7 +5,7 @@ "use strict";

var createErrorClass_1 = require("./createErrorClass");
exports.UnsubscriptionError = createErrorClass_1.createErrorClass(function (_super) {
exports.UnsubscriptionError = (0, createErrorClass_1.createErrorClass)(function (_super) {
return function UnsubscriptionErrorImpl(errors) {
_super(this);
this.message = errors
? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ')
? "".concat(errors.length, " errors occurred during unsubscription:\n").concat(errors.map(function (err, i) { return "".concat(i + 1, ") ").concat(err.toString()); }).join('\n '))
: '';

@@ -12,0 +12,0 @@ this.name = 'UnsubscriptionError';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mergeAll = exports.merge = exports.max = exports.materialize = exports.mapTo = exports.map = exports.last = exports.isEmpty = exports.ignoreElements = exports.groupBy = exports.first = exports.findIndex = exports.find = exports.finalize = exports.filter = exports.expand = exports.exhaustMap = exports.exhaustAll = exports.exhaust = exports.every = exports.endWith = exports.elementAt = exports.distinctUntilKeyChanged = exports.distinctUntilChanged = exports.distinct = exports.dematerialize = exports.delayWhen = exports.delay = exports.defaultIfEmpty = exports.debounceTime = exports.debounce = exports.count = exports.connect = exports.concatWith = exports.concatMapTo = exports.concatMap = exports.concatAll = exports.concat = exports.combineLatestWith = exports.combineLatest = exports.combineLatestAll = exports.combineAll = exports.catchError = exports.bufferWhen = exports.bufferToggle = exports.bufferTime = exports.bufferCount = exports.buffer = exports.auditTime = exports.audit = void 0;
exports.timeInterval = exports.throwIfEmpty = exports.throttleTime = exports.throttle = exports.tap = exports.takeWhile = exports.takeUntil = exports.takeLast = exports.take = exports.switchScan = exports.switchMapTo = exports.switchMap = exports.switchAll = exports.subscribeOn = exports.startWith = exports.skipWhile = exports.skipUntil = exports.skipLast = exports.skip = exports.single = exports.shareReplay = exports.share = exports.sequenceEqual = exports.scan = exports.sampleTime = exports.sample = exports.refCount = exports.retryWhen = exports.retry = exports.repeatWhen = exports.repeat = exports.reduce = exports.raceWith = exports.race = exports.publishReplay = exports.publishLast = exports.publishBehavior = exports.publish = exports.pluck = exports.partition = exports.pairwise = exports.onErrorResumeNext = exports.observeOn = exports.multicast = exports.min = exports.mergeWith = exports.mergeScan = exports.mergeMapTo = exports.mergeMap = exports.flatMap = void 0;
exports.zipWith = exports.zipAll = exports.zip = exports.withLatestFrom = exports.windowWhen = exports.windowToggle = exports.windowTime = exports.windowCount = exports.window = exports.toArray = exports.timestamp = exports.timeoutWith = exports.timeout = void 0;
exports.min = exports.mergeWith = exports.mergeScan = exports.mergeMapTo = exports.mergeMap = exports.mergeAll = exports.max = exports.materialize = exports.mapTo = exports.map = exports.last = exports.isEmpty = exports.ignoreElements = exports.groupBy = exports.first = exports.findIndex = exports.find = exports.finalize = exports.filter = exports.expand = exports.exhaustMap = exports.exhaustAll = exports.every = exports.endWith = exports.elementAt = exports.distinctUntilKeyChanged = exports.distinctUntilChanged = exports.distinct = exports.dematerialize = exports.delayWhen = exports.delay = exports.defaultIfEmpty = exports.debounceTime = exports.debounce = exports.count = exports.connect = exports.concatWith = exports.concatMapTo = exports.concatMap = exports.concatAll = exports.combineLatestWith = exports.combineLatestAll = exports.catchError = exports.bufferWhen = exports.bufferToggle = exports.bufferTime = exports.bufferCount = exports.buffer = exports.auditTime = exports.audit = void 0;
exports.zipWith = exports.zipAll = exports.withLatestFrom = exports.windowWhen = exports.windowToggle = exports.windowTime = exports.windowCount = exports.window = exports.toArray = exports.timestamp = exports.timeoutWith = exports.timeout = exports.timeInterval = exports.throwIfEmpty = exports.throttleTime = exports.throttle = exports.tap = exports.takeWhile = exports.takeUntil = exports.takeLast = exports.take = exports.switchScan = exports.switchMapTo = exports.switchMap = exports.switchAll = exports.subscribeOn = exports.startWith = exports.skipWhile = exports.skipUntil = exports.skipLast = exports.skip = exports.single = exports.shareReplay = exports.share = exports.sequenceEqual = exports.scan = exports.sampleTime = exports.sample = exports.retryWhen = exports.retry = exports.repeatWhen = exports.repeat = exports.reduce = exports.raceWith = exports.partition = exports.pairwise = exports.onErrorResumeNextWith = exports.observeOn = void 0;
var audit_1 = require("../internal/operators/audit");

@@ -22,12 +21,6 @@ Object.defineProperty(exports, "audit", { enumerable: true, get: function () { return audit_1.audit; } });

Object.defineProperty(exports, "catchError", { enumerable: true, get: function () { return catchError_1.catchError; } });
var combineAll_1 = require("../internal/operators/combineAll");
Object.defineProperty(exports, "combineAll", { enumerable: true, get: function () { return combineAll_1.combineAll; } });
var combineLatestAll_1 = require("../internal/operators/combineLatestAll");
Object.defineProperty(exports, "combineLatestAll", { enumerable: true, get: function () { return combineLatestAll_1.combineLatestAll; } });
var combineLatest_1 = require("../internal/operators/combineLatest");
Object.defineProperty(exports, "combineLatest", { enumerable: true, get: function () { return combineLatest_1.combineLatest; } });
var combineLatestWith_1 = require("../internal/operators/combineLatestWith");
Object.defineProperty(exports, "combineLatestWith", { enumerable: true, get: function () { return combineLatestWith_1.combineLatestWith; } });
var concat_1 = require("../internal/operators/concat");
Object.defineProperty(exports, "concat", { enumerable: true, get: function () { return concat_1.concat; } });
var concatAll_1 = require("../internal/operators/concatAll");

@@ -69,4 +62,2 @@ Object.defineProperty(exports, "concatAll", { enumerable: true, get: function () { return concatAll_1.concatAll; } });

Object.defineProperty(exports, "every", { enumerable: true, get: function () { return every_1.every; } });
var exhaust_1 = require("../internal/operators/exhaust");
Object.defineProperty(exports, "exhaust", { enumerable: true, get: function () { return exhaust_1.exhaust; } });
var exhaustAll_1 = require("../internal/operators/exhaustAll");

@@ -104,8 +95,4 @@ Object.defineProperty(exports, "exhaustAll", { enumerable: true, get: function () { return exhaustAll_1.exhaustAll; } });

Object.defineProperty(exports, "max", { enumerable: true, get: function () { return max_1.max; } });
var merge_1 = require("../internal/operators/merge");
Object.defineProperty(exports, "merge", { enumerable: true, get: function () { return merge_1.merge; } });
var mergeAll_1 = require("../internal/operators/mergeAll");
Object.defineProperty(exports, "mergeAll", { enumerable: true, get: function () { return mergeAll_1.mergeAll; } });
var flatMap_1 = require("../internal/operators/flatMap");
Object.defineProperty(exports, "flatMap", { enumerable: true, get: function () { return flatMap_1.flatMap; } });
var mergeMap_1 = require("../internal/operators/mergeMap");

@@ -121,8 +108,6 @@ Object.defineProperty(exports, "mergeMap", { enumerable: true, get: function () { return mergeMap_1.mergeMap; } });

Object.defineProperty(exports, "min", { enumerable: true, get: function () { return min_1.min; } });
var multicast_1 = require("../internal/operators/multicast");
Object.defineProperty(exports, "multicast", { enumerable: true, get: function () { return multicast_1.multicast; } });
var observeOn_1 = require("../internal/operators/observeOn");
Object.defineProperty(exports, "observeOn", { enumerable: true, get: function () { return observeOn_1.observeOn; } });
var onErrorResumeNextWith_1 = require("../internal/operators/onErrorResumeNextWith");
Object.defineProperty(exports, "onErrorResumeNext", { enumerable: true, get: function () { return onErrorResumeNextWith_1.onErrorResumeNext; } });
Object.defineProperty(exports, "onErrorResumeNextWith", { enumerable: true, get: function () { return onErrorResumeNextWith_1.onErrorResumeNextWith; } });
var pairwise_1 = require("../internal/operators/pairwise");

@@ -132,14 +117,2 @@ Object.defineProperty(exports, "pairwise", { enumerable: true, get: function () { return pairwise_1.pairwise; } });

Object.defineProperty(exports, "partition", { enumerable: true, get: function () { return partition_1.partition; } });
var pluck_1 = require("../internal/operators/pluck");
Object.defineProperty(exports, "pluck", { enumerable: true, get: function () { return pluck_1.pluck; } });
var publish_1 = require("../internal/operators/publish");
Object.defineProperty(exports, "publish", { enumerable: true, get: function () { return publish_1.publish; } });
var publishBehavior_1 = require("../internal/operators/publishBehavior");
Object.defineProperty(exports, "publishBehavior", { enumerable: true, get: function () { return publishBehavior_1.publishBehavior; } });
var publishLast_1 = require("../internal/operators/publishLast");
Object.defineProperty(exports, "publishLast", { enumerable: true, get: function () { return publishLast_1.publishLast; } });
var publishReplay_1 = require("../internal/operators/publishReplay");
Object.defineProperty(exports, "publishReplay", { enumerable: true, get: function () { return publishReplay_1.publishReplay; } });
var race_1 = require("../internal/operators/race");
Object.defineProperty(exports, "race", { enumerable: true, get: function () { return race_1.race; } });
var raceWith_1 = require("../internal/operators/raceWith");

@@ -157,4 +130,2 @@ Object.defineProperty(exports, "raceWith", { enumerable: true, get: function () { return raceWith_1.raceWith; } });

Object.defineProperty(exports, "retryWhen", { enumerable: true, get: function () { return retryWhen_1.retryWhen; } });
var refCount_1 = require("../internal/operators/refCount");
Object.defineProperty(exports, "refCount", { enumerable: true, get: function () { return refCount_1.refCount; } });
var sample_1 = require("../internal/operators/sample");

@@ -232,4 +203,2 @@ Object.defineProperty(exports, "sample", { enumerable: true, get: function () { return sample_1.sample; } });

Object.defineProperty(exports, "withLatestFrom", { enumerable: true, get: function () { return withLatestFrom_1.withLatestFrom; } });
var zip_1 = require("../internal/operators/zip");
Object.defineProperty(exports, "zip", { enumerable: true, get: function () { return zip_1.zip; } });
var zipAll_1 = require("../internal/operators/zipAll");

@@ -236,0 +205,0 @@ Object.defineProperty(exports, "zipAll", { enumerable: true, get: function () { return zipAll_1.zipAll; } });

export { Observable } from './internal/Observable';
export { ConnectableObservable } from './internal/observable/ConnectableObservable';
export { observable } from './internal/symbol/observable';

@@ -9,6 +8,6 @@ export { animationFrames } from './internal/observable/dom/animationFrames';

export { AsyncSubject } from './internal/AsyncSubject';
export { asap, asapScheduler } from './internal/scheduler/asap';
export { async, asyncScheduler } from './internal/scheduler/async';
export { queue, queueScheduler } from './internal/scheduler/queue';
export { animationFrame, animationFrameScheduler } from './internal/scheduler/animationFrame';
export { asapScheduler } from './internal/scheduler/asap';
export { asyncScheduler } from './internal/scheduler/async';
export { queueScheduler } from './internal/scheduler/queue';
export { animationFrameScheduler } from './internal/scheduler/animationFrame';
export { VirtualTimeScheduler, VirtualAction } from './internal/scheduler/VirtualTimeScheduler';

@@ -27,3 +26,2 @@ export { Scheduler } from './internal/Scheduler';

export { NotFoundError } from './internal/util/NotFoundError';
export { ObjectUnsubscribedError } from './internal/util/ObjectUnsubscribedError';
export { SequenceError } from './internal/util/SequenceError';

@@ -48,3 +46,2 @@ export { TimeoutError } from './internal/operators/timeout';

export { onErrorResumeNext } from './internal/observable/onErrorResumeNext';
export { pairs } from './internal/observable/pairs';
export { partition } from './internal/observable/partition';

@@ -70,3 +67,2 @@ export { race } from './internal/observable/race';

export { catchError } from './internal/operators/catchError';
export { combineAll } from './internal/operators/combineAll';
export { combineLatestAll } from './internal/operators/combineLatestAll';

@@ -92,3 +88,2 @@ export { combineLatestWith } from './internal/operators/combineLatestWith';

export { every } from './internal/operators/every';
export { exhaust } from './internal/operators/exhaust';
export { exhaustAll } from './internal/operators/exhaustAll';

@@ -111,3 +106,2 @@ export { exhaustMap } from './internal/operators/exhaustMap';

export { mergeAll } from './internal/operators/mergeAll';
export { flatMap } from './internal/operators/flatMap';
export { mergeMap } from './internal/operators/mergeMap';

@@ -118,11 +112,5 @@ export { mergeMapTo } from './internal/operators/mergeMapTo';

export { min } from './internal/operators/min';
export { multicast } from './internal/operators/multicast';
export { observeOn } from './internal/operators/observeOn';
export { onErrorResumeNextWith } from './internal/operators/onErrorResumeNextWith';
export { pairwise } from './internal/operators/pairwise';
export { pluck } from './internal/operators/pluck';
export { publish } from './internal/operators/publish';
export { publishBehavior } from './internal/operators/publishBehavior';
export { publishLast } from './internal/operators/publishLast';
export { publishReplay } from './internal/operators/publishReplay';
export { raceWith } from './internal/operators/raceWith';

@@ -134,3 +122,2 @@ export { reduce } from './internal/operators/reduce';

export { retryWhen } from './internal/operators/retryWhen';
export { refCount } from './internal/operators/refCount';
export { sample } from './internal/operators/sample';

@@ -137,0 +124,0 @@ export { sampleTime } from './internal/operators/sampleTime';

@@ -141,11 +141,3 @@ import { map } from '../operators/map';

(_a = progressSubscriber === null || progressSubscriber === void 0 ? void 0 : progressSubscriber.complete) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber);
let response;
try {
response = createResponse(DOWNLOAD, event);
}
catch (err) {
destination.error(err);
return;
}
destination.next(response);
destination.next(createResponse(DOWNLOAD, event));
destination.complete();

@@ -152,0 +144,0 @@ }

@@ -1,2 +0,1 @@

import { getXHRResponse } from './getXHRResponse';
export class AjaxResponse {

@@ -20,3 +19,3 @@ constructor(originalEvent, xhr, request, type = 'download_load') {

: {};
this.response = getXHRResponse(xhr);
this.response = xhr.response;
const { loaded, total } = originalEvent;

@@ -23,0 +22,0 @@ this.loaded = loaded;

@@ -1,2 +0,1 @@

import { getXHRResponse } from './getXHRResponse';
import { createErrorClass } from '../util/createErrorClass';

@@ -10,10 +9,3 @@ export const AjaxError = createErrorClass((_super) => function AjaxErrorImpl(message, xhr, request) {

this.responseType = xhr.responseType;
let response;
try {
response = getXHRResponse(xhr);
}
catch (err) {
response = xhr.responseText;
}
this.response = response;
this.response = xhr.response;
});

@@ -20,0 +12,0 @@ export const AjaxTimeoutError = (() => {

@@ -10,7 +10,7 @@ import { Subject } from './Subject';

_checkFinalizedStatuses(subscriber) {
const { hasError, _hasValue, _value, thrownError, isStopped, _isComplete } = this;
const { hasError, _hasValue, _value, thrownError, _closed, _isComplete } = this;
if (hasError) {
subscriber.error(thrownError);
}
else if (isStopped || _isComplete) {
else if (_closed || _isComplete) {
_hasValue && subscriber.next(_value);

@@ -21,3 +21,3 @@ subscriber.complete();

next(value) {
if (!this.isStopped) {
if (!this._closed) {
this._value = value;

@@ -24,0 +24,0 @@ this._hasValue = true;

@@ -20,3 +20,2 @@ import { Subject } from './Subject';

}
this._throwIfClosed();
return _value;

@@ -23,0 +22,0 @@ }

@@ -1,2 +0,2 @@

import { Subscriber, isSubscriber } from './Subscriber';
import { Subscriber } from './Subscriber';
import { observable as Symbol_observable } from './symbol/observable';

@@ -10,19 +10,5 @@ import { pipeFromArray } from './util/pipe';

}
lift(operator) {
const observable = new Observable();
observable.source = this;
observable.operator = operator;
return observable;
}
subscribe(observerOrNext) {
const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new Subscriber(observerOrNext);
const { operator, source } = this;
subscriber.add(operator
?
operator.call(subscriber, source)
: source
?
this._subscribe(subscriber)
:
this._trySubscribe(subscriber));
const subscriber = observerOrNext instanceof Subscriber ? observerOrNext : new Subscriber(observerOrNext);
subscriber.add(this._trySubscribe(subscriber));
return subscriber;

@@ -56,5 +42,4 @@ }

}
_subscribe(subscriber) {
var _a;
return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);
_subscribe(_subscriber) {
return;
}

@@ -61,0 +46,0 @@ [Symbol_observable]() {

import { Observable } from '../Observable';
import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';
import { from } from './from';
import { arrayOrObject } from '../util/argsArgArrayOrObject';
import { identity } from '../util/identity';
import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';
import { popResultSelector, popScheduler } from '../util/args';
import { createObject } from '../util/createObject';
import { createOperatorSubscriber } from '../operators/OperatorSubscriber';
import { executeSchedule } from '../util/executeSchedule';
export function combineLatest(...args) {
const scheduler = popScheduler(args);
const resultSelector = popResultSelector(args);
const { args: observables, keys } = argsArgArrayOrObject(args);
import { EMPTY } from './empty';
import { from } from './from';
export function combineLatest(sources, resultSelector) {
const parts = arrayOrObject(sources);
if (!parts) {
throw new TypeError('sources must be an array or object');
}
const { args: observables, keys } = parts;
if (observables.length === 0) {
return from([], scheduler);
return EMPTY;
}
const result = new Observable(combineLatestInit(observables, scheduler, keys
?
(values) => createObject(keys, values)
:
identity));
return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;
return new Observable(combineLatestInit(observables, keys
? (values) => createObject(keys, values)
: resultSelector
? (values) => resultSelector(...values)
: identity));
}
export function combineLatestInit(observables, scheduler, valueTransform = identity) {
export function combineLatestInit(observables, valueTransform = identity) {
return (subscriber) => {
maybeSchedule(scheduler, () => {
const { length } = observables;
const values = new Array(length);
let active = length;
let remainingFirstValues = length;
for (let i = 0; i < length; i++) {
maybeSchedule(scheduler, () => {
const source = from(observables[i], scheduler);
let hasFirstValue = false;
source.subscribe(createOperatorSubscriber(subscriber, (value) => {
values[i] = value;
if (!hasFirstValue) {
hasFirstValue = true;
remainingFirstValues--;
}
if (!remainingFirstValues) {
subscriber.next(valueTransform(values.slice()));
}
}, () => {
if (!--active) {
subscriber.complete();
}
}));
}, subscriber);
}
}, subscriber);
const { length } = observables;
const values = new Array(length);
let active = length;
let remainingFirstValues = length;
for (let i = 0; i < length; i++) {
const source = from(observables[i]);
let hasFirstValue = false;
source.subscribe(createOperatorSubscriber(subscriber, (value) => {
values[i] = value;
if (!hasFirstValue) {
hasFirstValue = true;
remainingFirstValues--;
}
if (!remainingFirstValues) {
subscriber.next(valueTransform(Array.from(values)));
}
}, () => {
if (!--active) {
subscriber.complete();
}
}));
}
};
}
function maybeSchedule(scheduler, execute, subscription) {
if (scheduler) {
executeSchedule(subscription, scheduler, execute);
}
else {
execute();
}
}
//# sourceMappingURL=combineLatest.js.map
import { concatAll } from '../operators/concatAll';
import { popScheduler } from '../util/args';
import { scheduled } from '../scheduled/scheduled';
import { from } from './from';
export function concat(...args) {
return concatAll()(from(args, popScheduler(args)));
const scheduler = popScheduler(args);
return concatAll()(scheduler ? scheduled(args, scheduler) : from(args));
}
//# sourceMappingURL=concat.js.map
import { Observable } from '../Observable';
import { innerFrom } from './innerFrom';
import { from } from './from';
export function defer(observableFactory) {
return new Observable((subscriber) => {
innerFrom(observableFactory()).subscribe(subscriber);
from(observableFactory()).subscribe(subscriber);
});
}
//# sourceMappingURL=defer.js.map
import { __rest } from "tslib";
import { createOperatorSubscriber } from '../../operators/OperatorSubscriber';
import { Observable } from '../../Observable';
import { innerFrom } from '../../observable/innerFrom';
import { from } from '../from';
export function fromFetch(input, initWithSelector = {}) {

@@ -34,3 +34,3 @@ const { selector } = initWithSelector, init = __rest(initWithSelector, ["selector"]);

if (selector) {
innerFrom(selector(response)).subscribe(createOperatorSubscriber(subscriber, undefined, () => {
from(selector(response)).subscribe(createOperatorSubscriber(subscriber, undefined, () => {
abortable = false;

@@ -37,0 +37,0 @@ subscriber.complete();

@@ -18,3 +18,3 @@ import { Subject, AnonymousSubject } from '../../Subject';

this.destination = destination;
this.source = urlConfigOrSource;
this._source = urlConfigOrSource;
}

@@ -43,11 +43,5 @@ else {

}
lift(operator) {
const sock = new WebSocketSubject(this._config, this.destination);
sock.operator = operator;
sock.source = this;
return sock;
}
_resetState() {
this._socket = null;
if (!this.source) {
if (!this._source) {
this.destination = new ReplaySubject();

@@ -192,5 +186,5 @@ }

_subscribe(subscriber) {
const { source } = this;
if (source) {
return source.subscribe(subscriber);
const { _source } = this;
if (_source) {
return _source.subscribe(subscriber);
}

@@ -197,0 +191,0 @@ if (!this._socket) {

import { Observable } from '../Observable';
import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';
import { innerFrom } from './innerFrom';
import { from } from './from';
import { popResultSelector } from '../util/args';

@@ -22,3 +22,3 @@ import { createOperatorSubscriber } from '../operators/OperatorSubscriber';

let hasValue = false;
innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, (value) => {
from(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, (value) => {
if (!hasValue) {

@@ -25,0 +25,0 @@ hasValue = true;

@@ -1,6 +0,121 @@

import { scheduled } from '../scheduled/scheduled';
import { innerFrom } from './innerFrom';
export function from(input, scheduler) {
return scheduler ? scheduled(input, scheduler) : innerFrom(input);
import { __asyncValues, __awaiter } from "tslib";
import { isArrayLike } from '../util/isArrayLike';
import { isPromise } from '../util/isPromise';
import { Observable } from '../Observable';
import { isInteropObservable } from '../util/isInteropObservable';
import { isAsyncIterable } from '../util/isAsyncIterable';
import { createInvalidObservableTypeError } from '../util/throwUnobservableError';
import { isIterable } from '../util/isIterable';
import { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';
import { isFunction } from '../util/isFunction';
import { reportUnhandledError } from '../util/reportUnhandledError';
import { observable as Symbol_observable } from '../symbol/observable';
export function from(input) {
if (input instanceof Observable) {
return input;
}
if (input != null) {
if (isInteropObservable(input)) {
return fromInteropObservable(input);
}
if (isArrayLike(input)) {
return fromArrayLike(input);
}
if (isPromise(input)) {
return fromPromise(input);
}
if (isAsyncIterable(input)) {
return fromAsyncIterable(input);
}
if (isIterable(input)) {
return fromIterable(input);
}
if (isReadableStreamLike(input)) {
return fromReadableStreamLike(input);
}
}
throw createInvalidObservableTypeError(input);
}
function fromInteropObservable(obj) {
return new Observable((subscriber) => {
const obs = obj[Symbol_observable]();
if (isFunction(obs.subscribe)) {
return obs.subscribe(subscriber);
}
throw new TypeError('Provided object does not correctly implement Symbol.observable');
});
}
export function fromArrayLike(array) {
return new Observable((subscriber) => {
subscribeToArray(array, subscriber);
});
}
function fromPromise(promise) {
return new Observable((subscriber) => {
promise
.then((value) => {
if (!subscriber.closed) {
subscriber.next(value);
subscriber.complete();
}
}, (err) => subscriber.error(err))
.then(null, reportUnhandledError);
});
}
function fromIterable(iterable) {
return new Observable((subscriber) => {
for (const value of iterable) {
subscriber.next(value);
if (subscriber.closed) {
return;
}
}
subscriber.complete();
});
}
function fromAsyncIterable(asyncIterable) {
return new Observable((subscriber) => {
process(asyncIterable, subscriber).catch((err) => subscriber.error(err));
});
}
function fromReadableStreamLike(readableStream) {
return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));
}
function process(asyncIterable, subscriber) {
var _a, asyncIterable_1, asyncIterable_1_1;
var _b, e_1, _c, _d;
return __awaiter(this, void 0, void 0, function* () {
try {
for (_a = true, asyncIterable_1 = __asyncValues(asyncIterable); asyncIterable_1_1 = yield asyncIterable_1.next(), _b = asyncIterable_1_1.done, !_b;) {
_d = asyncIterable_1_1.value;
_a = false;
try {
const value = _d;
subscriber.next(value);
if (subscriber.closed) {
return;
}
}
finally {
_a = true;
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (!_a && !_b && (_c = asyncIterable_1.return)) yield _c.call(asyncIterable_1);
}
finally { if (e_1) throw e_1.error; }
}
subscriber.complete();
});
}
export function subscribeToArray(array, subscriber) {
const length = array.length;
for (let i = 0; i < length && !subscriber.closed; i++) {
subscriber.next(array[i]);
}
subscriber.complete();
}
//# sourceMappingURL=from.js.map

@@ -1,4 +0,2 @@

import { innerFrom } from '../observable/innerFrom';
import { Observable } from '../Observable';
import { mergeMap } from '../operators/mergeMap';
import { isArrayLike } from '../util/isArrayLike';

@@ -18,16 +16,4 @@ import { isFunction } from '../util/isFunction';

}
const [add, remove] = isEventTarget(target)
? eventTargetMethods.map((methodName) => (handler) => target[methodName](eventName, handler, options))
:
isNodeStyleEventEmitter(target)
? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))
: isJQueryStyleEventEmitter(target)
? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))
: [];
if (!add) {
if (isArrayLike(target)) {
return mergeMap((subTarget) => fromEvent(subTarget, eventName, options))(innerFrom(target));
}
}
if (!add) {
const isValidTarget = isNodeStyleEventEmitter(target) || isJQueryStyleEventEmitter(target) || isEventTarget(target);
if (!isValidTarget && !isArrayLike(target)) {
throw new TypeError('Invalid event target');

@@ -37,9 +23,31 @@ }

const handler = (...args) => subscriber.next(1 < args.length ? args : args[0]);
add(handler);
return () => remove(handler);
if (isValidTarget) {
doSubscribe(handler, subscriber, target, eventName, options);
}
else {
for (let i = 0; i < target.length && !subscriber.closed; i++) {
const subTarget = target[i];
doSubscribe(handler, subscriber, subTarget, eventName, options);
}
}
});
}
function toCommonHandlerRegistry(target, eventName) {
return (methodName) => (handler) => target[methodName](eventName, handler);
function doSubscribe(handler, subscriber, subTarget, eventName, options) {
const [addMethod, removeMethod] = getRegistryMethodNames(subTarget);
if (!addMethod || !removeMethod) {
throw new TypeError('Invalid event target');
}
subTarget[addMethod](eventName, handler, options);
subscriber.add(() => subTarget[removeMethod](eventName, handler, options));
}
function getRegistryMethodNames(target) {
return isEventTarget(target)
? eventTargetMethods
:
isNodeStyleEventEmitter(target)
? nodeEventEmitterMethods
: isJQueryStyleEventEmitter(target)
? jqueryMethods
: [];
}
function isNodeStyleEventEmitter(target) {

@@ -46,0 +54,0 @@ return isFunction(target.addListener) && isFunction(target.removeListener);

import { mergeAll } from '../operators/mergeAll';
import { innerFrom } from './innerFrom';
import { EMPTY } from './empty';
import { popNumber, popScheduler } from '../util/args';
import { scheduled } from '../scheduled/scheduled';
import { from } from './from';

@@ -15,6 +15,6 @@ export function merge(...args) {

?
innerFrom(sources[0])
from(sources[0])
:
mergeAll(concurrent)(from(sources, scheduler));
mergeAll(concurrent)(scheduler ? scheduled(sources, scheduler) : from(sources));
}
//# sourceMappingURL=merge.js.map
import { popScheduler } from '../util/args';
import { from } from './from';
import { scheduled } from '../scheduled/scheduled';
import { fromArrayLike } from './from';
export function of(...args) {
const scheduler = popScheduler(args);
return from(args, scheduler);
return scheduler ? scheduled(args, scheduler) : fromArrayLike(args);
}
//# sourceMappingURL=of.js.map

@@ -5,3 +5,3 @@ import { Observable } from '../Observable';

import { noop } from '../util/noop';
import { innerFrom } from './innerFrom';
import { from } from './from';
export function onErrorResumeNext(...sources) {

@@ -15,3 +15,3 @@ const nextSources = argsOrArgArray(sources);

try {
nextSource = innerFrom(nextSources[sourceIndex++]);
nextSource = from(nextSources[sourceIndex++]);
}

@@ -18,0 +18,0 @@ catch (err) {

import { not } from '../util/not';
import { filter } from '../operators/filter';
import { innerFrom } from './innerFrom';
import { from } from './from';
export function partition(source, predicate, thisArg) {
return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))];
return [filter(predicate, thisArg)(from(source)), filter(not(predicate, thisArg))(from(source))];
}
//# sourceMappingURL=partition.js.map
import { Observable } from '../Observable';
import { innerFrom } from './innerFrom';
import { from } from './from';
import { argsOrArgArray } from '../util/argsOrArgArray';

@@ -7,3 +7,3 @@ import { createOperatorSubscriber } from '../operators/OperatorSubscriber';

sources = argsOrArgArray(sources);
return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources));
return sources.length === 1 ? from(sources[0]) : new Observable(raceInit(sources));
}

@@ -14,3 +14,3 @@ export function raceInit(sources) {

for (let i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) {
subscriptions.push(innerFrom(sources[i]).subscribe(createOperatorSubscriber(subscriber, (value) => {
subscriptions.push(from(sources[i]).subscribe(createOperatorSubscriber(subscriber, (value) => {
if (subscriptions) {

@@ -17,0 +17,0 @@ for (let s = 0; s < subscriptions.length; s++) {

import { Observable } from '../Observable';
import { isFunction } from '../util/isFunction';
export function throwError(errorOrErrorFactory, scheduler) {
const errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : () => errorOrErrorFactory;
const init = (subscriber) => subscriber.error(errorFactory());
return new Observable(scheduler ? (subscriber) => scheduler.schedule(init, 0, subscriber) : init);
export function throwError(errorFactory) {
return new Observable((subscriber) => {
subscriber.error(errorFactory());
});
}
//# sourceMappingURL=throwError.js.map
import { Observable } from '../Observable';
import { async as asyncScheduler } from '../scheduler/async';
import { asyncScheduler } from '../scheduler/async';
import { isScheduler } from '../util/isScheduler';

@@ -4,0 +4,0 @@ import { isValidDate } from '../util/isDate';

import { Observable } from '../Observable';
import { innerFrom } from './innerFrom';
import { from } from './from';
import { EMPTY } from './empty';

@@ -8,3 +8,3 @@ export function using(resourceFactory, observableFactory) {

const result = observableFactory(resource);
const source = result ? innerFrom(result) : EMPTY;
const source = result ? from(result) : EMPTY;
source.subscribe(subscriber);

@@ -11,0 +11,0 @@ return () => {

import { Observable } from '../Observable';
import { innerFrom } from './innerFrom';
import { from } from './from';
import { argsOrArgArray } from '../util/argsOrArgArray';

@@ -18,3 +18,3 @@ import { EMPTY } from './empty';

for (let sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) {
innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, (value) => {
from(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, (value) => {
buffers[sourceIndex].push(value);

@@ -21,0 +21,0 @@ if (buffers.every((buffer) => buffer.length)) {

import { operate } from '../util/lift';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { createOperatorSubscriber } from './OperatorSubscriber';

@@ -29,3 +29,3 @@ export function audit(durationSelector) {

if (!durationSubscriber) {
innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)));
from(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)));
}

@@ -32,0 +32,0 @@ }, () => {

import { operate } from '../util/lift';
import { noop } from '../util/noop';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
export function buffer(closingNotifier) {
return operate((source, subscriber) => {
let currentBuffer = [];
from(closingNotifier).subscribe(createOperatorSubscriber(subscriber, () => {
const b = currentBuffer;
currentBuffer = [];
subscriber.next(b);
}, noop));
source.subscribe(createOperatorSubscriber(subscriber, (value) => currentBuffer.push(value), () => {

@@ -12,7 +17,2 @@ subscriber.next(currentBuffer);

}));
innerFrom(closingNotifier).subscribe(createOperatorSubscriber(subscriber, () => {
const b = currentBuffer;
currentBuffer = [];
subscriber.next(b);
}, noop));
return () => {

@@ -19,0 +19,0 @@ currentBuffer = null;

import { Subscription } from '../Subscription';
import { operate } from '../util/lift';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { createOperatorSubscriber } from './OperatorSubscriber';

@@ -10,3 +10,3 @@ import { noop } from '../util/noop';

const buffers = [];
innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, (openValue) => {
from(openings).subscribe(createOperatorSubscriber(subscriber, (openValue) => {
const buffer = [];

@@ -20,3 +20,3 @@ buffers.push(buffer);

};
closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop)));
closingSubscription.add(from(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop)));
}, noop));

@@ -23,0 +23,0 @@ source.subscribe(createOperatorSubscriber(subscriber, (value) => {

import { operate } from '../util/lift';
import { noop } from '../util/noop';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
export function bufferWhen(closingSelector) {

@@ -14,3 +14,3 @@ return operate((source, subscriber) => {

b && subscriber.next(b);
innerFrom(closingSelector()).subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop)));
from(closingSelector()).subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop)));
};

@@ -17,0 +17,0 @@ openBuffer();

@@ -1,2 +0,2 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { createOperatorSubscriber } from './OperatorSubscriber';

@@ -10,3 +10,3 @@ import { operate } from '../util/lift';

innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, (err) => {
handledResult = innerFrom(selector(err, catchError(selector)(source)));
handledResult = from(selector(err, catchError(selector)(source)));
if (innerSub) {

@@ -13,0 +13,0 @@ innerSub.unsubscribe();

@@ -1,5 +0,6 @@

import { combineLatest } from './combineLatest';
import { combineLatestInit } from '../observable/combineLatest';
import { operate } from '../util/lift';
export function combineLatestWith(...otherSources) {
return combineLatest(...otherSources);
return operate((source, subscriber) => combineLatestInit([source, ...otherSources])(subscriber));
}
//# sourceMappingURL=combineLatestWith.js.map
import { mergeMap } from './mergeMap';
import { isFunction } from '../util/isFunction';
export function concatMap(project, resultSelector) {
return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);
export function concatMap(project) {
return mergeMap(project, 1);
}
//# sourceMappingURL=concatMap.js.map
import { concatMap } from './concatMap';
import { isFunction } from '../util/isFunction';
export function concatMapTo(innerObservable, resultSelector) {
return isFunction(resultSelector) ? concatMap(() => innerObservable, resultSelector) : concatMap(() => innerObservable);
export function concatMapTo(innerObservable) {
return concatMap(() => innerObservable);
}
//# sourceMappingURL=concatMapTo.js.map

@@ -1,5 +0,9 @@

import { concat } from './concat';
import { from } from '../observable/from';
import { concatAll } from '../operators/concatAll';
import { operate } from '../util/lift';
export function concatWith(...otherSources) {
return concat(...otherSources);
return operate((source, subscriber) => {
concatAll()(from([source, ...otherSources])).subscribe(subscriber);
});
}
//# sourceMappingURL=concatWith.js.map
import { Subject } from '../Subject';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { operate } from '../util/lift';

@@ -12,3 +12,3 @@ import { fromSubscribable } from '../observable/fromSubscribable';

const subject = connector();
innerFrom(selector(fromSubscribable(subject))).subscribe(subscriber);
from(selector(fromSubscribable(subject))).subscribe(subscriber);
subscriber.add(source.subscribe(subject));

@@ -15,0 +15,0 @@ });

import { operate } from '../util/lift';
import { noop } from '../util/noop';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
export function debounce(durationSelector) {

@@ -25,3 +25,3 @@ return operate((source, subscriber) => {

durationSubscriber = createOperatorSubscriber(subscriber, emit, noop);
innerFrom(durationSelector(value)).subscribe(durationSubscriber);
from(durationSelector(value)).subscribe(durationSubscriber);
}, () => {

@@ -28,0 +28,0 @@ emit();

@@ -9,6 +9,9 @@ import { asyncScheduler } from '../scheduler/async';

let lastTime = null;
let scheduling = false;
const emit = () => {
if (activeTask) {
activeTask.unsubscribe();
activeTask = null;
if (scheduling || activeTask) {
if (activeTask) {
activeTask.unsubscribe();
activeTask = null;
}
const value = lastValue;

@@ -33,3 +36,5 @@ lastValue = null;

if (!activeTask) {
scheduling = true;
activeTask = scheduler.schedule(emitWhenIdle, dueTime);
scheduling = false;
subscriber.add(activeTask);

@@ -36,0 +41,0 @@ }

@@ -6,3 +6,3 @@ import { concat } from '../observable/concat';

import { mergeMap } from './mergeMap';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
export function delayWhen(delayDurationSelector, subscriptionDelay) {

@@ -12,4 +12,4 @@ if (subscriptionDelay) {

}
return mergeMap((value, index) => innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)));
return mergeMap((value, index) => from(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)));
}
//# sourceMappingURL=delayWhen.js.map
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { noop } from '../util/noop';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
export function distinct(keySelector, flushes) {

@@ -15,5 +15,5 @@ return operate((source, subscriber) => {

}));
flushes && innerFrom(flushes).subscribe(createOperatorSubscriber(subscriber, () => distinctKeys.clear(), noop));
flushes && from(flushes).subscribe(createOperatorSubscriber(subscriber, () => distinctKeys.clear(), noop));
});
}
//# sourceMappingURL=distinct.js.map

@@ -1,6 +0,11 @@

import { concat } from '../observable/concat';
import { of } from '../observable/of';
import { subscribeToArray } from '../observable/from';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from '../operators/OperatorSubscriber';
export function endWith(...values) {
return (source) => concat(source, of(...values));
return operate((source, subscriber) => {
source.subscribe(createOperatorSubscriber(subscriber, undefined, () => {
subscribeToArray(values, subscriber);
}));
});
}
//# sourceMappingURL=endWith.js.map

@@ -1,9 +0,5 @@

import { map } from './map';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
export function exhaustMap(project, resultSelector) {
if (resultSelector) {
return (source) => source.pipe(exhaustMap((a, i) => innerFrom(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii)))));
}
export function exhaustMap(project) {
return operate((source, subscriber) => {

@@ -19,3 +15,3 @@ let index = 0;

});
innerFrom(project(outerValue, index++)).subscribe(innerSub);
from(project(outerValue, index++)).subscribe(innerSub);
}

@@ -22,0 +18,0 @@ }, () => {

import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
export function find(predicate, thisArg) {
return operate(createFind(predicate, thisArg, 'value'));
export function find(predicate) {
return operate(createFind(predicate, 'value'));
}
export function createFind(predicate, thisArg, emit) {
export function createFind(predicate, emit) {
const findIndex = emit === 'index';

@@ -12,3 +12,3 @@ return (source, subscriber) => {

const i = index++;
if (predicate.call(thisArg, value, i, source)) {
if (predicate(value, i, source)) {
subscriber.next(findIndex ? i : value);

@@ -15,0 +15,0 @@ subscriber.complete();

import { operate } from '../util/lift';
import { createFind } from './find';
export function findIndex(predicate, thisArg) {
return operate(createFind(predicate, thisArg, 'index'));
export function findIndex(predicate) {
return operate(createFind(predicate, 'index'));
}
//# sourceMappingURL=findIndex.js.map
import { Observable } from '../Observable';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { Subject } from '../Subject';

@@ -36,3 +36,3 @@ import { operate } from '../util/lift';

}, undefined, undefined, () => groups.delete(key));
groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber));
groupBySourceSubscriber.add(from(duration(grouped)).subscribe(durationSubscriber));
}

@@ -39,0 +39,0 @@ }

import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
export function map(project, thisArg) {
export function map(project) {
return operate((source, subscriber) => {
let index = 0;
source.subscribe(createOperatorSubscriber(subscriber, (value) => {
subscriber.next(project.call(thisArg, value, index++));
subscriber.next(project(value, index++));
}));

@@ -9,0 +9,0 @@ });

@@ -1,2 +0,2 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { executeSchedule } from '../util/executeSchedule';

@@ -19,3 +19,3 @@ import { createOperatorSubscriber } from './OperatorSubscriber';

let innerComplete = false;
innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, (innerValue) => {
from(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, (innerValue) => {
onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);

@@ -22,0 +22,0 @@ if (expand) {

@@ -1,15 +0,6 @@

import { map } from './map';
import { innerFrom } from '../observable/innerFrom';
import { operate } from '../util/lift';
import { mergeInternals } from './mergeInternals';
import { isFunction } from '../util/isFunction';
export function mergeMap(project, resultSelector, concurrent = Infinity) {
if (isFunction(resultSelector)) {
return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent);
}
else if (typeof resultSelector === 'number') {
concurrent = resultSelector;
}
export function mergeMap(project, concurrent = Infinity) {
return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));
}
//# sourceMappingURL=mergeMap.js.map
import { mergeMap } from './mergeMap';
import { isFunction } from '../util/isFunction';
export function mergeMapTo(innerObservable, resultSelector, concurrent = Infinity) {
if (isFunction(resultSelector)) {
return mergeMap(() => innerObservable, resultSelector, concurrent);
}
if (typeof resultSelector === 'number') {
concurrent = resultSelector;
}
export function mergeMapTo(innerObservable, concurrent) {
return mergeMap(() => innerObservable, concurrent);
}
//# sourceMappingURL=mergeMapTo.js.map

@@ -1,5 +0,9 @@

import { merge } from './merge';
import { from } from '../observable/from';
import { mergeAll } from '../operators/mergeAll';
import { operate } from '../util/lift';
export function mergeWith(...otherSources) {
return merge(...otherSources);
return operate((source, subscriber) => {
mergeAll()(from([source, ...otherSources])).subscribe(subscriber);
});
}
//# sourceMappingURL=mergeWith.js.map

@@ -7,3 +7,2 @@ import { argsOrArgArray } from '../util/argsOrArgArray';

}
export const onErrorResumeNext = onErrorResumeNextWith;
//# sourceMappingURL=onErrorResumeNextWith.js.map
import { EMPTY } from '../observable/empty';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { timer } from '../observable/timer';

@@ -26,3 +26,3 @@ export function repeat(countOrConfig) {

if (delay != null) {
const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar));
const notifier = typeof delay === 'number' ? timer(delay) : from(delay(soFar));
const notifierSubscriber = createOperatorSubscriber(subscriber, () => {

@@ -29,0 +29,0 @@ notifierSubscriber.unsubscribe();

@@ -1,2 +0,2 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { Subject } from '../Subject';

@@ -16,3 +16,3 @@ import { operate } from '../util/lift';

completions$ = new Subject();
innerFrom(notifier(completions$)).subscribe(createOperatorSubscriber(subscriber, () => {
from(notifier(completions$)).subscribe(createOperatorSubscriber(subscriber, () => {
if (innerSub) {

@@ -19,0 +19,0 @@ subscribeForRepeatWhen();

@@ -5,3 +5,3 @@ import { operate } from '../util/lift';

import { timer } from '../observable/timer';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
export function retry(configOrCount = Infinity) {

@@ -43,3 +43,3 @@ let config;

if (delay != null) {
const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar));
const notifier = typeof delay === 'number' ? timer(delay) : from(delay(err, soFar));
const notifierSubscriber = createOperatorSubscriber(subscriber, () => {

@@ -46,0 +46,0 @@ notifierSubscriber.unsubscribe();

@@ -1,2 +0,2 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { Subject } from '../Subject';

@@ -14,3 +14,3 @@ import { operate } from '../util/lift';

errors$ = new Subject();
innerFrom(notifier(errors$)).subscribe(createOperatorSubscriber(subscriber, () => innerSub ? subscribeForRetryWhen() : (syncResub = true)));
from(notifier(errors$)).subscribe(createOperatorSubscriber(subscriber, () => innerSub ? subscribeForRetryWhen() : (syncResub = true)));
}

@@ -17,0 +17,0 @@ if (errors$) {

@@ -1,2 +0,2 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { operate } from '../util/lift';

@@ -13,3 +13,3 @@ import { noop } from '../util/noop';

}));
innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => {
from(notifier).subscribe(createOperatorSubscriber(subscriber, () => {
if (hasValue) {

@@ -16,0 +16,0 @@ hasValue = false;

import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
export function sequenceEqual(compareTo, comparator = (a, b) => a === b) {

@@ -30,3 +30,3 @@ return operate((source, subscriber) => {

source.subscribe(createSubscriber(aState, bState));
innerFrom(compareTo).subscribe(createSubscriber(bState, aState));
from(compareTo).subscribe(createSubscriber(bState, aState));
});

@@ -33,0 +33,0 @@ }

@@ -1,2 +0,2 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { Subject } from '../Subject';

@@ -58,3 +58,3 @@ import { Subscriber } from '../Subscriber';

});
innerFrom(source).subscribe(connection);
from(source).subscribe(connection);
}

@@ -78,4 +78,4 @@ })(wrapperSource);

});
return innerFrom(on(...args)).subscribe(onSubscriber);
return from(on(...args)).subscribe(onSubscriber);
}
//# sourceMappingURL=share.js.map
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { noop } from '../util/noop';

@@ -12,3 +12,3 @@ export function skipUntil(notifier) {

}, noop);
innerFrom(notifier).subscribe(skipSubscriber);
from(notifier).subscribe(skipSubscriber);
source.subscribe(createOperatorSubscriber(subscriber, (value) => taking && subscriber.next(value)));

@@ -15,0 +15,0 @@ });

@@ -1,5 +0,5 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
export function switchMap(project, resultSelector) {
export function switchMap(project) {
return operate((source, subscriber) => {

@@ -12,5 +12,4 @@ let innerSubscriber = null;

innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();
let innerIndex = 0;
const outerIndex = index++;
innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, (innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => {
from(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, undefined, () => {
innerSubscriber = null;

@@ -17,0 +16,0 @@ checkComplete();

import { switchMap } from './switchMap';
import { isFunction } from '../util/isFunction';
export function switchMapTo(innerObservable, resultSelector) {
return isFunction(resultSelector) ? switchMap(() => innerObservable, resultSelector) : switchMap(() => innerObservable);
export function switchMapTo(innerObservable) {
return switchMap(() => innerObservable);
}
//# sourceMappingURL=switchMapTo.js.map
import { switchMap } from './switchMap';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
export function switchScan(accumulator, seed) {
return operate((source, subscriber) => {
let state = seed;
switchMap((value, index) => accumulator(state, value, index), (_, innerValue) => ((state = innerValue), innerValue))(source).subscribe(subscriber);
switchMap((value, index) => accumulator(state, value, index))(source).subscribe(createOperatorSubscriber(subscriber, (innerValue) => {
state = innerValue;
subscriber.next(innerValue);
}));
return () => {

@@ -8,0 +12,0 @@ state = null;

@@ -10,12 +10,15 @@ import { EMPTY } from '../observable/empty';

let seen = 0;
source.subscribe(createOperatorSubscriber(subscriber, (value) => {
if (++seen <= count) {
const operatorSubscriber = createOperatorSubscriber(subscriber, (value) => {
if (++seen < count) {
subscriber.next(value);
if (count <= seen) {
subscriber.complete();
}
}
}));
else {
operatorSubscriber.unsubscribe();
subscriber.next(value);
subscriber.complete();
}
});
source.subscribe(operatorSubscriber);
});
}
//# sourceMappingURL=take.js.map

@@ -8,13 +8,15 @@ import { EMPTY } from '../observable/empty';

: operate((source, subscriber) => {
let buffer = [];
let ring = new Array(count);
let counter = 0;
source.subscribe(createOperatorSubscriber(subscriber, (value) => {
buffer.push(value);
count < buffer.length && buffer.shift();
ring[counter++ % count] = value;
}, () => {
for (const value of buffer) {
subscriber.next(value);
const start = count <= counter ? counter : 0;
const total = Math.min(count, counter);
for (let n = 0; n < total; n++) {
subscriber.next(ring[(start + n) % count]);
}
subscriber.complete();
}, undefined, () => {
buffer = null;
ring = null;
}));

@@ -21,0 +23,0 @@ });

import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { noop } from '../util/noop';
export function takeUntil(notifier) {
return operate((source, subscriber) => {
innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));
from(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));
!subscriber.closed && source.subscribe(subscriber);

@@ -9,0 +9,0 @@ });

@@ -6,9 +6,17 @@ import { operate } from '../util/lift';

let index = 0;
source.subscribe(createOperatorSubscriber(subscriber, (value) => {
const result = predicate(value, index++);
(result || inclusive) && subscriber.next(value);
!result && subscriber.complete();
}));
const operatorSubscriber = createOperatorSubscriber(subscriber, (value) => {
if (predicate(value, index++)) {
subscriber.next(value);
}
else {
operatorSubscriber.unsubscribe();
if (inclusive) {
subscriber.next(value);
}
subscriber.complete();
}
});
source.subscribe(operatorSubscriber);
});
}
//# sourceMappingURL=takeWhile.js.map
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
export const defaultThrottleConfig = {

@@ -27,3 +27,3 @@ leading: true,

};
const startThrottle = (value) => (throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling)));
const startThrottle = (value) => (throttled = from(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling)));
const send = () => {

@@ -30,0 +30,0 @@ if (hasValue) {

import { asyncScheduler } from '../scheduler/async';
import { isValidDate } from '../util/isDate';
import { operate } from '../util/lift';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { createErrorClass } from '../util/createErrorClass';

@@ -28,3 +28,3 @@ import { createOperatorSubscriber } from './OperatorSubscriber';

originalSourceSubscription.unsubscribe();
innerFrom(_with({
from(_with({
meta,

@@ -31,0 +31,0 @@ lastValue,

@@ -1,2 +0,2 @@

import { async } from '../scheduler/async';
import { asyncScheduler } from '../scheduler/async';
import { isValidDate } from '../util/isDate';

@@ -8,3 +8,3 @@ import { timeout } from './timeout';

let _with;
scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async;
scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : asyncScheduler;
if (isValidDate(due)) {

@@ -11,0 +11,0 @@ first = due;

@@ -5,3 +5,3 @@ import { Subject } from '../Subject';

import { noop } from '../util/noop';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
export function window(windowBoundaries) {

@@ -19,3 +19,3 @@ return operate((source, subscriber) => {

}, errorHandler));
innerFrom(windowBoundaries).subscribe(createOperatorSubscriber(subscriber, () => {
from(windowBoundaries).subscribe(createOperatorSubscriber(subscriber, () => {
windowSubject.complete();

@@ -22,0 +22,0 @@ subscriber.next((windowSubject = new Subject()));

import { Subject } from '../Subject';
import { Subscription } from '../Subscription';
import { operate } from '../util/lift';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { createOperatorSubscriber } from './OperatorSubscriber';

@@ -17,3 +17,3 @@ import { noop } from '../util/noop';

};
innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, (openValue) => {
from(openings).subscribe(createOperatorSubscriber(subscriber, (openValue) => {
const window = new Subject();

@@ -29,3 +29,3 @@ windows.push(window);

try {
closingNotifier = innerFrom(closingSelector(openValue));
closingNotifier = from(closingSelector(openValue));
}

@@ -36,3 +36,3 @@ catch (err) {

}
subscriber.next(window.asObservable());
subscriber.next(window);
closingSubscription.add(closingNotifier.subscribe(createOperatorSubscriber(subscriber, closeWindow, noop, handleError)));

@@ -39,0 +39,0 @@ }, noop));

import { Subject } from '../Subject';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { noop } from '../util/noop';
export function windowWhen(closingSelector) {

@@ -20,3 +21,3 @@ return operate((source, subscriber) => {

try {
closingNotifier = innerFrom(closingSelector());
closingNotifier = from(closingSelector());
}

@@ -27,3 +28,3 @@ catch (err) {

}
closingNotifier.subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openWindow, openWindow, handleError)));
closingNotifier.subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openWindow, noop, handleError)));
};

@@ -30,0 +31,0 @@ openWindow();

import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { identity } from '../util/identity';

@@ -15,3 +15,3 @@ import { noop } from '../util/noop';

for (let i = 0; i < len; i++) {
innerFrom(inputs[i]).subscribe(createOperatorSubscriber(subscriber, (value) => {
from(inputs[i]).subscribe(createOperatorSubscriber(subscriber, (value) => {
otherValues[i] = value;

@@ -18,0 +18,0 @@ if (!ready && !hasValue[i]) {

@@ -1,5 +0,8 @@

import { zip } from './zip';
import { operate } from '../util/lift';
import { zip } from '../observable/zip';
export function zipWith(...otherInputs) {
return zip(...otherInputs);
return operate((source, subscriber) => {
zip(source, ...otherInputs).subscribe(subscriber);
});
}
//# sourceMappingURL=zipWith.js.map

@@ -16,4 +16,4 @@ import { Subject } from './Subject';

next(value) {
const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;
if (!isStopped) {
const { _closed, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;
if (!_closed) {
_buffer.push(value);

@@ -26,3 +26,2 @@ !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);

_subscribe(subscriber) {
this._throwIfClosed();
this._trimBuffer();

@@ -29,0 +28,0 @@ const subscription = this._innerSubscribe(subscriber);

@@ -1,7 +0,7 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { observeOn } from '../operators/observeOn';
import { subscribeOn } from '../operators/subscribeOn';
export function scheduleObservable(input, scheduler) {
return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
return from(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
}
//# sourceMappingURL=scheduleObservable.js.map

@@ -1,7 +0,7 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { observeOn } from '../operators/observeOn';
import { subscribeOn } from '../operators/subscribeOn';
export function schedulePromise(input, scheduler) {
return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
return from(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
}
//# sourceMappingURL=schedulePromise.js.map
import { AnimationFrameAction } from './AnimationFrameAction';
import { AnimationFrameScheduler } from './AnimationFrameScheduler';
export const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction);
export const animationFrame = animationFrameScheduler;
//# sourceMappingURL=animationFrame.js.map
import { AsapAction } from './AsapAction';
import { AsapScheduler } from './AsapScheduler';
export const asapScheduler = new AsapScheduler(AsapAction);
export const asap = asapScheduler;
//# sourceMappingURL=asap.js.map

@@ -24,3 +24,5 @@ import { AsyncAction } from './AsyncAction';

immediateProvider.clearImmediate(id);
scheduler._scheduled = undefined;
if (scheduler._scheduled === id) {
scheduler._scheduled = undefined;
}
}

@@ -27,0 +29,0 @@ return undefined;

import { AsyncAction } from './AsyncAction';
import { AsyncScheduler } from './AsyncScheduler';
export const asyncScheduler = new AsyncScheduler(AsyncAction);
export const async = asyncScheduler;
//# sourceMappingURL=async.js.map
import { QueueAction } from './QueueAction';
import { QueueScheduler } from './QueueScheduler';
export const queueScheduler = new QueueScheduler(QueueAction);
export const queue = queueScheduler;
//# sourceMappingURL=queue.js.map
import { Observable } from './Observable';
import { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';
import { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';
import { arrRemove } from './util/arrRemove';
import { Subscription } from './Subscription';
export class Subject extends Observable {
get closed() {
return this._closed;
}
get observers() {
var _a;
return ((_a = this.observerSnapshot) !== null && _a !== void 0 ? _a : (this.observerSnapshot = Array.from(this.currentObservers.values())));
}
constructor() {
super();
this.closed = false;
this.currentObservers = null;
this.observers = [];
this.isStopped = false;
this._closed = false;
this._observerCounter = 0;
this.currentObservers = new Map();
this.hasError = false;
this.thrownError = null;
}
lift(operator) {
const subject = new AnonymousSubject(this, this);
subject.operator = operator;
return subject;
_clearObservers() {
this.currentObservers.clear();
this.observerSnapshot = undefined;
}
_throwIfClosed() {
if (this.closed) {
throw new ObjectUnsubscribedError();
}
}
next(value) {
this._throwIfClosed();
if (!this.isStopped) {
if (!this.currentObservers) {
this.currentObservers = Array.from(this.observers);
if (!this._closed) {
const { observers } = this;
const len = observers.length;
for (let i = 0; i < len; i++) {
observers[i].next(value);
}
for (const observer of this.currentObservers) {
observer.next(value);
}
}
}
error(err) {
this._throwIfClosed();
if (!this.isStopped) {
this.hasError = this.isStopped = true;
if (!this._closed) {
this.hasError = this._closed = true;
this.thrownError = err;
const { observers } = this;
while (observers.length) {
observers.shift().error(err);
const len = observers.length;
for (let i = 0; i < len; i++) {
observers[i].error(err);
}
this._clearObservers();
}
}
complete() {
this._throwIfClosed();
if (!this.isStopped) {
this.isStopped = true;
if (!this._closed) {
this._closed = true;
const { observers } = this;
while (observers.length) {
observers.shift().complete();
const len = observers.length;
for (let i = 0; i < len; i++) {
observers[i].complete();
}
this._clearObservers();
}
}
unsubscribe() {
this.isStopped = this.closed = true;
this.observers = this.currentObservers = null;
this._closed = true;
this._clearObservers();
}
get observed() {
var _a;
return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;
return this.currentObservers.size > 0;
}
_trySubscribe(subscriber) {
this._throwIfClosed();
return super._trySubscribe(subscriber);
}
_subscribe(subscriber) {
this._throwIfClosed();
this._checkFinalizedStatuses(subscriber);

@@ -75,19 +67,21 @@ return this._innerSubscribe(subscriber);

_innerSubscribe(subscriber) {
const { hasError, isStopped, observers } = this;
if (hasError || isStopped) {
return EMPTY_SUBSCRIPTION;
if (this.hasError || this._closed) {
return Subscription.EMPTY;
}
this.currentObservers = null;
observers.push(subscriber);
return new Subscription(() => {
this.currentObservers = null;
arrRemove(observers, subscriber);
const { currentObservers } = this;
const observerId = this._observerCounter++;
currentObservers.set(observerId, subscriber);
this.observerSnapshot = undefined;
subscriber.add(() => {
currentObservers.delete(observerId);
this.observerSnapshot = undefined;
});
return subscriber;
}
_checkFinalizedStatuses(subscriber) {
const { hasError, thrownError, isStopped } = this;
const { hasError, thrownError, _closed } = this;
if (hasError) {
subscriber.error(thrownError);
}
else if (isStopped) {
else if (_closed) {
subscriber.complete();

@@ -97,5 +91,3 @@ }

asObservable() {
const observable = new Observable();
observable.source = this;
return observable;
return new Observable((subscriber) => this.subscribe(subscriber));
}

@@ -107,6 +99,6 @@ }

export class AnonymousSubject extends Subject {
constructor(destination, source) {
constructor(destination, _source) {
super();
this.destination = destination;
this.source = source;
this._source = _source;
}

@@ -127,5 +119,5 @@ next(value) {

var _a, _b;
return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;
return (_b = (_a = this._source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : Subscription.EMPTY;
}
}
//# sourceMappingURL=Subject.js.map
import { isFunction } from './util/isFunction';
import { isSubscription, Subscription } from './Subscription';
import { Subscription } from './Subscription';
import { config } from './config';
import { reportUnhandledError } from './util/reportUnhandledError';
import { noop } from './util/noop';
import { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';

@@ -12,4 +11,4 @@ import { timeoutProvider } from './scheduler/timeoutProvider';

this.isStopped = false;
this.destination = isSubscriber(destination) ? destination : createSafeObserver(destination);
if (isSubscription(destination)) {
this.destination = destination instanceof Subscriber ? destination : createSafeObserver(destination);
if (hasAddAndUnsubscribe(destination)) {
destination.add(this);

@@ -115,5 +114,2 @@ }

}
function defaultErrorHandler(err) {
throw err;
}
function handleStoppedNotification(notification, subscriber) {

@@ -123,14 +119,5 @@ const { onStoppedNotification } = config;

}
export const EMPTY_OBSERVER = {
closed: true,
next: noop,
error: defaultErrorHandler,
complete: noop,
};
function isObserver(value) {
return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);
function hasAddAndUnsubscribe(value) {
return value && isFunction(value.unsubscribe) && isFunction(value.add);
}
export function isSubscriber(value) {
return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));
}
//# sourceMappingURL=Subscriber.js.map
import { isFunction } from './util/isFunction';
import { UnsubscriptionError } from './util/UnsubscriptionError';
import { arrRemove } from './util/arrRemove';
export class Subscription {

@@ -8,3 +7,2 @@ constructor(initialTeardown) {

this.closed = false;
this._parentage = null;
this._finalizers = null;

@@ -16,14 +14,2 @@ }

this.closed = true;
const { _parentage } = this;
if (_parentage) {
this._parentage = null;
if (Array.isArray(_parentage)) {
for (const parent of _parentage) {
parent.remove(this);
}
}
else {
_parentage.remove(this);
}
}
const { initialTeardown: initialFinalizer } = this;

@@ -48,3 +34,3 @@ if (isFunction(initialFinalizer)) {

if (err instanceof UnsubscriptionError) {
errors = [...errors, ...err.errors];
errors.push(...err.errors);
}

@@ -69,35 +55,15 @@ else {

else {
if (teardown instanceof Subscription) {
if (teardown.closed || teardown._hasParent(this)) {
return;
}
teardown._addParent(this);
if (teardown && 'add' in teardown) {
teardown.add(() => {
this.remove(teardown);
});
}
(this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : new Set()).add(teardown);
(_a = this._finalizers) !== null && _a !== void 0 ? _a : (this._finalizers = new Set());
this._finalizers.add(teardown);
}
}
}
_hasParent(parent) {
const { _parentage } = this;
return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));
}
_addParent(parent) {
const { _parentage } = this;
this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
}
_removeParent(parent) {
const { _parentage } = this;
if (_parentage === parent) {
this._parentage = null;
}
else if (Array.isArray(_parentage)) {
arrRemove(_parentage, parent);
}
}
remove(teardown) {
var _a;
(_a = this._finalizers) === null || _a === void 0 ? void 0 : _a.delete(teardown);
if (teardown instanceof Subscription) {
teardown._removeParent(this);
}
}

@@ -110,7 +76,2 @@ }

})();
export const EMPTY_SUBSCRIPTION = Subscription.EMPTY;
export function isSubscription(value) {
return (value instanceof Subscription ||
(value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));
}
function execFinalizer(finalizer) {

@@ -117,0 +78,0 @@ if (isFunction(finalizer)) {

@@ -6,15 +6,22 @@ const { isArray } = Array;

const first = args[0];
if (isArray(first)) {
return { args: first, keys: null };
const result = arrayOrObject(first);
if (result) {
return result;
}
if (isPOJO(first)) {
const keys = getKeys(first);
return {
args: keys.map((key) => first[key]),
keys,
};
}
}
return { args: args, keys: null };
}
export function arrayOrObject(first) {
if (isArray(first)) {
return { args: first, keys: null };
}
if (isPOJO(first)) {
const keys = getKeys(first);
return {
args: keys.map((key) => first[key]),
keys,
};
}
return null;
}
function isPOJO(obj) {

@@ -21,0 +28,0 @@ return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto;

@@ -1,20 +0,5 @@

import { isFunction } from './isFunction';
export function hasLift(source) {
return isFunction(source === null || source === void 0 ? void 0 : source.lift);
}
import { Observable } from '../Observable';
export function operate(init) {
return (source) => {
if (hasLift(source)) {
return source.lift(function (liftedSource) {
try {
return init(liftedSource, this);
}
catch (err) {
this.error(err);
}
});
}
throw new TypeError('Unable to lift unknown Observable type');
};
return (source) => new Observable((subscriber) => init(source, subscriber));
}
//# sourceMappingURL=lift.js.map

@@ -9,7 +9,4 @@ export { audit } from '../internal/operators/audit';

export { catchError } from '../internal/operators/catchError';
export { combineAll } from '../internal/operators/combineAll';
export { combineLatestAll } from '../internal/operators/combineLatestAll';
export { combineLatest } from '../internal/operators/combineLatest';
export { combineLatestWith } from '../internal/operators/combineLatestWith';
export { concat } from '../internal/operators/concat';
export { concatAll } from '../internal/operators/concatAll';

@@ -33,3 +30,2 @@ export { concatMap } from '../internal/operators/concatMap';

export { every } from '../internal/operators/every';
export { exhaust } from '../internal/operators/exhaust';
export { exhaustAll } from '../internal/operators/exhaustAll';

@@ -51,5 +47,3 @@ export { exhaustMap } from '../internal/operators/exhaustMap';

export { max } from '../internal/operators/max';
export { merge } from '../internal/operators/merge';
export { mergeAll } from '../internal/operators/mergeAll';
export { flatMap } from '../internal/operators/flatMap';
export { mergeMap } from '../internal/operators/mergeMap';

@@ -60,13 +54,6 @@ export { mergeMapTo } from '../internal/operators/mergeMapTo';

export { min } from '../internal/operators/min';
export { multicast } from '../internal/operators/multicast';
export { observeOn } from '../internal/operators/observeOn';
export { onErrorResumeNext } from '../internal/operators/onErrorResumeNextWith';
export { onErrorResumeNextWith } from '../internal/operators/onErrorResumeNextWith';
export { pairwise } from '../internal/operators/pairwise';
export { partition } from '../internal/operators/partition';
export { pluck } from '../internal/operators/pluck';
export { publish } from '../internal/operators/publish';
export { publishBehavior } from '../internal/operators/publishBehavior';
export { publishLast } from '../internal/operators/publishLast';
export { publishReplay } from '../internal/operators/publishReplay';
export { race } from '../internal/operators/race';
export { raceWith } from '../internal/operators/raceWith';

@@ -78,3 +65,2 @@ export { reduce } from '../internal/operators/reduce';

export { retryWhen } from '../internal/operators/retryWhen';
export { refCount } from '../internal/operators/refCount';
export { sample } from '../internal/operators/sample';

@@ -116,5 +102,4 @@ export { sampleTime } from '../internal/operators/sampleTime';

export { withLatestFrom } from '../internal/operators/withLatestFrom';
export { zip } from '../internal/operators/zip';
export { zipAll } from '../internal/operators/zipAll';
export { zipWith } from '../internal/operators/zipWith';
//# sourceMappingURL=index.js.map
export { Observable } from './internal/Observable';
export { ConnectableObservable } from './internal/observable/ConnectableObservable';
export { observable } from './internal/symbol/observable';

@@ -9,6 +8,6 @@ export { animationFrames } from './internal/observable/dom/animationFrames';

export { AsyncSubject } from './internal/AsyncSubject';
export { asap, asapScheduler } from './internal/scheduler/asap';
export { async, asyncScheduler } from './internal/scheduler/async';
export { queue, queueScheduler } from './internal/scheduler/queue';
export { animationFrame, animationFrameScheduler } from './internal/scheduler/animationFrame';
export { asapScheduler } from './internal/scheduler/asap';
export { asyncScheduler } from './internal/scheduler/async';
export { queueScheduler } from './internal/scheduler/queue';
export { animationFrameScheduler } from './internal/scheduler/animationFrame';
export { VirtualTimeScheduler, VirtualAction } from './internal/scheduler/VirtualTimeScheduler';

@@ -27,3 +26,2 @@ export { Scheduler } from './internal/Scheduler';

export { NotFoundError } from './internal/util/NotFoundError';
export { ObjectUnsubscribedError } from './internal/util/ObjectUnsubscribedError';
export { SequenceError } from './internal/util/SequenceError';

@@ -48,3 +46,2 @@ export { TimeoutError } from './internal/operators/timeout';

export { onErrorResumeNext } from './internal/observable/onErrorResumeNext';
export { pairs } from './internal/observable/pairs';
export { partition } from './internal/observable/partition';

@@ -70,3 +67,2 @@ export { race } from './internal/observable/race';

export { catchError } from './internal/operators/catchError';
export { combineAll } from './internal/operators/combineAll';
export { combineLatestAll } from './internal/operators/combineLatestAll';

@@ -92,3 +88,2 @@ export { combineLatestWith } from './internal/operators/combineLatestWith';

export { every } from './internal/operators/every';
export { exhaust } from './internal/operators/exhaust';
export { exhaustAll } from './internal/operators/exhaustAll';

@@ -111,3 +106,2 @@ export { exhaustMap } from './internal/operators/exhaustMap';

export { mergeAll } from './internal/operators/mergeAll';
export { flatMap } from './internal/operators/flatMap';
export { mergeMap } from './internal/operators/mergeMap';

@@ -118,11 +112,5 @@ export { mergeMapTo } from './internal/operators/mergeMapTo';

export { min } from './internal/operators/min';
export { multicast } from './internal/operators/multicast';
export { observeOn } from './internal/operators/observeOn';
export { onErrorResumeNextWith } from './internal/operators/onErrorResumeNextWith';
export { pairwise } from './internal/operators/pairwise';
export { pluck } from './internal/operators/pluck';
export { publish } from './internal/operators/publish';
export { publishBehavior } from './internal/operators/publishBehavior';
export { publishLast } from './internal/operators/publishLast';
export { publishReplay } from './internal/operators/publishReplay';
export { raceWith } from './internal/operators/raceWith';

@@ -134,3 +122,2 @@ export { reduce } from './internal/operators/reduce';

export { retryWhen } from './internal/operators/retryWhen';
export { refCount } from './internal/operators/refCount';
export { sample } from './internal/operators/sample';

@@ -137,0 +124,0 @@ export { sampleTime } from './internal/operators/sampleTime';

@@ -90,3 +90,3 @@ import { __assign } from "tslib";

if ((withCredentials || !crossDomain) && xsrfCookieName && xsrfHeaderName) {
var xsrfCookie = (_b = (_a = document === null || document === void 0 ? void 0 : document.cookie.match(new RegExp("(^|;\\s*)(" + xsrfCookieName + ")=([^;]*)"))) === null || _a === void 0 ? void 0 : _a.pop()) !== null && _b !== void 0 ? _b : '';
var xsrfCookie = (_b = (_a = document === null || document === void 0 ? void 0 : document.cookie.match(new RegExp("(^|;\\s*)(".concat(xsrfCookieName, ")=([^;]*)")))) === null || _a === void 0 ? void 0 : _a.pop()) !== null && _b !== void 0 ? _b : '';
if (xsrfCookie) {

@@ -97,5 +97,3 @@ headers[xsrfHeaderName] = xsrfCookie;

var body = extractContentTypeAndMaybeSerializeBody(configuredBody, headers);
var _request = __assign(__assign({}, config), { url: url,
headers: headers,
body: body });
var _request = __assign(__assign({}, config), { url: url, headers: headers, body: body });
var xhr;

@@ -116,3 +114,3 @@ xhr = init.createXHR ? init.createXHR() : new XMLHttpRequest();

var createResponse_1 = function (direction, event) {
return new AjaxResponse(event, xhr, _request, direction + "_" + event.type);
return new AjaxResponse(event, xhr, _request, "".concat(direction, "_").concat(event.type));
};

@@ -147,11 +145,3 @@ var addProgressEvent_1 = function (target, type, direction) {

(_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.complete) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1);
var response = void 0;
try {
response = createResponse_1(DOWNLOAD, event);
}
catch (err) {
destination.error(err);
return;
}
destination.next(response);
destination.next(createResponse_1(DOWNLOAD, event));
destination.complete();

@@ -220,3 +210,3 @@ }

function toStringCheck(obj, name) {
return _toString.call(obj) === "[object " + name + "]";
return _toString.call(obj) === "[object ".concat(name, "]");
}

@@ -223,0 +213,0 @@ function isArrayBuffer(body) {

@@ -1,2 +0,1 @@

import { getXHRResponse } from './getXHRResponse';
var AjaxResponse = (function () {

@@ -21,3 +20,3 @@ function AjaxResponse(originalEvent, xhr, request, type) {

: {};
this.response = getXHRResponse(xhr);
this.response = xhr.response;
var loaded = originalEvent.loaded, total = originalEvent.total;

@@ -24,0 +23,0 @@ this.loaded = loaded;

@@ -1,2 +0,1 @@

import { getXHRResponse } from './getXHRResponse';
import { createErrorClass } from '../util/createErrorClass';

@@ -11,10 +10,3 @@ export var AjaxError = createErrorClass(function (_super) {

this.responseType = xhr.responseType;
var response;
try {
response = getXHRResponse(xhr);
}
catch (err) {
response = xhr.responseText;
}
this.response = response;
this.response = xhr.response;
};

@@ -21,0 +13,0 @@ });

@@ -13,7 +13,7 @@ import { __extends } from "tslib";

AsyncSubject.prototype._checkFinalizedStatuses = function (subscriber) {
var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, isStopped = _a.isStopped, _isComplete = _a._isComplete;
var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, _closed = _a._closed, _isComplete = _a._isComplete;
if (hasError) {
subscriber.error(thrownError);
}
else if (isStopped || _isComplete) {
else if (_closed || _isComplete) {
_hasValue && subscriber.next(_value);

@@ -24,3 +24,3 @@ subscriber.complete();

AsyncSubject.prototype.next = function (value) {
if (!this.isStopped) {
if (!this._closed) {
this._value = value;

@@ -27,0 +27,0 @@ this._hasValue = true;

@@ -27,3 +27,2 @@ import { __extends } from "tslib";

}
this._throwIfClosed();
return _value;

@@ -30,0 +29,0 @@ };

@@ -1,2 +0,2 @@

import { Subscriber, isSubscriber } from './Subscriber';
import { Subscriber } from './Subscriber';
import { observable as Symbol_observable } from './symbol/observable';

@@ -10,19 +10,5 @@ import { pipeFromArray } from './util/pipe';

}
Observable.prototype.lift = function (operator) {
var observable = new Observable();
observable.source = this;
observable.operator = operator;
return observable;
};
Observable.prototype.subscribe = function (observerOrNext) {
var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new Subscriber(observerOrNext);
var _a = this, operator = _a.operator, source = _a.source;
subscriber.add(operator
?
operator.call(subscriber, source)
: source
?
this._subscribe(subscriber)
:
this._trySubscribe(subscriber));
var subscriber = observerOrNext instanceof Subscriber ? observerOrNext : new Subscriber(observerOrNext);
subscriber.add(this._trySubscribe(subscriber));
return subscriber;

@@ -57,5 +43,4 @@ };

};
Observable.prototype._subscribe = function (subscriber) {
var _a;
return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);
Observable.prototype._subscribe = function (_subscriber) {
return;
};

@@ -62,0 +47,0 @@ Observable.prototype[Symbol_observable] = function () {

@@ -50,3 +50,3 @@ import { __read, __spreadArray } from "tslib";

var isComplete_1 = false;
callbackFunc.apply(_this, __spreadArray(__spreadArray([], __read(args)), [
callbackFunc.apply(_this, __spreadArray(__spreadArray([], __read(args), false), [
function () {

@@ -70,3 +70,3 @@ var results = [];

},
]));
], false));
if (isComplete_1) {

@@ -73,0 +73,0 @@ subject.complete();

@@ -0,70 +1,54 @@

import { __read, __spreadArray } from "tslib";
import { Observable } from '../Observable';
import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';
import { from } from './from';
import { arrayOrObject } from '../util/argsArgArrayOrObject';
import { identity } from '../util/identity';
import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';
import { popResultSelector, popScheduler } from '../util/args';
import { createObject } from '../util/createObject';
import { createOperatorSubscriber } from '../operators/OperatorSubscriber';
import { executeSchedule } from '../util/executeSchedule';
export function combineLatest() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
import { EMPTY } from './empty';
import { from } from './from';
export function combineLatest(sources, resultSelector) {
var parts = arrayOrObject(sources);
if (!parts) {
throw new TypeError('sources must be an array or object');
}
var scheduler = popScheduler(args);
var resultSelector = popResultSelector(args);
var _a = argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys;
var observables = parts.args, keys = parts.keys;
if (observables.length === 0) {
return from([], scheduler);
return EMPTY;
}
var result = new Observable(combineLatestInit(observables, scheduler, keys
?
function (values) { return createObject(keys, values); }
:
identity));
return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;
return new Observable(combineLatestInit(observables, keys
? function (values) { return createObject(keys, values); }
: resultSelector
? function (values) { return resultSelector.apply(void 0, __spreadArray([], __read(values), false)); }
: identity));
}
export function combineLatestInit(observables, scheduler, valueTransform) {
export function combineLatestInit(observables, valueTransform) {
if (valueTransform === void 0) { valueTransform = identity; }
return function (subscriber) {
maybeSchedule(scheduler, function () {
var length = observables.length;
var values = new Array(length);
var active = length;
var remainingFirstValues = length;
var _loop_1 = function (i) {
maybeSchedule(scheduler, function () {
var source = from(observables[i], scheduler);
var hasFirstValue = false;
source.subscribe(createOperatorSubscriber(subscriber, function (value) {
values[i] = value;
if (!hasFirstValue) {
hasFirstValue = true;
remainingFirstValues--;
}
if (!remainingFirstValues) {
subscriber.next(valueTransform(values.slice()));
}
}, function () {
if (!--active) {
subscriber.complete();
}
}));
}, subscriber);
};
for (var i = 0; i < length; i++) {
_loop_1(i);
}
}, subscriber);
var length = observables.length;
var values = new Array(length);
var active = length;
var remainingFirstValues = length;
var _loop_1 = function (i) {
var source = from(observables[i]);
var hasFirstValue = false;
source.subscribe(createOperatorSubscriber(subscriber, function (value) {
values[i] = value;
if (!hasFirstValue) {
hasFirstValue = true;
remainingFirstValues--;
}
if (!remainingFirstValues) {
subscriber.next(valueTransform(Array.from(values)));
}
}, function () {
if (!--active) {
subscriber.complete();
}
}));
};
for (var i = 0; i < length; i++) {
_loop_1(i);
}
};
}
function maybeSchedule(scheduler, execute, subscription) {
if (scheduler) {
executeSchedule(subscription, scheduler, execute);
}
else {
execute();
}
}
//# sourceMappingURL=combineLatest.js.map
import { concatAll } from '../operators/concatAll';
import { popScheduler } from '../util/args';
import { scheduled } from '../scheduled/scheduled';
import { from } from './from';

@@ -9,4 +10,5 @@ export function concat() {

}
return concatAll()(from(args, popScheduler(args)));
var scheduler = popScheduler(args);
return concatAll()(scheduler ? scheduled(args, scheduler) : from(args));
}
//# sourceMappingURL=concat.js.map
import { Observable } from '../Observable';
import { innerFrom } from './innerFrom';
import { from } from './from';
export function defer(observableFactory) {
return new Observable(function (subscriber) {
innerFrom(observableFactory()).subscribe(subscriber);
from(observableFactory()).subscribe(subscriber);
});
}
//# sourceMappingURL=defer.js.map
import { __assign, __rest } from "tslib";
import { createOperatorSubscriber } from '../../operators/OperatorSubscriber';
import { Observable } from '../../Observable';
import { innerFrom } from '../../observable/innerFrom';
import { from } from '../from';
export function fromFetch(input, initWithSelector) {

@@ -35,3 +35,3 @@ if (initWithSelector === void 0) { initWithSelector = {}; }

if (selector) {
innerFrom(selector(response)).subscribe(createOperatorSubscriber(subscriber, undefined, function () {
from(selector(response)).subscribe(createOperatorSubscriber(subscriber, undefined, function () {
abortable = false;

@@ -38,0 +38,0 @@ subscriber.complete();

@@ -20,3 +20,3 @@ import { __assign, __extends } from "tslib";

_this.destination = destination;
_this.source = urlConfigOrSource;
_this._source = urlConfigOrSource;
}

@@ -46,11 +46,5 @@ else {

}
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) {
if (!this._source) {
this.destination = new ReplaySubject();

@@ -197,5 +191,5 @@ }

var _this = this;
var source = this.source;
if (source) {
return source.subscribe(subscriber);
var _source = this._source;
if (_source) {
return _source.subscribe(subscriber);
}

@@ -202,0 +196,0 @@ if (!this._socket) {

import { Observable } from '../Observable';
import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';
import { innerFrom } from './innerFrom';
import { from } from './from';
import { popResultSelector } from '../util/args';

@@ -26,3 +26,3 @@ import { createOperatorSubscriber } from '../operators/OperatorSubscriber';

var hasValue = false;
innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) {
from(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) {
if (!hasValue) {

@@ -29,0 +29,0 @@ hasValue = true;

@@ -1,6 +0,154 @@

import { scheduled } from '../scheduled/scheduled';
import { innerFrom } from './innerFrom';
export function from(input, scheduler) {
return scheduler ? scheduled(input, scheduler) : innerFrom(input);
import { __asyncValues, __awaiter, __generator, __values } from "tslib";
import { isArrayLike } from '../util/isArrayLike';
import { isPromise } from '../util/isPromise';
import { Observable } from '../Observable';
import { isInteropObservable } from '../util/isInteropObservable';
import { isAsyncIterable } from '../util/isAsyncIterable';
import { createInvalidObservableTypeError } from '../util/throwUnobservableError';
import { isIterable } from '../util/isIterable';
import { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';
import { isFunction } from '../util/isFunction';
import { reportUnhandledError } from '../util/reportUnhandledError';
import { observable as Symbol_observable } from '../symbol/observable';
export function from(input) {
if (input instanceof Observable) {
return input;
}
if (input != null) {
if (isInteropObservable(input)) {
return fromInteropObservable(input);
}
if (isArrayLike(input)) {
return fromArrayLike(input);
}
if (isPromise(input)) {
return fromPromise(input);
}
if (isAsyncIterable(input)) {
return fromAsyncIterable(input);
}
if (isIterable(input)) {
return fromIterable(input);
}
if (isReadableStreamLike(input)) {
return fromReadableStreamLike(input);
}
}
throw createInvalidObservableTypeError(input);
}
function fromInteropObservable(obj) {
return new Observable(function (subscriber) {
var obs = obj[Symbol_observable]();
if (isFunction(obs.subscribe)) {
return obs.subscribe(subscriber);
}
throw new TypeError('Provided object does not correctly implement Symbol.observable');
});
}
export function fromArrayLike(array) {
return new Observable(function (subscriber) {
subscribeToArray(array, subscriber);
});
}
function fromPromise(promise) {
return new Observable(function (subscriber) {
promise
.then(function (value) {
if (!subscriber.closed) {
subscriber.next(value);
subscriber.complete();
}
}, function (err) { return subscriber.error(err); })
.then(null, reportUnhandledError);
});
}
function fromIterable(iterable) {
return new Observable(function (subscriber) {
var e_1, _a;
try {
for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) {
var value = iterable_1_1.value;
subscriber.next(value);
if (subscriber.closed) {
return;
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1);
}
finally { if (e_1) throw e_1.error; }
}
subscriber.complete();
});
}
function fromAsyncIterable(asyncIterable) {
return new Observable(function (subscriber) {
process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); });
});
}
function fromReadableStreamLike(readableStream) {
return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));
}
function process(asyncIterable, subscriber) {
var _a, asyncIterable_1, asyncIterable_1_1;
var _b, e_2, _c, _d;
return __awaiter(this, void 0, void 0, function () {
var value, e_2_1;
return __generator(this, function (_e) {
switch (_e.label) {
case 0:
_e.trys.push([0, 5, 6, 11]);
_a = true, asyncIterable_1 = __asyncValues(asyncIterable);
_e.label = 1;
case 1: return [4, asyncIterable_1.next()];
case 2:
if (!(asyncIterable_1_1 = _e.sent(), _b = asyncIterable_1_1.done, !_b)) return [3, 4];
_d = asyncIterable_1_1.value;
_a = false;
try {
value = _d;
subscriber.next(value);
if (subscriber.closed) {
return [2];
}
}
finally {
_a = true;
}
_e.label = 3;
case 3: return [3, 1];
case 4: return [3, 11];
case 5:
e_2_1 = _e.sent();
e_2 = { error: e_2_1 };
return [3, 11];
case 6:
_e.trys.push([6, , 9, 10]);
if (!(!_a && !_b && (_c = asyncIterable_1.return))) return [3, 8];
return [4, _c.call(asyncIterable_1)];
case 7:
_e.sent();
_e.label = 8;
case 8: return [3, 10];
case 9:
if (e_2) throw e_2.error;
return [7];
case 10: return [7];
case 11:
subscriber.complete();
return [2];
}
});
});
}
export function subscribeToArray(array, subscriber) {
var length = array.length;
for (var i = 0; i < length && !subscriber.closed; i++) {
subscriber.next(array[i]);
}
subscriber.complete();
}
//# sourceMappingURL=from.js.map
import { __read } from "tslib";
import { innerFrom } from '../observable/innerFrom';
import { Observable } from '../Observable';
import { mergeMap } from '../operators/mergeMap';
import { isArrayLike } from '../util/isArrayLike';

@@ -19,16 +17,4 @@ import { isFunction } from '../util/isFunction';

}
var _a = __read(isEventTarget(target)
? eventTargetMethods.map(function (methodName) { return function (handler) { return target[methodName](eventName, handler, options); }; })
:
isNodeStyleEventEmitter(target)
? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))
: isJQueryStyleEventEmitter(target)
? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))
: [], 2), add = _a[0], remove = _a[1];
if (!add) {
if (isArrayLike(target)) {
return mergeMap(function (subTarget) { return fromEvent(subTarget, eventName, options); })(innerFrom(target));
}
}
if (!add) {
var isValidTarget = isNodeStyleEventEmitter(target) || isJQueryStyleEventEmitter(target) || isEventTarget(target);
if (!isValidTarget && !isArrayLike(target)) {
throw new TypeError('Invalid event target');

@@ -44,9 +30,31 @@ }

};
add(handler);
return function () { return remove(handler); };
if (isValidTarget) {
doSubscribe(handler, subscriber, target, eventName, options);
}
else {
for (var i = 0; i < target.length && !subscriber.closed; i++) {
var subTarget = target[i];
doSubscribe(handler, subscriber, subTarget, eventName, options);
}
}
});
}
function toCommonHandlerRegistry(target, eventName) {
return function (methodName) { return function (handler) { return target[methodName](eventName, handler); }; };
function doSubscribe(handler, subscriber, subTarget, eventName, options) {
var _a = __read(getRegistryMethodNames(subTarget), 2), addMethod = _a[0], removeMethod = _a[1];
if (!addMethod || !removeMethod) {
throw new TypeError('Invalid event target');
}
subTarget[addMethod](eventName, handler, options);
subscriber.add(function () { return subTarget[removeMethod](eventName, handler, options); });
}
function getRegistryMethodNames(target) {
return isEventTarget(target)
? eventTargetMethods
:
isNodeStyleEventEmitter(target)
? nodeEventEmitterMethods
: isJQueryStyleEventEmitter(target)
? jqueryMethods
: [];
}
function isNodeStyleEventEmitter(target) {

@@ -53,0 +61,0 @@ return isFunction(target.addListener) && isFunction(target.removeListener);

import { mergeAll } from '../operators/mergeAll';
import { innerFrom } from './innerFrom';
import { EMPTY } from './empty';
import { popNumber, popScheduler } from '../util/args';
import { scheduled } from '../scheduled/scheduled';
import { from } from './from';

@@ -19,6 +19,6 @@ export function merge() {

?
innerFrom(sources[0])
from(sources[0])
:
mergeAll(concurrent)(from(sources, scheduler));
mergeAll(concurrent)(scheduler ? scheduled(sources, scheduler) : from(sources));
}
//# sourceMappingURL=merge.js.map
import { popScheduler } from '../util/args';
import { from } from './from';
import { scheduled } from '../scheduled/scheduled';
import { fromArrayLike } from './from';
export function of() {

@@ -9,4 +10,4 @@ var args = [];

var scheduler = popScheduler(args);
return from(args, scheduler);
return scheduler ? scheduled(args, scheduler) : fromArrayLike(args);
}
//# sourceMappingURL=of.js.map

@@ -5,3 +5,3 @@ import { Observable } from '../Observable';

import { noop } from '../util/noop';
import { innerFrom } from './innerFrom';
import { from } from './from';
export function onErrorResumeNext() {

@@ -19,3 +19,3 @@ var sources = [];

try {
nextSource = innerFrom(nextSources[sourceIndex++]);
nextSource = from(nextSources[sourceIndex++]);
}

@@ -22,0 +22,0 @@ catch (err) {

import { not } from '../util/not';
import { filter } from '../operators/filter';
import { innerFrom } from './innerFrom';
import { from } from './from';
export function partition(source, predicate, thisArg) {
return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))];
return [filter(predicate, thisArg)(from(source)), filter(not(predicate, thisArg))(from(source))];
}
//# sourceMappingURL=partition.js.map
import { Observable } from '../Observable';
import { innerFrom } from './innerFrom';
import { from } from './from';
import { argsOrArgArray } from '../util/argsOrArgArray';

@@ -11,3 +11,3 @@ import { createOperatorSubscriber } from '../operators/OperatorSubscriber';

sources = argsOrArgArray(sources);
return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources));
return sources.length === 1 ? from(sources[0]) : new Observable(raceInit(sources));
}

@@ -18,3 +18,3 @@ export function raceInit(sources) {

var _loop_1 = function (i) {
subscriptions.push(innerFrom(sources[i]).subscribe(createOperatorSubscriber(subscriber, function (value) {
subscriptions.push(from(sources[i]).subscribe(createOperatorSubscriber(subscriber, function (value) {
if (subscriptions) {

@@ -21,0 +21,0 @@ for (var s = 0; s < subscriptions.length; s++) {

import { Observable } from '../Observable';
import { isFunction } from '../util/isFunction';
export function throwError(errorOrErrorFactory, scheduler) {
var errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function () { return errorOrErrorFactory; };
var init = function (subscriber) { return subscriber.error(errorFactory()); };
return new Observable(scheduler ? function (subscriber) { return scheduler.schedule(init, 0, subscriber); } : init);
export function throwError(errorFactory) {
return new Observable(function (subscriber) {
subscriber.error(errorFactory());
});
}
//# sourceMappingURL=throwError.js.map
import { Observable } from '../Observable';
import { async as asyncScheduler } from '../scheduler/async';
import { asyncScheduler } from '../scheduler/async';
import { isScheduler } from '../util/isScheduler';

@@ -4,0 +4,0 @@ import { isValidDate } from '../util/isDate';

import { Observable } from '../Observable';
import { innerFrom } from './innerFrom';
import { from } from './from';
import { EMPTY } from './empty';

@@ -8,3 +8,3 @@ export function using(resourceFactory, observableFactory) {

var result = observableFactory(resource);
var source = result ? innerFrom(result) : EMPTY;
var source = result ? from(result) : EMPTY;
source.subscribe(subscriber);

@@ -11,0 +11,0 @@ return function () {

import { __read, __spreadArray } from "tslib";
import { Observable } from '../Observable';
import { innerFrom } from './innerFrom';
import { from } from './from';
import { argsOrArgArray } from '../util/argsOrArgArray';

@@ -23,7 +23,7 @@ import { EMPTY } from './empty';

var _loop_1 = function (sourceIndex) {
innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) {
from(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) {
buffers[sourceIndex].push(value);
if (buffers.every(function (buffer) { return buffer.length; })) {
var result = buffers.map(function (buffer) { return buffer.shift(); });
subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result))) : result);
subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result), false)) : result);
if (buffers.some(function (buffer, i) { return !buffer.length && completed[i]; })) {

@@ -30,0 +30,0 @@ subscriber.complete();

import { operate } from '../util/lift';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { createOperatorSubscriber } from './OperatorSubscriber';

@@ -29,3 +29,3 @@ export function audit(durationSelector) {

if (!durationSubscriber) {
innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)));
from(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)));
}

@@ -32,0 +32,0 @@ }, function () {

import { operate } from '../util/lift';
import { noop } from '../util/noop';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
export function buffer(closingNotifier) {
return operate(function (source, subscriber) {
var currentBuffer = [];
from(closingNotifier).subscribe(createOperatorSubscriber(subscriber, function () {
var b = currentBuffer;
currentBuffer = [];
subscriber.next(b);
}, noop));
source.subscribe(createOperatorSubscriber(subscriber, function (value) { return currentBuffer.push(value); }, function () {

@@ -12,7 +17,2 @@ subscriber.next(currentBuffer);

}));
innerFrom(closingNotifier).subscribe(createOperatorSubscriber(subscriber, function () {
var b = currentBuffer;
currentBuffer = [];
subscriber.next(b);
}, noop));
return function () {

@@ -19,0 +19,0 @@ currentBuffer = null;

import { __values } from "tslib";
import { Subscription } from '../Subscription';
import { operate } from '../util/lift';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { createOperatorSubscriber } from './OperatorSubscriber';

@@ -11,3 +11,3 @@ import { noop } from '../util/noop';

var buffers = [];
innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) {
from(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) {
var buffer = [];

@@ -21,3 +21,3 @@ buffers.push(buffer);

};
closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop)));
closingSubscription.add(from(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop)));
}, noop));

@@ -24,0 +24,0 @@ source.subscribe(createOperatorSubscriber(subscriber, function (value) {

import { operate } from '../util/lift';
import { noop } from '../util/noop';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
export function bufferWhen(closingSelector) {

@@ -14,3 +14,3 @@ return operate(function (source, subscriber) {

b && subscriber.next(b);
innerFrom(closingSelector()).subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop)));
from(closingSelector()).subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop)));
};

@@ -17,0 +17,0 @@ openBuffer();

@@ -1,2 +0,2 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { createOperatorSubscriber } from './OperatorSubscriber';

@@ -10,3 +10,3 @@ import { operate } from '../util/lift';

innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, function (err) {
handledResult = innerFrom(selector(err, catchError(selector)(source)));
handledResult = from(selector(err, catchError(selector)(source)));
if (innerSub) {

@@ -13,0 +13,0 @@ innerSub.unsubscribe();

import { __read, __spreadArray } from "tslib";
import { combineLatest } from './combineLatest';
import { combineLatestInit } from '../observable/combineLatest';
import { operate } from '../util/lift';
export function combineLatestWith() {

@@ -8,4 +9,4 @@ var otherSources = [];

}
return combineLatest.apply(void 0, __spreadArray([], __read(otherSources)));
return operate(function (source, subscriber) { return combineLatestInit(__spreadArray([source], __read(otherSources), false))(subscriber); });
}
//# sourceMappingURL=combineLatestWith.js.map
import { mergeMap } from './mergeMap';
import { isFunction } from '../util/isFunction';
export function concatMap(project, resultSelector) {
return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);
export function concatMap(project) {
return mergeMap(project, 1);
}
//# sourceMappingURL=concatMap.js.map
import { concatMap } from './concatMap';
import { isFunction } from '../util/isFunction';
export function concatMapTo(innerObservable, resultSelector) {
return isFunction(resultSelector) ? concatMap(function () { return innerObservable; }, resultSelector) : concatMap(function () { return innerObservable; });
export function concatMapTo(innerObservable) {
return concatMap(function () { return innerObservable; });
}
//# sourceMappingURL=concatMapTo.js.map
import { __read, __spreadArray } from "tslib";
import { concat } from './concat';
import { from } from '../observable/from';
import { concatAll } from '../operators/concatAll';
import { operate } from '../util/lift';
export function concatWith() {

@@ -8,4 +10,6 @@ var otherSources = [];

}
return concat.apply(void 0, __spreadArray([], __read(otherSources)));
return operate(function (source, subscriber) {
concatAll()(from(__spreadArray([source], __read(otherSources), false))).subscribe(subscriber);
});
}
//# sourceMappingURL=concatWith.js.map
import { Subject } from '../Subject';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { operate } from '../util/lift';

@@ -13,3 +13,3 @@ import { fromSubscribable } from '../observable/fromSubscribable';

var subject = connector();
innerFrom(selector(fromSubscribable(subject))).subscribe(subscriber);
from(selector(fromSubscribable(subject))).subscribe(subscriber);
subscriber.add(source.subscribe(subject));

@@ -16,0 +16,0 @@ });

import { operate } from '../util/lift';
import { noop } from '../util/noop';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
export function debounce(durationSelector) {

@@ -25,3 +25,3 @@ return operate(function (source, subscriber) {

durationSubscriber = createOperatorSubscriber(subscriber, emit, noop);
innerFrom(durationSelector(value)).subscribe(durationSubscriber);
from(durationSelector(value)).subscribe(durationSubscriber);
}, function () {

@@ -28,0 +28,0 @@ emit();

@@ -10,6 +10,9 @@ import { asyncScheduler } from '../scheduler/async';

var lastTime = null;
var scheduling = false;
var emit = function () {
if (activeTask) {
activeTask.unsubscribe();
activeTask = null;
if (scheduling || activeTask) {
if (activeTask) {
activeTask.unsubscribe();
activeTask = null;
}
var value = lastValue;

@@ -34,3 +37,5 @@ lastValue = null;

if (!activeTask) {
scheduling = true;
activeTask = scheduler.schedule(emitWhenIdle, dueTime);
scheduling = false;
subscriber.add(activeTask);

@@ -37,0 +42,0 @@ }

@@ -6,3 +6,3 @@ import { concat } from '../observable/concat';

import { mergeMap } from './mergeMap';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
export function delayWhen(delayDurationSelector, subscriptionDelay) {

@@ -14,4 +14,4 @@ if (subscriptionDelay) {

}
return mergeMap(function (value, index) { return innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)); });
return mergeMap(function (value, index) { return from(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)); });
}
//# sourceMappingURL=delayWhen.js.map
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { noop } from '../util/noop';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
export function distinct(keySelector, flushes) {

@@ -15,5 +15,5 @@ return operate(function (source, subscriber) {

}));
flushes && innerFrom(flushes).subscribe(createOperatorSubscriber(subscriber, function () { return distinctKeys.clear(); }, noop));
flushes && from(flushes).subscribe(createOperatorSubscriber(subscriber, function () { return distinctKeys.clear(); }, noop));
});
}
//# sourceMappingURL=distinct.js.map

@@ -1,4 +0,4 @@

import { __read, __spreadArray } from "tslib";
import { concat } from '../observable/concat';
import { of } from '../observable/of';
import { subscribeToArray } from '../observable/from';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from '../operators/OperatorSubscriber';
export function endWith() {

@@ -9,4 +9,8 @@ var values = [];

}
return function (source) { return concat(source, of.apply(void 0, __spreadArray([], __read(values)))); };
return operate(function (source, subscriber) {
source.subscribe(createOperatorSubscriber(subscriber, undefined, function () {
subscribeToArray(values, subscriber);
}));
});
}
//# sourceMappingURL=endWith.js.map

@@ -1,11 +0,5 @@

import { map } from './map';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
export function exhaustMap(project, resultSelector) {
if (resultSelector) {
return function (source) {
return source.pipe(exhaustMap(function (a, i) { return innerFrom(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); }));
};
}
export function exhaustMap(project) {
return operate(function (source, subscriber) {

@@ -21,3 +15,3 @@ var index = 0;

});
innerFrom(project(outerValue, index++)).subscribe(innerSub);
from(project(outerValue, index++)).subscribe(innerSub);
}

@@ -24,0 +18,0 @@ }, function () {

import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
export function find(predicate, thisArg) {
return operate(createFind(predicate, thisArg, 'value'));
export function find(predicate) {
return operate(createFind(predicate, 'value'));
}
export function createFind(predicate, thisArg, emit) {
export function createFind(predicate, emit) {
var findIndex = emit === 'index';

@@ -12,3 +12,3 @@ return function (source, subscriber) {

var i = index++;
if (predicate.call(thisArg, value, i, source)) {
if (predicate(value, i, source)) {
subscriber.next(findIndex ? i : value);

@@ -15,0 +15,0 @@ subscriber.complete();

import { operate } from '../util/lift';
import { createFind } from './find';
export function findIndex(predicate, thisArg) {
return operate(createFind(predicate, thisArg, 'index'));
export function findIndex(predicate) {
return operate(createFind(predicate, 'index'));
}
//# sourceMappingURL=findIndex.js.map
import { Observable } from '../Observable';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { Subject } from '../Subject';

@@ -36,3 +36,3 @@ import { operate } from '../util/lift';

}, undefined, undefined, function () { return groups.delete(key_1); });
groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber_1));
groupBySourceSubscriber.add(from(duration(grouped)).subscribe(durationSubscriber_1));
}

@@ -39,0 +39,0 @@ }

import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
export function map(project, thisArg) {
export function map(project) {
return operate(function (source, subscriber) {
var index = 0;
source.subscribe(createOperatorSubscriber(subscriber, function (value) {
subscriber.next(project.call(thisArg, value, index++));
subscriber.next(project(value, index++));
}));

@@ -9,0 +9,0 @@ });

@@ -1,2 +0,2 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { executeSchedule } from '../util/executeSchedule';

@@ -19,3 +19,3 @@ import { createOperatorSubscriber } from './OperatorSubscriber';

var innerComplete = false;
innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, function (innerValue) {
from(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, function (innerValue) {
onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);

@@ -22,0 +22,0 @@ if (expand) {

@@ -1,16 +0,7 @@

import { map } from './map';
import { innerFrom } from '../observable/innerFrom';
import { operate } from '../util/lift';
import { mergeInternals } from './mergeInternals';
import { isFunction } from '../util/isFunction';
export function mergeMap(project, resultSelector, concurrent) {
export function mergeMap(project, concurrent) {
if (concurrent === void 0) { concurrent = Infinity; }
if (isFunction(resultSelector)) {
return mergeMap(function (a, i) { return map(function (b, ii) { return resultSelector(a, b, i, ii); })(innerFrom(project(a, i))); }, concurrent);
}
else if (typeof resultSelector === 'number') {
concurrent = resultSelector;
}
return operate(function (source, subscriber) { return mergeInternals(source, subscriber, project, concurrent); });
}
//# sourceMappingURL=mergeMap.js.map
import { mergeMap } from './mergeMap';
import { isFunction } from '../util/isFunction';
export function mergeMapTo(innerObservable, resultSelector, concurrent) {
if (concurrent === void 0) { concurrent = Infinity; }
if (isFunction(resultSelector)) {
return mergeMap(function () { return innerObservable; }, resultSelector, concurrent);
}
if (typeof resultSelector === 'number') {
concurrent = resultSelector;
}
export function mergeMapTo(innerObservable, concurrent) {
return mergeMap(function () { return innerObservable; }, concurrent);
}
//# sourceMappingURL=mergeMapTo.js.map
import { __read, __spreadArray } from "tslib";
import { merge } from './merge';
import { from } from '../observable/from';
import { mergeAll } from '../operators/mergeAll';
import { operate } from '../util/lift';
export function mergeWith() {

@@ -8,4 +10,6 @@ var otherSources = [];

}
return merge.apply(void 0, __spreadArray([], __read(otherSources)));
return operate(function (source, subscriber) {
mergeAll()(from(__spreadArray([source], __read(otherSources), false))).subscribe(subscriber);
});
}
//# sourceMappingURL=mergeWith.js.map

@@ -10,5 +10,4 @@ import { __read, __spreadArray } from "tslib";

var nextSources = argsOrArgArray(sources);
return function (source) { return oERNCreate.apply(void 0, __spreadArray([source], __read(nextSources))); };
return function (source) { return oERNCreate.apply(void 0, __spreadArray([source], __read(nextSources), false)); };
}
export var onErrorResumeNext = onErrorResumeNextWith;
//# sourceMappingURL=onErrorResumeNextWith.js.map

@@ -13,5 +13,5 @@ import { __read, __spreadArray } from "tslib";

: operate(function (source, subscriber) {
raceInit(__spreadArray([source], __read(otherSources)))(subscriber);
raceInit(__spreadArray([source], __read(otherSources), false))(subscriber);
});
}
//# sourceMappingURL=raceWith.js.map
import { EMPTY } from '../observable/empty';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { timer } from '../observable/timer';

@@ -27,3 +27,3 @@ export function repeat(countOrConfig) {

if (delay != null) {
var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar));
var notifier = typeof delay === 'number' ? timer(delay) : from(delay(soFar));
var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () {

@@ -30,0 +30,0 @@ notifierSubscriber_1.unsubscribe();

@@ -1,2 +0,2 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { Subject } from '../Subject';

@@ -16,3 +16,3 @@ import { operate } from '../util/lift';

completions$ = new Subject();
innerFrom(notifier(completions$)).subscribe(createOperatorSubscriber(subscriber, function () {
from(notifier(completions$)).subscribe(createOperatorSubscriber(subscriber, function () {
if (innerSub) {

@@ -19,0 +19,0 @@ subscribeForRepeatWhen();

@@ -5,3 +5,3 @@ import { operate } from '../util/lift';

import { timer } from '../observable/timer';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
export function retry(configOrCount) {

@@ -44,3 +44,3 @@ if (configOrCount === void 0) { configOrCount = Infinity; }

if (delay != null) {
var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar));
var notifier = typeof delay === 'number' ? timer(delay) : from(delay(err, soFar));
var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () {

@@ -47,0 +47,0 @@ notifierSubscriber_1.unsubscribe();

@@ -1,2 +0,2 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { Subject } from '../Subject';

@@ -14,3 +14,3 @@ import { operate } from '../util/lift';

errors$ = new Subject();
innerFrom(notifier(errors$)).subscribe(createOperatorSubscriber(subscriber, function () {
from(notifier(errors$)).subscribe(createOperatorSubscriber(subscriber, function () {
return innerSub ? subscribeForRetryWhen() : (syncResub = true);

@@ -17,0 +17,0 @@ }));

@@ -1,2 +0,2 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { operate } from '../util/lift';

@@ -13,3 +13,3 @@ import { noop } from '../util/noop';

}));
innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function () {
from(notifier).subscribe(createOperatorSubscriber(subscriber, function () {
if (hasValue) {

@@ -16,0 +16,0 @@ hasValue = false;

import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
export function sequenceEqual(compareTo, comparator) {

@@ -31,3 +31,3 @@ if (comparator === void 0) { comparator = function (a, b) { return a === b; }; }

source.subscribe(createSubscriber(aState, bState));
innerFrom(compareTo).subscribe(createSubscriber(bState, aState));
from(compareTo).subscribe(createSubscriber(bState, aState));
});

@@ -34,0 +34,0 @@ }

import { __read, __spreadArray } from "tslib";
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { Subject } from '../Subject';

@@ -60,3 +60,3 @@ import { Subscriber } from '../Subscriber';

});
innerFrom(source).subscribe(connection);
from(source).subscribe(connection);
}

@@ -84,4 +84,4 @@ })(wrapperSource);

});
return innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber);
return from(on.apply(void 0, __spreadArray([], __read(args), false))).subscribe(onSubscriber);
}
//# sourceMappingURL=share.js.map
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { noop } from '../util/noop';

@@ -12,3 +12,3 @@ export function skipUntil(notifier) {

}, noop);
innerFrom(notifier).subscribe(skipSubscriber);
from(notifier).subscribe(skipSubscriber);
source.subscribe(createOperatorSubscriber(subscriber, function (value) { return taking && subscriber.next(value); }));

@@ -15,0 +15,0 @@ });

@@ -1,5 +0,5 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
export function switchMap(project, resultSelector) {
export function switchMap(project) {
return operate(function (source, subscriber) {

@@ -12,5 +12,4 @@ var innerSubscriber = null;

innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();
var innerIndex = 0;
var outerIndex = index++;
innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, function (innerValue) { return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); }, function () {
from(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, undefined, function () {
innerSubscriber = null;

@@ -17,0 +16,0 @@ checkComplete();

import { switchMap } from './switchMap';
import { isFunction } from '../util/isFunction';
export function switchMapTo(innerObservable, resultSelector) {
return isFunction(resultSelector) ? switchMap(function () { return innerObservable; }, resultSelector) : switchMap(function () { return innerObservable; });
export function switchMapTo(innerObservable) {
return switchMap(function () { return innerObservable; });
}
//# sourceMappingURL=switchMapTo.js.map
import { switchMap } from './switchMap';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
export function switchScan(accumulator, seed) {
return operate(function (source, subscriber) {
var state = seed;
switchMap(function (value, index) { return accumulator(state, value, index); }, function (_, innerValue) { return ((state = innerValue), innerValue); })(source).subscribe(subscriber);
switchMap(function (value, index) { return accumulator(state, value, index); })(source).subscribe(createOperatorSubscriber(subscriber, function (innerValue) {
state = innerValue;
subscriber.next(innerValue);
}));
return function () {

@@ -8,0 +12,0 @@ state = null;

@@ -10,12 +10,15 @@ import { EMPTY } from '../observable/empty';

var seen = 0;
source.subscribe(createOperatorSubscriber(subscriber, function (value) {
if (++seen <= count) {
var operatorSubscriber = createOperatorSubscriber(subscriber, function (value) {
if (++seen < count) {
subscriber.next(value);
if (count <= seen) {
subscriber.complete();
}
}
}));
else {
operatorSubscriber.unsubscribe();
subscriber.next(value);
subscriber.complete();
}
});
source.subscribe(operatorSubscriber);
});
}
//# sourceMappingURL=take.js.map

@@ -1,2 +0,1 @@

import { __values } from "tslib";
import { EMPTY } from '../observable/empty';

@@ -9,24 +8,15 @@ import { operate } from '../util/lift';

: operate(function (source, subscriber) {
var buffer = [];
var ring = new Array(count);
var counter = 0;
source.subscribe(createOperatorSubscriber(subscriber, function (value) {
buffer.push(value);
count < buffer.length && buffer.shift();
ring[counter++ % count] = value;
}, function () {
var e_1, _a;
try {
for (var buffer_1 = __values(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) {
var value = buffer_1_1.value;
subscriber.next(value);
}
var start = count <= counter ? counter : 0;
var total = Math.min(count, counter);
for (var n = 0; n < total; n++) {
subscriber.next(ring[(start + n) % count]);
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1);
}
finally { if (e_1) throw e_1.error; }
}
subscriber.complete();
}, undefined, function () {
buffer = null;
ring = null;
}));

@@ -33,0 +23,0 @@ });

import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { noop } from '../util/noop';
export function takeUntil(notifier) {
return operate(function (source, subscriber) {
innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function () { return subscriber.complete(); }, noop));
from(notifier).subscribe(createOperatorSubscriber(subscriber, function () { return subscriber.complete(); }, noop));
!subscriber.closed && source.subscribe(subscriber);

@@ -9,0 +9,0 @@ });

@@ -7,9 +7,17 @@ import { operate } from '../util/lift';

var index = 0;
source.subscribe(createOperatorSubscriber(subscriber, function (value) {
var result = predicate(value, index++);
(result || inclusive) && subscriber.next(value);
!result && subscriber.complete();
}));
var operatorSubscriber = createOperatorSubscriber(subscriber, function (value) {
if (predicate(value, index++)) {
subscriber.next(value);
}
else {
operatorSubscriber.unsubscribe();
if (inclusive) {
subscriber.next(value);
}
subscriber.complete();
}
});
source.subscribe(operatorSubscriber);
});
}
//# sourceMappingURL=takeWhile.js.map
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
export var defaultThrottleConfig = {

@@ -29,3 +29,3 @@ leading: true,

var startThrottle = function (value) {
return (throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling)));
return (throttled = from(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling)));
};

@@ -32,0 +32,0 @@ var send = function () {

import { asyncScheduler } from '../scheduler/async';
import { isValidDate } from '../util/isDate';
import { operate } from '../util/lift';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { createErrorClass } from '../util/createErrorClass';

@@ -31,3 +31,3 @@ import { createOperatorSubscriber } from './OperatorSubscriber';

originalSourceSubscription.unsubscribe();
innerFrom(_with({
from(_with({
meta: meta,

@@ -34,0 +34,0 @@ lastValue: lastValue,

@@ -1,2 +0,2 @@

import { async } from '../scheduler/async';
import { asyncScheduler } from '../scheduler/async';
import { isValidDate } from '../util/isDate';

@@ -8,3 +8,3 @@ import { timeout } from './timeout';

var _with;
scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async;
scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : asyncScheduler;
if (isValidDate(due)) {

@@ -11,0 +11,0 @@ first = due;

@@ -5,3 +5,3 @@ import { Subject } from '../Subject';

import { noop } from '../util/noop';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
export function window(windowBoundaries) {

@@ -19,3 +19,3 @@ return operate(function (source, subscriber) {

}, errorHandler));
innerFrom(windowBoundaries).subscribe(createOperatorSubscriber(subscriber, function () {
from(windowBoundaries).subscribe(createOperatorSubscriber(subscriber, function () {
windowSubject.complete();

@@ -22,0 +22,0 @@ subscriber.next((windowSubject = new Subject()));

@@ -5,3 +5,3 @@ import { __values } from "tslib";

import { operate } from '../util/lift';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { createOperatorSubscriber } from './OperatorSubscriber';

@@ -19,3 +19,3 @@ import { noop } from '../util/noop';

};
innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) {
from(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) {
var window = new Subject();

@@ -31,3 +31,3 @@ windows.push(window);

try {
closingNotifier = innerFrom(closingSelector(openValue));
closingNotifier = from(closingSelector(openValue));
}

@@ -38,3 +38,3 @@ catch (err) {

}
subscriber.next(window.asObservable());
subscriber.next(window);
closingSubscription.add(closingNotifier.subscribe(createOperatorSubscriber(subscriber, closeWindow, noop, handleError)));

@@ -41,0 +41,0 @@ }, noop));

import { Subject } from '../Subject';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { noop } from '../util/noop';
export function windowWhen(closingSelector) {

@@ -20,3 +21,3 @@ return operate(function (source, subscriber) {

try {
closingNotifier = innerFrom(closingSelector());
closingNotifier = from(closingSelector());
}

@@ -27,3 +28,3 @@ catch (err) {

}
closingNotifier.subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openWindow, openWindow, handleError)));
closingNotifier.subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openWindow, noop, handleError)));
};

@@ -30,0 +31,0 @@ openWindow();

import { __read, __spreadArray } from "tslib";
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { identity } from '../util/identity';

@@ -20,3 +20,3 @@ import { noop } from '../util/noop';

var _loop_1 = function (i) {
innerFrom(inputs[i]).subscribe(createOperatorSubscriber(subscriber, function (value) {
from(inputs[i]).subscribe(createOperatorSubscriber(subscriber, function (value) {
otherValues[i] = value;

@@ -34,4 +34,4 @@ if (!ready && !hasValue[i]) {

if (ready) {
var values = __spreadArray([value], __read(otherValues));
subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values))) : values);
var values = __spreadArray([value], __read(otherValues), false);
subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values), false)) : values);
}

@@ -38,0 +38,0 @@ }));

import { __read, __spreadArray } from "tslib";
import { zip } from './zip';
import { operate } from '../util/lift';
import { zip } from '../observable/zip';
export function zipWith() {

@@ -8,4 +9,6 @@ var otherInputs = [];

}
return zip.apply(void 0, __spreadArray([], __read(otherInputs)));
return operate(function (source, subscriber) {
zip.apply(void 0, __spreadArray([source], __read(otherInputs), false)).subscribe(subscriber);
});
}
//# sourceMappingURL=zipWith.js.map

@@ -22,4 +22,4 @@ import { __extends } from "tslib";

ReplaySubject.prototype.next = function (value) {
var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime;
if (!isStopped) {
var _a = this, _closed = _a._closed, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime;
if (!_closed) {
_buffer.push(value);

@@ -32,3 +32,2 @@ !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);

ReplaySubject.prototype._subscribe = function (subscriber) {
this._throwIfClosed();
this._trimBuffer();

@@ -35,0 +34,0 @@ var subscription = this._innerSubscribe(subscriber);

@@ -1,7 +0,7 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { observeOn } from '../operators/observeOn';
import { subscribeOn } from '../operators/subscribeOn';
export function scheduleObservable(input, scheduler) {
return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
return from(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
}
//# sourceMappingURL=scheduleObservable.js.map

@@ -1,7 +0,7 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { observeOn } from '../operators/observeOn';
import { subscribeOn } from '../operators/subscribeOn';
export function schedulePromise(input, scheduler) {
return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
return from(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
}
//# sourceMappingURL=schedulePromise.js.map
import { AnimationFrameAction } from './AnimationFrameAction';
import { AnimationFrameScheduler } from './AnimationFrameScheduler';
export var animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction);
export var animationFrame = animationFrameScheduler;
//# sourceMappingURL=animationFrame.js.map

@@ -24,3 +24,3 @@ import { __read, __spreadArray } from "tslib";

var delegate = animationFrameProvider.delegate;
return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args)));
return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args), false));
},

@@ -33,3 +33,3 @@ cancelAnimationFrame: function () {

var delegate = animationFrameProvider.delegate;
return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args)));
return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args), false));
},

@@ -36,0 +36,0 @@ delegate: undefined,

import { AsapAction } from './AsapAction';
import { AsapScheduler } from './AsapScheduler';
export var asapScheduler = new AsapScheduler(AsapAction);
export var asap = asapScheduler;
//# sourceMappingURL=asap.js.map

@@ -29,3 +29,5 @@ import { __extends } from "tslib";

immediateProvider.clearImmediate(id);
scheduler._scheduled = undefined;
if (scheduler._scheduled === id) {
scheduler._scheduled = undefined;
}
}

@@ -32,0 +34,0 @@ return undefined;

import { AsyncAction } from './AsyncAction';
import { AsyncScheduler } from './AsyncScheduler';
export var asyncScheduler = new AsyncScheduler(AsyncAction);
export var async = asyncScheduler;
//# sourceMappingURL=async.js.map

@@ -11,3 +11,3 @@ import { __read, __spreadArray } from "tslib";

var delegate = immediateProvider.delegate;
return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args)));
return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args), false));
},

@@ -14,0 +14,0 @@ clearImmediate: function (handle) {

@@ -10,5 +10,5 @@ import { __read, __spreadArray } from "tslib";

if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {
return delegate.setInterval.apply(delegate, __spreadArray([handler, timeout], __read(args)));
return delegate.setInterval.apply(delegate, __spreadArray([handler, timeout], __read(args), false));
}
return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args)));
return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args), false));
},

@@ -15,0 +15,0 @@ clearInterval: function (handle) {

import { QueueAction } from './QueueAction';
import { QueueScheduler } from './QueueScheduler';
export var queueScheduler = new QueueScheduler(QueueAction);
export var queue = queueScheduler;
//# sourceMappingURL=queue.js.map

@@ -10,5 +10,5 @@ import { __read, __spreadArray } from "tslib";

if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {
return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args)));
return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args), false));
}
return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));
return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args), false));
},

@@ -15,0 +15,0 @@ clearTimeout: function (handle) {

@@ -1,6 +0,4 @@

import { __extends, __values } from "tslib";
import { __extends } from "tslib";
import { Observable } from './Observable';
import { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';
import { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';
import { arrRemove } from './util/arrRemove';
import { Subscription } from './Subscription';
var Subject = (function (_super) {

@@ -10,6 +8,5 @@ __extends(Subject, _super);

var _this = _super.call(this) || this;
_this.closed = false;
_this.currentObservers = null;
_this.observers = [];
_this.isStopped = false;
_this._closed = false;
_this._observerCounter = 0;
_this.currentObservers = new Map();
_this.hasError = false;

@@ -19,63 +16,60 @@ _this.thrownError = null;

}
Subject.prototype.lift = function (operator) {
var subject = new AnonymousSubject(this, this);
subject.operator = operator;
return subject;
Object.defineProperty(Subject.prototype, "closed", {
get: function () {
return this._closed;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Subject.prototype, "observers", {
get: function () {
var _a;
return ((_a = this.observerSnapshot) !== null && _a !== void 0 ? _a : (this.observerSnapshot = Array.from(this.currentObservers.values())));
},
enumerable: false,
configurable: true
});
Subject.prototype._clearObservers = function () {
this.currentObservers.clear();
this.observerSnapshot = undefined;
};
Subject.prototype._throwIfClosed = function () {
if (this.closed) {
throw new ObjectUnsubscribedError();
}
};
Subject.prototype.next = function (value) {
var e_1, _a;
this._throwIfClosed();
if (!this.isStopped) {
if (!this.currentObservers) {
this.currentObservers = Array.from(this.observers);
if (!this._closed) {
var observers = this.observers;
var len = observers.length;
for (var i = 0; i < len; i++) {
observers[i].next(value);
}
try {
for (var _b = __values(this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) {
var observer = _c.value;
observer.next(value);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
}
};
Subject.prototype.error = function (err) {
this._throwIfClosed();
if (!this.isStopped) {
this.hasError = this.isStopped = true;
if (!this._closed) {
this.hasError = this._closed = true;
this.thrownError = err;
var observers = this.observers;
while (observers.length) {
observers.shift().error(err);
var len = observers.length;
for (var i = 0; i < len; i++) {
observers[i].error(err);
}
this._clearObservers();
}
};
Subject.prototype.complete = function () {
this._throwIfClosed();
if (!this.isStopped) {
this.isStopped = true;
if (!this._closed) {
this._closed = true;
var observers = this.observers;
while (observers.length) {
observers.shift().complete();
var len = observers.length;
for (var i = 0; i < len; i++) {
observers[i].complete();
}
this._clearObservers();
}
};
Subject.prototype.unsubscribe = function () {
this.isStopped = this.closed = true;
this.observers = this.currentObservers = null;
this._closed = true;
this._clearObservers();
};
Object.defineProperty(Subject.prototype, "observed", {
get: function () {
var _a;
return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;
return this.currentObservers.size > 0;
},

@@ -85,8 +79,3 @@ enumerable: false,

});
Subject.prototype._trySubscribe = function (subscriber) {
this._throwIfClosed();
return _super.prototype._trySubscribe.call(this, subscriber);
};
Subject.prototype._subscribe = function (subscriber) {
this._throwIfClosed();
this._checkFinalizedStatuses(subscriber);

@@ -97,19 +86,21 @@ return this._innerSubscribe(subscriber);

var _this = this;
var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;
if (hasError || isStopped) {
return EMPTY_SUBSCRIPTION;
if (this.hasError || this._closed) {
return Subscription.EMPTY;
}
this.currentObservers = null;
observers.push(subscriber);
return new Subscription(function () {
_this.currentObservers = null;
arrRemove(observers, subscriber);
var currentObservers = this.currentObservers;
var observerId = this._observerCounter++;
currentObservers.set(observerId, subscriber);
this.observerSnapshot = undefined;
subscriber.add(function () {
currentObservers.delete(observerId);
_this.observerSnapshot = undefined;
});
return subscriber;
};
Subject.prototype._checkFinalizedStatuses = function (subscriber) {
var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;
var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _closed = _a._closed;
if (hasError) {
subscriber.error(thrownError);
}
else if (isStopped) {
else if (_closed) {
subscriber.complete();

@@ -119,5 +110,4 @@ }

Subject.prototype.asObservable = function () {
var observable = new Observable();
observable.source = this;
return observable;
var _this = this;
return new Observable(function (subscriber) { return _this.subscribe(subscriber); });
};

@@ -132,6 +122,6 @@ Subject.create = function (destination, source) {

__extends(AnonymousSubject, _super);
function AnonymousSubject(destination, source) {
function AnonymousSubject(destination, _source) {
var _this = _super.call(this) || this;
_this.destination = destination;
_this.source = source;
_this._source = _source;
return _this;

@@ -153,3 +143,3 @@ }

var _a, _b;
return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;
return (_b = (_a = this._source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : Subscription.EMPTY;
};

@@ -156,0 +146,0 @@ return AnonymousSubject;

import { __extends } from "tslib";
import { isFunction } from './util/isFunction';
import { isSubscription, Subscription } from './Subscription';
import { Subscription } from './Subscription';
import { config } from './config';
import { reportUnhandledError } from './util/reportUnhandledError';
import { noop } from './util/noop';
import { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';

@@ -14,4 +13,4 @@ import { timeoutProvider } from './scheduler/timeoutProvider';

_this.isStopped = false;
_this.destination = isSubscriber(destination) ? destination : createSafeObserver(destination);
if (isSubscription(destination)) {
_this.destination = destination instanceof Subscriber ? destination : createSafeObserver(destination);
if (hasAddAndUnsubscribe(destination)) {
destination.add(_this);

@@ -121,5 +120,2 @@ }

}
function defaultErrorHandler(err) {
throw err;
}
function handleStoppedNotification(notification, subscriber) {

@@ -129,14 +125,5 @@ var onStoppedNotification = config.onStoppedNotification;

}
export var EMPTY_OBSERVER = {
closed: true,
next: noop,
error: defaultErrorHandler,
complete: noop,
};
function isObserver(value) {
return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);
function hasAddAndUnsubscribe(value) {
return value && isFunction(value.unsubscribe) && isFunction(value.add);
}
export function isSubscriber(value) {
return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));
}
//# sourceMappingURL=Subscriber.js.map
import { __read, __spreadArray, __values } from "tslib";
import { isFunction } from './util/isFunction';
import { UnsubscriptionError } from './util/UnsubscriptionError';
import { arrRemove } from './util/arrRemove';
var Subscription = (function () {

@@ -9,32 +8,9 @@ function Subscription(initialTeardown) {

this.closed = false;
this._parentage = null;
this._finalizers = null;
}
Subscription.prototype.unsubscribe = function () {
var e_1, _a, e_2, _b;
var e_1, _a;
var errors;
if (!this.closed) {
this.closed = true;
var _parentage = this._parentage;
if (_parentage) {
this._parentage = null;
if (Array.isArray(_parentage)) {
try {
for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {
var parent_1 = _parentage_1_1.value;
parent_1.remove(this);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);
}
finally { if (e_1) throw e_1.error; }
}
}
else {
_parentage.remove(this);
}
}
var initialFinalizer = this.initialTeardown;

@@ -61,3 +37,3 @@ if (isFunction(initialFinalizer)) {

if (err instanceof UnsubscriptionError) {
errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));
errors.push.apply(errors, __spreadArray([], __read(err.errors), false));
}

@@ -70,8 +46,8 @@ else {

}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);
if (_finalizers_1_1 && !_finalizers_1_1.done && (_a = _finalizers_1.return)) _a.call(_finalizers_1);
}
finally { if (e_2) throw e_2.error; }
finally { if (e_1) throw e_1.error; }
}

@@ -85,2 +61,3 @@ }

Subscription.prototype.add = function (teardown) {
var _this = this;
var _a;

@@ -92,35 +69,15 @@ if (teardown && teardown !== this) {

else {
if (teardown instanceof Subscription) {
if (teardown.closed || teardown._hasParent(this)) {
return;
}
teardown._addParent(this);
if (teardown && 'add' in teardown) {
teardown.add(function () {
_this.remove(teardown);
});
}
(this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : new Set()).add(teardown);
(_a = this._finalizers) !== null && _a !== void 0 ? _a : (this._finalizers = new Set());
this._finalizers.add(teardown);
}
}
};
Subscription.prototype._hasParent = function (parent) {
var _parentage = this._parentage;
return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));
};
Subscription.prototype._addParent = function (parent) {
var _parentage = this._parentage;
this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
};
Subscription.prototype._removeParent = function (parent) {
var _parentage = this._parentage;
if (_parentage === parent) {
this._parentage = null;
}
else if (Array.isArray(_parentage)) {
arrRemove(_parentage, parent);
}
};
Subscription.prototype.remove = function (teardown) {
var _a;
(_a = this._finalizers) === null || _a === void 0 ? void 0 : _a.delete(teardown);
if (teardown instanceof Subscription) {
teardown._removeParent(this);
}
};

@@ -135,7 +92,2 @@ Subscription.EMPTY = (function () {

export { Subscription };
export var EMPTY_SUBSCRIPTION = Subscription.EMPTY;
export function isSubscription(value) {
return (value instanceof Subscription ||
(value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));
}
function execFinalizer(finalizer) {

@@ -142,0 +94,0 @@ if (isFunction(finalizer)) {

@@ -158,3 +158,3 @@ import { __extends, __read, __spreadArray, __values } from "tslib";

}
var characters = __spreadArray([], __read(marbles));
var characters = __spreadArray([], __read(marbles), false);
var len = characters.length;

@@ -253,3 +253,3 @@ var groupStart = -1;

}
var characters = __spreadArray([], __read(marbles));
var characters = __spreadArray([], __read(marbles), false);
var len = characters.length;

@@ -256,0 +256,0 @@ var testMessages = [];

@@ -5,16 +5,23 @@ var isArray = Array.isArray;

if (args.length === 1) {
var first_1 = args[0];
if (isArray(first_1)) {
return { args: first_1, keys: null };
var first = args[0];
var result = arrayOrObject(first);
if (result) {
return result;
}
if (isPOJO(first_1)) {
var keys = getKeys(first_1);
return {
args: keys.map(function (key) { return first_1[key]; }),
keys: keys,
};
}
}
return { args: args, keys: null };
}
export function arrayOrObject(first) {
if (isArray(first)) {
return { args: first, keys: null };
}
if (isPOJO(first)) {
var keys = getKeys(first);
return {
args: keys.map(function (key) { return first[key]; }),
keys: keys,
};
}
return null;
}
function isPOJO(obj) {

@@ -21,0 +28,0 @@ return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto;

@@ -1,20 +0,5 @@

import { isFunction } from './isFunction';
export function hasLift(source) {
return isFunction(source === null || source === void 0 ? void 0 : source.lift);
}
import { Observable } from '../Observable';
export function operate(init) {
return function (source) {
if (hasLift(source)) {
return source.lift(function (liftedSource) {
try {
return init(liftedSource, this);
}
catch (err) {
this.error(err);
}
});
}
throw new TypeError('Unable to lift unknown Observable type');
};
return function (source) { return new Observable(function (subscriber) { return init(source, subscriber); }); };
}
//# sourceMappingURL=lift.js.map

@@ -5,3 +5,3 @@ import { __read, __spreadArray } from "tslib";

function callOrApply(fn, args) {
return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args);
return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args), false)) : fn(args);
}

@@ -8,0 +8,0 @@ export function mapOneOrManyArgs(fn) {

export function createInvalidObservableTypeError(input) {
return new TypeError("You provided " + (input !== null && typeof input === 'object' ? 'an invalid object' : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
return new TypeError("You provided ".concat(input !== null && typeof input === 'object' ? 'an invalid object' : "'".concat(input, "'"), " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."));
}
//# sourceMappingURL=throwUnobservableError.js.map

@@ -6,3 +6,3 @@ import { createErrorClass } from './createErrorClass';

this.message = errors
? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ')
? "".concat(errors.length, " errors occurred during unsubscription:\n").concat(errors.map(function (err, i) { return "".concat(i + 1, ") ").concat(err.toString()); }).join('\n '))
: '';

@@ -9,0 +9,0 @@ this.name = 'UnsubscriptionError';

@@ -9,7 +9,4 @@ export { audit } from '../internal/operators/audit';

export { catchError } from '../internal/operators/catchError';
export { combineAll } from '../internal/operators/combineAll';
export { combineLatestAll } from '../internal/operators/combineLatestAll';
export { combineLatest } from '../internal/operators/combineLatest';
export { combineLatestWith } from '../internal/operators/combineLatestWith';
export { concat } from '../internal/operators/concat';
export { concatAll } from '../internal/operators/concatAll';

@@ -33,3 +30,2 @@ export { concatMap } from '../internal/operators/concatMap';

export { every } from '../internal/operators/every';
export { exhaust } from '../internal/operators/exhaust';
export { exhaustAll } from '../internal/operators/exhaustAll';

@@ -51,5 +47,3 @@ export { exhaustMap } from '../internal/operators/exhaustMap';

export { max } from '../internal/operators/max';
export { merge } from '../internal/operators/merge';
export { mergeAll } from '../internal/operators/mergeAll';
export { flatMap } from '../internal/operators/flatMap';
export { mergeMap } from '../internal/operators/mergeMap';

@@ -60,13 +54,6 @@ export { mergeMapTo } from '../internal/operators/mergeMapTo';

export { min } from '../internal/operators/min';
export { multicast } from '../internal/operators/multicast';
export { observeOn } from '../internal/operators/observeOn';
export { onErrorResumeNext } from '../internal/operators/onErrorResumeNextWith';
export { onErrorResumeNextWith } from '../internal/operators/onErrorResumeNextWith';
export { pairwise } from '../internal/operators/pairwise';
export { partition } from '../internal/operators/partition';
export { pluck } from '../internal/operators/pluck';
export { publish } from '../internal/operators/publish';
export { publishBehavior } from '../internal/operators/publishBehavior';
export { publishLast } from '../internal/operators/publishLast';
export { publishReplay } from '../internal/operators/publishReplay';
export { race } from '../internal/operators/race';
export { raceWith } from '../internal/operators/raceWith';

@@ -78,3 +65,2 @@ export { reduce } from '../internal/operators/reduce';

export { retryWhen } from '../internal/operators/retryWhen';
export { refCount } from '../internal/operators/refCount';
export { sample } from '../internal/operators/sample';

@@ -116,5 +102,4 @@ export { sampleTime } from '../internal/operators/sampleTime';

export { withLatestFrom } from '../internal/operators/withLatestFrom';
export { zip } from '../internal/operators/zip';
export { zipAll } from '../internal/operators/zipAll';
export { zipWith } from '../internal/operators/zipWith';
//# sourceMappingURL=index.js.map
/// <reference path="operators/index.d.ts" />
/// <reference path="testing/index.d.ts" />
export { Observable } from './internal/Observable';
export { ConnectableObservable } from './internal/observable/ConnectableObservable';
export { GroupedObservable } from './internal/operators/groupBy';

@@ -13,6 +12,6 @@ export { Operator } from './internal/Operator';

export { AsyncSubject } from './internal/AsyncSubject';
export { asap, asapScheduler } from './internal/scheduler/asap';
export { async, asyncScheduler } from './internal/scheduler/async';
export { queue, queueScheduler } from './internal/scheduler/queue';
export { animationFrame, animationFrameScheduler } from './internal/scheduler/animationFrame';
export { asapScheduler } from './internal/scheduler/asap';
export { asyncScheduler } from './internal/scheduler/async';
export { queueScheduler } from './internal/scheduler/queue';
export { animationFrameScheduler } from './internal/scheduler/animationFrame';
export { VirtualTimeScheduler, VirtualAction } from './internal/scheduler/VirtualTimeScheduler';

@@ -31,3 +30,2 @@ export { Scheduler } from './internal/Scheduler';

export { NotFoundError } from './internal/util/NotFoundError';
export { ObjectUnsubscribedError } from './internal/util/ObjectUnsubscribedError';
export { SequenceError } from './internal/util/SequenceError';

@@ -52,3 +50,2 @@ export { TimeoutError } from './internal/operators/timeout';

export { onErrorResumeNext } from './internal/observable/onErrorResumeNext';
export { pairs } from './internal/observable/pairs';
export { partition } from './internal/observable/partition';

@@ -74,3 +71,2 @@ export { race } from './internal/observable/race';

export { catchError } from './internal/operators/catchError';
export { combineAll } from './internal/operators/combineAll';
export { combineLatestAll } from './internal/operators/combineLatestAll';

@@ -96,3 +92,2 @@ export { combineLatestWith } from './internal/operators/combineLatestWith';

export { every } from './internal/operators/every';
export { exhaust } from './internal/operators/exhaust';
export { exhaustAll } from './internal/operators/exhaustAll';

@@ -115,3 +110,2 @@ export { exhaustMap } from './internal/operators/exhaustMap';

export { mergeAll } from './internal/operators/mergeAll';
export { flatMap } from './internal/operators/flatMap';
export { mergeMap } from './internal/operators/mergeMap';

@@ -122,11 +116,5 @@ export { mergeMapTo } from './internal/operators/mergeMapTo';

export { min } from './internal/operators/min';
export { multicast } from './internal/operators/multicast';
export { observeOn } from './internal/operators/observeOn';
export { onErrorResumeNextWith } from './internal/operators/onErrorResumeNextWith';
export { pairwise } from './internal/operators/pairwise';
export { pluck } from './internal/operators/pluck';
export { publish } from './internal/operators/publish';
export { publishBehavior } from './internal/operators/publishBehavior';
export { publishLast } from './internal/operators/publishLast';
export { publishReplay } from './internal/operators/publishReplay';
export { raceWith } from './internal/operators/raceWith';

@@ -138,3 +126,2 @@ export { reduce } from './internal/operators/reduce';

export { retryWhen } from './internal/operators/retryWhen';
export { refCount } from './internal/operators/refCount';
export { sample } from './internal/operators/sample';

@@ -161,3 +148,3 @@ export { sampleTime } from './internal/operators/sampleTime';

export { takeWhile } from './internal/operators/takeWhile';
export { tap } from './internal/operators/tap';
export { tap, TapObserver } from './internal/operators/tap';
export { throttle, ThrottleConfig } from './internal/operators/throttle';

@@ -164,0 +151,0 @@ export { throttleTime } from './internal/operators/throttleTime';

@@ -7,5 +7,5 @@ import { PartialObserver } from '../types';

*/
export declare type AjaxDirection = 'upload' | 'download';
export declare type ProgressEventType = 'loadstart' | 'progress' | 'load';
export declare type AjaxResponseType = `${AjaxDirection}_${ProgressEventType}`;
export type AjaxDirection = 'upload' | 'download';
export type ProgressEventType = 'loadstart' | 'progress' | 'load';
export type AjaxResponseType = `${AjaxDirection}_${ProgressEventType}`;
/**

@@ -12,0 +12,0 @@ * The object containing values RxJS used to make the HTTP request.

@@ -8,4 +8,4 @@ declare const anyCatcherSymbol: unique symbol;

*/
export declare type AnyCatcher = typeof anyCatcherSymbol;
export type AnyCatcher = typeof anyCatcherSymbol;
export {};
//# sourceMappingURL=AnyCatcher.d.ts.map

@@ -1,2 +0,1 @@

import { Operator } from './Operator';
import { Subscriber } from './Subscriber';

@@ -13,10 +12,2 @@ import { Subscription } from './Subscription';

/**
* @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.
*/
source: Observable<any> | undefined;
/**
* @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.
*/
operator: Operator<any, T> | undefined;
/**
* @constructor

@@ -30,14 +21,2 @@ * @param {Function} subscribe the function that is called when the Observable is

/**
* Creates a new Observable, with this Observable instance as the source, and the passed
* operator defined as the new observable's operator.
* @method lift
* @param operator the operator defining the operation to take on the observable
* @return a new observable with the Operator applied
* @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.
* If you have implemented an operator using `lift`, it is recommended that you create an
* operator by simply returning `new Observable()` directly. See "Creating new operators from
* scratch" section here: https://rxjs.dev/guide/operators
*/
lift<R>(operator?: Operator<T, R>): Observable<R>;
/**
* Invokes an execution of an Observable and registers Observer handlers for notifications it will emit.

@@ -44,0 +23,0 @@ *

import { Observable } from '../Observable';
import { ObservableInput, SchedulerLike, ObservedValueOf, ObservableInputTuple } from '../types';
import { ObservableInput, ObservedValueOf, ObservableInputTuple } from '../types';
import { Subscriber } from '../Subscriber';

@@ -13,15 +13,3 @@ import { AnyCatcher } from '../AnyCatcher';

export declare function combineLatest<A extends readonly unknown[]>(sources: readonly [...ObservableInputTuple<A>]): Observable<A>;
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */
export declare function combineLatest<A extends readonly unknown[], R>(sources: readonly [...ObservableInputTuple<A>], resultSelector: (...values: A) => R, scheduler: SchedulerLike): Observable<R>;
export declare function combineLatest<A extends readonly unknown[], R>(sources: readonly [...ObservableInputTuple<A>], resultSelector: (...values: A) => R): Observable<R>;
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */
export declare function combineLatest<A extends readonly unknown[]>(sources: readonly [...ObservableInputTuple<A>], scheduler: SchedulerLike): Observable<A>;
/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */
export declare function combineLatest<A extends readonly unknown[]>(...sources: [...ObservableInputTuple<A>]): Observable<A>;
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */
export declare function combineLatest<A extends readonly unknown[], R>(...sourcesAndResultSelectorAndScheduler: [...ObservableInputTuple<A>, (...values: A) => R, SchedulerLike]): Observable<R>;
/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */
export declare function combineLatest<A extends readonly unknown[], R>(...sourcesAndResultSelector: [...ObservableInputTuple<A>, (...values: A) => R]): Observable<R>;
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */
export declare function combineLatest<A extends readonly unknown[]>(...sourcesAndScheduler: [...ObservableInputTuple<A>, SchedulerLike]): Observable<A>;
export declare function combineLatest(sourcesObject: {

@@ -33,3 +21,3 @@ [K in any]: never;

}>;
export declare function combineLatestInit(observables: ObservableInput<any>[], scheduler?: SchedulerLike, valueTransform?: (values: any[]) => any): (subscriber: Subscriber<any>) => void;
export declare function combineLatestInit(observables: ObservableInput<any>[], valueTransform?: (values: any[]) => any): (subscriber: Subscriber<any>) => void;
//# sourceMappingURL=combineLatest.d.ts.map

@@ -17,5 +17,4 @@ import { Observable } from '../Observable';

* generates a new Observable -- and subscribes the Observer to this Observable.
* In case the factory function returns a falsy value, then EMPTY is used as
* Observable instead. Last but not least, an exception during the factory
* function call is transferred to the Observer by calling `error`.
* Last but not least, an exception during the factory function call is
* transferred to the Observer by calling `error`.
*

@@ -22,0 +21,0 @@ * ## Example

@@ -72,3 +72,3 @@ import { WebSocketSubject, WebSocketSubjectConfig } from './WebSocketSubject';

* 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'.
* on the server or using {@link connectable} on a Observable returned from 'multiplex'.
*

@@ -75,0 +75,0 @@ * Last argument to `multiplex` is a `messageFilter` function which should return a boolean. It is used to filter out messages

import { AnonymousSubject } from '../../Subject';
import { Observable } from '../../Observable';
import { Operator } from '../../Operator';
import { Observer, NextObserver } from '../../types';

@@ -143,3 +142,3 @@ /**

}
export declare type WebSocketMessage = string | ArrayBuffer | Blob | ArrayBufferView;
export type WebSocketMessage = string | ArrayBuffer | Blob | ArrayBufferView;
export declare class WebSocketSubject<T> extends AnonymousSubject<T> {

@@ -149,4 +148,2 @@ private _config;

constructor(urlConfigOrSource: string | WebSocketSubjectConfig<T> | Observable<T>, destination?: Observer<T>);
/** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
lift<R>(operator: Operator<T, R>): WebSocketSubject<R>;
private _resetState;

@@ -153,0 +150,0 @@ /**

import { Observable } from '../Observable';
import { ObservableInput, SchedulerLike, ObservedValueOf } from '../types';
import { ObservableInput, ObservedValueOf } from '../types';
import { Subscriber } from '../Subscriber';
/**
* Creates an Observable from an Array, an array-like object, a Promise, an iterable object, or an Observable-like object.
*
* <span class="informal">Converts almost anything to an Observable.</span>
*
* ![](from.png)
*
* `from` converts various other objects and data types into Observables. It also converts a Promise, an array-like, or an
* <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#iterable" target="_blank">iterable</a>
* object into an Observable that emits the items in that promise, array, or iterable. A String, in this context, is treated
* as an array of characters. Observable-like objects (contains a function named with the ES2015 Symbol for Observable) can also be
* converted through this operator.
*
* ## Examples
*
* Converts an array to an Observable
*
* ```ts
* import { from } from 'rxjs';
*
* const array = [10, 20, 30];
* const result = from(array);
*
* result.subscribe(x => console.log(x));
*
* // Logs:
* // 10
* // 20
* // 30
* ```
*
* Convert an infinite iterable (from a generator) to an Observable
*
* ```ts
* import { from, take } from 'rxjs';
*
* function* generateDoubles(seed) {
* let i = seed;
* while (true) {
* yield i;
* i = 2 * i; // double it
* }
* }
*
* const iterator = generateDoubles(3);
* const result = from(iterator).pipe(take(10));
*
* result.subscribe(x => console.log(x));
*
* // Logs:
* // 3
* // 6
* // 12
* // 24
* // 48
* // 96
* // 192
* // 384
* // 768
* // 1536
* ```
*
* @see {@link fromEvent}
* @see {@link fromEventPattern}
* @see {@link scheduled}
*
* @param input A subscription object, a Promise, an Observable-like,
* an Array, an iterable, async iterable, or an array-like object to be converted.
*/
export declare function from<O extends ObservableInput<any>>(input: O): Observable<ObservedValueOf<O>>;
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled`. Details: https://rxjs.dev/deprecations/scheduler-argument */
export declare function from<O extends ObservableInput<any>>(input: O, scheduler: SchedulerLike | undefined): Observable<ObservedValueOf<O>>;
/**
* Synchronously emits the values of an array like and completes.
* This is exported because there are creation functions and operators that need to
* make direct use of the same logic, and there's no reason to make them run through
* `from` conditionals because we *know* they're dealing with an array.
* @param array The array to emit values from
*/
export declare function fromArrayLike<T>(array: ArrayLike<T>): Observable<T>;
/**
* Subscribes to an ArrayLike with a subscriber
* @param array The array or array-like to subscribe to
* @param subscriber
*/
export declare function subscribeToArray<T>(array: ArrayLike<T>, subscriber: Subscriber<T>): void;
//# sourceMappingURL=from.d.ts.map

@@ -6,3 +6,3 @@ import { Observable } from '../Observable';

}
export declare type NodeEventHandler = (...args: any[]) => void;
export type NodeEventHandler = (...args: any[]) => void;
export interface NodeCompatibleEventEmitter {

@@ -9,0 +9,0 @@ addListener(eventName: string, handler: NodeEventHandler): void | {};

import { Observable } from '../Observable';
import { SchedulerLike } from '../types';
declare type ConditionFunc<S> = (state: S) => boolean;
declare type IterateFunc<S> = (state: S) => S;
declare type ResultFunc<S, T> = (state: S) => T;
type ConditionFunc<S> = (state: S) => boolean;
type IterateFunc<S> = (state: S) => S;
type ResultFunc<S, T> = (state: S) => T;
export interface GenerateBaseOptions<S> {

@@ -124,3 +124,3 @@ /**

* by the Observable. For example, to ensure that each value is pushed to the Observer
* on a separate task in the event loop, you could use the `async` scheduler. Note that
* on a separate task in the event loop, you could use the `asyncScheduler` scheduler. Note that
* by default (when no scheduler is passed) values are simply emitted synchronously.

@@ -127,0 +127,0 @@ *

@@ -15,3 +15,3 @@ import { Observable } from '../Observable';

* only after the first period has passed. By default, this operator uses the
* `async` {@link SchedulerLike} to provide a notion of time, but you may pass any
* `asyncScheduler` {@link SchedulerLike} to provide a notion of time, but you may pass any
* {@link SchedulerLike} to it.

@@ -44,3 +44,3 @@ *

* or the time unit determined by the scheduler's clock.
* @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for scheduling
* @param {SchedulerLike} [scheduler=asyncScheduler] The {@link SchedulerLike} to use for scheduling
* the emission of values, and providing a notion of "time".

@@ -47,0 +47,0 @@ * @return {Observable} An Observable that emits a sequential number each time

import { Observable } from '../Observable';
import { SchedulerLike } from '../types';
/**

@@ -96,21 +95,2 @@ * Creates an observable that will create an error instance and push it to the consumer as an error

export declare function throwError(errorFactory: () => any): Observable<never>;
/**
* Returns an observable that will error with the specified error immediately upon subscription.
*
* @param error The error instance to emit
* @deprecated Support for passing an error value will be removed in v8. Instead, pass a factory function to `throwError(() => new Error('test'))`. This is
* because it will create the error at the moment it should be created and capture a more appropriate stack trace. If
* for some reason you need to create the error ahead of time, you can still do that: `const err = new Error('test'); throwError(() => err);`.
*/
export declare function throwError(error: any): Observable<never>;
/**
* Notifies the consumer of an error using a given scheduler by scheduling it at delay `0` upon subscription.
*
* @param errorOrErrorFactory An error instance or error factory
* @param scheduler A scheduler to use to schedule the error notification
* @deprecated The `scheduler` parameter will be removed in v8.
* Use `throwError` in combination with {@link observeOn}: `throwError(() => new Error('test')).pipe(observeOn(scheduler));`.
* Details: https://rxjs.dev/deprecations/scheduler-argument
*/
export declare function throwError(errorOrErrorFactory: any, scheduler: SchedulerLike): Observable<never>;
//# sourceMappingURL=throwError.d.ts.map

@@ -83,3 +83,3 @@ import { Observable } from '../Observable';

* Creates an observable that starts an interval after a specified delay, emitting incrementing numbers -- starting at `0` --
* on each interval after words.
* on each interval afterwards.
*

@@ -86,0 +86,0 @@ * The `delay` and `intervalDuration` are specified by default in milliseconds, however providing a custom scheduler could

@@ -44,3 +44,3 @@ import { MonoTypeOperatorFunction, SchedulerLike } from '../types';

* by the optional `scheduler`.
* @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for
* @param {SchedulerLike} [scheduler=asyncScheduler] The {@link SchedulerLike} to use for
* managing the timers that handle the rate-limiting behavior.

@@ -47,0 +47,0 @@ * @return A function that returns an Observable that performs rate-limiting of

@@ -1,2 +0,2 @@

import { ObservableInputTuple, OperatorFunction, Cons } from '../types';
import { Cons, ObservableInputTuple, OperatorFunction } from '../types';
/**

@@ -3,0 +3,0 @@ * Create an observable that combines the latest values from all passed observables and the source

import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';
/**
* Projects each source value to an Observable which is merged in the output
* Observable, in a serialized fashion waiting for each one to complete before
* merging the next.
*
* <span class="informal">Maps each value to an Observable, then flattens all of
* these inner Observables using {@link concatAll}.</span>
*
* ![](concatMap.png)
*
* Returns an Observable that emits items based on applying a function that you
* supply to each item emitted by the source Observable, where that function
* returns an (so-called "inner") Observable. Each new inner Observable is
* concatenated with the previous inner Observable.
*
* __Warning:__ if source values arrive endlessly and faster than their
* corresponding inner Observables can complete, it will result in memory issues
* as inner Observables amass in an unbounded buffer waiting for their turn to
* be subscribed to.
*
* Note: `concatMap` is equivalent to `mergeMap` with concurrency parameter set
* to `1`.
*
* ## Example
*
* For each click event, tick every second from 0 to 3, with no concurrency
*
* ```ts
* import { fromEvent, concatMap, interval, take } from 'rxjs';
*
* const clicks = fromEvent(document, 'click');
* const result = clicks.pipe(
* concatMap(ev => interval(1000).pipe(take(4)))
* );
* result.subscribe(x => console.log(x));
*
* // Results in the following:
* // (results are not concurrent)
* // For every click on the "document" it will emit values 0 to 3 spaced
* // on a 1000ms interval
* // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3
* ```
*
* @see {@link concat}
* @see {@link concatAll}
* @see {@link concatMapTo}
* @see {@link exhaustMap}
* @see {@link mergeMap}
* @see {@link switchMap}
*
* @param {function(value: T, ?index: number): ObservableInput} project A function
* that, when applied to an item emitted by the source Observable, returns an
* Observable.
* @return A function that returns an Observable that emits the result of
* applying the projection function to each item emitted by the source Observable
* and taking values from each projected inner Observable sequentially.
*/
export declare function concatMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export declare function concatMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O, resultSelector: undefined): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export declare function concatMap<T, R, O extends ObservableInput<any>>(project: (value: T, index: number) => O, resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R): OperatorFunction<T, R>;
//# sourceMappingURL=concatMap.d.ts.map
import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';
/** @deprecated Will be removed in v9. Use {@link concatMap} instead: `concatMap(() => result)` */
export declare function concatMapTo<O extends ObservableInput<unknown>>(observable: O): OperatorFunction<unknown, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export declare function concatMapTo<O extends ObservableInput<unknown>>(observable: O, resultSelector: undefined): OperatorFunction<unknown, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export declare function concatMapTo<T, R, O extends ObservableInput<unknown>>(observable: O, resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R): OperatorFunction<T, R>;
/**
* Projects each source value to the same Observable which is merged multiple
* times in a serialized fashion on the output Observable.
*
* <span class="informal">It's like {@link concatMap}, but maps each value
* always to the same inner Observable.</span>
*
* ![](concatMapTo.png)
*
* Maps each source value to the given Observable `innerObservable` regardless
* of the source value, and then flattens those resulting Observables into one
* single Observable, which is the output Observable. Each new `innerObservable`
* instance emitted on the output Observable is concatenated with the previous
* `innerObservable` instance.
*
* __Warning:__ if source values arrive endlessly and faster than their
* corresponding inner Observables can complete, it will result in memory issues
* as inner Observables amass in an unbounded buffer waiting for their turn to
* be subscribed to.
*
* Note: `concatMapTo` is equivalent to `mergeMapTo` with concurrency parameter
* set to `1`.
*
* ## Example
*
* For each click event, tick every second from 0 to 3, with no concurrency
*
* ```ts
* import { fromEvent, concatMapTo, interval, take } from 'rxjs';
*
* const clicks = fromEvent(document, 'click');
* const result = clicks.pipe(
* concatMapTo(interval(1000).pipe(take(4)))
* );
* result.subscribe(x => console.log(x));
*
* // Results in the following:
* // (results are not concurrent)
* // For every click on the "document" it will emit values 0 to 3 spaced
* // on a 1000ms interval
* // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3
* ```
*
* @see {@link concat}
* @see {@link concatAll}
* @see {@link concatMap}
* @see {@link mergeMapTo}
* @see {@link switchMapTo}
*
* @param {ObservableInput} innerObservable An Observable to replace each value from
* the source Observable.
* @return A function that returns an Observable of values merged together by
* joining the passed Observable with itself, one after the other, for each
* value emitted from the source.
* @deprecated Will be removed in v9. Use {@link concatMap} instead: `concatMap(() => result)`
*/
export declare function concatMapTo<O extends ObservableInput<unknown>>(innerObservable: O): OperatorFunction<unknown, ObservedValueOf<O>>;
//# sourceMappingURL=concatMapTo.d.ts.map

@@ -53,3 +53,3 @@ import { MonoTypeOperatorFunction, SchedulerLike } from '../types';

* source value.
* @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for
* @param {SchedulerLike} [scheduler=asyncScheduler] The {@link SchedulerLike} to use for
* managing the timers that handle the timeout for each value.

@@ -56,0 +56,0 @@ * @return A function that returns an Observable that delays the emissions of

@@ -28,3 +28,3 @@ import { OperatorFunction } from '../types';

*
* @see {@link empty}
* @see {@link EMPTY}
* @see {@link last}

@@ -31,0 +31,0 @@ *

@@ -53,3 +53,3 @@ import { MonoTypeOperatorFunction, SchedulerLike } from '../types';

* a `Date` until which the emission of the source items is delayed.
* @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for
* @param {SchedulerLike} [scheduler=asyncScheduler] The {@link SchedulerLike} to use for
* managing the timers that handle the time-shift for each item.

@@ -56,0 +56,0 @@ * @return A function that returns an Observable that delays the emissions of

@@ -1,7 +0,50 @@

import { MonoTypeOperatorFunction, SchedulerLike, OperatorFunction, ValueFromArray } from '../types';
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `concatAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */
export declare function endWith<T>(scheduler: SchedulerLike): MonoTypeOperatorFunction<T>;
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `concatAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */
export declare function endWith<T, A extends unknown[] = T[]>(...valuesAndScheduler: [...A, SchedulerLike]): OperatorFunction<T, T | ValueFromArray<A>>;
export declare function endWith<T, A extends unknown[] = T[]>(...values: A): OperatorFunction<T, T | ValueFromArray<A>>;
import { OperatorFunction, ValueFromArray } from '../types';
/**
* Returns an observable that will emit all values from the source, then synchronously emit
* the provided value(s) immediately after the source completes.
*
* This is useful for knowing when an observable ends. Particularly when paired with an
* operator like {@link takeUntil}
*
* ![](endWith.png)
*
* ## Example
*
* Emit values to know when an interval starts and stops. The interval will
* stop when a user clicks anywhere on the document.
*
* ```ts
* import { interval, map, fromEvent, startWith, takeUntil, endWith } from 'rxjs';
*
* const ticker$ = interval(5000).pipe(
* map(() => 'tick')
* );
*
* const documentClicks$ = fromEvent(document, 'click');
*
* ticker$.pipe(
* startWith('interval started'),
* takeUntil(documentClicks$),
* endWith('interval ended by click')
* )
* .subscribe(x => console.log(x));
*
* // Result (assuming a user clicks after 15 seconds)
* // 'interval started'
* // 'tick'
* // 'tick'
* // 'tick'
* // 'interval ended by click'
* ```
*
* @see {@link startWith}
* @see {@link concat}
* @see {@link takeUntil}
*
* @param values Items you want the modified Observable to emit last.
* @return A function that returns an Observable that emits all values from the
* source, then synchronously emits the provided value(s) immediately after the
* source completes.
*/
export declare function endWith<T, A extends readonly unknown[] = T[]>(...values: A): OperatorFunction<T, T | ValueFromArray<A>>;
//# sourceMappingURL=endWith.d.ts.map

@@ -9,3 +9,3 @@ import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types';

*
* ![](exhaust.png)
* ![](exhaustAll.svg)
*

@@ -12,0 +12,0 @@ * `exhaustAll` subscribes to an Observable that emits Observables, also known as a

import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';
/**
* Projects each source value to an Observable which is merged in the output
* Observable only if the previous projected Observable has completed.
*
* <span class="informal">Maps each value to an Observable, then flattens all of
* these inner Observables using {@link exhaustAll}.</span>
*
* ![](exhaustMap.png)
*
* Returns an Observable that emits items based on applying a function that you
* supply to each item emitted by the source Observable, where that function
* returns an (so-called "inner") Observable. When it projects a source value to
* an Observable, the output Observable begins emitting the items emitted by
* that projected Observable. However, `exhaustMap` ignores every new projected
* Observable if the previous projected Observable has not yet completed. Once
* that one completes, it will accept and flatten the next projected Observable
* and repeat this process.
*
* ## Example
*
* Run a finite timer for each click, only if there is no currently active timer
*
* ```ts
* import { fromEvent, exhaustMap, interval, take } from 'rxjs';
*
* const clicks = fromEvent(document, 'click');
* const result = clicks.pipe(
* exhaustMap(() => interval(1000).pipe(take(5)))
* );
* result.subscribe(x => console.log(x));
* ```
*
* @see {@link concatMap}
* @see {@link exhaustAll}
* @see {@link mergeMap}
* @see {@link switchMap}
*
* @param {function(value: T, ?index: number): ObservableInput} project A function
* that, when applied to an item emitted by the source Observable, returns an
* Observable.
* @return A function that returns an Observable containing projected
* Observables of each item of the source, ignoring projected Observables that
* start before their preceding Observable has completed.
*/
export declare function exhaustMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export declare function exhaustMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O, resultSelector: undefined): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export declare function exhaustMap<T, I, R>(project: (value: T, index: number) => ObservableInput<I>, resultSelector: (outerValue: T, innerValue: I, outerIndex: number, innerIndex: number) => R): OperatorFunction<T, R>;
//# sourceMappingURL=exhaustMap.d.ts.map

@@ -5,9 +5,5 @@ import { Observable } from '../Observable';

export declare function find<T>(predicate: BooleanConstructor): OperatorFunction<T, TruthyTypesOf<T>>;
/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */
export declare function find<T, S extends T, A>(predicate: (this: A, value: T, index: number, source: Observable<T>) => value is S, thisArg: A): OperatorFunction<T, S | undefined>;
export declare function find<T, S extends T>(predicate: (value: T, index: number, source: Observable<T>) => value is S): OperatorFunction<T, S | undefined>;
/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */
export declare function find<T, A>(predicate: (this: A, value: T, index: number, source: Observable<T>) => boolean, thisArg: A): OperatorFunction<T, T | undefined>;
export declare function find<T>(predicate: (value: T, index: number, source: Observable<T>) => boolean): OperatorFunction<T, T | undefined>;
export declare function createFind<T>(predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg: any, emit: 'value' | 'index'): (source: Observable<T>, subscriber: Subscriber<any>) => void;
export declare function createFind<T>(predicate: (value: T, index: number, source: Observable<T>) => boolean, emit: 'value' | 'index'): (source: Observable<T>, subscriber: Subscriber<any>) => void;
//# sourceMappingURL=find.d.ts.map
import { Observable } from '../Observable';
import { Falsy, OperatorFunction } from '../types';
export declare function findIndex<T>(predicate: BooleanConstructor): OperatorFunction<T, T extends Falsy ? -1 : number>;
/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */
export declare function findIndex<T>(predicate: BooleanConstructor, thisArg: any): OperatorFunction<T, T extends Falsy ? -1 : number>;
/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */
export declare function findIndex<T, A>(predicate: (this: A, value: T, index: number, source: Observable<T>) => boolean, thisArg: A): OperatorFunction<T, number>;
export declare function findIndex<T>(predicate: (value: T, index: number, source: Observable<T>) => boolean): OperatorFunction<T, number>;
//# sourceMappingURL=findIndex.d.ts.map
import { OperatorFunction } from '../types';
/**
* Applies a given `project` function to each value emitted by the source
* Observable, and emits the resulting values as an Observable.
*
* <span class="informal">Like [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map),
* it passes each source value through a transformation function to get
* corresponding output values.</span>
*
* ![](map.png)
*
* Similar to the well known `Array.prototype.map` function, this operator
* applies a projection to each value and emits that projection in the output
* Observable.
*
* ## Example
*
* Map every click to the `clientX` position of that click
*
* ```ts
* import { fromEvent, map } from 'rxjs';
*
* const clicks = fromEvent<PointerEvent>(document, 'click');
* const positions = clicks.pipe(map(ev => ev.clientX));
*
* positions.subscribe(x => console.log(x));
* ```
*
* @see {@link mapTo}
*
* @param {function(value: T, index: number): R} project The function to apply
* to each `value` emitted by the source Observable. The `index` parameter is
* the number `i` for the i-th emission that has happened since the
* subscription, starting from the number `0`.
* @return A function that returns an Observable that emits the values from the
* source Observable transformed by the given `project` function.
*/
export declare function map<T, R>(project: (value: T, index: number) => R): OperatorFunction<T, R>;
/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */
export declare function map<T, R, A>(project: (this: A, value: T, index: number) => R, thisArg: A): OperatorFunction<T, R>;
//# sourceMappingURL=map.d.ts.map
import { OperatorFunction, ObservableNotification } from '../types';
/**
* Represents all of the notifications from the source Observable as `next`
* emissions marked with their original types within {@link Notification}
* emissions marked with their original types within {@link ObservableNotification}
* objects.
*
* <span class="informal">Wraps `next`, `error` and `complete` emissions in
* {@link Notification} objects, emitted as `next` on the output Observable.
* {@link ObservableNotification} objects, emitted as `next` on the output Observable.
* </span>

@@ -43,7 +43,7 @@ *

*
* @see {@link Notification}
* @see {@link ObservableNotification}
* @see {@link dematerialize}
*
* @return A function that returns an Observable that emits
* {@link Notification} objects that wrap the original emissions from the
* {@link ObservableNotification} objects that wrap the original emissions from the
* source Observable with metadata.

@@ -50,0 +50,0 @@ */

import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';
/**
* Projects each source value to an Observable which is merged in the output
* Observable.
*
* <span class="informal">Maps each value to an Observable, then flattens all of
* these inner Observables using {@link mergeAll}.</span>
*
* ![](mergeMap.png)
*
* Returns an Observable that emits items based on applying a function that you
* supply to each item emitted by the source Observable, where that function
* returns an Observable, and then merging those resulting Observables and
* emitting the results of this merger.
*
* ## Example
*
* Map and flatten each letter to an Observable ticking every 1 second
*
* ```ts
* import { of, mergeMap, interval, map } from 'rxjs';
*
* const letters = of('a', 'b', 'c');
* const result = letters.pipe(
* mergeMap(x => interval(1000).pipe(map(i => x + i)))
* );
*
* result.subscribe(x => console.log(x));
*
* // Results in the following:
* // a0
* // b0
* // c0
* // a1
* // b1
* // c1
* // continues to list a, b, c every second with respective ascending integers
* ```
*
* @see {@link concatMap}
* @see {@link exhaustMap}
* @see {@link merge}
* @see {@link mergeAll}
* @see {@link mergeMapTo}
* @see {@link mergeScan}
* @see {@link switchMap}
*
* @param {function(value: T, ?index: number): ObservableInput} project A function
* that, when applied to an item emitted by the source Observable, returns an
* Observable.
* @param {number} [concurrent=Infinity] Maximum number of input
* Observables being subscribed to concurrently.
* @return A function that returns an Observable that emits the result of
* applying the projection function to each item emitted by the source Observable
* and merging the results of the Observables obtained from this transformation.
*/
export declare function mergeMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O, concurrent?: number): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export declare function mergeMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O, resultSelector: undefined, concurrent?: number): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export declare function mergeMap<T, R, O extends ObservableInput<any>>(project: (value: T, index: number) => O, resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R, concurrent?: number): OperatorFunction<T, R>;
//# sourceMappingURL=mergeMap.d.ts.map
import { OperatorFunction, ObservedValueOf, ObservableInput } from '../types';
/** @deprecated Will be removed in v9. Use {@link mergeMap} instead: `mergeMap(() => result)` */
export declare function mergeMapTo<O extends ObservableInput<unknown>>(innerObservable: O, concurrent?: number): OperatorFunction<unknown, ObservedValueOf<O>>;
/**
* @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead.
* Details: https://rxjs.dev/deprecations/resultSelector
* Projects each source value to the same Observable which is merged multiple
* times in the output Observable.
*
* <span class="informal">It's like {@link mergeMap}, but maps each value always
* to the same inner Observable.</span>
*
* ![](mergeMapTo.png)
*
* Maps each source value to the given Observable `innerObservable` regardless
* of the source value, and then merges those resulting Observables into one
* single Observable, which is the output Observable.
*
* ## Example
*
* For each click event, start an interval Observable ticking every 1 second
*
* ```ts
* import { fromEvent, mergeMapTo, interval } from 'rxjs';
*
* const clicks = fromEvent(document, 'click');
* const result = clicks.pipe(mergeMapTo(interval(1000)));
*
* result.subscribe(x => console.log(x));
* ```
*
* @see {@link concatMapTo}
* @see {@link merge}
* @see {@link mergeAll}
* @see {@link mergeMap}
* @see {@link mergeScan}
* @see {@link switchMapTo}
*
* @param {ObservableInput} innerObservable An Observable to replace each value from
* the source Observable.
* @param {number} [concurrent=Infinity] Maximum number of input
* Observables being subscribed to concurrently.
* @return A function that returns an Observable that emits items from the
* given `innerObservable`.
* @deprecated Will be removed in v9. Use {@link mergeMap} instead: `mergeMap(() => result)`
*/
export declare function mergeMapTo<T, R, O extends ObservableInput<unknown>>(innerObservable: O, resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R, concurrent?: number): OperatorFunction<T, R>;
export declare function mergeMapTo<O extends ObservableInput<unknown>>(innerObservable: O, concurrent?: number): OperatorFunction<unknown, ObservedValueOf<O>>;
//# sourceMappingURL=mergeMapTo.d.ts.map

@@ -41,3 +41,3 @@ /** @prettier */

* intervals.pipe(
* observeOn(animationFrameScheduler) // ...but we will observe on animationFrame
* observeOn(animationFrameScheduler) // ...but we will observe on animationFrameScheduler
* ) // scheduler to ensure smooth animation.

@@ -44,0 +44,0 @@ * .subscribe(val => {

import { ObservableInputTuple, OperatorFunction } from '../types';
export declare function onErrorResumeNextWith<T, A extends readonly unknown[]>(sources: [...ObservableInputTuple<A>]): OperatorFunction<T, T | A[number]>;
export declare function onErrorResumeNextWith<T, A extends readonly unknown[]>(...sources: [...ObservableInputTuple<A>]): OperatorFunction<T, T | A[number]>;
/**
* @deprecated Renamed. Use {@link onErrorResumeNextWith} instead. Will be removed in v8.
*/
export declare const onErrorResumeNext: typeof onErrorResumeNextWith;
//# sourceMappingURL=onErrorResumeNextWith.d.ts.map

@@ -39,3 +39,3 @@ import { MonoTypeOperatorFunction, SchedulerLike } from '../types';

* time unit determined internally by the optional `scheduler`.
* @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for
* @param {SchedulerLike} [scheduler=asyncScheduler] The {@link SchedulerLike} to use for
* managing the timers that handle the sampling.

@@ -42,0 +42,0 @@ * @return A function that returns an Observable that emits the results of

import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';
/**
* Projects each source value to an Observable which is merged in the output
* Observable, emitting values only from the most recently projected Observable.
*
* <span class="informal">Maps each value to an Observable, then flattens all of
* these inner Observables using {@link switchAll}.</span>
*
* ![](switchMap.png)
*
* Returns an Observable that emits items based on applying a function that you
* supply to each item emitted by the source Observable, where that function
* returns an (so-called "inner") Observable. Each time it observes one of these
* inner Observables, the output Observable begins emitting the items emitted by
* that inner Observable. When a new inner Observable is emitted, `switchMap`
* stops emitting items from the earlier-emitted inner Observable and begins
* emitting items from the new one. It continues to behave like this for
* subsequent inner Observables.
*
* ## Example
*
* Generate new Observable according to source Observable values
*
* ```ts
* import { of, switchMap } from 'rxjs';
*
* const switched = of(1, 2, 3).pipe(switchMap(x => of(x, x ** 2, x ** 3)));
* switched.subscribe(x => console.log(x));
* // outputs
* // 1
* // 1
* // 1
* // 2
* // 4
* // 8
* // 3
* // 9
* // 27
* ```
*
* Restart an interval Observable on every click event
*
* ```ts
* import { fromEvent, switchMap, interval } from 'rxjs';
*
* const clicks = fromEvent(document, 'click');
* const result = clicks.pipe(switchMap(() => interval(1000)));
* result.subscribe(x => console.log(x));
* ```
*
* @see {@link concatMap}
* @see {@link exhaustMap}
* @see {@link mergeMap}
* @see {@link switchAll}
* @see {@link switchMapTo}
*
* @param {function(value: T, index: number): ObservableInput} project A function
* that, when applied to an item emitted by the source Observable, returns an
* Observable.
* @return A function that returns an Observable that emits the result of
* applying the projection function to each item emitted by the source Observable
* and taking only the values from the most recently projected inner Observable.
*/
export declare function switchMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export declare function switchMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O, resultSelector: undefined): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export declare function switchMap<T, R, O extends ObservableInput<any>>(project: (value: T, index: number) => O, resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R): OperatorFunction<T, R>;
//# sourceMappingURL=switchMap.d.ts.map
import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';
/** @deprecated Will be removed in v9. Use {@link switchMap} instead: `switchMap(() => result)` */
export declare function switchMapTo<O extends ObservableInput<unknown>>(observable: O): OperatorFunction<unknown, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export declare function switchMapTo<O extends ObservableInput<unknown>>(observable: O, resultSelector: undefined): OperatorFunction<unknown, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export declare function switchMapTo<T, R, O extends ObservableInput<unknown>>(observable: O, resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R): OperatorFunction<T, R>;
/**
* Projects each source value to the same Observable which is flattened multiple
* times with {@link switchMap} in the output Observable.
*
* <span class="informal">It's like {@link switchMap}, but maps each value
* always to the same inner Observable.</span>
*
* ![](switchMapTo.png)
*
* Maps each source value to the given Observable `innerObservable` regardless
* of the source value, and then flattens those resulting Observables into one
* single Observable, which is the output Observable. The output Observables
* emits values only from the most recently emitted instance of
* `innerObservable`.
*
* ## Example
*
* Restart an interval Observable on every click event
*
* ```ts
* import { fromEvent, switchMapTo, interval } from 'rxjs';
*
* const clicks = fromEvent(document, 'click');
* const result = clicks.pipe(switchMapTo(interval(1000)));
* result.subscribe(x => console.log(x));
* ```
*
* @see {@link concatMapTo}
* @see {@link switchAll}
* @see {@link switchMap}
* @see {@link mergeMapTo}
*
* @param {ObservableInput} innerObservable An Observable to replace each value from
* the source Observable.
* @return A function that returns an Observable that emits items from the
* given `innerObservable` every time a value is emitted on the source Observable,
* and taking only the values from the most recently projected inner Observable.
* @deprecated Will be removed in v9. Use {@link switchMap} instead: `switchMap(() => result)`
*/
export declare function switchMapTo<O extends ObservableInput<unknown>>(innerObservable: O): OperatorFunction<unknown, ObservedValueOf<O>>;
//# sourceMappingURL=switchMapTo.d.ts.map
import { MonoTypeOperatorFunction, Observer } from '../types';
/**
* An extension to the {@link Observer} interface used only by the {@link tap} operator.
*
* It provides a useful set of callbacks a user can register to do side-effects in
* cases other than what the usual {@link Observer} callbacks are
* ({@link guide/glossary-and-semantics#next next},
* {@link guide/glossary-and-semantics#error error} and/or
* {@link guide/glossary-and-semantics#complete complete}).
*
* ## Example
*
* ```ts
* import { fromEvent, switchMap, tap, interval, take } from 'rxjs';
*
* const source$ = fromEvent(document, 'click');
* const result$ = source$.pipe(
* switchMap((_, i) => i % 2 === 0
* ? fromEvent(document, 'mousemove').pipe(
* tap({
* subscribe: () => console.log('Subscribed to the mouse move events after click #' + i),
* unsubscribe: () => console.log('Mouse move events #' + i + ' unsubscribed'),
* finalize: () => console.log('Mouse move events #' + i + ' finalized')
* })
* )
* : interval(1_000).pipe(
* take(5),
* tap({
* subscribe: () => console.log('Subscribed to the 1-second interval events after click #' + i),
* unsubscribe: () => console.log('1-second interval events #' + i + ' unsubscribed'),
* finalize: () => console.log('1-second interval events #' + i + ' finalized')
* })
* )
* )
* );
*
* const subscription = result$.subscribe({
* next: console.log
* });
*
* setTimeout(() => {
* console.log('Unsubscribe after 60 seconds');
* subscription.unsubscribe();
* }, 60_000);
* ```
*/
export interface TapObserver<T> extends Observer<T> {
/**
* The callback that `tap` operator invokes at the moment when the source Observable
* gets subscribed to.
*/
subscribe: () => void;
/**
* The callback that `tap` operator invokes when an explicit
* {@link guide/glossary-and-semantics#unsubscription unsubscribe} happens. It won't get invoked on
* `error` or `complete` events.
*/
unsubscribe: () => void;
/**
* The callback that `tap` operator invokes when any kind of
* {@link guide/glossary-and-semantics#finalization finalization} happens - either when
* the source Observable `error`s or `complete`s or when it gets explicitly unsubscribed
* by the user. There is no difference in using this callback or the {@link finalize}
* operator, but if you're already using `tap` operator, you can use this callback
* instead. You'd get the same result in either case.
*/
finalize: () => void;

@@ -84,7 +146,5 @@ }

* @see {@link finalize}
* @see {@link Observable#subscribe}
* @see {@link TapObserver}
*
* @param observerOrNext A next handler or partial observer
* @param error An error handler
* @param complete A completion handler
* @return A function that returns an Observable identical to the source, but

@@ -91,0 +151,0 @@ * runs the specified Observer or callback(s) for each item.

@@ -11,9 +11,11 @@ import { Observable } from '../Observable';

*
* ![](windowWhen.png)
* ![](windowWhen.svg)
*
* Returns an Observable that emits windows of items it collects from the source
* Observable. The output Observable emits connected, non-overlapping windows.
* It emits the current window and opens a new one whenever the Observable
* produced by the specified `closingSelector` function emits an item. The first
* window is opened immediately when subscribing to the output Observable.
* Returns an Observable that emits Observable windows of items it collects from
* the source Observable. The output Observable emits connected, non-overlapping
* windows. It emits the current window immediately when subscribing to the source
* Observable and opens a new one whenever the Observable produced by the specified
* `closingSelector` function emits `next`. When an Observable returned by the
* `closingSelector` emits `next`, the previous window completes and a new window
* is emitted to the output subscriber.
*

@@ -42,5 +44,6 @@ * ## Example

*
* @param {function(): Observable} closingSelector A function that takes no
* arguments and returns an Observable that signals (on either `next` or
* `complete`) when to close the previous window and start a new one.
* @param closingSelector A function that takes no arguments and returns an
* {@link ObservableInput} (that gets converted to Observable) that signals
* when to close the previous window and start a new one. Note that a value (any value) must be
* observed to signal window closure.
* @return A function that returns an Observable of windows, which in turn are

@@ -47,0 +50,0 @@ * Observables.

@@ -8,6 +8,6 @@ import { AnimationFrameScheduler } from './AnimationFrameScheduler';

*
* When `animationFrame` scheduler is used with delay, it will fall back to {@link asyncScheduler} scheduler
* behaviour.
* When `animationFrameScheduler` scheduler is used with delay, it will fall back to {@link asyncScheduler}
* scheduler behaviour.
*
* Without delay, `animationFrame` scheduler can be used to create smooth browser animations.
* Without delay, `animationFrameScheduler` scheduler can be used to create smooth browser animations.
* It makes sure scheduled task will happen just before next browser content repaint,

@@ -35,6 +35,2 @@ * thus performing animations as efficiently as possible.

export declare const animationFrameScheduler: AnimationFrameScheduler;
/**
* @deprecated Renamed to {@link animationFrameScheduler}. Will be removed in v8.
*/
export declare const animationFrame: AnimationFrameScheduler;
//# sourceMappingURL=animationFrame.d.ts.map

@@ -8,7 +8,7 @@ import { AsapScheduler } from './AsapScheduler';

*
* `asap` scheduler behaves the same as {@link asyncScheduler} scheduler when you use it to delay task
* `asapScheduler` scheduler behaves the same as {@link asyncScheduler} scheduler when you use it to delay task
* in time. If however you set delay to `0`, `asap` will wait for current synchronously executing
* code to end and then it will try to execute given task as fast as possible.
*
* `asap` scheduler will do its best to minimize time between end of currently executing code
* `asapScheduler` scheduler will do its best to minimize time between end of currently executing code
* and start of scheduled task. This makes it best candidate for performing so called "deferring".

@@ -18,6 +18,6 @@ * Traditionally this was achieved by calling `setTimeout(deferredTask, 0)`, but that technique involves

*
* Note that using `asap` scheduler does not necessarily mean that your task will be first to process
* after currently executing code. In particular, if some task was also scheduled with `asap` before,
* Note that using `asapScheduler` scheduler does not necessarily mean that your task will be first to process
* after currently executing code. In particular, if some task was also scheduled with `asapScheduler` before,
* that task will execute first. That being said, if you need to schedule task asynchronously, but
* as soon as possible, `asap` scheduler is your best bet.
* as soon as possible, `asapScheduler` scheduler is your best bet.
*

@@ -39,6 +39,2 @@ * ## Example

export declare const asapScheduler: AsapScheduler;
/**
* @deprecated Renamed to {@link asapScheduler}. Will be removed in v8.
*/
export declare const asap: AsapScheduler;
//# sourceMappingURL=asap.d.ts.map

@@ -8,3 +8,3 @@ import { AsyncScheduler } from './AsyncScheduler';

*
* `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript
* `asyncScheduler` scheduler schedules tasks asynchronously, by putting them on the JavaScript
* event loop queue. It is best used to delay tasks in time or to schedule tasks repeating

@@ -50,6 +50,2 @@ * in intervals.

export declare const asyncScheduler: AsyncScheduler;
/**
* @deprecated Renamed to {@link asyncScheduler}. Will be removed in v8.
*/
export declare const async: AsyncScheduler;
//# sourceMappingURL=async.d.ts.map
import type { TimerHandle } from './timerHandle';
declare type SetImmediateFunction = (handler: () => void, ...args: any[]) => TimerHandle;
declare type ClearImmediateFunction = (handle: TimerHandle) => void;
type SetImmediateFunction = (handler: () => void, ...args: any[]) => TimerHandle;
type ClearImmediateFunction = (handle: TimerHandle) => void;
interface ImmediateProvider {

@@ -5,0 +5,0 @@ setImmediate: SetImmediateFunction;

import type { TimerHandle } from './timerHandle';
declare type SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;
declare type ClearIntervalFunction = (handle: TimerHandle) => void;
type SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;
type ClearIntervalFunction = (handle: TimerHandle) => void;
interface IntervalProvider {

@@ -5,0 +5,0 @@ setInterval: SetIntervalFunction;

@@ -8,3 +8,3 @@ import { QueueScheduler } from './QueueScheduler';

*
* `queue` scheduler, when used with delay, behaves the same as {@link asyncScheduler} scheduler.
* `queueScheduler` scheduler, when used with delay, behaves the same as {@link asyncScheduler} scheduler.
*

@@ -16,3 +16,3 @@ * When used without delay, it schedules given task synchronously - executes it right when

*
* This means that when you execute task with `queue` scheduler, you are sure it will end
* This means that when you execute task with `queueScheduler` scheduler, you are sure it will end
* before any other task scheduled with that scheduler will start.

@@ -67,6 +67,2 @@ *

export declare const queueScheduler: QueueScheduler;
/**
* @deprecated Renamed to {@link queueScheduler}. Will be removed in v8.
*/
export declare const queue: QueueScheduler;
//# sourceMappingURL=queue.d.ts.map
import type { TimerHandle } from './timerHandle';
declare type SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;
declare type ClearTimeoutFunction = (handle: TimerHandle) => void;
type SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;
type ClearTimeoutFunction = (handle: TimerHandle) => void;
interface TimeoutProvider {

@@ -5,0 +5,0 @@ setTimeout: SetTimeoutFunction;

@@ -1,2 +0,2 @@

export declare type TimerHandle = number | ReturnType<typeof setTimeout>;
export type TimerHandle = number | ReturnType<typeof setTimeout>;
//# sourceMappingURL=timerHandle.d.ts.map

@@ -1,2 +0,1 @@

import { Operator } from './Operator';
import { Observable } from './Observable';

@@ -12,9 +11,15 @@ import { Observer, SubscriptionLike } from './types';

export declare class Subject<T> extends Observable<T> implements SubscriptionLike {
closed: boolean;
/**
* Will return true if this subject has been closed and is no longer accepting new values.
*/
get closed(): boolean;
private _observerCounter;
private currentObservers;
/**
* This is used to track a known array of observers, so we don't have to
* clone them while iterating to prevent reentrant behaviors.
* (for example, what if the subject is subscribed to when nexting to an observer)
*/
private observerSnapshot;
/** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
observers: Observer<T>[];
/** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
isStopped: boolean;
/** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
hasError: boolean;

@@ -31,4 +36,3 @@ /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */

constructor();
/** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
lift<R>(operator: Operator<T, R>): Observable<R>;
protected _clearObservers(): void;
next(value: T): void;

@@ -55,3 +59,5 @@ error(err: any): void;

/** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
destination?: Observer<T> | undefined, source?: Observable<T>);
destination?: Observer<T> | undefined,
/** @internal */
_source?: Observable<T> | undefined);
next(value: T): void;

@@ -58,0 +64,0 @@ error(err: any): void;

@@ -14,6 +14,2 @@ import { Observer } from './types';

export declare class Subscriber<T> extends Subscription implements Observer<T> {
/** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
protected isStopped: boolean;
/** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
protected destination: Subscriber<T> | Observer<T>;
/**

@@ -60,11 +56,2 @@ * Creates an instance of an RxJS Subscriber. This is the workhorse of the library.

}
/**
* The observer used as a stub for subscriptions where the user did not
* pass any arguments to `subscribe`. Comes with the default error handling
* behavior.
*/
export declare const EMPTY_OBSERVER: Readonly<Observer<any>> & {
closed: true;
};
export declare function isSubscriber<T>(value: any): value is Subscriber<T>;
//# sourceMappingURL=Subscriber.d.ts.map

@@ -22,3 +22,2 @@ import { SubscriptionLike, TeardownLogic } from './types';

closed: boolean;
private _parentage;
/**

@@ -61,21 +60,2 @@ * The list of registered finalizers to execute upon unsubscription. Adding and removing from this

/**
* Checks to see if a this subscription already has a particular parent.
* This will signal that this subscription has already been added to the parent in question.
* @param parent the parent to check for
*/
private _hasParent;
/**
* Adds a parent to this subscription so it can be removed from the parent if it
* unsubscribes on it's own.
*
* NOTE: THIS ASSUMES THAT {@link _hasParent} HAS ALREADY BEEN CHECKED.
* @param parent The parent subscription to add
*/
private _addParent;
/**
* Called on a child when it is removed via {@link #remove}.
* @param parent The parent to remove
*/
private _removeParent;
/**
* Removes a finalizer from this subscription that was previously added with the {@link #add} method.

@@ -92,2 +72,7 @@ *

*
* TIP: In instances you're adding and removing _Subscriptions from other Subscriptions_, you should
* be sure to unsubscribe or otherwise get rid of the child subscription reference as soon as you remove it.
* The child subscription has a reference to the parent it was added to via closure. In most cases, this
* a non-issue, as child subscriptions are rarely long-lived.
*
* @param teardown The finalizer to remove from this subscription

@@ -97,4 +82,2 @@ */

}
export declare const EMPTY_SUBSCRIPTION: Subscription;
export declare function isSubscription(value: any): value is Subscription;
//# sourceMappingURL=Subscription.d.ts.map

@@ -16,4 +16,4 @@ import { Observable } from '../Observable';

}
export declare type observableToBeFn = (marbles: string, values?: any, errorValue?: any) => void;
export declare type subscriptionLogsToBeFn = (marbles: string | string[]) => void;
export type observableToBeFn = (marbles: string, values?: any, errorValue?: any) => void;
export type subscriptionLogsToBeFn = (marbles: string | string[]) => void;
export declare class TestScheduler extends VirtualTimeScheduler {

@@ -20,0 +20,0 @@ assertDeepEqual: (actual: any, expected: any) => boolean | void;

@@ -13,3 +13,9 @@ /// <reference lib="esnext.asynciterable" />

}
/** OPERATOR INTERFACES */
/**
* A function type interface that describes a function that accepts one parameter `T`
* and returns another parameter `R`.
*
* Usually used to describe {@link OperatorFunction} - it always takes a single
* parameter (the source Observable) and returns another Observable.
*/
export interface UnaryFunction<T, R> {

@@ -20,3 +26,3 @@ (source: T): R;

}
export declare type FactoryOrValue<T> = T | (() => T);
export type FactoryOrValue<T> = T | (() => T);
export interface MonoTypeOperatorFunction<T> extends OperatorFunction<T, T> {

@@ -55,7 +61,6 @@ }

}
/** SUBSCRIPTION INTERFACES */
export interface Unsubscribable {
unsubscribe(): void;
}
export declare type TeardownLogic = Subscription | Unsubscribable | (() => void) | void;
export type TeardownLogic = Subscription | Unsubscribable | (() => void) | void;
export interface SubscriptionLike extends Unsubscribable {

@@ -65,3 +70,2 @@ unsubscribe(): void;

}
/** OBSERVABLE INTERFACES */
export interface Subscribable<T> {

@@ -73,8 +77,4 @@ subscribe(observer: Partial<Observer<T>>): Unsubscribable;

*/
export declare type ObservableInput<T> = Observable<T> | InteropObservable<T> | AsyncIterable<T> | PromiseLike<T> | ArrayLike<T> | Iterable<T> | ReadableStreamLike<T>;
export type ObservableInput<T> = Observable<T> | InteropObservable<T> | AsyncIterable<T> | PromiseLike<T> | ArrayLike<T> | Iterable<T> | ReadableStreamLike<T>;
/**
* @deprecated Renamed to {@link InteropObservable }. Will be removed in v8.
*/
export declare type ObservableLike<T> = InteropObservable<T>;
/**
* An object that implements the `Symbol.observable` interface.

@@ -85,3 +85,2 @@ */

}
/** NOTIFICATIONS */
/**

@@ -116,4 +115,3 @@ * A notification representing a "next" from an observable.

*/
export declare type ObservableNotification<T> = NextNotification<T> | ErrorNotification | CompleteNotification;
/** OBSERVER INTERFACES */
export type ObservableNotification<T> = NextNotification<T> | ErrorNotification | CompleteNotification;
export interface NextObserver<T> {

@@ -137,6 +135,38 @@ closed?: boolean;

}
export declare type PartialObserver<T> = NextObserver<T> | ErrorObserver<T> | CompletionObserver<T>;
export type PartialObserver<T> = NextObserver<T> | ErrorObserver<T> | CompletionObserver<T>;
/**
* An object interface that defines a set of callback functions a user can use to get
* notified of any set of {@link Observable}
* {@link guide/glossary-and-semantics#notification notification} events.
*
* For more info, please refer to {@link guide/observer this guide}.
*/
export interface Observer<T> {
/**
* A callback function that gets called by the producer during the subscription when
* the producer "has" the `value`. It won't be called if `error` or `complete` callback
* functions have been called, nor after the consumer has unsubscribed.
*
* For more info, please refer to {@link guide/glossary-and-semantics#next this guide}.
*/
next: (value: T) => void;
/**
* A callback function that gets called by the producer if and when it encountered a
* problem of any kind. The errored value will be provided through the `err` parameter.
* This callback can't be called more than one time, it can't be called if the
* `complete` callback function have been called previously, nor it can't be called if
* the consumer has unsubscribed.
*
* For more info, please refer to {@link guide/glossary-and-semantics#error this guide}.
*/
error: (err: any) => void;
/**
* A callback function that gets called by the producer if and when it has no more
* values to provide (by calling `next` callback function). This means that no error
* has happened. This callback can't be called more than one time, it can't be called
* if the `error` callback function have been called previously, nor it can't be called
* if the consumer has unsubscribed.
*
* For more info, please refer to {@link guide/glossary-and-semantics#complete this guide}.
*/
complete: () => void;

@@ -146,3 +176,2 @@ }

}
/** SCHEDULER INTERFACES */
export interface SchedulerLike extends TimestampProvider {

@@ -173,3 +202,3 @@ schedule<T>(work: (this: SchedulerAction<T>, state: T) => void, delay: number, state: T): Subscription;

*/
export declare type ObservedValueOf<O> = O extends ObservableInput<infer T> ? T : never;
export type ObservedValueOf<O> = O extends ObservableInput<infer T> ? T : never;
/**

@@ -183,8 +212,4 @@ * Extracts a union of element types from an `ObservableInput<any>[]`.

*/
export declare type ObservedValueUnionFromArray<X> = X extends Array<ObservableInput<infer T>> ? T : never;
export type ObservedValueUnionFromArray<X> = X extends Array<ObservableInput<infer T>> ? T : never;
/**
* @deprecated Renamed to {@link ObservedValueUnionFromArray}. Will be removed in v8.
*/
export declare type ObservedValuesFromArray<X> = ObservedValueUnionFromArray<X>;
/**
* Extracts a tuple of element types from an `ObservableInput<any>[]`.

@@ -195,3 +220,3 @@ * If you have `O extends ObservableInput<any>[]` and you pass in

*/
export declare type ObservedValueTupleFromArray<X> = {
export type ObservedValueTupleFromArray<X> = {
[K in keyof X]: ObservedValueOf<X[K]>;

@@ -204,3 +229,3 @@ };

*/
export declare type ObservableInputTuple<T> = {
export type ObservableInputTuple<T> = {
[K in keyof T]: ObservableInput<T[K]>;

@@ -212,3 +237,3 @@ };

*/
export declare type Cons<X, Y extends readonly any[]> = ((arg: X, ...rest: Y) => any) extends (...args: infer U) => any ? U : never;
export type Cons<X, Y extends readonly any[]> = ((arg: X, ...rest: Y) => any) extends (...args: infer U) => any ? U : never;
/**

@@ -218,3 +243,3 @@ * Extracts the head of a tuple.

*/
export declare type Head<X extends readonly any[]> = ((...args: X) => any) extends (arg: infer U, ...rest: any[]) => any ? U : never;
export type Head<X extends readonly any[]> = ((...args: X) => any) extends (arg: infer U, ...rest: any[]) => any ? U : never;
/**

@@ -224,3 +249,3 @@ * Extracts the tail of a tuple.

*/
export declare type Tail<X extends readonly any[]> = ((...args: X) => any) extends (arg: any, ...rest: infer U) => any ? U : never;
export type Tail<X extends readonly any[]> = ((...args: X) => any) extends (arg: any, ...rest: infer U) => any ? U : never;
/**

@@ -231,7 +256,7 @@ * Extracts the generic value from an Array type.

*/
export declare type ValueFromArray<A extends readonly unknown[]> = A extends Array<infer T> ? T : never;
export type ValueFromArray<A extends readonly unknown[]> = A extends Array<infer T> ? T : never;
/**
* Gets the value type from an {@link ObservableNotification}, if possible.
*/
export declare type ValueFromNotification<T> = T extends {
export type ValueFromNotification<T> = T extends {
kind: 'N' | 'E' | 'C';

@@ -246,14 +271,4 @@ } ? T extends NextNotification<any> ? T extends {

*/
export declare type Falsy = null | undefined | false | 0 | -0 | 0n | '';
export declare type TruthyTypesOf<T> = T extends Falsy ? never : T;
interface ReadableStreamDefaultReaderLike<T> {
read(): PromiseLike<{
done: false;
value: T;
} | {
done: true;
value?: undefined;
}>;
releaseLock(): void;
}
export type Falsy = null | undefined | false | 0 | -0 | 0n | '';
export type TruthyTypesOf<T> = T extends Falsy ? never : T;
/**

@@ -264,5 +279,3 @@ * The base signature RxJS will look for to identify and use

*/
export interface ReadableStreamLike<T> {
getReader(): ReadableStreamDefaultReaderLike<T>;
}
export type ReadableStreamLike<T> = Pick<ReadableStream<T>, 'getReader'>;
/**

@@ -281,3 +294,2 @@ * An observable with a `connect` method that is used to create a subscription

}
export {};
//# sourceMappingURL=types.d.ts.map

@@ -11,2 +11,9 @@ /**

};
export declare function arrayOrObject<T, O extends Record<string, T>>(first: T | T[] | O): {
args: T[];
keys: null;
} | {
args: T[];
keys: string[];
} | null;
//# sourceMappingURL=argsArgArrayOrObject.d.ts.map

@@ -5,8 +5,2 @@ import { Observable } from '../Observable';

/**
* Used to determine if an object is an Observable with a lift function.
*/
export declare function hasLift(source: any): source is {
lift: InstanceType<typeof Observable>['lift'];
};
/**
* Creates an `OperatorFunction`. Used to define operators throughout the library in a concise way.

@@ -13,0 +7,0 @@ * @param init The logic to connect the liftedSource to the subscriber at the moment of subscription.

@@ -9,7 +9,4 @@ export { audit } from '../internal/operators/audit';

export { catchError } from '../internal/operators/catchError';
export { combineAll } from '../internal/operators/combineAll';
export { combineLatestAll } from '../internal/operators/combineLatestAll';
export { combineLatest } from '../internal/operators/combineLatest';
export { combineLatestWith } from '../internal/operators/combineLatestWith';
export { concat } from '../internal/operators/concat';
export { concatAll } from '../internal/operators/concatAll';

@@ -33,3 +30,2 @@ export { concatMap } from '../internal/operators/concatMap';

export { every } from '../internal/operators/every';
export { exhaust } from '../internal/operators/exhaust';
export { exhaustAll } from '../internal/operators/exhaustAll';

@@ -51,5 +47,3 @@ export { exhaustMap } from '../internal/operators/exhaustMap';

export { max } from '../internal/operators/max';
export { merge } from '../internal/operators/merge';
export { mergeAll } from '../internal/operators/mergeAll';
export { flatMap } from '../internal/operators/flatMap';
export { mergeMap } from '../internal/operators/mergeMap';

@@ -60,13 +54,6 @@ export { mergeMapTo } from '../internal/operators/mergeMapTo';

export { min } from '../internal/operators/min';
export { multicast } from '../internal/operators/multicast';
export { observeOn } from '../internal/operators/observeOn';
export { onErrorResumeNext } from '../internal/operators/onErrorResumeNextWith';
export { onErrorResumeNextWith } from '../internal/operators/onErrorResumeNextWith';
export { pairwise } from '../internal/operators/pairwise';
export { partition } from '../internal/operators/partition';
export { pluck } from '../internal/operators/pluck';
export { publish } from '../internal/operators/publish';
export { publishBehavior } from '../internal/operators/publishBehavior';
export { publishLast } from '../internal/operators/publishLast';
export { publishReplay } from '../internal/operators/publishReplay';
export { race } from '../internal/operators/race';
export { raceWith } from '../internal/operators/raceWith';

@@ -78,3 +65,2 @@ export { reduce } from '../internal/operators/reduce';

export { retryWhen } from '../internal/operators/retryWhen';
export { refCount } from '../internal/operators/refCount';
export { sample } from '../internal/operators/sample';

@@ -101,3 +87,3 @@ export { sampleTime } from '../internal/operators/sampleTime';

export { takeWhile } from '../internal/operators/takeWhile';
export { tap } from '../internal/operators/tap';
export { tap, TapObserver } from '../internal/operators/tap';
export { throttle, ThrottleConfig } from '../internal/operators/throttle';

@@ -117,5 +103,4 @@ export { throttleTime } from '../internal/operators/throttleTime';

export { withLatestFrom } from '../internal/operators/withLatestFrom';
export { zip } from '../internal/operators/zip';
export { zipAll } from '../internal/operators/zipAll';
export { zipWith } from '../internal/operators/zipWith';
//# sourceMappingURL=index.d.ts.map
{
"name": "rxjs",
"version": "8.0.0-alpha.7",
"version": "8.0.0-alpha.8",
"description": "Reactive Extensions for modern JavaScript",

@@ -164,7 +164,7 @@ "main": "./dist/cjs/index.js",

"@types/lodash": "4.14.102",
"@types/mocha": "^7.0.2",
"@types/mocha": "^10.0.1",
"@types/node": "^14.14.6",
"@types/shelljs": "^0.8.8",
"@types/sinon": "4.1.3",
"@types/sinon-chai": "2.7.29",
"@types/sinon": "^10.0.13",
"@types/sinon-chai": "^3.2.9",
"@types/source-map": "^0.5.2",

@@ -174,3 +174,3 @@ "@typescript-eslint/eslint-plugin": "^4.29.1",

"babel-polyfill": "6.26.0",
"chai": "^4.2.0",
"chai": "^4.3.7",
"check-side-effects": "0.0.23",

@@ -194,3 +194,3 @@ "color": "3.0.0",

"minimist": "^1.2.5",
"mocha": "^8.1.3",
"mocha": "^10.2.0",
"nodemon": "^1.9.2",

@@ -208,7 +208,7 @@ "npm-run-all": "4.1.2",

"shx": "^0.3.2",
"sinon": "4.3.0",
"sinon-chai": "2.14.0",
"sinon": "^15.0.1",
"sinon-chai": "^3.7.0",
"source-map-support": "0.5.3",
"systemjs": "^0.21.0",
"ts-node": "^9.1.1",
"ts-node": "^10.9.1",
"tslint": "^5.20.1",

@@ -219,3 +219,3 @@ "tslint-config-prettier": "^1.18.0",

"tslint-no-unused-expression-chai": "0.0.3",
"typescript": "~4.2.0",
"typescript": "~4.9.4",
"validate-commit-msg": "2.14.0",

@@ -222,0 +222,0 @@ "web-streams-polyfill": "^3.0.2",

@@ -7,10 +7,6 @@ # <img src="docs_app/src/assets/images/logos/Rx_Logo_S.png" alt="RxJS Logo" width="86" height="86"> RxJS: Reactive Extensions For JavaScript

# The Roadmap from RxJS 7 to 8
# RxJS 8
Curious what's next for RxJS? Follow along with [Issue 6367](https://github.com/ReactiveX/rxjs/issues/6367).
### FOR 7.X PLEASE GO TO [THE 7.x BRANCH](https://github.com/ReactiveX/rxjs/tree/7.x)
# RxJS 7
### FOR 6.X PLEASE GO TO [THE 6.x BRANCH](https://github.com/ReactiveX/rxjs/tree/6.x)
Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.

@@ -27,3 +23,4 @@

- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current work, which is against v7 of RxJS right now
- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current work, which is against v8 of RxJS right now
- [7.x](https://github.com/ReactiveX/rxjs/tree/7.x) - This is the branch for version 7.X
- [6.x](https://github.com/ReactiveX/rxjs/tree/6.x) - This is the branch for version 6.X

@@ -30,0 +27,0 @@

@@ -17,3 +17,2 @@ //////////////////////////////////////////////////////////

export { Observable } from './internal/Observable';
export { ConnectableObservable } from './internal/observable/ConnectableObservable';
export { GroupedObservable } from './internal/operators/groupBy';

@@ -31,6 +30,6 @@ export { Operator } from './internal/Operator';

/* Schedulers */
export { asap, asapScheduler } from './internal/scheduler/asap';
export { async, asyncScheduler } from './internal/scheduler/async';
export { queue, queueScheduler } from './internal/scheduler/queue';
export { animationFrame, animationFrameScheduler } from './internal/scheduler/animationFrame';
export { asapScheduler } from './internal/scheduler/asap';
export { asyncScheduler } from './internal/scheduler/async';
export { queueScheduler } from './internal/scheduler/queue';
export { animationFrameScheduler } from './internal/scheduler/animationFrame';
export { VirtualTimeScheduler, VirtualAction } from './internal/scheduler/VirtualTimeScheduler';

@@ -57,3 +56,2 @@ export { Scheduler } from './internal/Scheduler';

export { NotFoundError } from './internal/util/NotFoundError';
export { ObjectUnsubscribedError } from './internal/util/ObjectUnsubscribedError';
export { SequenceError } from './internal/util/SequenceError';

@@ -80,3 +78,2 @@ export { TimeoutError } from './internal/operators/timeout';

export { onErrorResumeNext } from './internal/observable/onErrorResumeNext';
export { pairs } from './internal/observable/pairs';
export { partition } from './internal/observable/partition';

@@ -110,3 +107,2 @@ export { race } from './internal/observable/race';

export { catchError } from './internal/operators/catchError';
export { combineAll } from './internal/operators/combineAll';
export { combineLatestAll } from './internal/operators/combineLatestAll';

@@ -132,3 +128,2 @@ export { combineLatestWith } from './internal/operators/combineLatestWith';

export { every } from './internal/operators/every';
export { exhaust } from './internal/operators/exhaust';
export { exhaustAll } from './internal/operators/exhaustAll';

@@ -151,3 +146,2 @@ export { exhaustMap } from './internal/operators/exhaustMap';

export { mergeAll } from './internal/operators/mergeAll';
export { flatMap } from './internal/operators/flatMap';
export { mergeMap } from './internal/operators/mergeMap';

@@ -158,11 +152,5 @@ export { mergeMapTo } from './internal/operators/mergeMapTo';

export { min } from './internal/operators/min';
export { multicast } from './internal/operators/multicast';
export { observeOn } from './internal/operators/observeOn';
export { onErrorResumeNextWith } from './internal/operators/onErrorResumeNextWith';
export { pairwise } from './internal/operators/pairwise';
export { pluck } from './internal/operators/pluck';
export { publish } from './internal/operators/publish';
export { publishBehavior } from './internal/operators/publishBehavior';
export { publishLast } from './internal/operators/publishLast';
export { publishReplay } from './internal/operators/publishReplay';
export { raceWith } from './internal/operators/raceWith';

@@ -174,3 +162,2 @@ export { reduce } from './internal/operators/reduce';

export { retryWhen } from './internal/operators/retryWhen';
export { refCount } from './internal/operators/refCount';
export { sample } from './internal/operators/sample';

@@ -197,3 +184,3 @@ export { sampleTime } from './internal/operators/sampleTime';

export { takeWhile } from './internal/operators/takeWhile';
export { tap } from './internal/operators/tap';
export { tap, TapObserver } from './internal/operators/tap';
export { throttle, ThrottleConfig } from './internal/operators/throttle';

@@ -200,0 +187,0 @@ export { throttleTime } from './internal/operators/throttleTime';

@@ -484,14 +484,3 @@ import { map } from '../operators/map';

let response: AjaxResponse<T>;
try {
// This can throw in IE, because we end up needing to do a JSON.parse
// of the response in some cases to produce object we'd expect from
// modern browsers.
response = createResponse(DOWNLOAD, event);
} catch (err) {
destination.error(err);
return;
}
destination.next(response);
destination.next(createResponse(DOWNLOAD, event));
destination.complete();

@@ -498,0 +487,0 @@ } else {

import { AjaxRequest, AjaxResponseType } from './types';
import { getXHRResponse } from './getXHRResponse';

@@ -119,3 +118,3 @@ /**

this.response = getXHRResponse(xhr);
this.response = xhr.response;
const { loaded, total } = originalEvent;

@@ -122,0 +121,0 @@ this.loaded = loaded;

import { AjaxRequest } from './types';
import { getXHRResponse } from './getXHRResponse';
import { createErrorClass } from '../util/createErrorClass';

@@ -66,11 +65,3 @@

this.responseType = xhr.responseType;
let response: any;
try {
// This can throw in IE, because we have to do a JSON.parse of
// the response in some cases to get the expected response property.
response = getXHRResponse(xhr);
} catch (err) {
response = xhr.responseText;
}
this.response = response;
this.response = xhr.response;
}

@@ -77,0 +68,0 @@ );

@@ -17,6 +17,6 @@ import { Subject } from './Subject';

protected _checkFinalizedStatuses(subscriber: Subscriber<T>) {
const { hasError, _hasValue, _value, thrownError, isStopped, _isComplete } = this;
const { hasError, _hasValue, _value, thrownError, _closed, _isComplete } = this;
if (hasError) {
subscriber.error(thrownError);
} else if (isStopped || _isComplete) {
} else if (_closed || _isComplete) {
_hasValue && subscriber.next(_value!);

@@ -28,3 +28,3 @@ subscriber.complete();

next(value: T): void {
if (!this.isStopped) {
if (!this._closed) {
this._value = value;

@@ -31,0 +31,0 @@ this._hasValue = true;

@@ -32,3 +32,2 @@ import { Subject } from './Subject';

}
this._throwIfClosed();
return _value;

@@ -35,0 +34,0 @@ }

@@ -1,3 +0,2 @@

import { Operator } from './Operator';
import { Subscriber, isSubscriber } from './Subscriber';
import { Subscriber } from './Subscriber';
import { Subscription } from './Subscription';

@@ -16,12 +15,2 @@ import { TeardownLogic, OperatorFunction, Subscribable, Observer } from './types';

/**
* @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.
*/
source: Observable<any> | undefined;
/**
* @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.
*/
operator: Operator<any, T> | undefined;
/**
* @constructor

@@ -40,20 +29,2 @@ * @param {Function} subscribe the function that is called when the Observable is

/**
* Creates a new Observable, with this Observable instance as the source, and the passed
* operator defined as the new observable's operator.
* @method lift
* @param operator the operator defining the operation to take on the observable
* @return a new observable with the Operator applied
* @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.
* If you have implemented an operator using `lift`, it is recommended that you create an
* operator by simply returning `new Observable()` directly. See "Creating new operators from
* scratch" section here: https://rxjs.dev/guide/operators
*/
lift<R>(operator?: Operator<T, R>): Observable<R> {
const observable = new Observable<R>();
observable.source = this;
observable.operator = operator;
return observable;
}
/**
* Invokes an execution of an Observable and registers Observer handlers for notifications it will emit.

@@ -195,20 +166,4 @@ *

subscribe(observerOrNext?: Partial<Observer<T>> | ((value: T) => void) | null): Subscription {
const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new Subscriber(observerOrNext);
const { operator, source } = this;
subscriber.add(
operator
? // We're dealing with a subscription in the
// operator chain to one of our lifted operators.
operator.call(subscriber, source)
: source
? // If `source` has a value, but `operator` does not, something that
// had intimate knowledge of our API, like our `Subject`, must have
// set it. We're going to just call `_subscribe` directly.
this._subscribe(subscriber)
: // In all other cases, we're likely wrapping a user-provided initializer
// function, so we need to catch errors and handle them appropriately.
this._trySubscribe(subscriber)
);
const subscriber = observerOrNext instanceof Subscriber ? observerOrNext : new Subscriber(observerOrNext);
subscriber.add(this._trySubscribe(subscriber));
return subscriber;

@@ -292,4 +247,4 @@ }

/** @internal */
protected _subscribe(subscriber: Subscriber<any>): TeardownLogic {
return this.source?.subscribe(subscriber);
protected _subscribe(_subscriber: Subscriber<any>): TeardownLogic {
return;
}

@@ -296,0 +251,0 @@

@@ -89,9 +89,9 @@ /* @prettier */

*
* const someFunction = (cb) => {
* cb(5, 'some string', {someProperty: 'someValue'})
* const someFunction = (n, s, cb) => {
* cb(n, s, { someProperty: 'someValue' });
* };
*
* const boundSomeFunction = bindCallback(someFunction);
* boundSomeFunction(12, 10).subscribe(values => {
* console.log(values); // [22, 2]
* boundSomeFunction(5, 'some string').subscribe((values) => {
* console.log(values); // [5, 'some string', {someProperty: 'someValue'}]
* });

@@ -98,0 +98,0 @@ * ```

import { Observable } from '../Observable';
import { ObservableInput, SchedulerLike, ObservedValueOf, ObservableInputTuple } from '../types';
import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';
import { ObservableInput, ObservedValueOf, ObservableInputTuple } from '../types';
import { arrayOrObject } from '../util/argsArgArrayOrObject';
import { Subscriber } from '../Subscriber';
import { from } from './from';
import { identity } from '../util/identity';
import { Subscription } from '../Subscription';
import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';
import { popResultSelector, popScheduler } from '../util/args';
import { createObject } from '../util/createObject';
import { createOperatorSubscriber } from '../operators/OperatorSubscriber';
import { AnyCatcher } from '../AnyCatcher';
import { executeSchedule } from '../util/executeSchedule';
import { EMPTY } from './empty';
import { from } from './from';

@@ -31,34 +28,7 @@ // combineLatest(any)

export function combineLatest<A extends readonly unknown[]>(sources: readonly [...ObservableInputTuple<A>]): Observable<A>;
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */
export function combineLatest<A extends readonly unknown[], R>(
sources: readonly [...ObservableInputTuple<A>],
resultSelector: (...values: A) => R,
scheduler: SchedulerLike
): Observable<R>;
export function combineLatest<A extends readonly unknown[], R>(
sources: readonly [...ObservableInputTuple<A>],
resultSelector: (...values: A) => R
): Observable<R>;
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */
export function combineLatest<A extends readonly unknown[]>(
sources: readonly [...ObservableInputTuple<A>],
scheduler: SchedulerLike
): Observable<A>;
// combineLatest(a, b, c)
/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */
export function combineLatest<A extends readonly unknown[]>(...sources: [...ObservableInputTuple<A>]): Observable<A>;
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */
export function combineLatest<A extends readonly unknown[], R>(
...sourcesAndResultSelectorAndScheduler: [...ObservableInputTuple<A>, (...values: A) => R, SchedulerLike]
): Observable<R>;
/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */
export function combineLatest<A extends readonly unknown[], R>(
...sourcesAndResultSelector: [...ObservableInputTuple<A>, (...values: A) => R]
): Observable<R>;
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */
export function combineLatest<A extends readonly unknown[]>(
...sourcesAndScheduler: [...ObservableInputTuple<A>, SchedulerLike]
): Observable<A>;
// combineLatest({a, b, c})

@@ -192,18 +162,22 @@ export function combineLatest(sourcesObject: { [K in any]: never }): Observable<never>;

*
* @param {ObservableInput} [observables] An array of input Observables to combine with each other.
* @param sources An array of input Observables to combine with each other.
* An array of Observables must be given as the first argument.
* @param {function} [project] An optional function to project the values from
* @param project An optional function to project the values from
* the combined latest values into a new value on the output Observable.
* @param {SchedulerLike} [scheduler=null] The {@link SchedulerLike} to use for subscribing to
* each input Observable.
* @return {Observable} An Observable of projected values from the most recent
* @return An Observable of projected values from the most recent
* values from each input Observable, or an array of the most recent values from
* each input Observable.
*/
export function combineLatest<O extends ObservableInput<any>, R>(...args: any[]): Observable<R> | Observable<ObservedValueOf<O>[]> {
const scheduler = popScheduler(args);
const resultSelector = popResultSelector(args);
export function combineLatest<O extends ObservableInput<any>, R>(
sources: Record<string, O> | O[],
resultSelector?: (...value: any[]) => R
): Observable<R> | Observable<ObservedValueOf<O>[]> {
const parts = arrayOrObject(sources);
const { args: observables, keys } = argsArgArrayOrObject(args);
if (!parts) {
throw new TypeError('sources must be an array or object');
}
const { args: observables, keys } = parts;
if (observables.length === 0) {

@@ -213,95 +187,62 @@ // If no observables are passed, or someone has passed an empty array

// complete (EMPTY), but we have to honor the scheduler provided if any.
return from([], scheduler as any);
return EMPTY;
}
const result = new Observable<ObservedValueOf<O>[]>(
return new Observable<ObservedValueOf<O>[]>(
combineLatestInit(
observables as ObservableInput<ObservedValueOf<O>>[],
scheduler,
keys
? // A handler for scrubbing the array of args into a dictionary.
(values) => createObject(keys, values)
: // A passthrough to just return the array
identity
? (values: any[]) => createObject(keys, values)
: resultSelector
? (values: readonly any[]) => resultSelector(...values)
: identity
)
);
return resultSelector ? (result.pipe(mapOneOrManyArgs(resultSelector)) as Observable<R>) : result;
}
export function combineLatestInit(
observables: ObservableInput<any>[],
scheduler?: SchedulerLike,
valueTransform: (values: any[]) => any = identity
) {
export function combineLatestInit(observables: ObservableInput<any>[], valueTransform: (values: any[]) => any = identity) {
return (subscriber: Subscriber<any>) => {
// The outer subscription. We're capturing this in a function
// because we may have to schedule it.
maybeSchedule(
scheduler,
() => {
const { length } = observables;
// A store for the values each observable has emitted so far. We match observable to value on index.
const values = new Array(length);
// The number of currently active subscriptions, as they complete, we decrement this number to see if
// we are all done combining values, so we can complete the result.
let active = length;
// The number of inner sources that still haven't emitted the first value
// We need to track this because all sources need to emit one value in order
// to start emitting values.
let remainingFirstValues = length;
// The loop to kick off subscription. We're keying everything on index `i` to relate the observables passed
// in to the slot in the output array or the key in the array of keys in the output dictionary.
for (let i = 0; i < length; i++) {
maybeSchedule(
scheduler,
() => {
const source = from(observables[i], scheduler as any);
let hasFirstValue = false;
source.subscribe(
createOperatorSubscriber(
subscriber,
(value) => {
// When we get a value, record it in our set of values.
values[i] = value;
if (!hasFirstValue) {
// If this is our first value, record that.
hasFirstValue = true;
remainingFirstValues--;
}
if (!remainingFirstValues) {
// We're not waiting for any more
// first values, so we can emit!
subscriber.next(valueTransform(values.slice()));
}
},
() => {
if (!--active) {
// We only complete the result if we have no more active
// inner observables.
subscriber.complete();
}
}
)
);
},
subscriber
);
}
},
subscriber
);
const { length } = observables;
// A store for the values each observable has emitted so far. We match observable to value on index.
const values = new Array(length);
// The number of currently active subscriptions, as they complete, we decrement this number to see if
// we are all done combining values, so we can complete the result.
let active = length;
// The number of inner sources that still haven't emitted the first value
// We need to track this because all sources need to emit one value in order
// to start emitting values.
let remainingFirstValues = length;
// The loop to kick off subscription. We're keying everything on index `i` to relate the observables passed
// in to the slot in the output array or the key in the array of keys in the output dictionary.
for (let i = 0; i < length; i++) {
const source = from(observables[i]);
let hasFirstValue = false;
source.subscribe(
createOperatorSubscriber(
subscriber,
(value) => {
// When we get a value, record it in our set of values.
values[i] = value;
if (!hasFirstValue) {
// If this is our first value, record that.
hasFirstValue = true;
remainingFirstValues--;
}
if (!remainingFirstValues) {
// We're not waiting for any more
// first values, so we can emit!
subscriber.next(valueTransform(Array.from(values)));
}
},
() => {
if (!--active) {
// We only complete the result if we have no more active
// inner observables.
subscriber.complete();
}
}
)
);
}
};
}
/**
* A small utility to handle the couple of locations where we want to schedule if a scheduler was provided,
* but we don't if there was no scheduler.
*/
function maybeSchedule(scheduler: SchedulerLike | undefined, execute: () => void, subscription: Subscription) {
if (scheduler) {
executeSchedule(subscription, scheduler, execute);
} else {
execute();
}
}

@@ -5,2 +5,3 @@ import { Observable } from '../Observable';

import { popScheduler } from '../util/args';
import { scheduled } from '../scheduled/scheduled';
import { from } from './from';

@@ -115,3 +116,4 @@

export function concat(...args: any[]): Observable<unknown> {
return concatAll()(from(args, popScheduler(args)));
const scheduler = popScheduler(args);
return concatAll()(scheduler ? scheduled(args, scheduler) : from(args));
}
import { Observable } from '../Observable';
import { ObservedValueOf, ObservableInput } from '../types';
import { innerFrom } from './innerFrom';
import { from } from './from';

@@ -19,5 +19,4 @@ /**

* generates a new Observable -- and subscribes the Observer to this Observable.
* In case the factory function returns a falsy value, then EMPTY is used as
* Observable instead. Last but not least, an exception during the factory
* function call is transferred to the Observer by calling `error`.
* Last but not least, an exception during the factory function call is
* transferred to the Observer by calling `error`.
*

@@ -56,4 +55,4 @@ * ## Example

return new Observable<ObservedValueOf<R>>((subscriber) => {
innerFrom(observableFactory()).subscribe(subscriber);
from(observableFactory()).subscribe(subscriber);
});
}
import { createOperatorSubscriber } from '../../operators/OperatorSubscriber';
import { Observable } from '../../Observable';
import { innerFrom } from '../../observable/innerFrom';
import { from } from '../from';
import { ObservableInput } from '../../types';

@@ -153,3 +153,3 @@

// sent to the promise `catch` below and handled.
innerFrom(selector(response)).subscribe(
from(selector(response)).subscribe(
createOperatorSubscriber(

@@ -156,0 +156,0 @@ subscriber,

@@ -73,3 +73,3 @@ import { WebSocketSubject, WebSocketSubjectConfig } from './WebSocketSubject';

* 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'.
* on the server or using {@link connectable} on a Observable returned from 'multiplex'.
*

@@ -76,0 +76,0 @@ * Last argument to `multiplex` is a `messageFilter` function which should return a boolean. It is used to filter out messages

@@ -5,3 +5,2 @@ import { Subject, AnonymousSubject } from '../../Subject';

import { Subscription } from '../../Subscription';
import { Operator } from '../../Operator';
import { ReplaySubject } from '../../ReplaySubject';

@@ -172,3 +171,3 @@ import { Observer, NextObserver } from '../../types';

this.destination = destination;
this.source = urlConfigOrSource as Observable<T>;
this._source = urlConfigOrSource as Observable<T>;
} else {

@@ -196,13 +195,5 @@ const config = (this._config = { ...DEFAULT_WEBSOCKET_CONFIG });

/** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
lift<R>(operator: Operator<T, R>): WebSocketSubject<R> {
const sock = new WebSocketSubject<R>(this._config as WebSocketSubjectConfig<any>, this.destination as any);
sock.operator = operator;
sock.source = this;
return sock;
}
private _resetState() {
this._socket = null;
if (!this.source) {
if (!this._source) {
this.destination = new ReplaySubject();

@@ -372,5 +363,5 @@ }

protected _subscribe(subscriber: Subscriber<T>): Subscription {
const { source } = this;
if (source) {
return source.subscribe(subscriber);
const { _source } = this;
if (_source) {
return _source.subscribe(subscriber);
}

@@ -377,0 +368,0 @@ if (!this._socket) {

import { Observable } from '../Observable';
import { ObservedValueOf, ObservableInputTuple, ObservableInput } from '../types';
import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';
import { innerFrom } from './innerFrom';
import { from } from './from';
import { popResultSelector } from '../util/args';

@@ -161,3 +161,3 @@ import { createOperatorSubscriber } from '../operators/OperatorSubscriber';

let hasValue = false;
innerFrom(sources[sourceIndex]).subscribe(
from(sources[sourceIndex]).subscribe(
createOperatorSubscriber(

@@ -164,0 +164,0 @@ subscriber,

@@ -0,10 +1,15 @@

import { isArrayLike } from '../util/isArrayLike';
import { isPromise } from '../util/isPromise';
import { Observable } from '../Observable';
import { ObservableInput, SchedulerLike, ObservedValueOf } from '../types';
import { scheduled } from '../scheduled/scheduled';
import { innerFrom } from './innerFrom';
import { ObservableInput, ObservedValueOf, ReadableStreamLike } from '../types';
import { isInteropObservable } from '../util/isInteropObservable';
import { isAsyncIterable } from '../util/isAsyncIterable';
import { createInvalidObservableTypeError } from '../util/throwUnobservableError';
import { isIterable } from '../util/isIterable';
import { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';
import { Subscriber } from '../Subscriber';
import { isFunction } from '../util/isFunction';
import { reportUnhandledError } from '../util/reportUnhandledError';
import { observable as Symbol_observable } from '../symbol/observable';
export function from<O extends ObservableInput<any>>(input: O): Observable<ObservedValueOf<O>>;
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled`. Details: https://rxjs.dev/deprecations/scheduler-argument */
export function from<O extends ObservableInput<any>>(input: O, scheduler: SchedulerLike | undefined): Observable<ObservedValueOf<O>>;
/**

@@ -72,34 +77,137 @@ * Creates an Observable from an Array, an array-like object, a Promise, an iterable object, or an Observable-like object.

*
* With `asyncScheduler`
*
* ```ts
* import { from, asyncScheduler } from 'rxjs';
*
* console.log('start');
*
* const array = [10, 20, 30];
* const result = from(array, asyncScheduler);
*
* result.subscribe(x => console.log(x));
*
* console.log('end');
*
* // Logs:
* // 'start'
* // 'end'
* // 10
* // 20
* // 30
* ```
*
* @see {@link fromEvent}
* @see {@link fromEventPattern}
* @see {@link scheduled}
*
* @param {ObservableInput<T>} A subscription object, a Promise, an Observable-like,
* an Array, an iterable, or an array-like object to be converted.
* @param {SchedulerLike} An optional {@link SchedulerLike} on which to schedule the emission of values.
* @return {Observable<T>}
* @param input A subscription object, a Promise, an Observable-like,
* an Array, an iterable, async iterable, or an array-like object to be converted.
*/
export function from<T>(input: ObservableInput<T>, scheduler?: SchedulerLike): Observable<T> {
return scheduler ? scheduled(input, scheduler) : innerFrom(input);
export function from<O extends ObservableInput<any>>(input: O): Observable<ObservedValueOf<O>>;
export function from<T>(input: ObservableInput<T>): Observable<T> {
if (input instanceof Observable) {
return input;
}
if (input != null) {
if (isInteropObservable(input)) {
return fromInteropObservable(input);
}
if (isArrayLike(input)) {
return fromArrayLike(input);
}
if (isPromise(input)) {
return fromPromise(input);
}
if (isAsyncIterable(input)) {
return fromAsyncIterable(input);
}
if (isIterable(input)) {
return fromIterable(input);
}
if (isReadableStreamLike(input)) {
return fromReadableStreamLike(input);
}
}
throw createInvalidObservableTypeError(input);
}
/**
* Creates an RxJS Observable from an object that implements `Symbol.observable`.
* @param obj An object that properly implements `Symbol.observable`.
*/
function fromInteropObservable<T>(obj: any) {
return new Observable((subscriber: Subscriber<T>) => {
const obs = obj[Symbol_observable]();
if (isFunction(obs.subscribe)) {
return obs.subscribe(subscriber);
}
// Should be caught by observable subscribe function error handling.
throw new TypeError('Provided object does not correctly implement Symbol.observable');
});
}
/**
* Synchronously emits the values of an array like and completes.
* This is exported because there are creation functions and operators that need to
* make direct use of the same logic, and there's no reason to make them run through
* `from` conditionals because we *know* they're dealing with an array.
* @param array The array to emit values from
*/
export function fromArrayLike<T>(array: ArrayLike<T>) {
return new Observable((subscriber: Subscriber<T>) => {
subscribeToArray(array, subscriber);
});
}
function fromPromise<T>(promise: PromiseLike<T>) {
return new Observable((subscriber: Subscriber<T>) => {
promise
.then(
(value) => {
if (!subscriber.closed) {
subscriber.next(value);
subscriber.complete();
}
},
(err: any) => subscriber.error(err)
)
.then(null, reportUnhandledError);
});
}
function fromIterable<T>(iterable: Iterable<T>) {
return new Observable((subscriber: Subscriber<T>) => {
for (const value of iterable) {
subscriber.next(value);
if (subscriber.closed) {
return;
}
}
subscriber.complete();
});
}
function fromAsyncIterable<T>(asyncIterable: AsyncIterable<T>) {
return new Observable((subscriber: Subscriber<T>) => {
process(asyncIterable, subscriber).catch((err) => subscriber.error(err));
});
}
function fromReadableStreamLike<T>(readableStream: ReadableStreamLike<T>) {
return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));
}
async function process<T>(asyncIterable: AsyncIterable<T>, subscriber: Subscriber<T>) {
for await (const value of asyncIterable) {
subscriber.next(value);
// A side-effect may have closed our subscriber,
// check before the next iteration.
if (subscriber.closed) {
return;
}
}
subscriber.complete();
}
/**
* Subscribes to an ArrayLike with a subscriber
* @param array The array or array-like to subscribe to
* @param subscriber
*/
export function subscribeToArray<T>(array: ArrayLike<T>, subscriber: Subscriber<T>) {
// Loop over the array and emit each value. Note two things here:
// 1. We're making sure that the subscriber is not closed on each loop.
// This is so we don't continue looping over a very large array after
// something like a `take`, `takeWhile`, or other synchronous unsubscription
// has already unsubscribed.
// 2. In this form, reentrant code can alter that array we're looping over.
// This is a known issue, but considered an edge case. The alternative would
// be to copy the array before executing the loop, but this has
// performance implications.
const length = array.length;
for (let i = 0; i < length && !subscriber.closed; i++) {
subscriber.next(array[i]);
}
subscriber.complete();
}

@@ -1,4 +0,3 @@

import { innerFrom } from '../observable/innerFrom';
import { Observable } from '../Observable';
import { mergeMap } from '../operators/mergeMap';
import { Subscriber } from '../Subscriber';
import { isArrayLike } from '../util/isArrayLike';

@@ -243,2 +242,3 @@ import { isFunction } from '../util/isFunction';

}
if (resultSelector) {

@@ -248,36 +248,5 @@ return fromEvent<T>(target, eventName, options as EventListenerOptions).pipe(mapOneOrManyArgs(resultSelector));

// Figure out our add and remove methods. In order to do this,
// we are going to analyze the target in a preferred order, if
// the target matches a given signature, we take the two "add" and "remove"
// method names and apply them to a map to create opposite versions of the
// same function. This is because they all operate in duplicate pairs,
// `addListener(name, handler)`, `removeListener(name, handler)`, for example.
// The call only differs by method name, as to whether or not you're adding or removing.
const [add, remove] =
// If it is an EventTarget, we need to use a slightly different method than the other two patterns.
isEventTarget(target)
? eventTargetMethods.map((methodName) => (handler: any) => target[methodName](eventName, handler, options as EventListenerOptions))
: // In all other cases, the call pattern is identical with the exception of the method names.
isNodeStyleEventEmitter(target)
? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))
: isJQueryStyleEventEmitter(target)
? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))
: [];
const isValidTarget = isNodeStyleEventEmitter(target) || isJQueryStyleEventEmitter(target) || isEventTarget(target);
// If add is falsy, it's because we didn't match a pattern above.
// Check to see if it is an ArrayLike, because if it is, we want to
// try to apply fromEvent to all of it's items. We do this check last,
// because there are may be some types that are both ArrayLike *and* implement
// event registry points, and we'd rather delegate to that when possible.
if (!add) {
if (isArrayLike(target)) {
return mergeMap((subTarget: any) => fromEvent(subTarget, eventName, options as EventListenerOptions))(
innerFrom(target)
) as Observable<T>;
}
}
// If add is falsy and we made it here, it's because we didn't
// match any valid target objects above.
if (!add) {
if (!isValidTarget && !isArrayLike(target)) {
throw new TypeError('Invalid event target');

@@ -287,24 +256,39 @@ }

return new Observable<T>((subscriber) => {
// The handler we are going to register. Forwards the event object, by itself, or
// an array of arguments to the event handler, if there is more than one argument,
// to the consumer.
const handler = (...args: any[]) => subscriber.next(1 < args.length ? args : args[0]);
// Do the work of adding the handler to the target.
add(handler);
// When we finalize, we want to remove the handler and free up memory.
return () => remove!(handler);
if (isValidTarget) {
// Valid event targets, even if they have a `length` property
// will be subscribed to as a single item.
doSubscribe(handler, subscriber, target, eventName, options);
} else {
// If it wasn't a valid event target, it must be an array-like.
// Subscribe to each item in the array-like.
for (let i = 0; i < target.length && !subscriber.closed; i++) {
const subTarget = target[i];
doSubscribe(handler, subscriber, subTarget, eventName, options);
}
}
});
}
/**
* Used to create `add` and `remove` functions to register and unregister event handlers
* from a target in the most common handler pattern, where there are only two arguments.
* (e.g. `on(name, fn)`, `off(name, fn)`, `addListener(name, fn)`, or `removeListener(name, fn)`)
* @param target The target we're calling methods on
* @param eventName The event name for the event we're creating register or unregister functions for
*/
function toCommonHandlerRegistry(target: any, eventName: string) {
return (methodName: string) => (handler: any) => target[methodName](eventName, handler);
function doSubscribe(handler: (...args: any[]) => void, subscriber: Subscriber<any>, subTarget: any, eventName: string, options: any) {
const [addMethod, removeMethod] = getRegistryMethodNames(subTarget);
if (!addMethod || !removeMethod) {
throw new TypeError('Invalid event target');
}
subTarget[addMethod](eventName, handler, options);
subscriber.add(() => subTarget[removeMethod](eventName, handler, options));
}
function getRegistryMethodNames(target: any) {
// If it is an EventTarget, we need to use a slightly different method than the other two patterns.
return isEventTarget(target)
? eventTargetMethods
: // In all other cases, the call pattern is identical with the exception of the method names.
isNodeStyleEventEmitter(target)
? nodeEventEmitterMethods
: isJQueryStyleEventEmitter(target)
? jqueryMethods
: [];
}
/**

@@ -311,0 +295,0 @@ * Checks to see if the target implements the required node-style EventEmitter methods

@@ -139,3 +139,3 @@ import { Observable } from '../Observable';

* by the Observable. For example, to ensure that each value is pushed to the Observer
* on a separate task in the event loop, you could use the `async` scheduler. Note that
* on a separate task in the event loop, you could use the `asyncScheduler` scheduler. Note that
* by default (when no scheduler is passed) values are simply emitted synchronously.

@@ -142,0 +142,0 @@ *

@@ -18,3 +18,3 @@ import { Observable } from '../Observable';

* only after the first period has passed. By default, this operator uses the
* `async` {@link SchedulerLike} to provide a notion of time, but you may pass any
* `asyncScheduler` {@link SchedulerLike} to provide a notion of time, but you may pass any
* {@link SchedulerLike} to it.

@@ -47,3 +47,3 @@ *

* or the time unit determined by the scheduler's clock.
* @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for scheduling
* @param {SchedulerLike} [scheduler=asyncScheduler] The {@link SchedulerLike} to use for scheduling
* the emission of values, and providing a notion of "time".

@@ -50,0 +50,0 @@ * @return {Observable} An Observable that emits a sequential number each time

import { Observable } from '../Observable';
import { ObservableInput, ObservableInputTuple, SchedulerLike } from '../types';
import { mergeAll } from '../operators/mergeAll';
import { innerFrom } from './innerFrom';
import { EMPTY } from './empty';
import { popNumber, popScheduler } from '../util/args';
import { scheduled } from '../scheduled/scheduled';
import { from } from './from';

@@ -99,5 +99,5 @@

? // One source? Just return it.
innerFrom(sources[0])
from(sources[0])
: // Merge all sources
mergeAll(concurrent)(from(sources, scheduler));
mergeAll(concurrent)(scheduler ? scheduled(sources, scheduler) : from(sources));
}
import { SchedulerLike, ValueFromArray } from '../types';
import { Observable } from '../Observable';
import { popScheduler } from '../util/args';
import { from } from './from';
import { scheduled } from '../scheduled/scheduled';
import { fromArrayLike } from './from';

@@ -82,3 +83,3 @@ // Devs are more likely to pass null or undefined than they are a scheduler

const scheduler = popScheduler(args);
return from(args as T[], scheduler);
return scheduler ? scheduled(args as T[], scheduler) : fromArrayLike(args as T[]);
}

@@ -6,3 +6,3 @@ import { Observable } from '../Observable';

import { noop } from '../util/noop';
import { innerFrom } from './innerFrom';
import { from } from './from';

@@ -29,3 +29,3 @@ /* tslint:disable:max-line-length */

*
* `onErrorResumeNext` is basically {@link concat}, only it will continue, even if one of its
* `onErrorResumeNext` is basically {@link concatWith}, only it will continue, even if one of its
* sources emits an error.

@@ -89,3 +89,3 @@ *

try {
nextSource = innerFrom(nextSources[sourceIndex++]);
nextSource = from(nextSources[sourceIndex++]);
} catch (err) {

@@ -92,0 +92,0 @@ subscribeNext();

@@ -5,3 +5,3 @@ import { not } from '../util/not';

import { Observable } from '../Observable';
import { innerFrom } from './innerFrom';
import { from } from './from';

@@ -85,6 +85,3 @@ /** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */

): [Observable<T>, Observable<T>] {
return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))] as [
Observable<T>,
Observable<T>
];
return [filter(predicate, thisArg)(from(source)), filter(not(predicate, thisArg))(from(source))] as [Observable<T>, Observable<T>];
}
import { Observable } from '../Observable';
import { innerFrom } from './innerFrom';
import { from } from './from';
import { Subscription } from '../Subscription';

@@ -54,3 +54,3 @@ import { ObservableInput, ObservableInputTuple } from '../types';

// If only one source was passed, just return it. Otherwise return the race.
return sources.length === 1 ? innerFrom(sources[0] as ObservableInput<T>) : new Observable<T>(raceInit(sources as ObservableInput<T>[]));
return sources.length === 1 ? from(sources[0] as ObservableInput<T>) : new Observable<T>(raceInit(sources as ObservableInput<T>[]));
}

@@ -73,3 +73,3 @@

subscriptions.push(
innerFrom(sources[i] as ObservableInput<T>).subscribe(
from(sources[i] as ObservableInput<T>).subscribe(
createOperatorSubscriber(subscriber, (value) => {

@@ -76,0 +76,0 @@ if (subscriptions) {

import { Observable } from '../Observable';
import { Subscriber } from '../Subscriber';
import { SchedulerLike } from '../types';
import { isFunction } from '../util/isFunction';

@@ -98,29 +95,6 @@ /**

*/
export function throwError(errorFactory: () => any): Observable<never>;
/**
* Returns an observable that will error with the specified error immediately upon subscription.
*
* @param error The error instance to emit
* @deprecated Support for passing an error value will be removed in v8. Instead, pass a factory function to `throwError(() => new Error('test'))`. This is
* because it will create the error at the moment it should be created and capture a more appropriate stack trace. If
* for some reason you need to create the error ahead of time, you can still do that: `const err = new Error('test'); throwError(() => err);`.
*/
export function throwError(error: any): Observable<never>;
/**
* Notifies the consumer of an error using a given scheduler by scheduling it at delay `0` upon subscription.
*
* @param errorOrErrorFactory An error instance or error factory
* @param scheduler A scheduler to use to schedule the error notification
* @deprecated The `scheduler` parameter will be removed in v8.
* Use `throwError` in combination with {@link observeOn}: `throwError(() => new Error('test')).pipe(observeOn(scheduler));`.
* Details: https://rxjs.dev/deprecations/scheduler-argument
*/
export function throwError(errorOrErrorFactory: any, scheduler: SchedulerLike): Observable<never>;
export function throwError(errorOrErrorFactory: any, scheduler?: SchedulerLike): Observable<never> {
const errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : () => errorOrErrorFactory;
const init = (subscriber: Subscriber<never>) => subscriber.error(errorFactory());
return new Observable(scheduler ? (subscriber) => scheduler.schedule(init as any, 0, subscriber) : init);
export function throwError(errorFactory: () => any): Observable<never> {
return new Observable((subscriber) => {
subscriber.error(errorFactory());
});
}
import { Observable } from '../Observable';
import { SchedulerLike } from '../types';
import { async as asyncScheduler } from '../scheduler/async';
import { asyncScheduler } from '../scheduler/async';
import { isScheduler } from '../util/isScheduler';

@@ -88,3 +88,3 @@ import { isValidDate } from '../util/isDate';

* Creates an observable that starts an interval after a specified delay, emitting incrementing numbers -- starting at `0` --
* on each interval after words.
* on each interval afterwards.
*

@@ -91,0 +91,0 @@ * The `delay` and `intervalDuration` are specified by default in milliseconds, however providing a custom scheduler could

import { Observable } from '../Observable';
import { Unsubscribable, ObservableInput, ObservedValueOf } from '../types';
import { innerFrom } from './innerFrom';
import { from } from './from';
import { EMPTY } from './empty';

@@ -41,3 +41,3 @@

const result = observableFactory(resource);
const source = result ? innerFrom(result) : EMPTY;
const source = result ? from(result) : EMPTY;
source.subscribe(subscriber);

@@ -44,0 +44,0 @@ return () => {

import { Observable } from '../Observable';
import { ObservableInputTuple } from '../types';
import { innerFrom } from './innerFrom';
import { from } from './from';
import { argsOrArgArray } from '../util/argsOrArgArray';

@@ -76,3 +76,3 @@ import { EMPTY } from './empty';

for (let sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) {
innerFrom(sources[sourceIndex]).subscribe(
from(sources[sourceIndex]).subscribe(
createOperatorSubscriber(

@@ -79,0 +79,0 @@ subscriber,

@@ -5,3 +5,3 @@ import { Subscriber } from '../Subscriber';

import { operate } from '../util/lift';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { createOperatorSubscriber } from './OperatorSubscriber';

@@ -85,3 +85,3 @@

if (!durationSubscriber) {
innerFrom(durationSelector(value)).subscribe(
from(durationSelector(value)).subscribe(
(durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration))

@@ -88,0 +88,0 @@ );

@@ -48,3 +48,3 @@ import { asyncScheduler } from '../scheduler/async';

* by the optional `scheduler`.
* @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for
* @param {SchedulerLike} [scheduler=asyncScheduler] The {@link SchedulerLike} to use for
* managing the timers that handle the rate-limiting behavior.

@@ -51,0 +51,0 @@ * @return A function that returns an Observable that performs rate-limiting of

@@ -5,3 +5,3 @@ import { OperatorFunction, ObservableInput } from '../types';

import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';

@@ -51,2 +51,16 @@ /**

// Subscribe to the closing notifier first.
from(closingNotifier).subscribe(
createOperatorSubscriber(
subscriber,
() => {
// Start a new buffer and emit the previous one.
const b = currentBuffer;
currentBuffer = [];
subscriber.next(b);
},
noop
)
);
// Subscribe to our source.

@@ -64,16 +78,2 @@ source.subscribe(

// Subscribe to the closing notifier.
innerFrom(closingNotifier).subscribe(
createOperatorSubscriber(
subscriber,
() => {
// Start a new buffer and emit the previous one.
const b = currentBuffer;
currentBuffer = [];
subscriber.next(b);
},
noop
)
);
return () => {

@@ -80,0 +80,0 @@ // Ensure buffered values are released on finalization.

import { Subscription } from '../Subscription';
import { OperatorFunction, ObservableInput } from '../types';
import { operate } from '../util/lift';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { createOperatorSubscriber } from './OperatorSubscriber';

@@ -60,3 +60,3 @@ import { noop } from '../util/noop';

// Subscribe to the openings notifier first
innerFrom(openings).subscribe(
from(openings).subscribe(
createOperatorSubscriber(

@@ -78,3 +78,3 @@ subscriber,

// The line below will add the subscription to the parent subscriber *and* the closing subscription.
closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop)));
closingSubscription.add(from(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop)));
},

@@ -81,0 +81,0 @@ noop

@@ -6,3 +6,3 @@ import { Subscriber } from '../Subscriber';

import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';

@@ -70,3 +70,3 @@ /**

// Get a new closing notifier and subscribe to it.
innerFrom(closingSelector()).subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop)));
from(closingSelector()).subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop)));
};

@@ -73,0 +73,0 @@

@@ -5,3 +5,3 @@ import { Observable } from '../Observable';

import { Subscription } from '../Subscription';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { createOperatorSubscriber } from './OperatorSubscriber';

@@ -96,3 +96,3 @@ import { operate } from '../util/lift';

*
* @see {@link onErrorResumeNext}
* @see {@link onErrorResumeNextWith}
* @see {@link repeat}

@@ -119,3 +119,3 @@ * @see {@link repeatWhen}

createOperatorSubscriber(subscriber, undefined, undefined, (err) => {
handledResult = innerFrom(selector(err, catchError(selector)(source)));
handledResult = from(selector(err, catchError(selector)(source)));
if (innerSub) {

@@ -122,0 +122,0 @@ innerSub.unsubscribe();

@@ -1,3 +0,4 @@

import { ObservableInputTuple, OperatorFunction, Cons } from '../types';
import { combineLatest } from './combineLatest';
import { combineLatestInit } from '../observable/combineLatest';
import { operate } from '../util/lift';
import { Cons, ObservableInputTuple, OperatorFunction } from '../types';

@@ -47,3 +48,3 @@ /**

): OperatorFunction<T, Cons<T, A>> {
return combineLatest(...otherSources);
return operate((source, subscriber) => combineLatestInit([source, ...otherSources])(subscriber));
}
import { mergeMap } from './mergeMap';
import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';
import { isFunction } from '../util/isFunction';
/* tslint:disable:max-line-length */
export function concatMap<T, O extends ObservableInput<any>>(
project: (value: T, index: number) => O
): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export function concatMap<T, O extends ObservableInput<any>>(
project: (value: T, index: number) => O,
resultSelector: undefined
): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export function concatMap<T, R, O extends ObservableInput<any>>(
project: (value: T, index: number) => O,
resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R
): OperatorFunction<T, R>;
/* tslint:enable:max-line-length */
/**

@@ -75,11 +58,9 @@ * Projects each source value to an Observable which is merged in the output

* @return A function that returns an Observable that emits the result of
* applying the projection function (and the optional deprecated
* `resultSelector`) to each item emitted by the source Observable and taking
* values from each projected inner Observable sequentially.
* applying the projection function to each item emitted by the source Observable
* and taking values from each projected inner Observable sequentially.
*/
export function concatMap<T, R, O extends ObservableInput<any>>(
project: (value: T, index: number) => O,
resultSelector?: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R
): OperatorFunction<T, ObservedValueOf<O> | R> {
return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);
export function concatMap<T, O extends ObservableInput<any>>(
project: (value: T, index: number) => O
): OperatorFunction<T, ObservedValueOf<O>> {
return mergeMap(project, 1);
}
import { concatMap } from './concatMap';
import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';
import { isFunction } from '../util/isFunction';
/** @deprecated Will be removed in v9. Use {@link concatMap} instead: `concatMap(() => result)` */
export function concatMapTo<O extends ObservableInput<unknown>>(observable: O): OperatorFunction<unknown, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export function concatMapTo<O extends ObservableInput<unknown>>(
observable: O,
resultSelector: undefined
): OperatorFunction<unknown, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export function concatMapTo<T, R, O extends ObservableInput<unknown>>(
observable: O,
resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R
): OperatorFunction<T, R>;
/**

@@ -74,7 +60,4 @@ * Projects each source value to the same Observable which is merged multiple

*/
export function concatMapTo<T, R, O extends ObservableInput<unknown>>(
innerObservable: O,
resultSelector?: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R
): OperatorFunction<T, ObservedValueOf<O> | R> {
return isFunction(resultSelector) ? concatMap(() => innerObservable, resultSelector) : concatMap(() => innerObservable);
export function concatMapTo<O extends ObservableInput<unknown>>(innerObservable: O): OperatorFunction<unknown, ObservedValueOf<O>> {
return concatMap(() => innerObservable);
}
import { ObservableInputTuple, OperatorFunction } from '../types';
import { concat } from './concat';
import { from } from '../observable/from';
import { concatAll } from '../operators/concatAll';
import { operate } from '../util/lift';

@@ -47,3 +49,5 @@ /**

): OperatorFunction<T, T | A[number]> {
return concat(...otherSources);
return operate((source, subscriber) => {
concatAll()(from([source, ...otherSources])).subscribe(subscriber);
});
}
import { OperatorFunction, ObservableInput, ObservedValueOf, SubjectLike } from '../types';
import { Observable } from '../Observable';
import { Subject } from '../Subject';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { operate } from '../util/lift';

@@ -106,5 +106,5 @@ import { fromSubscribable } from '../observable/fromSubscribable';

const subject = connector();
innerFrom(selector(fromSubscribable(subject))).subscribe(subscriber);
from(selector(fromSubscribable(subject))).subscribe(subscriber);
subscriber.add(source.subscribe(subject));
});
}

@@ -6,3 +6,3 @@ import { Subscriber } from '../Subscriber';

import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';

@@ -103,3 +103,3 @@ /**

// Subscribe to the duration.
innerFrom(durationSelector(value)).subscribe(durationSubscriber);
from(durationSelector(value)).subscribe(durationSubscriber);
},

@@ -106,0 +106,0 @@ () => {

@@ -58,3 +58,3 @@ import { asyncScheduler } from '../scheduler/async';

* source value.
* @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for
* @param {SchedulerLike} [scheduler=asyncScheduler] The {@link SchedulerLike} to use for
* managing the timers that handle the timeout for each value.

@@ -70,8 +70,11 @@ * @return A function that returns an Observable that delays the emissions of

let lastTime: number | null = null;
let scheduling = false;
const emit = () => {
if (activeTask) {
if (scheduling || activeTask) {
// We have a value! Free up memory first, then emit the value.
activeTask.unsubscribe();
activeTask = null;
if (activeTask) {
activeTask.unsubscribe();
activeTask = null;
}
const value = lastValue!;

@@ -107,3 +110,6 @@ lastValue = null;

if (!activeTask) {
scheduling = true;
activeTask = scheduler.schedule(emitWhenIdle, dueTime);
scheduling = false;
// Set activeTask as intermediary Subscription to handle synchronous schedulers
subscriber.add(activeTask);

@@ -110,0 +116,0 @@ }

@@ -31,3 +31,3 @@ import { OperatorFunction } from '../types';

*
* @see {@link empty}
* @see {@link EMPTY}
* @see {@link last}

@@ -34,0 +34,0 @@ *

@@ -57,3 +57,3 @@ import { asyncScheduler } from '../scheduler/async';

* a `Date` until which the emission of the source items is delayed.
* @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for
* @param {SchedulerLike} [scheduler=asyncScheduler] The {@link SchedulerLike} to use for
* managing the timers that handle the time-shift for each item.

@@ -60,0 +60,0 @@ * @return A function that returns an Observable that delays the emissions of

@@ -8,3 +8,3 @@ import { Observable } from '../Observable';

import { mergeMap } from './mergeMap';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';

@@ -103,3 +103,3 @@ /** @deprecated The `subscriptionDelay` parameter will be removed in v8. */

return mergeMap((value, index) => innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)));
return mergeMap((value, index) => from(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)));
}

@@ -5,3 +5,3 @@ import { MonoTypeOperatorFunction, ObservableInput } from '../types';

import { noop } from '../util/noop';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';

@@ -78,4 +78,4 @@ /**

flushes && innerFrom(flushes).subscribe(createOperatorSubscriber(subscriber, () => distinctKeys.clear(), noop));
flushes && from(flushes).subscribe(createOperatorSubscriber(subscriber, () => distinctKeys.clear(), noop));
});
}
/** prettier */
import { Observable } from '../Observable';
import { concat } from '../observable/concat';
import { of } from '../observable/of';
import { MonoTypeOperatorFunction, SchedulerLike, OperatorFunction, ValueFromArray } from '../types';
import { subscribeToArray } from '../observable/from';
import { OperatorFunction, ValueFromArray } from '../types';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from '../operators/OperatorSubscriber';
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `concatAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */
export function endWith<T>(scheduler: SchedulerLike): MonoTypeOperatorFunction<T>;
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `concatAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */
export function endWith<T, A extends unknown[] = T[]>(
...valuesAndScheduler: [...A, SchedulerLike]
): OperatorFunction<T, T | ValueFromArray<A>>;
export function endWith<T, A extends unknown[] = T[]>(...values: A): OperatorFunction<T, T | ValueFromArray<A>>;
/**

@@ -20,5 +11,2 @@ * Returns an observable that will emit all values from the source, then synchronously emit

*
* NOTE: Passing a last argument of a Scheduler is _deprecated_, and may result in incorrect
* types in TypeScript.
*
* This is useful for knowing when an observable ends. Particularly when paired with an

@@ -67,4 +55,10 @@ * operator like {@link takeUntil}

*/
export function endWith<T>(...values: Array<T | SchedulerLike>): MonoTypeOperatorFunction<T> {
return (source: Observable<T>) => concat(source, of(...values)) as Observable<T>;
export function endWith<T, A extends readonly unknown[] = T[]>(...values: A): OperatorFunction<T, T | ValueFromArray<A>> {
return operate((source, subscriber) => {
source.subscribe(
createOperatorSubscriber(subscriber, undefined, () => {
subscribeToArray(values as readonly ValueFromArray<A>[], subscriber);
})
);
});
}

@@ -12,3 +12,3 @@ import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types';

*
* ![](exhaust.png)
* ![](exhaustAll.svg)
*

@@ -15,0 +15,0 @@ * `exhaustAll` subscribes to an Observable that emits Observables, also known as a

@@ -1,25 +0,7 @@

import { Observable } from '../Observable';
import { Subscriber } from '../Subscriber';
import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';
import { map } from './map';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
/* tslint:disable:max-line-length */
export function exhaustMap<T, O extends ObservableInput<any>>(
project: (value: T, index: number) => O
): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export function exhaustMap<T, O extends ObservableInput<any>>(
project: (value: T, index: number) => O,
resultSelector: undefined
): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export function exhaustMap<T, I, R>(
project: (value: T, index: number) => ObservableInput<I>,
resultSelector: (outerValue: T, innerValue: I, outerIndex: number, innerIndex: number) => R
): OperatorFunction<T, R>;
/* tslint:enable:max-line-length */
/**

@@ -30,3 +12,3 @@ * Projects each source value to an Observable which is merged in the output

* <span class="informal">Maps each value to an Observable, then flattens all of
* these inner Observables using {@link exhaust}.</span>
* these inner Observables using {@link exhaustAll}.</span>
*

@@ -59,3 +41,3 @@ * ![](exhaustMap.png)

* @see {@link concatMap}
* @see {@link exhaust}
* @see {@link exhaustAll}
* @see {@link mergeMap}

@@ -71,11 +53,5 @@ * @see {@link switchMap}

*/
export function exhaustMap<T, R, O extends ObservableInput<any>>(
project: (value: T, index: number) => O,
resultSelector?: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R
): OperatorFunction<T, ObservedValueOf<O> | R> {
if (resultSelector) {
// DEPRECATED PATH
return (source: Observable<T>) =>
source.pipe(exhaustMap((a, i) => innerFrom(project(a, i)).pipe(map((b: any, ii: any) => resultSelector(a, b, i, ii)))));
}
export function exhaustMap<T, O extends ObservableInput<any>>(
project: (value: T, index: number) => O
): OperatorFunction<T, ObservedValueOf<O>> {
return operate((source, subscriber) => {

@@ -94,3 +70,3 @@ let index = 0;

});
innerFrom(project(outerValue, index++)).subscribe(innerSub);
from(project(outerValue, index++)).subscribe(innerSub);
}

@@ -97,0 +73,0 @@ },

@@ -8,15 +8,5 @@ import { Observable } from '../Observable';

export function find<T>(predicate: BooleanConstructor): OperatorFunction<T, TruthyTypesOf<T>>;
/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */
export function find<T, S extends T, A>(
predicate: (this: A, value: T, index: number, source: Observable<T>) => value is S,
thisArg: A
): OperatorFunction<T, S | undefined>;
export function find<T, S extends T>(
predicate: (value: T, index: number, source: Observable<T>) => value is S
): OperatorFunction<T, S | undefined>;
/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */
export function find<T, A>(
predicate: (this: A, value: T, index: number, source: Observable<T>) => boolean,
thisArg: A
): OperatorFunction<T, T | undefined>;
export function find<T>(predicate: (value: T, index: number, source: Observable<T>) => boolean): OperatorFunction<T, T | undefined>;

@@ -61,19 +51,10 @@ /**

* A function called with each item to test for condition matching.
* @param {any} [thisArg] An optional argument to determine the value of `this`
* in the `predicate` function.
* @return A function that returns an Observable that emits the first item that
* matches the condition.
*/
export function find<T>(
predicate: (value: T, index: number, source: Observable<T>) => boolean,
thisArg?: any
): OperatorFunction<T, T | undefined> {
return operate(createFind(predicate, thisArg, 'value'));
export function find<T>(predicate: (value: T, index: number, source: Observable<T>) => boolean): OperatorFunction<T, T | undefined> {
return operate(createFind(predicate, 'value'));
}
export function createFind<T>(
predicate: (value: T, index: number, source: Observable<T>) => boolean,
thisArg: any,
emit: 'value' | 'index'
) {
export function createFind<T>(predicate: (value: T, index: number, source: Observable<T>) => boolean, emit: 'value' | 'index') {
const findIndex = emit === 'index';

@@ -87,3 +68,3 @@ return (source: Observable<T>, subscriber: Subscriber<any>) => {

const i = index++;
if (predicate.call(thisArg, value, i, source)) {
if (predicate(value, i, source)) {
subscriber.next(findIndex ? i : value);

@@ -90,0 +71,0 @@ subscriber.complete();

@@ -7,9 +7,2 @@ import { Observable } from '../Observable';

export function findIndex<T>(predicate: BooleanConstructor): OperatorFunction<T, T extends Falsy ? -1 : number>;
/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */
export function findIndex<T>(predicate: BooleanConstructor, thisArg: any): OperatorFunction<T, T extends Falsy ? -1 : number>;
/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */
export function findIndex<T, A>(
predicate: (this: A, value: T, index: number, source: Observable<T>) => boolean,
thisArg: A
): OperatorFunction<T, number>;
export function findIndex<T>(predicate: (value: T, index: number, source: Observable<T>) => boolean): OperatorFunction<T, number>;

@@ -55,12 +48,7 @@

* A function called with each item to test for condition matching.
* @param {any} [thisArg] An optional argument to determine the value of `this`
* in the `predicate` function.
* @return A function that returns an Observable that emits the index of the
* first item that matches the condition.
*/
export function findIndex<T>(
predicate: (value: T, index: number, source: Observable<T>) => boolean,
thisArg?: any
): OperatorFunction<T, number> {
return operate(createFind(predicate, thisArg, 'index'));
export function findIndex<T>(predicate: (value: T, index: number, source: Observable<T>) => boolean): OperatorFunction<T, number> {
return operate(createFind(predicate, 'index'));
}
import { Observable } from '../Observable';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { Subject } from '../Subject';

@@ -225,3 +225,3 @@ import { ObservableInput, Observer, OperatorFunction, SubjectLike } from '../types';

// Start our duration notifier.
groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber));
groupBySourceSubscriber.add(from(duration(grouped)).subscribe(durationSubscriber));
}

@@ -228,0 +228,0 @@ }

@@ -5,6 +5,2 @@ import { OperatorFunction } from '../types';

export function map<T, R>(project: (value: T, index: number) => R): OperatorFunction<T, R>;
/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */
export function map<T, R, A>(project: (this: A, value: T, index: number) => R, thisArg: A): OperatorFunction<T, R>;
/**

@@ -38,3 +34,2 @@ * Applies a given `project` function to each value emitted by the source

* @see {@link mapTo}
* @see {@link pluck}
*

@@ -45,8 +40,6 @@ * @param {function(value: T, index: number): R} project The function to apply

* subscription, starting from the number `0`.
* @param {any} [thisArg] An optional argument to define what `this` is in the
* `project` function.
* @return A function that returns an Observable that emits the values from the
* source Observable transformed by the given `project` function.
*/
export function map<T, R>(project: (value: T, index: number) => R, thisArg?: any): OperatorFunction<T, R> {
export function map<T, R>(project: (value: T, index: number) => R): OperatorFunction<T, R> {
return operate((source, subscriber) => {

@@ -61,3 +54,3 @@ // The index of the value from the source. Used with projection.

// and send the resulting value to the consumer.
subscriber.next(project.call(thisArg, value, index++));
subscriber.next(project(value, index++));
})

@@ -64,0 +57,0 @@ );

@@ -8,7 +8,7 @@ import { COMPLETE_NOTIFICATION, errorNotification, nextNotification } from '../NotificationFactories';

* Represents all of the notifications from the source Observable as `next`
* emissions marked with their original types within {@link Notification}
* emissions marked with their original types within {@link ObservableNotification}
* objects.
*
* <span class="informal">Wraps `next`, `error` and `complete` emissions in
* {@link Notification} objects, emitted as `next` on the output Observable.
* {@link ObservableNotification} objects, emitted as `next` on the output Observable.
* </span>

@@ -48,7 +48,7 @@ *

*
* @see {@link Notification}
* @see {@link ObservableNotification}
* @see {@link dematerialize}
*
* @return A function that returns an Observable that emits
* {@link Notification} objects that wrap the original emissions from the
* {@link ObservableNotification} objects that wrap the original emissions from the
* source Observable with metadata.

@@ -55,0 +55,0 @@ */

import { Observable } from '../Observable';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { Subscriber } from '../Subscriber';

@@ -71,3 +71,3 @@ import { ObservableInput, SchedulerLike } from '../types';

// Start our inner subscription.
innerFrom(project(value, index++)).subscribe(
from(project(value, index++)).subscribe(
createOperatorSubscriber(

@@ -74,0 +74,0 @@ subscriber,

import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';
import { map } from './map';
import { innerFrom } from '../observable/innerFrom';
import { operate } from '../util/lift';
import { mergeInternals } from './mergeInternals';
import { isFunction } from '../util/isFunction';
/* tslint:disable:max-line-length */
export function mergeMap<T, O extends ObservableInput<any>>(
project: (value: T, index: number) => O,
concurrent?: number
): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export function mergeMap<T, O extends ObservableInput<any>>(
project: (value: T, index: number) => O,
resultSelector: undefined,
concurrent?: number
): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export function mergeMap<T, R, O extends ObservableInput<any>>(
project: (value: T, index: number) => O,
resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R,
concurrent?: number
): OperatorFunction<T, R>;
/* tslint:enable:max-line-length */
/**

@@ -79,19 +57,10 @@ * Projects each source value to an Observable which is merged in the output

* @return A function that returns an Observable that emits the result of
* applying the projection function (and the optional deprecated
* `resultSelector`) to each item emitted by the source Observable and merging
* the results of the Observables obtained from this transformation.
* applying the projection function to each item emitted by the source Observable
* and merging the results of the Observables obtained from this transformation.
*/
export function mergeMap<T, R, O extends ObservableInput<any>>(
export function mergeMap<T, O extends ObservableInput<any>>(
project: (value: T, index: number) => O,
resultSelector?: ((outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R) | number,
concurrent: number = Infinity
): OperatorFunction<T, ObservedValueOf<O> | R> {
if (isFunction(resultSelector)) {
// DEPRECATED PATH
return mergeMap((a, i) => map((b: any, ii: number) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent);
} else if (typeof resultSelector === 'number') {
concurrent = resultSelector;
}
): OperatorFunction<T, ObservedValueOf<O>> {
return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));
}
import { OperatorFunction, ObservedValueOf, ObservableInput } from '../types';
import { mergeMap } from './mergeMap';
import { isFunction } from '../util/isFunction';
/** @deprecated Will be removed in v9. Use {@link mergeMap} instead: `mergeMap(() => result)` */
export function mergeMapTo<O extends ObservableInput<unknown>>(
innerObservable: O,
concurrent?: number
): OperatorFunction<unknown, ObservedValueOf<O>>;
/**
* @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead.
* Details: https://rxjs.dev/deprecations/resultSelector
*/
export function mergeMapTo<T, R, O extends ObservableInput<unknown>>(
innerObservable: O,
resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R,
concurrent?: number
): OperatorFunction<T, R>;
/* tslint:enable:max-line-length */
/**
* Projects each source value to the same Observable which is merged multiple

@@ -62,14 +45,7 @@ * times in the output Observable.

*/
export function mergeMapTo<T, R, O extends ObservableInput<unknown>>(
export function mergeMapTo<O extends ObservableInput<unknown>>(
innerObservable: O,
resultSelector?: ((outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R) | number,
concurrent: number = Infinity
): OperatorFunction<T, ObservedValueOf<O> | R> {
if (isFunction(resultSelector)) {
return mergeMap(() => innerObservable, resultSelector, concurrent);
}
if (typeof resultSelector === 'number') {
concurrent = resultSelector;
}
concurrent?: number
): OperatorFunction<unknown, ObservedValueOf<O>> {
return mergeMap(() => innerObservable, concurrent);
}

@@ -0,3 +1,5 @@

import { from } from '../observable/from';
import { mergeAll } from '../operators/mergeAll';
import { operate } from '../util/lift';
import { ObservableInputTuple, OperatorFunction } from '../types';
import { merge } from './merge';

@@ -48,3 +50,5 @@ /**

): OperatorFunction<T, T | A[number]> {
return merge(...otherSources);
return operate((source, subscriber) => {
mergeAll()(from([source, ...otherSources])).subscribe(subscriber);
});
}

@@ -45,3 +45,3 @@ /** @prettier */

* intervals.pipe(
* observeOn(animationFrameScheduler) // ...but we will observe on animationFrame
* observeOn(animationFrameScheduler) // ...but we will observe on animationFrameScheduler
* ) // scheduler to ensure smooth animation.

@@ -48,0 +48,0 @@ * .subscribe(val => {

@@ -32,3 +32,3 @@ import { ObservableInputTuple, OperatorFunction } from '../types';

*
* `onErrorResumeNext` can be therefore thought of as version of {@link concat} operator, which is more permissive
* `onErrorResumeNext` can be therefore thought of as version of {@link concatWith} operator, which is more permissive
* when it comes to the errors emitted by its input Observables. While `concat` subscribes to the next Observable

@@ -96,6 +96,1 @@ * in series only if previous one successfully completed, `onErrorResumeNext` subscribes even if it ended with

}
/**
* @deprecated Renamed. Use {@link onErrorResumeNextWith} instead. Will be removed in v8.
*/
export const onErrorResumeNext = onErrorResumeNextWith;

@@ -6,3 +6,3 @@ import { Subscription } from '../Subscription';

import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { timer } from '../observable/timer';

@@ -139,3 +139,3 @@

if (delay != null) {
const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar));
const notifier = typeof delay === 'number' ? timer(delay) : from(delay(soFar));
const notifierSubscriber = createOperatorSubscriber(subscriber, () => {

@@ -142,0 +142,0 @@ notifierSubscriber.unsubscribe();

import { Observable } from '../Observable';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { Subject } from '../Subject';

@@ -66,3 +66,3 @@ import { Subscription } from '../Subscription';

// In the main subscription -- in `subscribeForRepeatWhen`.
innerFrom(notifier(completions$)).subscribe(
from(notifier(completions$)).subscribe(
createOperatorSubscriber(

@@ -69,0 +69,0 @@ subscriber,

@@ -7,3 +7,3 @@ import { MonoTypeOperatorFunction, ObservableInput } from '../types';

import { timer } from '../observable/timer';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';

@@ -131,3 +131,3 @@ /**

// and we're going to call it to get a notifier.
const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar));
const notifier = typeof delay === 'number' ? timer(delay) : from(delay(err, soFar));
const notifierSubscriber = createOperatorSubscriber(

@@ -134,0 +134,0 @@ subscriber,

import { Observable } from '../Observable';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { Subject } from '../Subject';

@@ -78,3 +78,3 @@ import { Subscription } from '../Subscription';

errors$ = new Subject();
innerFrom(notifier(errors$)).subscribe(
from(notifier(errors$)).subscribe(
createOperatorSubscriber(subscriber, () =>

@@ -81,0 +81,0 @@ // If we have an innerSub, this was an asynchronous call, kick off the retry.

@@ -1,2 +0,2 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { MonoTypeOperatorFunction, ObservableInput } from '../types';

@@ -57,3 +57,3 @@ import { operate } from '../util/lift';

);
innerFrom(notifier).subscribe(
from(notifier).subscribe(
createOperatorSubscriber(

@@ -60,0 +60,0 @@ subscriber,

@@ -43,3 +43,3 @@ import { asyncScheduler } from '../scheduler/async';

* time unit determined internally by the optional `scheduler`.
* @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for
* @param {SchedulerLike} [scheduler=asyncScheduler] The {@link SchedulerLike} to use for
* managing the timers that handle the sampling.

@@ -46,0 +46,0 @@ * @return A function that returns an Observable that emits the results of

import { OperatorFunction, ObservableInput } from '../types';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';

@@ -123,3 +123,3 @@ /**

source.subscribe(createSubscriber(aState, bState));
innerFrom(compareTo).subscribe(createSubscriber(bState, aState));
from(compareTo).subscribe(createSubscriber(bState, aState));
});

@@ -126,0 +126,0 @@ }

@@ -1,2 +0,2 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { Subject } from '../Subject';

@@ -56,3 +56,2 @@ import { Subscriber } from '../Subscriber';

* unsubscribe from the source Observable. Because the Observable is multicasting it makes the stream `hot`.
* This is an alias for `multicast(() => new Subject()), refCount()`.
*

@@ -240,3 +239,3 @@ * The subscription to the underlying source Observable can be reset (unsubscribe and resubscribe for new subscribers),

});
innerFrom(source).subscribe(connection);
from(source).subscribe(connection);
}

@@ -268,3 +267,3 @@ })(wrapperSource);

return innerFrom(on(...args)).subscribe(onSubscriber);
return from(on(...args)).subscribe(onSubscriber);
}

@@ -142,5 +142,4 @@ import { ReplaySubject } from '../ReplaySubject';

*
* @see {@link publish}
* @see {@link connectable}
* @see {@link share}
* @see {@link publishReplay}
*

@@ -147,0 +146,0 @@ * @param configOrBufferSize Maximum element count of the replay buffer or {@link ShareReplayConfig configuration}

import { MonoTypeOperatorFunction, ObservableInput } from '../types';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { noop } from '../util/noop';

@@ -65,3 +65,3 @@

innerFrom(notifier).subscribe(skipSubscriber);
from(notifier).subscribe(skipSubscriber);

@@ -68,0 +68,0 @@ source.subscribe(createOperatorSubscriber(subscriber, (value) => taking && subscriber.next(value)));

import { Subscriber } from '../Subscriber';
import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
/* tslint:disable:max-line-length */
export function switchMap<T, O extends ObservableInput<any>>(
project: (value: T, index: number) => O
): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export function switchMap<T, O extends ObservableInput<any>>(
project: (value: T, index: number) => O,
resultSelector: undefined
): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export function switchMap<T, R, O extends ObservableInput<any>>(
project: (value: T, index: number) => O,
resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R
): OperatorFunction<T, R>;
/* tslint:enable:max-line-length */
/**

@@ -28,3 +12,3 @@ * Projects each source value to an Observable which is merged in the output

* <span class="informal">Maps each value to an Observable, then flattens all of
* these inner Observables.</span>
* these inner Observables using {@link switchAll}.</span>
*

@@ -83,10 +67,8 @@ * ![](switchMap.png)

* @return A function that returns an Observable that emits the result of
* applying the projection function (and the optional deprecated
* `resultSelector`) to each item emitted by the source Observable and taking
* only the values from the most recently projected inner Observable.
* applying the projection function to each item emitted by the source Observable
* and taking only the values from the most recently projected inner Observable.
*/
export function switchMap<T, R, O extends ObservableInput<any>>(
project: (value: T, index: number) => O,
resultSelector?: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R
): OperatorFunction<T, ObservedValueOf<O> | R> {
export function switchMap<T, O extends ObservableInput<any>>(
project: (value: T, index: number) => O
): OperatorFunction<T, ObservedValueOf<O>> {
return operate((source, subscriber) => {

@@ -108,20 +90,12 @@ let innerSubscriber: Subscriber<ObservedValueOf<O>> | null = null;

innerSubscriber?.unsubscribe();
let innerIndex = 0;
const outerIndex = index++;
// Start the next inner subscription
innerFrom(project(value, outerIndex)).subscribe(
(innerSubscriber = createOperatorSubscriber(
subscriber,
// When we get a new inner value, next it through. Note that this is
// handling the deprecate result selector here. This is because with this architecture
// it ends up being smaller than using the map operator.
(innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue),
() => {
// The inner has completed. Null out the inner subscriber to
// free up memory and to signal that we have no inner subscription
// currently.
innerSubscriber = null!;
checkComplete();
}
))
from(project(value, outerIndex)).subscribe(
(innerSubscriber = createOperatorSubscriber(subscriber, undefined, () => {
// The inner has completed. Null out the inner subscriber to
// free up memory and to signal that we have no inner subscription
// currently.
innerSubscriber = null!;
checkComplete();
}))
);

@@ -128,0 +102,0 @@ },

import { switchMap } from './switchMap';
import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';
import { isFunction } from '../util/isFunction';
/** @deprecated Will be removed in v9. Use {@link switchMap} instead: `switchMap(() => result)` */
export function switchMapTo<O extends ObservableInput<unknown>>(observable: O): OperatorFunction<unknown, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export function switchMapTo<O extends ObservableInput<unknown>>(
observable: O,
resultSelector: undefined
): OperatorFunction<unknown, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export function switchMapTo<T, R, O extends ObservableInput<unknown>>(
observable: O,
resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R
): OperatorFunction<T, R>;
/**

@@ -53,13 +39,8 @@ * Projects each source value to the same Observable which is flattened multiple

* @return A function that returns an Observable that emits items from the
* given `innerObservable` (and optionally transformed through the deprecated
* `resultSelector`) every time a value is emitted on the source Observable,
* and taking only the values from the most recently projected inner
* Observable.
* given `innerObservable` every time a value is emitted on the source Observable,
* and taking only the values from the most recently projected inner Observable.
* @deprecated Will be removed in v9. Use {@link switchMap} instead: `switchMap(() => result)`
*/
export function switchMapTo<T, R, O extends ObservableInput<unknown>>(
innerObservable: O,
resultSelector?: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R
): OperatorFunction<T, ObservedValueOf<O> | R> {
return isFunction(resultSelector) ? switchMap(() => innerObservable, resultSelector) : switchMap(() => innerObservable);
export function switchMapTo<O extends ObservableInput<unknown>>(innerObservable: O): OperatorFunction<unknown, ObservedValueOf<O>> {
return switchMap(() => innerObservable);
}
import { ObservableInput, ObservedValueOf, OperatorFunction } from '../types';
import { switchMap } from './switchMap';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';

@@ -39,7 +40,10 @@ // TODO: Generate a marble diagram for these docs.

// our previous state, the value and the index.
(value: T, index) => accumulator(state, value, index),
// Using the deprecated result selector here as a dirty trick
// to update our state with the flattened value.
(_, innerValue) => ((state = innerValue), innerValue)
)(source).subscribe(subscriber);
(value: T, index) => accumulator(state, value, index)
)(source).subscribe(
createOperatorSubscriber(subscriber, (innerValue) => {
// Update our state with the flattened value.
state = innerValue;
subscriber.next(innerValue);
})
);

@@ -46,0 +50,0 @@ return () => {

@@ -54,19 +54,13 @@ import { MonoTypeOperatorFunction } from '../types';

let seen = 0;
source.subscribe(
createOperatorSubscriber(subscriber, (value) => {
// Increment the number of values we have seen,
// then check it against the allowed count to see
// if we are still letting values through.
if (++seen <= count) {
subscriber.next(value);
// If we have met or passed our allowed count,
// we need to complete. We have to do <= here,
// because re-entrant code will increment `seen` twice.
if (count <= seen) {
subscriber.complete();
}
}
})
);
const operatorSubscriber = createOperatorSubscriber<T>(subscriber, (value) => {
if (++seen < count) {
subscriber.next(value);
} else {
operatorSubscriber.unsubscribe();
subscriber.next(value);
subscriber.complete();
}
});
source.subscribe(operatorSubscriber);
});
}

@@ -49,7 +49,6 @@ import { EMPTY } from '../observable/empty';

: operate((source, subscriber) => {
// This buffer will hold the values we are going to emit
// when the source completes. Since we only want to take the
// last N values, we can't emit until we're sure we're not getting
// any more values.
let buffer: T[] = [];
// This is a ring buffer that will hold our values
let ring = new Array<T>(count);
// This counter is how we track where we are at in the ring buffer.
let counter = 0;
source.subscribe(

@@ -59,14 +58,19 @@ createOperatorSubscriber(

(value) => {
// Add the most recent value onto the end of our buffer.
buffer.push(value);
// If our buffer is now larger than the number of values we
// want to take, we remove the oldest value from the buffer.
count < buffer.length && buffer.shift();
ring[counter++ % count] = value;
},
() => {
// The source completed, we now know what are last values
// are, emit them in the order they were received.
for (const value of buffer) {
subscriber.next(value);
// We need to loop through our ring buffer.
// If we haven't filled the buffer yet, we can start at zero.
const start = count <= counter ? counter : 0;
// Only need to emit however many values we've seen,
// up to the expected count
const total = Math.min(count, counter);
for (let n = 0; n < total; n++) {
// The tricky bit here is we're incrementing `n`, and moving
// through our ring buffer, starting at the `start` index we
// found above. The `% count` will "wrap" us around to read
// the remaining values, if necessary.
subscriber.next(ring[(start + n) % count]);
}
// All done. This will also trigger clean up.
subscriber.complete();

@@ -78,3 +82,3 @@ },

// During finalization release the values in our buffer.
buffer = null!;
ring = null!;
}

@@ -81,0 +85,0 @@ )

import { MonoTypeOperatorFunction, ObservableInput } from '../types';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { noop } from '../util/noop';

@@ -48,5 +48,5 @@

return operate((source, subscriber) => {
innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));
from(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));
!subscriber.closed && source.subscribe(subscriber);
});
}

@@ -58,10 +58,16 @@ import { OperatorFunction, MonoTypeOperatorFunction, TruthyTypesOf } from '../types';

let index = 0;
source.subscribe(
createOperatorSubscriber(subscriber, (value) => {
const result = predicate(value, index++);
(result || inclusive) && subscriber.next(value);
!result && subscriber.complete();
})
);
const operatorSubscriber = createOperatorSubscriber<T>(subscriber, (value) => {
if (predicate(value, index++)) {
subscriber.next(value);
} else {
operatorSubscriber.unsubscribe();
if (inclusive) {
subscriber.next(value);
}
subscriber.complete();
}
});
source.subscribe(operatorSubscriber);
});
}

@@ -7,5 +7,67 @@ import { MonoTypeOperatorFunction, Observer } from '../types';

/**
* An extension to the {@link Observer} interface used only by the {@link tap} operator.
*
* It provides a useful set of callbacks a user can register to do side-effects in
* cases other than what the usual {@link Observer} callbacks are
* ({@link guide/glossary-and-semantics#next next},
* {@link guide/glossary-and-semantics#error error} and/or
* {@link guide/glossary-and-semantics#complete complete}).
*
* ## Example
*
* ```ts
* import { fromEvent, switchMap, tap, interval, take } from 'rxjs';
*
* const source$ = fromEvent(document, 'click');
* const result$ = source$.pipe(
* switchMap((_, i) => i % 2 === 0
* ? fromEvent(document, 'mousemove').pipe(
* tap({
* subscribe: () => console.log('Subscribed to the mouse move events after click #' + i),
* unsubscribe: () => console.log('Mouse move events #' + i + ' unsubscribed'),
* finalize: () => console.log('Mouse move events #' + i + ' finalized')
* })
* )
* : interval(1_000).pipe(
* take(5),
* tap({
* subscribe: () => console.log('Subscribed to the 1-second interval events after click #' + i),
* unsubscribe: () => console.log('1-second interval events #' + i + ' unsubscribed'),
* finalize: () => console.log('1-second interval events #' + i + ' finalized')
* })
* )
* )
* );
*
* const subscription = result$.subscribe({
* next: console.log
* });
*
* setTimeout(() => {
* console.log('Unsubscribe after 60 seconds');
* subscription.unsubscribe();
* }, 60_000);
* ```
*/
export interface TapObserver<T> extends Observer<T> {
/**
* The callback that `tap` operator invokes at the moment when the source Observable
* gets subscribed to.
*/
subscribe: () => void;
/**
* The callback that `tap` operator invokes when an explicit
* {@link guide/glossary-and-semantics#unsubscription unsubscribe} happens. It won't get invoked on
* `error` or `complete` events.
*/
unsubscribe: () => void;
/**
* The callback that `tap` operator invokes when any kind of
* {@link guide/glossary-and-semantics#finalization finalization} happens - either when
* the source Observable `error`s or `complete`s or when it gets explicitly unsubscribed
* by the user. There is no difference in using this callback or the {@link finalize}
* operator, but if you're already using `tap` operator, you can use this callback
* instead. You'd get the same result in either case.
*/
finalize: () => void;

@@ -91,7 +153,5 @@ }

* @see {@link finalize}
* @see {@link Observable#subscribe}
* @see {@link TapObserver}
*
* @param observerOrNext A next handler or partial observer
* @param error An error handler
* @param complete A completion handler
* @return A function that returns an Observable identical to the source, but

@@ -101,6 +161,4 @@ * runs the specified Observer or callback(s) for each item.

export function tap<T>(observerOrNext?: Partial<TapObserver<T>> | ((value: T) => void) | null): MonoTypeOperatorFunction<T> {
// We have to check to see not only if next is a function,
// but if error or complete were passed. This is because someone
// could technically call tap like `tap(null, fn)` or `tap(null, null, fn)`.
const tapObserver = isFunction(observerOrNext) ? { next: observerOrNext } : observerOrNext;
// Just need to see if it's a function or a partial observer.
const tapObserver: Partial<TapObserver<T>> | null | undefined = isFunction(observerOrNext) ? { next: observerOrNext } : observerOrNext;

@@ -138,5 +196,5 @@ return tapObserver

: // Tap was called with no valid tap observer or handler
// (e.g. `tap(null, null, null)` or `tap(null)` or `tap()`)
// (e.g. `tap(null)` or `tap()`)
// so we're going to just mirror the source.
identity;
}

@@ -6,3 +6,3 @@ import { Subscription } from '../Subscription';

import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';

@@ -91,3 +91,3 @@ export interface ThrottleConfig {

const startThrottle = (value: T) =>
(throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling)));
(throttled = from(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling)));

@@ -94,0 +94,0 @@ const send = () => {

@@ -7,3 +7,3 @@ import { asyncScheduler } from '../scheduler/async';

import { Observable } from '../Observable';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { createErrorClass } from '../util/createErrorClass';

@@ -349,3 +349,3 @@ import { createOperatorSubscriber } from './OperatorSubscriber';

originalSourceSubscription.unsubscribe();
innerFrom(
from(
_with!({

@@ -352,0 +352,0 @@ meta,

@@ -1,2 +0,2 @@

import { async } from '../scheduler/async';
import { asyncScheduler } from '../scheduler/async';
import { isValidDate } from '../util/isDate';

@@ -91,3 +91,3 @@ import { ObservableInput, OperatorFunction, SchedulerLike } from '../types';

let _with: () => ObservableInput<R>;
scheduler = scheduler ?? async;
scheduler = scheduler ?? asyncScheduler;

@@ -94,0 +94,0 @@ if (isValidDate(due)) {

@@ -7,3 +7,3 @@ import { Observable } from '../Observable';

import { noop } from '../util/noop';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';

@@ -79,3 +79,3 @@ /**

// Subscribe to the window boundaries.
innerFrom(windowBoundaries).subscribe(
from(windowBoundaries).subscribe(
createOperatorSubscriber(

@@ -82,0 +82,0 @@ subscriber,

@@ -6,3 +6,3 @@ import { Observable } from '../Observable';

import { operate } from '../util/lift';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { createOperatorSubscriber } from './OperatorSubscriber';

@@ -73,3 +73,3 @@ import { noop } from '../util/noop';

innerFrom(openings).subscribe(
from(openings).subscribe(
createOperatorSubscriber(

@@ -89,3 +89,3 @@ subscriber,

try {
closingNotifier = innerFrom(closingSelector(openValue));
closingNotifier = from(closingSelector(openValue));
} catch (err) {

@@ -96,3 +96,6 @@ handleError(err);

subscriber.next(window.asObservable());
// TODO: We should probably make this `.asObservable()`, but we've historically
// had windows throw an `ObjectUnsubscribedError` if you try to subscribe to them
// late. We should probably change that: (https://github.com/ReactiveX/rxjs/issues/7200)
subscriber.next(window);

@@ -99,0 +102,0 @@ closingSubscription.add(closingNotifier.subscribe(createOperatorSubscriber(subscriber, closeWindow, noop, handleError)));

@@ -7,3 +7,4 @@ import { Subscriber } from '../Subscriber';

import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { noop } from '../util/noop';

@@ -18,9 +19,11 @@ /**

*
* ![](windowWhen.png)
* ![](windowWhen.svg)
*
* Returns an Observable that emits windows of items it collects from the source
* Observable. The output Observable emits connected, non-overlapping windows.
* It emits the current window and opens a new one whenever the Observable
* produced by the specified `closingSelector` function emits an item. The first
* window is opened immediately when subscribing to the output Observable.
* Returns an Observable that emits Observable windows of items it collects from
* the source Observable. The output Observable emits connected, non-overlapping
* windows. It emits the current window immediately when subscribing to the source
* Observable and opens a new one whenever the Observable produced by the specified
* `closingSelector` function emits `next`. When an Observable returned by the
* `closingSelector` emits `next`, the previous window completes and a new window
* is emitted to the output subscriber.
*

@@ -49,5 +52,6 @@ * ## Example

*
* @param {function(): Observable} closingSelector A function that takes no
* arguments and returns an Observable that signals (on either `next` or
* `complete`) when to close the previous window and start a new one.
* @param closingSelector A function that takes no arguments and returns an
* {@link ObservableInput} (that gets converted to Observable) that signals
* when to close the previous window and start a new one. Note that a value (any value) must be
* observed to signal window closure.
* @return A function that returns an Observable of windows, which in turn are

@@ -91,3 +95,3 @@ * Observables.

try {
closingNotifier = innerFrom(closingSelector());
closingNotifier = from(closingSelector());
} catch (err) {

@@ -102,3 +106,3 @@ handleError(err);

// and open a new one.
closingNotifier.subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openWindow, openWindow, handleError)));
closingNotifier.subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openWindow, noop, handleError)));
};

@@ -105,0 +109,0 @@

import { OperatorFunction, ObservableInputTuple } from '../types';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { identity } from '../util/identity';

@@ -77,3 +77,3 @@ import { noop } from '../util/noop';

for (let i = 0; i < len; i++) {
innerFrom(inputs[i]).subscribe(
from(inputs[i]).subscribe(
createOperatorSubscriber(

@@ -80,0 +80,0 @@ subscriber,

import { ObservableInputTuple, OperatorFunction, Cons } from '../types';
import { zip } from './zip';
import { operate } from '../util/lift';
import { zip } from '../observable/zip';

@@ -28,3 +29,5 @@ /**

export function zipWith<T, A extends readonly unknown[]>(...otherInputs: [...ObservableInputTuple<A>]): OperatorFunction<T, Cons<T, A>> {
return zip(...otherInputs);
return operate((source, subscriber) => {
zip<[T, ...A]>(source, ...otherInputs).subscribe(subscriber);
});
}

@@ -59,4 +59,4 @@ import { Subject } from './Subject';

next(value: T): void {
const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;
if (!isStopped) {
const { _closed, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;
if (!_closed) {
_buffer.push(value);

@@ -71,3 +71,2 @@ !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);

protected _subscribe(subscriber: Subscriber<T>): Subscription {
this._throwIfClosed();
this._trimBuffer();

@@ -74,0 +73,0 @@

@@ -1,2 +0,2 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { observeOn } from '../operators/observeOn';

@@ -7,3 +7,3 @@ import { subscribeOn } from '../operators/subscribeOn';

export function scheduleObservable<T>(input: InteropObservable<T>, scheduler: SchedulerLike) {
return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
return from(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
}

@@ -1,2 +0,2 @@

import { innerFrom } from '../observable/innerFrom';
import { from } from '../observable/from';
import { observeOn } from '../operators/observeOn';

@@ -7,3 +7,3 @@ import { subscribeOn } from '../operators/subscribeOn';

export function schedulePromise<T>(input: PromiseLike<T>, scheduler: SchedulerLike) {
return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
return from(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
}

@@ -10,6 +10,6 @@ import { AnimationFrameAction } from './AnimationFrameAction';

*
* When `animationFrame` scheduler is used with delay, it will fall back to {@link asyncScheduler} scheduler
* behaviour.
* When `animationFrameScheduler` scheduler is used with delay, it will fall back to {@link asyncScheduler}
* scheduler behaviour.
*
* Without delay, `animationFrame` scheduler can be used to create smooth browser animations.
* Without delay, `animationFrameScheduler` scheduler can be used to create smooth browser animations.
* It makes sure scheduled task will happen just before next browser content repaint,

@@ -38,6 +38,1 @@ * thus performing animations as efficiently as possible.

export const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction);
/**
* @deprecated Renamed to {@link animationFrameScheduler}. Will be removed in v8.
*/
export const animationFrame = animationFrameScheduler;

@@ -10,7 +10,7 @@ import { AsapAction } from './AsapAction';

*
* `asap` scheduler behaves the same as {@link asyncScheduler} scheduler when you use it to delay task
* `asapScheduler` scheduler behaves the same as {@link asyncScheduler} scheduler when you use it to delay task
* in time. If however you set delay to `0`, `asap` will wait for current synchronously executing
* code to end and then it will try to execute given task as fast as possible.
*
* `asap` scheduler will do its best to minimize time between end of currently executing code
* `asapScheduler` scheduler will do its best to minimize time between end of currently executing code
* and start of scheduled task. This makes it best candidate for performing so called "deferring".

@@ -20,6 +20,6 @@ * Traditionally this was achieved by calling `setTimeout(deferredTask, 0)`, but that technique involves

*
* Note that using `asap` scheduler does not necessarily mean that your task will be first to process
* after currently executing code. In particular, if some task was also scheduled with `asap` before,
* Note that using `asapScheduler` scheduler does not necessarily mean that your task will be first to process
* after currently executing code. In particular, if some task was also scheduled with `asapScheduler` before,
* that task will execute first. That being said, if you need to schedule task asynchronously, but
* as soon as possible, `asap` scheduler is your best bet.
* as soon as possible, `asapScheduler` scheduler is your best bet.
*

@@ -42,6 +42,1 @@ * ## Example

export const asapScheduler = new AsapScheduler(AsapAction);
/**
* @deprecated Renamed to {@link asapScheduler}. Will be removed in v8.
*/
export const asap = asapScheduler;

@@ -38,3 +38,5 @@ import { AsyncAction } from './AsyncAction';

immediateProvider.clearImmediate(id);
scheduler._scheduled = undefined;
if (scheduler._scheduled === id) {
scheduler._scheduled = undefined;
}
}

@@ -41,0 +43,0 @@ // Return undefined so the action knows to request a new async id if it's rescheduled.

@@ -10,3 +10,3 @@ import { AsyncAction } from './AsyncAction';

*
* `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript
* `asyncScheduler` scheduler schedules tasks asynchronously, by putting them on the JavaScript
* event loop queue. It is best used to delay tasks in time or to schedule tasks repeating

@@ -53,6 +53,1 @@ * in intervals.

export const asyncScheduler = new AsyncScheduler(AsyncAction);
/**
* @deprecated Renamed to {@link asyncScheduler}. Will be removed in v8.
*/
export const async = asyncScheduler;

@@ -10,3 +10,3 @@ import { QueueAction } from './QueueAction';

*
* `queue` scheduler, when used with delay, behaves the same as {@link asyncScheduler} scheduler.
* `queueScheduler` scheduler, when used with delay, behaves the same as {@link asyncScheduler} scheduler.
*

@@ -18,3 +18,3 @@ * When used without delay, it schedules given task synchronously - executes it right when

*
* This means that when you execute task with `queue` scheduler, you are sure it will end
* This means that when you execute task with `queueScheduler` scheduler, you are sure it will end
* before any other task scheduled with that scheduler will start.

@@ -70,6 +70,1 @@ *

export const queueScheduler = new QueueScheduler(QueueAction);
/**
* @deprecated Renamed to {@link queueScheduler}. Will be removed in v8.
*/
export const queue = queueScheduler;

@@ -1,8 +0,5 @@

import { Operator } from './Operator';
import { Observable } from './Observable';
import { Subscriber } from './Subscriber';
import { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';
import { Observer, SubscriptionLike, TeardownLogic } from './types';
import { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';
import { arrRemove } from './util/arrRemove';
import { Subscription } from './Subscription';
import { Observer, SubscriptionLike } from './types';

@@ -17,12 +14,30 @@ /**

export class Subject<T> extends Observable<T> implements SubscriptionLike {
closed = false;
/** @internal */
_closed = false;
private currentObservers: Observer<T>[] | null = null;
/**
* Will return true if this subject has been closed and is no longer accepting new values.
*/
get closed() {
return this._closed;
}
private _observerCounter = 0;
private currentObservers = new Map<number, Observer<T>>();
/**
* This is used to track a known array of observers, so we don't have to
* clone them while iterating to prevent reentrant behaviors.
* (for example, what if the subject is subscribed to when nexting to an observer)
*/
private observerSnapshot: Observer<T>[] | undefined;
/** @internal */
get observers(): Observer<T>[] {
return (this.observerSnapshot ??= Array.from(this.currentObservers.values()));
}
/** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
observers: Observer<T>[] = [];
/** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
isStopped = false;
/** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
hasError = false;
/** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */

@@ -46,25 +61,14 @@ thrownError: any = null;

/** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
lift<R>(operator: Operator<T, R>): Observable<R> {
const subject = new AnonymousSubject(this, this);
subject.operator = operator as any;
return subject as any;
protected _clearObservers() {
this.currentObservers.clear();
this.observerSnapshot = undefined;
}
/** @internal */
protected _throwIfClosed() {
if (this.closed) {
throw new ObjectUnsubscribedError();
}
}
next(value: T) {
this._throwIfClosed();
if (!this.isStopped) {
if (!this.currentObservers) {
this.currentObservers = Array.from(this.observers);
if (!this._closed) {
const { observers } = this;
const len = observers.length;
for (let i = 0; i < len; i++) {
observers[i].next(value);
}
for (const observer of this.currentObservers) {
observer.next(value);
}
}

@@ -74,10 +78,11 @@ }

error(err: any) {
this._throwIfClosed();
if (!this.isStopped) {
this.hasError = this.isStopped = true;
if (!this._closed) {
this.hasError = this._closed = true;
this.thrownError = err;
const { observers } = this;
while (observers.length) {
observers.shift()!.error(err);
const len = observers.length;
for (let i = 0; i < len; i++) {
observers[i].error(err);
}
this._clearObservers();
}

@@ -87,9 +92,10 @@ }

complete() {
this._throwIfClosed();
if (!this.isStopped) {
this.isStopped = true;
if (!this._closed) {
this._closed = true;
const { observers } = this;
while (observers.length) {
observers.shift()!.complete();
const len = observers.length;
for (let i = 0; i < len; i++) {
observers[i].complete();
}
this._clearObservers();
}

@@ -99,19 +105,12 @@ }

unsubscribe() {
this.isStopped = this.closed = true;
this.observers = this.currentObservers = null!;
this._closed = true;
this._clearObservers();
}
get observed() {
return this.observers?.length > 0;
return this.currentObservers.size > 0;
}
/** @internal */
protected _trySubscribe(subscriber: Subscriber<T>): TeardownLogic {
this._throwIfClosed();
return super._trySubscribe(subscriber);
}
/** @internal */
protected _subscribe(subscriber: Subscriber<T>): Subscription {
this._throwIfClosed();
this._checkFinalizedStatuses(subscriber);

@@ -123,12 +122,15 @@ return this._innerSubscribe(subscriber);

protected _innerSubscribe(subscriber: Subscriber<any>) {
const { hasError, isStopped, observers } = this;
if (hasError || isStopped) {
return EMPTY_SUBSCRIPTION;
if (this.hasError || this._closed) {
return Subscription.EMPTY;
}
this.currentObservers = null;
observers.push(subscriber);
return new Subscription(() => {
this.currentObservers = null;
arrRemove(observers, subscriber);
const { currentObservers } = this;
const observerId = this._observerCounter++;
currentObservers.set(observerId, subscriber);
this.observerSnapshot = undefined;
subscriber.add(() => {
currentObservers.delete(observerId);
this.observerSnapshot = undefined;
});
return subscriber;
}

@@ -138,6 +140,6 @@

protected _checkFinalizedStatuses(subscriber: Subscriber<any>) {
const { hasError, thrownError, isStopped } = this;
const { hasError, thrownError, _closed } = this;
if (hasError) {
subscriber.error(thrownError);
} else if (isStopped) {
} else if (_closed) {
subscriber.complete();

@@ -154,5 +156,3 @@ }

asObservable(): Observable<T> {
const observable: any = new Observable<T>();
observable.source = this;
return observable;
return new Observable((subscriber) => this.subscribe(subscriber));
}

@@ -168,6 +168,6 @@ }

public destination?: Observer<T>,
source?: Observable<T>
/** @internal */
protected _source?: Observable<T>
) {
super();
this.source = source;
}

@@ -189,4 +189,4 @@

protected _subscribe(subscriber: Subscriber<T>): Subscription {
return this.source?.subscribe(subscriber) ?? EMPTY_SUBSCRIPTION;
return this._source?.subscribe(subscriber) ?? Subscription.EMPTY;
}
}
import { isFunction } from './util/isFunction';
import { Observer, ObservableNotification } from './types';
import { isSubscription, Subscription } from './Subscription';
import { Subscription } from './Subscription';
import { config } from './config';
import { reportUnhandledError } from './util/reportUnhandledError';
import { noop } from './util/noop';
import { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';

@@ -21,6 +20,6 @@ import { timeoutProvider } from './scheduler/timeoutProvider';

export class Subscriber<T> extends Subscription implements Observer<T> {
/** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
/** @internal */
protected isStopped: boolean = false;
/** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
protected destination: Subscriber<T> | Observer<T>;
/** @internal */
protected destination: Observer<T>;

@@ -41,7 +40,8 @@ /**

super();
this.destination = isSubscriber(destination) ? destination : createSafeObserver(destination);
// The only way we know that error reporting safety has been applied is if we own it.
this.destination = destination instanceof Subscriber ? destination : createSafeObserver(destination);
// Automatically chain subscriptions together here.
// if destination is a Subscription, then it is a Subscriber.
if (isSubscription(destination)) {
// if destination appears to be one of our subscriptions, we'll chain it.
if (hasAddAndUnsubscribe(destination)) {
destination.add(this);

@@ -170,12 +170,2 @@ }

/**
* An error handler used when no error handler was supplied
* to the SafeSubscriber -- meaning no error handler was supplied
* do the `subscribe` call on our observable.
* @param err The error to handle
*/
function defaultErrorHandler(err: any) {
throw err;
}
/**
* A handler for notifications that cannot be sent to a stopped subscriber.

@@ -190,20 +180,4 @@ * @param notification The notification being sent

/**
* The observer used as a stub for subscriptions where the user did not
* pass any arguments to `subscribe`. Comes with the default error handling
* behavior.
*/
export const EMPTY_OBSERVER: Readonly<Observer<any>> & { closed: true } = {
closed: true,
next: noop,
error: defaultErrorHandler,
complete: noop,
};
function isObserver<T>(value: any): value is Observer<T> {
return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);
function hasAddAndUnsubscribe(value: any): value is Subscription {
return value && isFunction(value.unsubscribe) && isFunction(value.add);
}
export function isSubscriber<T>(value: any): value is Subscriber<T> {
return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));
}
import { isFunction } from './util/isFunction';
import { UnsubscriptionError } from './util/UnsubscriptionError';
import { SubscriptionLike, TeardownLogic, Unsubscribable } from './types';
import { arrRemove } from './util/arrRemove';

@@ -31,4 +30,2 @@ /**

private _parentage: Subscription[] | Subscription | null = null;
/**

@@ -58,15 +55,2 @@ * The list of registered finalizers to execute upon unsubscription. Adding and removing from this

// Remove this from it's parents.
const { _parentage } = this;
if (_parentage) {
this._parentage = null;
if (Array.isArray(_parentage)) {
for (const parent of _parentage) {
parent.remove(this);
}
} else {
_parentage.remove(this);
}
}
const { initialTeardown: initialFinalizer } = this;

@@ -90,3 +74,3 @@ if (isFunction(initialFinalizer)) {

if (err instanceof UnsubscriptionError) {
errors = [...errors, ...err.errors];
errors.push(...err.errors);
} else {

@@ -132,11 +116,12 @@ errors.push(err);

} else {
if (teardown instanceof Subscription) {
// We don't add closed subscriptions, and we don't add the same subscription
// twice. Subscription unsubscribe is idempotent.
if (teardown.closed || teardown._hasParent(this)) {
return;
}
teardown._addParent(this);
if (teardown && 'add' in teardown) {
// If teardown is a subscription, we can make sure that if it
// unsubscribes first, it removes itself from this subscription.
teardown.add(() => {
this.remove(teardown);
});
}
(this._finalizers = this._finalizers ?? new Set()).add(teardown);
this._finalizers ??= new Set();
this._finalizers.add(teardown);
}

@@ -147,37 +132,2 @@ }

/**
* Checks to see if a this subscription already has a particular parent.
* This will signal that this subscription has already been added to the parent in question.
* @param parent the parent to check for
*/
private _hasParent(parent: Subscription) {
const { _parentage } = this;
return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));
}
/**
* Adds a parent to this subscription so it can be removed from the parent if it
* unsubscribes on it's own.
*
* NOTE: THIS ASSUMES THAT {@link _hasParent} HAS ALREADY BEEN CHECKED.
* @param parent The parent subscription to add
*/
private _addParent(parent: Subscription) {
const { _parentage } = this;
this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
}
/**
* Called on a child when it is removed via {@link #remove}.
* @param parent The parent to remove
*/
private _removeParent(parent: Subscription) {
const { _parentage } = this;
if (_parentage === parent) {
this._parentage = null;
} else if (Array.isArray(_parentage)) {
arrRemove(_parentage, parent);
}
}
/**
* Removes a finalizer from this subscription that was previously added with the {@link #add} method.

@@ -194,2 +144,7 @@ *

*
* TIP: In instances you're adding and removing _Subscriptions from other Subscriptions_, you should
* be sure to unsubscribe or otherwise get rid of the child subscription reference as soon as you remove it.
* The child subscription has a reference to the parent it was added to via closure. In most cases, this
* a non-issue, as child subscriptions are rarely long-lived.
*
* @param teardown The finalizer to remove from this subscription

@@ -199,18 +154,5 @@ */

this._finalizers?.delete(teardown);
if (teardown instanceof Subscription) {
teardown._removeParent(this);
}
}
}
export const EMPTY_SUBSCRIPTION = Subscription.EMPTY;
export function isSubscription(value: any): value is Subscription {
return (
value instanceof Subscription ||
(value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe))
);
}
function execFinalizer(finalizer: Unsubscribable | (() => void)) {

@@ -217,0 +159,0 @@ if (isFunction(finalizer)) {

@@ -17,4 +17,11 @@ // https://github.com/microsoft/TypeScript/issues/40462#issuecomment-689879308

/** OPERATOR INTERFACES */
/* OPERATOR INTERFACES */
/**
* A function type interface that describes a function that accepts one parameter `T`
* and returns another parameter `R`.
*
* Usually used to describe {@link OperatorFunction} - it always takes a single
* parameter (the source Observable) and returns another Observable.
*/
export interface UnaryFunction<T, R> {

@@ -64,3 +71,3 @@ (source: T): R;

/** SUBSCRIPTION INTERFACES */
/* SUBSCRIPTION INTERFACES */

@@ -78,3 +85,3 @@ export interface Unsubscribable {

/** OBSERVABLE INTERFACES */
/* OBSERVABLE INTERFACES */

@@ -98,7 +105,2 @@ export interface Subscribable<T> {

/**
* @deprecated Renamed to {@link InteropObservable }. Will be removed in v8.
*/
export type ObservableLike<T> = InteropObservable<T>;
/**
* An object that implements the `Symbol.observable` interface.

@@ -110,3 +112,3 @@ */

/** NOTIFICATIONS */
/* NOTIFICATIONS */

@@ -147,3 +149,3 @@ /**

/** OBSERVER INTERFACES */
/* OBSERVER INTERFACES */

@@ -173,5 +175,37 @@ export interface NextObserver<T> {

/**
* An object interface that defines a set of callback functions a user can use to get
* notified of any set of {@link Observable}
* {@link guide/glossary-and-semantics#notification notification} events.
*
* For more info, please refer to {@link guide/observer this guide}.
*/
export interface Observer<T> {
/**
* A callback function that gets called by the producer during the subscription when
* the producer "has" the `value`. It won't be called if `error` or `complete` callback
* functions have been called, nor after the consumer has unsubscribed.
*
* For more info, please refer to {@link guide/glossary-and-semantics#next this guide}.
*/
next: (value: T) => void;
/**
* A callback function that gets called by the producer if and when it encountered a
* problem of any kind. The errored value will be provided through the `err` parameter.
* This callback can't be called more than one time, it can't be called if the
* `complete` callback function have been called previously, nor it can't be called if
* the consumer has unsubscribed.
*
* For more info, please refer to {@link guide/glossary-and-semantics#error this guide}.
*/
error: (err: any) => void;
/**
* A callback function that gets called by the producer if and when it has no more
* values to provide (by calling `next` callback function). This means that no error
* has happened. This callback can't be called more than one time, it can't be called
* if the `error` callback function have been called previously, nor it can't be called
* if the consumer has unsubscribed.
*
* For more info, please refer to {@link guide/glossary-and-semantics#complete this guide}.
*/
complete: () => void;

@@ -182,3 +216,3 @@ }

/** SCHEDULER INTERFACES */
/* SCHEDULER INTERFACES */

@@ -226,7 +260,2 @@ export interface SchedulerLike extends TimestampProvider {

/**
* @deprecated Renamed to {@link ObservedValueUnionFromArray}. Will be removed in v8.
*/
export type ObservedValuesFromArray<X> = ObservedValueUnionFromArray<X>;
/**
* Extracts a tuple of element types from an `ObservableInput<any>[]`.

@@ -293,18 +322,2 @@ * If you have `O extends ObservableInput<any>[]` and you pass in

// We shouldn't rely on this type definition being available globally yet since it's
// not necessarily available in every TS environment.
interface ReadableStreamDefaultReaderLike<T> {
// HACK: As of TS 4.2.2, The provided types for the iterator results of a `ReadableStreamDefaultReader`
// are significantly different enough from `IteratorResult` as to cause compilation errors.
// The type at the time is `ReadableStreamDefaultReadResult`.
read(): PromiseLike<
| {
done: false;
value: T;
}
| { done: true; value?: undefined }
>;
releaseLock(): void;
}
/**

@@ -315,5 +328,3 @@ * The base signature RxJS will look for to identify and use

*/
export interface ReadableStreamLike<T> {
getReader(): ReadableStreamDefaultReaderLike<T>;
}
export type ReadableStreamLike<T> = Pick<ReadableStream<T>, 'getReader'>;

@@ -320,0 +331,0 @@ /**

@@ -13,12 +13,6 @@ const { isArray } = Array;

const first = args[0];
if (isArray(first)) {
return { args: first, keys: null };
const result = arrayOrObject(first);
if (result) {
return result;
}
if (isPOJO(first)) {
const keys = getKeys(first);
return {
args: keys.map((key) => first[key]),
keys,
};
}
}

@@ -29,4 +23,18 @@

export function arrayOrObject<T, O extends Record<string, T>>(first: T | T[] | O) {
if (isArray(first)) {
return { args: first, keys: null };
}
if (isPOJO(first)) {
const keys = getKeys(first);
return {
args: keys.map((key) => first[key]),
keys,
};
}
return null;
}
function isPOJO(obj: any): obj is object {
return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto;
}
import { Observable } from '../Observable';
import { Subscriber } from '../Subscriber';
import { OperatorFunction } from '../types';
import { isFunction } from './isFunction';
/**
* Used to determine if an object is an Observable with a lift function.
*/
export function hasLift(source: any): source is { lift: InstanceType<typeof Observable>['lift'] } {
return isFunction(source?.lift);
}
/**
* Creates an `OperatorFunction`. Used to define operators throughout the library in a concise way.

@@ -20,14 +12,3 @@ * @param init The logic to connect the liftedSource to the subscriber at the moment of subscription.

): OperatorFunction<T, R> {
return (source: Observable<T>) => {
if (hasLift(source)) {
return source.lift(function (this: Subscriber<R>, liftedSource: Observable<T>) {
try {
return init(liftedSource, this);
} catch (err) {
this.error(err);
}
});
}
throw new TypeError('Unable to lift unknown Observable type');
};
return (source: Observable<T>) => new Observable((subscriber) => init(source, subscriber));
}

@@ -10,7 +10,4 @@ /* Operator exports */

export { catchError } from '../internal/operators/catchError';
export { combineAll } from '../internal/operators/combineAll';
export { combineLatestAll } from '../internal/operators/combineLatestAll';
export { combineLatest } from '../internal/operators/combineLatest';
export { combineLatestWith } from '../internal/operators/combineLatestWith';
export { concat } from '../internal/operators/concat';
export { concatAll } from '../internal/operators/concatAll';

@@ -34,3 +31,2 @@ export { concatMap } from '../internal/operators/concatMap';

export { every } from '../internal/operators/every';
export { exhaust } from '../internal/operators/exhaust';
export { exhaustAll } from '../internal/operators/exhaustAll';

@@ -52,5 +48,3 @@ export { exhaustMap } from '../internal/operators/exhaustMap';

export { max } from '../internal/operators/max';
export { merge } from '../internal/operators/merge';
export { mergeAll } from '../internal/operators/mergeAll';
export { flatMap } from '../internal/operators/flatMap';
export { mergeMap } from '../internal/operators/mergeMap';

@@ -61,13 +55,6 @@ export { mergeMapTo } from '../internal/operators/mergeMapTo';

export { min } from '../internal/operators/min';
export { multicast } from '../internal/operators/multicast';
export { observeOn } from '../internal/operators/observeOn';
export { onErrorResumeNext } from '../internal/operators/onErrorResumeNextWith';
export { onErrorResumeNextWith } from '../internal/operators/onErrorResumeNextWith';
export { pairwise } from '../internal/operators/pairwise';
export { partition } from '../internal/operators/partition';
export { pluck } from '../internal/operators/pluck';
export { publish } from '../internal/operators/publish';
export { publishBehavior } from '../internal/operators/publishBehavior';
export { publishLast } from '../internal/operators/publishLast';
export { publishReplay } from '../internal/operators/publishReplay';
export { race } from '../internal/operators/race';
export { raceWith } from '../internal/operators/raceWith';

@@ -79,3 +66,2 @@ export { reduce } from '../internal/operators/reduce';

export { retryWhen } from '../internal/operators/retryWhen';
export { refCount } from '../internal/operators/refCount';
export { sample } from '../internal/operators/sample';

@@ -102,3 +88,3 @@ export { sampleTime } from '../internal/operators/sampleTime';

export { takeWhile } from '../internal/operators/takeWhile';
export { tap } from '../internal/operators/tap';
export { tap, TapObserver } from '../internal/operators/tap';
export { throttle, ThrottleConfig } from '../internal/operators/throttle';

@@ -118,4 +104,3 @@ export { throttleTime } from '../internal/operators/throttleTime';

export { withLatestFrom } from '../internal/operators/withLatestFrom';
export { zip } from '../internal/operators/zip';
export { zipAll } from '../internal/operators/zipAll';
export { zipWith } from '../internal/operators/zipWith';

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc