diff --git a/.jshintignore b/.eslintignore similarity index 96% rename from .jshintignore rename to .eslintignore index 52f336846..6bd2e6a06 100644 --- a/.jshintignore +++ b/.eslintignore @@ -14,8 +14,9 @@ www/scratch www/accounts www/lib www/accounts +www/worker +www/todo -www/common/toolbar.js www/common/hyperscript.js www/pad/wysiwygarea-plugin.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..c4c0392d5 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,57 @@ +module.exports = { + 'env': { + 'browser': true, + 'es2021': true, + 'node': true + }, + 'plugins': ['compat'], + 'extends': ['eslint:recommended', 'plugin:compat/recommended'], + "globals": { + "define": "readonly", + }, + 'overrides': [ + { + 'env': { + 'node': true + }, + 'files': [ + '.eslintrc.{js,cjs}' + ], + 'parserOptions': { + 'sourceType': 'script' + } + } + ], + 'parserOptions': { + 'ecmaVersion': 'latest' + }, + 'rules': { + 'indent': [ + 'off', // TODO enable this check + 4 + ], + 'linebreak-style': [ + 'error', + 'unix' + ], + 'quotes': [ + 'off', // TODO enable this check + 'single' + ], + 'semi': [ + 'error', + 'always' + ], + + // TODO remove these exceptions from the eslint defaults + 'no-irregular-whitespace': ['off'], + 'no-unused-vars': ['warn'], + 'no-self-assign': ['off'], + 'no-empty': ['off'], + 'no-useless-escape': ['off'], + 'no-redeclare': ['off'], + 'no-extra-boolean-cast': ['off'], + 'no-global-assign': ['off'], + 'no-prototype-builtins': ['off'], + } +}; diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 761c69159..000000000 --- a/.jshintrc +++ /dev/null @@ -1,26 +0,0 @@ -{ - "laxcomma": true, - "laxbreak": true, - "sub": true, - "curly": true, - "eqeqeq": true, - "iterator": true, - "latedef": true, - "nocomma": true, - "shadow": false, - "undef": true, - "unused": true, - "futurehostile":true, - "browser": true, - "esversion": 6, - "predef": [ - "console", - "define", - "require", - "module", - "__dirname" - ], - "globals": { - "self": true - } -} diff --git a/config/config.example.js b/config/config.example.js index 4e4ddd46e..d6ebb4a50 100644 --- a/config/config.example.js +++ b/config/config.example.js @@ -139,6 +139,21 @@ module.exports = { */ //enforceMFA: false, + /* ===================== + * Privacy + * ===================== */ + + /* Depending on where your instance is hosted, you may be required to log IP + * addresses of the users who make a change to a document. This setting allows you + * to do so. You can configure the logging system below in this config file. + * Setting this value to true will include a log for each websocket connection + * including this connection's unique ID, the user public key and the IP. + * NOTE: this option requires a log level of "info" or below. + * + * defaults to false + */ + //logIP: false, + /* ===================== * Admin * ===================== */ diff --git a/customize.dist/loading.js b/customize.dist/loading.js index 9353be09c..ce11c5b76 100644 --- a/customize.dist/loading.js +++ b/customize.dist/loading.js @@ -64,7 +64,6 @@ define([ return bar; }; - var hasErrored = false; var isOffline = false; var updateLoadingProgress = function (data) { if (!built || !data) { return; } @@ -102,7 +101,6 @@ define([ var el3 = document.querySelector('.cp-loading-progress-container'); if (el3) { el3.innerHTML = makeBar(data); } } catch (e) { - //if (!hasErrored) { console.error(e); } } }; window.CryptPad_updateLoadingProgress = updateLoadingProgress; @@ -115,7 +113,6 @@ define([ return; } - hasErrored = true; var err2; if (err === 'Script error.') { err2 = Messages.error_unhelpfulScriptError; diff --git a/docker-compose.yml b/docker-compose.yml index fb13909f4..72517b50d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,7 @@ version: '3.8' services: cryptpad: - image: "cryptpad/cryptpad:version-5.5.0" + image: "cryptpad/cryptpad:version-5.7.0" hostname: cryptpad environment: diff --git a/lib/api.js b/lib/api.js index 3aae81c95..220e954d8 100644 --- a/lib/api.js +++ b/lib/api.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6 */ const WebSocketServer = require('ws').Server; const NetfluxSrv = require('chainpad-server'); const Decrees = require("./decrees"); @@ -67,6 +66,7 @@ nThen(function (w) { .on('channelMessage', historyKeeper.channelMessage) .on('channelOpen', historyKeeper.channelOpen) .on('sessionClose', historyKeeper.sessionClose) + .on('sessionOpen', historyKeeper.sessionOpen) .on('error', function (error, label, info) { if (!error) { return; } var code = error && (error.code || error.message); diff --git a/lib/archive-account.js b/lib/archive-account.js index d3adbe917..43ff1357e 100644 --- a/lib/archive-account.js +++ b/lib/archive-account.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6, node: true */ const nThen = require('nthen'); const Pins = require('./pins'); const Util = require("./common-util"); diff --git a/lib/client/index.js b/lib/client/index.js index 267a3645a..a4b814ae6 100644 --- a/lib/client/index.js +++ b/lib/client/index.js @@ -3,7 +3,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later var Netflux = require("netflux-websocket"); -var WebSocket = require("ws"); // jshint ignore:line +var WebSocket = require("ws"); var nThen = require("nthen"); var Util = require("../../www/common/common-util"); diff --git a/lib/commands/admin-rpc.js b/lib/commands/admin-rpc.js index ef211b800..67c228eab 100644 --- a/lib/commands/admin-rpc.js +++ b/lib/commands/admin-rpc.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ /* globals process */ const nThen = require("nthen"); const getFolderSize = require("get-folder-size"); @@ -18,9 +17,7 @@ const Moderators = require("./moderators"); const BlockStore = require("../storage/block"); const MFA = require("../storage/mfa"); const ArchiveAccount = require('../archive-account'); -/* jshint ignore:start */ const { Worker } = require('node:worker_threads'); -/* jshint ignore:end */ var Fs = require("fs"); @@ -86,7 +83,7 @@ var getActiveSessions = function (Env, Server, cb) { }; var shutdown = function (Env, Server, cb) { - if (true) { + if (true) { // eslint-disable-line no-constant-condition return void cb('E_NOT_IMPLEMENTED'); } diff --git a/lib/commands/block.js b/lib/commands/block.js index 39c003e3c..1d64364df 100644 --- a/lib/commands/block.js +++ b/lib/commands/block.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ /* globals Buffer*/ const Block = module.exports; const Nacl = require("tweetnacl/nacl-fast"); diff --git a/lib/commands/channel.js b/lib/commands/channel.js index 74326174d..471df684e 100644 --- a/lib/commands/channel.js +++ b/lib/commands/channel.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Channel = module.exports; const Util = require("../common-util"); diff --git a/lib/commands/core.js b/lib/commands/core.js index a0c8f419b..79f3f40e8 100644 --- a/lib/commands/core.js +++ b/lib/commands/core.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ /* globals process */ const Core = module.exports; const Util = require("../common-util"); diff --git a/lib/commands/invitation.js b/lib/commands/invitation.js index 307efeeda..2624389e7 100644 --- a/lib/commands/invitation.js +++ b/lib/commands/invitation.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Invitation = module.exports; const Invite = require('../storage/invite'); diff --git a/lib/commands/metadata.js b/lib/commands/metadata.js index 54448f9b2..8eeca31ce 100644 --- a/lib/commands/metadata.js +++ b/lib/commands/metadata.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Data = module.exports; const Meta = require("../metadata"); diff --git a/lib/commands/pin-rpc.js b/lib/commands/pin-rpc.js index f5dcf7163..10a141745 100644 --- a/lib/commands/pin-rpc.js +++ b/lib/commands/pin-rpc.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Core = require("./core"); const Pinning = module.exports; diff --git a/lib/commands/quota.js b/lib/commands/quota.js index 50e57b9bf..7a92dbda9 100644 --- a/lib/commands/quota.js +++ b/lib/commands/quota.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ /* globals Buffer*/ const Quota = module.exports; diff --git a/lib/commands/upload.js b/lib/commands/upload.js index 1b23ab549..999f003f0 100644 --- a/lib/commands/upload.js +++ b/lib/commands/upload.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Upload = module.exports; const Util = require("../common-util"); const Pinning = require("./pin-rpc"); diff --git a/lib/commands/users.js b/lib/commands/users.js index 0e6ded48a..5b05a333b 100644 --- a/lib/commands/users.js +++ b/lib/commands/users.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Users = module.exports; const User = require('../storage/user'); diff --git a/lib/env.js b/lib/env.js index 35eded23d..d8004b7d8 100644 --- a/lib/env.js +++ b/lib/env.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6 */ /* globals process */ const Crypto = require('crypto'); @@ -111,6 +110,7 @@ module.exports.create = function (config) { httpPort: isValidPort(config.httpPort)? config.httpPort: 3000, httpAddress: typeof(config.httpAddress) === 'string'? config.httpAddress: 'localhost', websocketPath: config.externalWebsocketURL, + logIP: config.logIP, OFFLINE_MODE: false, FRESH_KEY: '', diff --git a/lib/eviction.js b/lib/eviction.js index e57041ffb..b747ba99f 100644 --- a/lib/eviction.js +++ b/lib/eviction.js @@ -45,7 +45,6 @@ var PROGRESS_FACTOR = 1000; var evictArchived = function (Env, cb) { var Log; var store; - var pinStore; var blobs; var retentionTime = +new Date() - (Env.archiveRetentionTime * 24 * 3600 * 1000); @@ -74,7 +73,6 @@ var evictArchived = function (Env, cb) { var loadStorage = function () { store = Env.store; - pinStore = Env.pinStore; Log = Env.Log; blobs = Env.blobStore; }; diff --git a/lib/historyKeeper.js b/lib/historyKeeper.js index 786b1e50b..2c4756299 100644 --- a/lib/historyKeeper.js +++ b/lib/historyKeeper.js @@ -2,8 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6 */ - const nThen = require('nthen'); const RPC = require("./rpc"); const HK = require("./hk-util.js"); @@ -105,8 +103,14 @@ module.exports.create = function (Env, cb) { cb("ERESTRICTED", allowed); }); }, - sessionClose: function (userId, reason) { + sessionClose: function (userId, reason, ip) { HK.closeNetfluxSession(Env, userId); + if (Env.logIP && !['SOCKET_CLOSED', 'INACTIVITY'].includes(reason)) { + return void Log.info('USER_DISCONNECTED_ERROR', { + userId: userId, + reason: reason + }); + } if (['BAD_MESSAGE', 'SEND_MESSAGE_FAIL_2'].indexOf(reason) !== -1) { if (reason && reason.code === 'ECONNRESET') { return; } return void Log.error('SESSION_CLOSE_WITH_ERROR', { @@ -115,12 +119,19 @@ module.exports.create = function (Env, cb) { }); } - if (['SOCKET_CLOSED', 'SOCKET_ERROR'].indexOf(reason)) { return; } + if (['SOCKET_CLOSED', 'SOCKET_ERROR'].includes(reason)) { return; } Log.verbose('SESSION_CLOSE_ROUTINE', { userId: userId, reason: reason, }); }, + sessionOpen: function (userId, ip, oo) { + if (!Env.logIP) { return; } + Log.info('USER_CONNECTION', { + userId: userId, + ip: ip, + }); + }, directMessage: function (Server, seq, userId, json) { // netflux-server allows you to register an id with a handler // this handler is invoked every time someone sends a message to that id diff --git a/lib/hk-util.js b/lib/hk-util.js index b39429995..2c5054f51 100644 --- a/lib/hk-util.js +++ b/lib/hk-util.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6 */ /* global Buffer */ var HK = module.exports; diff --git a/lib/http-worker.js b/lib/http-worker.js index fef492284..83983aaba 100644 --- a/lib/http-worker.js +++ b/lib/http-worker.js @@ -198,6 +198,9 @@ const wsProxy = createProxyMiddleware({ target: proxyTarget.href, ws: true, logLevel: 'error', + onProxyReqWs: function (proxyReq, req, socket, options, head) { + proxyReq.setHeader('X-Real-Ip', req.socket.remoteAddress); + }, logProvider: (p) => { p.error = (data) => { if (/ECONNRESET/.test(data)) { return; } diff --git a/lib/log.js b/lib/log.js index 59d243027..c5b27fb85 100644 --- a/lib/log.js +++ b/lib/log.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ var Store = require("./storage/file"); var Util = require("./common-util"); diff --git a/lib/pins.js b/lib/pins.js index 686b49b3f..2201e561c 100644 --- a/lib/pins.js +++ b/lib/pins.js @@ -2,8 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ - var Pins = module.exports; const Fs = require("fs"); @@ -90,7 +88,6 @@ var createLineHandler = Pins.createLineHandler = function (ref, errorHandler) { }); } ref.surplus = ref.index; - //jshint -W086 // fallthrough } case 'PIN': { diff --git a/lib/rpc.js b/lib/rpc.js index 0dcc6ec1e..571272ab1 100644 --- a/lib/rpc.js +++ b/lib/rpc.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Util = require("./common-util"); const Core = require("./commands/core"); @@ -145,11 +144,12 @@ var rpc = function (Env, Server, userId, data, respond) { var signature = msg.shift(); var publicKey = msg.shift(); + var safeKey = Util.escapeKeyCharacters(publicKey); + var hadSession = Boolean(Env.Sessions[safeKey]); // make sure a user object is initialized in the cookie jar - var session; if (publicKey) { - session = Core.getSession(Env.Sessions, publicKey); + Core.getSession(Env.Sessions, publicKey); } else { Env.Log.debug("NO_PUBLIC_KEY_PROVIDED", publicKey); } @@ -182,6 +182,9 @@ var rpc = function (Env, Server, userId, data, respond) { if (err) { return void respond("INVALID_SIGNATURE_OR_PUBLIC_KEY"); } + if (command === 'COOKIE' && !hadSession && Env.logIP) { + Env.Log.info('NEW_RPC_SESSION', {userId: userId, publicKey: publicKey}); + } HK.authenticateNetfluxSession(Env, userId, publicKey); return void handleAuthenticatedMessage(Env, publicKey, msg, respond, Server); }); diff --git a/lib/stats.js b/lib/stats.js index 9b8781df5..d67a2ee71 100644 --- a/lib/stats.js +++ b/lib/stats.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Stats = module.exports; var truthyStringOrNothing = function (s) { diff --git a/lib/storage/block.js b/lib/storage/block.js index ab79fe9dc..8809cf1b7 100644 --- a/lib/storage/block.js +++ b/lib/storage/block.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Block = module.exports; const Util = require("../common-util"); const Path = require("path"); diff --git a/lib/storage/file.js b/lib/storage/file.js index e22c3be85..d8617f300 100644 --- a/lib/storage/file.js +++ b/lib/storage/file.js @@ -3,7 +3,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later /*@flow*/ -/* jshint esversion: 6 */ /* globals Buffer */ var Fs = require("fs"); var Fse = require("fs-extra"); @@ -268,7 +267,7 @@ var getMetadataAtPath = function (Env, path, _cb) { // if you can't parse, that's bad return void cb("INVALID_METADATA"); } - readMore(); + readMore(); // eslint-disable-line no-unreachable }, function (err) { cb(err); }); diff --git a/lib/storage/tasks.js b/lib/storage/tasks.js index f00e4e84b..249721f65 100644 --- a/lib/storage/tasks.js +++ b/lib/storage/tasks.js @@ -225,7 +225,8 @@ var run = Tasks.run = function (env, path, cb) { var CURRENT = +new Date(); var Log = env.log; - var task, time, command, args; + var task, time, command; + //var args; nThen(function (w) { read(env, path, w(function (err, _task) { @@ -243,7 +244,7 @@ var run = Tasks.run = function (env, path, cb) { } command = task[1]; - args = task.slice(2); + //args = task.slice(2); })); }).nThen(function (w) { switch (command) { diff --git a/lib/stream-file.js b/lib/stream-file.js index 10dfa647d..372148836 100644 --- a/lib/stream-file.js +++ b/lib/stream-file.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6 */ /* global Buffer */ const ToPull = require('stream-to-pull-stream'); diff --git a/lib/workers/db-worker.js b/lib/workers/db-worker.js index a6c077914..9878d2c22 100644 --- a/lib/workers/db-worker.js +++ b/lib/workers/db-worker.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6 */ /* globals process, Buffer */ const HK = require("../hk-util"); diff --git a/lib/workers/index.js b/lib/workers/index.js index bb6077397..6db3f8bbd 100644 --- a/lib/workers/index.js +++ b/lib/workers/index.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6 */ /* global process */ const Util = require("../common-util"); const nThen = require('nthen'); diff --git a/package-lock.json b/package-lock.json index e08220dcc..e56abbeed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "chainpad-crypto": "^0.2.5", "chainpad-listmap": "^1.0.0", "chainpad-netflux": "^1.0.0", - "chainpad-server": "^5.1.0", + "chainpad-server": "^5.2.0", "ckeditor": "npm:ckeditor4@~4.22.1", "codemirror": "^5.19.0", "components-font-awesome": "^4.6.3", @@ -64,7 +64,8 @@ "x2js": "^3.4.4" }, "devDependencies": { - "jshint": "^2.13.4", + "eslint": "^8.57.0", + "eslint-plugin-compat": "^4.2.0", "lesshint": "6.3.7" }, "funding": { @@ -72,11 +73,225 @@ "url": "https://opencollective.com/cryptpad" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.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" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/@eslint/eslintrc/node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@eslint/eslintrc/node_modules/strip-json-comments": { + "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==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "dev": true + }, "node_modules/@mcrowe/minibloom": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@mcrowe/minibloom/-/minibloom-0.2.0.tgz", "integrity": "sha512-hce9MTbEkVIutibAkXAQddXCU9gMP/3OfcRaNo2V0v485iEzBRlniJG0ZTKumL8RbUA/fhpIGvrURiEZc+Crrg==" }, + "node_modules/@mdn/browser-compat-data": { + "version": "5.5.12", + "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-5.5.12.tgz", + "integrity": "sha512-/AHFqy6OeNHS2NNZGFVRgQh+pnW8iAoV3d1fiO9b2PuQ3HzZpC30MrMrHtq1uOGy1/zcK4uPQEyI31jkM0NNAA==", + "dev": true + }, "node_modules/@mrmlnc/readdir-enhanced": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", @@ -132,6 +347,28 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.scandir/node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, "node_modules/@nodelib/fs.stat": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", @@ -141,6 +378,19 @@ "node": ">= 6" } }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@types/body-parser": { "version": "1.19.4", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.4.tgz", @@ -297,6 +547,12 @@ "@types/node": "*" } }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/@xmldom/xmldom": { "version": "0.8.10", "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz", @@ -328,6 +584,22 @@ "node": ">=0.4.0" } }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "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" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/alertify.js": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/alertify.js/-/alertify.js-1.0.11.tgz", @@ -647,6 +919,21 @@ "node": ">=0.10.0" } }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/ansi-underline": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/ansi-underline/-/ansi-underline-0.1.1.tgz", @@ -800,6 +1087,15 @@ "node": ">=0.10.0" } }, + "node_modules/ast-metadata-inferer": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/ast-metadata-inferer/-/ast-metadata-inferer-0.8.0.tgz", + "integrity": "sha512-jOMKcHht9LxYIEQu+RVd22vtgrPaVCtDRQ/16IGmurdzxvYbDd5ynxjnyrzLnieG96eTcAyaoj/wN/4/1FyyeA==", + "dev": true, + "dependencies": { + "@mdn/browser-compat-data": "^5.2.34" + } + }, "node_modules/async-limiter": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", @@ -931,6 +1227,38 @@ "resolve": "0.6.3" } }, + "node_modules/browserslist": { + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", @@ -1016,6 +1344,26 @@ "node": ">=4" } }, + "node_modules/caniuse-lite": { + "version": "1.0.30001591", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001591.tgz", + "integrity": "sha512-PCzRMei/vXjJyL5mJtzNiUCKP59dm8Apqc3PH8gJkMnMXZGox93RbE76jHsmLwmIo6/3nsYIpJtx0O7u5PqFuQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, "node_modules/chainpad": { "version": "5.2.7", "resolved": "https://registry.npmjs.org/chainpad/-/chainpad-5.2.7.tgz", @@ -1054,9 +1402,9 @@ } }, "node_modules/chainpad-server": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/chainpad-server/-/chainpad-server-5.1.0.tgz", - "integrity": "sha512-BdjgOOLTXXo1EjQ7lURDe7oqsqfQISNvwhILfp3K3diY2K1hxpPLbjYzOSgxNOTADeOAff0xnInR5eUCESVWaQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chainpad-server/-/chainpad-server-5.2.0.tgz", + "integrity": "sha512-WFbtzhuB636CAleuqH4e2CqmexNSOjXXE0t1Qd/4DIiHavxMy0/pd7CuOCTNr/MwD0eOd8dNm7/pFkRFL5f74A==", "dependencies": { "nthen": "0.1.8", "pull-stream": "^3.6.9", @@ -1073,6 +1421,22 @@ "npm": "~1.0.20" } }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/choices-separator": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/choices-separator/-/choices-separator-2.0.0.tgz", @@ -1132,19 +1496,6 @@ "node": ">= 0.4" } }, - "node_modules/cli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", - "integrity": "sha512-41U72MB56TfUMGndAKK8vJ78eooOD4Z5NOL4xEfjc0c23s+6EYKXlXsmACBVclLP1yOfWCgEganVzddVrSNoTg==", - "dev": true, - "dependencies": { - "exit": "0.1.2", - "glob": "^7.1.1" - }, - "engines": { - "node": ">=0.2.5" - } - }, "node_modules/clone-deep": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-1.0.0.tgz", @@ -1176,6 +1527,24 @@ "node": ">=0.10.0" } }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -1200,15 +1569,6 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, - "node_modules/console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha512-duS7VP5pvfsNLDvL1O4VOEbw37AI3A4ZUQYemvDlnpGrNu9tprR7BYWpDYwC0Xia0Zxz5ZupdiIrUp0GH1aXfg==", - "dev": true, - "dependencies": { - "date-now": "^0.1.4" - } - }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -1303,6 +1663,20 @@ "resolved": "https://registry.npmjs.org/croppie/-/croppie-2.6.5.tgz", "integrity": "sha512-IlChnVUGG5T3w2gRZIaQgBtlvyuYnlUWs2YZIXXR3H9KrlO1PtBT3j+ykxvy9eZIWhk+V5SpBmhCQz5UXKrEKQ==" }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/crossvent": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/crossvent/-/crossvent-1.5.4.tgz", @@ -1336,12 +1710,6 @@ "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.0.tgz", "integrity": "sha512-6nOXX3UitrmdvSJWoVR2dlzhbX5bEUqmqsMUyx1ypCLZkHHkcuYtdpW3p94RGvcFkTV7DkLo+Ilbwnlwi8L+jw==" }, - "node_modules/date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha512-AsElvov3LoNB7tf5k37H2jYSB+ZZPMT5sG2QjJCcdlV5chIv6htBUBUui2IKRjgtKAKtCBN7Zbwa+MtwLjSeNw==", - "dev": true - }, "node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -1369,6 +1737,12 @@ "node": ">=0.10" } }, + "node_modules/deep-is": { + "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==", + "dev": true + }, "node_modules/define-data-property": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", @@ -1439,60 +1813,16 @@ "node": ">=4" } }, - "node_modules/dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", - "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "dependencies": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" - } - }, - "node_modules/dom-serializer/node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ] - }, - "node_modules/dom-serializer/node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, - "node_modules/domhandler": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", - "integrity": "sha512-q9bUwjfp7Eif8jWxxxPSykdRZAb6GkguBGSgvvCrhI9wB71W2K/Kvv4E61CF/mcCfnVJDeDWx/Vb/uAqbDj6UQ==", - "dev": true, - "dependencies": { - "domelementtype": "1" - } - }, - "node_modules/domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw==", - "dev": true, - "dependencies": { - "dom-serializer": "0", - "domelementtype": "1" + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" } }, "node_modules/dragula": { @@ -1521,6 +1851,12 @@ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, + "node_modules/electron-to-chromium": { + "version": "1.4.687", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.687.tgz", + "integrity": "sha512-Ic85cOuXSP6h7KM0AIJ2hpJ98Bo4hyTUjc4yjMbkvD+8yTxEhfK9+8exT2KKYsSjnCn2tGsKVSZwE7ZgTORQCw==", + "dev": true + }, "node_modules/encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -1529,12 +1865,6 @@ "node": ">= 0.8" } }, - "node_modules/entities": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", - "integrity": "sha512-LbLqfXgJMmy81t+7c14mnulFHJ170cM6E+0vMXR9k/ZiZwgX8i5pNgjTCX3SO4VeUsFLV+8InixoretwU+MjBQ==", - "dev": true - }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -1552,11 +1882,245 @@ "node": ">=0.10.0" } }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "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.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "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.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-compat": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-compat/-/eslint-plugin-compat-4.2.0.tgz", + "integrity": "sha512-RDKSYD0maWy5r7zb5cWQS+uSPc26mgOzdORJ8hxILmWM7S/Ncwky7BcAtXVY5iRbKjBdHsWU8Yg7hfoZjtkv7w==", + "dev": true, + "dependencies": { + "@mdn/browser-compat-data": "^5.3.13", + "ast-metadata-inferer": "^0.8.0", + "browserslist": "^4.21.10", + "caniuse-lite": "^1.0.30001524", + "find-up": "^5.0.0", + "lodash.memoize": "^4.1.2", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=14.x" + }, + "peerDependencies": { + "eslint": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/eslint/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/eslint/node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/eslint/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/eslint/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/espree/node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/esprima": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", @@ -1569,6 +2133,48 @@ "node": ">=0.4.0" } }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", @@ -1582,15 +2188,6 @@ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -1742,6 +2339,12 @@ "node": ">=0.10.0" } }, + "node_modules/fast-deep-equal": { + "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==", + "dev": true + }, "node_modules/fast-diff": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", @@ -1908,6 +2511,39 @@ "node": ">=0.10.0" } }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, "node_modules/file-saver": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-1.3.1.tgz", @@ -1941,6 +2577,42 @@ "node": ">= 0.8" } }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, "node_modules/flatten": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.3.tgz", @@ -2119,6 +2791,21 @@ "integrity": "sha512-Iozmtbqv0noj0uDDqoL0zNq0VBEfK2YFoMAZoxJe4cwphvLR+JskfF30QhXHOR4m3KrE6NLRYw+U9MRXvifyig==", "dev": true }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/globby": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", @@ -2181,6 +2868,21 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/has-property-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", @@ -2300,19 +3002,6 @@ "node": ">=8.0.0" } }, - "node_modules/htmlparser2": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", - "integrity": "sha512-hBxEg3CYXe+rPIua8ETe7tmG3XDn9B0edOE/e9wH2nLczxzgdu0m0aNHY+5wFZiviLWLdANPJTssa92dMcXQ5Q==", - "dev": true, - "dependencies": { - "domelementtype": "1", - "domhandler": "2.3", - "domutils": "1.5", - "entities": "1.0", - "readable-stream": "1.1" - } - }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -2407,6 +3096,15 @@ "node": ">=4" } }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, "node_modules/indexes-of": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", @@ -2541,6 +3239,15 @@ "node": ">=0.10.0" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-obj": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", @@ -2576,6 +3283,12 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, "node_modules/isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", @@ -2585,9 +3298,9 @@ } }, "node_modules/jose": { - "version": "4.15.3", - "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.3.tgz", - "integrity": "sha512-RZJdL9Qjd1sqNdyiVteRGV/bnWtik/+PJh1JP4kT6+x1QQMn+7ryueRys5BEueuayvSVY8CWGCisCDazeRLTuw==", + "version": "4.15.5", + "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.5.tgz", + "integrity": "sha512-jc7BFxgKPKi94uOvEmzlSWFFe2+vASyXaKUpdQKatWAESU2MWjDfFf0fdfc83CDKcA5QecabZeNLyfhe3yKNkg==", "funding": { "url": "https://github.com/sponsors/panva" } @@ -2623,23 +3336,11 @@ "node": ">=4" } }, - "node_modules/jshint": { - "version": "2.13.6", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.13.6.tgz", - "integrity": "sha512-IVdB4G0NTTeQZrBoM8C5JFVLjV2KtZ9APgybDA1MK73xb09qFs0jCXyQLnCOp1cSZZZbvhq/6mfXHUTaDkffuQ==", - "dev": true, - "dependencies": { - "cli": "~1.0.0", - "console-browserify": "1.1.x", - "exit": "0.1.x", - "htmlparser2": "3.8.x", - "lodash": "~4.17.21", - "minimatch": "~3.0.2", - "strip-json-comments": "1.0.x" - }, - "bin": { - "jshint": "bin/jshint" - } + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true }, "node_modules/json-parse-better-errors": { "version": "1.0.2", @@ -2647,6 +3348,18 @@ "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, + "node_modules/json-schema-traverse": { + "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==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "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==", + "dev": true + }, "node_modules/json.sortify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/json.sortify/-/json.sortify-2.1.0.tgz", @@ -2743,6 +3456,15 @@ "safe-buffer": "^5.0.1" } }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", @@ -2806,6 +3528,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/lex": { "version": "1.7.9", "resolved": "https://registry.npmjs.org/lex/-/lex-1.7.9.tgz", @@ -2836,11 +3571,20 @@ "immediate": "~3.0.5" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/lodash.includes": { "version": "4.3.0", @@ -2872,6 +3616,12 @@ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -3234,6 +3984,12 @@ "node": ">=0.10.0" } }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -3247,6 +4003,12 @@ "resolved": "https://registry.npmjs.org/netflux-websocket/-/netflux-websocket-1.0.0.tgz", "integrity": "sha512-xU5AXzSne9yA7eC6jXTU7UGvcG1Al0IUSeNd7IrumJBIr70DLa0nQfV3TOpZsmytBJbefi6fcfVjkgclAgWuOQ==" }, + "node_modules/node-releases": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "dev": true + }, "node_modules/notp": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/notp/-/notp-2.0.3.tgz", @@ -3402,11 +4164,79 @@ "wordwrap": "~0.0.2" } }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "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==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/pako": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" }, + "node_modules/parent-module": { + "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==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parent-module/node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", @@ -3437,6 +4267,15 @@ "node": ">=0.10.0" } }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -3446,6 +4285,15 @@ "node": ">=0.10.0" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -3583,6 +4431,15 @@ "node": ">=6.14.4" } }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -3768,6 +4625,15 @@ "resolved": "https://registry.npmjs.org/pull-stream/-/pull-stream-3.7.0.tgz", "integrity": "sha512-Eco+/R004UaCK2qEDE8vGklcTG2OeZSVm1kTUQNrykEjDwcFXDZhygFDsW49DbXyJMEhHeRL3z5cRVqPAhXlIw==" }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/qs": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", @@ -3782,6 +4648,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/radio-symbol": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/radio-symbol/-/radio-symbol-2.0.0.tgz", @@ -3996,6 +4882,54 @@ "node": ">=0.12" } }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -4164,6 +5098,27 @@ "node": ">=0.10.0" } }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -4459,18 +5414,6 @@ "node": ">=0.10.0" } }, - "node_modules/strip-json-comments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", - "integrity": "sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg==", - "dev": true, - "bin": { - "strip-json-comments": "cli.js" - }, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/success-symbol": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/success-symbol/-/success-symbol-0.1.0.tgz", @@ -4479,6 +5422,18 @@ "node": ">=0.10.0" } }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/terminal-paginator": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/terminal-paginator/-/terminal-paginator-2.0.2.tgz", @@ -4500,6 +5455,12 @@ "utrie": "^1.0.2" } }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, "node_modules/thirty-two": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/thirty-two/-/thirty-two-1.0.2.tgz", @@ -4644,6 +5605,30 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.12.2.tgz", "integrity": "sha512-daw2PNhLZNN5sqvT7NfRcI2uH25gHpbaHxzWJMrF8IiWRW+RkFnD3tr3N5F2tXw1vj7VHI54Hyed5WKgU6I58g==" }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "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==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -4759,6 +5744,51 @@ "node": ">=0.10.0" } }, + "node_modules/update-browserslist-db": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/update-browserslist-db/node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", @@ -4812,6 +5842,21 @@ "node": ">=0.10.0" } }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/window-size": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/window-size/-/window-size-1.1.1.tgz", @@ -4975,6 +6020,18 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index 4c855f0ac..897f0d9ca 100644 --- a/package.json +++ b/package.json @@ -13,62 +13,62 @@ }, "dependencies": { "@mcrowe/minibloom": "^0.2.0", - "chainpad-crypto": "^0.2.5", - "chainpad-server": "^5.1.0", - "cookie-parser": "^1.4.6", + "@node-saml/node-saml": "^4.0.5", + "alertify.js": "1.0.11", "body-parser": "^1.20.2", + "bootstrap": "^4.0.0", + "bootstrap-tokenfield": "^0.12.0", + "chainpad": "^5.2.6", + "chainpad-crypto": "^0.2.5", + "chainpad-listmap": "^1.0.0", + "chainpad-netflux": "^1.0.0", + "chainpad-server": "^5.2.0", + "ckeditor": "npm:ckeditor4@~4.22.1", + "codemirror": "^5.19.0", + "components-font-awesome": "^4.6.3", + "cookie-parser": "^1.4.6", + "croppie": "^2.5.0", + "dragula": "3.7.2", + "drawio": "github:cryptpad/drawio-npm#npm-21.8.2+4", "express": "~4.18.2", + "file-saver": "1.3.1", "fs-extra": "^7.0.0", "get-folder-size": "^2.0.1", - "netflux-websocket": "^1.0.0", + "html2canvas": "^1.4.0", "http-proxy-middleware": "^2.0.6", + "hyper-json": "~1.4.0", + "jquery": "3.6.0", + "json.sortify": "~2.1.0", "jsonwebtoken": "^9.0.0", + "jszip": "3.10.1", + "localforage": "^1.5.2", + "marked": "^4.3.0", + "mathjax": "3.0.5", + "netflux-websocket": "^1.0.0", "notp": "^2.0.3", "nthen": "0.1.8", + "open-sans-fontface": "^1.4.0", "openid-client": "^5.4.2", - "@node-saml/node-saml": "^4.0.5", + "pako": "^2.1.0", "prompt-confirm": "^2.0.4", "pull-stream": "^3.6.1", + "require-css": "0.1.10", + "requirejs": "2.3.5", + "requirejs-plugins": "^1.0.2", "saferphore": "0.0.1", + "scrypt-async": "1.2.0", + "sortablejs": "^1.6.0", "sortify": "^1.0.4", "stream-to-pull-stream": "^1.7.2", "thirty-two": "^1.0.2", "tweetnacl": "~0.12.2", "ulimit": "0.0.2", "ws": "^3.3.1", - - "alertify.js": "1.0.11", - "bootstrap": "^4.0.0", - "bootstrap-tokenfield": "^0.12.0", - "chainpad": "^5.2.6", - "chainpad-listmap": "^1.0.0", - "chainpad-netflux": "^1.0.0", - "ckeditor": "npm:ckeditor4@~4.22.1", - "codemirror": "^5.19.0", - "components-font-awesome": "^4.6.3", - "croppie": "^2.5.0", - "file-saver": "1.3.1", - "hyper-json": "~1.4.0", - "jquery": "3.6.0", - "json.sortify": "~2.1.0", - "jszip": "3.10.1", - "dragula": "3.7.2", - "html2canvas": "^1.4.0", - "localforage": "^1.5.2", - "marked": "^4.3.0", - "mathjax": "3.0.5", - "open-sans-fontface": "^1.4.0", - "require-css": "0.1.10", - "requirejs": "2.3.5", - "requirejs-plugins": "^1.0.2", - "scrypt-async": "1.2.0", - "sortablejs": "^1.6.0", - "drawio": "github:cryptpad/drawio-npm#npm-21.8.2+4", - "pako": "^2.1.0", "x2js": "^3.4.4" }, "devDependencies": { - "jshint": "^2.13.4", + "eslint": "^8.57.0", + "eslint-plugin-compat": "^4.2.0", "lesshint": "6.3.7" }, "overrides": { @@ -86,9 +86,8 @@ "offline": "FRESH=1 OFFLINE=1 node server.js", "offlinedev": "DEV=1 OFFLINE=1 node server.js", "package": "PACKAGE=1 node server.js", - "lint": "jshint --config .jshintrc --exclude-path .jshintignore . && ./node_modules/lesshint/bin/lesshint -c ./.lesshintrc ./customize.dist/src/less2/", - "lint:js": "jshint --config .jshintrc --exclude-path .jshintignore .", - "lint:server": "jshint --config .jshintrc lib", + "lint": "eslint . && ./node_modules/lesshint/bin/lesshint -c ./.lesshintrc ./customize.dist/src/less2/", + "lint:js": "eslint .", "lint:less": "./node_modules/lesshint/bin/lesshint -c ./.lesshintrc ./customize.dist/src/less2/", "lint:translations": "node ./scripts/translations/lint-translations.js", "unused-translations": "node ./scripts/translations/unused-translations.js", @@ -98,5 +97,6 @@ "build": "node scripts/build.js", "clear": "node scripts/clear.js", "installtoken": "node scripts/install.js" - } + }, + "browserslist": ["> 0.5%, last 2 versions, Firefox ESR, not dead, not op_mini all"] } diff --git a/scripts/check-account-deletion.js b/scripts/check-account-deletion.js index a262c7046..e9ed51f5b 100644 --- a/scripts/check-account-deletion.js +++ b/scripts/check-account-deletion.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6, node: true */ const Fs = require('fs'); const nThen = require('nthen'); const Nacl = require('tweetnacl/nacl-fast'); diff --git a/scripts/compare-pin-methods.js b/scripts/compare-pin-methods.js index 6894aa40b..299e6462f 100644 --- a/scripts/compare-pin-methods.js +++ b/scripts/compare-pin-methods.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6, node: true */ const nThen = require("nthen"); const Pins = require("../lib/pins"); const Assert = require("assert"); diff --git a/scripts/generate-admin-keys.js b/scripts/generate-admin-keys.js index 0fe421c53..bda495a2f 100644 --- a/scripts/generate-admin-keys.js +++ b/scripts/generate-admin-keys.js @@ -2,8 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6, node: true */ - const Nacl = require('tweetnacl/nacl-fast'); const keyPair = Nacl.box.keyPair(); diff --git a/scripts/pinned.js b/scripts/pinned.js index e833974e1..12c0722d1 100644 --- a/scripts/pinned.js +++ b/scripts/pinned.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6, node: true */ const Fs = require('fs'); const Path = require("path"); const Semaphore = require('saferphore'); diff --git a/scripts/runtests.js b/scripts/runtests.js index def41c3a5..60685932a 100644 --- a/scripts/runtests.js +++ b/scripts/runtests.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -// jshint esversion: 6, browser: false, node: true // This file is for automated testing, it should probably not be invoked for any other purpose. // It will: // 1. npm install diff --git a/scripts/tests/test-mailbox.js b/scripts/tests/test-mailbox.js index cb86370eb..3b88c7939 100644 --- a/scripts/tests/test-mailbox.js +++ b/scripts/tests/test-mailbox.js @@ -149,11 +149,10 @@ var createUser = function (config, cb) { //wc.leave(); })); }).nThen(function () { - user.cleanup = function (cb) { + user.cleanup = function (/* cb */) { //console.log("Destroying user"); // TODO remove your mailbox user.destroy.fire(); - cb = cb; }; cb(void 0, user); diff --git a/scripts/tests/test-pins.js b/scripts/tests/test-pins.js index d31059748..67309b7c8 100644 --- a/scripts/tests/test-pins.js +++ b/scripts/tests/test-pins.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Pins = require("../../lib/pins"); var stats = { diff --git a/scripts/tests/test-plan.js b/scripts/tests/test-plan.js index 56fc5e3f5..062a490e8 100644 --- a/scripts/tests/test-plan.js +++ b/scripts/tests/test-plan.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Plan = require("../../lib/plan"); var rand_delay = function (f) { diff --git a/scripts/tests/test-rpc.js b/scripts/tests/test-rpc.js index 512e4b22d..632de4424 100644 --- a/scripts/tests/test-rpc.js +++ b/scripts/tests/test-rpc.js @@ -249,11 +249,10 @@ var createUser = function (config, cb) { })); }).nThen(function () { - user.cleanup = function (cb) { + user.cleanup = function (/* cb */) { //console.log("Destroying user"); // TODO remove your mailbox user.destroy.fire(); - cb = cb; }; cb(void 0, user); @@ -897,13 +896,14 @@ nThen(function (w) { text: "CAMEMBERT", } }), bob.curveKeys.curvePublic); - alice.anonRpc.send('WRITE_PRIVATE_MESSAGE', [bob.mailboxChannel, message], w(function (err, response) { + alice.anonRpc.send('WRITE_PRIVATE_MESSAGE', [bob.mailboxChannel, message], w(function (err/*, response*/) { if (err) { return void console.error(err); } // TODO validate that the write was actually successful by checking its size - response = response; + //response = response; + // shutdown doesn't work, so we need to do this instead })); }).nThen(function () { diff --git a/server.js b/server.js index e6d6f6d58..f8e8ffd94 100644 --- a/server.js +++ b/server.js @@ -157,8 +157,7 @@ nThen(function (w) { }); }; - var broadcast = (command, data, cb) => { - cb = cb; // TODO nThen/concurrency + var broadcast = (command, data/*, cb*/) => { for (const worker of Object.values(Cluster.workers)) { sendCommand(worker, command, data /*, cb */); } diff --git a/www/auth/base32.js b/www/auth/base32.js index b31a406c3..ba804c104 100644 --- a/www/auth/base32.js +++ b/www/auth/base32.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 7 */ define([], function () { // Based on https://gist.github.com/bellbind/871b145110c458e83077a718aef9fa0e diff --git a/www/bounce/main.js b/www/bounce/main.js index 697ff5711..e8d658602 100644 --- a/www/bounce/main.js +++ b/www/bounce/main.js @@ -81,7 +81,7 @@ define(['/api/config'], function (ApiConfig) { // Inform the user that we won't navigate and that the 'bounce tab' will be closed. // our linter warns when it sees 'javascript:' because it doesn't distinguish between // detecting this pattern and using it, so we ignore this line - if (['javascript:', 'vbscript:', 'data:', 'blob:'].includes(target.protocol)) { // jshint ignore:line + if (['javascript:', 'vbscript:', 'data:', 'blob:'].includes(target.protocol)) { window.alert(Messages._getKey('bounce_danger', [target.href])); return void reject(); } diff --git a/www/checkup/main.js b/www/checkup/main.js index 290848946..907bb52b4 100644 --- a/www/checkup/main.js +++ b/www/checkup/main.js @@ -1287,6 +1287,7 @@ define([ // check if they provide legal data assert(function (cb, msg) { + // eslint-disable-next-line no-constant-condition if (true) { return void cb(true); } // FIXME stubbed while we determine whether this is necessary if (ApiConfig.restrictRegistration) { return void cb(true); } diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 2de8738ab..c21821a30 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -61,7 +61,6 @@ define([ existing = Object.keys(res.tags).sort(); })); }).nThen(function (waitFor) { - var _err; hrefs.forEach(function (href) { common.getPadAttribute('tags', waitFor(function (err, res) { if (err) { @@ -69,7 +68,6 @@ define([ UI.alert(Messages.tags_noentry); } waitFor.abort(); - _err = err; return void console.error(err); } allTags[href] = res || []; @@ -362,7 +360,7 @@ define([ buttons: contactsButtons, }); - var linkName, linkPassword, linkMessage, linkError, linkSpinText; + var linkName, linkPassword, linkMessage, linkError; var linkForm, linkSpin, linkResult, linkUses, linkRole; var linkWarning; // Invite from link @@ -429,7 +427,7 @@ define([ style: 'display: none;' }, [ h('i.fa.fa-spinner.fa-spin'), - linkSpinText = h('span', Messages.team_inviteLinkLoading) + h('span', Messages.team_inviteLinkLoading) ]), linkResult = h('div', { style: 'display: none;' diff --git a/www/common/common-util.js b/www/common/common-util.js index b1223f35a..7d9a1b27b 100644 --- a/www/common/common-util.js +++ b/www/common/common-util.js @@ -6,8 +6,8 @@ var Util = {}; // polyfill for atob in case you're using this from node... - window.atob = window.atob || function (str) { return Buffer.from(str, 'base64').toString('binary'); }; // jshint ignore:line - window.btoa = window.btoa || function (str) { return Buffer.from(str, 'binary').toString('base64'); }; // jshint ignore:line + window.atob = window.atob || function (str) { return Buffer.from(str, 'base64').toString('binary'); }; + window.btoa = window.btoa || function (str) { return Buffer.from(str, 'binary').toString('base64'); }; Util.slice = function (A, start, end) { return Array.prototype.slice.call(A, start, end); diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index f0578ed0a..39e75b9a3 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -1566,7 +1566,6 @@ define([ var oldChannel; var warning; - var FileCrypto; var MediaTag; var Upload; Nthen(function (waitFor) { @@ -1577,12 +1576,10 @@ define([ } }).nThen(function (waitFor) { require([ - '/file/file-crypto.js', '/common/media-tag.js', '/common/outer/upload.js', '/components/tweetnacl/nacl-fast.min.js' - ], waitFor(function (_FileCrypto, _MT, _Upload) { - FileCrypto = _FileCrypto; + ], waitFor(function (_MT, _Upload) { MediaTag = _MT; Upload = _Upload; })); @@ -1952,7 +1949,7 @@ define([ var oldBytes = data.oldBytes; // From Scrypt var newBytes = data.newBytes; // From Scrypt var secret = Hash.getSecrets('drive', hash); - var newHash, newHref, newSecret; + var newHash, newSecret; var oldIsOwned = false; var blockHash = LocalStore.getBlockHash(); @@ -2031,7 +2028,6 @@ define([ // Get the current content, store it in the new user file // and make sure the new user drive is owned newHash = Hash.createRandomHash('drive'); - newHref = '/drive/#' + newHash; newSecret = Hash.getSecrets('drive', newHash); var optsPut = { @@ -2717,6 +2713,7 @@ define([ window.addEventListener('unload', function () { postMsg('CLOSE'); }); + // eslint-disable-next-line no-constant-condition } else if (false && !noWorker && !noSharedWorker && 'serviceWorker' in navigator) { var initializing = true; var stopWaiting = waitFor2(); // Call this function when we're ready diff --git a/www/common/inner/access.js b/www/common/inner/access.js index 22d176fac..de171f116 100644 --- a/www/common/inner/access.js +++ b/www/common/inner/access.js @@ -757,7 +757,7 @@ define([ var priv = common.getMetadataMgr().getPrivateData(); var user = common.getMetadataMgr().getUserData(); var edPublic = priv.edPublic; - var strangers = 0; + //var strangers = 0; var _owners = {}; list.forEach(function (ed) { // If a friend is an owner, add their name to the list @@ -808,7 +808,7 @@ define([ // in the pad itself (as is the case of the uid in rich text comments) // TODO or just implement "Acquaintances" }; - strangers++; + //strangers++; }); if (!Object.keys(_owners).length) { return; } /* diff --git a/www/common/inner/mfa.js b/www/common/inner/mfa.js index 3c576779a..648bc6b53 100644 --- a/www/common/inner/mfa.js +++ b/www/common/inner/mfa.js @@ -278,6 +278,7 @@ define([ if (code.length !== 6 || /\D/.test(code)) { return void UI.warn(Messages.settings_otp_invalid); } + if (lock) { return; } confirmOTP.disabled = true; lock = true; diff --git a/www/common/media-tag.js b/www/common/media-tag.js index bf0359001..ac02eed3f 100644 --- a/www/common/media-tag.js +++ b/www/common/media-tag.js @@ -349,9 +349,7 @@ var factory = function () { increment: function (N) { var l = N.length; while (l-- > 1) { - /* .jshint probably suspects this is unsafe because we lack types - but as long as this is only used on nonces, it should be safe */ - if (N[l] !== 255) { return void N[l]++; } // jshint ignore:line + if (N[l] !== 255) { return void N[l]++; } // you don't need to worry about this running out. // you'd need a REAAAALLY big file diff --git a/www/common/notify.js b/www/common/notify.js index 8e4d2adfe..43711b0d1 100644 --- a/www/common/notify.js +++ b/www/common/notify.js @@ -2,6 +2,8 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later +/* eslint compat/compat: "off" */ + define(['/api/config'], function (ApiConfig) { var Module = {}; diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index c45bb2b87..648b5d285 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -114,7 +114,7 @@ define([ // This structure is used for caching media data and blob urls for each media cryptpad url var mediasData = {}; - var startOO = function () {}; + let startOO = function () {}; var supportsXLSX = function () { return privateData.supportsWasm; @@ -681,51 +681,51 @@ define([ } return new Blob([newText], {type: 'text/plain'}); }; - var loadLastDocument = function (lastCp, onCpError, cb) { - if (!lastCp || !lastCp.file) { - return void onCpError('EEMPTY'); - } - ooChannel.cpIndex = lastCp.index || 0; - ooChannel.lastHash = lastCp.hash; - var parsed = Hash.parsePadUrl(lastCp.file); - var secret = Hash.getSecrets('file', parsed.hash); - if (!secret || !secret.channel) { return; } - var hexFileName = secret.channel; - var fileHost = privateData.fileHost || privateData.origin; - var src = fileHost + Hash.getBlobPathFromHex(hexFileName); - var key = secret.keys && secret.keys.cryptKey; - var xhr = new XMLHttpRequest(); - xhr.open('GET', src, true); - if (window.sendCredentials) { xhr.withCredentials = true; } - xhr.responseType = 'arraybuffer'; - xhr.onload = function () { - if (/^4/.test('' + this.status)) { - onCpError(this.status); - return void console.error('XHR error', this.status); + + const loadLastDocument = function (lastCp) { + return new Promise((resolve, reject) => { + if (!lastCp || !lastCp.file) { + return void reject('EEMPTY'); } - var arrayBuffer = xhr.response; - if (arrayBuffer) { - var u8 = new Uint8Array(arrayBuffer); - FileCrypto.decrypt(u8, key, function (err, decrypted) { - if (err) { - if (err === "DECRYPTION_ERROR") { - console.warn(err); - return void onCpError(err); + ooChannel.cpIndex = lastCp.index || 0; + ooChannel.lastHash = lastCp.hash; + var parsed = Hash.parsePadUrl(lastCp.file); + var secret = Hash.getSecrets('file', parsed.hash); + if (!secret || !secret.channel) { return; } + var hexFileName = secret.channel; + var fileHost = privateData.fileHost || privateData.origin; + var src = fileHost + Hash.getBlobPathFromHex(hexFileName); + var key = secret.keys && secret.keys.cryptKey; + var xhr = new XMLHttpRequest(); + xhr.open('GET', src, true); + if (window.sendCredentials) { xhr.withCredentials = true; } + xhr.responseType = 'arraybuffer'; + xhr.onload = function () { + if (/^4/.test('' + this.status)) { + reject(this.status); + return void console.error('XHR error', this.status); + } + var arrayBuffer = xhr.response; + if (arrayBuffer) { + var u8 = new Uint8Array(arrayBuffer); + FileCrypto.decrypt(u8, key, function (err, decrypted) { + if (err) { + if (err === "DECRYPTION_ERROR") { + console.warn(err); + return void reject(err); + } + return void console.error(err); } - return void console.error(err); - } - var blob = new Blob([decrypted.content], {type: 'plain/text'}); - if (cb) { - return cb(blob, getFileType()); - } - startOO(blob, getFileType()); - }); - } - }; - xhr.onerror = function (err) { - onCpError(err); - }; - xhr.send(null); + var blob = new Blob([decrypted.content], {type: 'plain/text'}); + resolve({blob, fileType: getFileType()}); + }); + } + }; + xhr.onerror = function (err) { + reject(err); + }; + xhr.send(null); + }); }; /* @@ -825,26 +825,28 @@ define([ if (!exists) { return void UI.removeLoadingScreen(); } - loadLastDocument(cp, function () { - if (cp.hash && vHashEl) { - // We requested a checkpoint but we can't find it... + loadLastDocument(cp) + .then(({blob, fileType}) => { + ooChannel.queue = messages; + resetData(blob, fileType); UI.removeLoadingScreen(); - vHashEl.innerText = Messages.oo_deletedVersion; - $(vHashEl).removeClass('alert-warning').addClass('alert-danger'); - return; - } - var file = getFileType(); - var type = common.getMetadataMgr().getPrivateData().ooType; - if (APP.downloadType) { type = APP.downloadType; } - var blob = loadInitDocument(type, true); - ooChannel.queue = messages; - resetData(blob, file); - UI.removeLoadingScreen(); - }, function (blob, file) { - ooChannel.queue = messages; - resetData(blob, file); - UI.removeLoadingScreen(); - }); + }) + .catch(() => { + if (cp.hash && vHashEl) { + // We requested a checkpoint but we can't find it... + UI.removeLoadingScreen(); + vHashEl.innerText = Messages.oo_deletedVersion; + $(vHashEl).removeClass('alert-warning').addClass('alert-danger'); + return; + } + var file = getFileType(); + var type = common.getMetadataMgr().getPrivateData().ooType; + if (APP.downloadType) { type = APP.downloadType; } + var blob = loadInitDocument(type, true); + ooChannel.queue = messages; + resetData(blob, file); + UI.removeLoadingScreen(); + }); }); }; @@ -1675,7 +1677,8 @@ define([ chat: false, logo: { url: "/bounce/#" + encodeURIComponent('https://www.onlyoffice.com') - } + }, + comments: !lock && !readOnly }, "user": { "id": String(myOOId), //"c0c3bf82-20d7-4663-bf6d-7fa39c598b1d", @@ -1998,14 +2001,13 @@ define([ APP.themeRemote = true; */ }; - APP.changeTheme = function (id) { + APP.changeTheme = function (/*id*/) { /* // disabled: Uncaught TypeError: Cannot read property 'calculatedType' of null at CPresentation.changeTheme (sdk-all.js?ver=4.11.0-1633612942653-1633619288217:15927) */ - id = id; /* APP.themeChanged = { id: id @@ -2359,25 +2361,15 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null // If the last checkpoint is empty, load the "initial" doc instead if (!lastCp || !lastCp.file) { return void loadDocument(true, useNewDefault); } // Load latest checkpoint - return void loadLastDocument(lastCp, function () { - // Checkpoint error: load the previous one - i = i || 0; - loadDocument(noCp, useNewDefault, ++i); - }); - } - var newText; - switch (type) { - case 'sheet' : - newText = EmptyCell(useNewDefault); - break; - case 'doc': - newText = EmptyDoc(); - break; - case 'presentation': - newText = EmptySlide(); - break; - default: - newText = ''; + loadLastDocument(lastCp) + .then(({blob, fileType}) => { + startOO(blob, fileType); + }) + .catch(() => { + // Checkpoint error: load the previous one + i = i || 0; + loadDocument(noCp, useNewDefault, ++i); + }); } var blob = loadInitDocument(type, useNewDefault); startOO(blob, file); @@ -2427,7 +2419,6 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null } }; - var wasEditing = false; var setStrictEditing = function () { if (APP.isFast) { return; } var editor = getEditor(); @@ -2437,12 +2428,10 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null } else { evOnSync.fire(); } - wasEditing = Boolean(editing); }; APP.onFastChange = function (isFast) { APP.isFast = isFast; if (isFast) { - wasEditing = false; if (APP.hasChangedInterval) { window.clearInterval(APP.hasChangedInterval); } @@ -2464,20 +2453,21 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null pinImages(); }; - var loadCp = function (cp, keepQueue) { + const loadCp = async function (cp, keepQueue) { if (!isLockedModal.modal) { isLockedModal.modal = UI.openCustomModal(isLockedModal.content); } - loadLastDocument(cp, function () { + try { + const {blob, fileType} = await loadLastDocument(cp); + if (!keepQueue) { ooChannel.queue = []; } + resetData(blob, fileType); + } catch (e) { var file = getFileType(); var type = common.getMetadataMgr().getPrivateData().ooType; var blob = loadInitDocument(type, true); if (!keepQueue) { ooChannel.queue = []; } resetData(blob, file); - }, function (blob, file) { - if (!keepQueue) { ooChannel.queue = []; } - resetData(blob, file); - }); + } }; var loadTemplate = function (href, pw, parsed) { @@ -2678,6 +2668,7 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null }; var onCheckpoint = function (cp) { // We want to load a checkpoint: + console.log('XXX onCheckpoint', JSON.stringify(cp)); loadCp(cp); }; var setHistoryMode = function (bool) { @@ -3213,13 +3204,15 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null isLockedModal.modal = UI.openCustomModal(isLockedModal.content); } var lastCp = getLastCp(); - loadLastDocument(lastCp, function (err) { - console.error(err); - // On error, do nothing - // FIXME lock the document or ask for a page reload? - }, function (blob, type) { - resetData(blob, type); - }); + loadLastDocument(lastCp) + .then(({blob, fileType}) => { + resetData(blob, fileType); + }) + .catch((err) => { + console.error(err); + // On error, do nothing + // FIXME lock the document or ask for a page reload? + }); }; config.onRemote = function () { diff --git a/www/common/outer/login-block.js b/www/common/outer/login-block.js index 439c34994..fe0037dd8 100644 --- a/www/common/outer/login-block.js +++ b/www/common/outer/login-block.js @@ -104,8 +104,7 @@ define([ }; }; - Block.proveAncestor = function (O /* oldBlockKeys */, N /* newBlockKeys */) { - N = N; + Block.proveAncestor = function (O /* oldBlockKeys, N, newBlockKeys */) { var u8_pub = Util.find(O, ['sign', 'publicKey']); var u8_secret = Util.find(O, ['sign', 'secretKey']); try { diff --git a/www/common/outer/mailbox-handlers.js b/www/common/outer/mailbox-handlers.js index b7c9afd36..cfa749084 100644 --- a/www/common/outer/mailbox-handlers.js +++ b/www/common/outer/mailbox-handlers.js @@ -546,12 +546,10 @@ define([ // Make sure we are a member of this team var myTeams = Util.find(ctx, ['store', 'proxy', 'teams']) || {}; var teamId; - var team; Object.keys(myTeams).some(function (k) { var _team = myTeams[k]; if (_team.channel === content.teamData.channel) { teamId = k; - team = _team; return true; } }); diff --git a/www/common/outer/profile.js b/www/common/outer/profile.js index 83c8c2f4d..6d98e0d69 100644 --- a/www/common/outer/profile.js +++ b/www/common/outer/profile.js @@ -74,8 +74,7 @@ define([ }); }; - var setName = function (ctx, value, cb) { - cb = cb || function () {}; + var setName = function (ctx, value) { ctx.listmap.proxy.name = value; Realtime.whenRealtimeSyncs(ctx.listmap.realtime, function () { if (!ctx.listmap) { return; } diff --git a/www/common/outer/roster.js b/www/common/outer/roster.js index 38bd09b11..bcd952d9d 100644 --- a/www/common/outer/roster.js +++ b/www/common/outer/roster.js @@ -582,7 +582,6 @@ var factory = function (Util, Hash, CPNetflux, Sortify, nThen, Crypto, Feedback) delete ref.internal.checkpointTimeout; }; - var webChannel; roster.stop = function () { if (ref.internal.cpNetflux && typeof(ref.internal.cpNetflux.stop) === "function") { ref.internal.cpNetflux.stop(); @@ -604,9 +603,8 @@ var factory = function (Util, Hash, CPNetflux, Sortify, nThen, Crypto, Feedback) } config.onCacheReady(roster); }; - var onReady = function (info) { + var onReady = function () { //console.log("READY"); - webChannel = info; ready = true; cb(void 0, roster); }; diff --git a/www/common/outer/serviceworker.js b/www/common/outer/serviceworker.js index 7b2a23139..106e4d848 100644 --- a/www/common/outer/serviceworker.js +++ b/www/common/outer/serviceworker.js @@ -2,7 +2,8 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint ignore:start */ +/* global importScripts, tabs */ + importScripts('/components/requirejs/require.js'); window = self; @@ -168,12 +169,12 @@ self.addEventListener('message', function (e) { self.tabs[cId].msgEv.fire(e); } }); -self.addEventListener('install', function (e) { +self.addEventListener('install', function () { debug('V1 installing…'); self.skipWaiting(); }); -self.addEventListener('activate', function (e) { +self.addEventListener('activate', function () { debug('V1 now ready to handle fetches!'); }); diff --git a/www/common/outer/sharedworker.js b/www/common/outer/sharedworker.js index 41cf9938b..d7743dbf6 100644 --- a/www/common/outer/sharedworker.js +++ b/www/common/outer/sharedworker.js @@ -2,7 +2,8 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint ignore:start */ +/* global importScripts */ + importScripts('/components/requirejs/require.js'); window = self; @@ -161,10 +162,10 @@ var init = function (client, cb) { }); }; -onconnect = function(e) { +addEventListener('connect', function(e) { debug('New SharedWorker client'); var port = e.ports[0]; - var cId = Number(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)) + var cId = Number(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)); var client = self.tabs[cId] = { id: cId, port: port @@ -186,5 +187,5 @@ onconnect = function(e) { client.msgEv.fire(e); } }; -}; +}); diff --git a/www/common/outer/webworker.js b/www/common/outer/webworker.js index 114c9f59e..96d174848 100644 --- a/www/common/outer/webworker.js +++ b/www/common/outer/webworker.js @@ -2,7 +2,8 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint ignore:start */ +/* global importScripts */ + importScripts('/components/requirejs/require.js'); window = self; diff --git a/www/common/outer/x2t.js b/www/common/outer/x2t.js index 55ceb869c..ea3d45f1b 100644 --- a/www/common/outer/x2t.js +++ b/www/common/outer/x2t.js @@ -121,7 +121,7 @@ define([ // Sanitize file names var illegalRe = /[\/\?<>\\:\*\|"]/g; - var controlRe = /[\x00-\x1f\x80-\x9f]/g; + var controlRe = /[\x00-\x1f\x80-\x9f]/g; // eslint-disable-line no-control-regex var reservedRe = /^\.+$/; var safeRe = /[&'%!"{}[\]]/g; var sanitize = function (input) { diff --git a/www/common/sframe-boot.js b/www/common/sframe-boot.js index be5cb1b6e..480c35300 100644 --- a/www/common/sframe-boot.js +++ b/www/common/sframe-boot.js @@ -8,7 +8,7 @@ // IF YOU EDIT THIS FILE, bump the version (replace 1.3 in the following command with the next version.) // grep -nr '/common/sframe-boot.js?ver=' | sed 's/:.*$//' | grep -v 'sframe-boot.js' | while read x; do \ // sed -i -e 's@/common/sframe-boot.js?ver=[^"]*@/common/sframe-boot.js?ver=1.3@' $x; done -;(function () { +(function () { var _alert = function (cb) { return void require([ @@ -45,7 +45,7 @@ if (typeof(Promise) !== 'function') { var caughtEval; console.log("Testing if CSP correctly blocks an 'eval' call"); try { - eval('true'); // jshint ignore:line + eval('true'); } catch (err) { caughtEval = true; } if (!/^\/(sheet|doc|presentation|unsafeiframe)/.test(window.location.pathname) && !caughtEval) { diff --git a/www/common/sframe-chainpad-netflux-inner.js b/www/common/sframe-chainpad-netflux-inner.js index 29c82e4dd..602148ca3 100644 --- a/www/common/sframe-chainpad-netflux-inner.js +++ b/www/common/sframe-chainpad-netflux-inner.js @@ -13,9 +13,6 @@ define([ var badStateTimeout = typeof(AppConfig.badStateTimeout) === 'number' ? AppConfig.badStateTimeout : 30000; - var verbose = function (x) { console.log(x); }; - verbose = function () {}; // comment out to enable verbose logging - module.exports.start = function (config) { var onConnectionChange = config.onConnectionChange || function () { }; var onRemote = config.onRemote || function () { }; diff --git a/www/common/sframe-common-codemirror.js b/www/common/sframe-common-codemirror.js index 06fef19b0..18588ba40 100644 --- a/www/common/sframe-common-codemirror.js +++ b/www/common/sframe-common-codemirror.js @@ -225,14 +225,12 @@ define([ var $textarea = exp.$textarea = textarea ? $(textarea) : $('#editor1'); if (!$textarea.length) { $textarea = exp.$textarea = $pad.contents().find('#editor1'); } - var Title; var onLocal = function () {}; var $drawer; exp.init = function (local, title, toolbar) { if (typeof local === "function") { onLocal = local; } - Title = title; $drawer = toolbar.$theme || $(); }; diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index d597c66c9..84013e023 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -114,7 +114,6 @@ define([ var SecureIframe; var UnsafeIframe; var OOIframe; - var Messaging; var Notifier; var Utils = { nThen: nThen @@ -142,7 +141,6 @@ define([ '/secureiframe/main.js', '/unsafeiframe/main.js', '/common/onlyoffice/ooiframe.js', - '/common/common-messaging.js', '/common/common-notifier.js', '/common/common-hash.js', '/common/common-util.js', @@ -158,7 +156,7 @@ define([ '/common/userObject.js', 'optional!/api/instance' ], waitFor(function (_CpNfOuter, _Cryptpad, _Crypto, _Cryptget, _SFrameChannel, - _SecureIframe, _UnsafeIframe, _OOIframe, _Messaging, _Notifier, _Hash, _Util, _Realtime, _Notify, + _SecureIframe, _UnsafeIframe, _OOIframe, _Notifier, _Hash, _Util, _Realtime, _Notify, _Constants, _Feedback, _LocalStore, _Block, _Cache, _AppConfig, /* _Test,*/ _UserObject, _Instance) { CpNfOuter = _CpNfOuter; @@ -169,7 +167,6 @@ define([ SecureIframe = _SecureIframe; UnsafeIframe = _UnsafeIframe; OOIframe = _OOIframe; - Messaging = _Messaging; Notifier = _Notifier; Utils.Hash = _Hash; Utils.Util = _Util; @@ -2047,6 +2044,7 @@ define([ sframeChan.on('Q_ASK_NOTIFICATION', function (data, cb) { if (!Utils.Notify.isSupported()) { return void cb(false); } + // eslint-disable-next-line compat/compat Notification.requestPermission(function (s) { cb(s === "granted"); }); diff --git a/www/common/test.js b/www/common/test.js index a418a2e1f..e084a8561 100644 --- a/www/common/test.js +++ b/www/common/test.js @@ -68,7 +68,6 @@ define([], function () { } }; - // jshint -W103 var errProto = (new Error()).__proto__; var doLog = function (o) { var s; diff --git a/www/common/toolbar.js b/www/common/toolbar.js index e9e800f9f..872c1c5af 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -34,8 +34,6 @@ MessengerUI, Messages, Pages) { var BOTTOM_LEFT_CLS = Bar.constants.bottomL = 'cp-toolbar-bottom-left'; var BOTTOM_MID_CLS = Bar.constants.bottomM = 'cp-toolbar-bottom-mid'; var BOTTOM_RIGHT_CLS = Bar.constants.bottomR = 'cp-toolbar-bottom-right'; - var LEFTSIDE_CLS = Bar.constants.leftside = 'cp-toolbar-leftside'; - var RIGHTSIDE_CLS = Bar.constants.rightside = 'cp-toolbar-rightside'; var FILE_CLS = Bar.constants.file = 'cp-toolbar-file'; var DRAWER_CLS = Bar.constants.drawer = 'cp-toolbar-drawer-content'; var HISTORY_CLS = Bar.constants.history = 'cp-toolbar-history'; @@ -137,7 +135,7 @@ MessengerUI, Messages, Pages) { $('', {'class': USERADMIN_CLS + ' cp-dropdown-container'}).hide().appendTo($userContainer); $toolbar.append($topContainer); - var $bottom = $(h('div.'+BOTTOM_CLS, [ + $(h('div.'+BOTTOM_CLS, [ h('div.'+BOTTOM_LEFT_CLS), h('div.'+BOTTOM_MID_CLS), h('div.'+BOTTOM_RIGHT_CLS) @@ -506,7 +504,7 @@ MessengerUI, Messages, Pages) { return $container; }; - createCollapse = function (toolbar) { + var createCollapse = function (toolbar) { var up = h('i.fa.fa-chevron-up', {title: Messages.toolbar_collapse}); var down = h('i.fa.fa-chevron-down', {title: Messages.toolbar_expand}); var notif = h('span.cp-collapsed-notif'); @@ -979,7 +977,6 @@ MessengerUI, Messages, Pages) { if (overLimit) { $limit.show().click(function () { if (ApiConfig.allowSubscriptions && Config.upgradeURL) { - var key = 'pinLimitReachedAlert'; // Msg.pinLimitReachedAlert var msg = Pages.setHTML(h('span'), Messages.pinLimitReachedAlert); $(msg).find('a').attr({ target: '_blank', @@ -998,7 +995,7 @@ MessengerUI, Messages, Pages) { return $limit; }; - var createNewPad = function (toolbar, config) { + var createNewPad = function (toolbar) { var $button = Common.createButton('newpad', true); toolbar.$drawer.append($button); return $button; @@ -1008,7 +1005,6 @@ MessengerUI, Messages, Pages) { if (!config.metadataMgr) { throw new Error("You must provide a `metadataMgr` to display the user menu"); } - var metadataMgr = config.metadataMgr; var $userAdmin = toolbar.$userAdmin.find('.'+USERADMIN_CLS).show(); var userMenuCfg = { $initBlock: $userAdmin, @@ -1028,7 +1024,7 @@ MessengerUI, Messages, Pages) { return $userAdmin; }; - var createMaintenance = function (toolbar, config) { + var createMaintenance = function (toolbar) { var $notif = toolbar.$top.find('.'+MAINTENANCE_CLS); var button = h('button.cp-maintenance-wrench.fa.fa-wrench'); $notif.append(button); diff --git a/www/diagram/export.js b/www/diagram/export.js index 6f59957b0..79f9c7be7 100644 --- a/www/diagram/export.js +++ b/www/diagram/export.js @@ -51,7 +51,7 @@ define([ const loadCryptPadImages = (doc) => { return Array.from(doc .querySelectorAll('mxCell')) .map((element) => [element, parseDrawioStyle(element.getAttribute('style'))]) - .filter(([element, style]) => style && style.image && style.image.startsWith('cryptpad://')) + .filter(([, style]) => style && style.image && style.image.startsWith('cryptpad://')) .map(([element, style]) => { return loadImage(style.image) .then((dataUrl) => { diff --git a/www/drive/inner.js b/www/drive/inner.js index cbdc45851..8ed880900 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -141,7 +141,6 @@ define([ var common; var proxy = {}; var folders = {}; - var readOnly; var startOnline = false; var onReco; @@ -168,7 +167,7 @@ define([ } metadataMgr.onChange(function () { if (typeof(metadataMgr.getPrivateData().readOnly) === 'boolean') { - readOnly = APP.readOnly = metadataMgr.getPrivateData().readOnly; + APP.readOnly = metadataMgr.getPrivateData().readOnly; privReady(); } }); @@ -200,7 +199,7 @@ define([ APP.disableSF = !privateData.enableSF && AppConfig.disableSharedFolders; if (APP.newSharedFolder && !APP.loggedIn) { - readOnly = APP.readOnly = true; + APP.readOnly = true; var data = folders[APP.newSharedFolder]; if (data) { sframeChan.query('Q_SET_PAD_TITLE_IN_DRIVE', { diff --git a/www/file/file-crypto.js b/www/file/file-crypto.js index 246bf756d..6a5bc9e33 100644 --- a/www/file/file-crypto.js +++ b/www/file/file-crypto.js @@ -42,7 +42,7 @@ define([ while (l-- > 1) { /* our linter suspects this is unsafe because we lack types but as long as this is only used on nonces, it should be safe */ - if (N[l] !== 255) { return void N[l]++; } // jshint ignore:line + if (N[l] !== 255) { return void N[l]++; } if (l === 0) { throw new Error('E_NONCE_TOO_LARGE'); } N[l] = 0; } diff --git a/www/form/inner.js b/www/form/inner.js index 7c2b220f9..9c81ddcad 100644 --- a/www/form/inner.js +++ b/www/form/inner.js @@ -1243,14 +1243,14 @@ define([ h('i.fa.fa-plus'), h('span', Messages.form_conditional_addAnd) ]); - var $b = $(btn).click(function () { - getConditions($container, true, rules, undefined, $b); + $(btn).click(function () { + getConditions($container, true, rules, undefined); }); $container.append(btn); - return $b; + return; }; var values = getConditionsValues(); - getConditions = function ($container, isNew, rules, condition, $btn) { + getConditions = function ($container, isNew, rules, condition) { condition = condition || {}; condition.uid = condition.uid || Util.uid(); @@ -1272,7 +1272,7 @@ define([ if (!Array.isArray(rules)) { // new set of rules (OR) rules = [condition]; w.push(rules); - $btn = getAddAndButton($container, rules); + getAddAndButton($container, rules); } else { rules.push(condition); } @@ -1473,9 +1473,9 @@ define([ w.forEach(function (rules) { var rulesC = h('div.cp-form-condition-rule'); var $rulesC = $(rulesC); - var $b = getAddAndButton($rulesC, rules); + getAddAndButton($rulesC, rules); rules.forEach(function (obj) { - getConditions($rulesC, false, rules, obj, $b); + getConditions($rulesC, false, rules, obj); }); $addC.before($rulesC); }); @@ -1585,11 +1585,11 @@ define([ if (!$v.length) { return; } var dropV = $v[0] && $v[0].dropdown; if (!dropV) { return; } - var res, type; + var res; values.some(function (obj) { if (String(obj.uid) === String(val)) { res = obj.values; - type = obj.type; + //var type = obj.type; return true; } }); diff --git a/www/install/main.js b/www/install/main.js index 4bd334df4..fffb7343d 100644 --- a/www/install/main.js +++ b/www/install/main.js @@ -41,8 +41,6 @@ define([ // checkboxes var $register = $('button#register'); - var registering = false; - var I_REALLY_WANT_TO_USE_MY_EMAIL_FOR_MY_USERNAME = false; var br = function () { return h('br'); }; @@ -103,9 +101,7 @@ define([ var warning = Messages._getKey('register_passwordTooShort', [ Cred.MINIMUM_PASSWORD_LENGTH ]); - return void UI.alert(warning, function () { - registering = false; - }); + return void UI.alert(warning); } if (passwd !== confirmPassword) { // do their passwords match? @@ -156,7 +152,6 @@ define([ return true; } }); - registering = true; }, { ok: Messages.register_writtenPassword, cancel: Messages.register_cancel, diff --git a/www/integration/main.js b/www/integration/main.js index cb02f5a61..f0876d275 100644 --- a/www/integration/main.js +++ b/www/integration/main.js @@ -73,7 +73,7 @@ define([ }; var chan = makeChan(); - var isNew = false; + //var isNew = false; var checkSession = function (oldKey, cb) { var channel = Hash.hrefToHexChannelId(Hash.hashToHref(oldKey)); var prefix = channel.slice(0,2); @@ -97,7 +97,7 @@ define([ }; chan.on('GET_SESSION', function (data, cb) { var getHash = function () { - isNew = true; + //isNew = true; return Hash.createRandomHash('integration'); }; var oldKey = data.key; diff --git a/www/mediatag/media-tag.js b/www/mediatag/media-tag.js index 0292fffde..55b5f822e 100644 --- a/www/mediatag/media-tag.js +++ b/www/mediatag/media-tag.js @@ -128,9 +128,7 @@ increment: function (N) { var l = N.length; while (l-- > 1) { - /* .jshint probably suspects this is unsafe because we lack types - but as long as this is only used on nonces, it should be safe */ - if (N[l] !== 255) { return void N[l]++; } // jshint ignore:line + if (N[l] !== 255) { return void N[l]++; } // you don't need to worry about this running out. // you'd need a REAAAALLY big file diff --git a/www/pad/csp.js b/www/pad/csp.js index 039ddf6ef..ad5cfcc34 100644 --- a/www/pad/csp.js +++ b/www/pad/csp.js @@ -185,8 +185,8 @@ define(['jquery'], function ($) { // for other browers, the 'src' attribute should be left empty to // trigger iframe's 'load' event. var src = - CKEDITOR.env.air ? 'javascript:void(0)' : // jshint ignore:line - ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) ? 'javascript:void(function(){' + encodeURIComponent( // jshint ignore:line + CKEDITOR.env.air ? 'javascript:void(0)' : + ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) ? 'javascript:void(function(){' + encodeURIComponent( 'document.open();' + // In IE, the document domain must be set any time we call document.open(). '(' + CKEDITOR.tools.fixDomain + ')();' + diff --git a/www/pad/wysiwygarea-plugin.js b/www/pad/wysiwygarea-plugin.js index dd07a7b08..41031222b 100644 --- a/www/pad/wysiwygarea-plugin.js +++ b/www/pad/wysiwygarea-plugin.js @@ -31,9 +31,9 @@ define(['/api/config'], function (ApiConfig) { // trigger iframe's 'load' event. // Microsoft Edge throws "Permission Denied" if treated like an IE (http://dev.ckeditor.com/ticket/13441). if ( CKEDITOR.env.air ) { - src = 'javascript:void(0)'; // jshint ignore:line + src = 'javascript:void(0)'; } else if ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) { - src = 'javascript:void(function(){' + encodeURIComponent( src ) + '}())'; // jshint ignore:line + src = 'javascript:void(function(){' + encodeURIComponent( src ) + '}())'; } else { src = ''; } diff --git a/www/profile/inner.js b/www/profile/inner.js index cac10751b..77aecd1a0 100644 --- a/www/profile/inner.js +++ b/www/profile/inner.js @@ -95,7 +95,6 @@ define([ var CREATE_ID = "cp-app-profile-create"; var HEADER_ID = "cp-app-profile-header"; var HEADER_RIGHT_ID = "cp-app-profile-rightside"; - var CREATE_INVITE_BUTTON = 'cp-app-profile-invite-button'; /* jshint ignore: line */ var VIEW_PROFILE_BUTTON = 'cp-app-profile-viewprofile-button'; var common; diff --git a/www/register/main.js b/www/register/main.js index 49242cce5..b9c7e6565 100644 --- a/www/register/main.js +++ b/www/register/main.js @@ -59,8 +59,6 @@ define([ var $register = $('button#register'); - var registering = false; - var I_REALLY_WANT_TO_USE_MY_EMAIL_FOR_MY_USERNAME = false; var br = function () { return h('br'); }; @@ -96,9 +94,7 @@ define([ $uname.val(uname); if (uname.length > Cred.MAXIMUM_NAME_LENGTH) { let nameWarning = Messages._getKey('register_nameTooLong', [ Cred.MAXIMUM_NAME_LENGTH ]); - return void UI.alert(nameWarning, function () { - registering = false; - }); + return void UI.alert(nameWarning); } var passwd = $passwd.val(); @@ -139,9 +135,7 @@ define([ var warning = Messages._getKey('register_passwordTooShort', [ Cred.MINIMUM_PASSWORD_LENGTH ]); - return void UI.alert(warning, function () { - registering = false; - }); + return void UI.alert(warning); } if (passwd !== confirmPassword) { // do their passwords match? @@ -174,7 +168,6 @@ define([ shouldImport, onOTP: UI.getOTPScreen }); - registering = true; }, { ok: Messages.register_writtenPassword, cancel: Messages.register_cancel, diff --git a/www/slide/slide.js b/www/slide/slide.js index 5937dd687..835ff61c1 100644 --- a/www/slide/slide.js +++ b/www/slide/slide.js @@ -16,7 +16,6 @@ define([ var ifrw; var $modal; var $content; - var placeholder; var options; var separator = '
'; var separatorReg = /
/g; @@ -314,7 +313,7 @@ define([ $modal = Slide.$modal = $m; $content = Slide.$content = $c; ifrw = Slide.ifrw = window; - placeholder = Slide.placeholder = ph; + Slide.placeholder = ph; options = Slide.options = opt; addEvent(); addSwipeEvents(); diff --git a/www/teams/inner.js b/www/teams/inner.js index 8f07fe87e..64989c6b4 100644 --- a/www/teams/inner.js +++ b/www/teams/inner.js @@ -1485,7 +1485,6 @@ define([ var main = function () { var common; - var readOnly; nThen(function (waitFor) { $(waitFor(function () { @@ -1507,7 +1506,7 @@ define([ var privateData = metadataMgr.getPrivateData(); var user = metadataMgr.getUserData(); - readOnly = driveAPP.readOnly = metadataMgr.getPrivateData().readOnly; + driveAPP.readOnly = metadataMgr.getPrivateData().readOnly; driveAPP.loggedIn = common.isLoggedIn(); //if (!driveAPP.loggedIn) { throw new Error('NOT_LOGGED_IN'); } diff --git a/www/whiteboard/inner.js b/www/whiteboard/inner.js index f8b19efa2..13bf6e055 100644 --- a/www/whiteboard/inner.js +++ b/www/whiteboard/inner.js @@ -42,9 +42,6 @@ define([ }; var Fabric = APP.Fabric = window.fabric; - var verbose = function (x) { console.log(x); }; - verbose = function () {}; // comment out to enable verbose logging - var mkControls = function (framework, canvas) { var $pickers = $('#cp-app-whiteboard-pickers'); var $colors = $('#cp-app-whiteboard-colors'); diff --git a/www/worker/sw.js b/www/worker/sw.js index 996acc75c..ccfb07ec7 100644 --- a/www/worker/sw.js +++ b/www/worker/sw.js @@ -2,7 +2,9 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint ignore:start */ +/* eslint-env worker */ +/* global clients */ + var id; //= Math.floor(Math.random()*100000); @@ -17,17 +19,17 @@ var broadcast = function (data, excludes) { if (excludes.indexOf(client.id) === -1) { postMsg(client, data); } - }) - }) + }); + }); }; var sendTo = function (data, clientId){ clients.matchAll().then(function (clients) { clients.some(function (client) { if (client.id === clientId) { - postMsg(client, data) + postMsg(client, data); } - }) - }) + }); + }); }; var getClients = function () { clients.matchAll().then(function (clients) { diff --git a/www/worker/worker.js b/www/worker/worker.js index 47df49317..b70e760ee 100644 --- a/www/worker/worker.js +++ b/www/worker/worker.js @@ -2,9 +2,9 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint ignore:start */ +/* eslint-env worker */ -var window = self; +var window = self; // eslint-disable-line no-unused-vars var localStorage = { setItem: function (k, v) { localStorage[k] = v; }, getItem: function (k) { return localStorage[k]; }