Brunobkr commited on
Commit
cb207f0
·
verified ·
1 Parent(s): a4fa9c0

Upload folder using huggingface_hub (part 25)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. tools/ui/node_modules/array-buffer-byte-length/README.md +40 -0
  2. tools/ui/node_modules/array-buffer-byte-length/index.d.ts +4 -0
  3. tools/ui/node_modules/array-buffer-byte-length/index.js +14 -0
  4. tools/ui/node_modules/array-buffer-byte-length/package.json +94 -0
  5. tools/ui/node_modules/array-buffer-byte-length/test/index.js +29 -0
  6. tools/ui/node_modules/array-buffer-byte-length/tsconfig.json +9 -0
  7. tools/ui/node_modules/arraybuffer.prototype.slice/.editorconfig +13 -0
  8. tools/ui/node_modules/arraybuffer.prototype.slice/.eslintrc +34 -0
  9. tools/ui/node_modules/arraybuffer.prototype.slice/.nycrc +9 -0
  10. tools/ui/node_modules/arraybuffer.prototype.slice/CHANGELOG.md +52 -0
  11. tools/ui/node_modules/arraybuffer.prototype.slice/LICENSE +21 -0
  12. tools/ui/node_modules/arraybuffer.prototype.slice/README.md +61 -0
  13. tools/ui/node_modules/arraybuffer.prototype.slice/auto.js +3 -0
  14. tools/ui/node_modules/arraybuffer.prototype.slice/implementation.js +84 -0
  15. tools/ui/node_modules/arraybuffer.prototype.slice/index.js +18 -0
  16. tools/ui/node_modules/arraybuffer.prototype.slice/package.json +102 -0
  17. tools/ui/node_modules/arraybuffer.prototype.slice/polyfill.js +21 -0
  18. tools/ui/node_modules/arraybuffer.prototype.slice/shim.js +18 -0
  19. tools/ui/node_modules/arraybuffer.prototype.slice/test/implementation.js +32 -0
  20. tools/ui/node_modules/arraybuffer.prototype.slice/test/index.js +29 -0
  21. tools/ui/node_modules/arraybuffer.prototype.slice/test/shimmed.js +54 -0
  22. tools/ui/node_modules/arraybuffer.prototype.slice/test/tests.js +81 -0
  23. tools/ui/node_modules/assertion-error/LICENSE +21 -0
  24. tools/ui/node_modules/assertion-error/README.md +68 -0
  25. tools/ui/node_modules/assertion-error/index.d.ts +27 -0
  26. tools/ui/node_modules/assertion-error/index.js +60 -0
  27. tools/ui/node_modules/assertion-error/package.json +32 -0
  28. tools/ui/node_modules/ast-types/LICENSE +20 -0
  29. tools/ui/node_modules/ast-types/README.md +512 -0
  30. tools/ui/node_modules/ast-types/lib/def/babel-core.d.ts +2 -0
  31. tools/ui/node_modules/ast-types/lib/def/babel-core.js +241 -0
  32. tools/ui/node_modules/ast-types/lib/def/babel-core.js.map +1 -0
  33. tools/ui/node_modules/ast-types/lib/def/babel.d.ts +2 -0
  34. tools/ui/node_modules/ast-types/lib/def/babel.js +26 -0
  35. tools/ui/node_modules/ast-types/lib/def/babel.js.map +1 -0
  36. tools/ui/node_modules/ast-types/lib/def/core.d.ts +2 -0
  37. tools/ui/node_modules/ast-types/lib/def/core.js +281 -0
  38. tools/ui/node_modules/ast-types/lib/def/core.js.map +1 -0
  39. tools/ui/node_modules/ast-types/lib/def/es-proposals.d.ts +2 -0
  40. tools/ui/node_modules/ast-types/lib/def/es-proposals.js +70 -0
  41. tools/ui/node_modules/ast-types/lib/def/es-proposals.js.map +1 -0
  42. tools/ui/node_modules/ast-types/lib/def/es2016.d.ts +2 -0
  43. tools/ui/node_modules/ast-types/lib/def/es2016.js +17 -0
  44. tools/ui/node_modules/ast-types/lib/def/es2016.js.map +1 -0
  45. tools/ui/node_modules/ast-types/lib/def/es2017.d.ts +2 -0
  46. tools/ui/node_modules/ast-types/lib/def/es2017.js +22 -0
  47. tools/ui/node_modules/ast-types/lib/def/es2017.js.map +1 -0
  48. tools/ui/node_modules/ast-types/lib/def/es2018.d.ts +2 -0
  49. tools/ui/node_modules/ast-types/lib/def/es2018.js +36 -0
  50. tools/ui/node_modules/ast-types/lib/def/es2018.js.map +1 -0
