From 14d663cc047d0d9235c0c8d3472448080cddeda0 Mon Sep 17 00:00:00 2001 From: Zack Schuster Date: Tue, 27 Sep 2022 16:43:44 -0700 Subject: [PATCH 01/32] initial work to remove jquery & modernize code --- .gitignore | 2 + examples/1004-multiple-boards.example | 24 +- examples/2005-animation-speed.example | 4 +- examples/2006-spare-pieces.example | 6 +- examples/3001-set-position.example | 24 +- examples/3003-clear.example | 26 +- examples/3004-move-pieces.example | 22 +- examples/4000-onchange.example | 18 +- examples/4012-onmoveend.example | 6 +- lib/chessboard.css | 76 +- lib/chessboard.js | 3348 ++++++++++++------------- package.json | 11 +- scripts/build.js | 48 +- scripts/website.js | 351 +-- templates/homepage.mustache | 4 +- website/js/examples.js | 28 +- yarn.lock | 2195 +++++++++------- 17 files changed, 3243 insertions(+), 2950 deletions(-) diff --git a/.gitignore b/.gitignore index f31703fb..377a0864 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,8 @@ dist/ node_modules/ +.DS_Store + website/*.html website/css/chessboard.css website/js/chessboard.js diff --git a/examples/1004-multiple-boards.example b/examples/1004-multiple-boards.example index 54c45e6d..7d5ba8bd 100644 --- a/examples/1004-multiple-boards.example +++ b/examples/1004-multiple-boards.example @@ -1,36 +1,36 @@ ===== id 1004 -===== Name -Multiple Boards - -===== Description -You can have multiple boards on the same page. - +===== Name +Multiple Boards + +===== Description +You can have multiple boards on the same page. + ===== CSS .small-board { display: inline-block; margin-right: 5px; width: 200px; } - + ===== HTML
- -===== JS -var board1 = Chessboard('board1', { + +===== JS +var board1 = new Chessboard('board1', { position: 'start', showNotation: false }) -var board2 = Chessboard('board2', { +var board2 = new Chessboard('board2', { position: 'r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R', showNotation: false }) -var board3 = Chessboard('board3', { +var board3 = new Chessboard('board3', { position: 'r1k4r/p2nb1p1/2b4p/1p1n1p2/2PP4/3Q1NB1/1P3PPP/R5K1', showNotation: false }) diff --git a/examples/2005-animation-speed.example b/examples/2005-animation-speed.example index e76fa249..597bea9f 100644 --- a/examples/2005-animation-speed.example +++ b/examples/2005-animation-speed.example @@ -13,7 +13,7 @@ You can control animation speeds with the < ===== JS -var board = Chessboard('myBoard', { +var board = new Chessboard('myBoard', { draggable: true, moveSpeed: 'slow', snapbackSpeed: 500, @@ -24,4 +24,4 @@ var board = Chessboard('myBoard', { $('#ruyLopezBtn').on('click', function () { board.position('r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R') }) -$('#startBtn').on('click', board.start) +$('#startBtn').on('click', () => board.start()) diff --git a/examples/2006-spare-pieces.example b/examples/2006-spare-pieces.example index 25166835..a5dbcd3d 100644 --- a/examples/2006-spare-pieces.example +++ b/examples/2006-spare-pieces.example @@ -13,11 +13,11 @@ Set sparePiecesClear Board ===== JS -var board = Chessboard('myBoard', { +var board = new Chessboard('myBoard', { draggable: true, dropOffBoard: 'trash', sparePieces: true }) -$('#startBtn').on('click', board.start) -$('#clearBtn').on('click', board.clear) +$('#startBtn').on('click', () => board.start()) +$('#clearBtn').on('click', () => board.clear()) diff --git a/examples/3001-set-position.example b/examples/3001-set-position.example index e999f107..fe2d01fe 100644 --- a/examples/3001-set-position.example +++ b/examples/3001-set-position.example @@ -1,26 +1,26 @@ ===== id 3001 -===== Name -Set Position - -===== Description -Use the start and position methods to set the board position. - -===== HTML -
+===== Name +Set Position + +===== Description +Use the start and position methods to set the board position. + +===== HTML +
- -===== JS -var board = Chessboard('myBoard') + +===== JS +var board = new Chessboard('myBoard') $('#setRuyLopezBtn').on('click', function () { board.position('r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R') }) -$('#setStartBtn').on('click', board.start) +$('#setStartBtn').on('click', () => board.start()) $('#setRookCheckmateBtn').on('click', function () { board.position({ diff --git a/examples/3003-clear.example b/examples/3003-clear.example index d1243b68..26815644 100644 --- a/examples/3003-clear.example +++ b/examples/3003-clear.example @@ -1,24 +1,24 @@ ===== id 3003 -===== Name -Clear Board - -===== Description -Use the clear method to remove all the pieces from the board. - -===== HTML -
+===== Name +Clear Board + +===== Description +Use the clear method to remove all the pieces from the board. + +===== HTML +
- -===== JS -var board = Chessboard('myBoard', 'start') -$('#clearBoardBtn').on('click', board.clear) +===== JS +var board = new Chessboard('myBoard', 'start') + +$('#clearBoardBtn').on('click', () => board.clear()) -$('#startPositionBtn').on('click', board.start) +$('#startPositionBtn').on('click', () => board.start()) $('#clearBoardInstantBtn').on('click', function () { board.clear(false) diff --git a/examples/3004-move-pieces.example b/examples/3004-move-pieces.example index c380527d..c31adf16 100644 --- a/examples/3004-move-pieces.example +++ b/examples/3004-move-pieces.example @@ -1,20 +1,20 @@ ===== id 3004 -===== Name -Move Pieces - -===== Description -Use the move method to make one or more moves on the board. - -===== HTML -
+===== Name +Move Pieces + +===== Description +Use the move method to make one or more moves on the board. + +===== HTML +
-===== JS -var board = Chessboard('myBoard', 'start') +===== JS +var board = new Chessboard('myBoard', 'start') $('#move1Btn').on('click', function () { board.move('e2-e4') @@ -24,4 +24,4 @@ $('#move2Btn').on('click', function () { board.move('d2-d4', 'g8-f6') }) -$('#startPositionBtn').on('click', board.start) +$('#startPositionBtn').on('click', () => board.start()) diff --git a/examples/4000-onchange.example b/examples/4000-onchange.example index bc8c60da..95b4328b 100644 --- a/examples/4000-onchange.example +++ b/examples/4000-onchange.example @@ -1,18 +1,18 @@ ===== id 4000 -===== Name -onChange - -===== Description +===== Name +onChange + +===== Description The onChange event fires when the board position changes. - -===== HTML + +===== HTML
-===== JS +===== JS function onChange (oldPos, newPos) { console.log('Position changed:') console.log('Old position: ' + Chessboard.objToFen(oldPos)) @@ -25,11 +25,11 @@ var config = { position: 'start', onChange: onChange } -var board = Chessboard('myBoard', config) +var board = new Chessboard('myBoard', config) $('#ruyLopezBtn').on('click', function () { var ruyLopez = 'r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R' board.position(ruyLopez) }) -$('#startPositionBtn').on('click', board.start) +$('#startPositionBtn').on('click', () => board.start()) diff --git a/examples/4012-onmoveend.example b/examples/4012-onmoveend.example index ed79823e..22e5b40a 100644 --- a/examples/4012-onmoveend.example +++ b/examples/4012-onmoveend.example @@ -26,7 +26,7 @@ var config = { position: 'start', onMoveEnd: onMoveEnd } -var board = Chessboard('myBoard', config) +var board = new Chessboard('myBoard', config) $('#ruyLopezBtn').on('click', function () { board.position('r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R') @@ -34,5 +34,5 @@ $('#ruyLopezBtn').on('click', function () { $('#moveBtn').on('click', function () { board.move('a2-a4', 'h7-h5') }) -$('#startBtn').on('click', board.start) -$('#clearBtn').on('click', board.clear) +$('#startBtn').on('click', () => board.start()) +$('#clearBtn').on('click', () => board.clear()) diff --git a/lib/chessboard.css b/lib/chessboard.css index 27ffdccb..2add196e 100644 --- a/lib/chessboard.css +++ b/lib/chessboard.css @@ -1,54 +1,54 @@ /*! chessboard.js v@VERSION | (c) 2019 Chris Oakman | MIT License chessboardjs.com/license */ - + .clearfix-7da63 { - clear: both; -} - + clear: both; +} + .board-b72b1 { border: 2px solid #404040; box-sizing: content-box; -} - +} + .square-55d63 { - float: left; - position: relative; - - /* disable any native browser highlighting */ - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - + float: left; + position: relative; + + /* disable any native browser highlighting */ + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + .white-1e1d7 { - background-color: #f0d9b5; - color: #b58863; -} - + background-color: #f0d9b5; + color: #b58863; +} + .black-3c85d { - background-color: #b58863; - color: #f0d9b5; -} + background-color: #b58863; + color: #f0d9b5; +} .highlight1-32417, .highlight2-9c5d2 { - box-shadow: inset 0 0 3px 3px yellow; -} + box-shadow: inset 0 0 3px 3px yellow; +} -.notation-322f9 { - cursor: default; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - position: absolute; +.notation-322f9 { + cursor: default; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + position: absolute; } -.alpha-d2270 { - bottom: 1px; - right: 3px; +.alpha-d2270 { + bottom: 1px; + right: 3px; } -.numeric-fc462 { - top: 2px; - left: 2px; +.numeric-fc462 { + top: 2px; + left: 2px; } diff --git a/lib/chessboard.js b/lib/chessboard.js index ed27db18..bd784867 100644 --- a/lib/chessboard.js +++ b/lib/chessboard.js @@ -4,1820 +4,1774 @@ // Copyright (c) 2019, Chris Oakman // Released under the MIT license // https://github.com/oakmac/chessboardjs/blob/master/LICENSE.md - -// start anonymous scope -;(function () { - 'use strict' - - var $ = window['jQuery'] - - // --------------------------------------------------------------------------- - // Constants - // --------------------------------------------------------------------------- - - var COLUMNS = 'abcdefgh'.split('') - var DEFAULT_DRAG_THROTTLE_RATE = 20 - var ELLIPSIS = '…' - var MINIMUM_JQUERY_VERSION = '1.8.3' - var RUN_ASSERTS = true - var START_FEN = 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR' - var START_POSITION = fenToObj(START_FEN) - - // default animation speeds - var DEFAULT_APPEAR_SPEED = 200 - var DEFAULT_MOVE_SPEED = 200 - var DEFAULT_SNAPBACK_SPEED = 60 - var DEFAULT_SNAP_SPEED = 30 - var DEFAULT_TRASH_SPEED = 100 - - // use unique class names to prevent clashing with anything else on the page - // and simplify selectors - // NOTE: these should never change - var CSS = {} - CSS['alpha'] = 'alpha-d2270' - CSS['black'] = 'black-3c85d' - CSS['board'] = 'board-b72b1' - CSS['chessboard'] = 'chessboard-63f37' - CSS['clearfix'] = 'clearfix-7da63' - CSS['highlight1'] = 'highlight1-32417' - CSS['highlight2'] = 'highlight2-9c5d2' - CSS['notation'] = 'notation-322f9' - CSS['numeric'] = 'numeric-fc462' - CSS['piece'] = 'piece-417db' - CSS['row'] = 'row-5277c' - CSS['sparePieces'] = 'spare-pieces-7492f' - CSS['sparePiecesBottom'] = 'spare-pieces-bottom-ae20f' - CSS['sparePiecesTop'] = 'spare-pieces-top-4028b' - CSS['square'] = 'square-55d63' - CSS['white'] = 'white-1e1d7' - - // --------------------------------------------------------------------------- - // Misc Util Functions - // --------------------------------------------------------------------------- - - function throttle (f, interval, scope) { - var timeout = 0 - var shouldFire = false - var args = [] - - var handleTimeout = function () { - timeout = 0 - if (shouldFire) { - shouldFire = false - fire() - } + +// --------------------------------------------------------------------------- +// Constants +// --------------------------------------------------------------------------- + +const COLUMNS = 'abcdefgh'.split('') +const DEFAULT_DRAG_THROTTLE_RATE = 20 +const ELLIPSIS = '…' +const RUN_ASSERTS = true +const START_FEN = 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR' +const START_POSITION = fenToObj(START_FEN) + +// default animation speeds +const DEFAULT_APPEAR_SPEED = 200 +const DEFAULT_MOVE_SPEED = 200 +const DEFAULT_SNAPBACK_SPEED = 60 +const DEFAULT_SNAP_SPEED = 30 +const DEFAULT_TRASH_SPEED = 100 + +// use unique class names to prevent clashing with anything else on the page +// and simplify selectors +// NOTE: these should never change +const ClassNameLookup = { + alpha: 'alpha-d2270', + black: 'black-3c85d', + board: 'board-b72b1', + chessboard: 'chessboard-63f37', + clearfix: 'clearfix-7da63', + highlight1: 'highlight1-32417', + highlight2: 'highlight2-9c5d2', + notation: 'notation-322f9', + numeric: 'numeric-fc462', + piece: 'piece-417db', + row: 'row-5277c', + sparePieces: 'spare-pieces-7492f', + sparePiecesBottom: 'spare-pieces-bottom-ae20f', + sparePiecesTop: 'spare-pieces-top-4028b', + square: 'square-55d63', + white: 'white-1e1d7' +} + +// --------------------------------------------------------------------------- +// Misc Util Functions +// --------------------------------------------------------------------------- + +function throttle (f, interval) { + let timeout = 0 + let shouldFire = false + let args = [] + + const handleTimeout = function () { + timeout = 0 + if (shouldFire) { + shouldFire = false + fire() + } + } + + const fire = function () { + timeout = window.setTimeout(handleTimeout, interval) + f(args) + } + + return function (..._args) { + args = _args + if (!timeout) { + fire() + } else { + shouldFire = true + } + } +} + +// function debounce (f, interval, scope) { +// const timeout = 0 +// return function (_args) { +// window.clearTimeout(timeout) +// const args = arguments +// timeout = window.setTimeout(function () { +// f.apply(scope, args) +// }, interval) +// } +// } + +function uuid () { + return 'xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx'.replace(/x/g, function (c) { + const r = (Math.random() * 16) | 0 + return r.toString(16) + }) +} + +function deepCopy (thing) { + return JSON.parse(JSON.stringify(thing)) +} + +/** + * + * @param {HTMLElement} element + * @returns {{ top: number, left: number }} + */ +function getJqueryStyleOffset (element) { + const { documentElement } = document + const { top, left } = element.getBoundingClientRect() + return { + top: top + window.pageYOffset - documentElement.clientTop, + left: left + window.pageXOffset - documentElement.clientLeft + } +} + +function interpolateTemplate (str, obj) { + for (const key in obj) { + if (!Object.prototype.hasOwnProperty.call(obj, key)) continue + const keyTemplateStr = '{' + key + '}' + const value = obj[key] + while (str.indexOf(keyTemplateStr) !== -1) { + str = str.replace(keyTemplateStr, value) + } + } + return str +} + +if (RUN_ASSERTS) { + console.assert(interpolateTemplate('abc', { a: 'x' }) === 'abc') + console.assert(interpolateTemplate('{a}bc', {}) === '{a}bc') + console.assert(interpolateTemplate('{a}bc', { p: 'q' }) === '{a}bc') + console.assert(interpolateTemplate('{a}bc', { a: 'x' }) === 'xbc') + console.assert(interpolateTemplate('{a}bc{a}bc', { a: 'x' }) === 'xbcxbc') + console.assert(interpolateTemplate('{a}{a}{b}', { a: 'x', b: 'y' }) === 'xxy') +} + +// --------------------------------------------------------------------------- +// Predicates +// --------------------------------------------------------------------------- + +function isString (s) { + return typeof s === 'string' +} + +function isFunction (f) { + return typeof f === 'function' +} + +function isInteger (n) { + return typeof n === 'number' && + isFinite(n) && + Math.floor(n) === n +} + +function isPlainObject (o) { + return Object.prototype.toString.call(o) === '[object Object]' +} + +function validAnimationSpeed (speed) { + if (speed === 'fast' || speed === 'slow') return true + if (!isInteger(speed)) return false + return speed >= 0 +} + +function validThrottleRate (rate) { + return isInteger(rate) && + rate >= 1 +} + +function validMove (move) { + // move should be a string + if (!isString(move)) return false + + // move should be in the form of "e2-e4", "f6-d5" + const squares = move.split('-') + if (squares.length !== 2) return false + + return validSquare(squares[0]) && validSquare(squares[1]) +} + +function validSquare (square) { + return isString(square) && square.search(/^[a-h][1-8]$/) !== -1 +} + +if (RUN_ASSERTS) { + console.assert(validSquare('a1')) + console.assert(validSquare('e2')) + console.assert(!validSquare('D2')) + console.assert(!validSquare('g9')) + console.assert(!validSquare('a')) + console.assert(!validSquare(true)) + console.assert(!validSquare(null)) + console.assert(!validSquare({})) +} + +function validPieceCode (code) { + return isString(code) && code.search(/^[bw][KQRNBP]$/) !== -1 +} + +if (RUN_ASSERTS) { + console.assert(validPieceCode('bP')) + console.assert(validPieceCode('bK')) + console.assert(validPieceCode('wK')) + console.assert(validPieceCode('wR')) + console.assert(!validPieceCode('WR')) + console.assert(!validPieceCode('Wr')) + console.assert(!validPieceCode('a')) + console.assert(!validPieceCode(true)) + console.assert(!validPieceCode(null)) + console.assert(!validPieceCode({})) +} + +function validFen (fen) { + if (!isString(fen)) return false + + // cut off any move, castling, etc info from the end + // we're only interested in position information + fen = fen.replace(/ .+$/, '') + + // expand the empty square numbers to just 1s + fen = expandFenEmptySquares(fen) + + // FEN should be 8 sections separated by slashes + const chunks = fen.split('/') + if (chunks.length !== 8) return false + + // check each section + for (let i = 0; i < 8; i++) { + if (chunks[i].length !== 8 || + chunks[i].search(/[^kqrnbpKQRNBP1]/) !== -1) { + return false } + } + + return true +} + +if (RUN_ASSERTS) { + console.assert(validFen(START_FEN)) + console.assert(validFen('8/8/8/8/8/8/8/8')) + console.assert(validFen('r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R')) + console.assert(validFen('3r3r/1p4pp/2nb1k2/pP3p2/8/PB2PN2/p4PPP/R4RK1 b - - 0 1')) + console.assert(!validFen('3r3z/1p4pp/2nb1k2/pP3p2/8/PB2PN2/p4PPP/R4RK1 b - - 0 1')) + console.assert(!validFen('anbqkbnr/8/8/8/8/8/PPPPPPPP/8')) + console.assert(!validFen('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/')) + console.assert(!validFen('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBN')) + console.assert(!validFen('888888/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR')) + console.assert(!validFen('888888/pppppppp/74/8/8/8/PPPPPPPP/RNBQKBNR')) + console.assert(!validFen({})) +} - var fire = function () { - timeout = window.setTimeout(handleTimeout, interval) - f.apply(scope, args) +function validPositionObject (pos) { + if (!isPlainObject(pos)) return false + + for (const i in pos) { + if (!Object.prototype.hasOwnProperty.call(pos, i)) continue + + if (!validSquare(i) || !validPieceCode(pos[i])) { + return false } + } + + return true +} + +if (RUN_ASSERTS) { + console.assert(validPositionObject(START_POSITION)) + console.assert(validPositionObject({})) + console.assert(validPositionObject({ e2: 'wP' })) + console.assert(validPositionObject({ e2: 'wP', d2: 'wP' })) + console.assert(!validPositionObject({ e2: 'BP' })) + console.assert(!validPositionObject({ y2: 'wP' })) + console.assert(!validPositionObject(null)) + console.assert(!validPositionObject('start')) + console.assert(!validPositionObject(START_FEN)) +} + +function isTouchDevice () { + return 'ontouchstart' in document.documentElement +} + +// --------------------------------------------------------------------------- +// Chess Util Functions +// --------------------------------------------------------------------------- + +// convert FEN piece code to bP, wK, etc +function fenToPieceCode (piece) { + // black piece + if (piece.toLowerCase() === piece) { + return 'b' + piece.toUpperCase() + } + + // white piece + return 'w' + piece.toUpperCase() +} + +// convert bP, wK, etc code to FEN structure +function pieceCodeToFen (piece) { + const pieceCodeLetters = piece.split('') + + // white piece + if (pieceCodeLetters[0] === 'w') { + return pieceCodeLetters[1].toUpperCase() + } - return function (_args) { - args = arguments - if (!timeout) { - fire() + // black piece + return pieceCodeLetters[1].toLowerCase() +} + +// convert FEN string to position object +// returns false if the FEN string is invalid +function fenToObj (fen) { + if (!validFen(fen)) return false + + // cut off any move, castling, etc info from the end + // we're only interested in position information + fen = fen.replace(/ .+$/, '') + + const rows = fen.split('/') + const position = {} + + let currentRow = 8 + for (let i = 0; i < 8; i++) { + const row = rows[i].split('') + let colIdx = 0 + + // loop through each character in the FEN section + for (let j = 0; j < row.length; j++) { + // number / empty squares + if (row[j].search(/[1-8]/) !== -1) { + const numEmptySquares = parseInt(row[j], 10) + colIdx = colIdx + numEmptySquares } else { - shouldFire = true + // piece + const square = COLUMNS[colIdx] + currentRow + position[square] = fenToPieceCode(row[j]) + colIdx = colIdx + 1 } } + + currentRow = currentRow - 1 } - // function debounce (f, interval, scope) { - // var timeout = 0 - // return function (_args) { - // window.clearTimeout(timeout) - // var args = arguments - // timeout = window.setTimeout(function () { - // f.apply(scope, args) - // }, interval) - // } - // } + return position +} - function uuid () { - return 'xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx'.replace(/x/g, function (c) { - var r = (Math.random() * 16) | 0 - return r.toString(16) - }) +// position object to FEN string +// returns false if the obj is not a valid position object +function objToFen (obj) { + if (!validPositionObject(obj)) return false + + let fen = '' + + let currentRow = 8 + for (let i = 0; i < 8; i++) { + for (let j = 0; j < 8; j++) { + const square = COLUMNS[j] + currentRow + + // piece exists + if (Object.prototype.hasOwnProperty.call(obj, square)) { + fen = fen + pieceCodeToFen(obj[square]) + } else { + // empty space + fen = fen + '1' + } + } + + if (i !== 7) { + fen = fen + '/' + } + + currentRow = currentRow - 1 } - function deepCopy (thing) { - return JSON.parse(JSON.stringify(thing)) + // squeeze the empty numbers together + fen = squeezeFenEmptySquares(fen) + + return fen +} + +if (RUN_ASSERTS) { + console.assert(objToFen(START_POSITION) === START_FEN) + console.assert(objToFen({}) === '8/8/8/8/8/8/8/8') + console.assert(objToFen({ a2: 'wP', b2: 'bP' }) === '8/8/8/8/8/8/Pp6/8') +} + +function squeezeFenEmptySquares (fen) { + return fen.replace(/11111111/g, '8') + .replace(/1111111/g, '7') + .replace(/111111/g, '6') + .replace(/11111/g, '5') + .replace(/1111/g, '4') + .replace(/111/g, '3') + .replace(/11/g, '2') +} + +function expandFenEmptySquares (fen) { + return fen.replace(/8/g, '11111111') + .replace(/7/g, '1111111') + .replace(/6/g, '111111') + .replace(/5/g, '11111') + .replace(/4/g, '1111') + .replace(/3/g, '111') + .replace(/2/g, '11') +} + +// returns the distance between two squares +function squareDistance (squareA, squareB) { + const squareAArray = squareA.split('') + const squareAx = COLUMNS.indexOf(squareAArray[0]) + 1 + const squareAy = parseInt(squareAArray[1], 10) + + const squareBArray = squareB.split('') + const squareBx = COLUMNS.indexOf(squareBArray[0]) + 1 + const squareBy = parseInt(squareBArray[1], 10) + + const xDelta = Math.abs(squareAx - squareBx) + const yDelta = Math.abs(squareAy - squareBy) + + if (xDelta >= yDelta) return xDelta + return yDelta +} + +// returns the square of the closest instance of piece +// returns false if no instance of piece is found in position +function findClosestPiece (position, piece, square) { + // create array of closest squares from square + const closestSquares = createRadius(square) + + // search through the position in order of distance for the piece + for (let i = 0; i < closestSquares.length; i++) { + const s = closestSquares[i] + + if (Object.prototype.hasOwnProperty.call(position, s) && position[s] === piece) { + return s + } } - function parseSemVer (version) { - var tmp = version.split('.') - return { - major: parseInt(tmp[0], 10), - minor: parseInt(tmp[1], 10), - patch: parseInt(tmp[2], 10) + return false +} + +// returns an array of closest squares from square +function createRadius (square) { + const squares = [] + + // calculate distance of all squares + for (let i = 0; i < 8; i++) { + for (let j = 0; j < 8; j++) { + const s = COLUMNS[i] + (j + 1) + + // skip the square we're starting from + if (square === s) continue + + squares.push({ + square: s, + distance: squareDistance(square, s) + }) } } - // returns true if version is >= minimum - function validSemanticVersion (version, minimum) { - version = parseSemVer(version) - minimum = parseSemVer(minimum) + // sort by distance + squares.sort(function (a, b) { + return a.distance - b.distance + }) + + // just return the square code + const surroundingSquares = [] + for (let i = 0; i < squares.length; i++) { + surroundingSquares.push(squares[i].square) + } + + return surroundingSquares +} + +// given a position and a set of moves, return a new position +// with the moves executed +function calculatePositionFromMoves (position, moves) { + const newPosition = deepCopy(position) + + for (const i in moves) { + if (!Object.prototype.hasOwnProperty.call(moves, i)) continue + + // skip the move if the position doesn't have a piece on the source square + if (!Object.prototype.hasOwnProperty.call(newPosition, i)) continue + + const piece = newPosition[i] + delete newPosition[i] + newPosition[moves[i]] = piece + } + + return newPosition +} + +// TODO: add some asserts here for calculatePositionFromMoves + +// --------------------------------------------------------------------------- +// HTML +// --------------------------------------------------------------------------- + +function buildContainerHTML (hasSparePieces) { + let html = '
' + + if (hasSparePieces) { + html += '
' + } + + html += '
' + + if (hasSparePieces) { + html += '
' + } + + html += '
' + + return interpolateTemplate(html, ClassNameLookup) +} + +// --------------------------------------------------------------------------- +// Config +// --------------------------------------------------------------------------- + +function expandConfigArgumentShorthand (config) { + if (config === 'start') { + config = { position: deepCopy(START_POSITION) } + } else if (validFen(config)) { + config = { position: fenToObj(config) } + } else if (validPositionObject(config)) { + config = { position: deepCopy(config) } + } + + // config must be an object + if (!isPlainObject(config)) config = {} + + return config +} + +// validate config / set default options +function expandConfig (config) { + // default for orientation is white + if (config.orientation !== 'black') config.orientation = 'white' + + // default for showNotation is true + if (config.showNotation !== false) config.showNotation = true + + // default for draggable is false + if (config.draggable !== true) config.draggable = false + + // default for dropOffBoard is 'snapback' + if (config.dropOffBoard !== 'trash') config.dropOffBoard = 'snapback' + + // default for sparePieces is false + if (config.sparePieces !== true) config.sparePieces = false + + // draggable must be true if sparePieces is enabled + if (config.sparePieces) config.draggable = true + + // default piece theme is wikipedia + if (!Object.prototype.hasOwnProperty.call(config, 'pieceTheme') || + (!isString(config.pieceTheme) && !isFunction(config.pieceTheme))) { + config.pieceTheme = 'img/chesspieces/wikipedia/{piece}.png' + } + + // animation speeds + if (!validAnimationSpeed(config.appearSpeed)) config.appearSpeed = DEFAULT_APPEAR_SPEED + if (!validAnimationSpeed(config.moveSpeed)) config.moveSpeed = DEFAULT_MOVE_SPEED + if (!validAnimationSpeed(config.snapbackSpeed)) config.snapbackSpeed = DEFAULT_SNAPBACK_SPEED + if (!validAnimationSpeed(config.snapSpeed)) config.snapSpeed = DEFAULT_SNAP_SPEED + if (!validAnimationSpeed(config.trashSpeed)) config.trashSpeed = DEFAULT_TRASH_SPEED + + // throttle rate + if (!validThrottleRate(config.dragThrottleRate)) config.dragThrottleRate = DEFAULT_DRAG_THROTTLE_RATE - var versionNum = (version.major * 100000 * 100000) + - (version.minor * 100000) + - version.patch - var minimumNum = (minimum.major * 100000 * 100000) + - (minimum.minor * 100000) + - minimum.patch + return config +} + +// --------------------------------------------------------------------------- +// Dependencies +// --------------------------------------------------------------------------- + +// return either boolean false or the $container element +function checkContainerArg (containerElOrString) { + if (containerElOrString === '') { + const errorMsg1 = 'Chessboard Error 1001: ' + + 'The first argument to Chessboard() cannot be an empty string.' + + '\n\n' + + 'Exiting' + ELLIPSIS + window.alert(errorMsg1) + return false + } - return versionNum >= minimumNum + // convert containerEl to query selector if it is a string + if (isString(containerElOrString) && + containerElOrString.charAt(0) !== '#') { + containerElOrString = '#' + containerElOrString + } + + // containerEl must be something that becomes a NodeList of size 1 + const $container = /** @type {NodeListOf} */(document.querySelectorAll(containerElOrString)) + if ($container.length !== 1) { + const errorMsg2 = 'Chessboard Error 1003: ' + + 'The first argument to Chessboard() must be the ID of a DOM node, ' + + 'an ID query selector, or a single DOM node.' + + '\n\n' + + 'Exiting' + ELLIPSIS + window.alert(errorMsg2) + return false } - function interpolateTemplate (str, obj) { - for (var key in obj) { - if (!obj.hasOwnProperty(key)) continue - var keyTemplateStr = '{' + key + '}' - var value = obj[key] - while (str.indexOf(keyTemplateStr) !== -1) { - str = str.replace(keyTemplateStr, value) + return $container.item(0) +} + +// --------------------------------------------------------------------------- +// Constructor +// --------------------------------------------------------------------------- + +class Chessboard { + #config = {} + /** + * @type {HTMLElement} + */ + #board + /** + * @type {HTMLElement} + */ + #container + /** + * @type {HTMLElement} + */ + #draggedPiece + /** + * @type {HTMLElement | null} + */ + #sparePiecesTop = null + /** + * @type {HTMLElement | null} + */ + #sparePiecesBottom = null + /** + * @type {number} + */ + #boardBorderSize = 2 + /** + * @type {'white' | 'black'} + */ + #currentOrientation = 'white' + #currentPosition = {} + /** + * @type {string} + */ + #draggedPieceLocation = '' + /** + * @type {string} + */ + #draggedPieceSource = '' + /** + * @type {boolean} + */ + #isDragging = false + #sparePiecesElsIds = {} + #squareElsIds = {} + #squareElsOffsets = {} + #squareSize = 16 + + constructor (containerElOrString, config) { + // first things first: check basic dependencies + const container = checkContainerArg(containerElOrString) + if (!container) throw new TypeError(`Container ${containerElOrString ?? ''} not found`) + + this.#container = container + + // ensure the config object is what we expect + config = expandConfigArgumentShorthand(config) + config = expandConfig(config) + this.#config = config + + this.#setInitialState() + + /** + * Create unique IDs for all our elements + * */ + + // squares on the board + for (let i = 0; i < COLUMNS.length; i++) { + for (let j = 1; j <= 8; j++) { + const square = COLUMNS[i] + j + this.#squareElsIds[square] = square + '-' + uuid() } } - return str + + // spare pieces + const pieces = 'KQRNBP'.split('') + for (let i = 0; i < pieces.length; i++) { + const whitePiece = 'w' + pieces[i] + const blackPiece = 'b' + pieces[i] + this.#sparePiecesElsIds[whitePiece] = whitePiece + '-' + uuid() + this.#sparePiecesElsIds[blackPiece] = blackPiece + '-' + uuid() + } + + // build board and save it in memory + this.#container.innerHTML = buildContainerHTML(this.#config.sparePieces) + this.#board = /** @type {HTMLElement} */(this.#container.querySelector('.' + ClassNameLookup.board)) + + if (this.#config.sparePieces) { + this.#sparePiecesTop = this.#container.querySelector('.' + ClassNameLookup.sparePiecesTop) + this.#sparePiecesBottom = this.#container.querySelector('.' + ClassNameLookup.sparePiecesBottom) + } + + // create the drag piece + this.#draggedPiece = document.body.appendChild( + this.#buildPieceElement('wP', true, uuid()) + ) + + // TODO: need to remove this dragged piece element if the board is no + // longer in the DOM + + // get the border size + this.#boardBorderSize = parseInt(this.#board.style.getPropertyValue('borderLeftWidth'), 10) + + // set the size and draw the board + this.resize() + + this.#addEvents() } - - if (RUN_ASSERTS) { - console.assert(interpolateTemplate('abc', {a: 'x'}) === 'abc') - console.assert(interpolateTemplate('{a}bc', {}) === '{a}bc') - console.assert(interpolateTemplate('{a}bc', {p: 'q'}) === '{a}bc') - console.assert(interpolateTemplate('{a}bc', {a: 'x'}) === 'xbc') - console.assert(interpolateTemplate('{a}bc{a}bc', {a: 'x'}) === 'xbcxbc') - console.assert(interpolateTemplate('{a}{a}{b}', {a: 'x', b: 'y'}) === 'xxy') - } - - // --------------------------------------------------------------------------- - // Predicates - // --------------------------------------------------------------------------- - - function isString (s) { - return typeof s === 'string' - } - - function isFunction (f) { - return typeof f === 'function' - } - - function isInteger (n) { - return typeof n === 'number' && - isFinite(n) && - Math.floor(n) === n - } - - function validAnimationSpeed (speed) { - if (speed === 'fast' || speed === 'slow') return true - if (!isInteger(speed)) return false - return speed >= 0 - } - - function validThrottleRate (rate) { - return isInteger(rate) && - rate >= 1 - } - - function validMove (move) { - // move should be a string - if (!isString(move)) return false - - // move should be in the form of "e2-e4", "f6-d5" - var squares = move.split('-') - if (squares.length !== 2) return false - - return validSquare(squares[0]) && validSquare(squares[1]) - } - - function validSquare (square) { - return isString(square) && square.search(/^[a-h][1-8]$/) !== -1 - } - - if (RUN_ASSERTS) { - console.assert(validSquare('a1')) - console.assert(validSquare('e2')) - console.assert(!validSquare('D2')) - console.assert(!validSquare('g9')) - console.assert(!validSquare('a')) - console.assert(!validSquare(true)) - console.assert(!validSquare(null)) - console.assert(!validSquare({})) - } - - function validPieceCode (code) { - return isString(code) && code.search(/^[bw][KQRNBP]$/) !== -1 - } - - if (RUN_ASSERTS) { - console.assert(validPieceCode('bP')) - console.assert(validPieceCode('bK')) - console.assert(validPieceCode('wK')) - console.assert(validPieceCode('wR')) - console.assert(!validPieceCode('WR')) - console.assert(!validPieceCode('Wr')) - console.assert(!validPieceCode('a')) - console.assert(!validPieceCode(true)) - console.assert(!validPieceCode(null)) - console.assert(!validPieceCode({})) - } - - function validFen (fen) { - if (!isString(fen)) return false - - // cut off any move, castling, etc info from the end - // we're only interested in position information - fen = fen.replace(/ .+$/, '') - - // expand the empty square numbers to just 1s - fen = expandFenEmptySquares(fen) - - // FEN should be 8 sections separated by slashes - var chunks = fen.split('/') - if (chunks.length !== 8) return false - - // check each section - for (var i = 0; i < 8; i++) { - if (chunks[i].length !== 8 || - chunks[i].search(/[^kqrnbpKQRNBP1]/) !== -1) { - return false - } - } - - return true - } - - if (RUN_ASSERTS) { - console.assert(validFen(START_FEN)) - console.assert(validFen('8/8/8/8/8/8/8/8')) - console.assert(validFen('r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R')) - console.assert(validFen('3r3r/1p4pp/2nb1k2/pP3p2/8/PB2PN2/p4PPP/R4RK1 b - - 0 1')) - console.assert(!validFen('3r3z/1p4pp/2nb1k2/pP3p2/8/PB2PN2/p4PPP/R4RK1 b - - 0 1')) - console.assert(!validFen('anbqkbnr/8/8/8/8/8/PPPPPPPP/8')) - console.assert(!validFen('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/')) - console.assert(!validFen('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBN')) - console.assert(!validFen('888888/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR')) - console.assert(!validFen('888888/pppppppp/74/8/8/8/PPPPPPPP/RNBQKBNR')) - console.assert(!validFen({})) - } - - function validPositionObject (pos) { - if (!$.isPlainObject(pos)) return false - - for (var i in pos) { - if (!pos.hasOwnProperty(i)) continue - - if (!validSquare(i) || !validPieceCode(pos[i])) { - return false - } - } - - return true - } - - if (RUN_ASSERTS) { - console.assert(validPositionObject(START_POSITION)) - console.assert(validPositionObject({})) - console.assert(validPositionObject({e2: 'wP'})) - console.assert(validPositionObject({e2: 'wP', d2: 'wP'})) - console.assert(!validPositionObject({e2: 'BP'})) - console.assert(!validPositionObject({y2: 'wP'})) - console.assert(!validPositionObject(null)) - console.assert(!validPositionObject('start')) - console.assert(!validPositionObject(START_FEN)) - } - - function isTouchDevice () { - return 'ontouchstart' in document.documentElement - } - - function validJQueryVersion () { - return typeof window.$ && - $.fn && - $.fn.jquery && - validSemanticVersion($.fn.jquery, MINIMUM_JQUERY_VERSION) - } - - // --------------------------------------------------------------------------- - // Chess Util Functions - // --------------------------------------------------------------------------- - - // convert FEN piece code to bP, wK, etc - function fenToPieceCode (piece) { - // black piece - if (piece.toLowerCase() === piece) { - return 'b' + piece.toUpperCase() - } - - // white piece - return 'w' + piece.toUpperCase() - } - - // convert bP, wK, etc code to FEN structure - function pieceCodeToFen (piece) { - var pieceCodeLetters = piece.split('') - - // white piece - if (pieceCodeLetters[0] === 'w') { - return pieceCodeLetters[1].toUpperCase() - } - - // black piece - return pieceCodeLetters[1].toLowerCase() - } - - // convert FEN string to position object - // returns false if the FEN string is invalid - function fenToObj (fen) { - if (!validFen(fen)) return false - - // cut off any move, castling, etc info from the end - // we're only interested in position information - fen = fen.replace(/ .+$/, '') - - var rows = fen.split('/') - var position = {} - - var currentRow = 8 - for (var i = 0; i < 8; i++) { - var row = rows[i].split('') - var colIdx = 0 - - // loop through each character in the FEN section - for (var j = 0; j < row.length; j++) { - // number / empty squares - if (row[j].search(/[1-8]/) !== -1) { - var numEmptySquares = parseInt(row[j], 10) - colIdx = colIdx + numEmptySquares - } else { - // piece - var square = COLUMNS[colIdx] + currentRow - position[square] = fenToPieceCode(row[j]) - colIdx = colIdx + 1 - } - } - - currentRow = currentRow - 1 - } - - return position - } - - // position object to FEN string - // returns false if the obj is not a valid position object - function objToFen (obj) { - if (!validPositionObject(obj)) return false - - var fen = '' - - var currentRow = 8 - for (var i = 0; i < 8; i++) { - for (var j = 0; j < 8; j++) { - var square = COLUMNS[j] + currentRow - - // piece exists - if (obj.hasOwnProperty(square)) { - fen = fen + pieceCodeToFen(obj[square]) - } else { - // empty space - fen = fen + '1' - } - } - - if (i !== 7) { - fen = fen + '/' + + // clear the board + clear (useAnimation) { + this.position({}, useAnimation) + } + + // remove the widget from the page + destroy () { + // remove markup + this.#container.innerHTML = '' + this.#draggedPiece.remove() + + // remove event handlers + this.#container.onmousedown = null + } + + // shorthand method to get the current FEN + fen () { + return this.position('fen') + } + + // flip orientation + flip () { + return this.orientation('flip') + } + + // move pieces + // TODO: this method should be variadic as well as accept an array of moves + move (...args) { + // no need to throw an error here; just do nothing + // TODO: this should return the current position + if (args.length === 0) return + + let useAnimation = true + + // collect the moves into an object + const moves = {} + for (let i = 0; i < args.length; i++) { + // any "false" to this function means no animations + if (args[i] === false) { + useAnimation = false + continue } - - currentRow = currentRow - 1 - } - - // squeeze the empty numbers together - fen = squeezeFenEmptySquares(fen) - - return fen - } - - if (RUN_ASSERTS) { - console.assert(objToFen(START_POSITION) === START_FEN) - console.assert(objToFen({}) === '8/8/8/8/8/8/8/8') - console.assert(objToFen({a2: 'wP', 'b2': 'bP'}) === '8/8/8/8/8/8/Pp6/8') - } - - function squeezeFenEmptySquares (fen) { - return fen.replace(/11111111/g, '8') - .replace(/1111111/g, '7') - .replace(/111111/g, '6') - .replace(/11111/g, '5') - .replace(/1111/g, '4') - .replace(/111/g, '3') - .replace(/11/g, '2') - } - - function expandFenEmptySquares (fen) { - return fen.replace(/8/g, '11111111') - .replace(/7/g, '1111111') - .replace(/6/g, '111111') - .replace(/5/g, '11111') - .replace(/4/g, '1111') - .replace(/3/g, '111') - .replace(/2/g, '11') - } - - // returns the distance between two squares - function squareDistance (squareA, squareB) { - var squareAArray = squareA.split('') - var squareAx = COLUMNS.indexOf(squareAArray[0]) + 1 - var squareAy = parseInt(squareAArray[1], 10) - - var squareBArray = squareB.split('') - var squareBx = COLUMNS.indexOf(squareBArray[0]) + 1 - var squareBy = parseInt(squareBArray[1], 10) - - var xDelta = Math.abs(squareAx - squareBx) - var yDelta = Math.abs(squareAy - squareBy) - - if (xDelta >= yDelta) return xDelta - return yDelta - } - - // returns the square of the closest instance of piece - // returns false if no instance of piece is found in position - function findClosestPiece (position, piece, square) { - // create array of closest squares from square - var closestSquares = createRadius(square) - - // search through the position in order of distance for the piece - for (var i = 0; i < closestSquares.length; i++) { - var s = closestSquares[i] - - if (position.hasOwnProperty(s) && position[s] === piece) { - return s + + // skip invalid arguments + if (!validMove(args[i])) { + this.#error(2826, 'Invalid move passed to the move method.', args[i]) + continue } + + const tmp = args[i].split('-') + moves[tmp[0]] = tmp[1] } - return false + // calculate position from moves + const newPos = calculatePositionFromMoves(this.#currentPosition, moves) + + // update the board + this.position(newPos, useAnimation) + + // return the new position object + return newPos } - // returns an array of closest squares from square - function createRadius (square) { - var squares = [] + /** + * @param {string} [orientation] + * @returns + */ + orientation (orientation) { + if (!orientation) { + return this.#currentOrientation + } else if (orientation === 'white' || orientation === 'black') { + this.#currentOrientation = orientation + } else if (orientation === 'flip') { + this.#currentOrientation = this.#currentOrientation === 'white' ? 'black' : 'white' + } else { + this.#error(5482, 'Invalid value passed to the orientation method.', orientation) + } + + this.#drawBoard() + return this.#currentOrientation + } + + position (position, useAnimation) { + if (!position) { + return deepCopy(this.#currentPosition) + } else if (isString(position) && position.toLowerCase() === 'fen') { + // get position as FEN + return objToFen(this.#currentPosition) + } + + if (isString(position) && position.toLowerCase() === 'start') { + // start position + position = deepCopy(START_POSITION) + } + + // convert FEN to position object + if (validFen(position)) { + position = fenToObj(position) + } + + // validate position object + if (!validPositionObject(position)) { + this.#error(6482, 'Invalid value passed to the position method.', position) + return + } + + // default for useAnimations is true + if (useAnimation !== false) useAnimation = true - // calculate distance of all squares - for (var i = 0; i < 8; i++) { - for (var j = 0; j < 8; j++) { - var s = COLUMNS[i] + (j + 1) + if (useAnimation) { + // start the animations + const animations = this.#calculateAnimations(this.#currentPosition, position) + this.#doAnimations(animations, this.#currentPosition, position) - // skip the square we're starting from - if (square === s) continue + // set the new position + this.#setCurrentPosition(position) + } else { + // instant update + this.#setCurrentPosition(position) + this.#drawPositionInstant() + } + } - squares.push({ - square: s, - distance: squareDistance(square, s) + resize () { + // calulate the new square size + this.#squareSize = this.#calculateSquareSize() + + // set board width + this.#board.style.setProperty('width', `${this.#squareSize * 8}px`) + + // set drag piece size + this.#draggedPiece?.style.setProperty('height', `${this.#squareSize}px`) + this.#draggedPiece?.style.setProperty('width', `${this.#squareSize}px`) + + // spare pieces + if (this.#config.sparePieces) { + /** @type {NodeListOf} */( + this.#container.querySelectorAll('.' + ClassNameLookup.sparePieces) + ) + .forEach(x => { + const paddingLeft = this.#squareSize + this.#boardBorderSize + x.style.setProperty('paddingLeft', `${paddingLeft}px`) }) - } } - // sort by distance - squares.sort(function (a, b) { - return a.distance - b.distance - }) + // redraw the board + this.#drawBoard() + } + + /** + * Set the starting position + * @param {*} useAnimation + */ + start (useAnimation) { + this.position('start', useAnimation) + } + + #dropDraggedPieceOnSquare (square) { + this.#removeSquareHighlights() - // just return the square code - var surroundingSquares = [] - for (i = 0; i < squares.length; i++) { - surroundingSquares.push(squares[i].square) + // update position + const newPosition = deepCopy(this.#currentPosition) + delete newPosition[this.#draggedPieceSource] + newPosition[square] = this.#draggedPiece + this.#setCurrentPosition(newPosition) + + // get target square information + const targetSquareId = this.#squareElsIds[square] + const targetSquare = document.getElementById(targetSquareId) + if (!targetSquare) { + throw new Error(`Unable to locate target square with id ${targetSquareId}`) } + const targetSquarePosition = getJqueryStyleOffset(targetSquare) + + // snap the piece to the target square + const opts = { + duration: this.#config.snapSpeed, + complete: () => { + this.#drawPositionInstant() + this.#draggedPiece.style.setProperty('display', 'none') - return surroundingSquares + // execute their onSnapEnd function + if (isFunction(this.#config.onSnapEnd)) { + this.#config.onSnapEnd(this.#draggedPieceSource, square, this.#draggedPiece) + } + } + } + this.#draggedPiece.animate(targetSquarePosition, opts) + + // set state + this.#isDragging = false } - // given a position and a set of moves, return a new position - // with the moves executed - function calculatePositionFromMoves (position, moves) { - var newPosition = deepCopy(position) + #error (code, msg, obj) { + // do nothing if showErrors is not set + if ( + Object.prototype.hasOwnProperty.call(this.#config, 'showErrors') !== true || + this.#config.showErrors === false + ) { + return + } - for (var i in moves) { - if (!moves.hasOwnProperty(i)) continue + let errorText = 'Chessboard Error ' + code + ': ' + msg + + // print to console + if ( + this.#config.showErrors === 'console' && + typeof console === 'object' && + typeof console.log === 'function' + ) { + console.log(errorText) + if (obj) { + console.log(obj) + } + return + } - // skip the move if the position doesn't have a piece on the source square - if (!newPosition.hasOwnProperty(i)) continue + // alert errors + if (this.#config.showErrors === 'alert') { + if (obj) { + errorText += '\n\n' + JSON.stringify(obj) + } + window.alert(errorText) + return + } - var piece = newPosition[i] - delete newPosition[i] - newPosition[moves[i]] = piece + // custom function + if (isFunction(this.#config.showErrors)) { + this.#config.showErrors(code, msg, obj) } + } - return newPosition + #setInitialState () { + this.#currentOrientation = this.#config.orientation + + // make sure position is valid + if (Object.prototype.hasOwnProperty.call(this.#config, 'position')) { + if (this.#config.position === 'start') { + this.#currentPosition = deepCopy(START_POSITION) + } else if (validFen(this.#config.position)) { + this.#currentPosition = fenToObj(this.#config.position) + } else if (validPositionObject(this.#config.position)) { + this.#currentPosition = deepCopy(this.#config.position) + } else { + this.#error( + 7263, + 'Invalid value passed to config.position.', + this.#config.position + ) + } + } } - // TODO: add some asserts here for calculatePositionFromMoves + #buildBoardHTML (orientation) { + if (orientation !== 'black') { + orientation = 'white' + } + + let html = '' + + // algebraic notation / orientation + const alpha = deepCopy(COLUMNS) + let row = 8 + if (orientation === 'black') { + alpha.reverse() + row = 1 + } + + let squareColor = 'white' + for (let i = 0; i < 8; i++) { + html += '
' + for (let j = 0; j < 8; j++) { + const square = alpha[j] + row + + html += '
' + + if (this.#config.showNotation) { + // alpha notation + if ((orientation === 'white' && row === 1) || + (orientation === 'black' && row === 8)) { + html += '
' + alpha[j] + '
' + } + + // numeric notation + if (j === 0) { + html += '
' + row + '
' + } + } + + html += '
' // end .square - // --------------------------------------------------------------------------- - // HTML - // --------------------------------------------------------------------------- + squareColor = (squareColor === 'white') ? 'black' : 'white' + } + html += '
' - function buildContainerHTML (hasSparePieces) { - var html = '
' + squareColor = (squareColor === 'white') ? 'black' : 'white' - if (hasSparePieces) { - html += '
' + if (orientation === 'white') { + row = row - 1 + } else { + row = row + 1 + } } - html += '
' + return interpolateTemplate(html, ClassNameLookup) + } + + #buildPieceImgSrc (piece) { + if (isFunction(this.#config.pieceTheme)) { + return this.#config.pieceTheme(piece) + } - if (hasSparePieces) { - html += '
' + if (isString(this.#config.pieceTheme)) { + return interpolateTemplate(this.#config.pieceTheme, { piece }) } - html += '
' + // NOTE: this should never happen + this.#error(8272, 'Unable to build image source for config.pieceTheme.') + return '' + } - return interpolateTemplate(html, CSS) + #buildPieceElement (piece, hidden, id) { + const tpl = document.createElement('template') + tpl.innerHTML = this.#buildPieceHTML(piece, hidden, id) + return /** @type {HTMLElement} */(tpl.content.firstElementChild) } - // --------------------------------------------------------------------------- - // Config - // --------------------------------------------------------------------------- + #buildPieceHTML (piece, hidden, id) { + let html = '' + + return interpolateTemplate(html, ClassNameLookup) + } - function expandConfigArgumentShorthand (config) { - if (config === 'start') { - config = {position: deepCopy(START_POSITION)} - } else if (validFen(config)) { - config = {position: fenToObj(config)} - } else if (validPositionObject(config)) { - config = {position: deepCopy(config)} + #buildSparePiecesHTML (color) { + let pieces = ['wK', 'wQ', 'wR', 'wB', 'wN', 'wP'] + if (color === 'black') { + pieces = ['bK', 'bQ', 'bR', 'bB', 'bN', 'bP'] } - // config must be an object - if (!$.isPlainObject(config)) config = {} + let html = '' + for (let i = 0; i < pieces.length; i++) { + html += this.#buildPieceHTML(pieces[i], false, this.#sparePiecesElsIds[pieces[i]]) + } - return config + return html } - // validate config / set default options - function expandConfig (config) { - // default for orientation is white - if (config.orientation !== 'black') config.orientation = 'white' + #animateSquareToSquare (src, dest, piece, completeFn) { + // get information about the source and destination squares + const $srcSquare = document.getElementById(this.#squareElsIds[src]) + const $destSquare = document.getElementById(this.#squareElsIds[dest]) + if (!$srcSquare) { + throw new Error(`Unable to locate source square with id ${this.#squareElsIds[src]}`) + } + if (!$destSquare) { + throw new Error(`Unable to locate destination square with id ${this.#squareElsIds[dest]}`) + } - // default for showNotation is true - if (config.showNotation !== false) config.showNotation = true + // create the animated piece and absolutely position it + // over the source square + const $animatedPiece = document.body.appendChild(this.#buildPieceElement(piece, true, uuid())) + $animatedPiece.style.setProperty('display', '') + $animatedPiece.style.setProperty('position', 'absolute') - // default for draggable is false - if (config.draggable !== true) config.draggable = false + // remove original piece from source square + $srcSquare.querySelector(`.${ClassNameLookup.piece}`)?.remove() - // default for dropOffBoard is 'snapback' - if (config.dropOffBoard !== 'trash') config.dropOffBoard = 'snapback' + // animate the piece to the destination square + const animation = $animatedPiece.animate([getJqueryStyleOffset($srcSquare), getJqueryStyleOffset($destSquare)], this.#config.moveSpeed) + animation.onfinish = () => { + // add the "real" piece to the destination square + $destSquare.append(this.#buildPieceElement(piece)) - // default for sparePieces is false - if (config.sparePieces !== true) config.sparePieces = false + // remove the animated piece + $animatedPiece.remove() - // draggable must be true if sparePieces is enabled - if (config.sparePieces) config.draggable = true + // run complete function + if (isFunction(completeFn)) { + completeFn() + } + } + } - // default piece theme is wikipedia - if (!config.hasOwnProperty('pieceTheme') || - (!isString(config.pieceTheme) && !isFunction(config.pieceTheme))) { - config.pieceTheme = 'img/chesspieces/wikipedia/{piece}.png' + #animateSparePieceToSquare (piece, dest, completeFn) { + const $srcSquare = document.getElementById(this.#sparePiecesElsIds[piece]) + const $destSquare = document.getElementById(this.#squareElsIds[dest]) + if (!$srcSquare) { + throw new Error(`Unable to locate source square with id ${this.#squareElsIds[piece]}`) + } + if (!$destSquare) { + throw new Error(`Unable to locate destination square with id ${this.#squareElsIds[dest]}`) } - // animation speeds - if (!validAnimationSpeed(config.appearSpeed)) config.appearSpeed = DEFAULT_APPEAR_SPEED - if (!validAnimationSpeed(config.moveSpeed)) config.moveSpeed = DEFAULT_MOVE_SPEED - if (!validAnimationSpeed(config.snapbackSpeed)) config.snapbackSpeed = DEFAULT_SNAPBACK_SPEED - if (!validAnimationSpeed(config.snapSpeed)) config.snapSpeed = DEFAULT_SNAP_SPEED - if (!validAnimationSpeed(config.trashSpeed)) config.trashSpeed = DEFAULT_TRASH_SPEED + // create the animate piece + const $animatedPiece = document.body.appendChild(this.#buildPieceElement(piece, true, uuid())) + $animatedPiece.style.setProperty('display', '') + $animatedPiece.style.setProperty('position', 'absolute') - // throttle rate - if (!validThrottleRate(config.dragThrottleRate)) config.dragThrottleRate = DEFAULT_DRAG_THROTTLE_RATE + // animate the piece to the destination square + const animation = $animatedPiece.animate([getJqueryStyleOffset($srcSquare), getJqueryStyleOffset($destSquare)], this.#config.moveSpeed) + animation.onfinish = () => { + $destSquare.querySelector(`.${ClassNameLookup.piece}`)?.remove() + // add the "real" piece to the destination square + $destSquare.append(this.#buildPieceElement(piece)) - return config + // remove the animated piece + $animatedPiece.remove() + + // run complete function + if (isFunction(completeFn)) { + completeFn() + } + } } - // --------------------------------------------------------------------------- - // Dependencies - // --------------------------------------------------------------------------- + // execute an array of animations + #doAnimations (animations, oldPos, newPos) { + if (animations.length === 0) return - // check for a compatible version of jQuery - function checkJQuery () { - if (!validJQueryVersion()) { - var errorMsg = 'Chessboard Error 1005: Unable to find a valid version of jQuery. ' + - 'Please include jQuery ' + MINIMUM_JQUERY_VERSION + ' or higher on the page' + - '\n\n' + - 'Exiting' + ELLIPSIS - window.alert(errorMsg) - return false + let numFinished = 0 + const onFinishAnimation3 = () => { + // exit if all the animations aren't finished + numFinished = numFinished + 1 + if (numFinished !== animations.length) return + + this.#drawPositionInstant() + + // run their onMoveEnd function + if (isFunction(this.#config.onMoveEnd)) { + this.#config.onMoveEnd(deepCopy(oldPos), deepCopy(newPos)) + } } - return true + for (let i = 0; i < animations.length; i++) { + const animation = animations[i] + + // clear a piece + if (animation.type === 'clear') { + document.querySelectorAll(`#${this.#squareElsIds[animation.square]} .${ClassNameLookup.piece}`) + .forEach(x => { + const animation = x.animate([{ opacity: 1 }, { opacity: 0 }], this.#config.trashSpeed) + animation.onfinish = onFinishAnimation3 + }) + + // add a piece with no spare pieces - fade the piece onto the square + } else if (animation.type === 'add' && !this.#config.sparePieces) { + const element = document.getElementById(this.#squareElsIds[animation.square]) + if (element) { + element.append(this.#buildPieceElement(animation.piece, true)) + element.querySelectorAll(`.${ClassNameLookup.piece}`) + .forEach(x => { + const animation = x.animate([{ opacity: 0 }, { opacity: 1 }], this.#config.appearSpeed) + animation.onfinish = onFinishAnimation3 + }) + } + + // add a piece with spare pieces - animate from the spares + } else if (animation.type === 'add' && this.#config.sparePieces) { + this.#animateSparePieceToSquare(animation.piece, animation.square, onFinishAnimation3) + + // move a piece from squareA to squareB + } else if (animation.type === 'move') { + this.#animateSquareToSquare(animation.source, animation.destination, animation.piece, onFinishAnimation3) + } + } } - // return either boolean false or the $container element - function checkContainerArg (containerElOrString) { - if (containerElOrString === '') { - var errorMsg1 = 'Chessboard Error 1001: ' + - 'The first argument to Chessboard() cannot be an empty string.' + - '\n\n' + - 'Exiting' + ELLIPSIS - window.alert(errorMsg1) - return false + // calculate an array of animations that need to happen in order to get + // from pos1 to pos2 + #calculateAnimations (pos1, pos2) { + // make copies of both + pos1 = deepCopy(pos1) + pos2 = deepCopy(pos2) + + const animations = [] + const squaresMovedTo = {} + + // remove pieces that are the same in both positions + for (const i in pos2) { + if (!Object.prototype.hasOwnProperty.call(pos2, i)) continue + + if (Object.prototype.hasOwnProperty.call(pos1, i) && pos1[i] === pos2[i]) { + delete pos1[i] + delete pos2[i] + } } - // convert containerEl to query selector if it is a string - if (isString(containerElOrString) && - containerElOrString.charAt(0) !== '#') { - containerElOrString = '#' + containerElOrString + // find all the "move" animations + for (const i in pos2) { + if (!Object.prototype.hasOwnProperty.call(pos2, i)) continue + + const closestPiece = findClosestPiece(pos1, pos2[i], i) + if (closestPiece) { + animations.push({ + type: 'move', + source: closestPiece, + destination: i, + piece: pos2[i] + }) + + delete pos1[closestPiece] + delete pos2[i] + squaresMovedTo[i] = true + } } - // containerEl must be something that becomes a jQuery collection of size 1 - var $container = $(containerElOrString) - if ($container.length !== 1) { - var errorMsg2 = 'Chessboard Error 1003: ' + - 'The first argument to Chessboard() must be the ID of a DOM node, ' + - 'an ID query selector, or a single DOM node.' + - '\n\n' + - 'Exiting' + ELLIPSIS - window.alert(errorMsg2) - return false + // "add" animations + for (const i in pos2) { + if (!Object.prototype.hasOwnProperty.call(pos2, i)) continue + + animations.push({ + type: 'add', + square: i, + piece: pos2[i] + }) + + delete pos2[i] } - return $container + // "clear" animations + for (const i in pos1) { + if (!Object.prototype.hasOwnProperty.call(pos1, i)) continue + + // do not clear a piece if it is on a square that is the result + // of a "move", ie: a piece capture + if (Object.prototype.hasOwnProperty.call(squaresMovedTo, i)) continue + + animations.push({ + type: 'clear', + square: i, + piece: pos1[i] + }) + + delete pos1[i] + } + + return animations } - // --------------------------------------------------------------------------- - // Constructor - // --------------------------------------------------------------------------- + // ------------------------------------------------------------------------- + // Control Flow + // ------------------------------------------------------------------------- - function constructor (containerElOrString, config) { - // first things first: check basic dependencies - if (!checkJQuery()) return null - var $container = checkContainerArg(containerElOrString) - if (!$container) return null + #drawPositionInstant () { + // clear the board + this.#board.querySelectorAll(`.${ClassNameLookup.piece}`).forEach(x => x.remove()) - // ensure the config object is what we expect - config = expandConfigArgumentShorthand(config) - config = expandConfig(config) + // add the pieces + for (const i in this.#currentPosition) { + if (!Object.prototype.hasOwnProperty.call(this.#currentPosition, i)) continue - // DOM elements - var $board = null - var $draggedPiece = null - var $sparePiecesTop = null - var $sparePiecesBottom = null - - // constructor return object - var widget = {} - - // ------------------------------------------------------------------------- - // Stateful - // ------------------------------------------------------------------------- - - var boardBorderSize = 2 - var currentOrientation = 'white' - var currentPosition = {} - var draggedPiece = null - var draggedPieceLocation = null - var draggedPieceSource = null - var isDragging = false - var sparePiecesElsIds = {} - var squareElsIds = {} - var squareElsOffsets = {} - var squareSize = 16 - - // ------------------------------------------------------------------------- - // Validation / Errors - // ------------------------------------------------------------------------- - - function error (code, msg, obj) { - // do nothing if showErrors is not set - if ( - config.hasOwnProperty('showErrors') !== true || - config.showErrors === false - ) { - return - } - - var errorText = 'Chessboard Error ' + code + ': ' + msg - - // print to console - if ( - config.showErrors === 'console' && - typeof console === 'object' && - typeof console.log === 'function' - ) { - console.log(errorText) - if (arguments.length >= 2) { - console.log(obj) - } - return - } - - // alert errors - if (config.showErrors === 'alert') { - if (obj) { - errorText += '\n\n' + JSON.stringify(obj) - } - window.alert(errorText) - return - } - - // custom function - if (isFunction(config.showErrors)) { - config.showErrors(code, msg, obj) - } - } - - function setInitialState () { - currentOrientation = config.orientation - - // make sure position is valid - if (config.hasOwnProperty('position')) { - if (config.position === 'start') { - currentPosition = deepCopy(START_POSITION) - } else if (validFen(config.position)) { - currentPosition = fenToObj(config.position) - } else if (validPositionObject(config.position)) { - currentPosition = deepCopy(config.position) - } else { - error( - 7263, - 'Invalid value passed to config.position.', - config.position - ) - } - } + document.getElementById(this.#squareElsIds[i])?.append(this.#buildPieceElement(this.#currentPosition[i])) } + } - // ------------------------------------------------------------------------- - // DOM Misc - // ------------------------------------------------------------------------- - - // calculates square size based on the width of the container - // got a little CSS black magic here, so let me explain: - // get the width of the container element (could be anything), reduce by 1 for - // fudge factor, and then keep reducing until we find an exact mod 8 for - // our square size - function calculateSquareSize () { - var containerWidth = parseInt($container.width(), 10) - - // defensive, prevent infinite loop - if (!containerWidth || containerWidth <= 0) { - return 0 - } - - // pad one pixel - var boardWidth = containerWidth - 1 - - while (boardWidth % 8 !== 0 && boardWidth > 0) { - boardWidth = boardWidth - 1 - } - - return boardWidth / 8 - } - - // create random IDs for elements - function createElIds () { - // squares on the board - for (var i = 0; i < COLUMNS.length; i++) { - for (var j = 1; j <= 8; j++) { - var square = COLUMNS[i] + j - squareElsIds[square] = square + '-' + uuid() - } - } - - // spare pieces - var pieces = 'KQRNBP'.split('') - for (i = 0; i < pieces.length; i++) { - var whitePiece = 'w' + pieces[i] - var blackPiece = 'b' + pieces[i] - sparePiecesElsIds[whitePiece] = whitePiece + '-' + uuid() - sparePiecesElsIds[blackPiece] = blackPiece + '-' + uuid() - } - } - - // ------------------------------------------------------------------------- - // Markup Building - // ------------------------------------------------------------------------- - - function buildBoardHTML (orientation) { - if (orientation !== 'black') { - orientation = 'white' + #drawBoard () { + this.#board.innerHTML = this.#buildBoardHTML(this.#currentOrientation) + this.#drawPositionInstant() + + if (this.#config.sparePieces) { + if (this.#currentOrientation === 'white') { + /** @type {HTMLElement} */(this.#sparePiecesTop).innerHTML = this.#buildSparePiecesHTML('black'); + /** @type {HTMLElement} */(this.#sparePiecesBottom).innerHTML = this.#buildSparePiecesHTML('white') + } else { + /** @type {HTMLElement} */(this.#sparePiecesTop).innerHTML = this.#buildSparePiecesHTML('white'); + /** @type {HTMLElement} */(this.#sparePiecesBottom).innerHTML = this.#buildSparePiecesHTML('black') } + } + } + + #setCurrentPosition (position) { + const oldPos = deepCopy(this.#currentPosition) + const newPos = deepCopy(position) + const oldFen = objToFen(oldPos) + const newFen = objToFen(newPos) + + // do nothing if no change in position + if (oldFen === newFen) return + + // run their onChange function + if (isFunction(this.#config.onChange)) { + this.#config.onChange(oldPos, newPos) + } + + // update state + this.#currentPosition = position + } - var html = '' + #isXYOnSquare (x, y) { + for (const i in this.#squareElsOffsets) { + if (!Object.prototype.hasOwnProperty.call(this.#squareElsOffsets, i)) continue - // algebraic notation / orientation - var alpha = deepCopy(COLUMNS) - var row = 8 - if (orientation === 'black') { - alpha.reverse() - row = 1 + const s = this.#squareElsOffsets[i] + if (x >= s.left && + x < s.left + this.#squareSize && + y >= s.top && + y < s.top + this.#squareSize) { + return i } + } - var squareColor = 'white' - for (var i = 0; i < 8; i++) { - html += '
' - for (var j = 0; j < 8; j++) { - var square = alpha[j] + row - - html += '
' - - if (config.showNotation) { - // alpha notation - if ((orientation === 'white' && row === 1) || - (orientation === 'black' && row === 8)) { - html += '
' + alpha[j] + '
' - } - - // numeric notation - if (j === 0) { - html += '
' + row + '
' - } - } + return 'offboard' + } - html += '
' // end .square + // records the XY coords of every square into memory + #captureSquareOffsets () { + this.#squareElsOffsets = {} - squareColor = (squareColor === 'white') ? 'black' : 'white' - } - html += '
' + for (const i in this.#squareElsIds) { + if (!Object.prototype.hasOwnProperty.call(this.#squareElsIds, i)) continue - squareColor = (squareColor === 'white') ? 'black' : 'white' + const element = document.getElementById(this.#squareElsIds[i]) + + if (!element) continue + + this.#squareElsOffsets[i] = getJqueryStyleOffset(element) + } + } + + #removeSquareHighlights () { + this.#board.querySelectorAll('.' + ClassNameLookup.square).forEach(x => { + x.classList.remove(ClassNameLookup.highlight1) + x.classList.remove(ClassNameLookup.highlight2) + }) + } + + #snapbackDraggedPiece () { + // there is no "snapback" for spare pieces + if (this.#draggedPieceSource === 'spare') { + this.#trashDraggedPiece() + return + } - if (orientation === 'white') { - row = row - 1 - } else { - row = row + 1 + this.#removeSquareHighlights() + + // get source square position + const sourceSquare = document.getElementById(this.#squareElsIds[this.#draggedPieceSource]) + if (!sourceSquare) throw new Error('') + const sourceSquarePosition = getJqueryStyleOffset(sourceSquare) + + // animate the piece to the target square + const opts = { + duration: this.#config.snapbackSpeed, + complete: () => { + this.#drawPositionInstant() + this.#draggedPiece.style.setProperty('display', 'none') + + // run their onSnapbackEnd function + if (isFunction(this.#config.onSnapbackEnd)) { + this.#config.onSnapbackEnd( + this.#draggedPiece, + this.#draggedPieceSource, + deepCopy(this.#currentPosition), + this.#currentOrientation + ) } } + } + this.#draggedPiece.animate(sourceSquarePosition, opts) + + // set state + this.#isDragging = false + } + + #trashDraggedPiece () { + this.#removeSquareHighlights() + + // remove the source piece + const newPosition = deepCopy(this.#currentPosition) + delete newPosition[this.#draggedPieceSource] + this.#setCurrentPosition(newPosition) + + // redraw the position + this.#drawPositionInstant() + + // hide the dragged piece + this.#draggedPiece.animate([{ opacity: 1 }, { opacity: 0 }], this.#config.trashSpeed) + + // set state + this.#isDragging = false + } - return interpolateTemplate(html, CSS) - } - - function buildPieceImgSrc (piece) { - if (isFunction(config.pieceTheme)) { - return config.pieceTheme(piece) - } - - if (isString(config.pieceTheme)) { - return interpolateTemplate(config.pieceTheme, {piece: piece}) - } - - // NOTE: this should never happen - error(8272, 'Unable to build image source for config.pieceTheme.') - return '' - } - - function buildPieceHTML (piece, hidden, id) { - var html = '' - - return interpolateTemplate(html, CSS) - } - - function buildSparePiecesHTML (color) { - var pieces = ['wK', 'wQ', 'wR', 'wB', 'wN', 'wP'] - if (color === 'black') { - pieces = ['bK', 'bQ', 'bR', 'bB', 'bN', 'bP'] - } - - var html = '' - for (var i = 0; i < pieces.length; i++) { - html += buildPieceHTML(pieces[i], false, sparePiecesElsIds[pieces[i]]) - } - - return html - } - - // ------------------------------------------------------------------------- - // Animations - // ------------------------------------------------------------------------- - - function animateSquareToSquare (src, dest, piece, completeFn) { - // get information about the source and destination squares - var $srcSquare = $('#' + squareElsIds[src]) - var srcSquarePosition = $srcSquare.offset() - var $destSquare = $('#' + squareElsIds[dest]) - var destSquarePosition = $destSquare.offset() - - // create the animated piece and absolutely position it - // over the source square - var animatedPieceId = uuid() - $('body').append(buildPieceHTML(piece, true, animatedPieceId)) - var $animatedPiece = $('#' + animatedPieceId) - $animatedPiece.css({ - display: '', - position: 'absolute', - top: srcSquarePosition.top, - left: srcSquarePosition.left - }) - - // remove original piece from source square - $srcSquare.find('.' + CSS.piece).remove() - - function onFinishAnimation1 () { - // add the "real" piece to the destination square - $destSquare.append(buildPieceHTML(piece)) - - // remove the animated piece - $animatedPiece.remove() - - // run complete function - if (isFunction(completeFn)) { - completeFn() - } - } - - // animate the piece to the destination square - var opts = { - duration: config.moveSpeed, - complete: onFinishAnimation1 - } - $animatedPiece.animate(destSquarePosition, opts) - } - - function animateSparePieceToSquare (piece, dest, completeFn) { - var srcOffset = $('#' + sparePiecesElsIds[piece]).offset() - var $destSquare = $('#' + squareElsIds[dest]) - var destOffset = $destSquare.offset() - - // create the animate piece - var pieceId = uuid() - $('body').append(buildPieceHTML(piece, true, pieceId)) - var $animatedPiece = $('#' + pieceId) - $animatedPiece.css({ - display: '', - position: 'absolute', - left: srcOffset.left, - top: srcOffset.top - }) - - // on complete - function onFinishAnimation2 () { - // add the "real" piece to the destination square - $destSquare.find('.' + CSS.piece).remove() - $destSquare.append(buildPieceHTML(piece)) - - // remove the animated piece - $animatedPiece.remove() - - // run complete function - if (isFunction(completeFn)) { - completeFn() - } - } - - // animate the piece to the destination square - var opts = { - duration: config.moveSpeed, - complete: onFinishAnimation2 - } - $animatedPiece.animate(destOffset, opts) - } - - // execute an array of animations - function doAnimations (animations, oldPos, newPos) { - if (animations.length === 0) return - - var numFinished = 0 - function onFinishAnimation3 () { - // exit if all the animations aren't finished - numFinished = numFinished + 1 - if (numFinished !== animations.length) return - - drawPositionInstant() - - // run their onMoveEnd function - if (isFunction(config.onMoveEnd)) { - config.onMoveEnd(deepCopy(oldPos), deepCopy(newPos)) - } - } - - for (var i = 0; i < animations.length; i++) { - var animation = animations[i] - - // clear a piece - if (animation.type === 'clear') { - $('#' + squareElsIds[animation.square] + ' .' + CSS.piece) - .fadeOut(config.trashSpeed, onFinishAnimation3) + #updateDraggedPiece (x, y) { + // put the dragged piece over the mouse cursor + this.#draggedPiece.style.setProperty('left', `${x - this.#squareSize / 2}px`) + this.#draggedPiece.style.setProperty('top', `${y - this.#squareSize / 2}px`) - // add a piece with no spare pieces - fade the piece onto the square - } else if (animation.type === 'add' && !config.sparePieces) { - $('#' + squareElsIds[animation.square]) - .append(buildPieceHTML(animation.piece, true)) - .find('.' + CSS.piece) - .fadeIn(config.appearSpeed, onFinishAnimation3) + // get location + const location = this.#isXYOnSquare(x, y) - // add a piece with spare pieces - animate from the spares - } else if (animation.type === 'add' && config.sparePieces) { - animateSparePieceToSquare(animation.piece, animation.square, onFinishAnimation3) + // do nothing if the location has not changed + if (location === this.#draggedPieceLocation) return - // move a piece from squareA to squareB - } else if (animation.type === 'move') { - animateSquareToSquare(animation.source, animation.destination, animation.piece, onFinishAnimation3) - } - } - } - - // calculate an array of animations that need to happen in order to get - // from pos1 to pos2 - function calculateAnimations (pos1, pos2) { - // make copies of both - pos1 = deepCopy(pos1) - pos2 = deepCopy(pos2) - - var animations = [] - var squaresMovedTo = {} - - // remove pieces that are the same in both positions - for (var i in pos2) { - if (!pos2.hasOwnProperty(i)) continue - - if (pos1.hasOwnProperty(i) && pos1[i] === pos2[i]) { - delete pos1[i] - delete pos2[i] - } - } - - // find all the "move" animations - for (i in pos2) { - if (!pos2.hasOwnProperty(i)) continue - - var closestPiece = findClosestPiece(pos1, pos2[i], i) - if (closestPiece) { - animations.push({ - type: 'move', - source: closestPiece, - destination: i, - piece: pos2[i] - }) - - delete pos1[closestPiece] - delete pos2[i] - squaresMovedTo[i] = true - } + // remove highlight from previous square + if (validSquare(this.#draggedPieceLocation)) { + document.getElementById(this.#squareElsIds[this.#draggedPieceLocation])?.classList.remove(ClassNameLookup.highlight2) + } + + // add highlight to new square + if (validSquare(location)) { + document.getElementById(this.#squareElsIds[location])?.classList.add(ClassNameLookup.highlight2) + } + + // run onDragMove + if (isFunction(this.#config.onDragMove)) { + this.#config.onDragMove( + location, + this.#draggedPieceLocation, + this.#draggedPieceSource, + this.#draggedPiece, + deepCopy(this.#currentPosition), + this.#currentOrientation + ) + } + + // update state + this.#draggedPieceLocation = location + } + + #stopDraggedPiece (location) { + // determine what the action should be + let action = 'drop' + if (location === 'offboard' && this.#config.dropOffBoard === 'snapback') { + action = 'snapback' + } + if (location === 'offboard' && this.#config.dropOffBoard === 'trash') { + action = 'trash' + } + + // run their onDrop function, which can potentially change the drop action + if (isFunction(this.#config.onDrop)) { + const newPosition = deepCopy(this.#currentPosition) + + // source piece is a spare piece and position is off the board + // if (draggedPieceSource === 'spare' && location === 'offboard') {...} + // position has not changed; do nothing + + // source piece is a spare piece and position is on the board + if (this.#draggedPieceSource === 'spare' && validSquare(location)) { + // add the piece to the board + newPosition[location] = this.#draggedPiece } - // "add" animations - for (i in pos2) { - if (!pos2.hasOwnProperty(i)) continue - - animations.push({ - type: 'add', - square: i, - piece: pos2[i] - }) - - delete pos2[i] - } - - // "clear" animations - for (i in pos1) { - if (!pos1.hasOwnProperty(i)) continue - - // do not clear a piece if it is on a square that is the result - // of a "move", ie: a piece capture - if (squaresMovedTo.hasOwnProperty(i)) continue - - animations.push({ - type: 'clear', - square: i, - piece: pos1[i] - }) - - delete pos1[i] - } - - return animations - } - - // ------------------------------------------------------------------------- - // Control Flow - // ------------------------------------------------------------------------- - - function drawPositionInstant () { - // clear the board - $board.find('.' + CSS.piece).remove() - - // add the pieces - for (var i in currentPosition) { - if (!currentPosition.hasOwnProperty(i)) continue - - $('#' + squareElsIds[i]).append(buildPieceHTML(currentPosition[i])) - } - } - - function drawBoard () { - $board.html(buildBoardHTML(currentOrientation, squareSize, config.showNotation)) - drawPositionInstant() - - if (config.sparePieces) { - if (currentOrientation === 'white') { - $sparePiecesTop.html(buildSparePiecesHTML('black')) - $sparePiecesBottom.html(buildSparePiecesHTML('white')) - } else { - $sparePiecesTop.html(buildSparePiecesHTML('white')) - $sparePiecesBottom.html(buildSparePiecesHTML('black')) - } - } - } - - function setCurrentPosition (position) { - var oldPos = deepCopy(currentPosition) - var newPos = deepCopy(position) - var oldFen = objToFen(oldPos) - var newFen = objToFen(newPos) - - // do nothing if no change in position - if (oldFen === newFen) return - - // run their onChange function - if (isFunction(config.onChange)) { - config.onChange(oldPos, newPos) - } - - // update state - currentPosition = position - } - - function isXYOnSquare (x, y) { - for (var i in squareElsOffsets) { - if (!squareElsOffsets.hasOwnProperty(i)) continue - - var s = squareElsOffsets[i] - if (x >= s.left && - x < s.left + squareSize && - y >= s.top && - y < s.top + squareSize) { - return i - } - } - - return 'offboard' - } - - // records the XY coords of every square into memory - function captureSquareOffsets () { - squareElsOffsets = {} - - for (var i in squareElsIds) { - if (!squareElsIds.hasOwnProperty(i)) continue - - squareElsOffsets[i] = $('#' + squareElsIds[i]).offset() - } - } - - function removeSquareHighlights () { - $board - .find('.' + CSS.square) - .removeClass(CSS.highlight1 + ' ' + CSS.highlight2) - } - - function snapbackDraggedPiece () { - // there is no "snapback" for spare pieces - if (draggedPieceSource === 'spare') { - trashDraggedPiece() - return - } - - removeSquareHighlights() - - // animation complete - function complete () { - drawPositionInstant() - $draggedPiece.css('display', 'none') - - // run their onSnapbackEnd function - if (isFunction(config.onSnapbackEnd)) { - config.onSnapbackEnd( - draggedPiece, - draggedPieceSource, - deepCopy(currentPosition), - currentOrientation - ) - } - } - - // get source square position - var sourceSquarePosition = $('#' + squareElsIds[draggedPieceSource]).offset() - - // animate the piece to the target square - var opts = { - duration: config.snapbackSpeed, - complete: complete - } - $draggedPiece.animate(sourceSquarePosition, opts) - - // set state - isDragging = false - } - - function trashDraggedPiece () { - removeSquareHighlights() - - // remove the source piece - var newPosition = deepCopy(currentPosition) - delete newPosition[draggedPieceSource] - setCurrentPosition(newPosition) - - // redraw the position - drawPositionInstant() - - // hide the dragged piece - $draggedPiece.fadeOut(config.trashSpeed) - - // set state - isDragging = false - } - - function dropDraggedPieceOnSquare (square) { - removeSquareHighlights() - - // update position - var newPosition = deepCopy(currentPosition) - delete newPosition[draggedPieceSource] - newPosition[square] = draggedPiece - setCurrentPosition(newPosition) - - // get target square information - var targetSquarePosition = $('#' + squareElsIds[square]).offset() - - // animation complete - function onAnimationComplete () { - drawPositionInstant() - $draggedPiece.css('display', 'none') - - // execute their onSnapEnd function - if (isFunction(config.onSnapEnd)) { - config.onSnapEnd(draggedPieceSource, square, draggedPiece) - } - } - - // snap the piece to the target square - var opts = { - duration: config.snapSpeed, - complete: onAnimationComplete - } - $draggedPiece.animate(targetSquarePosition, opts) - - // set state - isDragging = false - } - - function beginDraggingPiece (source, piece, x, y) { - // run their custom onDragStart function - // their custom onDragStart function can cancel drag start - if (isFunction(config.onDragStart) && - config.onDragStart(source, piece, deepCopy(currentPosition), currentOrientation) === false) { - return - } - - // set state - isDragging = true - draggedPiece = piece - draggedPieceSource = source - - // if the piece came from spare pieces, location is offboard - if (source === 'spare') { - draggedPieceLocation = 'offboard' - } else { - draggedPieceLocation = source - } - - // capture the x, y coords of all squares in memory - captureSquareOffsets() - - // create the dragged piece - $draggedPiece.attr('src', buildPieceImgSrc(piece)).css({ - display: '', - position: 'absolute', - left: x - squareSize / 2, - top: y - squareSize / 2 - }) - - if (source !== 'spare') { - // highlight the source square and hide the piece - $('#' + squareElsIds[source]) - .addClass(CSS.highlight1) - .find('.' + CSS.piece) - .css('display', 'none') - } - } - - function updateDraggedPiece (x, y) { - // put the dragged piece over the mouse cursor - $draggedPiece.css({ - left: x - squareSize / 2, - top: y - squareSize / 2 - }) - - // get location - var location = isXYOnSquare(x, y) - - // do nothing if the location has not changed - if (location === draggedPieceLocation) return - - // remove highlight from previous square - if (validSquare(draggedPieceLocation)) { - $('#' + squareElsIds[draggedPieceLocation]).removeClass(CSS.highlight2) - } - - // add highlight to new square - if (validSquare(location)) { - $('#' + squareElsIds[location]).addClass(CSS.highlight2) - } - - // run onDragMove - if (isFunction(config.onDragMove)) { - config.onDragMove( - location, - draggedPieceLocation, - draggedPieceSource, - draggedPiece, - deepCopy(currentPosition), - currentOrientation - ) - } - - // update state - draggedPieceLocation = location - } - - function stopDraggedPiece (location) { - // determine what the action should be - var action = 'drop' - if (location === 'offboard' && config.dropOffBoard === 'snapback') { - action = 'snapback' - } - if (location === 'offboard' && config.dropOffBoard === 'trash') { - action = 'trash' - } - - // run their onDrop function, which can potentially change the drop action - if (isFunction(config.onDrop)) { - var newPosition = deepCopy(currentPosition) - - // source piece is a spare piece and position is off the board - // if (draggedPieceSource === 'spare' && location === 'offboard') {...} - // position has not changed; do nothing - - // source piece is a spare piece and position is on the board - if (draggedPieceSource === 'spare' && validSquare(location)) { - // add the piece to the board - newPosition[location] = draggedPiece - } - - // source piece was on the board and position is off the board - if (validSquare(draggedPieceSource) && location === 'offboard') { - // remove the piece from the board - delete newPosition[draggedPieceSource] - } - - // source piece was on the board and position is on the board - if (validSquare(draggedPieceSource) && validSquare(location)) { - // move the piece - delete newPosition[draggedPieceSource] - newPosition[location] = draggedPiece - } - - var oldPosition = deepCopy(currentPosition) - - var result = config.onDrop( - draggedPieceSource, - location, - draggedPiece, - newPosition, - oldPosition, - currentOrientation - ) - if (result === 'snapback' || result === 'trash') { - action = result - } - } - - // do it! - if (action === 'snapback') { - snapbackDraggedPiece() - } else if (action === 'trash') { - trashDraggedPiece() - } else if (action === 'drop') { - dropDraggedPieceOnSquare(location) - } - } - - // ------------------------------------------------------------------------- - // Public Methods - // ------------------------------------------------------------------------- - - // clear the board - widget.clear = function (useAnimation) { - widget.position({}, useAnimation) - } - - // remove the widget from the page - widget.destroy = function () { - // remove markup - $container.html('') - $draggedPiece.remove() - - // remove event handlers - $container.unbind() - } - - // shorthand method to get the current FEN - widget.fen = function () { - return widget.position('fen') - } - - // flip orientation - widget.flip = function () { - return widget.orientation('flip') - } - - // move pieces - // TODO: this method should be variadic as well as accept an array of moves - widget.move = function () { - // no need to throw an error here; just do nothing - // TODO: this should return the current position - if (arguments.length === 0) return - - var useAnimation = true - - // collect the moves into an object - var moves = {} - for (var i = 0; i < arguments.length; i++) { - // any "false" to this function means no animations - if (arguments[i] === false) { - useAnimation = false - continue - } - - // skip invalid arguments - if (!validMove(arguments[i])) { - error(2826, 'Invalid move passed to the move method.', arguments[i]) - continue - } - - var tmp = arguments[i].split('-') - moves[tmp[0]] = tmp[1] - } - - // calculate position from moves - var newPos = calculatePositionFromMoves(currentPosition, moves) - - // update the board - widget.position(newPos, useAnimation) - - // return the new position object - return newPos - } - - widget.orientation = function (arg) { - // no arguments, return the current orientation - if (arguments.length === 0) { - return currentOrientation - } - - // set to white or black - if (arg === 'white' || arg === 'black') { - currentOrientation = arg - drawBoard() - return currentOrientation - } - - // flip orientation - if (arg === 'flip') { - currentOrientation = currentOrientation === 'white' ? 'black' : 'white' - drawBoard() - return currentOrientation - } - - error(5482, 'Invalid value passed to the orientation method.', arg) - } - - widget.position = function (position, useAnimation) { - // no arguments, return the current position - if (arguments.length === 0) { - return deepCopy(currentPosition) - } - - // get position as FEN - if (isString(position) && position.toLowerCase() === 'fen') { - return objToFen(currentPosition) + // source piece was on the board and position is off the board + if (validSquare(this.#draggedPieceSource) && location === 'offboard') { + // remove the piece from the board + delete newPosition[this.#draggedPieceSource] } - // start position - if (isString(position) && position.toLowerCase() === 'start') { - position = deepCopy(START_POSITION) - } - - // convert FEN to position object - if (validFen(position)) { - position = fenToObj(position) - } - - // validate position object - if (!validPositionObject(position)) { - error(6482, 'Invalid value passed to the position method.', position) - return - } - - // default for useAnimations is true - if (useAnimation !== false) useAnimation = true - - if (useAnimation) { - // start the animations - var animations = calculateAnimations(currentPosition, position) - doAnimations(animations, currentPosition, position) - - // set the new position - setCurrentPosition(position) - } else { - // instant update - setCurrentPosition(position) - drawPositionInstant() - } - } - - widget.resize = function () { - // calulate the new square size - squareSize = calculateSquareSize() - - // set board width - $board.css('width', squareSize * 8 + 'px') - - // set drag piece size - $draggedPiece.css({ - height: squareSize, - width: squareSize - }) - - // spare pieces - if (config.sparePieces) { - $container - .find('.' + CSS.sparePieces) - .css('paddingLeft', squareSize + boardBorderSize + 'px') - } - - // redraw the board - drawBoard() - } - - // set the starting position - widget.start = function (useAnimation) { - widget.position('start', useAnimation) - } - - // ------------------------------------------------------------------------- - // Browser Events - // ------------------------------------------------------------------------- - - function stopDefault (evt) { - evt.preventDefault() - } - - function mousedownSquare (evt) { - // do nothing if we're not draggable - if (!config.draggable) return - - // do nothing if there is no piece on this square - var square = $(this).attr('data-square') - if (!validSquare(square)) return - if (!currentPosition.hasOwnProperty(square)) return - - beginDraggingPiece(square, currentPosition[square], evt.pageX, evt.pageY) - } - - function touchstartSquare (e) { - // do nothing if we're not draggable - if (!config.draggable) return - - // do nothing if there is no piece on this square - var square = $(this).attr('data-square') - if (!validSquare(square)) return - if (!currentPosition.hasOwnProperty(square)) return - - e = e.originalEvent - beginDraggingPiece( - square, - currentPosition[square], - e.changedTouches[0].pageX, - e.changedTouches[0].pageY - ) - } - - function mousedownSparePiece (evt) { - // do nothing if sparePieces is not enabled - if (!config.sparePieces) return - - var piece = $(this).attr('data-piece') - - beginDraggingPiece('spare', piece, evt.pageX, evt.pageY) - } - - function touchstartSparePiece (e) { - // do nothing if sparePieces is not enabled - if (!config.sparePieces) return - - var piece = $(this).attr('data-piece') - - e = e.originalEvent - beginDraggingPiece( - 'spare', - piece, - e.changedTouches[0].pageX, - e.changedTouches[0].pageY - ) - } - - function mousemoveWindow (evt) { - if (isDragging) { - updateDraggedPiece(evt.pageX, evt.pageY) + // source piece was on the board and position is on the board + if (validSquare(this.#draggedPieceSource) && validSquare(location)) { + // move the piece + delete newPosition[this.#draggedPieceSource] + newPosition[location] = this.#draggedPiece } + + const oldPosition = deepCopy(this.#currentPosition) + + const result = this.#config.onDrop( + this.#draggedPieceSource, + location, + this.#draggedPiece, + newPosition, + oldPosition, + this.#currentOrientation + ) + if (result === 'snapback' || result === 'trash') { + action = result + } + } + + // do it! + if (action === 'snapback') { + this.#snapbackDraggedPiece() + } else if (action === 'trash') { + this.#trashDraggedPiece() + } else if (action === 'drop') { + this.#dropDraggedPieceOnSquare(location) } + } + + // ------------------------------------------------------------------------- + // Browser Events + // ------------------------------------------------------------------------- + + #stopDefault (evt) { + evt.preventDefault() + } + + #mousedownSquare (evt) { + // do nothing if we're not draggable + if (!this.#config.draggable) return + + // do nothing if there is no piece on this square + const square = evt.currentTarget.getAttribute('data-square') + if (!validSquare(square)) return + if (!Object.prototype.hasOwnProperty.call(this.#currentPosition, square)) return + + this.#beginDraggingPiece(square, this.#currentPosition[square], evt.pageX, evt.pageY) + } + + #touchstartSquare (e) { + // do nothing if we're not draggable + if (!this.#config.draggable) return + + // do nothing if there is no piece on this square + const square = e.currentTarget.getAttribute('data-square') + if (!validSquare(square)) return + if (!Object.prototype.hasOwnProperty.call(this.#currentPosition, square)) return + + e = e.originalEvent + this.#beginDraggingPiece( + square, + this.#currentPosition[square], + e.changedTouches[0].pageX, + e.changedTouches[0].pageY + ) + } - var throttledMousemoveWindow = throttle(mousemoveWindow, config.dragThrottleRate) - - function touchmoveWindow (evt) { - // do nothing if we are not dragging a piece - if (!isDragging) return - - // prevent screen from scrolling - evt.preventDefault() - - updateDraggedPiece(evt.originalEvent.changedTouches[0].pageX, - evt.originalEvent.changedTouches[0].pageY) - } - - var throttledTouchmoveWindow = throttle(touchmoveWindow, config.dragThrottleRate) - - function mouseupWindow (evt) { - // do nothing if we are not dragging a piece - if (!isDragging) return - - // get the location - var location = isXYOnSquare(evt.pageX, evt.pageY) - - stopDraggedPiece(location) - } - - function touchendWindow (evt) { - // do nothing if we are not dragging a piece - if (!isDragging) return - - // get the location - var location = isXYOnSquare(evt.originalEvent.changedTouches[0].pageX, - evt.originalEvent.changedTouches[0].pageY) - - stopDraggedPiece(location) - } - - function mouseenterSquare (evt) { - // do not fire this event if we are dragging a piece - // NOTE: this should never happen, but it's a safeguard - if (isDragging) return - - // exit if they did not provide a onMouseoverSquare function - if (!isFunction(config.onMouseoverSquare)) return - - // get the square - var square = $(evt.currentTarget).attr('data-square') - - // NOTE: this should never happen; defensive - if (!validSquare(square)) return - - // get the piece on this square - var piece = false - if (currentPosition.hasOwnProperty(square)) { - piece = currentPosition[square] - } - - // execute their function - config.onMouseoverSquare(square, piece, deepCopy(currentPosition), currentOrientation) - } - - function mouseleaveSquare (evt) { - // do not fire this event if we are dragging a piece - // NOTE: this should never happen, but it's a safeguard - if (isDragging) return - - // exit if they did not provide an onMouseoutSquare function - if (!isFunction(config.onMouseoutSquare)) return - - // get the square - var square = $(evt.currentTarget).attr('data-square') - - // NOTE: this should never happen; defensive - if (!validSquare(square)) return - - // get the piece on this square - var piece = false - if (currentPosition.hasOwnProperty(square)) { - piece = currentPosition[square] - } - - // execute their function - config.onMouseoutSquare(square, piece, deepCopy(currentPosition), currentOrientation) - } - - // ------------------------------------------------------------------------- - // Initialization - // ------------------------------------------------------------------------- - - function addEvents () { - // prevent "image drag" - $('body').on('mousedown mousemove', '.' + CSS.piece, stopDefault) - - // mouse drag pieces - $board.on('mousedown', '.' + CSS.square, mousedownSquare) - $container.on('mousedown', '.' + CSS.sparePieces + ' .' + CSS.piece, mousedownSparePiece) - - // mouse enter / leave square - $board - .on('mouseenter', '.' + CSS.square, mouseenterSquare) - .on('mouseleave', '.' + CSS.square, mouseleaveSquare) - - // piece drag - var $window = $(window) - $window - .on('mousemove', throttledMousemoveWindow) - .on('mouseup', mouseupWindow) - - // touch drag pieces - if (isTouchDevice()) { - $board.on('touchstart', '.' + CSS.square, touchstartSquare) - $container.on('touchstart', '.' + CSS.sparePieces + ' .' + CSS.piece, touchstartSparePiece) - $window - .on('touchmove', throttledTouchmoveWindow) - .on('touchend', touchendWindow) - } - } - - function initDOM () { - // create unique IDs for all the elements we will create - createElIds() - - // build board and save it in memory - $container.html(buildContainerHTML(config.sparePieces)) - $board = $container.find('.' + CSS.board) - - if (config.sparePieces) { - $sparePiecesTop = $container.find('.' + CSS.sparePiecesTop) - $sparePiecesBottom = $container.find('.' + CSS.sparePiecesBottom) - } - - // create the drag piece - var draggedPieceId = uuid() - $('body').append(buildPieceHTML('wP', true, draggedPieceId)) - $draggedPiece = $('#' + draggedPieceId) - - // TODO: need to remove this dragged piece element if the board is no - // longer in the DOM - - // get the border size - boardBorderSize = parseInt($board.css('borderLeftWidth'), 10) - - // set the size and draw the board - widget.resize() - } - - // ------------------------------------------------------------------------- - // Initialization - // ------------------------------------------------------------------------- - - setInitialState() - initDOM() - addEvents() - - // return the widget object - return widget - } // end constructor - - // TODO: do module exports here - window['Chessboard'] = constructor - - // support legacy ChessBoard name - window['ChessBoard'] = window['Chessboard'] - - // expose util functions - window['Chessboard']['fenToObj'] = fenToObj - window['Chessboard']['objToFen'] = objToFen -})() // end anonymous wrapper - -/* export Chessboard object if using node or any other CommonJS compatible - * environment */ -if (typeof exports !== 'undefined') { - exports.Chessboard = window.Chessboard + #mousedownSparePiece (evt) { + // do nothing if sparePieces is not enabled + if (!this.#config.sparePieces) return + + const piece = evt.currentTarget.getAttribute('data-piece') + + this.#beginDraggingPiece('spare', piece, evt.pageX, evt.pageY) + } + + #touchstartSparePiece (e) { + // do nothing if sparePieces is not enabled + if (!this.#config.sparePieces) return + + const piece = e.currentTarget.getAttribute('data-piece') + + e = e.originalEvent + this.#beginDraggingPiece( + 'spare', + piece, + e.changedTouches[0].pageX, + e.changedTouches[0].pageY + ) + } + + #mousemoveWindow (evt) { + if (this.#isDragging) { + this.#updateDraggedPiece(evt.pageX, evt.pageY) + } + } + + #touchmoveWindow (evt) { + // do nothing if we are not dragging a piece + if (!this.#isDragging) return + + // prevent screen from scrolling + evt.preventDefault() + + this.#updateDraggedPiece(evt.originalEvent.changedTouches[0].pageX, + evt.originalEvent.changedTouches[0].pageY) + } + + #mouseupWindow (evt) { + // do nothing if we are not dragging a piece + if (!this.#isDragging) return + + // get the location + const location = this.#isXYOnSquare(evt.pageX, evt.pageY) + + this.#stopDraggedPiece(location) + } + + #touchendWindow (evt) { + // do nothing if we are not dragging a piece + if (!this.#isDragging) return + + // get the location + const location = this.#isXYOnSquare(evt.originalEvent.changedTouches[0].pageX, + evt.originalEvent.changedTouches[0].pageY) + + this.#stopDraggedPiece(location) + } + + /** + * @param {MouseEvent} evt + * @returns {void} + */ + #mouseenterSquare (evt) { + // do not fire this event if we are dragging a piece + // NOTE: this should never happen, but it's a safeguard + if (this.#isDragging) return + + // exit if they did not provide a onMouseoverSquare function + if (!isFunction(this.#config.onMouseoverSquare)) return + + // get the square + const square = /** @type {HTMLElement | null} */(evt.currentTarget)?.getAttribute('data-square') + + // NOTE: this should never happen; defensive + if (!validSquare(square)) return + + // get the piece on this square + let piece = false + if (square != null && Object.prototype.hasOwnProperty.call(this.#currentPosition, square)) { + piece = this.#currentPosition[square] + } + + // execute their function + this.#config.onMouseoverSquare(square, piece, deepCopy(this.#currentPosition), this.#currentOrientation) + } + + #mouseleaveSquare (evt) { + // do not fire this event if we are dragging a piece + // NOTE: this should never happen, but it's a safeguard + if (this.#isDragging) return + + // exit if they did not provide an onMouseoutSquare function + if (!isFunction(this.#config.onMouseoutSquare)) return + + // get the square + const square = document.getElementById(evt.currentTarget)?.getAttribute('data-square') + + // NOTE: this should never happen; defensive + if (!validSquare(square)) return + + // get the piece on this square + let piece = false + if (square != null && Object.prototype.hasOwnProperty.call(this.#currentPosition, square)) { + piece = this.#currentPosition[square] + } + + // execute their function + this.#config.onMouseoutSquare(square, piece, deepCopy(this.#currentPosition), this.#currentOrientation) + } + + // ------------------------------------------------------------------------- + // Initialization + // ------------------------------------------------------------------------- + + #addEvents () { + // prevent "image drag" + document.body.onmousedown = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.piece}`) && this.#stopDefault(e) + document.body.onmousemove = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.piece}`) && this.#stopDefault(e) + + // mouse drag pieces + this.#board.onmousedown = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.square}`) && this.#mousedownSquare(e) + this.#container.onmousedown = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.sparePieces} .${ClassNameLookup.piece}`) && this.#mousedownSparePiece(e) + + // mouse enter / leave square + this.#board.onmouseenter = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.square}`) && this.#mouseenterSquare(e) + this.#board.onmouseleave = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.square}`) && this.#mouseleaveSquare(e) + + // piece drag + const throttledMousemoveWindow = throttle((e) => this.#mousemoveWindow(e), this.#config.dragThrottleRate) + const throttledTouchmoveWindow = throttle((e) => this.#touchmoveWindow(e), this.#config.dragThrottleRate) + window.onmousemove = (e) => throttledMousemoveWindow(e) + window.onmouseup = (e) => this.#mouseupWindow(e) + + // touch drag pieces + if (isTouchDevice()) { + this.#board.ontouchstart = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.square}`) && this.#touchstartSquare(e) + this.#board.ontouchstart = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.sparePieces} .${ClassNameLookup.piece}`) && this.#touchstartSparePiece(e) + window.ontouchmove = (e) => throttledTouchmoveWindow(e) + window.ontouchend = (e) => this.#touchendWindow(e) + } + } + + /** + * Calculates square size based on the width of the container + */ + #calculateSquareSize () { + // got a little CSS black magic here, so let me explain: + // get the width of the container element (could be anything), reduce by 1 for + // fudge factor, and then keep reducing until we find an exact mod 8 for + // our square size + const containerWidth = this.#container.getBoundingClientRect().width + + // defensive, prevent infinite loop + if (!containerWidth || containerWidth <= 0) { + return 0 + } + + // pad one pixel + let boardWidth = containerWidth - 1 + + while (boardWidth % 8 !== 0 && boardWidth > 0) { + boardWidth = boardWidth - 1 + } + + return boardWidth / 8 + } } + +Object.assign(Chessboard, { fenToObj, objToFen }) +Object.assign(globalThis, { Chessboard }) + +// export { Chessboard, fenToObj, objToFen } diff --git a/package.json b/package.json index bf071a30..559619ef 100644 --- a/package.json +++ b/package.json @@ -9,19 +9,22 @@ "type": "git", "url": "git://github.com/oakmac/chessboardjs.git" }, - "files": ["dist/"], + "files": [ + "dist/" + ], "dependencies": { "jquery": ">=3.4.1" }, "devDependencies": { + "@types/node": "18.7.23", "csso": "3.5.1", - "fs-plus": "3.1.1", "kidif": "1.1.0", "mustache": "2.3.0", - "standard": "10.0.2", - "uglify-js": "3.6.0" + "standard": "17.0.0", + "uglify-js": "3.17.2" }, "scripts": { + "package": "npm run standard && npm run build && npm run website", "build": "standard lib/chessboard.js && node scripts/build.js", "standard": "standard --fix lib/*.js website/js/*.js", "website": "node scripts/website.js" diff --git a/scripts/build.js b/scripts/build.js index 798bec10..cd8f9873 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -3,44 +3,44 @@ // ----------------------------------------------------------------------------- // libraries -const fs = require('fs-plus') -const csso = require('csso') -const uglify = require('uglify-js') +const fs = require('fs'); +const csso = require('csso'); +const uglify = require('uglify-js'); -const encoding = {encoding: 'utf8'} +const encoding = { encoding: 'utf8' }; -const package = JSON.parse(fs.readFileSync('package.json', encoding)) -const version = package.version -const year = new Date().getFullYear() +const package = JSON.parse(fs.readFileSync('package.json', encoding)); +const version = package.version; +const year = new Date().getFullYear(); const cssSrc = fs.readFileSync('lib/chessboard.css', encoding) - .replace('@VERSION', version) + .replace('@VERSION', version); const jsSrc = fs.readFileSync('lib/chessboard.js', encoding) - .replace('@VERSION', version) - .replace('RUN_ASSERTS = true', 'RUN_ASSERTS = false') + .replace('@VERSION', version) + .replace('RUN_ASSERTS = true', 'RUN_ASSERTS = false'); // TODO: need to remove the RUN_ASSERTS calls from the non-minified file -const minifiedCSS = csso.minify(cssSrc).css -const uglifyResult = uglify.minify(jsSrc) -const minifiedJS = uglifyResult.code +const minifiedCSS = csso.minify(cssSrc).css; +const uglifyResult = uglify.minify(jsSrc); +const minifiedJS = uglifyResult.code; // quick sanity checks -console.assert(!uglifyResult.error, 'error minifying JS!') -console.assert(typeof minifiedCSS === 'string' && minifiedCSS !== '', 'error minifying CSS!') +console.assert(!uglifyResult.error, 'error minifying JS!'); +console.assert(typeof minifiedCSS === 'string' && minifiedCSS !== '', 'error minifying CSS!'); // add license to the top of minified files -const minifiedJSWithBanner = banner() + minifiedJS +const minifiedJSWithBanner = banner() + minifiedJS; // create a fresh dist/ folder -fs.removeSync('dist') -fs.makeTreeSync('dist') +fs.rmSync('dist', { recursive: true, force: true }); +fs.mkdirSync('dist'); // copy lib files to dist/ -fs.writeFileSync('dist/chessboard-' + version + '.css', cssSrc, encoding) -fs.writeFileSync('dist/chessboard-' + version + '.min.css', minifiedCSS, encoding) -fs.writeFileSync('dist/chessboard-' + version + '.js', jsSrc, encoding) -fs.writeFileSync('dist/chessboard-' + version + '.min.js', minifiedJSWithBanner, encoding) +fs.writeFileSync('dist/chessboard-' + version + '.css', cssSrc, encoding); +fs.writeFileSync('dist/chessboard-' + version + '.min.css', minifiedCSS, encoding); +fs.writeFileSync('dist/chessboard-' + version + '.js', jsSrc, encoding); +fs.writeFileSync('dist/chessboard-' + version + '.min.js', minifiedJSWithBanner, encoding); -function banner () { - return '/*! chessboard.js v' + version + ' | (c) ' + year + ' Chris Oakman | MIT License chessboardjs.com/license */\n' +function banner() { + return '/*! chessboard.js v' + version + ' | (c) ' + year + ' Chris Oakman | MIT License chessboardjs.com/license */\n'; } diff --git a/scripts/website.js b/scripts/website.js index 1b107fa1..33479821 100755 --- a/scripts/website.js +++ b/scripts/website.js @@ -5,46 +5,46 @@ // ----------------------------------------------------------------------------- // libraries -const fs = require('fs-plus') -const kidif = require('kidif') -const mustache = require('mustache') -const docs = require('../data/docs.json') +const fs = require('fs'); +const kidif = require('kidif'); +const mustache = require('mustache'); +const docs = require('../data/docs.json'); -const encoding = {encoding: 'utf8'} +const encoding = { encoding: 'utf8' }; // toggle development version -const useDevFile = false -const jsCDNLink = '' -const cssCDNLink = 'https://unpkg.com/@chrisoakman/chessboardjs@1.0.0/dist/chessboard-1.0.0.min.css' +const useDevFile = false; +const jsCDNLink = ''; +const cssCDNLink = 'https://unpkg.com/@chrisoakman/chessboardjs@1.0.0/dist/chessboard-1.0.0.min.css'; -let chessboardJsScript = jsCDNLink +let chessboardJsScript = jsCDNLink; if (useDevFile) { - chessboardJsScript = '' + chessboardJsScript = ''; } // grab some mustache templates -const docsTemplate = fs.readFileSync('templates/docs.mustache', encoding) -const downloadTemplate = fs.readFileSync('templates/download.mustache', encoding) -const examplesTemplate = fs.readFileSync('templates/examples.mustache', encoding) -const homepageTemplate = fs.readFileSync('templates/homepage.mustache', encoding) -const singleExampleTemplate = fs.readFileSync('templates/single-example.mustache', encoding) -const licensePageTemplate = fs.readFileSync('templates/license.mustache', encoding) -const headTemplate = fs.readFileSync('templates/_head.mustache', encoding) -const headerTemplate = fs.readFileSync('templates/_header.mustache', encoding) -const footerTemplate = fs.readFileSync('templates/_footer.mustache', encoding) - -const latestChessboardJS = fs.readFileSync('lib/chessboard.js', encoding) -const latestChessboardCSS = fs.readFileSync('lib/chessboard.css', encoding) +const docsTemplate = fs.readFileSync('templates/docs.mustache', encoding); +const downloadTemplate = fs.readFileSync('templates/download.mustache', encoding); +const examplesTemplate = fs.readFileSync('templates/examples.mustache', encoding); +const homepageTemplate = fs.readFileSync('templates/homepage.mustache', encoding); +const singleExampleTemplate = fs.readFileSync('templates/single-example.mustache', encoding); +const licensePageTemplate = fs.readFileSync('templates/license.mustache', encoding); +const headTemplate = fs.readFileSync('templates/_head.mustache', encoding); +const headerTemplate = fs.readFileSync('templates/_header.mustache', encoding); +const footerTemplate = fs.readFileSync('templates/_footer.mustache', encoding); + +const latestChessboardJS = fs.readFileSync('lib/chessboard.js', encoding); +const latestChessboardCSS = fs.readFileSync('lib/chessboard.css', encoding); // grab the examples -const examplesArr = kidif('examples/*.example') -console.assert(examplesArr, 'Could not load the Example files') -console.assert(examplesArr.length > 1, 'Zero examples loaded') +const examplesArr = kidif('examples/*.example'); +console.assert(examplesArr, 'Could not load the Example files'); +console.assert(examplesArr.length > 1, 'Zero examples loaded'); const examplesObj = examplesArr.reduce(function (examplesObj, example, idx) { - examplesObj[example.id] = example - return examplesObj -}, {}) + examplesObj[example.id] = example; + return examplesObj; +}, {}); const examplesGroups = [ { @@ -67,40 +67,40 @@ const examplesGroups = [ name: 'Integration', examples: [5000, 5001, 5002, 5003, 5004, 5005] } -] +]; -const homepageExample1 = '' +const homepageExample1 = ''; const homepageExample2 = ` -var board2 = Chessboard('board2', { +var board2 = new Chessboard('board2', { draggable: true, dropOffBoard: 'trash', sparePieces: true }) -$('#startBtn').on('click', board2.start) -$('#clearBtn').on('click', board2.clear)`.trim() +$('#startBtn').on('click', () => board2.start()) +$('#clearBtn').on('click', () => board2.clear())`.trim(); -function writeSrcFiles () { - fs.writeFileSync('website/js/chessboard.js', latestChessboardJS, encoding) - fs.writeFileSync('website/css/chessboard.css', latestChessboardCSS, encoding) +function writeSrcFiles() { + fs.writeFileSync('website/js/chessboard.js', latestChessboardJS, encoding); + fs.writeFileSync('website/css/chessboard.css', latestChessboardCSS, encoding); } -function writeHomepage () { - const headHTML = mustache.render(headTemplate, {pageTitle: 'Homepage'}) +function writeHomepage() { + const headHTML = mustache.render(headTemplate, { pageTitle: 'Homepage' }); const html = mustache.render(homepageTemplate, { chessboardJsScript: chessboardJsScript, example2: homepageExample2, footer: footerTemplate, head: headHTML - }) - fs.writeFileSync('website/index.html', html, encoding) + }); + fs.writeFileSync('website/index.html', html, encoding); } -function writeExamplesPage () { - const headHTML = mustache.render(headTemplate, {pageTitle: 'Examples'}) - const headerHTML = mustache.render(headerTemplate, {examplesActive: true}) +function writeExamplesPage() { + const headHTML = mustache.render(headTemplate, { pageTitle: 'Examples' }); + const headerHTML = mustache.render(headerTemplate, { examplesActive: true }); const html = mustache.render(examplesTemplate, { chessboardJsScript: chessboardJsScript, @@ -109,45 +109,48 @@ function writeExamplesPage () { head: headHTML, header: headerHTML, nav: buildExamplesNavHTML() - }) - fs.writeFileSync('website/examples.html', html, encoding) + }); + fs.writeFileSync('website/examples.html', html, encoding); } const configTableRowsHTML = docs.config.reduce(function (html, itm) { - if (isString(itm)) return html - return html + buildConfigDocsTableRowHTML('config', itm) -}, '') + if (isString(itm)) return html; + return html + buildConfigDocsTableRowHTML('config', itm); +}, ''); const methodTableRowsHTML = docs.methods.reduce(function (html, itm) { - if (isString(itm)) return html - return html + buildMethodRowHTML(itm) -}, '') + if (isString(itm)) return html; + return html + buildMethodRowHTML(itm); +}, ''); const errorRowsHTML = docs.errors.reduce(function (html, itm) { - if (isString(itm)) return html - return html + buildErrorRowHTML(itm) -}, '') + if (isString(itm)) return html; + return html + buildErrorRowHTML(itm); +}, ''); -function isIntegrationExample (example) { - return (example.id + '').startsWith('5') +function isIntegrationExample(example) { + return (example.id + '').startsWith('5'); } -function writeSingleExamplePage (example) { +function writeSingleExamplePage(example) { if (isIntegrationExample(example)) { - example.includeChessJS = true + example.includeChessJS = true; } - example.chessboardJsScript = chessboardJsScript - const html = mustache.render(singleExampleTemplate, example) - fs.writeFileSync('website/examples/' + example.id + '.html', html, encoding) + example.chessboardJsScript = chessboardJsScript; + const html = mustache.render(singleExampleTemplate, example); + if (!fs.existsSync('website/examples')) { + fs.mkdirSync('website/examples'); + } + fs.writeFileSync('website/examples/' + example.id + '.html', html, encoding); } -function writeSingleExamplesPages () { - examplesArr.forEach(writeSingleExamplePage) +function writeSingleExamplesPages() { + examplesArr.forEach(writeSingleExamplePage); } -function writeDocsPage () { - const headHTML = mustache.render(headTemplate, {pageTitle: 'Documentation'}) - const headerHTML = mustache.render(headerTemplate, {docsActive: true}) +function writeDocsPage() { + const headHTML = mustache.render(headTemplate, { pageTitle: 'Documentation' }); + const headerHTML = mustache.render(headerTemplate, { docsActive: true }); const html = mustache.render(docsTemplate, { configTableRows: configTableRowsHTML, @@ -156,44 +159,44 @@ function writeDocsPage () { head: headHTML, header: headerHTML, methodTableRows: methodTableRowsHTML - }) - fs.writeFileSync('website/docs.html', html, encoding) + }); + fs.writeFileSync('website/docs.html', html, encoding); } -function writeDownloadPage () { - const headHTML = mustache.render(headTemplate, {pageTitle: 'Download'}) - const headerHTML = mustache.render(headerTemplate, {downloadActive: true}) +function writeDownloadPage() { + const headHTML = mustache.render(headTemplate, { pageTitle: 'Download' }); + const headerHTML = mustache.render(headerTemplate, { downloadActive: true }); const html = mustache.render(downloadTemplate, { footer: footerTemplate, head: headHTML, header: headerHTML - }) - fs.writeFileSync('website/download.html', html, encoding) + }); + fs.writeFileSync('website/download.html', html, encoding); } -function writeLicensePage () { - const html = mustache.render(licensePageTemplate) - fs.writeFileSync('website/license.html', html, encoding) +function writeLicensePage() { + const html = mustache.render(licensePageTemplate); + fs.writeFileSync('website/license.html', html, encoding); } -function writeWebsite () { - writeSrcFiles() - writeHomepage() - writeExamplesPage() - writeSingleExamplesPages() - writeDocsPage() - writeDownloadPage() - writeLicensePage() +function writeWebsite() { + writeSrcFiles(); + writeHomepage(); + writeExamplesPage(); + writeSingleExamplesPages(); + writeDocsPage(); + writeDownloadPage(); + writeLicensePage(); } -writeWebsite() +writeWebsite(); // ----------------------------------------------------------------------------- // HTML // ----------------------------------------------------------------------------- -function htmlEscape (str) { +function htmlEscape(str) { return (str + '') .replace(/&/g, '&') .replace(/' + groupName + '' + - ''; - return html + return html; } -function buildExamplesNavHTML () { - let html = '' +function buildExamplesNavHTML() { + let html = ''; examplesGroups.forEach(function (group, idx) { - html += buildExampleGroupHTML(idx, group.name, group.examples) - }) - return html + html += buildExampleGroupHTML(idx, group.name, group.examples); + }); + return html; } -function buildExamplesJS () { - let txt = 'window.CHESSBOARD_EXAMPLES = {}\n\n' +function buildExamplesJS() { + let txt = 'window.CHESSBOARD_EXAMPLES = {}\n\n'; examplesArr.forEach(function (ex) { txt += 'CHESSBOARD_EXAMPLES["' + ex.id + '"] = {\n' + @@ -237,170 +240,170 @@ function buildExamplesJS () { ' name: ' + JSON.stringify(ex.name) + ',\n' + ' jsStr: ' + JSON.stringify(ex.js) + ',\n' + ' jsFn: function () {\n' + ex.js + '\n }\n' + - '};\n\n' - }) + '};\n\n'; + }); - return txt + return txt; } -function buildConfigDocsTableRowHTML (propType, prop) { - let html = '' +function buildConfigDocsTableRowHTML(propType, prop) { + let html = ''; // table row - html += '' + html += ''; // property and type - html += '' + buildPropertyAndTypeHTML(propType, prop.name, prop.type) + '' + html += '' + buildPropertyAndTypeHTML(propType, prop.name, prop.type) + ''; // default - html += '

' + buildDefaultHTML(prop.default) + '

' + html += '

' + buildDefaultHTML(prop.default) + '

'; // description - html += '' + buildDescriptionHTML(prop.desc) + '' + html += '' + buildDescriptionHTML(prop.desc) + ''; // examples - html += '' + buildExamplesCellHTML(prop.examples) + '' + html += '' + buildExamplesCellHTML(prop.examples) + ''; - html += '' + html += ''; - return html + return html; } -function buildMethodRowHTML (method) { - const nameNoParens = method.name.replace(/\(.+$/, '') +function buildMethodRowHTML(method) { + const nameNoParens = method.name.replace(/\(.+$/, ''); - let html = '' + let html = ''; // table row if (method.noId) { - html += '' + html += ''; } else { - html += '' + html += ''; } // name html += '

' + - '' + method.name + '

' + '' + method.name + '

'; // args if (method.args) { - html += '' + html += ''; method.args.forEach(function (arg) { - html += '

' + arg[1] + '

' - }) - html += '' + html += '

' + arg[1] + '

'; + }); + html += ''; } else { - html += 'none' + html += 'none'; } // description - html += '' + buildDescriptionHTML(method.desc) + '' + html += '' + buildDescriptionHTML(method.desc) + ''; // examples - html += '' + buildExamplesCellHTML(method.examples) + '' + html += '' + buildExamplesCellHTML(method.examples) + ''; - html += '' + html += ''; - return html + return html; } -function buildPropertyAndTypeHTML (section, name, type) { +function buildPropertyAndTypeHTML(section, name, type) { let html = '

' + '' + name + '

' + - '

' + buildTypeHTML(type) + '

' - return html + '

' + buildTypeHTML(type) + '

'; + return html; } -function buildTypeHTML (type) { +function buildTypeHTML(type) { if (!Array.isArray(type)) { - type = [type] + type = [type]; } - let html = '' + let html = ''; for (var i = 0; i < type.length; i++) { if (i !== 0) { - html += ' or
' + html += ' or
'; } - html += type[i] + html += type[i]; } - return html + return html; } -function buildRequiredHTML (req) { - if (!req) return 'no' - if (req === true) return 'yes' - return req +function buildRequiredHTML(req) { + if (!req) return 'no'; + if (req === true) return 'yes'; + return req; } -function buildDescriptionHTML (desc) { +function buildDescriptionHTML(desc) { if (!Array.isArray(desc)) { - desc = [desc] + desc = [desc]; } - let html = '' + let html = ''; desc.forEach(function (d) { - html += '

' + d + '

' - }) + html += '

' + d + '

'; + }); - return html + return html; } -function buildDefaultHTML (defaultValue) { +function buildDefaultHTML(defaultValue) { if (!defaultValue) { - return 'n/a' + return 'n/a'; } - return defaultValue + return defaultValue; } -function buildExamplesCellHTML (examplesIds) { +function buildExamplesCellHTML(examplesIds) { if (!Array.isArray(examplesIds)) { - examplesIds = [examplesIds] + examplesIds = [examplesIds]; } - let html = '' + let html = ''; examplesIds.forEach(function (exampleId) { - var example = examplesObj[exampleId] - if (!example) return - html += '

' + example.name + '

' - }) + var example = examplesObj[exampleId]; + if (!example) return; + html += '

' + example.name + '

'; + }); - return html + return html; } -function buildErrorRowHTML (error) { - let html = '' +function buildErrorRowHTML(error) { + let html = ''; // table row - html += '' + html += ''; // id html += '' + - '

' + error.id + '

' + '

' + error.id + '

'; // desc - html += '

' + error.desc + '

' + html += '

' + error.desc + '

'; // more information if (error.fix) { if (!Array.isArray(error.fix)) { - error.fix = [error.fix] + error.fix = [error.fix]; } - html += '' + html += ''; error.fix.forEach(function (p) { - html += '

' + p + '

' - }) - html += '' + html += '

' + p + '

'; + }); + html += ''; } else { - html += 'n/a' + html += 'n/a'; } - html += '' + html += ''; - return html + return html; } -function isString (s) { - return typeof s === 'string' +function isString(s) { + return typeof s === 'string'; } diff --git a/templates/homepage.mustache b/templates/homepage.mustache index 0ff8ee63..85b3b764 100644 --- a/templates/homepage.mustache +++ b/templates/homepage.mustache @@ -29,7 +29,7 @@

HTML

<div id="board1" style="width: 400px"></div>

JavaScript

-
var board1 = Chessboard('board1', 'start')
+
var board1 = new Chessboard('board1', 'start')
@@ -72,7 +72,7 @@ prettyPrint() // example 1 - var board1 = Chessboard('board1', 'start') + var board1 = new Chessboard('board1', 'start') // example 2 {{{example2}}} diff --git a/website/js/examples.js b/website/js/examples.js index f212279c..4b000d50 100644 --- a/website/js/examples.js +++ b/website/js/examples.js @@ -1,7 +1,7 @@ -;(function () { - var $ = window.jQuery - var EXAMPLES = window.CHESSBOARD_EXAMPLES - var prettyPrint = window.prettyPrint +; (function () { + const $ = window.jQuery + const EXAMPLES = window.CHESSBOARD_EXAMPLES + const prettyPrint = window.prettyPrint function htmlEscape (str) { return (str + '') @@ -25,9 +25,9 @@ } function buildExampleBodyHTML (example, id) { - var html = '

' + - '' + - htmlEscape(example.name) + + const html = '

' + + '' + + htmlEscape(example.name) + '

' + '

' + example.description + '

' + '
' + example.html + '
' + @@ -41,7 +41,7 @@ } function showExample (exampleId) { - var groupIdx = $('#exampleLink-' + exampleId).parent('ul').attr('id').replace('groupContainer-', '') + const groupIdx = $('#exampleLink-' + exampleId).parent('ul').attr('id').replace('groupContainer-', '') $('#groupContainer-' + groupIdx).css('display', '') highlightGroupHeader(groupIdx) @@ -54,16 +54,16 @@ } function clickExampleNavLink () { - var exampleId = $(this).attr('id').replace('exampleLink-', '') - if (!EXAMPLES.hasOwnProperty(exampleId)) return + const exampleId = $(this).attr('id').replace('exampleLink-', '') + if (!Object.prototype.hasOwnProperty.call(EXAMPLES, exampleId)) return window.location.hash = exampleId loadExampleFromHash() } function loadExampleFromHash () { - var exampleId = parseInt(window.location.hash.replace('#', ''), 10) - if (!EXAMPLES.hasOwnProperty(exampleId)) { + let exampleId = parseInt(window.location.hash.replace('#', ''), 10) + if (!Object.prototype.hasOwnProperty.call(EXAMPLES, exampleId)) { exampleId = 1000 window.location.hash = exampleId } @@ -71,8 +71,8 @@ } function clickGroupHeader () { - var groupIdx = $(this).attr('id').replace('groupHeader-', '') - var $examplesList = $('#groupContainer-' + groupIdx) + const groupIdx = $(this).attr('id').replace('groupHeader-', '') + const $examplesList = $('#groupContainer-' + groupIdx) if ($examplesList.css('display') === 'none') { $examplesList.slideDown('fast') } else { diff --git a/yarn.lock b/yarn.lock index 0705201e..93148500 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,168 +2,226 @@ # yarn lockfile v1 -acorn-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" - dependencies: - acorn "^3.0.4" +"@eslint/eslintrc@^1.3.2": + version "1.3.2" + resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz" + integrity sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.4.0" + globals "^13.15.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@humanwhocodes/config-array@^0.10.5": + version "0.10.5" + resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.5.tgz" + integrity sha512-XVVDtp+dVvRxMoxSiSfasYaG02VEe1qH5cKgMQJWhol6HwzbcqoCMJi8dAGoYAO57jhUyhI6cWuRiTcRaDaYug== + dependencies: + "@humanwhocodes/object-schema" "^1.2.1" + debug "^4.1.1" + minimatch "^3.0.4" -acorn@^3.0.4: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" +"@humanwhocodes/gitignore-to-minimatch@^1.0.2": + version "1.0.2" + resolved "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz" + integrity sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA== -acorn@^5.0.1: - version "5.0.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -ajv-keywords@^1.0.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" +"@humanwhocodes/object-schema@^1.2.1": + version "1.2.1" + resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== -ajv@^4.7.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== dependencies: - co "^4.6.0" - json-stable-stringify "^1.0.1" - -ansi-escapes@^1.1.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - -argparse@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" - dependencies: - sprintf-js "~1.0.2" +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + +"@types/node@18.7.23": + version "18.7.23" + resolved "https://registry.npmjs.org/@types/node/-/node-18.7.23.tgz" + integrity sha512-DWNcCHolDq0ZKGizjx2DZjR/PqsYwAcYUJmfMWqtVU2MBMG5Mo+xFZrhGId5r/O5HOuMPyQEcM6KUBp5lBZZBg== + +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn@^8.8.0: + version "8.8.0" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz" + integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== + +ajv@^6.10.0, ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== -array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" +ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: - array-uniq "^1.0.1" + color-convert "^2.0.1" -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -array.prototype.find@^2.0.1: - version "2.0.4" - resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.0.4.tgz#556a5c5362c08648323ddaeb9de9d14bc1864c90" +array-includes@^3.1.4, array-includes@^3.1.5: + version "3.1.5" + resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz" + integrity sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ== dependencies: - define-properties "^1.1.2" - es-abstract "^1.7.0" + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + get-intrinsic "^1.1.1" + is-string "^1.0.7" -arrify@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -async@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= +array.prototype.flat@^1.2.5: + version "1.3.0" + resolved "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz" + integrity sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.2" + es-shim-unscopables "^1.0.0" -babel-code-frame@^6.16.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" +array.prototype.flatmap@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.0.tgz" + integrity sha512-PZC9/8TKAIxcWKdyeb77EzULHPrIX/tIZebLJUQOMR1OwYosT8yggdfWScfTBCDj5utONvOuPQQumYsU2ULbkg== dependencies: - chalk "^1.1.0" - esutils "^2.0.2" - js-tokens "^3.0.0" + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.2" + es-shim-unscopables "^1.0.0" balanced-match@^0.4.1: version "0.4.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + integrity sha512-STw03mQKnGUYtoNjmowo4F2cRmIIxYEGiMsjjwla/u5P1lxadj/05WkNaFjNiKTgJkj8KiXbgAiRTmcQRwQNtg== brace-expansion@^1.1.7: version "1.1.7" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz" + integrity sha512-ebXXDR1wKKxJNfTM872trAU5hpKduCkTN37ipoxsh5yibWq8FfxiobiHuVlPFkspSSNhrxbPHbM4kGyDGdJ5mg== dependencies: balanced-match "^0.4.1" concat-map "0.0.1" -builtin-modules@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - -caller-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" +braces@^3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: - callsites "^0.2.0" - -callsites@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + fill-range "^7.0.1" -chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" +builtins@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz" + integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ== dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" + semver "^7.0.0" -circular-json@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" - -cli-cursor@^1.0.1: +call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" + resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== dependencies: - restore-cursor "^1.0.1" + function-bind "^1.1.1" + get-intrinsic "^1.0.2" -cli-width@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" -commander@~2.20.0: - version "2.20.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" - integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== concat-map@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -concat-stream@^1.5.2: - version "1.6.0" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" +cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== dependencies: - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -contains-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" - -core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" css-tree@1.0.0-alpha.29: version "1.0.0-alpha.29" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.29.tgz#3fa9d4ef3142cbd1c301e7664c1f352bd82f5a39" + resolved "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.29.tgz" integrity sha512-sRNb1XydwkW9IOci6iB2xmy8IGCj6r/fr+JWitvJ2JxQRPzN3T4AGGVWCMlVmVwM1gtgALJRmGIlWv5ppnGGkg== dependencies: mdn-data "~1.1.0" @@ -171,403 +229,470 @@ css-tree@1.0.0-alpha.29: csso@3.5.1: version "3.5.1" - resolved "https://registry.yarnpkg.com/csso/-/csso-3.5.1.tgz#7b9eb8be61628973c1b261e169d2f024008e758b" + resolved "https://registry.npmjs.org/csso/-/csso-3.5.1.tgz" integrity sha512-vrqULLffYU1Q2tLdJvaCYbONStnfkfimRxXNaGjxMldI0C7JPBC4rB1RyjhfdZ4m1frm8pM9uRPKH3d2knZ8gg== dependencies: css-tree "1.0.0-alpha.29" -d@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" +debug@^2.6.9: + version "2.6.9" + resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: - es5-ext "^0.10.9" + ms "2.0.0" -debug-log@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" +debug@^3.2.7: + version "3.2.7" + resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" -debug@2.2.0, debug@^2.1.1, debug@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" +debug@^4.1.1, debug@^4.3.2: + version "4.3.4" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: - ms "0.7.1" + ms "2.1.2" -deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -define-properties@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" +define-properties@^1.1.3, define-properties@^1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz" + integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== dependencies: - foreach "^2.0.5" - object-keys "^1.0.8" + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" -deglob@^2.1.0: +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +doctrine@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/deglob/-/deglob-2.1.0.tgz#4d44abe16ef32c779b4972bd141a80325029a14a" - dependencies: - find-root "^1.0.0" - glob "^7.0.5" - ignore "^3.0.9" - pkg-config "^1.1.0" - run-parallel "^1.1.2" - uniq "^1.0.1" - -del@^2.0.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" - dependencies: - globby "^5.0.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - rimraf "^2.2.8" - -doctrine@1.5.0, doctrine@^1.2.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + resolved "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== dependencies: esutils "^2.0.2" - isarray "^1.0.0" -doctrine@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== dependencies: esutils "^2.0.2" - isarray "^1.0.0" -error-ex@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== dependencies: is-arrayish "^0.2.1" -es-abstract@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.7.0.tgz#dfade774e01bfcd97f96180298c449c8623fb94c" +es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5: + version "1.20.3" + resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.3.tgz" + integrity sha512-AyrnaKVpMzljIdwjzrj+LxGmj8ik2LckwXacHqrJJ/jxz6dDDBcZ7I7nlHM0FvEW8MfbWJwOd+yT2XzYW49Frw== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + function.prototype.name "^1.1.5" + get-intrinsic "^1.1.3" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-symbols "^1.0.3" + internal-slot "^1.0.3" + is-callable "^1.2.6" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-weakref "^1.0.2" + object-inspect "^1.12.2" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.4.3" + safe-regex-test "^1.0.0" + string.prototype.trimend "^1.0.5" + string.prototype.trimstart "^1.0.5" + unbox-primitive "^1.0.2" + +es-shim-unscopables@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz" + integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== dependencies: - es-to-primitive "^1.1.1" - function-bind "^1.1.0" - is-callable "^1.1.3" - is-regex "^1.0.3" + has "^1.0.3" -es-to-primitive@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== dependencies: - is-callable "^1.1.1" + is-callable "^1.1.4" is-date-object "^1.0.1" - is-symbol "^1.0.1" - -es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: - version "0.10.22" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.22.tgz#1876c51f990769c112c781ea3ebe89f84fd39071" - dependencies: - es6-iterator "2" - es6-symbol "~3.1" + is-symbol "^1.0.2" -es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" - dependencies: - d "1" - es5-ext "^0.10.14" - es6-symbol "^3.1" - -es6-map@^0.1.3: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-set "~0.1.5" - es6-symbol "~3.1.1" - event-emitter "~0.3.5" - -es6-set@~0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-symbol "3.1.1" - event-emitter "~0.3.5" - -es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" - dependencies: - d "1" - es5-ext "~0.10.14" - -es6-weak-map@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" - dependencies: - d "1" - es5-ext "^0.10.14" - es6-iterator "^2.0.1" - es6-symbol "^3.1.1" +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -escape-string-regexp@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz#4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1" +eslint-config-standard-jsx@^11.0.0: + version "11.0.0" + resolved "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-11.0.0.tgz" + integrity sha512-+1EV/R0JxEK1L0NGolAr8Iktm3Rgotx3BKwgaX+eAuSX8D952LULKtjgZD3F+e6SvibONnhLwoTi9DPxN5LvvQ== -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" +eslint-config-standard@17.0.0: + version "17.0.0" + resolved "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz" + integrity sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg== -escope@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" +eslint-import-resolver-node@^0.3.6: + version "0.3.6" + resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz" + integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== dependencies: - es6-map "^0.1.3" - es6-weak-map "^2.0.1" - esrecurse "^4.1.0" - estraverse "^4.1.1" + debug "^3.2.7" + resolve "^1.20.0" -eslint-config-standard-jsx@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/eslint-config-standard-jsx/-/eslint-config-standard-jsx-4.0.1.tgz#cd4e463d0268e2d9e707f61f42f73f5b3333c642" - -eslint-config-standard@10.2.1: - version "10.2.1" - resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-10.2.1.tgz#c061e4d066f379dc17cd562c64e819b4dd454591" +eslint-module-utils@^2.7.3: + version "2.7.4" + resolved "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz" + integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== + dependencies: + debug "^3.2.7" -eslint-import-resolver-node@^0.2.0: - version "0.2.3" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz#5add8106e8c928db2cba232bcd9efa846e3da16c" +eslint-plugin-es@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz" + integrity sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ== + dependencies: + eslint-utils "^2.0.0" + regexpp "^3.0.0" + +eslint-plugin-import@^2.26.0: + version "2.26.0" + resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz" + integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== + dependencies: + array-includes "^3.1.4" + array.prototype.flat "^1.2.5" + debug "^2.6.9" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.6" + eslint-module-utils "^2.7.3" + has "^1.0.3" + is-core-module "^2.8.1" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.values "^1.1.5" + resolve "^1.22.0" + tsconfig-paths "^3.14.1" + +eslint-plugin-n@^15.1.0: + version "15.3.0" + resolved "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.3.0.tgz" + integrity sha512-IyzPnEWHypCWasDpxeJnim60jhlumbmq0pubL6IOcnk8u2y53s5QfT8JnXy7skjHJ44yWHRb11PLtDHuu1kg/Q== + dependencies: + builtins "^5.0.1" + eslint-plugin-es "^4.1.0" + eslint-utils "^3.0.0" + ignore "^5.1.1" + is-core-module "^2.10.0" + minimatch "^3.1.2" + resolve "^1.22.1" + semver "^7.3.7" + +eslint-plugin-promise@^6.0.0: + version "6.0.1" + resolved "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.1.tgz" + integrity sha512-uM4Tgo5u3UWQiroOyDEsYcVMOo7re3zmno0IZmB5auxoaQNIceAbXEkSt8RNrKtaYehARHG06pYK6K1JhtP0Zw== + +eslint-plugin-react@^7.28.0: + version "7.31.8" + resolved "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.31.8.tgz" + integrity sha512-5lBTZmgQmARLLSYiwI71tiGVTLUuqXantZM6vlSY39OaDSV0M7+32K5DnLkmFrwTe+Ksz0ffuLUC91RUviVZfw== + dependencies: + array-includes "^3.1.5" + array.prototype.flatmap "^1.3.0" + doctrine "^2.1.0" + estraverse "^5.3.0" + jsx-ast-utils "^2.4.1 || ^3.0.0" + minimatch "^3.1.2" + object.entries "^1.1.5" + object.fromentries "^2.0.5" + object.hasown "^1.1.1" + object.values "^1.1.5" + prop-types "^15.8.1" + resolve "^2.0.0-next.3" + semver "^6.3.0" + string.prototype.matchall "^4.0.7" + +eslint-scope@^7.1.1: + version "7.1.1" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz" + integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-utils@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== dependencies: - debug "^2.2.0" - object-assign "^4.0.1" - resolve "^1.1.6" + eslint-visitor-keys "^1.1.0" -eslint-module-utils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.0.0.tgz#a6f8c21d901358759cdc35dbac1982ae1ee58bce" +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== dependencies: - debug "2.2.0" - pkg-dir "^1.0.0" + eslint-visitor-keys "^2.0.0" -eslint-plugin-import@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.2.0.tgz#72ba306fad305d67c4816348a4699a4229ac8b4e" - dependencies: - builtin-modules "^1.1.1" - contains-path "^0.1.0" - debug "^2.2.0" - doctrine "1.5.0" - eslint-import-resolver-node "^0.2.0" - eslint-module-utils "^2.0.0" - has "^1.0.1" - lodash.cond "^4.3.0" - minimatch "^3.0.3" - pkg-up "^1.0.0" - -eslint-plugin-node@~4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-4.2.2.tgz#82959ca9aed79fcbd28bb1b188d05cac04fb3363" - dependencies: - ignore "^3.0.11" - minimatch "^3.0.2" - object-assign "^4.0.1" - resolve "^1.1.7" - semver "5.3.0" - -eslint-plugin-promise@~3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.5.0.tgz#78fbb6ffe047201627569e85a6c5373af2a68fca" +eslint-visitor-keys@^1.1.0: + version "1.3.0" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== -eslint-plugin-react@~6.10.0: - version "6.10.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.10.3.tgz#c5435beb06774e12c7db2f6abaddcbf900cd3f78" - dependencies: - array.prototype.find "^2.0.1" - doctrine "^1.2.2" - has "^1.0.1" - jsx-ast-utils "^1.3.4" - object.assign "^4.0.4" +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint-plugin-standard@~3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-3.0.1.tgz#34d0c915b45edc6f010393c7eef3823b08565cf2" - -eslint@~3.19.0: - version "3.19.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" - dependencies: - babel-code-frame "^6.16.0" - chalk "^1.1.3" - concat-stream "^1.5.2" - debug "^2.1.1" - doctrine "^2.0.0" - escope "^3.6.0" - espree "^3.4.0" - esquery "^1.0.0" - estraverse "^4.2.0" +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + +eslint@^8.13.0: + version "8.24.0" + resolved "https://registry.npmjs.org/eslint/-/eslint-8.24.0.tgz" + integrity sha512-dWFaPhGhTAiPcCgm3f6LI2MBWbogMnTJzFBbhXVRQDJPkr9pGZvVjlVfXd+vyDcWPA2Ic9L2AXPIQM0+vk/cSQ== + dependencies: + "@eslint/eslintrc" "^1.3.2" + "@humanwhocodes/config-array" "^0.10.5" + "@humanwhocodes/gitignore-to-minimatch" "^1.0.2" + "@humanwhocodes/module-importer" "^1.0.1" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.1.1" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.3.0" + espree "^9.4.0" + esquery "^1.4.0" esutils "^2.0.2" - file-entry-cache "^2.0.0" - glob "^7.0.3" - globals "^9.14.0" - ignore "^3.2.0" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + find-up "^5.0.0" + glob-parent "^6.0.1" + globals "^13.15.0" + globby "^11.1.0" + grapheme-splitter "^1.0.4" + ignore "^5.2.0" + import-fresh "^3.0.0" imurmurhash "^0.1.4" - inquirer "^0.12.0" - is-my-json-valid "^2.10.0" - is-resolvable "^1.0.0" - js-yaml "^3.5.1" - json-stable-stringify "^1.0.0" - levn "^0.3.0" - lodash "^4.0.0" - mkdirp "^0.5.0" + is-glob "^4.0.0" + js-sdsl "^4.1.4" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" natural-compare "^1.4.0" - optionator "^0.8.2" - path-is-inside "^1.0.1" - pluralize "^1.2.1" - progress "^1.1.8" - require-uncached "^1.0.2" - shelljs "^0.7.5" - strip-bom "^3.0.0" - strip-json-comments "~2.0.1" - table "^3.7.8" - text-table "~0.2.0" - user-home "^2.0.0" - -espree@^3.4.0: - version "3.4.3" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.3.tgz#2910b5ccd49ce893c2ffffaab4fd8b3a31b82374" - dependencies: - acorn "^5.0.1" - acorn-jsx "^3.0.0" - -esprima@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" - -esquery@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" + optionator "^0.9.1" + regexpp "^3.2.0" + strip-ansi "^6.0.1" + strip-json-comments "^3.1.0" + text-table "^0.2.0" + +espree@^9.4.0: + version "9.4.0" + resolved "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz" + integrity sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw== + dependencies: + acorn "^8.8.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.3.0" + +esquery@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== dependencies: - estraverse "^4.0.0" + estraverse "^5.1.0" -esrecurse@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== dependencies: - estraverse "~4.1.0" - object-assign "^4.0.1" - -estraverse@^4.0.0, estraverse@^4.1.1, estraverse@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + estraverse "^5.2.0" -estraverse@~4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" +estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: + version "5.3.0" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== esutils@^2.0.2: version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz" + integrity sha512-UUPPULqkyAV+M3Shodis7l8D+IyX6V8SbaBnTb449jf3fMTd8+UOZI1Q70NbZVOQkcR91yYgdHsJiMMMVmYshg== + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -event-emitter@~0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" +fast-glob@^3.2.9: + version "3.2.12" + resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz" + integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== dependencies: - d "1" - es5-ext "~0.10.14" + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" -exit-hook@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@~2.0.4: +fast-levenshtein@^2.0.6: version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== -figures@^1.3.5: - version "1.7.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" +fastq@^1.6.0: + version "1.13.0" + resolved "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz" + integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== dependencies: - escape-string-regexp "^1.0.5" - object-assign "^4.1.0" + reusify "^1.0.4" -file-entry-cache@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== dependencies: - flat-cache "^1.2.1" - object-assign "^4.0.1" - -find-root@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.0.0.tgz#962ff211aab25c6520feeeb8d6287f8f6e95807a" + flat-cache "^3.0.4" -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" + to-regex-range "^5.0.1" -find-up@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== dependencies: - locate-path "^2.0.0" + locate-path "^3.0.0" -flat-cache@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== dependencies: - circular-json "^0.3.1" - del "^2.0.2" - graceful-fs "^4.1.2" - write "^0.2.1" + locate-path "^6.0.0" + path-exists "^4.0.0" -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - -fs-plus@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/fs-plus/-/fs-plus-3.1.1.tgz#02c085ba0a013084cff2f3e89b17c60c1d9b4ab5" - integrity sha512-Se2PJdOWXqos1qVTkvqqjb0CSnfBnwwD+pq+z4ksT+e97mEShod/hrNg0TRCCsXPbJzcIq+NuzQhigunMWMJUA== +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== dependencies: - async "^1.5.2" - mkdirp "^0.5.1" - rimraf "^2.5.2" - underscore-plus "1.x" + flatted "^3.1.0" + rimraf "^3.0.2" + +flatted@^3.1.0: + version "3.2.7" + resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz" + integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== fs.realpath@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -function-bind@^1.0.2, function-bind@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -generate-function@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" +function.prototype.name@^1.1.5: + version "1.1.5" + resolved "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz" + integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + functions-have-names "^1.2.2" -generate-object-property@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" +functions-have-names@^1.2.2: + version "1.2.3" + resolved "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz" + integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A== dependencies: - is-property "^1.0.0" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.3" -get-stdin@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" +get-stdin@^8.0.0: + version "8.0.0" + resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz" + integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== + +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-parent@^6.0.1: + version "6.0.2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" glob@7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.0.tgz#3b20a357fffcf46bb384aed6f8ae9a647fdb6ac4" + resolved "https://registry.npmjs.org/glob/-/glob-7.0.0.tgz" + integrity sha512-Fa+aQV0FFMU4/Jg5mquHjv5DikTujeAWOpbGa9lsG2Qa+ehYxbGN3cCY/T+C+jAS8gKBnYN2MbrdNm0UCAcp7w== dependencies: inflight "^1.0.4" inherits "2" @@ -575,20 +700,9 @@ glob@7.0.0: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@^7.1.3: version "7.1.4" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" + resolved "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz" integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== dependencies: fs.realpath "^1.0.0" @@ -598,660 +712,877 @@ glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^9.14.0: - version "9.17.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.17.0.tgz#0c0ca696d9b9bb694d2e5470bd37777caad50286" +globals@^13.15.0: + version "13.17.0" + resolved "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz" + integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== + dependencies: + type-fest "^0.20.2" -globby@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== dependencies: - array-union "^1.0.1" - arrify "^1.0.0" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" -graceful-fs@^4.1.2: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" +graceful-fs@^4.1.15: + version "4.2.10" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" +grapheme-splitter@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz" + integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== + +has-bigints@^1.0.1, has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz" + integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== dependencies: - ansi-regex "^2.0.0" + get-intrinsic "^1.1.1" -has@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" +has-symbols@^1.0.2, has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== dependencies: - function-bind "^1.0.2" + has-symbols "^1.0.2" -ignore@^3.0.11, ignore@^3.0.9, ignore@^3.2.0: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" +has@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +ignore@^5.1.1, ignore@^5.2.0: + version "5.2.0" + resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + +import-fresh@^3.0.0, import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" imurmurhash@^0.1.4: version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== inflight@^1.0.4: version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" wrappy "1" inherits@2: version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - -inherits@^2.0.3, inherits@~2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - -inquirer@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" - dependencies: - ansi-escapes "^1.1.0" - ansi-regex "^2.0.0" - chalk "^1.0.0" - cli-cursor "^1.0.1" - cli-width "^2.0.0" - figures "^1.3.5" - lodash "^4.3.0" - readline2 "^1.0.1" - run-async "^0.1.0" - rx-lite "^3.1.2" - string-width "^1.0.1" - strip-ansi "^3.0.0" - through "^2.3.6" - -interpret@^1.0.0: + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + integrity sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA== + +internal-slot@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" + resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz" + integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== + dependencies: + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" is-arrayish@^0.2.1: version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== -is-callable@^1.1.1, is-callable@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-callable@^1.1.4, is-callable@^1.2.6: + version "1.2.7" + resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== + +is-core-module@^2.10.0, is-core-module@^2.8.1, is-core-module@^2.9.0: + version "2.10.0" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz" + integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== + dependencies: + has "^1.0.3" is-date-object@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + resolved "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz" + integrity sha512-P5rExV1phPi42ppoMWy7V63N3i173RY921l4JJ7zonMSxK+OWGPj76GD+cUKUb68l4vQXcJp2SsG+r/A4ABVzg== -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: - number-is-nan "^1.0.0" + is-extglob "^2.1.1" -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" +is-negative-zero@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== -is-my-json-valid@^2.10.0: - version "2.16.0" - resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" +is-number-object@^1.0.4: + version "1.0.7" + resolved "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz" + integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== dependencies: - generate-function "^2.0.0" - generate-object-property "^1.1.0" - jsonpointer "^4.0.0" - xtend "^4.0.0" + has-tostringtag "^1.0.0" -is-path-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-path-in-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== dependencies: - is-path-inside "^1.0.0" + call-bind "^1.0.2" + has-tostringtag "^1.0.0" -is-path-inside@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" +is-shared-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz" + integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== dependencies: - path-is-inside "^1.0.1" + call-bind "^1.0.2" -is-property@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" -is-regex@^1.0.3: +is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + resolved "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== dependencies: - has "^1.0.1" + has-symbols "^1.0.2" -is-resolvable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== dependencies: - tryit "^1.0.1" + call-bind "^1.0.2" -is-symbol@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" - -isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== jquery@>=3.4.1: version "3.5.0" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.5.0.tgz#9980b97d9e4194611c36530e7dc46a58d7340fc9" + resolved "https://registry.npmjs.org/jquery/-/jquery-3.5.0.tgz" integrity sha512-Xb7SVYMvygPxbFMpTFQiHh1J7HClEaThguL15N/Gg37Lri/qKyhRGZYzHRyLH8Stq3Aow0LsHO2O2ci86fCrNQ== -js-tokens@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" +js-sdsl@^4.1.4: + version "4.1.4" + resolved "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.4.tgz" + integrity sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw== -js-yaml@^3.5.1: - version "3.8.4" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6" - dependencies: - argparse "^1.0.7" - esprima "^3.1.1" +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: - jsonify "~0.0.0" + argparse "^2.0.1" -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== -jsonpointer@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== -jsx-ast-utils@^1.3.4: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz#3867213e8dd79bf1e8f2300c0cfc1efb182c0df1" +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + +"jsx-ast-utils@^2.4.1 || ^3.0.0": + version "3.3.3" + resolved "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz" + integrity sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw== + dependencies: + array-includes "^3.1.5" + object.assign "^4.1.3" kidif@1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/kidif/-/kidif-1.1.0.tgz#3c5d4ef82a8c7cb9f0365de2ef1a01b21b980587" + resolved "https://registry.npmjs.org/kidif/-/kidif-1.1.0.tgz" + integrity sha512-QmAHSkWEYssexdqWQshtfEd/AGeJAXHuV1pu607ePgNwwSf2X6fuIzUJsLtKbUQ/ak0pokdwDr8ocZ9sygKhTg== dependencies: glob "7.0.0" -levn@^0.3.0, levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" + prelude-ls "^1.2.1" + type-check "~0.4.0" -load-json-file@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" +load-json-file@^5.2.0: + version "5.3.0" + resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz" + integrity sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw== dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" + graceful-fs "^4.1.15" + parse-json "^4.0.0" + pify "^4.0.1" strip-bom "^3.0.0" + type-fest "^0.3.0" -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== dependencies: - p-locate "^2.0.0" + p-locate "^3.0.0" path-exists "^3.0.0" -lodash.cond@^4.3.0: - version "4.5.2" - resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" -lodash@^4.0.0, lodash@^4.3.0: - version "4.17.19" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" - integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" mdn-data@~1.1.0: version "1.1.4" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-1.1.4.tgz#50b5d4ffc4575276573c4eedb8780812a8419f01" + resolved "https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz" integrity sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA== -"minimatch@2 || 3", minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== dependencies: - brace-expansion "^1.1.7" + braces "^3.0.2" + picomatch "^2.3.1" -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" +"minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" -minimist@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" +minimist@^1.2.0, minimist@^1.2.6: + version "1.2.6" + resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== -mkdirp@^0.5.0, mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" +ms@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== -ms@0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" +ms@2.1.2, ms@^2.1.1: + version "2.1.2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== mustache@2.3.0: version "2.3.0" - resolved "https://registry.yarnpkg.com/mustache/-/mustache-2.3.0.tgz#4028f7778b17708a489930a6e52ac3bca0da41d0" - -mute-stream@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" + resolved "https://registry.npmjs.org/mustache/-/mustache-2.3.0.tgz" + integrity sha512-IgZ/cCHtDG1ft0vdDV9wrlNz20SvbUu2ECoDF6dhk2ZtedLNy1Kehy4oFlzmHPxcUQmVZuXYS2j+d0NkaEjTXQ== natural-compare@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -object-assign@^4.0.1, object-assign@^4.1.0: +object-assign@^4.1.1: version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== -object-keys@^1.0.10, object-keys@^1.0.8: - version "1.0.11" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" +object-inspect@^1.12.2, object-inspect@^1.9.0: + version "1.12.2" + resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz" + integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== + +object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.0.4.tgz#b1c9cc044ef1b9fe63606fc141abbb32e14730cc" +object.assign@^4.1.3, object.assign@^4.1.4: + version "4.1.4" + resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz" + integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== dependencies: - define-properties "^1.1.2" - function-bind "^1.1.0" - object-keys "^1.0.10" + call-bind "^1.0.2" + define-properties "^1.1.4" + has-symbols "^1.0.3" + object-keys "^1.1.1" -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" +object.entries@^1.1.5: + version "1.1.5" + resolved "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz" + integrity sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g== dependencies: - wrappy "1" + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" -onetime@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" +object.fromentries@^2.0.5: + version "2.0.5" + resolved "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz" + integrity sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" -optionator@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" +object.hasown@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.1.tgz" + integrity sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A== dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.4" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - wordwrap "~1.0.0" + define-properties "^1.1.4" + es-abstract "^1.19.5" -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" +object.values@^1.1.5: + version "1.1.5" + resolved "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz" + integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" -p-limit@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" +once@^1.3.0: + version "1.4.0" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== dependencies: - p-limit "^1.1.0" + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" +p-limit@^2.0.0: + version "2.3.0" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: - error-ex "^1.2.0" + p-try "^2.0.0" -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: - pinkie-promise "^2.0.0" + yocto-queue "^0.1.0" -path-exists@^3.0.0: +p-locate@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - -path-is-inside@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - -path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" - -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== dependencies: - pinkie "^2.0.0" + p-limit "^3.0.2" -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -pkg-conf@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-conf/-/pkg-conf-2.0.0.tgz#071c87650403bccfb9c627f58751bfe47c067279" +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== dependencies: - find-up "^2.0.0" - load-json-file "^2.0.0" + callsites "^3.0.0" -pkg-config@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/pkg-config/-/pkg-config-1.1.1.tgz#557ef22d73da3c8837107766c52eadabde298fe4" +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz" + integrity sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw== dependencies: - debug-log "^1.0.0" - find-root "^1.0.0" - xtend "^4.0.1" + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" -pkg-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" - dependencies: - find-up "^1.0.0" +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz" + integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== -pkg-up@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-1.0.0.tgz#3e08fb461525c4421624a33b9f7e6d0af5b05a26" - dependencies: - find-up "^1.0.0" +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== -pluralize@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -process-nextick-args@~1.0.6: +path-parse@^1.0.7: version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" - -progress@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" + resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -readable-stream@^2.2.2: - version "2.2.10" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.10.tgz#effe72bb7c884c0dd335e2379d526196d9d011ee" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - safe-buffer "^5.0.1" - string_decoder "~1.0.0" - util-deprecate "~1.0.1" +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -readline2@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - mute-stream "0.0.5" +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - dependencies: - resolve "^1.1.6" +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== -require-uncached@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" +pkg-conf@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz" + integrity sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ== dependencies: - caller-path "^0.1.0" - resolve-from "^1.0.0" + find-up "^3.0.0" + load-json-file "^5.2.0" -resolve-from@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -resolve@^1.1.6, resolve@^1.1.7: - version "1.3.3" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" +prop-types@^15.8.1: + version "15.8.1" + resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz" + integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== dependencies: - path-parse "^1.0.5" + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.13.1" -restore-cursor@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" - dependencies: - exit-hook "^1.0.0" - onetime "^1.0.0" +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +react-is@^16.13.1: + version "16.13.1" + resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + +regexp.prototype.flags@^1.4.1, regexp.prototype.flags@^1.4.3: + version "1.4.3" + resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz" + integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + functions-have-names "^1.2.2" + +regexpp@^3.0.0, regexpp@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1: + version "1.22.1" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz" + integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== + dependencies: + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +resolve@^2.0.0-next.3: + version "2.0.0-next.4" + resolved "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz" + integrity sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ== + dependencies: + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^2.2.8: - version "2.6.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: - glob "^7.0.5" + glob "^7.1.3" -rimraf@^2.5.2: - version "2.6.3" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" - integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== dependencies: - glob "^7.1.3" + queue-microtask "^1.2.2" -run-async@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" +safe-regex-test@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz" + integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== dependencies: - once "^1.3.0" + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + is-regex "^1.1.4" -run-parallel@^1.1.2: - version "1.1.6" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.6.tgz#29003c9a2163e01e2d2dfc90575f2c6c1d61a039" +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -rx-lite@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" +semver@^7.0.0, semver@^7.3.7: + version "7.3.7" + resolved "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== + dependencies: + lru-cache "^6.0.0" -safe-buffer@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.0.tgz#fe4c8460397f9eaaaa58e73be46273408a45e223" +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" -semver@5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shelljs@^0.7.5: - version "0.7.7" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1" +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" -slice-ansi@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== source-map@^0.5.3: version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - -source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - -standard-engine@~7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/standard-engine/-/standard-engine-7.0.0.tgz#ebb77b9c8fc2c8165ffa353bd91ba0dff41af690" - dependencies: - deglob "^2.1.0" - get-stdin "^5.0.1" - minimist "^1.1.0" - pkg-conf "^2.0.0" - -standard@10.0.2: - version "10.0.2" - resolved "https://registry.yarnpkg.com/standard/-/standard-10.0.2.tgz#974c1c53cc865b075a4b576e78441e1695daaf7b" - dependencies: - eslint "~3.19.0" - eslint-config-standard "10.2.1" - eslint-config-standard-jsx "4.0.1" - eslint-plugin-import "~2.2.0" - eslint-plugin-node "~4.2.2" - eslint-plugin-promise "~3.5.0" - eslint-plugin-react "~6.10.0" - eslint-plugin-standard "~3.0.1" - standard-engine "~7.0.0" - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -string-width@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz" + integrity "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==" + +standard-engine@^15.0.0: + version "15.0.0" + resolved "https://registry.npmjs.org/standard-engine/-/standard-engine-15.0.0.tgz" + integrity sha512-4xwUhJNo1g/L2cleysUqUv7/btn7GEbYJvmgKrQ2vd/8pkTmN8cpqAZg+BT8Z1hNeEH787iWUdOpL8fmApLtxA== + dependencies: + get-stdin "^8.0.0" + minimist "^1.2.6" + pkg-conf "^3.1.0" + xdg-basedir "^4.0.0" + +standard@17.0.0: + version "17.0.0" + resolved "https://registry.npmjs.org/standard/-/standard-17.0.0.tgz" + integrity sha512-GlCM9nzbLUkr+TYR5I2WQoIah4wHA2lMauqbyPLV/oI5gJxqhHzhjl9EG2N0lr/nRqI3KCbCvm/W3smxvLaChA== + dependencies: + eslint "^8.13.0" + eslint-config-standard "17.0.0" + eslint-config-standard-jsx "^11.0.0" + eslint-plugin-import "^2.26.0" + eslint-plugin-n "^15.1.0" + eslint-plugin-promise "^6.0.0" + eslint-plugin-react "^7.28.0" + standard-engine "^15.0.0" + +string.prototype.matchall@^4.0.7: + version "4.0.7" + resolved "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.7.tgz" + integrity sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + get-intrinsic "^1.1.1" + has-symbols "^1.0.3" + internal-slot "^1.0.3" + regexp.prototype.flags "^1.4.1" + side-channel "^1.0.4" + +string.prototype.trimend@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz" + integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog== dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^3.0.0" + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" -string_decoder@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.1.tgz#62e200f039955a6810d8df0a33ffc0f013662d98" +string.prototype.trimstart@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz" + integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== dependencies: - safe-buffer "^5.0.1" + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" -strip-ansi@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: - ansi-regex "^2.0.0" + ansi-regex "^5.0.1" strip-bom@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -table@^3.7.8: - version "3.8.3" - resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: - ajv "^4.7.0" - ajv-keywords "^1.0.0" - chalk "^1.1.1" - lodash "^4.0.0" - slice-ansi "0.0.4" - string-width "^2.0.0" - -text-table@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + has-flag "^4.0.0" -through@^2.3.6: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -tryit@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== dependencies: - prelude-ls "~1.1.2" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + is-number "^7.0.0" -uglify-js@3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5" - integrity sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg== +tsconfig-paths@^3.14.1: + version "3.14.1" + resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz" + integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== dependencies: - commander "~2.20.0" - source-map "~0.6.1" + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.6" + strip-bom "^3.0.0" -underscore-plus@1.x: - version "1.7.0" - resolved "https://registry.yarnpkg.com/underscore-plus/-/underscore-plus-1.7.0.tgz#107f1900c520ac1fefe4edec6580a7ff08a99d0f" - integrity sha512-A3BEzkeicFLnr+U/Q3EyWwJAQPbA19mtZZ4h+lLq3ttm9kn8WC4R3YpuJZEXmWdLjYP47Zc8aLZm9kwdv+zzvA== +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== dependencies: - underscore "^1.9.1" + prelude-ls "^1.2.1" -underscore@^1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" - integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" +type-fest@^0.3.0: + version "0.3.1" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz" + integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== -user-home@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" +uglify-js@3.17.2: + version "3.17.2" + resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.2.tgz" + integrity sha512-bbxglRjsGQMchfvXZNusUcYgiB9Hx2K4AHYXQy2DITZ9Rd+JzhX7+hoocE5Winr7z2oHvPsekkBwXtigvxevXg== + +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: - os-homedir "^1.0.0" + punycode "^2.1.0" -util-deprecate@~1.0.1: +which-boxed-primitive@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + resolved "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" -wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" +which@^2.0.1: + version "2.0.2" + resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +word-wrap@^1.2.3: + version "1.2.3" + resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== wrappy@1: version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -write@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" - dependencies: - mkdirp "^0.5.1" +xdg-basedir@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz" + integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== -xtend@^4.0.0, xtend@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== From 1f1f744059cf6a4d0124d638cc6b1d8a0287474c Mon Sep 17 00:00:00 2001 From: Zack Schuster Date: Tue, 27 Sep 2022 22:37:30 -0700 Subject: [PATCH 02/32] lib: move asserts to test file --- lib/chessboard.js | 73 +----------------------------------------- lib/chessboard.test.js | 69 +++++++++++++++++++++++++++++++++++++++ package.json | 3 +- 3 files changed, 72 insertions(+), 73 deletions(-) create mode 100644 lib/chessboard.test.js diff --git a/lib/chessboard.js b/lib/chessboard.js index bd784867..a9d5db76 100644 --- a/lib/chessboard.js +++ b/lib/chessboard.js @@ -12,7 +12,6 @@ const COLUMNS = 'abcdefgh'.split('') const DEFAULT_DRAG_THROTTLE_RATE = 20 const ELLIPSIS = '…' -const RUN_ASSERTS = true const START_FEN = 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR' const START_POSITION = fenToObj(START_FEN) @@ -125,15 +124,6 @@ function interpolateTemplate (str, obj) { return str } -if (RUN_ASSERTS) { - console.assert(interpolateTemplate('abc', { a: 'x' }) === 'abc') - console.assert(interpolateTemplate('{a}bc', {}) === '{a}bc') - console.assert(interpolateTemplate('{a}bc', { p: 'q' }) === '{a}bc') - console.assert(interpolateTemplate('{a}bc', { a: 'x' }) === 'xbc') - console.assert(interpolateTemplate('{a}bc{a}bc', { a: 'x' }) === 'xbcxbc') - console.assert(interpolateTemplate('{a}{a}{b}', { a: 'x', b: 'y' }) === 'xxy') -} - // --------------------------------------------------------------------------- // Predicates // --------------------------------------------------------------------------- @@ -182,34 +172,10 @@ function validSquare (square) { return isString(square) && square.search(/^[a-h][1-8]$/) !== -1 } -if (RUN_ASSERTS) { - console.assert(validSquare('a1')) - console.assert(validSquare('e2')) - console.assert(!validSquare('D2')) - console.assert(!validSquare('g9')) - console.assert(!validSquare('a')) - console.assert(!validSquare(true)) - console.assert(!validSquare(null)) - console.assert(!validSquare({})) -} - function validPieceCode (code) { return isString(code) && code.search(/^[bw][KQRNBP]$/) !== -1 } -if (RUN_ASSERTS) { - console.assert(validPieceCode('bP')) - console.assert(validPieceCode('bK')) - console.assert(validPieceCode('wK')) - console.assert(validPieceCode('wR')) - console.assert(!validPieceCode('WR')) - console.assert(!validPieceCode('Wr')) - console.assert(!validPieceCode('a')) - console.assert(!validPieceCode(true)) - console.assert(!validPieceCode(null)) - console.assert(!validPieceCode({})) -} - function validFen (fen) { if (!isString(fen)) return false @@ -235,20 +201,6 @@ function validFen (fen) { return true } -if (RUN_ASSERTS) { - console.assert(validFen(START_FEN)) - console.assert(validFen('8/8/8/8/8/8/8/8')) - console.assert(validFen('r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R')) - console.assert(validFen('3r3r/1p4pp/2nb1k2/pP3p2/8/PB2PN2/p4PPP/R4RK1 b - - 0 1')) - console.assert(!validFen('3r3z/1p4pp/2nb1k2/pP3p2/8/PB2PN2/p4PPP/R4RK1 b - - 0 1')) - console.assert(!validFen('anbqkbnr/8/8/8/8/8/PPPPPPPP/8')) - console.assert(!validFen('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/')) - console.assert(!validFen('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBN')) - console.assert(!validFen('888888/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR')) - console.assert(!validFen('888888/pppppppp/74/8/8/8/PPPPPPPP/RNBQKBNR')) - console.assert(!validFen({})) -} - function validPositionObject (pos) { if (!isPlainObject(pos)) return false @@ -263,18 +215,6 @@ function validPositionObject (pos) { return true } -if (RUN_ASSERTS) { - console.assert(validPositionObject(START_POSITION)) - console.assert(validPositionObject({})) - console.assert(validPositionObject({ e2: 'wP' })) - console.assert(validPositionObject({ e2: 'wP', d2: 'wP' })) - console.assert(!validPositionObject({ e2: 'BP' })) - console.assert(!validPositionObject({ y2: 'wP' })) - console.assert(!validPositionObject(null)) - console.assert(!validPositionObject('start')) - console.assert(!validPositionObject(START_FEN)) -} - function isTouchDevice () { return 'ontouchstart' in document.documentElement } @@ -378,12 +318,6 @@ function objToFen (obj) { return fen } -if (RUN_ASSERTS) { - console.assert(objToFen(START_POSITION) === START_FEN) - console.assert(objToFen({}) === '8/8/8/8/8/8/8/8') - console.assert(objToFen({ a2: 'wP', b2: 'bP' }) === '8/8/8/8/8/8/Pp6/8') -} - function squeezeFenEmptySquares (fen) { return fen.replace(/11111111/g, '8') .replace(/1111111/g, '7') @@ -491,8 +425,6 @@ function calculatePositionFromMoves (position, moves) { return newPosition } -// TODO: add some asserts here for calculatePositionFromMoves - // --------------------------------------------------------------------------- // HTML // --------------------------------------------------------------------------- @@ -1771,7 +1703,4 @@ class Chessboard { } } -Object.assign(Chessboard, { fenToObj, objToFen }) -Object.assign(globalThis, { Chessboard }) - -// export { Chessboard, fenToObj, objToFen } +export { Chessboard, fenToObj, objToFen, interpolateTemplate, validSquare, validPieceCode, validFen, validPositionObject, START_FEN, START_POSITION } diff --git a/lib/chessboard.test.js b/lib/chessboard.test.js new file mode 100644 index 00000000..c7aeeb91 --- /dev/null +++ b/lib/chessboard.test.js @@ -0,0 +1,69 @@ +import assert from 'node:assert' +import test from 'node:test' + +import { interpolateTemplate, objToFen, START_FEN, START_POSITION, validFen, validPieceCode, validPositionObject, validSquare } from './chessboard.js' + +test('interpolateTemplate', () => { + assert.equal(interpolateTemplate('abc', { a: 'x' }), 'abc') + assert.equal(interpolateTemplate('{a}bc', {}), '{a}bc') + assert.equal(interpolateTemplate('{a}bc', { p: 'q' }), '{a}bc') + assert.equal(interpolateTemplate('{a}bc', { a: 'x' }), 'xbc') + assert.equal(interpolateTemplate('{a}bc{a}bc', { a: 'x' }), 'xbcxbc') + assert.equal(interpolateTemplate('{a}{a}{b}', { a: 'x', b: 'y' }), 'xxy') +}) + +test('objToFen', () => { + assert.equal(objToFen(START_POSITION), START_FEN) + assert.equal(objToFen({}), '8/8/8/8/8/8/8/8') + assert.equal(objToFen({ a2: 'wP', b2: 'bP' }), '8/8/8/8/8/8/Pp6/8') +}) + +test('validSquare', () => { + assert.ok(validSquare('a1')) + assert.ok(validSquare('e2')) + assert.ok(!validSquare('D2')) + assert.ok(!validSquare('g9')) + assert.ok(!validSquare('a')) + assert.ok(!validSquare(true)) + assert.ok(!validSquare(null)) + assert.ok(!validSquare({})) +}) + +test('validPieceCode', () => { + assert.ok(validPieceCode('bP')) + assert.ok(validPieceCode('bK')) + assert.ok(validPieceCode('wK')) + assert.ok(validPieceCode('wR')) + assert.ok(!validPieceCode('WR')) + assert.ok(!validPieceCode('Wr')) + assert.ok(!validPieceCode('a')) + assert.ok(!validPieceCode(true)) + assert.ok(!validPieceCode(null)) + assert.ok(!validPieceCode({})) +}) + +test('validFen', () => { + assert.ok(validFen(START_FEN)) + assert.ok(validFen('8/8/8/8/8/8/8/8')) + assert.ok(validFen('r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R')) + assert.ok(validFen('3r3r/1p4pp/2nb1k2/pP3p2/8/PB2PN2/p4PPP/R4RK1 b - - 0 1')) + assert.ok(!validFen('3r3z/1p4pp/2nb1k2/pP3p2/8/PB2PN2/p4PPP/R4RK1 b - - 0 1')) + assert.ok(!validFen('anbqkbnr/8/8/8/8/8/PPPPPPPP/8')) + assert.ok(!validFen('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/')) + assert.ok(!validFen('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBN')) + assert.ok(!validFen('888888/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR')) + assert.ok(!validFen('888888/pppppppp/74/8/8/8/PPPPPPPP/RNBQKBNR')) + assert.ok(!validFen({})) +}) + +test('validPositionObject', () => { + assert.ok(validPositionObject(START_POSITION)) + assert.ok(validPositionObject({})) + assert.ok(validPositionObject({ e2: 'wP' })) + assert.ok(validPositionObject({ e2: 'wP', d2: 'wP' })) + assert.ok(!validPositionObject({ e2: 'BP' })) + assert.ok(!validPositionObject({ y2: 'wP' })) + assert.ok(!validPositionObject(null)) + assert.ok(!validPositionObject('start')) + assert.ok(!validPositionObject(START_FEN)) +}) diff --git a/package.json b/package.json index 559619ef..9313aaef 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "package": "npm run standard && npm run build && npm run website", "build": "standard lib/chessboard.js && node scripts/build.js", "standard": "standard --fix lib/*.js website/js/*.js", - "website": "node scripts/website.js" + "website": "node scripts/website.js", + "test": "node --test lib" } } From 68c8ca2eff4be5771c3f5aadc9d5d89a1add8cd2 Mon Sep 17 00:00:00 2001 From: Zack Schuster Date: Tue, 27 Sep 2022 22:39:00 -0700 Subject: [PATCH 03/32] build: update tooling & process --- .gitignore | 6 +- Gulpfile.js | 49 + lib/chessboard.css | 2 - lib/chessboard.js | 7 - package.json | 17 +- scripts/build.js | 46 - scripts/rename.js | 22 - scripts/website.js => website/js/build.js | 119 +- yarn.lock | 2251 ++++++++++++++++++++- 9 files changed, 2299 insertions(+), 220 deletions(-) create mode 100644 Gulpfile.js delete mode 100644 scripts/build.js delete mode 100644 scripts/rename.js rename scripts/website.js => website/js/build.js (80%) diff --git a/.gitignore b/.gitignore index 377a0864..bf1fea48 100644 --- a/.gitignore +++ b/.gitignore @@ -3,10 +3,8 @@ dist/ node_modules/ +website/examples/ +website/*.html .DS_Store -website/*.html -website/css/chessboard.css -website/js/chessboard.js -website/examples/ diff --git a/Gulpfile.js b/Gulpfile.js new file mode 100644 index 00000000..16d6d8e2 --- /dev/null +++ b/Gulpfile.js @@ -0,0 +1,49 @@ +import { writeFile, rm, mkdir } from 'node:fs/promises'; +import gulp from 'gulp'; +import { rollup } from 'rollup'; +import { terser } from 'rollup-plugin-terser'; +import sass from 'sass'; + +import packageJson from './package.json' assert { type: 'json' }; + +const { version } = packageJson; +const banner = `/** @preserve +* chessboard.js v${version} +* https://github.com/oakmac/chessboardjs/ +* +* Copyright (c) 2019, Chris Oakman +* Released under the MIT license +* https://github.com/oakmac/chessboardjs/blob/master/LICENSE.md +*/`; + +export const build = gulp.series(resetDistFolder, gulp.parallel(buildJs, buildCss), buildWebsite); +export const watch = () => gulp.watch(['data', 'examples', 'lib', 'templates', 'website/css', 'website/js'], { ignoreInitial: false }, build); +export default build; + +async function resetDistFolder() { + await rm('./dist', { recursive: true, force: true }); + await mkdir('./dist'); +} + +async function buildJs() { + const bundle = await rollup({ input: './lib/chessboard.js' }); + + const format = /** @type {import('rollup').ModuleFormat} */('iife'); + const output = { banner, format, name: 'ChessboardJS', outro: `Object.assign(window, exports);` }; + + return Promise.all([ + bundle.write({ file: `./dist/chessboard-${version}.js`, ...output }), + bundle.write({ file: `./dist/chessboard-${version}.min.js`, plugins: [terser()], ...output }), + ]); +} + +async function buildCss() { + return Promise.all([ + writeFile(`./dist/chessboard-${version}.css`, banner + '\n' + sass.compile('lib/chessboard.css').css), + writeFile(`./dist/chessboard-${version}.min.css`, banner + '\n' + sass.compile('lib/chessboard.css', { style: 'compressed' }).css), + ]); +} + +async function buildWebsite() { + await import('./website/js/build.js'); +} diff --git a/lib/chessboard.css b/lib/chessboard.css index 2add196e..bfcf3614 100644 --- a/lib/chessboard.css +++ b/lib/chessboard.css @@ -1,5 +1,3 @@ -/*! chessboard.js v@VERSION | (c) 2019 Chris Oakman | MIT License chessboardjs.com/license */ - .clearfix-7da63 { clear: both; } diff --git a/lib/chessboard.js b/lib/chessboard.js index a9d5db76..e66528a8 100644 --- a/lib/chessboard.js +++ b/lib/chessboard.js @@ -1,10 +1,3 @@ -// chessboard.js v@VERSION -// https://github.com/oakmac/chessboardjs/ -// -// Copyright (c) 2019, Chris Oakman -// Released under the MIT license -// https://github.com/oakmac/chessboardjs/blob/master/LICENSE.md - // --------------------------------------------------------------------------- // Constants // --------------------------------------------------------------------------- diff --git a/package.json b/package.json index 9313aaef..812bf8b7 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "JavaScript chessboard widget", "homepage": "https://chessboardjs.com", "license": "MIT", + "type": "module", "version": "1.0.0", "repository": { "type": "git", @@ -17,17 +18,21 @@ }, "devDependencies": { "@types/node": "18.7.23", - "csso": "3.5.1", + "gulp": "4.0.2", "kidif": "1.1.0", "mustache": "2.3.0", - "standard": "17.0.0", - "uglify-js": "3.17.2" + "rollup": "2.79.1", + "rollup-plugin-terser": "7.0.2", + "sass": "1.55.0", + "standard": "17.0.0" + }, + "resolutions": { + "chokidar": "3.5.3" }, "scripts": { - "package": "npm run standard && npm run build && npm run website", - "build": "standard lib/chessboard.js && node scripts/build.js", + "build": "standard lib/chessboard.js && gulp", "standard": "standard --fix lib/*.js website/js/*.js", - "website": "node scripts/website.js", + "start": "gulp watch", "test": "node --test lib" } } diff --git a/scripts/build.js b/scripts/build.js deleted file mode 100644 index cd8f9873..00000000 --- a/scripts/build.js +++ /dev/null @@ -1,46 +0,0 @@ -// ----------------------------------------------------------------------------- -// This file creates a build in the dist/ folder -// ----------------------------------------------------------------------------- - -// libraries -const fs = require('fs'); -const csso = require('csso'); -const uglify = require('uglify-js'); - -const encoding = { encoding: 'utf8' }; - -const package = JSON.parse(fs.readFileSync('package.json', encoding)); -const version = package.version; -const year = new Date().getFullYear(); -const cssSrc = fs.readFileSync('lib/chessboard.css', encoding) - .replace('@VERSION', version); -const jsSrc = fs.readFileSync('lib/chessboard.js', encoding) - .replace('@VERSION', version) - .replace('RUN_ASSERTS = true', 'RUN_ASSERTS = false'); - -// TODO: need to remove the RUN_ASSERTS calls from the non-minified file - -const minifiedCSS = csso.minify(cssSrc).css; -const uglifyResult = uglify.minify(jsSrc); -const minifiedJS = uglifyResult.code; - -// quick sanity checks -console.assert(!uglifyResult.error, 'error minifying JS!'); -console.assert(typeof minifiedCSS === 'string' && minifiedCSS !== '', 'error minifying CSS!'); - -// add license to the top of minified files -const minifiedJSWithBanner = banner() + minifiedJS; - -// create a fresh dist/ folder -fs.rmSync('dist', { recursive: true, force: true }); -fs.mkdirSync('dist'); - -// copy lib files to dist/ -fs.writeFileSync('dist/chessboard-' + version + '.css', cssSrc, encoding); -fs.writeFileSync('dist/chessboard-' + version + '.min.css', minifiedCSS, encoding); -fs.writeFileSync('dist/chessboard-' + version + '.js', jsSrc, encoding); -fs.writeFileSync('dist/chessboard-' + version + '.min.js', minifiedJSWithBanner, encoding); - -function banner() { - return '/*! chessboard.js v' + version + ' | (c) ' + year + ' Chris Oakman | MIT License chessboardjs.com/license */\n'; -} diff --git a/scripts/rename.js b/scripts/rename.js deleted file mode 100644 index c6a99385..00000000 --- a/scripts/rename.js +++ /dev/null @@ -1,22 +0,0 @@ -// TODO: this is unfinished / not working - -var fs = require('fs') -var glob = require('glob') - -var exampleFiles = glob.sync('examples/*.example') - -exampleFiles.forEach(processFile) - -function processFile (f) { - var fileContents = fs.readFileSync(f, {encoding:'utf8'}) - var lines = fileContents.split('\n') - - lines = lines.map(processLine) - - fs.writeFileSync(f, lines.join('\n')) -} - -function processLine (line) { - line = line.replace('docs#', 'docs.html#') - return line -} diff --git a/scripts/website.js b/website/js/build.js similarity index 80% rename from scripts/website.js rename to website/js/build.js index 33479821..f7cf38ca 100755 --- a/scripts/website.js +++ b/website/js/build.js @@ -1,26 +1,24 @@ #! /usr/bin/env node +/* eslint-env node */ + // ----------------------------------------------------------------------------- // This file builds the contents of the website/ folder. // ----------------------------------------------------------------------------- // libraries -const fs = require('fs'); -const kidif = require('kidif'); -const mustache = require('mustache'); -const docs = require('../data/docs.json'); +import fs from 'node:fs'; +import { readFile } from 'node:fs/promises'; -const encoding = { encoding: 'utf8' }; +import kidif from 'kidif'; +import mustache from 'mustache'; -// toggle development version -const useDevFile = false; -const jsCDNLink = ''; -const cssCDNLink = 'https://unpkg.com/@chrisoakman/chessboardjs@1.0.0/dist/chessboard-1.0.0.min.css'; -let chessboardJsScript = jsCDNLink; -if (useDevFile) { - chessboardJsScript = ''; -} +const docs = JSON.parse(await readFile(new URL('../../data/docs.json', import.meta.url), 'utf-8')); +const { version } = JSON.parse(await readFile(new URL('../../package.json', import.meta.url), 'utf-8')); + +const encoding = 'utf-8'; +const chessboardJsScript = ``; // grab some mustache templates const docsTemplate = fs.readFileSync('templates/docs.mustache', encoding); @@ -33,15 +31,12 @@ const headTemplate = fs.readFileSync('templates/_head.mustache', encoding); const headerTemplate = fs.readFileSync('templates/_header.mustache', encoding); const footerTemplate = fs.readFileSync('templates/_footer.mustache', encoding); -const latestChessboardJS = fs.readFileSync('lib/chessboard.js', encoding); -const latestChessboardCSS = fs.readFileSync('lib/chessboard.css', encoding); - // grab the examples const examplesArr = kidif('examples/*.example'); console.assert(examplesArr, 'Could not load the Example files'); console.assert(examplesArr.length > 1, 'Zero examples loaded'); -const examplesObj = examplesArr.reduce(function (examplesObj, example, idx) { +const examplesObj = examplesArr.reduce(function (examplesObj, example) { examplesObj[example.id] = example; return examplesObj; }, {}); @@ -69,62 +64,56 @@ const examplesGroups = [ } ]; -const homepageExample1 = ''; - -const homepageExample2 = ` -var board2 = new Chessboard('board2', { - draggable: true, - dropOffBoard: 'trash', - sparePieces: true -}) - -$('#startBtn').on('click', () => board2.start()) -$('#clearBtn').on('click', () => board2.clear())`.trim(); - -function writeSrcFiles() { - fs.writeFileSync('website/js/chessboard.js', latestChessboardJS, encoding); - fs.writeFileSync('website/css/chessboard.css', latestChessboardCSS, encoding); -} - function writeHomepage() { - const headHTML = mustache.render(headTemplate, { pageTitle: 'Homepage' }); + const headHTML = mustache.render(headTemplate, { pageTitle: 'Homepage', version }); const html = mustache.render(homepageTemplate, { - chessboardJsScript: chessboardJsScript, - example2: homepageExample2, + chessboardJsScript, + example2: ` + const board2 = new Chessboard('board2', { + draggable: true, + dropOffBoard: 'trash', + sparePieces: true + }) + + document.getElementById('startBtn').onclick = () => board2.start() + document.getElementById('clearBtn').onclick = () => board2.clear() + `.trim(), footer: footerTemplate, - head: headHTML + head: headHTML, + version }); fs.writeFileSync('website/index.html', html, encoding); } function writeExamplesPage() { - const headHTML = mustache.render(headTemplate, { pageTitle: 'Examples' }); - const headerHTML = mustache.render(headerTemplate, { examplesActive: true }); + const headHTML = mustache.render(headTemplate, { pageTitle: 'Examples', version }); + const headerHTML = mustache.render(headerTemplate, { examplesActive: true, version }); const html = mustache.render(examplesTemplate, { - chessboardJsScript: chessboardJsScript, + chessboardJsScript, examplesJavaScript: buildExamplesJS(), footer: footerTemplate, head: headHTML, header: headerHTML, - nav: buildExamplesNavHTML() + nav: buildExamplesNavHTML(), + version }); fs.writeFileSync('website/examples.html', html, encoding); } const configTableRowsHTML = docs.config.reduce(function (html, itm) { - if (isString(itm)) return html; + if (typeof itm === 'string') return html; return html + buildConfigDocsTableRowHTML('config', itm); }, ''); const methodTableRowsHTML = docs.methods.reduce(function (html, itm) { - if (isString(itm)) return html; + if (typeof itm === 'string') return html; return html + buildMethodRowHTML(itm); }, ''); const errorRowsHTML = docs.errors.reduce(function (html, itm) { - if (isString(itm)) return html; + if (typeof itm === 'string') return html; return html + buildErrorRowHTML(itm); }, ''); @@ -137,7 +126,7 @@ function writeSingleExamplePage(example) { example.includeChessJS = true; } example.chessboardJsScript = chessboardJsScript; - const html = mustache.render(singleExampleTemplate, example); + const html = mustache.render(singleExampleTemplate, { version, ...example }); if (!fs.existsSync('website/examples')) { fs.mkdirSync('website/examples'); } @@ -149,8 +138,8 @@ function writeSingleExamplesPages() { } function writeDocsPage() { - const headHTML = mustache.render(headTemplate, { pageTitle: 'Documentation' }); - const headerHTML = mustache.render(headerTemplate, { docsActive: true }); + const headHTML = mustache.render(headTemplate, { pageTitle: 'Documentation', version }); + const headerHTML = mustache.render(headerTemplate, { docsActive: true, version }); const html = mustache.render(docsTemplate, { configTableRows: configTableRowsHTML, @@ -158,30 +147,31 @@ function writeDocsPage() { footer: footerTemplate, head: headHTML, header: headerHTML, - methodTableRows: methodTableRowsHTML + methodTableRows: methodTableRowsHTML, + version, }); fs.writeFileSync('website/docs.html', html, encoding); } function writeDownloadPage() { - const headHTML = mustache.render(headTemplate, { pageTitle: 'Download' }); - const headerHTML = mustache.render(headerTemplate, { downloadActive: true }); + const headHTML = mustache.render(headTemplate, { pageTitle: 'Download', version }); + const headerHTML = mustache.render(headerTemplate, { downloadActive: true, version }); const html = mustache.render(downloadTemplate, { footer: footerTemplate, head: headHTML, - header: headerHTML + header: headerHTML, + version }); fs.writeFileSync('website/download.html', html, encoding); } function writeLicensePage() { - const html = mustache.render(licensePageTemplate); + const html = mustache.render(licensePageTemplate, { version }); fs.writeFileSync('website/license.html', html, encoding); } function writeWebsite() { - writeSrcFiles(); writeHomepage(); writeExamplesPage(); writeSingleExamplesPages(); @@ -196,17 +186,6 @@ writeWebsite(); // HTML // ----------------------------------------------------------------------------- -function htmlEscape(str) { - return (str + '') - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"') - .replace(/'/g, ''') - .replace(/\//g, '/') - .replace(/`/g, '`'); -} - function buildExampleGroupHTML(idx, groupName, examplesInGroup) { const groupNum = idx + 1; let html = '

' + groupName + '

' + @@ -330,12 +309,6 @@ function buildTypeHTML(type) { return html; } -function buildRequiredHTML(req) { - if (!req) return 'no'; - if (req === true) return 'yes'; - return req; -} - function buildDescriptionHTML(desc) { if (!Array.isArray(desc)) { desc = [desc]; @@ -403,7 +376,3 @@ function buildErrorRowHTML(error) { return html; } - -function isString(s) { - return typeof s === 'string'; -} diff --git a/yarn.lock b/yarn.lock index 93148500..9a4211c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,27 @@ # yarn lockfile v1 +"@babel/code-frame@^7.10.4": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" + integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== + dependencies: + "@babel/highlight" "^7.18.6" + +"@babel/helper-validator-identifier@^7.18.6": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" + integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== + +"@babel/highlight@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" + integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== + dependencies: + "@babel/helper-validator-identifier" "^7.18.6" + chalk "^2.0.0" + js-tokens "^4.0.0" + "@eslint/eslintrc@^1.3.2": version "1.3.2" resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz" @@ -41,6 +62,46 @@ resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== +"@jridgewell/gen-mapping@^0.3.0": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" + integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/source-map@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb" + integrity sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw== + dependencies: + "@jridgewell/gen-mapping" "^0.3.0" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.14" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + +"@jridgewell/trace-mapping@^0.3.9": + version "0.3.15" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz#aba35c48a38d3fd84b37e66c9c0423f9744f9774" + integrity sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" @@ -67,7 +128,7 @@ resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/node@18.7.23": +"@types/node@*", "@types/node@18.7.23": version "18.7.23" resolved "https://registry.npmjs.org/@types/node/-/node-18.7.23.tgz" integrity sha512-DWNcCHolDq0ZKGizjx2DZjR/PqsYwAcYUJmfMWqtVU2MBMG5Mo+xFZrhGId5r/O5HOuMPyQEcM6KUBp5lBZZBg== @@ -77,9 +138,9 @@ acorn-jsx@^5.3.2: resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.8.0: +acorn@^8.5.0, acorn@^8.8.0: version "8.8.0" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== ajv@^6.10.0, ajv@^6.12.4: @@ -92,11 +153,37 @@ ajv@^6.10.0, ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ansi-colors@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9" + integrity sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA== + dependencies: + ansi-wrap "^0.1.0" + +ansi-gray@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251" + integrity sha512-HrgGIZUl8h2EHuZaU9hTR/cU5nhKxpVE1V6kdGsQ8e4zirElJ5fvtfc8N7Q1oq1aatO275i8pUFUCpNWCAnVWw== + dependencies: + ansi-wrap "0.1.0" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== + ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" @@ -104,11 +191,78 @@ ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" +ansi-wrap@0.1.0, ansi-wrap@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" + integrity sha512-ZyznvL8k/FZeQHr2T6LzcJ/+vBApDnMNZvfVFy3At0knswWd6rJ3/0Hhmpu8oqa6C92npmozs890sX9Dl6q+Qw== + +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +anymatch@~3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +append-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/append-buffer/-/append-buffer-1.0.2.tgz#d8220cf466081525efea50614f3de6514dfa58f1" + integrity sha512-WLbYiXzD3y/ATLZFufV/rZvWdZOs+Z/+5v1rBZ463Jn398pa6kcde27cvozYnBoxXblGZTFfoPpsaEw0orU5BA== + dependencies: + buffer-equal "^1.0.0" + +archy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + integrity sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw== + argparse@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA== + +arr-filter@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/arr-filter/-/arr-filter-1.1.2.tgz#43fdddd091e8ef11aa4c45d9cdc18e2dff1711ee" + integrity sha512-A2BETWCqhsecSvCkWAeVBFLH6sXEUGASuzkpjL3GR1SlL/PWL6M3J8EAAld2Uubmh39tvkJTqC9LeLHCUKmFXA== + dependencies: + make-iterator "^1.0.0" + +arr-flatten@^1.0.1, arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-map@^2.0.0, arr-map@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/arr-map/-/arr-map-2.0.2.tgz#3a77345ffc1cf35e2a91825601f9e58f2e24cac4" + integrity sha512-tVqVTHt+Q5Xb09qRkbu+DidW1yYzz5izWS2Xm2yFm7qJnmUfz4HPzNxbHkdRJbz2lrqI7S+z17xNYdFcBBO8Hw== + dependencies: + make-iterator "^1.0.0" + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q== + +array-each@^1.0.0, array-each@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" + integrity sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA== + array-includes@^3.1.4, array-includes@^3.1.5: version "3.1.5" resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz" @@ -120,11 +274,45 @@ array-includes@^3.1.4, array-includes@^3.1.5: get-intrinsic "^1.1.1" is-string "^1.0.7" +array-initial@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/array-initial/-/array-initial-1.1.0.tgz#2fa74b26739371c3947bd7a7adc73be334b3d795" + integrity sha512-BC4Yl89vneCYfpLrs5JU2aAu9/a+xWbeKhvISg9PT7eWFB9UlRvI+rKEtk6mgxWr3dSkk9gQ8hCrdqt06NXPdw== + dependencies: + array-slice "^1.0.0" + is-number "^4.0.0" + +array-last@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/array-last/-/array-last-1.3.0.tgz#7aa77073fec565ddab2493f5f88185f404a9d336" + integrity sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg== + dependencies: + is-number "^4.0.0" + +array-slice@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4" + integrity sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w== + +array-sort@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-sort/-/array-sort-1.0.0.tgz#e4c05356453f56f53512a7d1d6123f2c54c0a88a" + integrity sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg== + dependencies: + default-compare "^1.0.0" + get-value "^2.0.6" + kind-of "^5.0.2" + array-union@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== + array.prototype.flat@^1.2.5: version "1.3.0" resolved "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz" @@ -145,11 +333,71 @@ array.prototype.flatmap@^1.3.0: es-abstract "^1.19.2" es-shim-unscopables "^1.0.0" +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw== + +async-done@^1.2.0, async-done@^1.2.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/async-done/-/async-done-1.3.2.tgz#5e15aa729962a4b07414f528a88cdf18e0b290a2" + integrity sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.2" + process-nextick-args "^2.0.0" + stream-exhaust "^1.0.1" + +async-settle@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/async-settle/-/async-settle-1.0.0.tgz#1d0a914bb02575bec8a8f3a74e5080f72b2c0c6b" + integrity sha512-VPXfB4Vk49z1LHHodrEQ6Xf7W4gg1w0dAPROHngx7qgDjqmIQ+fXmwgGXTW/ITLai0YLSvWepJOP9EVpMnEAcw== + dependencies: + async-done "^1.2.2" + +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +bach@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/bach/-/bach-1.2.0.tgz#4b3ce96bf27134f79a1b414a51c14e34c3bd9880" + integrity sha512-bZOOfCb3gXBXbTFXq3OZtGR88LwGeJvzu6szttaIzymOTS4ZttBNOWSv7aLZja2EMycKtRYV0Oa8SNKH/zkxvg== + dependencies: + arr-filter "^1.1.1" + arr-flatten "^1.0.1" + arr-map "^2.0.0" + array-each "^1.0.0" + array-initial "^1.0.0" + array-last "^1.1.1" + async-done "^1.2.2" + async-settle "^1.0.0" + now-and-later "^2.0.0" + balanced-match@^0.4.1: version "0.4.2" resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" integrity sha512-STw03mQKnGUYtoNjmowo4F2cRmIIxYEGiMsjjwla/u5P1lxadj/05WkNaFjNiKTgJkj8KiXbgAiRTmcQRwQNtg== +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + brace-expansion@^1.1.7: version "1.1.7" resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz" @@ -158,13 +406,39 @@ brace-expansion@^1.1.7: balanced-match "^0.4.1" concat-map "0.0.1" -braces@^3.0.2: +braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +braces@^3.0.2, braces@~3.0.2: version "3.0.2" - resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: fill-range "^7.0.1" +buffer-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-1.0.0.tgz#59616b498304d556abd466966b22eeda3eca5fbe" + integrity sha512-tcBWO2Dl4e7Asr9hTGcpVrCe+F7DubpmqWCTbj4FHLmjqO2hIaC383acQubWtRJhdceqs5uBHs6Es+Sk//RKiQ== + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + builtins@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz" @@ -172,6 +446,21 @@ builtins@^5.0.1: dependencies: semver "^7.0.0" +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz" @@ -185,6 +474,20 @@ callsites@^3.0.0: resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + integrity sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg== + +chalk@^2.0.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + chalk@^4.0.0: version "4.1.2" resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" @@ -193,6 +496,93 @@ chalk@^4.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chokidar@3.5.3, "chokidar@>=3.0.0 <4.0.0", chokidar@^2.0.0: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + integrity sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w== + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +clone-buffer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" + integrity sha512-KLLTJWrvwIP+OPfMn0x2PheDEP20RPUcGXj/ERegTgdmPEZylALQldygiqrPPu8P45uNuPs7ckmReLY6v/iA5g== + +clone-stats@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" + integrity sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag== + +clone@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== + +cloneable-readable@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.1.3.tgz#120a00cb053bfb63a222e709f9683ea2e11d8cec" + integrity sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ== + dependencies: + inherits "^2.0.1" + process-nextick-args "^2.0.0" + readable-stream "^2.3.5" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA== + +collection-map@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-map/-/collection-map-1.0.0.tgz#aea0f06f8d26c780c2b75494385544b2255af18c" + integrity sha512-5D2XXSpkOnleOI21TG7p3T0bGAsZ/XknZpKBmGYyluO8pw4zA3K8ZlrBIbC4FXg3m6z/RNFiUFfT2sQK01+UHA== + dependencies: + arr-map "^2.0.2" + for-own "^1.0.0" + make-iterator "^1.0.0" + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw== + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + color-convert@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" @@ -200,16 +590,71 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + color-name@~1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-support@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" + integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== + +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== +concat-stream@^1.6.0: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +convert-source-map@^1.5.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" + integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== + dependencies: + safe-buffer "~5.1.1" + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw== + +copy-props@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/copy-props/-/copy-props-2.0.5.tgz#03cf9ae328d4ebb36f8f1d804448a6af9ee3f2d2" + integrity sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw== + dependencies: + each-props "^1.3.2" + is-plain-object "^5.0.0" + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + cross-spawn@^7.0.2: version "7.0.3" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" @@ -219,24 +664,17 @@ cross-spawn@^7.0.2: shebang-command "^2.0.0" which "^2.0.1" -css-tree@1.0.0-alpha.29: - version "1.0.0-alpha.29" - resolved "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.29.tgz" - integrity sha512-sRNb1XydwkW9IOci6iB2xmy8IGCj6r/fr+JWitvJ2JxQRPzN3T4AGGVWCMlVmVwM1gtgALJRmGIlWv5ppnGGkg== - dependencies: - mdn-data "~1.1.0" - source-map "^0.5.3" - -csso@3.5.1: - version "3.5.1" - resolved "https://registry.npmjs.org/csso/-/csso-3.5.1.tgz" - integrity sha512-vrqULLffYU1Q2tLdJvaCYbONStnfkfimRxXNaGjxMldI0C7JPBC4rB1RyjhfdZ4m1frm8pM9uRPKH3d2knZ8gg== +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== dependencies: - css-tree "1.0.0-alpha.29" + es5-ext "^0.10.50" + type "^1.0.1" -debug@^2.6.9: +debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: version "2.6.9" - resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" @@ -255,11 +693,33 @@ debug@^4.1.1, debug@^4.3.2: dependencies: ms "2.1.2" +decamelize@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og== + deep-is@^0.1.3: version "0.1.4" resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== +default-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-compare/-/default-compare-1.0.0.tgz#cb61131844ad84d84788fb68fd01681ca7781a2f" + integrity sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ== + dependencies: + kind-of "^5.0.2" + +default-resolution@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/default-resolution/-/default-resolution-2.0.0.tgz#bcb82baa72ad79b426a76732f1a81ad6df26d684" + integrity sha512-2xaP6GiwVwOEbXCGoJ4ufgC76m8cj805jrghScewJC2ZDsb9U0b4BIrba+xt/Uytyd0HvQ6+WymSRTfnYj59GQ== + define-properties@^1.1.3, define-properties@^1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz" @@ -268,6 +728,33 @@ define-properties@^1.1.3, define-properties@^1.1.4: has-property-descriptors "^1.0.0" object-keys "^1.1.1" +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA== + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA== + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +detect-file@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" + integrity sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q== + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" @@ -289,9 +776,34 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -error-ex@^1.3.1: +duplexify@^3.6.0: + version "3.7.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" + integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +each-props@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/each-props/-/each-props-1.3.2.tgz#ea45a414d16dd5cfa419b1a81720d5ca06892333" + integrity sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA== + dependencies: + is-plain-object "^2.0.1" + object.defaults "^1.1.0" + +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.2" - resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== dependencies: is-arrayish "^0.2.1" @@ -342,6 +854,47 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50: + version "0.10.62" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" + integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== + dependencies: + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + next-tick "^1.1.0" + +es6-iterator@^2.0.1, es6-iterator@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.1.1, es6-symbol@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + +es6-weak-map@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" + integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== + dependencies: + d "1" + es5-ext "^0.10.46" + es6-iterator "^2.0.3" + es6-symbol "^3.1.1" + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" @@ -553,6 +1106,77 @@ esutils@^2.0.2: resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz" integrity sha512-UUPPULqkyAV+M3Shodis7l8D+IyX6V8SbaBnTb449jf3fMTd8+UOZI1Q70NbZVOQkcR91yYgdHsJiMMMVmYshg== +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA== + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +expand-tilde@^2.0.0, expand-tilde@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" + integrity sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw== + dependencies: + homedir-polyfill "^1.0.1" + +ext@^1.1.2: + version "1.7.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== + dependencies: + type "^2.7.2" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug== + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q== + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extend@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +fancy-log@^1.3.2: + version "1.3.3" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7" + integrity sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw== + dependencies: + ansi-gray "^0.1.1" + color-support "^1.1.3" + parse-node-version "^1.0.0" + time-stamp "^1.0.0" + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" @@ -574,6 +1198,11 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== +fast-levenshtein@^1.0.0: + version "1.1.4" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz#e6a754cc8f15e58987aa9cbd27af66fd6f4e5af9" + integrity sha512-Ia0sQNrMPXXkqVFt6w6M1n1oKo3NfKs+mvaV811Jwir7vAk9a6PVV9VPYf6X3BU97QiLEmuW3uXH9u87zDFfdw== + fast-levenshtein@^2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" @@ -593,6 +1222,16 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ== + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + fill-range@^7.0.1: version "7.0.1" resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" @@ -600,6 +1239,14 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA== + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + find-up@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz" @@ -615,6 +1262,42 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" +findup-sync@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc" + integrity sha512-vs+3unmJT45eczmcAZ6zMJtxN3l/QXeccaXQx5cu/MeJMhewVfoWZqibRkOxPnmoR59+Zy5hjabfQc6JLSah4g== + dependencies: + detect-file "^1.0.0" + is-glob "^3.1.0" + micromatch "^3.0.4" + resolve-dir "^1.0.1" + +findup-sync@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" + integrity sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg== + dependencies: + detect-file "^1.0.0" + is-glob "^4.0.0" + micromatch "^3.0.4" + resolve-dir "^1.0.1" + +fined@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fined/-/fined-1.2.0.tgz#d00beccf1aa2b475d16d423b0238b713a2c4a37b" + integrity sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng== + dependencies: + expand-tilde "^2.0.2" + is-plain-object "^2.0.3" + object.defaults "^1.1.0" + object.pick "^1.2.0" + parse-filepath "^1.0.1" + +flagged-respawn@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.1.tgz#e7de6f1279ddd9ca9aac8a5971d618606b3aab41" + integrity sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q== + flat-cache@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz" @@ -628,11 +1311,51 @@ flatted@^3.1.0: resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== +flush-write-stream@^1.0.2: + version "1.1.1" + resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" + integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== + dependencies: + inherits "^2.0.3" + readable-stream "^2.3.6" + +for-in@^1.0.1, for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ== + +for-own@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b" + integrity sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg== + dependencies: + for-in "^1.0.1" + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA== + dependencies: + map-cache "^0.2.2" + +fs-mkdirp-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz#0b7815fc3201c6a69e14db98ce098c16935259eb" + integrity sha512-+vSd9frUnapVC2RZYfL3FCB2p3g4TBhaUmrsWlSudsGdnxIuUvBB2QM1VZeBtc49QFwrp+wQLrDs3+xxDgI5gQ== + dependencies: + graceful-fs "^4.1.11" + through2 "^2.0.3" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" @@ -653,6 +1376,11 @@ functions-have-names@^1.2.2: resolved "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== +get-caller-file@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== + get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz" @@ -675,9 +1403,22 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" -glob-parent@^5.1.2: +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA== + +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA== + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" @@ -689,6 +1430,35 @@ glob-parent@^6.0.1: dependencies: is-glob "^4.0.3" +glob-stream@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-6.1.0.tgz#7045c99413b3eb94888d83ab46d0b404cc7bdde4" + integrity sha512-uMbLGAP3S2aDOHUDfdoYcdIePUCfysbAd0IAoWVZbeGU/oNQ8asHVSshLDJUPWxfzj8zsCG7/XeHPHTtow0nsw== + dependencies: + extend "^3.0.0" + glob "^7.1.1" + glob-parent "^3.1.0" + is-negated-glob "^1.0.0" + ordered-read-streams "^1.0.0" + pumpify "^1.3.5" + readable-stream "^2.1.5" + remove-trailing-separator "^1.0.1" + to-absolute-glob "^2.0.0" + unique-stream "^2.0.2" + +glob-watcher@^5.0.3: + version "5.0.5" + resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-5.0.5.tgz#aa6bce648332924d9a8489be41e3e5c52d4186dc" + integrity sha512-zOZgGGEHPklZNjZQaZ9f41i7F2YwE+tS5ZHrDhbBCk3stwahn5vQxnFmBJZHoYdusR6R1bLSXeGUy/BhctwKzw== + dependencies: + anymatch "^2.0.0" + async-done "^1.2.0" + chokidar "^2.0.0" + is-negated-glob "^1.0.0" + just-debounce "^1.0.0" + normalize-path "^3.0.0" + object.defaults "^1.1.0" + glob@7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/glob/-/glob-7.0.0.tgz" @@ -700,6 +1470,18 @@ glob@7.0.0: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.1: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@^7.1.3: version "7.1.4" resolved "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz" @@ -712,6 +1494,26 @@ glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" +global-modules@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" + integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== + dependencies: + global-prefix "^1.0.1" + is-windows "^1.0.1" + resolve-dir "^1.0.0" + +global-prefix@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" + integrity sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg== + dependencies: + expand-tilde "^2.0.2" + homedir-polyfill "^1.0.1" + ini "^1.3.4" + is-windows "^1.0.1" + which "^1.2.14" + globals@^13.15.0: version "13.17.0" resolved "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz" @@ -731,9 +1533,16 @@ globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -graceful-fs@^4.1.15: +glogg@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.2.tgz#2d7dd702beda22eb3bffadf880696da6d846313f" + integrity sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA== + dependencies: + sparkles "^1.0.0" + +graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.2.10" - resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== grapheme-splitter@^1.0.4: @@ -741,11 +1550,57 @@ grapheme-splitter@^1.0.4: resolved "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz" integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== +gulp-cli@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/gulp-cli/-/gulp-cli-2.3.0.tgz#ec0d380e29e52aa45e47977f0d32e18fd161122f" + integrity sha512-zzGBl5fHo0EKSXsHzjspp3y5CONegCm8ErO5Qh0UzFzk2y4tMvzLWhoDokADbarfZRL2pGpRp7yt6gfJX4ph7A== + dependencies: + ansi-colors "^1.0.1" + archy "^1.0.0" + array-sort "^1.0.0" + color-support "^1.1.3" + concat-stream "^1.6.0" + copy-props "^2.0.1" + fancy-log "^1.3.2" + gulplog "^1.0.0" + interpret "^1.4.0" + isobject "^3.0.1" + liftoff "^3.1.0" + matchdep "^2.0.0" + mute-stdout "^1.0.0" + pretty-hrtime "^1.0.0" + replace-homedir "^1.0.0" + semver-greatest-satisfied-range "^1.1.0" + v8flags "^3.2.0" + yargs "^7.1.0" + +gulp@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/gulp/-/gulp-4.0.2.tgz#543651070fd0f6ab0a0650c6a3e6ff5a7cb09caa" + integrity sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA== + dependencies: + glob-watcher "^5.0.3" + gulp-cli "^2.2.0" + undertaker "^1.2.1" + vinyl-fs "^3.0.0" + +gulplog@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" + integrity sha512-hm6N8nrm3Y08jXie48jsC55eCZz9mnb4OirAStEk2deqeyhXU3C1otDVh+ccttMuc1sBi6RX6ZJ720hs9RCvgw== + dependencies: + glogg "^1.0.0" + has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz" integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + has-flag@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" @@ -770,18 +1625,66 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" -has@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q== + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw== + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ== + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ== + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== dependencies: function-bind "^1.1.1" +homedir-polyfill@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" + integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== + dependencies: + parse-passwd "^1.0.0" + +hosted-git-info@^2.1.4: + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== + ignore@^5.1.1, ignore@^5.2.0: version "5.2.0" resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== +immutable@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.1.0.tgz#f795787f0db780183307b9eb2091fcac1f6fafef" + integrity sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ== + import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" @@ -808,6 +1711,16 @@ inherits@2: resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" integrity sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA== +inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ini@^1.3.4: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + internal-slot@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz" @@ -817,6 +1730,38 @@ internal-slot@^1.0.3: has "^1.0.3" side-channel "^1.0.4" +interpret@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ== + +is-absolute@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" + integrity sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA== + dependencies: + is-relative "^1.0.0" + is-windows "^1.0.1" + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A== + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" @@ -829,6 +1774,13 @@ is-bigint@^1.0.1: dependencies: has-bigints "^1.0.1" +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + is-boolean-object@^1.1.0: version "1.1.2" resolved "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz" @@ -837,6 +1789,11 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + is-callable@^1.1.4, is-callable@^1.2.6: version "1.2.7" resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz" @@ -849,23 +1806,86 @@ is-core-module@^2.10.0, is-core-module@^2.8.1, is-core-module@^2.9.0: dependencies: has "^1.0.3" +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg== + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + is-date-object@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz" integrity sha512-P5rExV1phPi42ppoMWy7V63N3i173RY921l4JJ7zonMSxK+OWGPj76GD+cUKUb68l4vQXcJp2SsG+r/A4ABVzg== -is-extglob@^2.1.1: +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^2.1.0, is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw== + dependencies: + number-is-nan "^1.0.0" + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw== + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" +is-negated-glob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-negated-glob/-/is-negated-glob-1.0.0.tgz#6910bca5da8c95e784b5751b976cf5a10fee36d2" + integrity sha512-czXVVn/QEmgvej1f50BZ648vUI+em0xqMq2Sn+QncCLN4zj1UAxlT+kw/6ggQTOaZPd1HqKQGEqbpQVtJucWug== + is-negative-zero@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz" @@ -878,11 +1898,35 @@ is-number-object@^1.0.4: dependencies: has-tostringtag "^1.0.0" +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg== + dependencies: + kind-of "^3.0.2" + +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== + is-number@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-plain-object@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" + integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== + is-regex@^1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz" @@ -891,6 +1935,13 @@ is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-relative@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" + integrity sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA== + dependencies: + is-unc-path "^1.0.0" + is-shared-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz" @@ -912,6 +1963,23 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" +is-unc-path@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d" + integrity sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ== + dependencies: + unc-path-regex "^0.1.2" + +is-utf8@^0.2.0, is-utf8@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q== + +is-valid-glob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa" + integrity sha512-AhiROmoEFDSsjx8hW+5sGwgKVIORcXnrlAx/R0ZSeaPw70Vw0CqkGBBhHGL58Uox2eXnU1AnvXJl1XlyedO5bA== + is-weakref@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz" @@ -919,24 +1987,55 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" +is-windows@^1.0.1, is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA== + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== + +jest-worker@^26.2.1: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" + integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^7.0.0" + jquery@>=3.4.1: - version "3.5.0" - resolved "https://registry.npmjs.org/jquery/-/jquery-3.5.0.tgz" - integrity sha512-Xb7SVYMvygPxbFMpTFQiHh1J7HClEaThguL15N/Gg37Lri/qKyhRGZYzHRyLH8Stq3Aow0LsHO2O2ci86fCrNQ== + version "3.6.1" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.1.tgz#fab0408f8b45fc19f956205773b62b292c147a16" + integrity sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw== js-sdsl@^4.1.4: version "4.1.4" resolved "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.4.tgz" integrity sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw== -"js-tokens@^3.0.0 || ^4.0.0": +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^4.1.0: @@ -976,6 +2075,11 @@ json5@^1.0.1: array-includes "^3.1.5" object.assign "^4.1.3" +just-debounce@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/just-debounce/-/just-debounce-1.1.0.tgz#2f81a3ad4121a76bc7cb45dbf704c0d76a8e5ddf" + integrity sha512-qpcRocdkUmf+UTNBYx5w6dexX5J31AKK1OmPwH630a83DdVVUIngk55RSAiIGpQyoH0dlr872VHfPjnQnK1qDQ== + kidif@1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/kidif/-/kidif-1.1.0.tgz" @@ -983,6 +2087,59 @@ kidif@1.1.0: dependencies: glob "7.0.0" +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw== + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0, kind-of@^5.0.2: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +last-run@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/last-run/-/last-run-1.1.1.tgz#45b96942c17b1c79c772198259ba943bebf8ca5b" + integrity sha512-U/VxvpX4N/rFvPzr3qG5EtLKEnNI0emvIQB3/ecEwv+8GHaUKbIB8vxv1Oai5FAF0d0r7LXHhLLe5K/yChm5GQ== + dependencies: + default-resolution "^2.0.0" + es6-weak-map "^2.0.1" + +lazystream@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.1.tgz#494c831062f1f9408251ec44db1cba29242a2638" + integrity sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw== + dependencies: + readable-stream "^2.0.5" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw== + dependencies: + invert-kv "^1.0.0" + +lead@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lead/-/lead-1.0.0.tgz#6f14f99a37be3a9dd784f5495690e5903466ee42" + integrity sha512-IpSVCk9AYvLHo5ctcIXxOBpMWUe+4TKN3VPWAKUbJikkmsGp0VrSM8IttVc32D6J4WUsiPE6aEFRNmIoF/gdow== + dependencies: + flush-write-stream "^1.0.2" + levn@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" @@ -991,6 +2148,31 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" +liftoff@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-3.1.0.tgz#c9ba6081f908670607ee79062d700df062c52ed3" + integrity sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog== + dependencies: + extend "^3.0.0" + findup-sync "^3.0.0" + fined "^1.0.1" + flagged-respawn "^1.0.0" + is-plain-object "^2.0.4" + object.map "^1.0.0" + rechoir "^0.6.2" + resolve "^1.1.7" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + integrity sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A== + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + load-json-file@^5.2.0: version "5.3.0" resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz" @@ -1036,16 +2218,64 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -mdn-data@~1.1.0: - version "1.1.4" - resolved "https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz" - integrity sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA== +make-iterator@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6" + integrity sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw== + dependencies: + kind-of "^6.0.2" + +map-cache@^0.2.0, map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg== + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w== + dependencies: + object-visit "^1.0.0" + +matchdep@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/matchdep/-/matchdep-2.0.0.tgz#c6f34834a0d8dbc3b37c27ee8bbcb27c7775582e" + integrity sha512-LFgVbaHIHMqCRuCZyfCtUOq9/Lnzhi7Z0KFUE2fhD54+JN2jLh3hC02RLkqauJ3U4soU6H1J3tfj/Byk7GoEjA== + dependencies: + findup-sync "^2.0.0" + micromatch "^3.0.4" + resolve "^1.4.0" + stack-trace "0.0.10" + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== +micromatch@^3.0.4, micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + micromatch@^4.0.4: version "4.0.5" resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" @@ -1054,9 +2284,9 @@ micromatch@^4.0.4: braces "^3.0.2" picomatch "^2.3.1" -"minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.1.2: +"minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" @@ -1066,6 +2296,14 @@ minimist@^1.2.0, minimist@^1.2.6: resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + ms@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" @@ -1081,16 +2319,86 @@ mustache@2.3.0: resolved "https://registry.npmjs.org/mustache/-/mustache-2.3.0.tgz" integrity sha512-IgZ/cCHtDG1ft0vdDV9wrlNz20SvbUu2ECoDF6dhk2ZtedLNy1Kehy4oFlzmHPxcUQmVZuXYS2j+d0NkaEjTXQ== +mute-stdout@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mute-stdout/-/mute-stdout-1.0.1.tgz#acb0300eb4de23a7ddeec014e3e96044b3472331" + integrity sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg== + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== +next-tick@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== + +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w== + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +now-and-later@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/now-and-later/-/now-and-later-2.0.1.tgz#8e579c8685764a7cc02cb680380e94f43ccb1f7c" + integrity sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ== + dependencies: + once "^1.3.2" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ== + object-assign@^4.1.1: version "4.1.1" resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ== + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + object-inspect@^1.12.2, object-inspect@^1.9.0: version "1.12.2" resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz" @@ -1101,9 +2409,16 @@ object-keys@^1.1.1: resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.1.3, object.assign@^4.1.4: +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA== + dependencies: + isobject "^3.0.0" + +object.assign@^4.0.4, object.assign@^4.1.0, object.assign@^4.1.3, object.assign@^4.1.4: version "4.1.4" - resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== dependencies: call-bind "^1.0.2" @@ -1111,6 +2426,16 @@ object.assign@^4.1.3, object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" +object.defaults@^1.0.0, object.defaults@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/object.defaults/-/object.defaults-1.1.0.tgz#3a7f868334b407dea06da16d88d5cd29e435fecf" + integrity sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA== + dependencies: + array-each "^1.0.1" + array-slice "^1.0.0" + for-own "^1.0.0" + isobject "^3.0.0" + object.entries@^1.1.5: version "1.1.5" resolved "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz" @@ -1137,6 +2462,29 @@ object.hasown@^1.1.1: define-properties "^1.1.4" es-abstract "^1.19.5" +object.map@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz#cf83e59dc8fcc0ad5f4250e1f78b3b81bd801d37" + integrity sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w== + dependencies: + for-own "^1.0.0" + make-iterator "^1.0.0" + +object.pick@^1.2.0, object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ== + dependencies: + isobject "^3.0.1" + +object.reduce@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object.reduce/-/object.reduce-1.0.1.tgz#6fe348f2ac7fa0f95ca621226599096825bb03ad" + integrity sha512-naLhxxpUESbNkRqc35oQ2scZSJueHGQNUfMW/0U37IgN6tE2dgDWg3whf+NEliy3F/QysrO48XKUz/nGPe+AQw== + dependencies: + for-own "^1.0.0" + make-iterator "^1.0.0" + object.values@^1.1.5: version "1.1.5" resolved "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz" @@ -1146,9 +2494,9 @@ object.values@^1.1.5: define-properties "^1.1.3" es-abstract "^1.19.1" -once@^1.3.0: +once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.4.0: version "1.4.0" - resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" @@ -1165,6 +2513,20 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" +ordered-read-streams@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz#77c0cb37c41525d64166d990ffad7ec6a0e1363e" + integrity sha512-Z87aSjx3r5c0ZB7bcJqIgIRX5bxR7A4aSzvIbaxd0oTkWBCOoKfuGHiKj60CHVUgg1Phm5yMZzBdt8XqRs73Mw== + dependencies: + readable-stream "^2.0.1" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + integrity sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g== + dependencies: + lcid "^1.0.0" + p-limit@^2.0.0: version "2.3.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" @@ -1205,6 +2567,22 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" +parse-filepath@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891" + integrity sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q== + dependencies: + is-absolute "^1.0.0" + map-cache "^0.2.0" + path-root "^0.1.1" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ== + dependencies: + error-ex "^1.2.0" + parse-json@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz" @@ -1213,6 +2591,33 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" +parse-node-version@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz#e2b5dbede00e7fa9bc363607f53327e8b073189b" + integrity sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA== + +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw== + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q== + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ== + dependencies: + pinkie-promise "^2.0.0" + path-exists@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz" @@ -1238,21 +2643,59 @@ path-parse@^1.0.7: resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== +path-root-regex@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" + integrity sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ== + +path-root@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7" + integrity sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg== + dependencies: + path-root-regex "^0.1.0" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + integrity sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg== + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + path-type@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== + pify@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz" integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw== + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== + pkg-conf@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz" @@ -1261,11 +2704,26 @@ pkg-conf@^3.1.0: find-up "^3.0.0" load-json-file "^5.2.0" +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== +pretty-hrtime@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" + integrity sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A== + +process-nextick-args@^2.0.0, process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + prop-types@^15.8.1: version "15.8.1" resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz" @@ -1275,6 +2733,23 @@ prop-types@^15.8.1: object-assign "^4.1.1" react-is "^16.13.1" +pump@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" + integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pumpify@^1.3.5: + version "1.5.1" + resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" + integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== + dependencies: + duplexify "^3.6.0" + inherits "^2.0.3" + pump "^2.0.0" + punycode@^2.1.0: version "2.1.1" resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" @@ -1285,11 +2760,70 @@ queue-microtask@^1.2.2: resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + react-is@^16.13.1: version "16.13.1" resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + integrity sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A== + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + integrity sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ== + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.5, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw== + dependencies: + resolve "^1.1.6" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + regexp.prototype.flags@^1.4.1, regexp.prototype.flags@^1.4.3: version "1.4.3" resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz" @@ -1304,14 +2838,90 @@ regexpp@^3.0.0, regexpp@^3.2.0: resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== +remove-bom-buffer@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz#c2bf1e377520d324f623892e33c10cac2c252b53" + integrity sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ== + dependencies: + is-buffer "^1.1.5" + is-utf8 "^0.2.1" + +remove-bom-stream@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz#05f1a593f16e42e1fb90ebf59de8e569525f9523" + integrity sha512-wigO8/O08XHb8YPzpDDT+QmRANfW6vLqxfaXm1YXhnFf3AkSLyjfG3GEFg4McZkmgL7KvCj5u2KczkvSP6NfHA== + dependencies: + remove-bom-buffer "^3.0.0" + safe-buffer "^5.1.0" + through2 "^2.0.3" + +remove-trailing-separator@^1.0.1, remove-trailing-separator@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw== + +repeat-element@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" + integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== + +repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== + +replace-ext@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.1.tgz#2d6d996d04a15855d967443631dd5f77825b016a" + integrity sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw== + +replace-homedir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/replace-homedir/-/replace-homedir-1.0.0.tgz#e87f6d513b928dde808260c12be7fec6ff6e798c" + integrity sha512-CHPV/GAglbIB1tnQgaiysb8H2yCy8WQ7lcEwQ/eT+kLj0QHV8LnJW0zpqpE7RSkrMSRoa+EBoag86clf7WAgSg== + dependencies: + homedir-polyfill "^1.0.1" + is-absolute "^1.0.0" + remove-trailing-separator "^1.1.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug== + +resolve-dir@^1.0.0, resolve-dir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" + integrity sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg== + dependencies: + expand-tilde "^2.0.0" + global-modules "^1.0.0" + resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1: +resolve-options@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/resolve-options/-/resolve-options-1.1.0.tgz#32bb9e39c06d67338dc9378c0d6d6074566ad131" + integrity sha512-NYDgziiroVeDC29xq7bp/CacZERYsA9bXYd1ZmcJlF3BcrZv5pTb4NG7SjdyKDnXZ84aC4vo2u6sNKIA1LCu/A== + dependencies: + value-or-function "^3.0.0" + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg== + +resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1, resolve@^1.4.0: version "1.22.1" - resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== dependencies: is-core-module "^2.9.0" @@ -1327,6 +2937,11 @@ resolve@^2.0.0-next.3: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + reusify@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" @@ -1339,6 +2954,23 @@ rimraf@^3.0.2: dependencies: glob "^7.1.3" +rollup-plugin-terser@7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz#e8fbba4869981b2dc35ae7e8a502d5c6c04d324d" + integrity sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ== + dependencies: + "@babel/code-frame" "^7.10.4" + jest-worker "^26.2.1" + serialize-javascript "^4.0.0" + terser "^5.0.0" + +rollup@2.79.1: + version "2.79.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7" + integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw== + optionalDependencies: + fsevents "~2.3.2" + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" @@ -1346,6 +2978,16 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" +safe-buffer@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + safe-regex-test@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz" @@ -1355,6 +2997,34 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.1.3" is-regex "^1.1.4" +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg== + dependencies: + ret "~0.1.10" + +sass@1.55.0: + version "1.55.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.55.0.tgz#0c4d3c293cfe8f8a2e8d3b666e1cf1bff8065d1c" + integrity sha512-Pk+PMy7OGLs9WaxZGJMn7S96dvlyVBwwtToX895WmCpAOr5YiJYEUJfiJidMuKb613z2xNWcXCHEuOvjZbqC6A== + dependencies: + chokidar ">=3.0.0 <4.0.0" + immutable "^4.0.0" + source-map-js ">=0.6.2 <2.0.0" + +semver-greatest-satisfied-range@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz#13e8c2658ab9691cb0cd71093240280d36f77a5b" + integrity sha512-Ny/iyOzSSa8M5ML46IAx3iXc6tfOsYU2R4AXi2UpHk60Zrgyq6eqPj/xiOfS0rRl/iiQ/rdJkVjw/5cdUyCntQ== + dependencies: + sver-compat "^1.5.0" + +"semver@2 || 3 || 4 || 5": + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + semver@^6.3.0: version "6.3.0" resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" @@ -1367,6 +3037,28 @@ semver@^7.0.0, semver@^7.3.7: dependencies: lru-cache "^6.0.0" +serialize-javascript@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" + integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== + dependencies: + randombytes "^2.1.0" + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== + +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" @@ -1393,11 +3085,118 @@ slash@^3.0.0: resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -source-map@^0.5.3: +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +"source-map-js@>=0.6.2 <2.0.0": + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + +source-map-resolve@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" + integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== + +source-map@^0.5.6: version "0.5.7" resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz" integrity "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==" +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +sparkles@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.1.tgz#008db65edce6c50eec0c5e228e1945061dd0437c" + integrity sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw== + +spdx-correct@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.12" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz#69077835abe2710b65f03969898b6637b505a779" + integrity sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA== + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +stack-trace@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + integrity sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg== + standard-engine@^15.0.0: version "15.0.0" resolved "https://registry.npmjs.org/standard-engine/-/standard-engine-15.0.0.tgz" @@ -1422,6 +3221,33 @@ standard@17.0.0: eslint-plugin-react "^7.28.0" standard-engine "^15.0.0" +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g== + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +stream-exhaust@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/stream-exhaust/-/stream-exhaust-1.0.2.tgz#acdac8da59ef2bc1e17a2c0ccf6c320d120e555d" + integrity sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw== + +stream-shift@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" + integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw== + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + string.prototype.matchall@^4.0.7: version "4.0.7" resolved "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.7.tgz" @@ -1454,6 +3280,20 @@ string.prototype.trimstart@^1.0.5: define-properties "^1.1.4" es-abstract "^1.19.5" +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== + dependencies: + ansi-regex "^2.0.0" + strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" @@ -1461,6 +3301,13 @@ strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g== + dependencies: + is-utf8 "^0.2.0" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" @@ -1471,9 +3318,16 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -supports-color@^7.1.0: +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.0.0, supports-color@^7.1.0: version "7.2.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" @@ -1483,11 +3337,73 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +sver-compat@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/sver-compat/-/sver-compat-1.5.0.tgz#3cf87dfeb4d07b4a3f14827bc186b3fd0c645cd8" + integrity sha512-aFTHfmjwizMNlNE6dsGmoAM4lHjL0CyiobWaFiXWSlD7cIxshW422Nb8KbXCmR6z+0ZEPY+daXJrDyh/vuwTyg== + dependencies: + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" + +terser@^5.0.0: + version "5.15.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.15.0.tgz#e16967894eeba6e1091509ec83f0c60e179f2425" + integrity sha512-L1BJiXVmheAQQy+as0oF3Pwtlo4s3Wi1X2zNZ2NxOB4wx9bdS9Vk67XQENLFdLYGCK/Z2di53mTj/hBafR+dTA== + dependencies: + "@jridgewell/source-map" "^0.3.2" + acorn "^8.5.0" + commander "^2.20.0" + source-map-support "~0.5.20" + text-table@^0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== +through2-filter@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-3.0.0.tgz#700e786df2367c2c88cd8aa5be4cf9c1e7831254" + integrity sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA== + dependencies: + through2 "~2.0.0" + xtend "~4.0.0" + +through2@^2.0.0, through2@^2.0.3, through2@~2.0.0: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + +time-stamp@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" + integrity sha512-gLCeArryy2yNTRzTGKbZbloctj64jkZ57hj5zdraXue6aFgd6PmvVtEyiUU+hvU0v7q08oVv8r8ev0tRo6bvgw== + +to-absolute-glob@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1865f43d9e74b0822db9f145b78cff7d0f7c849b" + integrity sha512-rtwLUQEwT8ZeKQbyFJyomBRYXyE16U5VKuy0ftxLMK/PZb2fkOsg5r9kHdauuVDbsNdIBoC/HCthpidamQFXYA== + dependencies: + is-absolute "^1.0.0" + is-negated-glob "^1.0.0" + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg== + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg== + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" @@ -1495,6 +3411,23 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +to-through@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-through/-/to-through-2.0.0.tgz#fc92adaba072647bc0b67d6b03664aa195093af6" + integrity sha512-+QIz37Ly7acM4EMdw2PRN389OneM5+d844tirkGp4dPKzI5OE72V9OsbFp+CIYJDahZ41ZV05hNtcPAQUAm9/Q== + dependencies: + through2 "^2.0.3" + tsconfig-paths@^3.14.1: version "3.14.1" resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz" @@ -1522,10 +3455,20 @@ type-fest@^0.3.0: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz" integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== -uglify-js@3.17.2: - version "3.17.2" - resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.2.tgz" - integrity sha512-bbxglRjsGQMchfvXZNusUcYgiB9Hx2K4AHYXQy2DITZ9Rd+JzhX7+hoocE5Winr7z2oHvPsekkBwXtigvxevXg== +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== unbox-primitive@^1.0.2: version "1.0.2" @@ -1537,6 +3480,58 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +unc-path-regex@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" + integrity sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg== + +undertaker-registry@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/undertaker-registry/-/undertaker-registry-1.0.1.tgz#5e4bda308e4a8a2ae584f9b9a4359a499825cc50" + integrity sha512-UR1khWeAjugW3548EfQmL9Z7pGMlBgXteQpr1IZeZBtnkCJQJIJ1Scj0mb9wQaPvUZ9Q17XqW6TIaPchJkyfqw== + +undertaker@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/undertaker/-/undertaker-1.3.0.tgz#363a6e541f27954d5791d6fa3c1d321666f86d18" + integrity sha512-/RXwi5m/Mu3H6IHQGww3GNt1PNXlbeCuclF2QYR14L/2CHPz3DFZkvB5hZ0N/QUkiXWCACML2jXViIQEQc2MLg== + dependencies: + arr-flatten "^1.0.1" + arr-map "^2.0.0" + bach "^1.0.0" + collection-map "^1.0.0" + es6-weak-map "^2.0.1" + fast-levenshtein "^1.0.0" + last-run "^1.1.0" + object.defaults "^1.0.0" + object.reduce "^1.0.0" + undertaker-registry "^1.0.0" + +union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + +unique-stream@^2.0.2: + version "2.3.1" + resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.3.1.tgz#c65d110e9a4adf9a6c5948b28053d9a8d04cbeac" + integrity sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A== + dependencies: + json-stable-stringify-without-jsonify "^1.0.1" + through2-filter "^3.0.0" + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ== + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" @@ -1544,6 +3539,89 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg== + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +v8flags@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.2.0.tgz#b243e3b4dfd731fa774e7492128109a0fe66d656" + integrity sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg== + dependencies: + homedir-polyfill "^1.0.1" + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +value-or-function@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813" + integrity sha512-jdBB2FrWvQC/pnPtIqcLsMaQgjhdb6B7tk1MMyTKapox+tQZbdRP4uLxu/JY0t7fbfDCUMnuelzEYv5GsxHhdg== + +vinyl-fs@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-3.0.3.tgz#c85849405f67428feabbbd5c5dbdd64f47d31bc7" + integrity sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng== + dependencies: + fs-mkdirp-stream "^1.0.0" + glob-stream "^6.1.0" + graceful-fs "^4.0.0" + is-valid-glob "^1.0.0" + lazystream "^1.0.0" + lead "^1.0.0" + object.assign "^4.0.4" + pumpify "^1.3.5" + readable-stream "^2.3.3" + remove-bom-buffer "^3.0.0" + remove-bom-stream "^1.2.0" + resolve-options "^1.1.0" + through2 "^2.0.0" + to-through "^2.0.0" + value-or-function "^3.0.0" + vinyl "^2.0.0" + vinyl-sourcemap "^1.1.0" + +vinyl-sourcemap@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz#92a800593a38703a8cdb11d8b300ad4be63b3e16" + integrity sha512-NiibMgt6VJGJmyw7vtzhctDcfKch4e4n9TBeoWlirb7FMg9/1Ov9k+A5ZRAtywBpRPiyECvQRQllYM8dECegVA== + dependencies: + append-buffer "^1.0.2" + convert-source-map "^1.5.0" + graceful-fs "^4.1.6" + normalize-path "^2.1.1" + now-and-later "^2.0.0" + remove-bom-buffer "^3.0.0" + vinyl "^2.0.0" + +vinyl@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.1.tgz#23cfb8bbab5ece3803aa2c0a1eb28af7cbba1974" + integrity sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw== + dependencies: + clone "^2.1.1" + clone-buffer "^1.0.0" + clone-stats "^1.0.0" + cloneable-readable "^1.0.0" + remove-trailing-separator "^1.0.1" + replace-ext "^1.0.0" + which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz" @@ -1555,6 +3633,18 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + integrity sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ== + +which@^1.2.14: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + which@^2.0.1: version "2.0.2" resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" @@ -1567,6 +3657,14 @@ word-wrap@^1.2.3: resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw== + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrappy@1: version "1.0.2" resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" @@ -1577,11 +3675,48 @@ xdg-basedir@^4.0.0: resolved "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz" integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== +xtend@~4.0.0, xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +y18n@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" + integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== + yallist@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yargs-parser@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.1.tgz#7ede329c1d8cdbbe209bd25cdb990e9b1ebbb394" + integrity sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA== + dependencies: + camelcase "^3.0.0" + object.assign "^4.1.0" + +yargs@^7.1.0: + version "7.1.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.2.tgz#63a0a5d42143879fdbb30370741374e0641d55db" + integrity sha512-ZEjj/dQYQy0Zx0lgLMLR8QuaqTihnxirir7EwUHp1Axq4e3+k8jXU5K0VLbNvedv1f4EWtBonDIZm0NUr+jCcA== + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^5.0.1" + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" From 81d0404388f9f15a14ea897faa79baf53028649e Mon Sep 17 00:00:00 2001 From: Zack Schuster Date: Tue, 27 Sep 2022 22:40:14 -0700 Subject: [PATCH 04/32] deps: eliminate jquery --- README.md | 3 +- data/docs.json | 5 -- examples/2005-animation-speed.example | 8 ++-- examples/2006-spare-pieces.example | 6 +-- examples/3000-get-position.example | 22 ++++----- examples/3001-set-position.example | 18 ++----- examples/3002-set-position-instant.example | 40 +++++----------- examples/3003-clear.example | 12 ++--- examples/3004-move-pieces.example | 14 ++---- examples/3005-orientation.example | 39 ++++++--------- examples/3006-destroy.example | 4 +- examples/3007-resize.example | 4 +- examples/4000-onchange.example | 25 ++++------ .../4002-ondragstart-prevent-drag.example | 24 ++++------ examples/4012-onmoveend.example | 31 +++++------- examples/5000-legal-moves.example | 6 +-- examples/5003-highlight-legal-moves.example | 4 +- examples/5004-piece-highlight1.example | 26 +++++----- examples/5005-piece-highlight2.example | 2 +- package.json | 3 -- templates/docs.mustache | 40 +++++++--------- templates/download.mustache | 14 +----- templates/examples.mustache | 1 - templates/homepage.mustache | 17 +++---- templates/single-example.mustache | 1 - website/js/examples.js | 47 ++++++++++--------- website/js/jquery-3.4.1.min.js | 2 - website/js/jquery.color-2.1.2.min.js | 2 - yarn.lock | 33 ++----------- 29 files changed, 165 insertions(+), 288 deletions(-) delete mode 100644 website/js/jquery-3.4.1.min.js delete mode 100644 website/js/jquery.color-2.1.2.min.js diff --git a/README.md b/README.md index 70df69f5..24015102 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # chessboard.js -chessboard.js is a JavaScript chessboard component. It depends on [jQuery] v3.4.1 (or higher). +chessboard.js is a _zero-dependency_ JavaScript chessboard component. Please see [chessboardjs.com] for documentation and examples. @@ -53,7 +53,6 @@ npm run website [MIT License](LICENSE.md) -[jQuery]:https://jquery.com/ [chessboardjs.com]:https://chessboardjs.com [chess.js]:https://github.com/jhlywa/chess.js [Example 5000]:https://chessboardjs.com/examples#5000 diff --git a/data/docs.json b/data/docs.json index a6e1392d..77fbd2ed 100644 --- a/data/docs.json +++ b/data/docs.json @@ -434,11 +434,6 @@ "desc":"The first argument to Chessboard() must be an ID or a single DOM node.", "fix":"The first argument to the Chessboard() constructor should be the id of a DOM element or a reference to a single DOM element." }, -{ - "id":1005, - "desc":"Unable to find a valid version of jQuery. Please include jQuery 1.8.3 or higher on the page.", - "fix":"Chessboard requires jQuery version 1.8.3 or higher." -}, { "id":2826, "desc":"Invalid move passed to the move method.", diff --git a/examples/2005-animation-speed.example b/examples/2005-animation-speed.example index 597bea9f..a970e399 100644 --- a/examples/2005-animation-speed.example +++ b/examples/2005-animation-speed.example @@ -13,7 +13,7 @@ You can control animation speeds with the < ===== JS -var board = new Chessboard('myBoard', { +const board = new Chessboard('myBoard', { draggable: true, moveSpeed: 'slow', snapbackSpeed: 500, @@ -21,7 +21,5 @@ var board = new Chessboard('myBoard', { position: 'start' }) -$('#ruyLopezBtn').on('click', function () { - board.position('r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R') -}) -$('#startBtn').on('click', () => board.start()) +document.getElementById('ruyLopezBtn').onclick = () => board.position('r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R') +document.getElementById('startBtn').onclick = () => board.start() diff --git a/examples/2006-spare-pieces.example b/examples/2006-spare-pieces.example index a5dbcd3d..38f65d39 100644 --- a/examples/2006-spare-pieces.example +++ b/examples/2006-spare-pieces.example @@ -13,11 +13,11 @@ Set sparePiecesClear Board ===== JS -var board = new Chessboard('myBoard', { +const board = new Chessboard('myBoard', { draggable: true, dropOffBoard: 'trash', sparePieces: true }) -$('#startBtn').on('click', () => board.start()) -$('#clearBtn').on('click', () => board.clear()) +document.getElementById('startBtn').onclick = () => board.start() +document.getElementById('clearBtn').onclick = () => board.clear() diff --git a/examples/3000-get-position.example b/examples/3000-get-position.example index 6aadc63d..18e50846 100644 --- a/examples/3000-get-position.example +++ b/examples/3000-get-position.example @@ -1,17 +1,17 @@ ===== id 3000 -===== Name -Get Position - -===== Description -Use the position and fen methods to retrieve the current position of the board. - -===== HTML -
+===== Name +Get Position + +===== Description +Use the position and fen methods to retrieve the current position of the board. + +===== HTML +
- -===== JS + +===== JS var config = { draggable: true, position: 'start' @@ -26,4 +26,4 @@ function clickShowPositionBtn () { console.log(board.fen()) } -$('#showPositionBtn').on('click', clickShowPositionBtn) +document.getElementById('showPositionBtn').onclick = (evt) => clickShowPositionBtn(evt) diff --git a/examples/3001-set-position.example b/examples/3001-set-position.example index fe2d01fe..5381404e 100644 --- a/examples/3001-set-position.example +++ b/examples/3001-set-position.example @@ -14,18 +14,8 @@ Use the startRook Checkmate ===== JS -var board = new Chessboard('myBoard') +const board = new Chessboard('myBoard') -$('#setRuyLopezBtn').on('click', function () { - board.position('r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R') -}) - -$('#setStartBtn').on('click', () => board.start()) - -$('#setRookCheckmateBtn').on('click', function () { - board.position({ - a4: 'bK', - c4: 'wK', - a7: 'wR' - }) -}) +document.getElementById('setRuyLopezBtn').onclick = () => board.position('r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R') +document.getElementById('setStartBtn').onclick = () => board.start() +document.getElementById('setRookCheckmateBtn').onclick = () => board.position({ a4: 'bK', c4: 'wK', a7: 'wR' }) diff --git a/examples/3002-set-position-instant.example b/examples/3002-set-position-instant.example index 08e5ad15..5516f099 100644 --- a/examples/3002-set-position-instant.example +++ b/examples/3002-set-position-instant.example @@ -1,35 +1,21 @@ ===== id 3002 -===== Name -Set Position Instantly - -===== Description -Pass false as the second argument to the start and position methods to set the board position instantly. - -===== HTML -
+===== Name +Set Position Instantly + +===== Description +Pass false as the second argument to the start and position methods to set the board position instantly. + +===== HTML +
- -===== JS -var board = Chessboard('myBoard') - -$('#setRuyLopezBtn').on('click', function () { - var ruyLopez = 'r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R' - board.position(ruyLopez, false) -}) -$('#setStartBtn').on('click', function () { - board.start(false) -}) +===== JS +const board = Chessboard('myBoard') -$('#setRookCheckmateBtn').on('click', function () { - var rookCheckmate = { - a4: 'bK', - c4: 'wK', - a7: 'wR' - } - board.position(rookCheckmate, false) -}) +document.getElementById('setRuyLopezBtn').onclick = () => board.position('r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R', false) +document.getElementById('setStartBtn').onclick = () => board.start(false) +document.getElementById('setRookCheckmateBtn').onclick = () => board.position({ a4: 'bK', c4: 'wK', a7: 'wR' }, false) diff --git a/examples/3003-clear.example b/examples/3003-clear.example index 26815644..439703b6 100644 --- a/examples/3003-clear.example +++ b/examples/3003-clear.example @@ -14,12 +14,8 @@ Use the clearClear Board Instant ===== JS -var board = new Chessboard('myBoard', 'start') +const board = new Chessboard('myBoard', 'start') -$('#clearBoardBtn').on('click', () => board.clear()) - -$('#startPositionBtn').on('click', () => board.start()) - -$('#clearBoardInstantBtn').on('click', function () { - board.clear(false) -}) +document.getElementById('clearBoardBtn').onclick = () => board.clear() +document.getElementById('startPositionBtn').onclick = () => board.start() +document.getElementById('clearBoardInstantBtn').onclick = () => board.clear(false) diff --git a/examples/3004-move-pieces.example b/examples/3004-move-pieces.example index c31adf16..3a804062 100644 --- a/examples/3004-move-pieces.example +++ b/examples/3004-move-pieces.example @@ -14,14 +14,8 @@ Use the move ===== JS -var board = new Chessboard('myBoard', 'start') +const board = new Chessboard('myBoard', 'start') -$('#move1Btn').on('click', function () { - board.move('e2-e4') -}) - -$('#move2Btn').on('click', function () { - board.move('d2-d4', 'g8-f6') -}) - -$('#startPositionBtn').on('click', () => board.start()) +document.getElementById('move1Btn').onclick = () => board.move('e2-e4') +document.getElementById('move2Btn').onclick = () => board.move('d2-d4', 'g8-f6') +document.getElementById('startPositionBtn').onclick = () => board.start() diff --git a/examples/3005-orientation.example b/examples/3005-orientation.example index b3221564..af95bbdc 100644 --- a/examples/3005-orientation.example +++ b/examples/3005-orientation.example @@ -1,34 +1,25 @@ ===== id 3005 -===== Name -Orientation - -===== Description -Use the orientation method to retrieve and set the orientation. Use the flip method to flip orientation. - -===== HTML -
+===== Name +Orientation + +===== Description +Use the orientation method to retrieve and set the orientation. Use the flip method to flip orientation. + +===== HTML +

-===== JS -var ruyLopez = 'r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R' -var board = Chessboard('myBoard', ruyLopez) - -$('#showOrientationBtn').on('click', function () { - console.log('Board orientation is: ' + board.orientation()) -}) - -$('#flipOrientationBtn').on('click', board.flip) - -$('#whiteOrientationBtn').on('click', function () { - board.orientation('white') -}) +===== JS +const ruyLopez = 'r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R' +const board = Chessboard('myBoard', ruyLopez) -$('#blackOrientationBtn').on('click', function () { - board.orientation('black') -}) +document.getElementById('showOrientationBtn').onclick = () => console.log('Board orientation is: ' + board.orientation()) +document.getElementById('flipOrientationBtn').onclick = () => board.flip() +document.getElementById('whiteOrientationBtn').onclick = () => board.orientation('white') +document.getElementById('blackOrientationBtn').onclick = () => board.orientation('black') diff --git a/examples/3006-destroy.example b/examples/3006-destroy.example index f7f30ed4..34fda93f 100644 --- a/examples/3006-destroy.example +++ b/examples/3006-destroy.example @@ -12,6 +12,6 @@ Use the destroyDestroy Board ===== JS -var board = Chessboard('myBoard', 'start') +const board = Chessboard('myBoard', 'start') -$('#destroyBtn').on('click', board.destroy) +document.getElementById('destroyBtn').onclick = () => board.destroy() diff --git a/examples/3007-resize.example b/examples/3007-resize.example index 3a4fc1e4..bdd8885a 100644 --- a/examples/3007-resize.example +++ b/examples/3007-resize.example @@ -12,5 +12,5 @@ Use the resize< ===== JS // NOTE: click "View example in new window." to see the full effect of this example -var board = Chessboard('myBoard', 'start') -$(window).resize(board.resize) +const board = Chessboard('myBoard', 'start') +window.onresize = () => board.resize() diff --git a/examples/4000-onchange.example b/examples/4000-onchange.example index 95b4328b..6a7713a1 100644 --- a/examples/4000-onchange.example +++ b/examples/4000-onchange.example @@ -13,23 +13,16 @@ The onChangeStart Position ===== JS -function onChange (oldPos, newPos) { - console.log('Position changed:') - console.log('Old position: ' + Chessboard.objToFen(oldPos)) - console.log('New position: ' + Chessboard.objToFen(newPos)) - console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~') -} - -var config = { +const board = new Chessboard('myBoard', { draggable: true, position: 'start', - onChange: onChange -} -var board = new Chessboard('myBoard', config) - -$('#ruyLopezBtn').on('click', function () { - var ruyLopez = 'r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R' - board.position(ruyLopez) + onChange(oldPos, newPos) { + console.log('Position changed:') + console.log('Old position: ' + Chessboard.objToFen(oldPos)) + console.log('New position: ' + Chessboard.objToFen(newPos)) + console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~') + } }) -$('#startPositionBtn').on('click', () => board.start()) +document.getElementById('ruyLopezBtn').onclick = () => board.position('r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R') +document.getElementById('startPositionBtn').onclick = () => board.start() diff --git a/examples/4002-ondragstart-prevent-drag.example b/examples/4002-ondragstart-prevent-drag.example index d63cf86a..8fe0c0c0 100644 --- a/examples/4002-ondragstart-prevent-drag.example +++ b/examples/4002-ondragstart-prevent-drag.example @@ -12,20 +12,16 @@ Prevent the drag action by returning false from ===== JS -// only allow pieces to be dragged when the board is oriented -// in their direction -function onDragStart (source, piece, position, orientation) { - if ((orientation === 'white' && piece.search(/^w/) === -1) || - (orientation === 'black' && piece.search(/^b/) === -1)) { - return false - } -} - -var config = { +const board = Chessboard('myBoard', { draggable: true, position: 'start', - onDragStart: onDragStart -} -var board = Chessboard('myBoard', config) + // only allow pieces to be dragged when the board is oriented in their direction + onDragStart(source, piece, position, orientation) { + if ((orientation === 'white' && piece.search(/^w/) === -1) || + (orientation === 'black' && piece.search(/^b/) === -1)) { + return false + } + } +}) -$('#flipOrientationBtn').on('click', board.flip) +document.getElementById('flipOrientationBtn').onclick = board.flip() diff --git a/examples/4012-onmoveend.example b/examples/4012-onmoveend.example index 22e5b40a..a3cff971 100644 --- a/examples/4012-onmoveend.example +++ b/examples/4012-onmoveend.example @@ -15,24 +15,17 @@ The onMoveEnd ===== JS -function onMoveEnd (oldPos, newPos) { - console.log('Move animation complete:') - console.log('Old position: ' + Chessboard.objToFen(oldPos)) - console.log('New position: ' + Chessboard.objToFen(newPos)) - console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~') -} - -var config = { +const board = new Chessboard('myBoard', { position: 'start', - onMoveEnd: onMoveEnd -} -var board = new Chessboard('myBoard', config) - -$('#ruyLopezBtn').on('click', function () { - board.position('r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R') + onMoveEnd(oldPos, newPos) { + console.log('Move animation complete:') + console.log('Old position: ' + Chessboard.objToFen(oldPos)) + console.log('New position: ' + Chessboard.objToFen(newPos)) + console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~') + } }) -$('#moveBtn').on('click', function () { - board.move('a2-a4', 'h7-h5') -}) -$('#startBtn').on('click', () => board.start()) -$('#clearBtn').on('click', () => board.clear()) + +document.getElementById('ruyLopezBtn').onclick = () => board.position('r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R') +document.getElementById('moveBtn').onclick = () => board.move('a2-a4', 'h7-h5') +document.getElementById('startBtn').onclick = () => board.start() +document.getElementById('clearBtn').onclick = () => board.clear() diff --git a/examples/5000-legal-moves.example b/examples/5000-legal-moves.example index 1175a792..df014cde 100644 --- a/examples/5000-legal-moves.example +++ b/examples/5000-legal-moves.example @@ -22,9 +22,9 @@ You can integrate chessboard.js with the +===== Name +Piece Highlighting 1 + +===== Description +Use CSS to show piece highlighting. + +===== HTML + -
- +
+ ===== JS // NOTE: this example uses the chess.js library: // https://github.com/jhlywa/chess.js var board = null -var $board = $('#myBoard') +var $board = document.getElementById('myBoard') var game = new Chess() var squareClass = 'square-55d63' var squareToHighlight = null diff --git a/examples/5005-piece-highlight2.example b/examples/5005-piece-highlight2.example index 933ed067..cfc1d745 100644 --- a/examples/5005-piece-highlight2.example +++ b/examples/5005-piece-highlight2.example @@ -23,7 +23,7 @@ Use CSS to show piece highlighting. // https://github.com/jhlywa/chess.js var board = null -var $board = $('#myBoard') +var $board = document.getElementById('myBoard') var game = new Chess() var squareToHighlight = null var squareClass = 'square-55d63' diff --git a/package.json b/package.json index 812bf8b7..daa55845 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,6 @@ "files": [ "dist/" ], - "dependencies": { - "jquery": ">=3.4.1" - }, "devDependencies": { "@types/node": "18.7.23", "gulp": "4.0.2", diff --git a/templates/docs.mustache b/templates/docs.mustache index 39c0ce23..458b57a4 100644 --- a/templates/docs.mustache +++ b/templates/docs.mustache @@ -92,30 +92,27 @@ {{{footer}}} - - diff --git a/templates/download.mustache b/templates/download.mustache index 2a984e11..f1a9b470 100644 --- a/templates/download.mustache +++ b/templates/download.mustache @@ -29,18 +29,8 @@ yarn add @chrisoakman/chessboardjs

Content Delivery Network

You can use chessboardjs via the unpkg CDN with the following links: -

<link rel="stylesheet"
-      href="https://unpkg.com/@chrisoakman/chessboardjs@1.0.0/dist/chessboard-1.0.0.min.css"
-      integrity="sha384-q94+BZtLrkL1/ohfjR8c6L+A6qzNH9R2hBLwyoAfu3i/WCvQjzL2RQJ3uNHDISdU"
-      crossorigin="anonymous">
-
<script src="https://code.jquery.com/jquery-3.5.1.min.js"
-        integrity="sha384-ZvpUoO/+PpLXR1lu4jmpXWu80pZlYUAfxl5NsBMWOEPSjUn/6Z/hRTt8+pR6L4N2"
-        crossorigin="anonymous"></script>
-
-<script src="https://unpkg.com/@chrisoakman/chessboardjs@1.0.0/dist/chessboard-1.0.0.min.js"
-        integrity="sha384-8Vi8VHwn3vjQ9eUHUxex3JSN/NFqUg3QbPyX8kWyb93+8AC/pPWTzj+nHtbC5bxD"
-        crossorigin="anonymous"></script>
-

Please note that jQuery is a required dependency of chessboard.js and must be loaded on your webpage before the chessboard-1.0.0.min.js file.

+
<link rel="stylesheet" href="https://unpkg.com/@chrisoakman/chessboardjs@1.0.0/dist/chessboard-1.0.0.min.css" integrity="sha384-q94+BZtLrkL1/ohfjR8c6L+A6qzNH9R2hBLwyoAfu3i/WCvQjzL2RQJ3uNHDISdU" crossorigin="anonymous">
+
<script src="https://unpkg.com/@chrisoakman/chessboardjs@1.0.0/dist/chessboard-1.0.0.min.js" integrity="sha384-8Vi8VHwn3vjQ9eUHUxex3JSN/NFqUg3QbPyX8kWyb93+8AC/pPWTzj+nHtbC5bxD" crossorigin="anonymous"></script>
diff --git a/templates/examples.mustache b/templates/examples.mustache index f11d4f45..5c49f1ae 100644 --- a/templates/examples.mustache +++ b/templates/examples.mustache @@ -16,7 +16,6 @@ - {{{chessboardJsScript}}} diff --git a/templates/homepage.mustache b/templates/homepage.mustache index 85b3b764..a0801794 100644 --- a/templates/homepage.mustache +++ b/templates/homepage.mustache @@ -59,34 +59,29 @@ {{{footer}}} - {{{chessboardJsScript}}} diff --git a/templates/single-example.mustache b/templates/single-example.mustache index d170aa9b..0b463cfa 100644 --- a/templates/single-example.mustache +++ b/templates/single-example.mustache @@ -21,7 +21,6 @@ {{{html}}} - {{{chessboardJsScript}}} {{#includeChessJS}} diff --git a/website/js/examples.js b/website/js/examples.js index 4b000d50..1f09ab80 100644 --- a/website/js/examples.js +++ b/website/js/examples.js @@ -1,5 +1,4 @@ ; (function () { - const $ = window.jQuery const EXAMPLES = window.CHESSBOARD_EXAMPLES const prettyPrint = window.prettyPrint @@ -15,13 +14,13 @@ } function highlightGroupHeader (groupIdx) { - $('#examplesNav h4').removeClass('active') - $('#groupHeader-' + groupIdx).addClass('active') + document.querySelectorAll('#examplesNav h4').forEach(x => x.classList.remove('active')) + document.getElementById('groupHeader-' + groupIdx)?.classList.add('active') } function highlightExampleLink (exampleId) { - $('#examplesNav li').removeClass('active') - $('#exampleLink-' + exampleId).addClass('active') + document.querySelectorAll('#examplesNav li').forEach(x => x.classList.remove('active')) + document.getElementById('exampleLink-' + exampleId)?.classList.add('active') } function buildExampleBodyHTML (example, id) { @@ -41,20 +40,20 @@ } function showExample (exampleId) { - const groupIdx = $('#exampleLink-' + exampleId).parent('ul').attr('id').replace('groupContainer-', '') + const groupIdx = document.getElementById('#exampleLink-' + exampleId)?.closest('ul')?.getAttribute('id')?.replace('groupContainer-', '') - $('#groupContainer-' + groupIdx).css('display', '') + document.getElementById('groupContainer-' + groupIdx)?.style.setProperty('display', '') highlightGroupHeader(groupIdx) highlightExampleLink(exampleId) - $('#exampleBodyContainer').html(buildExampleBodyHTML(EXAMPLES[exampleId], exampleId)) + document.getElementById('exampleBodyContainer').innerHTML = buildExampleBodyHTML(EXAMPLES[exampleId], exampleId) EXAMPLES[exampleId].jsFn() prettyPrint() } - function clickExampleNavLink () { - const exampleId = $(this).attr('id').replace('exampleLink-', '') + function clickExampleNavLink (evt) { + const exampleId = evt.target.getAttribute('id').replace('exampleLink-', '') if (!Object.prototype.hasOwnProperty.call(EXAMPLES, exampleId)) return window.location.hash = exampleId @@ -70,21 +69,25 @@ showExample(exampleId) } - function clickGroupHeader () { - const groupIdx = $(this).attr('id').replace('groupHeader-', '') - const $examplesList = $('#groupContainer-' + groupIdx) - if ($examplesList.css('display') === 'none') { - $examplesList.slideDown('fast') + function clickGroupHeader (evt) { + const groupIdx = evt.target.getAttribute('id').replace('groupHeader-', '') + const examplesList = document.getElementById('#groupContainer-' + groupIdx) + if (examplesList?.style.getPropertyValue('display') === 'none') { + examplesList.slideDown('fast') } else { - $examplesList.slideUp('fast') + examplesList.slideUp('fast') } } - function init () { - $('#examplesNav').on('click', 'li', clickExampleNavLink) - $('#examplesNav').on('click', 'h4', clickGroupHeader) - loadExampleFromHash() + const examplesNav = document.getElementById('examplesNav') + examplesNav.onclick = (evt) => { + if (evt.target) { + if (evt.target.matches('li')) { + clickExampleNavLink(evt) + } else if (evt.target.matches('h4')) { + clickGroupHeader(evt) + } + } } - - $(document).ready(init) + loadExampleFromHash() })() diff --git a/website/js/jquery-3.4.1.min.js b/website/js/jquery-3.4.1.min.js deleted file mode 100644 index 07c00cd2..00000000 --- a/website/js/jquery-3.4.1.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0a?0:d.max")[0],k,l=a.each;j.style.cssText="background-color:rgba(1,1,1,.5)",i.rgba=j.style.backgroundColor.indexOf("rgba")>-1,l(g,function(a,b){b.cache="_"+a,b.props.alpha={idx:3,type:"percent",def:1}}),f.fn=a.extend(f.prototype,{parse:function(c,d,e,h){if(c===b)return this._rgba=[null,null,null,null],this;if(c.jquery||c.nodeType)c=a(c).css(d),d=b;var i=this,j=a.type(c),o=this._rgba=[];d!==b&&(c=[c,d,e,h],j="array");if(j==="string")return this.parse(n(c)||k._default);if(j==="array")return l(g.rgba.props,function(a,b){o[b.idx]=m(c[b.idx],b)}),this;if(j==="object")return c instanceof f?l(g,function(a,b){c[b.cache]&&(i[b.cache]=c[b.cache].slice())}):l(g,function(b,d){var e=d.cache;l(d.props,function(a,b){if(!i[e]&&d.to){if(a==="alpha"||c[a]==null)return;i[e]=d.to(i._rgba)}i[e][b.idx]=m(c[a],b,!0)}),i[e]&&a.inArray(null,i[e].slice(0,3))<0&&(i[e][3]=1,d.from&&(i._rgba=d.from(i[e])))}),this},is:function(a){var b=f(a),c=!0,d=this;return l(g,function(a,e){var f,g=b[e.cache];return g&&(f=d[e.cache]||e.to&&e.to(d._rgba)||[],l(e.props,function(a,b){if(g[b.idx]!=null)return c=g[b.idx]===f[b.idx],c})),c}),c},_space:function(){var a=[],b=this;return l(g,function(c,d){b[d.cache]&&a.push(c)}),a.pop()},transition:function(a,b){var c=f(a),d=c._space(),e=g[d],i=this.alpha()===0?f("transparent"):this,j=i[e.cache]||e.to(i._rgba),k=j.slice();return c=c[e.cache],l(e.props,function(a,d){var e=d.idx,f=j[e],g=c[e],i=h[d.type]||{};if(g===null)return;f===null?k[e]=g:(i.mod&&(g-f>i.mod/2?f+=i.mod:f-g>i.mod/2&&(f-=i.mod)),k[e]=m((g-f)*b+f,d))}),this[d](k)},blend:function(b){if(this._rgba[3]===1)return this;var c=this._rgba.slice(),d=c.pop(),e=f(b)._rgba;return f(a.map(c,function(a,b){return(1-d)*e[b]+d*a}))},toRgbaString:function(){var b="rgba(",c=a.map(this._rgba,function(a,b){return a==null?b>2?1:0:a});return c[3]===1&&(c.pop(),b="rgb("),b+c.join()+")"},toHslaString:function(){var b="hsla(",c=a.map(this.hsla(),function(a,b){return a==null&&(a=b>2?1:0),b&&b<3&&(a=Math.round(a*100)+"%"),a});return c[3]===1&&(c.pop(),b="hsl("),b+c.join()+")"},toHexString:function(b){var c=this._rgba.slice(),d=c.pop();return b&&c.push(~~(d*255)),"#"+a.map(c,function(a){return a=(a||0).toString(16),a.length===1?"0"+a:a}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}}),f.fn.parse.prototype=f.fn,g.hsla.to=function(a){if(a[0]==null||a[1]==null||a[2]==null)return[null,null,null,a[3]];var b=a[0]/255,c=a[1]/255,d=a[2]/255,e=a[3],f=Math.max(b,c,d),g=Math.min(b,c,d),h=f-g,i=f+g,j=i*.5,k,l;return g===f?k=0:b===f?k=60*(c-d)/h+360:c===f?k=60*(d-b)/h+120:k=60*(b-c)/h+240,h===0?l=0:j<=.5?l=h/i:l=h/(2-i),[Math.round(k)%360,l,j,e==null?1:e]},g.hsla.from=function(a){if(a[0]==null||a[1]==null||a[2]==null)return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2],e=a[3],f=d<=.5?d*(1+c):d+c-d*c,g=2*d-f;return[Math.round(o(g,f,b+1/3)*255),Math.round(o(g,f,b)*255),Math.round(o(g,f,b-1/3)*255),e]},l(g,function(c,e){var g=e.props,h=e.cache,i=e.to,j=e.from;f.fn[c]=function(c){i&&!this[h]&&(this[h]=i(this._rgba));if(c===b)return this[h].slice();var d,e=a.type(c),k=e==="array"||e==="object"?c:arguments,n=this[h].slice();return l(g,function(a,b){var c=k[e==="object"?a:b.idx];c==null&&(c=n[b.idx]),n[b.idx]=m(c,b)}),j?(d=f(j(n)),d[h]=n,d):f(n)},l(g,function(b,e){if(f.fn[b])return;f.fn[b]=function(f){var g=a.type(f),h=b==="alpha"?this._hsla?"hsla":"rgba":c,i=this[h](),j=i[e.idx],k;return g==="undefined"?j:(g==="function"&&(f=f.call(this,j),g=a.type(f)),f==null&&e.empty?this:(g==="string"&&(k=d.exec(f),k&&(f=j+parseFloat(k[2])*(k[1]==="+"?1:-1))),i[e.idx]=f,this[h](i)))}})}),f.hook=function(b){var c=b.split(" ");l(c,function(b,c){a.cssHooks[c]={set:function(b,d){var e,g,h="";if(d!=="transparent"&&(a.type(d)!=="string"||(e=n(d)))){d=f(e||d);if(!i.rgba&&d._rgba[3]!==1){g=c==="backgroundColor"?b.parentNode:b;while((h===""||h==="transparent")&&g&&g.style)try{h=a.css(g,"backgroundColor"),g=g.parentNode}catch(j){}d=d.blend(h&&h!=="transparent"?h:"_default")}d=d.toRgbaString()}try{b.style[c]=d}catch(j){}}},a.fx.step[c]=function(b){b.colorInit||(b.start=f(b.elem,c),b.end=f(b.end),b.colorInit=!0),a.cssHooks[c].set(b.elem,b.start.transition(b.end,b.pos))}})},f.hook(c),a.cssHooks.borderColor={expand:function(a){var b={};return l(["Top","Right","Bottom","Left"],function(c,d){b["border"+d+"Color"]=a}),b}},k=a.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery); \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 9a4211c0..e6942b80 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1470,7 +1470,7 @@ glob@7.0.0: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.1: +glob@^7.1.1, glob@^7.1.3: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -1482,18 +1482,6 @@ glob@^7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.3: - version "7.1.4" - resolved "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz" - integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - global-modules@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" @@ -1706,12 +1694,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2: - version "2.0.1" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" - integrity sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA== - -inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -2023,11 +2006,6 @@ jest-worker@^26.2.1: merge-stream "^2.0.0" supports-color "^7.0.0" -jquery@>=3.4.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.1.tgz#fab0408f8b45fc19f956205773b62b292c147a16" - integrity sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw== - js-sdsl@^4.1.4: version "4.1.4" resolved "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.4.tgz" @@ -2978,12 +2956,7 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -safe-buffer@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@^5.1.0, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== From fe786bf35a48f2d053e6920558ade6678ac1eed5 Mon Sep 17 00:00:00 2001 From: Zack Schuster Date: Tue, 27 Sep 2022 23:08:22 -0700 Subject: [PATCH 05/32] chore: switch to eslint --- Gulpfile.js | 9 +- lib/chessboard.js | 1190 ++++++++++++++++++++-------------------- lib/chessboard.test.js | 113 ++-- package.json | 17 +- website/js/examples.js | 87 +-- yarn.lock | 686 +---------------------- 6 files changed, 731 insertions(+), 1371 deletions(-) diff --git a/Gulpfile.js b/Gulpfile.js index 16d6d8e2..fc59c899 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -1,12 +1,11 @@ -import { writeFile, rm, mkdir } from 'node:fs/promises'; +import { writeFile, readFile, rm, mkdir } from 'node:fs/promises'; + import gulp from 'gulp'; +import sass from 'sass'; import { rollup } from 'rollup'; import { terser } from 'rollup-plugin-terser'; -import sass from 'sass'; - -import packageJson from './package.json' assert { type: 'json' }; -const { version } = packageJson; +const { version } = JSON.parse(await readFile('./package.json', 'utf-8')); const banner = `/** @preserve * chessboard.js v${version} * https://github.com/oakmac/chessboardjs/ diff --git a/lib/chessboard.js b/lib/chessboard.js index e66528a8..95125fbb 100644 --- a/lib/chessboard.js +++ b/lib/chessboard.js @@ -1,19 +1,21 @@ +/* eslint-env browser */ + // --------------------------------------------------------------------------- // Constants // --------------------------------------------------------------------------- -const COLUMNS = 'abcdefgh'.split('') -const DEFAULT_DRAG_THROTTLE_RATE = 20 -const ELLIPSIS = '…' -const START_FEN = 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR' -const START_POSITION = fenToObj(START_FEN) +const COLUMNS = 'abcdefgh'.split(''); +const DEFAULT_DRAG_THROTTLE_RATE = 20; +const ELLIPSIS = '…'; +const START_FEN = 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR'; +const START_POSITION = fenToObj(START_FEN); // default animation speeds -const DEFAULT_APPEAR_SPEED = 200 -const DEFAULT_MOVE_SPEED = 200 -const DEFAULT_SNAPBACK_SPEED = 60 -const DEFAULT_SNAP_SPEED = 30 -const DEFAULT_TRASH_SPEED = 100 +const DEFAULT_APPEAR_SPEED = 200; +const DEFAULT_MOVE_SPEED = 200; +const DEFAULT_SNAPBACK_SPEED = 60; +const DEFAULT_SNAP_SPEED = 30; +const DEFAULT_TRASH_SPEED = 100; // use unique class names to prevent clashing with anything else on the page // and simplify selectors @@ -35,38 +37,38 @@ const ClassNameLookup = { sparePiecesTop: 'spare-pieces-top-4028b', square: 'square-55d63', white: 'white-1e1d7' -} +}; // --------------------------------------------------------------------------- // Misc Util Functions // --------------------------------------------------------------------------- -function throttle (f, interval) { - let timeout = 0 - let shouldFire = false - let args = [] +function throttle(f, interval) { + let timeout = 0; + let shouldFire = false; + let args = []; const handleTimeout = function () { - timeout = 0 + timeout = 0; if (shouldFire) { - shouldFire = false - fire() + shouldFire = false; + fire(); } - } + }; const fire = function () { - timeout = window.setTimeout(handleTimeout, interval) - f(args) - } + timeout = window.setTimeout(handleTimeout, interval); + f(args); + }; return function (..._args) { - args = _args + args = _args; if (!timeout) { - fire() + fire(); } else { - shouldFire = true + shouldFire = true; } - } + }; } // function debounce (f, interval, scope) { @@ -80,15 +82,15 @@ function throttle (f, interval) { // } // } -function uuid () { - return 'xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx'.replace(/x/g, function (c) { - const r = (Math.random() * 16) | 0 - return r.toString(16) - }) +function uuid() { + return 'xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx'.replace(/x/g, function () { + const r = (Math.random() * 16) | 0; + return r.toString(16); + }); } -function deepCopy (thing) { - return JSON.parse(JSON.stringify(thing)) +function deepCopy(thing) { + return JSON.parse(JSON.stringify(thing)); } /** @@ -96,120 +98,120 @@ function deepCopy (thing) { * @param {HTMLElement} element * @returns {{ top: number, left: number }} */ -function getJqueryStyleOffset (element) { - const { documentElement } = document - const { top, left } = element.getBoundingClientRect() +function getJqueryStyleOffset(element) { + const { documentElement } = document; + const { top, left } = element.getBoundingClientRect(); return { top: top + window.pageYOffset - documentElement.clientTop, left: left + window.pageXOffset - documentElement.clientLeft - } + }; } -function interpolateTemplate (str, obj) { +function interpolateTemplate(str, obj) { for (const key in obj) { - if (!Object.prototype.hasOwnProperty.call(obj, key)) continue - const keyTemplateStr = '{' + key + '}' - const value = obj[key] + if (!Object.prototype.hasOwnProperty.call(obj, key)) continue; + const keyTemplateStr = '{' + key + '}'; + const value = obj[key]; while (str.indexOf(keyTemplateStr) !== -1) { - str = str.replace(keyTemplateStr, value) + str = str.replace(keyTemplateStr, value); } } - return str + return str; } // --------------------------------------------------------------------------- // Predicates // --------------------------------------------------------------------------- -function isString (s) { - return typeof s === 'string' +function isString(s) { + return typeof s === 'string'; } -function isFunction (f) { - return typeof f === 'function' +function isFunction(f) { + return typeof f === 'function'; } -function isInteger (n) { +function isInteger(n) { return typeof n === 'number' && isFinite(n) && - Math.floor(n) === n + Math.floor(n) === n; } -function isPlainObject (o) { - return Object.prototype.toString.call(o) === '[object Object]' +function isPlainObject(o) { + return Object.prototype.toString.call(o) === '[object Object]'; } -function validAnimationSpeed (speed) { - if (speed === 'fast' || speed === 'slow') return true - if (!isInteger(speed)) return false - return speed >= 0 +function validAnimationSpeed(speed) { + if (speed === 'fast' || speed === 'slow') return true; + if (!isInteger(speed)) return false; + return speed >= 0; } -function validThrottleRate (rate) { +function validThrottleRate(rate) { return isInteger(rate) && - rate >= 1 + rate >= 1; } -function validMove (move) { +function validMove(move) { // move should be a string - if (!isString(move)) return false + if (!isString(move)) return false; // move should be in the form of "e2-e4", "f6-d5" - const squares = move.split('-') - if (squares.length !== 2) return false + const squares = move.split('-'); + if (squares.length !== 2) return false; - return validSquare(squares[0]) && validSquare(squares[1]) + return validSquare(squares[0]) && validSquare(squares[1]); } -function validSquare (square) { - return isString(square) && square.search(/^[a-h][1-8]$/) !== -1 +function validSquare(square) { + return isString(square) && square.search(/^[a-h][1-8]$/) !== -1; } -function validPieceCode (code) { - return isString(code) && code.search(/^[bw][KQRNBP]$/) !== -1 +function validPieceCode(code) { + return isString(code) && code.search(/^[bw][KQRNBP]$/) !== -1; } -function validFen (fen) { - if (!isString(fen)) return false +function validFen(fen) { + if (!isString(fen)) return false; // cut off any move, castling, etc info from the end // we're only interested in position information - fen = fen.replace(/ .+$/, '') + fen = fen.replace(/ .+$/, ''); // expand the empty square numbers to just 1s - fen = expandFenEmptySquares(fen) + fen = expandFenEmptySquares(fen); // FEN should be 8 sections separated by slashes - const chunks = fen.split('/') - if (chunks.length !== 8) return false + const chunks = fen.split('/'); + if (chunks.length !== 8) return false; // check each section for (let i = 0; i < 8; i++) { if (chunks[i].length !== 8 || chunks[i].search(/[^kqrnbpKQRNBP1]/) !== -1) { - return false + return false; } } - return true + return true; } -function validPositionObject (pos) { - if (!isPlainObject(pos)) return false +function validPositionObject(pos) { + if (!isPlainObject(pos)) return false; for (const i in pos) { - if (!Object.prototype.hasOwnProperty.call(pos, i)) continue + if (!Object.prototype.hasOwnProperty.call(pos, i)) continue; if (!validSquare(i) || !validPieceCode(pos[i])) { - return false + return false; } } - return true + return true; } -function isTouchDevice () { - return 'ontouchstart' in document.documentElement +function isTouchDevice() { + return 'ontouchstart' in document.documentElement; } // --------------------------------------------------------------------------- @@ -217,285 +219,285 @@ function isTouchDevice () { // --------------------------------------------------------------------------- // convert FEN piece code to bP, wK, etc -function fenToPieceCode (piece) { +function fenToPieceCode(piece) { // black piece if (piece.toLowerCase() === piece) { - return 'b' + piece.toUpperCase() + return 'b' + piece.toUpperCase(); } // white piece - return 'w' + piece.toUpperCase() + return 'w' + piece.toUpperCase(); } // convert bP, wK, etc code to FEN structure -function pieceCodeToFen (piece) { - const pieceCodeLetters = piece.split('') +function pieceCodeToFen(piece) { + const pieceCodeLetters = piece.split(''); // white piece if (pieceCodeLetters[0] === 'w') { - return pieceCodeLetters[1].toUpperCase() + return pieceCodeLetters[1].toUpperCase(); } // black piece - return pieceCodeLetters[1].toLowerCase() + return pieceCodeLetters[1].toLowerCase(); } // convert FEN string to position object // returns false if the FEN string is invalid -function fenToObj (fen) { - if (!validFen(fen)) return false +function fenToObj(fen) { + if (!validFen(fen)) return false; // cut off any move, castling, etc info from the end // we're only interested in position information - fen = fen.replace(/ .+$/, '') + fen = fen.replace(/ .+$/, ''); - const rows = fen.split('/') - const position = {} + const rows = fen.split('/'); + const position = {}; - let currentRow = 8 + let currentRow = 8; for (let i = 0; i < 8; i++) { - const row = rows[i].split('') - let colIdx = 0 + const row = rows[i].split(''); + let colIdx = 0; // loop through each character in the FEN section for (let j = 0; j < row.length; j++) { // number / empty squares if (row[j].search(/[1-8]/) !== -1) { - const numEmptySquares = parseInt(row[j], 10) - colIdx = colIdx + numEmptySquares + const numEmptySquares = parseInt(row[j], 10); + colIdx = colIdx + numEmptySquares; } else { // piece - const square = COLUMNS[colIdx] + currentRow - position[square] = fenToPieceCode(row[j]) - colIdx = colIdx + 1 + const square = COLUMNS[colIdx] + currentRow; + position[square] = fenToPieceCode(row[j]); + colIdx = colIdx + 1; } } - currentRow = currentRow - 1 + currentRow = currentRow - 1; } - return position + return position; } // position object to FEN string // returns false if the obj is not a valid position object -function objToFen (obj) { - if (!validPositionObject(obj)) return false +function objToFen(obj) { + if (!validPositionObject(obj)) return false; - let fen = '' + let fen = ''; - let currentRow = 8 + let currentRow = 8; for (let i = 0; i < 8; i++) { for (let j = 0; j < 8; j++) { - const square = COLUMNS[j] + currentRow + const square = COLUMNS[j] + currentRow; // piece exists if (Object.prototype.hasOwnProperty.call(obj, square)) { - fen = fen + pieceCodeToFen(obj[square]) + fen = fen + pieceCodeToFen(obj[square]); } else { // empty space - fen = fen + '1' + fen = fen + '1'; } } if (i !== 7) { - fen = fen + '/' + fen = fen + '/'; } - currentRow = currentRow - 1 + currentRow = currentRow - 1; } // squeeze the empty numbers together - fen = squeezeFenEmptySquares(fen) + fen = squeezeFenEmptySquares(fen); - return fen + return fen; } -function squeezeFenEmptySquares (fen) { +function squeezeFenEmptySquares(fen) { return fen.replace(/11111111/g, '8') .replace(/1111111/g, '7') .replace(/111111/g, '6') .replace(/11111/g, '5') .replace(/1111/g, '4') .replace(/111/g, '3') - .replace(/11/g, '2') + .replace(/11/g, '2'); } -function expandFenEmptySquares (fen) { +function expandFenEmptySquares(fen) { return fen.replace(/8/g, '11111111') .replace(/7/g, '1111111') .replace(/6/g, '111111') .replace(/5/g, '11111') .replace(/4/g, '1111') .replace(/3/g, '111') - .replace(/2/g, '11') + .replace(/2/g, '11'); } // returns the distance between two squares -function squareDistance (squareA, squareB) { - const squareAArray = squareA.split('') - const squareAx = COLUMNS.indexOf(squareAArray[0]) + 1 - const squareAy = parseInt(squareAArray[1], 10) +function squareDistance(squareA, squareB) { + const squareAArray = squareA.split(''); + const squareAx = COLUMNS.indexOf(squareAArray[0]) + 1; + const squareAy = parseInt(squareAArray[1], 10); - const squareBArray = squareB.split('') - const squareBx = COLUMNS.indexOf(squareBArray[0]) + 1 - const squareBy = parseInt(squareBArray[1], 10) + const squareBArray = squareB.split(''); + const squareBx = COLUMNS.indexOf(squareBArray[0]) + 1; + const squareBy = parseInt(squareBArray[1], 10); - const xDelta = Math.abs(squareAx - squareBx) - const yDelta = Math.abs(squareAy - squareBy) + const xDelta = Math.abs(squareAx - squareBx); + const yDelta = Math.abs(squareAy - squareBy); - if (xDelta >= yDelta) return xDelta - return yDelta + if (xDelta >= yDelta) return xDelta; + return yDelta; } // returns the square of the closest instance of piece // returns false if no instance of piece is found in position -function findClosestPiece (position, piece, square) { +function findClosestPiece(position, piece, square) { // create array of closest squares from square - const closestSquares = createRadius(square) + const closestSquares = createRadius(square); // search through the position in order of distance for the piece for (let i = 0; i < closestSquares.length; i++) { - const s = closestSquares[i] + const s = closestSquares[i]; if (Object.prototype.hasOwnProperty.call(position, s) && position[s] === piece) { - return s + return s; } } - return false + return false; } // returns an array of closest squares from square -function createRadius (square) { - const squares = [] +function createRadius(square) { + const squares = []; // calculate distance of all squares for (let i = 0; i < 8; i++) { for (let j = 0; j < 8; j++) { - const s = COLUMNS[i] + (j + 1) + const s = COLUMNS[i] + (j + 1); // skip the square we're starting from - if (square === s) continue + if (square === s) continue; squares.push({ square: s, distance: squareDistance(square, s) - }) + }); } } // sort by distance squares.sort(function (a, b) { - return a.distance - b.distance - }) + return a.distance - b.distance; + }); // just return the square code - const surroundingSquares = [] + const surroundingSquares = []; for (let i = 0; i < squares.length; i++) { - surroundingSquares.push(squares[i].square) + surroundingSquares.push(squares[i].square); } - return surroundingSquares + return surroundingSquares; } // given a position and a set of moves, return a new position // with the moves executed -function calculatePositionFromMoves (position, moves) { - const newPosition = deepCopy(position) +function calculatePositionFromMoves(position, moves) { + const newPosition = deepCopy(position); for (const i in moves) { - if (!Object.prototype.hasOwnProperty.call(moves, i)) continue + if (!Object.prototype.hasOwnProperty.call(moves, i)) continue; // skip the move if the position doesn't have a piece on the source square - if (!Object.prototype.hasOwnProperty.call(newPosition, i)) continue + if (!Object.prototype.hasOwnProperty.call(newPosition, i)) continue; - const piece = newPosition[i] - delete newPosition[i] - newPosition[moves[i]] = piece + const piece = newPosition[i]; + delete newPosition[i]; + newPosition[moves[i]] = piece; } - return newPosition + return newPosition; } // --------------------------------------------------------------------------- // HTML // --------------------------------------------------------------------------- -function buildContainerHTML (hasSparePieces) { - let html = '
' +function buildContainerHTML(hasSparePieces) { + let html = '
'; if (hasSparePieces) { - html += '
' + html += '
'; } - html += '
' + html += '
'; if (hasSparePieces) { - html += '
' + html += '
'; } - html += '
' + html += '
'; - return interpolateTemplate(html, ClassNameLookup) + return interpolateTemplate(html, ClassNameLookup); } // --------------------------------------------------------------------------- // Config // --------------------------------------------------------------------------- -function expandConfigArgumentShorthand (config) { +function expandConfigArgumentShorthand(config) { if (config === 'start') { - config = { position: deepCopy(START_POSITION) } + config = { position: deepCopy(START_POSITION) }; } else if (validFen(config)) { - config = { position: fenToObj(config) } + config = { position: fenToObj(config) }; } else if (validPositionObject(config)) { - config = { position: deepCopy(config) } + config = { position: deepCopy(config) }; } // config must be an object - if (!isPlainObject(config)) config = {} + if (!isPlainObject(config)) config = {}; - return config + return config; } // validate config / set default options -function expandConfig (config) { +function expandConfig(config) { // default for orientation is white - if (config.orientation !== 'black') config.orientation = 'white' + if (config.orientation !== 'black') config.orientation = 'white'; // default for showNotation is true - if (config.showNotation !== false) config.showNotation = true + if (config.showNotation !== false) config.showNotation = true; // default for draggable is false - if (config.draggable !== true) config.draggable = false + if (config.draggable !== true) config.draggable = false; // default for dropOffBoard is 'snapback' - if (config.dropOffBoard !== 'trash') config.dropOffBoard = 'snapback' + if (config.dropOffBoard !== 'trash') config.dropOffBoard = 'snapback'; // default for sparePieces is false - if (config.sparePieces !== true) config.sparePieces = false + if (config.sparePieces !== true) config.sparePieces = false; // draggable must be true if sparePieces is enabled - if (config.sparePieces) config.draggable = true + if (config.sparePieces) config.draggable = true; // default piece theme is wikipedia if (!Object.prototype.hasOwnProperty.call(config, 'pieceTheme') || (!isString(config.pieceTheme) && !isFunction(config.pieceTheme))) { - config.pieceTheme = 'img/chesspieces/wikipedia/{piece}.png' + config.pieceTheme = 'img/chesspieces/wikipedia/{piece}.png'; } // animation speeds - if (!validAnimationSpeed(config.appearSpeed)) config.appearSpeed = DEFAULT_APPEAR_SPEED - if (!validAnimationSpeed(config.moveSpeed)) config.moveSpeed = DEFAULT_MOVE_SPEED - if (!validAnimationSpeed(config.snapbackSpeed)) config.snapbackSpeed = DEFAULT_SNAPBACK_SPEED - if (!validAnimationSpeed(config.snapSpeed)) config.snapSpeed = DEFAULT_SNAP_SPEED - if (!validAnimationSpeed(config.trashSpeed)) config.trashSpeed = DEFAULT_TRASH_SPEED + if (!validAnimationSpeed(config.appearSpeed)) config.appearSpeed = DEFAULT_APPEAR_SPEED; + if (!validAnimationSpeed(config.moveSpeed)) config.moveSpeed = DEFAULT_MOVE_SPEED; + if (!validAnimationSpeed(config.snapbackSpeed)) config.snapbackSpeed = DEFAULT_SNAPBACK_SPEED; + if (!validAnimationSpeed(config.snapSpeed)) config.snapSpeed = DEFAULT_SNAP_SPEED; + if (!validAnimationSpeed(config.trashSpeed)) config.trashSpeed = DEFAULT_TRASH_SPEED; // throttle rate - if (!validThrottleRate(config.dragThrottleRate)) config.dragThrottleRate = DEFAULT_DRAG_THROTTLE_RATE + if (!validThrottleRate(config.dragThrottleRate)) config.dragThrottleRate = DEFAULT_DRAG_THROTTLE_RATE; - return config + return config; } // --------------------------------------------------------------------------- @@ -503,35 +505,35 @@ function expandConfig (config) { // --------------------------------------------------------------------------- // return either boolean false or the $container element -function checkContainerArg (containerElOrString) { +function checkContainerArg(containerElOrString) { if (containerElOrString === '') { const errorMsg1 = 'Chessboard Error 1001: ' + 'The first argument to Chessboard() cannot be an empty string.' + '\n\n' + - 'Exiting' + ELLIPSIS - window.alert(errorMsg1) - return false + 'Exiting' + ELLIPSIS; + window.alert(errorMsg1); + return false; } // convert containerEl to query selector if it is a string if (isString(containerElOrString) && containerElOrString.charAt(0) !== '#') { - containerElOrString = '#' + containerElOrString + containerElOrString = '#' + containerElOrString; } // containerEl must be something that becomes a NodeList of size 1 - const $container = /** @type {NodeListOf} */(document.querySelectorAll(containerElOrString)) + const $container = /** @type {NodeListOf} */(document.querySelectorAll(containerElOrString)); if ($container.length !== 1) { const errorMsg2 = 'Chessboard Error 1003: ' + 'The first argument to Chessboard() must be the ID of a DOM node, ' + 'an ID query selector, or a single DOM node.' + '\n\n' + - 'Exiting' + ELLIPSIS - window.alert(errorMsg2) - return false + 'Exiting' + ELLIPSIS; + window.alert(errorMsg2); + return false; } - return $container.item(0) + return $container.item(0); } // --------------------------------------------------------------------------- @@ -539,66 +541,66 @@ function checkContainerArg (containerElOrString) { // --------------------------------------------------------------------------- class Chessboard { - #config = {} + #config = {}; /** * @type {HTMLElement} */ - #board + #board; /** * @type {HTMLElement} */ - #container + #container; /** * @type {HTMLElement} */ - #draggedPiece + #draggedPiece; /** * @type {HTMLElement | null} */ - #sparePiecesTop = null + #sparePiecesTop = null; /** * @type {HTMLElement | null} */ - #sparePiecesBottom = null + #sparePiecesBottom = null; /** * @type {number} */ - #boardBorderSize = 2 + #boardBorderSize = 2; /** * @type {'white' | 'black'} */ - #currentOrientation = 'white' - #currentPosition = {} + #currentOrientation = 'white'; + #currentPosition = {}; /** * @type {string} */ - #draggedPieceLocation = '' + #draggedPieceLocation = ''; /** * @type {string} */ - #draggedPieceSource = '' + #draggedPieceSource = ''; /** * @type {boolean} */ - #isDragging = false - #sparePiecesElsIds = {} - #squareElsIds = {} - #squareElsOffsets = {} - #squareSize = 16 + #isDragging = false; + #sparePiecesElsIds = {}; + #squareElsIds = {}; + #squareElsOffsets = {}; + #squareSize = 16; - constructor (containerElOrString, config) { + constructor(containerElOrString, config) { // first things first: check basic dependencies - const container = checkContainerArg(containerElOrString) - if (!container) throw new TypeError(`Container ${containerElOrString ?? ''} not found`) + const container = checkContainerArg(containerElOrString); + if (!container) throw new TypeError(`Container ${containerElOrString ?? ''} not found`); - this.#container = container + this.#container = container; // ensure the config object is what we expect - config = expandConfigArgumentShorthand(config) - config = expandConfig(config) - this.#config = config + config = expandConfigArgumentShorthand(config); + config = expandConfig(config); + this.#config = config; - this.#setInitialState() + this.#setInitialState(); /** * Create unique IDs for all our elements @@ -607,179 +609,179 @@ class Chessboard { // squares on the board for (let i = 0; i < COLUMNS.length; i++) { for (let j = 1; j <= 8; j++) { - const square = COLUMNS[i] + j - this.#squareElsIds[square] = square + '-' + uuid() + const square = COLUMNS[i] + j; + this.#squareElsIds[square] = square + '-' + uuid(); } } // spare pieces - const pieces = 'KQRNBP'.split('') + const pieces = 'KQRNBP'.split(''); for (let i = 0; i < pieces.length; i++) { - const whitePiece = 'w' + pieces[i] - const blackPiece = 'b' + pieces[i] - this.#sparePiecesElsIds[whitePiece] = whitePiece + '-' + uuid() - this.#sparePiecesElsIds[blackPiece] = blackPiece + '-' + uuid() + const whitePiece = 'w' + pieces[i]; + const blackPiece = 'b' + pieces[i]; + this.#sparePiecesElsIds[whitePiece] = whitePiece + '-' + uuid(); + this.#sparePiecesElsIds[blackPiece] = blackPiece + '-' + uuid(); } // build board and save it in memory - this.#container.innerHTML = buildContainerHTML(this.#config.sparePieces) - this.#board = /** @type {HTMLElement} */(this.#container.querySelector('.' + ClassNameLookup.board)) + this.#container.innerHTML = buildContainerHTML(this.#config.sparePieces); + this.#board = /** @type {HTMLElement} */(this.#container.querySelector('.' + ClassNameLookup.board)); if (this.#config.sparePieces) { - this.#sparePiecesTop = this.#container.querySelector('.' + ClassNameLookup.sparePiecesTop) - this.#sparePiecesBottom = this.#container.querySelector('.' + ClassNameLookup.sparePiecesBottom) + this.#sparePiecesTop = this.#container.querySelector('.' + ClassNameLookup.sparePiecesTop); + this.#sparePiecesBottom = this.#container.querySelector('.' + ClassNameLookup.sparePiecesBottom); } // create the drag piece this.#draggedPiece = document.body.appendChild( this.#buildPieceElement('wP', true, uuid()) - ) + ); // TODO: need to remove this dragged piece element if the board is no // longer in the DOM // get the border size - this.#boardBorderSize = parseInt(this.#board.style.getPropertyValue('borderLeftWidth'), 10) + this.#boardBorderSize = parseInt(this.#board.style.getPropertyValue('borderLeftWidth'), 10); // set the size and draw the board - this.resize() + this.resize(); - this.#addEvents() + this.#addEvents(); } // clear the board - clear (useAnimation) { - this.position({}, useAnimation) + clear(useAnimation) { + this.position({}, useAnimation); } // remove the widget from the page - destroy () { + destroy() { // remove markup - this.#container.innerHTML = '' - this.#draggedPiece.remove() + this.#container.innerHTML = ''; + this.#draggedPiece.remove(); // remove event handlers - this.#container.onmousedown = null + this.#container.onmousedown = null; } // shorthand method to get the current FEN - fen () { - return this.position('fen') + fen() { + return this.position('fen'); } // flip orientation - flip () { - return this.orientation('flip') + flip() { + return this.orientation('flip'); } // move pieces // TODO: this method should be variadic as well as accept an array of moves - move (...args) { + move(...args) { // no need to throw an error here; just do nothing // TODO: this should return the current position - if (args.length === 0) return + if (args.length === 0) return; - let useAnimation = true + let useAnimation = true; // collect the moves into an object - const moves = {} + const moves = {}; for (let i = 0; i < args.length; i++) { // any "false" to this function means no animations if (args[i] === false) { - useAnimation = false - continue + useAnimation = false; + continue; } // skip invalid arguments if (!validMove(args[i])) { - this.#error(2826, 'Invalid move passed to the move method.', args[i]) - continue + this.#error(2826, 'Invalid move passed to the move method.', args[i]); + continue; } - const tmp = args[i].split('-') - moves[tmp[0]] = tmp[1] + const tmp = args[i].split('-'); + moves[tmp[0]] = tmp[1]; } // calculate position from moves - const newPos = calculatePositionFromMoves(this.#currentPosition, moves) + const newPos = calculatePositionFromMoves(this.#currentPosition, moves); // update the board - this.position(newPos, useAnimation) + this.position(newPos, useAnimation); // return the new position object - return newPos + return newPos; } /** * @param {string} [orientation] * @returns */ - orientation (orientation) { + orientation(orientation) { if (!orientation) { - return this.#currentOrientation + return this.#currentOrientation; } else if (orientation === 'white' || orientation === 'black') { - this.#currentOrientation = orientation + this.#currentOrientation = orientation; } else if (orientation === 'flip') { - this.#currentOrientation = this.#currentOrientation === 'white' ? 'black' : 'white' + this.#currentOrientation = this.#currentOrientation === 'white' ? 'black' : 'white'; } else { - this.#error(5482, 'Invalid value passed to the orientation method.', orientation) + this.#error(5482, 'Invalid value passed to the orientation method.', orientation); } - this.#drawBoard() - return this.#currentOrientation + this.#drawBoard(); + return this.#currentOrientation; } - position (position, useAnimation) { + position(position, useAnimation) { if (!position) { - return deepCopy(this.#currentPosition) + return deepCopy(this.#currentPosition); } else if (isString(position) && position.toLowerCase() === 'fen') { // get position as FEN - return objToFen(this.#currentPosition) + return objToFen(this.#currentPosition); } if (isString(position) && position.toLowerCase() === 'start') { // start position - position = deepCopy(START_POSITION) + position = deepCopy(START_POSITION); } // convert FEN to position object if (validFen(position)) { - position = fenToObj(position) + position = fenToObj(position); } // validate position object if (!validPositionObject(position)) { - this.#error(6482, 'Invalid value passed to the position method.', position) - return + this.#error(6482, 'Invalid value passed to the position method.', position); + return; } // default for useAnimations is true - if (useAnimation !== false) useAnimation = true + if (useAnimation !== false) useAnimation = true; if (useAnimation) { // start the animations - const animations = this.#calculateAnimations(this.#currentPosition, position) - this.#doAnimations(animations, this.#currentPosition, position) + const animations = this.#calculateAnimations(this.#currentPosition, position); + this.#doAnimations(animations, this.#currentPosition, position); // set the new position - this.#setCurrentPosition(position) + this.#setCurrentPosition(position); } else { // instant update - this.#setCurrentPosition(position) - this.#drawPositionInstant() + this.#setCurrentPosition(position); + this.#drawPositionInstant(); } } - resize () { + resize() { // calulate the new square size - this.#squareSize = this.#calculateSquareSize() + this.#squareSize = this.#calculateSquareSize(); // set board width - this.#board.style.setProperty('width', `${this.#squareSize * 8}px`) + this.#board.style.setProperty('width', `${this.#squareSize * 8}px`); // set drag piece size - this.#draggedPiece?.style.setProperty('height', `${this.#squareSize}px`) - this.#draggedPiece?.style.setProperty('width', `${this.#squareSize}px`) + this.#draggedPiece?.style.setProperty('height', `${this.#squareSize}px`); + this.#draggedPiece?.style.setProperty('width', `${this.#squareSize}px`); // spare pieces if (this.#config.sparePieces) { @@ -787,69 +789,69 @@ class Chessboard { this.#container.querySelectorAll('.' + ClassNameLookup.sparePieces) ) .forEach(x => { - const paddingLeft = this.#squareSize + this.#boardBorderSize - x.style.setProperty('paddingLeft', `${paddingLeft}px`) - }) + const paddingLeft = this.#squareSize + this.#boardBorderSize; + x.style.setProperty('paddingLeft', `${paddingLeft}px`); + }); } // redraw the board - this.#drawBoard() + this.#drawBoard(); } /** * Set the starting position * @param {*} useAnimation */ - start (useAnimation) { - this.position('start', useAnimation) + start(useAnimation) { + this.position('start', useAnimation); } - #dropDraggedPieceOnSquare (square) { - this.#removeSquareHighlights() + #dropDraggedPieceOnSquare(square) { + this.#removeSquareHighlights(); // update position - const newPosition = deepCopy(this.#currentPosition) - delete newPosition[this.#draggedPieceSource] - newPosition[square] = this.#draggedPiece - this.#setCurrentPosition(newPosition) + const newPosition = deepCopy(this.#currentPosition); + delete newPosition[this.#draggedPieceSource]; + newPosition[square] = this.#draggedPiece; + this.#setCurrentPosition(newPosition); // get target square information - const targetSquareId = this.#squareElsIds[square] - const targetSquare = document.getElementById(targetSquareId) + const targetSquareId = this.#squareElsIds[square]; + const targetSquare = document.getElementById(targetSquareId); if (!targetSquare) { - throw new Error(`Unable to locate target square with id ${targetSquareId}`) + throw new Error(`Unable to locate target square with id ${targetSquareId}`); } - const targetSquarePosition = getJqueryStyleOffset(targetSquare) + const targetSquarePosition = getJqueryStyleOffset(targetSquare); // snap the piece to the target square const opts = { duration: this.#config.snapSpeed, complete: () => { - this.#drawPositionInstant() - this.#draggedPiece.style.setProperty('display', 'none') + this.#drawPositionInstant(); + this.#draggedPiece.style.setProperty('display', 'none'); // execute their onSnapEnd function if (isFunction(this.#config.onSnapEnd)) { - this.#config.onSnapEnd(this.#draggedPieceSource, square, this.#draggedPiece) + this.#config.onSnapEnd(this.#draggedPieceSource, square, this.#draggedPiece); } } - } - this.#draggedPiece.animate(targetSquarePosition, opts) + }; + this.#draggedPiece.animate(targetSquarePosition, opts); // set state - this.#isDragging = false + this.#isDragging = false; } - #error (code, msg, obj) { + #error(code, msg, obj) { // do nothing if showErrors is not set if ( Object.prototype.hasOwnProperty.call(this.#config, 'showErrors') !== true || this.#config.showErrors === false ) { - return + return; } - let errorText = 'Chessboard Error ' + code + ': ' + msg + let errorText = 'Chessboard Error ' + code + ': ' + msg; // print to console if ( @@ -857,459 +859,459 @@ class Chessboard { typeof console === 'object' && typeof console.log === 'function' ) { - console.log(errorText) + console.log(errorText); if (obj) { - console.log(obj) + console.log(obj); } - return + return; } // alert errors if (this.#config.showErrors === 'alert') { if (obj) { - errorText += '\n\n' + JSON.stringify(obj) + errorText += '\n\n' + JSON.stringify(obj); } - window.alert(errorText) - return + window.alert(errorText); + return; } // custom function if (isFunction(this.#config.showErrors)) { - this.#config.showErrors(code, msg, obj) + this.#config.showErrors(code, msg, obj); } } - #setInitialState () { - this.#currentOrientation = this.#config.orientation + #setInitialState() { + this.#currentOrientation = this.#config.orientation; // make sure position is valid if (Object.prototype.hasOwnProperty.call(this.#config, 'position')) { if (this.#config.position === 'start') { - this.#currentPosition = deepCopy(START_POSITION) + this.#currentPosition = deepCopy(START_POSITION); } else if (validFen(this.#config.position)) { - this.#currentPosition = fenToObj(this.#config.position) + this.#currentPosition = fenToObj(this.#config.position); } else if (validPositionObject(this.#config.position)) { - this.#currentPosition = deepCopy(this.#config.position) + this.#currentPosition = deepCopy(this.#config.position); } else { this.#error( 7263, 'Invalid value passed to config.position.', this.#config.position - ) + ); } } } - #buildBoardHTML (orientation) { + #buildBoardHTML(orientation) { if (orientation !== 'black') { - orientation = 'white' + orientation = 'white'; } - let html = '' + let html = ''; // algebraic notation / orientation - const alpha = deepCopy(COLUMNS) - let row = 8 + const alpha = deepCopy(COLUMNS); + let row = 8; if (orientation === 'black') { - alpha.reverse() - row = 1 + alpha.reverse(); + row = 1; } - let squareColor = 'white' + let squareColor = 'white'; for (let i = 0; i < 8; i++) { - html += '
' + html += '
'; for (let j = 0; j < 8; j++) { - const square = alpha[j] + row + const square = alpha[j] + row; html += '
' + 'data-square="' + square + '">'; if (this.#config.showNotation) { // alpha notation if ((orientation === 'white' && row === 1) || (orientation === 'black' && row === 8)) { - html += '
' + alpha[j] + '
' + html += '
' + alpha[j] + '
'; } // numeric notation if (j === 0) { - html += '
' + row + '
' + html += '
' + row + '
'; } } - html += '
' // end .square + html += '
'; // end .square - squareColor = (squareColor === 'white') ? 'black' : 'white' + squareColor = (squareColor === 'white') ? 'black' : 'white'; } - html += '
' + html += '
'; - squareColor = (squareColor === 'white') ? 'black' : 'white' + squareColor = (squareColor === 'white') ? 'black' : 'white'; if (orientation === 'white') { - row = row - 1 + row = row - 1; } else { - row = row + 1 + row = row + 1; } } - return interpolateTemplate(html, ClassNameLookup) + return interpolateTemplate(html, ClassNameLookup); } - #buildPieceImgSrc (piece) { + #buildPieceImgSrc(piece) { if (isFunction(this.#config.pieceTheme)) { - return this.#config.pieceTheme(piece) + return this.#config.pieceTheme(piece); } if (isString(this.#config.pieceTheme)) { - return interpolateTemplate(this.#config.pieceTheme, { piece }) + return interpolateTemplate(this.#config.pieceTheme, { piece }); } // NOTE: this should never happen - this.#error(8272, 'Unable to build image source for config.pieceTheme.') - return '' + this.#error(8272, 'Unable to build image source for config.pieceTheme.'); + return ''; } - #buildPieceElement (piece, hidden, id) { - const tpl = document.createElement('template') - tpl.innerHTML = this.#buildPieceHTML(piece, hidden, id) - return /** @type {HTMLElement} */(tpl.content.firstElementChild) + #buildPieceElement(piece, hidden, id) { + const tpl = document.createElement('template'); + tpl.innerHTML = this.#buildPieceHTML(piece, hidden, id); + return /** @type {HTMLElement} */(tpl.content.firstElementChild); } - #buildPieceHTML (piece, hidden, id) { - let html = ' { // add the "real" piece to the destination square - $destSquare.append(this.#buildPieceElement(piece)) + $destSquare.append(this.#buildPieceElement(piece)); // remove the animated piece - $animatedPiece.remove() + $animatedPiece.remove(); // run complete function if (isFunction(completeFn)) { - completeFn() + completeFn(); } - } + }; } - #animateSparePieceToSquare (piece, dest, completeFn) { - const $srcSquare = document.getElementById(this.#sparePiecesElsIds[piece]) - const $destSquare = document.getElementById(this.#squareElsIds[dest]) + #animateSparePieceToSquare(piece, dest, completeFn) { + const $srcSquare = document.getElementById(this.#sparePiecesElsIds[piece]); + const $destSquare = document.getElementById(this.#squareElsIds[dest]); if (!$srcSquare) { - throw new Error(`Unable to locate source square with id ${this.#squareElsIds[piece]}`) + throw new Error(`Unable to locate source square with id ${this.#squareElsIds[piece]}`); } if (!$destSquare) { - throw new Error(`Unable to locate destination square with id ${this.#squareElsIds[dest]}`) + throw new Error(`Unable to locate destination square with id ${this.#squareElsIds[dest]}`); } // create the animate piece - const $animatedPiece = document.body.appendChild(this.#buildPieceElement(piece, true, uuid())) - $animatedPiece.style.setProperty('display', '') - $animatedPiece.style.setProperty('position', 'absolute') + const $animatedPiece = document.body.appendChild(this.#buildPieceElement(piece, true, uuid())); + $animatedPiece.style.setProperty('display', ''); + $animatedPiece.style.setProperty('position', 'absolute'); // animate the piece to the destination square - const animation = $animatedPiece.animate([getJqueryStyleOffset($srcSquare), getJqueryStyleOffset($destSquare)], this.#config.moveSpeed) + const animation = $animatedPiece.animate([getJqueryStyleOffset($srcSquare), getJqueryStyleOffset($destSquare)], this.#config.moveSpeed); animation.onfinish = () => { - $destSquare.querySelector(`.${ClassNameLookup.piece}`)?.remove() + $destSquare.querySelector(`.${ClassNameLookup.piece}`)?.remove(); // add the "real" piece to the destination square - $destSquare.append(this.#buildPieceElement(piece)) + $destSquare.append(this.#buildPieceElement(piece)); // remove the animated piece - $animatedPiece.remove() + $animatedPiece.remove(); // run complete function if (isFunction(completeFn)) { - completeFn() + completeFn(); } - } + }; } // execute an array of animations - #doAnimations (animations, oldPos, newPos) { - if (animations.length === 0) return + #doAnimations(animations, oldPos, newPos) { + if (animations.length === 0) return; - let numFinished = 0 + let numFinished = 0; const onFinishAnimation3 = () => { // exit if all the animations aren't finished - numFinished = numFinished + 1 - if (numFinished !== animations.length) return + numFinished = numFinished + 1; + if (numFinished !== animations.length) return; - this.#drawPositionInstant() + this.#drawPositionInstant(); // run their onMoveEnd function if (isFunction(this.#config.onMoveEnd)) { - this.#config.onMoveEnd(deepCopy(oldPos), deepCopy(newPos)) + this.#config.onMoveEnd(deepCopy(oldPos), deepCopy(newPos)); } - } + }; for (let i = 0; i < animations.length; i++) { - const animation = animations[i] + const animation = animations[i]; // clear a piece if (animation.type === 'clear') { document.querySelectorAll(`#${this.#squareElsIds[animation.square]} .${ClassNameLookup.piece}`) .forEach(x => { - const animation = x.animate([{ opacity: 1 }, { opacity: 0 }], this.#config.trashSpeed) - animation.onfinish = onFinishAnimation3 - }) + const animation = x.animate([{ opacity: 1 }, { opacity: 0 }], this.#config.trashSpeed); + animation.onfinish = onFinishAnimation3; + }); // add a piece with no spare pieces - fade the piece onto the square } else if (animation.type === 'add' && !this.#config.sparePieces) { - const element = document.getElementById(this.#squareElsIds[animation.square]) + const element = document.getElementById(this.#squareElsIds[animation.square]); if (element) { - element.append(this.#buildPieceElement(animation.piece, true)) + element.append(this.#buildPieceElement(animation.piece, true)); element.querySelectorAll(`.${ClassNameLookup.piece}`) .forEach(x => { - const animation = x.animate([{ opacity: 0 }, { opacity: 1 }], this.#config.appearSpeed) - animation.onfinish = onFinishAnimation3 - }) + const animation = x.animate([{ opacity: 0 }, { opacity: 1 }], this.#config.appearSpeed); + animation.onfinish = onFinishAnimation3; + }); } // add a piece with spare pieces - animate from the spares } else if (animation.type === 'add' && this.#config.sparePieces) { - this.#animateSparePieceToSquare(animation.piece, animation.square, onFinishAnimation3) + this.#animateSparePieceToSquare(animation.piece, animation.square, onFinishAnimation3); // move a piece from squareA to squareB } else if (animation.type === 'move') { - this.#animateSquareToSquare(animation.source, animation.destination, animation.piece, onFinishAnimation3) + this.#animateSquareToSquare(animation.source, animation.destination, animation.piece, onFinishAnimation3); } } } // calculate an array of animations that need to happen in order to get // from pos1 to pos2 - #calculateAnimations (pos1, pos2) { + #calculateAnimations(pos1, pos2) { // make copies of both - pos1 = deepCopy(pos1) - pos2 = deepCopy(pos2) + pos1 = deepCopy(pos1); + pos2 = deepCopy(pos2); - const animations = [] - const squaresMovedTo = {} + const animations = []; + const squaresMovedTo = {}; // remove pieces that are the same in both positions for (const i in pos2) { - if (!Object.prototype.hasOwnProperty.call(pos2, i)) continue + if (!Object.prototype.hasOwnProperty.call(pos2, i)) continue; if (Object.prototype.hasOwnProperty.call(pos1, i) && pos1[i] === pos2[i]) { - delete pos1[i] - delete pos2[i] + delete pos1[i]; + delete pos2[i]; } } // find all the "move" animations for (const i in pos2) { - if (!Object.prototype.hasOwnProperty.call(pos2, i)) continue + if (!Object.prototype.hasOwnProperty.call(pos2, i)) continue; - const closestPiece = findClosestPiece(pos1, pos2[i], i) + const closestPiece = findClosestPiece(pos1, pos2[i], i); if (closestPiece) { animations.push({ type: 'move', source: closestPiece, destination: i, piece: pos2[i] - }) + }); - delete pos1[closestPiece] - delete pos2[i] - squaresMovedTo[i] = true + delete pos1[closestPiece]; + delete pos2[i]; + squaresMovedTo[i] = true; } } // "add" animations for (const i in pos2) { - if (!Object.prototype.hasOwnProperty.call(pos2, i)) continue + if (!Object.prototype.hasOwnProperty.call(pos2, i)) continue; animations.push({ type: 'add', square: i, piece: pos2[i] - }) + }); - delete pos2[i] + delete pos2[i]; } // "clear" animations for (const i in pos1) { - if (!Object.prototype.hasOwnProperty.call(pos1, i)) continue + if (!Object.prototype.hasOwnProperty.call(pos1, i)) continue; // do not clear a piece if it is on a square that is the result // of a "move", ie: a piece capture - if (Object.prototype.hasOwnProperty.call(squaresMovedTo, i)) continue + if (Object.prototype.hasOwnProperty.call(squaresMovedTo, i)) continue; animations.push({ type: 'clear', square: i, piece: pos1[i] - }) + }); - delete pos1[i] + delete pos1[i]; } - return animations + return animations; } // ------------------------------------------------------------------------- // Control Flow // ------------------------------------------------------------------------- - #drawPositionInstant () { + #drawPositionInstant() { // clear the board - this.#board.querySelectorAll(`.${ClassNameLookup.piece}`).forEach(x => x.remove()) + this.#board.querySelectorAll(`.${ClassNameLookup.piece}`).forEach(x => x.remove()); // add the pieces for (const i in this.#currentPosition) { - if (!Object.prototype.hasOwnProperty.call(this.#currentPosition, i)) continue + if (!Object.prototype.hasOwnProperty.call(this.#currentPosition, i)) continue; - document.getElementById(this.#squareElsIds[i])?.append(this.#buildPieceElement(this.#currentPosition[i])) + document.getElementById(this.#squareElsIds[i])?.append(this.#buildPieceElement(this.#currentPosition[i])); } } - #drawBoard () { - this.#board.innerHTML = this.#buildBoardHTML(this.#currentOrientation) - this.#drawPositionInstant() + #drawBoard() { + this.#board.innerHTML = this.#buildBoardHTML(this.#currentOrientation); + this.#drawPositionInstant(); if (this.#config.sparePieces) { if (this.#currentOrientation === 'white') { /** @type {HTMLElement} */(this.#sparePiecesTop).innerHTML = this.#buildSparePiecesHTML('black'); - /** @type {HTMLElement} */(this.#sparePiecesBottom).innerHTML = this.#buildSparePiecesHTML('white') + /** @type {HTMLElement} */(this.#sparePiecesBottom).innerHTML = this.#buildSparePiecesHTML('white'); } else { /** @type {HTMLElement} */(this.#sparePiecesTop).innerHTML = this.#buildSparePiecesHTML('white'); - /** @type {HTMLElement} */(this.#sparePiecesBottom).innerHTML = this.#buildSparePiecesHTML('black') + /** @type {HTMLElement} */(this.#sparePiecesBottom).innerHTML = this.#buildSparePiecesHTML('black'); } } } - #setCurrentPosition (position) { - const oldPos = deepCopy(this.#currentPosition) - const newPos = deepCopy(position) - const oldFen = objToFen(oldPos) - const newFen = objToFen(newPos) + #setCurrentPosition(position) { + const oldPos = deepCopy(this.#currentPosition); + const newPos = deepCopy(position); + const oldFen = objToFen(oldPos); + const newFen = objToFen(newPos); // do nothing if no change in position - if (oldFen === newFen) return + if (oldFen === newFen) return; // run their onChange function if (isFunction(this.#config.onChange)) { - this.#config.onChange(oldPos, newPos) + this.#config.onChange(oldPos, newPos); } // update state - this.#currentPosition = position + this.#currentPosition = position; } - #isXYOnSquare (x, y) { + #isXYOnSquare(x, y) { for (const i in this.#squareElsOffsets) { - if (!Object.prototype.hasOwnProperty.call(this.#squareElsOffsets, i)) continue + if (!Object.prototype.hasOwnProperty.call(this.#squareElsOffsets, i)) continue; - const s = this.#squareElsOffsets[i] + const s = this.#squareElsOffsets[i]; if (x >= s.left && x < s.left + this.#squareSize && y >= s.top && y < s.top + this.#squareSize) { - return i + return i; } } - return 'offboard' + return 'offboard'; } // records the XY coords of every square into memory - #captureSquareOffsets () { - this.#squareElsOffsets = {} + #captureSquareOffsets() { + this.#squareElsOffsets = {}; for (const i in this.#squareElsIds) { - if (!Object.prototype.hasOwnProperty.call(this.#squareElsIds, i)) continue + if (!Object.prototype.hasOwnProperty.call(this.#squareElsIds, i)) continue; - const element = document.getElementById(this.#squareElsIds[i]) + const element = document.getElementById(this.#squareElsIds[i]); - if (!element) continue + if (!element) continue; - this.#squareElsOffsets[i] = getJqueryStyleOffset(element) + this.#squareElsOffsets[i] = getJqueryStyleOffset(element); } } - #removeSquareHighlights () { + #removeSquareHighlights() { this.#board.querySelectorAll('.' + ClassNameLookup.square).forEach(x => { - x.classList.remove(ClassNameLookup.highlight1) - x.classList.remove(ClassNameLookup.highlight2) - }) + x.classList.remove(ClassNameLookup.highlight1); + x.classList.remove(ClassNameLookup.highlight2); + }); } - #snapbackDraggedPiece () { + #snapbackDraggedPiece() { // there is no "snapback" for spare pieces if (this.#draggedPieceSource === 'spare') { - this.#trashDraggedPiece() - return + this.#trashDraggedPiece(); + return; } - this.#removeSquareHighlights() + this.#removeSquareHighlights(); // get source square position - const sourceSquare = document.getElementById(this.#squareElsIds[this.#draggedPieceSource]) - if (!sourceSquare) throw new Error('') - const sourceSquarePosition = getJqueryStyleOffset(sourceSquare) + const sourceSquare = document.getElementById(this.#squareElsIds[this.#draggedPieceSource]); + if (!sourceSquare) throw new Error(''); + const sourceSquarePosition = getJqueryStyleOffset(sourceSquare); // animate the piece to the target square const opts = { duration: this.#config.snapbackSpeed, complete: () => { - this.#drawPositionInstant() - this.#draggedPiece.style.setProperty('display', 'none') + this.#drawPositionInstant(); + this.#draggedPiece.style.setProperty('display', 'none'); // run their onSnapbackEnd function if (isFunction(this.#config.onSnapbackEnd)) { @@ -1318,94 +1320,94 @@ class Chessboard { this.#draggedPieceSource, deepCopy(this.#currentPosition), this.#currentOrientation - ) + ); } } - } - this.#draggedPiece.animate(sourceSquarePosition, opts) + }; + this.#draggedPiece.animate(sourceSquarePosition, opts); // set state - this.#isDragging = false + this.#isDragging = false; } - #trashDraggedPiece () { - this.#removeSquareHighlights() + #trashDraggedPiece() { + this.#removeSquareHighlights(); // remove the source piece - const newPosition = deepCopy(this.#currentPosition) - delete newPosition[this.#draggedPieceSource] - this.#setCurrentPosition(newPosition) + const newPosition = deepCopy(this.#currentPosition); + delete newPosition[this.#draggedPieceSource]; + this.#setCurrentPosition(newPosition); // redraw the position - this.#drawPositionInstant() + this.#drawPositionInstant(); // hide the dragged piece - this.#draggedPiece.animate([{ opacity: 1 }, { opacity: 0 }], this.#config.trashSpeed) + this.#draggedPiece.animate([{ opacity: 1 }, { opacity: 0 }], this.#config.trashSpeed); // set state - this.#isDragging = false + this.#isDragging = false; } - #beginDraggingPiece (source, piece, x, y) { + #beginDraggingPiece(source, piece, x, y) { // run their custom onDragStart function // their custom onDragStart function can cancel drag start if (isFunction(this.#config.onDragStart) && this.#config.onDragStart(source, piece, deepCopy(this.#currentPosition), this.#currentOrientation) === false) { - return + return; } // set state - this.#isDragging = true - this.#draggedPiece = piece - this.#draggedPieceSource = source + this.#isDragging = true; + this.#draggedPiece = piece; + this.#draggedPieceSource = source; // if the piece came from spare pieces, location is offboard if (source === 'spare') { - this.#draggedPieceLocation = 'offboard' + this.#draggedPieceLocation = 'offboard'; } else { - this.#draggedPieceLocation = source + this.#draggedPieceLocation = source; } // capture the x, y coords of all squares in memory - this.#captureSquareOffsets() + this.#captureSquareOffsets(); // create the dragged piece - this.#draggedPiece.setAttribute('src', this.#buildPieceImgSrc(piece)) - this.#draggedPiece.style.setProperty('display', '') - this.#draggedPiece.style.setProperty('position', 'absolute') - this.#draggedPiece.style.setProperty('left', `${x - this.#squareSize / 2}px`) - this.#draggedPiece.style.setProperty('top', `${y - this.#squareSize / 2}px`) + this.#draggedPiece.setAttribute('src', this.#buildPieceImgSrc(piece)); + this.#draggedPiece.style.setProperty('display', ''); + this.#draggedPiece.style.setProperty('position', 'absolute'); + this.#draggedPiece.style.setProperty('left', `${x - this.#squareSize / 2}px`); + this.#draggedPiece.style.setProperty('top', `${y - this.#squareSize / 2}px`); if (source !== 'spare') { // highlight the source square and hide the piece - const sourceSquare = document.getElementById(this.#squareElsIds[source]) + const sourceSquare = document.getElementById(this.#squareElsIds[source]); if (sourceSquare) { sourceSquare.classList.add(ClassNameLookup.highlight1); /** @type {NodeListOf} */(sourceSquare.querySelectorAll(`.${ClassNameLookup.piece}`)) - .forEach(x => x.style.setProperty('display', 'none')) + .forEach(x => x.style.setProperty('display', 'none')); } } } - #updateDraggedPiece (x, y) { + #updateDraggedPiece(x, y) { // put the dragged piece over the mouse cursor - this.#draggedPiece.style.setProperty('left', `${x - this.#squareSize / 2}px`) - this.#draggedPiece.style.setProperty('top', `${y - this.#squareSize / 2}px`) + this.#draggedPiece.style.setProperty('left', `${x - this.#squareSize / 2}px`); + this.#draggedPiece.style.setProperty('top', `${y - this.#squareSize / 2}px`); // get location - const location = this.#isXYOnSquare(x, y) + const location = this.#isXYOnSquare(x, y); // do nothing if the location has not changed - if (location === this.#draggedPieceLocation) return + if (location === this.#draggedPieceLocation) return; // remove highlight from previous square if (validSquare(this.#draggedPieceLocation)) { - document.getElementById(this.#squareElsIds[this.#draggedPieceLocation])?.classList.remove(ClassNameLookup.highlight2) + document.getElementById(this.#squareElsIds[this.#draggedPieceLocation])?.classList.remove(ClassNameLookup.highlight2); } // add highlight to new square if (validSquare(location)) { - document.getElementById(this.#squareElsIds[location])?.classList.add(ClassNameLookup.highlight2) + document.getElementById(this.#squareElsIds[location])?.classList.add(ClassNameLookup.highlight2); } // run onDragMove @@ -1417,26 +1419,26 @@ class Chessboard { this.#draggedPiece, deepCopy(this.#currentPosition), this.#currentOrientation - ) + ); } // update state - this.#draggedPieceLocation = location + this.#draggedPieceLocation = location; } - #stopDraggedPiece (location) { + #stopDraggedPiece(location) { // determine what the action should be - let action = 'drop' + let action = 'drop'; if (location === 'offboard' && this.#config.dropOffBoard === 'snapback') { - action = 'snapback' + action = 'snapback'; } if (location === 'offboard' && this.#config.dropOffBoard === 'trash') { - action = 'trash' + action = 'trash'; } // run their onDrop function, which can potentially change the drop action if (isFunction(this.#config.onDrop)) { - const newPosition = deepCopy(this.#currentPosition) + const newPosition = deepCopy(this.#currentPosition); // source piece is a spare piece and position is off the board // if (draggedPieceSource === 'spare' && location === 'offboard') {...} @@ -1445,23 +1447,23 @@ class Chessboard { // source piece is a spare piece and position is on the board if (this.#draggedPieceSource === 'spare' && validSquare(location)) { // add the piece to the board - newPosition[location] = this.#draggedPiece + newPosition[location] = this.#draggedPiece; } // source piece was on the board and position is off the board if (validSquare(this.#draggedPieceSource) && location === 'offboard') { // remove the piece from the board - delete newPosition[this.#draggedPieceSource] + delete newPosition[this.#draggedPieceSource]; } // source piece was on the board and position is on the board if (validSquare(this.#draggedPieceSource) && validSquare(location)) { // move the piece - delete newPosition[this.#draggedPieceSource] - newPosition[location] = this.#draggedPiece + delete newPosition[this.#draggedPieceSource]; + newPosition[location] = this.#draggedPiece; } - const oldPosition = deepCopy(this.#currentPosition) + const oldPosition = deepCopy(this.#currentPosition); const result = this.#config.onDrop( this.#draggedPieceSource, @@ -1470,19 +1472,19 @@ class Chessboard { newPosition, oldPosition, this.#currentOrientation - ) + ); if (result === 'snapback' || result === 'trash') { - action = result + action = result; } } // do it! if (action === 'snapback') { - this.#snapbackDraggedPiece() + this.#snapbackDraggedPiece(); } else if (action === 'trash') { - this.#trashDraggedPiece() + this.#trashDraggedPiece(); } else if (action === 'drop') { - this.#dropDraggedPieceOnSquare(location) + this.#dropDraggedPieceOnSquare(location); } } @@ -1490,210 +1492,210 @@ class Chessboard { // Browser Events // ------------------------------------------------------------------------- - #stopDefault (evt) { - evt.preventDefault() + #stopDefault(evt) { + evt.preventDefault(); } - #mousedownSquare (evt) { + #mousedownSquare(evt) { // do nothing if we're not draggable - if (!this.#config.draggable) return + if (!this.#config.draggable) return; // do nothing if there is no piece on this square - const square = evt.currentTarget.getAttribute('data-square') - if (!validSquare(square)) return - if (!Object.prototype.hasOwnProperty.call(this.#currentPosition, square)) return + const square = evt.currentTarget.getAttribute('data-square'); + if (!validSquare(square)) return; + if (!Object.prototype.hasOwnProperty.call(this.#currentPosition, square)) return; - this.#beginDraggingPiece(square, this.#currentPosition[square], evt.pageX, evt.pageY) + this.#beginDraggingPiece(square, this.#currentPosition[square], evt.pageX, evt.pageY); } - #touchstartSquare (e) { + #touchstartSquare(e) { // do nothing if we're not draggable - if (!this.#config.draggable) return + if (!this.#config.draggable) return; // do nothing if there is no piece on this square - const square = e.currentTarget.getAttribute('data-square') - if (!validSquare(square)) return - if (!Object.prototype.hasOwnProperty.call(this.#currentPosition, square)) return + const square = e.currentTarget.getAttribute('data-square'); + if (!validSquare(square)) return; + if (!Object.prototype.hasOwnProperty.call(this.#currentPosition, square)) return; - e = e.originalEvent + e = e.originalEvent; this.#beginDraggingPiece( square, this.#currentPosition[square], e.changedTouches[0].pageX, e.changedTouches[0].pageY - ) + ); } - #mousedownSparePiece (evt) { + #mousedownSparePiece(evt) { // do nothing if sparePieces is not enabled - if (!this.#config.sparePieces) return + if (!this.#config.sparePieces) return; - const piece = evt.currentTarget.getAttribute('data-piece') + const piece = evt.currentTarget.getAttribute('data-piece'); - this.#beginDraggingPiece('spare', piece, evt.pageX, evt.pageY) + this.#beginDraggingPiece('spare', piece, evt.pageX, evt.pageY); } - #touchstartSparePiece (e) { + #touchstartSparePiece(e) { // do nothing if sparePieces is not enabled - if (!this.#config.sparePieces) return + if (!this.#config.sparePieces) return; - const piece = e.currentTarget.getAttribute('data-piece') + const piece = e.currentTarget.getAttribute('data-piece'); - e = e.originalEvent + e = e.originalEvent; this.#beginDraggingPiece( 'spare', piece, e.changedTouches[0].pageX, e.changedTouches[0].pageY - ) + ); } - #mousemoveWindow (evt) { + #mousemoveWindow(evt) { if (this.#isDragging) { - this.#updateDraggedPiece(evt.pageX, evt.pageY) + this.#updateDraggedPiece(evt.pageX, evt.pageY); } } - #touchmoveWindow (evt) { + #touchmoveWindow(evt) { // do nothing if we are not dragging a piece - if (!this.#isDragging) return + if (!this.#isDragging) return; // prevent screen from scrolling - evt.preventDefault() + evt.preventDefault(); this.#updateDraggedPiece(evt.originalEvent.changedTouches[0].pageX, - evt.originalEvent.changedTouches[0].pageY) + evt.originalEvent.changedTouches[0].pageY); } - #mouseupWindow (evt) { + #mouseupWindow(evt) { // do nothing if we are not dragging a piece - if (!this.#isDragging) return + if (!this.#isDragging) return; // get the location - const location = this.#isXYOnSquare(evt.pageX, evt.pageY) + const location = this.#isXYOnSquare(evt.pageX, evt.pageY); - this.#stopDraggedPiece(location) + this.#stopDraggedPiece(location); } - #touchendWindow (evt) { + #touchendWindow(evt) { // do nothing if we are not dragging a piece - if (!this.#isDragging) return + if (!this.#isDragging) return; // get the location const location = this.#isXYOnSquare(evt.originalEvent.changedTouches[0].pageX, - evt.originalEvent.changedTouches[0].pageY) + evt.originalEvent.changedTouches[0].pageY); - this.#stopDraggedPiece(location) + this.#stopDraggedPiece(location); } /** * @param {MouseEvent} evt * @returns {void} */ - #mouseenterSquare (evt) { + #mouseenterSquare(evt) { // do not fire this event if we are dragging a piece // NOTE: this should never happen, but it's a safeguard - if (this.#isDragging) return + if (this.#isDragging) return; // exit if they did not provide a onMouseoverSquare function - if (!isFunction(this.#config.onMouseoverSquare)) return + if (!isFunction(this.#config.onMouseoverSquare)) return; // get the square - const square = /** @type {HTMLElement | null} */(evt.currentTarget)?.getAttribute('data-square') + const square = /** @type {HTMLElement | null} */(evt.currentTarget)?.getAttribute('data-square'); // NOTE: this should never happen; defensive - if (!validSquare(square)) return + if (!validSquare(square)) return; // get the piece on this square - let piece = false + let piece = false; if (square != null && Object.prototype.hasOwnProperty.call(this.#currentPosition, square)) { - piece = this.#currentPosition[square] + piece = this.#currentPosition[square]; } // execute their function - this.#config.onMouseoverSquare(square, piece, deepCopy(this.#currentPosition), this.#currentOrientation) + this.#config.onMouseoverSquare(square, piece, deepCopy(this.#currentPosition), this.#currentOrientation); } - #mouseleaveSquare (evt) { + #mouseleaveSquare(evt) { // do not fire this event if we are dragging a piece // NOTE: this should never happen, but it's a safeguard - if (this.#isDragging) return + if (this.#isDragging) return; // exit if they did not provide an onMouseoutSquare function - if (!isFunction(this.#config.onMouseoutSquare)) return + if (!isFunction(this.#config.onMouseoutSquare)) return; // get the square - const square = document.getElementById(evt.currentTarget)?.getAttribute('data-square') + const square = document.getElementById(evt.currentTarget)?.getAttribute('data-square'); // NOTE: this should never happen; defensive - if (!validSquare(square)) return + if (!validSquare(square)) return; // get the piece on this square - let piece = false + let piece = false; if (square != null && Object.prototype.hasOwnProperty.call(this.#currentPosition, square)) { - piece = this.#currentPosition[square] + piece = this.#currentPosition[square]; } // execute their function - this.#config.onMouseoutSquare(square, piece, deepCopy(this.#currentPosition), this.#currentOrientation) + this.#config.onMouseoutSquare(square, piece, deepCopy(this.#currentPosition), this.#currentOrientation); } // ------------------------------------------------------------------------- // Initialization // ------------------------------------------------------------------------- - #addEvents () { + #addEvents() { // prevent "image drag" - document.body.onmousedown = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.piece}`) && this.#stopDefault(e) - document.body.onmousemove = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.piece}`) && this.#stopDefault(e) + document.body.onmousedown = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.piece}`) && this.#stopDefault(e); + document.body.onmousemove = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.piece}`) && this.#stopDefault(e); // mouse drag pieces - this.#board.onmousedown = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.square}`) && this.#mousedownSquare(e) - this.#container.onmousedown = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.sparePieces} .${ClassNameLookup.piece}`) && this.#mousedownSparePiece(e) + this.#board.onmousedown = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.square}`) && this.#mousedownSquare(e); + this.#container.onmousedown = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.sparePieces} .${ClassNameLookup.piece}`) && this.#mousedownSparePiece(e); // mouse enter / leave square - this.#board.onmouseenter = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.square}`) && this.#mouseenterSquare(e) - this.#board.onmouseleave = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.square}`) && this.#mouseleaveSquare(e) + this.#board.onmouseenter = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.square}`) && this.#mouseenterSquare(e); + this.#board.onmouseleave = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.square}`) && this.#mouseleaveSquare(e); // piece drag - const throttledMousemoveWindow = throttle((e) => this.#mousemoveWindow(e), this.#config.dragThrottleRate) - const throttledTouchmoveWindow = throttle((e) => this.#touchmoveWindow(e), this.#config.dragThrottleRate) - window.onmousemove = (e) => throttledMousemoveWindow(e) - window.onmouseup = (e) => this.#mouseupWindow(e) + const throttledMousemoveWindow = throttle((e) => this.#mousemoveWindow(e), this.#config.dragThrottleRate); + const throttledTouchmoveWindow = throttle((e) => this.#touchmoveWindow(e), this.#config.dragThrottleRate); + window.onmousemove = (e) => throttledMousemoveWindow(e); + window.onmouseup = (e) => this.#mouseupWindow(e); // touch drag pieces if (isTouchDevice()) { - this.#board.ontouchstart = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.square}`) && this.#touchstartSquare(e) - this.#board.ontouchstart = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.sparePieces} .${ClassNameLookup.piece}`) && this.#touchstartSparePiece(e) - window.ontouchmove = (e) => throttledTouchmoveWindow(e) - window.ontouchend = (e) => this.#touchendWindow(e) + this.#board.ontouchstart = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.square}`) && this.#touchstartSquare(e); + this.#board.ontouchstart = (e) => e.target && /** @type {Element} */(e.target).matches(`.${ClassNameLookup.sparePieces} .${ClassNameLookup.piece}`) && this.#touchstartSparePiece(e); + window.ontouchmove = (e) => throttledTouchmoveWindow(e); + window.ontouchend = (e) => this.#touchendWindow(e); } } /** * Calculates square size based on the width of the container */ - #calculateSquareSize () { + #calculateSquareSize() { // got a little CSS black magic here, so let me explain: // get the width of the container element (could be anything), reduce by 1 for // fudge factor, and then keep reducing until we find an exact mod 8 for // our square size - const containerWidth = this.#container.getBoundingClientRect().width + const containerWidth = this.#container.getBoundingClientRect().width; // defensive, prevent infinite loop if (!containerWidth || containerWidth <= 0) { - return 0 + return 0; } // pad one pixel - let boardWidth = containerWidth - 1 + let boardWidth = containerWidth - 1; while (boardWidth % 8 !== 0 && boardWidth > 0) { - boardWidth = boardWidth - 1 + boardWidth = boardWidth - 1; } - return boardWidth / 8 + return boardWidth / 8; } } -export { Chessboard, fenToObj, objToFen, interpolateTemplate, validSquare, validPieceCode, validFen, validPositionObject, START_FEN, START_POSITION } +export { Chessboard, fenToObj, objToFen, interpolateTemplate, validSquare, validPieceCode, validFen, validPositionObject, START_FEN, START_POSITION }; diff --git a/lib/chessboard.test.js b/lib/chessboard.test.js index c7aeeb91..c51e204b 100644 --- a/lib/chessboard.test.js +++ b/lib/chessboard.test.js @@ -1,69 +1,70 @@ -import assert from 'node:assert' -import test from 'node:test' +/* eslint-env node */ +import assert from 'node:assert'; +import test from 'node:test'; -import { interpolateTemplate, objToFen, START_FEN, START_POSITION, validFen, validPieceCode, validPositionObject, validSquare } from './chessboard.js' +import { interpolateTemplate, objToFen, START_FEN, START_POSITION, validFen, validPieceCode, validPositionObject, validSquare } from './chessboard.js'; test('interpolateTemplate', () => { - assert.equal(interpolateTemplate('abc', { a: 'x' }), 'abc') - assert.equal(interpolateTemplate('{a}bc', {}), '{a}bc') - assert.equal(interpolateTemplate('{a}bc', { p: 'q' }), '{a}bc') - assert.equal(interpolateTemplate('{a}bc', { a: 'x' }), 'xbc') - assert.equal(interpolateTemplate('{a}bc{a}bc', { a: 'x' }), 'xbcxbc') - assert.equal(interpolateTemplate('{a}{a}{b}', { a: 'x', b: 'y' }), 'xxy') -}) + assert.equal(interpolateTemplate('abc', { a: 'x' }), 'abc'); + assert.equal(interpolateTemplate('{a}bc', {}), '{a}bc'); + assert.equal(interpolateTemplate('{a}bc', { p: 'q' }), '{a}bc'); + assert.equal(interpolateTemplate('{a}bc', { a: 'x' }), 'xbc'); + assert.equal(interpolateTemplate('{a}bc{a}bc', { a: 'x' }), 'xbcxbc'); + assert.equal(interpolateTemplate('{a}{a}{b}', { a: 'x', b: 'y' }), 'xxy'); +}); test('objToFen', () => { - assert.equal(objToFen(START_POSITION), START_FEN) - assert.equal(objToFen({}), '8/8/8/8/8/8/8/8') - assert.equal(objToFen({ a2: 'wP', b2: 'bP' }), '8/8/8/8/8/8/Pp6/8') -}) + assert.equal(objToFen(START_POSITION), START_FEN); + assert.equal(objToFen({}), '8/8/8/8/8/8/8/8'); + assert.equal(objToFen({ a2: 'wP', b2: 'bP' }), '8/8/8/8/8/8/Pp6/8'); +}); test('validSquare', () => { - assert.ok(validSquare('a1')) - assert.ok(validSquare('e2')) - assert.ok(!validSquare('D2')) - assert.ok(!validSquare('g9')) - assert.ok(!validSquare('a')) - assert.ok(!validSquare(true)) - assert.ok(!validSquare(null)) - assert.ok(!validSquare({})) -}) + assert.ok(validSquare('a1')); + assert.ok(validSquare('e2')); + assert.ok(!validSquare('D2')); + assert.ok(!validSquare('g9')); + assert.ok(!validSquare('a')); + assert.ok(!validSquare(true)); + assert.ok(!validSquare(null)); + assert.ok(!validSquare({})); +}); test('validPieceCode', () => { - assert.ok(validPieceCode('bP')) - assert.ok(validPieceCode('bK')) - assert.ok(validPieceCode('wK')) - assert.ok(validPieceCode('wR')) - assert.ok(!validPieceCode('WR')) - assert.ok(!validPieceCode('Wr')) - assert.ok(!validPieceCode('a')) - assert.ok(!validPieceCode(true)) - assert.ok(!validPieceCode(null)) - assert.ok(!validPieceCode({})) -}) + assert.ok(validPieceCode('bP')); + assert.ok(validPieceCode('bK')); + assert.ok(validPieceCode('wK')); + assert.ok(validPieceCode('wR')); + assert.ok(!validPieceCode('WR')); + assert.ok(!validPieceCode('Wr')); + assert.ok(!validPieceCode('a')); + assert.ok(!validPieceCode(true)); + assert.ok(!validPieceCode(null)); + assert.ok(!validPieceCode({})); +}); test('validFen', () => { - assert.ok(validFen(START_FEN)) - assert.ok(validFen('8/8/8/8/8/8/8/8')) - assert.ok(validFen('r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R')) - assert.ok(validFen('3r3r/1p4pp/2nb1k2/pP3p2/8/PB2PN2/p4PPP/R4RK1 b - - 0 1')) - assert.ok(!validFen('3r3z/1p4pp/2nb1k2/pP3p2/8/PB2PN2/p4PPP/R4RK1 b - - 0 1')) - assert.ok(!validFen('anbqkbnr/8/8/8/8/8/PPPPPPPP/8')) - assert.ok(!validFen('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/')) - assert.ok(!validFen('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBN')) - assert.ok(!validFen('888888/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR')) - assert.ok(!validFen('888888/pppppppp/74/8/8/8/PPPPPPPP/RNBQKBNR')) - assert.ok(!validFen({})) -}) + assert.ok(validFen(START_FEN)); + assert.ok(validFen('8/8/8/8/8/8/8/8')); + assert.ok(validFen('r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R')); + assert.ok(validFen('3r3r/1p4pp/2nb1k2/pP3p2/8/PB2PN2/p4PPP/R4RK1 b - - 0 1')); + assert.ok(!validFen('3r3z/1p4pp/2nb1k2/pP3p2/8/PB2PN2/p4PPP/R4RK1 b - - 0 1')); + assert.ok(!validFen('anbqkbnr/8/8/8/8/8/PPPPPPPP/8')); + assert.ok(!validFen('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/')); + assert.ok(!validFen('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBN')); + assert.ok(!validFen('888888/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR')); + assert.ok(!validFen('888888/pppppppp/74/8/8/8/PPPPPPPP/RNBQKBNR')); + assert.ok(!validFen({})); +}); test('validPositionObject', () => { - assert.ok(validPositionObject(START_POSITION)) - assert.ok(validPositionObject({})) - assert.ok(validPositionObject({ e2: 'wP' })) - assert.ok(validPositionObject({ e2: 'wP', d2: 'wP' })) - assert.ok(!validPositionObject({ e2: 'BP' })) - assert.ok(!validPositionObject({ y2: 'wP' })) - assert.ok(!validPositionObject(null)) - assert.ok(!validPositionObject('start')) - assert.ok(!validPositionObject(START_FEN)) -}) + assert.ok(validPositionObject(START_POSITION)); + assert.ok(validPositionObject({})); + assert.ok(validPositionObject({ e2: 'wP' })); + assert.ok(validPositionObject({ e2: 'wP', d2: 'wP' })); + assert.ok(!validPositionObject({ e2: 'BP' })); + assert.ok(!validPositionObject({ y2: 'wP' })); + assert.ok(!validPositionObject(null)); + assert.ok(!validPositionObject('start')); + assert.ok(!validPositionObject(START_FEN)); +}); diff --git a/package.json b/package.json index daa55845..4360b940 100644 --- a/package.json +++ b/package.json @@ -15,21 +15,30 @@ ], "devDependencies": { "@types/node": "18.7.23", + "eslint": "8.24.0", "gulp": "4.0.2", "kidif": "1.1.0", "mustache": "2.3.0", "rollup": "2.79.1", "rollup-plugin-terser": "7.0.2", - "sass": "1.55.0", - "standard": "17.0.0" + "sass": "1.55.0" }, "resolutions": { "chokidar": "3.5.3" }, "scripts": { - "build": "standard lib/chessboard.js && gulp", - "standard": "standard --fix lib/*.js website/js/*.js", + "lint": "eslint Gulpfile.js lib website/js/examples.js", + "build": "npm run lint -- --fix && gulp", "start": "gulp watch", "test": "node --test lib" + }, + "eslintConfig": { + "extends": "eslint:recommended", + "env": { + "es2022": true + }, + "parserOptions": { + "sourceType": "module" + } } } diff --git a/website/js/examples.js b/website/js/examples.js index 1f09ab80..93b371a5 100644 --- a/website/js/examples.js +++ b/website/js/examples.js @@ -1,8 +1,9 @@ -; (function () { - const EXAMPLES = window.CHESSBOARD_EXAMPLES - const prettyPrint = window.prettyPrint +/* eslint-env browser */ +(function () { + const EXAMPLES = window.CHESSBOARD_EXAMPLES; + const prettyPrint = window.prettyPrint; - function htmlEscape (str) { + function htmlEscape(str) { return (str + '') .replace(/&/g, '&') .replace(/ x.classList.remove('active')) - document.getElementById('groupHeader-' + groupIdx)?.classList.add('active') + function highlightGroupHeader(groupIdx) { + document.querySelectorAll('#examplesNav h4').forEach(x => x.classList.remove('active')); + document.getElementById('groupHeader-' + groupIdx)?.classList.add('active'); } - function highlightExampleLink (exampleId) { - document.querySelectorAll('#examplesNav li').forEach(x => x.classList.remove('active')) - document.getElementById('exampleLink-' + exampleId)?.classList.add('active') + function highlightExampleLink(exampleId) { + document.querySelectorAll('#examplesNav li').forEach(x => x.classList.remove('active')); + document.getElementById('exampleLink-' + exampleId)?.classList.add('active'); } - function buildExampleBodyHTML (example, id) { + function buildExampleBodyHTML(example, id) { const html = '

' + '' + htmlEscape(example.name) + @@ -34,60 +35,60 @@ '
' + htmlEscape(example.jsStr) + '
' + '

HTML

' + '
' + htmlEscape(example.html) + '
' + - '

View this example in new window.

' + '

View this example in new window.

'; - return html + return html; } - function showExample (exampleId) { - const groupIdx = document.getElementById('#exampleLink-' + exampleId)?.closest('ul')?.getAttribute('id')?.replace('groupContainer-', '') + function showExample(exampleId) { + const groupIdx = document.getElementById('#exampleLink-' + exampleId)?.closest('ul')?.getAttribute('id')?.replace('groupContainer-', ''); - document.getElementById('groupContainer-' + groupIdx)?.style.setProperty('display', '') - highlightGroupHeader(groupIdx) - highlightExampleLink(exampleId) + document.getElementById('groupContainer-' + groupIdx)?.style.setProperty('display', ''); + highlightGroupHeader(groupIdx); + highlightExampleLink(exampleId); - document.getElementById('exampleBodyContainer').innerHTML = buildExampleBodyHTML(EXAMPLES[exampleId], exampleId) - EXAMPLES[exampleId].jsFn() + document.getElementById('exampleBodyContainer').innerHTML = buildExampleBodyHTML(EXAMPLES[exampleId], exampleId); + EXAMPLES[exampleId].jsFn(); - prettyPrint() + prettyPrint(); } - function clickExampleNavLink (evt) { - const exampleId = evt.target.getAttribute('id').replace('exampleLink-', '') - if (!Object.prototype.hasOwnProperty.call(EXAMPLES, exampleId)) return + function clickExampleNavLink(evt) { + const exampleId = evt.target.getAttribute('id').replace('exampleLink-', ''); + if (!Object.prototype.hasOwnProperty.call(EXAMPLES, exampleId)) return; - window.location.hash = exampleId - loadExampleFromHash() + window.location.hash = exampleId; + loadExampleFromHash(); } - function loadExampleFromHash () { - let exampleId = parseInt(window.location.hash.replace('#', ''), 10) + function loadExampleFromHash() { + let exampleId = parseInt(window.location.hash.replace('#', ''), 10); if (!Object.prototype.hasOwnProperty.call(EXAMPLES, exampleId)) { - exampleId = 1000 - window.location.hash = exampleId + exampleId = 1000; + window.location.hash = exampleId; } - showExample(exampleId) + showExample(exampleId); } - function clickGroupHeader (evt) { - const groupIdx = evt.target.getAttribute('id').replace('groupHeader-', '') - const examplesList = document.getElementById('#groupContainer-' + groupIdx) + function clickGroupHeader(evt) { + const groupIdx = evt.target.getAttribute('id').replace('groupHeader-', ''); + const examplesList = document.getElementById('#groupContainer-' + groupIdx); if (examplesList?.style.getPropertyValue('display') === 'none') { - examplesList.slideDown('fast') + examplesList.slideDown('fast'); } else { - examplesList.slideUp('fast') + examplesList.slideUp('fast'); } } - const examplesNav = document.getElementById('examplesNav') + const examplesNav = document.getElementById('examplesNav'); examplesNav.onclick = (evt) => { if (evt.target) { if (evt.target.matches('li')) { - clickExampleNavLink(evt) + clickExampleNavLink(evt); } else if (evt.target.matches('h4')) { - clickGroupHeader(evt) + clickGroupHeader(evt); } } - } - loadExampleFromHash() -})() + }; + loadExampleFromHash(); +})(); diff --git a/yarn.lock b/yarn.lock index e6942b80..d204dbdd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -123,11 +123,6 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@types/json5@^0.0.29": - version "0.0.29" - resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" - integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== - "@types/node@*", "@types/node@18.7.23": version "18.7.23" resolved "https://registry.npmjs.org/@types/node/-/node-18.7.23.tgz" @@ -263,17 +258,6 @@ array-each@^1.0.0, array-each@^1.0.1: resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" integrity sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA== -array-includes@^3.1.4, array-includes@^3.1.5: - version "3.1.5" - resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz" - integrity sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.19.5" - get-intrinsic "^1.1.1" - is-string "^1.0.7" - array-initial@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/array-initial/-/array-initial-1.1.0.tgz#2fa74b26739371c3947bd7a7adc73be334b3d795" @@ -313,26 +297,6 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== -array.prototype.flat@^1.2.5: - version "1.3.0" - resolved "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz" - integrity sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.2" - es-shim-unscopables "^1.0.0" - -array.prototype.flatmap@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.0.tgz" - integrity sha512-PZC9/8TKAIxcWKdyeb77EzULHPrIX/tIZebLJUQOMR1OwYosT8yggdfWScfTBCDj5utONvOuPQQumYsU2ULbkg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.2" - es-shim-unscopables "^1.0.0" - assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" @@ -439,13 +403,6 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -builtins@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz" - integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ== - dependencies: - semver "^7.0.0" - cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -461,7 +418,7 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" -call-bind@^1.0.0, call-bind@^1.0.2: +call-bind@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz" integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== @@ -672,20 +629,13 @@ d@1, d@^1.0.1: es5-ext "^0.10.50" type "^1.0.1" -debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: +debug@^2.2.0, debug@^2.3.3: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@^3.2.7: - version "3.2.7" - resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - debug@^4.1.1, debug@^4.3.2: version "4.3.4" resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" @@ -720,7 +670,7 @@ default-resolution@^2.0.0: resolved "https://registry.yarnpkg.com/default-resolution/-/default-resolution-2.0.0.tgz#bcb82baa72ad79b426a76732f1a81ad6df26d684" integrity sha512-2xaP6GiwVwOEbXCGoJ4ufgC76m8cj805jrghScewJC2ZDsb9U0b4BIrba+xt/Uytyd0HvQ6+WymSRTfnYj59GQ== -define-properties@^1.1.3, define-properties@^1.1.4: +define-properties@^1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz" integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== @@ -762,13 +712,6 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz" - integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== - dependencies: - esutils "^2.0.2" - doctrine@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" @@ -801,59 +744,13 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" -error-ex@^1.2.0, error-ex@^1.3.1: +error-ex@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== dependencies: is-arrayish "^0.2.1" -es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5: - version "1.20.3" - resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.3.tgz" - integrity sha512-AyrnaKVpMzljIdwjzrj+LxGmj8ik2LckwXacHqrJJ/jxz6dDDBcZ7I7nlHM0FvEW8MfbWJwOd+yT2XzYW49Frw== - dependencies: - call-bind "^1.0.2" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.1.3" - get-symbol-description "^1.0.0" - has "^1.0.3" - has-property-descriptors "^1.0.0" - has-symbols "^1.0.3" - internal-slot "^1.0.3" - is-callable "^1.2.6" - is-negative-zero "^2.0.2" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - is-string "^1.0.7" - is-weakref "^1.0.2" - object-inspect "^1.12.2" - object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.4.3" - safe-regex-test "^1.0.0" - string.prototype.trimend "^1.0.5" - string.prototype.trimstart "^1.0.5" - unbox-primitive "^1.0.2" - -es-shim-unscopables@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz" - integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== - dependencies: - has "^1.0.3" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50: version "0.10.62" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" @@ -900,97 +797,6 @@ escape-string-regexp@^4.0.0: resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-standard-jsx@^11.0.0: - version "11.0.0" - resolved "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-11.0.0.tgz" - integrity sha512-+1EV/R0JxEK1L0NGolAr8Iktm3Rgotx3BKwgaX+eAuSX8D952LULKtjgZD3F+e6SvibONnhLwoTi9DPxN5LvvQ== - -eslint-config-standard@17.0.0: - version "17.0.0" - resolved "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz" - integrity sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg== - -eslint-import-resolver-node@^0.3.6: - version "0.3.6" - resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz" - integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== - dependencies: - debug "^3.2.7" - resolve "^1.20.0" - -eslint-module-utils@^2.7.3: - version "2.7.4" - resolved "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz" - integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== - dependencies: - debug "^3.2.7" - -eslint-plugin-es@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz" - integrity sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ== - dependencies: - eslint-utils "^2.0.0" - regexpp "^3.0.0" - -eslint-plugin-import@^2.26.0: - version "2.26.0" - resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz" - integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== - dependencies: - array-includes "^3.1.4" - array.prototype.flat "^1.2.5" - debug "^2.6.9" - doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.6" - eslint-module-utils "^2.7.3" - has "^1.0.3" - is-core-module "^2.8.1" - is-glob "^4.0.3" - minimatch "^3.1.2" - object.values "^1.1.5" - resolve "^1.22.0" - tsconfig-paths "^3.14.1" - -eslint-plugin-n@^15.1.0: - version "15.3.0" - resolved "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.3.0.tgz" - integrity sha512-IyzPnEWHypCWasDpxeJnim60jhlumbmq0pubL6IOcnk8u2y53s5QfT8JnXy7skjHJ44yWHRb11PLtDHuu1kg/Q== - dependencies: - builtins "^5.0.1" - eslint-plugin-es "^4.1.0" - eslint-utils "^3.0.0" - ignore "^5.1.1" - is-core-module "^2.10.0" - minimatch "^3.1.2" - resolve "^1.22.1" - semver "^7.3.7" - -eslint-plugin-promise@^6.0.0: - version "6.0.1" - resolved "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.1.tgz" - integrity sha512-uM4Tgo5u3UWQiroOyDEsYcVMOo7re3zmno0IZmB5auxoaQNIceAbXEkSt8RNrKtaYehARHG06pYK6K1JhtP0Zw== - -eslint-plugin-react@^7.28.0: - version "7.31.8" - resolved "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.31.8.tgz" - integrity sha512-5lBTZmgQmARLLSYiwI71tiGVTLUuqXantZM6vlSY39OaDSV0M7+32K5DnLkmFrwTe+Ksz0ffuLUC91RUviVZfw== - dependencies: - array-includes "^3.1.5" - array.prototype.flatmap "^1.3.0" - doctrine "^2.1.0" - estraverse "^5.3.0" - jsx-ast-utils "^2.4.1 || ^3.0.0" - minimatch "^3.1.2" - object.entries "^1.1.5" - object.fromentries "^2.0.5" - object.hasown "^1.1.1" - object.values "^1.1.5" - prop-types "^15.8.1" - resolve "^2.0.0-next.3" - semver "^6.3.0" - string.prototype.matchall "^4.0.7" - eslint-scope@^7.1.1: version "7.1.1" resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz" @@ -999,13 +805,6 @@ eslint-scope@^7.1.1: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-utils@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - eslint-utils@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz" @@ -1013,11 +812,6 @@ eslint-utils@^3.0.0: dependencies: eslint-visitor-keys "^2.0.0" -eslint-visitor-keys@^1.1.0: - version "1.3.0" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - eslint-visitor-keys@^2.0.0: version "2.1.0" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz" @@ -1028,9 +822,9 @@ eslint-visitor-keys@^3.3.0: resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@^8.13.0: +eslint@8.24.0: version "8.24.0" - resolved "https://registry.npmjs.org/eslint/-/eslint-8.24.0.tgz" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.24.0.tgz#489516c927a5da11b3979dbfb2679394523383c8" integrity sha512-dWFaPhGhTAiPcCgm3f6LI2MBWbogMnTJzFBbhXVRQDJPkr9pGZvVjlVfXd+vyDcWPA2Ic9L2AXPIQM0+vk/cSQ== dependencies: "@eslint/eslintrc" "^1.3.2" @@ -1096,7 +890,7 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" -estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: +estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== @@ -1247,13 +1041,6 @@ find-up@^1.0.0: path-exists "^2.0.0" pinkie-promise "^2.0.0" -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - find-up@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" @@ -1361,27 +1148,12 @@ function-bind@^1.1.1: resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" - -functions-have-names@^1.2.2: - version "1.2.3" - resolved "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz" - integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== - get-caller-file@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: version "1.1.3" resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz" integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A== @@ -1390,19 +1162,6 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@ has "^1.0.3" has-symbols "^1.0.3" -get-stdin@^8.0.0: - version "8.0.0" - resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz" - integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== - -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -1528,7 +1287,7 @@ glogg@^1.0.0: dependencies: sparkles "^1.0.0" -graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6: +graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== @@ -1579,11 +1338,6 @@ gulplog@^1.0.0: dependencies: glogg "^1.0.0" -has-bigints@^1.0.1, has-bigints@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz" - integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -1601,18 +1355,11 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" -has-symbols@^1.0.2, has-symbols@^1.0.3: +has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" @@ -1663,7 +1410,7 @@ hosted-git-info@^2.1.4: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== -ignore@^5.1.1, ignore@^5.2.0: +ignore@^5.2.0: version "5.2.0" resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== @@ -1704,15 +1451,6 @@ ini@^1.3.4: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -internal-slot@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz" - integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== - dependencies: - get-intrinsic "^1.1.0" - has "^1.0.3" - side-channel "^1.0.4" - interpret@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" @@ -1750,13 +1488,6 @@ is-arrayish@^0.2.1: resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - dependencies: - has-bigints "^1.0.1" - is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -1764,25 +1495,12 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-callable@^1.1.4, is-callable@^1.2.6: - version "1.2.7" - resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz" - integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - -is-core-module@^2.10.0, is-core-module@^2.8.1, is-core-module@^2.9.0: +is-core-module@^2.9.0: version "2.10.0" resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz" integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== @@ -1803,11 +1521,6 @@ is-data-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" -is-date-object@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz" - integrity sha512-P5rExV1phPi42ppoMWy7V63N3i173RY921l4JJ7zonMSxK+OWGPj76GD+cUKUb68l4vQXcJp2SsG+r/A4ABVzg== - is-descriptor@^0.1.0: version "0.1.6" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" @@ -1869,18 +1582,6 @@ is-negated-glob@^1.0.0: resolved "https://registry.yarnpkg.com/is-negated-glob/-/is-negated-glob-1.0.0.tgz#6910bca5da8c95e784b5751b976cf5a10fee36d2" integrity sha512-czXVVn/QEmgvej1f50BZ648vUI+em0xqMq2Sn+QncCLN4zj1UAxlT+kw/6ggQTOaZPd1HqKQGEqbpQVtJucWug== -is-negative-zero@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== - -is-number-object@^1.0.4: - version "1.0.7" - resolved "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz" - integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== - dependencies: - has-tostringtag "^1.0.0" - is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -1910,14 +1611,6 @@ is-plain-object@^5.0.0: resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - is-relative@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" @@ -1925,27 +1618,6 @@ is-relative@^1.0.0: dependencies: is-unc-path "^1.0.0" -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== - dependencies: - call-bind "^1.0.2" - -is-string@^1.0.5, is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== - dependencies: - has-symbols "^1.0.2" - is-unc-path@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d" @@ -1963,13 +1635,6 @@ is-valid-glob@^1.0.0: resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa" integrity sha512-AhiROmoEFDSsjx8hW+5sGwgKVIORcXnrlAx/R0ZSeaPw70Vw0CqkGBBhHGL58Uox2eXnU1AnvXJl1XlyedO5bA== -is-weakref@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz" - integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== - dependencies: - call-bind "^1.0.2" - is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -2011,7 +1676,7 @@ js-sdsl@^4.1.4: resolved "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.4.tgz" integrity sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw== -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: +js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== @@ -2023,11 +1688,6 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" -json-parse-better-errors@^1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" @@ -2038,21 +1698,6 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== -json5@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== - dependencies: - minimist "^1.2.0" - -"jsx-ast-utils@^2.4.1 || ^3.0.0": - version "3.3.3" - resolved "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz" - integrity sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw== - dependencies: - array-includes "^3.1.5" - object.assign "^4.1.3" - just-debounce@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/just-debounce/-/just-debounce-1.1.0.tgz#2f81a3ad4121a76bc7cb45dbf704c0d76a8e5ddf" @@ -2151,25 +1796,6 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" -load-json-file@^5.2.0: - version "5.3.0" - resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz" - integrity sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw== - dependencies: - graceful-fs "^4.1.15" - parse-json "^4.0.0" - pify "^4.0.1" - strip-bom "^3.0.0" - type-fest "^0.3.0" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - locate-path@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" @@ -2182,20 +1808,6 @@ lodash.merge@^4.6.2: resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -loose-envify@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - make-iterator@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6" @@ -2269,11 +1881,6 @@ micromatch@^4.0.4: dependencies: brace-expansion "^1.1.7" -minimist@^1.2.0, minimist@^1.2.6: - version "1.2.6" - resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz" - integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== - mixin-deep@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" @@ -2287,7 +1894,7 @@ ms@2.0.0: resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== -ms@2.1.2, ms@^2.1.1: +ms@2.1.2: version "2.1.2" resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== @@ -2363,11 +1970,6 @@ number-is-nan@^1.0.0: resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ== -object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" - integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== - object-copy@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" @@ -2377,11 +1979,6 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.12.2, object-inspect@^1.9.0: - version "1.12.2" - resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz" - integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== - object-keys@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz" @@ -2394,7 +1991,7 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.0.4, object.assign@^4.1.0, object.assign@^4.1.3, object.assign@^4.1.4: +object.assign@^4.0.4, object.assign@^4.1.0: version "4.1.4" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== @@ -2414,32 +2011,6 @@ object.defaults@^1.0.0, object.defaults@^1.1.0: for-own "^1.0.0" isobject "^3.0.0" -object.entries@^1.1.5: - version "1.1.5" - resolved "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz" - integrity sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - -object.fromentries@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz" - integrity sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - -object.hasown@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.1.tgz" - integrity sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A== - dependencies: - define-properties "^1.1.4" - es-abstract "^1.19.5" - object.map@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz#cf83e59dc8fcc0ad5f4250e1f78b3b81bd801d37" @@ -2463,15 +2034,6 @@ object.reduce@^1.0.0: for-own "^1.0.0" make-iterator "^1.0.0" -object.values@^1.1.5: - version "1.1.5" - resolved "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz" - integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -2505,13 +2067,6 @@ os-locale@^1.4.0: dependencies: lcid "^1.0.0" -p-limit@^2.0.0: - version "2.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - p-limit@^3.0.2: version "3.1.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" @@ -2519,13 +2074,6 @@ p-limit@^3.0.2: dependencies: yocto-queue "^0.1.0" -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - p-locate@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" @@ -2533,11 +2081,6 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - parent-module@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" @@ -2561,14 +2104,6 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" -parse-json@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz" - integrity sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw== - dependencies: - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - parse-node-version@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz#e2b5dbede00e7fa9bc363607f53327e8b073189b" @@ -2596,11 +2131,6 @@ path-exists@^2.0.0: dependencies: pinkie-promise "^2.0.0" -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz" - integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== - path-exists@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" @@ -2657,11 +2187,6 @@ pify@^2.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -2674,14 +2199,6 @@ pinkie@^2.0.0: resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== -pkg-conf@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz" - integrity sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ== - dependencies: - find-up "^3.0.0" - load-json-file "^5.2.0" - posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" @@ -2702,15 +2219,6 @@ process-nextick-args@^2.0.0, process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -prop-types@^15.8.1: - version "15.8.1" - resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz" - integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== - dependencies: - loose-envify "^1.4.0" - object-assign "^4.1.1" - react-is "^16.13.1" - pump@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" @@ -2745,11 +2253,6 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -react-is@^16.13.1: - version "16.13.1" - resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== - read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" @@ -2802,16 +2305,7 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexp.prototype.flags@^1.4.1, regexp.prototype.flags@^1.4.3: - version "1.4.3" - resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz" - integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - functions-have-names "^1.2.2" - -regexpp@^3.0.0, regexpp@^3.2.0: +regexpp@^3.2.0: version "3.2.0" resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== @@ -2897,7 +2391,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg== -resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1, resolve@^1.4.0: +resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.4.0: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== @@ -2906,15 +2400,6 @@ resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.20.0, resolve@^1.22. path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^2.0.0-next.3: - version "2.0.0-next.4" - resolved "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz" - integrity sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -2961,15 +2446,6 @@ safe-buffer@^5.1.0, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - is-regex "^1.1.4" - safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" @@ -2998,18 +2474,6 @@ semver-greatest-satisfied-range@^1.1.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@^6.3.0: - version "6.3.0" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.0.0, semver@^7.3.7: - version "7.3.7" - resolved "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz" - integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== - dependencies: - lru-cache "^6.0.0" - serialize-javascript@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" @@ -3044,15 +2508,6 @@ shebang-regex@^3.0.0: resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - slash@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" @@ -3170,30 +2625,6 @@ stack-trace@0.0.10: resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" integrity sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg== -standard-engine@^15.0.0: - version "15.0.0" - resolved "https://registry.npmjs.org/standard-engine/-/standard-engine-15.0.0.tgz" - integrity sha512-4xwUhJNo1g/L2cleysUqUv7/btn7GEbYJvmgKrQ2vd/8pkTmN8cpqAZg+BT8Z1hNeEH787iWUdOpL8fmApLtxA== - dependencies: - get-stdin "^8.0.0" - minimist "^1.2.6" - pkg-conf "^3.1.0" - xdg-basedir "^4.0.0" - -standard@17.0.0: - version "17.0.0" - resolved "https://registry.npmjs.org/standard/-/standard-17.0.0.tgz" - integrity sha512-GlCM9nzbLUkr+TYR5I2WQoIah4wHA2lMauqbyPLV/oI5gJxqhHzhjl9EG2N0lr/nRqI3KCbCvm/W3smxvLaChA== - dependencies: - eslint "^8.13.0" - eslint-config-standard "17.0.0" - eslint-config-standard-jsx "^11.0.0" - eslint-plugin-import "^2.26.0" - eslint-plugin-n "^15.1.0" - eslint-plugin-promise "^6.0.0" - eslint-plugin-react "^7.28.0" - standard-engine "^15.0.0" - static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" @@ -3221,38 +2652,6 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -string.prototype.matchall@^4.0.7: - version "4.0.7" - resolved "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.7.tgz" - integrity sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - get-intrinsic "^1.1.1" - has-symbols "^1.0.3" - internal-slot "^1.0.3" - regexp.prototype.flags "^1.4.1" - side-channel "^1.0.4" - -string.prototype.trimend@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz" - integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.19.5" - -string.prototype.trimstart@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz" - integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.19.5" - string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -3281,11 +2680,6 @@ strip-bom@^2.0.0: dependencies: is-utf8 "^0.2.0" -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" - integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== - strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" @@ -3401,16 +2795,6 @@ to-through@^2.0.0: dependencies: through2 "^2.0.3" -tsconfig-paths@^3.14.1: - version "3.14.1" - resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz" - integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.1" - minimist "^1.2.6" - strip-bom "^3.0.0" - type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" @@ -3423,11 +2807,6 @@ type-fest@^0.20.2: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -type-fest@^0.3.0: - version "0.3.1" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz" - integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== - type@^1.0.1: version "1.2.0" resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" @@ -3443,16 +2822,6 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -unbox-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz" - integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== - dependencies: - call-bind "^1.0.2" - has-bigints "^1.0.2" - has-symbols "^1.0.3" - which-boxed-primitive "^1.0.2" - unc-path-regex@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" @@ -3595,17 +2964,6 @@ vinyl@^2.0.0: remove-trailing-separator "^1.0.1" replace-ext "^1.0.0" -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" @@ -3643,11 +3001,6 @@ wrappy@1: resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -xdg-basedir@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz" - integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== - xtend@~4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" @@ -3658,11 +3011,6 @@ y18n@^3.2.1: resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - yargs-parser@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.1.tgz#7ede329c1d8cdbbe209bd25cdb990e9b1ebbb394" From 7060b069bd5b3e8da6921afb70a72287c744186a Mon Sep 17 00:00:00 2001 From: Zack Schuster Date: Wed, 28 Sep 2022 23:06:46 -0700 Subject: [PATCH 06/32] templates: link to local compilations --- templates/_head.mustache | 2 +- templates/download.mustache | 4 ++-- templates/single-example.mustache | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/_head.mustache b/templates/_head.mustache index 07511c7e..5fa9b380 100644 --- a/templates/_head.mustache +++ b/templates/_head.mustache @@ -11,5 +11,5 @@ - + diff --git a/templates/download.mustache b/templates/download.mustache index f1a9b470..83c08172 100644 --- a/templates/download.mustache +++ b/templates/download.mustache @@ -29,8 +29,8 @@ yarn add @chrisoakman/chessboardjs

Content Delivery Network

You can use chessboardjs via the unpkg CDN with the following links: -

<link rel="stylesheet" href="https://unpkg.com/@chrisoakman/chessboardjs@1.0.0/dist/chessboard-1.0.0.min.css" integrity="sha384-q94+BZtLrkL1/ohfjR8c6L+A6qzNH9R2hBLwyoAfu3i/WCvQjzL2RQJ3uNHDISdU" crossorigin="anonymous">
-
<script src="https://unpkg.com/@chrisoakman/chessboardjs@1.0.0/dist/chessboard-1.0.0.min.js" integrity="sha384-8Vi8VHwn3vjQ9eUHUxex3JSN/NFqUg3QbPyX8kWyb93+8AC/pPWTzj+nHtbC5bxD" crossorigin="anonymous"></script>
+
<link rel="stylesheet" href="https://unpkg.com/@chrisoakman/chessboardjs@{{version}}/dist/chessboard-{{version}}.min.css">
+
<script src="https://unpkg.com/@chrisoakman/chessboardjs@{{version}}/dist/chessboard-{{version}}.min.js"></script>
diff --git a/templates/single-example.mustache b/templates/single-example.mustache index 0b463cfa..4a966a8c 100644 --- a/templates/single-example.mustache +++ b/templates/single-example.mustache @@ -5,7 +5,7 @@ chessboardjs Example #{{{id}}} - {{{name}}} - + {{#css}}