├── .eslintrc.json ├── .github ├── eslint.json └── workflows │ └── node.js.yml ├── .gitignore ├── LICENSE ├── README.md ├── img ├── cubehelix.png ├── cubehelixGamma.png ├── cubehelixGammaLong.png ├── cubehelixLong.png ├── hcl.png ├── hclLong.png ├── hsl.png ├── hslLong.png ├── lab.png ├── rgb.png └── rgbGamma.png ├── package.json ├── rollup.config.js ├── src ├── array.js ├── basis.js ├── basisClosed.js ├── color.js ├── constant.js ├── cubehelix.js ├── date.js ├── discrete.js ├── hcl.js ├── hsl.js ├── hue.js ├── index.js ├── lab.js ├── number.js ├── numberArray.js ├── object.js ├── piecewise.js ├── quantize.js ├── rgb.js ├── round.js ├── string.js ├── transform │ ├── decompose.js │ ├── index.js │ └── parse.js ├── value.js └── zoom.js ├── test ├── .eslintrc.json ├── array-test.js ├── asserts.js ├── cubehelix-test.js ├── cubehelixLong-test.js ├── date-test.js ├── discrete-test.js ├── hcl-test.js ├── hclLong-test.js ├── hsl-test.js ├── hslLong-test.js ├── hue-test.js ├── lab-test.js ├── number-test.js ├── numberArray-test.js ├── object-test.js ├── piecewise-test.js ├── quantize-test.js ├── rgb-test.js ├── round-test.js ├── string-test.js ├── transformCss-test.js ├── value-test.js └── zoom-test.js └── yarn.lock /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint:recommended", 3 | "parserOptions": { 4 | "sourceType": "module", 5 | "ecmaVersion": 8 6 | }, 7 | "env": { 8 | "es6": true 9 | }, 10 | "rules": { 11 | "no-cond-assign": 0 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.github/eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "problemMatcher": [ 3 | { 4 | "owner": "eslint-compact", 5 | "pattern": [ 6 | { 7 | "regexp": "^(.+):\\sline\\s(\\d+),\\scol\\s(\\d+),\\s(Error|Warning|Info)\\s-\\s(.+)\\s\\((.+)\\)$", 8 | "file": 1, 9 | "line": 2, 10 | "column": 3, 11 | "severity": 4, 12 | "message": 5, 13 | "code": 6 14 | } 15 | ] 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /.github/workflows/node.js.yml: -------------------------------------------------------------------------------- 1 | # https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 2 | 3 | name: Node.js CI 4 | 5 | on: 6 | push: 7 | branches: [ main ] 8 | pull_request: 9 | branches: [ main ] 10 | 11 | jobs: 12 | build: 13 | 14 | runs-on: ubuntu-latest 15 | 16 | strategy: 17 | matrix: 18 | node-version: [14.x] 19 | 20 | steps: 21 | - uses: actions/checkout@v2 22 | - name: Use Node.js ${{ matrix.node-version }} 23 | uses: actions/setup-node@v1 24 | with: 25 | node-version: ${{ matrix.node-version }} 26 | - run: yarn --frozen-lockfile 27 | - run: | 28 | echo ::add-matcher::.github/eslint.json 29 | yarn run eslint src test --format=compact 30 | - run: yarn test 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.sublime-workspace 2 | .DS_Store 3 | dist/ 4 | node_modules 5 | npm-debug.log 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2010-2021 Mike Bostock 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any purpose 4 | with or without fee is hereby granted, provided that the above copyright notice 5 | and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 8 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 9 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 10 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 11 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 12 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 13 | THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # d3-interpolate 2 | 3 | 4 | 5 | This module provides a variety of interpolation methods for blending between two values. Values may be numbers, colors, strings, arrays, or even deeply-nested objects. 6 | 7 | ## Resources 8 | 9 | - [Documentation](https://d3js.org/d3-interpolate) 10 | - [Examples](https://observablehq.com/collection/@d3/d3-interpolate) 11 | - [Releases](https://github.com/d3/d3-interpolate/releases) 12 | - [Getting help](https://d3js.org/community) 13 | -------------------------------------------------------------------------------- /img/cubehelix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-interpolate/2eeffc0d02f2947552cf0a0b73bdf26fe90e1c28/img/cubehelix.png -------------------------------------------------------------------------------- /img/cubehelixGamma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-interpolate/2eeffc0d02f2947552cf0a0b73bdf26fe90e1c28/img/cubehelixGamma.png -------------------------------------------------------------------------------- /img/cubehelixGammaLong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-interpolate/2eeffc0d02f2947552cf0a0b73bdf26fe90e1c28/img/cubehelixGammaLong.png -------------------------------------------------------------------------------- /img/cubehelixLong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-interpolate/2eeffc0d02f2947552cf0a0b73bdf26fe90e1c28/img/cubehelixLong.png -------------------------------------------------------------------------------- /img/hcl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-interpolate/2eeffc0d02f2947552cf0a0b73bdf26fe90e1c28/img/hcl.png -------------------------------------------------------------------------------- /img/hclLong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-interpolate/2eeffc0d02f2947552cf0a0b73bdf26fe90e1c28/img/hclLong.png -------------------------------------------------------------------------------- /img/hsl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-interpolate/2eeffc0d02f2947552cf0a0b73bdf26fe90e1c28/img/hsl.png -------------------------------------------------------------------------------- /img/hslLong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-interpolate/2eeffc0d02f2947552cf0a0b73bdf26fe90e1c28/img/hslLong.png -------------------------------------------------------------------------------- /img/lab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-interpolate/2eeffc0d02f2947552cf0a0b73bdf26fe90e1c28/img/lab.png -------------------------------------------------------------------------------- /img/rgb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-interpolate/2eeffc0d02f2947552cf0a0b73bdf26fe90e1c28/img/rgb.png -------------------------------------------------------------------------------- /img/rgbGamma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-interpolate/2eeffc0d02f2947552cf0a0b73bdf26fe90e1c28/img/rgbGamma.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "d3-interpolate", 3 | "version": "3.0.1", 4 | "description": "Interpolate numbers, colors, strings, arrays, objects, whatever!", 5 | "homepage": "https://d3js.org/d3-interpolate/", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/d3/d3-interpolate.git" 9 | }, 10 | "keywords": [ 11 | "d3", 12 | "d3-module", 13 | "interpolate", 14 | "interpolation", 15 | "color" 16 | ], 17 | "license": "ISC", 18 | "author": { 19 | "name": "Mike Bostock", 20 | "url": "http://bost.ocks.org/mike" 21 | }, 22 | "type": "module", 23 | "files": [ 24 | "dist/**/*.js", 25 | "src/**/*.js" 26 | ], 27 | "module": "src/index.js", 28 | "main": "src/index.js", 29 | "jsdelivr": "dist/d3-interpolate.min.js", 30 | "unpkg": "dist/d3-interpolate.min.js", 31 | "exports": { 32 | "umd": "./dist/d3-interpolate.min.js", 33 | "default": "./src/index.js" 34 | }, 35 | "sideEffects": false, 36 | "dependencies": { 37 | "d3-color": "1 - 3" 38 | }, 39 | "devDependencies": { 40 | "eslint": "7", 41 | "mocha": "8", 42 | "rollup": "2", 43 | "rollup-plugin-terser": "7" 44 | }, 45 | "scripts": { 46 | "test": "mocha 'test/**/*-test.js' && eslint src test", 47 | "prepublishOnly": "rm -rf dist && yarn test && rollup -c", 48 | "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd -" 49 | }, 50 | "engines": { 51 | "node": ">=12" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import {readFileSync} from "fs"; 2 | import {terser} from "rollup-plugin-terser"; 3 | import * as meta from "./package.json"; 4 | 5 | // Extract copyrights from the LICENSE. 6 | const copyright = readFileSync("./LICENSE", "utf-8") 7 | .split(/\n/g) 8 | .filter(line => /^Copyright\s+/.test(line)) 9 | .map(line => line.replace(/^Copyright\s+/, "")) 10 | .join(", "); 11 | 12 | function onwarn(message, warn) { 13 | if (message.code === "CIRCULAR_DEPENDENCY") return; 14 | warn(message); 15 | } 16 | 17 | const config = { 18 | input: "src/index.js", 19 | external: Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)), 20 | output: { 21 | file: `dist/${meta.name}.js`, 22 | name: "d3", 23 | format: "umd", 24 | indent: false, 25 | extend: true, 26 | banner: `// ${meta.homepage} v${meta.version} Copyright ${copyright}`, 27 | globals: Object.assign({}, ...Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)).map(key => ({[key]: "d3"}))) 28 | }, 29 | plugins: [], 30 | onwarn 31 | }; 32 | 33 | export default [ 34 | config, 35 | { 36 | ...config, 37 | output: { 38 | ...config.output, 39 | file: `dist/${meta.name}.min.js` 40 | }, 41 | plugins: [ 42 | ...config.plugins, 43 | terser({ 44 | output: { 45 | preamble: config.output.banner 46 | } 47 | }) 48 | ] 49 | } 50 | ]; 51 | -------------------------------------------------------------------------------- /src/array.js: -------------------------------------------------------------------------------- 1 | import value from "./value.js"; 2 | import numberArray, {isNumberArray} from "./numberArray.js"; 3 | 4 | export default function(a, b) { 5 | return (isNumberArray(b) ? numberArray : genericArray)(a, b); 6 | } 7 | 8 | export function genericArray(a, b) { 9 | var nb = b ? b.length : 0, 10 | na = a ? Math.min(nb, a.length) : 0, 11 | x = new Array(na), 12 | c = new Array(nb), 13 | i; 14 | 15 | for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]); 16 | for (; i < nb; ++i) c[i] = b[i]; 17 | 18 | return function(t) { 19 | for (i = 0; i < na; ++i) c[i] = x[i](t); 20 | return c; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /src/basis.js: -------------------------------------------------------------------------------- 1 | export function basis(t1, v0, v1, v2, v3) { 2 | var t2 = t1 * t1, t3 = t2 * t1; 3 | return ((1 - 3 * t1 + 3 * t2 - t3) * v0 4 | + (4 - 6 * t2 + 3 * t3) * v1 5 | + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 6 | + t3 * v3) / 6; 7 | } 8 | 9 | export default function(values) { 10 | var n = values.length - 1; 11 | return function(t) { 12 | var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), 13 | v1 = values[i], 14 | v2 = values[i + 1], 15 | v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, 16 | v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; 17 | return basis((t - i / n) * n, v0, v1, v2, v3); 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /src/basisClosed.js: -------------------------------------------------------------------------------- 1 | import {basis} from "./basis.js"; 2 | 3 | export default function(values) { 4 | var n = values.length; 5 | return function(t) { 6 | var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), 7 | v0 = values[(i + n - 1) % n], 8 | v1 = values[i % n], 9 | v2 = values[(i + 1) % n], 10 | v3 = values[(i + 2) % n]; 11 | return basis((t - i / n) * n, v0, v1, v2, v3); 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /src/color.js: -------------------------------------------------------------------------------- 1 | import constant from "./constant.js"; 2 | 3 | function linear(a, d) { 4 | return function(t) { 5 | return a + t * d; 6 | }; 7 | } 8 | 9 | function exponential(a, b, y) { 10 | return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { 11 | return Math.pow(a + t * b, y); 12 | }; 13 | } 14 | 15 | export function hue(a, b) { 16 | var d = b - a; 17 | return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a); 18 | } 19 | 20 | export function gamma(y) { 21 | return (y = +y) === 1 ? nogamma : function(a, b) { 22 | return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a); 23 | }; 24 | } 25 | 26 | export default function nogamma(a, b) { 27 | var d = b - a; 28 | return d ? linear(a, d) : constant(isNaN(a) ? b : a); 29 | } 30 | -------------------------------------------------------------------------------- /src/constant.js: -------------------------------------------------------------------------------- 1 | export default x => () => x; 2 | -------------------------------------------------------------------------------- /src/cubehelix.js: -------------------------------------------------------------------------------- 1 | import {cubehelix as colorCubehelix} from "d3-color"; 2 | import color, {hue} from "./color.js"; 3 | 4 | function cubehelix(hue) { 5 | return (function cubehelixGamma(y) { 6 | y = +y; 7 | 8 | function cubehelix(start, end) { 9 | var h = hue((start = colorCubehelix(start)).h, (end = colorCubehelix(end)).h), 10 | s = color(start.s, end.s), 11 | l = color(start.l, end.l), 12 | opacity = color(start.opacity, end.opacity); 13 | return function(t) { 14 | start.h = h(t); 15 | start.s = s(t); 16 | start.l = l(Math.pow(t, y)); 17 | start.opacity = opacity(t); 18 | return start + ""; 19 | }; 20 | } 21 | 22 | cubehelix.gamma = cubehelixGamma; 23 | 24 | return cubehelix; 25 | })(1); 26 | } 27 | 28 | export default cubehelix(hue); 29 | export var cubehelixLong = cubehelix(color); 30 | -------------------------------------------------------------------------------- /src/date.js: -------------------------------------------------------------------------------- 1 | export default function(a, b) { 2 | var d = new Date; 3 | return a = +a, b = +b, function(t) { 4 | return d.setTime(a * (1 - t) + b * t), d; 5 | }; 6 | } 7 | -------------------------------------------------------------------------------- /src/discrete.js: -------------------------------------------------------------------------------- 1 | export default function(range) { 2 | var n = range.length; 3 | return function(t) { 4 | return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; 5 | }; 6 | } 7 | -------------------------------------------------------------------------------- /src/hcl.js: -------------------------------------------------------------------------------- 1 | import {hcl as colorHcl} from "d3-color"; 2 | import color, {hue} from "./color.js"; 3 | 4 | function hcl(hue) { 5 | return function(start, end) { 6 | var h = hue((start = colorHcl(start)).h, (end = colorHcl(end)).h), 7 | c = color(start.c, end.c), 8 | l = color(start.l, end.l), 9 | opacity = color(start.opacity, end.opacity); 10 | return function(t) { 11 | start.h = h(t); 12 | start.c = c(t); 13 | start.l = l(t); 14 | start.opacity = opacity(t); 15 | return start + ""; 16 | }; 17 | } 18 | } 19 | 20 | export default hcl(hue); 21 | export var hclLong = hcl(color); 22 | -------------------------------------------------------------------------------- /src/hsl.js: -------------------------------------------------------------------------------- 1 | import {hsl as colorHsl} from "d3-color"; 2 | import color, {hue} from "./color.js"; 3 | 4 | function hsl(hue) { 5 | return function(start, end) { 6 | var h = hue((start = colorHsl(start)).h, (end = colorHsl(end)).h), 7 | s = color(start.s, end.s), 8 | l = color(start.l, end.l), 9 | opacity = color(start.opacity, end.opacity); 10 | return function(t) { 11 | start.h = h(t); 12 | start.s = s(t); 13 | start.l = l(t); 14 | start.opacity = opacity(t); 15 | return start + ""; 16 | }; 17 | } 18 | } 19 | 20 | export default hsl(hue); 21 | export var hslLong = hsl(color); 22 | -------------------------------------------------------------------------------- /src/hue.js: -------------------------------------------------------------------------------- 1 | import {hue} from "./color.js"; 2 | 3 | export default function(a, b) { 4 | var i = hue(+a, +b); 5 | return function(t) { 6 | var x = i(t); 7 | return x - 360 * Math.floor(x / 360); 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | export {default as interpolate} from "./value.js"; 2 | export {default as interpolateArray} from "./array.js"; 3 | export {default as interpolateBasis} from "./basis.js"; 4 | export {default as interpolateBasisClosed} from "./basisClosed.js"; 5 | export {default as interpolateDate} from "./date.js"; 6 | export {default as interpolateDiscrete} from "./discrete.js"; 7 | export {default as interpolateHue} from "./hue.js"; 8 | export {default as interpolateNumber} from "./number.js"; 9 | export {default as interpolateNumberArray} from "./numberArray.js"; 10 | export {default as interpolateObject} from "./object.js"; 11 | export {default as interpolateRound} from "./round.js"; 12 | export {default as interpolateString} from "./string.js"; 13 | export {interpolateTransformCss, interpolateTransformSvg} from "./transform/index.js"; 14 | export {default as interpolateZoom} from "./zoom.js"; 15 | export {default as interpolateRgb, rgbBasis as interpolateRgbBasis, rgbBasisClosed as interpolateRgbBasisClosed} from "./rgb.js"; 16 | export {default as interpolateHsl, hslLong as interpolateHslLong} from "./hsl.js"; 17 | export {default as interpolateLab} from "./lab.js"; 18 | export {default as interpolateHcl, hclLong as interpolateHclLong} from "./hcl.js"; 19 | export {default as interpolateCubehelix, cubehelixLong as interpolateCubehelixLong} from "./cubehelix.js"; 20 | export {default as piecewise} from "./piecewise.js"; 21 | export {default as quantize} from "./quantize.js"; 22 | -------------------------------------------------------------------------------- /src/lab.js: -------------------------------------------------------------------------------- 1 | import {lab as colorLab} from "d3-color"; 2 | import color from "./color.js"; 3 | 4 | export default function lab(start, end) { 5 | var l = color((start = colorLab(start)).l, (end = colorLab(end)).l), 6 | a = color(start.a, end.a), 7 | b = color(start.b, end.b), 8 | opacity = color(start.opacity, end.opacity); 9 | return function(t) { 10 | start.l = l(t); 11 | start.a = a(t); 12 | start.b = b(t); 13 | start.opacity = opacity(t); 14 | return start + ""; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /src/number.js: -------------------------------------------------------------------------------- 1 | export default function(a, b) { 2 | return a = +a, b = +b, function(t) { 3 | return a * (1 - t) + b * t; 4 | }; 5 | } 6 | -------------------------------------------------------------------------------- /src/numberArray.js: -------------------------------------------------------------------------------- 1 | export default function(a, b) { 2 | if (!b) b = []; 3 | var n = a ? Math.min(b.length, a.length) : 0, 4 | c = b.slice(), 5 | i; 6 | return function(t) { 7 | for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t; 8 | return c; 9 | }; 10 | } 11 | 12 | export function isNumberArray(x) { 13 | return ArrayBuffer.isView(x) && !(x instanceof DataView); 14 | } 15 | -------------------------------------------------------------------------------- /src/object.js: -------------------------------------------------------------------------------- 1 | import value from "./value.js"; 2 | 3 | export default function(a, b) { 4 | var i = {}, 5 | c = {}, 6 | k; 7 | 8 | if (a === null || typeof a !== "object") a = {}; 9 | if (b === null || typeof b !== "object") b = {}; 10 | 11 | for (k in b) { 12 | if (k in a) { 13 | i[k] = value(a[k], b[k]); 14 | } else { 15 | c[k] = b[k]; 16 | } 17 | } 18 | 19 | return function(t) { 20 | for (k in i) c[k] = i[k](t); 21 | return c; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /src/piecewise.js: -------------------------------------------------------------------------------- 1 | import {default as value} from "./value.js"; 2 | 3 | export default function piecewise(interpolate, values) { 4 | if (values === undefined) values = interpolate, interpolate = value; 5 | var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n); 6 | while (i < n) I[i] = interpolate(v, v = values[++i]); 7 | return function(t) { 8 | var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n))); 9 | return I[i](t - i); 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /src/quantize.js: -------------------------------------------------------------------------------- 1 | export default function(interpolator, n) { 2 | var samples = new Array(n); 3 | for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1)); 4 | return samples; 5 | } 6 | -------------------------------------------------------------------------------- /src/rgb.js: -------------------------------------------------------------------------------- 1 | import {rgb as colorRgb} from "d3-color"; 2 | import basis from "./basis.js"; 3 | import basisClosed from "./basisClosed.js"; 4 | import nogamma, {gamma} from "./color.js"; 5 | 6 | export default (function rgbGamma(y) { 7 | var color = gamma(y); 8 | 9 | function rgb(start, end) { 10 | var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r), 11 | g = color(start.g, end.g), 12 | b = color(start.b, end.b), 13 | opacity = nogamma(start.opacity, end.opacity); 14 | return function(t) { 15 | start.r = r(t); 16 | start.g = g(t); 17 | start.b = b(t); 18 | start.opacity = opacity(t); 19 | return start + ""; 20 | }; 21 | } 22 | 23 | rgb.gamma = rgbGamma; 24 | 25 | return rgb; 26 | })(1); 27 | 28 | function rgbSpline(spline) { 29 | return function(colors) { 30 | var n = colors.length, 31 | r = new Array(n), 32 | g = new Array(n), 33 | b = new Array(n), 34 | i, color; 35 | for (i = 0; i < n; ++i) { 36 | color = colorRgb(colors[i]); 37 | r[i] = color.r || 0; 38 | g[i] = color.g || 0; 39 | b[i] = color.b || 0; 40 | } 41 | r = spline(r); 42 | g = spline(g); 43 | b = spline(b); 44 | color.opacity = 1; 45 | return function(t) { 46 | color.r = r(t); 47 | color.g = g(t); 48 | color.b = b(t); 49 | return color + ""; 50 | }; 51 | }; 52 | } 53 | 54 | export var rgbBasis = rgbSpline(basis); 55 | export var rgbBasisClosed = rgbSpline(basisClosed); 56 | -------------------------------------------------------------------------------- /src/round.js: -------------------------------------------------------------------------------- 1 | export default function(a, b) { 2 | return a = +a, b = +b, function(t) { 3 | return Math.round(a * (1 - t) + b * t); 4 | }; 5 | } 6 | -------------------------------------------------------------------------------- /src/string.js: -------------------------------------------------------------------------------- 1 | import number from "./number.js"; 2 | 3 | var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, 4 | reB = new RegExp(reA.source, "g"); 5 | 6 | function zero(b) { 7 | return function() { 8 | return b; 9 | }; 10 | } 11 | 12 | function one(b) { 13 | return function(t) { 14 | return b(t) + ""; 15 | }; 16 | } 17 | 18 | export default function(a, b) { 19 | var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b 20 | am, // current match in a 21 | bm, // current match in b 22 | bs, // string preceding current number in b, if any 23 | i = -1, // index in s 24 | s = [], // string constants and placeholders 25 | q = []; // number interpolators 26 | 27 | // Coerce inputs to strings. 28 | a = a + "", b = b + ""; 29 | 30 | // Interpolate pairs of numbers in a & b. 31 | while ((am = reA.exec(a)) 32 | && (bm = reB.exec(b))) { 33 | if ((bs = bm.index) > bi) { // a string precedes the next number in b 34 | bs = b.slice(bi, bs); 35 | if (s[i]) s[i] += bs; // coalesce with previous string 36 | else s[++i] = bs; 37 | } 38 | if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match 39 | if (s[i]) s[i] += bm; // coalesce with previous string 40 | else s[++i] = bm; 41 | } else { // interpolate non-matching numbers 42 | s[++i] = null; 43 | q.push({i: i, x: number(am, bm)}); 44 | } 45 | bi = reB.lastIndex; 46 | } 47 | 48 | // Add remains of b. 49 | if (bi < b.length) { 50 | bs = b.slice(bi); 51 | if (s[i]) s[i] += bs; // coalesce with previous string 52 | else s[++i] = bs; 53 | } 54 | 55 | // Special optimization for only a single match. 56 | // Otherwise, interpolate each of the numbers and rejoin the string. 57 | return s.length < 2 ? (q[0] 58 | ? one(q[0].x) 59 | : zero(b)) 60 | : (b = q.length, function(t) { 61 | for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); 62 | return s.join(""); 63 | }); 64 | } 65 | -------------------------------------------------------------------------------- /src/transform/decompose.js: -------------------------------------------------------------------------------- 1 | var degrees = 180 / Math.PI; 2 | 3 | export var identity = { 4 | translateX: 0, 5 | translateY: 0, 6 | rotate: 0, 7 | skewX: 0, 8 | scaleX: 1, 9 | scaleY: 1 10 | }; 11 | 12 | export default function(a, b, c, d, e, f) { 13 | var scaleX, scaleY, skewX; 14 | if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX; 15 | if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX; 16 | if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY; 17 | if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; 18 | return { 19 | translateX: e, 20 | translateY: f, 21 | rotate: Math.atan2(b, a) * degrees, 22 | skewX: Math.atan(skewX) * degrees, 23 | scaleX: scaleX, 24 | scaleY: scaleY 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /src/transform/index.js: -------------------------------------------------------------------------------- 1 | import number from "../number.js"; 2 | import {parseCss, parseSvg} from "./parse.js"; 3 | 4 | function interpolateTransform(parse, pxComma, pxParen, degParen) { 5 | 6 | function pop(s) { 7 | return s.length ? s.pop() + " " : ""; 8 | } 9 | 10 | function translate(xa, ya, xb, yb, s, q) { 11 | if (xa !== xb || ya !== yb) { 12 | var i = s.push("translate(", null, pxComma, null, pxParen); 13 | q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)}); 14 | } else if (xb || yb) { 15 | s.push("translate(" + xb + pxComma + yb + pxParen); 16 | } 17 | } 18 | 19 | function rotate(a, b, s, q) { 20 | if (a !== b) { 21 | if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path 22 | q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: number(a, b)}); 23 | } else if (b) { 24 | s.push(pop(s) + "rotate(" + b + degParen); 25 | } 26 | } 27 | 28 | function skewX(a, b, s, q) { 29 | if (a !== b) { 30 | q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: number(a, b)}); 31 | } else if (b) { 32 | s.push(pop(s) + "skewX(" + b + degParen); 33 | } 34 | } 35 | 36 | function scale(xa, ya, xb, yb, s, q) { 37 | if (xa !== xb || ya !== yb) { 38 | var i = s.push(pop(s) + "scale(", null, ",", null, ")"); 39 | q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)}); 40 | } else if (xb !== 1 || yb !== 1) { 41 | s.push(pop(s) + "scale(" + xb + "," + yb + ")"); 42 | } 43 | } 44 | 45 | return function(a, b) { 46 | var s = [], // string constants and placeholders 47 | q = []; // number interpolators 48 | a = parse(a), b = parse(b); 49 | translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); 50 | rotate(a.rotate, b.rotate, s, q); 51 | skewX(a.skewX, b.skewX, s, q); 52 | scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); 53 | a = b = null; // gc 54 | return function(t) { 55 | var i = -1, n = q.length, o; 56 | while (++i < n) s[(o = q[i]).i] = o.x(t); 57 | return s.join(""); 58 | }; 59 | }; 60 | } 61 | 62 | export var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)"); 63 | export var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")"); 64 | -------------------------------------------------------------------------------- /src/transform/parse.js: -------------------------------------------------------------------------------- 1 | import decompose, {identity} from "./decompose.js"; 2 | 3 | var svgNode; 4 | 5 | /* eslint-disable no-undef */ 6 | export function parseCss(value) { 7 | const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + ""); 8 | return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f); 9 | } 10 | 11 | export function parseSvg(value) { 12 | if (value == null) return identity; 13 | if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); 14 | svgNode.setAttribute("transform", value); 15 | if (!(value = svgNode.transform.baseVal.consolidate())) return identity; 16 | value = value.matrix; 17 | return decompose(value.a, value.b, value.c, value.d, value.e, value.f); 18 | } 19 | -------------------------------------------------------------------------------- /src/value.js: -------------------------------------------------------------------------------- 1 | import {color} from "d3-color"; 2 | import rgb from "./rgb.js"; 3 | import {genericArray} from "./array.js"; 4 | import date from "./date.js"; 5 | import number from "./number.js"; 6 | import object from "./object.js"; 7 | import string from "./string.js"; 8 | import constant from "./constant.js"; 9 | import numberArray, {isNumberArray} from "./numberArray.js"; 10 | 11 | export default function(a, b) { 12 | var t = typeof b, c; 13 | return b == null || t === "boolean" ? constant(b) 14 | : (t === "number" ? number 15 | : t === "string" ? ((c = color(b)) ? (b = c, rgb) : string) 16 | : b instanceof color ? rgb 17 | : b instanceof Date ? date 18 | : isNumberArray(b) ? numberArray 19 | : Array.isArray(b) ? genericArray 20 | : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object 21 | : number)(a, b); 22 | } 23 | -------------------------------------------------------------------------------- /src/zoom.js: -------------------------------------------------------------------------------- 1 | var epsilon2 = 1e-12; 2 | 3 | function cosh(x) { 4 | return ((x = Math.exp(x)) + 1 / x) / 2; 5 | } 6 | 7 | function sinh(x) { 8 | return ((x = Math.exp(x)) - 1 / x) / 2; 9 | } 10 | 11 | function tanh(x) { 12 | return ((x = Math.exp(2 * x)) - 1) / (x + 1); 13 | } 14 | 15 | export default (function zoomRho(rho, rho2, rho4) { 16 | 17 | // p0 = [ux0, uy0, w0] 18 | // p1 = [ux1, uy1, w1] 19 | function zoom(p0, p1) { 20 | var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], 21 | ux1 = p1[0], uy1 = p1[1], w1 = p1[2], 22 | dx = ux1 - ux0, 23 | dy = uy1 - uy0, 24 | d2 = dx * dx + dy * dy, 25 | i, 26 | S; 27 | 28 | // Special case for u0 ≅ u1. 29 | if (d2 < epsilon2) { 30 | S = Math.log(w1 / w0) / rho; 31 | i = function(t) { 32 | return [ 33 | ux0 + t * dx, 34 | uy0 + t * dy, 35 | w0 * Math.exp(rho * t * S) 36 | ]; 37 | } 38 | } 39 | 40 | // General case. 41 | else { 42 | var d1 = Math.sqrt(d2), 43 | b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), 44 | b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), 45 | r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), 46 | r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); 47 | S = (r1 - r0) / rho; 48 | i = function(t) { 49 | var s = t * S, 50 | coshr0 = cosh(r0), 51 | u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0)); 52 | return [ 53 | ux0 + u * dx, 54 | uy0 + u * dy, 55 | w0 * coshr0 / cosh(rho * s + r0) 56 | ]; 57 | } 58 | } 59 | 60 | i.duration = S * 1000 * rho / Math.SQRT2; 61 | 62 | return i; 63 | } 64 | 65 | zoom.rho = function(_) { 66 | var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2; 67 | return zoomRho(_1, _2, _4); 68 | }; 69 | 70 | return zoom; 71 | })(Math.SQRT2, 2, 4); 72 | -------------------------------------------------------------------------------- /test/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint:recommended", 3 | "parserOptions": { 4 | "sourceType": "module", 5 | "ecmaVersion": 8 6 | }, 7 | "env": { 8 | "es6": true, 9 | "mocha": true 10 | }, 11 | "rules": { 12 | "no-cond-assign": 0 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/array-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {interpolateArray} from "../src/index.js"; 3 | 4 | it("interpolateArray(a, b) interpolates defined elements in a and b", () => { 5 | assert.deepStrictEqual(interpolateArray([2, 12], [4, 24])(0.5), [3, 18]); 6 | }); 7 | 8 | it("interpolateArray(a, b) interpolates nested objects and arrays", () => { 9 | assert.deepStrictEqual(interpolateArray([[2, 12]], [[4, 24]])(0.5), [[3, 18]]); 10 | assert.deepStrictEqual(interpolateArray([{foo: [2, 12]}], [{foo: [4, 24]}])(0.5), [{foo: [3, 18]}]); 11 | }); 12 | 13 | it("interpolateArray(a, b) ignores elements in a that are not in b", () => { 14 | assert.deepStrictEqual(interpolateArray([2, 12, 12], [4, 24])(0.5), [3, 18]); 15 | }); 16 | 17 | it("interpolateArray(a, b) uses constant elements in b that are not in a", () => { 18 | assert.deepStrictEqual(interpolateArray([2, 12], [4, 24, 12])(0.5), [3, 18, 12]); 19 | }); 20 | 21 | it("interpolateArray(a, b) treats undefined as an empty array", () => { 22 | assert.deepStrictEqual(interpolateArray(undefined, [2, 12])(0.5), [2, 12]); 23 | assert.deepStrictEqual(interpolateArray([2, 12], undefined)(0.5), []); 24 | assert.deepStrictEqual(interpolateArray(undefined, undefined)(0.5), []); 25 | }); 26 | 27 | it("interpolateArray(a, b) interpolates array-like objects", () => { 28 | const array = new Float64Array(2); 29 | const args = (function() { return arguments; })(2, 12); 30 | array[0] = 2; 31 | array[1] = 12; 32 | assert.deepStrictEqual(interpolateArray(array, [4, 24])(0.5), [3, 18]); 33 | assert.deepStrictEqual(interpolateArray(args, [4, 24])(0.5), [3, 18]); 34 | }); 35 | 36 | it("interpolateArray(a, b) gives exact ends for t=0 and t=1", () => { 37 | const a = [2e+42], b = [335]; 38 | assert.deepStrictEqual(interpolateArray(a, b)(1), b); 39 | assert.deepStrictEqual(interpolateArray(a, b)(0), a); 40 | }); 41 | -------------------------------------------------------------------------------- /test/asserts.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | 3 | export function assertInDelta(actual, expected, delta = 1e-6) { 4 | assert(inDelta(actual, expected, delta), `${actual} should be within ${delta} of ${expected}`); 5 | } 6 | 7 | function inDelta(actual, expected, delta) { 8 | return (Array.isArray(expected) ? inDeltaArray 9 | : typeof expected === "object" ? inDeltaObject 10 | : inDeltaNumber)(actual, expected, delta); 11 | } 12 | 13 | function inDeltaArray(actual, expected, delta) { 14 | let n = expected.length, i = -1; 15 | if (actual.length !== n) return false; 16 | while (++i < n) if (!inDelta(actual[i], expected[i], delta)) return false; 17 | return true; 18 | } 19 | 20 | function inDeltaObject(actual, expected, delta) { 21 | for (let i in expected) if (!inDelta(actual[i], expected[i], delta)) return false; 22 | for (let i in actual) if (!(i in expected)) return false; 23 | return true; 24 | } 25 | 26 | function inDeltaNumber(actual, expected, delta) { 27 | return actual >= expected - delta && actual <= expected + delta; 28 | } 29 | -------------------------------------------------------------------------------- /test/cubehelix-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {cubehelix, hcl, rgb} from "d3-color"; 3 | import {interpolateCubehelix} from "../src/index.js"; 4 | 5 | it("interpolateCubehelix(a, b) converts a and b to Cubehelix colors", () => { 6 | assert.strictEqual(interpolateCubehelix("steelblue", "brown")(0), rgb("steelblue") + ""); 7 | assert.strictEqual(interpolateCubehelix("steelblue", hcl("brown"))(1), rgb("brown") + ""); 8 | assert.strictEqual(interpolateCubehelix("steelblue", rgb("brown"))(1), rgb("brown") + ""); 9 | }); 10 | 11 | it("interpolateCubehelix(a, b) interpolates in Cubehelix and returns an RGB string", () => { 12 | assert.strictEqual(interpolateCubehelix("steelblue", "#f00")(0.2), "rgb(88, 100, 218)"); 13 | assert.strictEqual(interpolateCubehelix("rgba(70, 130, 180, 1)", "rgba(255, 0, 0, 0.2)")(0.2), "rgba(88, 100, 218, 0.84)"); 14 | }); 15 | 16 | it("interpolateCubehelix.gamma(3)(a, b) returns the expected values", () => { 17 | assert.strictEqual(interpolateCubehelix.gamma(3)("steelblue", "#f00")(0.2), "rgb(96, 107, 228)"); 18 | }); 19 | 20 | it("interpolateCubehelix.gamma(g) coerces the specified gamma to a number", () => { 21 | assert.strictEqual(interpolateCubehelix.gamma({valueOf: function() { return 3; }})("steelblue", "#f00")(0.2), "rgb(96, 107, 228)"); 22 | }); 23 | 24 | it("interpolateCubehelix(a, b) is equivalent to interpolateCubehelix.gamma(1)(a, b)", () => { 25 | const i0 = interpolateCubehelix.gamma(1)("purple", "orange"), 26 | i1 = interpolateCubehelix("purple", "orange"); 27 | assert.strictEqual(i1(0.0), i0(0.0)); 28 | assert.strictEqual(i1(0.2), i0(0.2)); 29 | assert.strictEqual(i1(0.4), i0(0.4)); 30 | assert.strictEqual(i1(0.6), i0(0.6)); 31 | assert.strictEqual(i1(0.8), i0(0.8)); 32 | assert.strictEqual(i1(1.0), i0(1.0)); 33 | }); 34 | 35 | it("interpolateCubehelix(a, b) uses the shortest path when interpolating hue difference greater than 180°", () => { 36 | const i = interpolateCubehelix("purple", "orange"); 37 | assert.strictEqual(i(0.0), "rgb(128, 0, 128)"); 38 | assert.strictEqual(i(0.2), "rgb(208, 1, 127)"); 39 | assert.strictEqual(i(0.4), "rgb(255, 17, 93)"); 40 | assert.strictEqual(i(0.6), "rgb(255, 52, 43)"); 41 | assert.strictEqual(i(0.8), "rgb(255, 105, 5)"); 42 | assert.strictEqual(i(1.0), "rgb(255, 165, 0)"); 43 | }); 44 | 45 | it("interpolateCubehelix(a, b) uses a’s hue when b’s hue is undefined", () => { 46 | assert.strictEqual(interpolateCubehelix("#f60", cubehelix(NaN, NaN, 0))(0.5), "rgb(162, 41, 0)"); 47 | assert.strictEqual(interpolateCubehelix("#6f0", cubehelix(NaN, NaN, 0))(0.5), "rgb(3, 173, 0)"); 48 | }); 49 | 50 | it("interpolateCubehelix(a, b) uses b’s hue when a’s hue is undefined", () => { 51 | assert.strictEqual(interpolateCubehelix(cubehelix(NaN, NaN, 0), "#f60")(0.5), "rgb(162, 41, 0)"); 52 | assert.strictEqual(interpolateCubehelix(cubehelix(NaN, NaN, 0), "#6f0")(0.5), "rgb(3, 173, 0)"); 53 | }); 54 | 55 | it("interpolateCubehelix(a, b) uses a’s chroma when b’s chroma is undefined", () => { 56 | assert.strictEqual(interpolateCubehelix("#ccc", cubehelix(NaN, NaN, 0))(0.5), "rgb(102, 102, 102)"); 57 | assert.strictEqual(interpolateCubehelix("#f00", cubehelix(NaN, NaN, 0))(0.5), "rgb(147, 0, 0)"); 58 | }); 59 | 60 | it("interpolateCubehelix(a, b) uses b’s chroma when a’s chroma is undefined", () => { 61 | assert.strictEqual(interpolateCubehelix(cubehelix(NaN, NaN, 0), "#ccc")(0.5), "rgb(102, 102, 102)"); 62 | assert.strictEqual(interpolateCubehelix(cubehelix(NaN, NaN, 0), "#f00")(0.5), "rgb(147, 0, 0)"); 63 | }); 64 | 65 | it("interpolateCubehelix(a, b) uses b’s luminance when a’s luminance is undefined", () => { 66 | assert.strictEqual(interpolateCubehelix(null, cubehelix(20, 1.5, 0.5))(0.5), "rgb(248, 93, 0)"); 67 | }); 68 | 69 | it("interpolateCubehelix(a, b) uses a’s luminance when b’s luminance is undefined", () => { 70 | assert.strictEqual(interpolateCubehelix(cubehelix(20, 1.5, 0.5), null)(0.5), "rgb(248, 93, 0)"); 71 | }); 72 | -------------------------------------------------------------------------------- /test/cubehelixLong-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {cubehelix, hcl, rgb} from "d3-color"; 3 | import {interpolateCubehelixLong} from "../src/index.js"; 4 | 5 | it("interpolateCubehelixLong(a, b) converts a and b to Cubehelix colors", () => { 6 | assert.strictEqual(interpolateCubehelixLong("steelblue", "brown")(0), rgb("steelblue") + ""); 7 | assert.strictEqual(interpolateCubehelixLong("steelblue", hcl("brown"))(1), rgb("brown") + ""); 8 | assert.strictEqual(interpolateCubehelixLong("steelblue", rgb("brown"))(1), rgb("brown") + ""); 9 | }); 10 | 11 | it("interpolateCubehelixLong(a, b) interpolates in Cubehelix and returns an RGB string", () => { 12 | assert.strictEqual(interpolateCubehelixLong("steelblue", "#f00")(0.2), "rgb(88, 100, 218)"); 13 | assert.strictEqual(interpolateCubehelixLong("rgba(70, 130, 180, 1)", "rgba(255, 0, 0, 0.2)")(0.2), "rgba(88, 100, 218, 0.84)"); 14 | }); 15 | 16 | it("interpolateCubehelixLong.gamma(3)(a, b) returns the expected values", () => { 17 | assert.strictEqual(interpolateCubehelixLong.gamma(3)("steelblue", "#f00")(0.2), "rgb(96, 107, 228)"); 18 | }); 19 | 20 | it("interpolateCubehelixLong.gamma(g) coerces the specified gamma to a number", () => { 21 | assert.strictEqual(interpolateCubehelixLong.gamma({valueOf: function() { return 3; }})("steelblue", "#f00")(0.2), "rgb(96, 107, 228)"); 22 | }); 23 | 24 | it("interpolateCubehelixLong(a, b) is equivalent to interpolateCubehelixLong.gamma(1)(a, b)", () => { 25 | const i0 = interpolateCubehelixLong.gamma(1)("purple", "orange"), 26 | i1 = interpolateCubehelixLong("purple", "orange"); 27 | assert.strictEqual(i1(0.0), i0(0.0)); 28 | assert.strictEqual(i1(0.2), i0(0.2)); 29 | assert.strictEqual(i1(0.4), i0(0.4)); 30 | assert.strictEqual(i1(0.6), i0(0.6)); 31 | assert.strictEqual(i1(0.8), i0(0.8)); 32 | assert.strictEqual(i1(1.0), i0(1.0)); 33 | }); 34 | it("interpolateCubehelixLong(a, b) uses the longest path when interpolating hue difference greater than 180°", () => { 35 | const i = interpolateCubehelixLong("purple", "orange"); 36 | assert.strictEqual(i(0.0), "rgb(128, 0, 128)"); 37 | assert.strictEqual(i(0.2), "rgb(63, 54, 234)"); 38 | assert.strictEqual(i(0.4), "rgb(0, 151, 217)"); 39 | assert.strictEqual(i(0.6), "rgb(0, 223, 83)"); 40 | assert.strictEqual(i(0.8), "rgb(79, 219, 0)"); 41 | assert.strictEqual(i(1.0), "rgb(255, 165, 0)"); 42 | }); 43 | 44 | it("interpolateCubehelixLong(a, b) uses a’s hue when b’s hue is undefined", () => { 45 | assert.strictEqual(interpolateCubehelixLong("#f60", hcl(NaN, NaN, 0))(0.5), "rgb(162, 41, 0)"); 46 | assert.strictEqual(interpolateCubehelixLong("#6f0", hcl(NaN, NaN, 0))(0.5), "rgb(3, 173, 0)"); 47 | }); 48 | 49 | it("interpolateCubehelixLong(a, b) uses b’s hue when a’s hue is undefined", () => { 50 | assert.strictEqual(interpolateCubehelixLong(hcl(NaN, NaN, 0), "#f60")(0.5), "rgb(162, 41, 0)"); 51 | assert.strictEqual(interpolateCubehelixLong(hcl(NaN, NaN, 0), "#6f0")(0.5), "rgb(3, 173, 0)"); 52 | }); 53 | 54 | it("interpolateCubehelixLong(a, b) uses a’s chroma when b’s chroma is undefined", () => { 55 | assert.strictEqual(interpolateCubehelixLong("#ccc", hcl(NaN, NaN, 0))(0.5), "rgb(102, 102, 102)"); 56 | assert.strictEqual(interpolateCubehelixLong("#f00", hcl(NaN, NaN, 0))(0.5), "rgb(147, 0, 0)"); 57 | }); 58 | 59 | it("interpolateCubehelixLong(a, b) uses b’s chroma when a’s chroma is undefined", () => { 60 | assert.strictEqual(interpolateCubehelixLong(hcl(NaN, NaN, 0), "#ccc")(0.5), "rgb(102, 102, 102)"); 61 | assert.strictEqual(interpolateCubehelixLong(hcl(NaN, NaN, 0), "#f00")(0.5), "rgb(147, 0, 0)"); 62 | }); 63 | 64 | it("interpolateCubehelixLong(a, b) uses b’s luminance when a’s luminance is undefined", () => { 65 | assert.strictEqual(interpolateCubehelixLong(null, cubehelix(20, 1.5, 0.5))(0.5), "rgb(248, 93, 0)"); 66 | }); 67 | 68 | it("interpolateCubehelixLong(a, b) uses a’s luminance when b’s luminance is undefined", () => { 69 | assert.strictEqual(interpolateCubehelixLong(cubehelix(20, 1.5, 0.5), null)(0.5), "rgb(248, 93, 0)"); 70 | }); 71 | -------------------------------------------------------------------------------- /test/date-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {interpolateDate} from "../src/index.js"; 3 | 4 | it("interpolateDate(a, b) interpolates between two dates a and b", () => { 5 | const i = interpolateDate(new Date(2000, 0, 1), new Date(2000, 0, 2)); 6 | assert.strictEqual(i(0.0) instanceof Date, true); 7 | assert.strictEqual(i(0.5) instanceof Date, true); 8 | assert.strictEqual(i(1.0) instanceof Date, true); 9 | assert.strictEqual(+i(0.2), +new Date(2000, 0, 1, 4, 48)); 10 | assert.strictEqual(+i(0.4), +new Date(2000, 0, 1, 9, 36)); 11 | }); 12 | 13 | it("interpolateDate(a, b) reuses the output datea", () => { 14 | const i = interpolateDate(new Date(2000, 0, 1), new Date(2000, 0, 2)); 15 | assert.strictEqual(i(0.2), i(0.4)); 16 | }); 17 | 18 | it("interpolateDate(a, b) gives exact ends for t=0 and t=1", () => { 19 | const a = new Date(1e8 * 24 * 60 * 60 * 1000), b = new Date(-1e8 * 24 * 60 * 60 * 1000 +1); 20 | assert.strictEqual(+interpolateDate(a, b)(1), +b); 21 | assert.strictEqual(+interpolateDate(a, b)(0), +a); 22 | }); 23 | -------------------------------------------------------------------------------- /test/discrete-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {interpolateDiscrete} from "../src/index.js"; 3 | 4 | it("interpolateDiscrete(values)(t) returns the expected values", () => { 5 | const i = interpolateDiscrete("abcde".split("")); 6 | assert.strictEqual(i(-1), "a"); 7 | assert.strictEqual(i(0), "a"); 8 | assert.strictEqual(i(0.19), "a"); 9 | assert.strictEqual(i(0.21), "b"); 10 | assert.strictEqual(i(1), "e"); 11 | }); 12 | 13 | it("interpolateDiscrete([0, 1]) is equivalent to similar to Math.round", () => { 14 | const i = interpolateDiscrete([0, 1]); 15 | assert.strictEqual(i(-1), 0); 16 | assert.strictEqual(i(0), 0); 17 | assert.strictEqual(i(0.49), 0); 18 | assert.strictEqual(i(0.51), 1); 19 | assert.strictEqual(i(1), 1); 20 | assert.strictEqual(i(2), 1); 21 | }); 22 | 23 | it("interpolateDiscrete(…)(NaN) returned undefined", () => { 24 | const i = interpolateDiscrete([0, 1]); 25 | assert.strictEqual(i(NaN), undefined); 26 | }); 27 | -------------------------------------------------------------------------------- /test/hcl-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {hcl, rgb} from "d3-color"; 3 | import {interpolateHcl} from "../src/index.js"; 4 | 5 | it("interpolateHcl(a, b) converts a and b to HCL colors", () => { 6 | assert.strictEqual(interpolateHcl("steelblue", "brown")(0), rgb("steelblue") + ""); 7 | assert.strictEqual(interpolateHcl("steelblue", hcl("brown"))(1), rgb("brown") + ""); 8 | assert.strictEqual(interpolateHcl("steelblue", rgb("brown"))(1), rgb("brown") + ""); 9 | }); 10 | 11 | it("interpolateHcl(a, b) interpolates in HCL and returns an RGB string", () => { 12 | assert.strictEqual(interpolateHcl("steelblue", "#f00")(0.2), "rgb(106, 121, 206)"); 13 | assert.strictEqual(interpolateHcl("rgba(70, 130, 180, 1)", "rgba(255, 0, 0, 0.2)")(0.2), "rgba(106, 121, 206, 0.84)"); 14 | }); 15 | 16 | it("interpolateHcl(a, b) uses the shortest path when interpolating hue difference greater than 180°", () => { 17 | const i = interpolateHcl(hcl(10, 50, 50), hcl(350, 50, 50)); 18 | assert.strictEqual(i(0.0), "rgb(194, 78, 107)"); 19 | assert.strictEqual(i(0.2), "rgb(194, 78, 113)"); 20 | assert.strictEqual(i(0.4), "rgb(193, 78, 118)"); 21 | assert.strictEqual(i(0.6), "rgb(192, 78, 124)"); 22 | assert.strictEqual(i(0.8), "rgb(191, 78, 130)"); 23 | assert.strictEqual(i(1.0), "rgb(189, 79, 136)"); 24 | }); 25 | 26 | it("interpolateHcl(a, b) uses the shortest path when interpolating hue difference greater than 360°", () => { 27 | const i = interpolateHcl(hcl(10, 50, 50), hcl(380, 50, 50)); 28 | assert.strictEqual(i(0.0), "rgb(194, 78, 107)"); 29 | assert.strictEqual(i(0.2), "rgb(194, 78, 104)"); 30 | assert.strictEqual(i(0.4), "rgb(194, 79, 101)"); 31 | assert.strictEqual(i(0.6), "rgb(194, 79, 98)"); 32 | assert.strictEqual(i(0.8), "rgb(194, 80, 96)"); 33 | assert.strictEqual(i(1.0), "rgb(194, 80, 93)"); 34 | }); 35 | 36 | it("interpolateHcl(a, b) uses the shortest path when interpolating hue difference greater than 540°", () => { 37 | const i = interpolateHcl(hcl(10, 50, 50), hcl(710, 50, 50)); 38 | assert.strictEqual(i(0.0), "rgb(194, 78, 107)"); 39 | assert.strictEqual(i(0.2), "rgb(194, 78, 113)"); 40 | assert.strictEqual(i(0.4), "rgb(193, 78, 118)"); 41 | assert.strictEqual(i(0.6), "rgb(192, 78, 124)"); 42 | assert.strictEqual(i(0.8), "rgb(191, 78, 130)"); 43 | assert.strictEqual(i(1.0), "rgb(189, 79, 136)"); 44 | }); 45 | 46 | it("interpolateHcl(a, b) uses the shortest path when interpolating hue difference greater than 720°", () => { 47 | const i = interpolateHcl(hcl(10, 50, 50), hcl(740, 50, 50)); 48 | assert.strictEqual(i(0.0), "rgb(194, 78, 107)"); 49 | assert.strictEqual(i(0.2), "rgb(194, 78, 104)"); 50 | assert.strictEqual(i(0.4), "rgb(194, 79, 101)"); 51 | assert.strictEqual(i(0.6), "rgb(194, 79, 98)"); 52 | assert.strictEqual(i(0.8), "rgb(194, 80, 96)"); 53 | assert.strictEqual(i(1.0), "rgb(194, 80, 93)"); 54 | }); 55 | 56 | it("interpolateHcl(a, b) uses a’s hue when b’s hue is undefined", () => { 57 | assert.strictEqual(interpolateHcl("#f60", hcl(NaN, NaN, 0))(0.5), "rgb(155, 0, 0)"); 58 | assert.strictEqual(interpolateHcl("#6f0", hcl(NaN, NaN, 0))(0.5), "rgb(0, 129, 0)"); 59 | }); 60 | 61 | it("interpolateHcl(a, b) uses b’s hue when a’s hue is undefined", () => { 62 | assert.strictEqual(interpolateHcl(hcl(NaN, NaN, 0), "#f60")(0.5), "rgb(155, 0, 0)"); 63 | assert.strictEqual(interpolateHcl(hcl(NaN, NaN, 0), "#6f0")(0.5), "rgb(0, 129, 0)"); 64 | }); 65 | 66 | it("interpolateHcl(a, b) uses a’s chroma when b’s chroma is undefined", () => { 67 | assert.strictEqual(interpolateHcl("#ccc", hcl(NaN, NaN, 0))(0.5), "rgb(97, 97, 97)"); 68 | assert.strictEqual(interpolateHcl("#f00", hcl(NaN, NaN, 0))(0.5), "rgb(166, 0, 0)"); 69 | }); 70 | 71 | it("interpolateHcl(a, b) uses b’s chroma when a’s chroma is undefined", () => { 72 | assert.strictEqual(interpolateHcl(hcl(NaN, NaN, 0), "#ccc")(0.5), "rgb(97, 97, 97)"); 73 | assert.strictEqual(interpolateHcl(hcl(NaN, NaN, 0), "#f00")(0.5), "rgb(166, 0, 0)"); 74 | }); 75 | 76 | it("interpolateHcl(a, b) uses b’s luminance when a’s luminance is undefined", () => { 77 | assert.strictEqual(interpolateHcl(null, hcl(20, 80, 50))(0.5), "rgb(230, 13, 79)"); 78 | }); 79 | 80 | it("interpolateHcl(a, b) uses a’s luminance when b’s luminance is undefined", () => { 81 | assert.strictEqual(interpolateHcl(hcl(20, 80, 50), null)(0.5), "rgb(230, 13, 79)"); 82 | }); 83 | -------------------------------------------------------------------------------- /test/hclLong-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {hcl, rgb} from "d3-color"; 3 | import {interpolateHclLong} from "../src/index.js"; 4 | 5 | it("interpolateHclLong(a, b) converts a and b to HCL colors", () => { 6 | assert.strictEqual(interpolateHclLong("steelblue", "brown")(0), rgb("steelblue") + ""); 7 | assert.strictEqual(interpolateHclLong("steelblue", hcl("brown"))(1), rgb("brown") + ""); 8 | assert.strictEqual(interpolateHclLong("steelblue", rgb("brown"))(1), rgb("brown") + ""); 9 | }); 10 | 11 | it("interpolateHclLong(a, b) interpolates in HCL and returns an RGB string", () => { 12 | assert.strictEqual(interpolateHclLong("steelblue", "#f00")(0.2), "rgb(0, 144, 169)"); 13 | assert.strictEqual(interpolateHclLong("rgba(70, 130, 180, 1)", "rgba(255, 0, 0, 0.2)")(0.2), "rgba(0, 144, 169, 0.84)"); 14 | }); 15 | 16 | it("interpolateHclLong(a, b) does not use the shortest path when interpolating hue", () => { 17 | const i = interpolateHclLong(hcl(10, 50, 50), hcl(350, 50, 50)); 18 | assert.strictEqual(i(0.0), "rgb(194, 78, 107)"); 19 | assert.strictEqual(i(0.2), "rgb(151, 111, 28)"); 20 | assert.strictEqual(i(0.4), "rgb(35, 136, 68)"); 21 | assert.strictEqual(i(0.6), "rgb(0, 138, 165)"); 22 | assert.strictEqual(i(0.8), "rgb(91, 116, 203)"); 23 | assert.strictEqual(i(1.0), "rgb(189, 79, 136)"); 24 | }); 25 | 26 | it("interpolateHclLong(a, b) uses a’s hue when b’s hue is undefined", () => { 27 | assert.strictEqual(interpolateHclLong("#f60", hcl(NaN, NaN, 0))(0.5), "rgb(155, 0, 0)"); 28 | assert.strictEqual(interpolateHclLong("#6f0", hcl(NaN, NaN, 0))(0.5), "rgb(0, 129, 0)"); 29 | }); 30 | 31 | it("interpolateHclLong(a, b) uses b’s hue when a’s hue is undefined", () => { 32 | assert.strictEqual(interpolateHclLong(hcl(NaN, NaN, 0), "#f60")(0.5), "rgb(155, 0, 0)"); 33 | assert.strictEqual(interpolateHclLong(hcl(NaN, NaN, 0), "#6f0")(0.5), "rgb(0, 129, 0)"); 34 | }); 35 | 36 | it("interpolateHclLong(a, b) uses a’s chroma when b’s chroma is undefined", () => { 37 | assert.strictEqual(interpolateHclLong("#ccc", hcl(NaN, NaN, 0))(0.5), "rgb(97, 97, 97)"); 38 | assert.strictEqual(interpolateHclLong("#f00", hcl(NaN, NaN, 0))(0.5), "rgb(166, 0, 0)"); 39 | }); 40 | 41 | it("interpolateHclLong(a, b) uses b’s chroma when a’s chroma is undefined", () => { 42 | assert.strictEqual(interpolateHclLong(hcl(NaN, NaN, 0), "#ccc")(0.5), "rgb(97, 97, 97)"); 43 | assert.strictEqual(interpolateHclLong(hcl(NaN, NaN, 0), "#f00")(0.5), "rgb(166, 0, 0)"); 44 | }); 45 | 46 | it("interpolateHclLong(a, b) uses b’s luminance when a’s luminance is undefined", () => { 47 | assert.strictEqual(interpolateHclLong(null, hcl(20, 80, 50))(0.5), "rgb(230, 13, 79)"); 48 | }); 49 | 50 | it("interpolateHclLong(a, b) uses a’s luminance when b’s luminance is undefined", () => { 51 | assert.strictEqual(interpolateHclLong(hcl(20, 80, 50), null)(0.5), "rgb(230, 13, 79)"); 52 | }); 53 | -------------------------------------------------------------------------------- /test/hsl-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {hsl, rgb} from "d3-color"; 3 | import {interpolateHsl} from "../src/index.js"; 4 | 5 | it("interpolateHsl(a, b) converts a and b to HSL colors", () => { 6 | assert.strictEqual(interpolateHsl("steelblue", "brown")(0), rgb("steelblue") + ""); 7 | assert.strictEqual(interpolateHsl("steelblue", hsl("brown"))(1), rgb("brown") + ""); 8 | assert.strictEqual(interpolateHsl("steelblue", rgb("brown"))(1), rgb("brown") + ""); 9 | }); 10 | 11 | it("interpolateHsl(a, b) interpolates in HSL and returns an RGB string", () => { 12 | assert.strictEqual(interpolateHsl("steelblue", "#f00")(0.2), "rgb(56, 61, 195)"); 13 | assert.strictEqual(interpolateHsl("rgba(70, 130, 180, 1)", "rgba(255, 0, 0, 0.2)")(0.2), "rgba(56, 61, 195, 0.84)"); 14 | }); 15 | 16 | it("interpolateHsl(a, b) uses the shortest path when interpolating hue", () => { 17 | const i = interpolateHsl("hsl(10,50%,50%)", "hsl(350,50%,50%)"); 18 | assert.strictEqual(i(0.0), "rgb(191, 85, 64)"); 19 | assert.strictEqual(i(0.2), "rgb(191, 77, 64)"); 20 | assert.strictEqual(i(0.4), "rgb(191, 68, 64)"); 21 | assert.strictEqual(i(0.6), "rgb(191, 64, 68)"); 22 | assert.strictEqual(i(0.8), "rgb(191, 64, 77)"); 23 | assert.strictEqual(i(1.0), "rgb(191, 64, 85)"); 24 | }); 25 | 26 | it("interpolateHsl(a, b) uses a’s hue when b’s hue is undefined", () => { 27 | assert.strictEqual(interpolateHsl("#f60", "#000")(0.5), "rgb(128, 51, 0)"); 28 | assert.strictEqual(interpolateHsl("#6f0", "#fff")(0.5), "rgb(179, 255, 128)"); 29 | }); 30 | 31 | it("interpolateHsl(a, b) uses b’s hue when a’s hue is undefined", () => { 32 | assert.strictEqual(interpolateHsl("#000", "#f60")(0.5), "rgb(128, 51, 0)"); 33 | assert.strictEqual(interpolateHsl("#fff", "#6f0")(0.5), "rgb(179, 255, 128)"); 34 | }); 35 | 36 | it("interpolateHsl(a, b) uses a’s saturation when b’s saturation is undefined", () => { 37 | assert.strictEqual(interpolateHsl("#ccc", "#000")(0.5), "rgb(102, 102, 102)"); 38 | assert.strictEqual(interpolateHsl("#f00", "#000")(0.5), "rgb(128, 0, 0)"); 39 | }); 40 | 41 | it("interpolateHsl(a, b) uses b’s saturation when a’s saturation is undefined", () => { 42 | assert.strictEqual(interpolateHsl("#000", "#ccc")(0.5), "rgb(102, 102, 102)"); 43 | assert.strictEqual(interpolateHsl("#000", "#f00")(0.5), "rgb(128, 0, 0)"); 44 | }); 45 | 46 | it("interpolateHsl(a, b) uses b’s lightness when a’s lightness is undefined", () => { 47 | assert.strictEqual(interpolateHsl(null, hsl(20, 1.0, 0.5))(0.5), "rgb(255, 85, 0)"); 48 | }); 49 | 50 | it("interpolateHsl(a, b) uses a’s lightness when b’s lightness is undefined", () => { 51 | assert.strictEqual(interpolateHsl(hsl(20, 1.0, 0.5), null)(0.5), "rgb(255, 85, 0)"); 52 | }); 53 | -------------------------------------------------------------------------------- /test/hslLong-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {hsl, rgb} from "d3-color"; 3 | import {interpolateHslLong} from "../src/index.js"; 4 | 5 | it("interpolateHslLong(a, b) converts a and b to HSL colors", () => { 6 | assert.strictEqual(interpolateHslLong("steelblue", "brown")(0), rgb("steelblue") + ""); 7 | assert.strictEqual(interpolateHslLong("steelblue", hsl("brown"))(1), rgb("brown") + ""); 8 | assert.strictEqual(interpolateHslLong("steelblue", rgb("brown"))(1), rgb("brown") + ""); 9 | }); 10 | 11 | it("interpolateHslLong(a, b) interpolates in HSL and returns an RGB string", () => { 12 | assert.strictEqual(interpolateHslLong("steelblue", "#f00")(0.2), "rgb(56, 195, 162)"); 13 | assert.strictEqual(interpolateHslLong("rgba(70, 130, 180, 1)", "rgba(255, 0, 0, 0.2)")(0.2), "rgba(56, 195, 162, 0.84)"); 14 | }); 15 | 16 | it("interpolateHslLong(a, b) does not use the shortest path when interpolating hue", () => { 17 | const i = interpolateHslLong("hsl(10,50%,50%)", "hsl(350,50%,50%)"); 18 | assert.strictEqual(i(0.0), "rgb(191, 85, 64)"); 19 | assert.strictEqual(i(0.2), "rgb(153, 191, 64)"); 20 | assert.strictEqual(i(0.4), "rgb(64, 191, 119)"); 21 | assert.strictEqual(i(0.6), "rgb(64, 119, 191)"); 22 | assert.strictEqual(i(0.8), "rgb(153, 64, 191)"); 23 | assert.strictEqual(i(1.0), "rgb(191, 64, 85)"); 24 | }); 25 | 26 | it("interpolateHslLong(a, b) uses a’s hue when b’s hue is undefined", () => { 27 | assert.strictEqual(interpolateHslLong("#f60", "#000")(0.5), "rgb(128, 51, 0)"); 28 | assert.strictEqual(interpolateHslLong("#6f0", "#fff")(0.5), "rgb(179, 255, 128)"); 29 | }); 30 | 31 | it("interpolateHslLong(a, b) uses b’s hue when a’s hue is undefined", () => { 32 | assert.strictEqual(interpolateHslLong("#000", "#f60")(0.5), "rgb(128, 51, 0)"); 33 | assert.strictEqual(interpolateHslLong("#fff", "#6f0")(0.5), "rgb(179, 255, 128)"); 34 | }); 35 | 36 | it("interpolateHslLong(a, b) uses a’s saturation when b’s saturation is undefined", () => { 37 | assert.strictEqual(interpolateHslLong("#ccc", "#000")(0.5), "rgb(102, 102, 102)"); 38 | assert.strictEqual(interpolateHslLong("#f00", "#000")(0.5), "rgb(128, 0, 0)"); 39 | }); 40 | 41 | it("interpolateHslLong(a, b) uses b’s saturation when a’s saturation is undefined", () => { 42 | assert.strictEqual(interpolateHslLong("#000", "#ccc")(0.5), "rgb(102, 102, 102)"); 43 | assert.strictEqual(interpolateHslLong("#000", "#f00")(0.5), "rgb(128, 0, 0)"); 44 | }); 45 | 46 | it("interpolateHslLong(a, b) uses b’s lightness when a’s lightness is undefined", () => { 47 | assert.strictEqual(interpolateHslLong(null, hsl(20, 1.0, 0.5))(0.5), "rgb(255, 85, 0)"); 48 | }); 49 | 50 | it("interpolateHslLong(a, b) uses a’s lightness when b’s lightness is undefined", () => { 51 | assert.strictEqual(interpolateHslLong(hsl(20, 1.0, 0.5), null)(0.5), "rgb(255, 85, 0)"); 52 | }); 53 | -------------------------------------------------------------------------------- /test/hue-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {interpolateHue} from "../src/index.js"; 3 | 4 | it("interpolateHue(a, b) interpolate numbers", () => { 5 | const i = interpolateHue("10", "20"); 6 | assert.strictEqual(i(0.0), 10); 7 | assert.strictEqual(i(0.2), 12); 8 | assert.strictEqual(i(0.4), 14); 9 | assert.strictEqual(i(0.6), 16); 10 | assert.strictEqual(i(0.8), 18); 11 | assert.strictEqual(i(1.0), 20); 12 | }); 13 | 14 | it("interpolateHue(a, b) returns a if b is NaN", () => { 15 | const i = interpolateHue(10, NaN); 16 | assert.strictEqual(i(0.0), 10); 17 | assert.strictEqual(i(0.5), 10); 18 | assert.strictEqual(i(1.0), 10); 19 | }); 20 | 21 | it("interpolateHue(a, b) returns b if a is NaN", () => { 22 | const i = interpolateHue(NaN, 20); 23 | assert.strictEqual(i(0.0), 20); 24 | assert.strictEqual(i(0.5), 20); 25 | assert.strictEqual(i(1.0), 20); 26 | }); 27 | 28 | it("interpolateHue(a, b) returns NaN if both a and b are NaN", () => { 29 | const i = interpolateHue(NaN, NaN); 30 | assert.strictEqual(isNaN(i(0.0)), true); 31 | assert.strictEqual(isNaN(i(0.5)), true); 32 | assert.strictEqual(isNaN(i(1.0)), true); 33 | }); 34 | 35 | it("interpolateHue(a, b) uses the shortest path", () => { 36 | const i = interpolateHue(10, 350); 37 | assert.strictEqual(i(0.0), 10); 38 | assert.strictEqual(i(0.2), 6); 39 | assert.strictEqual(i(0.4), 2); 40 | assert.strictEqual(i(0.6), 358); 41 | assert.strictEqual(i(0.8), 354); 42 | assert.strictEqual(i(1.0), 350); 43 | }); 44 | -------------------------------------------------------------------------------- /test/lab-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {hsl, lab, rgb} from "d3-color"; 3 | import {interpolateLab} from "../src/index.js"; 4 | 5 | it("interpolateLab(a, b) converts a and b to Lab colors", () => { 6 | assert.strictEqual(interpolateLab("steelblue", "brown")(0), rgb("steelblue") + ""); 7 | assert.strictEqual(interpolateLab("steelblue", hsl("brown"))(1), rgb("brown") + ""); 8 | assert.strictEqual(interpolateLab("steelblue", rgb("brown"))(1), rgb("brown") + ""); 9 | }); 10 | 11 | it("interpolateLab(a, b) interpolates in Lab and returns an RGB string", () => { 12 | assert.strictEqual(interpolateLab("steelblue", "#f00")(0.2), "rgb(134, 120, 146)"); 13 | assert.strictEqual(interpolateLab("rgba(70, 130, 180, 1)", "rgba(255, 0, 0, 0.2)")(0.2), "rgba(134, 120, 146, 0.84)"); 14 | }); 15 | 16 | it("interpolateLab(a, b) uses b’s channel value when a’s channel value is undefined", () => { 17 | assert.strictEqual(interpolateLab(null, lab(20, 40, 60))(0.5), lab(20, 40, 60) + ""); 18 | assert.strictEqual(interpolateLab(lab(NaN, 20, 40), lab(60, 80, 100))(0.5), lab(60, 50, 70) + ""); 19 | assert.strictEqual(interpolateLab(lab(20, NaN, 40), lab(60, 80, 100))(0.5), lab(40, 80, 70) + ""); 20 | assert.strictEqual(interpolateLab(lab(20, 40, NaN), lab(60, 80, 100))(0.5), lab(40, 60, 100) + ""); 21 | }); 22 | 23 | it("interpolateLab(a, b) uses a’s channel value when b’s channel value is undefined", () => { 24 | assert.strictEqual(interpolateLab(lab(20, 40, 60), null)(0.5), lab(20, 40, 60) + ""); 25 | assert.strictEqual(interpolateLab(lab(60, 80, 100), lab(NaN, 20, 40))(0.5), lab(60, 50, 70) + ""); 26 | assert.strictEqual(interpolateLab(lab(60, 80, 100), lab(20, NaN, 40))(0.5), lab(40, 80, 70) + ""); 27 | assert.strictEqual(interpolateLab(lab(60, 80, 100), lab(20, 40, NaN))(0.5), lab(40, 60, 100) + ""); 28 | }); 29 | -------------------------------------------------------------------------------- /test/number-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {interpolateNumber} from "../src/index.js"; 3 | import {assertInDelta} from "./asserts.js"; 4 | 5 | it("interpolateNumber(a, b) interpolates between two numbers a and b", () => { 6 | const i = interpolateNumber(10, 42); 7 | assertInDelta(i(0.0), 10.0); 8 | assertInDelta(i(0.1), 13.2); 9 | assertInDelta(i(0.2), 16.4); 10 | assertInDelta(i(0.3), 19.6); 11 | assertInDelta(i(0.4), 22.8); 12 | assertInDelta(i(0.5), 26.0); 13 | assertInDelta(i(0.6), 29.2); 14 | assertInDelta(i(0.7), 32.4); 15 | assertInDelta(i(0.8), 35.6); 16 | assertInDelta(i(0.9), 38.8); 17 | assertInDelta(i(1.0), 42.0); 18 | }); 19 | 20 | 21 | it("interpolateNumber(a, b) gives exact ends for t=0 and t=1", () => { 22 | const a = 2e+42, b = 335; 23 | assert.strictEqual(interpolateNumber(a, b)(1), b); 24 | assert.strictEqual(interpolateNumber(a, b)(0), a); 25 | }); 26 | -------------------------------------------------------------------------------- /test/numberArray-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {interpolateNumberArray} from "../src/index.js"; 3 | 4 | it("interpolateNumberArray(a, b) interpolates defined elements in a and b", () => { 5 | assert.deepStrictEqual(interpolateNumberArray(Float64Array.of(2, 12), Float64Array.of(4, 24))(0.5), Float64Array.of(3, 18)); 6 | }); 7 | 8 | it("interpolateNumberArray(a, b) ignores elements in a that are not in b", () => { 9 | assert.deepStrictEqual(interpolateNumberArray(Float64Array.of(2, 12, 12), Float64Array.of(4, 24))(0.5), Float64Array.of(3, 18)); 10 | }); 11 | 12 | it("interpolateNumberArray(a, b) uses constant elements in b that are not in a", () => { 13 | assert.deepStrictEqual(interpolateNumberArray(Float64Array.of(2, 12), Float64Array.of(4, 24, 12))(0.5), Float64Array.of(3, 18, 12)); 14 | }); 15 | 16 | it("interpolateNumberArray(a, b) treats undefined as an empty array", () => { 17 | assert.deepStrictEqual(interpolateNumberArray(undefined, [2, 12])(0.5), [2, 12]); 18 | assert.deepStrictEqual(interpolateNumberArray([2, 12], undefined)(0.5), []); 19 | assert.deepStrictEqual(interpolateNumberArray(undefined, undefined)(0.5), []); 20 | }); 21 | 22 | it("interpolateNumberArray(a, b) uses b’s array type", () => { 23 | assert(interpolateNumberArray(Float64Array.of(2, 12), Float64Array.of(4, 24, 12))(0.5) instanceof Float64Array); 24 | assert(interpolateNumberArray(Float64Array.of(2, 12), Float32Array.of(4, 24, 12))(0.5) instanceof Float32Array); 25 | assert(interpolateNumberArray(Float64Array.of(2, 12), Uint8Array.of(4, 24, 12))(0.5) instanceof Uint8Array); 26 | assert(interpolateNumberArray(Float64Array.of(2, 12), Uint16Array.of(4, 24, 12))(0.5) instanceof Uint16Array); 27 | }); 28 | 29 | it("interpolateNumberArray(a, b) works with unsigned data", () => { 30 | assert.deepStrictEqual(interpolateNumberArray(Uint8Array.of(1, 12), Uint8Array.of(255, 0))(0.5), Uint8Array.of(128, 6)); 31 | }); 32 | 33 | it("interpolateNumberArray(a, b) gives exact ends", () => { 34 | const i = interpolateNumberArray(Float64Array.of(2e42), Float64Array.of(355)); 35 | assert.deepStrictEqual(i(0), Float64Array.of(2e42)); 36 | assert.deepStrictEqual(i(1), Float64Array.of(355)); 37 | }); 38 | -------------------------------------------------------------------------------- /test/object-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {interpolateObject} from "../src/index.js"; 3 | 4 | it("interpolateObject(a, b) interpolates defined properties in a and b", () => { 5 | assert.deepStrictEqual(interpolateObject({a: 2, b: 12}, {a: 4, b: 24})(0.5), {a: 3, b: 18}); 6 | }); 7 | 8 | it("interpolateObject(a, b) interpolates inherited properties in a and b", () => { 9 | function a(a) { this.a = a; } 10 | a.prototype.b = 12; 11 | assert.deepStrictEqual(interpolateObject(new a(2), {a: 4, b: 12})(0.5), {a: 3, b: 12}); 12 | assert.deepStrictEqual(interpolateObject({a: 2, b: 12}, new a(4))(0.5), {a: 3, b: 12}); 13 | assert.deepStrictEqual(interpolateObject(new a(4), new a(2))(0.5), {a: 3, b: 12}); 14 | }); 15 | 16 | it("interpolateObject(a, b) interpolates color properties as rgb", () => { 17 | assert.deepStrictEqual(interpolateObject({background: "red"}, {background: "green"})(0.5), {background: "rgb(128, 64, 0)"}); 18 | assert.deepStrictEqual(interpolateObject({fill: "red"}, {fill: "green"})(0.5), {fill: "rgb(128, 64, 0)"}); 19 | assert.deepStrictEqual(interpolateObject({stroke: "red"}, {stroke: "green"})(0.5), {stroke: "rgb(128, 64, 0)"}); 20 | assert.deepStrictEqual(interpolateObject({color: "red"}, {color: "green"})(0.5), {color: "rgb(128, 64, 0)"}); 21 | }); 22 | 23 | it("interpolateObject(a, b) interpolates nested objects and arrays", () => { 24 | assert.deepStrictEqual(interpolateObject({foo: [2, 12]}, {foo: [4, 24]})(0.5), {foo: [3, 18]}); 25 | assert.deepStrictEqual(interpolateObject({foo: {bar: [2, 12]}}, {foo: {bar: [4, 24]}})(0.5), {foo: {bar: [3, 18]}}); 26 | }); 27 | 28 | it("interpolateObject(a, b) ignores properties in a that are not in b", () => { 29 | assert.deepStrictEqual(interpolateObject({foo: 2, bar: 12}, {foo: 4})(0.5), {foo: 3}); 30 | }); 31 | 32 | it("interpolateObject(a, b) uses constant properties in b that are not in a", () => { 33 | assert.deepStrictEqual(interpolateObject({foo: 2}, {foo: 4, bar: 12})(0.5), {foo: 3, bar: 12}); 34 | }); 35 | 36 | it("interpolateObject(a, b) treats undefined as an empty object", () => { 37 | assert.deepStrictEqual(interpolateObject(NaN, {foo: 2})(0.5), {foo: 2}); 38 | assert.deepStrictEqual(interpolateObject({foo: 2}, undefined)(0.5), {}); 39 | assert.deepStrictEqual(interpolateObject(undefined, {foo: 2})(0.5), {foo: 2}); 40 | assert.deepStrictEqual(interpolateObject({foo: 2}, null)(0.5), {}); 41 | assert.deepStrictEqual(interpolateObject(null, {foo: 2})(0.5), {foo: 2}); 42 | assert.deepStrictEqual(interpolateObject(null, NaN)(0.5), {}); 43 | }); 44 | 45 | it("interpolateObject(a, b) interpolates objects without prototype", () => { 46 | assert.deepStrictEqual(interpolateObject(noproto({foo: 0}), noproto({foo: 2}))(0.5), {foo: 1}); 47 | }); 48 | 49 | function noproto(properties) { 50 | return Object.assign(Object.create(null), properties); 51 | } 52 | -------------------------------------------------------------------------------- /test/piecewise-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {interpolate, piecewise} from "../src/index.js"; 3 | 4 | it("piecewise(interpolate, values)(t) returns the expected values", () => { 5 | const i = piecewise(interpolate, [0, 2, 10]); 6 | assert.strictEqual(i(-1), -4); 7 | assert.strictEqual(i(0), 0); 8 | assert.strictEqual(i(0.19), 0.76); 9 | assert.strictEqual(i(0.21), 0.84); 10 | assert.strictEqual(i(0.5), 2); 11 | assert.strictEqual(i(0.75), 6); 12 | assert.strictEqual(i(1), 10); 13 | }); 14 | 15 | it("piecewise(values) uses the default interpolator", () => { 16 | const i = piecewise([0, 2, 10]); 17 | assert.strictEqual(i(-1), -4); 18 | assert.strictEqual(i(0), 0); 19 | assert.strictEqual(i(0.19), 0.76); 20 | assert.strictEqual(i(0.21), 0.84); 21 | assert.strictEqual(i(0.5), 2); 22 | assert.strictEqual(i(0.75), 6); 23 | assert.strictEqual(i(1), 10); 24 | }); 25 | 26 | it("piecewise(values) uses the default interpolator/2", () => { 27 | const i = piecewise(["a0", "a2", "a10"]); 28 | assert.strictEqual(i(-1), "a-4"); 29 | assert.strictEqual(i(0), "a0"); 30 | assert.strictEqual(i(0.19), "a0.76"); 31 | assert.strictEqual(i(0.21), "a0.84"); 32 | assert.strictEqual(i(0.5), "a2"); 33 | assert.strictEqual(i(0.75), "a6"); 34 | assert.strictEqual(i(1), "a10"); 35 | }); 36 | -------------------------------------------------------------------------------- /test/quantize-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {interpolateNumber, interpolateRgb, quantize} from "../src/index.js"; 3 | 4 | it("quantize(interpolate, n) returns n uniformly-spaced samples from the specified interpolator", () => { 5 | assert.deepStrictEqual(quantize(interpolateNumber(0, 1), 5), [ 6 | 0 / 4, 7 | 1 / 4, 8 | 2 / 4, 9 | 3 / 4, 10 | 4 / 4 11 | ]); 12 | assert.deepStrictEqual(quantize(interpolateRgb("steelblue", "brown"), 5), [ 13 | "rgb(70, 130, 180)", 14 | "rgb(94, 108, 146)", 15 | "rgb(118, 86, 111)", 16 | "rgb(141, 64, 77)", 17 | "rgb(165, 42, 42)" 18 | ]); 19 | }); 20 | -------------------------------------------------------------------------------- /test/rgb-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {interpolateRgb} from "../src/index.js"; 3 | import {hsl, rgb} from "d3-color"; 4 | 5 | it("interpolateRgb(a, b) converts a and b to RGB colors", () => { 6 | assert.strictEqual(interpolateRgb("steelblue", "brown")(0), rgb("steelblue") + ""); 7 | assert.strictEqual(interpolateRgb("steelblue", hsl("brown"))(1), rgb("brown") + ""); 8 | assert.strictEqual(interpolateRgb("steelblue", rgb("brown"))(1), rgb("brown") + ""); 9 | }); 10 | 11 | it("interpolateRgb(a, b) interpolates in RGB and returns an RGB string", () => { 12 | assert.strictEqual(interpolateRgb("steelblue", "#f00")(0.2), "rgb(107, 104, 144)"); 13 | assert.strictEqual(interpolateRgb("rgba(70, 130, 180, 1)", "rgba(255, 0, 0, 0.2)")(0.2), "rgba(107, 104, 144, 0.84)"); 14 | }); 15 | 16 | it("interpolateRgb(a, b) uses b’s channel value when a’s channel value is undefined", () => { 17 | assert.strictEqual(interpolateRgb(null, rgb(20, 40, 60))(0.5), rgb(20, 40, 60) + ""); 18 | assert.strictEqual(interpolateRgb(rgb(NaN, 20, 40), rgb(60, 80, 100))(0.5), rgb(60, 50, 70) + ""); 19 | assert.strictEqual(interpolateRgb(rgb(20, NaN, 40), rgb(60, 80, 100))(0.5), rgb(40, 80, 70) + ""); 20 | assert.strictEqual(interpolateRgb(rgb(20, 40, NaN), rgb(60, 80, 100))(0.5), rgb(40, 60, 100) + ""); 21 | }); 22 | 23 | it("interpolateRgb(a, b) uses a’s channel value when b’s channel value is undefined", () => { 24 | assert.strictEqual(interpolateRgb(rgb(20, 40, 60), null)(0.5), rgb(20, 40, 60) + ""); 25 | assert.strictEqual(interpolateRgb(rgb(60, 80, 100), rgb(NaN, 20, 40))(0.5), rgb(60, 50, 70) + ""); 26 | assert.strictEqual(interpolateRgb(rgb(60, 80, 100), rgb(20, NaN, 40))(0.5), rgb(40, 80, 70) + ""); 27 | assert.strictEqual(interpolateRgb(rgb(60, 80, 100), rgb(20, 40, NaN))(0.5), rgb(40, 60, 100) + ""); 28 | }); 29 | 30 | it("interpolateRgb.gamma(3)(a, b) returns the expected values", () => { 31 | assert.strictEqual(interpolateRgb.gamma(3)("steelblue", "#f00")(0.2), "rgb(153, 121, 167)"); 32 | }); 33 | 34 | it("interpolateRgb.gamma(3)(a, b) uses linear interpolation for opacity", () => { 35 | assert.strictEqual(interpolateRgb.gamma(3)("transparent", "#f00")(0.2), "rgba(255, 0, 0, 0.2)"); 36 | }); 37 | 38 | it("interpolateRgb.gamma(g) coerces the specified gamma to a number", () => { 39 | assert.strictEqual(interpolateRgb.gamma({valueOf: function() { return 3; }})("steelblue", "#f00")(0.2), "rgb(153, 121, 167)"); 40 | }); 41 | 42 | it("interpolateRgb(a, b) is equivalent to interpolateRgb.gamma(1)(a, b)", () => { 43 | const i0 = interpolateRgb.gamma(1)("purple", "orange"); 44 | const i1 = interpolateRgb("purple", "orange"); 45 | assert.strictEqual(i1(0.0), i0(0.0)); 46 | assert.strictEqual(i1(0.2), i0(0.2)); 47 | assert.strictEqual(i1(0.4), i0(0.4)); 48 | assert.strictEqual(i1(0.6), i0(0.6)); 49 | assert.strictEqual(i1(0.8), i0(0.8)); 50 | assert.strictEqual(i1(1.0), i0(1.0)); 51 | }); 52 | -------------------------------------------------------------------------------- /test/round-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {interpolateRound} from "../src/index.js"; 3 | 4 | it("interpolateRound(a, b) interpolates between two numbers a and b, and then rounds", () => { 5 | const i = interpolateRound(10, 42); 6 | assert.strictEqual(i(0.0), 10); 7 | assert.strictEqual(i(0.1), 13); 8 | assert.strictEqual(i(0.2), 16); 9 | assert.strictEqual(i(0.3), 20); 10 | assert.strictEqual(i(0.4), 23); 11 | assert.strictEqual(i(0.5), 26); 12 | assert.strictEqual(i(0.6), 29); 13 | assert.strictEqual(i(0.7), 32); 14 | assert.strictEqual(i(0.8), 36); 15 | assert.strictEqual(i(0.9), 39); 16 | assert.strictEqual(i(1.0), 42); 17 | }); 18 | 19 | it("interpolateRound(a, b) does not pre-round a and b", () => { 20 | const i = interpolateRound(2.6, 3.6); 21 | assert.strictEqual(i(0.6), 3); 22 | }); 23 | 24 | it("interpolateRound(a, b) gives exact ends for t=0 and t=1", () => { 25 | const a = 2e+42, b = 335; 26 | assert.strictEqual(interpolateRound(a, b)(1), b); 27 | assert.strictEqual(interpolateRound(a, b)(0), a); 28 | }); 29 | -------------------------------------------------------------------------------- /test/string-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {interpolateString} from "../src/index.js"; 3 | 4 | it("interpolateString(a, b) interpolates matching numbers in a and b", () => { 5 | assert.strictEqual(interpolateString(" 10/20 30", "50/10 100 ")(0.2), "18/18 44 "); 6 | assert.strictEqual(interpolateString(" 10/20 30", "50/10 100 ")(0.4), "26/16 58 "); 7 | }); 8 | 9 | it("interpolateString(a, b) coerces a and b to strings", () => { 10 | assert.strictEqual(interpolateString({toString: function() { return "2px"; }}, {toString: function() { return "12px"; }})(0.25), "4.5px"); 11 | }); 12 | 13 | it("interpolateString(a, b) preserves non-numbers in string b", () => { 14 | assert.strictEqual(interpolateString(" 10/20 30", "50/10 foo ")(0.2), "18/18 foo "); 15 | assert.strictEqual(interpolateString(" 10/20 30", "50/10 foo ")(0.4), "26/16 foo "); 16 | }); 17 | 18 | it("interpolateString(a, b) preserves non-matching numbers in string b", () => { 19 | assert.strictEqual(interpolateString(" 10/20 foo", "50/10 100 ")(0.2), "18/18 100 "); 20 | assert.strictEqual(interpolateString(" 10/20 bar", "50/10 100 ")(0.4), "26/16 100 "); 21 | }); 22 | 23 | it("interpolateString(a, b) preserves equal-value numbers in both strings", () => { 24 | assert.strictEqual(interpolateString(" 10/20 100 20", "50/10 100, 20 ")(0.2), "18/18 100, 20 "); 25 | assert.strictEqual(interpolateString(" 10/20 100 20", "50/10 100, 20 ")(0.4), "26/16 100, 20 "); 26 | }); 27 | 28 | it("interpolateString(a, b) interpolates decimal notation correctly", () => { 29 | assert.strictEqual(interpolateString("1.", "2.")(0.5), "1.5"); 30 | }); 31 | 32 | it("interpolateString(a, b) interpolates exponent notation correctly", () => { 33 | assert.strictEqual(interpolateString("1e+3", "1e+4")(0.5), "5500"); 34 | assert.strictEqual(interpolateString("1e-3", "1e-4")(0.5), "0.00055"); 35 | assert.strictEqual(interpolateString("1.e-3", "1.e-4")(0.5), "0.00055"); 36 | assert.strictEqual(interpolateString("-1.e-3", "-1.e-4")(0.5), "-0.00055"); 37 | assert.strictEqual(interpolateString("+1.e-3", "+1.e-4")(0.5), "0.00055"); 38 | assert.strictEqual(interpolateString(".1e-2", ".1e-3")(0.5), "0.00055"); 39 | }); 40 | 41 | it("interpolateString(a, b) with no numbers, returns the target string", () => { 42 | assert.strictEqual(interpolateString("foo", "bar")(0.5), "bar"); 43 | assert.strictEqual(interpolateString("foo", "")(0.5), ""); 44 | assert.strictEqual(interpolateString("", "bar")(0.5), "bar"); 45 | assert.strictEqual(interpolateString("", "")(0.5), ""); 46 | }); 47 | 48 | it("interpolateString(a, b) with two numerically-equivalent numbers, returns the default format", () => { 49 | assert.strictEqual(interpolateString("top: 1000px;", "top: 1e3px;")(0.5), "top: 1000px;"); 50 | assert.strictEqual(interpolateString("top: 1e3px;", "top: 1000px;")(0.5), "top: 1000px;"); 51 | }); 52 | -------------------------------------------------------------------------------- /test/transformCss-test.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | import assert from "assert"; 4 | import * as d3 from "../src/index.js"; 5 | 6 | // see https://github.com/d3/d3-interpolate/pull/83 7 | // and https://github.com/Automattic/node-canvas/issues/1313 8 | global.DOMMatrix = require("Canvas").DOMMatrix; 9 | 10 | it("interpolateTransformCss(a, b) transforms as expected", () => { 11 | assert.strictEqual(interpolate.interpolateTransformCss( 12 | "translateY(12px) scale(2)", 13 | "translateX(3em) rotate(5deg)" 14 | )(0.5), "translate(24px, 6px) rotate(2.5deg) scale(1.5,1.5)"); 15 | assert.deepStrictEqual(interpolate.interpolateTransformCss( 16 | "matrix(1.0, 2.0, 3.0, 4.0, 5.0, 6.0)", 17 | "translate(3px,90px)" 18 | )(0.5), "translate(4px, 48px) rotate(-58.282525588538995deg) skewX(-39.847576765616985deg) scale(-0.6180339887498949,0.9472135954999579)"); 19 | assert.deepStrictEqual(interpolate.interpolateTransformCss( 20 | "skewX(-60)", 21 | "skewX(60) translate(280,0)" 22 | )(0.5), "translate(140, 0) skewX(0)"); 23 | }); 24 | 25 | */ 26 | -------------------------------------------------------------------------------- /test/value-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {hsl, rgb} from "d3-color"; 3 | import {interpolate} from "../src/index.js"; 4 | 5 | it("interpolate(a, b) interpolates strings if b is a string and not a color", () => { 6 | assert.strictEqual(interpolate("foo", "bar")(0.5), "bar"); 7 | }); 8 | 9 | it("interpolate(a, b) interpolates strings if b is a string and not a color, even if b is coercible to a number", () => { 10 | assert.strictEqual(interpolate("1", "2")(0.5), "1.5"); 11 | assert.strictEqual(interpolate(" 1", " 2")(0.5), " 1.5"); 12 | }); 13 | 14 | it("interpolate(a, b) interpolates RGB colors if b is a string and a color", () => { 15 | assert.strictEqual(interpolate("red", "blue")(0.5), "rgb(128, 0, 128)"); 16 | assert.strictEqual(interpolate("#ff0000", "#0000ff")(0.5), "rgb(128, 0, 128)"); 17 | assert.strictEqual(interpolate("#f00", "#00f")(0.5), "rgb(128, 0, 128)"); 18 | assert.strictEqual(interpolate("rgb(255, 0, 0)", "rgb(0, 0, 255)")(0.5), "rgb(128, 0, 128)"); 19 | assert.strictEqual(interpolate("rgba(255, 0, 0, 1.0)", "rgba(0, 0, 255, 1.0)")(0.5), "rgb(128, 0, 128)"); 20 | assert.strictEqual(interpolate("rgb(100%, 0%, 0%)", "rgb(0%, 0%, 100%)")(0.5), "rgb(128, 0, 128)"); 21 | assert.strictEqual(interpolate("rgba(100%, 0%, 0%, 1.0)", "rgba(0%, 0%, 100%, 1.0)")(0.5), "rgb(128, 0, 128)"); 22 | assert.strictEqual(interpolate("rgba(100%, 0%, 0%, 0.5)", "rgba(0%, 0%, 100%, 0.7)")(0.5), "rgba(128, 0, 128, 0.6)"); 23 | }); 24 | 25 | it("interpolate(a, b) interpolates RGB colors if b is a color", () => { 26 | assert.strictEqual(interpolate("red", rgb("blue"))(0.5), "rgb(128, 0, 128)"); 27 | assert.strictEqual(interpolate("red", hsl("blue"))(0.5), "rgb(128, 0, 128)"); 28 | }); 29 | 30 | it("interpolate(a, b) interpolates arrays if b is an array", () => { 31 | assert.deepStrictEqual(interpolate(["red"], ["blue"])(0.5), ["rgb(128, 0, 128)"]); 32 | }); 33 | 34 | it("interpolate(a, b) interpolates arrays if b is an array, even if b is coercible to a number", () => { 35 | assert.deepStrictEqual(interpolate([1], [2])(0.5), [1.5]); 36 | }); 37 | 38 | it("interpolate(a, b) interpolates numbers if b is a number", () => { 39 | assert.strictEqual(interpolate(1, 2)(0.5), 1.5); 40 | assert(isNaN(interpolate(1, NaN)(0.5))); 41 | }); 42 | 43 | it("interpolate(a, b) interpolates objects if b is an object that is not coercible to a number", () => { 44 | assert.deepStrictEqual(interpolate({color: "red"}, {color: "blue"})(0.5), {color: "rgb(128, 0, 128)"}); 45 | }); 46 | 47 | it("interpolate(a, b) interpolates numbers if b is an object that is coercible to a number", () => { 48 | assert.strictEqual(interpolate(1, new Number(2))(0.5), 1.5); 49 | assert.strictEqual(interpolate(1, new String("2"))(0.5), 1.5); 50 | }); 51 | 52 | it("interpolate(a, b) interpolates dates if b is a date", () => { 53 | const i = interpolate(new Date(2000, 0, 1), new Date(2000, 0, 2)); 54 | const d = i(0.5); 55 | assert.strictEqual(d instanceof Date, true); 56 | assert.strictEqual(+i(0.5), +new Date(2000, 0, 1, 12)); 57 | }); 58 | 59 | it("interpolate(a, b) returns the constant b if b is null, undefined or a boolean", () => { 60 | assert.strictEqual(interpolate(0, null)(0.5), null); 61 | assert.strictEqual(interpolate(0, undefined)(0.5), undefined); 62 | assert.strictEqual(interpolate(0, true)(0.5), true); 63 | assert.strictEqual(interpolate(0, false)(0.5), false); 64 | }); 65 | 66 | it("interpolate(a, b) interpolates objects without prototype", () => { 67 | assert.deepStrictEqual(interpolate(noproto({foo: 0}), noproto({foo: 2}))(0.5), {foo: 1}); 68 | }); 69 | 70 | it("interpolate(a, b) interpolates objects with numeric valueOf as numbers", () => { 71 | const proto = {valueOf: foo}; 72 | assert.deepStrictEqual(interpolate(noproto({foo: 0}, proto), noproto({foo: 2}, proto))(0.5), 1); 73 | }); 74 | 75 | it("interpolate(a, b) interpolates objects with string valueOf as numbers if valueOf result is coercible to number", () => { 76 | const proto = {valueOf: fooString}; 77 | assert.deepStrictEqual(interpolate(noproto({foo: 0}, proto), noproto({foo: 2}, proto))(0.5), 1); 78 | }); 79 | 80 | // valueOf appears here as object because: 81 | // - we use for-in loop and it will ignore only fields coming from built-in prototypes; 82 | // - we replace functions with objects. 83 | it("interpolate(a, b) interpolates objects with string valueOf as objects if valueOf result is not coercible to number", () => { 84 | const proto = {valueOf: fooString}; 85 | assert.deepStrictEqual(interpolate(noproto({foo: "bar"}, proto), noproto({foo: "baz"}, proto))(0.5), {foo: "baz", valueOf: {}}); 86 | }); 87 | 88 | it("interpolate(a, b) interpolates objects with toString as numbers if toString result is coercible to number", () => { 89 | const proto = {toString: fooString}; 90 | assert.deepStrictEqual(interpolate(noproto({foo: 0}, proto), noproto({foo: 2}, proto))(0.5), 1); 91 | }); 92 | 93 | // toString appears here as object because: 94 | // - we use for-in loop and it will ignore only fields coming from built-in prototypes; 95 | // - we replace functions with objects. 96 | it("interpolate(a, b) interpolates objects with toString as objects if toString result is not coercible to number", () => { 97 | const proto = {toString: fooString}; 98 | assert.deepStrictEqual(interpolate(noproto({foo: "bar"}, proto), noproto({foo: "baz"}, proto))(0.5), {foo: "baz", toString: {}}); 99 | }); 100 | 101 | it("interpolate(a, b) interpolates number arrays if b is a typed array", () => { 102 | assert.deepStrictEqual(interpolate([0, 0], Float64Array.of(-1, 1))(0.5), Float64Array.of(-0.5, 0.5)); 103 | assert(interpolate([0, 0], Float64Array.of(-1, 1))(0.5) instanceof Float64Array); 104 | assert.deepStrictEqual(interpolate([0, 0], Float32Array.of(-1, 1))(0.5), Float32Array.of(-0.5, 0.5)); 105 | assert(interpolate([0, 0], Float32Array.of(-1, 1))(0.5) instanceof Float32Array); 106 | assert.deepStrictEqual(interpolate([0, 0], Uint32Array.of(-2, 2))(0.5), Uint32Array.of(Math.pow(2, 31) - 1, 1)); 107 | assert(interpolate([0, 0], Uint32Array.of(-1, 1))(0.5) instanceof Uint32Array); 108 | assert.deepStrictEqual(interpolate([0, 0], Uint8Array.of(-2, 2))(0.5), Uint8Array.of(Math.pow(2, 7) - 1, 1)); 109 | assert(interpolate([0, 0], Uint8Array.of(-1, 1))(0.5) instanceof Uint8Array); 110 | }); 111 | 112 | function noproto(properties, proto = null) { 113 | return Object.assign(Object.create(proto), properties); 114 | } 115 | 116 | function foo() { 117 | return this.foo; 118 | } 119 | 120 | function fooString() { 121 | return String(this.foo); 122 | } 123 | -------------------------------------------------------------------------------- /test/zoom-test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import {interpolateZoom} from "../src/index.js"; 3 | import {assertInDelta} from "./asserts.js"; 4 | 5 | it("interpolateZoom(a, b) handles nearly-coincident points", () => { 6 | assert.deepStrictEqual(interpolateZoom([324.68721096803614, 59.43501602433761, 1.8827137399562621], [324.6872108946794, 59.43501601062763, 7.399052110984391])(0.5), [324.68721093135775, 59.43501601748262, 3.7323313186268305]); 7 | }); 8 | 9 | it("interpolateZoom returns the expected duration", () => { 10 | assertInDelta(interpolateZoom([0, 0, 1], [0, 0, 1.1]).duration, 67, 1); 11 | assertInDelta(interpolateZoom([0, 0, 1], [0, 0, 2]).duration, 490, 1); 12 | assertInDelta(interpolateZoom([0, 0, 1], [10, 0, 8]).duration, 2872.5, 1); 13 | }); 14 | 15 | it("interpolateZoom parameter rho() defaults to sqrt(2)", () => { 16 | assertInDelta(interpolateZoom([0, 0, 1], [10, 10, 5])(0.5), interpolateZoom.rho(Math.sqrt(2))([0, 0, 1], [10, 10, 5])(0.5)); 17 | }); 18 | 19 | it("interpolateZoom.rho(0) is (almost) linear", () => { 20 | const interp = interpolateZoom.rho(0)([0, 0, 1], [10, 0, 8]); 21 | assertInDelta(interp(0.5), [1.111, 0, Math.sqrt(8)], 1e-3); 22 | assert.strictEqual(Math.round(interp.duration), 1470); 23 | }); 24 | 25 | it("interpolateZoom parameter rho(2) has a high curvature and takes more time", () => { 26 | const interp = interpolateZoom.rho(2)([0, 0, 1], [10, 0, 8]); 27 | assertInDelta(interp(0.5), [1.111, 0, 12.885], 1e-3); 28 | assert.strictEqual(Math.round(interp.duration), 3775); 29 | }); 30 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@babel/code-frame@7.12.11": 6 | version "7.12.11" 7 | resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" 8 | integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== 9 | dependencies: 10 | "@babel/highlight" "^7.10.4" 11 | 12 | "@babel/code-frame@^7.10.4": 13 | version "7.12.13" 14 | resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" 15 | integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== 16 | dependencies: 17 | "@babel/highlight" "^7.12.13" 18 | 19 | "@babel/helper-validator-identifier@^7.14.0": 20 | version "7.14.0" 21 | resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz#d26cad8a47c65286b15df1547319a5d0bcf27288" 22 | integrity sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A== 23 | 24 | "@babel/highlight@^7.10.4", "@babel/highlight@^7.12.13": 25 | version "7.14.0" 26 | resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.0.tgz#3197e375711ef6bf834e67d0daec88e4f46113cf" 27 | integrity sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg== 28 | dependencies: 29 | "@babel/helper-validator-identifier" "^7.14.0" 30 | chalk "^2.0.0" 31 | js-tokens "^4.0.0" 32 | 33 | "@eslint/eslintrc@^0.4.2": 34 | version "0.4.2" 35 | resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.2.tgz#f63d0ef06f5c0c57d76c4ab5f63d3835c51b0179" 36 | integrity sha512-8nmGq/4ycLpIwzvhI4tNDmQztZ8sp+hI7cyG8i1nQDhkAbRzHpXPidRAHlNvCZQpJTKw5ItIpMw9RSToGF00mg== 37 | dependencies: 38 | ajv "^6.12.4" 39 | debug "^4.1.1" 40 | espree "^7.3.0" 41 | globals "^13.9.0" 42 | ignore "^4.0.6" 43 | import-fresh "^3.2.1" 44 | js-yaml "^3.13.1" 45 | minimatch "^3.0.4" 46 | strip-json-comments "^3.1.1" 47 | 48 | "@types/node@*": 49 | version "15.12.1" 50 | resolved "https://registry.yarnpkg.com/@types/node/-/node-15.12.1.tgz#9b60797dee1895383a725f828a869c86c6caa5c2" 51 | integrity sha512-zyxJM8I1c9q5sRMtVF+zdd13Jt6RU4r4qfhTd7lQubyThvLfx6yYekWSQjGCGV2Tkecgxnlpl/DNlb6Hg+dmEw== 52 | 53 | "@ungap/promise-all-settled@1.1.2": 54 | version "1.1.2" 55 | resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" 56 | integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== 57 | 58 | acorn-jsx@^5.3.1: 59 | version "5.3.1" 60 | resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" 61 | integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== 62 | 63 | acorn@^7.4.0: 64 | version "7.4.1" 65 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" 66 | integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== 67 | 68 | ajv@^6.10.0, ajv@^6.12.4: 69 | version "6.12.6" 70 | resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" 71 | integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== 72 | dependencies: 73 | fast-deep-equal "^3.1.1" 74 | fast-json-stable-stringify "^2.0.0" 75 | json-schema-traverse "^0.4.1" 76 | uri-js "^4.2.2" 77 | 78 | ajv@^8.0.1: 79 | version "8.5.0" 80 | resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.5.0.tgz#695528274bcb5afc865446aa275484049a18ae4b" 81 | integrity sha512-Y2l399Tt1AguU3BPRP9Fn4eN+Or+StUGWCUpbnFyXSo8NZ9S4uj+AG2pjs5apK+ZMOwYOz1+a+VKvKH7CudXgQ== 82 | dependencies: 83 | fast-deep-equal "^3.1.1" 84 | json-schema-traverse "^1.0.0" 85 | require-from-string "^2.0.2" 86 | uri-js "^4.2.2" 87 | 88 | ansi-colors@4.1.1, ansi-colors@^4.1.1: 89 | version "4.1.1" 90 | resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" 91 | integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== 92 | 93 | ansi-regex@^3.0.0: 94 | version "3.0.0" 95 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" 96 | integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= 97 | 98 | ansi-regex@^5.0.0: 99 | version "5.0.0" 100 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" 101 | integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== 102 | 103 | ansi-styles@^3.2.1: 104 | version "3.2.1" 105 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" 106 | integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== 107 | dependencies: 108 | color-convert "^1.9.0" 109 | 110 | ansi-styles@^4.0.0, ansi-styles@^4.1.0: 111 | version "4.3.0" 112 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" 113 | integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== 114 | dependencies: 115 | color-convert "^2.0.1" 116 | 117 | anymatch@~3.1.1: 118 | version "3.1.2" 119 | resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" 120 | integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== 121 | dependencies: 122 | normalize-path "^3.0.0" 123 | picomatch "^2.0.4" 124 | 125 | argparse@^1.0.7: 126 | version "1.0.10" 127 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" 128 | integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== 129 | dependencies: 130 | sprintf-js "~1.0.2" 131 | 132 | argparse@^2.0.1: 133 | version "2.0.1" 134 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" 135 | integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== 136 | 137 | astral-regex@^2.0.0: 138 | version "2.0.0" 139 | resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" 140 | integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== 141 | 142 | balanced-match@^1.0.0: 143 | version "1.0.2" 144 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" 145 | integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== 146 | 147 | binary-extensions@^2.0.0: 148 | version "2.2.0" 149 | resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" 150 | integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== 151 | 152 | brace-expansion@^1.1.7: 153 | version "1.1.11" 154 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 155 | integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== 156 | dependencies: 157 | balanced-match "^1.0.0" 158 | concat-map "0.0.1" 159 | 160 | braces@~3.0.2: 161 | version "3.0.2" 162 | resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" 163 | integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== 164 | dependencies: 165 | fill-range "^7.0.1" 166 | 167 | browser-stdout@1.3.1: 168 | version "1.3.1" 169 | resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" 170 | integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== 171 | 172 | buffer-from@^1.0.0: 173 | version "1.1.1" 174 | resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" 175 | integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== 176 | 177 | callsites@^3.0.0: 178 | version "3.1.0" 179 | resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" 180 | integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== 181 | 182 | camelcase@^6.0.0: 183 | version "6.2.0" 184 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" 185 | integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== 186 | 187 | chalk@^2.0.0: 188 | version "2.4.2" 189 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" 190 | integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== 191 | dependencies: 192 | ansi-styles "^3.2.1" 193 | escape-string-regexp "^1.0.5" 194 | supports-color "^5.3.0" 195 | 196 | chalk@^4.0.0: 197 | version "4.1.1" 198 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" 199 | integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== 200 | dependencies: 201 | ansi-styles "^4.1.0" 202 | supports-color "^7.1.0" 203 | 204 | chokidar@3.5.1: 205 | version "3.5.1" 206 | resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" 207 | integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== 208 | dependencies: 209 | anymatch "~3.1.1" 210 | braces "~3.0.2" 211 | glob-parent "~5.1.0" 212 | is-binary-path "~2.1.0" 213 | is-glob "~4.0.1" 214 | normalize-path "~3.0.0" 215 | readdirp "~3.5.0" 216 | optionalDependencies: 217 | fsevents "~2.3.1" 218 | 219 | cliui@^7.0.2: 220 | version "7.0.4" 221 | resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" 222 | integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== 223 | dependencies: 224 | string-width "^4.2.0" 225 | strip-ansi "^6.0.0" 226 | wrap-ansi "^7.0.0" 227 | 228 | color-convert@^1.9.0: 229 | version "1.9.3" 230 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" 231 | integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== 232 | dependencies: 233 | color-name "1.1.3" 234 | 235 | color-convert@^2.0.1: 236 | version "2.0.1" 237 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" 238 | integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== 239 | dependencies: 240 | color-name "~1.1.4" 241 | 242 | color-name@1.1.3: 243 | version "1.1.3" 244 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" 245 | integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= 246 | 247 | color-name@~1.1.4: 248 | version "1.1.4" 249 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" 250 | integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== 251 | 252 | commander@^2.20.0: 253 | version "2.20.3" 254 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" 255 | integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== 256 | 257 | concat-map@0.0.1: 258 | version "0.0.1" 259 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 260 | integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= 261 | 262 | cross-spawn@^7.0.2: 263 | version "7.0.3" 264 | resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" 265 | integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== 266 | dependencies: 267 | path-key "^3.1.0" 268 | shebang-command "^2.0.0" 269 | which "^2.0.1" 270 | 271 | "d3-color@1 - 3": 272 | version "3.0.1" 273 | resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.0.1.tgz#03316e595955d1fcd39d9f3610ad41bb90194d0a" 274 | integrity sha512-6/SlHkDOBLyQSJ1j1Ghs82OIUXpKWlR0hCsw0XrLSQhuUPuCSmLQ1QPH98vpnQxMUQM2/gfAkUEWsupVpd9JGw== 275 | 276 | debug@4.3.1, debug@^4.0.1, debug@^4.1.1: 277 | version "4.3.1" 278 | resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" 279 | integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== 280 | dependencies: 281 | ms "2.1.2" 282 | 283 | decamelize@^4.0.0: 284 | version "4.0.0" 285 | resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" 286 | integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== 287 | 288 | deep-is@^0.1.3: 289 | version "0.1.3" 290 | resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" 291 | integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= 292 | 293 | diff@5.0.0: 294 | version "5.0.0" 295 | resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" 296 | integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== 297 | 298 | doctrine@^3.0.0: 299 | version "3.0.0" 300 | resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" 301 | integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== 302 | dependencies: 303 | esutils "^2.0.2" 304 | 305 | emoji-regex@^8.0.0: 306 | version "8.0.0" 307 | resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" 308 | integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== 309 | 310 | enquirer@^2.3.5: 311 | version "2.3.6" 312 | resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" 313 | integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== 314 | dependencies: 315 | ansi-colors "^4.1.1" 316 | 317 | escalade@^3.1.1: 318 | version "3.1.1" 319 | resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" 320 | integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== 321 | 322 | escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: 323 | version "4.0.0" 324 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" 325 | integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== 326 | 327 | escape-string-regexp@^1.0.5: 328 | version "1.0.5" 329 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 330 | integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= 331 | 332 | eslint-scope@^5.1.1: 333 | version "5.1.1" 334 | resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" 335 | integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== 336 | dependencies: 337 | esrecurse "^4.3.0" 338 | estraverse "^4.1.1" 339 | 340 | eslint-utils@^2.1.0: 341 | version "2.1.0" 342 | resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" 343 | integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== 344 | dependencies: 345 | eslint-visitor-keys "^1.1.0" 346 | 347 | eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: 348 | version "1.3.0" 349 | resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" 350 | integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== 351 | 352 | eslint-visitor-keys@^2.0.0: 353 | version "2.1.0" 354 | resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" 355 | integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== 356 | 357 | eslint@7: 358 | version "7.28.0" 359 | resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.28.0.tgz#435aa17a0b82c13bb2be9d51408b617e49c1e820" 360 | integrity sha512-UMfH0VSjP0G4p3EWirscJEQ/cHqnT/iuH6oNZOB94nBjWbMnhGEPxsZm1eyIW0C/9jLI0Fow4W5DXLjEI7mn1g== 361 | dependencies: 362 | "@babel/code-frame" "7.12.11" 363 | "@eslint/eslintrc" "^0.4.2" 364 | ajv "^6.10.0" 365 | chalk "^4.0.0" 366 | cross-spawn "^7.0.2" 367 | debug "^4.0.1" 368 | doctrine "^3.0.0" 369 | enquirer "^2.3.5" 370 | escape-string-regexp "^4.0.0" 371 | eslint-scope "^5.1.1" 372 | eslint-utils "^2.1.0" 373 | eslint-visitor-keys "^2.0.0" 374 | espree "^7.3.1" 375 | esquery "^1.4.0" 376 | esutils "^2.0.2" 377 | fast-deep-equal "^3.1.3" 378 | file-entry-cache "^6.0.1" 379 | functional-red-black-tree "^1.0.1" 380 | glob-parent "^5.1.2" 381 | globals "^13.6.0" 382 | ignore "^4.0.6" 383 | import-fresh "^3.0.0" 384 | imurmurhash "^0.1.4" 385 | is-glob "^4.0.0" 386 | js-yaml "^3.13.1" 387 | json-stable-stringify-without-jsonify "^1.0.1" 388 | levn "^0.4.1" 389 | lodash.merge "^4.6.2" 390 | minimatch "^3.0.4" 391 | natural-compare "^1.4.0" 392 | optionator "^0.9.1" 393 | progress "^2.0.0" 394 | regexpp "^3.1.0" 395 | semver "^7.2.1" 396 | strip-ansi "^6.0.0" 397 | strip-json-comments "^3.1.0" 398 | table "^6.0.9" 399 | text-table "^0.2.0" 400 | v8-compile-cache "^2.0.3" 401 | 402 | espree@^7.3.0, espree@^7.3.1: 403 | version "7.3.1" 404 | resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" 405 | integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== 406 | dependencies: 407 | acorn "^7.4.0" 408 | acorn-jsx "^5.3.1" 409 | eslint-visitor-keys "^1.3.0" 410 | 411 | esprima@^4.0.0: 412 | version "4.0.1" 413 | resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" 414 | integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== 415 | 416 | esquery@^1.4.0: 417 | version "1.4.0" 418 | resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" 419 | integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== 420 | dependencies: 421 | estraverse "^5.1.0" 422 | 423 | esrecurse@^4.3.0: 424 | version "4.3.0" 425 | resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" 426 | integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== 427 | dependencies: 428 | estraverse "^5.2.0" 429 | 430 | estraverse@^4.1.1: 431 | version "4.3.0" 432 | resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" 433 | integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== 434 | 435 | estraverse@^5.1.0, estraverse@^5.2.0: 436 | version "5.2.0" 437 | resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" 438 | integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== 439 | 440 | esutils@^2.0.2: 441 | version "2.0.3" 442 | resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" 443 | integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== 444 | 445 | fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: 446 | version "3.1.3" 447 | resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" 448 | integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== 449 | 450 | fast-json-stable-stringify@^2.0.0: 451 | version "2.1.0" 452 | resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" 453 | integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== 454 | 455 | fast-levenshtein@^2.0.6: 456 | version "2.0.6" 457 | resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" 458 | integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= 459 | 460 | file-entry-cache@^6.0.1: 461 | version "6.0.1" 462 | resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" 463 | integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== 464 | dependencies: 465 | flat-cache "^3.0.4" 466 | 467 | fill-range@^7.0.1: 468 | version "7.0.1" 469 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" 470 | integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== 471 | dependencies: 472 | to-regex-range "^5.0.1" 473 | 474 | find-up@5.0.0: 475 | version "5.0.0" 476 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" 477 | integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== 478 | dependencies: 479 | locate-path "^6.0.0" 480 | path-exists "^4.0.0" 481 | 482 | flat-cache@^3.0.4: 483 | version "3.0.4" 484 | resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" 485 | integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== 486 | dependencies: 487 | flatted "^3.1.0" 488 | rimraf "^3.0.2" 489 | 490 | flat@^5.0.2: 491 | version "5.0.2" 492 | resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" 493 | integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== 494 | 495 | flatted@^3.1.0: 496 | version "3.1.1" 497 | resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" 498 | integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== 499 | 500 | fs.realpath@^1.0.0: 501 | version "1.0.0" 502 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 503 | integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= 504 | 505 | fsevents@~2.3.1: 506 | version "2.3.2" 507 | resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" 508 | integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== 509 | 510 | functional-red-black-tree@^1.0.1: 511 | version "1.0.1" 512 | resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" 513 | integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= 514 | 515 | get-caller-file@^2.0.5: 516 | version "2.0.5" 517 | resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" 518 | integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== 519 | 520 | glob-parent@^5.1.2, glob-parent@~5.1.0: 521 | version "5.1.2" 522 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" 523 | integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== 524 | dependencies: 525 | is-glob "^4.0.1" 526 | 527 | glob@7.1.6: 528 | version "7.1.6" 529 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" 530 | integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== 531 | dependencies: 532 | fs.realpath "^1.0.0" 533 | inflight "^1.0.4" 534 | inherits "2" 535 | minimatch "^3.0.4" 536 | once "^1.3.0" 537 | path-is-absolute "^1.0.0" 538 | 539 | glob@^7.1.3: 540 | version "7.1.7" 541 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" 542 | integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== 543 | dependencies: 544 | fs.realpath "^1.0.0" 545 | inflight "^1.0.4" 546 | inherits "2" 547 | minimatch "^3.0.4" 548 | once "^1.3.0" 549 | path-is-absolute "^1.0.0" 550 | 551 | globals@^13.6.0, globals@^13.9.0: 552 | version "13.9.0" 553 | resolved "https://registry.yarnpkg.com/globals/-/globals-13.9.0.tgz#4bf2bf635b334a173fb1daf7c5e6b218ecdc06cb" 554 | integrity sha512-74/FduwI/JaIrr1H8e71UbDE+5x7pIPs1C2rrwC52SszOo043CsWOZEMW7o2Y58xwm9b+0RBKDxY5n2sUpEFxA== 555 | dependencies: 556 | type-fest "^0.20.2" 557 | 558 | growl@1.10.5: 559 | version "1.10.5" 560 | resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" 561 | integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== 562 | 563 | has-flag@^3.0.0: 564 | version "3.0.0" 565 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" 566 | integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= 567 | 568 | has-flag@^4.0.0: 569 | version "4.0.0" 570 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" 571 | integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== 572 | 573 | he@1.2.0: 574 | version "1.2.0" 575 | resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" 576 | integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== 577 | 578 | ignore@^4.0.6: 579 | version "4.0.6" 580 | resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" 581 | integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== 582 | 583 | import-fresh@^3.0.0, import-fresh@^3.2.1: 584 | version "3.3.0" 585 | resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" 586 | integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== 587 | dependencies: 588 | parent-module "^1.0.0" 589 | resolve-from "^4.0.0" 590 | 591 | imurmurhash@^0.1.4: 592 | version "0.1.4" 593 | resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" 594 | integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= 595 | 596 | inflight@^1.0.4: 597 | version "1.0.6" 598 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 599 | integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= 600 | dependencies: 601 | once "^1.3.0" 602 | wrappy "1" 603 | 604 | inherits@2: 605 | version "2.0.4" 606 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" 607 | integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== 608 | 609 | is-binary-path@~2.1.0: 610 | version "2.1.0" 611 | resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" 612 | integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== 613 | dependencies: 614 | binary-extensions "^2.0.0" 615 | 616 | is-extglob@^2.1.1: 617 | version "2.1.1" 618 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" 619 | integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= 620 | 621 | is-fullwidth-code-point@^2.0.0: 622 | version "2.0.0" 623 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" 624 | integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= 625 | 626 | is-fullwidth-code-point@^3.0.0: 627 | version "3.0.0" 628 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" 629 | integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== 630 | 631 | is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: 632 | version "4.0.1" 633 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" 634 | integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== 635 | dependencies: 636 | is-extglob "^2.1.1" 637 | 638 | is-number@^7.0.0: 639 | version "7.0.0" 640 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" 641 | integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== 642 | 643 | is-plain-obj@^2.1.0: 644 | version "2.1.0" 645 | resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" 646 | integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== 647 | 648 | isexe@^2.0.0: 649 | version "2.0.0" 650 | resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 651 | integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= 652 | 653 | jest-worker@^26.2.1: 654 | version "26.6.2" 655 | resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" 656 | integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== 657 | dependencies: 658 | "@types/node" "*" 659 | merge-stream "^2.0.0" 660 | supports-color "^7.0.0" 661 | 662 | js-tokens@^4.0.0: 663 | version "4.0.0" 664 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" 665 | integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== 666 | 667 | js-yaml@4.0.0: 668 | version "4.0.0" 669 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f" 670 | integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q== 671 | dependencies: 672 | argparse "^2.0.1" 673 | 674 | js-yaml@^3.13.1: 675 | version "3.14.1" 676 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" 677 | integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== 678 | dependencies: 679 | argparse "^1.0.7" 680 | esprima "^4.0.0" 681 | 682 | json-schema-traverse@^0.4.1: 683 | version "0.4.1" 684 | resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" 685 | integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== 686 | 687 | json-schema-traverse@^1.0.0: 688 | version "1.0.0" 689 | resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" 690 | integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== 691 | 692 | json-stable-stringify-without-jsonify@^1.0.1: 693 | version "1.0.1" 694 | resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" 695 | integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= 696 | 697 | levn@^0.4.1: 698 | version "0.4.1" 699 | resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" 700 | integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== 701 | dependencies: 702 | prelude-ls "^1.2.1" 703 | type-check "~0.4.0" 704 | 705 | locate-path@^6.0.0: 706 | version "6.0.0" 707 | resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" 708 | integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== 709 | dependencies: 710 | p-locate "^5.0.0" 711 | 712 | lodash.clonedeep@^4.5.0: 713 | version "4.5.0" 714 | resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" 715 | integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= 716 | 717 | lodash.merge@^4.6.2: 718 | version "4.6.2" 719 | resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" 720 | integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== 721 | 722 | lodash.truncate@^4.4.2: 723 | version "4.4.2" 724 | resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" 725 | integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= 726 | 727 | log-symbols@4.0.0: 728 | version "4.0.0" 729 | resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" 730 | integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== 731 | dependencies: 732 | chalk "^4.0.0" 733 | 734 | lru-cache@^6.0.0: 735 | version "6.0.0" 736 | resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" 737 | integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== 738 | dependencies: 739 | yallist "^4.0.0" 740 | 741 | merge-stream@^2.0.0: 742 | version "2.0.0" 743 | resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" 744 | integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== 745 | 746 | minimatch@3.0.4, minimatch@^3.0.4: 747 | version "3.0.4" 748 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 749 | integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== 750 | dependencies: 751 | brace-expansion "^1.1.7" 752 | 753 | mocha@8: 754 | version "8.4.0" 755 | resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.4.0.tgz#677be88bf15980a3cae03a73e10a0fc3997f0cff" 756 | integrity sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ== 757 | dependencies: 758 | "@ungap/promise-all-settled" "1.1.2" 759 | ansi-colors "4.1.1" 760 | browser-stdout "1.3.1" 761 | chokidar "3.5.1" 762 | debug "4.3.1" 763 | diff "5.0.0" 764 | escape-string-regexp "4.0.0" 765 | find-up "5.0.0" 766 | glob "7.1.6" 767 | growl "1.10.5" 768 | he "1.2.0" 769 | js-yaml "4.0.0" 770 | log-symbols "4.0.0" 771 | minimatch "3.0.4" 772 | ms "2.1.3" 773 | nanoid "3.1.20" 774 | serialize-javascript "5.0.1" 775 | strip-json-comments "3.1.1" 776 | supports-color "8.1.1" 777 | which "2.0.2" 778 | wide-align "1.1.3" 779 | workerpool "6.1.0" 780 | yargs "16.2.0" 781 | yargs-parser "20.2.4" 782 | yargs-unparser "2.0.0" 783 | 784 | ms@2.1.2: 785 | version "2.1.2" 786 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" 787 | integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== 788 | 789 | ms@2.1.3: 790 | version "2.1.3" 791 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" 792 | integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== 793 | 794 | nanoid@3.1.20: 795 | version "3.1.20" 796 | resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788" 797 | integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw== 798 | 799 | natural-compare@^1.4.0: 800 | version "1.4.0" 801 | resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" 802 | integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= 803 | 804 | normalize-path@^3.0.0, normalize-path@~3.0.0: 805 | version "3.0.0" 806 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" 807 | integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== 808 | 809 | once@^1.3.0: 810 | version "1.4.0" 811 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 812 | integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= 813 | dependencies: 814 | wrappy "1" 815 | 816 | optionator@^0.9.1: 817 | version "0.9.1" 818 | resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" 819 | integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== 820 | dependencies: 821 | deep-is "^0.1.3" 822 | fast-levenshtein "^2.0.6" 823 | levn "^0.4.1" 824 | prelude-ls "^1.2.1" 825 | type-check "^0.4.0" 826 | word-wrap "^1.2.3" 827 | 828 | p-limit@^3.0.2: 829 | version "3.1.0" 830 | resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" 831 | integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== 832 | dependencies: 833 | yocto-queue "^0.1.0" 834 | 835 | p-locate@^5.0.0: 836 | version "5.0.0" 837 | resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" 838 | integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== 839 | dependencies: 840 | p-limit "^3.0.2" 841 | 842 | parent-module@^1.0.0: 843 | version "1.0.1" 844 | resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" 845 | integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== 846 | dependencies: 847 | callsites "^3.0.0" 848 | 849 | path-exists@^4.0.0: 850 | version "4.0.0" 851 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" 852 | integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== 853 | 854 | path-is-absolute@^1.0.0: 855 | version "1.0.1" 856 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 857 | integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= 858 | 859 | path-key@^3.1.0: 860 | version "3.1.1" 861 | resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" 862 | integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== 863 | 864 | picomatch@^2.0.4, picomatch@^2.2.1: 865 | version "2.3.0" 866 | resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" 867 | integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== 868 | 869 | prelude-ls@^1.2.1: 870 | version "1.2.1" 871 | resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" 872 | integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== 873 | 874 | progress@^2.0.0: 875 | version "2.0.3" 876 | resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" 877 | integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== 878 | 879 | punycode@^2.1.0: 880 | version "2.1.1" 881 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" 882 | integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== 883 | 884 | randombytes@^2.1.0: 885 | version "2.1.0" 886 | resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" 887 | integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== 888 | dependencies: 889 | safe-buffer "^5.1.0" 890 | 891 | readdirp@~3.5.0: 892 | version "3.5.0" 893 | resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" 894 | integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== 895 | dependencies: 896 | picomatch "^2.2.1" 897 | 898 | regexpp@^3.1.0: 899 | version "3.1.0" 900 | resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" 901 | integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== 902 | 903 | require-directory@^2.1.1: 904 | version "2.1.1" 905 | resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" 906 | integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= 907 | 908 | require-from-string@^2.0.2: 909 | version "2.0.2" 910 | resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" 911 | integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== 912 | 913 | resolve-from@^4.0.0: 914 | version "4.0.0" 915 | resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" 916 | integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== 917 | 918 | rimraf@^3.0.2: 919 | version "3.0.2" 920 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" 921 | integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== 922 | dependencies: 923 | glob "^7.1.3" 924 | 925 | rollup-plugin-terser@7: 926 | version "7.0.2" 927 | resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz#e8fbba4869981b2dc35ae7e8a502d5c6c04d324d" 928 | integrity sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ== 929 | dependencies: 930 | "@babel/code-frame" "^7.10.4" 931 | jest-worker "^26.2.1" 932 | serialize-javascript "^4.0.0" 933 | terser "^5.0.0" 934 | 935 | rollup@2: 936 | version "2.50.6" 937 | resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.50.6.tgz#24e2211caf9031081656e98a5e5e94d3b5e786e2" 938 | integrity sha512-6c5CJPLVgo0iNaZWWliNu1Kl43tjP9LZcp6D/tkf2eLH2a9/WeHxg9vfTFl8QV/2SOyaJX37CEm9XuGM0rviUg== 939 | optionalDependencies: 940 | fsevents "~2.3.1" 941 | 942 | safe-buffer@^5.1.0: 943 | version "5.2.1" 944 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" 945 | integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== 946 | 947 | semver@^7.2.1: 948 | version "7.3.5" 949 | resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" 950 | integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== 951 | dependencies: 952 | lru-cache "^6.0.0" 953 | 954 | serialize-javascript@5.0.1: 955 | version "5.0.1" 956 | resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" 957 | integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== 958 | dependencies: 959 | randombytes "^2.1.0" 960 | 961 | serialize-javascript@^4.0.0: 962 | version "4.0.0" 963 | resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" 964 | integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== 965 | dependencies: 966 | randombytes "^2.1.0" 967 | 968 | shebang-command@^2.0.0: 969 | version "2.0.0" 970 | resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" 971 | integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== 972 | dependencies: 973 | shebang-regex "^3.0.0" 974 | 975 | shebang-regex@^3.0.0: 976 | version "3.0.0" 977 | resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" 978 | integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== 979 | 980 | slice-ansi@^4.0.0: 981 | version "4.0.0" 982 | resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" 983 | integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== 984 | dependencies: 985 | ansi-styles "^4.0.0" 986 | astral-regex "^2.0.0" 987 | is-fullwidth-code-point "^3.0.0" 988 | 989 | source-map-support@~0.5.19: 990 | version "0.5.19" 991 | resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" 992 | integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== 993 | dependencies: 994 | buffer-from "^1.0.0" 995 | source-map "^0.6.0" 996 | 997 | source-map@^0.6.0: 998 | version "0.6.1" 999 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" 1000 | integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== 1001 | 1002 | source-map@~0.7.2: 1003 | version "0.7.3" 1004 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" 1005 | integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== 1006 | 1007 | sprintf-js@~1.0.2: 1008 | version "1.0.3" 1009 | resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" 1010 | integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= 1011 | 1012 | "string-width@^1.0.2 || 2": 1013 | version "2.1.1" 1014 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" 1015 | integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== 1016 | dependencies: 1017 | is-fullwidth-code-point "^2.0.0" 1018 | strip-ansi "^4.0.0" 1019 | 1020 | string-width@^4.1.0, string-width@^4.2.0: 1021 | version "4.2.2" 1022 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" 1023 | integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== 1024 | dependencies: 1025 | emoji-regex "^8.0.0" 1026 | is-fullwidth-code-point "^3.0.0" 1027 | strip-ansi "^6.0.0" 1028 | 1029 | strip-ansi@^4.0.0: 1030 | version "4.0.0" 1031 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" 1032 | integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= 1033 | dependencies: 1034 | ansi-regex "^3.0.0" 1035 | 1036 | strip-ansi@^6.0.0: 1037 | version "6.0.0" 1038 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" 1039 | integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== 1040 | dependencies: 1041 | ansi-regex "^5.0.0" 1042 | 1043 | strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: 1044 | version "3.1.1" 1045 | resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" 1046 | integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== 1047 | 1048 | supports-color@8.1.1: 1049 | version "8.1.1" 1050 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" 1051 | integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== 1052 | dependencies: 1053 | has-flag "^4.0.0" 1054 | 1055 | supports-color@^5.3.0: 1056 | version "5.5.0" 1057 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" 1058 | integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== 1059 | dependencies: 1060 | has-flag "^3.0.0" 1061 | 1062 | supports-color@^7.0.0, supports-color@^7.1.0: 1063 | version "7.2.0" 1064 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" 1065 | integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== 1066 | dependencies: 1067 | has-flag "^4.0.0" 1068 | 1069 | table@^6.0.9: 1070 | version "6.7.1" 1071 | resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2" 1072 | integrity sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg== 1073 | dependencies: 1074 | ajv "^8.0.1" 1075 | lodash.clonedeep "^4.5.0" 1076 | lodash.truncate "^4.4.2" 1077 | slice-ansi "^4.0.0" 1078 | string-width "^4.2.0" 1079 | strip-ansi "^6.0.0" 1080 | 1081 | terser@^5.0.0: 1082 | version "5.7.0" 1083 | resolved "https://registry.yarnpkg.com/terser/-/terser-5.7.0.tgz#a761eeec206bc87b605ab13029876ead938ae693" 1084 | integrity sha512-HP5/9hp2UaZt5fYkuhNBR8YyRcT8juw8+uFbAme53iN9hblvKnLUTKkmwJG6ocWpIKf8UK4DoeWG4ty0J6S6/g== 1085 | dependencies: 1086 | commander "^2.20.0" 1087 | source-map "~0.7.2" 1088 | source-map-support "~0.5.19" 1089 | 1090 | text-table@^0.2.0: 1091 | version "0.2.0" 1092 | resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" 1093 | integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= 1094 | 1095 | to-regex-range@^5.0.1: 1096 | version "5.0.1" 1097 | resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" 1098 | integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== 1099 | dependencies: 1100 | is-number "^7.0.0" 1101 | 1102 | type-check@^0.4.0, type-check@~0.4.0: 1103 | version "0.4.0" 1104 | resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" 1105 | integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== 1106 | dependencies: 1107 | prelude-ls "^1.2.1" 1108 | 1109 | type-fest@^0.20.2: 1110 | version "0.20.2" 1111 | resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" 1112 | integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== 1113 | 1114 | uri-js@^4.2.2: 1115 | version "4.4.1" 1116 | resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" 1117 | integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== 1118 | dependencies: 1119 | punycode "^2.1.0" 1120 | 1121 | v8-compile-cache@^2.0.3: 1122 | version "2.3.0" 1123 | resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" 1124 | integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== 1125 | 1126 | which@2.0.2, which@^2.0.1: 1127 | version "2.0.2" 1128 | resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" 1129 | integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== 1130 | dependencies: 1131 | isexe "^2.0.0" 1132 | 1133 | wide-align@1.1.3: 1134 | version "1.1.3" 1135 | resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" 1136 | integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== 1137 | dependencies: 1138 | string-width "^1.0.2 || 2" 1139 | 1140 | word-wrap@^1.2.3: 1141 | version "1.2.3" 1142 | resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" 1143 | integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== 1144 | 1145 | workerpool@6.1.0: 1146 | version "6.1.0" 1147 | resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.0.tgz#a8e038b4c94569596852de7a8ea4228eefdeb37b" 1148 | integrity sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg== 1149 | 1150 | wrap-ansi@^7.0.0: 1151 | version "7.0.0" 1152 | resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" 1153 | integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== 1154 | dependencies: 1155 | ansi-styles "^4.0.0" 1156 | string-width "^4.1.0" 1157 | strip-ansi "^6.0.0" 1158 | 1159 | wrappy@1: 1160 | version "1.0.2" 1161 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 1162 | integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= 1163 | 1164 | y18n@^5.0.5: 1165 | version "5.0.8" 1166 | resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" 1167 | integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== 1168 | 1169 | yallist@^4.0.0: 1170 | version "4.0.0" 1171 | resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" 1172 | integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== 1173 | 1174 | yargs-parser@20.2.4: 1175 | version "20.2.4" 1176 | resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" 1177 | integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== 1178 | 1179 | yargs-parser@^20.2.2: 1180 | version "20.2.7" 1181 | resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a" 1182 | integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw== 1183 | 1184 | yargs-unparser@2.0.0: 1185 | version "2.0.0" 1186 | resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" 1187 | integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== 1188 | dependencies: 1189 | camelcase "^6.0.0" 1190 | decamelize "^4.0.0" 1191 | flat "^5.0.2" 1192 | is-plain-obj "^2.1.0" 1193 | 1194 | yargs@16.2.0: 1195 | version "16.2.0" 1196 | resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" 1197 | integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== 1198 | dependencies: 1199 | cliui "^7.0.2" 1200 | escalade "^3.1.1" 1201 | get-caller-file "^2.0.5" 1202 | require-directory "^2.1.1" 1203 | string-width "^4.2.0" 1204 | y18n "^5.0.5" 1205 | yargs-parser "^20.2.2" 1206 | 1207 | yocto-queue@^0.1.0: 1208 | version "0.1.0" 1209 | resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" 1210 | integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== 1211 | --------------------------------------------------------------------------------