new license file version [CI SKIP]

This commit is contained in:
2023-03-15 13:43:57 +00:00
parent d8a3063735
commit 00359d25c1
5600 changed files with 523898 additions and 2 deletions

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J E F G A B BC"},B:{"1":"L H M N O P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t","2":"C K"},C:{"1":"NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB","2":"0 1 2 3 4 5 6 7 8 9 CC tB I u J E F G A B C K L H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB DC EC"},D:{"1":"UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB FC","2":"0 1 2 3 4 5 6 7 8 9 I u J E F G A B C K L H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB"},E:{"1":"B C K L H 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC","2":"I u J E F G A GC zB HC IC JC KC"},F:{"1":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d","2":"0 1 2 3 4 5 6 7 8 9 G B C H M N O v w x y z AB BB CB DB EB FB GB OC PC QC RC qB 9B SC rB"},G:{"1":"bC cC dC eC fC gC hC iC jC kC lC mC 2B 3B 4B 5B sB 6B 7B 8B","2":"F zB TC AC UC VC WC XC YC ZC aC"},H:{"2":"nC"},I:{"1":"D","2":"tB I oC pC qC rC AC sC tC"},J:{"2":"E","16":"A"},K:{"1":"e","2":"A B C qB 9B rB"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"uC"},P:{"1":"wC xC yC zC 0B 0C 1C 2C 3C 4C sB 5C 6C 7C","2":"I vC"},Q:{"1":"1B"},R:{"1":"8C"},S:{"1":"9C"}},B:6,C:"Object.entries"};

View File

@@ -0,0 +1,97 @@
import { Operator } from '../Operator';
import { Observable } from '../Observable';
import { Subscriber } from '../Subscriber';
import { ObservableInput, OperatorFunction, TeardownLogic } from '../types';
import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';
export function exhaust<T>(): OperatorFunction<ObservableInput<T>, T>;
export function exhaust<R>(): OperatorFunction<any, R>;
/**
* Converts a higher-order Observable into a first-order Observable by dropping
* inner Observables while the previous inner Observable has not yet completed.
*
* <span class="informal">Flattens an Observable-of-Observables by dropping the
* next inner Observables while the current inner is still executing.</span>
*
* ![](exhaust.png)
*
* `exhaust` subscribes to an Observable that emits Observables, also known as a
* higher-order Observable. Each time it observes one of these emitted inner
* Observables, the output Observable begins emitting the items emitted by that
* inner Observable. So far, it behaves like {@link mergeAll}. However,
* `exhaust` ignores every new inner Observable if the previous Observable has
* not yet completed. Once that one completes, it will accept and flatten the
* next inner Observable and repeat this process.
*
* ## Example
* Run a finite timer for each click, only if there is no currently active timer
* ```ts
* import { fromEvent, interval } from 'rxjs';
* import { exhaust, map, take } from 'rxjs/operators';
*
* const clicks = fromEvent(document, 'click');
* const higherOrder = clicks.pipe(
* map((ev) => interval(1000).pipe(take(5))),
* );
* const result = higherOrder.pipe(exhaust());
* result.subscribe(x => console.log(x));
* ```
*
* @see {@link combineAll}
* @see {@link concatAll}
* @see {@link switchAll}
* @see {@link switchMap}
* @see {@link mergeAll}
* @see {@link exhaustMap}
* @see {@link zipAll}
*
* @return {Observable} An Observable that takes a source of Observables and propagates the first observable
* exclusively until it completes before subscribing to the next.
* @method exhaust
* @owner Observable
*/
export function exhaust<T>(): OperatorFunction<any, T> {
return (source: Observable<T>) => source.lift(new SwitchFirstOperator<T>());
}
class SwitchFirstOperator<T> implements Operator<T, T> {
call(subscriber: Subscriber<T>, source: any): TeardownLogic {
return source.subscribe(new SwitchFirstSubscriber(subscriber));
}
}
/**
* We need this JSDoc comment for affecting ESDoc.
* @ignore
* @extends {Ignored}
*/
class SwitchFirstSubscriber<T> extends SimpleOuterSubscriber<T, T> {
private hasCompleted: boolean = false;
private hasSubscription: boolean = false;
constructor(destination: Subscriber<T>) {
super(destination);
}
protected _next(value: T): void {
if (!this.hasSubscription) {
this.hasSubscription = true;
this.add(innerSubscribe(value, new SimpleInnerSubscriber(this)));
}
}
protected _complete(): void {
this.hasCompleted = true;
if (!this.hasSubscription) {
this.destination.complete!();
}
}
notifyComplete(): void {
this.hasSubscription = false;
if (this.hasCompleted) {
this.destination.complete!();
}
}
}

