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,99 @@
/** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */
import * as tslib_1 from "tslib";
import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';
export function expand(project, concurrent, scheduler) {
if (concurrent === void 0) {
concurrent = Number.POSITIVE_INFINITY;
}
concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;
return function (source) { return source.lift(new ExpandOperator(project, concurrent, scheduler)); };
}
var ExpandOperator = /*@__PURE__*/ (function () {
function ExpandOperator(project, concurrent, scheduler) {
this.project = project;
this.concurrent = concurrent;
this.scheduler = scheduler;
}
ExpandOperator.prototype.call = function (subscriber, source) {
return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));
};
return ExpandOperator;
}());
export { ExpandOperator };
var ExpandSubscriber = /*@__PURE__*/ (function (_super) {
tslib_1.__extends(ExpandSubscriber, _super);
function ExpandSubscriber(destination, project, concurrent, scheduler) {
var _this = _super.call(this, destination) || this;
_this.project = project;
_this.concurrent = concurrent;
_this.scheduler = scheduler;
_this.index = 0;
_this.active = 0;
_this.hasCompleted = false;
if (concurrent < Number.POSITIVE_INFINITY) {
_this.buffer = [];
}
return _this;
}
ExpandSubscriber.dispatch = function (arg) {
var subscriber = arg.subscriber, result = arg.result, value = arg.value, index = arg.index;
subscriber.subscribeToProjection(result, value, index);
};
ExpandSubscriber.prototype._next = function (value) {
var destination = this.destination;
if (destination.closed) {
this._complete();
return;
}
var index = this.index++;
if (this.active < this.concurrent) {
destination.next(value);
try {
var project = this.project;
var result = project(value, index);
if (!this.scheduler) {
this.subscribeToProjection(result, value, index);
}
else {
var state = { subscriber: this, result: result, value: value, index: index };
var destination_1 = this.destination;
destination_1.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));
}
}
catch (e) {
destination.error(e);
}
}
else {
this.buffer.push(value);
}
};
ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {
this.active++;
var destination = this.destination;
destination.add(innerSubscribe(result, new SimpleInnerSubscriber(this)));
};
ExpandSubscriber.prototype._complete = function () {
this.hasCompleted = true;
if (this.hasCompleted && this.active === 0) {
this.destination.complete();
}
this.unsubscribe();
};
ExpandSubscriber.prototype.notifyNext = function (innerValue) {
this._next(innerValue);
};
ExpandSubscriber.prototype.notifyComplete = function () {
var buffer = this.buffer;
this.active--;
if (buffer && buffer.length > 0) {
this._next(buffer.shift());
}
if (this.hasCompleted && this.active === 0) {
this.destination.complete();
}
};
return ExpandSubscriber;
}(SimpleOuterSubscriber));
export { ExpandSubscriber };
//# sourceMappingURL=expand.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/observable/ArrayObservable"));
//# sourceMappingURL=ArrayObservable.js.map

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"1":"G A B","2":"BC","8":"J E F"},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 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 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","8":"CC"},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 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","2":"G"},G:{"1":"F zB TC AC 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"},H:{"1":"nC"},I:{"1":"tB I D oC pC qC rC AC sC tC"},J:{"1":"E A"},K:{"1":"A B C e 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:1,C:"getElementsByClassName"};

View File

@@ -0,0 +1,37 @@
{
"name": "decode-uri-component",
"version": "0.2.2",
"description": "A better decodeURIComponent",
"license": "MIT",
"repository": "SamVerschueren/decode-uri-component",
"author": {
"name": "Sam Verschueren",
"email": "sam.verschueren@gmail.com",
"url": "github.com/SamVerschueren"
},
"engines": {
"node": ">=0.10"
},
"scripts": {
"test": "xo && nyc ava",
"coveralls": "nyc report --reporter=text-lcov | coveralls"
},
"files": [
"index.js"
],
"keywords": [
"decode",
"uri",
"component",
"decodeuricomponent",
"components",
"decoder",
"url"
],
"devDependencies": {
"ava": "^0.17.0",
"coveralls": "^2.13.1",
"nyc": "^10.3.2",
"xo": "^0.16.0"
}
}

View File

@@ -0,0 +1,96 @@
/** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */
import * as tslib_1 from "tslib";
import { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';
export function mergeScan(accumulator, seed, concurrent) {
if (concurrent === void 0) {
concurrent = Number.POSITIVE_INFINITY;
}
return function (source) { return source.lift(new MergeScanOperator(accumulator, seed, concurrent)); };
}
var MergeScanOperator = /*@__PURE__*/ (function () {
function MergeScanOperator(accumulator, seed, concurrent) {
this.accumulator = accumulator;
this.seed = seed;
this.concurrent = concurrent;
}
MergeScanOperator.prototype.call = function (subscriber, source) {
return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));
};
return MergeScanOperator;
}());
export { MergeScanOperator };
var MergeScanSubscriber = /*@__PURE__*/ (function (_super) {
tslib_1.__extends(MergeScanSubscriber, _super);
function MergeScanSubscriber(destination, accumulator, acc, concurrent) {
var _this = _super.call(this, destination) || this;
_this.accumulator = accumulator;
_this.acc = acc;
_this.concurrent = concurrent;
_this.hasValue = false;
_this.hasCompleted = false;
_this.buffer = [];
_this.active = 0;
_this.index = 0;
return _this;
}
MergeScanSubscriber.prototype._next = function (value) {
if (this.active < this.concurrent) {
var index = this.index++;
var destination = this.destination;
var ish = void 0;
try {
var accumulator = this.accumulator;
ish = accumulator(this.acc, value, index);
}
catch (e) {
return destination.error(e);
}
this.active++;
this._innerSub(ish);
}
else {
this.buffer.push(value);
}
};
MergeScanSubscriber.prototype._innerSub = function (ish) {
var innerSubscriber = new SimpleInnerSubscriber(this);
var destination = this.destination;
destination.add(innerSubscriber);
var innerSubscription = innerSubscribe(ish, innerSubscriber);
if (innerSubscription !== innerSubscriber) {
destination.add(innerSubscription);
}
};
MergeScanSubscriber.prototype._complete = function () {
this.hasCompleted = true;
if (this.active === 0 && this.buffer.length === 0) {
if (this.hasValue === false) {
this.destination.next(this.acc);
}
this.destination.complete();
}
this.unsubscribe();
};
MergeScanSubscriber.prototype.notifyNext = function (innerValue) {
var destination = this.destination;
this.acc = innerValue;
this.hasValue = true;
destination.next(innerValue);
};
MergeScanSubscriber.prototype.notifyComplete = function () {
var buffer = this.buffer;
this.active--;
if (buffer.length > 0) {
this._next(buffer.shift());
}
else if (this.active === 0 && this.hasCompleted) {
if (this.hasValue === false) {
this.destination.next(this.acc);
}
this.destination.complete();
}
};
return MergeScanSubscriber;
}(SimpleOuterSubscriber));
export { MergeScanSubscriber };
//# sourceMappingURL=mergeScan.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"bufferWhen.js","sources":["../src/operator/bufferWhen.ts"],"names":[],"mappings":";;;;;AAAA,qDAAgD"}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J E F G BC","8":"A B"},B:{"1":"P","2":"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","8":"C K L H M N O"},C:{"2":"CC tB I u J E F G A B C K L H M N O v w x y 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","66":"0 1 2 3 4 5 z","72":"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"},D:{"1":"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","2":"0 1 2 I u J E F G A B C K L H M N O v w x y z 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","66":"3 4 5 6 7 8"},E:{"2":"I u GC zB HC","8":"J E F G A B C K L H 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 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","2":"G B C 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","66":"H M N O v"},G:{"2":"zB TC AC UC VC","8":"F 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"},H:{"2":"nC"},I:{"1":"tC","2":"tB I D oC pC qC rC AC sC"},J:{"2":"E A"},K:{"2":"A B C e qB 9B rB"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"uC"},P:{"1":"I vC wC xC yC zC 0B 0C 1C","2":"2C 3C 4C sB 5C 6C 7C"},Q:{"1":"1B"},R:{"2":"8C"},S:{"72":"9C"}},B:7,C:"Custom Elements (deprecated V0 spec)"};