tools/ui/node_modules/array-buffer-byte-length/README.md ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # array-buffer-byte-length <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
2
+
3
+ [![github actions][actions-image]][actions-url]
4
+ [![coverage][codecov-image]][codecov-url]
5
+ [![License][license-image]][license-url]
6
+ [![Downloads][downloads-image]][downloads-url]
7
+
8
+ [![npm badge][npm-badge-png]][package-url]
9
+
10
+ Get the byte length of an ArrayBuffer, even in engines without a `.byteLength` method.
11
+
12
+ ## Example
13
+
14
+ ```js
15
+ const assert = require('assert');
16
+ const byteLength = require('array-buffer-byte-length');
17
+
18
+ assert.equal(byteLength([]), NaN, 'an array is not an ArrayBuffer, yields NaN');
19
+
20
+ assert.equal(byteLength(new ArrayBuffer(0)), 0, 'ArrayBuffer of byteLength 0, yields 0');
21
+ ```
22
+
23
+ ## Tests
24
+ Simply clone the repo, `npm install`, and run `npm test`
25
+
26
+ [package-url]: https://npmjs.org/package/array-buffer-byte-length
27
+ [npm-version-svg]: https://versionbadg.es/inspect-js/array-buffer-byte-length.svg
28
+ [deps-svg]: https://david-dm.org/inspect-js/array-buffer-byte-length.svg
29
+ [deps-url]: https://david-dm.org/inspect-js/array-buffer-byte-length
30
+ [dev-deps-svg]: https://david-dm.org/inspect-js/array-buffer-byte-length/dev-status.svg
31
+ [dev-deps-url]: https://david-dm.org/inspect-js/array-buffer-byte-length#info=devDependencies
32
+ [npm-badge-png]: https://nodei.co/npm/array-buffer-byte-length.png?downloads=true&stars=true
33
+ [license-image]: https://img.shields.io/npm/l/array-buffer-byte-length.svg
34
+ [license-url]: LICENSE
35
+ [downloads-image]: https://img.shields.io/npm/dm/array-buffer-byte-length.svg
36
+ [downloads-url]: https://npm-stat.com/charts.html?package=array-buffer-byte-length
37
+ [codecov-image]: https://codecov.io/gh/inspect-js/array-buffer-byte-length/branch/main/graphs/badge.svg
38
+ [codecov-url]: https://app.codecov.io/gh/inspect-js/array-buffer-byte-length/
39
+ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/array-buffer-byte-length
40
+ [actions-url]: https://github.com/inspect-js/array-buffer-byte-length/actions
tools/ui/node_modules/array-buffer-byte-length/index.d.ts ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ declare function arrayBufferByteLength(buffer: ArrayBuffer): number;
2
+ declare function arrayBufferByteLength(buffer: unknown): typeof NaN;
3
+
4
+ export = arrayBufferByteLength;
tools/ui/node_modules/array-buffer-byte-length/index.js ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var callBound = require('call-bound');
4
+ var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true);
5
+
6
+ var isArrayBuffer = require('is-array-buffer');
7
+
8
+ /** @type {import('.')} */
9
+ module.exports = function byteLength(ab) {
10
+ if (!isArrayBuffer(ab)) {
11
+ return NaN;
12
+ }
13
+ return $byteLength ? $byteLength(ab) : ab.byteLength;
14
+ }; // in node < 0.11, byteLength is an own nonconfigurable property
tools/ui/node_modules/array-buffer-byte-length/package.json ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "array-buffer-byte-length",
3
+ "version": "1.0.2",
4
+ "description": "Get the byte length of an ArrayBuffer, even in engines without a `.byteLength` method.",
5
+ "main": "index.js",
6
+ "exports": {
7
+ ".": "./index.js",
8
+ "./package.json": "./package.json"
9
+ },
10
+ "sideEffects": false,
11
+ "types": "./index.d.ts",
12
+ "scripts": {
13
+ "prepack": "npmignore --auto --commentLines=autogenerated",
14
+ "prepublishOnly": "safe-publish-latest",
15
+ "prepublish": "not-in-publish || npm run prepublishOnly",
16
+ "pretest": "npm run lint",
17
+ "prelint": "evalmd README.md",
18
+ "lint": "eslint --ext=js,mjs .",
19
+ "postlint": "tsc && attw -P",
20
+ "tests-only": "nyc tape 'test/**/*.js'",
21
+ "test": "npm run tests-only",
22
+ "posttest": "npx npm@'>= 10.2' audit --production",
23
+ "version": "auto-changelog && git add CHANGELOG.md",
24
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
25
+ },
26
+ "keywords": [
27
+ "shim",
28
+ "polyfill",
29
+ "ArrayBuffer",
30
+ "byteLength",
31
+ "byte",
32
+ "length",
33
+ "es-shim API",
34
+ "es-shims"
35
+ ],
36
+ "author": "Jordan Harband <ljharb@gmail.com>",
37
+ "funding": {
38
+ "url": "https://github.com/sponsors/ljharb"
39
+ },
40
+ "license": "MIT",
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "git+https://github.com/inspect-js/array-buffer-byte-length.git"
44
+ },
45
+ "bugs": {
46
+ "url": "https://github.com/inspect-js/array-buffer-byte-length/issues"
47
+ },
48
+ "homepage": "https://github.com/inspect-js/array-buffer-byte-length#readme",
49
+ "dependencies": {
50
+ "call-bound": "^1.0.3",
51
+ "is-array-buffer": "^3.0.5"
52
+ },
53
+ "devDependencies": {
54
+ "@arethetypeswrong/cli": "^0.17.1",
55
+ "@ljharb/eslint-config": "^21.1.1",
56
+ "@ljharb/tsconfig": "^0.2.2",
57
+ "@types/es-value-fixtures": "^1.4.4",
58
+ "@types/for-each": "^0.3.3",
59
+ "@types/object-inspect": "^1.13.0",
60
+ "@types/tape": "^5.8.0",
61
+ "auto-changelog": "^2.5.0",
62
+ "encoding": "^0.1.13",
63
+ "es-value-fixtures": "^1.5.0",
64
+ "eslint": "=8.8.0",
65
+ "evalmd": "^0.0.19",
66
+ "for-each": "^0.3.3",
67
+ "in-publish": "^2.0.1",
68
+ "npmignore": "^0.3.1",
69
+ "nyc": "^10.3.2",
70
+ "object-inspect": "^1.13.3",
71
+ "safe-publish-latest": "^2.0.0",
72
+ "tape": "^5.9.0",
73
+ "typescript": "next"
74
+ },
75
+ "auto-changelog": {
76
+ "output": "CHANGELOG.md",
77
+ "template": "keepachangelog",
78
+ "unreleased": false,
79
+ "commitLimit": false,
80
+ "backfillLimit": false,
81
+ "hideCredit": true
82
+ },
83
+ "testling": {
84
+ "files": "test/index.js"
85
+ },
86
+ "publishConfig": {
87
+ "ignore": [
88
+ ".github/workflows"
89
+ ]
90
+ },
91
+ "engines": {
92
+ "node": ">= 0.4"
93
+ }
94
+ }
tools/ui/node_modules/array-buffer-byte-length/test/index.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var test = require('tape');
4
+ var forEach = require('for-each');
5
+ var v = require('es-value-fixtures');
6
+ var inspect = require('object-inspect');
7
+
8
+ var byteLength = require('../');
9
+
10
+ test('byteLength', function (t) {
11
+ forEach(v.objects.concat(v.primitives), function (nonAB) {
12
+ t.equal(byteLength(nonAB), NaN, inspect(nonAB) + ' is not an ArrayBuffer, and yields NaN');
13
+ });
14
+
15
+ t.test('ArrayBuffers', { skip: typeof ArrayBuffer !== 'function' }, function (st) {
16
+ var ab32 = new ArrayBuffer(32);
17
+ st.equal(byteLength(ab32), 32, 'works on an ArrayBuffer of length 32: ' + inspect(ab32));
18
+
19
+ var ab0 = new ArrayBuffer(0);
20
+ st.equal(byteLength(ab0), 0, 'works on an ArrayBuffer of length 0: ' + inspect(ab0));
21
+
22
+ var dv = new DataView(ab32);
23
+ st.equal(byteLength(dv), NaN, 'a DataView returns NaN');
24
+
25
+ st.end();
26
+ });
27
+
28
+ t.end();
29
+ });
tools/ui/node_modules/array-buffer-byte-length/tsconfig.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "extends": "@ljharb/tsconfig",
3
+ "compilerOptions": {
4
+ "target": "ES2021",
5
+ },
6
+ "exclude": [
7
+ "coverage",
8
+ ],
9
+ }
tools/ui/node_modules/arraybuffer.prototype.slice/.editorconfig ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = tab;
5
+ insert_final_newline = true;
6
+ quote_type = auto;
7
+ space_after_anonymous_functions = true;
8
+ space_after_control_statements = true;
9
+ spaces_around_operators = true;
10
+ trim_trailing_whitespace = true;
11
+ spaces_in_brackets = false;
12
+ end_of_line = lf;
13
+
tools/ui/node_modules/arraybuffer.prototype.slice/.eslintrc ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "root": true,
3
+
4
+ "extends": "@ljharb",
5
+
6
+ "rules": {
7
+ "id-length": 0,
8
+ "max-params": 0,
9
+ "max-statements": 0,
10
+ "multiline-comment-style": 0,
11
+ "new-cap": [2, {
12
+ "capIsNewExceptions": [
13
+ "IsSharedArrayBuffer",
14
+ "ToIntegerOrInfinity",
15
+ "GetIntrinsic",
16
+ "IsDetachedBuffer",
17
+ "SpeciesConstructor",
18
+ ],
19
+ }],
20
+ },
21
+
22
+ "overrides": [
23
+ {
24
+ "files": "test/**",
25
+ "globals": {
26
+ "ArrayBuffer": false,
27
+ "Uint8Array": false,
28
+ },
29
+ "rules": {
30
+ "max-lines-per-function": 0,
31
+ },
32
+ },
33
+ ],
34
+ }
tools/ui/node_modules/arraybuffer.prototype.slice/.nycrc ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "all": true,
3
+ "check-coverage": false,
4
+ "reporter": ["text-summary", "text", "html", "json"],
5
+ "exclude": [
6
+ "coverage",
7
+ "test"
8
+ ]
9
+ }
tools/ui/node_modules/arraybuffer.prototype.slice/CHANGELOG.md ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [v1.0.4](https://github.com/es-shims/ArrayBuffer.prototype.slice/compare/v1.0.3...v1.0.4) - 2024-12-15
9
+
10
+ ### Commits
11
+
12
+ - [actions] split out node 10-20, and 20+ [`5e59635`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/5e59635c948994b613c544b4e94fe93536d6b213)
13
+ - [Deps] update `call-bind`, `es-abstract`, `get-intrinsic` [`0afbb59`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/0afbb5942574055a8a3afdf0f69f60313e3f1af2)
14
+ - [Dev Deps] update `@es-shims/api`, `auto-changelog`, `es-value-fixtures`, `object-inspect`, `tape` [`d76caf4`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/d76caf4880ef358cf5384a6eb29d0f2f67e4d3a8)
15
+ - [Deps] update `call-bind`, `es-abstract`, `es-errors`, `get-intrinsic` [`2b374a2`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/2b374a2d4078d9122ac30bdecd8a8fae740aa74c)
16
+ - [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `object-inspect`, `tape` [`a24fd39`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/a24fd39370d891ea3439f9d7a1c42183c0aa1bf7)
17
+ - [Tests] replace `aud` with `npm audit` [`c704fb0`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/c704fb0b1651ceb56b609a5b4646a993fc868219)
18
+ - [Deps] remove unused dependency [`0274b32`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/0274b32ab1d345fbf70745a79dd7a44f844179bb)
19
+ - [Dev Deps] add missing peer dep [`673f754`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/673f754797dd0c40801cca2f32ff08b372448c6b)
20
+
21
+ ## [v1.0.3](https://github.com/es-shims/ArrayBuffer.prototype.slice/compare/v1.0.2...v1.0.3) - 2024-02-04
22
+
23
+ ### Commits
24
+
25
+ - [Deps] update `array-buffer-byte-length`, `call-bind`, `define-properties`, `es-abstract`, `get-intrinsic`, `is-array-buffer` [`d9b6859`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/d9b68591ff509613d0dfc4036539ba4e0dc34931)
26
+ - [Dev Deps] update `aud`, `npmignore`, `object-inspect`, `tape` [`38cb58d`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/38cb58dfa3f3c8b11bfb2144f8e7cc74dd461f5e)
27
+ - [Refactor] use `es-errors` where possible, so things that only need those do not need `get-intrinsic` [`5c07bef`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/5c07befd134cae93ad5f9ab307ff67691ff5155b)
28
+
29
+ ## [v1.0.2](https://github.com/es-shims/ArrayBuffer.prototype.slice/compare/v1.0.1...v1.0.2) - 2023-09-05
30
+
31
+ ### Commits
32
+
33
+ - [Deps] update `es-abstract` [`a9ab0d2`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/a9ab0d2551bb301b740e333ea3795fad23fcbe40)
34
+ - [Dev Deps] update `tape` [`6b24af5`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/6b24af585dc9176c8ac3fd482cb1d5257e550a09)
35
+ - [Fix] move `es-abstract` to runtime deps [`63a8397`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/63a8397623d7749856f6392ae93bf87152c3916c)
36
+
37
+ ## [v1.0.1](https://github.com/es-shims/ArrayBuffer.prototype.slice/compare/v1.0.0...v1.0.1) - 2023-07-11
38
+
39
+ ### Commits
40
+
41
+ - [Fix] node &lt; 0.11 has an own nonconfigurable `slice` property; use it [`554823c`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/554823c92ce16d6b7184a7d0ccfe315b663584d7)
42
+ - [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `es-abstract`, `tape` [`53b0421`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/53b04217048c645306597e2cfc55adb69c384146)
43
+ - [Deps] update `define-properties`, `get-intrinsic` [`4966b02`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/4966b02bc25ac006709b29ca370b9f6e159f723a)
44
+
45
+ ## v1.0.0 - 2023-07-09
46
+
47
+ ### Commits
48
+
49
+ - Initial implementation, tests, readme [`36b4b5e`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/36b4b5eedfa225c3086e9453b9db0088c299640a)
50
+ - Initial commit [`51499df`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/51499dfac7d8c67c2928cb47363a4de7ff17904a)
51
+ - npm init [`8ec604e`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/8ec604e7d3ef8d4c27376b09645f779c2244b08f)
52
+ - Only apps should have lockfiles [`ac54435`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/ac54435161d4415e2122e3a682499f3a6df2f6de)
tools/ui/node_modules/arraybuffer.prototype.slice/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2023 ECMAScript Shims
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
tools/ui/node_modules/arraybuffer.prototype.slice/README.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ArrayBuffer.prototype.slice <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
2
+
3
+ [![github actions][actions-image]][actions-url]
4
+ [![coverage][codecov-image]][codecov-url]
5
+ [![License][license-image]][license-url]
6
+ [![Downloads][downloads-image]][downloads-url]
7
+
8
+ [![npm badge][npm-badge-png]][package-url]
9
+
10
+ An ES spec-compliant `ArrayBuffer.prototype.slice` shim. Invoke its "shim" method to shim ArrayBuffer.prototype.slice if it is unavailable.
11
+
12
+ This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES5-supported environment and complies with the [spec](https://tc39.es/ecma262/#sec-arraybuffer.prototype.slice).
13
+
14
+ Most common usage:
15
+ ```js
16
+ var assert = require('assert');
17
+ var slice = require('arraybuffer.prototype.slice');
18
+
19
+ var ab = new ArrayBuffer(1);
20
+ var arr = new Uint8Array(ab);
21
+ arr[0] = 123;
22
+
23
+ var ab2 = slice(ab);
24
+
25
+ var arr2 = new Uint8Array(ab2);
26
+ arr2[0] = 234;
27
+
28
+ assert.deepEqual(arr, new Uint8Array([123]));
29
+ assert.deepEqual(arr2, new Uint8Array([234]));
30
+
31
+ if (!ArrayBuffer.prototype.transfer) {
32
+ slice.shim();
33
+ }
34
+
35
+ var ab2 = ab.slice();
36
+
37
+ var arr2 = new Uint8Array(ab2);
38
+ arr2[0] = 234;
39
+
40
+ assert.deepEqual(arr, new Uint8Array([123]));
41
+ assert.deepEqual(arr2, new Uint8Array([234]));
42
+ ```
43
+
44
+ ## Tests
45
+ Simply clone the repo, `npm install`, and run `npm test`
46
+
47
+ [package-url]: https://npmjs.org/package/arraybuffer.prototype.slice
48
+ [npm-version-svg]: https://versionbadg.es/es-shims/ArrayBuffer.prototype.slice.svg
49
+ [deps-svg]: https://david-dm.org/es-shims/ArrayBuffer.prototype.slice.svg
50
+ [deps-url]: https://david-dm.org/es-shims/ArrayBuffer.prototype.slice
51
+ [dev-deps-svg]: https://david-dm.org/es-shims/ArrayBuffer.prototype.slice/dev-status.svg
52
+ [dev-deps-url]: https://david-dm.org/es-shims/ArrayBuffer.prototype.slice#info=devDependencies
53
+ [npm-badge-png]: https://nodei.co/npm/arraybuffer.prototype.slice.png?downloads=true&stars=true
54
+ [license-image]: https://img.shields.io/npm/l/arraybuffer.prototype.slice.svg
55
+ [license-url]: LICENSE
56
+ [downloads-image]: https://img.shields.io/npm/dm/arraybuffer.prototype.slice.svg
57
+ [downloads-url]: https://npm-stat.com/charts.html?package=arraybuffer.prototype.slice
58
+ [codecov-image]: https://codecov.io/gh/es-shims/ArrayBuffer.prototype.slice/branch/main/graphs/badge.svg
59
+ [codecov-url]: https://app.codecov.io/gh/es-shims/ArrayBuffer.prototype.slice/
60
+ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/ArrayBuffer.prototype.slice
61
+ [actions-url]: https://github.com/es-shims/ArrayBuffer.prototype.slice/actions
tools/ui/node_modules/arraybuffer.prototype.slice/auto.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ 'use strict';
2
+
3
+ require('./shim')();
tools/ui/node_modules/arraybuffer.prototype.slice/implementation.js ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $ArrayBuffer = GetIntrinsic('%ArrayBuffer%', true);
6
+ var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
7
+
8
+ var IsDetachedBuffer = require('es-abstract/2024/IsDetachedBuffer');
9
+ var IsSharedArrayBuffer = require('es-abstract/2024/IsSharedArrayBuffer');
10
+ var max = require('es-abstract/2024/max');
11
+ var min = require('es-abstract/2024/min');
12
+ var SpeciesConstructor = require('es-abstract/2024/SpeciesConstructor');
13
+ var ToIntegerOrInfinity = require('es-abstract/2024/ToIntegerOrInfinity');
14
+
15
+ var arrayBufferByteLength = require('array-buffer-byte-length');
16
+ var isArrayBuffer = require('is-array-buffer');
17
+ var $TypeError = require('es-errors/type');
18
+
19
+ module.exports = function slice(start, end) {
20
+ var O = this; // step 1
21
+
22
+ if (!isArrayBuffer(O) || IsSharedArrayBuffer(O) || IsDetachedBuffer(O)) {
23
+ throw new $TypeError('receiver must be a non-detached, non-shared ArrayBuffer'); // steps 2-4
24
+ }
25
+
26
+ var len = arrayBufferByteLength(O); // step 5
27
+
28
+ var relativeStart = ToIntegerOrInfinity(start); // step 6
29
+
30
+ var first;
31
+ if (relativeStart === -Infinity) {
32
+ first = 0; // step 7
33
+ } else if (relativeStart < 0) {
34
+ first = max(len + relativeStart, 0); // step 8
35
+ } else {
36
+ first = min(relativeStart, len); // step 9
37
+ }
38
+
39
+ var relativeEnd = typeof end === 'undefined' ? len : ToIntegerOrInfinity(end); // step 10
40
+
41
+ var final;
42
+ if (relativeEnd === -Infinity) {
43
+ final = 0; // step 11
44
+ } else if (relativeEnd < 0) {
45
+ final = max(len + relativeEnd, 0); // step 12
46
+ } else {
47
+ final = min(relativeEnd, len); // step 13
48
+ }
49
+
50
+ var newLen = max(final - first, 0); // step 14
51
+
52
+ var Ctor = SpeciesConstructor(O, $ArrayBuffer); // step 15
53
+
54
+ var new$ = new Ctor(newLen); // step 16
55
+
56
+ if (!isArrayBuffer(new$) || IsSharedArrayBuffer(new$) || IsDetachedBuffer(new$)) {
57
+ throw new $TypeError('Species constructor must produce a non-detached, non-shared Array Buffer'); // steps 17-19
58
+ }
59
+
60
+ if (new$ === O) {
61
+ throw new $TypeError('new ArrayBuffer should not have been the same as the receiver'); // step 20
62
+ }
63
+
64
+ if (arrayBufferByteLength(new$) < newLen) {
65
+ throw new $TypeError('new ArrayBuffer\'s byteLength must be at least the requested length'); // step 21
66
+ }
67
+
68
+ if (IsDetachedBuffer(O)) {
69
+ throw new $TypeError('receiver became an detached ArrayBuffer'); // step 23
70
+ }
71
+
72
+ /*
73
+ 24. Let fromBuf be O.[[ArrayBufferData]].
74
+ 25. Let toBuf be new.[[ArrayBufferData]].
75
+ 26. Perform CopyDataBlockBytes(toBuf, 0, fromBuf, first, newLen).
76
+ */
77
+ var sourceArr = new $Uint8Array(O);
78
+ var destArr = new $Uint8Array(new$);
79
+ for (var i = start, ii = 0; i < end; i++, ii++) {
80
+ destArr[ii] = sourceArr[i];
81
+ }
82
+
83
+ return new$; // step 27
84
+ };
tools/ui/node_modules/arraybuffer.prototype.slice/index.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var define = require('define-properties');
4
+ var callBind = require('call-bind');
5
+
6
+ var implementation = require('./implementation');
7
+ var getPolyfill = require('./polyfill');
8
+ var shim = require('./shim');
9
+
10
+ var bound = callBind(getPolyfill());
11
+
12
+ define(bound, {
13
+ getPolyfill: getPolyfill,
14
+ implementation: implementation,
15
+ shim: shim
16
+ });
17
+
18
+ module.exports = bound;
tools/ui/node_modules/arraybuffer.prototype.slice/package.json ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "arraybuffer.prototype.slice",
3
+ "version": "1.0.4",
4
+ "description": "ES spec-compliant shim for ArrayBuffer.prototype.slice",
5
+ "author": "Jordan Harband <ljharb@gmail.com>",
6
+ "funding": {
7
+ "url": "https://github.com/sponsors/ljharb"
8
+ },
9
+ "license": "MIT",
10
+ "main": "index.js",
11
+ "exports": {
12
+ ".": "./index.js",
13
+ "./auto": "./auto.js",
14
+ "./polyfill": "./polyfill.js",
15
+ "./implementation": "./implementation.js",
16
+ "./shim": "./shim.js",
17
+ "./package.json": "./package.json"
18
+ },
19
+ "scripts": {
20
+ "prepack": "npmignore --auto --commentLines=autogenerated",
21
+ "prepublish": "not-in-publish || npm run prepublishOnly",
22
+ "prepublishOnly": "safe-publish-latest",
23
+ "pretest": "npm run lint",
24
+ "test": "npm run tests-only",
25
+ "posttest": "npx npm@'>=10.2' audit --production",
26
+ "tests-only": "nyc tape 'test/**/*.js'",
27
+ "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
28
+ "lint": "eslint --ext=js,mjs .",
29
+ "postlint": "evalmd README.md && es-shim-api --bound",
30
+ "version": "auto-changelog && git add CHANGELOG.md",
31
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
32
+ },
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/es-shims/ArrayBuffer.prototype.slice.git"
36
+ },
37
+ "homepage": "https://github.com/es-shims/ArrayBuffer.prototype.slice#readme",
38
+ "bugs": {
39
+ "url": "https://github.com/es-shims/ArrayBuffer.prototype.slice/issues"
40
+ },
41
+ "keywords": [
42
+ "javascript",
43
+ "ecmascript",
44
+ "ArrayBuffer.prototype.slice",
45
+ "polyfill",
46
+ "shim",
47
+ "ArrayBuffer",
48
+ "array",
49
+ "buffer",
50
+ "ArrayBuffer#slice",
51
+ "slice",
52
+ "typed array",
53
+ "es-shim API"
54
+ ],
55
+ "dependencies": {
56
+ "array-buffer-byte-length": "^1.0.1",
57
+ "call-bind": "^1.0.8",
58
+ "define-properties": "^1.2.1",
59
+ "es-abstract": "^1.23.5",
60
+ "es-errors": "^1.3.0",
61
+ "get-intrinsic": "^1.2.6",
62
+ "is-array-buffer": "^3.0.4"
63
+ },
64
+ "devDependencies": {
65
+ "@es-shims/api": "^2.5.1",
66
+ "@ljharb/eslint-config": "^21.1.1",
67
+ "auto-changelog": "^2.5.0",
68
+ "eclint": "^2.8.1",
69
+ "encoding": "^0.1.13",
70
+ "es-value-fixtures": "^1.5.0",
71
+ "eslint": "=8.8.0",
72
+ "evalmd": "^0.0.19",
73
+ "for-each": "^0.3.3",
74
+ "functions-have-names": "^1.2.3",
75
+ "has-strict-mode": "^1.0.1",
76
+ "in-publish": "^2.0.1",
77
+ "npmignore": "^0.3.1",
78
+ "nyc": "^10.3.2",
79
+ "object-inspect": "^1.13.3",
80
+ "safe-publish-latest": "^2.0.0",
81
+ "tape": "^5.9.0"
82
+ },
83
+ "testling": {
84
+ "files": "test/index.js"
85
+ },
86
+ "engines": {
87
+ "node": ">= 0.4"
88
+ },
89
+ "auto-changelog": {
90
+ "output": "CHANGELOG.md",
91
+ "template": "keepachangelog",
92
+ "unreleased": false,
93
+ "commitLimit": false,
94
+ "backfillLimit": false,
95
+ "hideCredit": true
96
+ },
97
+ "publishConfig": {
98
+ "ignore": [
99
+ ".github/workflows"
100
+ ]
101
+ }
102
+ }
tools/ui/node_modules/arraybuffer.prototype.slice/polyfill.js ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var callBind = require('call-bind');
4
+
5
+ var implementation = require('./implementation');
6
+
7
+ var ownSlice = typeof ArrayBuffer === 'function' && new ArrayBuffer(0).slice;
8
+ var ownSliceBound = ownSlice && callBind(ownSlice);
9
+ var ownSliceWrapper = ownSliceBound && function slice(start, end) {
10
+ /* eslint no-invalid-this: 0 */
11
+ if (arguments.length < 2) {
12
+ return ownSliceBound(this, arguments.length > 0 ? start : 0);
13
+ }
14
+ return ownSliceBound(this, start, end);
15
+ };
16
+
17
+ module.exports = function getPolyfill() {
18
+ return (typeof ArrayBuffer === 'function' && ArrayBuffer.prototype.slice)
19
+ || ownSliceWrapper
20
+ || implementation;
21
+ };
tools/ui/node_modules/arraybuffer.prototype.slice/shim.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var define = require('define-properties');
4
+
5
+ var getPolyfill = require('./polyfill');
6
+
7
+ module.exports = function shimArrayBufferSlice() {
8
+ if (typeof ArrayBuffer === 'function') {
9
+ var polyfill = getPolyfill();
10
+ define(
11
+ ArrayBuffer.prototype,
12
+ { slice: polyfill },
13
+ { slice: function () { return ArrayBuffer.prototype.slice !== polyfill; } }
14
+ );
15
+ }
16
+
17
+ return polyfill;
18
+ };
tools/ui/node_modules/arraybuffer.prototype.slice/test/implementation.js ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var implementation = require('../implementation');
4
+ var callBind = require('call-bind');
5
+ var test = require('tape');
6
+ var hasStrictMode = require('has-strict-mode')();
7
+ var runTests = require('./tests');
8
+
9
+ test('as a function', function (t) {
10
+ t.test('ArrayBuffer support', { skip: typeof ArrayBuffer === 'undefined' }, function (st) {
11
+ st.test('bad array/this value', { skip: !hasStrictMode }, function (s2t) {
12
+ /* eslint no-useless-call: 0 */
13
+ s2t['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object');
14
+ s2t['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object');
15
+ s2t.end();
16
+ });
17
+
18
+ runTests(callBind(implementation), st);
19
+
20
+ st.end();
21
+ });
22
+
23
+ t.test('no ArrayBuffer support', { skip: typeof ArrayBuffer !== 'undefined' }, function (st) {
24
+ st['throws'](
25
+ function () { implementation.call({}); },
26
+ SyntaxError,
27
+ 'ArrayBuffer is not supported'
28
+ );
29
+ });
30
+
31
+ t.end();
32
+ });
tools/ui/node_modules/arraybuffer.prototype.slice/test/index.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var index = require('../');
4
+ var test = require('tape');
5
+ var runTests = require('./tests');
6
+
7
+ test('as a function', function (t) {
8
+ t.test('ArrayBuffer support', { skip: typeof ArrayBuffer === 'undefined' }, function (st) {
9
+ st.test('bad array/this value', function (s2t) {
10
+ s2t['throws'](function () { index(undefined); }, TypeError, 'undefined is not an object');
11
+ s2t['throws'](function () { index(null); }, TypeError, 'null is not an object');
12
+ s2t.end();
13
+ });
14
+
15
+ runTests(index, st);
16
+
17
+ st.end();
18
+ });
19
+
20
+ t.test('no ArrayBuffer support', { skip: typeof ArrayBuffer !== 'undefined' }, function (st) {
21
+ st['throws'](
22
+ function () { index({}); },
23
+ SyntaxError,
24
+ 'ArrayBuffer is not supported'
25
+ );
26
+ });
27
+
28
+ t.end();
29
+ });
tools/ui/node_modules/arraybuffer.prototype.slice/test/shimmed.js ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ require('../auto');
4
+
5
+ var test = require('tape');
6
+ var defineProperties = require('define-properties');
7
+ var callBind = require('call-bind');
8
+
9
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
10
+ var functionsHaveNames = require('functions-have-names')();
11
+ var hasStrictMode = require('has-strict-mode')();
12
+
13
+ var runTests = require('./tests');
14
+
15
+ test('shimmed', function (t) {
16
+ t.test('ArrayBuffer support', { skip: typeof ArrayBuffer === 'undefined' }, function (st) {
17
+ var method = ArrayBuffer.prototype.slice;
18
+
19
+ st.equal(method.length, 2, 'ArrayBuffer#slice has a length of 2');
20
+
21
+ st.test('Function name', { skip: !functionsHaveNames }, function (s2t) {
22
+ s2t.equal(method.name, 'slice', 'ArrayBuffer#slice name "slice"');
23
+ s2t.end();
24
+ });
25
+
26
+ st.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
27
+ et.equal(false, isEnumerable.call(ArrayBuffer.prototype, 'slice'), 'ArrayBuffer#slice is not enumerable');
28
+ et.end();
29
+ });
30
+
31
+ st.test('bad array/this value', { skip: !hasStrictMode }, function (s2t) {
32
+ /* eslint no-useless-call: 0 */
33
+ s2t['throws'](function () { return method.call(undefined); }, TypeError, 'undefined is not an object');
34
+ s2t['throws'](function () { return method.call(null); }, TypeError, 'null is not an object');
35
+ s2t.end();
36
+ });
37
+
38
+ t.test('has the correct descriptor', { skip: !Object.getOwnPropertyDescriptor }, function (s2t) {
39
+ var descriptor = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, 'slice');
40
+
41
+ s2t.equal(descriptor.configurable, true);
42
+ s2t.equal(descriptor.enumerable, false);
43
+ s2t.equal(typeof descriptor.value, 'function');
44
+ s2t.equal(descriptor.writable, true);
45
+ s2t.end();
46
+ });
47
+
48
+ runTests(callBind(method), st);
49
+
50
+ st.end();
51
+ });
52
+
53
+ t.end();
54
+ });
tools/ui/node_modules/arraybuffer.prototype.slice/test/tests.js ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var inspect = require('object-inspect');
4
+ var IsDetachedBuffer = require('es-abstract/2024/IsDetachedBuffer');
5
+
6
+ var forEach = require('for-each');
7
+ var v = require('es-value-fixtures');
8
+
9
+ var byteLength = require('array-buffer-byte-length');
10
+
11
+ module.exports = function runTests(slice, t) {
12
+ forEach(v.primitives.concat(v.objects), function (nonAB) {
13
+ t['throws'](
14
+ function () { slice(nonAB); },
15
+ TypeError,
16
+ inspect(nonAB) + ' is not an ArrayBuffer'
17
+ );
18
+ });
19
+
20
+ t.test('ArrayBuffers', { skip: typeof ArrayBuffer === 'undefined' }, function (st) {
21
+ var ab = new ArrayBuffer(0);
22
+
23
+ st.equal(IsDetachedBuffer(ab), false, 'ArrayBuffer is not detached');
24
+
25
+ try {
26
+ var nb = slice(ab);
27
+ } catch (e) {
28
+ if (e instanceof SyntaxError) {
29
+ st.skip('Detaching ArrayBuffer is not supported');
30
+ return st.end();
31
+ }
32
+ console.log(e.stack);
33
+ }
34
+
35
+ st.notEqual(nb, ab, 'new ArrayBuffer is not the same as the original');
36
+ st.equal(IsDetachedBuffer(ab), false, 'old ArrayBuffer is not detached');
37
+ st.equal(IsDetachedBuffer(nb), false, 'new ArrayBuffer is not detached');
38
+
39
+ var ab2 = new ArrayBuffer(8);
40
+ st.equal(byteLength(ab2), 8, 'original ArrayBuffer has length 8');
41
+ try {
42
+ var nbLen = slice(ab2, 4);
43
+ } catch (e) {
44
+ if (e instanceof SyntaxError) {
45
+ st.skip('Detaching ArrayBuffer is not supported');
46
+ return st.end();
47
+ }
48
+ }
49
+ st.equal(IsDetachedBuffer(ab2), false, 'old ArrayBuffer is not detached');
50
+ st.equal(IsDetachedBuffer(nbLen), false, 'new ArrayBuffer is not detached');
51
+
52
+ st.equal(byteLength(ab2), 8, 'original ArrayBuffer has length 8');
53
+ st.equal(byteLength(nbLen), 4, 'newly sliced ArrayBuffer has length 4');
54
+
55
+ var one = new ArrayBuffer(1);
56
+ var arr = new Uint8Array(one);
57
+ arr[0] = 123;
58
+
59
+ var two = slice(one);
60
+
61
+ var arr2 = new Uint8Array(two);
62
+ arr2[0] = 234;
63
+
64
+ st.deepEqual(arr, new Uint8Array([123]), 'original buffer is unchanged');
65
+ st.deepEqual(arr2, new Uint8Array([234]), 'sliced buffer is changed');
66
+
67
+ return st.end();
68
+ });
69
+
70
+ t.test('SharedArrayBuffers', { skip: typeof SharedArrayBuffer === 'undefined' }, function (st) {
71
+ var sab = new SharedArrayBuffer(0);
72
+
73
+ st['throws'](
74
+ function () { slice(sab); },
75
+ TypeError,
76
+ inspect(sab) + ' is not an ArrayBuffer'
77
+ );
78
+
79
+ st.end();
80
+ });
81
+ };
tools/ui/node_modules/assertion-error/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2013 Jake Luer jake@qualiancy.com (http://qualiancy.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
tools/ui/node_modules/assertion-error/README.md ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <p align=center>
2
+ AssertionError and AssertionResult classes.
3
+ </p>
4
+
5
+ <p align=center>
6
+ <a href="https://github.com/chaijs/assertion-error/actions">
7
+ <img
8
+ alt="build:?"
9
+ src="https://github.com/chaijs/assertion-error/actions/workflows/nodejs.yml/badge.svg"
10
+ />
11
+ </a><a href="https://www.npmjs.com/package/assertion-error">
12
+ <img
13
+ alt="downloads:?"
14
+ src="https://img.shields.io/npm/dm/assertion-error.svg"
15
+ />
16
+ </a><a href="">
17
+ <img
18
+ alt="devDependencies:none"
19
+ src="https://img.shields.io/badge/dependencies-none-brightgreen"
20
+ />
21
+ </a>
22
+ </p>
23
+
24
+ ## What is AssertionError?
25
+
26
+ Assertion Error is a module that contains two classes: `AssertionError`, which
27
+ is an instance of an `Error`, and `AssertionResult` which is not an instance of
28
+ Error.
29
+
30
+ These can be useful for returning from a function - if the function "succeeds"
31
+ return an `AssertionResult` and if the function fails return (or throw) an
32
+ `AssertionError`.
33
+
34
+ Both `AssertionError` and `AssertionResult` implement the `Result` interface:
35
+
36
+ ```typescript
37
+ interface Result {
38
+ name: "AssertionError" | "AssertionResult";
39
+ ok: boolean;
40
+ toJSON(...args: unknown[]): Record<string, unknown>;
41
+ }
42
+ ```
43
+
44
+ So if a function returns `AssertionResult | AssertionError` it is easy to check
45
+ _which_ one is returned by checking either `.name` or `.ok`, or check
46
+ `instanceof Error`.
47
+
48
+ ## Installation
49
+
50
+ ### Node.js
51
+
52
+ `assertion-error` is available on [npm](http://npmjs.org).
53
+
54
+ ```
55
+ $ npm install --save assertion-error
56
+ ```
57
+
58
+ ### Deno
59
+
60
+ `assertion_error` is available on
61
+ [Deno.land](https://deno.land/x/assertion_error)
62
+
63
+ ```typescript
64
+ import {
65
+ AssertionError,
66
+ AssertionResult,
67
+ } from "https://deno.land/x/assertion_error@2.0.0/mod.ts";
68
+ ```
tools/ui/node_modules/assertion-error/index.d.ts ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ interface Result {
2
+ name: "AssertionError" | "AssertionResult";
3
+ ok: boolean;
4
+ toJSON(...args: unknown[]): Record<string, unknown>;
5
+ }
6
+
7
+ declare class AssertionError<T> extends Error implements Result {
8
+ [key: string]: unknown
9
+ name: "AssertionError";
10
+ ok: false;
11
+ message: string;
12
+ // deno-lint-ignore ban-types
13
+ constructor(message: string, props?: T, ssf?: Function);
14
+ stack: string;
15
+ toJSON(stack?: boolean): Record<string, unknown>;
16
+ }
17
+
18
+ declare class AssertionResult<T> implements Result {
19
+ [key: string]: unknown
20
+ name: "AssertionResult";
21
+ ok: true;
22
+ message: string;
23
+ constructor(props?: T);
24
+ toJSON(): Record<string, unknown>;
25
+ }
26
+
27
+ export { AssertionError, AssertionResult, Result };
tools/ui/node_modules/assertion-error/index.js ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // deno-fmt-ignore-file
2
+ // deno-lint-ignore-file
3
+ // This code was bundled using `deno bundle` and it's not recommended to edit it manually
4
+
5
+ const canElideFrames = "captureStackTrace" in Error;
6
+ class AssertionError extends Error {
7
+ message;
8
+ get name() {
9
+ return "AssertionError";
10
+ }
11
+ get ok() {
12
+ return false;
13
+ }
14
+ constructor(message = "Unspecified AssertionError", props, ssf){
15
+ super(message);
16
+ this.message = message;
17
+ if (canElideFrames) {
18
+ Error.captureStackTrace(this, ssf || AssertionError);
19
+ }
20
+ for(const key in props){
21
+ if (!(key in this)) {
22
+ this[key] = props[key];
23
+ }
24
+ }
25
+ }
26
+ toJSON(stack) {
27
+ return {
28
+ ...this,
29
+ name: this.name,
30
+ message: this.message,
31
+ ok: false,
32
+ stack: stack !== false ? this.stack : undefined
33
+ };
34
+ }
35
+ }
36
+ class AssertionResult {
37
+ get name() {
38
+ return "AssertionResult";
39
+ }
40
+ get ok() {
41
+ return true;
42
+ }
43
+ constructor(props){
44
+ for(const key in props){
45
+ if (!(key in this)) {
46
+ this[key] = props[key];
47
+ }
48
+ }
49
+ }
50
+ toJSON() {
51
+ return {
52
+ ...this,
53
+ name: this.name,
54
+ ok: this.ok
55
+ };
56
+ }
57
+ }
58
+ export { AssertionError as AssertionError };
59
+ export { AssertionResult as AssertionResult };
60
+
tools/ui/node_modules/assertion-error/package.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "assertion-error",
3
+ "version": "2.0.1",
4
+ "description": "Error constructor for test and validation frameworks that implements standardized AssertionError specification.",
5
+ "author": "Jake Luer <jake@qualiancy.com> (http://qualiancy.com)",
6
+ "license": "MIT",
7
+ "types": "./index.d.ts",
8
+ "keywords": [
9
+ "test",
10
+ "assertion",
11
+ "assertion-error"
12
+ ],
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git@github.com:chaijs/assertion-error.git"
16
+ },
17
+ "engines": {
18
+ "node": ">=12"
19
+ },
20
+ "files": [
21
+ "index.d.ts"
22
+ ],
23
+ "type": "module",
24
+ "module": "index.js",
25
+ "main": "index.js",
26
+ "scripts": {
27
+ "build": "deno bundle mod.ts > index.js",
28
+ "pretest": "rm -rf coverage/",
29
+ "test": "deno test --coverage=coverage",
30
+ "posttest": "deno coverage coverage --lcov > coverage/lcov.info && lcov --summary coverage/lcov.info"
31
+ }
32
+ }
tools/ui/node_modules/ast-types/LICENSE ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2013 Ben Newman <bn@cs.stanford.edu>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
tools/ui/node_modules/ast-types/README.md ADDED
@@ -0,0 +1,512 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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modular,
4
+ [Esprima](https://github.com/ariya/esprima)-compatible implementation of
5
+ the [abstract syntax
6
+ tree](http://en.wikipedia.org/wiki/Abstract_syntax_tree) type hierarchy
7
+ pioneered by the [Mozilla Parser
8
+ API](https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API).
9
+
10
+ Installation
11
+ ---
12
+
13
+ From NPM:
14
+
15
+ npm install ast-types
16
+
17
+ From GitHub:
18
+
19
+ cd path/to/node_modules
20
+ git clone git://github.com/benjamn/ast-types.git
21
+ cd ast-types
22
+ npm install .
23
+
24
+ Basic Usage
25
+ ---
26
+ ```js
27
+ import assert from "assert";
28
+ import {
29
+ namedTypes as n,
30
+ builders as b,
31
+ } from "ast-types";
32
+
33
+ var fooId = b.identifier("foo");
34
+ var ifFoo = b.ifStatement(fooId, b.blockStatement([
35
+ b.expressionStatement(b.callExpression(fooId, []))
36
+ ]));
37
+
38
+ assert.ok(n.IfStatement.check(ifFoo));
39
+ assert.ok(n.Statement.check(ifFoo));
40
+ assert.ok(n.Node.check(ifFoo));
41
+
42
+ assert.ok(n.BlockStatement.check(ifFoo.consequent));
43
+ assert.strictEqual(
44
+ ifFoo.consequent.body[0].expression.arguments.length,
45
+ 0,
46
+ );
47
+
48
+ assert.strictEqual(ifFoo.test, fooId);
49
+ assert.ok(n.Expression.check(ifFoo.test));
50
+ assert.ok(n.Identifier.check(ifFoo.test));
51
+ assert.ok(!n.Statement.check(ifFoo.test));
52
+ ```
53
+
54
+ AST Traversal
55
+ ---
56
+
57
+ Because it understands the AST type system so thoroughly, this library
58
+ is able to provide excellent node iteration and traversal mechanisms.
59
+
60
+ If you want complete control over the traversal, and all you need is a way
61
+ of enumerating the known fields of your AST nodes and getting their
62
+ values, you may be interested in the primitives `getFieldNames` and
63
+ `getFieldValue`:
64
+ ```js
65
+ import {
66
+ getFieldNames,
67
+ getFieldValue,
68
+ } from "ast-types";
69
+
70
+ const partialFunExpr = { type: "FunctionExpression" };
71
+
72
+ // Even though partialFunExpr doesn't actually contain all the fields that
73
+ // are expected for a FunctionExpression, types.getFieldNames knows:
74
+ console.log(getFieldNames(partialFunExpr));
75
+ // [ 'type', 'id', 'params', 'body', 'generator', 'expression',
76
+ // 'defaults', 'rest', 'async' ]
77
+
78
+ // For fields that have default values, types.getFieldValue will return
79
+ // the default if the field is not actually defined.
80
+ console.log(getFieldValue(partialFunExpr, "generator"));
81
+ // false
82
+ ```
83
+
84
+ Two more low-level helper functions, `eachField` and `someField`, are
85
+ defined in terms of `getFieldNames` and `getFieldValue`:
86
+ ```js
87
+ // Iterate over all defined fields of an object, including those missing
88
+ // or undefined, passing each field name and effective value (as returned
89
+ // by getFieldValue) to the callback. If the object has no corresponding
90
+ // Def, the callback will never be called.
91
+ export function eachField(object, callback, context) {
92
+ getFieldNames(object).forEach(function(name) {
93
+ callback.call(this, name, getFieldValue(object, name));
94
+ }, context);
95
+ }
96
+
97
+ // Similar to eachField, except that iteration stops as soon as the
98
+ // callback returns a truthy value. Like Array.prototype.some, the final
99
+ // result is either true or false to indicates whether the callback
100
+ // returned true for any element or not.
101
+ export function someField(object, callback, context) {
102
+ return getFieldNames(object).some(function(name) {
103
+ return callback.call(this, name, getFieldValue(object, name));
104
+ }, context);
105
+ }
106
+ ```
107
+
108
+ So here's how you might make a copy of an AST node:
109
+ ```js
110
+ import { eachField } from "ast-types";
111
+ const copy = {};
112
+ eachField(node, function(name, value) {
113
+ // Note that undefined fields will be visited too, according to
114
+ // the rules associated with node.type, and default field values
115
+ // will be substituted if appropriate.
116
+ copy[name] = value;
117
+ })
118
+ ```
119
+
120
+ But that's not all! You can also easily visit entire syntax trees using
121
+ the powerful `types.visit` abstraction.
122
+
123
+ Here's a trivial example of how you might assert that `arguments.callee`
124
+ is never used in `ast`:
125
+ ```js
126
+ import assert from "assert";
127
+ import {
128
+ visit,
129
+ namedTypes as n,
130
+ } from "ast-types";
131
+
132
+ visit(ast, {
133
+ // This method will be called for any node with .type "MemberExpression":
134
+ visitMemberExpression(path) {
135
+ // Visitor methods receive a single argument, a NodePath object
136
+ // wrapping the node of interest.
137
+ var node = path.node;
138
+
139
+ if (
140
+ n.Identifier.check(node.object) &&
141
+ node.object.name === "arguments" &&
142
+ n.Identifier.check(node.property)
143
+ ) {
144
+ assert.notStrictEqual(node.property.name, "callee");
145
+ }
146
+
147
+ // It's your responsibility to call this.traverse with some
148
+ // NodePath object (usually the one passed into the visitor
149
+ // method) before the visitor method returns, or return false to
150
+ // indicate that the traversal need not continue any further down
151
+ // this subtree.
152
+ this.traverse(path);
153
+ }
154
+ });
155
+ ```
156
+
157
+ Here's a slightly more involved example of transforming `...rest`
158
+ parameters into browser-runnable ES5 JavaScript:
159
+
160
+ ```js
161
+ import { builders as b, visit } from "ast-types";
162
+
163
+ // Reuse the same AST structure for Array.prototype.slice.call.
164
+ var sliceExpr = b.memberExpression(
165
+ b.memberExpression(
166
+ b.memberExpression(
167
+ b.identifier("Array"),
168
+ b.identifier("prototype"),
169
+ false
170
+ ),
171
+ b.identifier("slice"),
172
+ false
173
+ ),
174
+ b.identifier("call"),
175
+ false
176
+ );
177
+
178
+ visit(ast, {
179
+ // This method will be called for any node whose type is a subtype of
180
+ // Function (e.g., FunctionDeclaration, FunctionExpression, and
181
+ // ArrowFunctionExpression). Note that types.visit precomputes a
182
+ // lookup table from every known type to the appropriate visitor
183
+ // method to call for nodes of that type, so the dispatch takes
184
+ // constant time.
185
+ visitFunction(path) {
186
+ // Visitor methods receive a single argument, a NodePath object
187
+ // wrapping the node of interest.
188
+ const node = path.node;
189
+
190
+ // It's your responsibility to call this.traverse with some
191
+ // NodePath object (usually the one passed into the visitor
192
+ // method) before the visitor method returns, or return false to
193
+ // indicate that the traversal need not continue any further down
194
+ // this subtree. An assertion will fail if you forget, which is
195
+ // awesome, because it means you will never again make the
196
+ // disastrous mistake of forgetting to traverse a subtree. Also
197
+ // cool: because you can call this method at any point in the
198
+ // visitor method, it's up to you whether your traversal is
199
+ // pre-order, post-order, or both!
200
+ this.traverse(path);
201
+
202
+ // This traversal is only concerned with Function nodes that have
203
+ // rest parameters.
204
+ if (!node.rest) {
205
+ return;
206
+ }
207
+
208
+ // For the purposes of this example, we won't worry about functions
209
+ // with Expression bodies.
210
+ n.BlockStatement.assert(node.body);
211
+
212
+ // Use types.builders to build a variable declaration of the form
213
+ //
214
+ // var rest = Array.prototype.slice.call(arguments, n);
215
+ //
216
+ // where `rest` is the name of the rest parameter, and `n` is a
217
+ // numeric literal specifying the number of named parameters the
218
+ // function takes.
219
+ const restVarDecl = b.variableDeclaration("var", [
220
+ b.variableDeclarator(
221
+ node.rest,
222
+ b.callExpression(sliceExpr, [
223
+ b.identifier("arguments"),
224
+ b.literal(node.params.length)
225
+ ])
226
+ )
227
+ ]);
228
+
229
+ // Similar to doing node.body.body.unshift(restVarDecl), except
230
+ // that the other NodePath objects wrapping body statements will
231
+ // have their indexes updated to accommodate the new statement.
232
+ path.get("body", "body").unshift(restVarDecl);
233
+
234
+ // Nullify node.rest now that we have simulated the behavior of
235
+ // the rest parameter using ordinary JavaScript.
236
+ path.get("rest").replace(null);
237
+
238
+ // There's nothing wrong with doing node.rest = null, but I wanted
239
+ // to point out that the above statement has the same effect.
240
+ assert.strictEqual(node.rest, null);
241
+ }
242
+ });
243
+ ```
244
+
245
+ Here's how you might use `types.visit` to implement a function that
246
+ determines if a given function node refers to `this`:
247
+
248
+ ```js
249
+ function usesThis(funcNode) {
250
+ n.Function.assert(funcNode);
251
+ var result = false;
252
+
253
+ visit(funcNode, {
254
+ visitThisExpression(path) {
255
+ result = true;
256
+
257
+ // The quickest way to terminate the traversal is to call
258
+ // this.abort(), which throws a special exception (instanceof
259
+ // this.AbortRequest) that will be caught in the top-level
260
+ // types.visit method, so you don't have to worry about
261
+ // catching the exception yourself.
262
+ this.abort();
263
+ },
264
+
265
+ visitFunction(path) {
266
+ // ThisExpression nodes in nested scopes don't count as `this`
267
+ // references for the original function node, so we can safely
268
+ // avoid traversing this subtree.
269
+ return false;
270
+ },
271
+
272
+ visitCallExpression(path) {
273
+ const node = path.node;
274
+
275
+ // If the function contains CallExpression nodes involving
276
+ // super, those expressions will implicitly depend on the
277
+ // value of `this`, even though they do not explicitly contain
278
+ // any ThisExpression nodes.
279
+ if (this.isSuperCallExpression(node)) {
280
+ result = true;
281
+ this.abort(); // Throws AbortRequest exception.
282
+ }
283
+
284
+ this.traverse(path);
285
+ },
286
+
287
+ // Yes, you can define arbitrary helper methods.
288
+ isSuperCallExpression(callExpr) {
289
+ n.CallExpression.assert(callExpr);
290
+ return this.isSuperIdentifier(callExpr.callee)
291
+ || this.isSuperMemberExpression(callExpr.callee);
292
+ },
293
+
294
+ // And even helper helper methods!
295
+ isSuperIdentifier(node) {
296
+ return n.Identifier.check(node.callee)
297
+ && node.callee.name === "super";
298
+ },
299
+
300
+ isSuperMemberExpression(node) {
301
+ return n.MemberExpression.check(node.callee)
302
+ && n.Identifier.check(node.callee.object)
303
+ && node.callee.object.name === "super";
304
+ }
305
+ });
306
+
307
+ return result;
308
+ }
309
+ ```
310
+
311
+ As you might guess, when an `AbortRequest` is thrown from a subtree, the
312
+ exception will propagate from the corresponding calls to `this.traverse`
313
+ in the ancestor visitor methods. If you decide you want to cancel the
314
+ request, simply catch the exception and call its `.cancel()` method. The
315
+ rest of the subtree beneath the `try`-`catch` block will be abandoned, but
316
+ the remaining siblings of the ancestor node will still be visited.
317
+
318
+ NodePath
319
+ ---
320
+
321
+ The `NodePath` object passed to visitor methods is a wrapper around an AST
322
+ node, and it serves to provide access to the chain of ancestor objects
323
+ (all the way back to the root of the AST) and scope information.
324
+
325
+ In general, `path.node` refers to the wrapped node, `path.parent.node`
326
+ refers to the nearest `Node` ancestor, `path.parent.parent.node` to the
327
+ grandparent, and so on.
328
+
329
+ Note that `path.node` may not be a direct property value of
330
+ `path.parent.node`; for instance, it might be the case that `path.node` is
331
+ an element of an array that is a direct child of the parent node:
332
+ ```js
333
+ path.node === path.parent.node.elements[3]
334
+ ```
335
+ in which case you should know that `path.parentPath` provides
336
+ finer-grained access to the complete path of objects (not just the `Node`
337
+ ones) from the root of the AST:
338
+ ```js
339
+ // In reality, path.parent is the grandparent of path:
340
+ path.parentPath.parentPath === path.parent
341
+
342
+ // The path.parentPath object wraps the elements array (note that we use
343
+ // .value because the elements array is not a Node):
344
+ path.parentPath.value === path.parent.node.elements
345
+
346
+ // The path.node object is the fourth element in that array:
347
+ path.parentPath.value[3] === path.node
348
+
349
+ // Unlike path.node and path.value, which are synonyms because path.node
350
+ // is a Node object, path.parentPath.node is distinct from
351
+ // path.parentPath.value, because the elements array is not a
352
+ // Node. Instead, path.parentPath.node refers to the closest ancestor
353
+ // Node, which happens to be the same as path.parent.node:
354
+ path.parentPath.node === path.parent.node
355
+
356
+ // The path is named for its index in the elements array:
357
+ path.name === 3
358
+
359
+ // Likewise, path.parentPath is named for the property by which
360
+ // path.parent.node refers to it:
361
+ path.parentPath.name === "elements"
362
+
363
+ // Putting it all together, we can follow the chain of object references
364
+ // from path.parent.node all the way to path.node by accessing each
365
+ // property by name:
366
+ path.parent.node[path.parentPath.name][path.name] === path.node
367
+ ```
368
+
369
+ These `NodePath` objects are created during the traversal without
370
+ modifying the AST nodes themselves, so it's not a problem if the same node
371
+ appears more than once in the AST (like `Array.prototype.slice.call` in
372
+ the example above), because it will be visited with a distict `NodePath`
373
+ each time it appears.
374
+
375
+ Child `NodePath` objects are created lazily, by calling the `.get` method
376
+ of a parent `NodePath` object:
377
+ ```js
378
+ // If a NodePath object for the elements array has never been created
379
+ // before, it will be created here and cached in the future:
380
+ path.get("elements").get(3).value === path.value.elements[3]
381
+
382
+ // Alternatively, you can pass multiple property names to .get instead of
383
+ // chaining multiple .get calls:
384
+ path.get("elements", 0).value === path.value.elements[0]
385
+ ```
386
+
387
+ `NodePath` objects support a number of useful methods:
388
+ ```js
389
+ // Replace one node with another node:
390
+ var fifth = path.get("elements", 4);
391
+ fifth.replace(newNode);
392
+
393
+ // Now do some stuff that might rearrange the list, and this replacement
394
+ // remains safe:
395
+ fifth.replace(newerNode);
396
+
397
+ // Replace the third element in an array with two new nodes:
398
+ path.get("elements", 2).replace(
399
+ b.identifier("foo"),
400
+ b.thisExpression()
401
+ );
402
+
403
+ // Remove a node and its parent if it would leave a redundant AST node:
404
+ //e.g. var t = 1, y =2; removing the `t` and `y` declarators results in `var undefined`.
405
+ path.prune(); //returns the closest parent `NodePath`.
406
+
407
+ // Remove a node from a list of nodes:
408
+ path.get("elements", 3).replace();
409
+
410
+ // Add three new nodes to the beginning of a list of nodes:
411
+ path.get("elements").unshift(a, b, c);
412
+
413
+ // Remove and return the first node in a list of nodes:
414
+ path.get("elements").shift();
415
+
416
+ // Push two new nodes onto the end of a list of nodes:
417
+ path.get("elements").push(d, e);
418
+
419
+ // Remove and return the last node in a list of nodes:
420
+ path.get("elements").pop();
421
+
422
+ // Insert a new node before/after the seventh node in a list of nodes:
423
+ var seventh = path.get("elements", 6);
424
+ seventh.insertBefore(newNode);
425
+ seventh.insertAfter(newNode);
426
+
427
+ // Insert a new element at index 5 in a list of nodes:
428
+ path.get("elements").insertAt(5, newNode);
429
+ ```
430
+
431
+ Scope
432
+ ---
433
+
434
+ The object exposed as `path.scope` during AST traversals provides
435
+ information about variable and function declarations in the scope that
436
+ contains `path.node`. See [scope.ts](lib/scope.ts) for its public
437
+ interface, which currently includes `.isGlobal`, `.getGlobalScope()`,
438
+ `.depth`, `.declares(name)`, `.lookup(name)`, and `.getBindings()`.
439
+
440
+ Custom AST Node Types
441
+ ---
442
+
443
+ The `ast-types` module was designed to be extended. To that end, it
444
+ provides a readable, declarative syntax for specifying new AST node types,
445
+ based primarily upon the `require("ast-types").Type.def` function:
446
+ ```js
447
+ import {
448
+ Type,
449
+ builtInTypes,
450
+ builders as b,
451
+ finalize,
452
+ } from "ast-types";
453
+
454
+ const { def } = Type;
455
+ const { string } = builtInTypes;
456
+
457
+ // Suppose you need a named File type to wrap your Programs.
458
+ def("File")
459
+ .bases("Node")
460
+ .build("name", "program")
461
+ .field("name", string)
462
+ .field("program", def("Program"));
463
+
464
+ // Prevent further modifications to the File type (and any other
465
+ // types newly introduced by def(...)).
466
+ finalize();
467
+
468
+ // The b.file builder function is now available. It expects two
469
+ // arguments, as named by .build("name", "program") above.
470
+ const main = b.file("main.js", b.program([
471
+ // Pointless program contents included for extra color.
472
+ b.functionDeclaration(b.identifier("succ"), [
473
+ b.identifier("x")
474
+ ], b.blockStatement([
475
+ b.returnStatement(
476
+ b.binaryExpression(
477
+ "+", b.identifier("x"), b.literal(1)
478
+ )
479
+ )
480
+ ]))
481
+ ]));
482
+
483
+ assert.strictEqual(main.name, "main.js");
484
+ assert.strictEqual(main.program.body[0].params[0].name, "x");
485
+ // etc.
486
+
487
+ // If you pass the wrong type of arguments, or fail to pass enough
488
+ // arguments, an AssertionError will be thrown.
489
+
490
+ b.file(b.blockStatement([]));
491
+ // ==> AssertionError: {"body":[],"type":"BlockStatement","loc":null} does not match type string
492
+
493
+ b.file("lib/types.js", b.thisExpression());
494
+ // ==> AssertionError: {"type":"ThisExpression","loc":null} does not match type Program
495
+ ```
496
+
497
+ The `def` syntax is used to define all the default AST node types found in
498
+ [babel-core.ts](def/babel-core.ts),
499
+ [babel.ts](def/babel.ts),
500
+ [core.ts](def/core.ts),
501
+ [es-proposals.ts](def/es-proposals.ts),
502
+ [es6.ts](def/es6.ts),
503
+ [es7.ts](def/es7.ts),
504
+ [es2020.ts](def/es2020.ts),
505
+ [esprima.ts](def/esprima.ts),
506
+ [flow.ts](def/flow.ts),
507
+ [jsx.ts](def/jsx.ts),
508
+ [type-annotations.ts](def/type-annotations.ts),
509
+ and
510
+ [typescript.ts](def/typescript.ts),
511
+ so you have
512
+ no shortage of examples to learn from.
tools/ui/node_modules/ast-types/lib/def/babel-core.d.ts ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import { Fork } from "../types";
2
+ export default function (fork: Fork): void;
tools/ui/node_modules/ast-types/lib/def/babel-core.js ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ var es_proposals_1 = tslib_1.__importDefault(require("./es-proposals"));
5
+ var types_1 = tslib_1.__importDefault(require("../types"));
6
+ var shared_1 = tslib_1.__importStar(require("../shared"));
7
+ function default_1(fork) {
8
+ var _a, _b, _c, _d, _e;
9
+ fork.use(es_proposals_1.default);
10
+ var types = fork.use(types_1.default);
11
+ var defaults = fork.use(shared_1.default).defaults;
12
+ var def = types.Type.def;
13
+ var or = types.Type.or;
14
+ var isUndefined = types.builtInTypes.undefined;
15
+ def("Noop")
16
+ .bases("Statement")
17
+ .build();
18
+ def("DoExpression")
19
+ .bases("Expression")
20
+ .build("body")
21
+ .field("body", [def("Statement")]);
22
+ def("BindExpression")
23
+ .bases("Expression")
24
+ .build("object", "callee")
25
+ .field("object", or(def("Expression"), null))
26
+ .field("callee", def("Expression"));
27
+ def("ParenthesizedExpression")
28
+ .bases("Expression")
29
+ .build("expression")
30
+ .field("expression", def("Expression"));
31
+ def("ExportNamespaceSpecifier")
32
+ .bases("Specifier")
33
+ .build("exported")
34
+ .field("exported", def("Identifier"));
35
+ def("ExportDefaultSpecifier")
36
+ .bases("Specifier")
37
+ .build("exported")
38
+ .field("exported", def("Identifier"));
39
+ def("CommentBlock")
40
+ .bases("Comment")
41
+ .build("value", /*optional:*/ "leading", "trailing");
42
+ def("CommentLine")
43
+ .bases("Comment")
44
+ .build("value", /*optional:*/ "leading", "trailing");
45
+ def("Directive")
46
+ .bases("Node")
47
+ .build("value")
48
+ .field("value", def("DirectiveLiteral"));
49
+ def("DirectiveLiteral")
50
+ .bases("Node", "Expression")
51
+ .build("value")
52
+ .field("value", String, defaults["use strict"]);
53
+ def("InterpreterDirective")
54
+ .bases("Node")
55
+ .build("value")
56
+ .field("value", String);
57
+ def("BlockStatement")
58
+ .bases("Statement")
59
+ .build("body")
60
+ .field("body", [def("Statement")])
61
+ .field("directives", [def("Directive")], defaults.emptyArray);
62
+ def("Program")
63
+ .bases("Node")
64
+ .build("body")
65
+ .field("body", [def("Statement")])
66
+ .field("directives", [def("Directive")], defaults.emptyArray)
67
+ .field("interpreter", or(def("InterpreterDirective"), null), defaults["null"]);
68
+ function makeLiteralExtra(rawValueType, toRaw) {
69
+ if (rawValueType === void 0) { rawValueType = String; }
70
+ return [
71
+ "extra",
72
+ {
73
+ rawValue: rawValueType,
74
+ raw: String,
75
+ },
76
+ function getDefault() {
77
+ var value = types.getFieldValue(this, "value");
78
+ return {
79
+ rawValue: value,
80
+ raw: toRaw ? toRaw(value) : String(value),
81
+ };
82
+ },
83
+ ];
84
+ }
85
+ // Split Literal
86
+ (_a = def("StringLiteral")
87
+ .bases("Literal")
88
+ .build("value")
89
+ .field("value", String))
90
+ .field.apply(_a, makeLiteralExtra(String, function (val) { return JSON.stringify(val); }));
91
+ (_b = def("NumericLiteral")
92
+ .bases("Literal")
93
+ .build("value")
94
+ .field("value", Number)
95
+ .field("raw", or(String, null), defaults["null"]))
96
+ .field.apply(_b, makeLiteralExtra(Number));
97
+ (_c = def("BigIntLiteral")
98
+ .bases("Literal")
99
+ .build("value")
100
+ // Only String really seems appropriate here, since BigInt values
101
+ // often exceed the limits of JS numbers.
102
+ .field("value", or(String, Number)))
103
+ .field.apply(_c, makeLiteralExtra(String, function (val) { return val + "n"; }));
104
+ // https://github.com/tc39/proposal-decimal
105
+ // https://github.com/babel/babel/pull/11640
106
+ (_d = def("DecimalLiteral")
107
+ .bases("Literal")
108
+ .build("value")
109
+ .field("value", String))
110
+ .field.apply(_d, makeLiteralExtra(String, function (val) { return val + "m"; }));
111
+ def("NullLiteral")
112
+ .bases("Literal")
113
+ .build()
114
+ .field("value", null, defaults["null"]);
115
+ def("BooleanLiteral")
116
+ .bases("Literal")
117
+ .build("value")
118
+ .field("value", Boolean);
119
+ (_e = def("RegExpLiteral")
120
+ .bases("Literal")
121
+ .build("pattern", "flags")
122
+ .field("pattern", String)
123
+ .field("flags", String)
124
+ .field("value", RegExp, function () {
125
+ return new RegExp(this.pattern, this.flags);
126
+ }))
127
+ .field.apply(_e, makeLiteralExtra(or(RegExp, isUndefined), function (exp) { return "/".concat(exp.pattern, "/").concat(exp.flags || ""); })).field("regex", {
128
+ pattern: String,
129
+ flags: String
130
+ }, function () {
131
+ return {
132
+ pattern: this.pattern,
133
+ flags: this.flags,
134
+ };
135
+ });
136
+ var ObjectExpressionProperty = or(def("Property"), def("ObjectMethod"), def("ObjectProperty"), def("SpreadProperty"), def("SpreadElement"));
137
+ // Split Property -> ObjectProperty and ObjectMethod
138
+ def("ObjectExpression")
139
+ .bases("Expression")
140
+ .build("properties")
141
+ .field("properties", [ObjectExpressionProperty]);
142
+ // ObjectMethod hoist .value properties to own properties
143
+ def("ObjectMethod")
144
+ .bases("Node", "Function")
145
+ .build("kind", "key", "params", "body", "computed")
146
+ .field("kind", or("method", "get", "set"))
147
+ .field("key", or(def("Literal"), def("Identifier"), def("Expression")))
148
+ .field("params", [def("Pattern")])
149
+ .field("body", def("BlockStatement"))
150
+ .field("computed", Boolean, defaults["false"])
151
+ .field("generator", Boolean, defaults["false"])
152
+ .field("async", Boolean, defaults["false"])
153
+ .field("accessibility", // TypeScript
154
+ or(def("Literal"), null), defaults["null"])
155
+ .field("decorators", or([def("Decorator")], null), defaults["null"]);
156
+ def("ObjectProperty")
157
+ .bases("Node")
158
+ .build("key", "value")
159
+ .field("key", or(def("Literal"), def("Identifier"), def("Expression")))
160
+ .field("value", or(def("Expression"), def("Pattern")))
161
+ .field("accessibility", // TypeScript
162
+ or(def("Literal"), null), defaults["null"])
163
+ .field("computed", Boolean, defaults["false"]);
164
+ var ClassBodyElement = or(def("MethodDefinition"), def("VariableDeclarator"), def("ClassPropertyDefinition"), def("ClassProperty"), def("ClassPrivateProperty"), def("ClassMethod"), def("ClassPrivateMethod"), def("ClassAccessorProperty"), def("StaticBlock"));
165
+ // MethodDefinition -> ClassMethod
166
+ def("ClassBody")
167
+ .bases("Declaration")
168
+ .build("body")
169
+ .field("body", [ClassBodyElement]);
170
+ def("ClassMethod")
171
+ .bases("Declaration", "Function")
172
+ .build("kind", "key", "params", "body", "computed", "static")
173
+ .field("key", or(def("Literal"), def("Identifier"), def("Expression")));
174
+ def("ClassPrivateMethod")
175
+ .bases("Declaration", "Function")
176
+ .build("key", "params", "body", "kind", "computed", "static")
177
+ .field("key", def("PrivateName"));
178
+ def("ClassAccessorProperty")
179
+ .bases("Declaration")
180
+ .build("key", "value", "decorators", "computed", "static")
181
+ .field("key", or(def("Literal"), def("Identifier"), def("PrivateName"),
182
+ // Only when .computed is true (TODO enforce this)
183
+ def("Expression")))
184
+ .field("value", or(def("Expression"), null), defaults["null"]);
185
+ ["ClassMethod",
186
+ "ClassPrivateMethod",
187
+ ].forEach(function (typeName) {
188
+ def(typeName)
189
+ .field("kind", or("get", "set", "method", "constructor"), function () { return "method"; })
190
+ .field("body", def("BlockStatement"))
191
+ // For backwards compatibility only. Expect accessibility instead (see below).
192
+ .field("access", or("public", "private", "protected", null), defaults["null"]);
193
+ });
194
+ ["ClassMethod",
195
+ "ClassPrivateMethod",
196
+ "ClassAccessorProperty",
197
+ ].forEach(function (typeName) {
198
+ def(typeName)
199
+ .field("computed", Boolean, defaults["false"])
200
+ .field("static", Boolean, defaults["false"])
201
+ .field("abstract", Boolean, defaults["false"])
202
+ .field("accessibility", or("public", "private", "protected", null), defaults["null"])
203
+ .field("decorators", or([def("Decorator")], null), defaults["null"])
204
+ .field("definite", Boolean, defaults["false"])
205
+ .field("optional", Boolean, defaults["false"])
206
+ .field("override", Boolean, defaults["false"])
207
+ .field("readonly", Boolean, defaults["false"]);
208
+ });
209
+ var ObjectPatternProperty = or(def("Property"), def("PropertyPattern"), def("SpreadPropertyPattern"), def("SpreadProperty"), // Used by Esprima
210
+ def("ObjectProperty"), // Babel 6
211
+ def("RestProperty"), // Babel 6
212
+ def("RestElement"));
213
+ // Split into RestProperty and SpreadProperty
214
+ def("ObjectPattern")
215
+ .bases("Pattern")
216
+ .build("properties")
217
+ .field("properties", [ObjectPatternProperty])
218
+ .field("decorators", or([def("Decorator")], null), defaults["null"]);
219
+ def("SpreadProperty")
220
+ .bases("Node")
221
+ .build("argument")
222
+ .field("argument", def("Expression"));
223
+ def("RestProperty")
224
+ .bases("Node")
225
+ .build("argument")
226
+ .field("argument", def("Expression"));
227
+ def("ForAwaitStatement")
228
+ .bases("Statement")
229
+ .build("left", "right", "body")
230
+ .field("left", or(def("VariableDeclaration"), def("Expression")))
231
+ .field("right", def("Expression"))
232
+ .field("body", def("Statement"));
233
+ // The callee node of a dynamic import(...) expression.
234
+ def("Import")
235
+ .bases("Expression")
236
+ .build();
237
+ }
238
+ exports.default = default_1;
239
+ ;
240
+ (0, shared_1.maybeSetModuleExports)(function () { return module; });
241
+ //# sourceMappingURL=babel-core.js.map
tools/ui/node_modules/ast-types/lib/def/babel-core.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"babel-core.js","sourceRoot":"","sources":["../../src/def/babel-core.ts"],"names":[],"mappings":";;;AACA,wEAA4C;AAC5C,2DAAmC;AACnC,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AK,CAAC,UAAU,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;IAExC,GAAG,CAAC,cAAc,CAAC;SAChB,KAAK,CAAC,MAAM,CAAC;SACb,KAAK,CAAC,UAAU,CAAC;SACjB,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;IAExC,GAAG,CAAC,mBAAmB,CAAC;SACrB,KAAK,CAAC,WAAW,CAAC;SAClB,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC;SAC9B,KAAK,CAAC,MAAM,EAAE,EAAE,CACf,GAAG,CAAC,qBAAqB,CAAC,EAC1B,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;SACpB,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC;SACjC,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC;IAEnC,uDAAuD;IACvD,GAAG,CAAC,QAAQ,CAAC;SACV,KAAK,CAAC,YAAY,CAAC;SACnB,KAAK,EAAE,CAAC;AACb,CAAC;AA5TD,4BA4TC;AAAA,CAAC;AAEF,IAAA,8BAAqB,EAAC,cAAM,OAAA,MAAM,EAAN,CAAM,CAAC,CAAC"}
tools/ui/node_modules/ast-types/lib/def/babel.d.ts ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import { Fork } from "../types";
2
+ export default function (fork: Fork): void;
tools/ui/node_modules/ast-types/lib/def/babel.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ var types_1 = tslib_1.__importDefault(require("../types"));
5
+ var babel_core_1 = tslib_1.__importDefault(require("./babel-core"));
6
+ var flow_1 = tslib_1.__importDefault(require("./flow"));
7
+ var shared_1 = require("../shared");
8
+ function default_1(fork) {
9
+ var types = fork.use(types_1.default);
10
+ var def = types.Type.def;
11
+ fork.use(babel_core_1.default);
12
+ fork.use(flow_1.default);
13
+ // https://github.com/babel/babel/pull/10148
14
+ def("V8IntrinsicIdentifier")
15
+ .bases("Expression")
16
+ .build("name")
17
+ .field("name", String);
18
+ // https://github.com/babel/babel/pull/13191
19
+ // https://github.com/babel/website/pull/2541
20
+ def("TopicReference")
21
+ .bases("Expression")
22
+ .build();
23
+ }
24
+ exports.default = default_1;
25
+ (0, shared_1.maybeSetModuleExports)(function () { return module; });
26
+ //# sourceMappingURL=babel.js.map
tools/ui/node_modules/ast-types/lib/def/babel.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"babel.js","sourceRoot":"","sources":["../../src/def/babel.ts"],"names":[],"mappings":";;;AACA,2DAAmC;AACnC,oEAAwC;AACxC,wDAA6B;AAC7B,oCAAkD;AAElD,mBAAyB,IAAU;IACjC,IAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,eAAW,CAAC,CAAC;IACpC,IAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;IAE3B,IAAI,CAAC,GAAG,CAAC,oBAAY,CAAC,CAAC;IACvB,IAAI,CAAC,GAAG,CAAC,cAAO,CAAC,CAAC;IAElB,4CAA4C;IAC5C,GAAG,CAAC,uBAAuB,CAAC;SACzB,KAAK,CAAC,YAAY,CAAC;SACnB,KAAK,CAAC,MAAM,CAAC;SACb,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEzB,4CAA4C;IAC5C,6CAA6C;IAC7C,GAAG,CAAC,gBAAgB,CAAC;SAClB,KAAK,CAAC,YAAY,CAAC;SACnB,KAAK,EAAE,CAAC;AACb,CAAC;AAlBD,4BAkBC;AAED,IAAA,8BAAqB,EAAC,cAAM,OAAA,MAAM,EAAN,CAAM,CAAC,CAAC"}
tools/ui/node_modules/ast-types/lib/def/core.d.ts ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import { Fork } from "../types";
2
+ export default function (fork: Fork): void;
tools/ui/node_modules/ast-types/lib/def/core.js ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ var core_1 = tslib_1.__importDefault(require("./operators/core"));
5
+ var types_1 = tslib_1.__importDefault(require("../types"));
6
+ var shared_1 = tslib_1.__importStar(require("../shared"));
7
+ function default_1(fork) {
8
+ var types = fork.use(types_1.default);
9
+ var Type = types.Type;
10
+ var def = Type.def;
11
+ var or = Type.or;
12
+ var shared = fork.use(shared_1.default);
13
+ var defaults = shared.defaults;
14
+ var geq = shared.geq;
15
+ var _a = fork.use(core_1.default), BinaryOperators = _a.BinaryOperators, AssignmentOperators = _a.AssignmentOperators, LogicalOperators = _a.LogicalOperators;
16
+ // Abstract supertype of all syntactic entities that are allowed to have a
17
+ // .loc field.
18
+ def("Printable")
19
+ .field("loc", or(def("SourceLocation"), null), defaults["null"], true);
20
+ def("Node")
21
+ .bases("Printable")
22
+ .field("type", String)
23
+ .field("comments", or([def("Comment")], null), defaults["null"], true);
24
+ def("SourceLocation")
25
+ .field("start", def("Position"))
26
+ .field("end", def("Position"))
27
+ .field("source", or(String, null), defaults["null"]);
28
+ def("Position")
29
+ .field("line", geq(1))
30
+ .field("column", geq(0));
31
+ def("File")
32
+ .bases("Node")
33
+ .build("program", "name")
34
+ .field("program", def("Program"))
35
+ .field("name", or(String, null), defaults["null"]);
36
+ def("Program")
37
+ .bases("Node")
38
+ .build("body")
39
+ .field("body", [def("Statement")]);
40
+ def("Function")
41
+ .bases("Node")
42
+ .field("id", or(def("Identifier"), null), defaults["null"])
43
+ .field("params", [def("Pattern")])
44
+ .field("body", def("BlockStatement"))
45
+ .field("generator", Boolean, defaults["false"])
46
+ .field("async", Boolean, defaults["false"]);
47
+ def("Statement").bases("Node");
48
+ // The empty .build() here means that an EmptyStatement can be constructed
49
+ // (i.e. it's not abstract) but that it needs no arguments.
50
+ def("EmptyStatement").bases("Statement").build();
51
+ def("BlockStatement")
52
+ .bases("Statement")
53
+ .build("body")
54
+ .field("body", [def("Statement")]);
55
+ // TODO Figure out how to silently coerce Expressions to
56
+ // ExpressionStatements where a Statement was expected.
57
+ def("ExpressionStatement")
58
+ .bases("Statement")
59
+ .build("expression")
60
+ .field("expression", def("Expression"));
61
+ def("IfStatement")
62
+ .bases("Statement")
63
+ .build("test", "consequent", "alternate")
64
+ .field("test", def("Expression"))
65
+ .field("consequent", def("Statement"))
66
+ .field("alternate", or(def("Statement"), null), defaults["null"]);
67
+ def("LabeledStatement")
68
+ .bases("Statement")
69
+ .build("label", "body")
70
+ .field("label", def("Identifier"))
71
+ .field("body", def("Statement"));
72
+ def("BreakStatement")
73
+ .bases("Statement")
74
+ .build("label")
75
+ .field("label", or(def("Identifier"), null), defaults["null"]);
76
+ def("ContinueStatement")
77
+ .bases("Statement")
78
+ .build("label")
79
+ .field("label", or(def("Identifier"), null), defaults["null"]);
80
+ def("WithStatement")
81
+ .bases("Statement")
82
+ .build("object", "body")
83
+ .field("object", def("Expression"))
84
+ .field("body", def("Statement"));
85
+ def("SwitchStatement")
86
+ .bases("Statement")
87
+ .build("discriminant", "cases", "lexical")
88
+ .field("discriminant", def("Expression"))
89
+ .field("cases", [def("SwitchCase")])
90
+ .field("lexical", Boolean, defaults["false"]);
91
+ def("ReturnStatement")
92
+ .bases("Statement")
93
+ .build("argument")
94
+ .field("argument", or(def("Expression"), null));
95
+ def("ThrowStatement")
96
+ .bases("Statement")
97
+ .build("argument")
98
+ .field("argument", def("Expression"));
99
+ def("TryStatement")
100
+ .bases("Statement")
101
+ .build("block", "handler", "finalizer")
102
+ .field("block", def("BlockStatement"))
103
+ .field("handler", or(def("CatchClause"), null), function () {
104
+ return this.handlers && this.handlers[0] || null;
105
+ })
106
+ .field("handlers", [def("CatchClause")], function () {
107
+ return this.handler ? [this.handler] : [];
108
+ }, true) // Indicates this field is hidden from eachField iteration.
109
+ .field("guardedHandlers", [def("CatchClause")], defaults.emptyArray)
110
+ .field("finalizer", or(def("BlockStatement"), null), defaults["null"]);
111
+ def("CatchClause")
112
+ .bases("Node")
113
+ .build("param", "guard", "body")
114
+ .field("param", def("Pattern"))
115
+ .field("guard", or(def("Expression"), null), defaults["null"])
116
+ .field("body", def("BlockStatement"));
117
+ def("WhileStatement")
118
+ .bases("Statement")
119
+ .build("test", "body")
120
+ .field("test", def("Expression"))
121
+ .field("body", def("Statement"));
122
+ def("DoWhileStatement")
123
+ .bases("Statement")
124
+ .build("body", "test")
125
+ .field("body", def("Statement"))
126
+ .field("test", def("Expression"));
127
+ def("ForStatement")
128
+ .bases("Statement")
129
+ .build("init", "test", "update", "body")
130
+ .field("init", or(def("VariableDeclaration"), def("Expression"), null))
131
+ .field("test", or(def("Expression"), null))
132
+ .field("update", or(def("Expression"), null))
133
+ .field("body", def("Statement"));
134
+ def("ForInStatement")
135
+ .bases("Statement")
136
+ .build("left", "right", "body")
137
+ .field("left", or(def("VariableDeclaration"), def("Expression")))
138
+ .field("right", def("Expression"))
139
+ .field("body", def("Statement"));
140
+ def("DebuggerStatement").bases("Statement").build();
141
+ def("Declaration").bases("Statement");
142
+ def("FunctionDeclaration")
143
+ .bases("Function", "Declaration")
144
+ .build("id", "params", "body")
145
+ .field("id", def("Identifier"));
146
+ def("FunctionExpression")
147
+ .bases("Function", "Expression")
148
+ .build("id", "params", "body");
149
+ def("VariableDeclaration")
150
+ .bases("Declaration")
151
+ .build("kind", "declarations")
152
+ .field("kind", or("var", "let", "const"))
153
+ .field("declarations", [def("VariableDeclarator")]);
154
+ def("VariableDeclarator")
155
+ .bases("Node")
156
+ .build("id", "init")
157
+ .field("id", def("Pattern"))
158
+ .field("init", or(def("Expression"), null), defaults["null"]);
159
+ def("Expression").bases("Node");
160
+ def("ThisExpression").bases("Expression").build();
161
+ def("ArrayExpression")
162
+ .bases("Expression")
163
+ .build("elements")
164
+ .field("elements", [or(def("Expression"), null)]);
165
+ def("ObjectExpression")
166
+ .bases("Expression")
167
+ .build("properties")
168
+ .field("properties", [def("Property")]);
169
+ // TODO Not in the Mozilla Parser API, but used by Esprima.
170
+ def("Property")
171
+ .bases("Node") // Want to be able to visit Property Nodes.
172
+ .build("kind", "key", "value")
173
+ .field("kind", or("init", "get", "set"))
174
+ .field("key", or(def("Literal"), def("Identifier")))
175
+ .field("value", def("Expression"));
176
+ def("SequenceExpression")
177
+ .bases("Expression")
178
+ .build("expressions")
179
+ .field("expressions", [def("Expression")]);
180
+ var UnaryOperator = or("-", "+", "!", "~", "typeof", "void", "delete");
181
+ def("UnaryExpression")
182
+ .bases("Expression")
183
+ .build("operator", "argument", "prefix")
184
+ .field("operator", UnaryOperator)
185
+ .field("argument", def("Expression"))
186
+ // Esprima doesn't bother with this field, presumably because it's
187
+ // always true for unary operators.
188
+ .field("prefix", Boolean, defaults["true"]);
189
+ var BinaryOperator = or.apply(void 0, BinaryOperators);
190
+ def("BinaryExpression")
191
+ .bases("Expression")
192
+ .build("operator", "left", "right")
193
+ .field("operator", BinaryOperator)
194
+ .field("left", def("Expression"))
195
+ .field("right", def("Expression"));
196
+ var AssignmentOperator = or.apply(void 0, AssignmentOperators);
197
+ def("AssignmentExpression")
198
+ .bases("Expression")
199
+ .build("operator", "left", "right")
200
+ .field("operator", AssignmentOperator)
201
+ .field("left", or(def("Pattern"), def("MemberExpression")))
202
+ .field("right", def("Expression"));
203
+ var UpdateOperator = or("++", "--");
204
+ def("UpdateExpression")
205
+ .bases("Expression")
206
+ .build("operator", "argument", "prefix")
207
+ .field("operator", UpdateOperator)
208
+ .field("argument", def("Expression"))
209
+ .field("prefix", Boolean);
210
+ var LogicalOperator = or.apply(void 0, LogicalOperators);
211
+ def("LogicalExpression")
212
+ .bases("Expression")
213
+ .build("operator", "left", "right")
214
+ .field("operator", LogicalOperator)
215
+ .field("left", def("Expression"))
216
+ .field("right", def("Expression"));
217
+ def("ConditionalExpression")
218
+ .bases("Expression")
219
+ .build("test", "consequent", "alternate")
220
+ .field("test", def("Expression"))
221
+ .field("consequent", def("Expression"))
222
+ .field("alternate", def("Expression"));
223
+ def("NewExpression")
224
+ .bases("Expression")
225
+ .build("callee", "arguments")
226
+ .field("callee", def("Expression"))
227
+ // The Mozilla Parser API gives this type as [or(def("Expression"),
228
+ // null)], but null values don't really make sense at the call site.
229
+ // TODO Report this nonsense.
230
+ .field("arguments", [def("Expression")]);
231
+ def("CallExpression")
232
+ .bases("Expression")
233
+ .build("callee", "arguments")
234
+ .field("callee", def("Expression"))
235
+ // See comment for NewExpression above.
236
+ .field("arguments", [def("Expression")]);
237
+ def("MemberExpression")
238
+ .bases("Expression")
239
+ .build("object", "property", "computed")
240
+ .field("object", def("Expression"))
241
+ .field("property", or(def("Identifier"), def("Expression")))
242
+ .field("computed", Boolean, function () {
243
+ var type = this.property.type;
244
+ if (type === 'Literal' ||
245
+ type === 'MemberExpression' ||
246
+ type === 'BinaryExpression') {
247
+ return true;
248
+ }
249
+ return false;
250
+ });
251
+ def("Pattern").bases("Node");
252
+ def("SwitchCase")
253
+ .bases("Node")
254
+ .build("test", "consequent")
255
+ .field("test", or(def("Expression"), null))
256
+ .field("consequent", [def("Statement")]);
257
+ def("Identifier")
258
+ .bases("Expression", "Pattern")
259
+ .build("name")
260
+ .field("name", String)
261
+ .field("optional", Boolean, defaults["false"]);
262
+ def("Literal")
263
+ .bases("Expression")
264
+ .build("value")
265
+ .field("value", or(String, Boolean, null, Number, RegExp, BigInt));
266
+ // Abstract (non-buildable) comment supertype. Not a Node.
267
+ def("Comment")
268
+ .bases("Printable")
269
+ .field("value", String)
270
+ // A .leading comment comes before the node, whereas a .trailing
271
+ // comment comes after it. These two fields should not both be true,
272
+ // but they might both be false when the comment falls inside a node
273
+ // and the node has no children for the comment to lead or trail,
274
+ // e.g. { /*dangling*/ }.
275
+ .field("leading", Boolean, defaults["true"])
276
+ .field("trailing", Boolean, defaults["false"]);
277
+ }
278
+ exports.default = default_1;
279
+ ;
280
+ (0, shared_1.maybeSetModuleExports)(function () { return module; });
281
+ //# sourceMappingURL=core.js.map
tools/ui/node_modules/ast-types/lib/def/core.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../../src/def/core.ts"],"names":[],"mappings":";;;AACA,kEAA0C;AAC1C,2DAAmC;AACnC,0DAAgE;AAGhE,mBAAyB,IAAU;IACjC,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,eAAW,CAAC,CAAC;IAClC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACtB,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;IACnB,IAAI,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;IACjB,IAAI,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAY,CAAC,CAAC;IACpC,IAAI,QAAQ,GAAG,MAAM,CAAC,QAAQ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;AACnD,CAAC;AAxVD,4BAwVC;AAAA,CAAC;AAEF,IAAA,8BAAqB,EAAC,cAAM,OAAA,MAAM,EAAN,CAAM,CAAC,CAAC"}
tools/ui/node_modules/ast-types/lib/def/es-proposals.d.ts ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import { Fork } from "../types";
2
+ export default function (fork: Fork): void;
tools/ui/node_modules/ast-types/lib/def/es-proposals.js ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ var types_1 = tslib_1.__importDefault(require("../types"));
5
+ var shared_1 = tslib_1.__importStar(require("../shared"));
6
+ var es2022_1 = tslib_1.__importDefault(require("./es2022"));
7
+ function default_1(fork) {
8
+ fork.use(es2022_1.default);
9
+ var types = fork.use(types_1.default);
10
+ var Type = types.Type;
11
+ var def = types.Type.def;
12
+ var or = Type.or;
13
+ var shared = fork.use(shared_1.default);
14
+ var defaults = shared.defaults;
15
+ def("AwaitExpression")
16
+ .build("argument", "all")
17
+ .field("argument", or(def("Expression"), null))
18
+ .field("all", Boolean, defaults["false"]);
19
+ // Decorators
20
+ def("Decorator")
21
+ .bases("Node")
22
+ .build("expression")
23
+ .field("expression", def("Expression"));
24
+ def("Property")
25
+ .field("decorators", or([def("Decorator")], null), defaults["null"]);
26
+ def("MethodDefinition")
27
+ .field("decorators", or([def("Decorator")], null), defaults["null"]);
28
+ // Private names
29
+ def("PrivateName")
30
+ .bases("Expression", "Pattern")
31
+ .build("id")
32
+ .field("id", def("Identifier"));
33
+ def("ClassPrivateProperty")
34
+ .bases("ClassProperty")
35
+ .build("key", "value")
36
+ .field("key", def("PrivateName"))
37
+ .field("value", or(def("Expression"), null), defaults["null"]);
38
+ // https://github.com/tc39/proposal-import-assertions
39
+ def("ImportAttribute")
40
+ .bases("Node")
41
+ .build("key", "value")
42
+ .field("key", or(def("Identifier"), def("Literal")))
43
+ .field("value", def("Expression"));
44
+ ["ImportDeclaration",
45
+ "ExportAllDeclaration",
46
+ "ExportNamedDeclaration",
47
+ ].forEach(function (decl) {
48
+ def(decl).field("assertions", [def("ImportAttribute")], defaults.emptyArray);
49
+ });
50
+ // https://github.com/tc39/proposal-record-tuple
51
+ // https://github.com/babel/babel/pull/10865
52
+ def("RecordExpression")
53
+ .bases("Expression")
54
+ .build("properties")
55
+ .field("properties", [or(def("ObjectProperty"), def("ObjectMethod"), def("SpreadElement"))]);
56
+ def("TupleExpression")
57
+ .bases("Expression")
58
+ .build("elements")
59
+ .field("elements", [or(def("Expression"), def("SpreadElement"), null)]);
60
+ // https://github.com/tc39/proposal-js-module-blocks
61
+ // https://github.com/babel/babel/pull/12469
62
+ def("ModuleExpression")
63
+ .bases("Node")
64
+ .build("body")
65
+ .field("body", def("Program"));
66
+ }
67
+ exports.default = default_1;
68
+ ;
69
+ (0, shared_1.maybeSetModuleExports)(function () { return module; });
70
+ //# sourceMappingURL=es-proposals.js.map
tools/ui/node_modules/ast-types/lib/def/es-proposals.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"es-proposals.js","sourceRoot":"","sources":["../../src/def/es-proposals.ts"],"names":[],"mappings":";;;AACA,2DAAmC;AACnC,0DAAgE;AAChE,4DAAiC;AAEjC,mBAAyB,IAAU;IACjC,IAAI,CAAC,GAAG,CAAC,gBAAS,CAAC,CAAC;IAEpB,IAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,eAAW,CAAC,CAAC;IACpC,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACxB,IAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;IAC3B,IAAM,EAAE,GAAG,IAAI,CAAC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BAAkB,CAAC;SACpB,KAAK,CAAC,MAAM,CAAC;SACb,KAAK,CAAC,MAAM,CAAC;SACb,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;AACnC,CAAC;AAvFD,4BAuFC;AAAA,CAAC;AAEF,IAAA,8BAAqB,EAAC,cAAM,OAAA,MAAM,EAAN,CAAM,CAAC,CAAC"}
tools/ui/node_modules/ast-types/lib/def/es2016.d.ts ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import { Fork } from "../types";
2
+ export default function (fork: Fork): void;
tools/ui/node_modules/ast-types/lib/def/es2016.js ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ var es2016_1 = tslib_1.__importDefault(require("./operators/es2016"));
5
+ var es6_1 = tslib_1.__importDefault(require("./es6"));
6
+ var shared_1 = require("../shared");
7
+ function default_1(fork) {
8
+ // The es2016OpsDef plugin comes before es6Def so BinaryOperators and
9
+ // AssignmentOperators will be appropriately augmented before they are first
10
+ // used in the core definitions for this fork.
11
+ fork.use(es2016_1.default);
12
+ fork.use(es6_1.default);
13
+ }
14
+ exports.default = default_1;
15
+ ;
16
+ (0, shared_1.maybeSetModuleExports)(function () { return module; });
17
+ //# sourceMappingURL=es2016.js.map
tools/ui/node_modules/ast-types/lib/def/es2016.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"es2016.js","sourceRoot":"","sources":["../../src/def/es2016.ts"],"names":[],"mappings":";;;AACA,sEAA8C;AAC9C,sDAA2B;AAC3B,oCAAkD;AAElD,mBAAyB,IAAU;IACjC,qEAAqE;IACrE,4EAA4E;IAC5E,8CAA8C;IAC9C,IAAI,CAAC,GAAG,CAAC,gBAAY,CAAC,CAAC;IACvB,IAAI,CAAC,GAAG,CAAC,aAAM,CAAC,CAAC;AACnB,CAAC;AAND,4BAMC;AAAA,CAAC;AAEF,IAAA,8BAAqB,EAAC,cAAM,OAAA,MAAM,EAAN,CAAM,CAAC,CAAC"}
tools/ui/node_modules/ast-types/lib/def/es2017.d.ts ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import { Fork } from "../types";
2
+ export default function (fork: Fork): void;
tools/ui/node_modules/ast-types/lib/def/es2017.js ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ var es2016_1 = tslib_1.__importDefault(require("./es2016"));
5
+ var types_1 = tslib_1.__importDefault(require("../types"));
6
+ var shared_1 = tslib_1.__importStar(require("../shared"));
7
+ function default_1(fork) {
8
+ fork.use(es2016_1.default);
9
+ var types = fork.use(types_1.default);
10
+ var def = types.Type.def;
11
+ var defaults = fork.use(shared_1.default).defaults;
12
+ def("Function")
13
+ .field("async", Boolean, defaults["false"]);
14
+ def("AwaitExpression")
15
+ .bases("Expression")
16
+ .build("argument")
17
+ .field("argument", def("Expression"));
18
+ }
19
+ exports.default = default_1;
20
+ ;
21
+ (0, shared_1.maybeSetModuleExports)(function () { return module; });
22
+ //# sourceMappingURL=es2017.js.map
tools/ui/node_modules/ast-types/lib/def/es2017.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"es2017.js","sourceRoot":"","sources":["../../src/def/es2017.ts"],"names":[],"mappings":";;;AACA,4DAAiC;AACjC,2DAAmC;AACnC,0DAAgE;AAEhE,mBAAyB,IAAU;IACjC,IAAI,CAAC,GAAG,CAAC,gBAAS,CAAC,CAAC;IAEpB,IAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,eAAW,CAAC,CAAC;IACpC,IAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;IAC3B,IAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAY,CAAC,CAAC,QAAQ,CAAC;IAEjD,GAAG,CAAC,UAAU,CAAC;SACZ,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IAE9C,GAAG,CAAC,iBAAiB,CAAC;SACnB,KAAK,CAAC,YAAY,CAAC;SACnB,KAAK,CAAC,UAAU,CAAC;SACjB,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;AAC1C,CAAC;AAdD,4BAcC;AAAA,CAAC;AAEF,IAAA,8BAAqB,EAAC,cAAM,OAAA,MAAM,EAAN,CAAM,CAAC,CAAC"}
tools/ui/node_modules/ast-types/lib/def/es2018.d.ts ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import { Fork } from "../types";
2
+ export default function (fork: Fork): void;
tools/ui/node_modules/ast-types/lib/def/es2018.js ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ var es2017_1 = tslib_1.__importDefault(require("./es2017"));
5
+ var types_1 = tslib_1.__importDefault(require("../types"));
6
+ var shared_1 = tslib_1.__importStar(require("../shared"));
7
+ function default_1(fork) {
8
+ fork.use(es2017_1.default);
9
+ var types = fork.use(types_1.default);
10
+ var def = types.Type.def;
11
+ var or = types.Type.or;
12
+ var defaults = fork.use(shared_1.default).defaults;
13
+ def("ForOfStatement")
14
+ .field("await", Boolean, defaults["false"]);
15
+ // Legacy
16
+ def("SpreadProperty")
17
+ .bases("Node")
18
+ .build("argument")
19
+ .field("argument", def("Expression"));
20
+ def("ObjectExpression")
21
+ .field("properties", [or(def("Property"), def("SpreadProperty"), // Legacy
22
+ def("SpreadElement"))]);
23
+ def("TemplateElement")
24
+ .field("value", { "cooked": or(String, null), "raw": String });
25
+ // Legacy
26
+ def("SpreadPropertyPattern")
27
+ .bases("Pattern")
28
+ .build("argument")
29
+ .field("argument", def("Pattern"));
30
+ def("ObjectPattern")
31
+ .field("properties", [or(def("PropertyPattern"), def("Property"), def("RestElement"), def("SpreadPropertyPattern"))]);
32
+ }
33
+ exports.default = default_1;
34
+ ;
35
+ (0, shared_1.maybeSetModuleExports)(function () { return module; });
36
+ //# sourceMappingURL=es2018.js.map
tools/ui/node_modules/ast-types/lib/def/es2018.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"es2018.js","sourceRoot":"","sources":["../../src/def/es2018.ts"],"names":[],"mappings":";;;AACA,4DAAiC;AACjC,2DAAmC;AACnC,0DAAgE;AAEhE,mBAAyB,IAAU;IACjC,IAAI,CAAC,GAAG,CAAC,gBAAS,CAAC,CAAC;IAEpB,IAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,eAAW,CAAC,CAAC;IACpC,IAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;IAC3B,IAAM,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;IACzB,IAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAY,CAAC,CAAC,QAAQ,CAAC;IAEjD,GAAG,CAAC,gBAAgB,CAAC;SAClB,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IAE9C,SAAS;IACT,GAAG,CAAC,gBAAgB,CAAC;SAClB,KAAK,CAAC,MAAM,CAAC;SACb,KAAK,CAAC,UAAU,CAAC;SACjB,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;IAExC,GAAG,CAAC,kBAAkB,CAAC;SACpB,KAAK,CAAC,YAAY,EAAE,CAAC,EAAE,CACtB,GAAG,CAAC,UAAU,CAAC,EACf,GAAG,CAAC,gBAAgB,CAAC,EAAE,SAAS;QAChC,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