View File

@@ -0,0 +1,3 @@
import { AjaxObservable } from './AjaxObservable';
export const ajax = (() => AjaxObservable.create)();
//# sourceMappingURL=ajax.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"timeoutWith.js","sources":["../../../src/internal/operators/timeoutWith.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AA2DjG,MAAM,UAAU,WAAW,CAAO,GAAkB,EAClB,cAAkC,EAClC,YAA2B,KAAK;IAChE,OAAO,CAAC,MAAqB,EAAE,EAAE;QAC/B,IAAI,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,OAAO,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAS,GAAG,CAAC,CAAC;QACjF,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,mBAAmB,CAAC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC,CAAC;IACnG,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,mBAAmB;IACvB,YAAoB,OAAe,EACf,eAAwB,EACxB,cAAoC,EACpC,SAAwB;QAHxB,YAAO,GAAP,OAAO,CAAQ;QACf,oBAAe,GAAf,eAAe,CAAS;QACxB,mBAAc,GAAd,cAAc,CAAsB;QACpC,cAAS,GAAT,SAAS,CAAe;IAC5C,CAAC;IAED,IAAI,CAAC,UAAyB,EAAE,MAAW;QACzC,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,qBAAqB,CAC/C,UAAU,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,SAAS,CACpF,CAAC,CAAC;IACL,CAAC;CACF;AAOD,MAAM,qBAA4B,SAAQ,qBAA2B;IAInE,YAAY,WAA0B,EAClB,eAAwB,EACxB,OAAe,EACf,cAAoC,EACpC,SAAwB;QAC1C,KAAK,CAAC,WAAW,CAAC,CAAC;QAJD,oBAAe,GAAf,eAAe,CAAS;QACxB,YAAO,GAAP,OAAO,CAAQ;QACf,mBAAc,GAAd,cAAc,CAAsB;QACpC,cAAS,GAAT,SAAS,CAAe;QAE1C,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IAEO,MAAM,CAAC,eAAe,CAAO,UAAuC;QAC1E,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC;QACtC,UAAU,CAAC,sBAAsB,EAAE,CAAC;QACpC,UAAU,CAAC,GAAG,CAAC,cAAc,CAAC,cAAc,EAAE,IAAI,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACxF,CAAC;IAEO,eAAe;QACrB,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QACxB,IAAI,MAAM,EAAE;YAMV,IAAI,CAAC,MAAM,GAAmD,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAE,CAAC;SACpG;aAAM;YACL,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,GAAmD,IAAI,CAAC,SAAS,CAAC,QAAQ,CAC5F,qBAAqB,CAAC,eAAsB,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAChE,CAAC,CAAC;SACL;IACH,CAAC;IAES,KAAK,CAAC,KAAQ;QACtB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;YACzB,IAAI,CAAC,eAAe,EAAE,CAAC;SACxB;QACD,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IAGD,YAAY;QACV,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,IAAK,CAAC;QACvB,IAAI,CAAC,cAAc,GAAG,IAAK,CAAC;IAC9B,CAAC;CACF"}

View File

@@ -0,0 +1,54 @@
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
import * as tslib_1 from "tslib";
import { Subscriber } from '../Subscriber';
export function count(predicate) {
return function (source) { return source.lift(new CountOperator(predicate, source)); };
}
var CountOperator = /*@__PURE__*/ (function () {
function CountOperator(predicate, source) {
this.predicate = predicate;
this.source = source;
}
CountOperator.prototype.call = function (subscriber, source) {
return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));
};
return CountOperator;
}());
var CountSubscriber = /*@__PURE__*/ (function (_super) {
tslib_1.__extends(CountSubscriber, _super);
function CountSubscriber(destination, predicate, source) {
var _this = _super.call(this, destination) || this;
_this.predicate = predicate;
_this.source = source;
_this.count = 0;
_this.index = 0;
return _this;
}
CountSubscriber.prototype._next = function (value) {
if (this.predicate) {
this._tryPredicate(value);
}
else {
this.count++;
}
};
CountSubscriber.prototype._tryPredicate = function (value) {
var result;
try {
result = this.predicate(value, this.index++, this.source);
}
catch (err) {
this.destination.error(err);
return;
}
if (result) {
this.count++;
}
};
CountSubscriber.prototype._complete = function () {
this.destination.next(this.count);
this.destination.complete();
};
return CountSubscriber;
}(Subscriber));
//# sourceMappingURL=count.js.map

