new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
import { SchedulerLike } from '../types';
|
||||
export declare function isScheduler(value: any): value is SchedulerLike;
|
||||
//# sourceMappingURL=isScheduler.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"2":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g 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 h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB EC FC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g 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","2":"uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"2":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 G M N O w g 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","2":"F B C h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e PC QC RC SC qB AC TC rB"},G:{"2":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"1":"f","2":"tB I pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"2":"A B C h qB AC rB"},L:{"2":"H"},M:{"2":"H"},N:{"2":"A B"},O:{"2":"vC"},P:{"1":"g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C","2":"I"},Q:{"2":"1B"},R:{"2":"9C"},S:{"2":"AD BD"}},B:6,C:"SDCH Accept-Encoding/Content-Encoding"};
|
||||
@@ -0,0 +1,7 @@
|
||||
;
|
||||
import * as overview_0 from '/home/zoli/Library/Caches/Bit/capsules/05477724e6beef4627535027aa98d5f966dd9894/pnpm.network_ca-file@1.0.2/dist/ca-file.docs.mdx';
|
||||
|
||||
export const compositions = [];
|
||||
export const overview = [overview_0];
|
||||
|
||||
export const compositions_metadata = {"compositions":[]};
|
||||
@@ -0,0 +1,74 @@
|
||||
import { repeat, getMagnitude } from '../utils';
|
||||
export function ToRawPrecision(x, minPrecision, maxPrecision) {
|
||||
var p = maxPrecision;
|
||||
var m;
|
||||
var e;
|
||||
var xFinal;
|
||||
if (x === 0) {
|
||||
m = repeat('0', p);
|
||||
e = 0;
|
||||
xFinal = 0;
|
||||
}
|
||||
else {
|
||||
var xToString = x.toString();
|
||||
// If xToString is formatted as scientific notation, the number is either very small or very
|
||||
// large. If the precision of the formatted string is lower that requested max precision, we
|
||||
// should still infer them from the formatted string, otherwise the formatted result might have
|
||||
// precision loss (e.g. 1e41 will not have 0 in every trailing digits).
|
||||
var xToStringExponentIndex = xToString.indexOf('e');
|
||||
var _a = xToString.split('e'), xToStringMantissa = _a[0], xToStringExponent = _a[1];
|
||||
var xToStringMantissaWithoutDecimalPoint = xToStringMantissa.replace('.', '');
|
||||
if (xToStringExponentIndex >= 0 &&
|
||||
xToStringMantissaWithoutDecimalPoint.length <= p) {
|
||||
e = +xToStringExponent;
|
||||
m =
|
||||
xToStringMantissaWithoutDecimalPoint +
|
||||
repeat('0', p - xToStringMantissaWithoutDecimalPoint.length);
|
||||
xFinal = x;
|
||||
}
|
||||
else {
|
||||
e = getMagnitude(x);
|
||||
var decimalPlaceOffset = e - p + 1;
|
||||
// n is the integer containing the required precision digits. To derive the formatted string,
|
||||
// we will adjust its decimal place in the logic below.
|
||||
var n = Math.round(adjustDecimalPlace(x, decimalPlaceOffset));
|
||||
// The rounding caused the change of magnitude, so we should increment `e` by 1.
|
||||
if (adjustDecimalPlace(n, p - 1) >= 10) {
|
||||
e = e + 1;
|
||||
// Divide n by 10 to swallow one precision.
|
||||
n = Math.floor(n / 10);
|
||||
}
|
||||
m = n.toString();
|
||||
// Equivalent of n * 10 ** (e - p + 1)
|
||||
xFinal = adjustDecimalPlace(n, p - 1 - e);
|
||||
}
|
||||
}
|
||||
var int;
|
||||
if (e >= p - 1) {
|
||||
m = m + repeat('0', e - p + 1);
|
||||
int = e + 1;
|
||||
}
|
||||
else if (e >= 0) {
|
||||
m = "".concat(m.slice(0, e + 1), ".").concat(m.slice(e + 1));
|
||||
int = e + 1;
|
||||
}
|
||||
else {
|
||||
m = "0.".concat(repeat('0', -e - 1)).concat(m);
|
||||
int = 1;
|
||||
}
|
||||
if (m.indexOf('.') >= 0 && maxPrecision > minPrecision) {
|
||||
var cut = maxPrecision - minPrecision;
|
||||
while (cut > 0 && m[m.length - 1] === '0') {
|
||||
m = m.slice(0, -1);
|
||||
cut--;
|
||||
}
|
||||
if (m[m.length - 1] === '.') {
|
||||
m = m.slice(0, -1);
|
||||
}
|
||||
}
|
||||
return { formattedString: m, roundedNumber: xFinal, integerDigitsCount: int };
|
||||
// x / (10 ** magnitude), but try to preserve as much floating point precision as possible.
|
||||
function adjustDecimalPlace(x, magnitude) {
|
||||
return magnitude < 0 ? x * Math.pow(10, -magnitude) : x / Math.pow(10, magnitude);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "browserslist",
|
||||
"version": "4.21.5",
|
||||
"description": "Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-env-preset",
|
||||
"keywords": [
|
||||
"caniuse",
|
||||
"browsers",
|
||||
"target"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/browserslist"
|
||||
},
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/browserslist"
|
||||
}
|
||||
],
|
||||
"author": "Andrey Sitnik <andrey@sitnik.ru>",
|
||||
"license": "MIT",
|
||||
"repository": "browserslist/browserslist",
|
||||
"dependencies": {
|
||||
"caniuse-lite": "^1.0.30001449",
|
||||
"electron-to-chromium": "^1.4.284",
|
||||
"node-releases": "^2.0.8",
|
||||
"update-browserslist-db": "^1.0.10"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
|
||||
},
|
||||
"bin": {
|
||||
"browserslist": "cli.js"
|
||||
},
|
||||
"types": "./index.d.ts",
|
||||
"browser": {
|
||||
"./node.js": "./browser.js",
|
||||
"path": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* https://tc39.es/ecma402/#sec-defaultnumberoption
|
||||
* @param val
|
||||
* @param min
|
||||
* @param max
|
||||
* @param fallback
|
||||
*/
|
||||
export declare function DefaultNumberOption(val: any, min: number, max: number, fallback: number): number;
|
||||
//# sourceMappingURL=DefaultNumberOption.d.ts.map
|
||||
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//return first eol found from a data chunk.
|
||||
function default_1(data, param) {
|
||||
if (!param.eol && data) {
|
||||
for (var i = 0, len = data.length; i < len; i++) {
|
||||
if (data[i] === "\r") {
|
||||
if (data[i + 1] === "\n") {
|
||||
param.eol = "\r\n";
|
||||
break;
|
||||
}
|
||||
else if (data[i + 1]) {
|
||||
param.eol = "\r";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (data[i] === "\n") {
|
||||
param.eol = "\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return param.eol || "\n";
|
||||
}
|
||||
exports.default = default_1;
|
||||
;
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiL1VzZXJzL2t4aWFuZy93b3JrL3Byb2plY3RzL2NzdjJqc29uL3NyYy9nZXRFb2wudHMiLCJzb3VyY2VzIjpbIi9Vc2Vycy9reGlhbmcvd29yay9wcm9qZWN0cy9jc3YyanNvbi9zcmMvZ2V0RW9sLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0EsMkNBQTJDO0FBQzNDLG1CQUF5QixJQUFZLEVBQUUsS0FBbUI7SUFDeEQsSUFBSSxDQUFDLEtBQUssQ0FBQyxHQUFHLElBQUksSUFBSSxFQUFFO1FBQ3RCLEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLEdBQUcsR0FBRyxJQUFJLENBQUMsTUFBTSxFQUFFLENBQUMsR0FBRyxHQUFHLEVBQUUsQ0FBQyxFQUFFLEVBQUU7WUFDL0MsSUFBSSxJQUFJLENBQUMsQ0FBQyxDQUFDLEtBQUssSUFBSSxFQUFFO2dCQUNwQixJQUFJLElBQUksQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLEtBQUssSUFBSSxFQUFFO29CQUN4QixLQUFLLENBQUMsR0FBRyxHQUFHLE1BQU0sQ0FBQztvQkFDbkIsTUFBTTtpQkFDUDtxQkFBTSxJQUFJLElBQUksQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLEVBQUU7b0JBQ3RCLEtBQUssQ0FBQyxHQUFHLEdBQUcsSUFBSSxDQUFDO29CQUNqQixNQUFNO2lCQUNQO2FBQ0Y7aUJBQU0sSUFBSSxJQUFJLENBQUMsQ0FBQyxDQUFDLEtBQUssSUFBSSxFQUFFO2dCQUMzQixLQUFLLENBQUMsR0FBRyxHQUFHLElBQUksQ0FBQztnQkFDakIsTUFBTTthQUNQO1NBQ0Y7S0FDRjtJQUNELE9BQU8sS0FBSyxDQUFDLEdBQUcsSUFBSSxJQUFJLENBQUM7QUFDM0IsQ0FBQztBQWxCRCw0QkFrQkM7QUFBQSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUGFyc2VSdW50aW1lIH0gZnJvbSBcIi4vUGFyc2VSdW50aW1lXCI7XG4vL3JldHVybiBmaXJzdCBlb2wgZm91bmQgZnJvbSBhIGRhdGEgY2h1bmsuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiAoZGF0YTogc3RyaW5nLCBwYXJhbTogUGFyc2VSdW50aW1lKTogc3RyaW5nIHtcbiAgaWYgKCFwYXJhbS5lb2wgJiYgZGF0YSkge1xuICAgIGZvciAodmFyIGkgPSAwLCBsZW4gPSBkYXRhLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICBpZiAoZGF0YVtpXSA9PT0gXCJcXHJcIikge1xuICAgICAgICBpZiAoZGF0YVtpICsgMV0gPT09IFwiXFxuXCIpIHtcbiAgICAgICAgICBwYXJhbS5lb2wgPSBcIlxcclxcblwiO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9IGVsc2UgaWYgKGRhdGFbaSArIDFdKSB7XG4gICAgICAgICAgcGFyYW0uZW9sID0gXCJcXHJcIjtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfSBcbiAgICAgIH0gZWxzZSBpZiAoZGF0YVtpXSA9PT0gXCJcXG5cIikge1xuICAgICAgICBwYXJhbS5lb2wgPSBcIlxcblwiO1xuICAgICAgICBicmVhaztcbiAgICAgIH1cbiAgICB9XG4gIH1cbiAgcmV0dXJuIHBhcmFtLmVvbCB8fCBcIlxcblwiO1xufTtcbiJdfQ==
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"toArray.js","sourceRoot":"","sources":["../../../../src/internal/operators/toArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,UAAU,GAAG,CAAC,GAAU,EAAE,KAAU,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;AAgCtE,MAAM,UAAU,OAAO;IAIrB,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,CAAC,UAAU,EAAE,EAAS,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
@@ -0,0 +1,41 @@
|
||||
import { LocaleData } from './core';
|
||||
import { LDMLPluralRule } from './plural-rules';
|
||||
export interface FieldData {
|
||||
'0'?: string;
|
||||
'1'?: string;
|
||||
'-1'?: string;
|
||||
'2'?: string;
|
||||
'-2'?: string;
|
||||
'3'?: string;
|
||||
'-3'?: string;
|
||||
future: RelativeTimeData;
|
||||
past: RelativeTimeData;
|
||||
}
|
||||
declare type RelativeTimeData = {
|
||||
[u in LDMLPluralRule]?: string;
|
||||
};
|
||||
export declare type UnpackedLocaleFieldsData = {
|
||||
[f in RelativeTimeField]?: FieldData;
|
||||
} & {
|
||||
nu: Array<string | null>;
|
||||
};
|
||||
export declare type LocaleFieldsData = {
|
||||
[f in RelativeTimeField]?: FieldData;
|
||||
} & {
|
||||
nu?: Array<string | null>;
|
||||
};
|
||||
export declare type RelativeTimeField = 'second' | 'second-short' | 'second-narrow' | 'minute' | 'minute-short' | 'minute-narrow' | 'hour' | 'hour-short' | 'hour-narrow' | 'day' | 'day-short' | 'day-narrow' | 'week' | 'week-short' | 'week-narrow' | 'month' | 'month-short' | 'month-narrow' | 'quarter' | 'quarter-short' | 'quarter-narrow' | 'year' | 'year-short' | 'year-narrow';
|
||||
export declare type RelativeTimeFormatSingularUnit = Exclude<Intl.RelativeTimeFormatUnit, 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'quarters' | 'years'>;
|
||||
export declare type RelativeTimeLocaleData = LocaleData<LocaleFieldsData>;
|
||||
export interface RelativeTimeFormatInternal {
|
||||
numberFormat: Intl.NumberFormat;
|
||||
pluralRules: Intl.PluralRules;
|
||||
locale: string;
|
||||
fields: LocaleFieldsData;
|
||||
style: Intl.ResolvedRelativeTimeFormatOptions['style'];
|
||||
numeric: Intl.ResolvedRelativeTimeFormatOptions['numeric'];
|
||||
numberingSystem: string;
|
||||
initializedRelativeTimeFormat: boolean;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=relative-time.d.ts.map
|
||||
@@ -0,0 +1,33 @@
|
||||
'use strict';
|
||||
|
||||
var hasToStringTag = require('has-tostringtag/shams')();
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $toString = callBound('Object.prototype.toString');
|
||||
|
||||
var isStandardArguments = function isArguments(value) {
|
||||
if (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {
|
||||
return false;
|
||||
}
|
||||
return $toString(value) === '[object Arguments]';
|
||||
};
|
||||
|
||||
var isLegacyArguments = function isArguments(value) {
|
||||
if (isStandardArguments(value)) {
|
||||
return true;
|
||||
}
|
||||
return value !== null &&
|
||||
typeof value === 'object' &&
|
||||
typeof value.length === 'number' &&
|
||||
value.length >= 0 &&
|
||||
$toString(value) !== '[object Array]' &&
|
||||
$toString(value.callee) === '[object Function]';
|
||||
};
|
||||
|
||||
var supportsStandardArguments = (function () {
|
||||
return isStandardArguments(arguments);
|
||||
}());
|
||||
|
||||
isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests
|
||||
|
||||
module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
|
||||
@@ -0,0 +1,178 @@
|
||||
"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.");
|
||||
};
|
||||
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.isSubscription = exports.EMPTY_SUBSCRIPTION = 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 () {
|
||||
function Subscription(initialTeardown) {
|
||||
this.initialTeardown = initialTeardown;
|
||||
this.closed = false;
|
||||
this._parentage = null;
|
||||
this._finalizers = null;
|
||||
}
|
||||
Subscription.prototype.unsubscribe = function () {
|
||||
var e_1, _a, e_2, _b;
|
||||
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)) {
|
||||
try {
|
||||
initialFinalizer();
|
||||
}
|
||||
catch (e) {
|
||||
errors = e instanceof UnsubscriptionError_1.UnsubscriptionError ? e.errors : [e];
|
||||
}
|
||||
}
|
||||
var _finalizers = this._finalizers;
|
||||
if (_finalizers) {
|
||||
this._finalizers = null;
|
||||
try {
|
||||
for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {
|
||||
var finalizer = _finalizers_1_1.value;
|
||||
try {
|
||||
execFinalizer(finalizer);
|
||||
}
|
||||
catch (err) {
|
||||
errors = errors !== null && errors !== void 0 ? errors : [];
|
||||
if (err instanceof UnsubscriptionError_1.UnsubscriptionError) {
|
||||
errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));
|
||||
}
|
||||
else {
|
||||
errors.push(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);
|
||||
}
|
||||
finally { if (e_2) throw e_2.error; }
|
||||
}
|
||||
}
|
||||
if (errors) {
|
||||
throw new UnsubscriptionError_1.UnsubscriptionError(errors);
|
||||
}
|
||||
}
|
||||
};
|
||||
Subscription.prototype.add = function (teardown) {
|
||||
var _a;
|
||||
if (teardown && teardown !== this) {
|
||||
if (this.closed) {
|
||||
execFinalizer(teardown);
|
||||
}
|
||||
else {
|
||||
if (teardown instanceof Subscription) {
|
||||
if (teardown.closed || teardown._hasParent(this)) {
|
||||
return;
|
||||
}
|
||||
teardown._addParent(this);
|
||||
}
|
||||
(this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(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 _finalizers = this._finalizers;
|
||||
_finalizers && arrRemove_1.arrRemove(_finalizers, teardown);
|
||||
if (teardown instanceof Subscription) {
|
||||
teardown._removeParent(this);
|
||||
}
|
||||
};
|
||||
Subscription.EMPTY = (function () {
|
||||
var empty = new Subscription();
|
||||
empty.closed = true;
|
||||
return empty;
|
||||
})();
|
||||
return Subscription;
|
||||
}());
|
||||
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)) {
|
||||
finalizer();
|
||||
}
|
||||
else {
|
||||
finalizer.unsubscribe();
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=Subscription.js.map
|
||||
@@ -0,0 +1,69 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Code coverage report for csv2json/index.js</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../prettify.css" />
|
||||
<link rel="stylesheet" href="../base.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1>
|
||||
<a href="../index.html">All files</a> / <a href="index.html">csv2json</a> index.js
|
||||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>0/1</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>0/0</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>0/0</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>0/1</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line low'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >module.exports=require("./build");</span></pre></td></tr>
|
||||
</table></pre>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Fri May 11 2018 21:36:07 GMT+0100 (IST)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
if (typeof prettyPrint === 'function') {
|
||||
prettyPrint();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script src="../sorter.js"></script>
|
||||
<script src="../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"D E F A B","2":"CC","8":"J"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g 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 h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB EC FC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g 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 h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"1":"I v J D E F A B C K L G HC zB IC JC KC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","1025":"LC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g 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 h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e PC QC RC SC qB AC TC rB"},G:{"1":"E YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"zB UC BC","132":"VC WC XC"},H:{"2":"oC"},I:{"1":"tB f tC uC","260":"pC qC rC","513":"I sC BC"},J:{"1":"D A"},K:{"1":"A B C h qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"1":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:2,C:"CSS position:fixed"};
|
||||
@@ -0,0 +1,463 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(global = global || self, factory((global.acorn = global.acorn || {}, global.acorn.walk = {})));
|
||||
}(this, (function (exports) { 'use strict';
|
||||
|
||||
// AST walker module for Mozilla Parser API compatible trees
|
||||
|
||||
// A simple walk is one where you simply specify callbacks to be
|
||||
// called on specific nodes. The last two arguments are optional. A
|
||||
// simple use would be
|
||||
//
|
||||
// walk.simple(myTree, {
|
||||
// Expression: function(node) { ... }
|
||||
// });
|
||||
//
|
||||
// to do something with all expressions. All Parser API node types
|
||||
// can be used to identify node types, as well as Expression and
|
||||
// Statement, which denote categories of nodes.
|
||||
//
|
||||
// The base argument can be used to pass a custom (recursive)
|
||||
// walker, and state can be used to give this walked an initial
|
||||
// state.
|
||||
|
||||
function simple(node, visitors, baseVisitor, state, override) {
|
||||
if (!baseVisitor) { baseVisitor = base
|
||||
; }(function c(node, st, override) {
|
||||
var type = override || node.type, found = visitors[type];
|
||||
baseVisitor[type](node, st, c);
|
||||
if (found) { found(node, st); }
|
||||
})(node, state, override);
|
||||
}
|
||||
|
||||
// An ancestor walk keeps an array of ancestor nodes (including the
|
||||
// current node) and passes them to the callback as third parameter
|
||||
// (and also as state parameter when no other state is present).
|
||||
function ancestor(node, visitors, baseVisitor, state, override) {
|
||||
var ancestors = [];
|
||||
if (!baseVisitor) { baseVisitor = base
|
||||
; }(function c(node, st, override) {
|
||||
var type = override || node.type, found = visitors[type];
|
||||
var isNew = node !== ancestors[ancestors.length - 1];
|
||||
if (isNew) { ancestors.push(node); }
|
||||
baseVisitor[type](node, st, c);
|
||||
if (found) { found(node, st || ancestors, ancestors); }
|
||||
if (isNew) { ancestors.pop(); }
|
||||
})(node, state, override);
|
||||
}
|
||||
|
||||
// A recursive walk is one where your functions override the default
|
||||
// walkers. They can modify and replace the state parameter that's
|
||||
// threaded through the walk, and can opt how and whether to walk
|
||||
// their child nodes (by calling their third argument on these
|
||||
// nodes).
|
||||
function recursive(node, state, funcs, baseVisitor, override) {
|
||||
var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor
|
||||
;(function c(node, st, override) {
|
||||
visitor[override || node.type](node, st, c);
|
||||
})(node, state, override);
|
||||
}
|
||||
|
||||
function makeTest(test) {
|
||||
if (typeof test === "string")
|
||||
{ return function (type) { return type === test; } }
|
||||
else if (!test)
|
||||
{ return function () { return true; } }
|
||||
else
|
||||
{ return test }
|
||||
}
|
||||
|
||||
var Found = function Found(node, state) { this.node = node; this.state = state; };
|
||||
|
||||
// A full walk triggers the callback on each node
|
||||
function full(node, callback, baseVisitor, state, override) {
|
||||
if (!baseVisitor) { baseVisitor = base; }
|
||||
var last
|
||||
;(function c(node, st, override) {
|
||||
var type = override || node.type;
|
||||
baseVisitor[type](node, st, c);
|
||||
if (last !== node) {
|
||||
callback(node, st, type);
|
||||
last = node;
|
||||
}
|
||||
})(node, state, override);
|
||||
}
|
||||
|
||||
// An fullAncestor walk is like an ancestor walk, but triggers
|
||||
// the callback on each node
|
||||
function fullAncestor(node, callback, baseVisitor, state) {
|
||||
if (!baseVisitor) { baseVisitor = base; }
|
||||
var ancestors = [], last
|
||||
;(function c(node, st, override) {
|
||||
var type = override || node.type;
|
||||
var isNew = node !== ancestors[ancestors.length - 1];
|
||||
if (isNew) { ancestors.push(node); }
|
||||
baseVisitor[type](node, st, c);
|
||||
if (last !== node) {
|
||||
callback(node, st || ancestors, ancestors, type);
|
||||
last = node;
|
||||
}
|
||||
if (isNew) { ancestors.pop(); }
|
||||
})(node, state);
|
||||
}
|
||||
|
||||
// Find a node with a given start, end, and type (all are optional,
|
||||
// null can be used as wildcard). Returns a {node, state} object, or
|
||||
// undefined when it doesn't find a matching node.
|
||||
function findNodeAt(node, start, end, test, baseVisitor, state) {
|
||||
if (!baseVisitor) { baseVisitor = base; }
|
||||
test = makeTest(test);
|
||||
try {
|
||||
(function c(node, st, override) {
|
||||
var type = override || node.type;
|
||||
if ((start == null || node.start <= start) &&
|
||||
(end == null || node.end >= end))
|
||||
{ baseVisitor[type](node, st, c); }
|
||||
if ((start == null || node.start === start) &&
|
||||
(end == null || node.end === end) &&
|
||||
test(type, node))
|
||||
{ throw new Found(node, st) }
|
||||
})(node, state);
|
||||
} catch (e) {
|
||||
if (e instanceof Found) { return e }
|
||||
throw e
|
||||
}
|
||||
}
|
||||
|
||||
// Find the innermost node of a given type that contains the given
|
||||
// position. Interface similar to findNodeAt.
|
||||
function findNodeAround(node, pos, test, baseVisitor, state) {
|
||||
test = makeTest(test);
|
||||
if (!baseVisitor) { baseVisitor = base; }
|
||||
try {
|
||||
(function c(node, st, override) {
|
||||
var type = override || node.type;
|
||||
if (node.start > pos || node.end < pos) { return }
|
||||
baseVisitor[type](node, st, c);
|
||||
if (test(type, node)) { throw new Found(node, st) }
|
||||
})(node, state);
|
||||
} catch (e) {
|
||||
if (e instanceof Found) { return e }
|
||||
throw e
|
||||
}
|
||||
}
|
||||
|
||||
// Find the outermost matching node after a given position.
|
||||
function findNodeAfter(node, pos, test, baseVisitor, state) {
|
||||
test = makeTest(test);
|
||||
if (!baseVisitor) { baseVisitor = base; }
|
||||
try {
|
||||
(function c(node, st, override) {
|
||||
if (node.end < pos) { return }
|
||||
var type = override || node.type;
|
||||
if (node.start >= pos && test(type, node)) { throw new Found(node, st) }
|
||||
baseVisitor[type](node, st, c);
|
||||
})(node, state);
|
||||
} catch (e) {
|
||||
if (e instanceof Found) { return e }
|
||||
throw e
|
||||
}
|
||||
}
|
||||
|
||||
// Find the outermost matching node before a given position.
|
||||
function findNodeBefore(node, pos, test, baseVisitor, state) {
|
||||
test = makeTest(test);
|
||||
if (!baseVisitor) { baseVisitor = base; }
|
||||
var max
|
||||
;(function c(node, st, override) {
|
||||
if (node.start > pos) { return }
|
||||
var type = override || node.type;
|
||||
if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))
|
||||
{ max = new Found(node, st); }
|
||||
baseVisitor[type](node, st, c);
|
||||
})(node, state);
|
||||
return max
|
||||
}
|
||||
|
||||
// Used to create a custom walker. Will fill in all missing node
|
||||
// type properties with the defaults.
|
||||
function make(funcs, baseVisitor) {
|
||||
var visitor = Object.create(baseVisitor || base);
|
||||
for (var type in funcs) { visitor[type] = funcs[type]; }
|
||||
return visitor
|
||||
}
|
||||
|
||||
function skipThrough(node, st, c) { c(node, st); }
|
||||
function ignore(_node, _st, _c) {}
|
||||
|
||||
// Node walkers.
|
||||
|
||||
var base = {};
|
||||
|
||||
base.Program = base.BlockStatement = base.StaticBlock = function (node, st, c) {
|
||||
for (var i = 0, list = node.body; i < list.length; i += 1)
|
||||
{
|
||||
var stmt = list[i];
|
||||
|
||||
c(stmt, st, "Statement");
|
||||
}
|
||||
};
|
||||
base.Statement = skipThrough;
|
||||
base.EmptyStatement = ignore;
|
||||
base.ExpressionStatement = base.ParenthesizedExpression = base.ChainExpression =
|
||||
function (node, st, c) { return c(node.expression, st, "Expression"); };
|
||||
base.IfStatement = function (node, st, c) {
|
||||
c(node.test, st, "Expression");
|
||||
c(node.consequent, st, "Statement");
|
||||
if (node.alternate) { c(node.alternate, st, "Statement"); }
|
||||
};
|
||||
base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); };
|
||||
base.BreakStatement = base.ContinueStatement = ignore;
|
||||
base.WithStatement = function (node, st, c) {
|
||||
c(node.object, st, "Expression");
|
||||
c(node.body, st, "Statement");
|
||||
};
|
||||
base.SwitchStatement = function (node, st, c) {
|
||||
c(node.discriminant, st, "Expression");
|
||||
for (var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1) {
|
||||
var cs = list$1[i$1];
|
||||
|
||||
if (cs.test) { c(cs.test, st, "Expression"); }
|
||||
for (var i = 0, list = cs.consequent; i < list.length; i += 1)
|
||||
{
|
||||
var cons = list[i];
|
||||
|
||||
c(cons, st, "Statement");
|
||||
}
|
||||
}
|
||||
};
|
||||
base.SwitchCase = function (node, st, c) {
|
||||
if (node.test) { c(node.test, st, "Expression"); }
|
||||
for (var i = 0, list = node.consequent; i < list.length; i += 1)
|
||||
{
|
||||
var cons = list[i];
|
||||
|
||||
c(cons, st, "Statement");
|
||||
}
|
||||
};
|
||||
base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) {
|
||||
if (node.argument) { c(node.argument, st, "Expression"); }
|
||||
};
|
||||
base.ThrowStatement = base.SpreadElement =
|
||||
function (node, st, c) { return c(node.argument, st, "Expression"); };
|
||||
base.TryStatement = function (node, st, c) {
|
||||
c(node.block, st, "Statement");
|
||||
if (node.handler) { c(node.handler, st); }
|
||||
if (node.finalizer) { c(node.finalizer, st, "Statement"); }
|
||||
};
|
||||
base.CatchClause = function (node, st, c) {
|
||||
if (node.param) { c(node.param, st, "Pattern"); }
|
||||
c(node.body, st, "Statement");
|
||||
};
|
||||
base.WhileStatement = base.DoWhileStatement = function (node, st, c) {
|
||||
c(node.test, st, "Expression");
|
||||
c(node.body, st, "Statement");
|
||||
};
|
||||
base.ForStatement = function (node, st, c) {
|
||||
if (node.init) { c(node.init, st, "ForInit"); }
|
||||
if (node.test) { c(node.test, st, "Expression"); }
|
||||
if (node.update) { c(node.update, st, "Expression"); }
|
||||
c(node.body, st, "Statement");
|
||||
};
|
||||
base.ForInStatement = base.ForOfStatement = function (node, st, c) {
|
||||
c(node.left, st, "ForInit");
|
||||
c(node.right, st, "Expression");
|
||||
c(node.body, st, "Statement");
|
||||
};
|
||||
base.ForInit = function (node, st, c) {
|
||||
if (node.type === "VariableDeclaration") { c(node, st); }
|
||||
else { c(node, st, "Expression"); }
|
||||
};
|
||||
base.DebuggerStatement = ignore;
|
||||
|
||||
base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); };
|
||||
base.VariableDeclaration = function (node, st, c) {
|
||||
for (var i = 0, list = node.declarations; i < list.length; i += 1)
|
||||
{
|
||||
var decl = list[i];
|
||||
|
||||
c(decl, st);
|
||||
}
|
||||
};
|
||||
base.VariableDeclarator = function (node, st, c) {
|
||||
c(node.id, st, "Pattern");
|
||||
if (node.init) { c(node.init, st, "Expression"); }
|
||||
};
|
||||
|
||||
base.Function = function (node, st, c) {
|
||||
if (node.id) { c(node.id, st, "Pattern"); }
|
||||
for (var i = 0, list = node.params; i < list.length; i += 1)
|
||||
{
|
||||
var param = list[i];
|
||||
|
||||
c(param, st, "Pattern");
|
||||
}
|
||||
c(node.body, st, node.expression ? "Expression" : "Statement");
|
||||
};
|
||||
|
||||
base.Pattern = function (node, st, c) {
|
||||
if (node.type === "Identifier")
|
||||
{ c(node, st, "VariablePattern"); }
|
||||
else if (node.type === "MemberExpression")
|
||||
{ c(node, st, "MemberPattern"); }
|
||||
else
|
||||
{ c(node, st); }
|
||||
};
|
||||
base.VariablePattern = ignore;
|
||||
base.MemberPattern = skipThrough;
|
||||
base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); };
|
||||
base.ArrayPattern = function (node, st, c) {
|
||||
for (var i = 0, list = node.elements; i < list.length; i += 1) {
|
||||
var elt = list[i];
|
||||
|
||||
if (elt) { c(elt, st, "Pattern"); }
|
||||
}
|
||||
};
|
||||
base.ObjectPattern = function (node, st, c) {
|
||||
for (var i = 0, list = node.properties; i < list.length; i += 1) {
|
||||
var prop = list[i];
|
||||
|
||||
if (prop.type === "Property") {
|
||||
if (prop.computed) { c(prop.key, st, "Expression"); }
|
||||
c(prop.value, st, "Pattern");
|
||||
} else if (prop.type === "RestElement") {
|
||||
c(prop.argument, st, "Pattern");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
base.Expression = skipThrough;
|
||||
base.ThisExpression = base.Super = base.MetaProperty = ignore;
|
||||
base.ArrayExpression = function (node, st, c) {
|
||||
for (var i = 0, list = node.elements; i < list.length; i += 1) {
|
||||
var elt = list[i];
|
||||
|
||||
if (elt) { c(elt, st, "Expression"); }
|
||||
}
|
||||
};
|
||||
base.ObjectExpression = function (node, st, c) {
|
||||
for (var i = 0, list = node.properties; i < list.length; i += 1)
|
||||
{
|
||||
var prop = list[i];
|
||||
|
||||
c(prop, st);
|
||||
}
|
||||
};
|
||||
base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration;
|
||||
base.SequenceExpression = function (node, st, c) {
|
||||
for (var i = 0, list = node.expressions; i < list.length; i += 1)
|
||||
{
|
||||
var expr = list[i];
|
||||
|
||||
c(expr, st, "Expression");
|
||||
}
|
||||
};
|
||||
base.TemplateLiteral = function (node, st, c) {
|
||||
for (var i = 0, list = node.quasis; i < list.length; i += 1)
|
||||
{
|
||||
var quasi = list[i];
|
||||
|
||||
c(quasi, st);
|
||||
}
|
||||
|
||||
for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1)
|
||||
{
|
||||
var expr = list$1[i$1];
|
||||
|
||||
c(expr, st, "Expression");
|
||||
}
|
||||
};
|
||||
base.TemplateElement = ignore;
|
||||
base.UnaryExpression = base.UpdateExpression = function (node, st, c) {
|
||||
c(node.argument, st, "Expression");
|
||||
};
|
||||
base.BinaryExpression = base.LogicalExpression = function (node, st, c) {
|
||||
c(node.left, st, "Expression");
|
||||
c(node.right, st, "Expression");
|
||||
};
|
||||
base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) {
|
||||
c(node.left, st, "Pattern");
|
||||
c(node.right, st, "Expression");
|
||||
};
|
||||
base.ConditionalExpression = function (node, st, c) {
|
||||
c(node.test, st, "Expression");
|
||||
c(node.consequent, st, "Expression");
|
||||
c(node.alternate, st, "Expression");
|
||||
};
|
||||
base.NewExpression = base.CallExpression = function (node, st, c) {
|
||||
c(node.callee, st, "Expression");
|
||||
if (node.arguments)
|
||||
{ for (var i = 0, list = node.arguments; i < list.length; i += 1)
|
||||
{
|
||||
var arg = list[i];
|
||||
|
||||
c(arg, st, "Expression");
|
||||
} }
|
||||
};
|
||||
base.MemberExpression = function (node, st, c) {
|
||||
c(node.object, st, "Expression");
|
||||
if (node.computed) { c(node.property, st, "Expression"); }
|
||||
};
|
||||
base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) {
|
||||
if (node.declaration)
|
||||
{ c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); }
|
||||
if (node.source) { c(node.source, st, "Expression"); }
|
||||
};
|
||||
base.ExportAllDeclaration = function (node, st, c) {
|
||||
if (node.exported)
|
||||
{ c(node.exported, st); }
|
||||
c(node.source, st, "Expression");
|
||||
};
|
||||
base.ImportDeclaration = function (node, st, c) {
|
||||
for (var i = 0, list = node.specifiers; i < list.length; i += 1)
|
||||
{
|
||||
var spec = list[i];
|
||||
|
||||
c(spec, st);
|
||||
}
|
||||
c(node.source, st, "Expression");
|
||||
};
|
||||
base.ImportExpression = function (node, st, c) {
|
||||
c(node.source, st, "Expression");
|
||||
};
|
||||
base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.PrivateIdentifier = base.Literal = ignore;
|
||||
|
||||
base.TaggedTemplateExpression = function (node, st, c) {
|
||||
c(node.tag, st, "Expression");
|
||||
c(node.quasi, st, "Expression");
|
||||
};
|
||||
base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); };
|
||||
base.Class = function (node, st, c) {
|
||||
if (node.id) { c(node.id, st, "Pattern"); }
|
||||
if (node.superClass) { c(node.superClass, st, "Expression"); }
|
||||
c(node.body, st);
|
||||
};
|
||||
base.ClassBody = function (node, st, c) {
|
||||
for (var i = 0, list = node.body; i < list.length; i += 1)
|
||||
{
|
||||
var elt = list[i];
|
||||
|
||||
c(elt, st);
|
||||
}
|
||||
};
|
||||
base.MethodDefinition = base.PropertyDefinition = base.Property = function (node, st, c) {
|
||||
if (node.computed) { c(node.key, st, "Expression"); }
|
||||
if (node.value) { c(node.value, st, "Expression"); }
|
||||
};
|
||||
|
||||
exports.ancestor = ancestor;
|
||||
exports.base = base;
|
||||
exports.findNodeAfter = findNodeAfter;
|
||||
exports.findNodeAround = findNodeAround;
|
||||
exports.findNodeAt = findNodeAt;
|
||||
exports.findNodeBefore = findNodeBefore;
|
||||
exports.full = full;
|
||||
exports.fullAncestor = fullAncestor;
|
||||
exports.make = make;
|
||||
exports.recursive = recursive;
|
||||
exports.simple = simple;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
@@ -0,0 +1,19 @@
|
||||
import { format, truncateLines } from '../../util.js';
|
||||
|
||||
export default {
|
||||
commit: {
|
||||
type: 'confirm',
|
||||
message: context => `Commit (${truncateLines(format(context.git.commitMessage, context), 1, ' [...]')})?`,
|
||||
default: true
|
||||
},
|
||||
tag: {
|
||||
type: 'confirm',
|
||||
message: context => `Tag (${format(context.tagName, context)})?`,
|
||||
default: true
|
||||
},
|
||||
push: {
|
||||
type: 'confirm',
|
||||
message: () => 'Push?',
|
||||
default: true
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
import type { TimerHandle } from './timerHandle';
|
||||
type SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;
|
||||
type ClearIntervalFunction = (handle: TimerHandle) => void;
|
||||
|
||||
interface IntervalProvider {
|
||||
setInterval: SetIntervalFunction;
|
||||
clearInterval: ClearIntervalFunction;
|
||||
delegate:
|
||||
| {
|
||||
setInterval: SetIntervalFunction;
|
||||
clearInterval: ClearIntervalFunction;
|
||||
}
|
||||
| undefined;
|
||||
}
|
||||
|
||||
export const intervalProvider: IntervalProvider = {
|
||||
// When accessing the delegate, use the variable rather than `this` so that
|
||||
// the functions can be called without being bound to the provider.
|
||||
setInterval(handler: () => void, timeout?: number, ...args) {
|
||||
const { delegate } = intervalProvider;
|
||||
if (delegate?.setInterval) {
|
||||
return delegate.setInterval(handler, timeout, ...args);
|
||||
}
|
||||
return setInterval(handler, timeout, ...args);
|
||||
},
|
||||
clearInterval(handle) {
|
||||
const { delegate } = intervalProvider;
|
||||
return (delegate?.clearInterval || clearInterval)(handle as any);
|
||||
},
|
||||
delegate: undefined,
|
||||
};
|
||||
@@ -0,0 +1,70 @@
|
||||
var arrReg = /\[([0-9]*)\]/;
|
||||
|
||||
|
||||
function processHead(pointer, headArr, arrReg, flatKeys) {
|
||||
var headStr, match, index;
|
||||
while (headArr.length > 1) {
|
||||
headStr = headArr.shift();
|
||||
// match = headStr.match(arrReg);
|
||||
match = flatKeys ? false : headStr.match(arrReg);
|
||||
if (match) { //if its array, we need add an empty json object into specified index.
|
||||
if (pointer[headStr.replace(match[0], '')] === undefined) {
|
||||
pointer[headStr.replace(match[0], '')] = [];
|
||||
}
|
||||
index = match[1]; //get index where json object should stay
|
||||
pointer = pointer[headStr.replace(match[0], '')];
|
||||
if (index === '') { //if its dynamic array index, push to the end
|
||||
index = pointer.length;
|
||||
}
|
||||
if (!pointer[index]) { //current index in the array is empty. we need create a new json object.
|
||||
pointer[index] = {};
|
||||
}
|
||||
pointer = pointer[index];
|
||||
} else { //not array, just normal JSON object. we get the reference of it
|
||||
if (pointer[headStr] === undefined) {
|
||||
pointer[headStr] = {};
|
||||
}
|
||||
pointer = pointer[headStr];
|
||||
}
|
||||
}
|
||||
return pointer;
|
||||
}
|
||||
module.exports = {
|
||||
"name": "json",
|
||||
"processSafe": true,
|
||||
"regExp": /^\*json\*/,
|
||||
"parserFunc": function parser_json(params) {
|
||||
var fieldStr = this.getHeadStr();
|
||||
var headArr = (params.config && params.config.flatKeys) ? [fieldStr] : fieldStr.split('.');
|
||||
var match, index, key;
|
||||
//now the pointer is pointing the position to add a key/value pair.
|
||||
var pointer = processHead(params.resultRow, headArr, arrReg, params.config && params.config.flatKeys);
|
||||
key = headArr.shift();
|
||||
match = (params.config && params.config.flatKeys) ? false : key.match(arrReg);
|
||||
if (match) { // the last element is an array, we need check and treat it as an array.
|
||||
try {
|
||||
key = key.replace(match[0], '');
|
||||
if (!pointer[key] || !(pointer[key] instanceof Array)) {
|
||||
pointer[key] = [];
|
||||
}
|
||||
if (pointer[key]) {
|
||||
index = match[1];
|
||||
if (index === '') {
|
||||
index = pointer[key].length;
|
||||
}
|
||||
pointer[key][index] = params.item;
|
||||
} else {
|
||||
params.resultRow[fieldStr] = params.item;
|
||||
}
|
||||
} catch (e) {
|
||||
params.resultRow[fieldStr] = params.item;
|
||||
}
|
||||
} else {
|
||||
if (typeof pointer === "string"){
|
||||
params.resultRow[fieldStr] = params.item;
|
||||
}else{
|
||||
pointer[key] = params.item;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,4 @@
|
||||
export type TrackNotFoundError = {
|
||||
name: string;
|
||||
message: string;
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"xlsx","version":"0.18.5","files":{"dist/LICENSE":{"checkedAt":1678883669087,"integrity":"sha512-GyifQnrIgze5PN9bEZ6dA54v/wdb2IaXA7r5MZujFB6MMsp+39iIvzXh6iB8E6qvrlvH86iCx71okn2d4Xhzwg==","mode":420,"size":11355},"LICENSE":{"checkedAt":1678883669087,"integrity":"sha512-GyifQnrIgze5PN9bEZ6dA54v/wdb2IaXA7r5MZujFB6MMsp+39iIvzXh6iB8E6qvrlvH86iCx71okn2d4Xhzwg==","mode":420,"size":11355},"dist/cpexcel.js":{"checkedAt":1678883669101,"integrity":"sha512-yi8FNVU1yTsGyKcq01t6Ti5U2flfCXRvam3U00sPCRJUSMs/ZhghiJPyh25QmI5Tr3L87d+aS1Irozv4Qt631g==","mode":420,"size":471759},"dist/shim.min.js":{"checkedAt":1678883669101,"integrity":"sha512-nPnkC29R0sikt0ieZaAkk28Ib7Y1Dz7IqePgELH30NnSi1DzG4x+envJAOHz8ZSAveLXAHTR3ai2E9DZUsT8pQ==","mode":420,"size":5651},"dist/xlsx.core.min.js":{"checkedAt":1678883669109,"integrity":"sha512-UhlYw//T419BPq/emC5xSZzkjjreRfN3426517rfsg/XIEC02ggQBb680V0VvP+zaDZ78zqse3rqnnI5EJ6rxA==","mode":420,"size":437032},"dist/xlsx.extendscript.js":{"checkedAt":1678883669118,"integrity":"sha512-3Jm+Dj3Flsg52VpwKKGkdNMFC6o/m+3lVVqckmsdGQhWoymZvNlXyHHnAIdsHWmbTCobBG2bkL2LXsg5wvhHwA==","mode":420,"size":842998},"dist/xlsx.full.min.js":{"checkedAt":1678883669129,"integrity":"sha512-r22gChDnGvBylk90+2e/ycr3RVrDi8DIOkIGNhJlKfuyQM4tIRAI062MaV8sfjQKYVGjOBaZBOA87z+IhZE9DA==","mode":420,"size":881727},"xlsx.js":{"checkedAt":1678883669152,"integrity":"sha512-fTtBQJpl8v6mVGJcWUvZM8Ogk6zAyJqAhn9YFkR4ekVcg96tgE5opHLcl+ItpAscMXsX4pW4GSnAnJNu2k9ANQ==","mode":420,"size":835379},"dist/xlsx.mini.min.js":{"checkedAt":1678883669160,"integrity":"sha512-NDQhXrK2pOCL18FV5/Nc+ya9Vz+7o8dJV1IGRwuuYuRMFhAR0allmjWdZCSHFLDYgMvXKyN2jXlSy2JJEmq+ZA==","mode":420,"size":250826},"dist/xlsx.zahl.js":{"checkedAt":1678883669162,"integrity":"sha512-dDFQDm6zKgK7RdXLzqUB3x/O/dqd/kIrZCppUwui3zDek1RnVKaw8mOXuU534ZtYrVjSUtLf6SuQ7+lkLNtNAg==","mode":420,"size":52828},"xlsxworker.js":{"checkedAt":1678883669162,"integrity":"sha512-GuGO8/yzlONFHFA2z2w1GR15dRBpHRtJE/LDJY/+rkAgYydFq1OEIQdrg9FLeNLHLfGVXfny9KH298JI/i0qFA==","mode":420,"size":432},"bower.json":{"checkedAt":1678883669162,"integrity":"sha512-dcDitDABAIFAEdanHFPAS5kbbzJLn/SRHvCPoubVhQmfhsg0ODsslRiXlByPLWzVr3ht1ARzQ/UWLTkgDloheg==","mode":420,"size":296},"package.json":{"checkedAt":1678883669162,"integrity":"sha512-iumtPmMSS75aQIH+vFXNcxUj9HcCgqh0vbKYdt/QylvWZEXodNj567jT8nzMNE2NEED/fWF5Wu0XpGbY1kHWAg==","mode":420,"size":1900},"types/tsconfig.json":{"checkedAt":1678883669162,"integrity":"sha512-ybH58jjWaklpbIqgrpASpbyeabwinBmAqdMfKhyVHe/XOyB9EJ++gF0R9Yks+T77z+6yngE2jYQiJiGKDHKGEQ==","mode":420,"size":380},"dist/xlsx.core.min.map":{"checkedAt":1678883669181,"integrity":"sha512-K4aNZ/OmaQvOHof3Ag520v/tkxA1m2bB+uEkXb1KhARINfhPzyLlgiZZvAdWmYEisAJU6Cuksfwy7AO6LE3+oA==","mode":420,"size":679438},"dist/xlsx.full.min.map":{"checkedAt":1678883669207,"integrity":"sha512-UjLGhao0mhvcEeiKyiUmLT8ybh2YnevrGb1KYyHVKPCwvjUWNIL23XZATZwtiFHqatr61lZeuAnzOqBSsWOFzA==","mode":420,"size":794676},"dist/xlsx.mini.min.map":{"checkedAt":1678883669239,"integrity":"sha512-NmVJtHBcyUL4O6e84lvLNsmLGygbWS05XvxoG5ScA+llWPOu7i2E/7EQbq/odHj9SNqhCf7YvnQ6cXakXeyN6A==","mode":420,"size":355254},"CHANGELOG.md":{"checkedAt":1678883669238,"integrity":"sha512-XZOS0fWroJ3ybz8loI+3S0WaqvhDTksm1US9YnCIauOElMFBssZ2BA5DflIs0I8XfMPLDVfD9zKxvcsOJ4PWUQ==","mode":420,"size":6412},"README.md":{"checkedAt":1678883669244,"integrity":"sha512-moeX2ssw3KGCXCk9UOZVd+XrOmsrublzv1/q3IN3tgMXerU9bQq3I1uqo39W+xdiPOEqw+DoZXYcX7QtD/m7qw==","mode":420,"size":161500},"dist/cpexcel.full.mjs":{"checkedAt":1678883669248,"integrity":"sha512-AY4pAwQXaGU5waMGZc2UjsgFocbAtfGto0m/Q5nREsLlA2bPHusldCPgTqOuJukcdFyABlSseumV5jFbdqWUjw==","mode":420,"size":472893},"xlsx.mjs":{"checkedAt":1678883669271,"integrity":"sha512-faKoNCVBnPGlIL/ltD8b5UZxZcJxdH7c3WGGmNKga4Ju68pfP02+INzDXr/Ag43Grtiig8lqVwK6r4ix82nTiA==","mode":420,"size":896114},"dist/xlsx.zahl.mjs":{"checkedAt":1678883669272,"integrity":"sha512-iuIsywhxQqHlWO5g1fzHIhKnqOi5Y55tai556dApSwBHSUT4gpRFLy3fqNMIo2Ru/JDwgtVDGRFA0sX2Hbag8Q==","mode":420,"size":52622},"bin/xlsx.njs":{"checkedAt":1678883669272,"integrity":"sha512-AcCmguvyBsfJiYSv7nh4roD9dLceAarF7PisHajMfDQ5WITiDmG66jpkyWA7I3bSDqganmwidifw63yXZaPRSQ==","mode":493,"size":11005},"formats.png":{"checkedAt":1678883669278,"integrity":"sha512-1h5l0EbHWW3lnUv3EYnZBnUWz+0k3o2mm+pLMJrRgs5TiviKiVNRweHPfE5ZKLLoRuXBrvs55uYs/7bPcdAhnA==","mode":420,"size":208619},"legend.png":{"checkedAt":1678883669278,"integrity":"sha512-hKrk84ygDJqJssyJscvbVS7kIPJvvAUGGsK7SibCxB78c7NDBqck9xbbCRJmztsW521dARNeZ8z1hXzFm93o3A==","mode":420,"size":33608},"types/index.d.ts":{"checkedAt":1678883669279,"integrity":"sha512-ypWuu0quhUTgGqEXIYsDWe3xtD0FjTgHbWqpuKSguJ+I+Brv96KiYcJCpoWZKBmuWYEJZX4krocfpjKe5Tk4yQ==","mode":420,"size":22976}}}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "readable-stream",
|
||||
"version": "1.1.14",
|
||||
"description": "Streams3, a user-land copy of the stream library from Node.js v0.11.x",
|
||||
"main": "readable.js",
|
||||
"dependencies": {
|
||||
"core-util-is": "~1.0.0",
|
||||
"isarray": "0.0.1",
|
||||
"string_decoder": "~0.10.x",
|
||||
"inherits": "~2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"tap": "~0.2.6"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test/simple/*.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/isaacs/readable-stream"
|
||||
},
|
||||
"keywords": [
|
||||
"readable",
|
||||
"stream",
|
||||
"pipe"
|
||||
],
|
||||
"browser": {
|
||||
"util": false
|
||||
},
|
||||
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
|
||||
"license": "MIT"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"onErrorResumeNext.js","sourceRoot":"","sources":["../../../../src/internal/observable/onErrorResumeNext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAsExC,MAAM,UAAU,iBAAiB,CAC/B,GAAG,OAAsE;IAEzE,MAAM,WAAW,GAA4B,cAAc,CAAC,OAAO,CAAQ,CAAC;IAE5E,OAAO,IAAI,UAAU,CAAC,CAAC,UAAU,EAAE,EAAE;QACnC,IAAI,WAAW,GAAG,CAAC,CAAC;QACpB,MAAM,aAAa,GAAG,GAAG,EAAE;YACzB,IAAI,WAAW,GAAG,WAAW,CAAC,MAAM,EAAE;gBACpC,IAAI,UAAiC,CAAC;gBACtC,IAAI;oBACF,UAAU,GAAG,SAAS,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;iBACpD;gBAAC,OAAO,GAAG,EAAE;oBACZ,aAAa,EAAE,CAAC;oBAChB,OAAO;iBACR;gBACD,MAAM,eAAe,GAAG,IAAI,kBAAkB,CAAC,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;gBAClF,UAAU,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;gBACtC,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;aACpC;iBAAM;gBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,CAAC;QACF,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
|
||||
var assert = require("chai").assert
|
||||
, coerceToFinite = require("../../finite/coerce");
|
||||
|
||||
describe("finite/coerce", function () {
|
||||
it("Should return input number", function () {
|
||||
assert.equal(coerceToFinite(123.123), 123.123);
|
||||
});
|
||||
it("Should coerce string", function () { assert.equal(coerceToFinite("12"), 12); });
|
||||
it("Should coerce booleans", function () { assert.equal(coerceToFinite(true), 1); });
|
||||
it("Should coerce number objects", function () {
|
||||
assert.equal(coerceToFinite(new Number(343)), 343);
|
||||
});
|
||||
it("Should coerce objects", function () {
|
||||
assert.equal(coerceToFinite({ valueOf: function () { return 23; } }), 23);
|
||||
});
|
||||
|
||||
it("Should reject infinite number", function () {
|
||||
assert.equal(coerceToFinite(Infinity), null);
|
||||
});
|
||||
it("Should reject NaN", function () { assert.equal(coerceToFinite(NaN), null); });
|
||||
|
||||
if (typeof Object.create === "function") {
|
||||
it("Should not coerce objects with no number representation", function () {
|
||||
assert.equal(coerceToFinite(Object.create(null)), null);
|
||||
});
|
||||
}
|
||||
|
||||
it("Should not coerce null", function () { assert.equal(coerceToFinite(null), null); });
|
||||
it("Should not coerce undefined", function () {
|
||||
assert.equal(coerceToFinite(undefined), null);
|
||||
});
|
||||
|
||||
if (typeof Symbol === "function") {
|
||||
it("Should not coerce symbols", function () {
|
||||
assert.equal(coerceToFinite(Symbol("foo")), null);
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
var getNative = require('./_getNative');
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var nativeCreate = getNative(Object, 'create');
|
||||
|
||||
module.exports = nativeCreate;
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"F A B","2":"J D E CC"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g 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 h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"DC","132":"tB EC FC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 B C K L G M N O w g 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 h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","260":"I v J D E F A"},E:{"1":"v J D E F A B C K L G IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","260":"I HC zB"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G M N O w g 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 h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e SC qB AC TC rB","260":"F PC QC RC"},G:{"1":"E VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","260":"zB UC BC"},H:{"260":"oC"},I:{"1":"I f sC BC tC uC","260":"tB pC qC rC"},J:{"1":"A","260":"D"},K:{"1":"B C h qB AC rB","260":"A"},L:{"1":"H"},M:{"1":"H"},N:{"1":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:2,C:"getComputedStyle"};
|
||||
@@ -0,0 +1,78 @@
|
||||
//
|
||||
// Main
|
||||
//
|
||||
export default function memoize(fn, options) {
|
||||
var cache = options && options.cache ? options.cache : cacheDefault;
|
||||
var serializer = options && options.serializer ? options.serializer : serializerDefault;
|
||||
var strategy = options && options.strategy ? options.strategy : strategyDefault;
|
||||
return strategy(fn, {
|
||||
cache: cache,
|
||||
serializer: serializer,
|
||||
});
|
||||
}
|
||||
//
|
||||
// Strategy
|
||||
//
|
||||
function isPrimitive(value) {
|
||||
return (value == null || typeof value === 'number' || typeof value === 'boolean'); // || typeof value === "string" 'unsafe' primitive for our needs
|
||||
}
|
||||
function monadic(fn, cache, serializer, arg) {
|
||||
var cacheKey = isPrimitive(arg) ? arg : serializer(arg);
|
||||
var computedValue = cache.get(cacheKey);
|
||||
if (typeof computedValue === 'undefined') {
|
||||
computedValue = fn.call(this, arg);
|
||||
cache.set(cacheKey, computedValue);
|
||||
}
|
||||
return computedValue;
|
||||
}
|
||||
function variadic(fn, cache, serializer) {
|
||||
var args = Array.prototype.slice.call(arguments, 3);
|
||||
var cacheKey = serializer(args);
|
||||
var computedValue = cache.get(cacheKey);
|
||||
if (typeof computedValue === 'undefined') {
|
||||
computedValue = fn.apply(this, args);
|
||||
cache.set(cacheKey, computedValue);
|
||||
}
|
||||
return computedValue;
|
||||
}
|
||||
function assemble(fn, context, strategy, cache, serialize) {
|
||||
return strategy.bind(context, fn, cache, serialize);
|
||||
}
|
||||
function strategyDefault(fn, options) {
|
||||
var strategy = fn.length === 1 ? monadic : variadic;
|
||||
return assemble(fn, this, strategy, options.cache.create(), options.serializer);
|
||||
}
|
||||
function strategyVariadic(fn, options) {
|
||||
return assemble(fn, this, variadic, options.cache.create(), options.serializer);
|
||||
}
|
||||
function strategyMonadic(fn, options) {
|
||||
return assemble(fn, this, monadic, options.cache.create(), options.serializer);
|
||||
}
|
||||
//
|
||||
// Serializer
|
||||
//
|
||||
var serializerDefault = function () {
|
||||
return JSON.stringify(arguments);
|
||||
};
|
||||
//
|
||||
// Cache
|
||||
//
|
||||
function ObjectWithoutPrototypeCache() {
|
||||
this.cache = Object.create(null);
|
||||
}
|
||||
ObjectWithoutPrototypeCache.prototype.get = function (key) {
|
||||
return this.cache[key];
|
||||
};
|
||||
ObjectWithoutPrototypeCache.prototype.set = function (key, value) {
|
||||
this.cache[key] = value;
|
||||
};
|
||||
var cacheDefault = {
|
||||
create: function create() {
|
||||
// @ts-ignore
|
||||
return new ObjectWithoutPrototypeCache();
|
||||
},
|
||||
};
|
||||
export var strategies = {
|
||||
variadic: strategyVariadic,
|
||||
monadic: strategyMonadic,
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $charCodeAt = callBound('String.prototype.charCodeAt');
|
||||
var $numberToString = callBound('Number.prototype.toString');
|
||||
var $toLowerCase = callBound('String.prototype.toLowerCase');
|
||||
var $strSlice = callBound('String.prototype.slice');
|
||||
|
||||
// https://262.ecma-international.org/9.0/#sec-unicodeescape
|
||||
|
||||
module.exports = function UnicodeEscape(C) {
|
||||
if (typeof C !== 'string' || C.length !== 1) {
|
||||
throw new $TypeError('Assertion failed: `C` must be a single code unit');
|
||||
}
|
||||
var n = $charCodeAt(C, 0);
|
||||
if (n > 0xFFFF) {
|
||||
throw new $TypeError('`Assertion failed: numeric value of `C` must be <= 0xFFFF');
|
||||
}
|
||||
|
||||
return '\\u' + $strSlice('0000' + $toLowerCase($numberToString(n, 16)), -4);
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
import { ParserOptions } from './parser';
|
||||
import { MessageFormatElement } from './types';
|
||||
export declare function parse(message: string, opts?: ParserOptions): MessageFormatElement[];
|
||||
export * from './types';
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"is-negative-zero","version":"2.0.2","files":{".eslintignore":{"checkedAt":1678883671537,"integrity":"sha512-VLhEcqup3IHXtZJPt07ZYoA9JNRjy1jhU/NU41Yw4E8mEyea/z+6bw5hL3lhCO09pji9E0BH2Q3aDXdc3i9zBg==","mode":420,"size":10},".nycrc":{"checkedAt":1678883669555,"integrity":"sha512-2vm1RFz8Ajl/OYrfoCWPJIm3Bpnf7Gyn5bha/lZx/cq+We3uMy9xj15XeP6x4wF3jf/pO7KMHAkU9mllm605xg==","mode":420,"size":139},"LICENSE":{"checkedAt":1678883671697,"integrity":"sha512-VAafw6n4N41XvAsR+n+iEdr0zTIENa8hymUUtLGRZtNAEzrKNuwlPdG/4XVTK8bgjhOLpy2sORJp/QqopRK+Yg==","mode":420,"size":1081},".eslintrc":{"checkedAt":1678883671697,"integrity":"sha512-Nz6+6YZAqPFINQ9SyKjp0yhb1s+edngfB3AT8yukHIb7x99rBIRl60IAYjhtkSqf7zvU0B53a9h52xEcC1Q7SA==","mode":420,"size":83},".editorconfig":{"checkedAt":1678883671697,"integrity":"sha512-RvB77c97TFC6kBvOB3BZYFq7ybfyUPOUVbsljRJSPPTgfN3kPWASa5Qju22QgvrPtFg7AObPreMtImzdT4hoaA==","mode":420,"size":129},"index.js":{"checkedAt":1678883671697,"integrity":"sha512-cl0LWGSaeWnZvM2Z8WNd3D4xN+Ri6wsyQfChvfyxDC2u3GKLIZYAF5vdyQ0THet6/sTRoLqwzYG1+Gj9OERbJA==","mode":420,"size":122},"package.json":{"checkedAt":1678883671697,"integrity":"sha512-fRNnYZIgyRJEj/TkATyVYmGLH5OCXGDIeoYoUr38EPj/Kmeg+Gyj6j8eTyD1Quq4GDs8bkUI81hXbevXQ8ZqNA==","mode":420,"size":1967},"test/index.js":{"checkedAt":1678883671697,"integrity":"sha512-z11JnL4OTPrjmL/vN/a0hkygBzcqdVr1bihDzCrG/38AoOv/Byhe9xcSzo1SQWymamAj/Iu1y/3QmOgPs80BIA==","mode":420,"size":1081},"README.md":{"checkedAt":1678883671700,"integrity":"sha512-5VuKqBde0n4eQU+RBHDxdI8lqgyuGDHBSYz5xLrdUZsbx7ke8iCDzqw0iJrL3ZJsYLpsDTRTG2pjP3Hzuk0Ogw==","mode":420,"size":2254},"CHANGELOG.md":{"checkedAt":1678883671700,"integrity":"sha512-cKof2dxnxiI3RitHE/8Wv8q5PiVGCh3I8AfI7fs8FE9dS7oZpZLX6qroXg3egAqPWyC8CA0R4hdgUEoCKJcYEg==","mode":420,"size":14551},".github/FUNDING.yml":{"checkedAt":1678883671700,"integrity":"sha512-NQi27ORCzd8mX+Ay2Fyw229VI/R0BIi33e+KvNMKjncs1cf+jFpA//y89PsYD+gGemthitswCB9UrOd/3xRPRA==","mode":420,"size":585}}}
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 apvarun
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2017 Pete Cook https://cookpete.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"is-obj","version":"2.0.0","files":{"license":{"checkedAt":1678883669272,"integrity":"sha512-nIst73auX/5NY2Fmv5Y116vWnNrEv4GaIUX3lpZG05rpXJY2S8EX+fpUS5hRjClCM0VdT2Za9DDHXXB5jdSrEw==","mode":420,"size":1109},"index.js":{"checkedAt":1678883672491,"integrity":"sha512-PcRHJbfZ8w164Qky96bjtKvV8Vl54ezX2hMgnimnWqQaGmlJtpKfbfHGlIJFDRP1tsNgKsUjPdGqf0xXvSDMyw==","mode":420,"size":144},"index.d.ts":{"checkedAt":1678883672491,"integrity":"sha512-NhByWv/aZ7kiGCkfGS5o/2Aq0P0IFiM+mhUA/+R9m7avhX1L04DOYeQ+fNRLJ+GUZ8YjcggqxywMLXwlGws1Xg==","mode":420,"size":345},"readme.md":{"checkedAt":1678883672491,"integrity":"sha512-jUnvv0RQsOjHCSMB93Zm754IkLz2ZeZr+C1zKgByFWEtgnIcqvYfgNb3DAk60aYNZ7Y8TrRYtqMjwAL1HJtNiQ==","mode":420,"size":688},"package.json":{"checkedAt":1678883672491,"integrity":"sha512-UKjy6jYEvlSi4UoTGAzpOF30etTP1CAS/WLPUvr/bFR/HqqiiHZ6kmhy45iKXGW4P6oIuuTb9tOUNyuZn3v53A==","mode":420,"size":535}}}
|
||||
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.scan = void 0;
|
||||
var lift_1 = require("../util/lift");
|
||||
var scanInternals_1 = require("./scanInternals");
|
||||
function scan(accumulator, seed) {
|
||||
return lift_1.operate(scanInternals_1.scanInternals(accumulator, seed, arguments.length >= 2, true));
|
||||
}
|
||||
exports.scan = scan;
|
||||
//# sourceMappingURL=scan.js.map
|
||||
@@ -0,0 +1,2 @@
|
||||
export declare type ID = string;
|
||||
export declare function generateUUID(): ID;
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('has', require('../has'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,173 @@
|
||||
import { AnonymousSubject } from '../../Subject';
|
||||
import { Observable } from '../../Observable';
|
||||
import { Operator } from '../../Operator';
|
||||
import { Observer, NextObserver } from '../../types';
|
||||
/**
|
||||
* WebSocketSubjectConfig is a plain Object that allows us to make our
|
||||
* webSocket configurable.
|
||||
*
|
||||
* <span class="informal">Provides flexibility to {@link webSocket}</span>
|
||||
*
|
||||
* It defines a set of properties to provide custom behavior in specific
|
||||
* moments of the socket's lifecycle. When the connection opens we can
|
||||
* use `openObserver`, when the connection is closed `closeObserver`, if we
|
||||
* are interested in listening for data coming from server: `deserializer`,
|
||||
* which allows us to customize the deserialization strategy of data before passing it
|
||||
* to the socket client. By default, `deserializer` is going to apply `JSON.parse` to each message coming
|
||||
* from the Server.
|
||||
*
|
||||
* ## Examples
|
||||
*
|
||||
* **deserializer**, the default for this property is `JSON.parse` but since there are just two options
|
||||
* for incoming data, either be text or binary data. We can apply a custom deserialization strategy
|
||||
* or just simply skip the default behaviour.
|
||||
*
|
||||
* ```ts
|
||||
* import { webSocket } from 'rxjs/webSocket';
|
||||
*
|
||||
* const wsSubject = webSocket({
|
||||
* url: 'ws://localhost:8081',
|
||||
* //Apply any transformation of your choice.
|
||||
* deserializer: ({ data }) => data
|
||||
* });
|
||||
*
|
||||
* wsSubject.subscribe(console.log);
|
||||
*
|
||||
* // Let's suppose we have this on the Server: ws.send('This is a msg from the server')
|
||||
* //output
|
||||
* //
|
||||
* // This is a msg from the server
|
||||
* ```
|
||||
*
|
||||
* **serializer** allows us to apply custom serialization strategy but for the outgoing messages.
|
||||
*
|
||||
* ```ts
|
||||
* import { webSocket } from 'rxjs/webSocket';
|
||||
*
|
||||
* const wsSubject = webSocket({
|
||||
* url: 'ws://localhost:8081',
|
||||
* // Apply any transformation of your choice.
|
||||
* serializer: msg => JSON.stringify({ channel: 'webDevelopment', msg: msg })
|
||||
* });
|
||||
*
|
||||
* wsSubject.subscribe(() => subject.next('msg to the server'));
|
||||
*
|
||||
* // Let's suppose we have this on the Server:
|
||||
* // ws.on('message', msg => console.log);
|
||||
* // ws.send('This is a msg from the server');
|
||||
* // output at server side:
|
||||
* //
|
||||
* // {"channel":"webDevelopment","msg":"msg to the server"}
|
||||
* ```
|
||||
*
|
||||
* **closeObserver** allows us to set a custom error when an error raises up.
|
||||
*
|
||||
* ```ts
|
||||
* import { webSocket } from 'rxjs/webSocket';
|
||||
*
|
||||
* const wsSubject = webSocket({
|
||||
* url: 'ws://localhost:8081',
|
||||
* closeObserver: {
|
||||
* next() {
|
||||
* const customError = { code: 6666, reason: 'Custom evil reason' }
|
||||
* console.log(`code: ${ customError.code }, reason: ${ customError.reason }`);
|
||||
* }
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* // output
|
||||
* // code: 6666, reason: Custom evil reason
|
||||
* ```
|
||||
*
|
||||
* **openObserver**, Let's say we need to make some kind of init task before sending/receiving msgs to the
|
||||
* webSocket or sending notification that the connection was successful, this is when
|
||||
* openObserver is useful for.
|
||||
*
|
||||
* ```ts
|
||||
* import { webSocket } from 'rxjs/webSocket';
|
||||
*
|
||||
* const wsSubject = webSocket({
|
||||
* url: 'ws://localhost:8081',
|
||||
* openObserver: {
|
||||
* next: () => {
|
||||
* console.log('Connection ok');
|
||||
* }
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* // output
|
||||
* // Connection ok
|
||||
* ```
|
||||
*/
|
||||
export interface WebSocketSubjectConfig<T> {
|
||||
/** The url of the socket server to connect to */
|
||||
url: string;
|
||||
/** The protocol to use to connect */
|
||||
protocol?: string | Array<string>;
|
||||
/** @deprecated Will be removed in v8. Use {@link deserializer} instead. */
|
||||
resultSelector?: (e: MessageEvent) => T;
|
||||
/**
|
||||
* A serializer used to create messages from passed values before the
|
||||
* messages are sent to the server. Defaults to JSON.stringify.
|
||||
*/
|
||||
serializer?: (value: T) => WebSocketMessage;
|
||||
/**
|
||||
* A deserializer used for messages arriving on the socket from the
|
||||
* server. Defaults to JSON.parse.
|
||||
*/
|
||||
deserializer?: (e: MessageEvent) => T;
|
||||
/**
|
||||
* An Observer that watches when open events occur on the underlying web socket.
|
||||
*/
|
||||
openObserver?: NextObserver<Event>;
|
||||
/**
|
||||
* An Observer that watches when close events occur on the underlying web socket
|
||||
*/
|
||||
closeObserver?: NextObserver<CloseEvent>;
|
||||
/**
|
||||
* An Observer that watches when a close is about to occur due to
|
||||
* unsubscription.
|
||||
*/
|
||||
closingObserver?: NextObserver<void>;
|
||||
/**
|
||||
* A WebSocket constructor to use. This is useful for situations like using a
|
||||
* WebSocket impl in Node (WebSocket is a DOM API), or for mocking a WebSocket
|
||||
* for testing purposes
|
||||
*/
|
||||
WebSocketCtor?: {
|
||||
new (url: string, protocols?: string | string[]): WebSocket;
|
||||
};
|
||||
/** Sets the `binaryType` property of the underlying WebSocket. */
|
||||
binaryType?: 'blob' | 'arraybuffer';
|
||||
}
|
||||
export declare type WebSocketMessage = string | ArrayBuffer | Blob | ArrayBufferView;
|
||||
export declare class WebSocketSubject<T> extends AnonymousSubject<T> {
|
||||
private _config;
|
||||
private _socket;
|
||||
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;
|
||||
/**
|
||||
* Creates an {@link Observable}, that when subscribed to, sends a message,
|
||||
* defined by the `subMsg` function, to the server over the socket to begin a
|
||||
* subscription to data over that socket. Once data arrives, the
|
||||
* `messageFilter` argument will be used to select the appropriate data for
|
||||
* the resulting Observable. When finalization occurs, either due to
|
||||
* unsubscription, completion, or error, a message defined by the `unsubMsg`
|
||||
* argument will be sent to the server over the WebSocketSubject.
|
||||
*
|
||||
* @param subMsg A function to generate the subscription message to be sent to
|
||||
* the server. This will still be processed by the serializer in the
|
||||
* WebSocketSubject's config. (Which defaults to JSON serialization)
|
||||
* @param unsubMsg A function to generate the unsubscription message to be
|
||||
* sent to the server at finalization. This will still be processed by the
|
||||
* serializer in the WebSocketSubject's config.
|
||||
* @param messageFilter A predicate for selecting the appropriate messages
|
||||
* from the server for the output stream.
|
||||
*/
|
||||
multiplex(subMsg: () => any, unsubMsg: () => any, messageFilter: (value: T) => boolean): Observable<T>;
|
||||
private _connectSocket;
|
||||
unsubscribe(): void;
|
||||
}
|
||||
//# sourceMappingURL=WebSocketSubject.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"timer.js","sourceRoot":"","sources":["../../../../src/internal/observable/timer.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAE3C,4CAA6D;AAC7D,mDAAkD;AAClD,yCAA6C;AAgI7C,SAAgB,KAAK,CACnB,OAA0B,EAC1B,mBAA4C,EAC5C,SAAyC;IAFzC,wBAAA,EAAA,WAA0B;IAE1B,0BAAA,EAAA,YAA2B,aAAc;IAIzC,IAAI,gBAAgB,GAAG,CAAC,CAAC,CAAC;IAE1B,IAAI,mBAAmB,IAAI,IAAI,EAAE;QAI/B,IAAI,yBAAW,CAAC,mBAAmB,CAAC,EAAE;YACpC,SAAS,GAAG,mBAAmB,CAAC;SACjC;aAAM;YAGL,gBAAgB,GAAG,mBAAmB,CAAC;SACxC;KACF;IAED,OAAO,IAAI,uBAAU,CAAC,UAAC,UAAU;QAI/B,IAAI,GAAG,GAAG,oBAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,SAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QAEvE,IAAI,GAAG,GAAG,CAAC,EAAE;YAEX,GAAG,GAAG,CAAC,CAAC;SACT;QAGD,IAAI,CAAC,GAAG,CAAC,CAAC;QAGV,OAAO,SAAS,CAAC,QAAQ,CAAC;YACxB,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBAEtB,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;gBAErB,IAAI,CAAC,IAAI,gBAAgB,EAAE;oBAGzB,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;iBAC5C;qBAAM;oBAEL,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;aACF;QACH,CAAC,EAAE,GAAG,CAAC,CAAC;IACV,CAAC,CAAC,CAAC;AACL,CAAC;AArDD,sBAqDC"}
|
||||
@@ -0,0 +1,3 @@
|
||||
/// <reference types="node" resolution-mode="require"/>
|
||||
import type { ClientRequestArgs } from 'node:http';
|
||||
export default function getBodySize(body: unknown, headers: ClientRequestArgs['headers']): Promise<number | undefined>;
|
||||
@@ -0,0 +1,21 @@
|
||||
import type Context from '../Context';
|
||||
import type { Writable, Readable } from 'svelte/store';
|
||||
export default class Pages {
|
||||
pageNumber: Writable<number>;
|
||||
rowCount: Readable<{
|
||||
total: number;
|
||||
start: number;
|
||||
end: number;
|
||||
}>;
|
||||
rowsPerPage: Writable<number | null>;
|
||||
triggerChange: Writable<number>;
|
||||
pages: Readable<any[]>;
|
||||
constructor(context: Context);
|
||||
get(): Readable<any[]>;
|
||||
goTo(number: number): void;
|
||||
previous(): void;
|
||||
next(): void;
|
||||
private getPageNumber;
|
||||
private getTotalRowCout;
|
||||
private getRowsPerPage;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = isNumeric;
|
||||
|
||||
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
||||
|
||||
var _alpha = require("./alpha");
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var numericNoSymbols = /^[0-9]+$/;
|
||||
|
||||
function isNumeric(str, options) {
|
||||
(0, _assertString.default)(str);
|
||||
|
||||
if (options && options.no_symbols) {
|
||||
return numericNoSymbols.test(str);
|
||||
}
|
||||
|
||||
return new RegExp("^[+-]?([0-9]*[".concat((options || {}).locale ? _alpha.decimal[options.locale] : '.', "])?[0-9]+$")).test(str);
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
module.exports.default = exports.default;
|
||||
@@ -0,0 +1,23 @@
|
||||
var arrayAggregator = require('./_arrayAggregator'),
|
||||
baseAggregator = require('./_baseAggregator'),
|
||||
baseIteratee = require('./_baseIteratee'),
|
||||
isArray = require('./isArray');
|
||||
|
||||
/**
|
||||
* Creates a function like `_.groupBy`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} setter The function to set accumulator values.
|
||||
* @param {Function} [initializer] The accumulator object initializer.
|
||||
* @returns {Function} Returns the new aggregator function.
|
||||
*/
|
||||
function createAggregator(setter, initializer) {
|
||||
return function(collection, iteratee) {
|
||||
var func = isArray(collection) ? arrayAggregator : baseAggregator,
|
||||
accumulator = initializer ? initializer() : {};
|
||||
|
||||
return func(collection, setter, baseIteratee(iteratee, 2), accumulator);
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = createAggregator;
|
||||
@@ -0,0 +1,8 @@
|
||||
import { isFunction } from "./isFunction.js";
|
||||
export const isFile = (value) => Boolean(value
|
||||
&& typeof value === "object"
|
||||
&& isFunction(value.constructor)
|
||||
&& value[Symbol.toStringTag] === "File"
|
||||
&& isFunction(value.stream)
|
||||
&& value.name != null);
|
||||
export const isFileLike = isFile;
|
||||
@@ -0,0 +1,43 @@
|
||||
'use strict';
|
||||
|
||||
var callBind = require('call-bind');
|
||||
var callBound = require('call-bind/callBound');
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
var isTypedArray = require('is-typed-array');
|
||||
|
||||
var $ArrayBuffer = GetIntrinsic('ArrayBuffer', true);
|
||||
var $Float32Array = GetIntrinsic('Float32Array', true);
|
||||
var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true);
|
||||
|
||||
// in node 0.10, ArrayBuffers have no prototype methods, but have an own slot-checking `slice` method
|
||||
var abSlice = $ArrayBuffer && !$byteLength && new $ArrayBuffer().slice;
|
||||
var $abSlice = abSlice && callBind(abSlice);
|
||||
|
||||
module.exports = $byteLength || $abSlice
|
||||
? function isArrayBuffer(obj) {
|
||||
if (!obj || typeof obj !== 'object') {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
if ($byteLength) {
|
||||
$byteLength(obj);
|
||||
} else {
|
||||
$abSlice(obj, 0);
|
||||
}
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
: $Float32Array
|
||||
// in node 0.8, ArrayBuffers have no prototype or own methods
|
||||
? function IsArrayBuffer(obj) {
|
||||
try {
|
||||
return (new $Float32Array(obj)).buffer === obj && !isTypedArray(obj);
|
||||
} catch (e) {
|
||||
return typeof obj === 'object' && e.name === 'RangeError';
|
||||
}
|
||||
}
|
||||
: function isArrayBuffer(obj) { // eslint-disable-line no-unused-vars
|
||||
return false;
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('template', require('../template'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,350 @@
|
||||
'use strict';
|
||||
|
||||
// Translate the old options to the new Resolver functionality.
|
||||
|
||||
const fs = require('fs');
|
||||
const nmod = require('module');
|
||||
const {EventEmitter} = require('events');
|
||||
const util = require('util');
|
||||
|
||||
const {
|
||||
Resolver,
|
||||
DefaultResolver
|
||||
} = require('./resolver');
|
||||
const {VMScript} = require('./script');
|
||||
const {VM} = require('./vm');
|
||||
const {VMError} = require('./bridge');
|
||||
const {DefaultFileSystem} = require('./filesystem');
|
||||
|
||||
/**
|
||||
* Require wrapper to be able to annotate require with webpackIgnore.
|
||||
*
|
||||
* @private
|
||||
* @param {string} moduleName - Name of module to load.
|
||||
* @return {*} Module exports.
|
||||
*/
|
||||
function defaultRequire(moduleName) {
|
||||
// Set module.parser.javascript.commonjsMagicComments=true in your webpack config.
|
||||
// eslint-disable-next-line global-require
|
||||
return require(/* webpackIgnore: true */ moduleName);
|
||||
}
|
||||
|
||||
// source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping
|
||||
function escapeRegExp(string) {
|
||||
return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||
}
|
||||
|
||||
function makeExternalMatcherRegex(obj) {
|
||||
return escapeRegExp(obj).replace(/\\\\|\//g, '[\\\\/]')
|
||||
.replace(/\\\*\\\*/g, '.*').replace(/\\\*/g, '[^\\\\/]*').replace(/\\\?/g, '[^\\\\/]');
|
||||
}
|
||||
|
||||
function makeExternalMatcher(obj) {
|
||||
const regexString = makeExternalMatcherRegex(obj);
|
||||
return new RegExp(`[\\\\/]node_modules[\\\\/]${regexString}(?:[\\\\/](?!(?:.*[\\\\/])?node_modules[\\\\/]).*)?$`);
|
||||
}
|
||||
|
||||
class LegacyResolver extends DefaultResolver {
|
||||
|
||||
constructor(fileSystem, builtinModules, checkPath, globalPaths, pathContext, customResolver, hostRequire, compiler, strict, externals, allowTransitive) {
|
||||
super(fileSystem, builtinModules, checkPath, globalPaths, pathContext, customResolver, hostRequire, compiler, strict);
|
||||
this.externals = externals;
|
||||
this.currMod = undefined;
|
||||
this.trustedMods = new WeakMap();
|
||||
this.allowTransitive = allowTransitive;
|
||||
}
|
||||
|
||||
isPathAllowed(path) {
|
||||
return this.isPathAllowedForModule(path, this.currMod);
|
||||
}
|
||||
|
||||
isPathAllowedForModule(path, mod) {
|
||||
if (!super.isPathAllowed(path)) return false;
|
||||
if (mod) {
|
||||
if (mod.allowTransitive) return true;
|
||||
if (path.startsWith(mod.path)) {
|
||||
const rem = path.slice(mod.path.length);
|
||||
if (!/(?:^|[\\\\/])node_modules(?:$|[\\\\/])/.test(rem)) return true;
|
||||
}
|
||||
}
|
||||
return this.externals.some(regex => regex.test(path));
|
||||
}
|
||||
|
||||
registerModule(mod, filename, path, parent, direct) {
|
||||
const trustedParent = this.trustedMods.get(parent);
|
||||
this.trustedMods.set(mod, {
|
||||
filename,
|
||||
path,
|
||||
paths: this.genLookupPaths(path),
|
||||
allowTransitive: this.allowTransitive &&
|
||||
((direct && trustedParent && trustedParent.allowTransitive) || this.externals.some(regex => regex.test(filename)))
|
||||
});
|
||||
}
|
||||
|
||||
resolveFull(mod, x, options, ext, direct) {
|
||||
this.currMod = undefined;
|
||||
if (!direct) return super.resolveFull(mod, x, options, ext, false);
|
||||
const trustedMod = this.trustedMods.get(mod);
|
||||
if (!trustedMod || mod.path !== trustedMod.path) return super.resolveFull(mod, x, options, ext, false);
|
||||
const paths = [...mod.paths];
|
||||
if (paths.length === trustedMod.length) {
|
||||
for (let i = 0; i < paths.length; i++) {
|
||||
if (paths[i] !== trustedMod.paths[i]) {
|
||||
return super.resolveFull(mod, x, options, ext, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
const extCopy = Object.assign({__proto__: null}, ext);
|
||||
try {
|
||||
this.currMod = trustedMod;
|
||||
return super.resolveFull(trustedMod, x, undefined, extCopy, true);
|
||||
} finally {
|
||||
this.currMod = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
checkAccess(mod, filename) {
|
||||
const trustedMod = this.trustedMods.get(mod);
|
||||
if ((!trustedMod || trustedMod.filename !== filename) && !this.isPathAllowedForModule(filename, undefined)) {
|
||||
throw new VMError(`Module '${filename}' is not allowed to be required. The path is outside the border!`, 'EDENIED');
|
||||
}
|
||||
}
|
||||
|
||||
loadJS(vm, mod, filename) {
|
||||
filename = this.pathResolve(filename);
|
||||
this.checkAccess(mod, filename);
|
||||
if (this.pathContext(filename, 'js') === 'sandbox') {
|
||||
const trustedMod = this.trustedMods.get(mod);
|
||||
const script = this.readScript(filename);
|
||||
vm.run(script, {filename, strict: true, module: mod, wrapper: 'none', dirname: trustedMod ? trustedMod.path : mod.path});
|
||||
} else {
|
||||
const m = this.hostRequire(filename);
|
||||
mod.exports = vm.readonly(m);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function defaultBuiltinLoader(resolver, vm, id) {
|
||||
const mod = resolver.hostRequire(id);
|
||||
return vm.readonly(mod);
|
||||
}
|
||||
|
||||
const eventsModules = new WeakMap();
|
||||
|
||||
function defaultBuiltinLoaderEvents(resolver, vm, id) {
|
||||
return eventsModules.get(vm);
|
||||
}
|
||||
|
||||
let cacheBufferScript;
|
||||
|
||||
function defaultBuiltinLoaderBuffer(resolver, vm, id) {
|
||||
if (!cacheBufferScript) {
|
||||
cacheBufferScript = new VMScript('return buffer=>({Buffer: buffer});', {__proto__: null, filename: 'buffer.js'});
|
||||
}
|
||||
const makeBuffer = vm.run(cacheBufferScript, {__proto__: null, strict: true, wrapper: 'none'});
|
||||
return makeBuffer(Buffer);
|
||||
}
|
||||
|
||||
let cacheUtilScript;
|
||||
|
||||
function defaultBuiltinLoaderUtil(resolver, vm, id) {
|
||||
if (!cacheUtilScript) {
|
||||
cacheUtilScript = new VMScript(`return function inherits(ctor, superCtor) {
|
||||
ctor.super_ = superCtor;
|
||||
Object.setPrototypeOf(ctor.prototype, superCtor.prototype);
|
||||
}`, {__proto__: null, filename: 'util.js'});
|
||||
}
|
||||
const inherits = vm.run(cacheUtilScript, {__proto__: null, strict: true, wrapper: 'none'});
|
||||
const copy = Object.assign({}, util);
|
||||
copy.inherits = inherits;
|
||||
return vm.readonly(copy);
|
||||
}
|
||||
|
||||
const BUILTIN_MODULES = (nmod.builtinModules || Object.getOwnPropertyNames(process.binding('natives'))).filter(s=>!s.startsWith('internal/'));
|
||||
|
||||
let EventEmitterReferencingAsyncResourceClass = null;
|
||||
if (EventEmitter.EventEmitterAsyncResource) {
|
||||
// eslint-disable-next-line global-require
|
||||
const {AsyncResource} = require('async_hooks');
|
||||
const kEventEmitter = Symbol('kEventEmitter');
|
||||
class EventEmitterReferencingAsyncResource extends AsyncResource {
|
||||
constructor(ee, type, options) {
|
||||
super(type, options);
|
||||
this[kEventEmitter] = ee;
|
||||
}
|
||||
get eventEmitter() {
|
||||
return this[kEventEmitter];
|
||||
}
|
||||
}
|
||||
EventEmitterReferencingAsyncResourceClass = EventEmitterReferencingAsyncResource;
|
||||
}
|
||||
|
||||
let cacheEventsScript;
|
||||
|
||||
const SPECIAL_MODULES = {
|
||||
events(vm) {
|
||||
if (!cacheEventsScript) {
|
||||
const eventsSource = fs.readFileSync(`${__dirname}/events.js`, 'utf8');
|
||||
cacheEventsScript = new VMScript(`(function (fromhost) { const module = {}; module.exports={};{ ${eventsSource}
|
||||
} return module.exports;})`, {filename: 'events.js'});
|
||||
}
|
||||
const closure = VM.prototype.run.call(vm, cacheEventsScript);
|
||||
const eventsInstance = closure(vm.readonly({
|
||||
kErrorMonitor: EventEmitter.errorMonitor,
|
||||
once: EventEmitter.once,
|
||||
on: EventEmitter.on,
|
||||
getEventListeners: EventEmitter.getEventListeners,
|
||||
EventEmitterReferencingAsyncResource: EventEmitterReferencingAsyncResourceClass
|
||||
}));
|
||||
eventsModules.set(vm, eventsInstance);
|
||||
vm._addProtoMapping(EventEmitter.prototype, eventsInstance.EventEmitter.prototype);
|
||||
return defaultBuiltinLoaderEvents;
|
||||
},
|
||||
buffer(vm) {
|
||||
return defaultBuiltinLoaderBuffer;
|
||||
},
|
||||
util(vm) {
|
||||
return defaultBuiltinLoaderUtil;
|
||||
}
|
||||
};
|
||||
|
||||
function addDefaultBuiltin(builtins, key, vm) {
|
||||
if (builtins[key]) return;
|
||||
const special = SPECIAL_MODULES[key];
|
||||
builtins[key] = special ? special(vm) : defaultBuiltinLoader;
|
||||
}
|
||||
|
||||
|
||||
function genBuiltinsFromOptions(vm, builtinOpt, mockOpt, override) {
|
||||
const builtins = {__proto__: null};
|
||||
if (mockOpt) {
|
||||
const keys = Object.getOwnPropertyNames(mockOpt);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
const key = keys[i];
|
||||
builtins[key] = (resolver, tvm, id) => tvm.readonly(mockOpt[key]);
|
||||
}
|
||||
}
|
||||
if (override) {
|
||||
const keys = Object.getOwnPropertyNames(override);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
const key = keys[i];
|
||||
builtins[key] = override[key];
|
||||
}
|
||||
}
|
||||
if (Array.isArray(builtinOpt)) {
|
||||
const def = builtinOpt.indexOf('*') >= 0;
|
||||
if (def) {
|
||||
for (let i = 0; i < BUILTIN_MODULES.length; i++) {
|
||||
const name = BUILTIN_MODULES[i];
|
||||
if (builtinOpt.indexOf(`-${name}`) === -1) {
|
||||
addDefaultBuiltin(builtins, name, vm);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < BUILTIN_MODULES.length; i++) {
|
||||
const name = BUILTIN_MODULES[i];
|
||||
if (builtinOpt.indexOf(name) !== -1) {
|
||||
addDefaultBuiltin(builtins, name, vm);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (builtinOpt) {
|
||||
for (let i = 0; i < BUILTIN_MODULES.length; i++) {
|
||||
const name = BUILTIN_MODULES[i];
|
||||
if (builtinOpt[name]) {
|
||||
addDefaultBuiltin(builtins, name, vm);
|
||||
}
|
||||
}
|
||||
}
|
||||
return builtins;
|
||||
}
|
||||
|
||||
function defaultCustomResolver() {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const DEFAULT_FS = new DefaultFileSystem();
|
||||
|
||||
const DENY_RESOLVER = new Resolver(DEFAULT_FS, {__proto__: null}, [], id => {
|
||||
throw new VMError(`Access denied to require '${id}'`, 'EDENIED');
|
||||
});
|
||||
|
||||
function resolverFromOptions(vm, options, override, compiler) {
|
||||
if (!options) {
|
||||
if (!override) return DENY_RESOLVER;
|
||||
const builtins = genBuiltinsFromOptions(vm, undefined, undefined, override);
|
||||
return new Resolver(DEFAULT_FS, builtins, [], defaultRequire);
|
||||
}
|
||||
|
||||
const {
|
||||
builtin: builtinOpt,
|
||||
mock: mockOpt,
|
||||
external: externalOpt,
|
||||
root: rootPaths,
|
||||
resolve: customResolver,
|
||||
customRequire: hostRequire = defaultRequire,
|
||||
context = 'host',
|
||||
strict = true,
|
||||
fs: fsOpt = DEFAULT_FS,
|
||||
} = options;
|
||||
|
||||
const builtins = genBuiltinsFromOptions(vm, builtinOpt, mockOpt, override);
|
||||
|
||||
if (!externalOpt) return new Resolver(fsOpt, builtins, [], hostRequire);
|
||||
|
||||
let checkPath;
|
||||
if (rootPaths) {
|
||||
const checkedRootPaths = (Array.isArray(rootPaths) ? rootPaths : [rootPaths]).map(f => fsOpt.resolve(f));
|
||||
checkPath = (filename) => {
|
||||
return checkedRootPaths.some(path => {
|
||||
if (!filename.startsWith(path)) return false;
|
||||
const len = path.length;
|
||||
if (filename.length === len || (len > 0 && fsOpt.isSeparator(path[len-1]))) return true;
|
||||
return fsOpt.isSeparator(filename[len]);
|
||||
});
|
||||
};
|
||||
} else {
|
||||
checkPath = () => true;
|
||||
}
|
||||
|
||||
let newCustomResolver = defaultCustomResolver;
|
||||
let externals = undefined;
|
||||
let external = undefined;
|
||||
if (customResolver) {
|
||||
let externalCache;
|
||||
newCustomResolver = (resolver, x, path, extList) => {
|
||||
if (external && !(resolver.pathIsAbsolute(x) || resolver.pathIsRelative(x))) {
|
||||
if (!externalCache) {
|
||||
externalCache = external.map(ext => new RegExp(makeExternalMatcherRegex(ext)));
|
||||
}
|
||||
if (!externalCache.some(regex => regex.test(x))) return undefined;
|
||||
}
|
||||
const resolved = customResolver(x, path);
|
||||
if (!resolved) return undefined;
|
||||
if (typeof resolved === 'string') {
|
||||
if (externals) externals.push(new RegExp('^' + escapeRegExp(resolved)));
|
||||
return resolver.loadAsFileOrDirectory(resolved, extList);
|
||||
}
|
||||
const {module=x, path: resolvedPath} = resolved;
|
||||
if (externals) externals.push(new RegExp('^' + escapeRegExp(resolvedPath)));
|
||||
return resolver.loadNodeModules(module, [resolvedPath], extList);
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof externalOpt !== 'object') {
|
||||
return new DefaultResolver(fsOpt, builtins, checkPath, [], () => context, newCustomResolver, hostRequire, compiler, strict);
|
||||
}
|
||||
|
||||
let transitive = false;
|
||||
if (Array.isArray(externalOpt)) {
|
||||
external = externalOpt;
|
||||
} else {
|
||||
external = externalOpt.modules;
|
||||
transitive = context === 'sandbox' && externalOpt.transitive;
|
||||
}
|
||||
externals = external.map(makeExternalMatcher);
|
||||
return new LegacyResolver(fsOpt, builtins, checkPath, [], () => context, newCustomResolver, hostRequire, compiler, strict, externals, transitive);
|
||||
}
|
||||
|
||||
exports.resolverFromOptions = resolverFromOptions;
|
||||
@@ -0,0 +1,18 @@
|
||||
var baseConvert = require('./_baseConvert'),
|
||||
util = require('./_util');
|
||||
|
||||
/**
|
||||
* Converts `func` of `name` to an immutable auto-curried iteratee-first data-last
|
||||
* version with conversion `options` applied. If `name` is an object its methods
|
||||
* will be converted.
|
||||
*
|
||||
* @param {string} name The name of the function to wrap.
|
||||
* @param {Function} [func] The function to wrap.
|
||||
* @param {Object} [options] The options object. See `baseConvert` for more details.
|
||||
* @returns {Function|Object} Returns the converted function or object.
|
||||
*/
|
||||
function convert(name, func, options) {
|
||||
return baseConvert(util, name, func, options);
|
||||
}
|
||||
|
||||
module.exports = convert;
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
Check if a project is using [Yarn](https://yarnpkg.com).
|
||||
|
||||
@param cwd - The current working directory. Default: `process.cwd()`.
|
||||
@returns Whether the project uses Yarn.
|
||||
*/
|
||||
export default function (cwd?: string): boolean;
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Stephen Sugden <me@stephensugden.com> (stephensugden.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mergeMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeMap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA6EhD,MAAM,UAAU,QAAQ,CACtB,OAAuC,EACvC,cAAwH,EACxH,UAA6B;IAA7B,2BAAA,EAAA,qBAA6B;IAE7B,IAAI,UAAU,CAAC,cAAc,CAAC,EAAE;QAE9B,OAAO,QAAQ,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,GAAG,CAAC,UAAC,CAAM,EAAE,EAAU,IAAK,OAAA,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAA3B,CAA2B,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAlF,CAAkF,EAAE,UAAU,CAAC,CAAC;KAC3H;SAAM,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;QAC7C,UAAU,GAAG,cAAc,CAAC;KAC7B;IAED,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU,IAAK,OAAA,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,EAAvD,CAAuD,CAAC,CAAC;AAClG,CAAC"}
|
||||
@@ -0,0 +1,404 @@
|
||||
/* -*- Mode: js; js-indent-level: 2; -*- */
|
||||
/*
|
||||
* Copyright 2011 Mozilla Foundation and contributors
|
||||
* Licensed under the New BSD license. See LICENSE or:
|
||||
* http://opensource.org/licenses/BSD-3-Clause
|
||||
*/
|
||||
|
||||
const SourceMapGenerator = require("./source-map-generator").SourceMapGenerator;
|
||||
const util = require("./util");
|
||||
|
||||
// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
|
||||
// operating systems these days (capturing the result).
|
||||
const REGEX_NEWLINE = /(\r?\n)/;
|
||||
|
||||
// Newline character code for charCodeAt() comparisons
|
||||
const NEWLINE_CODE = 10;
|
||||
|
||||
// Private symbol for identifying `SourceNode`s when multiple versions of
|
||||
// the source-map library are loaded. This MUST NOT CHANGE across
|
||||
// versions!
|
||||
const isSourceNode = "$$$isSourceNode$$$";
|
||||
|
||||
/**
|
||||
* SourceNodes provide a way to abstract over interpolating/concatenating
|
||||
* snippets of generated JavaScript source code while maintaining the line and
|
||||
* column information associated with the original source code.
|
||||
*
|
||||
* @param aLine The original line number.
|
||||
* @param aColumn The original column number.
|
||||
* @param aSource The original source's filename.
|
||||
* @param aChunks Optional. An array of strings which are snippets of
|
||||
* generated JS, or other SourceNodes.
|
||||
* @param aName The original identifier.
|
||||
*/
|
||||
class SourceNode {
|
||||
constructor(aLine, aColumn, aSource, aChunks, aName) {
|
||||
this.children = [];
|
||||
this.sourceContents = {};
|
||||
this.line = aLine == null ? null : aLine;
|
||||
this.column = aColumn == null ? null : aColumn;
|
||||
this.source = aSource == null ? null : aSource;
|
||||
this.name = aName == null ? null : aName;
|
||||
this[isSourceNode] = true;
|
||||
if (aChunks != null) this.add(aChunks);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a SourceNode from generated code and a SourceMapConsumer.
|
||||
*
|
||||
* @param aGeneratedCode The generated code
|
||||
* @param aSourceMapConsumer The SourceMap for the generated code
|
||||
* @param aRelativePath Optional. The path that relative sources in the
|
||||
* SourceMapConsumer should be relative to.
|
||||
*/
|
||||
static fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
|
||||
// The SourceNode we want to fill with the generated code
|
||||
// and the SourceMap
|
||||
const node = new SourceNode();
|
||||
|
||||
// All even indices of this array are one line of the generated code,
|
||||
// while all odd indices are the newlines between two adjacent lines
|
||||
// (since `REGEX_NEWLINE` captures its match).
|
||||
// Processed fragments are accessed by calling `shiftNextLine`.
|
||||
const remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
|
||||
let remainingLinesIndex = 0;
|
||||
const shiftNextLine = function() {
|
||||
const lineContents = getNextLine();
|
||||
// The last line of a file might not have a newline.
|
||||
const newLine = getNextLine() || "";
|
||||
return lineContents + newLine;
|
||||
|
||||
function getNextLine() {
|
||||
return remainingLinesIndex < remainingLines.length ?
|
||||
remainingLines[remainingLinesIndex++] : undefined;
|
||||
}
|
||||
};
|
||||
|
||||
// We need to remember the position of "remainingLines"
|
||||
let lastGeneratedLine = 1, lastGeneratedColumn = 0;
|
||||
|
||||
// The generate SourceNodes we need a code range.
|
||||
// To extract it current and last mapping is used.
|
||||
// Here we store the last mapping.
|
||||
let lastMapping = null;
|
||||
let nextLine;
|
||||
|
||||
aSourceMapConsumer.eachMapping(function(mapping) {
|
||||
if (lastMapping !== null) {
|
||||
// We add the code from "lastMapping" to "mapping":
|
||||
// First check if there is a new line in between.
|
||||
if (lastGeneratedLine < mapping.generatedLine) {
|
||||
// Associate first line with "lastMapping"
|
||||
addMappingWithCode(lastMapping, shiftNextLine());
|
||||
lastGeneratedLine++;
|
||||
lastGeneratedColumn = 0;
|
||||
// The remaining code is added without mapping
|
||||
} else {
|
||||
// There is no new line in between.
|
||||
// Associate the code between "lastGeneratedColumn" and
|
||||
// "mapping.generatedColumn" with "lastMapping"
|
||||
nextLine = remainingLines[remainingLinesIndex] || "";
|
||||
const code = nextLine.substr(0, mapping.generatedColumn -
|
||||
lastGeneratedColumn);
|
||||
remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -
|
||||
lastGeneratedColumn);
|
||||
lastGeneratedColumn = mapping.generatedColumn;
|
||||
addMappingWithCode(lastMapping, code);
|
||||
// No more remaining code, continue
|
||||
lastMapping = mapping;
|
||||
return;
|
||||
}
|
||||
}
|
||||
// We add the generated code until the first mapping
|
||||
// to the SourceNode without any mapping.
|
||||
// Each line is added as separate string.
|
||||
while (lastGeneratedLine < mapping.generatedLine) {
|
||||
node.add(shiftNextLine());
|
||||
lastGeneratedLine++;
|
||||
}
|
||||
if (lastGeneratedColumn < mapping.generatedColumn) {
|
||||
nextLine = remainingLines[remainingLinesIndex] || "";
|
||||
node.add(nextLine.substr(0, mapping.generatedColumn));
|
||||
remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
|
||||
lastGeneratedColumn = mapping.generatedColumn;
|
||||
}
|
||||
lastMapping = mapping;
|
||||
}, this);
|
||||
// We have processed all mappings.
|
||||
if (remainingLinesIndex < remainingLines.length) {
|
||||
if (lastMapping) {
|
||||
// Associate the remaining code in the current line with "lastMapping"
|
||||
addMappingWithCode(lastMapping, shiftNextLine());
|
||||
}
|
||||
// and add the remaining lines without any mapping
|
||||
node.add(remainingLines.splice(remainingLinesIndex).join(""));
|
||||
}
|
||||
|
||||
// Copy sourcesContent into SourceNode
|
||||
aSourceMapConsumer.sources.forEach(function(sourceFile) {
|
||||
const content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
||||
if (content != null) {
|
||||
if (aRelativePath != null) {
|
||||
sourceFile = util.join(aRelativePath, sourceFile);
|
||||
}
|
||||
node.setSourceContent(sourceFile, content);
|
||||
}
|
||||
});
|
||||
|
||||
return node;
|
||||
|
||||
function addMappingWithCode(mapping, code) {
|
||||
if (mapping === null || mapping.source === undefined) {
|
||||
node.add(code);
|
||||
} else {
|
||||
const source = aRelativePath
|
||||
? util.join(aRelativePath, mapping.source)
|
||||
: mapping.source;
|
||||
node.add(new SourceNode(mapping.originalLine,
|
||||
mapping.originalColumn,
|
||||
source,
|
||||
code,
|
||||
mapping.name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a chunk of generated JS to this source node.
|
||||
*
|
||||
* @param aChunk A string snippet of generated JS code, another instance of
|
||||
* SourceNode, or an array where each member is one of those things.
|
||||
*/
|
||||
add(aChunk) {
|
||||
if (Array.isArray(aChunk)) {
|
||||
aChunk.forEach(function(chunk) {
|
||||
this.add(chunk);
|
||||
}, this);
|
||||
} else if (aChunk[isSourceNode] || typeof aChunk === "string") {
|
||||
if (aChunk) {
|
||||
this.children.push(aChunk);
|
||||
}
|
||||
} else {
|
||||
throw new TypeError(
|
||||
"Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
|
||||
);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a chunk of generated JS to the beginning of this source node.
|
||||
*
|
||||
* @param aChunk A string snippet of generated JS code, another instance of
|
||||
* SourceNode, or an array where each member is one of those things.
|
||||
*/
|
||||
prepend(aChunk) {
|
||||
if (Array.isArray(aChunk)) {
|
||||
for (let i = aChunk.length - 1; i >= 0; i--) {
|
||||
this.prepend(aChunk[i]);
|
||||
}
|
||||
} else if (aChunk[isSourceNode] || typeof aChunk === "string") {
|
||||
this.children.unshift(aChunk);
|
||||
} else {
|
||||
throw new TypeError(
|
||||
"Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
|
||||
);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Walk over the tree of JS snippets in this node and its children. The
|
||||
* walking function is called once for each snippet of JS and is passed that
|
||||
* snippet and the its original associated source's line/column location.
|
||||
*
|
||||
* @param aFn The traversal function.
|
||||
*/
|
||||
walk(aFn) {
|
||||
let chunk;
|
||||
for (let i = 0, len = this.children.length; i < len; i++) {
|
||||
chunk = this.children[i];
|
||||
if (chunk[isSourceNode]) {
|
||||
chunk.walk(aFn);
|
||||
} else if (chunk !== "") {
|
||||
aFn(chunk, { source: this.source,
|
||||
line: this.line,
|
||||
column: this.column,
|
||||
name: this.name });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
|
||||
* each of `this.children`.
|
||||
*
|
||||
* @param aSep The separator.
|
||||
*/
|
||||
join(aSep) {
|
||||
let newChildren;
|
||||
let i;
|
||||
const len = this.children.length;
|
||||
if (len > 0) {
|
||||
newChildren = [];
|
||||
for (i = 0; i < len - 1; i++) {
|
||||
newChildren.push(this.children[i]);
|
||||
newChildren.push(aSep);
|
||||
}
|
||||
newChildren.push(this.children[i]);
|
||||
this.children = newChildren;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call String.prototype.replace on the very right-most source snippet. Useful
|
||||
* for trimming whitespace from the end of a source node, etc.
|
||||
*
|
||||
* @param aPattern The pattern to replace.
|
||||
* @param aReplacement The thing to replace the pattern with.
|
||||
*/
|
||||
replaceRight(aPattern, aReplacement) {
|
||||
const lastChild = this.children[this.children.length - 1];
|
||||
if (lastChild[isSourceNode]) {
|
||||
lastChild.replaceRight(aPattern, aReplacement);
|
||||
} else if (typeof lastChild === "string") {
|
||||
this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
|
||||
} else {
|
||||
this.children.push("".replace(aPattern, aReplacement));
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the source content for a source file. This will be added to the SourceMapGenerator
|
||||
* in the sourcesContent field.
|
||||
*
|
||||
* @param aSourceFile The filename of the source file
|
||||
* @param aSourceContent The content of the source file
|
||||
*/
|
||||
setSourceContent(aSourceFile, aSourceContent) {
|
||||
this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Walk over the tree of SourceNodes. The walking function is called for each
|
||||
* source file content and is passed the filename and source content.
|
||||
*
|
||||
* @param aFn The traversal function.
|
||||
*/
|
||||
walkSourceContents(aFn) {
|
||||
for (let i = 0, len = this.children.length; i < len; i++) {
|
||||
if (this.children[i][isSourceNode]) {
|
||||
this.children[i].walkSourceContents(aFn);
|
||||
}
|
||||
}
|
||||
|
||||
const sources = Object.keys(this.sourceContents);
|
||||
for (let i = 0, len = sources.length; i < len; i++) {
|
||||
aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the string representation of this source node. Walks over the tree
|
||||
* and concatenates all the various snippets together to one string.
|
||||
*/
|
||||
toString() {
|
||||
let str = "";
|
||||
this.walk(function(chunk) {
|
||||
str += chunk;
|
||||
});
|
||||
return str;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the string representation of this source node along with a source
|
||||
* map.
|
||||
*/
|
||||
toStringWithSourceMap(aArgs) {
|
||||
const generated = {
|
||||
code: "",
|
||||
line: 1,
|
||||
column: 0
|
||||
};
|
||||
const map = new SourceMapGenerator(aArgs);
|
||||
let sourceMappingActive = false;
|
||||
let lastOriginalSource = null;
|
||||
let lastOriginalLine = null;
|
||||
let lastOriginalColumn = null;
|
||||
let lastOriginalName = null;
|
||||
this.walk(function(chunk, original) {
|
||||
generated.code += chunk;
|
||||
if (original.source !== null
|
||||
&& original.line !== null
|
||||
&& original.column !== null) {
|
||||
if (lastOriginalSource !== original.source
|
||||
|| lastOriginalLine !== original.line
|
||||
|| lastOriginalColumn !== original.column
|
||||
|| lastOriginalName !== original.name) {
|
||||
map.addMapping({
|
||||
source: original.source,
|
||||
original: {
|
||||
line: original.line,
|
||||
column: original.column
|
||||
},
|
||||
generated: {
|
||||
line: generated.line,
|
||||
column: generated.column
|
||||
},
|
||||
name: original.name
|
||||
});
|
||||
}
|
||||
lastOriginalSource = original.source;
|
||||
lastOriginalLine = original.line;
|
||||
lastOriginalColumn = original.column;
|
||||
lastOriginalName = original.name;
|
||||
sourceMappingActive = true;
|
||||
} else if (sourceMappingActive) {
|
||||
map.addMapping({
|
||||
generated: {
|
||||
line: generated.line,
|
||||
column: generated.column
|
||||
}
|
||||
});
|
||||
lastOriginalSource = null;
|
||||
sourceMappingActive = false;
|
||||
}
|
||||
for (let idx = 0, length = chunk.length; idx < length; idx++) {
|
||||
if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
|
||||
generated.line++;
|
||||
generated.column = 0;
|
||||
// Mappings end at eol
|
||||
if (idx + 1 === length) {
|
||||
lastOriginalSource = null;
|
||||
sourceMappingActive = false;
|
||||
} else if (sourceMappingActive) {
|
||||
map.addMapping({
|
||||
source: original.source,
|
||||
original: {
|
||||
line: original.line,
|
||||
column: original.column
|
||||
},
|
||||
generated: {
|
||||
line: generated.line,
|
||||
column: generated.column
|
||||
},
|
||||
name: original.name
|
||||
});
|
||||
}
|
||||
} else {
|
||||
generated.column++;
|
||||
}
|
||||
}
|
||||
});
|
||||
this.walkSourceContents(function(sourceFile, sourceContent) {
|
||||
map.setSourceContent(sourceFile, sourceContent);
|
||||
});
|
||||
|
||||
return { code: generated.code, map };
|
||||
}
|
||||
}
|
||||
|
||||
exports.SourceNode = SourceNode;
|
||||
@@ -0,0 +1,6 @@
|
||||
declare class MissingLocaleDataError extends Error {
|
||||
type: string;
|
||||
}
|
||||
export declare function isMissingLocaleDataError(e: Error): e is MissingLocaleDataError;
|
||||
export {};
|
||||
//# sourceMappingURL=data.d.ts.map
|
||||
Reference in New Issue
Block a user