extends {
+ thisArg: infer OrigThis;
+ params: infer P extends readonly unknown[];
+ returnType: infer R;
+}
+ ? ReceiverBound extends true
+ ? (...args: RemoveFromTuple>) => R extends [OrigThis, ...infer Rest]
+ ? [TThis, ...Rest] // Replace `this` with `thisArg`
+ : R
+ : >>(
+ thisArg: U,
+ ...args: RemainingArgs
+ ) => R extends [OrigThis, ...infer Rest]
+ ? [U, ...ConcatTuples] // Preserve bound args in return type
+ : R
+ : never;
+
+declare function callBind<
+ const T extends (this: any, ...args: any[]) => any,
+ Extracted extends ExtractFunctionParams,
+ const TBoundArgs extends Partial & readonly unknown[],
+ const TThis extends Extracted["thisArg"]
+>(
+ args: [fn: T, thisArg: TThis, ...boundArgs: TBoundArgs]
+): BindFunction;
+
+declare function callBind<
+ const T extends (this: any, ...args: any[]) => any,
+ Extracted extends ExtractFunctionParams,
+ const TBoundArgs extends Partial & readonly unknown[]
+>(
+ args: [fn: T, ...boundArgs: TBoundArgs]
+): BindFunction;
+
+declare function callBind(
+ args: [fn: Exclude, ...rest: TArgs]
+): never;
+
+// export as namespace callBind;
+export = callBind;
diff --git a/dashboard/node_modules/call-bind-apply-helpers/index.js b/dashboard/node_modules/call-bind-apply-helpers/index.js
new file mode 100644
index 0000000..2f6dab4
--- /dev/null
+++ b/dashboard/node_modules/call-bind-apply-helpers/index.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var bind = require('function-bind');
+var $TypeError = require('es-errors/type');
+
+var $call = require('./functionCall');
+var $actualApply = require('./actualApply');
+
+/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
+module.exports = function callBindBasic(args) {
+ if (args.length < 1 || typeof args[0] !== 'function') {
+ throw new $TypeError('a function is required');
+ }
+ return $actualApply(bind, $call, args);
+};
diff --git a/dashboard/node_modules/call-bind-apply-helpers/package.json b/dashboard/node_modules/call-bind-apply-helpers/package.json
new file mode 100644
index 0000000..923b8be
--- /dev/null
+++ b/dashboard/node_modules/call-bind-apply-helpers/package.json
@@ -0,0 +1,85 @@
+{
+ "name": "call-bind-apply-helpers",
+ "version": "1.0.2",
+ "description": "Helper functions around Function call/apply/bind, for use in `call-bind`",
+ "main": "index.js",
+ "exports": {
+ ".": "./index.js",
+ "./actualApply": "./actualApply.js",
+ "./applyBind": "./applyBind.js",
+ "./functionApply": "./functionApply.js",
+ "./functionCall": "./functionCall.js",
+ "./reflectApply": "./reflectApply.js",
+ "./package.json": "./package.json"
+ },
+ "scripts": {
+ "prepack": "npmignore --auto --commentLines=auto",
+ "prepublish": "not-in-publish || npm run prepublishOnly",
+ "prepublishOnly": "safe-publish-latest",
+ "prelint": "evalmd README.md",
+ "lint": "eslint --ext=.js,.mjs .",
+ "postlint": "tsc -p . && attw -P",
+ "pretest": "npm run lint",
+ "tests-only": "nyc tape 'test/**/*.js'",
+ "test": "npm run tests-only",
+ "posttest": "npx npm@'>=10.2' audit --production",
+ "version": "auto-changelog && git add CHANGELOG.md",
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/ljharb/call-bind-apply-helpers.git"
+ },
+ "author": "Jordan Harband ",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/ljharb/call-bind-apply-helpers/issues"
+ },
+ "homepage": "https://github.com/ljharb/call-bind-apply-helpers#readme",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2"
+ },
+ "devDependencies": {
+ "@arethetypeswrong/cli": "^0.17.3",
+ "@ljharb/eslint-config": "^21.1.1",
+ "@ljharb/tsconfig": "^0.2.3",
+ "@types/for-each": "^0.3.3",
+ "@types/function-bind": "^1.1.10",
+ "@types/object-inspect": "^1.13.0",
+ "@types/tape": "^5.8.1",
+ "auto-changelog": "^2.5.0",
+ "encoding": "^0.1.13",
+ "es-value-fixtures": "^1.7.1",
+ "eslint": "=8.8.0",
+ "evalmd": "^0.0.19",
+ "for-each": "^0.3.5",
+ "has-strict-mode": "^1.1.0",
+ "in-publish": "^2.0.1",
+ "npmignore": "^0.3.1",
+ "nyc": "^10.3.2",
+ "object-inspect": "^1.13.4",
+ "safe-publish-latest": "^2.0.0",
+ "tape": "^5.9.0",
+ "typescript": "next"
+ },
+ "testling": {
+ "files": "test/index.js"
+ },
+ "auto-changelog": {
+ "output": "CHANGELOG.md",
+ "template": "keepachangelog",
+ "unreleased": false,
+ "commitLimit": false,
+ "backfillLimit": false,
+ "hideCredit": true
+ },
+ "publishConfig": {
+ "ignore": [
+ ".github/workflows"
+ ]
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+}
diff --git a/dashboard/node_modules/call-bind-apply-helpers/reflectApply.d.ts b/dashboard/node_modules/call-bind-apply-helpers/reflectApply.d.ts
new file mode 100644
index 0000000..6b2ae76
--- /dev/null
+++ b/dashboard/node_modules/call-bind-apply-helpers/reflectApply.d.ts
@@ -0,0 +1,3 @@
+declare const reflectApply: false | typeof Reflect.apply;
+
+export = reflectApply;
diff --git a/dashboard/node_modules/call-bind-apply-helpers/reflectApply.js b/dashboard/node_modules/call-bind-apply-helpers/reflectApply.js
new file mode 100644
index 0000000..3d03caa
--- /dev/null
+++ b/dashboard/node_modules/call-bind-apply-helpers/reflectApply.js
@@ -0,0 +1,4 @@
+'use strict';
+
+/** @type {import('./reflectApply')} */
+module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
diff --git a/dashboard/node_modules/call-bind-apply-helpers/test/index.js b/dashboard/node_modules/call-bind-apply-helpers/test/index.js
new file mode 100644
index 0000000..1cdc89e
--- /dev/null
+++ b/dashboard/node_modules/call-bind-apply-helpers/test/index.js
@@ -0,0 +1,63 @@
+'use strict';
+
+var callBind = require('../');
+var hasStrictMode = require('has-strict-mode')();
+var forEach = require('for-each');
+var inspect = require('object-inspect');
+var v = require('es-value-fixtures');
+
+var test = require('tape');
+
+test('callBindBasic', function (t) {
+ forEach(v.nonFunctions, function (nonFunction) {
+ t['throws'](
+ // @ts-expect-error
+ function () { callBind([nonFunction]); },
+ TypeError,
+ inspect(nonFunction) + ' is not a function'
+ );
+ });
+
+ var sentinel = { sentinel: true };
+ /** @type {(this: T, a: A, b: B) => [T | undefined, A, B]} */
+ var func = function (a, b) {
+ // eslint-disable-next-line no-invalid-this
+ return [!hasStrictMode && this === global ? undefined : this, a, b];
+ };
+ t.equal(func.length, 2, 'original function length is 2');
+
+ /** type {(thisArg: unknown, a: number, b: number) => [unknown, number, number]} */
+ var bound = callBind([func]);
+ /** type {((a: number, b: number) => [typeof sentinel, typeof a, typeof b])} */
+ var boundR = callBind([func, sentinel]);
+ /** type {((b: number) => [typeof sentinel, number, typeof b])} */
+ var boundArg = callBind([func, sentinel, /** @type {const} */ (1)]);
+
+ // @ts-expect-error
+ t.deepEqual(bound(), [undefined, undefined, undefined], 'bound func with no args');
+
+ // @ts-expect-error
+ t.deepEqual(func(), [undefined, undefined, undefined], 'unbound func with too few args');
+ // @ts-expect-error
+ t.deepEqual(bound(1, 2), [hasStrictMode ? 1 : Object(1), 2, undefined], 'bound func too few args');
+ // @ts-expect-error
+ t.deepEqual(boundR(), [sentinel, undefined, undefined], 'bound func with receiver, with too few args');
+ // @ts-expect-error
+ t.deepEqual(boundArg(), [sentinel, 1, undefined], 'bound func with receiver and arg, with too few args');
+
+ t.deepEqual(func(1, 2), [undefined, 1, 2], 'unbound func with right args');
+ t.deepEqual(bound(1, 2, 3), [hasStrictMode ? 1 : Object(1), 2, 3], 'bound func with right args');
+ t.deepEqual(boundR(1, 2), [sentinel, 1, 2], 'bound func with receiver, with right args');
+ t.deepEqual(boundArg(2), [sentinel, 1, 2], 'bound func with receiver and arg, with right arg');
+
+ // @ts-expect-error
+ t.deepEqual(func(1, 2, 3), [undefined, 1, 2], 'unbound func with too many args');
+ // @ts-expect-error
+ t.deepEqual(bound(1, 2, 3, 4), [hasStrictMode ? 1 : Object(1), 2, 3], 'bound func with too many args');
+ // @ts-expect-error
+ t.deepEqual(boundR(1, 2, 3), [sentinel, 1, 2], 'bound func with receiver, with too many args');
+ // @ts-expect-error
+ t.deepEqual(boundArg(2, 3), [sentinel, 1, 2], 'bound func with receiver and arg, with too many args');
+
+ t.end();
+});
diff --git a/dashboard/node_modules/call-bind-apply-helpers/tsconfig.json b/dashboard/node_modules/call-bind-apply-helpers/tsconfig.json
new file mode 100644
index 0000000..aef9993
--- /dev/null
+++ b/dashboard/node_modules/call-bind-apply-helpers/tsconfig.json
@@ -0,0 +1,9 @@
+{
+ "extends": "@ljharb/tsconfig",
+ "compilerOptions": {
+ "target": "es2021",
+ },
+ "exclude": [
+ "coverage",
+ ],
+}
\ No newline at end of file
diff --git a/dashboard/node_modules/call-bound/.eslintrc b/dashboard/node_modules/call-bound/.eslintrc
new file mode 100644
index 0000000..2612ed8
--- /dev/null
+++ b/dashboard/node_modules/call-bound/.eslintrc
@@ -0,0 +1,13 @@
+{
+ "root": true,
+
+ "extends": "@ljharb",
+
+ "rules": {
+ "new-cap": [2, {
+ "capIsNewExceptions": [
+ "GetIntrinsic",
+ ],
+ }],
+ },
+}
diff --git a/dashboard/node_modules/call-bound/.github/FUNDING.yml b/dashboard/node_modules/call-bound/.github/FUNDING.yml
new file mode 100644
index 0000000..2a2a135
--- /dev/null
+++ b/dashboard/node_modules/call-bound/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: [ljharb]
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: npm/call-bound
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/dashboard/node_modules/call-bound/.nycrc b/dashboard/node_modules/call-bound/.nycrc
new file mode 100644
index 0000000..bdd626c
--- /dev/null
+++ b/dashboard/node_modules/call-bound/.nycrc
@@ -0,0 +1,9 @@
+{
+ "all": true,
+ "check-coverage": false,
+ "reporter": ["text-summary", "text", "html", "json"],
+ "exclude": [
+ "coverage",
+ "test"
+ ]
+}
diff --git a/dashboard/node_modules/call-bound/CHANGELOG.md b/dashboard/node_modules/call-bound/CHANGELOG.md
new file mode 100644
index 0000000..8bde4e9
--- /dev/null
+++ b/dashboard/node_modules/call-bound/CHANGELOG.md
@@ -0,0 +1,42 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [v1.0.4](https://github.com/ljharb/call-bound/compare/v1.0.3...v1.0.4) - 2025-03-03
+
+### Commits
+
+- [types] improve types [`e648922`](https://github.com/ljharb/call-bound/commit/e6489222a9e54f350fbf952ceabe51fd8b6027ff)
+- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig`, `@types/tape`, `es-value-fixtures`, `for-each`, `has-strict-mode`, `object-inspect` [`a42a5eb`](https://github.com/ljharb/call-bound/commit/a42a5ebe6c1b54fcdc7997c7dc64fdca9e936719)
+- [Deps] update `call-bind-apply-helpers`, `get-intrinsic` [`f529eac`](https://github.com/ljharb/call-bound/commit/f529eac132404c17156bbc23ab2297a25d0f20b8)
+
+## [v1.0.3](https://github.com/ljharb/call-bound/compare/v1.0.2...v1.0.3) - 2024-12-15
+
+### Commits
+
+- [Refactor] use `call-bind-apply-helpers` instead of `call-bind` [`5e0b134`](https://github.com/ljharb/call-bound/commit/5e0b13496df14fb7d05dae9412f088da8d3f75be)
+- [Deps] update `get-intrinsic` [`41fc967`](https://github.com/ljharb/call-bound/commit/41fc96732a22c7b7e8f381f93ccc54bb6293be2e)
+- [readme] fix example [`79a0137`](https://github.com/ljharb/call-bound/commit/79a0137723f7c6d09c9c05452bbf8d5efb5d6e49)
+- [meta] add `sideEffects` flag [`08b07be`](https://github.com/ljharb/call-bound/commit/08b07be7f1c03f67dc6f3cdaf0906259771859f7)
+
+## [v1.0.2](https://github.com/ljharb/call-bound/compare/v1.0.1...v1.0.2) - 2024-12-10
+
+### Commits
+
+- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig`, `gopd` [`e6a5ffe`](https://github.com/ljharb/call-bound/commit/e6a5ffe849368fe4f74dfd6cdeca1b9baa39e8d5)
+- [Deps] update `call-bind`, `get-intrinsic` [`2aeb5b5`](https://github.com/ljharb/call-bound/commit/2aeb5b521dc2b2683d1345c753ea1161de2d1c14)
+- [types] improve return type [`1a0c9fe`](https://github.com/ljharb/call-bound/commit/1a0c9fe3114471e7ca1f57d104e2efe713bb4871)
+
+## v1.0.1 - 2024-12-05
+
+### Commits
+
+- Initial implementation, tests, readme, types [`6d94121`](https://github.com/ljharb/call-bound/commit/6d94121a9243602e506334069f7a03189fe3363d)
+- Initial commit [`0eae867`](https://github.com/ljharb/call-bound/commit/0eae867334ea025c33e6e91cdecfc9df96680cf9)
+- npm init [`71b2479`](https://github.com/ljharb/call-bound/commit/71b2479c6723e0b7d91a6b663613067e98b7b275)
+- Only apps should have lockfiles [`c3754a9`](https://github.com/ljharb/call-bound/commit/c3754a949b7f9132b47e2d18c1729889736741eb)
+- [actions] skip `npm ls` in node < 10 [`74275a5`](https://github.com/ljharb/call-bound/commit/74275a5186b8caf6309b6b97472bdcb0df4683a8)
+- [Dev Deps] add missing peer dep [`1354de8`](https://github.com/ljharb/call-bound/commit/1354de8679413e4ae9c523d85f76fa7a5e032d97)
diff --git a/dashboard/node_modules/call-bound/LICENSE b/dashboard/node_modules/call-bound/LICENSE
new file mode 100644
index 0000000..f82f389
--- /dev/null
+++ b/dashboard/node_modules/call-bound/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2024 Jordan Harband
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/dashboard/node_modules/call-bound/README.md b/dashboard/node_modules/call-bound/README.md
new file mode 100644
index 0000000..a44e43e
--- /dev/null
+++ b/dashboard/node_modules/call-bound/README.md
@@ -0,0 +1,53 @@
+# call-bound [![Version Badge][npm-version-svg]][package-url]
+
+[![github actions][actions-image]][actions-url]
+[![coverage][codecov-image]][codecov-url]
+[![dependency status][deps-svg]][deps-url]
+[![dev dependency status][dev-deps-svg]][dev-deps-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+
+[![npm badge][npm-badge-png]][package-url]
+
+Robust call-bound JavaScript intrinsics, using `call-bind` and `get-intrinsic`.
+
+## Getting started
+
+```sh
+npm install --save call-bound
+```
+
+## Usage/Examples
+
+```js
+const assert = require('assert');
+const callBound = require('call-bound');
+
+const slice = callBound('Array.prototype.slice');
+
+delete Function.prototype.call;
+delete Function.prototype.bind;
+delete Array.prototype.slice;
+
+assert.deepEqual(slice([1, 2, 3, 4], 1, -1), [2, 3]);
+```
+
+## Tests
+
+Clone the repo, `npm install`, and run `npm test`
+
+[package-url]: https://npmjs.org/package/call-bound
+[npm-version-svg]: https://versionbadg.es/ljharb/call-bound.svg
+[deps-svg]: https://david-dm.org/ljharb/call-bound.svg
+[deps-url]: https://david-dm.org/ljharb/call-bound
+[dev-deps-svg]: https://david-dm.org/ljharb/call-bound/dev-status.svg
+[dev-deps-url]: https://david-dm.org/ljharb/call-bound#info=devDependencies
+[npm-badge-png]: https://nodei.co/npm/call-bound.png?downloads=true&stars=true
+[license-image]: https://img.shields.io/npm/l/call-bound.svg
+[license-url]: LICENSE
+[downloads-image]: https://img.shields.io/npm/dm/call-bound.svg
+[downloads-url]: https://npm-stat.com/charts.html?package=call-bound
+[codecov-image]: https://codecov.io/gh/ljharb/call-bound/branch/main/graphs/badge.svg
+[codecov-url]: https://app.codecov.io/gh/ljharb/call-bound/
+[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/call-bound
+[actions-url]: https://github.com/ljharb/call-bound/actions
diff --git a/dashboard/node_modules/call-bound/index.d.ts b/dashboard/node_modules/call-bound/index.d.ts
new file mode 100644
index 0000000..5562f00
--- /dev/null
+++ b/dashboard/node_modules/call-bound/index.d.ts
@@ -0,0 +1,94 @@
+type Intrinsic = typeof globalThis;
+
+type IntrinsicName = keyof Intrinsic | `%${keyof Intrinsic}%`;
+
+type IntrinsicPath = IntrinsicName | `${StripPercents}.${string}` | `%${StripPercents}.${string}%`;
+
+type AllowMissing = boolean;
+
+type StripPercents = T extends `%${infer U}%` ? U : T;
+
+type BindMethodPrecise =
+ F extends (this: infer This, ...args: infer Args) => infer R
+ ? (obj: This, ...args: Args) => R
+ : F extends {
+ (this: infer This1, ...args: infer Args1): infer R1;
+ (this: infer This2, ...args: infer Args2): infer R2
+ }
+ ? {
+ (obj: This1, ...args: Args1): R1;
+ (obj: This2, ...args: Args2): R2
+ }
+ : never
+
+// Extract method type from a prototype
+type GetPrototypeMethod =
+ (typeof globalThis)[T] extends { prototype: any }
+ ? M extends keyof (typeof globalThis)[T]['prototype']
+ ? (typeof globalThis)[T]['prototype'][M]
+ : never
+ : never
+
+// Get static property/method
+type GetStaticMember =
+ P extends keyof (typeof globalThis)[T] ? (typeof globalThis)[T][P] : never
+
+// Type that maps string path to actual bound function or value with better precision
+type BoundIntrinsic =
+ S extends `${infer Obj}.prototype.${infer Method}`
+ ? Obj extends keyof typeof globalThis
+ ? BindMethodPrecise>
+ : unknown
+ : S extends `${infer Obj}.${infer Prop}`
+ ? Obj extends keyof typeof globalThis
+ ? GetStaticMember
+ : unknown
+ : unknown
+
+declare function arraySlice(array: readonly T[], start?: number, end?: number): T[];
+declare function arraySlice(array: ArrayLike, start?: number, end?: number): T[];
+declare function arraySlice(array: IArguments, start?: number, end?: number): T[];
+
+// Special cases for methods that need explicit typing
+interface SpecialCases {
+ '%Object.prototype.isPrototypeOf%': (thisArg: {}, obj: unknown) => boolean;
+ '%String.prototype.replace%': {
+ (str: string, searchValue: string | RegExp, replaceValue: string): string;
+ (str: string, searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string
+ };
+ '%Object.prototype.toString%': (obj: {}) => string;
+ '%Object.prototype.hasOwnProperty%': (obj: {}, v: PropertyKey) => boolean;
+ '%Array.prototype.slice%': typeof arraySlice;
+ '%Array.prototype.map%': (array: readonly T[], callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any) => U[];
+ '%Array.prototype.filter%': (array: readonly T[], predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any) => T[];
+ '%Array.prototype.indexOf%': (array: readonly T[], searchElement: T, fromIndex?: number) => number;
+ '%Function.prototype.apply%': (fn: (...args: A) => R, thisArg: any, args: A) => R;
+ '%Function.prototype.call%': (fn: (...args: A) => R, thisArg: any, ...args: A) => R;
+ '%Function.prototype.bind%': (fn: (...args: A) => R, thisArg: any, ...args: A) => (...remainingArgs: A) => R;
+ '%Promise.prototype.then%': {
+ (promise: Promise, onfulfilled: (value: T) => R | PromiseLike): Promise;
+ (promise: Promise, onfulfilled: ((value: T) => R | PromiseLike) | undefined | null, onrejected: (reason: any) => R | PromiseLike): Promise;
+ };
+ '%RegExp.prototype.test%': (regexp: RegExp, str: string) => boolean;
+ '%RegExp.prototype.exec%': (regexp: RegExp, str: string) => RegExpExecArray | null;
+ '%Error.prototype.toString%': (error: Error) => string;
+ '%TypeError.prototype.toString%': (error: TypeError) => string;
+ '%String.prototype.split%': (
+ obj: unknown,
+ splitter: string | RegExp | {
+ [Symbol.split](string: string, limit?: number): string[];
+ },
+ limit?: number | undefined
+ ) => string[];
+}
+
+/**
+ * Returns a bound function for a prototype method, or a value for a static property.
+ *
+ * @param name - The name of the intrinsic (e.g. 'Array.prototype.slice')
+ * @param {AllowMissing} [allowMissing] - Whether to allow missing intrinsics (default: false)
+ */
+declare function callBound, S extends IntrinsicPath>(name: K, allowMissing?: AllowMissing): SpecialCases[`%${StripPercents}%`];
+declare function callBound, S extends IntrinsicPath>(name: S, allowMissing?: AllowMissing): BoundIntrinsic;
+
+export = callBound;
diff --git a/dashboard/node_modules/call-bound/index.js b/dashboard/node_modules/call-bound/index.js
new file mode 100644
index 0000000..e9ade74
--- /dev/null
+++ b/dashboard/node_modules/call-bound/index.js
@@ -0,0 +1,19 @@
+'use strict';
+
+var GetIntrinsic = require('get-intrinsic');
+
+var callBindBasic = require('call-bind-apply-helpers');
+
+/** @type {(thisArg: string, searchString: string, position?: number) => number} */
+var $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]);
+
+/** @type {import('.')} */
+module.exports = function callBoundIntrinsic(name, allowMissing) {
+ /* eslint no-extra-parens: 0 */
+
+ var intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (GetIntrinsic(name, !!allowMissing));
+ if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
+ return callBindBasic(/** @type {const} */ ([intrinsic]));
+ }
+ return intrinsic;
+};
diff --git a/dashboard/node_modules/call-bound/package.json b/dashboard/node_modules/call-bound/package.json
new file mode 100644
index 0000000..d542db4
--- /dev/null
+++ b/dashboard/node_modules/call-bound/package.json
@@ -0,0 +1,99 @@
+{
+ "name": "call-bound",
+ "version": "1.0.4",
+ "description": "Robust call-bound JavaScript intrinsics, using `call-bind` and `get-intrinsic`.",
+ "main": "index.js",
+ "exports": {
+ ".": "./index.js",
+ "./package.json": "./package.json"
+ },
+ "sideEffects": false,
+ "scripts": {
+ "prepack": "npmignore --auto --commentLines=auto",
+ "prepublish": "not-in-publish || npm run prepublishOnly",
+ "prepublishOnly": "safe-publish-latest",
+ "prelint": "evalmd README.md",
+ "lint": "eslint --ext=.js,.mjs .",
+ "postlint": "tsc -p . && attw -P",
+ "pretest": "npm run lint",
+ "tests-only": "nyc tape 'test/**/*.js'",
+ "test": "npm run tests-only",
+ "posttest": "npx npm@'>=10.2' audit --production",
+ "version": "auto-changelog && git add CHANGELOG.md",
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/ljharb/call-bound.git"
+ },
+ "keywords": [
+ "javascript",
+ "ecmascript",
+ "es",
+ "js",
+ "callbind",
+ "callbound",
+ "call",
+ "bind",
+ "bound",
+ "call-bind",
+ "call-bound",
+ "function",
+ "es-abstract"
+ ],
+ "author": "Jordan Harband ",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/ljharb/call-bound/issues"
+ },
+ "homepage": "https://github.com/ljharb/call-bound#readme",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "get-intrinsic": "^1.3.0"
+ },
+ "devDependencies": {
+ "@arethetypeswrong/cli": "^0.17.4",
+ "@ljharb/eslint-config": "^21.1.1",
+ "@ljharb/tsconfig": "^0.3.0",
+ "@types/call-bind": "^1.0.5",
+ "@types/get-intrinsic": "^1.2.3",
+ "@types/tape": "^5.8.1",
+ "auto-changelog": "^2.5.0",
+ "encoding": "^0.1.13",
+ "es-value-fixtures": "^1.7.1",
+ "eslint": "=8.8.0",
+ "evalmd": "^0.0.19",
+ "for-each": "^0.3.5",
+ "gopd": "^1.2.0",
+ "has-strict-mode": "^1.1.0",
+ "in-publish": "^2.0.1",
+ "npmignore": "^0.3.1",
+ "nyc": "^10.3.2",
+ "object-inspect": "^1.13.4",
+ "safe-publish-latest": "^2.0.0",
+ "tape": "^5.9.0",
+ "typescript": "next"
+ },
+ "testling": {
+ "files": "test/index.js"
+ },
+ "auto-changelog": {
+ "output": "CHANGELOG.md",
+ "template": "keepachangelog",
+ "unreleased": false,
+ "commitLimit": false,
+ "backfillLimit": false,
+ "hideCredit": true
+ },
+ "publishConfig": {
+ "ignore": [
+ ".github/workflows"
+ ]
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+}
diff --git a/dashboard/node_modules/call-bound/test/index.js b/dashboard/node_modules/call-bound/test/index.js
new file mode 100644
index 0000000..a2fc9f0
--- /dev/null
+++ b/dashboard/node_modules/call-bound/test/index.js
@@ -0,0 +1,61 @@
+'use strict';
+
+var test = require('tape');
+
+var callBound = require('../');
+
+/** @template {true} T @template U @typedef {T extends U ? T : never} AssertType */
+
+test('callBound', function (t) {
+ // static primitive
+ t.equal(callBound('Array.length'), Array.length, 'Array.length yields itself');
+ t.equal(callBound('%Array.length%'), Array.length, '%Array.length% yields itself');
+
+ // static non-function object
+ t.equal(callBound('Array.prototype'), Array.prototype, 'Array.prototype yields itself');
+ t.equal(callBound('%Array.prototype%'), Array.prototype, '%Array.prototype% yields itself');
+ t.equal(callBound('Array.constructor'), Array.constructor, 'Array.constructor yields itself');
+ t.equal(callBound('%Array.constructor%'), Array.constructor, '%Array.constructor% yields itself');
+
+ // static function
+ t.equal(callBound('Date.parse'), Date.parse, 'Date.parse yields itself');
+ t.equal(callBound('%Date.parse%'), Date.parse, '%Date.parse% yields itself');
+
+ // prototype primitive
+ t.equal(callBound('Error.prototype.message'), Error.prototype.message, 'Error.prototype.message yields itself');
+ t.equal(callBound('%Error.prototype.message%'), Error.prototype.message, '%Error.prototype.message% yields itself');
+
+ var x = callBound('Object.prototype.toString');
+ var y = callBound('%Object.prototype.toString%');
+
+ // prototype function
+ t.notEqual(x, Object.prototype.toString, 'Object.prototype.toString does not yield itself');
+ t.notEqual(y, Object.prototype.toString, '%Object.prototype.toString% does not yield itself');
+ t.equal(x(true), Object.prototype.toString.call(true), 'call-bound Object.prototype.toString calls into the original');
+ t.equal(y(true), Object.prototype.toString.call(true), 'call-bound %Object.prototype.toString% calls into the original');
+
+ t['throws'](
+ // @ts-expect-error
+ function () { callBound('does not exist'); },
+ SyntaxError,
+ 'nonexistent intrinsic throws'
+ );
+ t['throws'](
+ // @ts-expect-error
+ function () { callBound('does not exist', true); },
+ SyntaxError,
+ 'allowMissing arg still throws for unknown intrinsic'
+ );
+
+ t.test('real but absent intrinsic', { skip: typeof WeakRef !== 'undefined' }, function (st) {
+ st['throws'](
+ function () { callBound('WeakRef'); },
+ TypeError,
+ 'real but absent intrinsic throws'
+ );
+ st.equal(callBound('WeakRef', true), undefined, 'allowMissing arg avoids exception');
+ st.end();
+ });
+
+ t.end();
+});
diff --git a/dashboard/node_modules/call-bound/tsconfig.json b/dashboard/node_modules/call-bound/tsconfig.json
new file mode 100644
index 0000000..8976d98
--- /dev/null
+++ b/dashboard/node_modules/call-bound/tsconfig.json
@@ -0,0 +1,10 @@
+{
+ "extends": "@ljharb/tsconfig",
+ "compilerOptions": {
+ "target": "ESNext",
+ "lib": ["es2024"],
+ },
+ "exclude": [
+ "coverage",
+ ],
+}
diff --git a/dashboard/node_modules/chokidar/LICENSE b/dashboard/node_modules/chokidar/LICENSE
new file mode 100644
index 0000000..fa9162b
--- /dev/null
+++ b/dashboard/node_modules/chokidar/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the “Software”), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/dashboard/node_modules/chokidar/README.md b/dashboard/node_modules/chokidar/README.md
new file mode 100644
index 0000000..8e25dec
--- /dev/null
+++ b/dashboard/node_modules/chokidar/README.md
@@ -0,0 +1,308 @@
+# Chokidar [](https://github.com/paulmillr/chokidar) [](https://github.com/paulmillr/chokidar)
+
+> Minimal and efficient cross-platform file watching library
+
+[](https://www.npmjs.com/package/chokidar)
+
+## Why?
+
+Node.js `fs.watch`:
+
+* Doesn't report filenames on MacOS.
+* Doesn't report events at all when using editors like Sublime on MacOS.
+* Often reports events twice.
+* Emits most changes as `rename`.
+* Does not provide an easy way to recursively watch file trees.
+* Does not support recursive watching on Linux.
+
+Node.js `fs.watchFile`:
+
+* Almost as bad at event handling.
+* Also does not provide any recursive watching.
+* Results in high CPU utilization.
+
+Chokidar resolves these problems.
+
+Initially made for **[Brunch](https://brunch.io/)** (an ultra-swift web app build tool), it is now used in
+[Microsoft's Visual Studio Code](https://github.com/microsoft/vscode),
+[gulp](https://github.com/gulpjs/gulp/),
+[karma](https://karma-runner.github.io/),
+[PM2](https://github.com/Unitech/PM2),
+[browserify](http://browserify.org/),
+[webpack](https://webpack.github.io/),
+[BrowserSync](https://www.browsersync.io/),
+and [many others](https://www.npmjs.com/browse/depended/chokidar).
+It has proven itself in production environments.
+
+Version 3 is out! Check out our blog post about it: [Chokidar 3: How to save 32TB of traffic every week](https://paulmillr.com/posts/chokidar-3-save-32tb-of-traffic/)
+
+## How?
+
+Chokidar does still rely on the Node.js core `fs` module, but when using
+`fs.watch` and `fs.watchFile` for watching, it normalizes the events it
+receives, often checking for truth by getting file stats and/or dir contents.
+
+On MacOS, chokidar by default uses a native extension exposing the Darwin
+`FSEvents` API. This provides very efficient recursive watching compared with
+implementations like `kqueue` available on most \*nix platforms. Chokidar still
+does have to do some work to normalize the events received that way as well.
+
+On most other platforms, the `fs.watch`-based implementation is the default, which
+avoids polling and keeps CPU usage down. Be advised that chokidar will initiate
+watchers recursively for everything within scope of the paths that have been
+specified, so be judicious about not wasting system resources by watching much
+more than needed.
+
+## Getting started
+
+Install with npm:
+
+```sh
+npm install chokidar
+```
+
+Then `require` and use it in your code:
+
+```javascript
+const chokidar = require('chokidar');
+
+// One-liner for current directory
+chokidar.watch('.').on('all', (event, path) => {
+ console.log(event, path);
+});
+```
+
+## API
+
+```javascript
+// Example of a more typical implementation structure
+
+// Initialize watcher.
+const watcher = chokidar.watch('file, dir, glob, or array', {
+ ignored: /(^|[\/\\])\../, // ignore dotfiles
+ persistent: true
+});
+
+// Something to use when events are received.
+const log = console.log.bind(console);
+// Add event listeners.
+watcher
+ .on('add', path => log(`File ${path} has been added`))
+ .on('change', path => log(`File ${path} has been changed`))
+ .on('unlink', path => log(`File ${path} has been removed`));
+
+// More possible events.
+watcher
+ .on('addDir', path => log(`Directory ${path} has been added`))
+ .on('unlinkDir', path => log(`Directory ${path} has been removed`))
+ .on('error', error => log(`Watcher error: ${error}`))
+ .on('ready', () => log('Initial scan complete. Ready for changes'))
+ .on('raw', (event, path, details) => { // internal
+ log('Raw event info:', event, path, details);
+ });
+
+// 'add', 'addDir' and 'change' events also receive stat() results as second
+// argument when available: https://nodejs.org/api/fs.html#fs_class_fs_stats
+watcher.on('change', (path, stats) => {
+ if (stats) console.log(`File ${path} changed size to ${stats.size}`);
+});
+
+// Watch new files.
+watcher.add('new-file');
+watcher.add(['new-file-2', 'new-file-3', '**/other-file*']);
+
+// Get list of actual paths being watched on the filesystem
+var watchedPaths = watcher.getWatched();
+
+// Un-watch some files.
+await watcher.unwatch('new-file*');
+
+// Stop watching.
+// The method is async!
+watcher.close().then(() => console.log('closed'));
+
+// Full list of options. See below for descriptions.
+// Do not use this example!
+chokidar.watch('file', {
+ persistent: true,
+
+ ignored: '*.txt',
+ ignoreInitial: false,
+ followSymlinks: true,
+ cwd: '.',
+ disableGlobbing: false,
+
+ usePolling: false,
+ interval: 100,
+ binaryInterval: 300,
+ alwaysStat: false,
+ depth: 99,
+ awaitWriteFinish: {
+ stabilityThreshold: 2000,
+ pollInterval: 100
+ },
+
+ ignorePermissionErrors: false,
+ atomic: true // or a custom 'atomicity delay', in milliseconds (default 100)
+});
+
+```
+
+`chokidar.watch(paths, [options])`
+
+* `paths` (string or array of strings). Paths to files, dirs to be watched
+recursively, or glob patterns.
+ - Note: globs must not contain windows separators (`\`),
+ because that's how they work by the standard —
+ you'll need to replace them with forward slashes (`/`).
+ - Note 2: for additional glob documentation, check out low-level
+ library: [picomatch](https://github.com/micromatch/picomatch).
+* `options` (object) Options object as defined below:
+
+#### Persistence
+
+* `persistent` (default: `true`). Indicates whether the process
+should continue to run as long as files are being watched. If set to
+`false` when using `fsevents` to watch, no more events will be emitted
+after `ready`, even if the process continues to run.
+
+#### Path filtering
+
+* `ignored` ([anymatch](https://github.com/es128/anymatch)-compatible definition)
+Defines files/paths to be ignored. The whole relative or absolute path is
+tested, not just filename. If a function with two arguments is provided, it
+gets called twice per path - once with a single argument (the path), second
+time with two arguments (the path and the
+[`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats)
+object of that path).
+* `ignoreInitial` (default: `false`). If set to `false` then `add`/`addDir` events are also emitted for matching paths while
+instantiating the watching as chokidar discovers these file paths (before the `ready` event).
+* `followSymlinks` (default: `true`). When `false`, only the
+symlinks themselves will be watched for changes instead of following
+the link references and bubbling events through the link's path.
+* `cwd` (no default). The base directory from which watch `paths` are to be
+derived. Paths emitted with events will be relative to this.
+* `disableGlobbing` (default: `false`). If set to `true` then the strings passed to `.watch()` and `.add()` are treated as
+literal path names, even if they look like globs.
+
+#### Performance
+
+* `usePolling` (default: `false`).
+Whether to use fs.watchFile (backed by polling), or fs.watch. If polling
+leads to high CPU utilization, consider setting this to `false`. It is
+typically necessary to **set this to `true` to successfully watch files over
+a network**, and it may be necessary to successfully watch files in other
+non-standard situations. Setting to `true` explicitly on MacOS overrides the
+`useFsEvents` default. You may also set the CHOKIDAR_USEPOLLING env variable
+to true (1) or false (0) in order to override this option.
+* _Polling-specific settings_ (effective when `usePolling: true`)
+ * `interval` (default: `100`). Interval of file system polling, in milliseconds. You may also
+ set the CHOKIDAR_INTERVAL env variable to override this option.
+ * `binaryInterval` (default: `300`). Interval of file system
+ polling for binary files.
+ ([see list of binary extensions](https://github.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json))
+* `useFsEvents` (default: `true` on MacOS). Whether to use the
+`fsevents` watching interface if available. When set to `true` explicitly
+and `fsevents` is available this supercedes the `usePolling` setting. When
+set to `false` on MacOS, `usePolling: true` becomes the default.
+* `alwaysStat` (default: `false`). If relying upon the
+[`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats)
+object that may get passed with `add`, `addDir`, and `change` events, set
+this to `true` to ensure it is provided even in cases where it wasn't
+already available from the underlying watch events.
+* `depth` (default: `undefined`). If set, limits how many levels of
+subdirectories will be traversed.
+* `awaitWriteFinish` (default: `false`).
+By default, the `add` event will fire when a file first appears on disk, before
+the entire file has been written. Furthermore, in some cases some `change`
+events will be emitted while the file is being written. In some cases,
+especially when watching for large files there will be a need to wait for the
+write operation to finish before responding to a file creation or modification.
+Setting `awaitWriteFinish` to `true` (or a truthy value) will poll file size,
+holding its `add` and `change` events until the size does not change for a
+configurable amount of time. The appropriate duration setting is heavily
+dependent on the OS and hardware. For accurate detection this parameter should
+be relatively high, making file watching much less responsive.
+Use with caution.
+ * *`options.awaitWriteFinish` can be set to an object in order to adjust
+ timing params:*
+ * `awaitWriteFinish.stabilityThreshold` (default: 2000). Amount of time in
+ milliseconds for a file size to remain constant before emitting its event.
+ * `awaitWriteFinish.pollInterval` (default: 100). File size polling interval, in milliseconds.
+
+#### Errors
+
+* `ignorePermissionErrors` (default: `false`). Indicates whether to watch files
+that don't have read permissions if possible. If watching fails due to `EPERM`
+or `EACCES` with this set to `true`, the errors will be suppressed silently.
+* `atomic` (default: `true` if `useFsEvents` and `usePolling` are `false`).
+Automatically filters out artifacts that occur when using editors that use
+"atomic writes" instead of writing directly to the source file. If a file is
+re-added within 100 ms of being deleted, Chokidar emits a `change` event
+rather than `unlink` then `add`. If the default of 100 ms does not work well
+for you, you can override it by setting `atomic` to a custom value, in
+milliseconds.
+
+### Methods & Events
+
+`chokidar.watch()` produces an instance of `FSWatcher`. Methods of `FSWatcher`:
+
+* `.add(path / paths)`: Add files, directories, or glob patterns for tracking.
+Takes an array of strings or just one string.
+* `.on(event, callback)`: Listen for an FS event.
+Available events: `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `ready`,
+`raw`, `error`.
+Additionally `all` is available which gets emitted with the underlying event
+name and path for every event other than `ready`, `raw`, and `error`. `raw` is internal, use it carefully.
+* `.unwatch(path / paths)`: Stop watching files, directories, or glob patterns.
+Takes an array of strings or just one string.
+* `.close()`: **async** Removes all listeners from watched files. Asynchronous, returns Promise. Use with `await` to ensure bugs don't happen.
+* `.getWatched()`: Returns an object representing all the paths on the file
+system being watched by this `FSWatcher` instance. The object's keys are all the
+directories (using absolute paths unless the `cwd` option was used), and the
+values are arrays of the names of the items contained in each directory.
+
+## CLI
+
+If you need a CLI interface for your file watching, check out
+[chokidar-cli](https://github.com/open-cli-tools/chokidar-cli), allowing you to
+execute a command on each change, or get a stdio stream of change events.
+
+## Install Troubleshooting
+
+* `npm WARN optional dep failed, continuing fsevents@n.n.n`
+ * This message is normal part of how `npm` handles optional dependencies and is
+ not indicative of a problem. Even if accompanied by other related error messages,
+ Chokidar should function properly.
+
+* `TypeError: fsevents is not a constructor`
+ * Update chokidar by doing `rm -rf node_modules package-lock.json yarn.lock && npm install`, or update your dependency that uses chokidar.
+
+* Chokidar is producing `ENOSP` error on Linux, like this:
+ * `bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell`
+ `Error: watch /home/ ENOSPC`
+ * This means Chokidar ran out of file handles and you'll need to increase their count by executing the following command in Terminal:
+ `echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p`
+
+## Changelog
+
+For more detailed changelog, see [`full_changelog.md`](.github/full_changelog.md).
+- **v3.5 (Jan 6, 2021):** Support for ARM Macs with Apple Silicon. Fixes for deleted symlinks.
+- **v3.4 (Apr 26, 2020):** Support for directory-based symlinks. Fixes for macos file replacement.
+- **v3.3 (Nov 2, 2019):** `FSWatcher#close()` method became async. That fixes IO race conditions related to close method.
+- **v3.2 (Oct 1, 2019):** Improve Linux RAM usage by 50%. Race condition fixes. Windows glob fixes. Improve stability by using tight range of dependency versions.
+- **v3.1 (Sep 16, 2019):** dotfiles are no longer filtered out by default. Use `ignored` option if needed. Improve initial Linux scan time by 50%.
+- **v3 (Apr 30, 2019):** massive CPU & RAM consumption improvements; reduces deps / package size by a factor of 17x and bumps Node.js requirement to v8.16 and higher.
+- **v2 (Dec 29, 2017):** Globs are now posix-style-only; without windows support. Tons of bugfixes.
+- **v1 (Apr 7, 2015):** Glob support, symlink support, tons of bugfixes. Node 0.8+ is supported
+- **v0.1 (Apr 20, 2012):** Initial release, extracted from [Brunch](https://github.com/brunch/brunch/blob/9847a065aea300da99bd0753f90354cde9de1261/src/helpers.coffee#L66)
+
+## Also
+
+Why was chokidar named this way? What's the meaning behind it?
+
+>Chowkidar is a transliteration of a Hindi word meaning 'watchman, gatekeeper', चौकीदार. This ultimately comes from Sanskrit _ चतुष्क_ (crossway, quadrangle, consisting-of-four). This word is also used in other languages like Urdu as (چوکیدار) which is widely used in Pakistan and India.
+
+## License
+
+MIT (c) Paul Miller (), see [LICENSE](LICENSE) file.
diff --git a/dashboard/node_modules/chokidar/index.js b/dashboard/node_modules/chokidar/index.js
new file mode 100644
index 0000000..8752893
--- /dev/null
+++ b/dashboard/node_modules/chokidar/index.js
@@ -0,0 +1,973 @@
+'use strict';
+
+const { EventEmitter } = require('events');
+const fs = require('fs');
+const sysPath = require('path');
+const { promisify } = require('util');
+const readdirp = require('readdirp');
+const anymatch = require('anymatch').default;
+const globParent = require('glob-parent');
+const isGlob = require('is-glob');
+const braces = require('braces');
+const normalizePath = require('normalize-path');
+
+const NodeFsHandler = require('./lib/nodefs-handler');
+const FsEventsHandler = require('./lib/fsevents-handler');
+const {
+ EV_ALL,
+ EV_READY,
+ EV_ADD,
+ EV_CHANGE,
+ EV_UNLINK,
+ EV_ADD_DIR,
+ EV_UNLINK_DIR,
+ EV_RAW,
+ EV_ERROR,
+
+ STR_CLOSE,
+ STR_END,
+
+ BACK_SLASH_RE,
+ DOUBLE_SLASH_RE,
+ SLASH_OR_BACK_SLASH_RE,
+ DOT_RE,
+ REPLACER_RE,
+
+ SLASH,
+ SLASH_SLASH,
+ BRACE_START,
+ BANG,
+ ONE_DOT,
+ TWO_DOTS,
+ GLOBSTAR,
+ SLASH_GLOBSTAR,
+ ANYMATCH_OPTS,
+ STRING_TYPE,
+ FUNCTION_TYPE,
+ EMPTY_STR,
+ EMPTY_FN,
+
+ isWindows,
+ isMacos,
+ isIBMi
+} = require('./lib/constants');
+
+const stat = promisify(fs.stat);
+const readdir = promisify(fs.readdir);
+
+/**
+ * @typedef {String} Path
+ * @typedef {'all'|'add'|'addDir'|'change'|'unlink'|'unlinkDir'|'raw'|'error'|'ready'} EventName
+ * @typedef {'readdir'|'watch'|'add'|'remove'|'change'} ThrottleType
+ */
+
+/**
+ *
+ * @typedef {Object} WatchHelpers
+ * @property {Boolean} followSymlinks
+ * @property {'stat'|'lstat'} statMethod
+ * @property {Path} path
+ * @property {Path} watchPath
+ * @property {Function} entryPath
+ * @property {Boolean} hasGlob
+ * @property {Object} globFilter
+ * @property {Function} filterPath
+ * @property {Function} filterDir
+ */
+
+const arrify = (value = []) => Array.isArray(value) ? value : [value];
+const flatten = (list, result = []) => {
+ list.forEach(item => {
+ if (Array.isArray(item)) {
+ flatten(item, result);
+ } else {
+ result.push(item);
+ }
+ });
+ return result;
+};
+
+const unifyPaths = (paths_) => {
+ /**
+ * @type {Array}
+ */
+ const paths = flatten(arrify(paths_));
+ if (!paths.every(p => typeof p === STRING_TYPE)) {
+ throw new TypeError(`Non-string provided as watch path: ${paths}`);
+ }
+ return paths.map(normalizePathToUnix);
+};
+
+// If SLASH_SLASH occurs at the beginning of path, it is not replaced
+// because "//StoragePC/DrivePool/Movies" is a valid network path
+const toUnix = (string) => {
+ let str = string.replace(BACK_SLASH_RE, SLASH);
+ let prepend = false;
+ if (str.startsWith(SLASH_SLASH)) {
+ prepend = true;
+ }
+ while (str.match(DOUBLE_SLASH_RE)) {
+ str = str.replace(DOUBLE_SLASH_RE, SLASH);
+ }
+ if (prepend) {
+ str = SLASH + str;
+ }
+ return str;
+};
+
+// Our version of upath.normalize
+// TODO: this is not equal to path-normalize module - investigate why
+const normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path)));
+
+const normalizeIgnored = (cwd = EMPTY_STR) => (path) => {
+ if (typeof path !== STRING_TYPE) return path;
+ return normalizePathToUnix(sysPath.isAbsolute(path) ? path : sysPath.join(cwd, path));
+};
+
+const getAbsolutePath = (path, cwd) => {
+ if (sysPath.isAbsolute(path)) {
+ return path;
+ }
+ if (path.startsWith(BANG)) {
+ return BANG + sysPath.join(cwd, path.slice(1));
+ }
+ return sysPath.join(cwd, path);
+};
+
+const undef = (opts, key) => opts[key] === undefined;
+
+/**
+ * Directory entry.
+ * @property {Path} path
+ * @property {Set} items
+ */
+class DirEntry {
+ /**
+ * @param {Path} dir
+ * @param {Function} removeWatcher
+ */
+ constructor(dir, removeWatcher) {
+ this.path = dir;
+ this._removeWatcher = removeWatcher;
+ /** @type {Set} */
+ this.items = new Set();
+ }
+
+ add(item) {
+ const {items} = this;
+ if (!items) return;
+ if (item !== ONE_DOT && item !== TWO_DOTS) items.add(item);
+ }
+
+ async remove(item) {
+ const {items} = this;
+ if (!items) return;
+ items.delete(item);
+ if (items.size > 0) return;
+
+ const dir = this.path;
+ try {
+ await readdir(dir);
+ } catch (err) {
+ if (this._removeWatcher) {
+ this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir));
+ }
+ }
+ }
+
+ has(item) {
+ const {items} = this;
+ if (!items) return;
+ return items.has(item);
+ }
+
+ /**
+ * @returns {Array}
+ */
+ getChildren() {
+ const {items} = this;
+ if (!items) return;
+ return [...items.values()];
+ }
+
+ dispose() {
+ this.items.clear();
+ delete this.path;
+ delete this._removeWatcher;
+ delete this.items;
+ Object.freeze(this);
+ }
+}
+
+const STAT_METHOD_F = 'stat';
+const STAT_METHOD_L = 'lstat';
+class WatchHelper {
+ constructor(path, watchPath, follow, fsw) {
+ this.fsw = fsw;
+ this.path = path = path.replace(REPLACER_RE, EMPTY_STR);
+ this.watchPath = watchPath;
+ this.fullWatchPath = sysPath.resolve(watchPath);
+ this.hasGlob = watchPath !== path;
+ /** @type {object|boolean} */
+ if (path === EMPTY_STR) this.hasGlob = false;
+ this.globSymlink = this.hasGlob && follow ? undefined : false;
+ this.globFilter = this.hasGlob ? anymatch(path, undefined, ANYMATCH_OPTS) : false;
+ this.dirParts = this.getDirParts(path);
+ this.dirParts.forEach((parts) => {
+ if (parts.length > 1) parts.pop();
+ });
+ this.followSymlinks = follow;
+ this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
+ }
+
+ checkGlobSymlink(entry) {
+ // only need to resolve once
+ // first entry should always have entry.parentDir === EMPTY_STR
+ if (this.globSymlink === undefined) {
+ this.globSymlink = entry.fullParentDir === this.fullWatchPath ?
+ false : {realPath: entry.fullParentDir, linkPath: this.fullWatchPath};
+ }
+
+ if (this.globSymlink) {
+ return entry.fullPath.replace(this.globSymlink.realPath, this.globSymlink.linkPath);
+ }
+
+ return entry.fullPath;
+ }
+
+ entryPath(entry) {
+ return sysPath.join(this.watchPath,
+ sysPath.relative(this.watchPath, this.checkGlobSymlink(entry))
+ );
+ }
+
+ filterPath(entry) {
+ const {stats} = entry;
+ if (stats && stats.isSymbolicLink()) return this.filterDir(entry);
+ const resolvedPath = this.entryPath(entry);
+ const matchesGlob = this.hasGlob && typeof this.globFilter === FUNCTION_TYPE ?
+ this.globFilter(resolvedPath) : true;
+ return matchesGlob &&
+ this.fsw._isntIgnored(resolvedPath, stats) &&
+ this.fsw._hasReadPermissions(stats);
+ }
+
+ getDirParts(path) {
+ if (!this.hasGlob) return [];
+ const parts = [];
+ const expandedPath = path.includes(BRACE_START) ? braces.expand(path) : [path];
+ expandedPath.forEach((path) => {
+ parts.push(sysPath.relative(this.watchPath, path).split(SLASH_OR_BACK_SLASH_RE));
+ });
+ return parts;
+ }
+
+ filterDir(entry) {
+ if (this.hasGlob) {
+ const entryParts = this.getDirParts(this.checkGlobSymlink(entry));
+ let globstar = false;
+ this.unmatchedGlob = !this.dirParts.some((parts) => {
+ return parts.every((part, i) => {
+ if (part === GLOBSTAR) globstar = true;
+ return globstar || !entryParts[0][i] || anymatch(part, entryParts[0][i], ANYMATCH_OPTS);
+ });
+ });
+ }
+ return !this.unmatchedGlob && this.fsw._isntIgnored(this.entryPath(entry), entry.stats);
+ }
+}
+
+/**
+ * Watches files & directories for changes. Emitted events:
+ * `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error`
+ *
+ * new FSWatcher()
+ * .add(directories)
+ * .on('add', path => log('File', path, 'was added'))
+ */
+class FSWatcher extends EventEmitter {
+// Not indenting methods for history sake; for now.
+constructor(_opts) {
+ super();
+
+ const opts = {};
+ if (_opts) Object.assign(opts, _opts); // for frozen objects
+
+ /** @type {Map} */
+ this._watched = new Map();
+ /** @type {Map} */
+ this._closers = new Map();
+ /** @type {Set} */
+ this._ignoredPaths = new Set();
+
+ /** @type {Map} */
+ this._throttled = new Map();
+
+ /** @type {Map} */
+ this._symlinkPaths = new Map();
+
+ this._streams = new Set();
+ this.closed = false;
+
+ // Set up default options.
+ if (undef(opts, 'persistent')) opts.persistent = true;
+ if (undef(opts, 'ignoreInitial')) opts.ignoreInitial = false;
+ if (undef(opts, 'ignorePermissionErrors')) opts.ignorePermissionErrors = false;
+ if (undef(opts, 'interval')) opts.interval = 100;
+ if (undef(opts, 'binaryInterval')) opts.binaryInterval = 300;
+ if (undef(opts, 'disableGlobbing')) opts.disableGlobbing = false;
+ opts.enableBinaryInterval = opts.binaryInterval !== opts.interval;
+
+ // Enable fsevents on OS X when polling isn't explicitly enabled.
+ if (undef(opts, 'useFsEvents')) opts.useFsEvents = !opts.usePolling;
+
+ // If we can't use fsevents, ensure the options reflect it's disabled.
+ const canUseFsEvents = FsEventsHandler.canUse();
+ if (!canUseFsEvents) opts.useFsEvents = false;
+
+ // Use polling on Mac if not using fsevents.
+ // Other platforms use non-polling fs_watch.
+ if (undef(opts, 'usePolling') && !opts.useFsEvents) {
+ opts.usePolling = isMacos;
+ }
+
+ // Always default to polling on IBM i because fs.watch() is not available on IBM i.
+ if(isIBMi) {
+ opts.usePolling = true;
+ }
+
+ // Global override (useful for end-developers that need to force polling for all
+ // instances of chokidar, regardless of usage/dependency depth)
+ const envPoll = process.env.CHOKIDAR_USEPOLLING;
+ if (envPoll !== undefined) {
+ const envLower = envPoll.toLowerCase();
+
+ if (envLower === 'false' || envLower === '0') {
+ opts.usePolling = false;
+ } else if (envLower === 'true' || envLower === '1') {
+ opts.usePolling = true;
+ } else {
+ opts.usePolling = !!envLower;
+ }
+ }
+ const envInterval = process.env.CHOKIDAR_INTERVAL;
+ if (envInterval) {
+ opts.interval = Number.parseInt(envInterval, 10);
+ }
+
+ // Editor atomic write normalization enabled by default with fs.watch
+ if (undef(opts, 'atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents;
+ if (opts.atomic) this._pendingUnlinks = new Map();
+
+ if (undef(opts, 'followSymlinks')) opts.followSymlinks = true;
+
+ if (undef(opts, 'awaitWriteFinish')) opts.awaitWriteFinish = false;
+ if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {};
+ const awf = opts.awaitWriteFinish;
+ if (awf) {
+ if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000;
+ if (!awf.pollInterval) awf.pollInterval = 100;
+ this._pendingWrites = new Map();
+ }
+ if (opts.ignored) opts.ignored = arrify(opts.ignored);
+
+ let readyCalls = 0;
+ this._emitReady = () => {
+ readyCalls++;
+ if (readyCalls >= this._readyCount) {
+ this._emitReady = EMPTY_FN;
+ this._readyEmitted = true;
+ // use process.nextTick to allow time for listener to be bound
+ process.nextTick(() => this.emit(EV_READY));
+ }
+ };
+ this._emitRaw = (...args) => this.emit(EV_RAW, ...args);
+ this._readyEmitted = false;
+ this.options = opts;
+
+ // Initialize with proper watcher.
+ if (opts.useFsEvents) {
+ this._fsEventsHandler = new FsEventsHandler(this);
+ } else {
+ this._nodeFsHandler = new NodeFsHandler(this);
+ }
+
+ // You’re frozen when your heart’s not open.
+ Object.freeze(opts);
+}
+
+// Public methods
+
+/**
+ * Adds paths to be watched on an existing FSWatcher instance
+ * @param {Path|Array} paths_
+ * @param {String=} _origAdd private; for handling non-existent paths to be watched
+ * @param {Boolean=} _internal private; indicates a non-user add
+ * @returns {FSWatcher} for chaining
+ */
+add(paths_, _origAdd, _internal) {
+ const {cwd, disableGlobbing} = this.options;
+ this.closed = false;
+ let paths = unifyPaths(paths_);
+ if (cwd) {
+ paths = paths.map((path) => {
+ const absPath = getAbsolutePath(path, cwd);
+
+ // Check `path` instead of `absPath` because the cwd portion can't be a glob
+ if (disableGlobbing || !isGlob(path)) {
+ return absPath;
+ }
+ return normalizePath(absPath);
+ });
+ }
+
+ // set aside negated glob strings
+ paths = paths.filter((path) => {
+ if (path.startsWith(BANG)) {
+ this._ignoredPaths.add(path.slice(1));
+ return false;
+ }
+
+ // if a path is being added that was previously ignored, stop ignoring it
+ this._ignoredPaths.delete(path);
+ this._ignoredPaths.delete(path + SLASH_GLOBSTAR);
+
+ // reset the cached userIgnored anymatch fn
+ // to make ignoredPaths changes effective
+ this._userIgnored = undefined;
+
+ return true;
+ });
+
+ if (this.options.useFsEvents && this._fsEventsHandler) {
+ if (!this._readyCount) this._readyCount = paths.length;
+ if (this.options.persistent) this._readyCount += paths.length;
+ paths.forEach((path) => this._fsEventsHandler._addToFsEvents(path));
+ } else {
+ if (!this._readyCount) this._readyCount = 0;
+ this._readyCount += paths.length;
+ Promise.all(
+ paths.map(async path => {
+ const res = await this._nodeFsHandler._addToNodeFs(path, !_internal, 0, 0, _origAdd);
+ if (res) this._emitReady();
+ return res;
+ })
+ ).then(results => {
+ if (this.closed) return;
+ results.filter(item => item).forEach(item => {
+ this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item));
+ });
+ });
+ }
+
+ return this;
+}
+
+/**
+ * Close watchers or start ignoring events from specified paths.
+ * @param {Path|Array} paths_ - string or array of strings, file/directory paths and/or globs
+ * @returns {FSWatcher} for chaining
+*/
+unwatch(paths_) {
+ if (this.closed) return this;
+ const paths = unifyPaths(paths_);
+ const {cwd} = this.options;
+
+ paths.forEach((path) => {
+ // convert to absolute path unless relative path already matches
+ if (!sysPath.isAbsolute(path) && !this._closers.has(path)) {
+ if (cwd) path = sysPath.join(cwd, path);
+ path = sysPath.resolve(path);
+ }
+
+ this._closePath(path);
+
+ this._ignoredPaths.add(path);
+ if (this._watched.has(path)) {
+ this._ignoredPaths.add(path + SLASH_GLOBSTAR);
+ }
+
+ // reset the cached userIgnored anymatch fn
+ // to make ignoredPaths changes effective
+ this._userIgnored = undefined;
+ });
+
+ return this;
+}
+
+/**
+ * Close watchers and remove all listeners from watched paths.
+ * @returns {Promise}.
+*/
+close() {
+ if (this.closed) return this._closePromise;
+ this.closed = true;
+
+ // Memory management.
+ this.removeAllListeners();
+ const closers = [];
+ this._closers.forEach(closerList => closerList.forEach(closer => {
+ const promise = closer();
+ if (promise instanceof Promise) closers.push(promise);
+ }));
+ this._streams.forEach(stream => stream.destroy());
+ this._userIgnored = undefined;
+ this._readyCount = 0;
+ this._readyEmitted = false;
+ this._watched.forEach(dirent => dirent.dispose());
+ ['closers', 'watched', 'streams', 'symlinkPaths', 'throttled'].forEach(key => {
+ this[`_${key}`].clear();
+ });
+
+ this._closePromise = closers.length ? Promise.all(closers).then(() => undefined) : Promise.resolve();
+ return this._closePromise;
+}
+
+/**
+ * Expose list of watched paths
+ * @returns {Object} for chaining
+*/
+getWatched() {
+ const watchList = {};
+ this._watched.forEach((entry, dir) => {
+ const key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir;
+ watchList[key || ONE_DOT] = entry.getChildren().sort();
+ });
+ return watchList;
+}
+
+emitWithAll(event, args) {
+ this.emit(...args);
+ if (event !== EV_ERROR) this.emit(EV_ALL, ...args);
+}
+
+// Common helpers
+// --------------
+
+/**
+ * Normalize and emit events.
+ * Calling _emit DOES NOT MEAN emit() would be called!
+ * @param {EventName} event Type of event
+ * @param {Path} path File or directory path
+ * @param {*=} val1 arguments to be passed with event
+ * @param {*=} val2
+ * @param {*=} val3
+ * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
+ */
+async _emit(event, path, val1, val2, val3) {
+ if (this.closed) return;
+
+ const opts = this.options;
+ if (isWindows) path = sysPath.normalize(path);
+ if (opts.cwd) path = sysPath.relative(opts.cwd, path);
+ /** @type Array */
+ const args = [event, path];
+ if (val3 !== undefined) args.push(val1, val2, val3);
+ else if (val2 !== undefined) args.push(val1, val2);
+ else if (val1 !== undefined) args.push(val1);
+
+ const awf = opts.awaitWriteFinish;
+ let pw;
+ if (awf && (pw = this._pendingWrites.get(path))) {
+ pw.lastChange = new Date();
+ return this;
+ }
+
+ if (opts.atomic) {
+ if (event === EV_UNLINK) {
+ this._pendingUnlinks.set(path, args);
+ setTimeout(() => {
+ this._pendingUnlinks.forEach((entry, path) => {
+ this.emit(...entry);
+ this.emit(EV_ALL, ...entry);
+ this._pendingUnlinks.delete(path);
+ });
+ }, typeof opts.atomic === 'number' ? opts.atomic : 100);
+ return this;
+ }
+ if (event === EV_ADD && this._pendingUnlinks.has(path)) {
+ event = args[0] = EV_CHANGE;
+ this._pendingUnlinks.delete(path);
+ }
+ }
+
+ if (awf && (event === EV_ADD || event === EV_CHANGE) && this._readyEmitted) {
+ const awfEmit = (err, stats) => {
+ if (err) {
+ event = args[0] = EV_ERROR;
+ args[1] = err;
+ this.emitWithAll(event, args);
+ } else if (stats) {
+ // if stats doesn't exist the file must have been deleted
+ if (args.length > 2) {
+ args[2] = stats;
+ } else {
+ args.push(stats);
+ }
+ this.emitWithAll(event, args);
+ }
+ };
+
+ this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit);
+ return this;
+ }
+
+ if (event === EV_CHANGE) {
+ const isThrottled = !this._throttle(EV_CHANGE, path, 50);
+ if (isThrottled) return this;
+ }
+
+ if (opts.alwaysStat && val1 === undefined &&
+ (event === EV_ADD || event === EV_ADD_DIR || event === EV_CHANGE)
+ ) {
+ const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path;
+ let stats;
+ try {
+ stats = await stat(fullPath);
+ } catch (err) {}
+ // Suppress event when fs_stat fails, to avoid sending undefined 'stat'
+ if (!stats || this.closed) return;
+ args.push(stats);
+ }
+ this.emitWithAll(event, args);
+
+ return this;
+}
+
+/**
+ * Common handler for errors
+ * @param {Error} error
+ * @returns {Error|Boolean} The error if defined, otherwise the value of the FSWatcher instance's `closed` flag
+ */
+_handleError(error) {
+ const code = error && error.code;
+ if (error && code !== 'ENOENT' && code !== 'ENOTDIR' &&
+ (!this.options.ignorePermissionErrors || (code !== 'EPERM' && code !== 'EACCES'))
+ ) {
+ this.emit(EV_ERROR, error);
+ }
+ return error || this.closed;
+}
+
+/**
+ * Helper utility for throttling
+ * @param {ThrottleType} actionType type being throttled
+ * @param {Path} path being acted upon
+ * @param {Number} timeout duration of time to suppress duplicate actions
+ * @returns {Object|false} tracking object or false if action should be suppressed
+ */
+_throttle(actionType, path, timeout) {
+ if (!this._throttled.has(actionType)) {
+ this._throttled.set(actionType, new Map());
+ }
+
+ /** @type {Map} */
+ const action = this._throttled.get(actionType);
+ /** @type {Object} */
+ const actionPath = action.get(path);
+
+ if (actionPath) {
+ actionPath.count++;
+ return false;
+ }
+
+ let timeoutObject;
+ const clear = () => {
+ const item = action.get(path);
+ const count = item ? item.count : 0;
+ action.delete(path);
+ clearTimeout(timeoutObject);
+ if (item) clearTimeout(item.timeoutObject);
+ return count;
+ };
+ timeoutObject = setTimeout(clear, timeout);
+ const thr = {timeoutObject, clear, count: 0};
+ action.set(path, thr);
+ return thr;
+}
+
+_incrReadyCount() {
+ return this._readyCount++;
+}
+
+/**
+ * Awaits write operation to finish.
+ * Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback.
+ * @param {Path} path being acted upon
+ * @param {Number} threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished
+ * @param {EventName} event
+ * @param {Function} awfEmit Callback to be called when ready for event to be emitted.
+ */
+_awaitWriteFinish(path, threshold, event, awfEmit) {
+ let timeoutHandler;
+
+ let fullPath = path;
+ if (this.options.cwd && !sysPath.isAbsolute(path)) {
+ fullPath = sysPath.join(this.options.cwd, path);
+ }
+
+ const now = new Date();
+
+ const awaitWriteFinish = (prevStat) => {
+ fs.stat(fullPath, (err, curStat) => {
+ if (err || !this._pendingWrites.has(path)) {
+ if (err && err.code !== 'ENOENT') awfEmit(err);
+ return;
+ }
+
+ const now = Number(new Date());
+
+ if (prevStat && curStat.size !== prevStat.size) {
+ this._pendingWrites.get(path).lastChange = now;
+ }
+ const pw = this._pendingWrites.get(path);
+ const df = now - pw.lastChange;
+
+ if (df >= threshold) {
+ this._pendingWrites.delete(path);
+ awfEmit(undefined, curStat);
+ } else {
+ timeoutHandler = setTimeout(
+ awaitWriteFinish,
+ this.options.awaitWriteFinish.pollInterval,
+ curStat
+ );
+ }
+ });
+ };
+
+ if (!this._pendingWrites.has(path)) {
+ this._pendingWrites.set(path, {
+ lastChange: now,
+ cancelWait: () => {
+ this._pendingWrites.delete(path);
+ clearTimeout(timeoutHandler);
+ return event;
+ }
+ });
+ timeoutHandler = setTimeout(
+ awaitWriteFinish,
+ this.options.awaitWriteFinish.pollInterval
+ );
+ }
+}
+
+_getGlobIgnored() {
+ return [...this._ignoredPaths.values()];
+}
+
+/**
+ * Determines whether user has asked to ignore this path.
+ * @param {Path} path filepath or dir
+ * @param {fs.Stats=} stats result of fs.stat
+ * @returns {Boolean}
+ */
+_isIgnored(path, stats) {
+ if (this.options.atomic && DOT_RE.test(path)) return true;
+ if (!this._userIgnored) {
+ const {cwd} = this.options;
+ const ign = this.options.ignored;
+
+ const ignored = ign && ign.map(normalizeIgnored(cwd));
+ const paths = arrify(ignored)
+ .filter((path) => typeof path === STRING_TYPE && !isGlob(path))
+ .map((path) => path + SLASH_GLOBSTAR);
+ const list = this._getGlobIgnored().map(normalizeIgnored(cwd)).concat(ignored, paths);
+ this._userIgnored = anymatch(list, undefined, ANYMATCH_OPTS);
+ }
+
+ return this._userIgnored([path, stats]);
+}
+
+_isntIgnored(path, stat) {
+ return !this._isIgnored(path, stat);
+}
+
+/**
+ * Provides a set of common helpers and properties relating to symlink and glob handling.
+ * @param {Path} path file, directory, or glob pattern being watched
+ * @param {Number=} depth at any depth > 0, this isn't a glob
+ * @returns {WatchHelper} object containing helpers for this path
+ */
+_getWatchHelpers(path, depth) {
+ const watchPath = depth || this.options.disableGlobbing || !isGlob(path) ? path : globParent(path);
+ const follow = this.options.followSymlinks;
+
+ return new WatchHelper(path, watchPath, follow, this);
+}
+
+// Directory helpers
+// -----------------
+
+/**
+ * Provides directory tracking objects
+ * @param {String} directory path of the directory
+ * @returns {DirEntry} the directory's tracking object
+ */
+_getWatchedDir(directory) {
+ if (!this._boundRemove) this._boundRemove = this._remove.bind(this);
+ const dir = sysPath.resolve(directory);
+ if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove));
+ return this._watched.get(dir);
+}
+
+// File helpers
+// ------------
+
+/**
+ * Check for read permissions.
+ * Based on this answer on SO: https://stackoverflow.com/a/11781404/1358405
+ * @param {fs.Stats} stats - object, result of fs_stat
+ * @returns {Boolean} indicates whether the file can be read
+*/
+_hasReadPermissions(stats) {
+ if (this.options.ignorePermissionErrors) return true;
+
+ // stats.mode may be bigint
+ const md = stats && Number.parseInt(stats.mode, 10);
+ const st = md & 0o777;
+ const it = Number.parseInt(st.toString(8)[0], 10);
+ return Boolean(4 & it);
+}
+
+/**
+ * Handles emitting unlink events for
+ * files and directories, and via recursion, for
+ * files and directories within directories that are unlinked
+ * @param {String} directory within which the following item is located
+ * @param {String} item base path of item/directory
+ * @returns {void}
+*/
+_remove(directory, item, isDirectory) {
+ // if what is being deleted is a directory, get that directory's paths
+ // for recursive deleting and cleaning of watched object
+ // if it is not a directory, nestedDirectoryChildren will be empty array
+ const path = sysPath.join(directory, item);
+ const fullPath = sysPath.resolve(path);
+ isDirectory = isDirectory != null
+ ? isDirectory
+ : this._watched.has(path) || this._watched.has(fullPath);
+
+ // prevent duplicate handling in case of arriving here nearly simultaneously
+ // via multiple paths (such as _handleFile and _handleDir)
+ if (!this._throttle('remove', path, 100)) return;
+
+ // if the only watched file is removed, watch for its return
+ if (!isDirectory && !this.options.useFsEvents && this._watched.size === 1) {
+ this.add(directory, item, true);
+ }
+
+ // This will create a new entry in the watched object in either case
+ // so we got to do the directory check beforehand
+ const wp = this._getWatchedDir(path);
+ const nestedDirectoryChildren = wp.getChildren();
+
+ // Recursively remove children directories / files.
+ nestedDirectoryChildren.forEach(nested => this._remove(path, nested));
+
+ // Check if item was on the watched list and remove it
+ const parent = this._getWatchedDir(directory);
+ const wasTracked = parent.has(item);
+ parent.remove(item);
+
+ // Fixes issue #1042 -> Relative paths were detected and added as symlinks
+ // (https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L612),
+ // but never removed from the map in case the path was deleted.
+ // This leads to an incorrect state if the path was recreated:
+ // https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L553
+ if (this._symlinkPaths.has(fullPath)) {
+ this._symlinkPaths.delete(fullPath);
+ }
+
+ // If we wait for this file to be fully written, cancel the wait.
+ let relPath = path;
+ if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path);
+ if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
+ const event = this._pendingWrites.get(relPath).cancelWait();
+ if (event === EV_ADD) return;
+ }
+
+ // The Entry will either be a directory that just got removed
+ // or a bogus entry to a file, in either case we have to remove it
+ this._watched.delete(path);
+ this._watched.delete(fullPath);
+ const eventName = isDirectory ? EV_UNLINK_DIR : EV_UNLINK;
+ if (wasTracked && !this._isIgnored(path)) this._emit(eventName, path);
+
+ // Avoid conflicts if we later create another file with the same name
+ if (!this.options.useFsEvents) {
+ this._closePath(path);
+ }
+}
+
+/**
+ * Closes all watchers for a path
+ * @param {Path} path
+ */
+_closePath(path) {
+ this._closeFile(path)
+ const dir = sysPath.dirname(path);
+ this._getWatchedDir(dir).remove(sysPath.basename(path));
+}
+
+/**
+ * Closes only file-specific watchers
+ * @param {Path} path
+ */
+_closeFile(path) {
+ const closers = this._closers.get(path);
+ if (!closers) return;
+ closers.forEach(closer => closer());
+ this._closers.delete(path);
+}
+
+/**
+ *
+ * @param {Path} path
+ * @param {Function} closer
+ */
+_addPathCloser(path, closer) {
+ if (!closer) return;
+ let list = this._closers.get(path);
+ if (!list) {
+ list = [];
+ this._closers.set(path, list);
+ }
+ list.push(closer);
+}
+
+_readdirp(root, opts) {
+ if (this.closed) return;
+ const options = {type: EV_ALL, alwaysStat: true, lstat: true, ...opts};
+ let stream = readdirp(root, options);
+ this._streams.add(stream);
+ stream.once(STR_CLOSE, () => {
+ stream = undefined;
+ });
+ stream.once(STR_END, () => {
+ if (stream) {
+ this._streams.delete(stream);
+ stream = undefined;
+ }
+ });
+ return stream;
+}
+
+}
+
+// Export FSWatcher class
+exports.FSWatcher = FSWatcher;
+
+/**
+ * Instantiates watcher with paths to be tracked.
+ * @param {String|Array} paths file/directory paths and/or globs
+ * @param {Object=} options chokidar opts
+ * @returns an instance of FSWatcher for chaining.
+ */
+const watch = (paths, options) => {
+ const watcher = new FSWatcher(options);
+ watcher.add(paths);
+ return watcher;
+};
+
+exports.watch = watch;
diff --git a/dashboard/node_modules/chokidar/lib/constants.js b/dashboard/node_modules/chokidar/lib/constants.js
new file mode 100644
index 0000000..4743865
--- /dev/null
+++ b/dashboard/node_modules/chokidar/lib/constants.js
@@ -0,0 +1,66 @@
+'use strict';
+
+const {sep} = require('path');
+const {platform} = process;
+const os = require('os');
+
+exports.EV_ALL = 'all';
+exports.EV_READY = 'ready';
+exports.EV_ADD = 'add';
+exports.EV_CHANGE = 'change';
+exports.EV_ADD_DIR = 'addDir';
+exports.EV_UNLINK = 'unlink';
+exports.EV_UNLINK_DIR = 'unlinkDir';
+exports.EV_RAW = 'raw';
+exports.EV_ERROR = 'error';
+
+exports.STR_DATA = 'data';
+exports.STR_END = 'end';
+exports.STR_CLOSE = 'close';
+
+exports.FSEVENT_CREATED = 'created';
+exports.FSEVENT_MODIFIED = 'modified';
+exports.FSEVENT_DELETED = 'deleted';
+exports.FSEVENT_MOVED = 'moved';
+exports.FSEVENT_CLONED = 'cloned';
+exports.FSEVENT_UNKNOWN = 'unknown';
+exports.FSEVENT_FLAG_MUST_SCAN_SUBDIRS = 1;
+exports.FSEVENT_TYPE_FILE = 'file';
+exports.FSEVENT_TYPE_DIRECTORY = 'directory';
+exports.FSEVENT_TYPE_SYMLINK = 'symlink';
+
+exports.KEY_LISTENERS = 'listeners';
+exports.KEY_ERR = 'errHandlers';
+exports.KEY_RAW = 'rawEmitters';
+exports.HANDLER_KEYS = [exports.KEY_LISTENERS, exports.KEY_ERR, exports.KEY_RAW];
+
+exports.DOT_SLASH = `.${sep}`;
+
+exports.BACK_SLASH_RE = /\\/g;
+exports.DOUBLE_SLASH_RE = /\/\//;
+exports.SLASH_OR_BACK_SLASH_RE = /[/\\]/;
+exports.DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
+exports.REPLACER_RE = /^\.[/\\]/;
+
+exports.SLASH = '/';
+exports.SLASH_SLASH = '//';
+exports.BRACE_START = '{';
+exports.BANG = '!';
+exports.ONE_DOT = '.';
+exports.TWO_DOTS = '..';
+exports.STAR = '*';
+exports.GLOBSTAR = '**';
+exports.ROOT_GLOBSTAR = '/**/*';
+exports.SLASH_GLOBSTAR = '/**';
+exports.DIR_SUFFIX = 'Dir';
+exports.ANYMATCH_OPTS = {dot: true};
+exports.STRING_TYPE = 'string';
+exports.FUNCTION_TYPE = 'function';
+exports.EMPTY_STR = '';
+exports.EMPTY_FN = () => {};
+exports.IDENTITY_FN = val => val;
+
+exports.isWindows = platform === 'win32';
+exports.isMacos = platform === 'darwin';
+exports.isLinux = platform === 'linux';
+exports.isIBMi = os.type() === 'OS400';
diff --git a/dashboard/node_modules/chokidar/lib/fsevents-handler.js b/dashboard/node_modules/chokidar/lib/fsevents-handler.js
new file mode 100644
index 0000000..fe29393
--- /dev/null
+++ b/dashboard/node_modules/chokidar/lib/fsevents-handler.js
@@ -0,0 +1,526 @@
+'use strict';
+
+const fs = require('fs');
+const sysPath = require('path');
+const { promisify } = require('util');
+
+let fsevents;
+try {
+ fsevents = require('fsevents');
+} catch (error) {
+ if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error);
+}
+
+if (fsevents) {
+ // TODO: real check
+ const mtch = process.version.match(/v(\d+)\.(\d+)/);
+ if (mtch && mtch[1] && mtch[2]) {
+ const maj = Number.parseInt(mtch[1], 10);
+ const min = Number.parseInt(mtch[2], 10);
+ if (maj === 8 && min < 16) {
+ fsevents = undefined;
+ }
+ }
+}
+
+const {
+ EV_ADD,
+ EV_CHANGE,
+ EV_ADD_DIR,
+ EV_UNLINK,
+ EV_ERROR,
+ STR_DATA,
+ STR_END,
+ FSEVENT_CREATED,
+ FSEVENT_MODIFIED,
+ FSEVENT_DELETED,
+ FSEVENT_MOVED,
+ // FSEVENT_CLONED,
+ FSEVENT_UNKNOWN,
+ FSEVENT_FLAG_MUST_SCAN_SUBDIRS,
+ FSEVENT_TYPE_FILE,
+ FSEVENT_TYPE_DIRECTORY,
+ FSEVENT_TYPE_SYMLINK,
+
+ ROOT_GLOBSTAR,
+ DIR_SUFFIX,
+ DOT_SLASH,
+ FUNCTION_TYPE,
+ EMPTY_FN,
+ IDENTITY_FN
+} = require('./constants');
+
+const Depth = (value) => isNaN(value) ? {} : {depth: value};
+
+const stat = promisify(fs.stat);
+const lstat = promisify(fs.lstat);
+const realpath = promisify(fs.realpath);
+
+const statMethods = { stat, lstat };
+
+/**
+ * @typedef {String} Path
+ */
+
+/**
+ * @typedef {Object} FsEventsWatchContainer
+ * @property {Set} listeners
+ * @property {Function} rawEmitter
+ * @property {{stop: Function}} watcher
+ */
+
+// fsevents instance helper functions
+/**
+ * Object to hold per-process fsevents instances (may be shared across chokidar FSWatcher instances)
+ * @type {Map}
+ */
+const FSEventsWatchers = new Map();
+
+// Threshold of duplicate path prefixes at which to start
+// consolidating going forward
+const consolidateThreshhold = 10;
+
+const wrongEventFlags = new Set([
+ 69888, 70400, 71424, 72704, 73472, 131328, 131840, 262912
+]);
+
+/**
+ * Instantiates the fsevents interface
+ * @param {Path} path path to be watched
+ * @param {Function} callback called when fsevents is bound and ready
+ * @returns {{stop: Function}} new fsevents instance
+ */
+const createFSEventsInstance = (path, callback) => {
+ const stop = fsevents.watch(path, callback);
+ return {stop};
+};
+
+/**
+ * Instantiates the fsevents interface or binds listeners to an existing one covering
+ * the same file tree.
+ * @param {Path} path - to be watched
+ * @param {Path} realPath - real path for symlinks
+ * @param {Function} listener - called when fsevents emits events
+ * @param {Function} rawEmitter - passes data to listeners of the 'raw' event
+ * @returns {Function} closer
+ */
+function setFSEventsListener(path, realPath, listener, rawEmitter) {
+ let watchPath = sysPath.extname(realPath) ? sysPath.dirname(realPath) : realPath;
+
+ const parentPath = sysPath.dirname(watchPath);
+ let cont = FSEventsWatchers.get(watchPath);
+
+ // If we've accumulated a substantial number of paths that
+ // could have been consolidated by watching one directory
+ // above the current one, create a watcher on the parent
+ // path instead, so that we do consolidate going forward.
+ if (couldConsolidate(parentPath)) {
+ watchPath = parentPath;
+ }
+
+ const resolvedPath = sysPath.resolve(path);
+ const hasSymlink = resolvedPath !== realPath;
+
+ const filteredListener = (fullPath, flags, info) => {
+ if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath);
+ if (
+ fullPath === resolvedPath ||
+ !fullPath.indexOf(resolvedPath + sysPath.sep)
+ ) listener(fullPath, flags, info);
+ };
+
+ // check if there is already a watcher on a parent path
+ // modifies `watchPath` to the parent path when it finds a match
+ let watchedParent = false;
+ for (const watchedPath of FSEventsWatchers.keys()) {
+ if (realPath.indexOf(sysPath.resolve(watchedPath) + sysPath.sep) === 0) {
+ watchPath = watchedPath;
+ cont = FSEventsWatchers.get(watchPath);
+ watchedParent = true;
+ break;
+ }
+ }
+
+ if (cont || watchedParent) {
+ cont.listeners.add(filteredListener);
+ } else {
+ cont = {
+ listeners: new Set([filteredListener]),
+ rawEmitter,
+ watcher: createFSEventsInstance(watchPath, (fullPath, flags) => {
+ if (!cont.listeners.size) return;
+ if (flags & FSEVENT_FLAG_MUST_SCAN_SUBDIRS) return;
+ const info = fsevents.getInfo(fullPath, flags);
+ cont.listeners.forEach(list => {
+ list(fullPath, flags, info);
+ });
+
+ cont.rawEmitter(info.event, fullPath, info);
+ })
+ };
+ FSEventsWatchers.set(watchPath, cont);
+ }
+
+ // removes this instance's listeners and closes the underlying fsevents
+ // instance if there are no more listeners left
+ return () => {
+ const lst = cont.listeners;
+
+ lst.delete(filteredListener);
+ if (!lst.size) {
+ FSEventsWatchers.delete(watchPath);
+ if (cont.watcher) return cont.watcher.stop().then(() => {
+ cont.rawEmitter = cont.watcher = undefined;
+ Object.freeze(cont);
+ });
+ }
+ };
+}
+
+// Decide whether or not we should start a new higher-level
+// parent watcher
+const couldConsolidate = (path) => {
+ let count = 0;
+ for (const watchPath of FSEventsWatchers.keys()) {
+ if (watchPath.indexOf(path) === 0) {
+ count++;
+ if (count >= consolidateThreshhold) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+};
+
+// returns boolean indicating whether fsevents can be used
+const canUse = () => fsevents && FSEventsWatchers.size < 128;
+
+// determines subdirectory traversal levels from root to path
+const calcDepth = (path, root) => {
+ let i = 0;
+ while (!path.indexOf(root) && (path = sysPath.dirname(path)) !== root) i++;
+ return i;
+};
+
+// returns boolean indicating whether the fsevents' event info has the same type
+// as the one returned by fs.stat
+const sameTypes = (info, stats) => (
+ info.type === FSEVENT_TYPE_DIRECTORY && stats.isDirectory() ||
+ info.type === FSEVENT_TYPE_SYMLINK && stats.isSymbolicLink() ||
+ info.type === FSEVENT_TYPE_FILE && stats.isFile()
+)
+
+/**
+ * @mixin
+ */
+class FsEventsHandler {
+
+/**
+ * @param {import('../index').FSWatcher} fsw
+ */
+constructor(fsw) {
+ this.fsw = fsw;
+}
+checkIgnored(path, stats) {
+ const ipaths = this.fsw._ignoredPaths;
+ if (this.fsw._isIgnored(path, stats)) {
+ ipaths.add(path);
+ if (stats && stats.isDirectory()) {
+ ipaths.add(path + ROOT_GLOBSTAR);
+ }
+ return true;
+ }
+
+ ipaths.delete(path);
+ ipaths.delete(path + ROOT_GLOBSTAR);
+}
+
+addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts) {
+ const event = watchedDir.has(item) ? EV_CHANGE : EV_ADD;
+ this.handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts);
+}
+
+async checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts) {
+ try {
+ const stats = await stat(path)
+ if (this.fsw.closed) return;
+ if (sameTypes(info, stats)) {
+ this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
+ } else {
+ this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
+ }
+ } catch (error) {
+ if (error.code === 'EACCES') {
+ this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
+ } else {
+ this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
+ }
+ }
+}
+
+handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts) {
+ if (this.fsw.closed || this.checkIgnored(path)) return;
+
+ if (event === EV_UNLINK) {
+ const isDirectory = info.type === FSEVENT_TYPE_DIRECTORY
+ // suppress unlink events on never before seen files
+ if (isDirectory || watchedDir.has(item)) {
+ this.fsw._remove(parent, item, isDirectory);
+ }
+ } else {
+ if (event === EV_ADD) {
+ // track new directories
+ if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path);
+
+ if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) {
+ // push symlinks back to the top of the stack to get handled
+ const curDepth = opts.depth === undefined ?
+ undefined : calcDepth(fullPath, realPath) + 1;
+ return this._addToFsEvents(path, false, true, curDepth);
+ }
+
+ // track new paths
+ // (other than symlinks being followed, which will be tracked soon)
+ this.fsw._getWatchedDir(parent).add(item);
+ }
+ /**
+ * @type {'add'|'addDir'|'unlink'|'unlinkDir'}
+ */
+ const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event;
+ this.fsw._emit(eventName, path);
+ if (eventName === EV_ADD_DIR) this._addToFsEvents(path, false, true);
+ }
+}
+
+/**
+ * Handle symlinks encountered during directory scan
+ * @param {String} watchPath - file/dir path to be watched with fsevents
+ * @param {String} realPath - real path (in case of symlinks)
+ * @param {Function} transform - path transformer
+ * @param {Function} globFilter - path filter in case a glob pattern was provided
+ * @returns {Function} closer for the watcher instance
+*/
+_watchWithFsEvents(watchPath, realPath, transform, globFilter) {
+ if (this.fsw.closed || this.fsw._isIgnored(watchPath)) return;
+ const opts = this.fsw.options;
+ const watchCallback = async (fullPath, flags, info) => {
+ if (this.fsw.closed) return;
+ if (
+ opts.depth !== undefined &&
+ calcDepth(fullPath, realPath) > opts.depth
+ ) return;
+ const path = transform(sysPath.join(
+ watchPath, sysPath.relative(watchPath, fullPath)
+ ));
+ if (globFilter && !globFilter(path)) return;
+ // ensure directories are tracked
+ const parent = sysPath.dirname(path);
+ const item = sysPath.basename(path);
+ const watchedDir = this.fsw._getWatchedDir(
+ info.type === FSEVENT_TYPE_DIRECTORY ? path : parent
+ );
+
+ // correct for wrong events emitted
+ if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) {
+ if (typeof opts.ignored === FUNCTION_TYPE) {
+ let stats;
+ try {
+ stats = await stat(path);
+ } catch (error) {}
+ if (this.fsw.closed) return;
+ if (this.checkIgnored(path, stats)) return;
+ if (sameTypes(info, stats)) {
+ this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
+ } else {
+ this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
+ }
+ } else {
+ this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);
+ }
+ } else {
+ switch (info.event) {
+ case FSEVENT_CREATED:
+ case FSEVENT_MODIFIED:
+ return this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
+ case FSEVENT_DELETED:
+ case FSEVENT_MOVED:
+ return this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);
+ }
+ }
+ };
+
+ const closer = setFSEventsListener(
+ watchPath,
+ realPath,
+ watchCallback,
+ this.fsw._emitRaw
+ );
+
+ this.fsw._emitReady();
+ return closer;
+}
+
+/**
+ * Handle symlinks encountered during directory scan
+ * @param {String} linkPath path to symlink
+ * @param {String} fullPath absolute path to the symlink
+ * @param {Function} transform pre-existing path transformer
+ * @param {Number} curDepth level of subdirectories traversed to where symlink is
+ * @returns {Promise}
+ */
+async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) {
+ // don't follow the same symlink more than once
+ if (this.fsw.closed || this.fsw._symlinkPaths.has(fullPath)) return;
+
+ this.fsw._symlinkPaths.set(fullPath, true);
+ this.fsw._incrReadyCount();
+
+ try {
+ const linkTarget = await realpath(linkPath);
+ if (this.fsw.closed) return;
+ if (this.fsw._isIgnored(linkTarget)) {
+ return this.fsw._emitReady();
+ }
+
+ this.fsw._incrReadyCount();
+
+ // add the linkTarget for watching with a wrapper for transform
+ // that causes emitted paths to incorporate the link's path
+ this._addToFsEvents(linkTarget || linkPath, (path) => {
+ let aliasedPath = linkPath;
+ if (linkTarget && linkTarget !== DOT_SLASH) {
+ aliasedPath = path.replace(linkTarget, linkPath);
+ } else if (path !== DOT_SLASH) {
+ aliasedPath = sysPath.join(linkPath, path);
+ }
+ return transform(aliasedPath);
+ }, false, curDepth);
+ } catch(error) {
+ if (this.fsw._handleError(error)) {
+ return this.fsw._emitReady();
+ }
+ }
+}
+
+/**
+ *
+ * @param {Path} newPath
+ * @param {fs.Stats} stats
+ */
+emitAdd(newPath, stats, processPath, opts, forceAdd) {
+ const pp = processPath(newPath);
+ const isDir = stats.isDirectory();
+ const dirObj = this.fsw._getWatchedDir(sysPath.dirname(pp));
+ const base = sysPath.basename(pp);
+
+ // ensure empty dirs get tracked
+ if (isDir) this.fsw._getWatchedDir(pp);
+ if (dirObj.has(base)) return;
+ dirObj.add(base);
+
+ if (!opts.ignoreInitial || forceAdd === true) {
+ this.fsw._emit(isDir ? EV_ADD_DIR : EV_ADD, pp, stats);
+ }
+}
+
+initWatch(realPath, path, wh, processPath) {
+ if (this.fsw.closed) return;
+ const closer = this._watchWithFsEvents(
+ wh.watchPath,
+ sysPath.resolve(realPath || wh.watchPath),
+ processPath,
+ wh.globFilter
+ );
+ this.fsw._addPathCloser(path, closer);
+}
+
+/**
+ * Handle added path with fsevents
+ * @param {String} path file/dir path or glob pattern
+ * @param {Function|Boolean=} transform converts working path to what the user expects
+ * @param {Boolean=} forceAdd ensure add is emitted
+ * @param {Number=} priorDepth Level of subdirectories already traversed.
+ * @returns {Promise}
+ */
+async _addToFsEvents(path, transform, forceAdd, priorDepth) {
+ if (this.fsw.closed) {
+ return;
+ }
+ const opts = this.fsw.options;
+ const processPath = typeof transform === FUNCTION_TYPE ? transform : IDENTITY_FN;
+
+ const wh = this.fsw._getWatchHelpers(path);
+
+ // evaluate what is at the path we're being asked to watch
+ try {
+ const stats = await statMethods[wh.statMethod](wh.watchPath);
+ if (this.fsw.closed) return;
+ if (this.fsw._isIgnored(wh.watchPath, stats)) {
+ throw null;
+ }
+ if (stats.isDirectory()) {
+ // emit addDir unless this is a glob parent
+ if (!wh.globFilter) this.emitAdd(processPath(path), stats, processPath, opts, forceAdd);
+
+ // don't recurse further if it would exceed depth setting
+ if (priorDepth && priorDepth > opts.depth) return;
+
+ // scan the contents of the dir
+ this.fsw._readdirp(wh.watchPath, {
+ fileFilter: entry => wh.filterPath(entry),
+ directoryFilter: entry => wh.filterDir(entry),
+ ...Depth(opts.depth - (priorDepth || 0))
+ }).on(STR_DATA, (entry) => {
+ // need to check filterPath on dirs b/c filterDir is less restrictive
+ if (this.fsw.closed) {
+ return;
+ }
+ if (entry.stats.isDirectory() && !wh.filterPath(entry)) return;
+
+ const joinedPath = sysPath.join(wh.watchPath, entry.path);
+ const {fullPath} = entry;
+
+ if (wh.followSymlinks && entry.stats.isSymbolicLink()) {
+ // preserve the current depth here since it can't be derived from
+ // real paths past the symlink
+ const curDepth = opts.depth === undefined ?
+ undefined : calcDepth(joinedPath, sysPath.resolve(wh.watchPath)) + 1;
+
+ this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth);
+ } else {
+ this.emitAdd(joinedPath, entry.stats, processPath, opts, forceAdd);
+ }
+ }).on(EV_ERROR, EMPTY_FN).on(STR_END, () => {
+ this.fsw._emitReady();
+ });
+ } else {
+ this.emitAdd(wh.watchPath, stats, processPath, opts, forceAdd);
+ this.fsw._emitReady();
+ }
+ } catch (error) {
+ if (!error || this.fsw._handleError(error)) {
+ // TODO: Strange thing: "should not choke on an ignored watch path" will be failed without 2 ready calls -__-
+ this.fsw._emitReady();
+ this.fsw._emitReady();
+ }
+ }
+
+ if (opts.persistent && forceAdd !== true) {
+ if (typeof transform === FUNCTION_TYPE) {
+ // realpath has already been resolved
+ this.initWatch(undefined, path, wh, processPath);
+ } else {
+ let realPath;
+ try {
+ realPath = await realpath(wh.watchPath);
+ } catch (e) {}
+ this.initWatch(realPath, path, wh, processPath);
+ }
+ }
+}
+
+}
+
+module.exports = FsEventsHandler;
+module.exports.canUse = canUse;
diff --git a/dashboard/node_modules/chokidar/lib/nodefs-handler.js b/dashboard/node_modules/chokidar/lib/nodefs-handler.js
new file mode 100644
index 0000000..199cfe9
--- /dev/null
+++ b/dashboard/node_modules/chokidar/lib/nodefs-handler.js
@@ -0,0 +1,654 @@
+'use strict';
+
+const fs = require('fs');
+const sysPath = require('path');
+const { promisify } = require('util');
+const isBinaryPath = require('is-binary-path');
+const {
+ isWindows,
+ isLinux,
+ EMPTY_FN,
+ EMPTY_STR,
+ KEY_LISTENERS,
+ KEY_ERR,
+ KEY_RAW,
+ HANDLER_KEYS,
+ EV_CHANGE,
+ EV_ADD,
+ EV_ADD_DIR,
+ EV_ERROR,
+ STR_DATA,
+ STR_END,
+ BRACE_START,
+ STAR
+} = require('./constants');
+
+const THROTTLE_MODE_WATCH = 'watch';
+
+const open = promisify(fs.open);
+const stat = promisify(fs.stat);
+const lstat = promisify(fs.lstat);
+const close = promisify(fs.close);
+const fsrealpath = promisify(fs.realpath);
+
+const statMethods = { lstat, stat };
+
+// TODO: emit errors properly. Example: EMFILE on Macos.
+const foreach = (val, fn) => {
+ if (val instanceof Set) {
+ val.forEach(fn);
+ } else {
+ fn(val);
+ }
+};
+
+const addAndConvert = (main, prop, item) => {
+ let container = main[prop];
+ if (!(container instanceof Set)) {
+ main[prop] = container = new Set([container]);
+ }
+ container.add(item);
+};
+
+const clearItem = cont => key => {
+ const set = cont[key];
+ if (set instanceof Set) {
+ set.clear();
+ } else {
+ delete cont[key];
+ }
+};
+
+const delFromSet = (main, prop, item) => {
+ const container = main[prop];
+ if (container instanceof Set) {
+ container.delete(item);
+ } else if (container === item) {
+ delete main[prop];
+ }
+};
+
+const isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val;
+
+/**
+ * @typedef {String} Path
+ */
+
+// fs_watch helpers
+
+// object to hold per-process fs_watch instances
+// (may be shared across chokidar FSWatcher instances)
+
+/**
+ * @typedef {Object} FsWatchContainer
+ * @property {Set} listeners
+ * @property {Set} errHandlers
+ * @property {Set} rawEmitters
+ * @property {fs.FSWatcher=} watcher
+ * @property {Boolean=} watcherUnusable
+ */
+
+/**
+ * @type {Map}
+ */
+const FsWatchInstances = new Map();
+
+/**
+ * Instantiates the fs_watch interface
+ * @param {String} path to be watched
+ * @param {Object} options to be passed to fs_watch
+ * @param {Function} listener main event handler
+ * @param {Function} errHandler emits info about errors
+ * @param {Function} emitRaw emits raw event data
+ * @returns {fs.FSWatcher} new fsevents instance
+ */
+function createFsWatchInstance(path, options, listener, errHandler, emitRaw) {
+ const handleEvent = (rawEvent, evPath) => {
+ listener(path);
+ emitRaw(rawEvent, evPath, {watchedPath: path});
+
+ // emit based on events occurring for files from a directory's watcher in
+ // case the file's watcher misses it (and rely on throttling to de-dupe)
+ if (evPath && path !== evPath) {
+ fsWatchBroadcast(
+ sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath)
+ );
+ }
+ };
+ try {
+ return fs.watch(path, options, handleEvent);
+ } catch (error) {
+ errHandler(error);
+ }
+}
+
+/**
+ * Helper for passing fs_watch event data to a collection of listeners
+ * @param {Path} fullPath absolute path bound to fs_watch instance
+ * @param {String} type listener type
+ * @param {*=} val1 arguments to be passed to listeners
+ * @param {*=} val2
+ * @param {*=} val3
+ */
+const fsWatchBroadcast = (fullPath, type, val1, val2, val3) => {
+ const cont = FsWatchInstances.get(fullPath);
+ if (!cont) return;
+ foreach(cont[type], (listener) => {
+ listener(val1, val2, val3);
+ });
+};
+
+/**
+ * Instantiates the fs_watch interface or binds listeners
+ * to an existing one covering the same file system entry
+ * @param {String} path
+ * @param {String} fullPath absolute path
+ * @param {Object} options to be passed to fs_watch
+ * @param {Object} handlers container for event listener functions
+ */
+const setFsWatchListener = (path, fullPath, options, handlers) => {
+ const {listener, errHandler, rawEmitter} = handlers;
+ let cont = FsWatchInstances.get(fullPath);
+
+ /** @type {fs.FSWatcher=} */
+ let watcher;
+ if (!options.persistent) {
+ watcher = createFsWatchInstance(
+ path, options, listener, errHandler, rawEmitter
+ );
+ return watcher.close.bind(watcher);
+ }
+ if (cont) {
+ addAndConvert(cont, KEY_LISTENERS, listener);
+ addAndConvert(cont, KEY_ERR, errHandler);
+ addAndConvert(cont, KEY_RAW, rawEmitter);
+ } else {
+ watcher = createFsWatchInstance(
+ path,
+ options,
+ fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS),
+ errHandler, // no need to use broadcast here
+ fsWatchBroadcast.bind(null, fullPath, KEY_RAW)
+ );
+ if (!watcher) return;
+ watcher.on(EV_ERROR, async (error) => {
+ const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR);
+ cont.watcherUnusable = true; // documented since Node 10.4.1
+ // Workaround for https://github.com/joyent/node/issues/4337
+ if (isWindows && error.code === 'EPERM') {
+ try {
+ const fd = await open(path, 'r');
+ await close(fd);
+ broadcastErr(error);
+ } catch (err) {}
+ } else {
+ broadcastErr(error);
+ }
+ });
+ cont = {
+ listeners: listener,
+ errHandlers: errHandler,
+ rawEmitters: rawEmitter,
+ watcher
+ };
+ FsWatchInstances.set(fullPath, cont);
+ }
+ // const index = cont.listeners.indexOf(listener);
+
+ // removes this instance's listeners and closes the underlying fs_watch
+ // instance if there are no more listeners left
+ return () => {
+ delFromSet(cont, KEY_LISTENERS, listener);
+ delFromSet(cont, KEY_ERR, errHandler);
+ delFromSet(cont, KEY_RAW, rawEmitter);
+ if (isEmptySet(cont.listeners)) {
+ // Check to protect against issue gh-730.
+ // if (cont.watcherUnusable) {
+ cont.watcher.close();
+ // }
+ FsWatchInstances.delete(fullPath);
+ HANDLER_KEYS.forEach(clearItem(cont));
+ cont.watcher = undefined;
+ Object.freeze(cont);
+ }
+ };
+};
+
+// fs_watchFile helpers
+
+// object to hold per-process fs_watchFile instances
+// (may be shared across chokidar FSWatcher instances)
+const FsWatchFileInstances = new Map();
+
+/**
+ * Instantiates the fs_watchFile interface or binds listeners
+ * to an existing one covering the same file system entry
+ * @param {String} path to be watched
+ * @param {String} fullPath absolute path
+ * @param {Object} options options to be passed to fs_watchFile
+ * @param {Object} handlers container for event listener functions
+ * @returns {Function} closer
+ */
+const setFsWatchFileListener = (path, fullPath, options, handlers) => {
+ const {listener, rawEmitter} = handlers;
+ let cont = FsWatchFileInstances.get(fullPath);
+
+ /* eslint-disable no-unused-vars, prefer-destructuring */
+ let listeners = new Set();
+ let rawEmitters = new Set();
+
+ const copts = cont && cont.options;
+ if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) {
+ // "Upgrade" the watcher to persistence or a quicker interval.
+ // This creates some unlikely edge case issues if the user mixes
+ // settings in a very weird way, but solving for those cases
+ // doesn't seem worthwhile for the added complexity.
+ listeners = cont.listeners;
+ rawEmitters = cont.rawEmitters;
+ fs.unwatchFile(fullPath);
+ cont = undefined;
+ }
+
+ /* eslint-enable no-unused-vars, prefer-destructuring */
+
+ if (cont) {
+ addAndConvert(cont, KEY_LISTENERS, listener);
+ addAndConvert(cont, KEY_RAW, rawEmitter);
+ } else {
+ // TODO
+ // listeners.add(listener);
+ // rawEmitters.add(rawEmitter);
+ cont = {
+ listeners: listener,
+ rawEmitters: rawEmitter,
+ options,
+ watcher: fs.watchFile(fullPath, options, (curr, prev) => {
+ foreach(cont.rawEmitters, (rawEmitter) => {
+ rawEmitter(EV_CHANGE, fullPath, {curr, prev});
+ });
+ const currmtime = curr.mtimeMs;
+ if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
+ foreach(cont.listeners, (listener) => listener(path, curr));
+ }
+ })
+ };
+ FsWatchFileInstances.set(fullPath, cont);
+ }
+ // const index = cont.listeners.indexOf(listener);
+
+ // Removes this instance's listeners and closes the underlying fs_watchFile
+ // instance if there are no more listeners left.
+ return () => {
+ delFromSet(cont, KEY_LISTENERS, listener);
+ delFromSet(cont, KEY_RAW, rawEmitter);
+ if (isEmptySet(cont.listeners)) {
+ FsWatchFileInstances.delete(fullPath);
+ fs.unwatchFile(fullPath);
+ cont.options = cont.watcher = undefined;
+ Object.freeze(cont);
+ }
+ };
+};
+
+/**
+ * @mixin
+ */
+class NodeFsHandler {
+
+/**
+ * @param {import("../index").FSWatcher} fsW
+ */
+constructor(fsW) {
+ this.fsw = fsW;
+ this._boundHandleError = (error) => fsW._handleError(error);
+}
+
+/**
+ * Watch file for changes with fs_watchFile or fs_watch.
+ * @param {String} path to file or dir
+ * @param {Function} listener on fs change
+ * @returns {Function} closer for the watcher instance
+ */
+_watchWithNodeFs(path, listener) {
+ const opts = this.fsw.options;
+ const directory = sysPath.dirname(path);
+ const basename = sysPath.basename(path);
+ const parent = this.fsw._getWatchedDir(directory);
+ parent.add(basename);
+ const absolutePath = sysPath.resolve(path);
+ const options = {persistent: opts.persistent};
+ if (!listener) listener = EMPTY_FN;
+
+ let closer;
+ if (opts.usePolling) {
+ options.interval = opts.enableBinaryInterval && isBinaryPath(basename) ?
+ opts.binaryInterval : opts.interval;
+ closer = setFsWatchFileListener(path, absolutePath, options, {
+ listener,
+ rawEmitter: this.fsw._emitRaw
+ });
+ } else {
+ closer = setFsWatchListener(path, absolutePath, options, {
+ listener,
+ errHandler: this._boundHandleError,
+ rawEmitter: this.fsw._emitRaw
+ });
+ }
+ return closer;
+}
+
+/**
+ * Watch a file and emit add event if warranted.
+ * @param {Path} file Path
+ * @param {fs.Stats} stats result of fs_stat
+ * @param {Boolean} initialAdd was the file added at watch instantiation?
+ * @returns {Function} closer for the watcher instance
+ */
+_handleFile(file, stats, initialAdd) {
+ if (this.fsw.closed) {
+ return;
+ }
+ const dirname = sysPath.dirname(file);
+ const basename = sysPath.basename(file);
+ const parent = this.fsw._getWatchedDir(dirname);
+ // stats is always present
+ let prevStats = stats;
+
+ // if the file is already being watched, do nothing
+ if (parent.has(basename)) return;
+
+ const listener = async (path, newStats) => {
+ if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return;
+ if (!newStats || newStats.mtimeMs === 0) {
+ try {
+ const newStats = await stat(file);
+ if (this.fsw.closed) return;
+ // Check that change event was not fired because of changed only accessTime.
+ const at = newStats.atimeMs;
+ const mt = newStats.mtimeMs;
+ if (!at || at <= mt || mt !== prevStats.mtimeMs) {
+ this.fsw._emit(EV_CHANGE, file, newStats);
+ }
+ if (isLinux && prevStats.ino !== newStats.ino) {
+ this.fsw._closeFile(path)
+ prevStats = newStats;
+ this.fsw._addPathCloser(path, this._watchWithNodeFs(file, listener));
+ } else {
+ prevStats = newStats;
+ }
+ } catch (error) {
+ // Fix issues where mtime is null but file is still present
+ this.fsw._remove(dirname, basename);
+ }
+ // add is about to be emitted if file not already tracked in parent
+ } else if (parent.has(basename)) {
+ // Check that change event was not fired because of changed only accessTime.
+ const at = newStats.atimeMs;
+ const mt = newStats.mtimeMs;
+ if (!at || at <= mt || mt !== prevStats.mtimeMs) {
+ this.fsw._emit(EV_CHANGE, file, newStats);
+ }
+ prevStats = newStats;
+ }
+ }
+ // kick off the watcher
+ const closer = this._watchWithNodeFs(file, listener);
+
+ // emit an add event if we're supposed to
+ if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) {
+ if (!this.fsw._throttle(EV_ADD, file, 0)) return;
+ this.fsw._emit(EV_ADD, file, stats);
+ }
+
+ return closer;
+}
+
+/**
+ * Handle symlinks encountered while reading a dir.
+ * @param {Object} entry returned by readdirp
+ * @param {String} directory path of dir being read
+ * @param {String} path of this item
+ * @param {String} item basename of this item
+ * @returns {Promise} true if no more processing is needed for this entry.
+ */
+async _handleSymlink(entry, directory, path, item) {
+ if (this.fsw.closed) {
+ return;
+ }
+ const full = entry.fullPath;
+ const dir = this.fsw._getWatchedDir(directory);
+
+ if (!this.fsw.options.followSymlinks) {
+ // watch symlink directly (don't follow) and detect changes
+ this.fsw._incrReadyCount();
+
+ let linkPath;
+ try {
+ linkPath = await fsrealpath(path);
+ } catch (e) {
+ this.fsw._emitReady();
+ return true;
+ }
+
+ if (this.fsw.closed) return;
+ if (dir.has(item)) {
+ if (this.fsw._symlinkPaths.get(full) !== linkPath) {
+ this.fsw._symlinkPaths.set(full, linkPath);
+ this.fsw._emit(EV_CHANGE, path, entry.stats);
+ }
+ } else {
+ dir.add(item);
+ this.fsw._symlinkPaths.set(full, linkPath);
+ this.fsw._emit(EV_ADD, path, entry.stats);
+ }
+ this.fsw._emitReady();
+ return true;
+ }
+
+ // don't follow the same symlink more than once
+ if (this.fsw._symlinkPaths.has(full)) {
+ return true;
+ }
+
+ this.fsw._symlinkPaths.set(full, true);
+}
+
+_handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
+ // Normalize the directory name on Windows
+ directory = sysPath.join(directory, EMPTY_STR);
+
+ if (!wh.hasGlob) {
+ throttler = this.fsw._throttle('readdir', directory, 1000);
+ if (!throttler) return;
+ }
+
+ const previous = this.fsw._getWatchedDir(wh.path);
+ const current = new Set();
+
+ let stream = this.fsw._readdirp(directory, {
+ fileFilter: entry => wh.filterPath(entry),
+ directoryFilter: entry => wh.filterDir(entry),
+ depth: 0
+ }).on(STR_DATA, async (entry) => {
+ if (this.fsw.closed) {
+ stream = undefined;
+ return;
+ }
+ const item = entry.path;
+ let path = sysPath.join(directory, item);
+ current.add(item);
+
+ if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) {
+ return;
+ }
+
+ if (this.fsw.closed) {
+ stream = undefined;
+ return;
+ }
+ // Files that present in current directory snapshot
+ // but absent in previous are added to watch list and
+ // emit `add` event.
+ if (item === target || !target && !previous.has(item)) {
+ this.fsw._incrReadyCount();
+
+ // ensure relativeness of path is preserved in case of watcher reuse
+ path = sysPath.join(dir, sysPath.relative(dir, path));
+
+ this._addToNodeFs(path, initialAdd, wh, depth + 1);
+ }
+ }).on(EV_ERROR, this._boundHandleError);
+
+ return new Promise(resolve =>
+ stream.once(STR_END, () => {
+ if (this.fsw.closed) {
+ stream = undefined;
+ return;
+ }
+ const wasThrottled = throttler ? throttler.clear() : false;
+
+ resolve();
+
+ // Files that absent in current directory snapshot
+ // but present in previous emit `remove` event
+ // and are removed from @watched[directory].
+ previous.getChildren().filter((item) => {
+ return item !== directory &&
+ !current.has(item) &&
+ // in case of intersecting globs;
+ // a path may have been filtered out of this readdir, but
+ // shouldn't be removed because it matches a different glob
+ (!wh.hasGlob || wh.filterPath({
+ fullPath: sysPath.resolve(directory, item)
+ }));
+ }).forEach((item) => {
+ this.fsw._remove(directory, item);
+ });
+
+ stream = undefined;
+
+ // one more time for any missed in case changes came in extremely quickly
+ if (wasThrottled) this._handleRead(directory, false, wh, target, dir, depth, throttler);
+ })
+ );
+}
+
+/**
+ * Read directory to add / remove files from `@watched` list and re-read it on change.
+ * @param {String} dir fs path
+ * @param {fs.Stats} stats
+ * @param {Boolean} initialAdd
+ * @param {Number} depth relative to user-supplied path
+ * @param {String} target child path targeted for watch
+ * @param {Object} wh Common watch helpers for this path
+ * @param {String} realpath
+ * @returns {Promise} closer for the watcher instance.
+ */
+async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) {
+ const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));
+ const tracked = parentDir.has(sysPath.basename(dir));
+ if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
+ if (!wh.hasGlob || wh.globFilter(dir)) this.fsw._emit(EV_ADD_DIR, dir, stats);
+ }
+
+ // ensure dir is tracked (harmless if redundant)
+ parentDir.add(sysPath.basename(dir));
+ this.fsw._getWatchedDir(dir);
+ let throttler;
+ let closer;
+
+ const oDepth = this.fsw.options.depth;
+ if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath)) {
+ if (!target) {
+ await this._handleRead(dir, initialAdd, wh, target, dir, depth, throttler);
+ if (this.fsw.closed) return;
+ }
+
+ closer = this._watchWithNodeFs(dir, (dirPath, stats) => {
+ // if current directory is removed, do nothing
+ if (stats && stats.mtimeMs === 0) return;
+
+ this._handleRead(dirPath, false, wh, target, dir, depth, throttler);
+ });
+ }
+ return closer;
+}
+
+/**
+ * Handle added file, directory, or glob pattern.
+ * Delegates call to _handleFile / _handleDir after checks.
+ * @param {String} path to file or ir
+ * @param {Boolean} initialAdd was the file added at watch instantiation?
+ * @param {Object} priorWh depth relative to user-supplied path
+ * @param {Number} depth Child path actually targeted for watch
+ * @param {String=} target Child path actually targeted for watch
+ * @returns {Promise}
+ */
+async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
+ const ready = this.fsw._emitReady;
+ if (this.fsw._isIgnored(path) || this.fsw.closed) {
+ ready();
+ return false;
+ }
+
+ const wh = this.fsw._getWatchHelpers(path, depth);
+ if (!wh.hasGlob && priorWh) {
+ wh.hasGlob = priorWh.hasGlob;
+ wh.globFilter = priorWh.globFilter;
+ wh.filterPath = entry => priorWh.filterPath(entry);
+ wh.filterDir = entry => priorWh.filterDir(entry);
+ }
+
+ // evaluate what is at the path we're being asked to watch
+ try {
+ const stats = await statMethods[wh.statMethod](wh.watchPath);
+ if (this.fsw.closed) return;
+ if (this.fsw._isIgnored(wh.watchPath, stats)) {
+ ready();
+ return false;
+ }
+
+ const follow = this.fsw.options.followSymlinks && !path.includes(STAR) && !path.includes(BRACE_START);
+ let closer;
+ if (stats.isDirectory()) {
+ const absPath = sysPath.resolve(path);
+ const targetPath = follow ? await fsrealpath(path) : path;
+ if (this.fsw.closed) return;
+ closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
+ if (this.fsw.closed) return;
+ // preserve this symlink's target path
+ if (absPath !== targetPath && targetPath !== undefined) {
+ this.fsw._symlinkPaths.set(absPath, targetPath);
+ }
+ } else if (stats.isSymbolicLink()) {
+ const targetPath = follow ? await fsrealpath(path) : path;
+ if (this.fsw.closed) return;
+ const parent = sysPath.dirname(wh.watchPath);
+ this.fsw._getWatchedDir(parent).add(wh.watchPath);
+ this.fsw._emit(EV_ADD, wh.watchPath, stats);
+ closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath);
+ if (this.fsw.closed) return;
+
+ // preserve this symlink's target path
+ if (targetPath !== undefined) {
+ this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath);
+ }
+ } else {
+ closer = this._handleFile(wh.watchPath, stats, initialAdd);
+ }
+ ready();
+
+ this.fsw._addPathCloser(path, closer);
+ return false;
+
+ } catch (error) {
+ if (this.fsw._handleError(error)) {
+ ready();
+ return path;
+ }
+ }
+}
+
+}
+
+module.exports = NodeFsHandler;
diff --git a/dashboard/node_modules/chokidar/package.json b/dashboard/node_modules/chokidar/package.json
new file mode 100644
index 0000000..e8f8b3d
--- /dev/null
+++ b/dashboard/node_modules/chokidar/package.json
@@ -0,0 +1,70 @@
+{
+ "name": "chokidar",
+ "description": "Minimal and efficient cross-platform file watching library",
+ "version": "3.6.0",
+ "homepage": "https://github.com/paulmillr/chokidar",
+ "author": "Paul Miller (https://paulmillr.com)",
+ "contributors": [
+ "Paul Miller (https://paulmillr.com)",
+ "Elan Shanker"
+ ],
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "main": "index.js",
+ "types": "./types/index.d.ts",
+ "dependencies": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ },
+ "devDependencies": {
+ "@types/node": "^14",
+ "chai": "^4.3",
+ "dtslint": "^3.3.0",
+ "eslint": "^7.0.0",
+ "mocha": "^7.0.0",
+ "rimraf": "^3.0.0",
+ "sinon": "^9.0.1",
+ "sinon-chai": "^3.3.0",
+ "typescript": "^4.4.3",
+ "upath": "^1.2.0"
+ },
+ "files": [
+ "index.js",
+ "lib/*.js",
+ "types/index.d.ts"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/paulmillr/chokidar.git"
+ },
+ "bugs": {
+ "url": "https://github.com/paulmillr/chokidar/issues"
+ },
+ "license": "MIT",
+ "scripts": {
+ "dtslint": "dtslint types",
+ "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
+ "build": "npm ls",
+ "mocha": "mocha --exit --timeout 90000",
+ "test": "npm run lint && npm run mocha"
+ },
+ "keywords": [
+ "fs",
+ "watch",
+ "watchFile",
+ "watcher",
+ "watching",
+ "file",
+ "fsevents"
+ ],
+ "funding": "https://paulmillr.com/funding/"
+}
diff --git a/dashboard/node_modules/chokidar/types/index.d.ts b/dashboard/node_modules/chokidar/types/index.d.ts
new file mode 100644
index 0000000..4558066
--- /dev/null
+++ b/dashboard/node_modules/chokidar/types/index.d.ts
@@ -0,0 +1,192 @@
+// TypeScript Version: 3.0
+
+///
+
+import * as fs from "fs";
+import { EventEmitter } from "events";
+import { Matcher } from 'anymatch';
+
+export class FSWatcher extends EventEmitter implements fs.FSWatcher {
+ options: WatchOptions;
+
+ /**
+ * Constructs a new FSWatcher instance with optional WatchOptions parameter.
+ */
+ constructor(options?: WatchOptions);
+
+ /**
+ * Add files, directories, or glob patterns for tracking. Takes an array of strings or just one
+ * string.
+ */
+ add(paths: string | ReadonlyArray): this;
+
+ /**
+ * Stop watching files, directories, or glob patterns. Takes an array of strings or just one
+ * string.
+ */
+ unwatch(paths: string | ReadonlyArray): this;
+
+ /**
+ * Returns an object representing all the paths on the file system being watched by this
+ * `FSWatcher` instance. The object's keys are all the directories (using absolute paths unless
+ * the `cwd` option was used), and the values are arrays of the names of the items contained in
+ * each directory.
+ */
+ getWatched(): {
+ [directory: string]: string[];
+ };
+
+ /**
+ * Removes all listeners from watched files.
+ */
+ close(): Promise;
+
+ on(event: 'add'|'addDir'|'change', listener: (path: string, stats?: fs.Stats) => void): this;
+
+ on(event: 'all', listener: (eventName: 'add'|'addDir'|'change'|'unlink'|'unlinkDir', path: string, stats?: fs.Stats) => void): this;
+
+ /**
+ * Error occurred
+ */
+ on(event: 'error', listener: (error: Error) => void): this;
+
+ /**
+ * Exposes the native Node `fs.FSWatcher events`
+ */
+ on(event: 'raw', listener: (eventName: string, path: string, details: any) => void): this;
+
+ /**
+ * Fires when the initial scan is complete
+ */
+ on(event: 'ready', listener: () => void): this;
+
+ on(event: 'unlink'|'unlinkDir', listener: (path: string) => void): this;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+
+ ref(): this;
+
+ unref(): this;
+}
+
+export interface WatchOptions {
+ /**
+ * Indicates whether the process should continue to run as long as files are being watched. If
+ * set to `false` when using `fsevents` to watch, no more events will be emitted after `ready`,
+ * even if the process continues to run.
+ */
+ persistent?: boolean;
+
+ /**
+ * ([anymatch](https://github.com/micromatch/anymatch)-compatible definition) Defines files/paths to
+ * be ignored. The whole relative or absolute path is tested, not just filename. If a function
+ * with two arguments is provided, it gets called twice per path - once with a single argument
+ * (the path), second time with two arguments (the path and the
+ * [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object of that path).
+ */
+ ignored?: Matcher;
+
+ /**
+ * If set to `false` then `add`/`addDir` events are also emitted for matching paths while
+ * instantiating the watching as chokidar discovers these file paths (before the `ready` event).
+ */
+ ignoreInitial?: boolean;
+
+ /**
+ * When `false`, only the symlinks themselves will be watched for changes instead of following
+ * the link references and bubbling events through the link's path.
+ */
+ followSymlinks?: boolean;
+
+ /**
+ * The base directory from which watch `paths` are to be derived. Paths emitted with events will
+ * be relative to this.
+ */
+ cwd?: string;
+
+ /**
+ * If set to true then the strings passed to .watch() and .add() are treated as literal path
+ * names, even if they look like globs. Default: false.
+ */
+ disableGlobbing?: boolean;
+
+ /**
+ * Whether to use fs.watchFile (backed by polling), or fs.watch. If polling leads to high CPU
+ * utilization, consider setting this to `false`. It is typically necessary to **set this to
+ * `true` to successfully watch files over a network**, and it may be necessary to successfully
+ * watch files in other non-standard situations. Setting to `true` explicitly on OS X overrides
+ * the `useFsEvents` default.
+ */
+ usePolling?: boolean;
+
+ /**
+ * Whether to use the `fsevents` watching interface if available. When set to `true` explicitly
+ * and `fsevents` is available this supercedes the `usePolling` setting. When set to `false` on
+ * OS X, `usePolling: true` becomes the default.
+ */
+ useFsEvents?: boolean;
+
+ /**
+ * If relying upon the [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object that
+ * may get passed with `add`, `addDir`, and `change` events, set this to `true` to ensure it is
+ * provided even in cases where it wasn't already available from the underlying watch events.
+ */
+ alwaysStat?: boolean;
+
+ /**
+ * If set, limits how many levels of subdirectories will be traversed.
+ */
+ depth?: number;
+
+ /**
+ * Interval of file system polling.
+ */
+ interval?: number;
+
+ /**
+ * Interval of file system polling for binary files. ([see list of binary extensions](https://gi
+ * thub.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json))
+ */
+ binaryInterval?: number;
+
+ /**
+ * Indicates whether to watch files that don't have read permissions if possible. If watching
+ * fails due to `EPERM` or `EACCES` with this set to `true`, the errors will be suppressed
+ * silently.
+ */
+ ignorePermissionErrors?: boolean;
+
+ /**
+ * `true` if `useFsEvents` and `usePolling` are `false`). Automatically filters out artifacts
+ * that occur when using editors that use "atomic writes" instead of writing directly to the
+ * source file. If a file is re-added within 100 ms of being deleted, Chokidar emits a `change`
+ * event rather than `unlink` then `add`. If the default of 100 ms does not work well for you,
+ * you can override it by setting `atomic` to a custom value, in milliseconds.
+ */
+ atomic?: boolean | number;
+
+ /**
+ * can be set to an object in order to adjust timing params:
+ */
+ awaitWriteFinish?: AwaitWriteFinishOptions | boolean;
+}
+
+export interface AwaitWriteFinishOptions {
+ /**
+ * Amount of time in milliseconds for a file size to remain constant before emitting its event.
+ */
+ stabilityThreshold?: number;
+
+ /**
+ * File size polling interval.
+ */
+ pollInterval?: number;
+}
+
+/**
+ * produces an instance of `FSWatcher`.
+ */
+export function watch(
+ paths: string | ReadonlyArray,
+ options?: WatchOptions
+): FSWatcher;
diff --git a/dashboard/node_modules/concat-map/.travis.yml b/dashboard/node_modules/concat-map/.travis.yml
new file mode 100644
index 0000000..f1d0f13
--- /dev/null
+++ b/dashboard/node_modules/concat-map/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - 0.4
+ - 0.6
diff --git a/dashboard/node_modules/concat-map/LICENSE b/dashboard/node_modules/concat-map/LICENSE
new file mode 100644
index 0000000..ee27ba4
--- /dev/null
+++ b/dashboard/node_modules/concat-map/LICENSE
@@ -0,0 +1,18 @@
+This software is released under the MIT license:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dashboard/node_modules/concat-map/README.markdown b/dashboard/node_modules/concat-map/README.markdown
new file mode 100644
index 0000000..408f70a
--- /dev/null
+++ b/dashboard/node_modules/concat-map/README.markdown
@@ -0,0 +1,62 @@
+concat-map
+==========
+
+Concatenative mapdashery.
+
+[](http://ci.testling.com/substack/node-concat-map)
+
+[](http://travis-ci.org/substack/node-concat-map)
+
+example
+=======
+
+``` js
+var concatMap = require('concat-map');
+var xs = [ 1, 2, 3, 4, 5, 6 ];
+var ys = concatMap(xs, function (x) {
+ return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
+});
+console.dir(ys);
+```
+
+***
+
+```
+[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]
+```
+
+methods
+=======
+
+``` js
+var concatMap = require('concat-map')
+```
+
+concatMap(xs, fn)
+-----------------
+
+Return an array of concatenated elements by calling `fn(x, i)` for each element
+`x` and each index `i` in the array `xs`.
+
+When `fn(x, i)` returns an array, its result will be concatenated with the
+result array. If `fn(x, i)` returns anything else, that value will be pushed
+onto the end of the result array.
+
+install
+=======
+
+With [npm](http://npmjs.org) do:
+
+```
+npm install concat-map
+```
+
+license
+=======
+
+MIT
+
+notes
+=====
+
+This module was written while sitting high above the ground in a tree.
diff --git a/dashboard/node_modules/concat-map/example/map.js b/dashboard/node_modules/concat-map/example/map.js
new file mode 100644
index 0000000..3365621
--- /dev/null
+++ b/dashboard/node_modules/concat-map/example/map.js
@@ -0,0 +1,6 @@
+var concatMap = require('../');
+var xs = [ 1, 2, 3, 4, 5, 6 ];
+var ys = concatMap(xs, function (x) {
+ return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
+});
+console.dir(ys);
diff --git a/dashboard/node_modules/concat-map/index.js b/dashboard/node_modules/concat-map/index.js
new file mode 100644
index 0000000..b29a781
--- /dev/null
+++ b/dashboard/node_modules/concat-map/index.js
@@ -0,0 +1,13 @@
+module.exports = function (xs, fn) {
+ var res = [];
+ for (var i = 0; i < xs.length; i++) {
+ var x = fn(xs[i], i);
+ if (isArray(x)) res.push.apply(res, x);
+ else res.push(x);
+ }
+ return res;
+};
+
+var isArray = Array.isArray || function (xs) {
+ return Object.prototype.toString.call(xs) === '[object Array]';
+};
diff --git a/dashboard/node_modules/concat-map/package.json b/dashboard/node_modules/concat-map/package.json
new file mode 100644
index 0000000..d3640e6
--- /dev/null
+++ b/dashboard/node_modules/concat-map/package.json
@@ -0,0 +1,43 @@
+{
+ "name" : "concat-map",
+ "description" : "concatenative mapdashery",
+ "version" : "0.0.1",
+ "repository" : {
+ "type" : "git",
+ "url" : "git://github.com/substack/node-concat-map.git"
+ },
+ "main" : "index.js",
+ "keywords" : [
+ "concat",
+ "concatMap",
+ "map",
+ "functional",
+ "higher-order"
+ ],
+ "directories" : {
+ "example" : "example",
+ "test" : "test"
+ },
+ "scripts" : {
+ "test" : "tape test/*.js"
+ },
+ "devDependencies" : {
+ "tape" : "~2.4.0"
+ },
+ "license" : "MIT",
+ "author" : {
+ "name" : "James Halliday",
+ "email" : "mail@substack.net",
+ "url" : "http://substack.net"
+ },
+ "testling" : {
+ "files" : "test/*.js",
+ "browsers" : {
+ "ie" : [ 6, 7, 8, 9 ],
+ "ff" : [ 3.5, 10, 15.0 ],
+ "chrome" : [ 10, 22 ],
+ "safari" : [ 5.1 ],
+ "opera" : [ 12 ]
+ }
+ }
+}
diff --git a/dashboard/node_modules/concat-map/test/map.js b/dashboard/node_modules/concat-map/test/map.js
new file mode 100644
index 0000000..fdbd702
--- /dev/null
+++ b/dashboard/node_modules/concat-map/test/map.js
@@ -0,0 +1,39 @@
+var concatMap = require('../');
+var test = require('tape');
+
+test('empty or not', function (t) {
+ var xs = [ 1, 2, 3, 4, 5, 6 ];
+ var ixes = [];
+ var ys = concatMap(xs, function (x, ix) {
+ ixes.push(ix);
+ return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
+ });
+ t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]);
+ t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]);
+ t.end();
+});
+
+test('always something', function (t) {
+ var xs = [ 'a', 'b', 'c', 'd' ];
+ var ys = concatMap(xs, function (x) {
+ return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ];
+ });
+ t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
+ t.end();
+});
+
+test('scalars', function (t) {
+ var xs = [ 'a', 'b', 'c', 'd' ];
+ var ys = concatMap(xs, function (x) {
+ return x === 'b' ? [ 'B', 'B', 'B' ] : x;
+ });
+ t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
+ t.end();
+});
+
+test('undefs', function (t) {
+ var xs = [ 'a', 'b', 'c', 'd' ];
+ var ys = concatMap(xs, function () {});
+ t.same(ys, [ undefined, undefined, undefined, undefined ]);
+ t.end();
+});
diff --git a/dashboard/node_modules/content-disposition/HISTORY.md b/dashboard/node_modules/content-disposition/HISTORY.md
new file mode 100644
index 0000000..488effa
--- /dev/null
+++ b/dashboard/node_modules/content-disposition/HISTORY.md
@@ -0,0 +1,60 @@
+0.5.4 / 2021-12-10
+==================
+
+ * deps: safe-buffer@5.2.1
+
+0.5.3 / 2018-12-17
+==================
+
+ * Use `safe-buffer` for improved Buffer API
+
+0.5.2 / 2016-12-08
+==================
+
+ * Fix `parse` to accept any linear whitespace character
+
+0.5.1 / 2016-01-17
+==================
+
+ * perf: enable strict mode
+
+0.5.0 / 2014-10-11
+==================
+
+ * Add `parse` function
+
+0.4.0 / 2014-09-21
+==================
+
+ * Expand non-Unicode `filename` to the full ISO-8859-1 charset
+
+0.3.0 / 2014-09-20
+==================
+
+ * Add `fallback` option
+ * Add `type` option
+
+0.2.0 / 2014-09-19
+==================
+
+ * Reduce ambiguity of file names with hex escape in buggy browsers
+
+0.1.2 / 2014-09-19
+==================
+
+ * Fix periodic invalid Unicode filename header
+
+0.1.1 / 2014-09-19
+==================
+
+ * Fix invalid characters appearing in `filename*` parameter
+
+0.1.0 / 2014-09-18
+==================
+
+ * Make the `filename` argument optional
+
+0.0.0 / 2014-09-18
+==================
+
+ * Initial release
diff --git a/dashboard/node_modules/content-disposition/LICENSE b/dashboard/node_modules/content-disposition/LICENSE
new file mode 100644
index 0000000..84441fb
--- /dev/null
+++ b/dashboard/node_modules/content-disposition/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014-2017 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dashboard/node_modules/content-disposition/README.md b/dashboard/node_modules/content-disposition/README.md
new file mode 100644
index 0000000..3a0bb05
--- /dev/null
+++ b/dashboard/node_modules/content-disposition/README.md
@@ -0,0 +1,142 @@
+# content-disposition
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][github-actions-ci-image]][github-actions-ci-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Create and parse HTTP `Content-Disposition` header
+
+## Installation
+
+```sh
+$ npm install content-disposition
+```
+
+## API
+
+```js
+var contentDisposition = require('content-disposition')
+```
+
+### contentDisposition(filename, options)
+
+Create an attachment `Content-Disposition` header value using the given file name,
+if supplied. The `filename` is optional and if no file name is desired, but you
+want to specify `options`, set `filename` to `undefined`.
+
+```js
+res.setHeader('Content-Disposition', contentDisposition('∫ maths.pdf'))
+```
+
+**note** HTTP headers are of the ISO-8859-1 character set. If you are writing this
+header through a means different from `setHeader` in Node.js, you'll want to specify
+the `'binary'` encoding in Node.js.
+
+#### Options
+
+`contentDisposition` accepts these properties in the options object.
+
+##### fallback
+
+If the `filename` option is outside ISO-8859-1, then the file name is actually
+stored in a supplemental field for clients that support Unicode file names and
+a ISO-8859-1 version of the file name is automatically generated.
+
+This specifies the ISO-8859-1 file name to override the automatic generation or
+disables the generation all together, defaults to `true`.
+
+ - A string will specify the ISO-8859-1 file name to use in place of automatic
+ generation.
+ - `false` will disable including a ISO-8859-1 file name and only include the
+ Unicode version (unless the file name is already ISO-8859-1).
+ - `true` will enable automatic generation if the file name is outside ISO-8859-1.
+
+If the `filename` option is ISO-8859-1 and this option is specified and has a
+different value, then the `filename` option is encoded in the extended field
+and this set as the fallback field, even though they are both ISO-8859-1.
+
+##### type
+
+Specifies the disposition type, defaults to `"attachment"`. This can also be
+`"inline"`, or any other value (all values except inline are treated like
+`attachment`, but can convey additional information if both parties agree to
+it). The type is normalized to lower-case.
+
+### contentDisposition.parse(string)
+
+```js
+var disposition = contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt')
+```
+
+Parse a `Content-Disposition` header string. This automatically handles extended
+("Unicode") parameters by decoding them and providing them under the standard
+parameter name. This will return an object with the following properties (examples
+are shown for the string `'attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt'`):
+
+ - `type`: The disposition type (always lower case). Example: `'attachment'`
+
+ - `parameters`: An object of the parameters in the disposition (name of parameter
+ always lower case and extended versions replace non-extended versions). Example:
+ `{filename: "€ rates.txt"}`
+
+## Examples
+
+### Send a file for download
+
+```js
+var contentDisposition = require('content-disposition')
+var destroy = require('destroy')
+var fs = require('fs')
+var http = require('http')
+var onFinished = require('on-finished')
+
+var filePath = '/path/to/public/plans.pdf'
+
+http.createServer(function onRequest (req, res) {
+ // set headers
+ res.setHeader('Content-Type', 'application/pdf')
+ res.setHeader('Content-Disposition', contentDisposition(filePath))
+
+ // send file
+ var stream = fs.createReadStream(filePath)
+ stream.pipe(res)
+ onFinished(res, function () {
+ destroy(stream)
+ })
+})
+```
+
+## Testing
+
+```sh
+$ npm test
+```
+
+## References
+
+- [RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1][rfc-2616]
+- [RFC 5987: Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters][rfc-5987]
+- [RFC 6266: Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)][rfc-6266]
+- [Test Cases for HTTP Content-Disposition header field (RFC 6266) and the Encodings defined in RFCs 2047, 2231 and 5987][tc-2231]
+
+[rfc-2616]: https://tools.ietf.org/html/rfc2616
+[rfc-5987]: https://tools.ietf.org/html/rfc5987
+[rfc-6266]: https://tools.ietf.org/html/rfc6266
+[tc-2231]: http://greenbytes.de/tech/tc2231/
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/content-disposition.svg
+[npm-url]: https://npmjs.org/package/content-disposition
+[node-version-image]: https://img.shields.io/node/v/content-disposition.svg
+[node-version-url]: https://nodejs.org/en/download
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-disposition.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/content-disposition?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/content-disposition.svg
+[downloads-url]: https://npmjs.org/package/content-disposition
+[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/content-disposition/ci/master?label=ci
+[github-actions-ci-url]: https://github.com/jshttp/content-disposition?query=workflow%3Aci
diff --git a/dashboard/node_modules/content-disposition/index.js b/dashboard/node_modules/content-disposition/index.js
new file mode 100644
index 0000000..ecec899
--- /dev/null
+++ b/dashboard/node_modules/content-disposition/index.js
@@ -0,0 +1,458 @@
+/*!
+ * content-disposition
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = contentDisposition
+module.exports.parse = parse
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var basename = require('path').basename
+var Buffer = require('safe-buffer').Buffer
+
+/**
+ * RegExp to match non attr-char, *after* encodeURIComponent (i.e. not including "%")
+ * @private
+ */
+
+var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g // eslint-disable-line no-control-regex
+
+/**
+ * RegExp to match percent encoding escape.
+ * @private
+ */
+
+var HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/
+var HEX_ESCAPE_REPLACE_REGEXP = /%([0-9A-Fa-f]{2})/g
+
+/**
+ * RegExp to match non-latin1 characters.
+ * @private
+ */
+
+var NON_LATIN1_REGEXP = /[^\x20-\x7e\xa0-\xff]/g
+
+/**
+ * RegExp to match quoted-pair in RFC 2616
+ *
+ * quoted-pair = "\" CHAR
+ * CHAR =
+ * @private
+ */
+
+var QESC_REGEXP = /\\([\u0000-\u007f])/g // eslint-disable-line no-control-regex
+
+/**
+ * RegExp to match chars that must be quoted-pair in RFC 2616
+ * @private
+ */
+
+var QUOTE_REGEXP = /([\\"])/g
+
+/**
+ * RegExp for various RFC 2616 grammar
+ *
+ * parameter = token "=" ( token | quoted-string )
+ * token = 1*
+ * separators = "(" | ")" | "<" | ">" | "@"
+ * | "," | ";" | ":" | "\" | <">
+ * | "/" | "[" | "]" | "?" | "="
+ * | "{" | "}" | SP | HT
+ * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
+ * qdtext = >
+ * quoted-pair = "\" CHAR
+ * CHAR =
+ * TEXT =
+ * LWS = [CRLF] 1*( SP | HT )
+ * CRLF = CR LF
+ * CR =
+ * LF =
+ * SP =
+ * HT =
+ * CTL =
+ * OCTET =
+ * @private
+ */
+
+var PARAM_REGEXP = /;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g // eslint-disable-line no-control-regex
+var TEXT_REGEXP = /^[\x20-\x7e\x80-\xff]+$/
+var TOKEN_REGEXP = /^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/
+
+/**
+ * RegExp for various RFC 5987 grammar
+ *
+ * ext-value = charset "'" [ language ] "'" value-chars
+ * charset = "UTF-8" / "ISO-8859-1" / mime-charset
+ * mime-charset = 1*mime-charsetc
+ * mime-charsetc = ALPHA / DIGIT
+ * / "!" / "#" / "$" / "%" / "&"
+ * / "+" / "-" / "^" / "_" / "`"
+ * / "{" / "}" / "~"
+ * language = ( 2*3ALPHA [ extlang ] )
+ * / 4ALPHA
+ * / 5*8ALPHA
+ * extlang = *3( "-" 3ALPHA )
+ * value-chars = *( pct-encoded / attr-char )
+ * pct-encoded = "%" HEXDIG HEXDIG
+ * attr-char = ALPHA / DIGIT
+ * / "!" / "#" / "$" / "&" / "+" / "-" / "."
+ * / "^" / "_" / "`" / "|" / "~"
+ * @private
+ */
+
+var EXT_VALUE_REGEXP = /^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/
+
+/**
+ * RegExp for various RFC 6266 grammar
+ *
+ * disposition-type = "inline" | "attachment" | disp-ext-type
+ * disp-ext-type = token
+ * disposition-parm = filename-parm | disp-ext-parm
+ * filename-parm = "filename" "=" value
+ * | "filename*" "=" ext-value
+ * disp-ext-parm = token "=" value
+ * | ext-token "=" ext-value
+ * ext-token =
+ * @private
+ */
+
+var DISPOSITION_TYPE_REGEXP = /^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/ // eslint-disable-line no-control-regex
+
+/**
+ * Create an attachment Content-Disposition header.
+ *
+ * @param {string} [filename]
+ * @param {object} [options]
+ * @param {string} [options.type=attachment]
+ * @param {string|boolean} [options.fallback=true]
+ * @return {string}
+ * @public
+ */
+
+function contentDisposition (filename, options) {
+ var opts = options || {}
+
+ // get type
+ var type = opts.type || 'attachment'
+
+ // get parameters
+ var params = createparams(filename, opts.fallback)
+
+ // format into string
+ return format(new ContentDisposition(type, params))
+}
+
+/**
+ * Create parameters object from filename and fallback.
+ *
+ * @param {string} [filename]
+ * @param {string|boolean} [fallback=true]
+ * @return {object}
+ * @private
+ */
+
+function createparams (filename, fallback) {
+ if (filename === undefined) {
+ return
+ }
+
+ var params = {}
+
+ if (typeof filename !== 'string') {
+ throw new TypeError('filename must be a string')
+ }
+
+ // fallback defaults to true
+ if (fallback === undefined) {
+ fallback = true
+ }
+
+ if (typeof fallback !== 'string' && typeof fallback !== 'boolean') {
+ throw new TypeError('fallback must be a string or boolean')
+ }
+
+ if (typeof fallback === 'string' && NON_LATIN1_REGEXP.test(fallback)) {
+ throw new TypeError('fallback must be ISO-8859-1 string')
+ }
+
+ // restrict to file base name
+ var name = basename(filename)
+
+ // determine if name is suitable for quoted string
+ var isQuotedString = TEXT_REGEXP.test(name)
+
+ // generate fallback name
+ var fallbackName = typeof fallback !== 'string'
+ ? fallback && getlatin1(name)
+ : basename(fallback)
+ var hasFallback = typeof fallbackName === 'string' && fallbackName !== name
+
+ // set extended filename parameter
+ if (hasFallback || !isQuotedString || HEX_ESCAPE_REGEXP.test(name)) {
+ params['filename*'] = name
+ }
+
+ // set filename parameter
+ if (isQuotedString || hasFallback) {
+ params.filename = hasFallback
+ ? fallbackName
+ : name
+ }
+
+ return params
+}
+
+/**
+ * Format object to Content-Disposition header.
+ *
+ * @param {object} obj
+ * @param {string} obj.type
+ * @param {object} [obj.parameters]
+ * @return {string}
+ * @private
+ */
+
+function format (obj) {
+ var parameters = obj.parameters
+ var type = obj.type
+
+ if (!type || typeof type !== 'string' || !TOKEN_REGEXP.test(type)) {
+ throw new TypeError('invalid type')
+ }
+
+ // start with normalized type
+ var string = String(type).toLowerCase()
+
+ // append parameters
+ if (parameters && typeof parameters === 'object') {
+ var param
+ var params = Object.keys(parameters).sort()
+
+ for (var i = 0; i < params.length; i++) {
+ param = params[i]
+
+ var val = param.substr(-1) === '*'
+ ? ustring(parameters[param])
+ : qstring(parameters[param])
+
+ string += '; ' + param + '=' + val
+ }
+ }
+
+ return string
+}
+
+/**
+ * Decode a RFC 5987 field value (gracefully).
+ *
+ * @param {string} str
+ * @return {string}
+ * @private
+ */
+
+function decodefield (str) {
+ var match = EXT_VALUE_REGEXP.exec(str)
+
+ if (!match) {
+ throw new TypeError('invalid extended field value')
+ }
+
+ var charset = match[1].toLowerCase()
+ var encoded = match[2]
+ var value
+
+ // to binary string
+ var binary = encoded.replace(HEX_ESCAPE_REPLACE_REGEXP, pdecode)
+
+ switch (charset) {
+ case 'iso-8859-1':
+ value = getlatin1(binary)
+ break
+ case 'utf-8':
+ value = Buffer.from(binary, 'binary').toString('utf8')
+ break
+ default:
+ throw new TypeError('unsupported charset in extended field')
+ }
+
+ return value
+}
+
+/**
+ * Get ISO-8859-1 version of string.
+ *
+ * @param {string} val
+ * @return {string}
+ * @private
+ */
+
+function getlatin1 (val) {
+ // simple Unicode -> ISO-8859-1 transformation
+ return String(val).replace(NON_LATIN1_REGEXP, '?')
+}
+
+/**
+ * Parse Content-Disposition header string.
+ *
+ * @param {string} string
+ * @return {object}
+ * @public
+ */
+
+function parse (string) {
+ if (!string || typeof string !== 'string') {
+ throw new TypeError('argument string is required')
+ }
+
+ var match = DISPOSITION_TYPE_REGEXP.exec(string)
+
+ if (!match) {
+ throw new TypeError('invalid type format')
+ }
+
+ // normalize type
+ var index = match[0].length
+ var type = match[1].toLowerCase()
+
+ var key
+ var names = []
+ var params = {}
+ var value
+
+ // calculate index to start at
+ index = PARAM_REGEXP.lastIndex = match[0].substr(-1) === ';'
+ ? index - 1
+ : index
+
+ // match parameters
+ while ((match = PARAM_REGEXP.exec(string))) {
+ if (match.index !== index) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ index += match[0].length
+ key = match[1].toLowerCase()
+ value = match[2]
+
+ if (names.indexOf(key) !== -1) {
+ throw new TypeError('invalid duplicate parameter')
+ }
+
+ names.push(key)
+
+ if (key.indexOf('*') + 1 === key.length) {
+ // decode extended value
+ key = key.slice(0, -1)
+ value = decodefield(value)
+
+ // overwrite existing value
+ params[key] = value
+ continue
+ }
+
+ if (typeof params[key] === 'string') {
+ continue
+ }
+
+ if (value[0] === '"') {
+ // remove quotes and escapes
+ value = value
+ .substr(1, value.length - 2)
+ .replace(QESC_REGEXP, '$1')
+ }
+
+ params[key] = value
+ }
+
+ if (index !== -1 && index !== string.length) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ return new ContentDisposition(type, params)
+}
+
+/**
+ * Percent decode a single character.
+ *
+ * @param {string} str
+ * @param {string} hex
+ * @return {string}
+ * @private
+ */
+
+function pdecode (str, hex) {
+ return String.fromCharCode(parseInt(hex, 16))
+}
+
+/**
+ * Percent encode a single character.
+ *
+ * @param {string} char
+ * @return {string}
+ * @private
+ */
+
+function pencode (char) {
+ return '%' + String(char)
+ .charCodeAt(0)
+ .toString(16)
+ .toUpperCase()
+}
+
+/**
+ * Quote a string for HTTP.
+ *
+ * @param {string} val
+ * @return {string}
+ * @private
+ */
+
+function qstring (val) {
+ var str = String(val)
+
+ return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"'
+}
+
+/**
+ * Encode a Unicode string for HTTP (RFC 5987).
+ *
+ * @param {string} val
+ * @return {string}
+ * @private
+ */
+
+function ustring (val) {
+ var str = String(val)
+
+ // percent encode as UTF-8
+ var encoded = encodeURIComponent(str)
+ .replace(ENCODE_URL_ATTR_CHAR_REGEXP, pencode)
+
+ return 'UTF-8\'\'' + encoded
+}
+
+/**
+ * Class for parsed Content-Disposition header for v8 optimization
+ *
+ * @public
+ * @param {string} type
+ * @param {object} parameters
+ * @constructor
+ */
+
+function ContentDisposition (type, parameters) {
+ this.type = type
+ this.parameters = parameters
+}
diff --git a/dashboard/node_modules/content-disposition/package.json b/dashboard/node_modules/content-disposition/package.json
new file mode 100644
index 0000000..43c70ce
--- /dev/null
+++ b/dashboard/node_modules/content-disposition/package.json
@@ -0,0 +1,44 @@
+{
+ "name": "content-disposition",
+ "description": "Create and parse Content-Disposition header",
+ "version": "0.5.4",
+ "author": "Douglas Christopher Wilson ",
+ "license": "MIT",
+ "keywords": [
+ "content-disposition",
+ "http",
+ "rfc6266",
+ "res"
+ ],
+ "repository": "jshttp/content-disposition",
+ "dependencies": {
+ "safe-buffer": "5.2.1"
+ },
+ "devDependencies": {
+ "deep-equal": "1.0.1",
+ "eslint": "7.32.0",
+ "eslint-config-standard": "13.0.1",
+ "eslint-plugin-import": "2.25.3",
+ "eslint-plugin-markdown": "2.2.1",
+ "eslint-plugin-node": "11.1.0",
+ "eslint-plugin-promise": "5.2.0",
+ "eslint-plugin-standard": "4.1.0",
+ "istanbul": "0.4.5",
+ "mocha": "9.1.3"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
+ }
+}
diff --git a/dashboard/node_modules/content-type/HISTORY.md b/dashboard/node_modules/content-type/HISTORY.md
new file mode 100644
index 0000000..4583671
--- /dev/null
+++ b/dashboard/node_modules/content-type/HISTORY.md
@@ -0,0 +1,29 @@
+1.0.5 / 2023-01-29
+==================
+
+ * perf: skip value escaping when unnecessary
+
+1.0.4 / 2017-09-11
+==================
+
+ * perf: skip parameter parsing when no parameters
+
+1.0.3 / 2017-09-10
+==================
+
+ * perf: remove argument reassignment
+
+1.0.2 / 2016-05-09
+==================
+
+ * perf: enable strict mode
+
+1.0.1 / 2015-02-13
+==================
+
+ * Improve missing `Content-Type` header error message
+
+1.0.0 / 2015-02-01
+==================
+
+ * Initial implementation, derived from `media-typer@0.3.0`
diff --git a/dashboard/node_modules/content-type/LICENSE b/dashboard/node_modules/content-type/LICENSE
new file mode 100644
index 0000000..34b1a2d
--- /dev/null
+++ b/dashboard/node_modules/content-type/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2015 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dashboard/node_modules/content-type/README.md b/dashboard/node_modules/content-type/README.md
new file mode 100644
index 0000000..c1a922a
--- /dev/null
+++ b/dashboard/node_modules/content-type/README.md
@@ -0,0 +1,94 @@
+# content-type
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-image]][node-url]
+[![Build Status][ci-image]][ci-url]
+[![Coverage Status][coveralls-image]][coveralls-url]
+
+Create and parse HTTP Content-Type header according to RFC 7231
+
+## Installation
+
+```sh
+$ npm install content-type
+```
+
+## API
+
+```js
+var contentType = require('content-type')
+```
+
+### contentType.parse(string)
+
+```js
+var obj = contentType.parse('image/svg+xml; charset=utf-8')
+```
+
+Parse a `Content-Type` header. This will return an object with the following
+properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`):
+
+ - `type`: The media type (the type and subtype, always lower case).
+ Example: `'image/svg+xml'`
+
+ - `parameters`: An object of the parameters in the media type (name of parameter
+ always lower case). Example: `{charset: 'utf-8'}`
+
+Throws a `TypeError` if the string is missing or invalid.
+
+### contentType.parse(req)
+
+```js
+var obj = contentType.parse(req)
+```
+
+Parse the `Content-Type` header from the given `req`. Short-cut for
+`contentType.parse(req.headers['content-type'])`.
+
+Throws a `TypeError` if the `Content-Type` header is missing or invalid.
+
+### contentType.parse(res)
+
+```js
+var obj = contentType.parse(res)
+```
+
+Parse the `Content-Type` header set on the given `res`. Short-cut for
+`contentType.parse(res.getHeader('content-type'))`.
+
+Throws a `TypeError` if the `Content-Type` header is missing or invalid.
+
+### contentType.format(obj)
+
+```js
+var str = contentType.format({
+ type: 'image/svg+xml',
+ parameters: { charset: 'utf-8' }
+})
+```
+
+Format an object into a `Content-Type` header. This will return a string of the
+content type for the given object with the following properties (examples are
+shown that produce the string `'image/svg+xml; charset=utf-8'`):
+
+ - `type`: The media type (will be lower-cased). Example: `'image/svg+xml'`
+
+ - `parameters`: An object of the parameters in the media type (name of the
+ parameter will be lower-cased). Example: `{charset: 'utf-8'}`
+
+Throws a `TypeError` if the object contains an invalid type or parameter names.
+
+## License
+
+[MIT](LICENSE)
+
+[ci-image]: https://badgen.net/github/checks/jshttp/content-type/master?label=ci
+[ci-url]: https://github.com/jshttp/content-type/actions/workflows/ci.yml
+[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/content-type/master
+[coveralls-url]: https://coveralls.io/r/jshttp/content-type?branch=master
+[node-image]: https://badgen.net/npm/node/content-type
+[node-url]: https://nodejs.org/en/download
+[npm-downloads-image]: https://badgen.net/npm/dm/content-type
+[npm-url]: https://npmjs.org/package/content-type
+[npm-version-image]: https://badgen.net/npm/v/content-type
diff --git a/dashboard/node_modules/content-type/index.js b/dashboard/node_modules/content-type/index.js
new file mode 100644
index 0000000..41840e7
--- /dev/null
+++ b/dashboard/node_modules/content-type/index.js
@@ -0,0 +1,225 @@
+/*!
+ * content-type
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
+ *
+ * parameter = token "=" ( token / quoted-string )
+ * token = 1*tchar
+ * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
+ * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
+ * / DIGIT / ALPHA
+ * ; any VCHAR, except delimiters
+ * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
+ * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
+ * obs-text = %x80-FF
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
+ */
+var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g // eslint-disable-line no-control-regex
+var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/ // eslint-disable-line no-control-regex
+var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/
+
+/**
+ * RegExp to match quoted-pair in RFC 7230 sec 3.2.6
+ *
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
+ * obs-text = %x80-FF
+ */
+var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g // eslint-disable-line no-control-regex
+
+/**
+ * RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6
+ */
+var QUOTE_REGEXP = /([\\"])/g
+
+/**
+ * RegExp to match type in RFC 7231 sec 3.1.1.1
+ *
+ * media-type = type "/" subtype
+ * type = token
+ * subtype = token
+ */
+var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/
+
+/**
+ * Module exports.
+ * @public
+ */
+
+exports.format = format
+exports.parse = parse
+
+/**
+ * Format object to media type.
+ *
+ * @param {object} obj
+ * @return {string}
+ * @public
+ */
+
+function format (obj) {
+ if (!obj || typeof obj !== 'object') {
+ throw new TypeError('argument obj is required')
+ }
+
+ var parameters = obj.parameters
+ var type = obj.type
+
+ if (!type || !TYPE_REGEXP.test(type)) {
+ throw new TypeError('invalid type')
+ }
+
+ var string = type
+
+ // append parameters
+ if (parameters && typeof parameters === 'object') {
+ var param
+ var params = Object.keys(parameters).sort()
+
+ for (var i = 0; i < params.length; i++) {
+ param = params[i]
+
+ if (!TOKEN_REGEXP.test(param)) {
+ throw new TypeError('invalid parameter name')
+ }
+
+ string += '; ' + param + '=' + qstring(parameters[param])
+ }
+ }
+
+ return string
+}
+
+/**
+ * Parse media type to object.
+ *
+ * @param {string|object} string
+ * @return {Object}
+ * @public
+ */
+
+function parse (string) {
+ if (!string) {
+ throw new TypeError('argument string is required')
+ }
+
+ // support req/res-like objects as argument
+ var header = typeof string === 'object'
+ ? getcontenttype(string)
+ : string
+
+ if (typeof header !== 'string') {
+ throw new TypeError('argument string is required to be a string')
+ }
+
+ var index = header.indexOf(';')
+ var type = index !== -1
+ ? header.slice(0, index).trim()
+ : header.trim()
+
+ if (!TYPE_REGEXP.test(type)) {
+ throw new TypeError('invalid media type')
+ }
+
+ var obj = new ContentType(type.toLowerCase())
+
+ // parse parameters
+ if (index !== -1) {
+ var key
+ var match
+ var value
+
+ PARAM_REGEXP.lastIndex = index
+
+ while ((match = PARAM_REGEXP.exec(header))) {
+ if (match.index !== index) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ index += match[0].length
+ key = match[1].toLowerCase()
+ value = match[2]
+
+ if (value.charCodeAt(0) === 0x22 /* " */) {
+ // remove quotes
+ value = value.slice(1, -1)
+
+ // remove escapes
+ if (value.indexOf('\\') !== -1) {
+ value = value.replace(QESC_REGEXP, '$1')
+ }
+ }
+
+ obj.parameters[key] = value
+ }
+
+ if (index !== header.length) {
+ throw new TypeError('invalid parameter format')
+ }
+ }
+
+ return obj
+}
+
+/**
+ * Get content-type from req/res objects.
+ *
+ * @param {object}
+ * @return {Object}
+ * @private
+ */
+
+function getcontenttype (obj) {
+ var header
+
+ if (typeof obj.getHeader === 'function') {
+ // res-like
+ header = obj.getHeader('content-type')
+ } else if (typeof obj.headers === 'object') {
+ // req-like
+ header = obj.headers && obj.headers['content-type']
+ }
+
+ if (typeof header !== 'string') {
+ throw new TypeError('content-type header is missing from object')
+ }
+
+ return header
+}
+
+/**
+ * Quote a string if necessary.
+ *
+ * @param {string} val
+ * @return {string}
+ * @private
+ */
+
+function qstring (val) {
+ var str = String(val)
+
+ // no need to quote tokens
+ if (TOKEN_REGEXP.test(str)) {
+ return str
+ }
+
+ if (str.length > 0 && !TEXT_REGEXP.test(str)) {
+ throw new TypeError('invalid parameter value')
+ }
+
+ return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"'
+}
+
+/**
+ * Class to represent a content type.
+ * @private
+ */
+function ContentType (type) {
+ this.parameters = Object.create(null)
+ this.type = type
+}
diff --git a/dashboard/node_modules/content-type/package.json b/dashboard/node_modules/content-type/package.json
new file mode 100644
index 0000000..9db19f6
--- /dev/null
+++ b/dashboard/node_modules/content-type/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "content-type",
+ "description": "Create and parse HTTP Content-Type header",
+ "version": "1.0.5",
+ "author": "Douglas Christopher Wilson ",
+ "license": "MIT",
+ "keywords": [
+ "content-type",
+ "http",
+ "req",
+ "res",
+ "rfc7231"
+ ],
+ "repository": "jshttp/content-type",
+ "devDependencies": {
+ "deep-equal": "1.0.1",
+ "eslint": "8.32.0",
+ "eslint-config-standard": "15.0.1",
+ "eslint-plugin-import": "2.27.5",
+ "eslint-plugin-node": "11.1.0",
+ "eslint-plugin-promise": "6.1.1",
+ "eslint-plugin-standard": "4.1.0",
+ "mocha": "10.2.0",
+ "nyc": "15.1.0"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
+ "test-cov": "nyc --reporter=html --reporter=text npm test",
+ "version": "node scripts/version-history.js && git add HISTORY.md"
+ }
+}
diff --git a/dashboard/node_modules/cookie-signature/.npmignore b/dashboard/node_modules/cookie-signature/.npmignore
new file mode 100644
index 0000000..f1250e5
--- /dev/null
+++ b/dashboard/node_modules/cookie-signature/.npmignore
@@ -0,0 +1,4 @@
+support
+test
+examples
+*.sock
diff --git a/dashboard/node_modules/cookie-signature/History.md b/dashboard/node_modules/cookie-signature/History.md
new file mode 100644
index 0000000..78513cc
--- /dev/null
+++ b/dashboard/node_modules/cookie-signature/History.md
@@ -0,0 +1,38 @@
+1.0.6 / 2015-02-03
+==================
+
+* use `npm test` instead of `make test` to run tests
+* clearer assertion messages when checking input
+
+
+1.0.5 / 2014-09-05
+==================
+
+* add license to package.json
+
+1.0.4 / 2014-06-25
+==================
+
+ * corrected avoidance of timing attacks (thanks @tenbits!)
+
+1.0.3 / 2014-01-28
+==================
+
+ * [incorrect] fix for timing attacks
+
+1.0.2 / 2014-01-28
+==================
+
+ * fix missing repository warning
+ * fix typo in test
+
+1.0.1 / 2013-04-15
+==================
+
+ * Revert "Changed underlying HMAC algo. to sha512."
+ * Revert "Fix for timing attacks on MAC verification."
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/dashboard/node_modules/cookie-signature/Readme.md b/dashboard/node_modules/cookie-signature/Readme.md
new file mode 100644
index 0000000..2559e84
--- /dev/null
+++ b/dashboard/node_modules/cookie-signature/Readme.md
@@ -0,0 +1,42 @@
+
+# cookie-signature
+
+ Sign and unsign cookies.
+
+## Example
+
+```js
+var cookie = require('cookie-signature');
+
+var val = cookie.sign('hello', 'tobiiscool');
+val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI');
+
+var val = cookie.sign('hello', 'tobiiscool');
+cookie.unsign(val, 'tobiiscool').should.equal('hello');
+cookie.unsign(val, 'luna').should.be.false;
+```
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2012 LearnBoost <tj@learnboost.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/dashboard/node_modules/cookie-signature/index.js b/dashboard/node_modules/cookie-signature/index.js
new file mode 100644
index 0000000..b8c9463
--- /dev/null
+++ b/dashboard/node_modules/cookie-signature/index.js
@@ -0,0 +1,51 @@
+/**
+ * Module dependencies.
+ */
+
+var crypto = require('crypto');
+
+/**
+ * Sign the given `val` with `secret`.
+ *
+ * @param {String} val
+ * @param {String} secret
+ * @return {String}
+ * @api private
+ */
+
+exports.sign = function(val, secret){
+ if ('string' != typeof val) throw new TypeError("Cookie value must be provided as a string.");
+ if ('string' != typeof secret) throw new TypeError("Secret string must be provided.");
+ return val + '.' + crypto
+ .createHmac('sha256', secret)
+ .update(val)
+ .digest('base64')
+ .replace(/\=+$/, '');
+};
+
+/**
+ * Unsign and decode the given `val` with `secret`,
+ * returning `false` if the signature is invalid.
+ *
+ * @param {String} val
+ * @param {String} secret
+ * @return {String|Boolean}
+ * @api private
+ */
+
+exports.unsign = function(val, secret){
+ if ('string' != typeof val) throw new TypeError("Signed cookie string must be provided.");
+ if ('string' != typeof secret) throw new TypeError("Secret string must be provided.");
+ var str = val.slice(0, val.lastIndexOf('.'))
+ , mac = exports.sign(str, secret);
+
+ return sha1(mac) == sha1(val) ? str : false;
+};
+
+/**
+ * Private
+ */
+
+function sha1(str){
+ return crypto.createHash('sha1').update(str).digest('hex');
+}
diff --git a/dashboard/node_modules/cookie-signature/package.json b/dashboard/node_modules/cookie-signature/package.json
new file mode 100644
index 0000000..29c4498
--- /dev/null
+++ b/dashboard/node_modules/cookie-signature/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "cookie-signature",
+ "version": "1.0.6",
+ "description": "Sign and unsign cookies",
+ "keywords": ["cookie", "sign", "unsign"],
+ "author": "TJ Holowaychuk ",
+ "license": "MIT",
+ "repository": { "type": "git", "url": "https://github.com/visionmedia/node-cookie-signature.git"},
+ "dependencies": {},
+ "devDependencies": {
+ "mocha": "*",
+ "should": "*"
+ },
+ "scripts": {
+ "test": "mocha --require should --reporter spec"
+ },
+ "main": "index"
+}
diff --git a/dashboard/node_modules/cookie/LICENSE b/dashboard/node_modules/cookie/LICENSE
new file mode 100644
index 0000000..058b6b4
--- /dev/null
+++ b/dashboard/node_modules/cookie/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2012-2014 Roman Shtylman
+Copyright (c) 2015 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/dashboard/node_modules/cookie/README.md b/dashboard/node_modules/cookie/README.md
new file mode 100644
index 0000000..71fdac1
--- /dev/null
+++ b/dashboard/node_modules/cookie/README.md
@@ -0,0 +1,317 @@
+# cookie
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-image]][node-url]
+[![Build Status][ci-image]][ci-url]
+[![Coverage Status][coveralls-image]][coveralls-url]
+
+Basic HTTP cookie parser and serializer for HTTP servers.
+
+## Installation
+
+This is a [Node.js](https://nodejs.org/en/) module available through the
+[npm registry](https://www.npmjs.com/). Installation is done using the
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
+
+```sh
+$ npm install cookie
+```
+
+## API
+
+```js
+var cookie = require('cookie');
+```
+
+### cookie.parse(str, options)
+
+Parse an HTTP `Cookie` header string and returning an object of all cookie name-value pairs.
+The `str` argument is the string representing a `Cookie` header value and `options` is an
+optional object containing additional parsing options.
+
+```js
+var cookies = cookie.parse('foo=bar; equation=E%3Dmc%5E2');
+// { foo: 'bar', equation: 'E=mc^2' }
+```
+
+#### Options
+
+`cookie.parse` accepts these properties in the options object.
+
+##### decode
+
+Specifies a function that will be used to decode a cookie's value. Since the value of a cookie
+has a limited character set (and must be a simple string), this function can be used to decode
+a previously-encoded cookie value into a JavaScript string or other object.
+
+The default function is the global `decodeURIComponent`, which will decode any URL-encoded
+sequences into their byte representations.
+
+**note** if an error is thrown from this function, the original, non-decoded cookie value will
+be returned as the cookie's value.
+
+### cookie.serialize(name, value, options)
+
+Serialize a cookie name-value pair into a `Set-Cookie` header string. The `name` argument is the
+name for the cookie, the `value` argument is the value to set the cookie to, and the `options`
+argument is an optional object containing additional serialization options.
+
+```js
+var setCookie = cookie.serialize('foo', 'bar');
+// foo=bar
+```
+
+#### Options
+
+`cookie.serialize` accepts these properties in the options object.
+
+##### domain
+
+Specifies the value for the [`Domain` `Set-Cookie` attribute][rfc-6265-5.2.3]. By default, no
+domain is set, and most clients will consider the cookie to apply to only the current domain.
+
+##### encode
+
+Specifies a function that will be used to encode a cookie's value. Since value of a cookie
+has a limited character set (and must be a simple string), this function can be used to encode
+a value into a string suited for a cookie's value.
+
+The default function is the global `encodeURIComponent`, which will encode a JavaScript string
+into UTF-8 byte sequences and then URL-encode any that fall outside of the cookie range.
+
+##### expires
+
+Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute][rfc-6265-5.2.1].
+By default, no expiration is set, and most clients will consider this a "non-persistent cookie" and
+will delete it on a condition like exiting a web browser application.
+
+**note** the [cookie storage model specification][rfc-6265-5.3] states that if both `expires` and
+`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this,
+so if both are set, they should point to the same date and time.
+
+##### httpOnly
+
+Specifies the `boolean` value for the [`HttpOnly` `Set-Cookie` attribute][rfc-6265-5.2.6]. When truthy,
+the `HttpOnly` attribute is set, otherwise it is not. By default, the `HttpOnly` attribute is not set.
+
+**note** be careful when setting this to `true`, as compliant clients will not allow client-side
+JavaScript to see the cookie in `document.cookie`.
+
+##### maxAge
+
+Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute][rfc-6265-5.2.2].
+The given number will be converted to an integer by rounding down. By default, no maximum age is set.
+
+**note** the [cookie storage model specification][rfc-6265-5.3] states that if both `expires` and
+`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this,
+so if both are set, they should point to the same date and time.
+
+##### partitioned
+
+Specifies the `boolean` value for the [`Partitioned` `Set-Cookie`](rfc-cutler-httpbis-partitioned-cookies)
+attribute. When truthy, the `Partitioned` attribute is set, otherwise it is not. By default, the
+`Partitioned` attribute is not set.
+
+**note** This is an attribute that has not yet been fully standardized, and may change in the future.
+This also means many clients may ignore this attribute until they understand it.
+
+More information about can be found in [the proposal](https://github.com/privacycg/CHIPS).
+
+##### path
+
+Specifies the value for the [`Path` `Set-Cookie` attribute][rfc-6265-5.2.4]. By default, the path
+is considered the ["default path"][rfc-6265-5.1.4].
+
+##### priority
+
+Specifies the `string` to be the value for the [`Priority` `Set-Cookie` attribute][rfc-west-cookie-priority-00-4.1].
+
+ - `'low'` will set the `Priority` attribute to `Low`.
+ - `'medium'` will set the `Priority` attribute to `Medium`, the default priority when not set.
+ - `'high'` will set the `Priority` attribute to `High`.
+
+More information about the different priority levels can be found in
+[the specification][rfc-west-cookie-priority-00-4.1].
+
+**note** This is an attribute that has not yet been fully standardized, and may change in the future.
+This also means many clients may ignore this attribute until they understand it.
+
+##### sameSite
+
+Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Cookie` attribute][rfc-6265bis-09-5.4.7].
+
+ - `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
+ - `false` will not set the `SameSite` attribute.
+ - `'lax'` will set the `SameSite` attribute to `Lax` for lax same site enforcement.
+ - `'none'` will set the `SameSite` attribute to `None` for an explicit cross-site cookie.
+ - `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
+
+More information about the different enforcement levels can be found in
+[the specification][rfc-6265bis-09-5.4.7].
+
+**note** This is an attribute that has not yet been fully standardized, and may change in the future.
+This also means many clients may ignore this attribute until they understand it.
+
+##### secure
+
+Specifies the `boolean` value for the [`Secure` `Set-Cookie` attribute][rfc-6265-5.2.5]. When truthy,
+the `Secure` attribute is set, otherwise it is not. By default, the `Secure` attribute is not set.
+
+**note** be careful when setting this to `true`, as compliant clients will not send the cookie back to
+the server in the future if the browser does not have an HTTPS connection.
+
+## Example
+
+The following example uses this module in conjunction with the Node.js core HTTP server
+to prompt a user for their name and display it back on future visits.
+
+```js
+var cookie = require('cookie');
+var escapeHtml = require('escape-html');
+var http = require('http');
+var url = require('url');
+
+function onRequest(req, res) {
+ // Parse the query string
+ var query = url.parse(req.url, true, true).query;
+
+ if (query && query.name) {
+ // Set a new cookie with the name
+ res.setHeader('Set-Cookie', cookie.serialize('name', String(query.name), {
+ httpOnly: true,
+ maxAge: 60 * 60 * 24 * 7 // 1 week
+ }));
+
+ // Redirect back after setting cookie
+ res.statusCode = 302;
+ res.setHeader('Location', req.headers.referer || '/');
+ res.end();
+ return;
+ }
+
+ // Parse the cookies on the request
+ var cookies = cookie.parse(req.headers.cookie || '');
+
+ // Get the visitor name set in the cookie
+ var name = cookies.name;
+
+ res.setHeader('Content-Type', 'text/html; charset=UTF-8');
+
+ if (name) {
+ res.write('Welcome back, ' + escapeHtml(name) + '!
');
+ } else {
+ res.write('Hello, new visitor!
');
+ }
+
+ res.write('');
+}
+
+http.createServer(onRequest).listen(3000);
+```
+
+## Testing
+
+```sh
+$ npm test
+```
+
+## Benchmark
+
+```
+$ npm run bench
+
+> cookie@0.5.0 bench
+> node benchmark/index.js
+
+ node@18.18.2
+ acorn@8.10.0
+ ada@2.6.0
+ ares@1.19.1
+ brotli@1.0.9
+ cldr@43.1
+ icu@73.2
+ llhttp@6.0.11
+ modules@108
+ napi@9
+ nghttp2@1.57.0
+ nghttp3@0.7.0
+ ngtcp2@0.8.1
+ openssl@3.0.10+quic
+ simdutf@3.2.14
+ tz@2023c
+ undici@5.26.3
+ unicode@15.0
+ uv@1.44.2
+ uvwasi@0.0.18
+ v8@10.2.154.26-node.26
+ zlib@1.2.13.1-motley
+
+> node benchmark/parse-top.js
+
+ cookie.parse - top sites
+
+ 14 tests completed.
+
+ parse accounts.google.com x 2,588,913 ops/sec ±0.74% (186 runs sampled)
+ parse apple.com x 2,370,002 ops/sec ±0.69% (186 runs sampled)
+ parse cloudflare.com x 2,213,102 ops/sec ±0.88% (188 runs sampled)
+ parse docs.google.com x 2,194,157 ops/sec ±1.03% (184 runs sampled)
+ parse drive.google.com x 2,265,084 ops/sec ±0.79% (187 runs sampled)
+ parse en.wikipedia.org x 457,099 ops/sec ±0.81% (186 runs sampled)
+ parse linkedin.com x 504,407 ops/sec ±0.89% (186 runs sampled)
+ parse maps.google.com x 1,230,959 ops/sec ±0.98% (186 runs sampled)
+ parse microsoft.com x 926,294 ops/sec ±0.88% (184 runs sampled)
+ parse play.google.com x 2,311,338 ops/sec ±0.83% (185 runs sampled)
+ parse support.google.com x 1,508,850 ops/sec ±0.86% (186 runs sampled)
+ parse www.google.com x 1,022,582 ops/sec ±1.32% (182 runs sampled)
+ parse youtu.be x 332,136 ops/sec ±1.02% (185 runs sampled)
+ parse youtube.com x 323,833 ops/sec ±0.77% (183 runs sampled)
+
+> node benchmark/parse.js
+
+ cookie.parse - generic
+
+ 6 tests completed.
+
+ simple x 3,214,032 ops/sec ±1.61% (183 runs sampled)
+ decode x 587,237 ops/sec ±1.16% (187 runs sampled)
+ unquote x 2,954,618 ops/sec ±1.35% (183 runs sampled)
+ duplicates x 857,008 ops/sec ±0.89% (187 runs sampled)
+ 10 cookies x 292,133 ops/sec ±0.89% (187 runs sampled)
+ 100 cookies x 22,610 ops/sec ±0.68% (187 runs sampled)
+```
+
+## References
+
+- [RFC 6265: HTTP State Management Mechanism][rfc-6265]
+- [Same-site Cookies][rfc-6265bis-09-5.4.7]
+
+[rfc-cutler-httpbis-partitioned-cookies]: https://tools.ietf.org/html/draft-cutler-httpbis-partitioned-cookies/
+[rfc-west-cookie-priority-00-4.1]: https://tools.ietf.org/html/draft-west-cookie-priority-00#section-4.1
+[rfc-6265bis-09-5.4.7]: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7
+[rfc-6265]: https://tools.ietf.org/html/rfc6265
+[rfc-6265-5.1.4]: https://tools.ietf.org/html/rfc6265#section-5.1.4
+[rfc-6265-5.2.1]: https://tools.ietf.org/html/rfc6265#section-5.2.1
+[rfc-6265-5.2.2]: https://tools.ietf.org/html/rfc6265#section-5.2.2
+[rfc-6265-5.2.3]: https://tools.ietf.org/html/rfc6265#section-5.2.3
+[rfc-6265-5.2.4]: https://tools.ietf.org/html/rfc6265#section-5.2.4
+[rfc-6265-5.2.5]: https://tools.ietf.org/html/rfc6265#section-5.2.5
+[rfc-6265-5.2.6]: https://tools.ietf.org/html/rfc6265#section-5.2.6
+[rfc-6265-5.3]: https://tools.ietf.org/html/rfc6265#section-5.3
+
+## License
+
+[MIT](LICENSE)
+
+[ci-image]: https://badgen.net/github/checks/jshttp/cookie/master?label=ci
+[ci-url]: https://github.com/jshttp/cookie/actions/workflows/ci.yml
+[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/cookie/master
+[coveralls-url]: https://coveralls.io/r/jshttp/cookie?branch=master
+[node-image]: https://badgen.net/npm/node/cookie
+[node-url]: https://nodejs.org/en/download
+[npm-downloads-image]: https://badgen.net/npm/dm/cookie
+[npm-url]: https://npmjs.org/package/cookie
+[npm-version-image]: https://badgen.net/npm/v/cookie
diff --git a/dashboard/node_modules/cookie/SECURITY.md b/dashboard/node_modules/cookie/SECURITY.md
new file mode 100644
index 0000000..fd4a6c5
--- /dev/null
+++ b/dashboard/node_modules/cookie/SECURITY.md
@@ -0,0 +1,25 @@
+# Security Policies and Procedures
+
+## Reporting a Bug
+
+The `cookie` team and community take all security bugs seriously. Thank
+you for improving the security of the project. We appreciate your efforts and
+responsible disclosure and will make every effort to acknowledge your
+contributions.
+
+Report security bugs by emailing the current owner(s) of `cookie`. This
+information can be found in the npm registry using the command
+`npm owner ls cookie`.
+If unsure or unable to get the information from the above, open an issue
+in the [project issue tracker](https://github.com/jshttp/cookie/issues)
+asking for the current contact information.
+
+To ensure the timely response to your report, please ensure that the entirety
+of the report is contained within the email body and not solely behind a web
+link or an attachment.
+
+At least one owner will acknowledge your email within 48 hours, and will send a
+more detailed response within 48 hours indicating the next steps in handling
+your report. After the initial reply to your report, the owners will
+endeavor to keep you informed of the progress towards a fix and full
+announcement, and may ask for additional information or guidance.
diff --git a/dashboard/node_modules/cookie/index.js b/dashboard/node_modules/cookie/index.js
new file mode 100644
index 0000000..51a58cb
--- /dev/null
+++ b/dashboard/node_modules/cookie/index.js
@@ -0,0 +1,334 @@
+/*!
+ * cookie
+ * Copyright(c) 2012-2014 Roman Shtylman
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module exports.
+ * @public
+ */
+
+exports.parse = parse;
+exports.serialize = serialize;
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var __toString = Object.prototype.toString
+
+/**
+ * RegExp to match cookie-name in RFC 6265 sec 4.1.1
+ * This refers out to the obsoleted definition of token in RFC 2616 sec 2.2
+ * which has been replaced by the token definition in RFC 7230 appendix B.
+ *
+ * cookie-name = token
+ * token = 1*tchar
+ * tchar = "!" / "#" / "$" / "%" / "&" / "'" /
+ * "*" / "+" / "-" / "." / "^" / "_" /
+ * "`" / "|" / "~" / DIGIT / ALPHA
+ */
+
+var cookieNameRegExp = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
+
+/**
+ * RegExp to match cookie-value in RFC 6265 sec 4.1.1
+ *
+ * cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
+ * cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
+ * ; US-ASCII characters excluding CTLs,
+ * ; whitespace DQUOTE, comma, semicolon,
+ * ; and backslash
+ */
+
+var cookieValueRegExp = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/;
+
+/**
+ * RegExp to match domain-value in RFC 6265 sec 4.1.1
+ *
+ * domain-value =
+ * ; defined in [RFC1034], Section 3.5, as
+ * ; enhanced by [RFC1123], Section 2.1
+ * =