View File

@@ -0,0 +1,108 @@
import { Subject } from './Subject';
import { queue } from './scheduler/queue';
import { Subscription } from './Subscription';
import { ObserveOnSubscriber } from './operators/observeOn';
import { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';
import { SubjectSubscription } from './SubjectSubscription';
export class ReplaySubject extends Subject {
constructor(bufferSize = Number.POSITIVE_INFINITY, windowTime = Number.POSITIVE_INFINITY, scheduler) {
super();
this.scheduler = scheduler;
this._events = [];
this._infiniteTimeWindow = false;
this._bufferSize = bufferSize < 1 ? 1 : bufferSize;
this._windowTime = windowTime < 1 ? 1 : windowTime;
if (windowTime === Number.POSITIVE_INFINITY) {
this._infiniteTimeWindow = true;
this.next = this.nextInfiniteTimeWindow;
}
else {
this.next = this.nextTimeWindow;
}
}
nextInfiniteTimeWindow(value) {
if (!this.isStopped) {
const _events = this._events;
_events.push(value);
if (_events.length > this._bufferSize) {
_events.shift();
}
}
super.next(value);
}
nextTimeWindow(value) {
if (!this.isStopped) {
this._events.push(new ReplayEvent(this._getNow(), value));
this._trimBufferThenGetEvents();
}
super.next(value);
}
_subscribe(subscriber) {
const _infiniteTimeWindow = this._infiniteTimeWindow;
const _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();
const scheduler = this.scheduler;
const len = _events.length;
let subscription;
if (this.closed) {
throw new ObjectUnsubscribedError();
}
else if (this.isStopped || this.hasError) {
subscription = Subscription.EMPTY;
}
else {
this.observers.push(subscriber);
subscription = new SubjectSubscription(this, subscriber);
}
if (scheduler) {
subscriber.add(subscriber = new ObserveOnSubscriber(subscriber, scheduler));
}
if (_infiniteTimeWindow) {
for (let i = 0; i < len && !subscriber.closed; i++) {
subscriber.next(_events[i]);
}
}
else {
for (let i = 0; i < len && !subscriber.closed; i++) {
subscriber.next(_events[i].value);
}
}
if (this.hasError) {
subscriber.error(this.thrownError);
}
else if (this.isStopped) {
subscriber.complete();
}
return subscription;
}
_getNow() {
return (this.scheduler || queue).now();
}
_trimBufferThenGetEvents() {
const now = this._getNow();
const _bufferSize = this._bufferSize;
const _windowTime = this._windowTime;
const _events = this._events;
const eventsCount = _events.length;
let spliceCount = 0;
while (spliceCount < eventsCount) {
if ((now - _events[spliceCount].time) < _windowTime) {
break;
}
spliceCount++;
}
if (eventsCount > _bufferSize) {
spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);
}
if (spliceCount > 0) {
_events.splice(0, spliceCount);
}
return _events;
}
}
class ReplayEvent {
constructor(time, value) {
this.time = time;
this.value = value;
}
}
//# sourceMappingURL=ReplaySubject.js.map

View File

@@ -0,0 +1,7 @@
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("rxjs-compat/operator/auditTime"));
//# sourceMappingURL=auditTime.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"root.js","sources":["../src/util/root.ts"],"names":[],"mappings":";;;;;AAAA,2CAAsC"}

View File