View File

@@ -0,0 +1 @@
{"name":"normalize-url","version":"6.1.0","files":{"license":{"checkedAt":1678887829653,"integrity":"sha512-nIst73auX/5NY2Fmv5Y116vWnNrEv4GaIUX3lpZG05rpXJY2S8EX+fpUS5hRjClCM0VdT2Za9DDHXXB5jdSrEw==","mode":420,"size":1109},"index.js":{"checkedAt":1678887829741,"integrity":"sha512-ZN2Rf1OSnfY07uTz7vLKQhXXxYY/rcB5vMrFWgdWx+Dv2/WigTTIgrwfra7WMcIS8BkePx2ueope6rkX4TQCaA==","mode":420,"size":5978},"package.json":{"checkedAt":1678887829741,"integrity":"sha512-s9CZeP2UHRmutf2pSC7v6CFdzLDFUhOCDwozhjoJrdPJy6V5EXQ+9l4xrP8CgGmKDd+QvhWf/nbVRFbFlGRruQ==","mode":420,"size":803},"readme.md":{"checkedAt":1678887829743,"integrity":"sha512-PtRj500A72aaL8oniTcFNXfAitNVMHPlDZxmAxVwZ6RiK/HbU898NIf+Vy67Y+Ayj2t7UxZ9FN1jWiyFhlJJiw==","mode":420,"size":6865},"index.d.ts":{"checkedAt":1678887829743,"integrity":"sha512-GpOetfqSROg2BkNLgvUjABLjO2hKG9on7An6vn4ksBR5BDSdAAAGHv4XyIYqIj3ZOVZI86Dkm9FALBGY2ce5UQ==","mode":420,"size":6489}}}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["../../src/webSocket/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAA0B,MAAM,6CAA6C,CAAC"}

