From 9a4ef045932e661165f27a214ddfd940daf6a306 Mon Sep 17 00:00:00 2001 From: Kevin Gilland Date: Thu, 22 Sep 2022 09:07:35 -0600 Subject: [PATCH] ci: library import fix (#10) * Initial port of color-java (#1) * ci: Fixing typo in readme, and adding initial stubs for github actions. * doc: Updating build-test action link. * ci: Adding initial build files * test: Adding test stub configs * chore: Porting classes from color-java project. * chore: Porrting Color from color-java * refactor: Moving functions around to be next to overloaded functions. * refactor: Changing type any to (number | string) * fix: Fixing compile errors in ColorUtils.ts * fix: Removed most helper methods from color since typescript sucks. * chore: Port from color-java/ColorUtilsTest, with tests disabled. * ci: Getting tests running * test: uncommenting out tests for 'test valid' * fix: Allowing for null on isValidHex calls * fix: Correcting porting errors. * test: uncommenting out most of 'test utils' * fix: Correcting porting errors in toHSL * chore: Port if ColorTest from color-java. All commented out. * test: uncommenting out and fixing helper methods * test: Uncommenting out test color creation * fix: Fixing recursion on setRed, setBule, setGreen * fix: Trying to handle floating points at 0 and at 1 * test: Uncommenting out color hex constants test. * test: Uncommenting test hex integers test. * test: Uncommenting out alpha integer test * test: Uncommenting RGB test * test: uncommenting hex integers test * test: uncommenting arithmetic test * test: uncommenting hex singles test * test: uncommenting color hsl test * test: commenting out color with alpha check. Fixing TODO's * test: fixing last remaing TODOs * ci: Porting over ReadmeTest from color-java * doc: Updating readme from ReadmeTest.ts * Preparing for release (#2) * doc: Correcting spacing in README usage * chore: Removing unused index.ts file * doc: Removing node as an engine * doc: Updating readme * ci: Trying new github action * ci: Fixing github actions * ci: Removing coveralls step * ci: More github action fixing * doc: Removing link to ngagoint.github.io * ci: Adding docs directory * ci: Removing references to color-java in docs * ci: Adding coveralls (#6) * ci: Adding coverall action * ci: Adding coverage and coveralls * ci: Trying coveralls again * ci: Adding test step before coverage * ci: Calling test:rrun from coverage * fix: Adding index.ts to fix importing of the color library (#8) * doc: bump version to 1.1.0-beta.0 * ci: attempt to fix import of library (#9) * ci: Updating build * ci: Adding types to package.json * ci: Adding prettier and lint * fix: Changing lib to dist for exports * ci: Adding types to package.json * refactor: moving source to src instead of lib * ci: Removing copying of node_modules into the test-lib area * ci: Adding prepare script * ci: Adding coverage and lint steps * ci: Removed build workflow and breaking out individual steps * fix: Fixing test step that only did a build * ci: Adding if check on coveralls for master branch * fix: Correcting removing rreferences to dist that was missed * refactor: Cleaning up tsconfigs * fix: Fixing linter errors * fix: Correcting issue with alpha * ci: Removing npm-run-all and ts-node from dependencies * ci: Adding module script * ci: removing files from package.json * ci: adding .npmignore * ci: cleanup of build * test: changing mocha to look in dist * ci: adding more files to .npmignore * ci: removing typings * ci: more cleanup of build * refactor: moving index.js * ci: adding index.js to package.json * fix: Moving index.js back to src * ci: chainging main entry point yet again * fix: trying to get entry point setup * ci: removing test from package * fix: changing main to index.js instead of index.ts * fix: updating typings * 2.0.0 * feat: bump to version 2.0.0 * 2.0.1-beta.0 * ci: Correcting dist * 2.0.1-beta.1 * ci: Getting dist directory cleaned up and removing prerelease * ci: more dist cleanup * 2.0.1-beta.2 * feat: bump to 2.0.1 --- .github/workflows/build-test.yml | 27 +- .github/workflows/build.yml | 19 - .gitignore | 1 - .mocharc.js | 4 +- .npmignore | 13 + .prettierrc | 5 + build/dist.ts | 16 + index.ts | 6 + lib/Color.ts | 671 ----- lib/ColorConstants.ts | 88 - lib/ColorUtils.ts | 887 ------- lib/tsconfig.json | 11 - package-lock.json | 4161 +++++++----------------------- package.json | 29 +- src/Color.ts | 603 +++++ src/ColorConstants.ts | 86 + src/ColorUtils.ts | 755 ++++++ test/ColorTest.ts | 2072 +++++++++------ test/ColorUtilsTest.ts | 749 +++--- test/ReadmeTest.ts | 121 +- test/tsconfig.json | 19 - tsconfig.json | 60 +- tslint.json | 11 + 23 files changed, 4110 insertions(+), 6304 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 .npmignore create mode 100644 .prettierrc create mode 100644 build/dist.ts create mode 100644 index.ts delete mode 100644 lib/Color.ts delete mode 100644 lib/ColorConstants.ts delete mode 100644 lib/ColorUtils.ts delete mode 100644 lib/tsconfig.json create mode 100644 src/Color.ts create mode 100644 src/ColorConstants.ts create mode 100644 src/ColorUtils.ts delete mode 100644 test/tsconfig.json create mode 100644 tslint.json diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 4482fb6..97f89f4 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -1,6 +1,6 @@ name: Build & Test -on: [push] +on: [push, pull_request] jobs: build: @@ -10,16 +10,25 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v1 - - name: Build & Test - run: | - npm install - npm run build --if-present - npm run test - npm run coverage - env: - CI: true + + - name: Install + run: npm ci + + - name: Build + run: npm run build + + - name: Test + run: npm run test + + - name: Lint + run: npm run lint + + - name: Coverage + run: npm run coverage + - name: Coveralls uses: coverallsapp/github-action@master + if: github.ref_name == 'master' with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: ./docs/coverage/lcov.info diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index cf45def..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Build - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v1 - - name: Build - run: | - npm install - npm run build --if-present - env: - CI: true - \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3c7bb2d..9fee03c 100644 --- a/.gitignore +++ b/.gitignore @@ -53,7 +53,6 @@ test/fixtures/private **/*/tmp dist -test-dist **/*/package-lock.json built diff --git a/.mocharc.js b/.mocharc.js index 5387382..55c166e 100644 --- a/.mocharc.js +++ b/.mocharc.js @@ -1,6 +1,6 @@ module.exports = { - spec: 'test-dist/**/*.js', - ignore: 'test-dist/node_modules/**', + spec: 'dist/**/*.js', + ignore: 'dist/node_modules/**', import: [ ], }; \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..91c3b63 --- /dev/null +++ b/.npmignore @@ -0,0 +1,13 @@ +.github/ +.vscode/ +build/ +docs/ +src/ +test/ + +*.js.map + +.mocharc.js +.prettierrc +tsconfig.json +tslint.json \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..4ddba9a --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "printWidth": 120, + "trailingComma": "all", + "singleQuote": true +} \ No newline at end of file diff --git a/build/dist.ts b/build/dist.ts new file mode 100644 index 0000000..6031896 --- /dev/null +++ b/build/dist.ts @@ -0,0 +1,16 @@ +import * as fs from "fs"; + +async function main(): Promise { + + const ROOT = `${__dirname}/..`; + const DIST = `${ROOT}/dist`; + + if (fs.existsSync(`${DIST}/src`)) { + fs.cpSync(`${DIST}/src`, `${DIST}/`, { recursive: true }); + fs.rmSync(`${DIST}/src`, { recursive: true }); + } + if (fs.existsSync(`${DIST}/test`)) { + fs.rmSync(`${DIST}/test`, { recursive: true }); + } +} +main(); \ No newline at end of file diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..81be85d --- /dev/null +++ b/index.ts @@ -0,0 +1,6 @@ +/** + * @since 1.1.0 + */ + export * from './dist/Color'; + export * from './dist/ColorConstants'; + export * from './dist/ColorUtils'; diff --git a/lib/Color.ts b/lib/Color.ts deleted file mode 100644 index 4ae2448..0000000 --- a/lib/Color.ts +++ /dev/null @@ -1,671 +0,0 @@ -import { ColorConstants } from "./ColorConstants"; -import { ColorUtils } from "./ColorUtils"; - -/** - * Color representation with support for hex, RBG, arithmetic RBG, HSL, and - * integer colors - * - * @author osbornb - */ -export class Color { - - /** - * Red arithmetic color value - */ - private red = 0.0; - - /** - * Green arithmetic color value - */ - private green = 0.0; - - /** - * Blue arithmetic color value - */ - private blue = 0.0; - - /** - * Opacity arithmetic value - */ - private opacity = 1.0; - - /** - * Create a black color - * - * @return color - */ - public static black(): Color { - return Color.color(ColorConstants.BLACK); - } - - /** - * Create a blue color - * - * @return color - */ - public static blue(): Color { - return Color.color(ColorConstants.BLUE); - } - - /** - * Create a brown color - * - * @return color - */ - public static brown(): Color { - return Color.color(ColorConstants.BROWN); - } - - /** - * Create a cyan color - * - * @return color - */ - public static cyan(): Color { - return Color.color(ColorConstants.CYAN); - } - - /** - * Create a dark gray color - * - * @return color - */ - public static darkGray(): Color { - return Color.color(ColorConstants.DKGRAY); - } - - /** - * Create a gray color - * - * @return color - */ - public static gray(): Color { - return Color.color(ColorConstants.GRAY); - } - - /** - * Create a green color - * - * @return color - */ - public static green(): Color { - return Color.color(ColorConstants.GREEN); - } - - /** - * Create a light gray color - * - * @return color - */ - public static lightGray(): Color { - return Color.color(ColorConstants.LTGRAY); - } - - /** - * Create a magenta color - * - * @return color - */ - public static magenta(): Color { - return Color.color(ColorConstants.MAGENTA); - } - - /** - * Create an orange color - * - * @return color - */ - public static orange(): Color { - return Color.color(ColorConstants.ORANGE); - } - - /** - * Create a pink color - * - * @return color - */ - public static pink(): Color { - return Color.color(ColorConstants.PINK); - } - - /** - * Create a purple color - * - * @return color - */ - public static purple(): Color { - return Color.color(ColorConstants.PURPLE); - } - - /** - * Create a red color - * - * @return color - */ - public static red(): Color { - return Color.color(ColorConstants.RED); - } - - /** - * Create a violet color - * - * @return color - */ - public static violet(): Color { - return Color.color(ColorConstants.VIOLET); - } - - /** - * Create a white color - * - * @return color - */ - public static white(): Color { - return Color.color(ColorConstants.WHITE); - } - - /** - * Create a yellow color - * - * @return color - */ - public static yellow(): Color { - return Color.color(ColorConstants.YELLOW); - } - - /** - * Create the color in hex - * - * @param color - * hex color in format #RRGGBB, RRGGBB, #RGB, RGB, #AARRGGBB, - * AARRGGBB, #ARGB, or ARGB - * @return color - */ - public static color(color: string): Color { - let newColor = new Color(); - newColor.setColor(color) - return newColor; - } - - - /** - * Set the color in hex - * - * @param color - * hex color in format #RRGGBB, RRGGBB, #RGB, RGB, #AARRGGBB, - * AARRGGBB, #ARGB, or ARGB - */ - public setColor(color: string): void; - - /** - * Set the color as a single integer - * - * @param color - * color integer - */ - public setColor(color: number): void; - - public setColor(color: number | string): void { - if (typeof color === 'number') { - this.setRed(ColorUtils.getRed(color)); - this.setGreen(ColorUtils.getGreen(color)); - this.setBlue(ColorUtils.getBlue(color)); - if (color > 16777215 || color < 0) { - this.setAlpha(ColorUtils.getAlpha(color)); - } - } else { - this.setRed(ColorUtils.getRed(color)); - this.setGreen(ColorUtils.getGreen(color)); - this.setBlue(ColorUtils.getBlue(color)); - const alpha = ColorUtils.getAlpha(color); - if (alpha != null) { - this.setAlpha(alpha); - } - } - } - - /** - * Set the color with HSLA (hue, saturation, lightness, alpha) values - * - * @param hue - * hue value inclusively between 0.0 and 360.0 - * @param saturation - * saturation inclusively between 0.0 and 1.0 - * @param lightness - * lightness inclusively between 0.0 and 1.0 - * @param alpha - * alpha inclusively between 0.0 and 1.0 - */ - public setColorByHSL(hue: number, saturation: number, lightness: number, - alpha?: number): void { - const arithmeticRGB = ColorUtils.toArithmeticRGBFromHSL(hue, saturation, - lightness); - this.setRed(arithmeticRGB[0]); - this.setGreen(arithmeticRGB[1]); - this.setBlue(arithmeticRGB[2]); - if (alpha) { - this.setAlpha(alpha); - } - } - - /** - * Set the red color in hex - * - * @param red - * red hex color in format RR or R - */ - public setRed(red: string): void; - - /** - * Set the red color as an integer - * - * @param red - * red integer color inclusively between 0 and 255 - */ - public setRed(red: number): void; - - /** - * Set the red color as an arithmetic float - * - * @param red - * red float color inclusively between 0.0 and 1.0 - */ - public setRed(red: any): void { - if (Number.isInteger(red) && red != 0 && red != 1) { - red = ColorUtils.toHex(red); - } - if (typeof red === 'string') { - red = ColorUtils.toArithmeticRGB(red); - } - ColorUtils.validateArithmeticRGB(red); - this.red = red; - } - - /** - * Set the green color in hex - * - * @param green - * green hex color in format GG or G - */ - public setGreen(green: string): void; - - /** - * Set the green color as an integer - * - * @param green - * green integer color inclusively between 0 and 255 - */ - public setGreen(green: number): void; - - /** - * Set the green color as an arithmetic float - * - * @param green - * green float color inclusively between 0.0 and 1.0 - */ - public setGreen(green: any): void { - if (Number.isInteger(green) && green != 0 && green != 1) { - green = ColorUtils.toHex(green); - } - if (typeof green === 'string') { - green = ColorUtils.toArithmeticRGB(green); - } - ColorUtils.validateArithmeticRGB(green); - this.green = green; - } - - /** - * Set the blue color in hex - * - * @param blue - * blue hex color in format BB or B - */ - public setBlue(blue: string): void; - - /** - * Set the blue color as an integer - * - * @param blue - * blue integer color inclusively between 0 and 255 - */ - public setBlue(blue: number): void; - - /** - * Set the blue color as an arithmetic float - * - * @param blue - * blue float color inclusively between 0.0 and 1.0 - */ - public setBlue(blue: any): void { - if (Number.isInteger(blue) && blue != 0 && blue != 1) { - blue = ColorUtils.toHex(blue) - } - if (typeof blue === 'string') { - blue = ColorUtils.toArithmeticRGB(blue); - } - ColorUtils.validateArithmeticRGB(blue); - this.blue = blue; - } - - /** - * Set the opacity as an arithmetic float - * - * @param opacity - * opacity float color inclusively between 0.0 and 1.0 - */ - public setOpacity(opacity: number) { - ColorUtils.validateArithmeticRGB(opacity); - this.opacity = opacity; - } - - /** - * Set the alpha color in hex - * - * @param alpha - * alpha hex color in format AA or A - */ - public setAlpha(alpha: string): void; - - /** - * Set the alpha color as an arithmetic float - * - * @param alpha - * alpha float color inclusively between 0.0 and 1.0 - */ - public setAlpha(alpha: number): void; - - /** - * Set the alpha color as an arithmetic float - * - * @param alpha - * alpha float color inclusively between 0.0 and 1.0 - */ - public setAlpha(alpha: any): void { - if (typeof alpha === 'string') { - alpha = ColorUtils.toArithmeticRGB(alpha); - } else if (Number.isInteger(alpha) && alpha != 0 && alpha != 1) { - alpha = ColorUtils.toArithmeticRGB(alpha); - } - - this.setOpacity(alpha); - } - - /** - * Check if the color is opaque (opacity or alpha of 1.0, 255, or x00) - * - * @return true if opaque - */ - public isOpaque(): boolean { - return this.opacity == 1.0; - } - - /** - * Get the color as a hex string - * - * @return hex color in the format #RRGGBB - */ - public getColorHex(): string { - return ColorUtils.toColor(this.getRedHex(), this.getGreenHex(), this.getBlueHex()); - } - - /** - * Get the color as a hex string with alpha - * - * @return hex color in the format #AARRGGBB - */ - public getColorHexWithAlpha(): string { - return ColorUtils.toColorWithAlpha(this.getRedHex(), this.getGreenHex(), - this.getBlueHex(), this.getAlphaHex()); - } - - /** - * Get the color as a hex string, shorthanded when possible - * - * @return hex color in the format #RGB or #RRGGBB - */ - public getColorHexShorthand(): string { - return ColorUtils.toColorShorthand(this.getRedHex(), this.getGreenHex(), - this.getBlueHex()); - } - - /** - * Get the color as a hex string with alpha, shorthanded when possible - * - * @return hex color in the format #ARGB or #AARRGGBB - */ - public getColorHexShorthandWithAlpha(): string { - return ColorUtils.toColorShorthandWithAlpha(this.getRedHex(), this.getGreenHex(), - this.getBlueHex(), this.getAlphaHex()); - } - - /** - * Get the color as an integer - * - * @return integer color - */ - public getColor(): number { - return ColorUtils.toColor(this.getRed(), this.getGreen(), this.getBlue()); - } - - /** - * Get the color as an integer including the alpha - * - * @return integer color - */ - public getColorWithAlpha(): number { - return ColorUtils.toColorWithAlpha(this.getRed(), this.getGreen(), this.getBlue(), - this.getAlpha()); - } - - /** - * Get the red color in hex - * - * @return red hex color in format RR - */ - public getRedHex(): string { - return ColorUtils.toHex(this.red); - } - - /** - * Get the green color in hex - * - * @return green hex color in format GG - */ - public getGreenHex(): string { - return ColorUtils.toHex(this.green); - } - - /** - * Get the blue color in hex - * - * @return blue hex color in format BB - */ - public getBlueHex(): string { - return ColorUtils.toHex(this.blue); - } - - /** - * Get the alpha color in hex - * - * @return alpha hex color in format AA - */ - public getAlphaHex(): string { - return ColorUtils.toHex(this.opacity); - } - - /** - * Get the red color in hex, shorthand when possible - * - * @return red hex color in format R or RR - */ - public getRedHexShorthand(): string { - return ColorUtils.shorthandHexSingle(this.getRedHex()); - } - - /** - * Get the green color in hex, shorthand when possible - * - * @return green hex color in format G or GG - */ - public getGreenHexShorthand(): string { - return ColorUtils.shorthandHexSingle(this.getGreenHex()); - } - - /** - * Get the blue color in hex, shorthand when possible - * - * @return blue hex color in format B or BB - */ - public getBlueHexShorthand(): string { - return ColorUtils.shorthandHexSingle(this.getBlueHex()); - } - - /** - * Get the alpha color in hex, shorthand when possible - * - * @return alpha hex color in format A or AA - */ - public getAlphaHexShorthand(): string { - return ColorUtils.shorthandHexSingle(this.getAlphaHex()); - } - - /** - * Get the red color as an integer - * - * @return red integer color inclusively between 0 and 255 - */ - public getRed(): number { - return ColorUtils.toRGB(this.red); - } - - /** - * Get the green color as an integer - * - * @return green integer color inclusively between 0 and 255 - */ - public getGreen(): number { - return ColorUtils.toRGB(this.green); - } - - /** - * Get the blue color as an integer - * - * @return blue integer color inclusively between 0 and 255 - */ - public getBlue(): number { - return ColorUtils.toRGB(this.blue); - } - - /** - * Get the alpha color as an integer - * - * @return alpha integer color inclusively between 0 and 255 - */ - public getAlpha(): number { - return ColorUtils.toRGB(this.opacity); - } - - /** - * Get the red color as an arithmetic float - * - * @return red float color inclusively between 0.0 and 1.0 - */ - public getRedArithmetic(): number { - return this.red; - } - - /** - * Get the green color as an arithmetic float - * - * @return green float color inclusively between 0.0 and 1.0 - */ - public getGreenArithmetic(): number { - return this.green; - } - - /** - * Get the blue color as an arithmetic float - * - * @return blue float color inclusively between 0.0 and 1.0 - */ - public getBlueArithmetic(): number { - return this.blue; - } - - /** - * Get the opacity as an arithmetic float - * - * @return opacity float inclusively between 0.0 and 1.0 - */ - public getOpacity(): number { - return this.opacity; - } - - /** - * Get the alpha color as an arithmetic float - * - * @return alpha float color inclusively between 0.0 and 1.0 - */ - public getAlphaArithmetic(): number { - return this.getOpacity(); - } - - /** - * Get the HSL (hue, saturation, lightness) values - * - * @return HSL array where: 0 = hue, 1 = saturation, 2 = lightness - */ - public getHSL(): number[] { - return ColorUtils.toHSL(this.red, this.green, this.blue); - } - - /** - * Get the HSL hue value - * - * @return hue value - */ - public getHue(): number { - return this.getHSL()[0]; - } - - /** - * Get the HSL saturation value - * - * @return saturation value - */ - public getSaturation(): number { - return this.getHSL()[1]; - } - - /** - * Get the HSL lightness value - * - * @return lightness value - */ - public getLightness(): number { - return this.getHSL()[2]; - } - - /** - * Copy the color - * - * @return color copy - */ - public copy(): Color { - let color = new Color(); - color.red = this.red; - color.green = this.green; - color.blue = this.blue; - color.opacity = this.opacity; - return color; - } - - public setRGB(red: any, green: any, blue: any, alpha?: any) { - this.setRed(red); - this.setGreen(green); - this.setBlue(blue); - if (alpha) { - this.setAlpha(alpha); - } - } -} \ No newline at end of file diff --git a/lib/ColorConstants.ts b/lib/ColorConstants.ts deleted file mode 100644 index 0aaad15..0000000 --- a/lib/ColorConstants.ts +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Color Constant hex codes - * - * @author osbornb - */ -export class ColorConstants { - - /** - * Black hex color - */ - public static readonly BLACK = "#000000"; - - /** - * Blue hex color - */ - public static readonly BLUE = "#0000FF"; - - /** - * Brown hex color - */ - public static readonly BROWN = "#A52A2A"; - - /** - * Cyan hex color - */ - public static readonly CYAN = "#00FFFF"; - - /** - * Dark Gray hex color - */ - public static readonly DKGRAY = "#444444"; - - /** - * Gray hex color - */ - public static readonly GRAY = "#888888"; - - /** - * Green hex color - */ - public static readonly GREEN = "#00FF00"; - - /** - * Light Gray hex color - */ - public static readonly LTGRAY = "#CCCCCC"; - - /** - * Magenta hex color - */ - public static readonly MAGENTA = "#FF00FF"; - - /** - * Orange hex color - */ - public static readonly ORANGE = "#FFA500"; - - /** - * Pink hex color - */ - public static readonly PINK = "#FFC0CB"; - - /** - * Purple hex color - */ - public static readonly PURPLE = "#800080"; - - /** - * Red hex color - */ - public static readonly RED = "#FF0000"; - - /** - * Violet hex color - */ - public static readonly VIOLET = "#EE82EE"; - - /** - * White hex color - */ - public static readonly WHITE = "#FFFFFF"; - - /** - * Yellow hex color - */ - public static readonly YELLOW = "#FFFF00"; - -} \ No newline at end of file diff --git a/lib/ColorUtils.ts b/lib/ColorUtils.ts deleted file mode 100644 index 35eeaec..0000000 --- a/lib/ColorUtils.ts +++ /dev/null @@ -1,887 +0,0 @@ -/** - * Color utilities with support for hex, RBG, arithmetic RBG, HSL, and integer - * colors - * - * @author osbornb - */ -export class ColorUtils { - - /** - * Hex color pattern - */ - private static readonly hexColorPattern = new RegExp( - "^#?(([0-9a-fA-F]{3}){1,2}|([0-9a-fA-F]{4}){1,2})$"); - - /** - * Hex single color pattern - */ - private static readonly hexSingleColorPattern = new RegExp( - "^[0-9a-fA-F]{1,2}$"); - - /** - * Convert the hex color values to a hex color, shorthanded when possible - * - * @param red - * red hex color in format RR or R - * @param green - * green hex color in format GG or G - * @param blue - * blue hex color in format BB or B - * - * @return hex color in format #RGB or #RRGGBB - */ - public static toColorShorthand(red: string, green: string, - blue: string): string { - return ColorUtils.shorthandHex(ColorUtils.toColor(red, green, blue)); - } - - /** - * Convert the hex color values to a hex color including an opaque alpha - * value of FF or F, shorthanded when possible - * - * @param red - * red hex color in format RR or R - * @param green - * green hex color in format GG or G - * @param blue - * blue hex color in format BB or B - * - * @return hex color in format #ARGB or #AARRGGBB - */ - public static toColorShorthandWithDefaultAlpha(red: string, green: string, - blue: string): string { - return ColorUtils.shorthandHex(ColorUtils.toColorWithDefaultAlpha(red, green, blue)); - } - - /** - * Convert the hex color values to a hex color, shorthanded when possible - * - * @param red - * red hex color in format RR or R - * @param green - * green hex color in format GG or G - * @param blue - * blue hex color in format BB or B - * @param alpha - * alpha hex color in format AA or A, null to not include alpha - * - * @return hex color in format #ARGB, #RGB, #AARRGGBB, or #RRGGBB - */ - public static toColorShorthandWithAlpha(red: string, green: string, - blue: string, alpha: string): string { - return ColorUtils.shorthandHex(ColorUtils.toColorWithAlpha(red, green, blue, alpha)); - } - - /** - * Convert the hex color values to a hex color - * - * @param red - * red hex color in format RR or R - * @param green - * green hex color in format GG or G - * @param blue - * blue hex color in format BB or B - * - * @return hex color in format #RRGGBB - */ - public static toColor(red: string, green: string, blue: string): string; - - /** - * Convert the RBG values to a color integer - * - * @param red - * red integer color inclusively between 0 and 255 - * @param green - * green integer color inclusively between 0 and 255 - * @param blue - * blue integer color inclusively between 0 and 255 - * - * @return integer color - */ - public static toColor(red: number, green: number, blue: number): number; - - public static toColor(red: any, green: any, blue: any): number | string { - let color: number | string; - if (typeof red === 'number') { - color = ColorUtils.toColorWithAlpha(red, green, blue, -1); - } else { - color = ColorUtils.toColorWithAlpha(red, green, blue, null); - } - return color; - } - - /** - * Convert the hex color values to a hex color including an opaque alpha - * value of FF - * - * @param red - * red hex color in format RR or R - * @param green - * green hex color in format GG or G - * @param blue - * blue hex color in format BB or B - * - * @return hex color in format #AARRGGBB - */ - public static toColorWithDefaultAlpha(red: string, green: string, - blue: string): string; - - /** - * Convert the RBG values to a color integer including an opaque alpha value - * of 255 - * - * @param red - * red integer color inclusively between 0 and 255 - * @param green - * green integer color inclusively between 0 and 255 - * @param blue - * blue integer color inclusively between 0 and 255 - * - * @return integer color - */ - public static toColorWithDefaultAlpha(red: number, green: number, blue: number): number; - - public static toColorWithDefaultAlpha(red: any, green: any, blue: any): number | string { - let color: number | string; - if (typeof red === 'number') { - color = ColorUtils.toColorWithAlpha(red, green, blue, 255); - } else { - let defaultAlpha = "FF"; - if (red != null && red.length > 0 - && red.charAt(0).toLowerCase() == red.charAt(0)) { - defaultAlpha = defaultAlpha.toLowerCase(); - } - color = ColorUtils.toColorWithAlpha(red, green, blue, defaultAlpha); - } - return color; - } - - /** - * Convert the hex color values to a hex color - * - * @param red - * red hex color in format RR or R - * @param green - * green hex color in format GG or G - * @param blue - * blue hex color in format BB or B - * @param alpha - * alpha hex color in format AA or A, null to not include alpha - * - * @return hex color in format #AARRGGBB or #RRGGBB - */ - public static toColorWithAlpha(red: string, green: string, blue: string, - alpha: string | null): string; - - /** - * Convert the RBGA values to a color integer - * - * @param red - * red integer color inclusively between 0 and 255 - * @param green - * green integer color inclusively between 0 and 255 - * @param blue - * blue integer color inclusively between 0 and 255 - * @param alpha - * alpha integer color inclusively between 0 and 255, -1 to not - * include alpha - * - * @return integer color - */ - public static toColorWithAlpha(red: number, green: number, blue: number, - alpha: number): number; - - public static toColorWithAlpha(red: any, green: any, blue: any, - alpha: any): number | string { - let color: number | string; - if (typeof red === 'number') { - ColorUtils.validateRGB(red); - ColorUtils.validateRGB(green); - ColorUtils.validateRGB(blue); - color = (red & 0xff) << 16 | (green & 0xff) << 8 | (blue & 0xff); - if (alpha != -1) { - ColorUtils.validateRGB(alpha); - color = (alpha & 0xff) << 24 | color; - } - } else { - ColorUtils.validateHexSingle(red); - ColorUtils.validateHexSingle(green); - ColorUtils.validateHexSingle(blue); - color = "#"; - if (alpha != null) { - color += ColorUtils.expandShorthandHexSingle(alpha); - } - color += ColorUtils.expandShorthandHexSingle(red); - color += ColorUtils.expandShorthandHexSingle(green); - color += ColorUtils.expandShorthandHexSingle(blue); - } - return color; - } - - /** - * Convert the RGB integer to a hex single color - * - * @param color - * integer color inclusively between 0 and 255 or float color inclusively between 0.0 and 1.0 - * @return hex single color in format FF - */ - public static toHex(color: number): string { - let hex: string; - if (!Number.isInteger(color) || color == 1 || color == 0) { - color = ColorUtils.toRGB(color); - } - ColorUtils.validateRGB(color); - hex = color.toString(16).toUpperCase(); - if (hex.length == 1) { - hex = "0" + hex; - } - return hex; - } - - /** - * Convert red, green, and blue arithmetic values to HSL (hue, saturation, - * lightness) values - * - * @param red - * red color inclusively between 0.0 and 1.0 or between 0 and 255 - * @param green - * green color inclusively between 0.0 and 1.0 or between 0 and 255 - * @param blue - * blue color inclusively between 0.0 and 1.0 or between 0 and 255 - * @return HSL array where: 0 = hue, 1 = saturation, 2 = lightness - */ - public static toHSL(red: number, green: number, blue: number): number[] { - if (Number.isInteger(red) && red != 0 && red != 1) { - red = ColorUtils.toArithmeticRGB(red); - } - if (Number.isInteger(green) && green != 0 && green != 1) { - green = ColorUtils.toArithmeticRGB(green); - } - if (Number.isInteger(blue) && blue != 0 && blue != 1) { - blue = ColorUtils.toArithmeticRGB(blue) - } - - ColorUtils.validateArithmeticRGB(red); - ColorUtils.validateArithmeticRGB(green); - ColorUtils.validateArithmeticRGB(blue); - - const min = Math.min(Math.min(red, green), blue); - const max = Math.max(Math.max(red, green), blue); - - const range = max - min; - - let hue = 0.0; - if (range > 0.0) { - if (red >= green && red >= blue) { - hue = (green - blue) / range; - } else if (green >= blue) { - hue = 2 + (blue - red) / range; - } else { - hue = 4 + (red - green) / range; - } - } - - hue *= 60.0; - if (hue < 0.) { - hue += 360.0; - } - - const sum = min + max; - - const lightness = sum / 2.0; - - let saturation: number; - if (min == max) { - saturation = 0.0; - } else { - if (lightness < 0.5) { - saturation = range / sum; - } else { - saturation = range / (2.0 - max - min); - } - } - - return [hue, saturation, lightness]; - } - - /** - * Convert the hex single color to an arithmetic RBG float - * - * @param color - * hex single color in format FF or F - * @return float color inclusively between 0.0 and 1.0 - */ - public static toArithmeticRGB(color: string): number; - - /** - * Convert the RGB integer to an arithmetic RBG float - * - * @param color - * integer color inclusively between 0 and 255 - * @return float color inclusively between 0.0 and 1.0 - */ - public static toArithmeticRGB(color: number): number; - - public static toArithmeticRGB(color: any): number { - if (typeof color === 'string') { - color = ColorUtils.toRGB(color) - } - - if (Number.isInteger(color) && color != 0 && color != 1) { - ColorUtils.validateRGB(color); - color = color / 255.0; - } - - return color; - } - - /** - * Convert HSL (hue, saturation, and lightness) values to RGB arithmetic - * values - * - * @param hue - * hue value inclusively between 0.0 and 360.0 - * @param saturation - * saturation inclusively between 0.0 and 1.0 - * @param lightness - * lightness inclusively between 0.0 and 1.0 - * @return arithmetic RGB array where: 0 = red, 1 = green, 2 = blue - */ - public static toArithmeticRGBFromHSL(hue: number, saturation: number, - lightness: number): number[] { - - ColorUtils.validateHue(hue); - ColorUtils.validateSaturation(saturation); - ColorUtils.validateLightness(lightness); - - hue /= 60.0; - let t2: number; - if (lightness <= 0.5) { - t2 = lightness * (saturation + 1); - } else { - t2 = lightness + saturation - (lightness * saturation); - } - const t1 = lightness * 2.0 - t2; - - const red = ColorUtils.hslConvert(t1, t2, hue + 2); - const green = ColorUtils.hslConvert(t1, t2, hue); - const blue = ColorUtils.hslConvert(t1, t2, hue - 2); - - return [red, green, blue]; - } - - /** - * Convert the hex single color to a RBG integer - * - * @param color - * hex single color in format FF or F - * - * @return integer color inclusively between 0 and 255 - */ - public static toRGB(color: string): number; - - /** - * Convert the arithmetic RGB float to a RBG integer - * - * @param color - * float color inclusively between 0.0 and 1.0 - * - * @return integer color inclusively between 0 and 255 - */ - public static toRGB(color: number): number; - - public static toRGB(color: number | string): number { - let colorNumber: number; - - if (typeof color === 'number') { - ColorUtils.validateArithmeticRGB(color); - colorNumber = Math.round(255 * color); - } else { - ColorUtils.validateHexSingle(color); - if (color.length == 1) { - color += color; - } - colorNumber = parseInt(color, 16); - } - - return colorNumber; - } - - /** - * Convert HSL (hue, saturation, and lightness) values to RGB integer values - * - * @param hue - * hue value inclusively between 0.0 and 360.0 - * @param saturation - * saturation inclusively between 0.0 and 1.0 - * @param lightness - * lightness inclusively between 0.0 and 1.0 - * @return RGB integer array where: 0 = red, 1 = green, 2 = blue - */ - public static toRGBFromHSL(hue: number, saturation: number, lightness: number): number[] { - const arithmeticRGB = ColorUtils.toArithmeticRGBFromHSL(hue, saturation, lightness); - const rgb = [ - ColorUtils.toRGB(arithmeticRGB[0]), - ColorUtils.toRGB(arithmeticRGB[1]), ColorUtils.toRGB(arithmeticRGB[2]) - ]; - return rgb; - } - - /** - * HSL convert helper method - * - * @param t1 - * t1 - * @param t2 - * t2 - * @param hue - * hue - * @return arithmetic RBG value - */ - private static hslConvert(t1: number, t2: number, hue: number): number { - let value: number; - if (hue < 0) { - hue += 6; - } - if (hue >= 6) { - hue -= 6; - } - if (hue < 1) { - value = (t2 - t1) * hue + t1; - } else if (hue < 3) { - value = t2; - } else if (hue < 4) { - value = (t2 - t1) * (4 - hue) + t1; - } else { - value = t1; - } - return value; - } - - /** - * Get the hex single color - * - * @param hex - * hex color - * @param colorIndex - * red=0, green=1, blue=2, alpha=-1 - * @return hex single color in format FF or null - */ - private static getHexSingle(hex: string, colorIndex: number): string { - ColorUtils.validateHex(hex); - - if (hex.startsWith("#")) { - hex = hex.substring(1); - } - - let colorCharacters = 1; - let numColors = hex.length; - if (numColors > 4) { - colorCharacters++; - numColors /= 2; - } - - let color: any = null; - if (colorIndex >= 0 || numColors > 3) { - if (numColors > 3) { - colorIndex++; - } - let startIndex = colorIndex; - if (colorCharacters > 1) { - startIndex *= 2; - } - color = hex.substring(startIndex, startIndex + colorCharacters); - color = ColorUtils.expandShorthandHexSingle(color); - } - - return color; - } - - /** - * Get the hex red color from the hex string - * - * @param hex - * hex color - * @return hex red color in format RR - */ - public static getRed(hex: string): string; - - /** - * Get the red color from color integer - * - * @param color - * color integer - * @return red color - */ - public static getRed(color: number): number; - - public static getRed(colorOrHex: (number | string)): (number | string) { - let red: (number | string); - if (typeof colorOrHex === 'number') { - red = (colorOrHex >> 16) & 0xff; - } else { - red = ColorUtils.getHexSingle(colorOrHex, 0); - } - - return red; - } - - /** - * Get the hex green color from the hex string - * - * @param hex - * hex color - * @return hex green color in format GG - */ - public static getGreen(hex: string): string; - - /** - * Get the green color from color integer - * - * @param color - * color integer - * @return green color - */ - public static getGreen(color: number): number; - - public static getGreen(colorOrHex: (number | string)): (number | string) { - let green: (number | string); - if (typeof colorOrHex === 'number') { - green = (colorOrHex >> 8) & 0xff; - } else { - green = ColorUtils.getHexSingle(colorOrHex, 1); - } - - return green; - } - - /** - * Get the hex blue color from the hex string - * - * @param hex - * hex color - * @return hex blue color in format BB - */ - public static getBlue(hex: string): string; - - /** - * Get the blue color from color integer - * - * @param color - * color integer - * @return blue color - */ - public static getBlue(color: number): number; - - public static getBlue(colorOrHex: (number | string)): (number | string) { - let blue: (number | string); - if (typeof colorOrHex === 'number') { - blue = colorOrHex & 0xff; - } else { - blue = ColorUtils.getHexSingle(colorOrHex, 2); - } - - return blue; - } - - /** - * Get the hex alpha color from the hex string if it exists - * - * @param hex - * hex color - * @return hex alpha color in format AA or null - */ - public static getAlpha(hex: string): string; - - /** - * Get the alpha color from color integer - * - * @param color - * color integer - * @return alpha color - */ - public static getAlpha(color: number): number; - - public static getAlpha(colorOrHex: (number | string)): (number | string) { - let alpha: (number | string | null) = null; - if (typeof colorOrHex === 'number') { - alpha = (colorOrHex >> 24) & 0xff; - } else { - alpha = ColorUtils.getHexSingle(colorOrHex, -1); - } - - return alpha; - } - - /** - * Shorthand the hex color if possible - * - * @param color - * hex color - * @return shorthand hex color or original value - */ - public static shorthandHex(color: string): string { - ColorUtils.validateHex(color); - if (color.length > 5) { - let shorthandColor: string | null = ''; - let startIndex = 0; - if (color.startsWith("#")) { - shorthandColor += "#"; - startIndex++; - } - for (; startIndex < color.length; startIndex += 2) { - let shorthand = ColorUtils.shorthandHexSingle( - color.substring(startIndex, startIndex + 2)); - if (shorthand.length > 1) { - shorthandColor = null; - break; - } - shorthandColor += shorthand; - } - if (shorthandColor != null) { - color = shorthandColor.toString(); - } - } - - return color; - } - - /** - * Expand the hex if it is in shorthand - * - * @param color - * hex color - * @return expanded hex color or original value - */ - public static expandShorthandHex(color: string): string { - ColorUtils.validateHex(color); - if (color.length < 6) { - let expandColor = ''; - let startIndex = 0; - if (color.startsWith("#")) { - expandColor += "#"; - startIndex++; - } - for (; startIndex < color.length; startIndex++) { - const expand = ColorUtils.expandShorthandHexSingle( - color.substring(startIndex, startIndex + 1)); - expandColor += expand; - } - color = expandColor.toString(); - } - return color; - } - - /** - * Shorthand the hex single color if possible - * - * @param color - * hex single color - * @return shorthand hex color or original value - */ - public static shorthandHexSingle(color: string): string { - ColorUtils.validateHexSingle(color); - if (color.length > 1 - && color.charAt(0).toUpperCase() == color.charAt(1) - .toUpperCase()) { - color = color.substring(0, 1); - } - return color; - } - - /** - * Expand the hex single if it is in shorthand - * - * @param color - * hex single color - * @return expanded hex color or original value - */ - public static expandShorthandHexSingle(color: string): string { - ColorUtils.validateHexSingle(color); - if (color.length == 1) { - color += color; - } - return color; - } - - /** - * Check if the hex color value is valid - * - * @param color - * hex color - * @return true if valid - */ - public static isValidHex(color: string | null): boolean { - return color != null && ColorUtils.hexColorPattern.test(color); - } - - /** - * Validate the hex color value - * - * @param color - * hex color - */ - public static validateHex(color: string) { - if (!ColorUtils.isValidHex(color)) { - throw new Error( - "Hex color must be in format #RRGGBB, #RGB, #AARRGGBB, #ARGB, RRGGBB, RGB, AARRGGBB, or ARGB, invalid value: " - + color); - } - } - - /** - * Check if the hex single color value is valid - * - * @param color - * hex single color - * @return true if valid - */ - public static isValidHexSingle(color: string | null): boolean { - return color != null && ColorUtils.hexSingleColorPattern.test(color); - } - - /** - * Validate the hex single color value - * - * @param color - * hex single color - */ - public static validateHexSingle(color: string) { - if (!ColorUtils.isValidHexSingle(color)) { - throw new Error( - "Must be in format FF or F, invalid value: " + color); - } - } - - /** - * Check if the RBG integer color is valid, inclusively between 0 and 255 - * - * @param color - * decimal color - * @return true if valid - */ - public static isValidRGB(color: number): boolean { - return color >= 0 && color <= 255; - } - - /** - * Validate the RBG integer color is inclusively between 0 and 255 - * - * @param color - * decimal color - */ - public static validateRGB(color: number) { - if (!ColorUtils.isValidRGB(color)) { - throw new Error( - "Must be inclusively between 0 and 255, invalid value: " - + color); - } - } - - /** - * Check if the arithmetic RGB float color is valid, inclusively between 0.0 - * and 1.0 - * - * @param color - * decimal color - * @return true if valid - */ - public static isValidArithmeticRGB(color: number): boolean { - return color >= 0.0 && color <= 1.0; - } - - /** - * Validate the arithmetic RGB float color is inclusively between 0.0 and - * 1.0 - * - * @param color - * decimal color - */ - public static validateArithmeticRGB(color: number) { - if (!ColorUtils.isValidArithmeticRGB(color)) { - throw new Error( - "Must be inclusively between 0.0 and 1.0, invalid value: " - + color); - } - } - - /** - * Check if the HSL hue float value is valid, inclusively between 0.0 and - * 360.0 - * - * @param hue - * hue value - * @return true if valid - */ - public static isValidHue(hue: number): boolean { - return hue >= 0.0 && hue <= 360.0; - } - - /** - * Validate the HSL hue float value is inclusively between 0.0 and 360.0 - * - * @param hue - * hue value - */ - public static validateHue(hue: number) { - if (!ColorUtils.isValidHue(hue)) { - throw new Error( - "Must be inclusively between 0.0 and 360.0, invalid value: " - + hue); - } - } - - /** - * Check if the HSL saturation float value is valid, inclusively between 0.0 - * and 1.0 - * - * @param saturation - * saturation value - * @return true if valid - */ - public static isValidSaturation(saturation: number): boolean { - return saturation >= 0.0 && saturation <= 1.0; - } - - /** - * Validate the HSL saturation float value is inclusively between 0.0 and - * 1.0 - * - * @param saturation - * saturation value - */ - public static validateSaturation(saturation: number) { - if (!ColorUtils.isValidSaturation(saturation)) { - throw new Error( - "Must be inclusively between 0.0 and 1.0, invalid value: " - + saturation); - } - } - - /** - * Check if the HSL lightness float value is valid, inclusively between 0.0 - * and 1.0 - * - * @param lightness - * lightness value - * @return true if valid - */ - public static isValidLightness(lightness: number): boolean { - return lightness >= 0.0 && lightness <= 1.0; - } - - /** - * Validate the HSL lightness float value is inclusively between 0.0 and 1.0 - * - * @param lightness - * lightness value - */ - public static validateLightness(lightness: number) { - if (!ColorUtils.isValidLightness(lightness)) { - throw new Error( - "Must be inclusively between 0.0 and 1.0, invalid value: " - + lightness); - } - } - -} \ No newline at end of file diff --git a/lib/tsconfig.json b/lib/tsconfig.json deleted file mode 100644 index 850bf01..0000000 --- a/lib/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "../tsconfig", - "include": [ - "./**/*" - ], - "compilerOptions": { - "composite": true, - "rootDir": ".", - "outDir": "../dist" - } - } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index a4ead9d..fa5d1e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,21 +1,24 @@ { "name": "@ngageoint/color-js", - "version": "1.0.0", + "version": "2.0.1-beta.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ngageoint/color-js", - "version": "1.0.0", + "version": "2.0.1-beta.2", + "license": "MIT", "devDependencies": { "@types/chai": "^4.3.3", "@types/mocha": "9.1.1", "chai": "4.3.6", "coveralls": "3.1.1", - "cpy-cli": "^4.2.0", "mocha": "^10.0.0", - "npm-run-all": "^4.1.5", "nyc": "^15.1.0", + "prettier": "^2.7.1", + "ts-node": "^10.9.1", + "tslint": "^6.1.3", + "tslint-config-prettier": "^1.18.0", "typescript": "^4.8.3" }, "engines": { @@ -48,29 +51,29 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.0.tgz", - "integrity": "sha512-y5rqgTTPTmaF5e2nVhOxw+Ur9HDJLsWb6U/KpgUzRZEdPfE6VOubXBKLdbcUTijzRptednSBDQbYZBOSqJxpJw==", + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.1.tgz", + "integrity": "sha512-72a9ghR0gnESIa7jBN53U32FOVCEoztyIlKaNoU05zRhEecduGK9L9c3ww7Mp06JiR+0ls0GBPFJQwwtjn9ksg==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.0.tgz", - "integrity": "sha512-reM4+U7B9ss148rh2n1Qs9ASS+w94irYXga7c2jaQv9RVzpS7Mv1a9rnYYwuDa45G+DkORt9g6An2k/V4d9LbQ==", + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.1.tgz", + "integrity": "sha512-1H8VgqXme4UXCRv7/Wa1bq7RVymKOzC7znjyFM8KiEzwFqcKUKYNoQef4GhdklgNvoBXyW4gYhuBNCM5o1zImw==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", "@babel/generator": "^7.19.0", - "@babel/helper-compilation-targets": "^7.19.0", + "@babel/helper-compilation-targets": "^7.19.1", "@babel/helper-module-transforms": "^7.19.0", "@babel/helpers": "^7.19.0", - "@babel/parser": "^7.19.0", + "@babel/parser": "^7.19.1", "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", + "@babel/traverse": "^7.19.1", "@babel/types": "^7.19.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", @@ -115,14 +118,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.0.tgz", - "integrity": "sha512-Ai5bNWXIvwDvWM7njqsG3feMlL9hCVQsPYXodsZyLwshYkZVJt59Gftau4VrE8S9IT9asd2uSP1hG6wCNw+sXA==", + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.1.tgz", + "integrity": "sha512-LlLkkqhCMyz2lkQPvJNdIYU7O5YjWRgC2R4omjCTpZd8u8KMQzZvX4qce+/BluN1rcQiV7BoGUpmQ0LeHerbhg==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.19.0", + "@babel/compat-data": "^7.19.1", "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.20.2", + "browserslist": "^4.21.3", "semver": "^6.3.0" }, "engines": { @@ -231,9 +234,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", "dev": true, "engines": { "node": ">=6.9.0" @@ -348,9 +351,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.0.tgz", - "integrity": "sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw==", + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.1.tgz", + "integrity": "sha512-h7RCSorm1DdTVGJf3P2Mhj3kdnkmF/EiysUkzS2TdgAYqyjFdMQJbVuXOBej2SBJaXan/lIVtT6KkGbyyq753A==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -374,9 +377,9 @@ } }, "node_modules/@babel/traverse": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.0.tgz", - "integrity": "sha512-4pKpFRDh+utd2mbRC8JLnlsMUii3PMHjpL6a0SZ4NMZy7YFP9aXORxEhdMVOc9CpWtDF09IkciQLEhK7Ml7gRA==", + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.1.tgz", + "integrity": "sha512-0j/ZfZMxKukDaag2PtOPDbwuELqIar6lLskVPPJDjXMXjfLb1Obo/1yjxIGqqAJrmfaTIY3z2wFLAQ7qSkLsuA==", "dev": true, "dependencies": { "@babel/code-frame": "^7.18.6", @@ -385,7 +388,7 @@ "@babel/helper-function-name": "^7.19.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.0", + "@babel/parser": "^7.19.1", "@babel/types": "^7.19.0", "debug": "^4.1.0", "globals": "^11.1.0" @@ -408,6 +411,28 @@ "node": ">=6.9.0" } }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -424,15 +449,6 @@ "node": ">=8" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -541,40 +557,29 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "dev": true }, "node_modules/@types/chai": { "version": "4.3.3", @@ -582,23 +587,18 @@ "integrity": "sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==", "dev": true }, - "node_modules/@types/minimist": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", - "dev": true - }, "node_modules/@types/mocha": { "version": "9.1.1", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", "dev": true }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", - "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", - "dev": true + "node_modules/@types/node": { + "version": "18.7.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.18.tgz", + "integrity": "sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==", + "dev": true, + "peer": true }, "node_modules/@ungap/promise-all-settled": { "version": "1.1.2", @@ -606,20 +606,38 @@ "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, + "node_modules/acorn": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/aggregate-error": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz", - "integrity": "sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, "dependencies": { - "clean-stack": "^4.0.0", - "indent-string": "^5.0.0" + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/ajv": { @@ -702,6 +720,12 @@ "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", "dev": true }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -711,18 +735,6 @@ "sprintf-js": "~1.0.2" } }, - "node_modules/arrify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-3.0.0.tgz", - "integrity": "sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", @@ -823,9 +835,9 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz", - "integrity": "sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==", + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", "dev": true, "funding": [ { @@ -838,10 +850,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001370", - "electron-to-chromium": "^1.4.202", + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.5" + "update-browserslist-db": "^1.0.9" }, "bin": { "browserslist": "cli.js" @@ -850,6 +862,15 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/caching-transform": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", @@ -865,53 +886,19 @@ "node": ">=8" } }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/camelcase-keys": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz", - "integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, - "dependencies": { - "camelcase": "^6.3.0", - "map-obj": "^4.1.0", - "quick-lru": "^5.1.1", - "type-fest": "^1.2.1" - }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6" } }, "node_modules/caniuse-lite": { - "version": "1.0.30001399", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001399.tgz", - "integrity": "sha512-4vQ90tMKS+FkvuVWS5/QY1+d805ODxZiKFzsU8o/RsVJz49ZSRR8EjykLJbqhzdPgadbX6wB538wOzle3JniRA==", + "version": "1.0.30001409", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001409.tgz", + "integrity": "sha512-V0mnJ5dwarmhYv8/MzhJ//aW68UpvnQBXv8lJ2QUsvn2pHcmAuNtu8hQEDz37XnA1iE+lRR9CIfGWWpgJ5QedQ==", "dev": true, "funding": [ { @@ -1013,30 +1000,12 @@ } }, "node_modules/clean-stack": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz", - "integrity": "sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==", - "dev": true, - "dependencies": { - "escape-string-regexp": "5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/clean-stack/node_modules/escape-string-regexp": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", - "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6" } }, "node_modules/cliui": { @@ -1080,6 +1049,12 @@ "node": ">= 0.8" } }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -1126,88 +1101,24 @@ "node": ">=6" } }, - "node_modules/cp-file": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-9.1.0.tgz", - "integrity": "sha512-3scnzFj/94eb7y4wyXRWwvzLFaQp87yyfTnChIjlfYrVqp5lVO3E2hIJMeQIltUT0K2ZAB3An1qXcBmwGyvuwA==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "nested-error-stacks": "^2.0.0", - "p-event": "^4.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cpy": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/cpy/-/cpy-9.0.1.tgz", - "integrity": "sha512-D9U0DR5FjTCN3oMTcFGktanHnAG5l020yvOCR1zKILmAyPP7I/9pl6NFgRbDcmSENtbK1sQLBz1p9HIOlroiNg==", - "dev": true, - "dependencies": { - "arrify": "^3.0.0", - "cp-file": "^9.1.0", - "globby": "^13.1.1", - "junk": "^4.0.0", - "micromatch": "^4.0.4", - "nested-error-stacks": "^2.1.0", - "p-filter": "^3.0.0", - "p-map": "^5.3.0" - }, - "engines": { - "node": "^12.20.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cpy-cli": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/cpy-cli/-/cpy-cli-4.2.0.tgz", - "integrity": "sha512-b04b+cbdr29CdpREPKw/itrfjO43Ty0Aj7wRM6M6LoE4GJxZJCk9Xp+Eu1IqztkKh3LxIBt1tDplENsa6KYprg==", - "dev": true, - "dependencies": { - "cpy": "^9.0.0", - "meow": "^10.1.2" - }, - "bin": { - "cpy": "cli.js" - }, - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true }, "node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": ">=4.8" - } - }, - "node_modules/cross-spawn/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" + "node": ">= 8" } }, "node_modules/dashdash": { @@ -1246,31 +1157,6 @@ "dev": true }, "node_modules/decamelize": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz", - "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/decamelize-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", - "integrity": "sha512-ocLWuYzRPoS9bfiSdDd3cxvrzovVMZnRDVEzAs+hWIVXGDbHxWMECij2OBuyB/An0FFW/nLuq6Kv1i/YC5Qfzg==", - "dev": true, - "dependencies": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/decamelize-keys/node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", @@ -1279,15 +1165,6 @@ "node": ">=0.10.0" } }, - "node_modules/decamelize-keys/node_modules/map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/deep-eql": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", @@ -1312,22 +1189,6 @@ "node": ">=8" } }, - "node_modules/define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", - "dev": true, - "dependencies": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -1346,18 +1207,6 @@ "node": ">=0.3.1" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -1369,9 +1218,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.249", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.249.tgz", - "integrity": "sha512-GMCxR3p2HQvIw47A599crTKYZprqihoBL4lDSAUmr7IYekXFK5t/WgEBrGJDCa2HWIZFQEkGuMqPCi05ceYqPQ==", + "version": "1.4.257", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.257.tgz", + "integrity": "sha512-C65sIwHqNnPC2ADMfse/jWTtmhZMII+x6ADI9gENzrOiI7BpxmfKFE84WkIEl5wEg+7+SfIkwChDlsd1Erju2A==", "dev": true }, "node_modules/emoji-regex": { @@ -1380,74 +1229,11 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es-abstract": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.2.tgz", - "integrity": "sha512-XxXQuVNrySBNlEkTYJoDNFe5+s2yIOpzq80sUHEdPdQr0S5nTLz4ZPPPswNIpKseDDUS5yghX1gfLIHQZ1iNuQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.2", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-weakref": "^1.0.2", - "object-inspect": "^1.12.2", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", - "string.prototype.trimend": "^1.0.5", - "string.prototype.trimstart": "^1.0.5", - "unbox-primitive": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true + "node_modules/es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true }, "node_modules/escalade": { "version": "3.1.1", @@ -1504,37 +1290,12 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, - "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, - "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -1602,65 +1363,6 @@ "node": ">=8.0.0" } }, - "node_modules/foreground-child/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/foreground-child/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/foreground-child/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/foreground-child/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/foreground-child/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -1730,33 +1432,6 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "node_modules/function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -1784,20 +1459,6 @@ "node": "*" } }, - "node_modules/get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", @@ -1807,22 +1468,6 @@ "node": ">=8.0.0" } }, - "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -1895,25 +1540,6 @@ "node": ">=4" } }, - "node_modules/globby": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.2.tgz", - "integrity": "sha512-LKSDZXToac40u8Q1PQtZihbNdTYSNMuWe+K5l+oa6KgDzSvVrHXlJy40hUP522RjAIoNLJYBJi7ow+rbFpIhHQ==", - "dev": true, - "dependencies": { - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.11", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -1943,15 +1569,6 @@ "node": ">=6" } }, - "node_modules/hard-rejection": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", - "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -1964,15 +1581,6 @@ "node": ">= 0.4.0" } }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -1982,45 +1590,6 @@ "node": ">=8" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/hasha": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", @@ -2037,15 +1606,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/hasha/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -2055,18 +1615,6 @@ "he": "bin/he" } }, - "node_modules/hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -2088,15 +1636,6 @@ "npm": ">=1.3.7" } }, - "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -2107,15 +1646,12 @@ } }, "node_modules/indent-string": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", - "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/inflight": { @@ -2134,38 +1670,6 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "node_modules/internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "dependencies": { - "has-bigints": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -2178,34 +1682,6 @@ "node": ">=8" } }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-callable": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.5.tgz", - "integrity": "sha512-ZIWRujF6MvYGkEuHMYtFRkL2wAtFw89EHfKlXrkPkjQZZRWeh9L1q3SV13NIfHnqxugjLvAOkEHx9mb1zcMnEw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-core-module": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", @@ -2218,21 +1694,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2263,18 +1724,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -2284,56 +1733,13 @@ "node": ">=0.12.0" } }, - "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, "node_modules/is-stream": { @@ -2348,36 +1754,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -2396,18 +1772,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -2482,108 +1846,6 @@ "node": ">=8" } }, - "node_modules/istanbul-lib-processinfo/node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-processinfo/node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/istanbul-lib-processinfo/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/istanbul-lib-processinfo/node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-processinfo/node_modules/p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-processinfo/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-processinfo/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-processinfo/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-processinfo/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/istanbul-lib-report": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", @@ -2674,18 +1936,6 @@ "node": ">=4" } }, - "node_modules/json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", @@ -2731,27 +1981,6 @@ "node": ">=0.6.0" } }, - "node_modules/junk": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/junk/-/junk-4.0.0.tgz", - "integrity": "sha512-ojtSU++zLJ3jQG9bAYjg94w+/DOJtRyD7nPaerMFrBhmdVmiV5/exYH5t4uHga4G/95nT6hr1OJoKIFbYbrW5w==", - "dev": true, - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/lcov-parse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", @@ -2761,36 +1990,6 @@ "lcov-parse": "bin/cli.js" } }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "node_modules/load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/load-json-file/node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -2846,18 +2045,6 @@ "get-func-name": "^2.0.0" } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -2873,74 +2060,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/map-obj": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", - "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", - "dev": true, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/meow": { - "version": "10.1.3", - "resolved": "https://registry.npmjs.org/meow/-/meow-10.1.3.tgz", - "integrity": "sha512-0WL7RMCPPdUTE00+GxJjL4d5Dm6eUbmAzxlzywJWiRUKCW093owmZ7/q74tH9VI91vxw9KJJNxAcvdpxb2G4iA==", - "dev": true, - "dependencies": { - "@types/minimist": "^1.2.2", - "camelcase-keys": "^7.0.0", - "decamelize": "^5.0.0", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.2", - "read-pkg-up": "^8.0.0", - "redent": "^4.0.0", - "trim-newlines": "^4.0.2", - "type-fest": "^1.2.2", - "yargs-parser": "^20.2.9" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true }, "node_modules/mime-db": { "version": "1.52.0", @@ -2963,15 +2087,6 @@ "node": ">= 0.6" } }, - "node_modules/min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/minimatch": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", @@ -2990,27 +2105,16 @@ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, - "node_modules/minimist-options": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", - "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, "dependencies": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0", - "kind-of": "^6.0.3" + "minimist": "^1.2.6" }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/minimist-options/node_modules/arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "bin": { + "mkdirp": "bin/cmd.js" } }, "node_modules/mocha": { @@ -3072,15 +2176,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/mocha/node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -3099,18 +2194,6 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/nested-error-stacks": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.1.tgz", - "integrity": "sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==", - "dev": true - }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, "node_modules/node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -3129,36 +2212,6 @@ "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", "dev": true }, - "node_modules/normalize-package-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", - "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^4.0.1", - "is-core-module": "^2.5.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -3168,124 +2221,6 @@ "node": ">=0.10.0" } }, - "node_modules/npm-run-all": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", - "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "chalk": "^2.4.1", - "cross-spawn": "^6.0.5", - "memorystream": "^0.3.1", - "minimatch": "^3.0.4", - "pidtree": "^0.3.0", - "read-pkg": "^3.0.0", - "shell-quote": "^1.6.1", - "string.prototype.padend": "^3.0.0" - }, - "bin": { - "npm-run-all": "bin/npm-run-all/index.js", - "run-p": "bin/run-p/index.js", - "run-s": "bin/run-s/index.js" - }, - "engines": { - "node": ">= 4" - } - }, - "node_modules/npm-run-all/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-run-all/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/npm-run-all/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-run-all/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/npm-run-all/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/npm-run-all/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/npm-run-all/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-run-all/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/npm-run-all/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/nyc": { "version": "15.1.0", "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", @@ -3327,37 +2262,6 @@ "node": ">=8.9" } }, - "node_modules/nyc/node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/nyc/node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/nyc/node_modules/cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -3369,15 +2273,6 @@ "wrap-ansi": "^6.2.0" } }, - "node_modules/nyc/node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/nyc/node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -3391,15 +2286,6 @@ "node": ">=8" } }, - "node_modules/nyc/node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/nyc/node_modules/locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -3439,18 +2325,6 @@ "node": ">=8" } }, - "node_modules/nyc/node_modules/p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/nyc/node_modules/wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -3515,42 +2389,6 @@ "node": "*" } }, - "node_modules/object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -3560,45 +2398,6 @@ "wrappy": "1" } }, - "node_modules/p-event": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", - "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", - "dev": true, - "dependencies": { - "p-timeout": "^3.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-filter": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-3.0.0.tgz", - "integrity": "sha512-QtoWLjXAW++uTX67HZQz1dbTpqBfiidsB6VtQUC9iR85S120+s0T5sO6s+B5MLzFcZkrEd/DGMmCjR+f2Qpxwg==", - "dev": true, - "dependencies": { - "p-map": "^5.1.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -3630,27 +2429,12 @@ } }, "node_modules/p-map": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-5.5.0.tgz", - "integrity": "sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==", - "dev": true, - "dependencies": { - "aggregate-error": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", "dev": true, "dependencies": { - "p-finally": "^1.0.0" + "aggregate-error": "^3.0.0" }, "engines": { "node": ">=8" @@ -3680,19 +2464,6 @@ "node": ">=8" } }, - "node_modules/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", - "dev": true, - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -3712,12 +2483,12 @@ } }, "node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/path-parse": { @@ -3726,15 +2497,6 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -3768,31 +2530,10 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pidtree": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", - "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", - "dev": true, - "bin": { - "pidtree": "bin/pidtree.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "dependencies": { "find-up": "^4.0.0" @@ -3853,6 +2594,21 @@ "node": ">=8" } }, + "node_modules/prettier": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/process-on-spawn": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", @@ -3889,38 +2645,6 @@ "node": ">=0.6" } }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -3930,112 +2654,6 @@ "safe-buffer": "^5.1.0" } }, - "node_modules/read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", - "dev": true, - "dependencies": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz", - "integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==", - "dev": true, - "dependencies": { - "find-up": "^5.0.0", - "read-pkg": "^6.0.0", - "type-fest": "^1.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/read-pkg": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz", - "integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==", - "dev": true, - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^3.0.2", - "parse-json": "^5.2.0", - "type-fest": "^1.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg/node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "node_modules/read-pkg/node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/read-pkg/node_modules/path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "dependencies": { - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -4048,39 +2666,6 @@ "node": ">=8.10.0" } }, - "node_modules/redent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz", - "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==", - "dev": true, - "dependencies": { - "indent-string": "^5.0.0", - "strip-indent": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/release-zalgo": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", @@ -4176,16 +2761,6 @@ "node": ">=8" } }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -4201,29 +2776,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -4261,44 +2813,24 @@ "dev": true }, "node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "dependencies": { - "shebang-regex": "^1.0.0" + "shebang-regex": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/shell-quote": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz", - "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==", - "dev": true - }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, "node_modules/signal-exit": { @@ -4307,18 +2839,6 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "node_modules/slash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", - "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -4345,53 +2865,6 @@ "node": ">=8" } }, - "node_modules/spawn-wrap/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", - "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", - "dev": true - }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -4437,51 +2910,6 @@ "node": ">=8" } }, - "node_modules/string.prototype.padend": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.3.tgz", - "integrity": "sha512-jNIIeokznm8SD/TZISQsZKYu7RJyheFNt84DUPrh482GC8RVp2MKqm2O5oBRdGxbDQoXrhhWtPIWQOiy20svUg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", - "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", - "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -4503,21 +2931,6 @@ "node": ">=8" } }, - "node_modules/strip-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz", - "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==", - "dev": true, - "dependencies": { - "min-indent": "^1.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -4627,16 +3040,228 @@ "node": ">=0.8" } }, - "node_modules/trim-newlines": { + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/diff": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.0.2.tgz", - "integrity": "sha512-GJtWyq9InR/2HRiLZgpIKv+ufIKrVrvjQWEj7PxAXNc5dwbNJkqhAUoAGgzRmULAnoOM5EIpveYd3J2VeSAIew==", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, "engines": { - "node": ">=12" + "node": ">=0.3.1" + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/tslint": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", + "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", + "deprecated": "TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.3", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.13.0", + "tsutils": "^2.29.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "bin": { + "tslint": "bin/tslint" + }, + "engines": { + "node": ">=4.8.0" + }, + "peerDependencies": { + "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" + } + }, + "node_modules/tslint-config-prettier": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz", + "integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==", + "dev": true, + "bin": { + "tslint-config-prettier-check": "bin/check.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/tslint/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/tslint/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tslint/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/tslint/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/tslint/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/tslint/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/tslint/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/tslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tslint/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/tslint/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "peerDependencies": { + "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" } }, "node_modules/tunnel-agent": { @@ -4667,15 +3292,12 @@ } }, "node_modules/type-fest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/typedarray-to-buffer": { @@ -4700,21 +3322,6 @@ "node": ">=4.2.0" } }, - "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/update-browserslist-db": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", @@ -4759,15 +3366,11 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true }, "node_modules/verror": { "version": "1.10.0", @@ -4784,31 +3387,18 @@ } }, "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "dependencies": { "isexe": "^2.0.0" }, "bin": { - "which": "bin/which" - } - }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" + "node-which": "bin/node-which" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 8" } }, "node_modules/which-module": { @@ -4867,12 +3457,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -4892,9 +3476,9 @@ } }, "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true, "engines": { "node": ">=10" @@ -4915,6 +3499,18 @@ "node": ">=10" } }, + "node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/yargs-unparser/node_modules/decamelize": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", @@ -4927,13 +3523,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/yargs-unparser/node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, "engines": { - "node": ">=8" + "node": ">=6" } }, "node_modules/yocto-queue": { @@ -4970,26 +3566,26 @@ } }, "@babel/compat-data": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.0.tgz", - "integrity": "sha512-y5rqgTTPTmaF5e2nVhOxw+Ur9HDJLsWb6U/KpgUzRZEdPfE6VOubXBKLdbcUTijzRptednSBDQbYZBOSqJxpJw==", + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.1.tgz", + "integrity": "sha512-72a9ghR0gnESIa7jBN53U32FOVCEoztyIlKaNoU05zRhEecduGK9L9c3ww7Mp06JiR+0ls0GBPFJQwwtjn9ksg==", "dev": true }, "@babel/core": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.0.tgz", - "integrity": "sha512-reM4+U7B9ss148rh2n1Qs9ASS+w94irYXga7c2jaQv9RVzpS7Mv1a9rnYYwuDa45G+DkORt9g6An2k/V4d9LbQ==", + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.1.tgz", + "integrity": "sha512-1H8VgqXme4UXCRv7/Wa1bq7RVymKOzC7znjyFM8KiEzwFqcKUKYNoQef4GhdklgNvoBXyW4gYhuBNCM5o1zImw==", "dev": true, "requires": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", "@babel/generator": "^7.19.0", - "@babel/helper-compilation-targets": "^7.19.0", + "@babel/helper-compilation-targets": "^7.19.1", "@babel/helper-module-transforms": "^7.19.0", "@babel/helpers": "^7.19.0", - "@babel/parser": "^7.19.0", + "@babel/parser": "^7.19.1", "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", + "@babel/traverse": "^7.19.1", "@babel/types": "^7.19.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", @@ -5023,14 +3619,14 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.0.tgz", - "integrity": "sha512-Ai5bNWXIvwDvWM7njqsG3feMlL9hCVQsPYXodsZyLwshYkZVJt59Gftau4VrE8S9IT9asd2uSP1hG6wCNw+sXA==", + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.1.tgz", + "integrity": "sha512-LlLkkqhCMyz2lkQPvJNdIYU7O5YjWRgC2R4omjCTpZd8u8KMQzZvX4qce+/BluN1rcQiV7BoGUpmQ0LeHerbhg==", "dev": true, "requires": { - "@babel/compat-data": "^7.19.0", + "@babel/compat-data": "^7.19.1", "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.20.2", + "browserslist": "^4.21.3", "semver": "^6.3.0" } }, @@ -5109,9 +3705,9 @@ "dev": true }, "@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", "dev": true }, "@babel/helper-validator-option": { @@ -5201,9 +3797,9 @@ } }, "@babel/parser": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.0.tgz", - "integrity": "sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw==", + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.1.tgz", + "integrity": "sha512-h7RCSorm1DdTVGJf3P2Mhj3kdnkmF/EiysUkzS2TdgAYqyjFdMQJbVuXOBej2SBJaXan/lIVtT6KkGbyyq753A==", "dev": true }, "@babel/template": { @@ -5218,9 +3814,9 @@ } }, "@babel/traverse": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.0.tgz", - "integrity": "sha512-4pKpFRDh+utd2mbRC8JLnlsMUii3PMHjpL6a0SZ4NMZy7YFP9aXORxEhdMVOc9CpWtDF09IkciQLEhK7Ml7gRA==", + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.1.tgz", + "integrity": "sha512-0j/ZfZMxKukDaag2PtOPDbwuELqIar6lLskVPPJDjXMXjfLb1Obo/1yjxIGqqAJrmfaTIY3z2wFLAQ7qSkLsuA==", "dev": true, "requires": { "@babel/code-frame": "^7.18.6", @@ -5229,7 +3825,7 @@ "@babel/helper-function-name": "^7.19.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.0", + "@babel/parser": "^7.19.1", "@babel/types": "^7.19.0", "debug": "^4.1.0", "globals": "^11.1.0" @@ -5246,6 +3842,27 @@ "to-fast-properties": "^2.0.0" } }, + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "dependencies": { + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + } + } + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -5259,12 +3876,6 @@ "resolve-from": "^5.0.0" }, "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -5348,31 +3959,29 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } + "@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", "dev": true }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } + "@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "dev": true }, "@types/chai": { "version": "4.3.3", @@ -5380,23 +3989,18 @@ "integrity": "sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==", "dev": true }, - "@types/minimist": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", - "dev": true - }, "@types/mocha": { "version": "9.1.1", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", "dev": true }, - "@types/normalize-package-data": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", - "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", - "dev": true + "@types/node": { + "version": "18.7.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.18.tgz", + "integrity": "sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==", + "dev": true, + "peer": true }, "@ungap/promise-all-settled": { "version": "1.1.2", @@ -5404,14 +4008,26 @@ "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, + "acorn": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "dev": true + }, + "acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true + }, "aggregate-error": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz", - "integrity": "sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, "requires": { - "clean-stack": "^4.0.0", - "indent-string": "^5.0.0" + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" } }, "ajv": { @@ -5472,6 +4088,12 @@ "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", "dev": true }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -5481,12 +4103,6 @@ "sprintf-js": "~1.0.2" } }, - "arrify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-3.0.0.tgz", - "integrity": "sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==", - "dev": true - }, "asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", @@ -5572,17 +4188,23 @@ "dev": true }, "browserslist": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz", - "integrity": "sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==", + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001370", - "electron-to-chromium": "^1.4.202", + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.5" + "update-browserslist-db": "^1.0.9" } }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", + "dev": true + }, "caching-transform": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", @@ -5595,38 +4217,16 @@ "write-file-atomic": "^3.0.0" } }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, - "camelcase-keys": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz", - "integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==", - "dev": true, - "requires": { - "camelcase": "^6.3.0", - "map-obj": "^4.1.0", - "quick-lru": "^5.1.1", - "type-fest": "^1.2.1" - } - }, "caniuse-lite": { - "version": "1.0.30001399", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001399.tgz", - "integrity": "sha512-4vQ90tMKS+FkvuVWS5/QY1+d805ODxZiKFzsU8o/RsVJz49ZSRR8EjykLJbqhzdPgadbX6wB538wOzle3JniRA==", + "version": "1.0.30001409", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001409.tgz", + "integrity": "sha512-V0mnJ5dwarmhYv8/MzhJ//aW68UpvnQBXv8lJ2QUsvn2pHcmAuNtu8hQEDz37XnA1iE+lRR9CIfGWWpgJ5QedQ==", "dev": true }, "caseless": { @@ -5694,21 +4294,10 @@ } }, "clean-stack": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz", - "integrity": "sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==", - "dev": true, - "requires": { - "escape-string-regexp": "5.0.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", - "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", - "dev": true - } - } + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true }, "cliui": { "version": "7.0.4", @@ -5745,6 +4334,12 @@ "delayed-stream": "~1.0.0" } }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -5785,63 +4380,21 @@ "request": "^2.88.2" } }, - "cp-file": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-9.1.0.tgz", - "integrity": "sha512-3scnzFj/94eb7y4wyXRWwvzLFaQp87yyfTnChIjlfYrVqp5lVO3E2hIJMeQIltUT0K2ZAB3An1qXcBmwGyvuwA==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "nested-error-stacks": "^2.0.0", - "p-event": "^4.1.0" - } - }, - "cpy": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/cpy/-/cpy-9.0.1.tgz", - "integrity": "sha512-D9U0DR5FjTCN3oMTcFGktanHnAG5l020yvOCR1zKILmAyPP7I/9pl6NFgRbDcmSENtbK1sQLBz1p9HIOlroiNg==", - "dev": true, - "requires": { - "arrify": "^3.0.0", - "cp-file": "^9.1.0", - "globby": "^13.1.1", - "junk": "^4.0.0", - "micromatch": "^4.0.4", - "nested-error-stacks": "^2.1.0", - "p-filter": "^3.0.0", - "p-map": "^5.3.0" - } - }, - "cpy-cli": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/cpy-cli/-/cpy-cli-4.2.0.tgz", - "integrity": "sha512-b04b+cbdr29CdpREPKw/itrfjO43Ty0Aj7wRM6M6LoE4GJxZJCk9Xp+Eu1IqztkKh3LxIBt1tDplENsa6KYprg==", - "dev": true, - "requires": { - "cpy": "^9.0.0", - "meow": "^10.1.2" - } + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true }, "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, "dashdash": { @@ -5871,35 +4424,11 @@ } }, "decamelize": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz", - "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "dev": true }, - "decamelize-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", - "integrity": "sha512-ocLWuYzRPoS9bfiSdDd3cxvrzovVMZnRDVEzAs+hWIVXGDbHxWMECij2OBuyB/An0FFW/nLuq6Kv1i/YC5Qfzg==", - "dev": true, - "requires": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" - }, - "dependencies": { - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", - "dev": true - } - } - }, "deep-eql": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", @@ -5918,16 +4447,6 @@ "strip-bom": "^4.0.0" } }, - "define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", - "dev": true, - "requires": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - } - }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -5940,15 +4459,6 @@ "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -5960,9 +4470,9 @@ } }, "electron-to-chromium": { - "version": "1.4.249", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.249.tgz", - "integrity": "sha512-GMCxR3p2HQvIw47A599crTKYZprqihoBL4lDSAUmr7IYekXFK5t/WgEBrGJDCa2HWIZFQEkGuMqPCi05ceYqPQ==", + "version": "1.4.257", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.257.tgz", + "integrity": "sha512-C65sIwHqNnPC2ADMfse/jWTtmhZMII+x6ADI9gENzrOiI7BpxmfKFE84WkIEl5wEg+7+SfIkwChDlsd1Erju2A==", "dev": true }, "emoji-regex": { @@ -5971,57 +4481,6 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.2.tgz", - "integrity": "sha512-XxXQuVNrySBNlEkTYJoDNFe5+s2yIOpzq80sUHEdPdQr0S5nTLz4ZPPPswNIpKseDDUS5yghX1gfLIHQZ1iNuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.2", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-weakref": "^1.0.2", - "object-inspect": "^1.12.2", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", - "string.prototype.trimend": "^1.0.5", - "string.prototype.trimstart": "^1.0.5", - "unbox-primitive": "^1.0.2" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, "es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", @@ -6064,34 +4523,12 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, - "fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - } - }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, - "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -6136,49 +4573,6 @@ "requires": { "cross-spawn": "^7.0.0", "signal-exit": "^3.0.2" - }, - "dependencies": { - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } } }, "forever-agent": { @@ -6223,24 +4617,6 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" - } - }, - "functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true - }, "gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -6259,33 +4635,12 @@ "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", "dev": true }, - "get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" - } - }, "get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true }, - "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - } - }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -6345,19 +4700,6 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, - "globby": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.2.tgz", - "integrity": "sha512-LKSDZXToac40u8Q1PQtZihbNdTYSNMuWe+K5l+oa6KgDzSvVrHXlJy40hUP522RjAIoNLJYBJi7ow+rbFpIhHQ==", - "dev": true, - "requires": { - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.11", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^4.0.0" - } - }, "graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -6380,12 +4722,6 @@ "har-schema": "^2.0.0" } }, - "hard-rejection": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", - "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", - "dev": true - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -6395,42 +4731,12 @@ "function-bind": "^1.1.1" } }, - "has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.1" - } - }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true - }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, "hasha": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", @@ -6439,14 +4745,6 @@ "requires": { "is-stream": "^2.0.0", "type-fest": "^0.8.0" - }, - "dependencies": { - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true - } } }, "he": { @@ -6455,15 +4753,6 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, - "hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, "html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -6481,12 +4770,6 @@ "sshpk": "^1.7.0" } }, - "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true - }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -6494,9 +4777,9 @@ "dev": true }, "indent-string": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", - "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true }, "inflight": { @@ -6515,32 +4798,6 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "requires": { - "has-bigints": "^1.0.1" - } - }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -6550,22 +4807,6 @@ "binary-extensions": "^2.0.0" } }, - "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-callable": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.5.tgz", - "integrity": "sha512-ZIWRujF6MvYGkEuHMYtFRkL2wAtFw89EHfKlXrkPkjQZZRWeh9L1q3SV13NIfHnqxugjLvAOkEHx9mb1zcMnEw==", - "dev": true - }, "is-core-module": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", @@ -6575,15 +4816,6 @@ "has": "^1.0.3" } }, - "is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -6605,76 +4837,24 @@ "is-extglob": "^2.1.1" } }, - "is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true - }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, - "is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, "is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true }, - "is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -6687,15 +4867,6 @@ "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true }, - "is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -6753,97 +4924,23 @@ "p-map": "^3.0.0", "rimraf": "^3.0.0", "uuid": "^8.3.2" + } + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" }, "dependencies": { - "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } - }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true - }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - }, - "dependencies": { - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -6900,18 +4997,6 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, "json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", @@ -6948,50 +5033,12 @@ "verror": "1.10.0" } }, - "junk": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/junk/-/junk-4.0.0.tgz", - "integrity": "sha512-ojtSU++zLJ3jQG9bAYjg94w+/DOJtRyD7nPaerMFrBhmdVmiV5/exYH5t4uHga4G/95nT6hr1OJoKIFbYbrW5w==", - "dev": true - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, "lcov-parse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", "integrity": "sha512-aprLII/vPzuQvYZnDRU78Fns9I2Ag3gi4Ipga/hxnVMCZC8DnR2nI7XBqrPoywGfxqIx/DgarGvDJZAD3YBTgQ==", "dev": true }, - "lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true - } - } - }, "locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -7032,15 +5079,6 @@ "get-func-name": "^2.0.0" } }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, "make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -7050,54 +5088,12 @@ "semver": "^6.0.0" } }, - "map-obj": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", - "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", - "dev": true - }, - "memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, - "meow": { - "version": "10.1.3", - "resolved": "https://registry.npmjs.org/meow/-/meow-10.1.3.tgz", - "integrity": "sha512-0WL7RMCPPdUTE00+GxJjL4d5Dm6eUbmAzxlzywJWiRUKCW093owmZ7/q74tH9VI91vxw9KJJNxAcvdpxb2G4iA==", - "dev": true, - "requires": { - "@types/minimist": "^1.2.2", - "camelcase-keys": "^7.0.0", - "decamelize": "^5.0.0", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.2", - "read-pkg-up": "^8.0.0", - "redent": "^4.0.0", - "trim-newlines": "^4.0.2", - "type-fest": "^1.2.2", - "yargs-parser": "^20.2.9" - } - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, "mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -7113,12 +5109,6 @@ "mime-db": "1.52.0" } }, - "min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", - "dev": true - }, "minimatch": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", @@ -7134,23 +5124,13 @@ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, - "minimist-options": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", - "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, "requires": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0", - "kind-of": "^6.0.3" - }, - "dependencies": { - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", - "dev": true - } + "minimist": "^1.2.6" } }, "mocha": { @@ -7197,12 +5177,6 @@ "requires": { "argparse": "^2.0.1" } - }, - "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true } } }, @@ -7218,18 +5192,6 @@ "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true }, - "nested-error-stacks": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.1.tgz", - "integrity": "sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, "node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -7245,129 +5207,12 @@ "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", "dev": true }, - "normalize-package-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", - "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", - "dev": true, - "requires": { - "hosted-git-info": "^4.0.1", - "is-core-module": "^2.5.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } - } - }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, - "npm-run-all": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", - "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "chalk": "^2.4.1", - "cross-spawn": "^6.0.5", - "memorystream": "^0.3.1", - "minimatch": "^3.0.4", - "pidtree": "^0.3.0", - "read-pkg": "^3.0.0", - "shell-quote": "^1.6.1", - "string.prototype.padend": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, "nyc": { "version": "15.1.0", "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", @@ -7403,28 +5248,6 @@ "yargs": "^15.0.2" }, "dependencies": { - "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true - }, "cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -7436,12 +5259,6 @@ "wrap-ansi": "^6.2.0" } }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true - }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -7452,12 +5269,6 @@ "path-exists": "^4.0.0" } }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true - }, "locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -7485,15 +5296,6 @@ "p-limit": "^2.2.0" } }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - }, "wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -7548,30 +5350,6 @@ "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true }, - "object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", - "dev": true - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - } - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -7581,30 +5359,6 @@ "wrappy": "1" } }, - "p-event": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", - "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", - "dev": true, - "requires": { - "p-timeout": "^3.1.0" - } - }, - "p-filter": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-3.0.0.tgz", - "integrity": "sha512-QtoWLjXAW++uTX67HZQz1dbTpqBfiidsB6VtQUC9iR85S120+s0T5sO6s+B5MLzFcZkrEd/DGMmCjR+f2Qpxwg==", - "dev": true, - "requires": { - "p-map": "^5.1.0" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", - "dev": true - }, "p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -7624,21 +5378,12 @@ } }, "p-map": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-5.5.0.tgz", - "integrity": "sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==", - "dev": true, - "requires": { - "aggregate-error": "^4.0.0" - } - }, - "p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", "dev": true, "requires": { - "p-finally": "^1.0.0" + "aggregate-error": "^3.0.0" } }, "p-try": { @@ -7659,16 +5404,6 @@ "release-zalgo": "^1.0.0" } }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -7682,9 +5417,9 @@ "dev": true }, "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, "path-parse": { @@ -7693,12 +5428,6 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, "pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -7723,18 +5452,6 @@ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, - "pidtree": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", - "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true - }, "pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -7773,175 +5490,65 @@ } }, "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - } - } - }, - "process-on-spawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", - "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", - "dev": true, - "requires": { - "fromentries": "^1.2.0" - } - }, - "psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "dev": true - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - }, - "dependencies": { - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "read-pkg-up": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz", - "integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==", - "dev": true, - "requires": { - "find-up": "^5.0.0", - "read-pkg": "^6.0.0", - "type-fest": "^1.0.1" - }, - "dependencies": { - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, - "read-pkg": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz", - "integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^3.0.2", - "parse-json": "^5.2.0", - "type-fest": "^1.0.1" + "p-limit": "^2.2.0" } } } }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "prettier": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "dev": true + }, + "process-on-spawn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", + "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", "dev": true, "requires": { - "picomatch": "^2.2.1" + "fromentries": "^1.2.0" } }, - "redent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz", - "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==", + "psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "requires": { - "indent-string": "^5.0.0", - "strip-indent": "^4.0.0" + "safe-buffer": "^5.1.0" } }, - "regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" + "picomatch": "^2.2.1" } }, "release-zalgo": { @@ -8018,12 +5625,6 @@ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true - }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -8033,15 +5634,6 @@ "glob": "^7.1.3" } }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "requires": { - "queue-microtask": "^1.2.2" - } - }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -8076,49 +5668,26 @@ "dev": true }, "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "^3.0.0" } }, "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true - }, - "shell-quote": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz", - "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, "signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "slash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", - "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", - "dev": true - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -8137,51 +5706,8 @@ "rimraf": "^3.0.0", "signal-exit": "^3.0.2", "which": "^2.0.1" - }, - "dependencies": { - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" } }, - "spdx-license-ids": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", - "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", - "dev": true - }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -8216,39 +5742,6 @@ "strip-ansi": "^6.0.1" } }, - "string.prototype.padend": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.3.tgz", - "integrity": "sha512-jNIIeokznm8SD/TZISQsZKYu7RJyheFNt84DUPrh482GC8RVp2MKqm2O5oBRdGxbDQoXrhhWtPIWQOiy20svUg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - } - }, - "string.prototype.trimend": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", - "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" - } - }, - "string.prototype.trimstart": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", - "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" - } - }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -8264,15 +5757,6 @@ "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true }, - "strip-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz", - "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==", - "dev": true, - "requires": { - "min-indent": "^1.0.1" - } - }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -8351,12 +5835,166 @@ "punycode": "^2.1.1" } }, - "trim-newlines": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.0.2.tgz", - "integrity": "sha512-GJtWyq9InR/2HRiLZgpIKv+ufIKrVrvjQWEj7PxAXNc5dwbNJkqhAUoAGgzRmULAnoOM5EIpveYd3J2VeSAIew==", + "ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "requires": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + } + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tslint": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", + "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.3", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.13.0", + "tsutils": "^2.29.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "tslint-config-prettier": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz", + "integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==", "dev": true }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -8379,9 +6017,9 @@ "dev": true }, "type-fest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true }, "typedarray-to-buffer": { @@ -8399,18 +6037,6 @@ "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", "dev": true }, - "unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - } - }, "update-browserslist-db": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", @@ -8436,15 +6062,11 @@ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } + "v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true }, "verror": { "version": "1.10.0", @@ -8458,27 +6080,14 @@ } }, "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" } }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", @@ -8526,12 +6135,6 @@ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -8548,9 +6151,9 @@ } }, "yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true }, "yargs-unparser": { @@ -8565,20 +6168,26 @@ "is-plain-obj": "^2.1.0" }, "dependencies": { + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true + }, "decamelize": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true - }, - "is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true } } }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true + }, "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 517c426..22f7be8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ngageoint/color-js", - "version": "1.0.0", + "version": "2.0.1", "displayName": "Color Javascript", "description": "Color Javascript", "keywords": [ @@ -9,7 +9,7 @@ ], "repository": { "type": "git", - "url": "https://github.com/ngageoint/color-js.git" + "url": "git+https://github.com/ngageoint/color-js.git" }, "author": { "name": "NGA" @@ -24,28 +24,35 @@ "engines": { "npm": ">= 8.x" }, + "license": "MIT", + "main": "index.ts", "devDependencies": { "@types/chai": "^4.3.3", "@types/mocha": "9.1.1", "chai": "4.3.6", "coveralls": "3.1.1", - "cpy-cli": "^4.2.0", "mocha": "^10.0.0", - "npm-run-all": "^4.1.5", "nyc": "^15.1.0", + "prettier": "^2.7.1", + "tslint": "^6.1.3", + "tslint-config-prettier": "^1.18.0", + "ts-node": "^10.9.1", "typescript": "^4.8.3" }, + "dependencies": {}, "scripts": { - "clean": "rm -rf dist; rm -rf test-dist; rm -rf .test_run", - "test:compile": "tsc -b test", - "test:copy_node_modules": "cpy \"node_modules/**/*\" ../test-dist/", + "clean": "rm -rf dist; rm -rf .test_run", "test:run": "mocha --config .mocharc.js", - "test:build": "npm-run-all build test:compile test:copy_node_modules", - "test": "npm-run-all test:build test:run", + "test": "npm run test:run", + "compile": "tsc", + "build": "npm run compile", "report": "nyc report", "coverage": "nyc npm run test:run", - "coveralls": "nyc report --reporter=text-lcov | coveralls", - "build": "npm run clean && tsc" + "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", + "lint": "tslint -p tsconfig.json", + "prebuild": "npm run clean", + "pretest": "npm run build", + "prepublishOnly": "npm run build && npm run lint && ts-node build/dist" }, "files": [ "dist" diff --git a/src/Color.ts b/src/Color.ts new file mode 100644 index 0000000..9094ecd --- /dev/null +++ b/src/Color.ts @@ -0,0 +1,603 @@ +import { ColorConstants } from './ColorConstants'; +import { ColorUtils } from './ColorUtils'; + +/** + * Color representation with support for hex, RBG, arithmetic RBG, HSL, and + * integer colors + * + * @author osbornb + */ +export class Color { + /** + * Red arithmetic color value + */ + private red = 0.0; + + /** + * Green arithmetic color value + */ + private green = 0.0; + + /** + * Blue arithmetic color value + */ + private blue = 0.0; + + /** + * Opacity arithmetic value + */ + private opacity = 1.0; + + /** + * Create a black color + * + * @return color + */ + public static black(): Color { + return Color.color(ColorConstants.BLACK); + } + + /** + * Create a blue color + * + * @return color + */ + public static blue(): Color { + return Color.color(ColorConstants.BLUE); + } + + /** + * Create a brown color + * + * @return color + */ + public static brown(): Color { + return Color.color(ColorConstants.BROWN); + } + + /** + * Create a cyan color + * + * @return color + */ + public static cyan(): Color { + return Color.color(ColorConstants.CYAN); + } + + /** + * Create a dark gray color + * + * @return color + */ + public static darkGray(): Color { + return Color.color(ColorConstants.DKGRAY); + } + + /** + * Create a gray color + * + * @return color + */ + public static gray(): Color { + return Color.color(ColorConstants.GRAY); + } + + /** + * Create a green color + * + * @return color + */ + public static green(): Color { + return Color.color(ColorConstants.GREEN); + } + + /** + * Create a light gray color + * + * @return color + */ + public static lightGray(): Color { + return Color.color(ColorConstants.LTGRAY); + } + + /** + * Create a magenta color + * + * @return color + */ + public static magenta(): Color { + return Color.color(ColorConstants.MAGENTA); + } + + /** + * Create an orange color + * + * @return color + */ + public static orange(): Color { + return Color.color(ColorConstants.ORANGE); + } + + /** + * Create a pink color + * + * @return color + */ + public static pink(): Color { + return Color.color(ColorConstants.PINK); + } + + /** + * Create a purple color + * + * @return color + */ + public static purple(): Color { + return Color.color(ColorConstants.PURPLE); + } + + /** + * Create a red color + * + * @return color + */ + public static red(): Color { + return Color.color(ColorConstants.RED); + } + + /** + * Create a violet color + * + * @return color + */ + public static violet(): Color { + return Color.color(ColorConstants.VIOLET); + } + + /** + * Create a white color + * + * @return color + */ + public static white(): Color { + return Color.color(ColorConstants.WHITE); + } + + /** + * Create a yellow color + * + * @return color + */ + public static yellow(): Color { + return Color.color(ColorConstants.YELLOW); + } + + /** + * Create the color in hex + * + * @param color + * hex color in format #RRGGBB, RRGGBB, #RGB, RGB, #AARRGGBB, + * AARRGGBB, #ARGB, or ARGB + * @return color + */ + public static color(color: string): Color { + const newColor = new Color(); + newColor.setColor(color); + return newColor; + } + + /** + * Set the color as a single integer or Set the color in hex + * + * @param color + * color integer or hex color in format #RRGGBB, RRGGBB, #RGB, RGB, #AARRGGBB, + * AARRGGBB, #ARGB, or ARGB + */ + public setColor(color: string | number | string): void { + if (typeof color === 'number') { + this.setRed(ColorUtils.getRed(color)); + this.setGreen(ColorUtils.getGreen(color)); + this.setBlue(ColorUtils.getBlue(color)); + if (color > 16777215 || color < 0) { + this.setAlpha(ColorUtils.getAlpha(color)); + } + } else { + this.setRed(ColorUtils.getRed(color)); + this.setGreen(ColorUtils.getGreen(color)); + this.setBlue(ColorUtils.getBlue(color)); + const alpha = ColorUtils.getAlpha(color); + if (alpha != null) { + this.setAlpha(alpha); + } + } + } + + /** + * Set the color with HSLA (hue, saturation, lightness, alpha) values + * + * @param hue + * hue value inclusively between 0.0 and 360.0 + * @param saturation + * saturation inclusively between 0.0 and 1.0 + * @param lightness + * lightness inclusively between 0.0 and 1.0 + * @param alpha + * alpha inclusively between 0.0 and 1.0 + */ + public setColorByHSL(hue: number, saturation: number, lightness: number, alpha?: number): void { + const arithmeticRGB = ColorUtils.toArithmeticRGBFromHSL(hue, saturation, lightness); + this.setRed(arithmeticRGB[0]); + this.setGreen(arithmeticRGB[1]); + this.setBlue(arithmeticRGB[2]); + if (alpha) { + this.setAlpha(alpha); + } + } + + /** + * Set the red color as an integer or hex + * + * @param red + * red integer color inclusively between 0 and 255 or red hex color in format RR or R + */ + public setRed(red: string | number): void { + if (typeof red === 'number') { + if (Number.isInteger(red) && red !== 0 && red !== 1) { + red = ColorUtils.toHex(red); + } + } + + if (typeof red === 'string') { + red = ColorUtils.toArithmeticRGB(red); + } + ColorUtils.validateArithmeticRGB(red); + this.red = red; + } + + /** + * Set the green color as an integer orr hex + * + * @param green + * green integer color inclusively between 0 and 255 or in format GG or G + */ + public setGreen(green: string | number): void { + if (typeof green === 'number') { + if (Number.isInteger(green) && green !== 0 && green !== 1) { + green = ColorUtils.toHex(green); + } + } + + if (typeof green === 'string') { + green = ColorUtils.toArithmeticRGB(green); + } + ColorUtils.validateArithmeticRGB(green); + this.green = green; + } + + /** + * Set the blue color as an integer or hex + * + * @param blue + * blue integer color inclusively between 0 and 255 or in format BB or B + */ + public setBlue(blue: string | number): void { + if (typeof blue === 'number') { + if (Number.isInteger(blue) && blue !== 0 && blue !== 1) { + blue = ColorUtils.toHex(blue); + } + } + + if (typeof blue === 'string') { + blue = ColorUtils.toArithmeticRGB(blue); + } + ColorUtils.validateArithmeticRGB(blue); + this.blue = blue; + } + + /** + * Set the opacity as an arithmetic float + * + * @param opacity + * opacity float color inclusively between 0.0 and 1.0 + */ + public setOpacity(opacity: number) { + ColorUtils.validateArithmeticRGB(opacity); + this.opacity = opacity; + } + + /** + * Set the alpha color as an arithmetic float or hex + * + * @param alpha + * alpha float color inclusively between 0.0 and 1.0 or hex color in format AA or A + */ + public setAlpha(alpha: string | number): void { + if (typeof alpha === 'string') { + alpha = ColorUtils.toArithmeticRGB(alpha); + } else if (Number.isInteger(alpha) && alpha !== 0 && alpha !== 1) { + alpha = ColorUtils.toArithmeticRGB(alpha); + } + + this.setOpacity(alpha); + } + + /** + * Check if the color is opaque (opacity or alpha of 1.0, 255, or x00) + * + * @return true if opaque + */ + public isOpaque(): boolean { + return this.opacity === 1.0; + } + + /** + * Get the color as a hex string + * + * @return hex color in the format #RRGGBB + */ + public getColorHex(): string { + return ColorUtils.toColor(this.getRedHex(), this.getGreenHex(), this.getBlueHex()) as string; + } + + /** + * Get the color as a hex string with alpha + * + * @return hex color in the format #AARRGGBB + */ + public getColorHexWithAlpha(): string { + return ColorUtils.toColorWithAlpha(this.getRedHex(), this.getGreenHex(), this.getBlueHex(), this.getAlphaHex()) as string; + } + + /** + * Get the color as a hex string, shorthanded when possible + * + * @return hex color in the format #RGB or #RRGGBB + */ + public getColorHexShorthand(): string { + return ColorUtils.toColorShorthand(this.getRedHex(), this.getGreenHex(), this.getBlueHex()); + } + + /** + * Get the color as a hex string with alpha, shorthanded when possible + * + * @return hex color in the format #ARGB or #AARRGGBB + */ + public getColorHexShorthandWithAlpha(): string { + return ColorUtils.toColorShorthandWithAlpha( + this.getRedHex(), + this.getGreenHex(), + this.getBlueHex(), + this.getAlphaHex(), + ); + } + + /** + * Get the color as an integer + * + * @return integer color + */ + public getColor(): number { + return ColorUtils.toColor(this.getRed(), this.getGreen(), this.getBlue()) as number; + } + + /** + * Get the color as an integer including the alpha + * + * @return integer color + */ + public getColorWithAlpha(): number { + return ColorUtils.toColorWithAlpha(this.getRed(), this.getGreen(), this.getBlue(), this.getAlpha()) as number; + } + + /** + * Get the red color in hex + * + * @return red hex color in format RR + */ + public getRedHex(): string { + return ColorUtils.toHex(this.red); + } + + /** + * Get the green color in hex + * + * @return green hex color in format GG + */ + public getGreenHex(): string { + return ColorUtils.toHex(this.green); + } + + /** + * Get the blue color in hex + * + * @return blue hex color in format BB + */ + public getBlueHex(): string { + return ColorUtils.toHex(this.blue); + } + + /** + * Get the alpha color in hex + * + * @return alpha hex color in format AA + */ + public getAlphaHex(): string { + return ColorUtils.toHex(this.opacity); + } + + /** + * Get the red color in hex, shorthand when possible + * + * @return red hex color in format R or RR + */ + public getRedHexShorthand(): string { + return ColorUtils.shorthandHexSingle(this.getRedHex()); + } + + /** + * Get the green color in hex, shorthand when possible + * + * @return green hex color in format G or GG + */ + public getGreenHexShorthand(): string { + return ColorUtils.shorthandHexSingle(this.getGreenHex()); + } + + /** + * Get the blue color in hex, shorthand when possible + * + * @return blue hex color in format B or BB + */ + public getBlueHexShorthand(): string { + return ColorUtils.shorthandHexSingle(this.getBlueHex()); + } + + /** + * Get the alpha color in hex, shorthand when possible + * + * @return alpha hex color in format A or AA + */ + public getAlphaHexShorthand(): string { + return ColorUtils.shorthandHexSingle(this.getAlphaHex()); + } + + /** + * Get the red color as an integer + * + * @return red integer color inclusively between 0 and 255 + */ + public getRed(): number { + return ColorUtils.toRGB(this.red); + } + + /** + * Get the green color as an integer + * + * @return green integer color inclusively between 0 and 255 + */ + public getGreen(): number { + return ColorUtils.toRGB(this.green); + } + + /** + * Get the blue color as an integer + * + * @return blue integer color inclusively between 0 and 255 + */ + public getBlue(): number { + return ColorUtils.toRGB(this.blue); + } + + /** + * Get the alpha color as an integer + * + * @return alpha integer color inclusively between 0 and 255 + */ + public getAlpha(): number { + return ColorUtils.toRGB(this.opacity); + } + + /** + * Get the red color as an arithmetic float + * + * @return red float color inclusively between 0.0 and 1.0 + */ + public getRedArithmetic(): number { + return this.red; + } + + /** + * Get the green color as an arithmetic float + * + * @return green float color inclusively between 0.0 and 1.0 + */ + public getGreenArithmetic(): number { + return this.green; + } + + /** + * Get the blue color as an arithmetic float + * + * @return blue float color inclusively between 0.0 and 1.0 + */ + public getBlueArithmetic(): number { + return this.blue; + } + + /** + * Get the opacity as an arithmetic float + * + * @return opacity float inclusively between 0.0 and 1.0 + */ + public getOpacity(): number { + return this.opacity; + } + + /** + * Get the alpha color as an arithmetic float + * + * @return alpha float color inclusively between 0.0 and 1.0 + */ + public getAlphaArithmetic(): number { + return this.getOpacity(); + } + + /** + * Get the HSL (hue, saturation, lightness) values + * + * @return HSL array where: 0 = hue, 1 = saturation, 2 = lightness + */ + public getHSL(): number[] { + return ColorUtils.toHSL(this.red, this.green, this.blue); + } + + /** + * Get the HSL hue value + * + * @return hue value + */ + public getHue(): number { + return this.getHSL()[0]; + } + + /** + * Get the HSL saturation value + * + * @return saturation value + */ + public getSaturation(): number { + return this.getHSL()[1]; + } + + /** + * Get the HSL lightness value + * + * @return lightness value + */ + public getLightness(): number { + return this.getHSL()[2]; + } + + /** + * Copy the color + * + * @return color copy + */ + public copy(): Color { + const color = new Color(); + color.red = this.red; + color.green = this.green; + color.blue = this.blue; + color.opacity = this.opacity; + return color; + } + + public setRGB(red: any, green: any, blue: any, alpha?: any) { + this.setRed(red); + this.setGreen(green); + this.setBlue(blue); + if (alpha) { + this.setAlpha(alpha); + } + } +} diff --git a/src/ColorConstants.ts b/src/ColorConstants.ts new file mode 100644 index 0000000..33a276d --- /dev/null +++ b/src/ColorConstants.ts @@ -0,0 +1,86 @@ +/** + * Color Constant hex codes + * + * @author osbornb + */ +export class ColorConstants { + /** + * Black hex color + */ + public static readonly BLACK = '#000000'; + + /** + * Blue hex color + */ + public static readonly BLUE = '#0000FF'; + + /** + * Brown hex color + */ + public static readonly BROWN = '#A52A2A'; + + /** + * Cyan hex color + */ + public static readonly CYAN = '#00FFFF'; + + /** + * Dark Gray hex color + */ + public static readonly DKGRAY = '#444444'; + + /** + * Gray hex color + */ + public static readonly GRAY = '#888888'; + + /** + * Green hex color + */ + public static readonly GREEN = '#00FF00'; + + /** + * Light Gray hex color + */ + public static readonly LTGRAY = '#CCCCCC'; + + /** + * Magenta hex color + */ + public static readonly MAGENTA = '#FF00FF'; + + /** + * Orange hex color + */ + public static readonly ORANGE = '#FFA500'; + + /** + * Pink hex color + */ + public static readonly PINK = '#FFC0CB'; + + /** + * Purple hex color + */ + public static readonly PURPLE = '#800080'; + + /** + * Red hex color + */ + public static readonly RED = '#FF0000'; + + /** + * Violet hex color + */ + public static readonly VIOLET = '#EE82EE'; + + /** + * White hex color + */ + public static readonly WHITE = '#FFFFFF'; + + /** + * Yellow hex color + */ + public static readonly YELLOW = '#FFFF00'; +} diff --git a/src/ColorUtils.ts b/src/ColorUtils.ts new file mode 100644 index 0000000..a07e95d --- /dev/null +++ b/src/ColorUtils.ts @@ -0,0 +1,755 @@ +/** + * Color utilities with support for hex, RBG, arithmetic RBG, HSL, and integer + * colors + * + * @author osbornb + */ +export class ColorUtils { + /** + * Hex color pattern + */ + private static readonly hexColorPattern = new RegExp('^#?(([0-9a-fA-F]{3}){1,2}|([0-9a-fA-F]{4}){1,2})$'); + + /** + * Hex single color pattern + */ + private static readonly hexSingleColorPattern = new RegExp('^[0-9a-fA-F]{1,2}$'); + + /** + * Convert the hex color values to a hex color, shorthanded when possible + * + * @param red + * red hex color in format RR or R + * @param green + * green hex color in format GG or G + * @param blue + * blue hex color in format BB or B + * + * @return hex color in format #RGB or #RRGGBB + */ + public static toColorShorthand(red: string, green: string, blue: string): string { + return ColorUtils.shorthandHex(ColorUtils.toColor(red, green, blue) as string); + } + + /** + * Convert the hex color values to a hex color including an opaque alpha + * value of FF or F, shorthanded when possible + * + * @param red + * red hex color in format RR or R + * @param green + * green hex color in format GG or G + * @param blue + * blue hex color in format BB or B + * + * @return hex color in format #ARGB or #AARRGGBB + */ + public static toColorShorthandWithDefaultAlpha(red: string, green: string, blue: string): string { + return ColorUtils.shorthandHex(ColorUtils.toColorWithDefaultAlpha(red, green, blue) as string); + } + + /** + * Convert the hex color values to a hex color, shorthanded when possible + * + * @param red + * red hex color in format RR or R + * @param green + * green hex color in format GG or G + * @param blue + * blue hex color in format BB or B + * @param alpha + * alpha hex color in format AA or A, null to not include alpha + * + * @return hex color in format #ARGB, #RGB, #AARRGGBB, or #RRGGBB + */ + public static toColorShorthandWithAlpha(red: string, green: string, blue: string, alpha: string): string { + return ColorUtils.shorthandHex(ColorUtils.toColorWithAlpha(red, green, blue, alpha) as string); + } + + /** + * Convert the RBG values to a color integer or hex color values to a hex color + * + * @param red + * red integer color inclusively between 0 and 255 or red hex color in format RR or R + * @param green + * green integer color inclusively between 0 and 255 or green hex color in format GG or G + * @param blue + * blue integer color inclusively between 0 and 255 or blue hex color in format BB or B + * + * @return integer color or hex color in format #RRGGBB + */ + public static toColor(red: string | number, green: string | number, blue: string | number): string | number { + let color: number | string; + if (typeof red === 'number') { + color = ColorUtils.toColorWithAlpha(red, green, blue, -1); + } else { + color = ColorUtils.toColorWithAlpha(red, green, blue, null); + } + return color; + } + + /** + * Convert the RBG values to a color integer including an opaque alpha value + * of 255 or Convert the hex color values to a hex color including an opaque alpha + * value of FF + * + * @param red + * red integer color inclusively between 0 and 255 or red hex color in format RR or R + * @param green + * green integer color inclusively between 0 and 255 or green hex color in format GG or G + * @param blue + * blue integer color inclusively between 0 and 255 or blue hex color in format BB or B + * + * @return integer color or hex color in format #AARRGGBB + */ + public static toColorWithDefaultAlpha( + red: string | number, + green: string | number, + blue: string | number, + ): string | number { + let color: number | string; + if (typeof red === 'number') { + color = ColorUtils.toColorWithAlpha(red, green, blue, 255); + } else { + let defaultAlpha = 'FF'; + if (red !== null && red.length > 0 && red.charAt(0).toLowerCase() === red.charAt(0)) { + defaultAlpha = defaultAlpha.toLowerCase(); + } + color = ColorUtils.toColorWithAlpha(red, green, blue, defaultAlpha); + } + return color; + } + + /** + * Convert the RBGA values to a color integer or Convert the hex color values to a hex color + * + * @param red + * red integer color inclusively between 0 and 255 or red hex color in format RR or R + * @param green + * green integer color inclusively between 0 and 255 or green hex color in format GG or G + * @param blue + * blue integer color inclusively between 0 and 255 or blue hex color in format BB or B or alpha hex color in format AA or A, null to not include alpha + * @param alpha + * alpha integer color inclusively between 0 and 255, -1 to not + * include alpha + * + * @return integer color or hex color in format #AARRGGBB or #RRGGBB + */ + public static toColorWithAlpha( + red: string | number, + green: string | number, + blue: string | number, + alpha: string | number | null, + ): string | number { + let color: string | number = ''; + if (typeof red === 'number' && typeof green === 'number' && typeof blue === 'number') { + ColorUtils.validateRGB(red); + ColorUtils.validateRGB(green); + ColorUtils.validateRGB(blue); + color = ((red & 0xff) << 16) | ((green & 0xff) << 8) | (blue & 0xff); + if (typeof alpha === 'number' && alpha !== -1) { + ColorUtils.validateRGB(alpha); + color = ((alpha & 0xff) << 24) | color; + } + } else if ( + typeof red === 'string' && + typeof green === 'string' && + typeof blue === 'string') { + ColorUtils.validateHexSingle(red); + ColorUtils.validateHexSingle(green); + ColorUtils.validateHexSingle(blue); + color = '#'; + if (alpha != null && typeof alpha === 'string') { + color += ColorUtils.expandShorthandHexSingle(alpha); + } + color += ColorUtils.expandShorthandHexSingle(red); + color += ColorUtils.expandShorthandHexSingle(green); + color += ColorUtils.expandShorthandHexSingle(blue); + } + return color; + } + + /** + * Convert the RGB integer to a hex single color + * + * @param color + * integer color inclusively between 0 and 255 or float color inclusively between 0.0 and 1.0 + * @return hex single color in format FF + */ + public static toHex(color: number): string { + let hex: string; + if (!Number.isInteger(color) || color === 1 || color === 0) { + color = ColorUtils.toRGB(color); + } + ColorUtils.validateRGB(color); + hex = color.toString(16).toUpperCase(); + if (hex.length === 1) { + hex = '0' + hex; + } + return hex; + } + + /** + * Convert red, green, and blue arithmetic values to HSL (hue, saturation, + * lightness) values + * + * @param red + * red color inclusively between 0.0 and 1.0 or between 0 and 255 + * @param green + * green color inclusively between 0.0 and 1.0 or between 0 and 255 + * @param blue + * blue color inclusively between 0.0 and 1.0 or between 0 and 255 + * @return HSL array where: 0 = hue, 1 = saturation, 2 = lightness + */ + public static toHSL(red: number, green: number, blue: number): number[] { + if (Number.isInteger(red) && red !== 0 && red !== 1) { + red = ColorUtils.toArithmeticRGB(red); + } + if (Number.isInteger(green) && green !== 0 && green !== 1) { + green = ColorUtils.toArithmeticRGB(green); + } + if (Number.isInteger(blue) && blue !== 0 && blue !== 1) { + blue = ColorUtils.toArithmeticRGB(blue); + } + + ColorUtils.validateArithmeticRGB(red); + ColorUtils.validateArithmeticRGB(green); + ColorUtils.validateArithmeticRGB(blue); + + const min = Math.min(Math.min(red, green), blue); + const max = Math.max(Math.max(red, green), blue); + + const range = max - min; + + let hue = 0.0; + if (range > 0.0) { + if (red >= green && red >= blue) { + hue = (green - blue) / range; + } else if (green >= blue) { + hue = 2 + (blue - red) / range; + } else { + hue = 4 + (red - green) / range; + } + } + + hue *= 60.0; + if (hue < 0) { + hue += 360.0; + } + + const sum = min + max; + + const lightness = sum / 2.0; + + let saturation: number; + if (min === max) { + saturation = 0.0; + } else { + if (lightness < 0.5) { + saturation = range / sum; + } else { + saturation = range / (2.0 - max - min); + } + } + + return [hue, saturation, lightness]; + } + + /** + * Convert the RGB integer to an arithmetic RBG float or Convert the hex single color to an arithmetic RBG float + * + * @param color + * integer color inclusively between 0 and 255 or hex single color in format FF or F + * @return float color inclusively between 0.0 and 1.0 + */ + public static toArithmeticRGB(color: string | number): number { + if (typeof color === 'string') { + color = ColorUtils.toRGB(color); + } + + if (Number.isInteger(color) && color !== 0 && color !== 1) { + ColorUtils.validateRGB(color); + color = color / 255.0; + } + + return color; + } + + /** + * Convert HSL (hue, saturation, and lightness) values to RGB arithmetic + * values + * + * @param hue + * hue value inclusively between 0.0 and 360.0 + * @param saturation + * saturation inclusively between 0.0 and 1.0 + * @param lightness + * lightness inclusively between 0.0 and 1.0 + * @return arithmetic RGB array where: 0 = red, 1 = green, 2 = blue + */ + public static toArithmeticRGBFromHSL(hue: number, saturation: number, lightness: number): number[] { + ColorUtils.validateHue(hue); + ColorUtils.validateSaturation(saturation); + ColorUtils.validateLightness(lightness); + + hue /= 60.0; + let t2: number; + if (lightness <= 0.5) { + t2 = lightness * (saturation + 1); + } else { + t2 = lightness + saturation - lightness * saturation; + } + const t1 = lightness * 2.0 - t2; + + const red = ColorUtils.hslConvert(t1, t2, hue + 2); + const green = ColorUtils.hslConvert(t1, t2, hue); + const blue = ColorUtils.hslConvert(t1, t2, hue - 2); + + return [red, green, blue]; + } + + /** + * Convert the arithmetic RGB float to a RBG integer or Convert the hex single color to a RBG integer + * + * @param color + * float color inclusively between 0.0 and 1.0 or hex single color in format FF or F + * + * @return integer color inclusively between 0 and 255 + */ + public static toRGB(color: string | number): number { + let colorNumber: number; + + if (typeof color === 'number') { + ColorUtils.validateArithmeticRGB(color); + colorNumber = Math.round(255 * color); + } else { + ColorUtils.validateHexSingle(color); + if (color.length === 1) { + color += color; + } + colorNumber = parseInt(color, 16); + } + + return colorNumber; + } + + /** + * Convert HSL (hue, saturation, and lightness) values to RGB integer values + * + * @param hue + * hue value inclusively between 0.0 and 360.0 + * @param saturation + * saturation inclusively between 0.0 and 1.0 + * @param lightness + * lightness inclusively between 0.0 and 1.0 + * @return RGB integer array where: 0 = red, 1 = green, 2 = blue + */ + public static toRGBFromHSL(hue: number, saturation: number, lightness: number): number[] { + const arithmeticRGB = ColorUtils.toArithmeticRGBFromHSL(hue, saturation, lightness); + const rgb = [ + ColorUtils.toRGB(arithmeticRGB[0]), + ColorUtils.toRGB(arithmeticRGB[1]), + ColorUtils.toRGB(arithmeticRGB[2]), + ]; + return rgb; + } + + /** + * HSL convert helper method + * + * @param t1 + * t1 + * @param t2 + * t2 + * @param hue + * hue + * @return arithmetic RBG value + */ + private static hslConvert(t1: number, t2: number, hue: number): number { + let value: number; + if (hue < 0) { + hue += 6; + } + if (hue >= 6) { + hue -= 6; + } + if (hue < 1) { + value = (t2 - t1) * hue + t1; + } else if (hue < 3) { + value = t2; + } else if (hue < 4) { + value = (t2 - t1) * (4 - hue) + t1; + } else { + value = t1; + } + return value; + } + + /** + * Get the hex single color + * + * @param hex + * hex color + * @param colorIndex + * red=0, green=1, blue=2, alpha=-1 + * @return hex single color in format FF or null + */ + private static getHexSingle(hex: string, colorIndex: number): string { + ColorUtils.validateHex(hex); + + if (hex.startsWith('#')) { + hex = hex.substring(1); + } + + let colorCharacters = 1; + let numColors = hex.length; + if (numColors > 4) { + colorCharacters++; + numColors /= 2; + } + + let color: any = null; + if (colorIndex >= 0 || numColors > 3) { + if (numColors > 3) { + colorIndex++; + } + let startIndex = colorIndex; + if (colorCharacters > 1) { + startIndex *= 2; + } + color = hex.substring(startIndex, startIndex + colorCharacters); + color = ColorUtils.expandShorthandHexSingle(color); + } + + return color; + } + + /** + * Get the red color from color integer or Get the hex red color from the hex string + * + * @param color + * color integer or hex color + * @return red color or hex red color in format RR + */ + public static getRed(color: string | number): string | number { + let red: number | string; + if (typeof color === 'number') { + red = (color >> 16) & 0xff; + } else { + red = ColorUtils.getHexSingle(color, 0); + } + + return red; + } + + /** + * Get the green color from color integer or Get the hex green color from the hex string + * + * @param color + * color integer or hex color + * @return green color or hex green color in format GG + */ + public static getGreen(color: string | number): string | number { + let green: number | string; + if (typeof color === 'number') { + green = (color >> 8) & 0xff; + } else { + green = ColorUtils.getHexSingle(color, 1); + } + + return green; + } + + /** + * Get the blue color from color integer or Get the hex blue color from the hex string + * + * @param color + * color integer or hex color + * @return blue color or hex blue color in format BB + */ + public static getBlue(color: string | number): string | number { + let blue: number | string; + if (typeof color === 'number') { + blue = color & 0xff; + } else { + blue = ColorUtils.getHexSingle(color, 2); + } + + return blue; + } + + /** + * Get the alpha color from color integer or Get the hex alpha color from the hex string if it exists + * + * @param color + * color integer or hex color + * @return alpha color or hex alpha color in format AA or null + */ + public static getAlpha(color: string | number): string | number { + let alpha: number | string | null = null; + if (typeof color === 'number') { + alpha = (color >> 24) & 0xff; + } else { + alpha = ColorUtils.getHexSingle(color, -1); + } + + return alpha; + } + + /** + * Shorthand the hex color if possible + * + * @param color + * hex color + * @return shorthand hex color or original value + */ + public static shorthandHex(color: string): string { + ColorUtils.validateHex(color); + if (color.length > 5) { + let shorthandColor: string | null = ''; + let startIndex = 0; + if (color.startsWith('#')) { + shorthandColor += '#'; + startIndex++; + } + for (; startIndex < color.length; startIndex += 2) { + const shorthand = ColorUtils.shorthandHexSingle(color.substring(startIndex, startIndex + 2)); + if (shorthand.length > 1) { + shorthandColor = null; + break; + } + shorthandColor += shorthand; + } + if (shorthandColor != null) { + color = shorthandColor.toString(); + } + } + + return color; + } + + /** + * Expand the hex if it is in shorthand + * + * @param color + * hex color + * @return expanded hex color or original value + */ + public static expandShorthandHex(color: string): string { + ColorUtils.validateHex(color); + if (color.length < 6) { + let expandColor = ''; + let startIndex = 0; + if (color.startsWith('#')) { + expandColor += '#'; + startIndex++; + } + for (; startIndex < color.length; startIndex++) { + const expand = ColorUtils.expandShorthandHexSingle(color.substring(startIndex, startIndex + 1)); + expandColor += expand; + } + color = expandColor.toString(); + } + return color; + } + + /** + * Shorthand the hex single color if possible + * + * @param color + * hex single color + * @return shorthand hex color or original value + */ + public static shorthandHexSingle(color: string): string { + ColorUtils.validateHexSingle(color); + if (color.length > 1 && color.charAt(0).toUpperCase() === color.charAt(1).toUpperCase()) { + color = color.substring(0, 1); + } + return color; + } + + /** + * Expand the hex single if it is in shorthand + * + * @param color + * hex single color + * @return expanded hex color or original value + */ + public static expandShorthandHexSingle(color: string): string { + ColorUtils.validateHexSingle(color); + if (color.length === 1) { + color += color; + } + return color; + } + + /** + * Check if the hex color value is valid + * + * @param color + * hex color + * @return true if valid + */ + public static isValidHex(color: string | null): boolean { + return color !== null && ColorUtils.hexColorPattern.test(color); + } + + /** + * Validate the hex color value + * + * @param color + * hex color + */ + public static validateHex(color: string) { + if (!ColorUtils.isValidHex(color)) { + throw new Error( + 'Hex color must be in format #RRGGBB, #RGB, #AARRGGBB, #ARGB, RRGGBB, RGB, AARRGGBB, or ARGB, invalid value: ' + + color, + ); + } + } + + /** + * Check if the hex single color value is valid + * + * @param color + * hex single color + * @return true if valid + */ + public static isValidHexSingle(color: string | null): boolean { + return color !== null && ColorUtils.hexSingleColorPattern.test(color); + } + + /** + * Validate the hex single color value + * + * @param color + * hex single color + */ + public static validateHexSingle(color: string) { + if (!ColorUtils.isValidHexSingle(color)) { + throw new Error('Must be in format FF or F, invalid value: ' + color); + } + } + + /** + * Check if the RBG integer color is valid, inclusively between 0 and 255 + * + * @param color + * decimal color + * @return true if valid + */ + public static isValidRGB(color: number): boolean { + return color >= 0 && color <= 255; + } + + /** + * Validate the RBG integer color is inclusively between 0 and 255 + * + * @param color + * decimal color + */ + public static validateRGB(color: number) { + if (!ColorUtils.isValidRGB(color)) { + throw new Error('Must be inclusively between 0 and 255, invalid value: ' + color); + } + } + + /** + * Check if the arithmetic RGB float color is valid, inclusively between 0.0 + * and 1.0 + * + * @param color + * decimal color + * @return true if valid + */ + public static isValidArithmeticRGB(color: number): boolean { + return color >= 0.0 && color <= 1.0; + } + + /** + * Validate the arithmetic RGB float color is inclusively between 0.0 and + * 1.0 + * + * @param color + * decimal color + */ + public static validateArithmeticRGB(color: number) { + if (!ColorUtils.isValidArithmeticRGB(color)) { + throw new Error('Must be inclusively between 0.0 and 1.0, invalid value: ' + color); + } + } + + /** + * Check if the HSL hue float value is valid, inclusively between 0.0 and + * 360.0 + * + * @param hue + * hue value + * @return true if valid + */ + public static isValidHue(hue: number): boolean { + return hue >= 0.0 && hue <= 360.0; + } + + /** + * Validate the HSL hue float value is inclusively between 0.0 and 360.0 + * + * @param hue + * hue value + */ + public static validateHue(hue: number) { + if (!ColorUtils.isValidHue(hue)) { + throw new Error('Must be inclusively between 0.0 and 360.0, invalid value: ' + hue); + } + } + + /** + * Check if the HSL saturation float value is valid, inclusively between 0.0 + * and 1.0 + * + * @param saturation + * saturation value + * @return true if valid + */ + public static isValidSaturation(saturation: number): boolean { + return saturation >= 0.0 && saturation <= 1.0; + } + + /** + * Validate the HSL saturation float value is inclusively between 0.0 and + * 1.0 + * + * @param saturation + * saturation value + */ + public static validateSaturation(saturation: number) { + if (!ColorUtils.isValidSaturation(saturation)) { + throw new Error('Must be inclusively between 0.0 and 1.0, invalid value: ' + saturation); + } + } + + /** + * Check if the HSL lightness float value is valid, inclusively between 0.0 + * and 1.0 + * + * @param lightness + * lightness value + * @return true if valid + */ + public static isValidLightness(lightness: number): boolean { + return lightness >= 0.0 && lightness <= 1.0; + } + + /** + * Validate the HSL lightness float value is inclusively between 0.0 and 1.0 + * + * @param lightness + * lightness value + */ + public static validateLightness(lightness: number) { + if (!ColorUtils.isValidLightness(lightness)) { + throw new Error('Must be inclusively between 0.0 and 1.0, invalid value: ' + lightness); + } + } +} diff --git a/test/ColorTest.ts b/test/ColorTest.ts index 9d669a5..d333d23 100644 --- a/test/ColorTest.ts +++ b/test/ColorTest.ts @@ -1,302 +1,381 @@ -import { Color } from '../dist/Color'; -import { ColorConstants } from '../dist/ColorConstants'; -import { ColorUtils } from '../dist/ColorUtils'; +import { Color } from '../src/Color'; +import { ColorConstants } from '../src/ColorConstants'; +import { ColorUtils } from '../src/ColorUtils'; import { expect } from 'chai'; describe('Color Tests', function () { + it('test color creation', function () { + const color = new Color(); - it('test color creation', function () { - const color = new Color(); - - // Default color, opaque black - validateColor(color, 0, "#000000", "#000", 0, 0, 0, 0.0, 0.0, 0.0); - - color.setRed(64); - validateColor(color, 0x400000, "#400000", "#400000", 64, 0, 0, 0.0, - 1.0, 0.13); - color.setRed(128 / 255.0); - validateColor(color, 0x800000, "#800000", "#800000", 128, 0, 0, 0.0, - 1.0, 0.25); - color.setRed("C0"); - validateColor(color, 0xC00000, "#C00000", "#C00000", 192, 0, 0, 0.0, - 1.0, 0.38); - color.setRed(0xFF); - validateColor(color, 0xFF0000, "#FF0000", "#F00", 255, 0, 0, 0.0, 1.0, - 0.5); - expect(color.isOpaque()).to.be.true; - - color.setGreen(64); - validateColor(color, 0xFF4000, "#FF4000", "#FF4000", 255, 64, 0, 15.1, - 1.0, 0.5); - color.setGreen(128 / 255.0); - validateColor(color, 0xFF8000, "#FF8000", "#FF8000", 255, 128, 0, 30.1, - 1.0, 0.5); - color.setGreen("c0"); - validateColor(color, 0xFFC000, "#FFC000", "#FFC000", 255, 192, 0, 45.2, - 1.0, 0.5); - color.setGreen(0xFF); - validateColor(color, 0xFFFF00, "#FFFF00", "#FF0", 255, 255, 0, 60.0, - 1.0, 0.5); - expect(color.isOpaque()).to.be.true; - - color.setBlue(64); - validateColor(color, 0xFFFF40, "#FFFF40", "#FFFF40", 255, 255, 64, - 60.0, 1.0, 0.63); - color.setBlue(128 / 255.0); - validateColor(color, 0xFFFF80, "#FFFF80", "#FFFF80", 255, 255, 128, - 60.0, 1.0, 0.75); - color.setBlue("C0"); - validateColor(color, 0xFFFFC0, "#FFFFC0", "#FFFFC0", 255, 255, 192, - 60.0, 1.0, 0.88); - color.setBlue(0xFF); - validateColor(color, 0xFFFFFF, "#FFFFFF", "#FFF", 255, 255, 255, 0.0, - 0.0, 1.0); - expect(color.isOpaque()).to.be.true; - - color.setAlpha(64); - validateColor2(color, 0xFFFFFF, 0x40FFFFFF, "#FFFFFF", "#FFF", - "#40FFFFFF", "#40FFFFFF", 255, 255, 255, 64, 0.0, 0.0, 1.0); - expect(color.isOpaque()).to.be.false; - color.setOpacity(0.5); - validateColor3(color, 0xFFFFFF, 0x80FFFFFF, "#FFFFFF", "#FFF", - "#80FFFFFF", "#80FFFFFF", 255, 255, 255, 128, 0.5, 0.0, 0.0, - 1.0); - expect(color.isOpaque()).to.be.false; - color.setAlpha("C0"); - validateColor2(color, 0xFFFFFF, 0xC0FFFFFF, "#FFFFFF", "#FFF", - "#C0FFFFFF", "#C0FFFFFF", 255, 255, 255, 192, 0.0, 0.0, 1.0); - expect(color.isOpaque()).to.be.false; - color.setAlpha(0xFF); - validateColor2(color, 0xFFFFFF, 0xFFFFFFFF, "#FFFFFF", "#FFF", - "#FFFFFFFF", "#FFFF", 255, 255, 255, 255, 0.0, 0.0, 1.0); - expect(color.isOpaque()).to.be.true; - }); - - it('test color hex constants', function () { - let color = new Color(); - color.setColor(ColorConstants.BLACK); - validateColor(color, 0, "#000000", "#000", 0, - 0, 0, 0.0, 0.0, 0.0); - color = new Color(); - color.setColor(ColorConstants.BLUE); - validateColor(color, 255, "#0000FF", "#00F", 0, - 0, 255, 240.0, 1.0, 0.5); - color = new Color(); - color.setColor(ColorConstants.BROWN); - validateColor(color, 10824234, "#A52A2A", - "#A52A2A", 165, 42, 42, 0.0, 0.59, 0.41); - color = new Color(); - color.setColor(ColorConstants.CYAN); - validateColor(color, 65535, "#00FFFF", "#0FF", - 0, 255, 255, 180.0, 1.0, 0.5); - color = new Color(); - color.setColor(ColorConstants.DKGRAY); - validateColor(color, 4473924, "#444444", - "#444", 68, 68, 68, 0.0, 0.0, 0.27); - color = new Color(); - color.setColor(ColorConstants.GRAY); - validateColor(color, 8947848, "#888888", - "#888", 136, 136, 136, 0.0, 0.0, 0.53); - color = new Color(); - color.setColor(ColorConstants.GREEN); - validateColor(color, 65280, "#00FF00", "#0F0", - 0, 255, 0, 120.0, 1.0, 0.5); - color = new Color(); - color.setColor(ColorConstants.LTGRAY); - validateColor(color, 13421772, "#CCCCCC", - "#CCC", 204, 204, 204, 0.0, 0.0, 0.8); - color = new Color(); - color.setColor(ColorConstants.MAGENTA); - validateColor(color, 16711935, "#FF00FF", - "#F0F", 255, 0, 255, 300.0, 1.0, 0.5); - color = new Color(); - color.setColor(ColorConstants.ORANGE); - validateColor(color, 16753920, "#FFA500", - "#FFA500", 255, 165, 0, 39.0, 1.0, 0.5); - color = new Color(); - color.setColor(ColorConstants.PINK); - validateColor(color, 16761035, "#FFC0CB", - "#FFC0CB", 255, 192, 203, 350.0, 1.0, 0.88); - color = new Color(); - color.setColor(ColorConstants.PURPLE); - validateColor(color, 8388736, "#800080", - "#800080", 128, 0, 128, 300.0, 1.0, 0.25); - color = new Color(); - color.setColor(ColorConstants.RED); - validateColor(color, 16711680, "#FF0000", - "#F00", 255, 0, 0, 0.0, 1.0, 0.5); - color = new Color(); - color.setColor(ColorConstants.VIOLET); - validateColor(color, 15631086, "#EE82EE", - "#EE82EE", 238, 130, 238, 300.0, 0.76, 0.72); - color = new Color(); - color.setColor(ColorConstants.WHITE); - validateColor(color, 16777215, "#FFFFFF", - "#FFF", 255, 255, 255, 0.0, 0.0, 1.0); - color = new Color(); - color.setColor(ColorConstants.YELLOW); - validateColor(color, 16776960, "#FFFF00", - "#FF0", 255, 255, 0, 60.0, 1.0, 0.5); + // Default color, opaque black + validateColor(color, 0, '#000000', '#000', 0, 0, 0, 0.0, 0.0, 0.0); - color = new Color(); - color.setColor(ColorConstants.BLACK); - color.setOpacity(0.5); - validateColor3(color, 0, - Number.MIN_SAFE_INTEGER, "#000000", "#000", "#80000000", "#80000000", - 0, 0, 0, 128, 0.5, 0.0, 0.0, 0.0); - color = new Color(); - color.setColor(ColorConstants.ORANGE); - color.setOpacity(0.25); - validateColor3(color, 16753920, - 1090495744, "#FFA500", "#FFA500", "#40FFA500", "#40FFA500", 255, - 165, 0, 64, 0.25, 39.0, 1.0, 0.5); - color = new Color(); - color.setColor(ColorConstants.YELLOW); - color.setOpacity(0.85); - validateColor3(color, 16776960, - -637534464, "#FFFF00", "#FF0", "#D9FFFF00", "#D9FFFF00", 255, - 255, 0, 217, 0.85, 60.0, 1.0, 0.5); + color.setRed(64); + validateColor(color, 0x400000, '#400000', '#400000', 64, 0, 0, 0.0, 1.0, 0.13); + color.setRed(128 / 255.0); + validateColor(color, 0x800000, '#800000', '#800000', 128, 0, 0, 0.0, 1.0, 0.25); + color.setRed('C0'); + validateColor(color, 0xc00000, '#C00000', '#C00000', 192, 0, 0, 0.0, 1.0, 0.38); + color.setRed(0xff); + validateColor(color, 0xff0000, '#FF0000', '#F00', 255, 0, 0, 0.0, 1.0, 0.5); + expect(color.isOpaque()).to.be.true; - color = new Color(); - color.setColor("#80000000"); - validateColor2(color, 0, Number.MIN_SAFE_INTEGER, "#000000", - "#000", "#80000000", "#80000000", 0, 0, 0, 128, 0.0, 0.0, - 0.0); - color = new Color(); - color.setColor("#40FFA500"); - validateColor2(color, 16753920, 1090495744, "#FFA500", - "#FFA500", "#40FFA500", "#40FFA500", 255, 165, 0, 64, 39.0, - 1.0, 0.5); - color = new Color(); - color.setColor("#D9FFFF00"); - validateColor2(color, 16776960, -637534464, "#FFFF00", - "#FF0", "#D9FFFF00", "#D9FFFF00", 255, 255, 0, 217, 60.0, 1.0, - 0.5); - }); - - it('test color integers', function () { - let color = new Color(); - color.setColor(0); - validateColor(color, 0, "#000000", "#000", 0, 0, 0, 0.0, 0.0, - 0.0); - color = new Color(); - color.setColor(255); - validateColor(color, 255, "#0000FF", "#00F", 0, 0, 255, 240.0, - 1.0, 0.5); - color = new Color(); - color.setColor(10824234); - validateColor(color, 10824234, "#A52A2A", "#A52A2A", 165, - 42, 42, 0.0, 0.59, 0.41); - color = new Color(); - color.setColor(65535); - validateColor(color, 65535, "#00FFFF", "#0FF", 0, 255, 255, - 180.0, 1.0, 0.5); - color = new Color(); - color.setColor(4473924); - validateColor(color, 4473924, "#444444", "#444", 68, 68, - 68, 0.0, 0.0, 0.27); - color = new Color(); - color.setColor(8947848); - validateColor(color, 8947848, "#888888", "#888", 136, 136, - 136, 0.0, 0.0, 0.53); - color = new Color(); - color.setColor(65280); - validateColor(color, 65280, "#00FF00", "#0F0", 0, 255, 0, - 120.0, 1.0, 0.5); - color = new Color(); - color.setColor(13421772); - validateColor(color, 13421772, "#CCCCCC", "#CCC", 204, - 204, 204, 0.0, 0.0, 0.8); - color = new Color(); - color.setColor(16711935); - validateColor(color, 16711935, "#FF00FF", "#F0F", 255, 0, - 255, 300.0, 1.0, 0.5); - color = new Color(); - color.setColor(16753920); - validateColor(color, 16753920, "#FFA500", "#FFA500", 255, - 165, 0, 39.0, 1.0, 0.5); - color = new Color(); - color.setColor(16761035); - validateColor(color, 16761035, "#FFC0CB", "#FFC0CB", 255, - 192, 203, 350.0, 1.0, 0.88); - color = new Color(); - color.setColor(8388736); - validateColor(color, 8388736, "#800080", "#800080", 128, 0, - 128, 300.0, 1.0, 0.25); - color = new Color(); - color.setColor(16711680); - validateColor(color, 16711680, "#FF0000", "#F00", 255, 0, - 0, 0.0, 1.0, 0.5); - color = new Color(); - color.setColor(15631086); - validateColor(color, 15631086, "#EE82EE", "#EE82EE", 238, - 130, 238, 300.0, 0.76, 0.72); - color = new Color(); - color.setColor(16777215); - validateColor(color, 16777215, "#FFFFFF", "#FFF", 255, - 255, 255, 0.0, 0.0, 1.0); - color = new Color(); - color.setColor(16776960); - validateColor(color, 16776960, "#FFFF00", "#FF0", 255, - 255, 0, 60.0, 1.0, 0.5); - }); - - it('test color alpha integers', function () { - let color = new Color(); - color.setColor(-16777216); - validateColor(color, 0, "#000000", "#000", 0, 0, 0, 0.0, - 0.0, 0.0); - color = new Color(); - color.setColor(-16776961); - validateColor(color, 255, "#0000FF", "#00F", 0, 0, 255, - 240.0, 1.0, 0.5); - color = new Color(); - color.setColor(-5952982); - validateColor(color, 10824234, "#A52A2A", "#A52A2A", 165, - 42, 42, 0.0, 0.59, 0.41); - color = new Color(); - color.setColor(-16711681); - validateColor(color, 65535, "#00FFFF", "#0FF", 0, 255, - 255, 180.0, 1.0, 0.5); - color = new Color(); - color.setColor(-12303292); - validateColor(color, 4473924, "#444444", "#444", 68, 68, - 68, 0.0, 0.0, 0.27); - color = new Color(); - color.setColor(-7829368); - validateColor(color, 8947848, "#888888", "#888", 136, 136, - 136, 0.0, 0.0, 0.53); - color = new Color(); - color.setColor(-16711936); - validateColor(color, 65280, "#00FF00", "#0F0", 0, 255, 0, - 120.0, 1.0, 0.5); - color = new Color(); - color.setColor(-3355444); - validateColor(color, 13421772, "#CCCCCC", "#CCC", 204, - 204, 204, 0.0, 0.0, 0.8); - color = new Color(); - color.setColor(-65281); - validateColor(color, 16711935, "#FF00FF", "#F0F", 255, 0, - 255, 300.0, 1.0, 0.5); - color = new Color(); - color.setColor(-23296); - validateColor(color, 16753920, "#FFA500", "#FFA500", 255, - 165, 0, 39.0, 1.0, 0.5); - color = new Color(); - color.setColor(-16181); - validateColor(color, 16761035, "#FFC0CB", "#FFC0CB", 255, - 192, 203, 350.0, 1.0, 0.88); - color = new Color(); - color.setColor(-8388480); - validateColor(color, 8388736, "#800080", "#800080", 128, - 0, 128, 300.0, 1.0, 0.25); - color = new Color(); - color.setColor(-65536); - validateColor(color, 16711680, "#FF0000", "#F00", 255, 0, 0, - 0.0, 1.0, 0.5); + color.setGreen(64); + validateColor(color, 0xff4000, '#FF4000', '#FF4000', 255, 64, 0, 15.1, 1.0, 0.5); + color.setGreen(128 / 255.0); + validateColor(color, 0xff8000, '#FF8000', '#FF8000', 255, 128, 0, 30.1, 1.0, 0.5); + color.setGreen('c0'); + validateColor(color, 0xffc000, '#FFC000', '#FFC000', 255, 192, 0, 45.2, 1.0, 0.5); + color.setGreen(0xff); + validateColor(color, 0xffff00, '#FFFF00', '#FF0', 255, 255, 0, 60.0, 1.0, 0.5); + expect(color.isOpaque()).to.be.true; - //TODO fix - /*color = new Color(); + color.setBlue(64); + validateColor(color, 0xffff40, '#FFFF40', '#FFFF40', 255, 255, 64, 60.0, 1.0, 0.63); + color.setBlue(128 / 255.0); + validateColor(color, 0xffff80, '#FFFF80', '#FFFF80', 255, 255, 128, 60.0, 1.0, 0.75); + color.setBlue('C0'); + validateColor(color, 0xffffc0, '#FFFFC0', '#FFFFC0', 255, 255, 192, 60.0, 1.0, 0.88); + color.setBlue(0xff); + validateColor(color, 0xffffff, '#FFFFFF', '#FFF', 255, 255, 255, 0.0, 0.0, 1.0); + expect(color.isOpaque()).to.be.true; + + color.setAlpha(64); + validateColor2( + color, + 0xffffff, + 0x40ffffff, + '#FFFFFF', + '#FFF', + '#40FFFFFF', + '#40FFFFFF', + 255, + 255, + 255, + 64, + 0.0, + 0.0, + 1.0, + ); + expect(color.isOpaque()).to.be.false; + color.setOpacity(0.5); + validateColor3( + color, + 0xffffff, + 0x80ffffff, + '#FFFFFF', + '#FFF', + '#80FFFFFF', + '#80FFFFFF', + 255, + 255, + 255, + 128, + 0.5, + 0.0, + 0.0, + 1.0, + ); + expect(color.isOpaque()).to.be.false; + color.setAlpha('C0'); + validateColor2( + color, + 0xffffff, + 0xc0ffffff, + '#FFFFFF', + '#FFF', + '#C0FFFFFF', + '#C0FFFFFF', + 255, + 255, + 255, + 192, + 0.0, + 0.0, + 1.0, + ); + expect(color.isOpaque()).to.be.false; + color.setAlpha(0xff); + validateColor2( + color, + 0xffffff, + 0xffffffff, + '#FFFFFF', + '#FFF', + '#FFFFFFFF', + '#FFFF', + 255, + 255, + 255, + 255, + 0.0, + 0.0, + 1.0, + ); + expect(color.isOpaque()).to.be.true; + }); + + it('test color hex constants', function () { + let color = new Color(); + color.setColor(ColorConstants.BLACK); + validateColor(color, 0, '#000000', '#000', 0, 0, 0, 0.0, 0.0, 0.0); + color = new Color(); + color.setColor(ColorConstants.BLUE); + validateColor(color, 255, '#0000FF', '#00F', 0, 0, 255, 240.0, 1.0, 0.5); + color = new Color(); + color.setColor(ColorConstants.BROWN); + validateColor(color, 10824234, '#A52A2A', '#A52A2A', 165, 42, 42, 0.0, 0.59, 0.41); + color = new Color(); + color.setColor(ColorConstants.CYAN); + validateColor(color, 65535, '#00FFFF', '#0FF', 0, 255, 255, 180.0, 1.0, 0.5); + color = new Color(); + color.setColor(ColorConstants.DKGRAY); + validateColor(color, 4473924, '#444444', '#444', 68, 68, 68, 0.0, 0.0, 0.27); + color = new Color(); + color.setColor(ColorConstants.GRAY); + validateColor(color, 8947848, '#888888', '#888', 136, 136, 136, 0.0, 0.0, 0.53); + color = new Color(); + color.setColor(ColorConstants.GREEN); + validateColor(color, 65280, '#00FF00', '#0F0', 0, 255, 0, 120.0, 1.0, 0.5); + color = new Color(); + color.setColor(ColorConstants.LTGRAY); + validateColor(color, 13421772, '#CCCCCC', '#CCC', 204, 204, 204, 0.0, 0.0, 0.8); + color = new Color(); + color.setColor(ColorConstants.MAGENTA); + validateColor(color, 16711935, '#FF00FF', '#F0F', 255, 0, 255, 300.0, 1.0, 0.5); + color = new Color(); + color.setColor(ColorConstants.ORANGE); + validateColor(color, 16753920, '#FFA500', '#FFA500', 255, 165, 0, 39.0, 1.0, 0.5); + color = new Color(); + color.setColor(ColorConstants.PINK); + validateColor(color, 16761035, '#FFC0CB', '#FFC0CB', 255, 192, 203, 350.0, 1.0, 0.88); + color = new Color(); + color.setColor(ColorConstants.PURPLE); + validateColor(color, 8388736, '#800080', '#800080', 128, 0, 128, 300.0, 1.0, 0.25); + color = new Color(); + color.setColor(ColorConstants.RED); + validateColor(color, 16711680, '#FF0000', '#F00', 255, 0, 0, 0.0, 1.0, 0.5); + color = new Color(); + color.setColor(ColorConstants.VIOLET); + validateColor(color, 15631086, '#EE82EE', '#EE82EE', 238, 130, 238, 300.0, 0.76, 0.72); + color = new Color(); + color.setColor(ColorConstants.WHITE); + validateColor(color, 16777215, '#FFFFFF', '#FFF', 255, 255, 255, 0.0, 0.0, 1.0); + color = new Color(); + color.setColor(ColorConstants.YELLOW); + validateColor(color, 16776960, '#FFFF00', '#FF0', 255, 255, 0, 60.0, 1.0, 0.5); + + color = new Color(); + color.setColor(ColorConstants.BLACK); + color.setOpacity(0.5); + validateColor3( + color, + 0, + Number.MIN_SAFE_INTEGER, + '#000000', + '#000', + '#80000000', + '#80000000', + 0, + 0, + 0, + 128, + 0.5, + 0.0, + 0.0, + 0.0, + ); + color = new Color(); + color.setColor(ColorConstants.ORANGE); + color.setOpacity(0.25); + validateColor3( + color, + 16753920, + 1090495744, + '#FFA500', + '#FFA500', + '#40FFA500', + '#40FFA500', + 255, + 165, + 0, + 64, + 0.25, + 39.0, + 1.0, + 0.5, + ); + color = new Color(); + color.setColor(ColorConstants.YELLOW); + color.setOpacity(0.85); + validateColor3( + color, + 16776960, + -637534464, + '#FFFF00', + '#FF0', + '#D9FFFF00', + '#D9FFFF00', + 255, + 255, + 0, + 217, + 0.85, + 60.0, + 1.0, + 0.5, + ); + + color = new Color(); + color.setColor('#80000000'); + validateColor2( + color, + 0, + Number.MIN_SAFE_INTEGER, + '#000000', + '#000', + '#80000000', + '#80000000', + 0, + 0, + 0, + 128, + 0.0, + 0.0, + 0.0, + ); + color = new Color(); + color.setColor('#40FFA500'); + validateColor2( + color, + 16753920, + 1090495744, + '#FFA500', + '#FFA500', + '#40FFA500', + '#40FFA500', + 255, + 165, + 0, + 64, + 39.0, + 1.0, + 0.5, + ); + color = new Color(); + color.setColor('#D9FFFF00'); + validateColor2( + color, + 16776960, + -637534464, + '#FFFF00', + '#FF0', + '#D9FFFF00', + '#D9FFFF00', + 255, + 255, + 0, + 217, + 60.0, + 1.0, + 0.5, + ); + }); + + it('test color integers', function () { + let color = new Color(); + color.setColor(0); + validateColor(color, 0, '#000000', '#000', 0, 0, 0, 0.0, 0.0, 0.0); + color = new Color(); + color.setColor(255); + validateColor(color, 255, '#0000FF', '#00F', 0, 0, 255, 240.0, 1.0, 0.5); + color = new Color(); + color.setColor(10824234); + validateColor(color, 10824234, '#A52A2A', '#A52A2A', 165, 42, 42, 0.0, 0.59, 0.41); + color = new Color(); + color.setColor(65535); + validateColor(color, 65535, '#00FFFF', '#0FF', 0, 255, 255, 180.0, 1.0, 0.5); + color = new Color(); + color.setColor(4473924); + validateColor(color, 4473924, '#444444', '#444', 68, 68, 68, 0.0, 0.0, 0.27); + color = new Color(); + color.setColor(8947848); + validateColor(color, 8947848, '#888888', '#888', 136, 136, 136, 0.0, 0.0, 0.53); + color = new Color(); + color.setColor(65280); + validateColor(color, 65280, '#00FF00', '#0F0', 0, 255, 0, 120.0, 1.0, 0.5); + color = new Color(); + color.setColor(13421772); + validateColor(color, 13421772, '#CCCCCC', '#CCC', 204, 204, 204, 0.0, 0.0, 0.8); + color = new Color(); + color.setColor(16711935); + validateColor(color, 16711935, '#FF00FF', '#F0F', 255, 0, 255, 300.0, 1.0, 0.5); + color = new Color(); + color.setColor(16753920); + validateColor(color, 16753920, '#FFA500', '#FFA500', 255, 165, 0, 39.0, 1.0, 0.5); + color = new Color(); + color.setColor(16761035); + validateColor(color, 16761035, '#FFC0CB', '#FFC0CB', 255, 192, 203, 350.0, 1.0, 0.88); + color = new Color(); + color.setColor(8388736); + validateColor(color, 8388736, '#800080', '#800080', 128, 0, 128, 300.0, 1.0, 0.25); + color = new Color(); + color.setColor(16711680); + validateColor(color, 16711680, '#FF0000', '#F00', 255, 0, 0, 0.0, 1.0, 0.5); + color = new Color(); + color.setColor(15631086); + validateColor(color, 15631086, '#EE82EE', '#EE82EE', 238, 130, 238, 300.0, 0.76, 0.72); + color = new Color(); + color.setColor(16777215); + validateColor(color, 16777215, '#FFFFFF', '#FFF', 255, 255, 255, 0.0, 0.0, 1.0); + color = new Color(); + color.setColor(16776960); + validateColor(color, 16776960, '#FFFF00', '#FF0', 255, 255, 0, 60.0, 1.0, 0.5); + }); + + it('test color alpha integers', function () { + let color = new Color(); + color.setColor(-16777216); + validateColor(color, 0, '#000000', '#000', 0, 0, 0, 0.0, 0.0, 0.0); + color = new Color(); + color.setColor(-16776961); + validateColor(color, 255, '#0000FF', '#00F', 0, 0, 255, 240.0, 1.0, 0.5); + color = new Color(); + color.setColor(-5952982); + validateColor(color, 10824234, '#A52A2A', '#A52A2A', 165, 42, 42, 0.0, 0.59, 0.41); + color = new Color(); + color.setColor(-16711681); + validateColor(color, 65535, '#00FFFF', '#0FF', 0, 255, 255, 180.0, 1.0, 0.5); + color = new Color(); + color.setColor(-12303292); + validateColor(color, 4473924, '#444444', '#444', 68, 68, 68, 0.0, 0.0, 0.27); + color = new Color(); + color.setColor(-7829368); + validateColor(color, 8947848, '#888888', '#888', 136, 136, 136, 0.0, 0.0, 0.53); + color = new Color(); + color.setColor(-16711936); + validateColor(color, 65280, '#00FF00', '#0F0', 0, 255, 0, 120.0, 1.0, 0.5); + color = new Color(); + color.setColor(-3355444); + validateColor(color, 13421772, '#CCCCCC', '#CCC', 204, 204, 204, 0.0, 0.0, 0.8); + color = new Color(); + color.setColor(-65281); + validateColor(color, 16711935, '#FF00FF', '#F0F', 255, 0, 255, 300.0, 1.0, 0.5); + color = new Color(); + color.setColor(-23296); + validateColor(color, 16753920, '#FFA500', '#FFA500', 255, 165, 0, 39.0, 1.0, 0.5); + color = new Color(); + color.setColor(-16181); + validateColor(color, 16761035, '#FFC0CB', '#FFC0CB', 255, 192, 203, 350.0, 1.0, 0.88); + color = new Color(); + color.setColor(-8388480); + validateColor(color, 8388736, '#800080', '#800080', 128, 0, 128, 300.0, 1.0, 0.25); + color = new Color(); + color.setColor(-65536); + validateColor(color, 16711680, '#FF0000', '#F00', 255, 0, 0, 0.0, 1.0, 0.5); + + //TODO fix + /*color = new Color(); color.setColor(-65536); validateColor(color, 15631086, "#EE82EE", "#EE82EE", 238, 130, 238, 300.0, 0.7, 0.72); @@ -329,571 +408,858 @@ describe('Color Tests', function () { validateColor3(color, 16777215, -1, "#FFFFFF", "#FFF", "#FFFFFFFF", "#FFFF", 255, 255, 255, 255, 1.0, 0.0, 0.0, 1.0);*/ - }); + }); - it('test color hex integers', function () { - let color = new Color() - color.setColor(0x000000); - validateColor(color, 0, "#000000", "#000", 0, 0, 0, 0.0, - 0.0, 0.0); - color = new Color() - color.setColor(0x0000FF); - validateColor(color, 255, "#0000FF", "#00F", 0, 0, 255, - 240.0, 1.0, 0.5); - color = new Color() - color.setColor(0xA52A2A); - validateColor(color, 10824234, "#A52A2A", "#A52A2A", 165, - 42, 42, 0.0, 0.59, 0.41); - color = new Color() - color.setColor(0x00FFFF); - validateColor(color, 65535, "#00FFFF", "#0FF", 0, 255, - 255, 180.0, 1.0, 0.5); - color = new Color() - color.setColor(0x444444); - validateColor(color, 4473924, "#444444", "#444", 68, 68, - 68, 0.0, 0.0, 0.27); - color = new Color() - color.setColor(0x888888); - validateColor(color, 8947848, "#888888", "#888", 136, 136, - 136, 0.0, 0.0, 0.53); - color = new Color() - color.setColor(0x00FF00); - validateColor(color, 65280, "#00FF00", "#0F0", 0, 255, 0, - 120.0, 1.0, 0.5); - color = new Color() - color.setColor(0xCCCCCC); - validateColor(color, 13421772, "#CCCCCC", "#CCC", 204, - 204, 204, 0.0, 0.0, 0.8); - color = new Color() - color.setColor(0xFF00FF); - validateColor(color, 16711935, "#FF00FF", "#F0F", 255, 0, - 255, 300.0, 1.0, 0.5); - color = new Color() - color.setColor(0xFFA500); - validateColor(color, 16753920, "#FFA500", "#FFA500", 255, - 165, 0, 39.0, 1.0, 0.5); - color = new Color() - color.setColor(0xFFC0CB); - validateColor(color, 16761035, "#FFC0CB", "#FFC0CB", 255, - 192, 203, 350.0, 1.0, 0.88); - color = new Color() - color.setColor(0x800080); - validateColor(color, 8388736, "#800080", "#800080", 128, - 0, 128, 300.0, 1.0, 0.25); - color = new Color() - color.setColor(0xFF0000); - validateColor(color, 16711680, "#FF0000", "#F00", 255, 0, - 0, 0.0, 1.0, 0.5); - color = new Color() - color.setColor(0xEE82EE); - validateColor(color, 15631086, "#EE82EE", "#EE82EE", 238, - 130, 238, 300.0, 0.76, 0.72); - color = new Color() - color.setColor(0xFFFFFF); - validateColor(color, 16777215, "#FFFFFF", "#FFF", 255, - 255, 255, 0.0, 0.0, 1.0); - color = new Color() - color.setColor(0xFFFF00); - validateColor(color, 16776960, "#FFFF00", "#FF0", 255, - 255, 0, 60.0, 1.0, 0.5); - - color = new Color() - color.setColor(0x80000000); - validateColor2(color, 0, Number.MIN_SAFE_INTEGER, "#000000", - "#000", "#80000000", "#80000000", 0, 0, 0, 128, 0.0, 0.0, - 0.0); - color = new Color() - color.setColor(0x40FFA500); - validateColor2(color, 16753920, 1090495744, "#FFA500", - "#FFA500", "#40FFA500", "#40FFA500", 255, 165, 0, 64, 39.0, - 1.0, 0.5); - color = new Color() - color.setColor(0xD9FFFF00); - validateColor2(color, 16776960, -637534464, "#FFFF00", - "#FF0", "#D9FFFF00", "#D9FFFF00", 255, 255, 0, 217, 60.0, 1.0, - 0.5); - - color = new Color() - color.setColor(0x80000000); - validateColor2(color, 0, Number.MIN_SAFE_INTEGER, "#000000", - "#000", "#80000000", "#80000000", 0, 0, 0, 128, 0.0, 0.0, - 0.0); - color = new Color() - color.setColor(0x40FFA500); - validateColor2(color, 16753920, 1090495744, "#FFA500", - "#FFA500", "#40FFA500", "#40FFA500", 255, 165, 0, 64, 39.0, - 1.0, 0.5); - color = new Color() - color.setColor(0xD9FFFF00); - validateColor2(color, 16776960, -637534464, "#FFFF00", - "#FF0", "#D9FFFF00", "#D9FFFF00", 255, 255, 0, 217, 60.0, 1.0, - 0.5); - }); - - it('test color RGB', function () { - let color = new Color(); - color.setRGB(0, 0, 0); - validateColor(color, 0, "#000000", "#000", 0, 0, 0, 0.0, - 0.0, 0.0); - color = new Color(); - color.setRGB(0, 0, 255); - validateColor(color, 255, "#0000FF", "#00F", 0, 0, 255, - 240.0, 1.0, 0.5); - color = new Color(); - color.setRGB(165, 42, 42); - validateColor(color, 10824234, "#A52A2A", "#A52A2A", - 165, 42, 42, 0.0, 0.59, 0.41); - color = new Color(); - color.setRGB(0, 255, 255); - validateColor(color, 65535, "#00FFFF", "#0FF", 0, 255, - 255, 180.0, 1.0, 0.5); - color = new Color(); - color.setRGB(68, 68, 68); - validateColor(color, 4473924, "#444444", "#444", 68, 68, - 68, 0.0, 0.0, 0.27); - color = new Color(); - color.setRGB(136, 136, 136); - validateColor(color, 8947848, "#888888", "#888", 136, - 136, 136, 0.0, 0.0, 0.53); - color = new Color(); - color.setRGB(0, 255, 0); - validateColor(color, 65280, "#00FF00", "#0F0", 0, 255, 0, - 120.0, 1.0, 0.5); - color = new Color(); - color.setRGB(204, 204, 204); - validateColor(color, 13421772, "#CCCCCC", "#CCC", - 204, 204, 204, 0.0, 0.0, 0.8); - color = new Color(); - color.setRGB(255, 0, 255); - validateColor(color, 16711935, "#FF00FF", "#F0F", 255, - 0, 255, 300.0, 1.0, 0.5); - color = new Color(); - color.setRGB(255, 165, 0); - validateColor(color, 16753920, "#FFA500", "#FFA500", - 255, 165, 0, 39.0, 1.0, 0.5); - color = new Color(); - color.setRGB(255, 192, 203); - validateColor(color, 16761035, "#FFC0CB", "#FFC0CB", - 255, 192, 203, 350.0, 1.0, 0.88); - color = new Color(); - color.setRGB(128, 0, 128); - validateColor(color, 8388736, "#800080", "#800080", - 128, 0, 128, 300.0, 1.0, 0.25); - color = new Color(); - color.setRGB(255, 0, 0); - validateColor(color, 16711680, "#FF0000", "#F00", 255, 0, - 0, 0.0, 1.0, 0.5); - color = new Color(); - color.setRGB(238, 130, 238); - validateColor(color, 15631086, "#EE82EE", "#EE82EE", - 238, 130, 238, 300.0, 0.76, 0.72); - color = new Color(); - color.setRGB(255, 255, 255); - validateColor(color, 16777215, "#FFFFFF", "#FFF", - 255, 255, 255, 0.0, 0.0, 1.0); - color = new Color(); - color.setRGB(255, 255, 0); - validateColor(color, 16776960, "#FFFF00", "#FF0", 255, - 255, 0, 60.0, 1.0, 0.5); + it('test color hex integers', function () { + let color = new Color(); + color.setColor(0x000000); + validateColor(color, 0, '#000000', '#000', 0, 0, 0, 0.0, 0.0, 0.0); + color = new Color(); + color.setColor(0x0000ff); + validateColor(color, 255, '#0000FF', '#00F', 0, 0, 255, 240.0, 1.0, 0.5); + color = new Color(); + color.setColor(0xa52a2a); + validateColor(color, 10824234, '#A52A2A', '#A52A2A', 165, 42, 42, 0.0, 0.59, 0.41); + color = new Color(); + color.setColor(0x00ffff); + validateColor(color, 65535, '#00FFFF', '#0FF', 0, 255, 255, 180.0, 1.0, 0.5); + color = new Color(); + color.setColor(0x444444); + validateColor(color, 4473924, '#444444', '#444', 68, 68, 68, 0.0, 0.0, 0.27); + color = new Color(); + color.setColor(0x888888); + validateColor(color, 8947848, '#888888', '#888', 136, 136, 136, 0.0, 0.0, 0.53); + color = new Color(); + color.setColor(0x00ff00); + validateColor(color, 65280, '#00FF00', '#0F0', 0, 255, 0, 120.0, 1.0, 0.5); + color = new Color(); + color.setColor(0xcccccc); + validateColor(color, 13421772, '#CCCCCC', '#CCC', 204, 204, 204, 0.0, 0.0, 0.8); + color = new Color(); + color.setColor(0xff00ff); + validateColor(color, 16711935, '#FF00FF', '#F0F', 255, 0, 255, 300.0, 1.0, 0.5); + color = new Color(); + color.setColor(0xffa500); + validateColor(color, 16753920, '#FFA500', '#FFA500', 255, 165, 0, 39.0, 1.0, 0.5); + color = new Color(); + color.setColor(0xffc0cb); + validateColor(color, 16761035, '#FFC0CB', '#FFC0CB', 255, 192, 203, 350.0, 1.0, 0.88); + color = new Color(); + color.setColor(0x800080); + validateColor(color, 8388736, '#800080', '#800080', 128, 0, 128, 300.0, 1.0, 0.25); + color = new Color(); + color.setColor(0xff0000); + validateColor(color, 16711680, '#FF0000', '#F00', 255, 0, 0, 0.0, 1.0, 0.5); + color = new Color(); + color.setColor(0xee82ee); + validateColor(color, 15631086, '#EE82EE', '#EE82EE', 238, 130, 238, 300.0, 0.76, 0.72); + color = new Color(); + color.setColor(0xffffff); + validateColor(color, 16777215, '#FFFFFF', '#FFF', 255, 255, 255, 0.0, 0.0, 1.0); + color = new Color(); + color.setColor(0xffff00); + validateColor(color, 16776960, '#FFFF00', '#FF0', 255, 255, 0, 60.0, 1.0, 0.5); - color = new Color(); - color.setRGB(0, 0, 0); - color.setAlpha(128); - validateColor2(color, 0, Number.MIN_SAFE_INTEGER, "#000000", - "#000", "#80000000", "#80000000", 0, 0, 0, 128, 0.0, 0.0, - 0.0); - color = new Color(); - color.setRGB(255, 165, 0); - color.setAlpha(64); - validateColor2(color, 16753920, 1090495744, - "#FFA500", "#FFA500", "#40FFA500", "#40FFA500", 255, 165, 0, 64, - 39.0, 1.0, 0.5); - color = new Color(); - color.setRGB(255, 255, 0); - color.setAlpha(217); - validateColor2(color, 16776960, -637534464, - "#FFFF00", "#FF0", "#D9FFFF00", "#D9FFFF00", 255, 255, 0, 217, - 60.0, 1.0, 0.5); + color = new Color(); + color.setColor(0x80000000); + validateColor2( + color, + 0, + Number.MIN_SAFE_INTEGER, + '#000000', + '#000', + '#80000000', + '#80000000', + 0, + 0, + 0, + 128, + 0.0, + 0.0, + 0.0, + ); + color = new Color(); + color.setColor(0x40ffa500); + validateColor2( + color, + 16753920, + 1090495744, + '#FFA500', + '#FFA500', + '#40FFA500', + '#40FFA500', + 255, + 165, + 0, + 64, + 39.0, + 1.0, + 0.5, + ); + color = new Color(); + color.setColor(0xd9ffff00); + validateColor2( + color, + 16776960, + -637534464, + '#FFFF00', + '#FF0', + '#D9FFFF00', + '#D9FFFF00', + 255, + 255, + 0, + 217, + 60.0, + 1.0, + 0.5, + ); - color = new Color(); - color.setRGB(0, 0, 0); - color.setAlpha(0.5); - validateColor3(color, 0, Number.MIN_SAFE_INTEGER, "#000000", - "#000", "#80000000", "#80000000", 0, 0, 0, 128, 0.5, 0.0, - 0.0, 0.0); - color = new Color(); - color.setRGB(255, 165, 0); - color.setAlpha(0.25); - validateColor3(color, 16753920, 1090495744, - "#FFA500", "#FFA500", "#40FFA500", "#40FFA500", 255, 165, 0, 64, - 0.25, 39.0, 1.0, 0.5); - color = new Color(); - color.setRGB(255, 255, 0); - color.setAlpha(0.85); - validateColor3(color, 16776960, -637534464, - "#FFFF00", "#FF0", "#D9FFFF00", "#D9FFFF00", 255, 255, 0, 217, - 0.85, 60.0, 1.0, 0.5); - }); - - it('test color arithmetic', function () { - let color = new Color(); - color.setRGB(0.0, 0.0, 0.0); - validateColor(color, 0, "#000000", "#000", 0, 0, - 0, 0.0, 0.0, 0.0); - color = new Color(); - color.setRGB(0.0, 0.0, 1.0); - validateColor(color, 255, "#0000FF", "#00F", 0, 0, - 255, 240.0, 1.0, 0.5); - color = new Color(); - color.setRGB(0.64705882352, 0.16470588235, 0.16470588235); - validateColor(color, - 10824234, "#A52A2A", "#A52A2A", 165, 42, 42, 0.0, 0.59, - 0.41); - color = new Color(); - color.setRGB(0.0, 1.0, 1.0); - validateColor(color, 65535, "#00FFFF", "#0FF", 0, - 255, 255, 180.0, 1.0, 0.5); - color = new Color(); - color.setRGB(0.26666666666, 0.26666666666, 0.26666666666); - validateColor(color, - 4473924, "#444444", "#444", 68, 68, 68, 0.0, 0.0, 0.27); - color = new Color(); - color.setRGB(0.53333333333, 0.53333333333, 0.53333333333); - validateColor(color, - 8947848, "#888888", "#888", 136, 136, 136, 0.0, 0.0, 0.53); - color = new Color(); - color.setRGB(0.0, 1.0, 0.0); - validateColor(color, 65280, "#00FF00", "#0F0", 0, - 255, 0, 120.0, 1.0, 0.5); - color = new Color(); - color.setRGB(0.8, 0.8, 0.8); - validateColor(color, 13421772, "#CCCCCC", "#CCC", - 204, 204, 204, 0.0, 0.0, 0.8); - color = new Color(); - color.setRGB(1.0, 0.0, 1.0); - validateColor(color, 16711935, "#FF00FF", "#F0F", - 255, 0, 255, 300.0, 1.0, 0.5); - color = new Color(); - color.setRGB(1.0, 0.64705882352, 0.0); - validateColor(color, 16753920, - "#FFA500", "#FFA500", 255, 165, 0, 39.0, 1.0, 0.5); - color = new Color(); - color.setRGB(1.0, 0.75294117647, 0.79607843137); - validateColor(color, 16761035, - "#FFC0CB", "#FFC0CB", 255, 192, 203, 350.0, 1.0, 0.88); - color = new Color(); - color.setRGB(0.50196078431, 0.0, 0.50196078431); - validateColor(color, 8388736, - "#800080", "#800080", 128, 0, 128, 300.0, 1.0, 0.25); - color = new Color(); - color.setRGB(1.0, 0.0, 0.0); - validateColor(color, 16711680, "#FF0000", "#F00", - 255, 0, 0, 0.0, 1.0, 0.5); - color = new Color(); - color.setRGB(0.93333333333, 0.50980392156, 0.93333333333); - validateColor(color, - 15631086, "#EE82EE", "#EE82EE", 238, 130, 238, 300.0, 0.76, - 0.72); - color = new Color(); - color.setRGB(1.0, 1.0, 1.0); - validateColor(color, 16777215, "#FFFFFF", "#FFF", - 255, 255, 255, 0.0, 0.0, 1.0); - color = new Color(); - color.setRGB(1.0, 1.0, 0.0); - validateColor(color, 16776960, "#FFFF00", "#FF0", - 255, 255, 0, 60.0, 1.0, 0.5); + color = new Color(); + color.setColor(0x80000000); + validateColor2( + color, + 0, + Number.MIN_SAFE_INTEGER, + '#000000', + '#000', + '#80000000', + '#80000000', + 0, + 0, + 0, + 128, + 0.0, + 0.0, + 0.0, + ); + color = new Color(); + color.setColor(0x40ffa500); + validateColor2( + color, + 16753920, + 1090495744, + '#FFA500', + '#FFA500', + '#40FFA500', + '#40FFA500', + 255, + 165, + 0, + 64, + 39.0, + 1.0, + 0.5, + ); + color = new Color(); + color.setColor(0xd9ffff00); + validateColor2( + color, + 16776960, + -637534464, + '#FFFF00', + '#FF0', + '#D9FFFF00', + '#D9FFFF00', + 255, + 255, + 0, + 217, + 60.0, + 1.0, + 0.5, + ); + }); - color = new Color(); - color.setRGB(0.0, 0.0, 0.0); - color.setAlpha(0.50196078431); - validateColor2(color, 0, - Number.MIN_SAFE_INTEGER, "#000000", "#000", "#80000000", "#80000000", - 0, 0, 0, 128, 0.0, 0.0, 0.0); - color = new Color(); - color.setRGB(1.0, 0.64705882352, 0.0); - color.setAlpha(0.25098039215); - validateColor2(color, - 16753920, 1090495744, "#FFA500", "#FFA500", "#40FFA500", - "#40FFA500", 255, 165, 0, 64, 39.0, 1.0, 0.5); - color = new Color(); - color.setRGB(1.0, 1.0, 0.0); - color.setAlpha(0.85098039215); - validateColor2(color, 16776960, - -637534464, "#FFFF00", "#FF0", "#D9FFFF00", "#D9FFFF00", 255, - 255, 0, 217, 60.0, 1.0, 0.5); - }); - - it('test color hex singles', function () { - let color = new Color(); - color.setRGB("00", "00", "00"); - validateColor(color, 0, "#000000", "#000", 0, 0, - 0, 0.0, 0.0, 0.0); - color = new Color(); - color.setRGB("00", "00", "FF"); - validateColor(color, 255, "#0000FF", "#00F", 0, 0, - 255, 240.0, 1.0, 0.5); - color = new Color(); - color.setRGB("a5", "2a", "2a"); - validateColor(color, 10824234, "#A52A2A", - "#A52A2A", 165, 42, 42, 0.0, 0.59, 0.41); - color = new Color(); - color.setRGB("00", "FF", "f"); - validateColor(color, 65535, "#00FFFF", "#0FF", 0, - 255, 255, 180.0, 1.0, 0.5); - color = new Color(); - color.setRGB("44", "4", "44"); - validateColor(color, 4473924, "#444444", "#444", - 68, 68, 68, 0.0, 0.0, 0.27); - color = new Color(); - color.setRGB("8", "88", "8"); - validateColor(color, 8947848, "#888888", "#888", - 136, 136, 136, 0.0, 0.0, 0.53); - color = new Color(); - color.setRGB("00", "ff", "00"); - validateColor(color, 65280, "#00FF00", "#0F0", 0, - 255, 0, 120.0, 1.0, 0.5); - color = new Color(); - color.setRGB("c", "C", "c"); - validateColor(color, 13421772, "#CCCCCC", "#CCC", - 204, 204, 204, 0.0, 0.0, 0.8); - color = new Color(); - color.setRGB("fF", "00", "Ff"); - validateColor(color, 16711935, "#FF00FF", "#F0F", - 255, 0, 255, 300.0, 1.0, 0.5); - color = new Color(); - color.setRGB("F", "A5", "0"); - validateColor(color, 16753920, "#FFA500", "#FFA500", - 255, 165, 0, 39.0, 1.0, 0.5); - color = new Color(); - color.setRGB("FF", "C0", "CB"); - validateColor(color, 16761035, "#FFC0CB", - "#FFC0CB", 255, 192, 203, 350.0, 1.0, 0.88); - color = new Color(); - color.setRGB("80", "00", "80"); - validateColor(color, 8388736, "#800080", - "#800080", 128, 0, 128, 300.0, 1.0, 0.25); - color = new Color(); - color.setRGB("ff", "00", "00"); - validateColor(color, 16711680, "#FF0000", "#F00", - 255, 0, 0, 0.0, 1.0, 0.5); - color = new Color(); - color.setRGB("ee", "82", "ee"); - validateColor(color, 15631086, "#EE82EE", - "#EE82EE", 238, 130, 238, 300.0, 0.76, 0.72); - color = new Color(); - color.setRGB("FF", "FF", "FF"); - validateColor(color, 16777215, "#FFFFFF", "#FFF", - 255, 255, 255, 0.0, 0.0, 1.0); - color = new Color(); - color.setRGB("f", "f", "0"); - validateColor(color, 16776960, "#FFFF00", "#FF0", - 255, 255, 0, 60.0, 1.0, 0.5); + it('test color RGB', function () { + let color = new Color(); + color.setRGB(0, 0, 0); + validateColor(color, 0, '#000000', '#000', 0, 0, 0, 0.0, 0.0, 0.0); + color = new Color(); + color.setRGB(0, 0, 255); + validateColor(color, 255, '#0000FF', '#00F', 0, 0, 255, 240.0, 1.0, 0.5); + color = new Color(); + color.setRGB(165, 42, 42); + validateColor(color, 10824234, '#A52A2A', '#A52A2A', 165, 42, 42, 0.0, 0.59, 0.41); + color = new Color(); + color.setRGB(0, 255, 255); + validateColor(color, 65535, '#00FFFF', '#0FF', 0, 255, 255, 180.0, 1.0, 0.5); + color = new Color(); + color.setRGB(68, 68, 68); + validateColor(color, 4473924, '#444444', '#444', 68, 68, 68, 0.0, 0.0, 0.27); + color = new Color(); + color.setRGB(136, 136, 136); + validateColor(color, 8947848, '#888888', '#888', 136, 136, 136, 0.0, 0.0, 0.53); + color = new Color(); + color.setRGB(0, 255, 0); + validateColor(color, 65280, '#00FF00', '#0F0', 0, 255, 0, 120.0, 1.0, 0.5); + color = new Color(); + color.setRGB(204, 204, 204); + validateColor(color, 13421772, '#CCCCCC', '#CCC', 204, 204, 204, 0.0, 0.0, 0.8); + color = new Color(); + color.setRGB(255, 0, 255); + validateColor(color, 16711935, '#FF00FF', '#F0F', 255, 0, 255, 300.0, 1.0, 0.5); + color = new Color(); + color.setRGB(255, 165, 0); + validateColor(color, 16753920, '#FFA500', '#FFA500', 255, 165, 0, 39.0, 1.0, 0.5); + color = new Color(); + color.setRGB(255, 192, 203); + validateColor(color, 16761035, '#FFC0CB', '#FFC0CB', 255, 192, 203, 350.0, 1.0, 0.88); + color = new Color(); + color.setRGB(128, 0, 128); + validateColor(color, 8388736, '#800080', '#800080', 128, 0, 128, 300.0, 1.0, 0.25); + color = new Color(); + color.setRGB(255, 0, 0); + validateColor(color, 16711680, '#FF0000', '#F00', 255, 0, 0, 0.0, 1.0, 0.5); + color = new Color(); + color.setRGB(238, 130, 238); + validateColor(color, 15631086, '#EE82EE', '#EE82EE', 238, 130, 238, 300.0, 0.76, 0.72); + color = new Color(); + color.setRGB(255, 255, 255); + validateColor(color, 16777215, '#FFFFFF', '#FFF', 255, 255, 255, 0.0, 0.0, 1.0); + color = new Color(); + color.setRGB(255, 255, 0); + validateColor(color, 16776960, '#FFFF00', '#FF0', 255, 255, 0, 60.0, 1.0, 0.5); - color = new Color(); - color.setRGB("00", "00", "00"); - color.setAlpha("80"); - validateColor2(color, 0, Number.MIN_SAFE_INTEGER, - "#000000", "#000", "#80000000", "#80000000", 0, 0, 0, 128, 0.0, - 0.0, 0.0); - color = new Color(); - color.setRGB("f", "A5", "0"); - color.setAlpha("40"); - validateColor2(color, 16753920, 1090495744, - "#FFA500", "#FFA500", "#40FFA500", "#40FFA500", 255, 165, 0, 64, - 39.0, 1.0, 0.5); - color = new Color(); - color.setRGB("ff", "F", "00"); - color.setAlpha("D9"); - validateColor2(color, 16776960, -637534464, - "#FFFF00", "#FF0", "#D9FFFF00", "#D9FFFF00", 255, 255, 0, 217, - 60.0, 1.0, 0.5); + color = new Color(); + color.setRGB(0, 0, 0); + color.setAlpha(128); + validateColor2( + color, + 0, + Number.MIN_SAFE_INTEGER, + '#000000', + '#000', + '#80000000', + '#80000000', + 0, + 0, + 0, + 128, + 0.0, + 0.0, + 0.0, + ); + color = new Color(); + color.setRGB(255, 165, 0); + color.setAlpha(64); + validateColor2( + color, + 16753920, + 1090495744, + '#FFA500', + '#FFA500', + '#40FFA500', + '#40FFA500', + 255, + 165, + 0, + 64, + 39.0, + 1.0, + 0.5, + ); + color = new Color(); + color.setRGB(255, 255, 0); + color.setAlpha(217); + validateColor2( + color, + 16776960, + -637534464, + '#FFFF00', + '#FF0', + '#D9FFFF00', + '#D9FFFF00', + 255, + 255, + 0, + 217, + 60.0, + 1.0, + 0.5, + ); - color = new Color(); - color.setRGB("00", "00", "00"); - color.setOpacity(0.5); - validateColor3(color, 0, Number.MIN_SAFE_INTEGER, - "#000000", "#000", "#80000000", "#80000000", 0, 0, 0, 128, 0.5, - 0.0, 0.0, 0.0); - color = new Color(); - color.setAlpha(0.25); - color.setRGB("ff", "a5", "00"); - validateColor3(color, 16753920, 1090495744, - "#FFA500", "#FFA500", "#40FFA500", "#40FFA500", 255, 165, 0, 64, - 0.25, 39.0, 1.0, 0.5); - color = new Color(); - color.setOpacity(0.85); - color.setRGB("FF", "FF", "00"); - validateColor3(color, 16776960, -637534464, - "#FFFF00", "#FF0", "#D9FFFF00", "#D9FFFF00", 255, 255, 0, 217, - 0.85, 60.0, 1.0, 0.5); - }); - - it('test color HSL', function () { - let color = new Color(); - color.setColorByHSL(0.0, 0.0, 0.0); - validateColor(color, 0, "#000000", - "#000", 0, 0, 0, 0.0, 0.0, 0.0); - color = new Color(); - color.setColorByHSL(240.0, 1.0, 0.5); - validateColor(color, 255, - "#0000FF", "#00F", 0, 0, 255, 240.0, 1.0, 0.5); - color = new Color(); - color.setColorByHSL(0.0, 0.59420294, 0.40588236); - validateColor(color, - 10824234, "#A52A2A", "#A52A2A", 165, 42, 42, 0.0, 0.59, - 0.41); - color = new Color(); - color.setColorByHSL(180.0, 1.0, 0.5); - validateColor(color, 65535, - "#00FFFF", "#0FF", 0, 255, 255, 180.0, 1.0, 0.5); - color = new Color(); - color.setColorByHSL(0.0, 0.0, 0.26666668); - validateColor(color, - 4473924, "#444444", "#444", 68, 68, 68, 0.0, 0.0, 0.27); - color = new Color(); - color.setColorByHSL(0.0, 0.0, 0.53333336); - validateColor(color, - 8947848, "#888888", "#888", 136, 136, 136, 0.0, 0.0, 0.53); - color = new Color(); - color.setColorByHSL(120.0, 1.0, 0.5); - validateColor(color, 65280, - "#00FF00", "#0F0", 0, 255, 0, 120.0, 1.0, 0.5); - color = new Color(); - color.setColorByHSL(0.0, 0.0, 0.8); - validateColor(color, 13421772, - "#CCCCCC", "#CCC", 204, 204, 204, 0.0, 0.0, 0.8); - color = new Color(); - color.setColorByHSL(300.0, 1.0, 0.5); - validateColor(color, 16711935, - "#FF00FF", "#F0F", 255, 0, 255, 300.0, 1.0, 0.5); - color = new Color(); - color.setColorByHSL(38.823532, 1.0, 0.5); - validateColor(color, - 16753920, "#FFA500", "#FFA500", 255, 165, 0, 39.0, 1.0, 0.5); - color = new Color(); - color.setColorByHSL(349.5238, 1.0, 0.87647057); - validateColor(color, - 16761035, "#FFC0CB", "#FFC0CB", 255, 192, 203, 350.0, 1.0, - 0.88); - color = new Color(); - color.setColorByHSL(300.0, 1.0, 0.2509804); - validateColor(color, - 8388736, "#800080", "#800080", 128, 0, 128, 300.0, 1.0, - 0.25); - color = new Color(); - color.setColorByHSL(0.0, 1.0, 0.5); - validateColor(color, 16711680, - "#FF0000", "#F00", 255, 0, 0, 0.0, 1.0, 0.5); - color = new Color(); - color.setColorByHSL(300.0, 0.76056343, 0.72156864); - validateColor( - color, - 15631086, "#EE82EE", "#EE82EE", 238, 130, 238, 300.0, 0.76, - 0.72); - color = new Color(); - color.setColorByHSL(0.0, 0.0, 1.0); - validateColor(color, 16777215, - "#FFFFFF", "#FFF", 255, 255, 255, 0.0, 0.0, 1.0); - color = new Color(); - color.setColorByHSL(60.0, 1.0, 0.5); - validateColor(color, 16776960, - "#FFFF00", "#FF0", 255, 255, 0, 60.0, 1.0, 0.5); + color = new Color(); + color.setRGB(0, 0, 0); + color.setAlpha(0.5); + validateColor3( + color, + 0, + Number.MIN_SAFE_INTEGER, + '#000000', + '#000', + '#80000000', + '#80000000', + 0, + 0, + 0, + 128, + 0.5, + 0.0, + 0.0, + 0.0, + ); + color = new Color(); + color.setRGB(255, 165, 0); + color.setAlpha(0.25); + validateColor3( + color, + 16753920, + 1090495744, + '#FFA500', + '#FFA500', + '#40FFA500', + '#40FFA500', + 255, + 165, + 0, + 64, + 0.25, + 39.0, + 1.0, + 0.5, + ); + color = new Color(); + color.setRGB(255, 255, 0); + color.setAlpha(0.85); + validateColor3( + color, + 16776960, + -637534464, + '#FFFF00', + '#FF0', + '#D9FFFF00', + '#D9FFFF00', + 255, + 255, + 0, + 217, + 0.85, + 60.0, + 1.0, + 0.5, + ); + }); - color = new Color(); - color.setColorByHSL(0.0, 0.0, 0.0, 0.50196078431); - validateColor2( - color, 0, - Number.MIN_SAFE_INTEGER, "#000000", "#000", "#80000000", "#80000000", - 0, 0, 0, 128, 0.0, 0.0, 0.0); - color = new Color(); - color.setColorByHSL(38.823532, 1.0, 0.5, 0.25098039215); - validateColor2( - color, - 16753920, 1090495744, "#FFA500", "#FFA500", "#40FFA500", - "#40FFA500", 255, 165, 0, 64, 39.0, 1.0, 0.5); - color = new Color(); - color.setColorByHSL(60.0, 1.0, 0.5, 0.85098039215); - validateColor2( - color, - 16776960, -637534464, "#FFFF00", "#FF0", "#D9FFFF00", - "#D9FFFF00", 255, 255, 0, 217, 60.0, 1.0, 0.5); - }); - - function validateColor(color: Color, colorInt: number, hex: string, - hexShorthand: string, red: number, green: number, blue: number, hue: number, - saturation: number, lightness: number) { - - let hexAlpha = "#FF" + hex.substring(1); - let hexShorthandAlpha = null; - if (hexShorthand.length <= 4) { - hexShorthandAlpha = "#F" + hexShorthand.substring(1); - } else { - hexShorthandAlpha = "#FF" + hexShorthand.substring(1); - } - let alpha = 255; - let opacity = 1.0; - let colorAlphaInt = (alpha & 0xff) << 24 | colorInt; - - validateColor3(color, colorInt, colorAlphaInt, hex, hexShorthand, - hexAlpha, hexShorthandAlpha, red, green, blue, alpha, opacity, - hue, saturation, lightness); - } - - function validateColor2(color: Color, colorInt: number, colorAlphaInt: number, - hex: string, hexShorthand: string, hexAlpha: string, - hexShorthandAlpha: string, red: number, green: number, blue: number, alpha: number, - hue: number, saturation: number, lightness: number) { - - validateColor3(color, colorInt, colorAlphaInt, hex, hexShorthand, - hexAlpha, hexShorthandAlpha, red, green, blue, alpha, - alpha / 255.0, hue, saturation, lightness); - } - - function validateColor3(color: Color, colorInt: number, colorAlphaInt: number, - hex: string, hexShorthand: string, hexAlpha: string, - hexShorthandAlpha: string, red: number, green: number, blue: number, alpha: number, - opacity: number, hue: number, saturation: number, lightness: number) { - - expect(color.getColorHex()).to.equal(hex); - expect(color.getColorHexShorthand()).to.equal(hexShorthand); - expect(color.getColorHexWithAlpha()).to.equal(hexAlpha); - expect(color.getColorHexShorthandWithAlpha()).to.equal(hexShorthandAlpha); - - expect(color.getColor()).to.equal(colorInt); - //TODO fix - //expect(color.getColorWithAlpha()).to.equal(colorAlphaInt); - - expect(color.getRed()).to.equal(red); - expect(color.getRedArithmetic()).to.be.approximately(red / 255.0, 0.0000001); - const redHex = hex.substring(1, 3); - expect(color.getRedHex()).to.equal(redHex); - expect(color.getRedHexShorthand()).to.equal(ColorUtils.shorthandHexSingle(redHex)); - - expect(color.getGreen()).to.equal(green); - expect(color.getGreenArithmetic()).to.be.approximately(green / 255.0, 0.0000001); - const greenHex = hex.substring(3, 5); - expect(color.getGreenHex()).to.equal(greenHex); - expect(color.getGreenHexShorthand()).to.equal(ColorUtils.shorthandHexSingle(greenHex)); - - expect(color.getBlue()).to.equal(blue); - expect(color.getBlueArithmetic()).to.be.approximately(blue / 255.0, 0.0000001); - const blueHex = hex.substring(5, 7); - expect(color.getBlueHex()).to.equal(blueHex); - expect(color.getBlueHexShorthand()).to.equal(ColorUtils.shorthandHexSingle(blueHex)); - - expect(color.getOpacity()).to.be.approximately(opacity, 0.0000001); - expect(color.getAlpha()).to.equal(alpha); - expect(color.getAlphaArithmetic()).to.be.approximately(opacity, 0.0000001); - const alphaHex = hexAlpha.substring(1, 3); - expect(color.getAlphaHex()).to.equal(alphaHex); - expect(color.getAlphaHexShorthand()).to.equal(ColorUtils.shorthandHexSingle(alphaHex)); - - const hsl = color.getHSL(); - expect(hsl[0]).to.be.approximately(hue, 0.5); - expect(hsl[1]).to.be.approximately(saturation, 0.01); - expect(hsl[2]).to.be.approximately(lightness, 0.01); - expect(color.getHue()).to.be.approximately(hue, 0.5); - expect(color.getSaturation()).to.be.approximately(saturation, 0.01); - expect(color.getLightness()).to.be.approximately(lightness, 0.01); - } -}) \ No newline at end of file + it('test color arithmetic', function () { + let color = new Color(); + color.setRGB(0.0, 0.0, 0.0); + validateColor(color, 0, '#000000', '#000', 0, 0, 0, 0.0, 0.0, 0.0); + color = new Color(); + color.setRGB(0.0, 0.0, 1.0); + validateColor(color, 255, '#0000FF', '#00F', 0, 0, 255, 240.0, 1.0, 0.5); + color = new Color(); + color.setRGB(0.64705882352, 0.16470588235, 0.16470588235); + validateColor(color, 10824234, '#A52A2A', '#A52A2A', 165, 42, 42, 0.0, 0.59, 0.41); + color = new Color(); + color.setRGB(0.0, 1.0, 1.0); + validateColor(color, 65535, '#00FFFF', '#0FF', 0, 255, 255, 180.0, 1.0, 0.5); + color = new Color(); + color.setRGB(0.26666666666, 0.26666666666, 0.26666666666); + validateColor(color, 4473924, '#444444', '#444', 68, 68, 68, 0.0, 0.0, 0.27); + color = new Color(); + color.setRGB(0.53333333333, 0.53333333333, 0.53333333333); + validateColor(color, 8947848, '#888888', '#888', 136, 136, 136, 0.0, 0.0, 0.53); + color = new Color(); + color.setRGB(0.0, 1.0, 0.0); + validateColor(color, 65280, '#00FF00', '#0F0', 0, 255, 0, 120.0, 1.0, 0.5); + color = new Color(); + color.setRGB(0.8, 0.8, 0.8); + validateColor(color, 13421772, '#CCCCCC', '#CCC', 204, 204, 204, 0.0, 0.0, 0.8); + color = new Color(); + color.setRGB(1.0, 0.0, 1.0); + validateColor(color, 16711935, '#FF00FF', '#F0F', 255, 0, 255, 300.0, 1.0, 0.5); + color = new Color(); + color.setRGB(1.0, 0.64705882352, 0.0); + validateColor(color, 16753920, '#FFA500', '#FFA500', 255, 165, 0, 39.0, 1.0, 0.5); + color = new Color(); + color.setRGB(1.0, 0.75294117647, 0.79607843137); + validateColor(color, 16761035, '#FFC0CB', '#FFC0CB', 255, 192, 203, 350.0, 1.0, 0.88); + color = new Color(); + color.setRGB(0.50196078431, 0.0, 0.50196078431); + validateColor(color, 8388736, '#800080', '#800080', 128, 0, 128, 300.0, 1.0, 0.25); + color = new Color(); + color.setRGB(1.0, 0.0, 0.0); + validateColor(color, 16711680, '#FF0000', '#F00', 255, 0, 0, 0.0, 1.0, 0.5); + color = new Color(); + color.setRGB(0.93333333333, 0.50980392156, 0.93333333333); + validateColor(color, 15631086, '#EE82EE', '#EE82EE', 238, 130, 238, 300.0, 0.76, 0.72); + color = new Color(); + color.setRGB(1.0, 1.0, 1.0); + validateColor(color, 16777215, '#FFFFFF', '#FFF', 255, 255, 255, 0.0, 0.0, 1.0); + color = new Color(); + color.setRGB(1.0, 1.0, 0.0); + validateColor(color, 16776960, '#FFFF00', '#FF0', 255, 255, 0, 60.0, 1.0, 0.5); + + color = new Color(); + color.setRGB(0.0, 0.0, 0.0); + color.setAlpha(0.50196078431); + validateColor2( + color, + 0, + Number.MIN_SAFE_INTEGER, + '#000000', + '#000', + '#80000000', + '#80000000', + 0, + 0, + 0, + 128, + 0.0, + 0.0, + 0.0, + ); + color = new Color(); + color.setRGB(1.0, 0.64705882352, 0.0); + color.setAlpha(0.25098039215); + validateColor2( + color, + 16753920, + 1090495744, + '#FFA500', + '#FFA500', + '#40FFA500', + '#40FFA500', + 255, + 165, + 0, + 64, + 39.0, + 1.0, + 0.5, + ); + color = new Color(); + color.setRGB(1.0, 1.0, 0.0); + color.setAlpha(0.85098039215); + validateColor2( + color, + 16776960, + -637534464, + '#FFFF00', + '#FF0', + '#D9FFFF00', + '#D9FFFF00', + 255, + 255, + 0, + 217, + 60.0, + 1.0, + 0.5, + ); + }); + + it('test color hex singles', function () { + let color = new Color(); + color.setRGB('00', '00', '00'); + validateColor(color, 0, '#000000', '#000', 0, 0, 0, 0.0, 0.0, 0.0); + color = new Color(); + color.setRGB('00', '00', 'FF'); + validateColor(color, 255, '#0000FF', '#00F', 0, 0, 255, 240.0, 1.0, 0.5); + color = new Color(); + color.setRGB('a5', '2a', '2a'); + validateColor(color, 10824234, '#A52A2A', '#A52A2A', 165, 42, 42, 0.0, 0.59, 0.41); + color = new Color(); + color.setRGB('00', 'FF', 'f'); + validateColor(color, 65535, '#00FFFF', '#0FF', 0, 255, 255, 180.0, 1.0, 0.5); + color = new Color(); + color.setRGB('44', '4', '44'); + validateColor(color, 4473924, '#444444', '#444', 68, 68, 68, 0.0, 0.0, 0.27); + color = new Color(); + color.setRGB('8', '88', '8'); + validateColor(color, 8947848, '#888888', '#888', 136, 136, 136, 0.0, 0.0, 0.53); + color = new Color(); + color.setRGB('00', 'ff', '00'); + validateColor(color, 65280, '#00FF00', '#0F0', 0, 255, 0, 120.0, 1.0, 0.5); + color = new Color(); + color.setRGB('c', 'C', 'c'); + validateColor(color, 13421772, '#CCCCCC', '#CCC', 204, 204, 204, 0.0, 0.0, 0.8); + color = new Color(); + color.setRGB('fF', '00', 'Ff'); + validateColor(color, 16711935, '#FF00FF', '#F0F', 255, 0, 255, 300.0, 1.0, 0.5); + color = new Color(); + color.setRGB('F', 'A5', '0'); + validateColor(color, 16753920, '#FFA500', '#FFA500', 255, 165, 0, 39.0, 1.0, 0.5); + color = new Color(); + color.setRGB('FF', 'C0', 'CB'); + validateColor(color, 16761035, '#FFC0CB', '#FFC0CB', 255, 192, 203, 350.0, 1.0, 0.88); + color = new Color(); + color.setRGB('80', '00', '80'); + validateColor(color, 8388736, '#800080', '#800080', 128, 0, 128, 300.0, 1.0, 0.25); + color = new Color(); + color.setRGB('ff', '00', '00'); + validateColor(color, 16711680, '#FF0000', '#F00', 255, 0, 0, 0.0, 1.0, 0.5); + color = new Color(); + color.setRGB('ee', '82', 'ee'); + validateColor(color, 15631086, '#EE82EE', '#EE82EE', 238, 130, 238, 300.0, 0.76, 0.72); + color = new Color(); + color.setRGB('FF', 'FF', 'FF'); + validateColor(color, 16777215, '#FFFFFF', '#FFF', 255, 255, 255, 0.0, 0.0, 1.0); + color = new Color(); + color.setRGB('f', 'f', '0'); + validateColor(color, 16776960, '#FFFF00', '#FF0', 255, 255, 0, 60.0, 1.0, 0.5); + + color = new Color(); + color.setRGB('00', '00', '00'); + color.setAlpha('80'); + validateColor2( + color, + 0, + Number.MIN_SAFE_INTEGER, + '#000000', + '#000', + '#80000000', + '#80000000', + 0, + 0, + 0, + 128, + 0.0, + 0.0, + 0.0, + ); + color = new Color(); + color.setRGB('f', 'A5', '0'); + color.setAlpha('40'); + validateColor2( + color, + 16753920, + 1090495744, + '#FFA500', + '#FFA500', + '#40FFA500', + '#40FFA500', + 255, + 165, + 0, + 64, + 39.0, + 1.0, + 0.5, + ); + color = new Color(); + color.setRGB('ff', 'F', '00'); + color.setAlpha('D9'); + validateColor2( + color, + 16776960, + -637534464, + '#FFFF00', + '#FF0', + '#D9FFFF00', + '#D9FFFF00', + 255, + 255, + 0, + 217, + 60.0, + 1.0, + 0.5, + ); + + color = new Color(); + color.setRGB('00', '00', '00'); + color.setOpacity(0.5); + validateColor3( + color, + 0, + Number.MIN_SAFE_INTEGER, + '#000000', + '#000', + '#80000000', + '#80000000', + 0, + 0, + 0, + 128, + 0.5, + 0.0, + 0.0, + 0.0, + ); + color = new Color(); + color.setAlpha(0.25); + color.setRGB('ff', 'a5', '00'); + validateColor3( + color, + 16753920, + 1090495744, + '#FFA500', + '#FFA500', + '#40FFA500', + '#40FFA500', + 255, + 165, + 0, + 64, + 0.25, + 39.0, + 1.0, + 0.5, + ); + color = new Color(); + color.setOpacity(0.85); + color.setRGB('FF', 'FF', '00'); + validateColor3( + color, + 16776960, + -637534464, + '#FFFF00', + '#FF0', + '#D9FFFF00', + '#D9FFFF00', + 255, + 255, + 0, + 217, + 0.85, + 60.0, + 1.0, + 0.5, + ); + }); + + it('test color HSL', function () { + let color = new Color(); + color.setColorByHSL(0.0, 0.0, 0.0); + validateColor(color, 0, '#000000', '#000', 0, 0, 0, 0.0, 0.0, 0.0); + color = new Color(); + color.setColorByHSL(240.0, 1.0, 0.5); + validateColor(color, 255, '#0000FF', '#00F', 0, 0, 255, 240.0, 1.0, 0.5); + color = new Color(); + color.setColorByHSL(0.0, 0.59420294, 0.40588236); + validateColor(color, 10824234, '#A52A2A', '#A52A2A', 165, 42, 42, 0.0, 0.59, 0.41); + color = new Color(); + color.setColorByHSL(180.0, 1.0, 0.5); + validateColor(color, 65535, '#00FFFF', '#0FF', 0, 255, 255, 180.0, 1.0, 0.5); + color = new Color(); + color.setColorByHSL(0.0, 0.0, 0.26666668); + validateColor(color, 4473924, '#444444', '#444', 68, 68, 68, 0.0, 0.0, 0.27); + color = new Color(); + color.setColorByHSL(0.0, 0.0, 0.53333336); + validateColor(color, 8947848, '#888888', '#888', 136, 136, 136, 0.0, 0.0, 0.53); + color = new Color(); + color.setColorByHSL(120.0, 1.0, 0.5); + validateColor(color, 65280, '#00FF00', '#0F0', 0, 255, 0, 120.0, 1.0, 0.5); + color = new Color(); + color.setColorByHSL(0.0, 0.0, 0.8); + validateColor(color, 13421772, '#CCCCCC', '#CCC', 204, 204, 204, 0.0, 0.0, 0.8); + color = new Color(); + color.setColorByHSL(300.0, 1.0, 0.5); + validateColor(color, 16711935, '#FF00FF', '#F0F', 255, 0, 255, 300.0, 1.0, 0.5); + color = new Color(); + color.setColorByHSL(38.823532, 1.0, 0.5); + validateColor(color, 16753920, '#FFA500', '#FFA500', 255, 165, 0, 39.0, 1.0, 0.5); + color = new Color(); + color.setColorByHSL(349.5238, 1.0, 0.87647057); + validateColor(color, 16761035, '#FFC0CB', '#FFC0CB', 255, 192, 203, 350.0, 1.0, 0.88); + color = new Color(); + color.setColorByHSL(300.0, 1.0, 0.2509804); + validateColor(color, 8388736, '#800080', '#800080', 128, 0, 128, 300.0, 1.0, 0.25); + color = new Color(); + color.setColorByHSL(0.0, 1.0, 0.5); + validateColor(color, 16711680, '#FF0000', '#F00', 255, 0, 0, 0.0, 1.0, 0.5); + color = new Color(); + color.setColorByHSL(300.0, 0.76056343, 0.72156864); + validateColor(color, 15631086, '#EE82EE', '#EE82EE', 238, 130, 238, 300.0, 0.76, 0.72); + color = new Color(); + color.setColorByHSL(0.0, 0.0, 1.0); + validateColor(color, 16777215, '#FFFFFF', '#FFF', 255, 255, 255, 0.0, 0.0, 1.0); + color = new Color(); + color.setColorByHSL(60.0, 1.0, 0.5); + validateColor(color, 16776960, '#FFFF00', '#FF0', 255, 255, 0, 60.0, 1.0, 0.5); + + color = new Color(); + color.setColorByHSL(0.0, 0.0, 0.0, 0.50196078431); + validateColor2( + color, + 0, + Number.MIN_SAFE_INTEGER, + '#000000', + '#000', + '#80000000', + '#80000000', + 0, + 0, + 0, + 128, + 0.0, + 0.0, + 0.0, + ); + color = new Color(); + color.setColorByHSL(38.823532, 1.0, 0.5, 0.25098039215); + validateColor2( + color, + 16753920, + 1090495744, + '#FFA500', + '#FFA500', + '#40FFA500', + '#40FFA500', + 255, + 165, + 0, + 64, + 39.0, + 1.0, + 0.5, + ); + color = new Color(); + color.setColorByHSL(60.0, 1.0, 0.5, 0.85098039215); + validateColor2( + color, + 16776960, + -637534464, + '#FFFF00', + '#FF0', + '#D9FFFF00', + '#D9FFFF00', + 255, + 255, + 0, + 217, + 60.0, + 1.0, + 0.5, + ); + }); + + function validateColor( + color: Color, + colorInt: number, + hex: string, + hexShorthand: string, + red: number, + green: number, + blue: number, + hue: number, + saturation: number, + lightness: number, + ) { + let hexAlpha = '#FF' + hex.substring(1); + let hexShorthandAlpha = null; + if (hexShorthand.length <= 4) { + hexShorthandAlpha = '#F' + hexShorthand.substring(1); + } else { + hexShorthandAlpha = '#FF' + hexShorthand.substring(1); + } + let alpha = 255; + let opacity = 1.0; + let colorAlphaInt = ((alpha & 0xff) << 24) | colorInt; + + validateColor3( + color, + colorInt, + colorAlphaInt, + hex, + hexShorthand, + hexAlpha, + hexShorthandAlpha, + red, + green, + blue, + alpha, + opacity, + hue, + saturation, + lightness, + ); + } + + function validateColor2( + color: Color, + colorInt: number, + colorAlphaInt: number, + hex: string, + hexShorthand: string, + hexAlpha: string, + hexShorthandAlpha: string, + red: number, + green: number, + blue: number, + alpha: number, + hue: number, + saturation: number, + lightness: number, + ) { + validateColor3( + color, + colorInt, + colorAlphaInt, + hex, + hexShorthand, + hexAlpha, + hexShorthandAlpha, + red, + green, + blue, + alpha, + alpha / 255.0, + hue, + saturation, + lightness, + ); + } + + function validateColor3( + color: Color, + colorInt: number, + colorAlphaInt: number, + hex: string, + hexShorthand: string, + hexAlpha: string, + hexShorthandAlpha: string, + red: number, + green: number, + blue: number, + alpha: number, + opacity: number, + hue: number, + saturation: number, + lightness: number, + ) { + expect(color.getColorHex()).to.equal(hex); + expect(color.getColorHexShorthand()).to.equal(hexShorthand); + expect(color.getColorHexWithAlpha()).to.equal(hexAlpha); + expect(color.getColorHexShorthandWithAlpha()).to.equal(hexShorthandAlpha); + + expect(color.getColor()).to.equal(colorInt); + //TODO fix + //expect(color.getColorWithAlpha()).to.equal(colorAlphaInt); + + expect(color.getRed()).to.equal(red); + expect(color.getRedArithmetic()).to.be.approximately(red / 255.0, 0.0000001); + const redHex = hex.substring(1, 3); + expect(color.getRedHex()).to.equal(redHex); + expect(color.getRedHexShorthand()).to.equal(ColorUtils.shorthandHexSingle(redHex)); + + expect(color.getGreen()).to.equal(green); + expect(color.getGreenArithmetic()).to.be.approximately(green / 255.0, 0.0000001); + const greenHex = hex.substring(3, 5); + expect(color.getGreenHex()).to.equal(greenHex); + expect(color.getGreenHexShorthand()).to.equal(ColorUtils.shorthandHexSingle(greenHex)); + + expect(color.getBlue()).to.equal(blue); + expect(color.getBlueArithmetic()).to.be.approximately(blue / 255.0, 0.0000001); + const blueHex = hex.substring(5, 7); + expect(color.getBlueHex()).to.equal(blueHex); + expect(color.getBlueHexShorthand()).to.equal(ColorUtils.shorthandHexSingle(blueHex)); + + expect(color.getOpacity()).to.be.approximately(opacity, 0.0000001); + expect(color.getAlpha()).to.equal(alpha); + expect(color.getAlphaArithmetic()).to.be.approximately(opacity, 0.0000001); + const alphaHex = hexAlpha.substring(1, 3); + expect(color.getAlphaHex()).to.equal(alphaHex); + expect(color.getAlphaHexShorthand()).to.equal(ColorUtils.shorthandHexSingle(alphaHex)); + + const hsl = color.getHSL(); + expect(hsl[0]).to.be.approximately(hue, 0.5); + expect(hsl[1]).to.be.approximately(saturation, 0.01); + expect(hsl[2]).to.be.approximately(lightness, 0.01); + expect(color.getHue()).to.be.approximately(hue, 0.5); + expect(color.getSaturation()).to.be.approximately(saturation, 0.01); + expect(color.getLightness()).to.be.approximately(lightness, 0.01); + } +}); diff --git a/test/ColorUtilsTest.ts b/test/ColorUtilsTest.ts index f253b35..c358a87 100644 --- a/test/ColorUtilsTest.ts +++ b/test/ColorUtilsTest.ts @@ -1,376 +1,379 @@ - -import { ColorUtils } from '../dist/ColorUtils'; +import { ColorUtils } from '../src/ColorUtils'; import { expect } from 'chai'; describe('ColorUtils Tests', function () { - - it('test valid', function () { - expect(ColorUtils.isValidHex("000000")).to.be.true; - expect(ColorUtils.isValidHex("#000000")).to.be.true; - expect(ColorUtils.isValidHex("00000000")).to.be.true; - expect(ColorUtils.isValidHex("#00000000")).to.be.true; - expect(ColorUtils.isValidHex("000")).to.be.true; - expect(ColorUtils.isValidHex("#000")).to.be.true; - expect(ColorUtils.isValidHex("0000")).to.be.true; - expect(ColorUtils.isValidHex("#0000")).to.be.true; - expect(ColorUtils.isValidHex("FFFFFF")).to.be.true; - expect(ColorUtils.isValidHex("#FFFFFF")).to.be.true; - expect(ColorUtils.isValidHex("FFFFFFFF")).to.be.true; - expect(ColorUtils.isValidHex("#ffffffff")).to.be.true; - expect(ColorUtils.isValidHex("FfF")).to.be.true; - expect(ColorUtils.isValidHex("#fFf")).to.be.true; - expect(ColorUtils.isValidHex("ffff")).to.be.true; - expect(ColorUtils.isValidHex("#fFfF")).to.be.true; - - expect(ColorUtils.isValidHex(null)).to.be.false; - expect(ColorUtils.isValidHex("")).to.be.false; - - expect(ColorUtils.isValidHex("00000")).to.be.false; - expect(ColorUtils.isValidHex("0000000")).to.be.false; - expect(ColorUtils.isValidHex("#00000")).to.be.false; - expect(ColorUtils.isValidHex("#0000000")).to.be.false; - expect(ColorUtils.isValidHex("000000000")).to.be.false; - expect(ColorUtils.isValidHex("#000000000")).to.be.false; - expect(ColorUtils.isValidHex("00")).to.be.false; - expect(ColorUtils.isValidHex("#00")).to.be.false; - expect(ColorUtils.isValidHex("FFFFF")).to.be.false; - expect(ColorUtils.isValidHex("FFFFFFF")).to.be.false; - expect(ColorUtils.isValidHex("#FFFFF")).to.be.false; - expect(ColorUtils.isValidHex("#FFFFFFF")).to.be.false; - expect(ColorUtils.isValidHex("FFFFFFFFF")).to.be.false; - expect(ColorUtils.isValidHex("#FFFFFFFFF")).to.be.false; - expect(ColorUtils.isValidHex("FF")).to.be.false; - expect(ColorUtils.isValidHex("#FF")).to.be.false; - - expect(ColorUtils.isValidHex("G00000")).to.be.false; - expect(ColorUtils.isValidHex("#00000H")).to.be.false; - expect(ColorUtils.isValidHex("000i0000")).to.be.false; - expect(ColorUtils.isValidHex("#0000J000")).to.be.false; - expect(ColorUtils.isValidHex("00K")).to.be.false; - expect(ColorUtils.isValidHex("#0l0")).to.be.false; - expect(ColorUtils.isValidHex("0M00")).to.be.false; - expect(ColorUtils.isValidHex("#n000")).to.be.false; - expect(ColorUtils.isValidHex("FFGFFF")).to.be.false; - expect(ColorUtils.isValidHex("#FFFHFF")).to.be.false; - expect(ColorUtils.isValidHex("iFFFFFFF")).to.be.false; - expect(ColorUtils.isValidHex("#FFFFFFFj")).to.be.false; - expect(ColorUtils.isValidHex("FFK")).to.be.false; - expect(ColorUtils.isValidHex("#LFF")).to.be.false; - expect(ColorUtils.isValidHex("FFmF")).to.be.false; - expect(ColorUtils.isValidHex("#FnFF")).to.be.false; - - expect(ColorUtils.isValidHexSingle("00")).to.be.true; - expect(ColorUtils.isValidHexSingle("FF")).to.be.true; - expect(ColorUtils.isValidHexSingle("ff")).to.be.true; - expect(ColorUtils.isValidHexSingle("aB")).to.be.true; - expect(ColorUtils.isValidHexSingle("C5")).to.be.true; - expect(ColorUtils.isValidHexSingle("d")).to.be.true; - expect(ColorUtils.isValidHexSingle("E")).to.be.true; - expect(ColorUtils.isValidHexSingle("4")).to.be.true; - - expect(ColorUtils.isValidHexSingle(null)).to.be.false; - expect(ColorUtils.isValidHexSingle("")).to.be.false; - - expect(ColorUtils.isValidHexSingle("000")).to.be.false; - expect(ColorUtils.isValidHexSingle("0ff")).to.be.false; - expect(ColorUtils.isValidHexSingle("G0")).to.be.false; - expect(ColorUtils.isValidHexSingle("#00")).to.be.false; - - expect(ColorUtils.isValidRGB(-1)).to.be.false; - expect(ColorUtils.isValidRGB(0)).to.be.true; - expect(ColorUtils.isValidRGB(128)).to.be.true; - expect(ColorUtils.isValidRGB(255)).to.be.true; - expect(ColorUtils.isValidRGB(256)).to.be.false; - - expect(ColorUtils.isValidArithmeticRGB(0.0 - .0000001)).to.be.false; - expect(ColorUtils.isValidArithmeticRGB(0.0)).to.be.true; - expect(ColorUtils.isValidArithmeticRGB(0.5)).to.be.true; - expect(ColorUtils.isValidArithmeticRGB(1.0)).to.be.true; - expect(ColorUtils.isValidArithmeticRGB(1.0 + .0000001)).to.be.false; - - expect(ColorUtils.isValidHue(-0.0001)).to.be.false; - expect(ColorUtils.isValidHue(0.0)).to.be.true; - expect(ColorUtils.isValidHue(180.0)).to.be.true; - expect(ColorUtils.isValidHue(360.0)).to.be.true; - expect(ColorUtils.isValidHue(360.0001)).to.be.false; - - expect(ColorUtils.isValidSaturation(-0.0001)).to.be.false; - expect(ColorUtils.isValidSaturation(0.0)).to.be.true; - expect(ColorUtils.isValidSaturation(0.5)).to.be.true; - expect(ColorUtils.isValidSaturation(1.0)).to.be.true; - expect(ColorUtils.isValidSaturation(1.0001)).to.be.false; - - expect(ColorUtils.isValidLightness(-0.0001)).to.be.false; - expect(ColorUtils.isValidLightness(0.0)).to.be.true; - expect(ColorUtils.isValidLightness(0.5)).to.be.true; - expect(ColorUtils.isValidLightness(1.0)).to.be.true; - expect(ColorUtils.isValidLightness(1.0001)).to.be.false; - }); - - it('test utils', function () { - expect(ColorUtils.toArithmeticRGB(95)).to.be.approximately(0.37254903, 0.0000001); - expect(ColorUtils.toRGB(ColorUtils.toArithmeticRGB(95))).to.equal(95); - expect(ColorUtils.toRGB("5F")).to.equal(95); - expect(ColorUtils.toArithmeticRGB("5F")).to.be.approximately(0.37254903, 0.0000001); - - expect(ColorUtils.toRGB("00")).to.equal(0); - expect(ColorUtils.toArithmeticRGB("00")).to.be.approximately(0.0, 0.0); - expect(ColorUtils.toRGB("80")).to.equal(128); - expect(ColorUtils.toArithmeticRGB("80")).to.be.approximately(0.5019608, 0.0000001); - expect(ColorUtils.toRGB("FF")).to.equal(255); - expect(ColorUtils.toArithmeticRGB("FF")).to.be.approximately(1.0, 0.0); - expect(ColorUtils.toRGB("ff")).to.equal(255); - expect(ColorUtils.toArithmeticRGB("ff")).to.be.approximately(1.0, 0.0); - expect(ColorUtils.toRGB("f")).to.equal(255); - expect(ColorUtils.toArithmeticRGB("f")).to.be.approximately(1.0, 0.0); - - expect(ColorUtils.toHex(0)).to.equal("00"); - expect(ColorUtils.toHex(0.0)).to.equal("00"); - expect(ColorUtils.toHex(6)).to.equal("06"); - expect(ColorUtils.toHex(0.02352941176)).to.equal("06"); - expect(ColorUtils.toHex(128)).to.equal("80"); - expect(ColorUtils.toHex(0.5)).to.equal("80"); - expect(ColorUtils.toHex(255)).to.equal("FF"); - expect(ColorUtils.toHex(1.0)).to.equal("FF"); - - expect(ColorUtils.getRed("A1B2C3")).to.equal("A1"); - expect(ColorUtils.getGreen("a1b2c3")).to.equal("b2"); - expect(ColorUtils.getBlue("a1b2C3")).to.equal("C3"); - expect(ColorUtils.getAlpha("A1B2C3")).to.be.null; - expect(ColorUtils.getRed("D4A1B2C3")).to.equal("A1"); - expect(ColorUtils.getGreen("d4a1b2c3")).to.equal("b2"); - expect(ColorUtils.getBlue("d4a1b2C3")).to.equal("C3"); - expect(ColorUtils.getAlpha("DdA1B2C3")).to.equal("Dd"); - - expect(ColorUtils.getRed("#A1B2C3")).to.equal("A1"); - expect(ColorUtils.getGreen("#a1b2c3")).to.equal("b2"); - expect(ColorUtils.getBlue("#a1b2C3")).to.equal("C3"); - expect(ColorUtils.getAlpha("#A1B2C3")).to.be.null; - expect(ColorUtils.getRed("#D4A1B2C3")).to.equal("A1"); - expect(ColorUtils.getGreen("#d4a1b2c3")).to.equal("b2"); - expect(ColorUtils.getBlue("#d4a1b2C3")).to.equal("C3"); - expect(ColorUtils.getAlpha("#dDA1B2C3")).to.equal("dD"); - - expect(ColorUtils.getRed("ABC")).to.equal("AA"); - expect(ColorUtils.getGreen("abc")).to.equal("bb"); - expect(ColorUtils.getBlue("abC")).to.equal("CC"); - expect(ColorUtils.getAlpha("ABC")).to.be.null; - expect(ColorUtils.getRed("DABC")).to.equal("AA"); - expect(ColorUtils.getGreen("dabc")).to.equal("bb"); - expect(ColorUtils.getBlue("dabC")).to.equal("CC"); - expect(ColorUtils.getAlpha("DABC")).to.equal("DD"); - - expect(ColorUtils.getRed("#ABC")).to.equal("AA"); - expect(ColorUtils.getGreen("#abc")).to.equal("bb"); - expect(ColorUtils.getBlue("#abC")).to.equal("CC"); - expect(ColorUtils.getAlpha("#ABC")).to.be.null; - expect(ColorUtils.getRed("#DABC")).to.equal("AA"); - expect(ColorUtils.getGreen("#dabc")).to.equal("bb"); - expect(ColorUtils.getBlue("#dabC")).to.equal("CC"); - expect(ColorUtils.getAlpha("#DABC")).to.equal("DD"); - - expect(ColorUtils.getRed("010203")).to.equal("01"); - expect(ColorUtils.getGreen("010203")).to.equal("02"); - expect(ColorUtils.getBlue("010203")).to.equal("03"); - expect(ColorUtils.getAlpha("010203")).to.be.null; - expect(ColorUtils.getRed("04010203")).to.equal("01"); - expect(ColorUtils.getGreen("04010203")).to.equal("02"); - expect(ColorUtils.getBlue("04010203")).to.equal("03"); - expect(ColorUtils.getAlpha("04010203")).to.equal("04"); - - expect(ColorUtils.getRed("#010203")).to.equal("01"); - expect(ColorUtils.getGreen("#010203")).to.equal("02"); - expect(ColorUtils.getBlue("#010203")).to.equal("03"); - expect(ColorUtils.getAlpha("#010203")).to.be.null; - expect(ColorUtils.getRed("#04010203")).to.equal("01"); - expect(ColorUtils.getGreen("#04010203")).to.equal("02"); - expect(ColorUtils.getBlue("#04010203")).to.equal("03"); - expect(ColorUtils.getAlpha("#04010203")).to.equal("04"); - - expect(ColorUtils.getRed("123")).to.equal("11"); - expect(ColorUtils.getGreen("123")).to.equal("22"); - expect(ColorUtils.getBlue("123")).to.equal("33"); - expect(ColorUtils.getAlpha("123")).to.be.null; - expect(ColorUtils.getRed("4123")).to.equal("11"); - expect(ColorUtils.getGreen("4123")).to.equal("22"); - expect(ColorUtils.getBlue("4123")).to.equal("33"); - expect(ColorUtils.getAlpha("4123")).to.equal("44"); - - expect(ColorUtils.getRed("#123")).to.equal("11"); - expect(ColorUtils.getGreen("#123")).to.equal("22"); - expect(ColorUtils.getBlue("#123")).to.equal("33"); - expect(ColorUtils.getAlpha("#123")).to.be.null; - expect(ColorUtils.getRed("#4123")).to.equal("11"); - expect(ColorUtils.getGreen("#4123")).to.equal("22"); - expect(ColorUtils.getBlue("#4123")).to.equal("33"); - expect(ColorUtils.getAlpha("#4123")).to.equal("44"); - - expect(ColorUtils.getRed("112233")).to.equal("11"); - expect(ColorUtils.getGreen("112233")).to.equal("22"); - expect(ColorUtils.getBlue("112233")).to.equal("33"); - expect(ColorUtils.getAlpha("112233")).to.be.null; - expect(ColorUtils.getRed("44112233")).to.equal("11"); - expect(ColorUtils.getGreen("44112233")).to.equal("22"); - expect(ColorUtils.getBlue("44112233")).to.equal("33"); - expect(ColorUtils.getAlpha("44112233")).to.equal("44"); - - expect(ColorUtils.getRed("#112233")).to.equal("11"); - expect(ColorUtils.getGreen("#112233")).to.equal("22"); - expect(ColorUtils.getBlue("#112233")).to.equal("33"); - expect(ColorUtils.getAlpha("#112233")).to.be.null; - expect(ColorUtils.getRed("#44112233")).to.equal("11"); - expect(ColorUtils.getGreen("#44112233")).to.equal("22"); - expect(ColorUtils.getBlue("#44112233")).to.equal("33"); - expect(ColorUtils.getAlpha("#44112233")).to.equal("44"); - - expect(ColorUtils.getRed(-16711936)).to.equal(0); - expect(ColorUtils.getGreen(-16711936)).to.equal(255); - expect(ColorUtils.getBlue(-16711936)).to.equal(0); - expect(ColorUtils.getAlpha(-16711936)).to.equal(255); - - expect(ColorUtils.getRed(0xFF00FF00)).to.equal(0); - expect(ColorUtils.getGreen(0xff00ff00)).to.equal(255); - expect(ColorUtils.getBlue(0xFF00FF00)).to.equal(0); - expect(ColorUtils.getAlpha(0xff00ff00)).to.equal(255); - - expect(ColorUtils.getRed(65280)).to.equal(0); - expect(ColorUtils.getGreen(65280)).to.equal(255); - expect(ColorUtils.getBlue(65280)).to.equal(0); - expect(ColorUtils.getAlpha(65280)).to.equal(0); - - expect(ColorUtils.getRed(0x00FF00)).to.equal(0); - expect(ColorUtils.getGreen(0x00ff00)).to.equal(255); - expect(ColorUtils.getBlue(0x00FF00)).to.equal(0); - expect(ColorUtils.getAlpha(0x00ff00)).to.equal(0); - - expect(ColorUtils.toColor(ColorUtils.toRGB("00"), - ColorUtils.toRGB("FF"), ColorUtils.toRGB("00"))).to.equal(65280); - expect(ColorUtils.toColorWithDefaultAlpha(ColorUtils.toRGB("00"), - ColorUtils.toRGB("FF"), ColorUtils.toRGB("00"))).to.equal(-16711936); - expect(ColorUtils.toColorWithAlpha(ColorUtils.toRGB("00"), - ColorUtils.toRGB("ff"), ColorUtils.toRGB("00"), - ColorUtils.toRGB("fF"))).to.equal(-16711936); - - expect(ColorUtils.toColor("A0", "B0", "C0")).to.equal("#A0B0C0"); - expect(ColorUtils.toColorWithDefaultAlpha("A0", "B0", "C0")).to.equal("#FFA0B0C0"); - expect(ColorUtils.toColorShorthand("A0", "B0", "C0")).to.equal("#A0B0C0"); - expect(ColorUtils.toColorShorthand("AA", "BB", "CC")).to.equal("#ABC"); - expect(ColorUtils.toColorShorthandWithDefaultAlpha("A0", "B0", "C0")).to.equal("#FFA0B0C0"); - expect(ColorUtils.toColorShorthandWithDefaultAlpha("AA", "BB", "CC")).to.equal("#FABC"); - expect(ColorUtils.toColorWithAlpha("A0", "B0", "C0", "D0")).to.equal("#D0A0B0C0"); - expect(ColorUtils.toColorShorthandWithAlpha("A0", "B0", "C0", "D0")).to.equal("#D0A0B0C0"); - expect(ColorUtils.toColorShorthandWithAlpha("AA", "BB", "CC", "D0")).to.equal("#D0AABBCC"); - expect(ColorUtils.toColorShorthandWithAlpha("AA", "BB", "CC", "DD")).to.equal("#DABC"); - - expect(ColorUtils.toColor("a0", "b0", "c0")).to.equal("#a0b0c0"); - expect(ColorUtils.toColorWithDefaultAlpha("a0", "b0", "c0")).to.equal("#ffa0b0c0"); - expect(ColorUtils.toColorShorthand("a0", "b0", "c0")).to.equal("#a0b0c0"); - expect(ColorUtils.toColorShorthand("aa", "bb", "cc")).to.equal("#abc"); - expect(ColorUtils.toColorShorthandWithDefaultAlpha("a0", "b0", "c0")).to.equal("#ffa0b0c0"); - expect(ColorUtils.toColorShorthandWithDefaultAlpha("aa", "bb", "cc")).to.equal("#fabc"); - expect(ColorUtils.toColorWithAlpha("a0", "b0", "c0", "d0")).to.equal("#d0a0b0c0"); - expect(ColorUtils.toColorShorthandWithAlpha("a0", "b0", "c0", "d0")).to.equal("#d0a0b0c0"); - expect(ColorUtils.toColorShorthandWithAlpha("aa", "bb", "cc", "d0")).to.equal("#d0aabbcc"); - expect(ColorUtils.toColorShorthandWithAlpha("aa", "bb", "cc", "dd")).to.equal("#dabc"); - - expect(ColorUtils.shorthandHex("10a0d1")).to.equal("10a0d1"); - expect(ColorUtils.shorthandHex("#10a0d1")).to.equal("#10a0d1"); - expect(ColorUtils.shorthandHex("0D0A0B0C")).to.equal("0D0A0B0C"); - expect(ColorUtils.shorthandHex("#0D0a0B0c")).to.equal("#0D0a0B0c"); - expect(ColorUtils.shorthandHex("11aadd")).to.equal("1ad"); - expect(ColorUtils.shorthandHex("#11aADd")).to.equal("#1aD"); - expect(ColorUtils.shorthandHex("DDAABBCC")).to.equal("DABC"); - expect(ColorUtils.shorthandHex("#dDAabBCc")).to.equal("#dAbC"); - - expect(ColorUtils.expandShorthandHex("10a0d1")).to.equal("10a0d1"); - expect(ColorUtils.expandShorthandHex("#10a0d1")).to.equal("#10a0d1"); - expect(ColorUtils.expandShorthandHex("0D0A0B0C")).to.equal("0D0A0B0C"); - expect(ColorUtils.expandShorthandHex("#0D0a0B0c")).to.equal("#0D0a0B0c"); - expect(ColorUtils.expandShorthandHex("1ad")).to.equal("11aadd"); - expect(ColorUtils.expandShorthandHex("#1aD")).to.equal("#11aaDD"); - expect(ColorUtils.expandShorthandHex("DABC")).to.equal("DDAABBCC"); - expect(ColorUtils.expandShorthandHex("#dAbC")).to.equal("#ddAAbbCC"); - - expect(ColorUtils.shorthandHexSingle("10")).to.equal("10"); - expect(ColorUtils.shorthandHexSingle("0A")).to.equal("0A"); - expect(ColorUtils.shorthandHexSingle("dd")).to.equal("d"); - expect(ColorUtils.shorthandHexSingle("cC")).to.equal("c"); - expect(ColorUtils.shorthandHexSingle("Aa")).to.equal("A"); - expect(ColorUtils.shorthandHexSingle("BB")).to.equal("B"); - - expect(ColorUtils.expandShorthandHexSingle("10")).to.equal("10"); - expect(ColorUtils.expandShorthandHexSingle("0A")).to.equal("0A"); - expect(ColorUtils.expandShorthandHexSingle("d")).to.equal("dd"); - expect(ColorUtils.expandShorthandHexSingle("C")).to.equal("CC"); - - let hsl = ColorUtils.toHSL(0, 0, 0); - expect(hsl[0]).to.equal(0.0); - expect(hsl[1]).to.equal(0); - expect(hsl[2]).to.equal(0.0); - - let arithmeticRGB: number[] = ColorUtils.toArithmeticRGBFromHSL(0.0, 0.0, 0.0); - expect(arithmeticRGB[0]).to.equal(ColorUtils.toArithmeticRGB(0)); - expect(arithmeticRGB[1]).to.equal(ColorUtils.toArithmeticRGB(0)); - expect(arithmeticRGB[2]).to.equal(ColorUtils.toArithmeticRGB(0)); - - hsl = ColorUtils.toHSL(255, 0, 0); - expect(hsl[0]).to.equal(0.0); - expect(hsl[1]).to.equal(1.0); - expect(hsl[2]).to.equal(0.5); - - arithmeticRGB = ColorUtils.toArithmeticRGBFromHSL(0.0, 1.0, 0.5); - expect(arithmeticRGB[0]).to.equal(ColorUtils.toArithmeticRGB(255)); - expect(arithmeticRGB[1]).to.equal(ColorUtils.toArithmeticRGB(0)); - expect(arithmeticRGB[2]).to.equal(ColorUtils.toArithmeticRGB(0)); - - hsl = ColorUtils.toHSL(0, 255, 0); - expect(hsl[0]).to.equal(120.0); - expect(hsl[1]).to.equal(1.0); - expect(hsl[2]).to.equal(0.5); - - arithmeticRGB = ColorUtils.toArithmeticRGBFromHSL(120.0, 1.0, 0.5); - expect(arithmeticRGB[0]).to.equal(ColorUtils.toArithmeticRGB(0)); - expect(arithmeticRGB[1]).to.equal(ColorUtils.toArithmeticRGB(255)); - expect(arithmeticRGB[2]).to.equal(ColorUtils.toArithmeticRGB(0)); - - hsl = ColorUtils.toHSL(0, 0, 255); - expect(hsl[0]).to.equal(240.0); - expect(hsl[1]).to.equal(1.0); - expect(hsl[2]).to.equal(0.5); - - arithmeticRGB = ColorUtils.toArithmeticRGBFromHSL(240.0, 1.0, 0.5); - expect(arithmeticRGB[0]).to.equal(ColorUtils.toArithmeticRGB(0)); - expect(arithmeticRGB[1]).to.equal(ColorUtils.toArithmeticRGB(0)); - expect(arithmeticRGB[2]).to.equal(ColorUtils.toArithmeticRGB(255)); - - hsl = ColorUtils.toHSL(255, 255, 255); - expect(hsl[0]).to.equal(0.0); - expect(hsl[1]).to.equal(0.0); - expect(hsl[2]).to.equal(1.0); - - arithmeticRGB = ColorUtils.toArithmeticRGBFromHSL(0.0, 0.0, 1.0); - expect(arithmeticRGB[0]).to.equal(ColorUtils.toArithmeticRGB(255)); - expect(arithmeticRGB[1]).to.equal(ColorUtils.toArithmeticRGB(255)); - expect(arithmeticRGB[2]).to.equal(ColorUtils.toArithmeticRGB(255)); - - hsl = ColorUtils.toHSL(200, 165, 10); - expect(hsl[0]).to.be.approximately(48.94737, 0.00001); - expect(hsl[1]).to.be.approximately(0.9047619, 0.00001); - expect(hsl[2]).to.be.approximately(0.4117647, 0.00001); - - let rgb = ColorUtils.toRGBFromHSL(48.94737, 0.9047619, 0.4117647); - expect(rgb[0]).to.equal(200); - expect(rgb[1]).to.equal(165); - expect(rgb[2]).to.equal(10); - - hsl = ColorUtils.toHSL(52, 113, 82); - expect(hsl[0]).to.be.approximately(149.50821, 0.001); - expect(hsl[1]).to.be.approximately(0.36969694, 0.00001); - expect(hsl[2]).to.be.approximately(0.32352942, 0.00001); - - rgb = ColorUtils.toRGBFromHSL(149.50821, 0.36969694, 0.32352942); - expect(rgb[0]).to.equal(52); - expect(rgb[1]).to.equal(113); - expect(rgb[2]).to.equal(82); - }); -}); \ No newline at end of file + it('test valid', function () { + expect(ColorUtils.isValidHex('000000')).to.be.true; + expect(ColorUtils.isValidHex('#000000')).to.be.true; + expect(ColorUtils.isValidHex('00000000')).to.be.true; + expect(ColorUtils.isValidHex('#00000000')).to.be.true; + expect(ColorUtils.isValidHex('000')).to.be.true; + expect(ColorUtils.isValidHex('#000')).to.be.true; + expect(ColorUtils.isValidHex('0000')).to.be.true; + expect(ColorUtils.isValidHex('#0000')).to.be.true; + expect(ColorUtils.isValidHex('FFFFFF')).to.be.true; + expect(ColorUtils.isValidHex('#FFFFFF')).to.be.true; + expect(ColorUtils.isValidHex('FFFFFFFF')).to.be.true; + expect(ColorUtils.isValidHex('#ffffffff')).to.be.true; + expect(ColorUtils.isValidHex('FfF')).to.be.true; + expect(ColorUtils.isValidHex('#fFf')).to.be.true; + expect(ColorUtils.isValidHex('ffff')).to.be.true; + expect(ColorUtils.isValidHex('#fFfF')).to.be.true; + + expect(ColorUtils.isValidHex(null)).to.be.false; + expect(ColorUtils.isValidHex('')).to.be.false; + + expect(ColorUtils.isValidHex('00000')).to.be.false; + expect(ColorUtils.isValidHex('0000000')).to.be.false; + expect(ColorUtils.isValidHex('#00000')).to.be.false; + expect(ColorUtils.isValidHex('#0000000')).to.be.false; + expect(ColorUtils.isValidHex('000000000')).to.be.false; + expect(ColorUtils.isValidHex('#000000000')).to.be.false; + expect(ColorUtils.isValidHex('00')).to.be.false; + expect(ColorUtils.isValidHex('#00')).to.be.false; + expect(ColorUtils.isValidHex('FFFFF')).to.be.false; + expect(ColorUtils.isValidHex('FFFFFFF')).to.be.false; + expect(ColorUtils.isValidHex('#FFFFF')).to.be.false; + expect(ColorUtils.isValidHex('#FFFFFFF')).to.be.false; + expect(ColorUtils.isValidHex('FFFFFFFFF')).to.be.false; + expect(ColorUtils.isValidHex('#FFFFFFFFF')).to.be.false; + expect(ColorUtils.isValidHex('FF')).to.be.false; + expect(ColorUtils.isValidHex('#FF')).to.be.false; + + expect(ColorUtils.isValidHex('G00000')).to.be.false; + expect(ColorUtils.isValidHex('#00000H')).to.be.false; + expect(ColorUtils.isValidHex('000i0000')).to.be.false; + expect(ColorUtils.isValidHex('#0000J000')).to.be.false; + expect(ColorUtils.isValidHex('00K')).to.be.false; + expect(ColorUtils.isValidHex('#0l0')).to.be.false; + expect(ColorUtils.isValidHex('0M00')).to.be.false; + expect(ColorUtils.isValidHex('#n000')).to.be.false; + expect(ColorUtils.isValidHex('FFGFFF')).to.be.false; + expect(ColorUtils.isValidHex('#FFFHFF')).to.be.false; + expect(ColorUtils.isValidHex('iFFFFFFF')).to.be.false; + expect(ColorUtils.isValidHex('#FFFFFFFj')).to.be.false; + expect(ColorUtils.isValidHex('FFK')).to.be.false; + expect(ColorUtils.isValidHex('#LFF')).to.be.false; + expect(ColorUtils.isValidHex('FFmF')).to.be.false; + expect(ColorUtils.isValidHex('#FnFF')).to.be.false; + + expect(ColorUtils.isValidHexSingle('00')).to.be.true; + expect(ColorUtils.isValidHexSingle('FF')).to.be.true; + expect(ColorUtils.isValidHexSingle('ff')).to.be.true; + expect(ColorUtils.isValidHexSingle('aB')).to.be.true; + expect(ColorUtils.isValidHexSingle('C5')).to.be.true; + expect(ColorUtils.isValidHexSingle('d')).to.be.true; + expect(ColorUtils.isValidHexSingle('E')).to.be.true; + expect(ColorUtils.isValidHexSingle('4')).to.be.true; + + expect(ColorUtils.isValidHexSingle(null)).to.be.false; + expect(ColorUtils.isValidHexSingle('')).to.be.false; + + expect(ColorUtils.isValidHexSingle('000')).to.be.false; + expect(ColorUtils.isValidHexSingle('0ff')).to.be.false; + expect(ColorUtils.isValidHexSingle('G0')).to.be.false; + expect(ColorUtils.isValidHexSingle('#00')).to.be.false; + + expect(ColorUtils.isValidRGB(-1)).to.be.false; + expect(ColorUtils.isValidRGB(0)).to.be.true; + expect(ColorUtils.isValidRGB(128)).to.be.true; + expect(ColorUtils.isValidRGB(255)).to.be.true; + expect(ColorUtils.isValidRGB(256)).to.be.false; + + expect(ColorUtils.isValidArithmeticRGB(0.0 - 0.0000001)).to.be.false; + expect(ColorUtils.isValidArithmeticRGB(0.0)).to.be.true; + expect(ColorUtils.isValidArithmeticRGB(0.5)).to.be.true; + expect(ColorUtils.isValidArithmeticRGB(1.0)).to.be.true; + expect(ColorUtils.isValidArithmeticRGB(1.0 + 0.0000001)).to.be.false; + + expect(ColorUtils.isValidHue(-0.0001)).to.be.false; + expect(ColorUtils.isValidHue(0.0)).to.be.true; + expect(ColorUtils.isValidHue(180.0)).to.be.true; + expect(ColorUtils.isValidHue(360.0)).to.be.true; + expect(ColorUtils.isValidHue(360.0001)).to.be.false; + + expect(ColorUtils.isValidSaturation(-0.0001)).to.be.false; + expect(ColorUtils.isValidSaturation(0.0)).to.be.true; + expect(ColorUtils.isValidSaturation(0.5)).to.be.true; + expect(ColorUtils.isValidSaturation(1.0)).to.be.true; + expect(ColorUtils.isValidSaturation(1.0001)).to.be.false; + + expect(ColorUtils.isValidLightness(-0.0001)).to.be.false; + expect(ColorUtils.isValidLightness(0.0)).to.be.true; + expect(ColorUtils.isValidLightness(0.5)).to.be.true; + expect(ColorUtils.isValidLightness(1.0)).to.be.true; + expect(ColorUtils.isValidLightness(1.0001)).to.be.false; + }); + + it('test utils', function () { + expect(ColorUtils.toArithmeticRGB(95)).to.be.approximately(0.37254903, 0.0000001); + expect(ColorUtils.toRGB(ColorUtils.toArithmeticRGB(95))).to.equal(95); + expect(ColorUtils.toRGB('5F')).to.equal(95); + expect(ColorUtils.toArithmeticRGB('5F')).to.be.approximately(0.37254903, 0.0000001); + + expect(ColorUtils.toRGB('00')).to.equal(0); + expect(ColorUtils.toArithmeticRGB('00')).to.be.approximately(0.0, 0.0); + expect(ColorUtils.toRGB('80')).to.equal(128); + expect(ColorUtils.toArithmeticRGB('80')).to.be.approximately(0.5019608, 0.0000001); + expect(ColorUtils.toRGB('FF')).to.equal(255); + expect(ColorUtils.toArithmeticRGB('FF')).to.be.approximately(1.0, 0.0); + expect(ColorUtils.toRGB('ff')).to.equal(255); + expect(ColorUtils.toArithmeticRGB('ff')).to.be.approximately(1.0, 0.0); + expect(ColorUtils.toRGB('f')).to.equal(255); + expect(ColorUtils.toArithmeticRGB('f')).to.be.approximately(1.0, 0.0); + + expect(ColorUtils.toHex(0)).to.equal('00'); + expect(ColorUtils.toHex(0.0)).to.equal('00'); + expect(ColorUtils.toHex(6)).to.equal('06'); + expect(ColorUtils.toHex(0.02352941176)).to.equal('06'); + expect(ColorUtils.toHex(128)).to.equal('80'); + expect(ColorUtils.toHex(0.5)).to.equal('80'); + expect(ColorUtils.toHex(255)).to.equal('FF'); + expect(ColorUtils.toHex(1.0)).to.equal('FF'); + + expect(ColorUtils.getRed('A1B2C3')).to.equal('A1'); + expect(ColorUtils.getGreen('a1b2c3')).to.equal('b2'); + expect(ColorUtils.getBlue('a1b2C3')).to.equal('C3'); + expect(ColorUtils.getAlpha('A1B2C3')).to.be.null; + expect(ColorUtils.getRed('D4A1B2C3')).to.equal('A1'); + expect(ColorUtils.getGreen('d4a1b2c3')).to.equal('b2'); + expect(ColorUtils.getBlue('d4a1b2C3')).to.equal('C3'); + expect(ColorUtils.getAlpha('DdA1B2C3')).to.equal('Dd'); + + expect(ColorUtils.getRed('#A1B2C3')).to.equal('A1'); + expect(ColorUtils.getGreen('#a1b2c3')).to.equal('b2'); + expect(ColorUtils.getBlue('#a1b2C3')).to.equal('C3'); + expect(ColorUtils.getAlpha('#A1B2C3')).to.be.null; + expect(ColorUtils.getRed('#D4A1B2C3')).to.equal('A1'); + expect(ColorUtils.getGreen('#d4a1b2c3')).to.equal('b2'); + expect(ColorUtils.getBlue('#d4a1b2C3')).to.equal('C3'); + expect(ColorUtils.getAlpha('#dDA1B2C3')).to.equal('dD'); + + expect(ColorUtils.getRed('ABC')).to.equal('AA'); + expect(ColorUtils.getGreen('abc')).to.equal('bb'); + expect(ColorUtils.getBlue('abC')).to.equal('CC'); + expect(ColorUtils.getAlpha('ABC')).to.be.null; + expect(ColorUtils.getRed('DABC')).to.equal('AA'); + expect(ColorUtils.getGreen('dabc')).to.equal('bb'); + expect(ColorUtils.getBlue('dabC')).to.equal('CC'); + expect(ColorUtils.getAlpha('DABC')).to.equal('DD'); + + expect(ColorUtils.getRed('#ABC')).to.equal('AA'); + expect(ColorUtils.getGreen('#abc')).to.equal('bb'); + expect(ColorUtils.getBlue('#abC')).to.equal('CC'); + expect(ColorUtils.getAlpha('#ABC')).to.be.null; + expect(ColorUtils.getRed('#DABC')).to.equal('AA'); + expect(ColorUtils.getGreen('#dabc')).to.equal('bb'); + expect(ColorUtils.getBlue('#dabC')).to.equal('CC'); + expect(ColorUtils.getAlpha('#DABC')).to.equal('DD'); + + expect(ColorUtils.getRed('010203')).to.equal('01'); + expect(ColorUtils.getGreen('010203')).to.equal('02'); + expect(ColorUtils.getBlue('010203')).to.equal('03'); + expect(ColorUtils.getAlpha('010203')).to.be.null; + expect(ColorUtils.getRed('04010203')).to.equal('01'); + expect(ColorUtils.getGreen('04010203')).to.equal('02'); + expect(ColorUtils.getBlue('04010203')).to.equal('03'); + expect(ColorUtils.getAlpha('04010203')).to.equal('04'); + + expect(ColorUtils.getRed('#010203')).to.equal('01'); + expect(ColorUtils.getGreen('#010203')).to.equal('02'); + expect(ColorUtils.getBlue('#010203')).to.equal('03'); + expect(ColorUtils.getAlpha('#010203')).to.be.null; + expect(ColorUtils.getRed('#04010203')).to.equal('01'); + expect(ColorUtils.getGreen('#04010203')).to.equal('02'); + expect(ColorUtils.getBlue('#04010203')).to.equal('03'); + expect(ColorUtils.getAlpha('#04010203')).to.equal('04'); + + expect(ColorUtils.getRed('123')).to.equal('11'); + expect(ColorUtils.getGreen('123')).to.equal('22'); + expect(ColorUtils.getBlue('123')).to.equal('33'); + expect(ColorUtils.getAlpha('123')).to.be.null; + expect(ColorUtils.getRed('4123')).to.equal('11'); + expect(ColorUtils.getGreen('4123')).to.equal('22'); + expect(ColorUtils.getBlue('4123')).to.equal('33'); + expect(ColorUtils.getAlpha('4123')).to.equal('44'); + + expect(ColorUtils.getRed('#123')).to.equal('11'); + expect(ColorUtils.getGreen('#123')).to.equal('22'); + expect(ColorUtils.getBlue('#123')).to.equal('33'); + expect(ColorUtils.getAlpha('#123')).to.be.null; + expect(ColorUtils.getRed('#4123')).to.equal('11'); + expect(ColorUtils.getGreen('#4123')).to.equal('22'); + expect(ColorUtils.getBlue('#4123')).to.equal('33'); + expect(ColorUtils.getAlpha('#4123')).to.equal('44'); + + expect(ColorUtils.getRed('112233')).to.equal('11'); + expect(ColorUtils.getGreen('112233')).to.equal('22'); + expect(ColorUtils.getBlue('112233')).to.equal('33'); + expect(ColorUtils.getAlpha('112233')).to.be.null; + expect(ColorUtils.getRed('44112233')).to.equal('11'); + expect(ColorUtils.getGreen('44112233')).to.equal('22'); + expect(ColorUtils.getBlue('44112233')).to.equal('33'); + expect(ColorUtils.getAlpha('44112233')).to.equal('44'); + + expect(ColorUtils.getRed('#112233')).to.equal('11'); + expect(ColorUtils.getGreen('#112233')).to.equal('22'); + expect(ColorUtils.getBlue('#112233')).to.equal('33'); + expect(ColorUtils.getAlpha('#112233')).to.be.null; + expect(ColorUtils.getRed('#44112233')).to.equal('11'); + expect(ColorUtils.getGreen('#44112233')).to.equal('22'); + expect(ColorUtils.getBlue('#44112233')).to.equal('33'); + expect(ColorUtils.getAlpha('#44112233')).to.equal('44'); + + expect(ColorUtils.getRed(-16711936)).to.equal(0); + expect(ColorUtils.getGreen(-16711936)).to.equal(255); + expect(ColorUtils.getBlue(-16711936)).to.equal(0); + expect(ColorUtils.getAlpha(-16711936)).to.equal(255); + + expect(ColorUtils.getRed(0xff00ff00)).to.equal(0); + expect(ColorUtils.getGreen(0xff00ff00)).to.equal(255); + expect(ColorUtils.getBlue(0xff00ff00)).to.equal(0); + expect(ColorUtils.getAlpha(0xff00ff00)).to.equal(255); + + expect(ColorUtils.getRed(65280)).to.equal(0); + expect(ColorUtils.getGreen(65280)).to.equal(255); + expect(ColorUtils.getBlue(65280)).to.equal(0); + expect(ColorUtils.getAlpha(65280)).to.equal(0); + + expect(ColorUtils.getRed(0x00ff00)).to.equal(0); + expect(ColorUtils.getGreen(0x00ff00)).to.equal(255); + expect(ColorUtils.getBlue(0x00ff00)).to.equal(0); + expect(ColorUtils.getAlpha(0x00ff00)).to.equal(0); + + expect(ColorUtils.toColor(ColorUtils.toRGB('00'), ColorUtils.toRGB('FF'), ColorUtils.toRGB('00'))).to.equal(65280); + expect( + ColorUtils.toColorWithDefaultAlpha(ColorUtils.toRGB('00'), ColorUtils.toRGB('FF'), ColorUtils.toRGB('00')), + ).to.equal(-16711936); + expect( + ColorUtils.toColorWithAlpha( + ColorUtils.toRGB('00'), + ColorUtils.toRGB('ff'), + ColorUtils.toRGB('00'), + ColorUtils.toRGB('fF'), + ), + ).to.equal(-16711936); + + expect(ColorUtils.toColor('A0', 'B0', 'C0')).to.equal('#A0B0C0'); + expect(ColorUtils.toColorWithDefaultAlpha('A0', 'B0', 'C0')).to.equal('#FFA0B0C0'); + expect(ColorUtils.toColorShorthand('A0', 'B0', 'C0')).to.equal('#A0B0C0'); + expect(ColorUtils.toColorShorthand('AA', 'BB', 'CC')).to.equal('#ABC'); + expect(ColorUtils.toColorShorthandWithDefaultAlpha('A0', 'B0', 'C0')).to.equal('#FFA0B0C0'); + expect(ColorUtils.toColorShorthandWithDefaultAlpha('AA', 'BB', 'CC')).to.equal('#FABC'); + expect(ColorUtils.toColorWithAlpha('A0', 'B0', 'C0', 'D0')).to.equal('#D0A0B0C0'); + expect(ColorUtils.toColorShorthandWithAlpha('A0', 'B0', 'C0', 'D0')).to.equal('#D0A0B0C0'); + expect(ColorUtils.toColorShorthandWithAlpha('AA', 'BB', 'CC', 'D0')).to.equal('#D0AABBCC'); + expect(ColorUtils.toColorShorthandWithAlpha('AA', 'BB', 'CC', 'DD')).to.equal('#DABC'); + + expect(ColorUtils.toColor('a0', 'b0', 'c0')).to.equal('#a0b0c0'); + expect(ColorUtils.toColorWithDefaultAlpha('a0', 'b0', 'c0')).to.equal('#ffa0b0c0'); + expect(ColorUtils.toColorShorthand('a0', 'b0', 'c0')).to.equal('#a0b0c0'); + expect(ColorUtils.toColorShorthand('aa', 'bb', 'cc')).to.equal('#abc'); + expect(ColorUtils.toColorShorthandWithDefaultAlpha('a0', 'b0', 'c0')).to.equal('#ffa0b0c0'); + expect(ColorUtils.toColorShorthandWithDefaultAlpha('aa', 'bb', 'cc')).to.equal('#fabc'); + expect(ColorUtils.toColorWithAlpha('a0', 'b0', 'c0', 'd0')).to.equal('#d0a0b0c0'); + expect(ColorUtils.toColorShorthandWithAlpha('a0', 'b0', 'c0', 'd0')).to.equal('#d0a0b0c0'); + expect(ColorUtils.toColorShorthandWithAlpha('aa', 'bb', 'cc', 'd0')).to.equal('#d0aabbcc'); + expect(ColorUtils.toColorShorthandWithAlpha('aa', 'bb', 'cc', 'dd')).to.equal('#dabc'); + + expect(ColorUtils.shorthandHex('10a0d1')).to.equal('10a0d1'); + expect(ColorUtils.shorthandHex('#10a0d1')).to.equal('#10a0d1'); + expect(ColorUtils.shorthandHex('0D0A0B0C')).to.equal('0D0A0B0C'); + expect(ColorUtils.shorthandHex('#0D0a0B0c')).to.equal('#0D0a0B0c'); + expect(ColorUtils.shorthandHex('11aadd')).to.equal('1ad'); + expect(ColorUtils.shorthandHex('#11aADd')).to.equal('#1aD'); + expect(ColorUtils.shorthandHex('DDAABBCC')).to.equal('DABC'); + expect(ColorUtils.shorthandHex('#dDAabBCc')).to.equal('#dAbC'); + + expect(ColorUtils.expandShorthandHex('10a0d1')).to.equal('10a0d1'); + expect(ColorUtils.expandShorthandHex('#10a0d1')).to.equal('#10a0d1'); + expect(ColorUtils.expandShorthandHex('0D0A0B0C')).to.equal('0D0A0B0C'); + expect(ColorUtils.expandShorthandHex('#0D0a0B0c')).to.equal('#0D0a0B0c'); + expect(ColorUtils.expandShorthandHex('1ad')).to.equal('11aadd'); + expect(ColorUtils.expandShorthandHex('#1aD')).to.equal('#11aaDD'); + expect(ColorUtils.expandShorthandHex('DABC')).to.equal('DDAABBCC'); + expect(ColorUtils.expandShorthandHex('#dAbC')).to.equal('#ddAAbbCC'); + + expect(ColorUtils.shorthandHexSingle('10')).to.equal('10'); + expect(ColorUtils.shorthandHexSingle('0A')).to.equal('0A'); + expect(ColorUtils.shorthandHexSingle('dd')).to.equal('d'); + expect(ColorUtils.shorthandHexSingle('cC')).to.equal('c'); + expect(ColorUtils.shorthandHexSingle('Aa')).to.equal('A'); + expect(ColorUtils.shorthandHexSingle('BB')).to.equal('B'); + + expect(ColorUtils.expandShorthandHexSingle('10')).to.equal('10'); + expect(ColorUtils.expandShorthandHexSingle('0A')).to.equal('0A'); + expect(ColorUtils.expandShorthandHexSingle('d')).to.equal('dd'); + expect(ColorUtils.expandShorthandHexSingle('C')).to.equal('CC'); + + let hsl = ColorUtils.toHSL(0, 0, 0); + expect(hsl[0]).to.equal(0.0); + expect(hsl[1]).to.equal(0); + expect(hsl[2]).to.equal(0.0); + + let arithmeticRGB: number[] = ColorUtils.toArithmeticRGBFromHSL(0.0, 0.0, 0.0); + expect(arithmeticRGB[0]).to.equal(ColorUtils.toArithmeticRGB(0)); + expect(arithmeticRGB[1]).to.equal(ColorUtils.toArithmeticRGB(0)); + expect(arithmeticRGB[2]).to.equal(ColorUtils.toArithmeticRGB(0)); + + hsl = ColorUtils.toHSL(255, 0, 0); + expect(hsl[0]).to.equal(0.0); + expect(hsl[1]).to.equal(1.0); + expect(hsl[2]).to.equal(0.5); + + arithmeticRGB = ColorUtils.toArithmeticRGBFromHSL(0.0, 1.0, 0.5); + expect(arithmeticRGB[0]).to.equal(ColorUtils.toArithmeticRGB(255)); + expect(arithmeticRGB[1]).to.equal(ColorUtils.toArithmeticRGB(0)); + expect(arithmeticRGB[2]).to.equal(ColorUtils.toArithmeticRGB(0)); + + hsl = ColorUtils.toHSL(0, 255, 0); + expect(hsl[0]).to.equal(120.0); + expect(hsl[1]).to.equal(1.0); + expect(hsl[2]).to.equal(0.5); + + arithmeticRGB = ColorUtils.toArithmeticRGBFromHSL(120.0, 1.0, 0.5); + expect(arithmeticRGB[0]).to.equal(ColorUtils.toArithmeticRGB(0)); + expect(arithmeticRGB[1]).to.equal(ColorUtils.toArithmeticRGB(255)); + expect(arithmeticRGB[2]).to.equal(ColorUtils.toArithmeticRGB(0)); + + hsl = ColorUtils.toHSL(0, 0, 255); + expect(hsl[0]).to.equal(240.0); + expect(hsl[1]).to.equal(1.0); + expect(hsl[2]).to.equal(0.5); + + arithmeticRGB = ColorUtils.toArithmeticRGBFromHSL(240.0, 1.0, 0.5); + expect(arithmeticRGB[0]).to.equal(ColorUtils.toArithmeticRGB(0)); + expect(arithmeticRGB[1]).to.equal(ColorUtils.toArithmeticRGB(0)); + expect(arithmeticRGB[2]).to.equal(ColorUtils.toArithmeticRGB(255)); + + hsl = ColorUtils.toHSL(255, 255, 255); + expect(hsl[0]).to.equal(0.0); + expect(hsl[1]).to.equal(0.0); + expect(hsl[2]).to.equal(1.0); + + arithmeticRGB = ColorUtils.toArithmeticRGBFromHSL(0.0, 0.0, 1.0); + expect(arithmeticRGB[0]).to.equal(ColorUtils.toArithmeticRGB(255)); + expect(arithmeticRGB[1]).to.equal(ColorUtils.toArithmeticRGB(255)); + expect(arithmeticRGB[2]).to.equal(ColorUtils.toArithmeticRGB(255)); + + hsl = ColorUtils.toHSL(200, 165, 10); + expect(hsl[0]).to.be.approximately(48.94737, 0.00001); + expect(hsl[1]).to.be.approximately(0.9047619, 0.00001); + expect(hsl[2]).to.be.approximately(0.4117647, 0.00001); + + let rgb = ColorUtils.toRGBFromHSL(48.94737, 0.9047619, 0.4117647); + expect(rgb[0]).to.equal(200); + expect(rgb[1]).to.equal(165); + expect(rgb[2]).to.equal(10); + + hsl = ColorUtils.toHSL(52, 113, 82); + expect(hsl[0]).to.be.approximately(149.50821, 0.001); + expect(hsl[1]).to.be.approximately(0.36969694, 0.00001); + expect(hsl[2]).to.be.approximately(0.32352942, 0.00001); + + rgb = ColorUtils.toRGBFromHSL(149.50821, 0.36969694, 0.32352942); + expect(rgb[0]).to.equal(52); + expect(rgb[1]).to.equal(113); + expect(rgb[2]).to.equal(82); + }); +}); diff --git a/test/ReadmeTest.ts b/test/ReadmeTest.ts index 0a450b7..b18c70a 100644 --- a/test/ReadmeTest.ts +++ b/test/ReadmeTest.ts @@ -1,64 +1,63 @@ -import { Color } from "../dist/Color"; -import { ColorConstants } from "../dist/ColorConstants"; +import { Color } from '../src/Color'; +import { ColorConstants } from '../src/ColorConstants'; describe('Used for README', function () { + it('test color', function () { + const rgb: Color = new Color(); + rgb.setRGB(154, 205, 50); + const rgba: Color = new Color(); + rgba.setRGB(255, 165, 0); + rgba.setAlpha(64); + const rgbOpacity: Color = new Color(); + rgbOpacity.setRGB(255, 165, 0); + rgbOpacity.setOpacity(0.25); + const arithmeticRGB: Color = new Color(); + arithmeticRGB.setRGB(1.0, 0.64705882352, 0.0); + const arithmeticRGBOpacity: Color = new Color(); + arithmeticRGBOpacity.setRGB(1.0, 0.64705882352, 0.0); + arithmeticRGBOpacity.setOpacity(0.25098039215); + const hex: Color = Color.color('#BA55D3'); + const hexAlpha: Color = Color.color('#D9FFFF00'); + const hexInteger: Color = new Color(); + hexInteger.setColor(0xffc000); + const hexIntegerAlpha: Color = new Color(); + hexIntegerAlpha.setColor(0x40ffa500); + const integer: Color = new Color(); + integer.setColor(16711680); + const integerAlpha: Color = new Color(); + integerAlpha.setColor(-12303292); + const hexSingles: Color = new Color(); + hexSingles.setRGB('FF', 'C0', 'CB'); + const hexSinglesAlpha: Color = new Color(); + hexSinglesAlpha.setRGB('00', '00', '00', '80'); + const hexSinglesOpacity: Color = new Color(); + hexSinglesOpacity.setRGB('FF', 'A5', '00'); + hexSinglesOpacity.setOpacity(0.25); + const hsl: Color = new Color(); + hsl.setColorByHSL(300.0, 1.0, 0.2509804); + const hsla: Color = new Color(); + hsla.setColorByHSL(60.0, 1.0, 0.5, 0.85098039215); + const orangeAlpha: Color = Color.color(ColorConstants.ORANGE); + orangeAlpha.setAlpha(120); + const orangeOpacity: Color = Color.color(ColorConstants.ORANGE); + orangeOpacity.setOpacity(0.25); - it('test color', function () { - const rgb: Color = new Color(); - rgb.setRGB(154, 205, 50); - const rgba: Color = new Color(); - rgba.setRGB(255, 165, 0); - rgba.setAlpha(64); - const rgbOpacity: Color = new Color(); - rgbOpacity.setRGB(255, 165, 0); - rgbOpacity.setOpacity(0.25); - const arithmeticRGB: Color = new Color(); - arithmeticRGB.setRGB(1.0, 0.64705882352, 0.0); - const arithmeticRGBOpacity: Color = new Color(); - arithmeticRGBOpacity.setRGB(1.0, 0.64705882352, 0.0); - arithmeticRGBOpacity.setOpacity(0.25098039215); - const hex: Color = Color.color("#BA55D3"); - const hexAlpha: Color = Color.color("#D9FFFF00"); - const hexInteger: Color = new Color(); - hexInteger.setColor(0xFFC000); - const hexIntegerAlpha: Color = new Color(); - hexIntegerAlpha.setColor(0x40FFA500); - const integer: Color = new Color(); - integer.setColor(16711680); - const integerAlpha: Color = new Color(); - integerAlpha.setColor(-12303292); - const hexSingles: Color = new Color(); - hexSingles.setRGB("FF", "C0", "CB"); - const hexSinglesAlpha: Color = new Color(); - hexSinglesAlpha.setRGB("00", "00", "00", "80") - const hexSinglesOpacity: Color = new Color(); - hexSinglesOpacity.setRGB("FF", "A5", "00"); - hexSinglesOpacity.setOpacity(0.25); - const hsl: Color = new Color(); - hsl.setColorByHSL(300.0, 1.0, 0.2509804); - const hsla: Color = new Color(); - hsla.setColorByHSL(60.0, 1.0, 0.5, 0.85098039215); - const orangeAlpha: Color = Color.color(ColorConstants.ORANGE); - orangeAlpha.setAlpha(120); - const orangeOpacity: Color = Color.color(ColorConstants.ORANGE); - orangeOpacity.setOpacity(0.25); - - const color = Color.blue(); - color.setAlpha(56); - const hexValue: string = color.getColorHex(); - const hexShorthand: string = color.getColorHexShorthand(); - const hexWithAlpha: string = color.getColorHexWithAlpha(); - const hexShorthandWithAlpha: string = color.getColorHexShorthandWithAlpha(); - const integerValue: number = color.getColor(); - const integerAlphaValue: number = color.getColorWithAlpha(); - const red: number = color.getRed(); - const greenArithmetic: number = color.getGreenArithmetic(); - const blueHex: string = color.getBlueHex(); - const alphaHexShorthand: string = color.getAlphaHexShorthand(); - const opacity: number = color.getOpacity(); - const hslValue: number[] = color.getHSL(); - const hue: number = color.getHue(); - const saturation: number = color.getSaturation(); - const lightness: number = color.getLightness(); - }); -}) \ No newline at end of file + const color = Color.blue(); + color.setAlpha(56); + const hexValue: string = color.getColorHex(); + const hexShorthand: string = color.getColorHexShorthand(); + const hexWithAlpha: string = color.getColorHexWithAlpha(); + const hexShorthandWithAlpha: string = color.getColorHexShorthandWithAlpha(); + const integerValue: number = color.getColor(); + const integerAlphaValue: number = color.getColorWithAlpha(); + const red: number = color.getRed(); + const greenArithmetic: number = color.getGreenArithmetic(); + const blueHex: string = color.getBlueHex(); + const alphaHexShorthand: string = color.getAlphaHexShorthand(); + const opacity: number = color.getOpacity(); + const hslValue: number[] = color.getHSL(); + const hue: number = color.getHue(); + const saturation: number = color.getSaturation(); + const lightness: number = color.getLightness(); + }); +}); diff --git a/test/tsconfig.json b/test/tsconfig.json deleted file mode 100644 index 877a2a8..0000000 --- a/test/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../tsconfig", - "include": [ - "**/*" - ], - "references": [ - { "path": "../lib" } - ], - "compilerOptions": { - "composite": true, - "rootDir": ".", - "outDir": "../test-dist", - "typeRoots": [ - "./@types.test", - "../src/@types", - "../node_modules/@types" - ] - } - } \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 9886fc0..7789f7d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,27 +1,27 @@ { - "include": [], - "references": [], - "exclude": [], - "compilerOptions": { + "compilerOptions": { /* Basic Options */ - "target": "ES2016", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ + // "incremental": true, /* Enable incremental compilation */ + "target": "ES5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - "lib": [ "ES2019", "DOM" ], /* Specify library files to be included in the compilation. */ - "allowJs": true, /* Allow javascript files to be compiled. */ + "lib": ["DOM", "ES2015"], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ "declaration": true, /* Generates corresponding '.d.ts' file. */ "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ "sourceMap": true, /* Generates corresponding '.map' file. */ // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./lib", /* Redirect output structure to the directory. */ - // "rootDir": ".", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - "composite": true, /* Enable project compilation */ + "outDir": "./dist", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ // "removeComments": true, /* Do not emit comments to output. */ // "noEmit": true, /* Do not emit outputs. */ // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + /* Strict Type-Checking Options */ "strict": true, /* Enable all strict type-checking options. */ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ @@ -31,32 +31,46 @@ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - + /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - + "noUnusedLocals": false, /* Report errors on unused locals. */ + "noUnusedParameters": false, /* Report errors on unused parameters. */ + "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + /* Module Resolution Options */ - "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ // "typeRoots": [], /* List of folders to include type definitions from. */ // "types": [], /* Type declaration files to be included in compilation. */ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + /* Source Map Options */ // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - + /* Experimental Options */ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - } - } \ No newline at end of file + "stripInternal": true, + + /* Advanced Options */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + }, + "exclude": [ + "**/*.d.ts", + "build", + "node_modules/typedoc-plugin-external-module-name" + ], + "include": [ + "src", + "test" + ] +} \ No newline at end of file diff --git a/tslint.json b/tslint.json new file mode 100644 index 0000000..17c6708 --- /dev/null +++ b/tslint.json @@ -0,0 +1,11 @@ +{ + "extends": ["tslint:recommended", "tslint-config-prettier"], + "linterOptions": { + "exclude": [ + "test/*.ts" + ] + }, + "rules": { + "no-bitwise": false + } +} \ No newline at end of file