@@ -0,0 +1 @@
{"name":"mimic-response","version":"1.0.1","files":{"license":{"checkedAt":1678887829653,"integrity":"sha512-nIst73auX/5NY2Fmv5Y116vWnNrEv4GaIUX3lpZG05rpXJY2S8EX+fpUS5hRjClCM0VdT2Za9DDHXXB5jdSrEw==","mode":420,"size":1109},"package.json":{"checkedAt":1678887829944,"integrity":"sha512-clOzfU+SVO/DqZOnA501d0+9/TCWhF2ezFoOMZrUupa9FlwjJZG0X4lNSkgJDE8l3GNe2Z7j8kjQGXW3BJQlDw==","mode":420,"size":651},"index.js":{"checkedAt":1678887829944,"integrity":"sha512-rsl8YKUB2ROVqH0okNt+MMHS0rPt4bCtFObm4AtwBkmJ048Z4LL1UGgDfWt5JLeRgF3h4YO0l8VinW4VSwa2Yw==","mode":420,"size":758},"readme.md":{"checkedAt":1678887829944,"integrity":"sha512-f7niicD456PVgRkblEIFPLjp5eISlo4yR4J7iEzphgmMjZdiOgg5jCpYdkp8eiFtXpgd+ZCbCmhYEgwunveEwA==","mode":420,"size":1066}}}

View File