View File

@@ -0,0 +1,33 @@
import {Primitive} from './basic';
/**
Allows creating a union type by combining primitive types and literal types without sacrificing auto-completion in IDEs for the literal type part of the union.
Currently, when a union type of a primitive type is combined with literal types, TypeScript loses all information about the combined literals. Thus, when such type is used in an IDE with autocompletion, no suggestions are made for the declared literals.
This type is a workaround for [Microsoft/TypeScript#29729](https://github.com/Microsoft/TypeScript/issues/29729). It will be removed as soon as it's not needed anymore.
@example
```
import {LiteralUnion} from 'type-fest';
// Before
type Pet = 'dog' | 'cat' | string;
const pet: Pet = '';
// Start typing in your TypeScript-enabled IDE.
// You **will not** get auto-completion for `dog` and `cat` literals.
// After
type Pet2 = LiteralUnion<'dog' | 'cat', string>;
const pet: Pet2 = '';
// You **will** get auto-completion for `dog` and `cat` literals.
```
*/
export type LiteralUnion<
LiteralType,
BaseType extends Primitive
> = LiteralType | (BaseType & {_?: never});

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/operators/timeoutWith"));
//# sourceMappingURL=timeoutWith.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"delayWhen.js","sources":["../src/operator/delayWhen.ts"],"names":[],"mappings":";;;;;AAAA,oDAA+C"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"every.js","sources":["../../../src/internal/operators/every.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAwB3C,MAAM,UAAU,KAAK,CAAI,SAAsE,EACtE,OAAa;IACpC,OAAO,CAAC,MAAqB,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,aAAa,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAC/F,CAAC;AAED,MAAM,aAAa;IACjB,YAAoB,SAAsE,EACtE,OAAa,EACb,MAAsB;QAFtB,cAAS,GAAT,SAAS,CAA6D;QACtE,YAAO,GAAP,OAAO,CAAM;QACb,WAAM,GAAN,MAAM,CAAgB;IAC1C,CAAC;IAED,IAAI,CAAC,QAA6B,EAAE,MAAW;QAC7C,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,eAAe,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACpG,CAAC;CACF;AAOD,MAAM,eAAmB,SAAQ,UAAa;IAG5C,YAAY,WAA8B,EACtB,SAAsE,EACtE,OAAY,EACZ,MAAsB;QACxC,KAAK,CAAC,WAAW,CAAC,CAAC;QAHD,cAAS,GAAT,SAAS,CAA6D;QACtE,YAAO,GAAP,OAAO,CAAK;QACZ,WAAM,GAAN,MAAM,CAAgB;QALlC,UAAK,GAAW,CAAC,CAAC;QAOxB,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,IAAI,CAAC;IACjC,CAAC;IAEO,cAAc,CAAC,eAAwB;QAC7C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACvC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;IAC9B,CAAC;IAES,KAAK,CAAC,KAAQ;QACtB,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,IAAI;YACF,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;SAC9E;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC5B,OAAO;SACR;QAED,IAAI,CAAC,MAAM,EAAE;YACX,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;SAC5B;IACH,CAAC;IAES,SAAS;QACjB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;CACF"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"distinct.js","sources":["../src/operators/distinct.ts"],"names":[],"mappings":";;;;;AAAA,oDAA+C"}

View File