@@ -0,0 +1 @@
{"name":"execa","version":"4.1.0","files":{"license":{"checkedAt":1678887829613,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"lib/command.js":{"checkedAt":1678887829611,"integrity":"sha512-LOqJrua500Zy3EqIXIsEsBtHoFGOHXvXvGlo9Hhm59JAOmNSi1L+96IAGcVSZaCZ9nrewgiUsVkzj6MK3+pHSw==","mode":420,"size":726},"lib/error.js":{"checkedAt":1678887829611,"integrity":"sha512-88yv42oOUFWYWSQLwnLjscS70qeF/0zaOi8SS98XzGpdXu8CB4dj+FT1KxGZwIFucBdIfcBR7+g2euaLXP+Q4g==","mode":420,"size":2112},"index.js":{"checkedAt":1678887830191,"integrity":"sha512-xdQqZg3gpCJKQNnWGkiPKh8BEnH5C3PU3SuuVmSW+LUe6rhWP2t/vx1CG5wceHsS9PjY1dht84ucOyT+BAwCEQ==","mode":420,"size":6293},"lib/kill.js":{"checkedAt":1678887829615,"integrity":"sha512-stIeBMOVn3XdPvSc2qiebakvX4/ljH/qsCDUCvK2gxkFn/KYXYApZCWvGfzuuunXFe1MUIms1Y46XUkat1JJiw==","mode":420,"size":3006},"lib/promise.js":{"checkedAt":1678887829619,"integrity":"sha512-2TdOa1uVMWeNKIHffnDXm3ZxqI8Wd3OCwQtZuLqmSXpxqRO3f9EaJpr3QiTMWqZRdkVkcRNcMDkHImFsWLBnFw==","mode":420,"size":1150},"lib/stream.js":{"checkedAt":1678887829615,"integrity":"sha512-YEuSVDQPfhFfzZ9ec6QWcLcFICp/fzxmensS6SNiMzYCl4307wW//TzZGDgC5ETZFwJLBAaadkCLWcrT8jSblQ==","mode":420,"size":2400},"lib/stdio.js":{"checkedAt":1678887830205,"integrity":"sha512-iEFl1eVHHL+aAmZo/K5fWGJEzweTJMYdnOscbXptGSZK1lRrKSXmKfp3yL/C6X/BKCp66LLor9Th8hOUGjme6w==","mode":420,"size":1159},"package.json":{"checkedAt":1678887830205,"integrity":"sha512-GuK1m8k/WWGSmm48DOCNG0hRa5N2pHFjOU77HI/adpnCYlUwTW8SGDuEvWFHwobKcGztW7fH6kazi5I12qBXMw==","mode":420,"size":1264},"readme.md":{"checkedAt":1678887830212,"integrity":"sha512-3pD+S4KeMf0xGU5G/yGYOX5oPYrlYd7BfvnFxVUvcZ3gv/76vKZAJJsoWN+JAY0+tCW39p9cHDBgxbNNIcWpGg==","mode":420,"size":19596},"index.d.ts":{"checkedAt":1678887830218,"integrity":"sha512-CTKdHzUgF1PD+HuEMNc7iAJvPYkYOZC7KyFLuO1bvS/LOsT8/pJVBBl1bypXGKkELSdoLXxjF5ocVPald5PkRA==","mode":420,"size":17217}}}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"1":"J E F G A B BC"},B:{"1":"C K L H M N O P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I u J E F G A B C K L H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB DC EC","2":"CC","4":"tB"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I u J E F G A B C K L H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB FC"},E:{"1":"I u J E F G A B C K L H GC zB HC IC JC KC 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 G B C H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d OC PC QC RC qB 9B SC rB"},G:{"1":"F UC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC 2B 3B 4B 5B sB 6B 7B 8B","2":"zB TC AC"},H:{"2":"nC"},I:{"1":"tB I D rC AC sC tC","2":"oC pC qC"},J:{"1":"E A"},K:{"1":"e rB","2":"A B C qB 9B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"uC"},P:{"1":"I vC wC xC yC zC 0B 0C 1C 2C 3C 4C sB 5C 6C 7C"},Q:{"1":"1B"},R:{"1":"8C"},S:{"1":"9C"}},B:1,C:"contenteditable attribute (basic support)"};

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"1":"A B","2":"J E F G BC"},B:{"1":"C K L H M N O P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t"},C:{"1":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB","2":"0 1 2 3 4 5 6 7 8 9 CC tB I u J E F G A B C K L H M N O v w x y z AB BB CB DB DC EC"},D:{"1":"1 2 3 4 5 6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB FC","2":"0 I u J E F G A B C K L H M N O v w x y z"},E:{"1":"B C K L H qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC","2":"I u J E F G A GC zB HC IC JC KC 0B"},F:{"1":"0 1 2 3 4 5 6 7 8 9 H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d","2":"G B C OC PC QC RC qB 9B SC rB"},G:{"1":"cC dC eC fC gC hC iC jC kC lC mC 2B 3B 4B 5B sB 6B 7B 8B","2":"F zB TC AC UC VC WC XC YC ZC aC bC"},H:{"2":"nC"},I:{"1":"D sC tC","2":"tB I oC pC qC rC AC"},J:{"2":"E A"},K:{"1":"e","2":"A B C qB 9B rB"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"uC"},P:{"1":"I vC wC xC yC zC 0B 0C 1C 2C 3C 4C sB 5C 6C 7C"},Q:{"1":"1B"},R:{"1":"8C"},S:{"1":"9C"}},B:2,C:"User Timing API"};

View File

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

View File

@@ -0,0 +1,91 @@
import { Observable } from '../Observable';
import { SubscribableOrPromise } from '../types';
/**
* Decides at subscription time which Observable will actually be subscribed.
*
* <span class="informal">`If` statement for Observables.</span>
*
* `iif` accepts a condition function and two Observables. When
* an Observable returned by the operator is subscribed, condition function will be called.
* Based on what boolean it returns at that moment, consumer will subscribe either to
* the first Observable (if condition was true) or to the second (if condition was false). Condition
* function may also not return anything - in that case condition will be evaluated as false and
* second Observable will be subscribed.
*
* Note that Observables for both cases (true and false) are optional. If condition points to an Observable that
* was left undefined, resulting stream will simply complete immediately. That allows you to, rather
* than controlling which Observable will be subscribed, decide at runtime if consumer should have access
* to given Observable or not.
*
* If you have more complex logic that requires decision between more than two Observables, {@link defer}
* will probably be a better choice. Actually `iif` can be easily implemented with {@link defer}
* and exists only for convenience and readability reasons.
*
*
* ## Examples
* ### Change at runtime which Observable will be subscribed
* ```ts
* import { iif, of } from 'rxjs';
*
* let subscribeToFirst;
* const firstOrSecond = iif(
* () => subscribeToFirst,
* of('first'),
* of('second'),
* );
*
* subscribeToFirst = true;
* firstOrSecond.subscribe(value => console.log(value));
*
* // Logs:
* // "first"
*
* subscribeToFirst = false;
* firstOrSecond.subscribe(value => console.log(value));
*
* // Logs:
* // "second"
*
* ```
*
* ### Control an access to an Observable
* ```ts
* let accessGranted;
* const observableIfYouHaveAccess = iif(
* () => accessGranted,
* of('It seems you have an access...'), // Note that only one Observable is passed to the operator.
* );
*
* accessGranted = true;
* observableIfYouHaveAccess.subscribe(
* value => console.log(value),
* err => {},
* () => console.log('The end'),
* );
*
* // Logs:
* // "It seems you have an access..."
* // "The end"
*
* accessGranted = false;
* observableIfYouHaveAccess.subscribe(
* value => console.log(value),
* err => {},
* () => console.log('The end'),
* );
*
* // Logs:
* // "The end"
* ```
*
* @see {@link defer}
*
* @param {function(): boolean} condition Condition which Observable should be chosen.
* @param {Observable} [trueObservable] An Observable that will be subscribed if condition is true.
* @param {Observable} [falseObservable] An Observable that will be subscribed if condition is false.
* @return {Observable} Either first or second Observable, depending on condition.
* @static true
* @name iif
* @owner Observable
*/
export declare function iif<T = never, F = never>(condition: () => boolean, trueResult?: SubscribableOrPromise<T>, falseResult?: SubscribableOrPromise<F>): Observable<T | F>;

View File

@@ -0,0 +1,108 @@
import { AsyncAction } from './AsyncAction';
import { Subscription } from '../Subscription';
import { AsyncScheduler } from './AsyncScheduler';
import { SchedulerAction } from '../types';
export class VirtualTimeScheduler extends AsyncScheduler {
protected static frameTimeFactor: number = 10;
public frame: number = 0;
public index: number = -1;
constructor(SchedulerAction: typeof AsyncAction = VirtualAction as any,
public maxFrames: number = Number.POSITIVE_INFINITY) {
super(SchedulerAction, () => this.frame);
}
/**
* Prompt the Scheduler to execute all of its queued actions, therefore
* clearing its queue.
* @return {void}
*/
public flush(): void {
const {actions, maxFrames} = this;
let error: any, action: AsyncAction<any>;
while ((action = actions[0]) && action.delay <= maxFrames) {
actions.shift();
this.frame = action.delay;
if (error = action.execute(action.state, action.delay)) {
break;
}
}
if (error) {
while (action = actions.shift()) {
action.unsubscribe();
}
throw error;
}
}
}
/**
* We need this JSDoc comment for affecting ESDoc.
* @nodoc
*/
export class VirtualAction<T> extends AsyncAction<T> {
protected active: boolean = true;
constructor(protected scheduler: VirtualTimeScheduler,
protected work: (this: SchedulerAction<T>, state?: T) => void,
protected index: number = scheduler.index += 1) {
super(scheduler, work);
this.index = scheduler.index = index;
}
public schedule(state?: T, delay: number = 0): Subscription {
if (!this.id) {
return super.schedule(state, delay);
}
this.active = false;
// If an action is rescheduled, we save allocations by mutating its state,
// pushing it to the end of the scheduler queue, and recycling the action.
// But since the VirtualTimeScheduler is used for testing, VirtualActions
// must be immutable so they can be inspected later.
const action = new VirtualAction(this.scheduler, this.work);
this.add(action);
return action.schedule(state, delay);
}
protected requestAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay: number = 0): any {
this.delay = scheduler.frame + delay;
const {actions} = scheduler;
actions.push(this);
(actions as Array<VirtualAction<T>>).sort(VirtualAction.sortActions);
return true;
}
protected recycleAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay: number = 0): any {
return undefined;
}
protected _execute(state: T, delay: number): any {
if (this.active === true) {
return super._execute(state, delay);
}
}
public static sortActions<T>(a: VirtualAction<T>, b: VirtualAction<T>) {
if (a.delay === b.delay) {
if (a.index === b.index) {
return 0;
} else if (a.index > b.index) {
return 1;
} else {
return -1;
}
} else if (a.delay > b.delay) {
return 1;
} else {
return -1;
}
}
}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J E F G A B BC"},B:{"1":"M N O","2":"C K L","516":"H","1025":"P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t"},C:{"1":"VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB","2":"0 1 2 3 4 5 6 7 8 9 CC tB I u J E F G A B C K L H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB DC EC","194":"SB TB UB"},D:{"1":"YB uB ZB vB aB bB cB","2":"0 1 2 3 4 5 6 7 8 9 I u J E F G A B C K L H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB","516":"RB SB TB UB VB WB XB","1025":"dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB FC"},E:{"1":"K L H rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC","2":"I u J E F G A B C GC zB HC IC JC KC 0B qB"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB","2":"0 1 2 3 4 5 6 7 8 9 G B C H M N O v w x y z AB BB CB DB OC PC QC RC qB 9B SC rB","516":"EB FB GB HB IB JB KB","1025":"cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d"},G:{"1":"fC gC hC iC jC kC lC mC 2B 3B 4B 5B sB 6B 7B 8B","2":"F zB TC AC UC VC WC XC YC ZC aC bC cC dC eC"},H:{"2":"nC"},I:{"2":"tB I oC pC qC rC AC sC tC","1025":"D"},J:{"2":"E A"},K:{"2":"A B C qB 9B rB","1025":"e"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"uC"},P:{"1":"xC yC zC 0B 0C 1C 2C 3C 4C sB 5C 6C 7C","2":"I","516":"vC wC"},Q:{"1025":"1B"},R:{"1":"8C"},S:{"2":"9C"}},B:5,C:"IntersectionObserver"};