@@ -0,0 +1,84 @@
import { Operator } from '../Operator';
import { Observable } from '../Observable';
import { Subscriber } from '../Subscriber';
import { OperatorFunction, MonoTypeOperatorFunction } from '../types';
/* tslint:disable:max-line-length */
export function defaultIfEmpty<T>(defaultValue?: T): MonoTypeOperatorFunction<T>;
export function defaultIfEmpty<T, R>(defaultValue?: R): OperatorFunction<T, T | R>;
/* tslint:enable:max-line-length */
/**
* Emits a given value if the source Observable completes without emitting any
* `next` value, otherwise mirrors the source Observable.
*
* <span class="informal">If the source Observable turns out to be empty, then
* this operator will emit a default value.</span>
*
* ![](defaultIfEmpty.png)
*
* `defaultIfEmpty` emits the values emitted by the source Observable or a
* specified default value if the source Observable is empty (completes without
* having emitted any `next` value).
*
* ## Example
* If no clicks happen in 5 seconds, then emit "no clicks"
* ```ts
* import { fromEvent } from 'rxjs';
* import { defaultIfEmpty, takeUntil } from 'rxjs/operators';
*
* const clicks = fromEvent(document, 'click');
* const clicksBeforeFive = clicks.pipe(takeUntil(interval(5000)));
* const result = clicksBeforeFive.pipe(defaultIfEmpty('no clicks'));
* result.subscribe(x => console.log(x));
* ```
*
* @see {@link empty}
* @see {@link last}
*
* @param {any} [defaultValue=null] The default value used if the source
* Observable is empty.
* @return {Observable} An Observable that emits either the specified
* `defaultValue` if the source Observable emits no items, or the values emitted
* by the source Observable.
* @method defaultIfEmpty
* @owner Observable
*/
export function defaultIfEmpty<T, R>(defaultValue: R = null): OperatorFunction<T, T | R> {
return (source: Observable<T>) => source.lift(new DefaultIfEmptyOperator(defaultValue)) as Observable<T | R>;
}
class DefaultIfEmptyOperator<T, R> implements Operator<T, T | R> {
constructor(private defaultValue: R) {
}
call(subscriber: Subscriber<T | R>, source: any): any {
return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));
}
}
/**
* We need this JSDoc comment for affecting ESDoc.
* @ignore
* @extends {Ignored}
*/
class DefaultIfEmptySubscriber<T, R> extends Subscriber<T> {
private isEmpty: boolean = true;
constructor(destination: Subscriber<T | R>, private defaultValue: R) {
super(destination);
}
protected _next(value: T): void {
this.isEmpty = false;
this.destination.next(value);
}
protected _complete(): void {
if (this.isEmpty) {
this.destination.next(this.defaultValue);
}
this.destination.complete();
}
}

View File

@@ -0,0 +1,67 @@
{
"name": "codepage",
"version": "1.14.0",
"author": "SheetJS",
"description": "pure-JS library to handle codepages",
"keywords": [ "codepage", "iconv", "convert", "strings" ],
"bin": {
"codepage": "./bin/codepage.njs"
},
"main": "cputils.js",
"types": "types",
"browser": {
"buffer": "false"
},
"dependencies": {
"commander": "~2.14.1",
"exit-on-epipe": "~1.0.1"
},
"devDependencies": {
"voc": "~1.1.0",
"mocha": "~2.5.3",
"blanket": "~1.2.3",
"@sheetjs/uglify-js": "~2.7.3",
"@types/node": "^8.0.7",
"@types/commander": "^2.12.0",
"dtslint": "^0.1.2",
"typescript": "2.2.0"
},
"repository": { "type":"git", "url":"git://github.com/SheetJS/js-codepage.git"},
"scripts": {
"pretest": "git submodule init && git submodule update",
"test": "make test",
"build": "make js",
"lint": "make fullint",
"dtslint": "dtslint types"
},
"config": {
"blanket": {
"pattern": "[cputils.js]"
}
},
"alex": {
"allow": [
"chinese",
"european",
"german",
"japanese",
"latin"
]
},
"homepage": "http://sheetjs.com/opensource",
"files": [
"LICENSE",
"README.md",
"bin",
"bits/*.js",
"types/index.d.ts",
"types/*.json",
"cptable.js",
"cputils.js",
"dist/sbcs.full.js",
"dist/cpexcel.full.js"
],
"bugs": { "url": "https://github.com/SheetJS/js-codepage/issues" },
"license": "Apache-2.0",
"engines": { "node": ">=0.8" }
}

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,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0.00184,"48":0,"49":0,"50":0,"51":0,"52":0.00184,"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,"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.00184,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0.00368,"99":0.00184,"100":0.00184,"101":0,"102":0.00184,"103":0,"104":0,"105":0.00184,"106":0.01839,"107":0.01287,"108":0.09563,"109":0.04414,"110":0.00184,"111":0.00184,"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.00184,"34":0,"35":0,"36":0,"37":0,"38":0.00184,"39":0,"40":0.00184,"41":0,"42":0,"43":0.00184,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0.00184,"50":0,"51":0,"52":0,"53":0,"54":0.00184,"55":0,"56":0,"57":0.00184,"58":0,"59":0,"60":0.00184,"61":0,"62":0.00184,"63":0.00736,"64":0.00184,"65":0,"66":0.00184,"67":0,"68":0,"69":0.00184,"70":0.00184,"71":0.00368,"72":0,"73":0.00184,"74":0.00184,"75":0,"76":0,"77":0,"78":0.00184,"79":0.00368,"80":0.00552,"81":0.00552,"83":0.00184,"84":0.00184,"85":0.00552,"86":0.00368,"87":0.00736,"88":0.00552,"89":0.01287,"90":0.00184,"91":0.00368,"92":0.0092,"93":0.00368,"94":0.00184,"95":0.00368,"96":0.00368,"97":0.00184,"98":0.01839,"99":0.00368,"100":0.00368,"101":0.00184,"102":0.00552,"103":0.01287,"104":0.01471,"105":0.01103,"106":0.02575,"107":0.05885,"108":1.04455,"109":0.8864,"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.00184,"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.00184,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0.00184,"60":0.01287,"62":0,"63":0.01287,"64":0.01655,"65":0.0092,"66":0.02391,"67":0.01655,"68":0,"69":0,"70":0,"71":0,"72":0.00184,"73":0.00552,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.00368,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0.00184,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0.00184,"93":0.02942,"94":0.12689,"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.00184},B:{"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0.00368,"79":0,"80":0,"81":0,"83":0,"84":0.00184,"85":0.00184,"86":0,"87":0,"88":0,"89":0.00184,"90":0,"91":0,"92":0.00368,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0.00184,"100":0,"101":0,"102":0,"103":0.00184,"104":0,"105":0.00184,"106":0,"107":0.02391,"108":0.1416,"109":0.12137},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0.00184,"14":0.00368,"15":0,_:"0","3.1":0,"3.2":0,"5.1":0.0423,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0,"13.1":0.00368,"14.1":0.0092,"15.1":0,"15.2-15.3":0,"15.4":0.00552,"15.5":0.05333,"15.6":0.05701,"16.0":0.0092,"16.1":0.04598,"16.2":0.04781,"16.3":0.00184},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.00256,"6.0-6.1":0.00256,"7.0-7.1":0.01794,"8.1-8.4":0.01025,"9.0-9.2":0,"9.3":0.05125,"10.0-10.2":0.00256,"10.3":0.07047,"11.0-11.2":0.00769,"11.3-11.4":0.01666,"12.0-12.1":0.04357,"12.2-12.5":0.72268,"13.0-13.1":0.02178,"13.2":0.00513,"13.3":0.03844,"13.4-13.7":0.08072,"14.0-14.4":0.54457,"14.5-14.8":0.54457,"15.0-15.1":0.27421,"15.2-15.3":0.32546,"15.4":0.40106,"15.5":0.56379,"15.6":1.14937,"16.0":2.13601,"16.1":2.44353,"16.2":2.30514,"16.3":0.22295},P:{"4":0.18318,"5.0-5.4":0,"6.2-6.4":0.02035,"7.2-7.4":0.35618,"8.2":0.01018,"9.2":0.04071,"10.1":0.02035,"11.1-11.2":0.12212,"12.0":0.02035,"13.0":0.08141,"14.0":0.15265,"15.0":0.07124,"16.0":0.3053,"17.0":0.20353,"18.0":0.16283,"19.0":1.61809},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0.00081,"4.2-4.3":0.00529,"4.4":0,"4.4.3-4.4.4":0.06067},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.01287,"5.5":0},J:{"7":0,"10":0},N:{"10":0,"11":0},R:{_:"0"},M:{"0":0.11425},Q:{"13.1":0},O:{"0":0.37541},H:{"0":2.98235},L:{"0":75.70047},S:{"2.5":0}};

View File

@@ -0,0 +1,147 @@
import { Operator } from '../Operator';
import { Subscriber } from '../Subscriber';
import { Observable } from '../Observable';
import { Subject } from '../Subject';
import { Subscription } from '../Subscription';
import { OuterSubscriber } from '../OuterSubscriber';
import { InnerSubscriber } from '../InnerSubscriber';
import { subscribeToResult } from '../util/subscribeToResult';
import { OperatorFunction } from '../types';
/**
* Branch out the source Observable values as a nested Observable using a
* factory function of closing Observables to determine when to start a new
* window.
*
* <span class="informal">It's like {@link bufferWhen}, but emits a nested
* Observable instead of an array.</span>
*
* ![](windowWhen.png)
*
* 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.
*
* ## Example
* Emit only the first two clicks events in every window of [1-5] random seconds
* ```ts
* import { fromEvent, interval } from 'rxjs';
* import { windowWhen, map, mergeAll, take } from 'rxjs/operators';
*
* const clicks = fromEvent(document, 'click');
* const result = clicks.pipe(
* windowWhen(() => interval(1000 + Math.random() * 4000)),
* map(win => win.pipe(take(2))), // each window has at most 2 emissions
* mergeAll() // flatten the Observable-of-Observables
* );
* result.subscribe(x => console.log(x));
* ```
*
* @see {@link window}
* @see {@link windowCount}
* @see {@link windowTime}
* @see {@link windowToggle}
* @see {@link bufferWhen}
*
* @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.
* @return {Observable<Observable<T>>} An observable of windows, which in turn
* are Observables.
* @method windowWhen
* @owner Observable
*/
export function windowWhen<T>(closingSelector: () => Observable<any>): OperatorFunction<T, Observable<T>> {
return function windowWhenOperatorFunction(source: Observable<T>) {
return source.lift(new WindowOperator<T>(closingSelector));
};
}
class WindowOperator<T> implements Operator<T, Observable<T>> {
constructor(private closingSelector: () => Observable<any>) {
}
call(subscriber: Subscriber<Observable<T>>, source: any): any {
return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector));
}
}
/**
* We need this JSDoc comment for affecting ESDoc.
* @ignore
* @extends {Ignored}
*/
class WindowSubscriber<T> extends OuterSubscriber<T, any> {
private window?: Subject<T>;
private closingNotification?: Subscription;
constructor(protected destination: Subscriber<Observable<T>>,
private closingSelector: () => Observable<any>) {
super(destination);
this.openWindow();
}
notifyNext(_outerValue: T, _innerValue: any,
_outerIndex: number, _innerIndex: number,
innerSub: InnerSubscriber<T, any>): void {
this.openWindow(innerSub);
}
notifyError(error: any): void {
this._error(error);
}
notifyComplete(innerSub: InnerSubscriber<T, any>): void {
this.openWindow(innerSub);
}
protected _next(value: T): void {
this.window!.next(value);
}
protected _error(err: any): void {
this.window!.error(err);
this.destination.error(err);
this.unsubscribeClosingNotification();
}
protected _complete(): void {
this.window!.complete();
this.destination.complete();
this.unsubscribeClosingNotification();
}
private unsubscribeClosingNotification(): void {
if (this.closingNotification) {
this.closingNotification.unsubscribe();
}
}
private openWindow(innerSub: InnerSubscriber<T, any> | null = null): void {
if (innerSub) {
this.remove(innerSub);
innerSub.unsubscribe();
}
const prevWindow = this.window;
if (prevWindow) {
prevWindow.complete();
}
const window = this.window = new Subject<T>();
this.destination.next(window);
let closingNotifier;
try {
const { closingSelector } = this;
closingNotifier = closingSelector();
} catch (e) {
this.destination.error(e);
this.window.error(e);
return;
}
this.add(this.closingNotification = subscribeToResult(this, closingNotifier));
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"switchMapTo.js","sources":["../../../src/internal/operators/switchMapTo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAkDxC,MAAM,UAAU,WAAW,CACzB,eAAmC,EACnC,cAA4F;IAE5F,OAAO,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,CAAC,CAAC;AAC9G,CAAC"}

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","16":"C K"},C:{"1":"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 NB DC EC"},D:{"1":"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 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"},E:{"1":"G A B C K L H KC 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC","2":"I u J E F GC zB HC IC JC"},F:{"1":"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 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 G B C H M N O v w x y z OC PC QC RC qB 9B SC rB"},G:{"1":"YC ZC aC 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"},H:{"2":"nC"},I:{"1":"D","2":"tB I oC pC qC rC AC sC tC"},J:{"2":"E 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":"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:5,C:"document.scrollingElement"};