View File

@@ -0,0 +1 @@
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0.00441,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0.00441,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0.00441,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0.00441,"92":0,"93":0,"94":0,"95":0.00441,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0.01764,"103":0,"104":0.00441,"105":0.00441,"106":0,"107":0.00441,"108":0.27342,"109":0.19404,"110":0,"111":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0.00882,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0.00441,"64":0,"65":0,"66":0,"67":0.00441,"68":0,"69":0,"70":0.01323,"71":0,"72":0,"73":0.02646,"74":0,"75":0,"76":0.01764,"77":0,"78":0,"79":0.03969,"80":0,"81":0.00882,"83":0.00441,"84":0,"85":0,"86":0.01764,"87":0.03528,"88":0.02205,"89":0,"90":0,"91":0.00882,"92":0.02205,"93":0.01764,"94":0.01323,"95":0.00882,"96":0.00882,"97":0.00441,"98":0.00441,"99":0.00882,"100":0.00882,"101":0.00441,"102":0.00882,"103":0.15435,"104":0.00882,"105":0.0441,"106":0.06615,"107":0.12789,"108":5.55219,"109":4.82454,"110":0,"111":0,"112":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0.00441,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0.00441,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0.00441,"93":0.04851,"94":0.14553,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0,"15":0.00441,"16":0,"17":0,"18":0.03087,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0.00882,"93":0,"94":0,"95":0,"96":0.00441,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0.00441,"105":0,"106":0,"107":0.05292,"108":1.40679,"109":1.68903},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.03087,"15":0.00441,_:"0","3.1":0,"3.2":0,"5.1":0.00441,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0.01764,"13.1":0.02205,"14.1":0.43659,"15.1":0.00882,"15.2-15.3":0.00882,"15.4":0.02646,"15.5":0.03528,"15.6":0.94815,"16.0":0.04851,"16.1":0.1323,"16.2":0.3969,"16.3":0.01764},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0,"6.0-6.1":0,"7.0-7.1":0.05265,"8.1-8.4":0,"9.0-9.2":0.02289,"9.3":0.04807,"10.0-10.2":0,"10.3":0.0847,"11.0-11.2":0.01373,"11.3-11.4":0.00687,"12.0-12.1":0.01373,"12.2-12.5":0.39372,"13.0-13.1":0.00687,"13.2":0,"13.3":0.01373,"13.4-13.7":0.07554,"14.0-14.4":0.1053,"14.5-14.8":0.59516,"15.0-15.1":0.1053,"15.2-15.3":0.10072,"15.4":0.07783,"15.5":0.35023,"15.6":1.7168,"16.0":1.99378,"16.1":9.98036,"16.2":3.87769,"16.3":0.57456},P:{"4":0.20427,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0.11826,"8.2":0,"9.2":0,"10.1":0.01075,"11.1-11.2":0.05376,"12.0":0,"13.0":0.01075,"14.0":0.0215,"15.0":0,"16.0":0.03225,"17.0":0.18277,"18.0":0.08601,"19.0":2.49429},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.29494,"4.4":0,"4.4.3-4.4.4":0.8111},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.00441,"5.5":0},J:{"7":0,"10":0.00559},N:{"10":0,"11":0},R:{_:"0"},M:{"0":0.26273},Q:{"13.1":0},O:{"0":0.38571},H:{"0":0.16935},L:{"0":54.72917},S:{"2.5":0}};